@seed-design/codemod 0.0.24 → 0.0.26

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/bin/index.cjs CHANGED
@@ -1,66 +1,66 @@
1
1
  #!/usr/bin/env node
2
- var bS=Object.create;var Vc=Object.defineProperty;var wS=Object.getOwnPropertyDescriptor;var SS=Object.getOwnPropertyNames;var xS=Object.getPrototypeOf,vS=Object.prototype.hasOwnProperty;var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var _S=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of SS(t))!vS.call(e,s)&&s!==r&&Vc(e,s,{get:()=>t[s],enumerable:!(n=wS(t,s))||n.enumerable});return e};var q=(e,t,r)=>(r=e!=null?bS(xS(e)):{},_S(t||!e||!e.__esModule?Vc(r,"default",{value:e,enumerable:!0}):r,e));var Mu=w((hL,Pu)=>{Pu.exports=Nu;Nu.sync=Ox;var Du=require("fs");function Tx(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var s=r[n].toLowerCase();if(s&&e.substr(-s.length).toLowerCase()===s)return!0}return!1}function Lu(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:Tx(t,r)}function Nu(e,t,r){Du.stat(e,function(n,s){r(n,n?!1:Lu(s,e,t))})}function Ox(e,t){return Lu(Du.statSync(e),e,t)}});var Gu=w((gL,Uu)=>{Uu.exports=ju;ju.sync=Rx;var Fu=require("fs");function ju(e,t,r){Fu.stat(e,function(n,s){r(n,n?!1:Bu(s,t))})}function Rx(e,t){return Bu(Fu.statSync(e),t)}function Bu(e,t){return e.isFile()&&kx(e,t)}function kx(e,t){var r=e.mode,n=e.uid,s=e.gid,o=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),i=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),u=parseInt("001",8),l=a|c,f=r&u||r&c&&s===i||r&a&&n===o||r&l&&o===0;return f}});var Vu=w((bL,qu)=>{var yL=require("fs"),Mn;process.platform==="win32"||global.TESTING_WINDOWS?Mn=Mu():Mn=Gu();qu.exports=Zo;Zo.sync=Cx;function Zo(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,s){Zo(e,t||{},function(o,i){o?s(o):n(i)})})}Mn(e,t||{},function(n,s){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,s=!1),r(n,s)})}function Cx(e,t){try{return Mn.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var Ku=w((wL,Xu)=>{var Xt=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",zu=require("path"),Ax=Xt?";":":",Wu=Vu(),Zu=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Hu=(e,t)=>{let r=t.colon||Ax,n=e.match(/\//)||Xt&&e.match(/\\/)?[""]:[...Xt?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],s=Xt?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=Xt?s.split(r):[""];return Xt&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:s}},Yu=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:s,pathExtExe:o}=Hu(e,t),i=[],a=u=>new Promise((l,f)=>{if(u===n.length)return t.all&&i.length?l(i):f(Zu(e));let d=n[u],p=/^".*"$/.test(d)?d.slice(1,-1):d,b=zu.join(p,e),T=!p&&/^\.[\\\/]/.test(e)?e.slice(0,2)+b:b;l(c(T,u,0))}),c=(u,l,f)=>new Promise((d,p)=>{if(f===s.length)return d(a(l+1));let b=s[f];Wu(u+b,{pathExt:o},(T,N)=>{if(!T&&N)if(t.all)i.push(u+b);else return d(u+b);return d(c(u,l,f+1))})});return r?a(0).then(u=>r(null,u),r):a(0)},Ix=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:s}=Hu(e,t),o=[];for(let i=0;i<r.length;i++){let a=r[i],c=/^".*"$/.test(a)?a.slice(1,-1):a,u=zu.join(c,e),l=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let f=0;f<n.length;f++){let d=l+n[f];try{if(Wu.sync(d,{pathExt:s}))if(t.all)o.push(d);else return d}catch{}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw Zu(e)};Xu.exports=Yu;Yu.sync=Ix});var Qu=w((SL,Ho)=>{"use strict";var Ju=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};Ho.exports=Ju;Ho.exports.default=Ju});var nl=w((xL,rl)=>{"use strict";var el=require("path"),$x=Ku(),Dx=Qu();function tl(e,t){let r=e.options.env||process.env,n=process.cwd(),s=e.options.cwd!=null,o=s&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(e.options.cwd)}catch{}let i;try{i=$x.sync(e.command,{path:r[Dx({env:r})],pathExt:t?el.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return i&&(i=el.resolve(s?e.options.cwd:"",i)),i}function Lx(e){return tl(e)||tl(e,!0)}rl.exports=Lx});var sl=w((vL,Xo)=>{"use strict";var Yo=/([()\][%!^"`<>&|;, *?])/g;function Nx(e){return e=e.replace(Yo,"^$1"),e}function Px(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(Yo,"^$1"),t&&(e=e.replace(Yo,"^$1")),e}Xo.exports.command=Nx;Xo.exports.argument=Px});var il=w((_L,ol)=>{"use strict";ol.exports=/^#!(.*)/});var cl=w((EL,al)=>{"use strict";var Mx=il();al.exports=(e="")=>{let t=e.match(Mx);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),s=r.split("/").pop();return s==="env"?n:n?`${s} ${n}`:s}});var ll=w((TL,ul)=>{"use strict";var Ko=require("fs"),Fx=cl();function jx(e){let r=Buffer.alloc(150),n;try{n=Ko.openSync(e,"r"),Ko.readSync(n,r,0,150,0),Ko.closeSync(n)}catch{}return Fx(r.toString())}ul.exports=jx});var ml=w((OL,pl)=>{"use strict";var Bx=require("path"),fl=nl(),dl=sl(),Ux=ll(),Gx=process.platform==="win32",qx=/\.(?:com|exe)$/i,Vx=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function zx(e){e.file=fl(e);let t=e.file&&Ux(e.file);return t?(e.args.unshift(e.file),e.command=t,fl(e)):e.file}function Wx(e){if(!Gx)return e;let t=zx(e),r=!qx.test(t);if(e.options.forceShell||r){let n=Vx.test(t);e.command=Bx.normalize(e.command),e.command=dl.command(e.command),e.args=e.args.map(o=>dl.argument(o,n));let s=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${s}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function Zx(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:Wx(n)}pl.exports=Zx});var yl=w((RL,gl)=>{"use strict";var Jo=process.platform==="win32";function Qo(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function Hx(e,t){if(!Jo)return;let r=e.emit;e.emit=function(n,s){if(n==="exit"){let o=hl(s,t);if(o)return r.call(e,"error",o)}return r.apply(e,arguments)}}function hl(e,t){return Jo&&e===1&&!t.file?Qo(t.original,"spawn"):null}function Yx(e,t){return Jo&&e===1&&!t.file?Qo(t.original,"spawnSync"):null}gl.exports={hookChildProcess:Hx,verifyENOENT:hl,verifyENOENTSync:Yx,notFoundError:Qo}});var Sl=w((kL,Kt)=>{"use strict";var bl=require("child_process"),ei=ml(),ti=yl();function wl(e,t,r){let n=ei(e,t,r),s=bl.spawn(n.command,n.args,n.options);return ti.hookChildProcess(s,n),s}function Xx(e,t,r){let n=ei(e,t,r),s=bl.spawnSync(n.command,n.args,n.options);return s.error=s.error||ti.verifyENOENTSync(s.status,n),s}Kt.exports=wl;Kt.exports.spawn=wl;Kt.exports.sync=Xx;Kt.exports._parse=ei;Kt.exports._enoent=ti});var Hr=w((hG,Gm)=>{var qT="2.0.0",VT=Number.MAX_SAFE_INTEGER||9007199254740991,zT=16,WT=250,ZT=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Gm.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:zT,MAX_SAFE_BUILD_LENGTH:WT,MAX_SAFE_INTEGER:VT,RELEASE_TYPES:ZT,SEMVER_SPEC_VERSION:qT,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Yr=w((gG,qm)=>{var HT=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};qm.exports=HT});var fr=w((ze,Vm)=>{var{MAX_SAFE_COMPONENT_LENGTH:va,MAX_SAFE_BUILD_LENGTH:YT,MAX_LENGTH:XT}=Hr(),KT=Yr();ze=Vm.exports={};var JT=ze.re=[],QT=ze.safeRe=[],x=ze.src=[],eO=ze.safeSrc=[],v=ze.t={},tO=0,_a="[a-zA-Z0-9-]",rO=[["\\s",1],["\\d",XT],[_a,YT]],nO=e=>{for(let[t,r]of rO)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},A=(e,t,r)=>{let n=nO(t),s=tO++;KT(e,s,t),v[e]=s,x[s]=t,eO[s]=n,JT[s]=new RegExp(t,r?"g":void 0),QT[s]=new RegExp(n,r?"g":void 0)};A("NUMERICIDENTIFIER","0|[1-9]\\d*");A("NUMERICIDENTIFIERLOOSE","\\d+");A("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${_a}*`);A("MAINVERSION",`(${x[v.NUMERICIDENTIFIER]})\\.(${x[v.NUMERICIDENTIFIER]})\\.(${x[v.NUMERICIDENTIFIER]})`);A("MAINVERSIONLOOSE",`(${x[v.NUMERICIDENTIFIERLOOSE]})\\.(${x[v.NUMERICIDENTIFIERLOOSE]})\\.(${x[v.NUMERICIDENTIFIERLOOSE]})`);A("PRERELEASEIDENTIFIER",`(?:${x[v.NUMERICIDENTIFIER]}|${x[v.NONNUMERICIDENTIFIER]})`);A("PRERELEASEIDENTIFIERLOOSE",`(?:${x[v.NUMERICIDENTIFIERLOOSE]}|${x[v.NONNUMERICIDENTIFIER]})`);A("PRERELEASE",`(?:-(${x[v.PRERELEASEIDENTIFIER]}(?:\\.${x[v.PRERELEASEIDENTIFIER]})*))`);A("PRERELEASELOOSE",`(?:-?(${x[v.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${x[v.PRERELEASEIDENTIFIERLOOSE]})*))`);A("BUILDIDENTIFIER",`${_a}+`);A("BUILD",`(?:\\+(${x[v.BUILDIDENTIFIER]}(?:\\.${x[v.BUILDIDENTIFIER]})*))`);A("FULLPLAIN",`v?${x[v.MAINVERSION]}${x[v.PRERELEASE]}?${x[v.BUILD]}?`);A("FULL",`^${x[v.FULLPLAIN]}$`);A("LOOSEPLAIN",`[v=\\s]*${x[v.MAINVERSIONLOOSE]}${x[v.PRERELEASELOOSE]}?${x[v.BUILD]}?`);A("LOOSE",`^${x[v.LOOSEPLAIN]}$`);A("GTLT","((?:<|>)?=?)");A("XRANGEIDENTIFIERLOOSE",`${x[v.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);A("XRANGEIDENTIFIER",`${x[v.NUMERICIDENTIFIER]}|x|X|\\*`);A("XRANGEPLAIN",`[v=\\s]*(${x[v.XRANGEIDENTIFIER]})(?:\\.(${x[v.XRANGEIDENTIFIER]})(?:\\.(${x[v.XRANGEIDENTIFIER]})(?:${x[v.PRERELEASE]})?${x[v.BUILD]}?)?)?`);A("XRANGEPLAINLOOSE",`[v=\\s]*(${x[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${x[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${x[v.XRANGEIDENTIFIERLOOSE]})(?:${x[v.PRERELEASELOOSE]})?${x[v.BUILD]}?)?)?`);A("XRANGE",`^${x[v.GTLT]}\\s*${x[v.XRANGEPLAIN]}$`);A("XRANGELOOSE",`^${x[v.GTLT]}\\s*${x[v.XRANGEPLAINLOOSE]}$`);A("COERCEPLAIN",`(^|[^\\d])(\\d{1,${va}})(?:\\.(\\d{1,${va}}))?(?:\\.(\\d{1,${va}}))?`);A("COERCE",`${x[v.COERCEPLAIN]}(?:$|[^\\d])`);A("COERCEFULL",x[v.COERCEPLAIN]+`(?:${x[v.PRERELEASE]})?(?:${x[v.BUILD]})?(?:$|[^\\d])`);A("COERCERTL",x[v.COERCE],!0);A("COERCERTLFULL",x[v.COERCEFULL],!0);A("LONETILDE","(?:~>?)");A("TILDETRIM",`(\\s*)${x[v.LONETILDE]}\\s+`,!0);ze.tildeTrimReplace="$1~";A("TILDE",`^${x[v.LONETILDE]}${x[v.XRANGEPLAIN]}$`);A("TILDELOOSE",`^${x[v.LONETILDE]}${x[v.XRANGEPLAINLOOSE]}$`);A("LONECARET","(?:\\^)");A("CARETTRIM",`(\\s*)${x[v.LONECARET]}\\s+`,!0);ze.caretTrimReplace="$1^";A("CARET",`^${x[v.LONECARET]}${x[v.XRANGEPLAIN]}$`);A("CARETLOOSE",`^${x[v.LONECARET]}${x[v.XRANGEPLAINLOOSE]}$`);A("COMPARATORLOOSE",`^${x[v.GTLT]}\\s*(${x[v.LOOSEPLAIN]})$|^$`);A("COMPARATOR",`^${x[v.GTLT]}\\s*(${x[v.FULLPLAIN]})$|^$`);A("COMPARATORTRIM",`(\\s*)${x[v.GTLT]}\\s*(${x[v.LOOSEPLAIN]}|${x[v.XRANGEPLAIN]})`,!0);ze.comparatorTrimReplace="$1$2$3";A("HYPHENRANGE",`^\\s*(${x[v.XRANGEPLAIN]})\\s+-\\s+(${x[v.XRANGEPLAIN]})\\s*$`);A("HYPHENRANGELOOSE",`^\\s*(${x[v.XRANGEPLAINLOOSE]})\\s+-\\s+(${x[v.XRANGEPLAINLOOSE]})\\s*$`);A("STAR","(<|>)?=?\\s*\\*");A("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");A("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Ms=w((yG,zm)=>{var sO=Object.freeze({loose:!0}),oO=Object.freeze({}),iO=e=>e?typeof e!="object"?sO:e:oO;zm.exports=iO});var Ea=w((bG,Hm)=>{var Wm=/^[0-9]+$/,Zm=(e,t)=>{let r=Wm.test(e),n=Wm.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},aO=(e,t)=>Zm(t,e);Hm.exports={compareIdentifiers:Zm,rcompareIdentifiers:aO}});var ee=w((wG,Jm)=>{var Fs=Yr(),{MAX_LENGTH:Ym,MAX_SAFE_INTEGER:js}=Hr(),{safeRe:Xm,safeSrc:Km,t:Bs}=fr(),cO=Ms(),{compareIdentifiers:dr}=Ea(),Ta=class e{constructor(t,r){if(r=cO(r),t instanceof e){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>Ym)throw new TypeError(`version is longer than ${Ym} characters`);Fs("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=t.trim().match(r.loose?Xm[Bs.LOOSE]:Xm[Bs.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>js||this.major<0)throw new TypeError("Invalid major version");if(this.minor>js||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>js||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let o=+s;if(o>=0&&o<js)return o}return s}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Fs("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if(typeof t=="string"&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),dr(this.major,t.major)||dr(this.minor,t.minor)||dr(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],s=t.prerelease[r];if(Fs("prerelease compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return dr(n,s)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let n=this.build[r],s=t.build[r];if(Fs("build compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return dr(n,s)}while(++r)}inc(t,r,n){if(t.startsWith("pre")){if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let s=new RegExp(`^${this.options.loose?Km[Bs.PRERELEASELOOSE]:Km[Bs.PRERELEASE]}$`),o=`-${r}`.match(s);if(!o||o[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let s=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[s];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(r){let o=[r,s];n===!1&&(o=[r]),dr(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Jm.exports=Ta});var Tt=w((SG,eh)=>{var Qm=ee(),uO=(e,t,r=!1)=>{if(e instanceof Qm)return e;try{return new Qm(e,t)}catch(n){if(!r)return null;throw n}};eh.exports=uO});var rh=w((xG,th)=>{var lO=Tt(),fO=(e,t)=>{let r=lO(e,t);return r?r.version:null};th.exports=fO});var sh=w((vG,nh)=>{var dO=Tt(),pO=(e,t)=>{let r=dO(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};nh.exports=pO});var ah=w((_G,ih)=>{var oh=ee(),mO=(e,t,r,n,s)=>{typeof r=="string"&&(s=n,n=r,r=void 0);try{return new oh(e instanceof oh?e.version:e,r).inc(t,n,s).version}catch{return null}};ih.exports=mO});var lh=w((EG,uh)=>{var ch=Tt(),hO=(e,t)=>{let r=ch(e,null,!0),n=ch(t,null,!0),s=r.compare(n);if(s===0)return null;let o=s>0,i=o?r:n,a=o?n:r,c=!!i.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(i)===0)return a.minor&&!a.patch?"minor":"patch"}let l=c?"pre":"";return r.major!==n.major?l+"major":r.minor!==n.minor?l+"minor":r.patch!==n.patch?l+"patch":"prerelease"};uh.exports=hO});var dh=w((TG,fh)=>{var gO=ee(),yO=(e,t)=>new gO(e,t).major;fh.exports=yO});var mh=w((OG,ph)=>{var bO=ee(),wO=(e,t)=>new bO(e,t).minor;ph.exports=wO});var gh=w((RG,hh)=>{var SO=ee(),xO=(e,t)=>new SO(e,t).patch;hh.exports=xO});var bh=w((kG,yh)=>{var vO=Tt(),_O=(e,t)=>{let r=vO(e,t);return r&&r.prerelease.length?r.prerelease:null};yh.exports=_O});var Ee=w((CG,Sh)=>{var wh=ee(),EO=(e,t,r)=>new wh(e,r).compare(new wh(t,r));Sh.exports=EO});var vh=w((AG,xh)=>{var TO=Ee(),OO=(e,t,r)=>TO(t,e,r);xh.exports=OO});var Eh=w((IG,_h)=>{var RO=Ee(),kO=(e,t)=>RO(e,t,!0);_h.exports=kO});var Us=w(($G,Oh)=>{var Th=ee(),CO=(e,t,r)=>{let n=new Th(e,r),s=new Th(t,r);return n.compare(s)||n.compareBuild(s)};Oh.exports=CO});var kh=w((DG,Rh)=>{var AO=Us(),IO=(e,t)=>e.sort((r,n)=>AO(r,n,t));Rh.exports=IO});var Ah=w((LG,Ch)=>{var $O=Us(),DO=(e,t)=>e.sort((r,n)=>$O(n,r,t));Ch.exports=DO});var Xr=w((NG,Ih)=>{var LO=Ee(),NO=(e,t,r)=>LO(e,t,r)>0;Ih.exports=NO});var Gs=w((PG,$h)=>{var PO=Ee(),MO=(e,t,r)=>PO(e,t,r)<0;$h.exports=MO});var Oa=w((MG,Dh)=>{var FO=Ee(),jO=(e,t,r)=>FO(e,t,r)===0;Dh.exports=jO});var Ra=w((FG,Lh)=>{var BO=Ee(),UO=(e,t,r)=>BO(e,t,r)!==0;Lh.exports=UO});var qs=w((jG,Nh)=>{var GO=Ee(),qO=(e,t,r)=>GO(e,t,r)>=0;Nh.exports=qO});var Vs=w((BG,Ph)=>{var VO=Ee(),zO=(e,t,r)=>VO(e,t,r)<=0;Ph.exports=zO});var ka=w((UG,Mh)=>{var WO=Oa(),ZO=Ra(),HO=Xr(),YO=qs(),XO=Gs(),KO=Vs(),JO=(e,t,r,n)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return WO(e,r,n);case"!=":return ZO(e,r,n);case">":return HO(e,r,n);case">=":return YO(e,r,n);case"<":return XO(e,r,n);case"<=":return KO(e,r,n);default:throw new TypeError(`Invalid operator: ${t}`)}};Mh.exports=JO});var jh=w((GG,Fh)=>{var QO=ee(),eR=Tt(),{safeRe:zs,t:Ws}=fr(),tR=(e,t)=>{if(e instanceof QO)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?zs[Ws.COERCEFULL]:zs[Ws.COERCE]);else{let c=t.includePrerelease?zs[Ws.COERCERTLFULL]:zs[Ws.COERCERTL],u;for(;(u=c.exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||u.index+u[0].length!==r.index+r[0].length)&&(r=u),c.lastIndex=u.index+u[1].length+u[2].length;c.lastIndex=-1}if(r===null)return null;let n=r[2],s=r[3]||"0",o=r[4]||"0",i=t.includePrerelease&&r[5]?`-${r[5]}`:"",a=t.includePrerelease&&r[6]?`+${r[6]}`:"";return eR(`${n}.${s}.${o}${i}${a}`,t)};Fh.exports=tR});var Uh=w((qG,Bh)=>{var Ca=class{constructor(){this.max=1e3,this.map=new Map}get(t){let r=this.map.get(t);if(r!==void 0)return this.map.delete(t),this.map.set(t,r),r}delete(t){return this.map.delete(t)}set(t,r){if(!this.delete(t)&&r!==void 0){if(this.map.size>=this.max){let s=this.map.keys().next().value;this.delete(s)}this.map.set(t,r)}return this}};Bh.exports=Ca});var Te=w((VG,zh)=>{var rR=/\s+/g,Aa=class e{constructor(t,r){if(r=sR(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof Ia)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(rR," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(s=>!qh(s[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&fR(s[0])){this.set=[s];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let t=0;t<this.set.length;t++){t>0&&(this.formatted+="||");let r=this.set[t];for(let n=0;n<r.length;n++)n>0&&(this.formatted+=" "),this.formatted+=r[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){let n=((this.options.includePrerelease&&uR)|(this.options.loose&&lR))+":"+t,s=Gh.get(n);if(s)return s;let o=this.options.loose,i=o?ue[se.HYPHENRANGELOOSE]:ue[se.HYPHENRANGE];t=t.replace(i,xR(this.options.includePrerelease)),G("hyphen replace",t),t=t.replace(ue[se.COMPARATORTRIM],iR),G("comparator trim",t),t=t.replace(ue[se.TILDETRIM],aR),G("tilde trim",t),t=t.replace(ue[se.CARETTRIM],cR),G("caret trim",t);let a=t.split(" ").map(f=>dR(f,this.options)).join(" ").split(/\s+/).map(f=>SR(f,this.options));o&&(a=a.filter(f=>(G("loose invalid filter",f,this.options),!!f.match(ue[se.COMPARATORLOOSE])))),G("range list",a);let c=new Map,u=a.map(f=>new Ia(f,this.options));for(let f of u){if(qh(f))return[f];c.set(f.value,f)}c.size>1&&c.has("")&&c.delete("");let l=[...c.values()];return Gh.set(n,l),l}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some(n=>Vh(n,r)&&t.set.some(s=>Vh(s,r)&&n.every(o=>s.every(i=>o.intersects(i,r)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new oR(t,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(vR(this.set[r],t,this.options))return!0;return!1}};zh.exports=Aa;var nR=Uh(),Gh=new nR,sR=Ms(),Ia=Kr(),G=Yr(),oR=ee(),{safeRe:ue,t:se,comparatorTrimReplace:iR,tildeTrimReplace:aR,caretTrimReplace:cR}=fr(),{FLAG_INCLUDE_PRERELEASE:uR,FLAG_LOOSE:lR}=Hr(),qh=e=>e.value==="<0.0.0-0",fR=e=>e.value==="",Vh=(e,t)=>{let r=!0,n=e.slice(),s=n.pop();for(;r&&n.length;)r=n.every(o=>s.intersects(o,t)),s=n.pop();return r},dR=(e,t)=>(G("comp",e,t),e=hR(e,t),G("caret",e),e=pR(e,t),G("tildes",e),e=yR(e,t),G("xrange",e),e=wR(e,t),G("stars",e),e),oe=e=>!e||e.toLowerCase()==="x"||e==="*",pR=(e,t)=>e.trim().split(/\s+/).map(r=>mR(r,t)).join(" "),mR=(e,t)=>{let r=t.loose?ue[se.TILDELOOSE]:ue[se.TILDE];return e.replace(r,(n,s,o,i,a)=>{G("tilde",e,n,s,o,i,a);let c;return oe(s)?c="":oe(o)?c=`>=${s}.0.0 <${+s+1}.0.0-0`:oe(i)?c=`>=${s}.${o}.0 <${s}.${+o+1}.0-0`:a?(G("replaceTilde pr",a),c=`>=${s}.${o}.${i}-${a} <${s}.${+o+1}.0-0`):c=`>=${s}.${o}.${i} <${s}.${+o+1}.0-0`,G("tilde return",c),c})},hR=(e,t)=>e.trim().split(/\s+/).map(r=>gR(r,t)).join(" "),gR=(e,t)=>{G("caret",e,t);let r=t.loose?ue[se.CARETLOOSE]:ue[se.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(s,o,i,a,c)=>{G("caret",e,s,o,i,a,c);let u;return oe(o)?u="":oe(i)?u=`>=${o}.0.0${n} <${+o+1}.0.0-0`:oe(a)?o==="0"?u=`>=${o}.${i}.0${n} <${o}.${+i+1}.0-0`:u=`>=${o}.${i}.0${n} <${+o+1}.0.0-0`:c?(G("replaceCaret pr",c),o==="0"?i==="0"?u=`>=${o}.${i}.${a}-${c} <${o}.${i}.${+a+1}-0`:u=`>=${o}.${i}.${a}-${c} <${o}.${+i+1}.0-0`:u=`>=${o}.${i}.${a}-${c} <${+o+1}.0.0-0`):(G("no pr"),o==="0"?i==="0"?u=`>=${o}.${i}.${a}${n} <${o}.${i}.${+a+1}-0`:u=`>=${o}.${i}.${a}${n} <${o}.${+i+1}.0-0`:u=`>=${o}.${i}.${a} <${+o+1}.0.0-0`),G("caret return",u),u})},yR=(e,t)=>(G("replaceXRanges",e,t),e.split(/\s+/).map(r=>bR(r,t)).join(" ")),bR=(e,t)=>{e=e.trim();let r=t.loose?ue[se.XRANGELOOSE]:ue[se.XRANGE];return e.replace(r,(n,s,o,i,a,c)=>{G("xRange",e,n,s,o,i,a,c);let u=oe(o),l=u||oe(i),f=l||oe(a),d=f;return s==="="&&d&&(s=""),c=t.includePrerelease?"-0":"",u?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&d?(l&&(i=0),a=0,s===">"?(s=">=",l?(o=+o+1,i=0,a=0):(i=+i+1,a=0)):s==="<="&&(s="<",l?o=+o+1:i=+i+1),s==="<"&&(c="-0"),n=`${s+o}.${i}.${a}${c}`):l?n=`>=${o}.0.0${c} <${+o+1}.0.0-0`:f&&(n=`>=${o}.${i}.0${c} <${o}.${+i+1}.0-0`),G("xRange return",n),n})},wR=(e,t)=>(G("replaceStars",e,t),e.trim().replace(ue[se.STAR],"")),SR=(e,t)=>(G("replaceGTE0",e,t),e.trim().replace(ue[t.includePrerelease?se.GTE0PRE:se.GTE0],"")),xR=e=>(t,r,n,s,o,i,a,c,u,l,f,d)=>(oe(n)?r="":oe(s)?r=`>=${n}.0.0${e?"-0":""}`:oe(o)?r=`>=${n}.${s}.0${e?"-0":""}`:i?r=`>=${r}`:r=`>=${r}${e?"-0":""}`,oe(u)?c="":oe(l)?c=`<${+u+1}.0.0-0`:oe(f)?c=`<${u}.${+l+1}.0-0`:d?c=`<=${u}.${l}.${f}-${d}`:e?c=`<${u}.${l}.${+f+1}-0`:c=`<=${c}`,`${r} ${c}`.trim()),vR=(e,t,r)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let n=0;n<e.length;n++)if(G(e[n].semver),e[n].semver!==Ia.ANY&&e[n].semver.prerelease.length>0){let s=e[n].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch)return!0}return!1}return!0}});var Kr=w((zG,Kh)=>{var Jr=Symbol("SemVer ANY"),La=class e{static get ANY(){return Jr}constructor(t,r){if(r=Wh(r),t instanceof e){if(t.loose===!!r.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),Da("comparator",t,r),this.options=r,this.loose=!!r.loose,this.parse(t),this.semver===Jr?this.value="":this.value=this.operator+this.semver.version,Da("comp",this)}parse(t){let r=this.options.loose?Zh[Hh.COMPARATORLOOSE]:Zh[Hh.COMPARATOR],n=t.match(r);if(!n)throw new TypeError(`Invalid comparator: ${t}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new Yh(n[2],this.options.loose):this.semver=Jr}toString(){return this.value}test(t){if(Da("Comparator.test",t,this.options.loose),this.semver===Jr||t===Jr)return!0;if(typeof t=="string")try{t=new Yh(t,this.options)}catch{return!1}return $a(t,this.operator,this.semver,this.options)}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Xh(t.value,r).test(this.value):t.operator===""?t.value===""?!0:new Xh(this.value,r).test(t.semver):(r=Wh(r),r.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||$a(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||$a(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};Kh.exports=La;var Wh=Ms(),{safeRe:Zh,t:Hh}=fr(),$a=ka(),Da=Yr(),Yh=ee(),Xh=Te()});var Qr=w((WG,Jh)=>{var _R=Te(),ER=(e,t,r)=>{try{t=new _R(t,r)}catch{return!1}return t.test(e)};Jh.exports=ER});var eg=w((ZG,Qh)=>{var TR=Te(),OR=(e,t)=>new TR(e,t).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));Qh.exports=OR});var rg=w((HG,tg)=>{var RR=ee(),kR=Te(),CR=(e,t,r)=>{let n=null,s=null,o=null;try{o=new kR(t,r)}catch{return null}return e.forEach(i=>{o.test(i)&&(!n||s.compare(i)===-1)&&(n=i,s=new RR(n,r))}),n};tg.exports=CR});var sg=w((YG,ng)=>{var AR=ee(),IR=Te(),$R=(e,t,r)=>{let n=null,s=null,o=null;try{o=new IR(t,r)}catch{return null}return e.forEach(i=>{o.test(i)&&(!n||s.compare(i)===1)&&(n=i,s=new AR(n,r))}),n};ng.exports=$R});var ag=w((XG,ig)=>{var Na=ee(),DR=Te(),og=Xr(),LR=(e,t)=>{e=new DR(e,t);let r=new Na("0.0.0");if(e.test(r)||(r=new Na("0.0.0-0"),e.test(r)))return r;r=null;for(let n=0;n<e.set.length;++n){let s=e.set[n],o=null;s.forEach(i=>{let a=new Na(i.semver.version);switch(i.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!o||og(a,o))&&(o=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${i.operator}`)}}),o&&(!r||og(r,o))&&(r=o)}return r&&e.test(r)?r:null};ig.exports=LR});var ug=w((KG,cg)=>{var NR=Te(),PR=(e,t)=>{try{return new NR(e,t).range||"*"}catch{return null}};cg.exports=PR});var Zs=w((JG,pg)=>{var MR=ee(),dg=Kr(),{ANY:FR}=dg,jR=Te(),BR=Qr(),lg=Xr(),fg=Gs(),UR=Vs(),GR=qs(),qR=(e,t,r,n)=>{e=new MR(e,n),t=new jR(t,n);let s,o,i,a,c;switch(r){case">":s=lg,o=UR,i=fg,a=">",c=">=";break;case"<":s=fg,o=GR,i=lg,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(BR(e,t,n))return!1;for(let u=0;u<t.set.length;++u){let l=t.set[u],f=null,d=null;if(l.forEach(p=>{p.semver===FR&&(p=new dg(">=0.0.0")),f=f||p,d=d||p,s(p.semver,f.semver,n)?f=p:i(p.semver,d.semver,n)&&(d=p)}),f.operator===a||f.operator===c||(!d.operator||d.operator===a)&&o(e,d.semver))return!1;if(d.operator===c&&i(e,d.semver))return!1}return!0};pg.exports=qR});var hg=w((QG,mg)=>{var VR=Zs(),zR=(e,t,r)=>VR(e,t,">",r);mg.exports=zR});var yg=w((e9,gg)=>{var WR=Zs(),ZR=(e,t,r)=>WR(e,t,"<",r);gg.exports=ZR});var Sg=w((t9,wg)=>{var bg=Te(),HR=(e,t,r)=>(e=new bg(e,r),t=new bg(t,r),e.intersects(t,r));wg.exports=HR});var vg=w((r9,xg)=>{var YR=Qr(),XR=Ee();xg.exports=(e,t,r)=>{let n=[],s=null,o=null,i=e.sort((l,f)=>XR(l,f,r));for(let l of i)YR(l,t,r)?(o=l,s||(s=l)):(o&&n.push([s,o]),o=null,s=null);s&&n.push([s,null]);let a=[];for(let[l,f]of n)l===f?a.push(l):!f&&l===i[0]?a.push("*"):f?l===i[0]?a.push(`<=${f}`):a.push(`${l} - ${f}`):a.push(`>=${l}`);let c=a.join(" || "),u=typeof t.raw=="string"?t.raw:String(t);return c.length<u.length?c:t}});var kg=w((n9,Rg)=>{var _g=Te(),Ma=Kr(),{ANY:Pa}=Ma,en=Qr(),Fa=Ee(),KR=(e,t,r={})=>{if(e===t)return!0;e=new _g(e,r),t=new _g(t,r);let n=!1;e:for(let s of e.set){for(let o of t.set){let i=QR(s,o,r);if(n=n||i!==null,i)continue e}if(n)return!1}return!0},JR=[new Ma(">=0.0.0-0")],Eg=[new Ma(">=0.0.0")],QR=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===Pa){if(t.length===1&&t[0].semver===Pa)return!0;r.includePrerelease?e=JR:e=Eg}if(t.length===1&&t[0].semver===Pa){if(r.includePrerelease)return!0;t=Eg}let n=new Set,s,o;for(let p of e)p.operator===">"||p.operator===">="?s=Tg(s,p,r):p.operator==="<"||p.operator==="<="?o=Og(o,p,r):n.add(p.semver);if(n.size>1)return null;let i;if(s&&o){if(i=Fa(s.semver,o.semver,r),i>0)return null;if(i===0&&(s.operator!==">="||o.operator!=="<="))return null}for(let p of n){if(s&&!en(p,String(s),r)||o&&!en(p,String(o),r))return null;for(let b of t)if(!en(p,String(b),r))return!1;return!0}let a,c,u,l,f=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,d=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1;f&&f.prerelease.length===1&&o.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let p of t){if(l=l||p.operator===">"||p.operator===">=",u=u||p.operator==="<"||p.operator==="<=",s){if(d&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===d.major&&p.semver.minor===d.minor&&p.semver.patch===d.patch&&(d=!1),p.operator===">"||p.operator===">="){if(a=Tg(s,p,r),a===p&&a!==s)return!1}else if(s.operator===">="&&!en(s.semver,String(p),r))return!1}if(o){if(f&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===f.major&&p.semver.minor===f.minor&&p.semver.patch===f.patch&&(f=!1),p.operator==="<"||p.operator==="<="){if(c=Og(o,p,r),c===p&&c!==o)return!1}else if(o.operator==="<="&&!en(o.semver,String(p),r))return!1}if(!p.operator&&(o||s)&&i!==0)return!1}return!(s&&u&&!o&&i!==0||o&&l&&!s&&i!==0||d||f)},Tg=(e,t,r)=>{if(!e)return t;let n=Fa(e.semver,t.semver,r);return n>0?e:n<0||t.operator===">"&&e.operator===">="?t:e},Og=(e,t,r)=>{if(!e)return t;let n=Fa(e.semver,t.semver,r);return n<0?e:n>0||t.operator==="<"&&e.operator==="<="?t:e};Rg.exports=KR});var $g=w((s9,Ig)=>{var ja=fr(),Cg=Hr(),ek=ee(),Ag=Ea(),tk=Tt(),rk=rh(),nk=sh(),sk=ah(),ok=lh(),ik=dh(),ak=mh(),ck=gh(),uk=bh(),lk=Ee(),fk=vh(),dk=Eh(),pk=Us(),mk=kh(),hk=Ah(),gk=Xr(),yk=Gs(),bk=Oa(),wk=Ra(),Sk=qs(),xk=Vs(),vk=ka(),_k=jh(),Ek=Kr(),Tk=Te(),Ok=Qr(),Rk=eg(),kk=rg(),Ck=sg(),Ak=ag(),Ik=ug(),$k=Zs(),Dk=hg(),Lk=yg(),Nk=Sg(),Pk=vg(),Mk=kg();Ig.exports={parse:tk,valid:rk,clean:nk,inc:sk,diff:ok,major:ik,minor:ak,patch:ck,prerelease:uk,compare:lk,rcompare:fk,compareLoose:dk,compareBuild:pk,sort:mk,rsort:hk,gt:gk,lt:yk,eq:bk,neq:wk,gte:Sk,lte:xk,cmp:vk,coerce:_k,Comparator:Ek,Range:Tk,satisfies:Ok,toComparators:Rk,maxSatisfying:kk,minSatisfying:Ck,minVersion:Ak,validRange:Ik,outside:$k,gtr:Dk,ltr:Lk,intersects:Nk,simplifyRange:Pk,subset:Mk,SemVer:ek,re:ja.re,src:ja.src,tokens:ja.t,SEMVER_SPEC_VERSION:Cg.SEMVER_SPEC_VERSION,RELEASE_TYPES:Cg.RELEASE_TYPES,compareIdentifiers:Ag.compareIdentifiers,rcompareIdentifiers:Ag.rcompareIdentifiers}});var Hg=w((c9,Zg)=>{var xr=1e3,vr=xr*60,_r=vr*60,Gt=_r*24,WC=Gt*7,ZC=Gt*365.25;Zg.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return HC(e);if(r==="number"&&isFinite(e))return t.long?XC(e):YC(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function HC(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*ZC;case"weeks":case"week":case"w":return r*WC;case"days":case"day":case"d":return r*Gt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*_r;case"minutes":case"minute":case"mins":case"min":case"m":return r*vr;case"seconds":case"second":case"secs":case"sec":case"s":return r*xr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function YC(e){var t=Math.abs(e);return t>=Gt?Math.round(e/Gt)+"d":t>=_r?Math.round(e/_r)+"h":t>=vr?Math.round(e/vr)+"m":t>=xr?Math.round(e/xr)+"s":e+"ms"}function XC(e){var t=Math.abs(e);return t>=Gt?eo(e,t,Gt,"day"):t>=_r?eo(e,t,_r,"hour"):t>=vr?eo(e,t,vr,"minute"):t>=xr?eo(e,t,xr,"second"):e+" ms"}function eo(e,t,r,n){var s=t>=r*1.5;return Math.round(e/r)+" "+n+(s?"s":"")}});var za=w((u9,Yg)=>{function KC(e){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=s,r.enabled=a,r.humanize=Hg(),r.destroy=u,Object.keys(e).forEach(l=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let f=0;for(let d=0;d<l.length;d++)f=(f<<5)-f+l.charCodeAt(d),f|=0;return r.colors[Math.abs(f)%r.colors.length]}r.selectColor=t;function r(l){let f,d=null,p,b;function T(...N){if(!T.enabled)return;let P=T,j=Number(new Date),Y=j-(f||j);P.diff=Y,P.prev=f,P.curr=j,f=j,N[0]=r.coerce(N[0]),typeof N[0]!="string"&&N.unshift("%O");let X=0;N[0]=N[0].replace(/%([a-zA-Z%])/g,(ce,Ae)=>{if(ce==="%%")return"%";X++;let Ie=r.formatters[Ae];if(typeof Ie=="function"){let xe=N[X];ce=Ie.call(P,xe),N.splice(X,1),X--}return ce}),r.formatArgs.call(P,N),(P.log||r.log).apply(P,N)}return T.namespace=l,T.useColors=r.useColors(),T.color=r.selectColor(l),T.extend=n,T.destroy=r.destroy,Object.defineProperty(T,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(p!==r.namespaces&&(p=r.namespaces,b=r.enabled(l)),b),set:N=>{d=N}}),typeof r.init=="function"&&r.init(T),T}function n(l,f){let d=r(this.namespace+(typeof f>"u"?":":f)+l);return d.log=this.log,d}function s(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let f=(typeof l=="string"?l:"").trim().replace(" ",",").split(",").filter(Boolean);for(let d of f)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function o(l,f){let d=0,p=0,b=-1,T=0;for(;d<l.length;)if(p<f.length&&(f[p]===l[d]||f[p]==="*"))f[p]==="*"?(b=p,T=d,p++):(d++,p++);else if(b!==-1)p=b+1,T++,d=T;else return!1;for(;p<f.length&&f[p]==="*";)p++;return p===f.length}function i(){let l=[...r.names,...r.skips.map(f=>"-"+f)].join(",");return r.enable(""),l}function a(l){for(let f of r.skips)if(o(l,f))return!1;for(let f of r.names)if(o(l,f))return!0;return!1}function c(l){return l instanceof Error?l.stack||l.message:l}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Yg.exports=KC});var Xg=w((ye,to)=>{ye.formatArgs=QC;ye.save=eA;ye.load=tA;ye.useColors=JC;ye.storage=rA();ye.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();ye.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function JC(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function QC(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+to.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(r++,s==="%c"&&(n=r))}),e.splice(n,0,t)}ye.log=console.debug||console.log||(()=>{});function eA(e){try{e?ye.storage.setItem("debug",e):ye.storage.removeItem("debug")}catch{}}function tA(){let e;try{e=ye.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function rA(){try{return localStorage}catch{}}to.exports=za()(ye);var{formatters:nA}=to.exports;nA.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Jg=w((l9,Kg)=>{"use strict";Kg.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return n!==-1&&(s===-1||n<s)}});var ty=w((f9,ey)=>{"use strict";var sA=require("os"),Qg=require("tty"),ke=Jg(),{env:J}=process,ro;ke("no-color")||ke("no-colors")||ke("color=false")||ke("color=never")?ro=0:(ke("color")||ke("colors")||ke("color=true")||ke("color=always"))&&(ro=1);function oA(){if("FORCE_COLOR"in J)return J.FORCE_COLOR==="true"?1:J.FORCE_COLOR==="false"?0:J.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(J.FORCE_COLOR,10),3)}function iA(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function aA(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=oA();n!==void 0&&(ro=n);let s=r?ro:n;if(s===0)return 0;if(r){if(ke("color=16m")||ke("color=full")||ke("color=truecolor"))return 3;if(ke("color=256"))return 2}if(e&&!t&&s===void 0)return 0;let o=s||0;if(J.TERM==="dumb")return o;if(process.platform==="win32"){let i=sA.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in J)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(i=>i in J)||J.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in J)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(J.TEAMCITY_VERSION)?1:0;if(J.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in J){let i=Number.parseInt((J.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(J.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(J.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(J.TERM)||"COLORTERM"in J?1:o}function Wa(e,t={}){let r=aA(e,{streamIsTTY:e&&e.isTTY,...t});return iA(r)}ey.exports={supportsColor:Wa,stdout:Wa({isTTY:Qg.isatty(1)}),stderr:Wa({isTTY:Qg.isatty(2)})}});var ny=w((Q,so)=>{var cA=require("tty"),no=require("util");Q.init=hA;Q.log=dA;Q.formatArgs=lA;Q.save=pA;Q.load=mA;Q.useColors=uA;Q.destroy=no.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Q.colors=[6,2,3,4,5,1];try{let e=ty();e&&(e.stderr||e).level>=2&&(Q.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Q.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(s,o)=>o.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function uA(){return"colors"in Q.inspectOpts?!!Q.inspectOpts.colors:cA.isatty(process.stderr.fd)}function lA(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,s="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${s};1m${t} \x1B[0m`;e[0]=o+e[0].split(`
2
+ var gx=Object.create;var Po=Object.defineProperty;var yx=Object.getOwnPropertyDescriptor;var bx=Object.getOwnPropertyNames;var wx=Object.getPrototypeOf,xx=Object.prototype.hasOwnProperty;var x=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Sx=(e,t)=>{for(var r in t)Po(e,r,{get:t[r],enumerable:!0})},vx=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of bx(t))!xx.call(e,s)&&s!==r&&Po(e,s,{get:()=>t[s],enumerable:!(n=yx(t,s))||n.enumerable});return e};var q=(e,t,r)=>(r=e!=null?gx(wx(e)):{},vx(t||!e||!e.__esModule?Po(r,"default",{value:e,enumerable:!0}):r,e));var Fu=x((gL,Mu)=>{Mu.exports=Pu;Pu.sync=TS;var Lu=require("fs");function ES(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var s=r[n].toLowerCase();if(s&&e.substr(-s.length).toLowerCase()===s)return!0}return!1}function Nu(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:ES(t,r)}function Pu(e,t,r){Lu.stat(e,function(n,s){r(n,n?!1:Nu(s,e,t))})}function TS(e,t){return Nu(Lu.statSync(e),e,t)}});var qu=x((yL,Gu)=>{Gu.exports=Bu;Bu.sync=OS;var ju=require("fs");function Bu(e,t,r){ju.stat(e,function(n,s){r(n,n?!1:Uu(s,t))})}function OS(e,t){return Uu(ju.statSync(e),t)}function Uu(e,t){return e.isFile()&&RS(e,t)}function RS(e,t){var r=e.mode,n=e.uid,s=e.gid,o=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),i=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),u=parseInt("001",8),l=a|c,f=r&u||r&c&&s===i||r&a&&n===o||r&l&&o===0;return f}});var zu=x((wL,Vu)=>{var bL=require("fs"),jn;process.platform==="win32"||global.TESTING_WINDOWS?jn=Fu():jn=qu();Vu.exports=Ko;Ko.sync=kS;function Ko(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,s){Ko(e,t||{},function(o,i){o?s(o):n(i)})})}jn(e,t||{},function(n,s){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,s=!1),r(n,s)})}function kS(e,t){try{return jn.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var Ju=x((xL,Ku)=>{var Jt=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Wu=require("path"),CS=Jt?";":":",Hu=zu(),Zu=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Yu=(e,t)=>{let r=t.colon||CS,n=e.match(/\//)||Jt&&e.match(/\\/)?[""]:[...Jt?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],s=Jt?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=Jt?s.split(r):[""];return Jt&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:s}},Xu=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:s,pathExtExe:o}=Yu(e,t),i=[],a=u=>new Promise((l,f)=>{if(u===n.length)return t.all&&i.length?l(i):f(Zu(e));let d=n[u],p=/^".*"$/.test(d)?d.slice(1,-1):d,b=Wu.join(p,e),T=!p&&/^\.[\\\/]/.test(e)?e.slice(0,2)+b:b;l(c(T,u,0))}),c=(u,l,f)=>new Promise((d,p)=>{if(f===s.length)return d(a(l+1));let b=s[f];Hu(u+b,{pathExt:o},(T,P)=>{if(!T&&P)if(t.all)i.push(u+b);else return d(u+b);return d(c(u,l,f+1))})});return r?a(0).then(u=>r(null,u),r):a(0)},AS=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:s}=Yu(e,t),o=[];for(let i=0;i<r.length;i++){let a=r[i],c=/^".*"$/.test(a)?a.slice(1,-1):a,u=Wu.join(c,e),l=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let f=0;f<n.length;f++){let d=l+n[f];try{if(Hu.sync(d,{pathExt:s}))if(t.all)o.push(d);else return d}catch{}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw Zu(e)};Ku.exports=Xu;Xu.sync=AS});var el=x((SL,Jo)=>{"use strict";var Qu=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};Jo.exports=Qu;Jo.exports.default=Qu});var sl=x((vL,nl)=>{"use strict";var tl=require("path"),IS=Ju(),$S=el();function rl(e,t){let r=e.options.env||process.env,n=process.cwd(),s=e.options.cwd!=null,o=s&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(e.options.cwd)}catch{}let i;try{i=IS.sync(e.command,{path:r[$S({env:r})],pathExt:t?tl.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return i&&(i=tl.resolve(s?e.options.cwd:"",i)),i}function DS(e){return rl(e)||rl(e,!0)}nl.exports=DS});var ol=x((_L,ei)=>{"use strict";var Qo=/([()\][%!^"`<>&|;, *?])/g;function LS(e){return e=e.replace(Qo,"^$1"),e}function NS(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(Qo,"^$1"),t&&(e=e.replace(Qo,"^$1")),e}ei.exports.command=LS;ei.exports.argument=NS});var al=x((EL,il)=>{"use strict";il.exports=/^#!(.*)/});var ul=x((TL,cl)=>{"use strict";var PS=al();cl.exports=(e="")=>{let t=e.match(PS);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),s=r.split("/").pop();return s==="env"?n:n?`${s} ${n}`:s}});var fl=x((OL,ll)=>{"use strict";var ti=require("fs"),MS=ul();function FS(e){let r=Buffer.alloc(150),n;try{n=ti.openSync(e,"r"),ti.readSync(n,r,0,150,0),ti.closeSync(n)}catch{}return MS(r.toString())}ll.exports=FS});var hl=x((RL,ml)=>{"use strict";var jS=require("path"),dl=sl(),pl=ol(),BS=fl(),US=process.platform==="win32",GS=/\.(?:com|exe)$/i,qS=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function VS(e){e.file=dl(e);let t=e.file&&BS(e.file);return t?(e.args.unshift(e.file),e.command=t,dl(e)):e.file}function zS(e){if(!US)return e;let t=VS(e),r=!GS.test(t);if(e.options.forceShell||r){let n=qS.test(t);e.command=jS.normalize(e.command),e.command=pl.command(e.command),e.args=e.args.map(o=>pl.argument(o,n));let s=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${s}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function WS(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:zS(n)}ml.exports=WS});var bl=x((kL,yl)=>{"use strict";var ri=process.platform==="win32";function ni(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function HS(e,t){if(!ri)return;let r=e.emit;e.emit=function(n,s){if(n==="exit"){let o=gl(s,t);if(o)return r.call(e,"error",o)}return r.apply(e,arguments)}}function gl(e,t){return ri&&e===1&&!t.file?ni(t.original,"spawn"):null}function ZS(e,t){return ri&&e===1&&!t.file?ni(t.original,"spawnSync"):null}yl.exports={hookChildProcess:HS,verifyENOENT:gl,verifyENOENTSync:ZS,notFoundError:ni}});var Sl=x((CL,Qt)=>{"use strict";var wl=require("child_process"),si=hl(),oi=bl();function xl(e,t,r){let n=si(e,t,r),s=wl.spawn(n.command,n.args,n.options);return oi.hookChildProcess(s,n),s}function YS(e,t,r){let n=si(e,t,r),s=wl.spawnSync(n.command,n.args,n.options);return s.error=s.error||oi.verifyENOENTSync(s.status,n),s}Qt.exports=xl;Qt.exports.spawn=xl;Qt.exports.sync=YS;Qt.exports._parse=si;Qt.exports._enoent=oi});var Xr=x((gG,qm)=>{"use strict";var G0="2.0.0",q0=Number.MAX_SAFE_INTEGER||9007199254740991,V0=16,z0=250,W0=["major","premajor","minor","preminor","patch","prepatch","prerelease"];qm.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:V0,MAX_SAFE_BUILD_LENGTH:z0,MAX_SAFE_INTEGER:q0,RELEASE_TYPES:W0,SEMVER_SPEC_VERSION:G0,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Kr=x((yG,Vm)=>{"use strict";var H0=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};Vm.exports=H0});var pr=x((We,zm)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:Oa,MAX_SAFE_BUILD_LENGTH:Z0,MAX_LENGTH:Y0}=Xr(),X0=Kr();We=zm.exports={};var K0=We.re=[],J0=We.safeRe=[],S=We.src=[],Q0=We.safeSrc=[],v=We.t={},eO=0,Ra="[a-zA-Z0-9-]",tO=[["\\s",1],["\\d",Y0],[Ra,Z0]],rO=e=>{for(let[t,r]of tO)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},A=(e,t,r)=>{let n=rO(t),s=eO++;X0(e,s,t),v[e]=s,S[s]=t,Q0[s]=n,K0[s]=new RegExp(t,r?"g":void 0),J0[s]=new RegExp(n,r?"g":void 0)};A("NUMERICIDENTIFIER","0|[1-9]\\d*");A("NUMERICIDENTIFIERLOOSE","\\d+");A("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Ra}*`);A("MAINVERSION",`(${S[v.NUMERICIDENTIFIER]})\\.(${S[v.NUMERICIDENTIFIER]})\\.(${S[v.NUMERICIDENTIFIER]})`);A("MAINVERSIONLOOSE",`(${S[v.NUMERICIDENTIFIERLOOSE]})\\.(${S[v.NUMERICIDENTIFIERLOOSE]})\\.(${S[v.NUMERICIDENTIFIERLOOSE]})`);A("PRERELEASEIDENTIFIER",`(?:${S[v.NONNUMERICIDENTIFIER]}|${S[v.NUMERICIDENTIFIER]})`);A("PRERELEASEIDENTIFIERLOOSE",`(?:${S[v.NONNUMERICIDENTIFIER]}|${S[v.NUMERICIDENTIFIERLOOSE]})`);A("PRERELEASE",`(?:-(${S[v.PRERELEASEIDENTIFIER]}(?:\\.${S[v.PRERELEASEIDENTIFIER]})*))`);A("PRERELEASELOOSE",`(?:-?(${S[v.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${S[v.PRERELEASEIDENTIFIERLOOSE]})*))`);A("BUILDIDENTIFIER",`${Ra}+`);A("BUILD",`(?:\\+(${S[v.BUILDIDENTIFIER]}(?:\\.${S[v.BUILDIDENTIFIER]})*))`);A("FULLPLAIN",`v?${S[v.MAINVERSION]}${S[v.PRERELEASE]}?${S[v.BUILD]}?`);A("FULL",`^${S[v.FULLPLAIN]}$`);A("LOOSEPLAIN",`[v=\\s]*${S[v.MAINVERSIONLOOSE]}${S[v.PRERELEASELOOSE]}?${S[v.BUILD]}?`);A("LOOSE",`^${S[v.LOOSEPLAIN]}$`);A("GTLT","((?:<|>)?=?)");A("XRANGEIDENTIFIERLOOSE",`${S[v.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);A("XRANGEIDENTIFIER",`${S[v.NUMERICIDENTIFIER]}|x|X|\\*`);A("XRANGEPLAIN",`[v=\\s]*(${S[v.XRANGEIDENTIFIER]})(?:\\.(${S[v.XRANGEIDENTIFIER]})(?:\\.(${S[v.XRANGEIDENTIFIER]})(?:${S[v.PRERELEASE]})?${S[v.BUILD]}?)?)?`);A("XRANGEPLAINLOOSE",`[v=\\s]*(${S[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${S[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${S[v.XRANGEIDENTIFIERLOOSE]})(?:${S[v.PRERELEASELOOSE]})?${S[v.BUILD]}?)?)?`);A("XRANGE",`^${S[v.GTLT]}\\s*${S[v.XRANGEPLAIN]}$`);A("XRANGELOOSE",`^${S[v.GTLT]}\\s*${S[v.XRANGEPLAINLOOSE]}$`);A("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Oa}})(?:\\.(\\d{1,${Oa}}))?(?:\\.(\\d{1,${Oa}}))?`);A("COERCE",`${S[v.COERCEPLAIN]}(?:$|[^\\d])`);A("COERCEFULL",S[v.COERCEPLAIN]+`(?:${S[v.PRERELEASE]})?(?:${S[v.BUILD]})?(?:$|[^\\d])`);A("COERCERTL",S[v.COERCE],!0);A("COERCERTLFULL",S[v.COERCEFULL],!0);A("LONETILDE","(?:~>?)");A("TILDETRIM",`(\\s*)${S[v.LONETILDE]}\\s+`,!0);We.tildeTrimReplace="$1~";A("TILDE",`^${S[v.LONETILDE]}${S[v.XRANGEPLAIN]}$`);A("TILDELOOSE",`^${S[v.LONETILDE]}${S[v.XRANGEPLAINLOOSE]}$`);A("LONECARET","(?:\\^)");A("CARETTRIM",`(\\s*)${S[v.LONECARET]}\\s+`,!0);We.caretTrimReplace="$1^";A("CARET",`^${S[v.LONECARET]}${S[v.XRANGEPLAIN]}$`);A("CARETLOOSE",`^${S[v.LONECARET]}${S[v.XRANGEPLAINLOOSE]}$`);A("COMPARATORLOOSE",`^${S[v.GTLT]}\\s*(${S[v.LOOSEPLAIN]})$|^$`);A("COMPARATOR",`^${S[v.GTLT]}\\s*(${S[v.FULLPLAIN]})$|^$`);A("COMPARATORTRIM",`(\\s*)${S[v.GTLT]}\\s*(${S[v.LOOSEPLAIN]}|${S[v.XRANGEPLAIN]})`,!0);We.comparatorTrimReplace="$1$2$3";A("HYPHENRANGE",`^\\s*(${S[v.XRANGEPLAIN]})\\s+-\\s+(${S[v.XRANGEPLAIN]})\\s*$`);A("HYPHENRANGELOOSE",`^\\s*(${S[v.XRANGEPLAINLOOSE]})\\s+-\\s+(${S[v.XRANGEPLAINLOOSE]})\\s*$`);A("STAR","(<|>)?=?\\s*\\*");A("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");A("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var js=x((bG,Wm)=>{"use strict";var nO=Object.freeze({loose:!0}),sO=Object.freeze({}),oO=e=>e?typeof e!="object"?nO:e:sO;Wm.exports=oO});var ka=x((wG,Ym)=>{"use strict";var Hm=/^[0-9]+$/,Zm=(e,t)=>{let r=Hm.test(e),n=Hm.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},iO=(e,t)=>Zm(t,e);Ym.exports={compareIdentifiers:Zm,rcompareIdentifiers:iO}});var te=x((xG,Km)=>{"use strict";var Bs=Kr(),{MAX_LENGTH:Xm,MAX_SAFE_INTEGER:Us}=Xr(),{safeRe:Gs,t:qs}=pr(),aO=js(),{compareIdentifiers:mr}=ka(),Ca=class e{constructor(t,r){if(r=aO(r),t instanceof e){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>Xm)throw new TypeError(`version is longer than ${Xm} characters`);Bs("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=t.trim().match(r.loose?Gs[qs.LOOSE]:Gs[qs.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Us||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Us||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Us||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let o=+s;if(o>=0&&o<Us)return o}return s}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Bs("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if(typeof t=="string"&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),mr(this.major,t.major)||mr(this.minor,t.minor)||mr(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],s=t.prerelease[r];if(Bs("prerelease compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return mr(n,s)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let n=this.build[r],s=t.build[r];if(Bs("build compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return mr(n,s)}while(++r)}inc(t,r,n){if(t.startsWith("pre")){if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let s=`-${r}`.match(this.options.loose?Gs[qs.PRERELEASELOOSE]:Gs[qs.PRERELEASE]);if(!s||s[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let s=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[s];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(r){let o=[r,s];n===!1&&(o=[r]),mr(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Km.exports=Ca});var Rt=x((SG,Qm)=>{"use strict";var Jm=te(),cO=(e,t,r=!1)=>{if(e instanceof Jm)return e;try{return new Jm(e,t)}catch(n){if(!r)return null;throw n}};Qm.exports=cO});var th=x((vG,eh)=>{"use strict";var uO=Rt(),lO=(e,t)=>{let r=uO(e,t);return r?r.version:null};eh.exports=lO});var nh=x((_G,rh)=>{"use strict";var fO=Rt(),dO=(e,t)=>{let r=fO(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};rh.exports=dO});var ih=x((EG,oh)=>{"use strict";var sh=te(),pO=(e,t,r,n,s)=>{typeof r=="string"&&(s=n,n=r,r=void 0);try{return new sh(e instanceof sh?e.version:e,r).inc(t,n,s).version}catch{return null}};oh.exports=pO});var uh=x((TG,ch)=>{"use strict";var ah=Rt(),mO=(e,t)=>{let r=ah(e,null,!0),n=ah(t,null,!0),s=r.compare(n);if(s===0)return null;let o=s>0,i=o?r:n,a=o?n:r,c=!!i.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(i)===0)return a.minor&&!a.patch?"minor":"patch"}let l=c?"pre":"";return r.major!==n.major?l+"major":r.minor!==n.minor?l+"minor":r.patch!==n.patch?l+"patch":"prerelease"};ch.exports=mO});var fh=x((OG,lh)=>{"use strict";var hO=te(),gO=(e,t)=>new hO(e,t).major;lh.exports=gO});var ph=x((RG,dh)=>{"use strict";var yO=te(),bO=(e,t)=>new yO(e,t).minor;dh.exports=bO});var hh=x((kG,mh)=>{"use strict";var wO=te(),xO=(e,t)=>new wO(e,t).patch;mh.exports=xO});var yh=x((CG,gh)=>{"use strict";var SO=Rt(),vO=(e,t)=>{let r=SO(e,t);return r&&r.prerelease.length?r.prerelease:null};gh.exports=vO});var _e=x((AG,wh)=>{"use strict";var bh=te(),_O=(e,t,r)=>new bh(e,r).compare(new bh(t,r));wh.exports=_O});var Sh=x((IG,xh)=>{"use strict";var EO=_e(),TO=(e,t,r)=>EO(t,e,r);xh.exports=TO});var _h=x(($G,vh)=>{"use strict";var OO=_e(),RO=(e,t)=>OO(e,t,!0);vh.exports=RO});var Vs=x((DG,Th)=>{"use strict";var Eh=te(),kO=(e,t,r)=>{let n=new Eh(e,r),s=new Eh(t,r);return n.compare(s)||n.compareBuild(s)};Th.exports=kO});var Rh=x((LG,Oh)=>{"use strict";var CO=Vs(),AO=(e,t)=>e.sort((r,n)=>CO(r,n,t));Oh.exports=AO});var Ch=x((NG,kh)=>{"use strict";var IO=Vs(),$O=(e,t)=>e.sort((r,n)=>IO(n,r,t));kh.exports=$O});var Jr=x((PG,Ah)=>{"use strict";var DO=_e(),LO=(e,t,r)=>DO(e,t,r)>0;Ah.exports=LO});var zs=x((MG,Ih)=>{"use strict";var NO=_e(),PO=(e,t,r)=>NO(e,t,r)<0;Ih.exports=PO});var Aa=x((FG,$h)=>{"use strict";var MO=_e(),FO=(e,t,r)=>MO(e,t,r)===0;$h.exports=FO});var Ia=x((jG,Dh)=>{"use strict";var jO=_e(),BO=(e,t,r)=>jO(e,t,r)!==0;Dh.exports=BO});var Ws=x((BG,Lh)=>{"use strict";var UO=_e(),GO=(e,t,r)=>UO(e,t,r)>=0;Lh.exports=GO});var Hs=x((UG,Nh)=>{"use strict";var qO=_e(),VO=(e,t,r)=>qO(e,t,r)<=0;Nh.exports=VO});var $a=x((GG,Ph)=>{"use strict";var zO=Aa(),WO=Ia(),HO=Jr(),ZO=Ws(),YO=zs(),XO=Hs(),KO=(e,t,r,n)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return zO(e,r,n);case"!=":return WO(e,r,n);case">":return HO(e,r,n);case">=":return ZO(e,r,n);case"<":return YO(e,r,n);case"<=":return XO(e,r,n);default:throw new TypeError(`Invalid operator: ${t}`)}};Ph.exports=KO});var Fh=x((qG,Mh)=>{"use strict";var JO=te(),QO=Rt(),{safeRe:Zs,t:Ys}=pr(),eR=(e,t)=>{if(e instanceof JO)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?Zs[Ys.COERCEFULL]:Zs[Ys.COERCE]);else{let c=t.includePrerelease?Zs[Ys.COERCERTLFULL]:Zs[Ys.COERCERTL],u;for(;(u=c.exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||u.index+u[0].length!==r.index+r[0].length)&&(r=u),c.lastIndex=u.index+u[1].length+u[2].length;c.lastIndex=-1}if(r===null)return null;let n=r[2],s=r[3]||"0",o=r[4]||"0",i=t.includePrerelease&&r[5]?`-${r[5]}`:"",a=t.includePrerelease&&r[6]?`+${r[6]}`:"";return QO(`${n}.${s}.${o}${i}${a}`,t)};Mh.exports=eR});var Bh=x((VG,jh)=>{"use strict";var Da=class{constructor(){this.max=1e3,this.map=new Map}get(t){let r=this.map.get(t);if(r!==void 0)return this.map.delete(t),this.map.set(t,r),r}delete(t){return this.map.delete(t)}set(t,r){if(!this.delete(t)&&r!==void 0){if(this.map.size>=this.max){let s=this.map.keys().next().value;this.delete(s)}this.map.set(t,r)}return this}};jh.exports=Da});var Ee=x((zG,Vh)=>{"use strict";var tR=/\s+/g,La=class e{constructor(t,r){if(r=nR(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof Na)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(tR," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(s=>!Gh(s[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&lR(s[0])){this.set=[s];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let t=0;t<this.set.length;t++){t>0&&(this.formatted+="||");let r=this.set[t];for(let n=0;n<r.length;n++)n>0&&(this.formatted+=" "),this.formatted+=r[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){let n=((this.options.includePrerelease&&cR)|(this.options.loose&&uR))+":"+t,s=Uh.get(n);if(s)return s;let o=this.options.loose,i=o?ue[oe.HYPHENRANGELOOSE]:ue[oe.HYPHENRANGE];t=t.replace(i,xR(this.options.includePrerelease)),G("hyphen replace",t),t=t.replace(ue[oe.COMPARATORTRIM],oR),G("comparator trim",t),t=t.replace(ue[oe.TILDETRIM],iR),G("tilde trim",t),t=t.replace(ue[oe.CARETTRIM],aR),G("caret trim",t);let a=t.split(" ").map(f=>fR(f,this.options)).join(" ").split(/\s+/).map(f=>wR(f,this.options));o&&(a=a.filter(f=>(G("loose invalid filter",f,this.options),!!f.match(ue[oe.COMPARATORLOOSE])))),G("range list",a);let c=new Map,u=a.map(f=>new Na(f,this.options));for(let f of u){if(Gh(f))return[f];c.set(f.value,f)}c.size>1&&c.has("")&&c.delete("");let l=[...c.values()];return Uh.set(n,l),l}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some(n=>qh(n,r)&&t.set.some(s=>qh(s,r)&&n.every(o=>s.every(i=>o.intersects(i,r)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new sR(t,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(SR(this.set[r],t,this.options))return!0;return!1}};Vh.exports=La;var rR=Bh(),Uh=new rR,nR=js(),Na=Qr(),G=Kr(),sR=te(),{safeRe:ue,t:oe,comparatorTrimReplace:oR,tildeTrimReplace:iR,caretTrimReplace:aR}=pr(),{FLAG_INCLUDE_PRERELEASE:cR,FLAG_LOOSE:uR}=Xr(),Gh=e=>e.value==="<0.0.0-0",lR=e=>e.value==="",qh=(e,t)=>{let r=!0,n=e.slice(),s=n.pop();for(;r&&n.length;)r=n.every(o=>s.intersects(o,t)),s=n.pop();return r},fR=(e,t)=>(G("comp",e,t),e=mR(e,t),G("caret",e),e=dR(e,t),G("tildes",e),e=gR(e,t),G("xrange",e),e=bR(e,t),G("stars",e),e),ie=e=>!e||e.toLowerCase()==="x"||e==="*",dR=(e,t)=>e.trim().split(/\s+/).map(r=>pR(r,t)).join(" "),pR=(e,t)=>{let r=t.loose?ue[oe.TILDELOOSE]:ue[oe.TILDE];return e.replace(r,(n,s,o,i,a)=>{G("tilde",e,n,s,o,i,a);let c;return ie(s)?c="":ie(o)?c=`>=${s}.0.0 <${+s+1}.0.0-0`:ie(i)?c=`>=${s}.${o}.0 <${s}.${+o+1}.0-0`:a?(G("replaceTilde pr",a),c=`>=${s}.${o}.${i}-${a} <${s}.${+o+1}.0-0`):c=`>=${s}.${o}.${i} <${s}.${+o+1}.0-0`,G("tilde return",c),c})},mR=(e,t)=>e.trim().split(/\s+/).map(r=>hR(r,t)).join(" "),hR=(e,t)=>{G("caret",e,t);let r=t.loose?ue[oe.CARETLOOSE]:ue[oe.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(s,o,i,a,c)=>{G("caret",e,s,o,i,a,c);let u;return ie(o)?u="":ie(i)?u=`>=${o}.0.0${n} <${+o+1}.0.0-0`:ie(a)?o==="0"?u=`>=${o}.${i}.0${n} <${o}.${+i+1}.0-0`:u=`>=${o}.${i}.0${n} <${+o+1}.0.0-0`:c?(G("replaceCaret pr",c),o==="0"?i==="0"?u=`>=${o}.${i}.${a}-${c} <${o}.${i}.${+a+1}-0`:u=`>=${o}.${i}.${a}-${c} <${o}.${+i+1}.0-0`:u=`>=${o}.${i}.${a}-${c} <${+o+1}.0.0-0`):(G("no pr"),o==="0"?i==="0"?u=`>=${o}.${i}.${a}${n} <${o}.${i}.${+a+1}-0`:u=`>=${o}.${i}.${a}${n} <${o}.${+i+1}.0-0`:u=`>=${o}.${i}.${a} <${+o+1}.0.0-0`),G("caret return",u),u})},gR=(e,t)=>(G("replaceXRanges",e,t),e.split(/\s+/).map(r=>yR(r,t)).join(" ")),yR=(e,t)=>{e=e.trim();let r=t.loose?ue[oe.XRANGELOOSE]:ue[oe.XRANGE];return e.replace(r,(n,s,o,i,a,c)=>{G("xRange",e,n,s,o,i,a,c);let u=ie(o),l=u||ie(i),f=l||ie(a),d=f;return s==="="&&d&&(s=""),c=t.includePrerelease?"-0":"",u?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&d?(l&&(i=0),a=0,s===">"?(s=">=",l?(o=+o+1,i=0,a=0):(i=+i+1,a=0)):s==="<="&&(s="<",l?o=+o+1:i=+i+1),s==="<"&&(c="-0"),n=`${s+o}.${i}.${a}${c}`):l?n=`>=${o}.0.0${c} <${+o+1}.0.0-0`:f&&(n=`>=${o}.${i}.0${c} <${o}.${+i+1}.0-0`),G("xRange return",n),n})},bR=(e,t)=>(G("replaceStars",e,t),e.trim().replace(ue[oe.STAR],"")),wR=(e,t)=>(G("replaceGTE0",e,t),e.trim().replace(ue[t.includePrerelease?oe.GTE0PRE:oe.GTE0],"")),xR=e=>(t,r,n,s,o,i,a,c,u,l,f,d)=>(ie(n)?r="":ie(s)?r=`>=${n}.0.0${e?"-0":""}`:ie(o)?r=`>=${n}.${s}.0${e?"-0":""}`:i?r=`>=${r}`:r=`>=${r}${e?"-0":""}`,ie(u)?c="":ie(l)?c=`<${+u+1}.0.0-0`:ie(f)?c=`<${u}.${+l+1}.0-0`:d?c=`<=${u}.${l}.${f}-${d}`:e?c=`<${u}.${l}.${+f+1}-0`:c=`<=${c}`,`${r} ${c}`.trim()),SR=(e,t,r)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let n=0;n<e.length;n++)if(G(e[n].semver),e[n].semver!==Na.ANY&&e[n].semver.prerelease.length>0){let s=e[n].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch)return!0}return!1}return!0}});var Qr=x((WG,Xh)=>{"use strict";var en=Symbol("SemVer ANY"),Fa=class e{static get ANY(){return en}constructor(t,r){if(r=zh(r),t instanceof e){if(t.loose===!!r.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),Ma("comparator",t,r),this.options=r,this.loose=!!r.loose,this.parse(t),this.semver===en?this.value="":this.value=this.operator+this.semver.version,Ma("comp",this)}parse(t){let r=this.options.loose?Wh[Hh.COMPARATORLOOSE]:Wh[Hh.COMPARATOR],n=t.match(r);if(!n)throw new TypeError(`Invalid comparator: ${t}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new Zh(n[2],this.options.loose):this.semver=en}toString(){return this.value}test(t){if(Ma("Comparator.test",t,this.options.loose),this.semver===en||t===en)return!0;if(typeof t=="string")try{t=new Zh(t,this.options)}catch{return!1}return Pa(t,this.operator,this.semver,this.options)}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Yh(t.value,r).test(this.value):t.operator===""?t.value===""?!0:new Yh(this.value,r).test(t.semver):(r=zh(r),r.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||Pa(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||Pa(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};Xh.exports=Fa;var zh=js(),{safeRe:Wh,t:Hh}=pr(),Pa=$a(),Ma=Kr(),Zh=te(),Yh=Ee()});var tn=x((HG,Kh)=>{"use strict";var vR=Ee(),_R=(e,t,r)=>{try{t=new vR(t,r)}catch{return!1}return t.test(e)};Kh.exports=_R});var Qh=x((ZG,Jh)=>{"use strict";var ER=Ee(),TR=(e,t)=>new ER(e,t).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));Jh.exports=TR});var tg=x((YG,eg)=>{"use strict";var OR=te(),RR=Ee(),kR=(e,t,r)=>{let n=null,s=null,o=null;try{o=new RR(t,r)}catch{return null}return e.forEach(i=>{o.test(i)&&(!n||s.compare(i)===-1)&&(n=i,s=new OR(n,r))}),n};eg.exports=kR});var ng=x((XG,rg)=>{"use strict";var CR=te(),AR=Ee(),IR=(e,t,r)=>{let n=null,s=null,o=null;try{o=new AR(t,r)}catch{return null}return e.forEach(i=>{o.test(i)&&(!n||s.compare(i)===1)&&(n=i,s=new CR(n,r))}),n};rg.exports=IR});var ig=x((KG,og)=>{"use strict";var ja=te(),$R=Ee(),sg=Jr(),DR=(e,t)=>{e=new $R(e,t);let r=new ja("0.0.0");if(e.test(r)||(r=new ja("0.0.0-0"),e.test(r)))return r;r=null;for(let n=0;n<e.set.length;++n){let s=e.set[n],o=null;s.forEach(i=>{let a=new ja(i.semver.version);switch(i.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!o||sg(a,o))&&(o=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${i.operator}`)}}),o&&(!r||sg(r,o))&&(r=o)}return r&&e.test(r)?r:null};og.exports=DR});var cg=x((JG,ag)=>{"use strict";var LR=Ee(),NR=(e,t)=>{try{return new LR(e,t).range||"*"}catch{return null}};ag.exports=NR});var Xs=x((QG,dg)=>{"use strict";var PR=te(),fg=Qr(),{ANY:MR}=fg,FR=Ee(),jR=tn(),ug=Jr(),lg=zs(),BR=Hs(),UR=Ws(),GR=(e,t,r,n)=>{e=new PR(e,n),t=new FR(t,n);let s,o,i,a,c;switch(r){case">":s=ug,o=BR,i=lg,a=">",c=">=";break;case"<":s=lg,o=UR,i=ug,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(jR(e,t,n))return!1;for(let u=0;u<t.set.length;++u){let l=t.set[u],f=null,d=null;if(l.forEach(p=>{p.semver===MR&&(p=new fg(">=0.0.0")),f=f||p,d=d||p,s(p.semver,f.semver,n)?f=p:i(p.semver,d.semver,n)&&(d=p)}),f.operator===a||f.operator===c||(!d.operator||d.operator===a)&&o(e,d.semver))return!1;if(d.operator===c&&i(e,d.semver))return!1}return!0};dg.exports=GR});var mg=x((e9,pg)=>{"use strict";var qR=Xs(),VR=(e,t,r)=>qR(e,t,">",r);pg.exports=VR});var gg=x((t9,hg)=>{"use strict";var zR=Xs(),WR=(e,t,r)=>zR(e,t,"<",r);hg.exports=WR});var wg=x((r9,bg)=>{"use strict";var yg=Ee(),HR=(e,t,r)=>(e=new yg(e,r),t=new yg(t,r),e.intersects(t,r));bg.exports=HR});var Sg=x((n9,xg)=>{"use strict";var ZR=tn(),YR=_e();xg.exports=(e,t,r)=>{let n=[],s=null,o=null,i=e.sort((l,f)=>YR(l,f,r));for(let l of i)ZR(l,t,r)?(o=l,s||(s=l)):(o&&n.push([s,o]),o=null,s=null);s&&n.push([s,null]);let a=[];for(let[l,f]of n)l===f?a.push(l):!f&&l===i[0]?a.push("*"):f?l===i[0]?a.push(`<=${f}`):a.push(`${l} - ${f}`):a.push(`>=${l}`);let c=a.join(" || "),u=typeof t.raw=="string"?t.raw:String(t);return c.length<u.length?c:t}});var Rg=x((s9,Og)=>{"use strict";var vg=Ee(),Ua=Qr(),{ANY:Ba}=Ua,rn=tn(),Ga=_e(),XR=(e,t,r={})=>{if(e===t)return!0;e=new vg(e,r),t=new vg(t,r);let n=!1;e:for(let s of e.set){for(let o of t.set){let i=JR(s,o,r);if(n=n||i!==null,i)continue e}if(n)return!1}return!0},KR=[new Ua(">=0.0.0-0")],_g=[new Ua(">=0.0.0")],JR=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===Ba){if(t.length===1&&t[0].semver===Ba)return!0;r.includePrerelease?e=KR:e=_g}if(t.length===1&&t[0].semver===Ba){if(r.includePrerelease)return!0;t=_g}let n=new Set,s,o;for(let p of e)p.operator===">"||p.operator===">="?s=Eg(s,p,r):p.operator==="<"||p.operator==="<="?o=Tg(o,p,r):n.add(p.semver);if(n.size>1)return null;let i;if(s&&o){if(i=Ga(s.semver,o.semver,r),i>0)return null;if(i===0&&(s.operator!==">="||o.operator!=="<="))return null}for(let p of n){if(s&&!rn(p,String(s),r)||o&&!rn(p,String(o),r))return null;for(let b of t)if(!rn(p,String(b),r))return!1;return!0}let a,c,u,l,f=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,d=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1;f&&f.prerelease.length===1&&o.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let p of t){if(l=l||p.operator===">"||p.operator===">=",u=u||p.operator==="<"||p.operator==="<=",s){if(d&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===d.major&&p.semver.minor===d.minor&&p.semver.patch===d.patch&&(d=!1),p.operator===">"||p.operator===">="){if(a=Eg(s,p,r),a===p&&a!==s)return!1}else if(s.operator===">="&&!rn(s.semver,String(p),r))return!1}if(o){if(f&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===f.major&&p.semver.minor===f.minor&&p.semver.patch===f.patch&&(f=!1),p.operator==="<"||p.operator==="<="){if(c=Tg(o,p,r),c===p&&c!==o)return!1}else if(o.operator==="<="&&!rn(o.semver,String(p),r))return!1}if(!p.operator&&(o||s)&&i!==0)return!1}return!(s&&u&&!o&&i!==0||o&&l&&!s&&i!==0||d||f)},Eg=(e,t,r)=>{if(!e)return t;let n=Ga(e.semver,t.semver,r);return n>0?e:n<0||t.operator===">"&&e.operator===">="?t:e},Tg=(e,t,r)=>{if(!e)return t;let n=Ga(e.semver,t.semver,r);return n<0?e:n>0||t.operator==="<"&&e.operator==="<="?t:e};Og.exports=XR});var Ig=x((o9,Ag)=>{"use strict";var qa=pr(),kg=Xr(),QR=te(),Cg=ka(),ek=Rt(),tk=th(),rk=nh(),nk=ih(),sk=uh(),ok=fh(),ik=ph(),ak=hh(),ck=yh(),uk=_e(),lk=Sh(),fk=_h(),dk=Vs(),pk=Rh(),mk=Ch(),hk=Jr(),gk=zs(),yk=Aa(),bk=Ia(),wk=Ws(),xk=Hs(),Sk=$a(),vk=Fh(),_k=Qr(),Ek=Ee(),Tk=tn(),Ok=Qh(),Rk=tg(),kk=ng(),Ck=ig(),Ak=cg(),Ik=Xs(),$k=mg(),Dk=gg(),Lk=wg(),Nk=Sg(),Pk=Rg();Ag.exports={parse:ek,valid:tk,clean:rk,inc:nk,diff:sk,major:ok,minor:ik,patch:ak,prerelease:ck,compare:uk,rcompare:lk,compareLoose:fk,compareBuild:dk,sort:pk,rsort:mk,gt:hk,lt:gk,eq:yk,neq:bk,gte:wk,lte:xk,cmp:Sk,coerce:vk,Comparator:_k,Range:Ek,satisfies:Tk,toComparators:Ok,maxSatisfying:Rk,minSatisfying:kk,minVersion:Ck,validRange:Ak,outside:Ik,gtr:$k,ltr:Dk,intersects:Lk,simplifyRange:Nk,subset:Pk,SemVer:QR,re:qa.re,src:qa.src,tokens:qa.t,SEMVER_SPEC_VERSION:kg.SEMVER_SPEC_VERSION,RELEASE_TYPES:kg.RELEASE_TYPES,compareIdentifiers:Cg.compareIdentifiers,rcompareIdentifiers:Cg.rcompareIdentifiers}});var Wg=x((F9,zg)=>{var _r=1e3,Er=_r*60,Tr=Er*60,Vt=Tr*24,HC=Vt*7,ZC=Vt*365.25;zg.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return YC(e);if(r==="number"&&isFinite(e))return t.long?KC(e):XC(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function YC(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*ZC;case"weeks":case"week":case"w":return r*HC;case"days":case"day":case"d":return r*Vt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Tr;case"minutes":case"minute":case"mins":case"min":case"m":return r*Er;case"seconds":case"second":case"secs":case"sec":case"s":return r*_r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function XC(e){var t=Math.abs(e);return t>=Vt?Math.round(e/Vt)+"d":t>=Tr?Math.round(e/Tr)+"h":t>=Er?Math.round(e/Er)+"m":t>=_r?Math.round(e/_r)+"s":e+"ms"}function KC(e){var t=Math.abs(e);return t>=Vt?no(e,t,Vt,"day"):t>=Tr?no(e,t,Tr,"hour"):t>=Er?no(e,t,Er,"minute"):t>=_r?no(e,t,_r,"second"):e+" ms"}function no(e,t,r,n){var s=t>=r*1.5;return Math.round(e/r)+" "+n+(s?"s":"")}});var Ha=x((j9,Hg)=>{function JC(e){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=s,r.enabled=a,r.humanize=Wg(),r.destroy=u,Object.keys(e).forEach(l=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let f=0;for(let d=0;d<l.length;d++)f=(f<<5)-f+l.charCodeAt(d),f|=0;return r.colors[Math.abs(f)%r.colors.length]}r.selectColor=t;function r(l){let f,d=null,p,b;function T(...P){if(!T.enabled)return;let M=T,j=Number(new Date),Y=j-(f||j);M.diff=Y,M.prev=f,M.curr=j,f=j,P[0]=r.coerce(P[0]),typeof P[0]!="string"&&P.unshift("%O");let X=0;P[0]=P[0].replace(/%([a-zA-Z%])/g,(ce,Ae)=>{if(ce==="%%")return"%";X++;let Ie=r.formatters[Ae];if(typeof Ie=="function"){let xe=P[X];ce=Ie.call(M,xe),P.splice(X,1),X--}return ce}),r.formatArgs.call(M,P),(M.log||r.log).apply(M,P)}return T.namespace=l,T.useColors=r.useColors(),T.color=r.selectColor(l),T.extend=n,T.destroy=r.destroy,Object.defineProperty(T,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(p!==r.namespaces&&(p=r.namespaces,b=r.enabled(l)),b),set:P=>{d=P}}),typeof r.init=="function"&&r.init(T),T}function n(l,f){let d=r(this.namespace+(typeof f>"u"?":":f)+l);return d.log=this.log,d}function s(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let f=(typeof l=="string"?l:"").trim().replace(" ",",").split(",").filter(Boolean);for(let d of f)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function o(l,f){let d=0,p=0,b=-1,T=0;for(;d<l.length;)if(p<f.length&&(f[p]===l[d]||f[p]==="*"))f[p]==="*"?(b=p,T=d,p++):(d++,p++);else if(b!==-1)p=b+1,T++,d=T;else return!1;for(;p<f.length&&f[p]==="*";)p++;return p===f.length}function i(){let l=[...r.names,...r.skips.map(f=>"-"+f)].join(",");return r.enable(""),l}function a(l){for(let f of r.skips)if(o(l,f))return!1;for(let f of r.names)if(o(l,f))return!0;return!1}function c(l){return l instanceof Error?l.stack||l.message:l}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Hg.exports=JC});var Zg=x((ge,so)=>{ge.formatArgs=eA;ge.save=tA;ge.load=rA;ge.useColors=QC;ge.storage=nA();ge.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();ge.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function QC(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function eA(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+so.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(r++,s==="%c"&&(n=r))}),e.splice(n,0,t)}ge.log=console.debug||console.log||(()=>{});function tA(e){try{e?ge.storage.setItem("debug",e):ge.storage.removeItem("debug")}catch{}}function rA(){let e;try{e=ge.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function nA(){try{return localStorage}catch{}}so.exports=Ha()(ge);var{formatters:sA}=so.exports;sA.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Xg=x((B9,Yg)=>{"use strict";Yg.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return n!==-1&&(s===-1||n<s)}});var Qg=x((U9,Jg)=>{"use strict";var oA=require("os"),Kg=require("tty"),ke=Xg(),{env:J}=process,oo;ke("no-color")||ke("no-colors")||ke("color=false")||ke("color=never")?oo=0:(ke("color")||ke("colors")||ke("color=true")||ke("color=always"))&&(oo=1);function iA(){if("FORCE_COLOR"in J)return J.FORCE_COLOR==="true"?1:J.FORCE_COLOR==="false"?0:J.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(J.FORCE_COLOR,10),3)}function aA(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function cA(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=iA();n!==void 0&&(oo=n);let s=r?oo:n;if(s===0)return 0;if(r){if(ke("color=16m")||ke("color=full")||ke("color=truecolor"))return 3;if(ke("color=256"))return 2}if(e&&!t&&s===void 0)return 0;let o=s||0;if(J.TERM==="dumb")return o;if(process.platform==="win32"){let i=oA.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in J)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(i=>i in J)||J.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in J)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(J.TEAMCITY_VERSION)?1:0;if(J.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in J){let i=Number.parseInt((J.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(J.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(J.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(J.TERM)||"COLORTERM"in J?1:o}function Za(e,t={}){let r=cA(e,{streamIsTTY:e&&e.isTTY,...t});return aA(r)}Jg.exports={supportsColor:Za,stdout:Za({isTTY:Kg.isatty(1)}),stderr:Za({isTTY:Kg.isatty(2)})}});var ty=x((Q,ao)=>{var uA=require("tty"),io=require("util");Q.init=gA;Q.log=pA;Q.formatArgs=fA;Q.save=mA;Q.load=hA;Q.useColors=lA;Q.destroy=io.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Q.colors=[6,2,3,4,5,1];try{let e=Qg();e&&(e.stderr||e).level>=2&&(Q.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Q.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(s,o)=>o.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function lA(){return"colors"in Q.inspectOpts?!!Q.inspectOpts.colors:uA.isatty(process.stderr.fd)}function fA(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,s="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${s};1m${t} \x1B[0m`;e[0]=o+e[0].split(`
3
3
  `).join(`
4
- `+o),e.push(s+"m+"+so.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=fA()+t+" "+e[0]}function fA(){return Q.inspectOpts.hideDate?"":new Date().toISOString()+" "}function dA(...e){return process.stderr.write(no.formatWithOptions(Q.inspectOpts,...e)+`
5
- `)}function pA(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function mA(){return process.env.DEBUG}function hA(e){e.inspectOpts={};let t=Object.keys(Q.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=Q.inspectOpts[t[r]]}so.exports=za()(Q);var{formatters:ry}=so.exports;ry.o=function(e){return this.inspectOpts.colors=this.useColors,no.inspect(e,this.inspectOpts).split(`
6
- `).map(t=>t.trim()).join(" ")};ry.O=function(e){return this.inspectOpts.colors=this.useColors,no.inspect(e,this.inspectOpts)}});var Ha=w((d9,Za)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Za.exports=Xg():Za.exports=ny()});var sy=w(be=>{"use strict";var gA=be&&be.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(be,"__esModule",{value:!0});var yA=require("fs"),bA=gA(Ha()),Er=bA.default("@kwsites/file-exists");function wA(e,t,r){Er("checking %s",e);try{let n=yA.statSync(e);return n.isFile()&&t?(Er("[OK] path represents a file"),!0):n.isDirectory()&&r?(Er("[OK] path represents a directory"),!0):(Er("[FAIL] path represents something other than a file or directory"),!1)}catch(n){if(n.code==="ENOENT")return Er("[FAIL] path is not accessible: %o",n),!1;throw Er("[FATAL] %o",n),n}}function SA(e,t=be.READABLE){return wA(e,(t&be.FILE)>0,(t&be.FOLDER)>0)}be.exists=SA;be.FILE=1;be.FOLDER=2;be.READABLE=be.FILE+be.FOLDER});var oy=w(oo=>{"use strict";function xA(e){for(var t in e)oo.hasOwnProperty(t)||(oo[t]=e[t])}Object.defineProperty(oo,"__esModule",{value:!0});xA(sy())});var Xa=w(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.createDeferred=qt.deferred=void 0;function Ya(){let e,t,r="pending";return{promise:new Promise((s,o)=>{e=s,t=o}),done(s){r==="pending"&&(r="resolved",e(s))},fail(s){r==="pending"&&(r="rejected",t(s))},get fulfilled(){return r!=="pending"},get status(){return r}}}qt.deferred=Ya;qt.createDeferred=Ya;qt.default=Ya});var zw=w((H9,Bc)=>{var ko=process||{},qw=ko.argv||[],Ro=ko.env||{},$$=!(Ro.NO_COLOR||qw.includes("--no-color"))&&(!!Ro.FORCE_COLOR||qw.includes("--color")||ko.platform==="win32"||(ko.stdout||{}).isTTY&&Ro.TERM!=="dumb"||!!Ro.CI),D$=(e,t,r=e)=>n=>{let s=""+n,o=s.indexOf(t,e.length);return~o?e+L$(s,t,r,o)+t:e+s+t},L$=(e,t,r,n)=>{let s="",o=0;do s+=e.substring(o,n)+r,o=n+t.length,n=e.indexOf(t,o);while(~n);return s+e.substring(o)},Vw=(e=$$)=>{let t=e?D$:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Bc.exports=Vw();Bc.exports.createColors=Vw});var Hw=w((X9,N$)=>{N$.exports={name:"@seed-design/codemod",version:"0.0.24",repository:{type:"git",url:"git+https://github.com/daangn/seed-design.git",directory:"packages/codemod"},license:"MIT",bin:"./bin/index.cjs",files:["bin"],scripts:{dev:"bun ./dev.mjs",build:"bun ./build.mjs",test:"LOG=true bun vitest","lint:publish":"bun publint"},dependencies:{"@seed-design/migration-index":"^0.0.20",cac:"^6.7.14","change-case":"^5.4.4","es-toolkit":"^1.35.0",execa:"^9.5.2",glob:"^11.0.2",jscodeshift:"^17.3.0",picocolors:"^1.1.1",postcss:"^8.5.3",semver:"^7.7.1","simple-git":"^3.27.0",winston:"^3.17.0",zod:"^3.24.3"},devDependencies:{"@types/jscodeshift":"^17.3.0","@types/node":"^22.14.1","csv-parse":"^5.6.0",dotenv:"^16.5.0",esbuild:"^0.25.3",typescript:"^5.8.3"},optionalDependencies:{"@karrotmarket/react-monochrome-icon":"^0.0.23","@karrotmarket/react-multicolor-icon":"^0.0.16"},publishConfig:{access:"public"},engines:{node:">=20.16.0"}}});var Zc=require("events");function Do(e){return e==null?[]:Array.isArray(e)?e:[e]}function ES(e,t,r,n){var s,o=e[t],i=~n.string.indexOf(t)?r==null||r===!0?"":String(r):typeof r=="boolean"?r:~n.boolean.indexOf(t)?r==="false"?!1:r==="true"||(e._.push((s=+r,s*0===0?s:r)),!!r):(s=+r,s*0===0?s:r);e[t]=o==null?i:Array.isArray(o)?o.concat(i):[o,i]}function TS(e,t){e=e||[],t=t||{};var r,n,s,o,i,a={_:[]},c=0,u=0,l=0,f=e.length;let d=t.alias!==void 0,p=t.unknown!==void 0,b=t.default!==void 0;if(t.alias=t.alias||{},t.string=Do(t.string),t.boolean=Do(t.boolean),d)for(r in t.alias)for(n=t.alias[r]=Do(t.alias[r]),c=0;c<n.length;c++)(t.alias[n[c]]=n.concat(r)).splice(c,1);for(c=t.boolean.length;c-- >0;)for(n=t.alias[t.boolean[c]]||[],u=n.length;u-- >0;)t.boolean.push(n[u]);for(c=t.string.length;c-- >0;)for(n=t.alias[t.string[c]]||[],u=n.length;u-- >0;)t.string.push(n[u]);if(b){for(r in t.default)if(o=typeof t.default[r],n=t.alias[r]=t.alias[r]||[],t[o]!==void 0)for(t[o].push(r),c=0;c<n.length;c++)t[o].push(n[c])}let T=p?Object.keys(t.alias):[];for(c=0;c<f;c++){if(s=e[c],s==="--"){a._=a._.concat(e.slice(++c));break}for(u=0;u<s.length&&s.charCodeAt(u)===45;u++);if(u===0)a._.push(s);else if(s.substring(u,u+3)==="no-"){if(o=s.substring(u+3),p&&!~T.indexOf(o))return t.unknown(s);a[o]=!1}else{for(l=u+1;l<s.length&&s.charCodeAt(l)!==61;l++);for(o=s.substring(u,l),i=s.substring(++l)||c+1===f||(""+e[c+1]).charCodeAt(0)===45||e[++c],n=u===2?[o]:o,l=0;l<n.length;l++){if(o=n[l],p&&!~T.indexOf(o))return t.unknown("-".repeat(u)+o);ES(a,o,l+1<n.length||i,t)}}}if(b)for(r in t.default)a[r]===void 0&&(a[r]=t.default[r]);if(d)for(r in a)for(n=t.alias[r]||[];n.length>0;)a[n.shift()]=a[r];return a}var Hc=e=>e.replace(/[<[].+/,"").trim(),OS=e=>{let t=/<([^>]+)>/g,r=/\[([^\]]+)\]/g,n=[],s=a=>{let c=!1,u=a[1];return u.startsWith("...")&&(u=u.slice(3),c=!0),{required:a[0].startsWith("<"),value:u,variadic:c}},o;for(;o=t.exec(e);)n.push(s(o));let i;for(;i=r.exec(e);)n.push(s(i));return n},RS=e=>{let t={alias:{},boolean:[]};for(let[r,n]of e.entries())n.names.length>1&&(t.alias[n.names[0]]=n.names.slice(1)),n.isBoolean&&(n.negated&&e.some((o,i)=>i!==r&&o.names.some(a=>n.names.includes(a))&&typeof o.required=="boolean")||t.boolean.push(n.names[0]));return t},zc=e=>e.sort((t,r)=>t.length>r.length?-1:1)[0],Wc=(e,t)=>e.length>=t?e:`${e}${" ".repeat(t-e.length)}`,kS=e=>e.replace(/([a-z])-([a-z])/g,(t,r,n)=>r+n.toUpperCase()),CS=(e,t,r)=>{let n=0,s=t.length,o=e,i;for(;n<s;++n)i=o[t[n]],o=o[t[n]]=n===s-1?r:i??(~t[n+1].indexOf(".")||!(+t[n+1]>-1)?{}:[])},AS=(e,t)=>{for(let r of Object.keys(t)){let n=t[r];n.shouldTransform&&(e[r]=Array.prototype.concat.call([],e[r]),typeof n.transformFunction=="function"&&(e[r]=e[r].map(n.transformFunction)))}},IS=e=>{let t=/([^\\\/]+)$/.exec(e);return t?t[1]:""},Yc=e=>e.split(".").map((t,r)=>r===0?kS(t):t).join("."),Cr=class extends Error{constructor(t){super(t),this.name=this.constructor.name,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}},Lo=class{constructor(t,r,n){this.rawName=t,this.description=r,this.config=Object.assign({},n),t=t.replace(/\.\*/g,""),this.negated=!1,this.names=Hc(t).split(",").map(s=>{let o=s.trim().replace(/^-{1,2}/,"");return o.startsWith("no-")&&(this.negated=!0,o=o.replace(/^no-/,"")),Yc(o)}).sort((s,o)=>s.length>o.length?1:-1),this.name=this.names[this.names.length-1],this.negated&&this.config.default==null&&(this.config.default=!0),t.includes("<")?this.required=!0:t.includes("[")?this.required=!1:this.isBoolean=!0}},$S=process.argv,DS=`${process.platform}-${process.arch} node-${process.version}`,xn=class{constructor(t,r,n={},s){this.rawName=t,this.description=r,this.config=n,this.cli=s,this.options=[],this.aliasNames=[],this.name=Hc(t),this.args=OS(t),this.examples=[]}usage(t){return this.usageText=t,this}allowUnknownOptions(){return this.config.allowUnknownOptions=!0,this}ignoreOptionDefaultValue(){return this.config.ignoreOptionDefaultValue=!0,this}version(t,r="-v, --version"){return this.versionNumber=t,this.option(r,"Display version number"),this}example(t){return this.examples.push(t),this}option(t,r,n){let s=new Lo(t,r,n);return this.options.push(s),this}alias(t){return this.aliasNames.push(t),this}action(t){return this.commandAction=t,this}isMatched(t){return this.name===t||this.aliasNames.includes(t)}get isDefaultCommand(){return this.name===""||this.aliasNames.includes("!")}get isGlobalCommand(){return this instanceof vn}hasOption(t){return t=t.split(".")[0],this.options.find(r=>r.names.includes(t))}outputHelp(){let{name:t,commands:r}=this.cli,{versionNumber:n,options:s,helpCallback:o}=this.cli.globalCommand,i=[{body:`${t}${n?`/${n}`:""}`}];if(i.push({title:"Usage",body:` $ ${t} ${this.usageText||this.rawName}`}),(this.isGlobalCommand||this.isDefaultCommand)&&r.length>0){let u=zc(r.map(l=>l.rawName));i.push({title:"Commands",body:r.map(l=>` ${Wc(l.rawName,u.length)} ${l.description}`).join(`
4
+ `+o),e.push(s+"m+"+ao.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=dA()+t+" "+e[0]}function dA(){return Q.inspectOpts.hideDate?"":new Date().toISOString()+" "}function pA(...e){return process.stderr.write(io.formatWithOptions(Q.inspectOpts,...e)+`
5
+ `)}function mA(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function hA(){return process.env.DEBUG}function gA(e){e.inspectOpts={};let t=Object.keys(Q.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=Q.inspectOpts[t[r]]}ao.exports=Ha()(Q);var{formatters:ey}=ao.exports;ey.o=function(e){return this.inspectOpts.colors=this.useColors,io.inspect(e,this.inspectOpts).split(`
6
+ `).map(t=>t.trim()).join(" ")};ey.O=function(e){return this.inspectOpts.colors=this.useColors,io.inspect(e,this.inspectOpts)}});var Xa=x((G9,Ya)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Ya.exports=Zg():Ya.exports=ty()});var ry=x(ye=>{"use strict";var yA=ye&&ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ye,"__esModule",{value:!0});var bA=require("fs"),wA=yA(Xa()),Or=wA.default("@kwsites/file-exists");function xA(e,t,r){Or("checking %s",e);try{let n=bA.statSync(e);return n.isFile()&&t?(Or("[OK] path represents a file"),!0):n.isDirectory()&&r?(Or("[OK] path represents a directory"),!0):(Or("[FAIL] path represents something other than a file or directory"),!1)}catch(n){if(n.code==="ENOENT")return Or("[FAIL] path is not accessible: %o",n),!1;throw Or("[FATAL] %o",n),n}}function SA(e,t=ye.READABLE){return xA(e,(t&ye.FILE)>0,(t&ye.FOLDER)>0)}ye.exists=SA;ye.FILE=1;ye.FOLDER=2;ye.READABLE=ye.FILE+ye.FOLDER});var ny=x(co=>{"use strict";function vA(e){for(var t in e)co.hasOwnProperty(t)||(co[t]=e[t])}Object.defineProperty(co,"__esModule",{value:!0});vA(ry())});var Ja=x(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.createDeferred=zt.deferred=void 0;function Ka(){let e,t,r="pending";return{promise:new Promise((s,o)=>{e=s,t=o}),done(s){r==="pending"&&(r="resolved",e(s))},fail(s){r==="pending"&&(r="rejected",t(s))},get fulfilled(){return r!=="pending"},get status(){return r}}}zt.deferred=Ka;zt.createDeferred=Ka;zt.default=Ka});var qw=x((E3,Gc)=>{var Io=process||{},Uw=Io.argv||[],Ao=Io.env||{},D$=!(Ao.NO_COLOR||Uw.includes("--no-color"))&&(!!Ao.FORCE_COLOR||Uw.includes("--color")||Io.platform==="win32"||(Io.stdout||{}).isTTY&&Ao.TERM!=="dumb"||!!Ao.CI),L$=(e,t,r=e)=>n=>{let s=""+n,o=s.indexOf(t,e.length);return~o?e+N$(s,t,r,o)+t:e+s+t},N$=(e,t,r,n)=>{let s="",o=0;do s+=e.substring(o,n)+r,o=n+t.length,n=e.indexOf(t,o);while(~n);return s+e.substring(o)},Gw=(e=D$)=>{let t=e?L$:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Gc.exports=Gw();Gc.exports.createColors=Gw});var Ww=x((O3,P$)=>{P$.exports={name:"@seed-design/codemod",version:"0.0.26",repository:{type:"git",url:"git+https://github.com/daangn/seed-design.git",directory:"packages/codemod"},license:"MIT",bin:"./bin/index.cjs",files:["bin"],scripts:{dev:"bun ./dev.mjs",build:"bun ./build.mjs",test:"LOG=true bun vitest","lint:publish":"bun publint"},dependencies:{"@seed-design/migration-index":"^0.0.20",cac:"^6.7.14","change-case":"^5.4.4","es-toolkit":"^1.35.0",execa:"^9.5.2",glob:"^11.0.2",jscodeshift:"^17.3.0",picocolors:"^1.1.1",postcss:"^8.5.3",semver:"^7.7.1","simple-git":"^3.27.0",winston:"^3.17.0",zod:"^3.24.3"},devDependencies:{"@types/jscodeshift":"^17.3.0","@types/node":"^22.14.1","csv-parse":"^5.6.0",dotenv:"^16.5.0",esbuild:"^0.25.3",typescript:"^5.8.3"},optionalDependencies:{"@karrotmarket/react-monochrome-icon":"^0.0.26","@karrotmarket/react-multicolor-icon":"^0.0.16"},publishConfig:{access:"public"},engines:{node:">=20.16.0"}}});var Zc=require("events");function Mo(e){return e==null?[]:Array.isArray(e)?e:[e]}function _x(e,t,r,n){var s,o=e[t],i=~n.string.indexOf(t)?r==null||r===!0?"":String(r):typeof r=="boolean"?r:~n.boolean.indexOf(t)?r==="false"?!1:r==="true"||(e._.push((s=+r,s*0===0?s:r)),!!r):(s=+r,s*0===0?s:r);e[t]=o==null?i:Array.isArray(o)?o.concat(i):[o,i]}function Ex(e,t){e=e||[],t=t||{};var r,n,s,o,i,a={_:[]},c=0,u=0,l=0,f=e.length;let d=t.alias!==void 0,p=t.unknown!==void 0,b=t.default!==void 0;if(t.alias=t.alias||{},t.string=Mo(t.string),t.boolean=Mo(t.boolean),d)for(r in t.alias)for(n=t.alias[r]=Mo(t.alias[r]),c=0;c<n.length;c++)(t.alias[n[c]]=n.concat(r)).splice(c,1);for(c=t.boolean.length;c-- >0;)for(n=t.alias[t.boolean[c]]||[],u=n.length;u-- >0;)t.boolean.push(n[u]);for(c=t.string.length;c-- >0;)for(n=t.alias[t.string[c]]||[],u=n.length;u-- >0;)t.string.push(n[u]);if(b){for(r in t.default)if(o=typeof t.default[r],n=t.alias[r]=t.alias[r]||[],t[o]!==void 0)for(t[o].push(r),c=0;c<n.length;c++)t[o].push(n[c])}let T=p?Object.keys(t.alias):[];for(c=0;c<f;c++){if(s=e[c],s==="--"){a._=a._.concat(e.slice(++c));break}for(u=0;u<s.length&&s.charCodeAt(u)===45;u++);if(u===0)a._.push(s);else if(s.substring(u,u+3)==="no-"){if(o=s.substring(u+3),p&&!~T.indexOf(o))return t.unknown(s);a[o]=!1}else{for(l=u+1;l<s.length&&s.charCodeAt(l)!==61;l++);for(o=s.substring(u,l),i=s.substring(++l)||c+1===f||(""+e[c+1]).charCodeAt(0)===45||e[++c],n=u===2?[o]:o,l=0;l<n.length;l++){if(o=n[l],p&&!~T.indexOf(o))return t.unknown("-".repeat(u)+o);_x(a,o,l+1<n.length||i,t)}}}if(b)for(r in t.default)a[r]===void 0&&(a[r]=t.default[r]);if(d)for(r in a)for(n=t.alias[r]||[];n.length>0;)a[n.shift()]=a[r];return a}var Yc=e=>e.replace(/[<[].+/,"").trim(),Tx=e=>{let t=/<([^>]+)>/g,r=/\[([^\]]+)\]/g,n=[],s=a=>{let c=!1,u=a[1];return u.startsWith("...")&&(u=u.slice(3),c=!0),{required:a[0].startsWith("<"),value:u,variadic:c}},o;for(;o=t.exec(e);)n.push(s(o));let i;for(;i=r.exec(e);)n.push(s(i));return n},Ox=e=>{let t={alias:{},boolean:[]};for(let[r,n]of e.entries())n.names.length>1&&(t.alias[n.names[0]]=n.names.slice(1)),n.isBoolean&&(n.negated&&e.some((o,i)=>i!==r&&o.names.some(a=>n.names.includes(a))&&typeof o.required=="boolean")||t.boolean.push(n.names[0]));return t},Wc=e=>e.sort((t,r)=>t.length>r.length?-1:1)[0],Hc=(e,t)=>e.length>=t?e:`${e}${" ".repeat(t-e.length)}`,Rx=e=>e.replace(/([a-z])-([a-z])/g,(t,r,n)=>r+n.toUpperCase()),kx=(e,t,r)=>{let n=0,s=t.length,o=e,i;for(;n<s;++n)i=o[t[n]],o=o[t[n]]=n===s-1?r:i??(~t[n+1].indexOf(".")||!(+t[n+1]>-1)?{}:[])},Cx=(e,t)=>{for(let r of Object.keys(t)){let n=t[r];n.shouldTransform&&(e[r]=Array.prototype.concat.call([],e[r]),typeof n.transformFunction=="function"&&(e[r]=e[r].map(n.transformFunction)))}},Ax=e=>{let t=/([^\\\/]+)$/.exec(e);return t?t[1]:""},Xc=e=>e.split(".").map((t,r)=>r===0?Rx(t):t).join("."),Ir=class extends Error{constructor(t){super(t),this.name=this.constructor.name,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}},Fo=class{constructor(t,r,n){this.rawName=t,this.description=r,this.config=Object.assign({},n),t=t.replace(/\.\*/g,""),this.negated=!1,this.names=Yc(t).split(",").map(s=>{let o=s.trim().replace(/^-{1,2}/,"");return o.startsWith("no-")&&(this.negated=!0,o=o.replace(/^no-/,"")),Xc(o)}).sort((s,o)=>s.length>o.length?1:-1),this.name=this.names[this.names.length-1],this.negated&&this.config.default==null&&(this.config.default=!0),t.includes("<")?this.required=!0:t.includes("[")?this.required=!1:this.isBoolean=!0}},Ix=process.argv,$x=`${process.platform}-${process.arch} node-${process.version}`,_n=class{constructor(t,r,n={},s){this.rawName=t,this.description=r,this.config=n,this.cli=s,this.options=[],this.aliasNames=[],this.name=Yc(t),this.args=Tx(t),this.examples=[]}usage(t){return this.usageText=t,this}allowUnknownOptions(){return this.config.allowUnknownOptions=!0,this}ignoreOptionDefaultValue(){return this.config.ignoreOptionDefaultValue=!0,this}version(t,r="-v, --version"){return this.versionNumber=t,this.option(r,"Display version number"),this}example(t){return this.examples.push(t),this}option(t,r,n){let s=new Fo(t,r,n);return this.options.push(s),this}alias(t){return this.aliasNames.push(t),this}action(t){return this.commandAction=t,this}isMatched(t){return this.name===t||this.aliasNames.includes(t)}get isDefaultCommand(){return this.name===""||this.aliasNames.includes("!")}get isGlobalCommand(){return this instanceof En}hasOption(t){return t=t.split(".")[0],this.options.find(r=>r.names.includes(t))}outputHelp(){let{name:t,commands:r}=this.cli,{versionNumber:n,options:s,helpCallback:o}=this.cli.globalCommand,i=[{body:`${t}${n?`/${n}`:""}`}];if(i.push({title:"Usage",body:` $ ${t} ${this.usageText||this.rawName}`}),(this.isGlobalCommand||this.isDefaultCommand)&&r.length>0){let u=Wc(r.map(l=>l.rawName));i.push({title:"Commands",body:r.map(l=>` ${Hc(l.rawName,u.length)} ${l.description}`).join(`
7
7
  `)}),i.push({title:"For more info, run any command with the `--help` flag",body:r.map(l=>` $ ${t}${l.name===""?"":` ${l.name}`} --help`).join(`
8
- `)})}let c=this.isGlobalCommand?s:[...this.options,...s||[]];if(!this.isGlobalCommand&&!this.isDefaultCommand&&(c=c.filter(u=>u.name!=="version")),c.length>0){let u=zc(c.map(l=>l.rawName));i.push({title:"Options",body:c.map(l=>` ${Wc(l.rawName,u.length)} ${l.description} ${l.config.default===void 0?"":`(default: ${l.config.default})`}`).join(`
8
+ `)})}let c=this.isGlobalCommand?s:[...this.options,...s||[]];if(!this.isGlobalCommand&&!this.isDefaultCommand&&(c=c.filter(u=>u.name!=="version")),c.length>0){let u=Wc(c.map(l=>l.rawName));i.push({title:"Options",body:c.map(l=>` ${Hc(l.rawName,u.length)} ${l.description} ${l.config.default===void 0?"":`(default: ${l.config.default})`}`).join(`
9
9
  `)})}this.examples.length>0&&i.push({title:"Examples",body:this.examples.map(u=>typeof u=="function"?u(t):u).join(`
10
10
  `)}),o&&(i=o(i)||i),console.log(i.map(u=>u.title?`${u.title}:
11
11
  ${u.body}`:u.body).join(`
12
12
 
13
- `))}outputVersion(){let{name:t}=this.cli,{versionNumber:r}=this.cli.globalCommand;r&&console.log(`${t}/${r} ${DS}`)}checkRequiredArgs(){let t=this.args.filter(r=>r.required).length;if(this.cli.args.length<t)throw new Cr(`missing required args for command \`${this.rawName}\``)}checkUnknownOptions(){let{options:t,globalCommand:r}=this.cli;if(!this.config.allowUnknownOptions){for(let n of Object.keys(t))if(n!=="--"&&!this.hasOption(n)&&!r.hasOption(n))throw new Cr(`Unknown option \`${n.length>1?`--${n}`:`-${n}`}\``)}}checkOptionValue(){let{options:t,globalCommand:r}=this.cli,n=[...r.options,...this.options];for(let s of n){let o=t[s.name.split(".")[0]];if(s.required){let i=n.some(a=>a.negated&&a.names.includes(s.name));if(o===!0||o===!1&&!i)throw new Cr(`option \`${s.rawName}\` value is missing`)}}}},vn=class extends xn{constructor(t){super("@@global@@","",{},t)}},Sn=Object.assign,No=class extends Zc.EventEmitter{constructor(t=""){super(),this.name=t,this.commands=[],this.rawArgs=[],this.args=[],this.options={},this.globalCommand=new vn(this),this.globalCommand.usage("<command> [options]")}usage(t){return this.globalCommand.usage(t),this}command(t,r,n){let s=new xn(t,r||"",n,this);return s.globalCommand=this.globalCommand,this.commands.push(s),s}option(t,r,n){return this.globalCommand.option(t,r,n),this}help(t){return this.globalCommand.option("-h, --help","Display this message"),this.globalCommand.helpCallback=t,this.showHelpOnExit=!0,this}version(t,r="-v, --version"){return this.globalCommand.version(t,r),this.showVersionOnExit=!0,this}example(t){return this.globalCommand.example(t),this}outputHelp(){this.matchedCommand?this.matchedCommand.outputHelp():this.globalCommand.outputHelp()}outputVersion(){this.globalCommand.outputVersion()}setParsedInfo({args:t,options:r},n,s){return this.args=t,this.options=r,n&&(this.matchedCommand=n),s&&(this.matchedCommandName=s),this}unsetMatchedCommand(){this.matchedCommand=void 0,this.matchedCommandName=void 0}parse(t=$S,{run:r=!0}={}){this.rawArgs=t,this.name||(this.name=t[1]?IS(t[1]):"cli");let n=!0;for(let o of this.commands){let i=this.mri(t.slice(2),o),a=i.args[0];if(o.isMatched(a)){n=!1;let c=Sn(Sn({},i),{args:i.args.slice(1)});this.setParsedInfo(c,o,a),this.emit(`command:${a}`,o)}}if(n){for(let o of this.commands)if(o.name===""){n=!1;let i=this.mri(t.slice(2),o);this.setParsedInfo(i,o),this.emit("command:!",o)}}if(n){let o=this.mri(t.slice(2));this.setParsedInfo(o)}this.options.help&&this.showHelpOnExit&&(this.outputHelp(),r=!1,this.unsetMatchedCommand()),this.options.version&&this.showVersionOnExit&&this.matchedCommandName==null&&(this.outputVersion(),r=!1,this.unsetMatchedCommand());let s={args:this.args,options:this.options};return r&&this.runMatchedCommand(),!this.matchedCommand&&this.args[0]&&this.emit("command:*"),s}mri(t,r){let n=[...this.globalCommand.options,...r?r.options:[]],s=RS(n),o=[],i=t.indexOf("--");i>-1&&(o=t.slice(i+1),t=t.slice(0,i));let a=TS(t,s);a=Object.keys(a).reduce((d,p)=>Sn(Sn({},d),{[Yc(p)]:a[p]}),{_:[]});let c=a._,u={"--":o},l=r&&r.config.ignoreOptionDefaultValue?r.config.ignoreOptionDefaultValue:this.globalCommand.config.ignoreOptionDefaultValue,f=Object.create(null);for(let d of n){if(!l&&d.config.default!==void 0)for(let p of d.names)u[p]=d.config.default;Array.isArray(d.config.type)&&f[d.name]===void 0&&(f[d.name]=Object.create(null),f[d.name].shouldTransform=!0,f[d.name].transformFunction=d.config.type[0])}for(let d of Object.keys(a))if(d!=="_"){let p=d.split(".");CS(u,p,a[d]),AS(u,f)}return{args:c,options:u}}runMatchedCommand(){let{args:t,options:r,matchedCommand:n}=this;if(!n||!n.commandAction)return;n.checkUnknownOptions(),n.checkOptionValue(),n.checkRequiredArgs();let s=[];return n.args.forEach((o,i)=>{o.variadic?s.push(t.slice(i)):s.push(t[i])}),s.push(r),n.commandAction.apply(this,s)}},Xc=(e="")=>new No(e);function W(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}var Kc=require("node:url"),Zt=(e,t)=>{let r=Mo(LS(e));if(typeof r!="string")throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},LS=e=>Po(e)?e.toString():e,Po=e=>typeof e!="string"&&e&&Object.getPrototypeOf(e)===String.prototype,Mo=e=>e instanceof URL?(0,Kc.fileURLToPath)(e):e;var _n=(e,t=[],r={})=>{let n=Zt(e,"First argument"),[s,o]=W(t)?[[],t]:[t,r];if(!Array.isArray(s))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${s}`);if(s.some(c=>typeof c=="object"&&c!==null))throw new TypeError(`Second argument must be an array of strings: ${s}`);let i=s.map(String),a=i.find(c=>c.includes("\0"));if(a!==void 0)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!W(o))throw new TypeError(`Last argument must be an options object: ${o}`);return[n,i,o]};var iu=require("node:child_process");var Jc=require("node:string_decoder"),{toString:Qc}=Object.prototype,eu=e=>Qc.call(e)==="[object ArrayBuffer]",K=e=>Qc.call(e)==="[object Uint8Array]",Xe=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),NS=new TextEncoder,tu=e=>NS.encode(e),PS=new TextDecoder,En=e=>PS.decode(e),ru=(e,t)=>MS(e,t).join(""),MS=(e,t)=>{if(t==="utf8"&&e.every(o=>typeof o=="string"))return e;let r=new Jc.StringDecoder(t),n=e.map(o=>typeof o=="string"?tu(o):o).map(o=>r.write(o)),s=r.end();return s===""?n:[...n,s]},Ar=e=>e.length===1&&K(e[0])?e[0]:Fo(FS(e)),FS=e=>e.map(t=>typeof t=="string"?tu(t):t),Fo=e=>{let t=new Uint8Array(jS(e)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t},jS=e=>{let t=0;for(let r of e)t+=r.length;return t};var au=e=>Array.isArray(e)&&Array.isArray(e.raw),cu=(e,t)=>{let r=[];for(let[o,i]of e.entries())r=BS({templates:e,expressions:t,tokens:r,index:o,template:i});if(r.length===0)throw new TypeError("Template script must not be empty");let[n,...s]=r;return[n,s,{}]},BS=({templates:e,expressions:t,tokens:r,index:n,template:s})=>{if(s===void 0)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);let{nextTokens:o,leadingWhitespaces:i,trailingWhitespaces:a}=US(s,e.raw[n]),c=su(r,o,i);if(n===t.length)return c;let u=t[n],l=Array.isArray(u)?u.map(f=>ou(f)):[ou(u)];return su(c,l,a)},US=(e,t)=>{if(t.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let r=[],n=0,s=nu.has(t[0]);for(let i=0,a=0;i<e.length;i+=1,a+=1){let c=t[a];if(nu.has(c))n!==i&&r.push(e.slice(n,i)),n=i+1;else if(c==="\\"){let u=t[a+1];u===`
14
- `?(i-=1,a+=1):u==="u"&&t[a+2]==="{"?a=t.indexOf("}",a+3):a+=GS[u]??1}}let o=n===e.length;return o||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:s,trailingWhitespaces:o}},nu=new Set([" "," ","\r",`
15
- `]),GS={x:3,u:5},su=(e,t,r)=>r||e.length===0||t.length===0?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],ou=e=>{let t=typeof e;if(t==="string")return e;if(t==="number")return String(e);if(W(e)&&("stdout"in e||"isMaxBuffer"in e))return qS(e);throw e instanceof iu.ChildProcess||Object.prototype.toString.call(e)==="[object Promise]"?new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}."):new TypeError(`Unexpected "${t}" in template expression`)},qS=({stdout:e})=>{if(typeof e=="string")return e;if(K(e))return En(e);throw e===void 0?new TypeError(`Missing result.stdout in template expression. This is probably due to the previous subprocess' "stdout" option.`):new TypeError(`Unexpected "${typeof e}" stdout in template expression`)};var vp=require("node:child_process");var lu=require("node:util");var Tn=q(require("node:process"),1),De=e=>On.includes(e),On=[Tn.default.stdin,Tn.default.stdout,Tn.default.stderr],ve=["stdin","stdout","stderr"],Rn=e=>ve[e]??`stdio[${e}]`;var fu=e=>{let t={...e};for(let r of Uo)t[r]=jo(e,r);return t},jo=(e,t)=>{let r=Array.from({length:VS(e)+1}),n=zS(e[t],r,t);return XS(n,t)},VS=({stdio:e})=>Array.isArray(e)?Math.max(e.length,ve.length):ve.length,zS=(e,t,r)=>W(e)?WS(e,t,r):t.fill(e),WS=(e,t,r)=>{for(let n of Object.keys(e).sort(ZS))for(let s of HS(n,r,t))t[s]=e[n];return t},ZS=(e,t)=>uu(e)<uu(t)?1:-1,uu=e=>e==="stdout"||e==="stderr"?0:e==="all"?2:1,HS=(e,t,r)=>{if(e==="ipc")return[r.length-1];let n=Bo(e);if(n===void 0||n===0)throw new TypeError(`"${t}.${e}" is invalid.
13
+ `))}outputVersion(){let{name:t}=this.cli,{versionNumber:r}=this.cli.globalCommand;r&&console.log(`${t}/${r} ${$x}`)}checkRequiredArgs(){let t=this.args.filter(r=>r.required).length;if(this.cli.args.length<t)throw new Ir(`missing required args for command \`${this.rawName}\``)}checkUnknownOptions(){let{options:t,globalCommand:r}=this.cli;if(!this.config.allowUnknownOptions){for(let n of Object.keys(t))if(n!=="--"&&!this.hasOption(n)&&!r.hasOption(n))throw new Ir(`Unknown option \`${n.length>1?`--${n}`:`-${n}`}\``)}}checkOptionValue(){let{options:t,globalCommand:r}=this.cli,n=[...r.options,...this.options];for(let s of n){let o=t[s.name.split(".")[0]];if(s.required){let i=n.some(a=>a.negated&&a.names.includes(s.name));if(o===!0||o===!1&&!i)throw new Ir(`option \`${s.rawName}\` value is missing`)}}}},En=class extends _n{constructor(t){super("@@global@@","",{},t)}},vn=Object.assign,jo=class extends Zc.EventEmitter{constructor(t=""){super(),this.name=t,this.commands=[],this.rawArgs=[],this.args=[],this.options={},this.globalCommand=new En(this),this.globalCommand.usage("<command> [options]")}usage(t){return this.globalCommand.usage(t),this}command(t,r,n){let s=new _n(t,r||"",n,this);return s.globalCommand=this.globalCommand,this.commands.push(s),s}option(t,r,n){return this.globalCommand.option(t,r,n),this}help(t){return this.globalCommand.option("-h, --help","Display this message"),this.globalCommand.helpCallback=t,this.showHelpOnExit=!0,this}version(t,r="-v, --version"){return this.globalCommand.version(t,r),this.showVersionOnExit=!0,this}example(t){return this.globalCommand.example(t),this}outputHelp(){this.matchedCommand?this.matchedCommand.outputHelp():this.globalCommand.outputHelp()}outputVersion(){this.globalCommand.outputVersion()}setParsedInfo({args:t,options:r},n,s){return this.args=t,this.options=r,n&&(this.matchedCommand=n),s&&(this.matchedCommandName=s),this}unsetMatchedCommand(){this.matchedCommand=void 0,this.matchedCommandName=void 0}parse(t=Ix,{run:r=!0}={}){this.rawArgs=t,this.name||(this.name=t[1]?Ax(t[1]):"cli");let n=!0;for(let o of this.commands){let i=this.mri(t.slice(2),o),a=i.args[0];if(o.isMatched(a)){n=!1;let c=vn(vn({},i),{args:i.args.slice(1)});this.setParsedInfo(c,o,a),this.emit(`command:${a}`,o)}}if(n){for(let o of this.commands)if(o.name===""){n=!1;let i=this.mri(t.slice(2),o);this.setParsedInfo(i,o),this.emit("command:!",o)}}if(n){let o=this.mri(t.slice(2));this.setParsedInfo(o)}this.options.help&&this.showHelpOnExit&&(this.outputHelp(),r=!1,this.unsetMatchedCommand()),this.options.version&&this.showVersionOnExit&&this.matchedCommandName==null&&(this.outputVersion(),r=!1,this.unsetMatchedCommand());let s={args:this.args,options:this.options};return r&&this.runMatchedCommand(),!this.matchedCommand&&this.args[0]&&this.emit("command:*"),s}mri(t,r){let n=[...this.globalCommand.options,...r?r.options:[]],s=Ox(n),o=[],i=t.indexOf("--");i>-1&&(o=t.slice(i+1),t=t.slice(0,i));let a=Ex(t,s);a=Object.keys(a).reduce((d,p)=>vn(vn({},d),{[Xc(p)]:a[p]}),{_:[]});let c=a._,u={"--":o},l=r&&r.config.ignoreOptionDefaultValue?r.config.ignoreOptionDefaultValue:this.globalCommand.config.ignoreOptionDefaultValue,f=Object.create(null);for(let d of n){if(!l&&d.config.default!==void 0)for(let p of d.names)u[p]=d.config.default;Array.isArray(d.config.type)&&f[d.name]===void 0&&(f[d.name]=Object.create(null),f[d.name].shouldTransform=!0,f[d.name].transformFunction=d.config.type[0])}for(let d of Object.keys(a))if(d!=="_"){let p=d.split(".");kx(u,p,a[d]),Cx(u,f)}return{args:c,options:u}}runMatchedCommand(){let{args:t,options:r,matchedCommand:n}=this;if(!n||!n.commandAction)return;n.checkUnknownOptions(),n.checkOptionValue(),n.checkRequiredArgs();let s=[];return n.args.forEach((o,i)=>{o.variadic?s.push(t.slice(i)):s.push(t[i])}),s.push(r),n.commandAction.apply(this,s)}},Kc=(e="")=>new jo(e);function W(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}var Jc=require("node:url"),Yt=(e,t)=>{let r=Uo(Dx(e));if(typeof r!="string")throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Dx=e=>Bo(e)?e.toString():e,Bo=e=>typeof e!="string"&&e&&Object.getPrototypeOf(e)===String.prototype,Uo=e=>e instanceof URL?(0,Jc.fileURLToPath)(e):e;var Tn=(e,t=[],r={})=>{let n=Yt(e,"First argument"),[s,o]=W(t)?[[],t]:[t,r];if(!Array.isArray(s))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${s}`);if(s.some(c=>typeof c=="object"&&c!==null))throw new TypeError(`Second argument must be an array of strings: ${s}`);let i=s.map(String),a=i.find(c=>c.includes("\0"));if(a!==void 0)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!W(o))throw new TypeError(`Last argument must be an options object: ${o}`);return[n,i,o]};var au=require("node:child_process");var Qc=require("node:string_decoder"),{toString:eu}=Object.prototype,tu=e=>eu.call(e)==="[object ArrayBuffer]",K=e=>eu.call(e)==="[object Uint8Array]",Je=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Lx=new TextEncoder,ru=e=>Lx.encode(e),Nx=new TextDecoder,On=e=>Nx.decode(e),nu=(e,t)=>Px(e,t).join(""),Px=(e,t)=>{if(t==="utf8"&&e.every(o=>typeof o=="string"))return e;let r=new Qc.StringDecoder(t),n=e.map(o=>typeof o=="string"?ru(o):o).map(o=>r.write(o)),s=r.end();return s===""?n:[...n,s]},$r=e=>e.length===1&&K(e[0])?e[0]:Go(Mx(e)),Mx=e=>e.map(t=>typeof t=="string"?ru(t):t),Go=e=>{let t=new Uint8Array(Fx(e)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t},Fx=e=>{let t=0;for(let r of e)t+=r.length;return t};var cu=e=>Array.isArray(e)&&Array.isArray(e.raw),uu=(e,t)=>{let r=[];for(let[o,i]of e.entries())r=jx({templates:e,expressions:t,tokens:r,index:o,template:i});if(r.length===0)throw new TypeError("Template script must not be empty");let[n,...s]=r;return[n,s,{}]},jx=({templates:e,expressions:t,tokens:r,index:n,template:s})=>{if(s===void 0)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);let{nextTokens:o,leadingWhitespaces:i,trailingWhitespaces:a}=Bx(s,e.raw[n]),c=ou(r,o,i);if(n===t.length)return c;let u=t[n],l=Array.isArray(u)?u.map(f=>iu(f)):[iu(u)];return ou(c,l,a)},Bx=(e,t)=>{if(t.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let r=[],n=0,s=su.has(t[0]);for(let i=0,a=0;i<e.length;i+=1,a+=1){let c=t[a];if(su.has(c))n!==i&&r.push(e.slice(n,i)),n=i+1;else if(c==="\\"){let u=t[a+1];u===`
14
+ `?(i-=1,a+=1):u==="u"&&t[a+2]==="{"?a=t.indexOf("}",a+3):a+=Ux[u]??1}}let o=n===e.length;return o||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:s,trailingWhitespaces:o}},su=new Set([" "," ","\r",`
15
+ `]),Ux={x:3,u:5},ou=(e,t,r)=>r||e.length===0||t.length===0?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],iu=e=>{let t=typeof e;if(t==="string")return e;if(t==="number")return String(e);if(W(e)&&("stdout"in e||"isMaxBuffer"in e))return Gx(e);throw e instanceof au.ChildProcess||Object.prototype.toString.call(e)==="[object Promise]"?new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}."):new TypeError(`Unexpected "${t}" in template expression`)},Gx=({stdout:e})=>{if(typeof e=="string")return e;if(K(e))return On(e);throw e===void 0?new TypeError(`Missing result.stdout in template expression. This is probably due to the previous subprocess' "stdout" option.`):new TypeError(`Unexpected "${typeof e}" stdout in template expression`)};var _p=require("node:child_process");var fu=require("node:util");var Rn=q(require("node:process"),1),De=e=>kn.includes(e),kn=[Rn.default.stdin,Rn.default.stdout,Rn.default.stderr],Se=["stdin","stdout","stderr"],Cn=e=>Se[e]??`stdio[${e}]`;var du=e=>{let t={...e};for(let r of zo)t[r]=qo(e,r);return t},qo=(e,t)=>{let r=Array.from({length:qx(e)+1}),n=Vx(e[t],r,t);return Yx(n,t)},qx=({stdio:e})=>Array.isArray(e)?Math.max(e.length,Se.length):Se.length,Vx=(e,t,r)=>W(e)?zx(e,t,r):t.fill(e),zx=(e,t,r)=>{for(let n of Object.keys(e).sort(Wx))for(let s of Hx(n,r,t))t[s]=e[n];return t},Wx=(e,t)=>lu(e)<lu(t)?1:-1,lu=e=>e==="stdout"||e==="stderr"?0:e==="all"?2:1,Hx=(e,t,r)=>{if(e==="ipc")return[r.length-1];let n=Vo(e);if(n===void 0||n===0)throw new TypeError(`"${t}.${e}" is invalid.
16
16
  It must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.
17
- Please set the "stdio" option to ensure that file descriptor exists.`);return n==="all"?[1,2]:[n]},Bo=e=>{if(e==="all")return e;if(ve.includes(e))return ve.indexOf(e);let t=YS.exec(e);if(t!==null)return Number(t[1])},YS=/^fd(\d+)$/,XS=(e,t)=>e.map(r=>r===void 0?JS[t]:r),KS=(0,lu.debuglog)("execa").enabled?"full":"none",JS={lines:!1,buffer:!0,maxBuffer:1e3*1e3*100,verbose:KS,stripFinalNewline:!0},Uo=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],Ke=(e,t)=>t==="ipc"?e.at(-1):e[t];var Ht=({verbose:e},t)=>Go(e,t)!=="none",Yt=({verbose:e},t)=>!["none","short"].includes(Go(e,t)),du=({verbose:e},t)=>{let r=Go(e,t);return kn(r)?r:void 0},Go=(e,t)=>t===void 0?QS(e):Ke(e,t),QS=e=>e.find(t=>kn(t))??Cn.findLast(t=>e.includes(t)),kn=e=>typeof e=="function",Cn=["none","short","full"];var Au=require("node:util");var pu=require("node:process"),mu=require("node:util"),hu=(e,t)=>{let r=[e,...t],n=r.join(" "),s=r.map(o=>ox(gu(o))).join(" ");return{command:n,escapedCommand:s}},Ir=e=>(0,mu.stripVTControlCharacters)(e).split(`
18
- `).map(t=>gu(t)).join(`
19
- `),gu=e=>e.replaceAll(rx,t=>ex(t)),ex=e=>{let t=nx[e];if(t!==void 0)return t;let r=e.codePointAt(0),n=r.toString(16);return r<=sx?`\\u${n.padStart(4,"0")}`:`\\U${n}`},tx=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},rx=tx(),nx={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},sx=65535,ox=e=>ix.test(e)?e:pu.platform==="win32"?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,ix=/^[\w./-]+$/;var qo=q(require("node:process"),1);function Vo(){let{env:e}=qo.default,{TERM:t,TERM_PROGRAM:r}=e;return qo.default.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var yu={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},bu={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},ax={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},cx={...yu,...bu},ux={...yu,...ax},lx=Vo(),fx=lx?cx:ux,An=fx,cD=Object.entries(bu);var vu=q(require("node:tty"),1),wu,Su,In,xu,dx=((xu=(In=(Su=(wu=vu.default)==null?void 0:wu.WriteStream)==null?void 0:Su.prototype)==null?void 0:In.hasColors)==null?void 0:xu.call(In))??!1,L=(e,t)=>{if(!dx)return s=>s;let r=`\x1B[${e}m`,n=`\x1B[${t}m`;return s=>{let o=s+"",i=o.indexOf(n);if(i===-1)return r+o+n;let a=r,c=0;for(;i!==-1;)a+=o.slice(c,i)+r,c=i+n.length,i=o.indexOf(n,c);return a+=o.slice(c)+n,a}},lD=L(0,0),_u=L(1,22),fD=L(2,22),dD=L(3,23),pD=L(4,24),mD=L(53,55),hD=L(7,27),gD=L(8,28),yD=L(9,29),bD=L(30,39),wD=L(31,39),SD=L(32,39),xD=L(33,39),vD=L(34,39),_D=L(35,39),ED=L(36,39),TD=L(37,39),$n=L(90,39),OD=L(40,49),RD=L(41,49),kD=L(42,49),CD=L(43,49),AD=L(44,49),ID=L(45,49),$D=L(46,49),DD=L(47,49),LD=L(100,49),Eu=L(91,39),ND=L(92,39),Tu=L(93,39),PD=L(94,39),MD=L(95,39),FD=L(96,39),jD=L(97,39),BD=L(101,49),UD=L(102,49),GD=L(103,49),qD=L(104,49),VD=L(105,49),zD=L(106,49),WD=L(107,49);var ku=({type:e,message:t,timestamp:r,piped:n,commandId:s,result:{failed:o=!1}={},options:{reject:i=!0}})=>{let a=px(r),c=mx[e]({failed:o,reject:i,piped:n}),u=hx[e]({reject:i});return`${$n(`[${a}]`)} ${$n(`[${s}]`)} ${u(c)} ${u(t)}`},px=e=>`${Dn(e.getHours(),2)}:${Dn(e.getMinutes(),2)}:${Dn(e.getSeconds(),2)}.${Dn(e.getMilliseconds(),3)}`,Dn=(e,t)=>String(e).padStart(t,"0"),Ou=({failed:e,reject:t})=>e?t?An.cross:An.warning:An.tick,mx={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:Ou,duration:Ou},Ru=e=>e,hx={command:()=>_u,output:()=>Ru,ipc:()=>Ru,error:({reject:e})=>e?Eu:Tu,duration:()=>$n};var Cu=(e,t,r)=>{let n=du(t,r);return e.map(({verboseLine:s,verboseObject:o})=>gx(s,o,n)).filter(s=>s!==void 0).map(s=>yx(s)).join("")},gx=(e,t,r)=>{if(r===void 0)return e;let n=r(e,t);if(typeof n=="string")return n},yx=e=>e.endsWith(`
17
+ Please set the "stdio" option to ensure that file descriptor exists.`);return n==="all"?[1,2]:[n]},Vo=e=>{if(e==="all")return e;if(Se.includes(e))return Se.indexOf(e);let t=Zx.exec(e);if(t!==null)return Number(t[1])},Zx=/^fd(\d+)$/,Yx=(e,t)=>e.map(r=>r===void 0?Kx[t]:r),Xx=(0,fu.debuglog)("execa").enabled?"full":"none",Kx={lines:!1,buffer:!0,maxBuffer:1e3*1e3*100,verbose:Xx,stripFinalNewline:!0},zo=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],Qe=(e,t)=>t==="ipc"?e.at(-1):e[t];var Xt=({verbose:e},t)=>Wo(e,t)!=="none",Kt=({verbose:e},t)=>!["none","short"].includes(Wo(e,t)),pu=({verbose:e},t)=>{let r=Wo(e,t);return An(r)?r:void 0},Wo=(e,t)=>t===void 0?Jx(e):Qe(e,t),Jx=e=>e.find(t=>An(t))??In.findLast(t=>e.includes(t)),An=e=>typeof e=="function",In=["none","short","full"];var Iu=require("node:util");var mu=require("node:process"),hu=require("node:util"),gu=(e,t)=>{let r=[e,...t],n=r.join(" "),s=r.map(o=>sS(yu(o))).join(" ");return{command:n,escapedCommand:s}},Dr=e=>(0,hu.stripVTControlCharacters)(e).split(`
18
+ `).map(t=>yu(t)).join(`
19
+ `),yu=e=>e.replaceAll(tS,t=>Qx(t)),Qx=e=>{let t=rS[e];if(t!==void 0)return t;let r=e.codePointAt(0),n=r.toString(16);return r<=nS?`\\u${n.padStart(4,"0")}`:`\\U${n}`},eS=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},tS=eS(),rS={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},nS=65535,sS=e=>oS.test(e)?e:mu.platform==="win32"?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,oS=/^[\w./-]+$/;var Ho=q(require("node:process"),1);function Zo(){let{env:e}=Ho.default,{TERM:t,TERM_PROGRAM:r}=e;return Ho.default.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var bu={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},wu={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},iS={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},aS={...bu,...wu},cS={...bu,...iS},uS=Zo(),lS=uS?aS:cS,$n=lS,uD=Object.entries(wu);var _u=q(require("node:tty"),1),xu,Su,Dn,vu,fS=((vu=(Dn=(Su=(xu=_u.default)==null?void 0:xu.WriteStream)==null?void 0:Su.prototype)==null?void 0:Dn.hasColors)==null?void 0:vu.call(Dn))??!1,D=(e,t)=>{if(!fS)return s=>s;let r=`\x1B[${e}m`,n=`\x1B[${t}m`;return s=>{let o=s+"",i=o.indexOf(n);if(i===-1)return r+o+n;let a=r,c=0;for(;i!==-1;)a+=o.slice(c,i)+r,c=i+n.length,i=o.indexOf(n,c);return a+=o.slice(c)+n,a}},fD=D(0,0),Eu=D(1,22),dD=D(2,22),pD=D(3,23),mD=D(4,24),hD=D(53,55),gD=D(7,27),yD=D(8,28),bD=D(9,29),wD=D(30,39),xD=D(31,39),SD=D(32,39),vD=D(33,39),_D=D(34,39),ED=D(35,39),TD=D(36,39),OD=D(37,39),Ln=D(90,39),RD=D(40,49),kD=D(41,49),CD=D(42,49),AD=D(43,49),ID=D(44,49),$D=D(45,49),DD=D(46,49),LD=D(47,49),ND=D(100,49),Tu=D(91,39),PD=D(92,39),Ou=D(93,39),MD=D(94,39),FD=D(95,39),jD=D(96,39),BD=D(97,39),UD=D(101,49),GD=D(102,49),qD=D(103,49),VD=D(104,49),zD=D(105,49),WD=D(106,49),HD=D(107,49);var Cu=({type:e,message:t,timestamp:r,piped:n,commandId:s,result:{failed:o=!1}={},options:{reject:i=!0}})=>{let a=dS(r),c=pS[e]({failed:o,reject:i,piped:n}),u=mS[e]({reject:i});return`${Ln(`[${a}]`)} ${Ln(`[${s}]`)} ${u(c)} ${u(t)}`},dS=e=>`${Nn(e.getHours(),2)}:${Nn(e.getMinutes(),2)}:${Nn(e.getSeconds(),2)}.${Nn(e.getMilliseconds(),3)}`,Nn=(e,t)=>String(e).padStart(t,"0"),Ru=({failed:e,reject:t})=>e?t?$n.cross:$n.warning:$n.tick,pS={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:Ru,duration:Ru},ku=e=>e,mS={command:()=>Eu,output:()=>ku,ipc:()=>ku,error:({reject:e})=>e?Tu:Ou,duration:()=>Ln};var Au=(e,t,r)=>{let n=pu(t,r);return e.map(({verboseLine:s,verboseObject:o})=>hS(s,o,n)).filter(s=>s!==void 0).map(s=>gS(s)).join("")},hS=(e,t,r)=>{if(r===void 0)return e;let n=r(e,t);if(typeof n=="string")return n},gS=e=>e.endsWith(`
20
20
  `)?e:`${e}
21
- `;var je=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:s})=>{let o=bx({type:e,result:s,verboseInfo:n}),i=wx(t,o),a=Cu(i,n,r);a!==""&&console.warn(a.slice(0,-1))},bx=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:s=!1,...o}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:s,result:t,options:o}),wx=(e,t)=>e.split(`
22
- `).map(r=>Sx({...t,message:r})),Sx=e=>({verboseLine:ku(e),verboseObject:e}),Ln=e=>{let t=typeof e=="string"?e:(0,Au.inspect)(e);return Ir(t).replaceAll(" "," ".repeat(xx))},xx=2;var Iu=(e,t)=>{Ht(t)&&je({type:"command",verboseMessage:e,verboseInfo:t})};var $u=(e,t,r)=>{Ex(e);let n=vx(e);return{verbose:e,escapedCommand:t,commandId:n,rawOptions:r}},vx=e=>Ht({verbose:e})?_x++:void 0,_x=0n,Ex=e=>{for(let t of e){if(t===!1)throw new TypeError(`The "verbose: false" option was renamed to "verbose: 'none'".`);if(t===!0)throw new TypeError(`The "verbose: true" option was renamed to "verbose: 'short'".`);if(!Cn.includes(t)&&!kn(t)){let r=Cn.map(n=>`'${n}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${r} or a function.`)}}};var zo=require("node:process"),Nn=()=>zo.hrtime.bigint(),Wo=e=>Number(zo.hrtime.bigint()-e)/1e6;var Pn=(e,t,r)=>{let n=Nn(),{command:s,escapedCommand:o}=hu(e,t),i=jo(r,"verbose"),a=$u(i,o,{...r});return Iu(o,a),{command:s,escapedCommand:o,startTime:n,verboseInfo:a}};var Zf=q(require("node:path"),1),gi=q(require("node:process"),1),Hf=q(Sl(),1);var $r=q(require("node:process"),1),at=q(require("node:path"),1);function Fn(e={}){let{env:t=process.env,platform:r=process.platform}=e;return r!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"}var xl=require("node:util"),ni=require("node:child_process"),ri=q(require("node:path"),1),vl=require("node:url"),AL=(0,xl.promisify)(ni.execFile);function jn(e){return e instanceof URL?(0,vl.fileURLToPath)(e):e}function _l(e){return{*[Symbol.iterator](){let t=ri.default.resolve(jn(e)),r;for(;r!==t;)yield t,r=t,t=ri.default.resolve(t,"..")}}}var IL=10*1024*1024;var Kx=({cwd:e=$r.default.cwd(),path:t=$r.default.env[Fn()],preferLocal:r=!0,execPath:n=$r.default.execPath,addExecPath:s=!0}={})=>{let o=at.default.resolve(jn(e)),i=[],a=t.split(at.default.delimiter);return r&&Jx(i,a,o),s&&Qx(i,a,n,o),t===""||t===at.default.delimiter?`${i.join(at.default.delimiter)}${t}`:[...i,t].join(at.default.delimiter)},Jx=(e,t,r)=>{for(let n of _l(r)){let s=at.default.join(n,"node_modules/.bin");t.includes(s)||e.push(s)}},Qx=(e,t,r,n)=>{let s=at.default.resolve(n,jn(r),"..");t.includes(s)||e.push(s)},El=({env:e=$r.default.env,...t}={})=>{e={...e};let r=Fn({env:e});return t.path=e[r],e[r]=Kx(t),e};var Bl=require("node:timers/promises");var Tl=(e,t,r)=>{let n=r?Lr:Dr,s=e instanceof Le?{}:{cause:e};return new n(t,s)},Le=class extends Error{},Ol=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,kl,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Rl=e=>Bn(e)&&kl in e,kl=Symbol("isExecaError"),Bn=e=>Object.prototype.toString.call(e)==="[object Error]",Dr=class extends Error{};Ol(Dr,Dr.name);var Lr=class extends Error{};Ol(Lr,Lr.name);var Jt=require("node:os");var Ll=require("node:os");var Cl=()=>{let e=Il-Al+1;return Array.from({length:e},ev)},ev=(e,t)=>({name:`SIGRT${t+1}`,number:Al+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Al=34,Il=64;var Dl=require("node:os");var $l=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];var si=()=>{let e=Cl();return[...$l,...e].map(tv)},tv=({name:e,number:t,description:r,action:n,forced:s=!1,standard:o})=>{let{signals:{[e]:i}}=Dl.constants,a=i!==void 0;return{name:e,number:a?i:t,description:r,supported:a,action:n,forced:s,standard:o}};var rv=()=>{let e=si();return Object.fromEntries(e.map(nv))},nv=({name:e,number:t,description:r,supported:n,action:s,forced:o,standard:i})=>[e,{name:e,number:t,description:r,supported:n,action:s,forced:o,standard:i}],Nl=rv(),sv=()=>{let e=si(),t=65,r=Array.from({length:t},(n,s)=>ov(s,e));return Object.assign({},...r)},ov=(e,t)=>{let r=iv(e,t);if(r===void 0)return{};let{name:n,description:s,supported:o,action:i,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:s,supported:o,action:i,forced:a,standard:c}}},iv=(e,t)=>{let r=t.find(({name:n})=>Ll.constants.signals[n]===e);return r!==void 0?r:t.find(n=>n.number===e)},VL=sv();var Ml=e=>{let t="option `killSignal`";if(e===0)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return jl(e,t)},Fl=e=>e===0?e:jl(e,"`subprocess.kill()`'s argument"),jl=(e,t)=>{if(Number.isInteger(e))return av(e,t);if(typeof e=="string")return uv(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.
23
- ${oi()}`)},av=(e,t)=>{if(Pl.has(e))return Pl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.
24
- ${oi()}`)},cv=()=>new Map(Object.entries(Jt.constants.signals).reverse().map(([e,t])=>[t,e])),Pl=cv(),uv=(e,t)=>{if(e in Jt.constants.signals)return e;throw e.toUpperCase()in Jt.constants.signals?new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`):new TypeError(`Invalid ${t} '${e}': this signal name does not exist.
25
- ${oi()}`)},oi=()=>`Available signal names: ${lv()}.
26
- Available signal numbers: ${fv()}.`,lv=()=>Object.keys(Jt.constants.signals).sort().map(e=>`'${e}'`).join(", "),fv=()=>[...new Set(Object.values(Jt.constants.signals).sort((e,t)=>e-t))].join(", "),Un=e=>Nl[e].description;var Ul=e=>{if(e===!1)return e;if(e===!0)return dv;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},dv=1e3*5,Gl=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:s,controller:o},i,a)=>{let{signal:c,error:u}=pv(i,a,r);mv(u,n);let l=e(c);return hv({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:l,context:s,controller:o}),l},pv=(e,t,r)=>{let[n=r,s]=Bn(e)?[void 0,e]:[e,t];if(typeof n!="string"&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(s!==void 0&&!Bn(s))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${s}`);return{signal:Fl(n),error:s}},mv=(e,t)=>{e!==void 0&&t.reject(e)},hv=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:s,context:o,controller:i})=>{t===n&&s&&ii({kill:e,forceKillAfterDelay:r,context:o,controllerSignal:i.signal})},ii=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(t!==!1)try{await(0,Bl.setTimeout)(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}};var ql=require("node:events"),Gn=async(e,t)=>{e.aborted||await(0,ql.once)(e,"abort",{signal:t})};var Vl=({cancelSignal:e})=>{if(e!==void 0&&Object.prototype.toString.call(e)!=="[object AbortSignal]")throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)},zl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:s})=>t===void 0||r?[]:[gv(e,t,n,s)],gv=async(e,t,r,{signal:n})=>{throw await Gn(t,n),r.terminationReason??="cancel",e.kill(),t.reason};var Tf=require("node:timers/promises");var _f=require("node:util");var Qt=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{yv(e,t,r),ai(e,t,n)},yv=(e,t,r)=>{if(!r)throw new Error(`${Ne(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},ai=(e,t,r)=>{if(!r)throw new Error(`${Ne(e,t)} cannot be used: the ${ct(t)} has already exited or disconnected.`)},Wl=e=>{throw new Error(`${Ne("getOneMessage",e)} could not complete: the ${ct(e)} exited or disconnected.`)},Zl=e=>{throw new Error(`${Ne("sendMessage",e)} failed: the ${ct(e)} is sending a message too, instead of listening to incoming messages.
21
+ `;var Be=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:s})=>{let o=yS({type:e,result:s,verboseInfo:n}),i=bS(t,o),a=Au(i,n,r);a!==""&&console.warn(a.slice(0,-1))},yS=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:s=!1,...o}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:s,result:t,options:o}),bS=(e,t)=>e.split(`
22
+ `).map(r=>wS({...t,message:r})),wS=e=>({verboseLine:Cu(e),verboseObject:e}),Pn=e=>{let t=typeof e=="string"?e:(0,Iu.inspect)(e);return Dr(t).replaceAll(" "," ".repeat(xS))},xS=2;var $u=(e,t)=>{Xt(t)&&Be({type:"command",verboseMessage:e,verboseInfo:t})};var Du=(e,t,r)=>{_S(e);let n=SS(e);return{verbose:e,escapedCommand:t,commandId:n,rawOptions:r}},SS=e=>Xt({verbose:e})?vS++:void 0,vS=0n,_S=e=>{for(let t of e){if(t===!1)throw new TypeError(`The "verbose: false" option was renamed to "verbose: 'none'".`);if(t===!0)throw new TypeError(`The "verbose: true" option was renamed to "verbose: 'short'".`);if(!In.includes(t)&&!An(t)){let r=In.map(n=>`'${n}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${r} or a function.`)}}};var Yo=require("node:process"),Mn=()=>Yo.hrtime.bigint(),Xo=e=>Number(Yo.hrtime.bigint()-e)/1e6;var Fn=(e,t,r)=>{let n=Mn(),{command:s,escapedCommand:o}=gu(e,t),i=qo(r,"verbose"),a=Du(i,o,{...r});return $u(o,a),{command:s,escapedCommand:o,startTime:n,verboseInfo:a}};var Zf=q(require("node:path"),1),xi=q(require("node:process"),1),Yf=q(Sl(),1);var Lr=q(require("node:process"),1),ct=q(require("node:path"),1);function Bn(e={}){let{env:t=process.env,platform:r=process.platform}=e;return r!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"}var vl=require("node:util"),ai=require("node:child_process"),ii=q(require("node:path"),1),_l=require("node:url"),IL=(0,vl.promisify)(ai.execFile);function Un(e){return e instanceof URL?(0,_l.fileURLToPath)(e):e}function El(e){return{*[Symbol.iterator](){let t=ii.default.resolve(Un(e)),r;for(;r!==t;)yield t,r=t,t=ii.default.resolve(t,"..")}}}var $L=10*1024*1024;var XS=({cwd:e=Lr.default.cwd(),path:t=Lr.default.env[Bn()],preferLocal:r=!0,execPath:n=Lr.default.execPath,addExecPath:s=!0}={})=>{let o=ct.default.resolve(Un(e)),i=[],a=t.split(ct.default.delimiter);return r&&KS(i,a,o),s&&JS(i,a,n,o),t===""||t===ct.default.delimiter?`${i.join(ct.default.delimiter)}${t}`:[...i,t].join(ct.default.delimiter)},KS=(e,t,r)=>{for(let n of El(r)){let s=ct.default.join(n,"node_modules/.bin");t.includes(s)||e.push(s)}},JS=(e,t,r,n)=>{let s=ct.default.resolve(n,Un(r),"..");t.includes(s)||e.push(s)},Tl=({env:e=Lr.default.env,...t}={})=>{e={...e};let r=Bn({env:e});return t.path=e[r],e[r]=XS(t),e};var Ul=require("node:timers/promises");var Ol=(e,t,r)=>{let n=r?Pr:Nr,s=e instanceof Le?{}:{cause:e};return new n(t,s)},Le=class extends Error{},Rl=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Cl,{value:!0,writable:!1,enumerable:!1,configurable:!1})},kl=e=>Gn(e)&&Cl in e,Cl=Symbol("isExecaError"),Gn=e=>Object.prototype.toString.call(e)==="[object Error]",Nr=class extends Error{};Rl(Nr,Nr.name);var Pr=class extends Error{};Rl(Pr,Pr.name);var er=require("node:os");var Nl=require("node:os");var Al=()=>{let e=$l-Il+1;return Array.from({length:e},QS)},QS=(e,t)=>({name:`SIGRT${t+1}`,number:Il+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Il=34,$l=64;var Ll=require("node:os");var Dl=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];var ci=()=>{let e=Al();return[...Dl,...e].map(ev)},ev=({name:e,number:t,description:r,action:n,forced:s=!1,standard:o})=>{let{signals:{[e]:i}}=Ll.constants,a=i!==void 0;return{name:e,number:a?i:t,description:r,supported:a,action:n,forced:s,standard:o}};var tv=()=>{let e=ci();return Object.fromEntries(e.map(rv))},rv=({name:e,number:t,description:r,supported:n,action:s,forced:o,standard:i})=>[e,{name:e,number:t,description:r,supported:n,action:s,forced:o,standard:i}],Pl=tv(),nv=()=>{let e=ci(),t=65,r=Array.from({length:t},(n,s)=>sv(s,e));return Object.assign({},...r)},sv=(e,t)=>{let r=ov(e,t);if(r===void 0)return{};let{name:n,description:s,supported:o,action:i,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:s,supported:o,action:i,forced:a,standard:c}}},ov=(e,t)=>{let r=t.find(({name:n})=>Nl.constants.signals[n]===e);return r!==void 0?r:t.find(n=>n.number===e)},zL=nv();var Fl=e=>{let t="option `killSignal`";if(e===0)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return Bl(e,t)},jl=e=>e===0?e:Bl(e,"`subprocess.kill()`'s argument"),Bl=(e,t)=>{if(Number.isInteger(e))return iv(e,t);if(typeof e=="string")return cv(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.
23
+ ${ui()}`)},iv=(e,t)=>{if(Ml.has(e))return Ml.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.
24
+ ${ui()}`)},av=()=>new Map(Object.entries(er.constants.signals).reverse().map(([e,t])=>[t,e])),Ml=av(),cv=(e,t)=>{if(e in er.constants.signals)return e;throw e.toUpperCase()in er.constants.signals?new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`):new TypeError(`Invalid ${t} '${e}': this signal name does not exist.
25
+ ${ui()}`)},ui=()=>`Available signal names: ${uv()}.
26
+ Available signal numbers: ${lv()}.`,uv=()=>Object.keys(er.constants.signals).sort().map(e=>`'${e}'`).join(", "),lv=()=>[...new Set(Object.values(er.constants.signals).sort((e,t)=>e-t))].join(", "),qn=e=>Pl[e].description;var Gl=e=>{if(e===!1)return e;if(e===!0)return fv;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},fv=1e3*5,ql=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:s,controller:o},i,a)=>{let{signal:c,error:u}=dv(i,a,r);pv(u,n);let l=e(c);return mv({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:l,context:s,controller:o}),l},dv=(e,t,r)=>{let[n=r,s]=Gn(e)?[void 0,e]:[e,t];if(typeof n!="string"&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(s!==void 0&&!Gn(s))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${s}`);return{signal:jl(n),error:s}},pv=(e,t)=>{e!==void 0&&t.reject(e)},mv=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:s,context:o,controller:i})=>{t===n&&s&&li({kill:e,forceKillAfterDelay:r,context:o,controllerSignal:i.signal})},li=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(t!==!1)try{await(0,Ul.setTimeout)(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}};var Vl=require("node:events"),Vn=async(e,t)=>{e.aborted||await(0,Vl.once)(e,"abort",{signal:t})};var zl=({cancelSignal:e})=>{if(e!==void 0&&Object.prototype.toString.call(e)!=="[object AbortSignal]")throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)},Wl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:s})=>t===void 0||r?[]:[hv(e,t,n,s)],hv=async(e,t,r,{signal:n})=>{throw await Vn(t,n),r.terminationReason??="cancel",e.kill(),t.reason};var Of=require("node:timers/promises");var Ef=require("node:util");var tr=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{gv(e,t,r),fi(e,t,n)},gv=(e,t,r)=>{if(!r)throw new Error(`${Ne(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},fi=(e,t,r)=>{if(!r)throw new Error(`${Ne(e,t)} cannot be used: the ${ut(t)} has already exited or disconnected.`)},Hl=e=>{throw new Error(`${Ne("getOneMessage",e)} could not complete: the ${ut(e)} exited or disconnected.`)},Zl=e=>{throw new Error(`${Ne("sendMessage",e)} failed: the ${ut(e)} is sending a message too, instead of listening to incoming messages.
27
27
  This can be fixed by both sending a message and listening to incoming messages at the same time:
28
28
 
29
29
  const [receivedMessage] = await Promise.all([
30
30
  ${Ne("getOneMessage",e)},
31
31
  ${Ne("sendMessage",e,"message, {strict: true}")},
32
- ]);`)},qn=(e,t)=>new Error(`${Ne("sendMessage",t)} failed when sending an acknowledgment response to the ${ct(t)}.`,{cause:e}),Hl=e=>{throw new Error(`${Ne("sendMessage",e)} failed: the ${ct(e)} is not listening to incoming messages.`)},Yl=e=>{throw new Error(`${Ne("sendMessage",e)} failed: the ${ct(e)} exited without listening to incoming messages.`)},Xl=()=>new Error(`\`cancelSignal\` aborted: the ${ct(!0)} disconnected.`),Kl=()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},Jl=({error:e,methodName:t,isSubprocess:r})=>{if(e.code==="EPIPE")throw new Error(`${Ne(t,r)} cannot be used: the ${ct(r)} is disconnecting.`,{cause:e})},Ql=({error:e,methodName:t,isSubprocess:r,message:n})=>{if(bv(e))throw new Error(`${Ne(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})},bv=({code:e,message:t})=>wv.has(e)||Sv.some(r=>t.includes(r)),wv=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),Sv=["could not be cloned","circular structure","call stack size exceeded"],Ne=(e,t,r="")=>e==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${xv(t)}${e}(${r})`,xv=e=>e?"":"subprocess.",ct=e=>e?"parent process":"subprocess",er=e=>{e.connected&&e.disconnect()};var Be=()=>{let e={},t=new Promise((r,n)=>{Object.assign(e,{resolve:r,reject:n})});return Object.assign(t,e)};var zn=(e,t="stdin")=>{let{options:n,fileDescriptors:s}=Ue.get(e),o=ef(s,t,!0),i=e.stdio[o];if(i===null)throw new TypeError(tf(o,t,n,!0));return i},tr=(e,t="stdout")=>{let{options:n,fileDescriptors:s}=Ue.get(e),o=ef(s,t,!1),i=o==="all"?e.all:e.stdio[o];if(i==null)throw new TypeError(tf(o,t,n,!1));return i},Ue=new WeakMap,ef=(e,t,r)=>{let n=vv(t,r);return _v(n,t,r,e),n},vv=(e,t)=>{let r=Bo(e);if(r!==void 0)return r;let{validOptions:n,defaultValue:s}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${Nr(t)}" must not be "${e}".
32
+ ]);`)},zn=(e,t)=>new Error(`${Ne("sendMessage",t)} failed when sending an acknowledgment response to the ${ut(t)}.`,{cause:e}),Yl=e=>{throw new Error(`${Ne("sendMessage",e)} failed: the ${ut(e)} is not listening to incoming messages.`)},Xl=e=>{throw new Error(`${Ne("sendMessage",e)} failed: the ${ut(e)} exited without listening to incoming messages.`)},Kl=()=>new Error(`\`cancelSignal\` aborted: the ${ut(!0)} disconnected.`),Jl=()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},Ql=({error:e,methodName:t,isSubprocess:r})=>{if(e.code==="EPIPE")throw new Error(`${Ne(t,r)} cannot be used: the ${ut(r)} is disconnecting.`,{cause:e})},ef=({error:e,methodName:t,isSubprocess:r,message:n})=>{if(yv(e))throw new Error(`${Ne(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})},yv=({code:e,message:t})=>bv.has(e)||wv.some(r=>t.includes(r)),bv=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),wv=["could not be cloned","circular structure","call stack size exceeded"],Ne=(e,t,r="")=>e==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${xv(t)}${e}(${r})`,xv=e=>e?"":"subprocess.",ut=e=>e?"parent process":"subprocess",rr=e=>{e.connected&&e.disconnect()};var Ue=()=>{let e={},t=new Promise((r,n)=>{Object.assign(e,{resolve:r,reject:n})});return Object.assign(t,e)};var Hn=(e,t="stdin")=>{let{options:n,fileDescriptors:s}=Ge.get(e),o=tf(s,t,!0),i=e.stdio[o];if(i===null)throw new TypeError(rf(o,t,n,!0));return i},nr=(e,t="stdout")=>{let{options:n,fileDescriptors:s}=Ge.get(e),o=tf(s,t,!1),i=o==="all"?e.all:e.stdio[o];if(i==null)throw new TypeError(rf(o,t,n,!1));return i},Ge=new WeakMap,tf=(e,t,r)=>{let n=Sv(t,r);return vv(n,t,r,e),n},Sv=(e,t)=>{let r=Vo(e);if(r!==void 0)return r;let{validOptions:n,defaultValue:s}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${Mr(t)}" must not be "${e}".
33
33
  It must be ${n} or "fd3", "fd4" (and so on).
34
- It is optional and defaults to "${s}".`)},_v=(e,t,r,n)=>{let s=n[rf(e)];if(s===void 0)throw new TypeError(`"${Nr(r)}" must not be ${t}. That file descriptor does not exist.
35
- Please set the "stdio" option to ensure that file descriptor exists.`);if(s.direction==="input"&&!r)throw new TypeError(`"${Nr(r)}" must not be ${t}. It must be a readable stream, not writable.`);if(s.direction!=="input"&&r)throw new TypeError(`"${Nr(r)}" must not be ${t}. It must be a writable stream, not readable.`)},tf=(e,t,r,n)=>{if(e==="all"&&!r.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:s,optionValue:o}=Ev(e,r);return`The "${s}: ${Vn(o)}" option is incompatible with using "${Nr(n)}: ${Vn(t)}".
36
- Please set this option with "pipe" instead.`},Ev=(e,{stdin:t,stdout:r,stderr:n,stdio:s})=>{let o=rf(e);return o===0&&t!==void 0?{optionName:"stdin",optionValue:t}:o===1&&r!==void 0?{optionName:"stdout",optionValue:r}:o===2&&n!==void 0?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${o}]`,optionValue:s[o]}},rf=e=>e==="all"?1:e,Nr=e=>e?"to":"from",Vn=e=>typeof e=="string"?`'${e}'`:typeof e=="number"?`${e}`:"Stream";var gf=require("node:events");var nf=require("node:events"),wt=(e,t,r)=>{let n=e.getMaxListeners();n===0||n===Number.POSITIVE_INFINITY||(e.setMaxListeners(n+t),(0,nf.addAbortListener)(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))};var hf=require("node:events");var af=require("node:events"),cf=require("node:timers/promises");var Wn=(e,t)=>{t&&ci(e)},ci=e=>{e.refCounted()},Zn=(e,t)=>{t&&ui(e)},ui=e=>{e.unrefCounted()},sf=(e,t)=>{t&&(ui(e),ui(e))},of=(e,t)=>{t&&(ci(e),ci(e))};var uf=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},s)=>{if(df(s)||mf(s))return;Hn.has(e)||Hn.set(e,[]);let o=Hn.get(e);if(o.push(s),!(o.length>1))for(;o.length>0;){await pf(e,n,s),await cf.scheduler.yield();let i=await ff({wrappedMessage:o[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});o.shift(),n.emit("message",i),n.emit("message:done")}},lf=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:s})=>{li();let o=Hn.get(e);for(;(o==null?void 0:o.length)>0;)await(0,af.once)(n,"message:done");e.removeListener("message",s),of(t,r),n.connected=!1,n.emit("disconnect")},Hn=new WeakMap;var ut=(e,t,r)=>{if(Yn.has(e))return Yn.get(e);let n=new hf.EventEmitter;return n.connected=!0,Yn.set(e,n),Tv({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Yn=new WeakMap,Tv=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{let s=uf.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",s),t.once("disconnect",lf.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:s})),sf(r,n)},Xn=e=>{let t=Yn.get(e);return t===void 0?e.channel!==null:t.connected};var yf=({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:s})=>{if(!s)return n;let o=ut(e,t,r),i=Qn(e,o);return{id:Ov++,type:Jn,message:n,hasListeners:i}},Ov=0n,bf=(e,t)=>{if(!((t==null?void 0:t.type)!==Jn||t.hasListeners))for(let{id:r}of e)r!==void 0&&Kn[r].resolve({isDeadlock:!0,hasListeners:!1})},ff=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:s})=>{if((e==null?void 0:e.type)!==Jn||!t.connected)return e;let{id:o,message:i}=e,a={id:o,type:Sf,message:Qn(t,s)};try{await es({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(c){s.emit("strict:error",c)}return i},df=e=>{var n;if((e==null?void 0:e.type)!==Sf)return!1;let{id:t,message:r}=e;return(n=Kn[t])==null||n.resolve({isDeadlock:!1,hasListeners:r}),!0},wf=async(e,t,r)=>{if((e==null?void 0:e.type)!==Jn)return;let n=Be();Kn[e.id]=n;let s=new AbortController;try{let{isDeadlock:o,hasListeners:i}=await Promise.race([n,Rv(t,r,s)]);o&&Zl(r),i||Hl(r)}finally{s.abort(),delete Kn[e.id]}},Kn={},Rv=async(e,t,{signal:r})=>{wt(e,1,r),await(0,gf.once)(e,"disconnect",{signal:r}),Yl(t)},Jn="execa:ipc:request",Sf="execa:ipc:response";var xf=(e,t,r)=>{Pr.has(e)||Pr.set(e,new Set);let n=Pr.get(e),s=Be(),o=r?t.id:void 0,i={onMessageSent:s,id:o};return n.add(i),{outgoingMessages:n,outgoingMessage:i}},vf=({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()},pf=async(e,t,r)=>{var n;for(;!Qn(e,t)&&((n=Pr.get(e))==null?void 0:n.size)>0;){let s=[...Pr.get(e)];bf(s,r),await Promise.all(s.map(({onMessageSent:o})=>o))}},Pr=new WeakMap,Qn=(e,t)=>t.listenerCount("message")>kv(e),kv=e=>Ue.has(e)&&!Ke(Ue.get(e).options.buffer,"ipc")?1:0;var es=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},s,{strict:o=!1}={})=>{let i="sendMessage";return Qt({methodName:i,isSubprocess:r,ipc:n,isConnected:e.connected}),Cv({anyProcess:e,channel:t,methodName:i,isSubprocess:r,message:s,strict:o})},Cv=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:s,strict:o})=>{let i=yf({anyProcess:e,channel:t,isSubprocess:n,message:s,strict:o}),a=xf(e,i,o);try{await di({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:i,message:s})}catch(c){throw er(e),c}finally{vf(a)}},di=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:s})=>{let o=Av(e);try{await Promise.all([wf(n,e,r),o(n)])}catch(i){throw Jl({error:i,methodName:t,isSubprocess:r}),Ql({error:i,methodName:t,isSubprocess:r,message:s}),i}},Av=e=>{if(fi.has(e))return fi.get(e);let t=(0,_f.promisify)(e.send.bind(e));return fi.set(e,t),t},fi=new WeakMap;var Of=(e,t)=>{let r="cancelSignal";return ai(r,!1,e.connected),di({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:kf,message:t},message:t})},Rf=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await Iv({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),pi.signal),Iv=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{if(!Ef){if(Ef=!0,!n){Kl();return}if(t===null){li();return}ut(e,t,r),await Tf.scheduler.yield()}},Ef=!1,mf=e=>(e==null?void 0:e.type)!==kf?!1:(pi.abort(e.message),!0),kf="execa:ipc:cancel",li=()=>{pi.abort(Xl())},pi=new AbortController;var Cf=({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(t===void 0)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if(n==="json")throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}},Af=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:s,controller:o})=>r?[$v({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:s,controller:o})]:[],$v=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:s}})=>{await Gn(t,s);let o=Dv(t);throw await Of(e,o),ii({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:s}),n.terminationReason??="gracefulCancel",t.reason},Dv=({reason:e})=>{if(!(e instanceof DOMException))return e;let t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t};var If=require("node:timers/promises");var $f=({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},Df=(e,t,r,n)=>t===0||t===void 0?[]:[Lv(e,t,r,n)],Lv=async(e,t,r,{signal:n})=>{throw await(0,If.setTimeout)(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new Le};var ts=require("node:process"),mi=q(require("node:path"),1);var Lf=({options:e})=>{if(e.node===!1)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}},Nf=(e,t,{node:r=!1,nodePath:n=ts.execPath,nodeOptions:s=ts.execArgv.filter(c=>!c.startsWith("--inspect")),cwd:o,execPath:i,...a})=>{if(i!==void 0)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');let c=Zt(n,'The "nodePath" option'),u=mi.default.resolve(o,c),l={...a,nodePath:u,node:r,cwd:o};if(!r)return[e,t,l];if(mi.default.basename(e,".exe")==="node")throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...s,e,...t],{ipc:!0,...l,shell:!1}]};var Pf=require("node:v8"),Mf=({ipcInput:e,ipc:t,serialization:r})=>{if(e!==void 0){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Mv[r](e)}},Nv=e=>{try{(0,Pf.serialize)(e)}catch(t){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:t})}},Pv=e=>{try{JSON.stringify(e)}catch(t){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:t})}},Mv={advanced:Nv,json:Pv},Ff=async(e,t)=>{t!==void 0&&await e.sendMessage(t)};var Bf=({encoding:e})=>{if(hi.has(e))return;let t=jv(e);if(t!==void 0)throw new TypeError(`Invalid option \`encoding: ${rs(e)}\`.
37
- Please rename it to ${rs(t)}.`);let r=[...hi].map(n=>rs(n)).join(", ");throw new TypeError(`Invalid option \`encoding: ${rs(e)}\`.
38
- Please rename it to one of: ${r}.`)},Fv=new Set(["utf8","utf16le"]),me=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),hi=new Set([...Fv,...me]),jv=e=>{if(e===null)return"buffer";if(typeof e!="string")return;let t=e.toLowerCase();if(t in jf)return jf[t];if(hi.has(t))return t},jf={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},rs=e=>typeof e=="string"?`"${e}"`:String(e);var Uf=require("node:fs"),Gf=q(require("node:path"),1),qf=q(require("node:process"),1);var Vf=(e=zf())=>{let t=Zt(e,'The "cwd" option');return Gf.default.resolve(t)},zf=()=>{try{return qf.default.cwd()}catch(e){throw e.message=`The current directory does not exist.
39
- ${e.message}`,e}},Wf=(e,t)=>{if(t===zf())return e;let r;try{r=(0,Uf.statSync)(t)}catch(n){return`The "cwd" option is invalid: ${t}.
34
+ It is optional and defaults to "${s}".`)},vv=(e,t,r,n)=>{let s=n[nf(e)];if(s===void 0)throw new TypeError(`"${Mr(r)}" must not be ${t}. That file descriptor does not exist.
35
+ Please set the "stdio" option to ensure that file descriptor exists.`);if(s.direction==="input"&&!r)throw new TypeError(`"${Mr(r)}" must not be ${t}. It must be a readable stream, not writable.`);if(s.direction!=="input"&&r)throw new TypeError(`"${Mr(r)}" must not be ${t}. It must be a writable stream, not readable.`)},rf=(e,t,r,n)=>{if(e==="all"&&!r.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:s,optionValue:o}=_v(e,r);return`The "${s}: ${Wn(o)}" option is incompatible with using "${Mr(n)}: ${Wn(t)}".
36
+ Please set this option with "pipe" instead.`},_v=(e,{stdin:t,stdout:r,stderr:n,stdio:s})=>{let o=nf(e);return o===0&&t!==void 0?{optionName:"stdin",optionValue:t}:o===1&&r!==void 0?{optionName:"stdout",optionValue:r}:o===2&&n!==void 0?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${o}]`,optionValue:s[o]}},nf=e=>e==="all"?1:e,Mr=e=>e?"to":"from",Wn=e=>typeof e=="string"?`'${e}'`:typeof e=="number"?`${e}`:"Stream";var yf=require("node:events");var sf=require("node:events"),St=(e,t,r)=>{let n=e.getMaxListeners();n===0||n===Number.POSITIVE_INFINITY||(e.setMaxListeners(n+t),(0,sf.addAbortListener)(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))};var gf=require("node:events");var cf=require("node:events"),uf=require("node:timers/promises");var Zn=(e,t)=>{t&&di(e)},di=e=>{e.refCounted()},Yn=(e,t)=>{t&&pi(e)},pi=e=>{e.unrefCounted()},of=(e,t)=>{t&&(pi(e),pi(e))},af=(e,t)=>{t&&(di(e),di(e))};var lf=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},s)=>{if(pf(s)||hf(s))return;Xn.has(e)||Xn.set(e,[]);let o=Xn.get(e);if(o.push(s),!(o.length>1))for(;o.length>0;){await mf(e,n,s),await uf.scheduler.yield();let i=await df({wrappedMessage:o[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});o.shift(),n.emit("message",i),n.emit("message:done")}},ff=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:s})=>{mi();let o=Xn.get(e);for(;(o==null?void 0:o.length)>0;)await(0,cf.once)(n,"message:done");e.removeListener("message",s),af(t,r),n.connected=!1,n.emit("disconnect")},Xn=new WeakMap;var lt=(e,t,r)=>{if(Kn.has(e))return Kn.get(e);let n=new gf.EventEmitter;return n.connected=!0,Kn.set(e,n),Ev({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Kn=new WeakMap,Ev=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{let s=lf.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",s),t.once("disconnect",ff.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:s})),of(r,n)},Jn=e=>{let t=Kn.get(e);return t===void 0?e.channel!==null:t.connected};var bf=({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:s})=>{if(!s)return n;let o=lt(e,t,r),i=ts(e,o);return{id:Tv++,type:es,message:n,hasListeners:i}},Tv=0n,wf=(e,t)=>{if(!((t==null?void 0:t.type)!==es||t.hasListeners))for(let{id:r}of e)r!==void 0&&Qn[r].resolve({isDeadlock:!0,hasListeners:!1})},df=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:s})=>{if((e==null?void 0:e.type)!==es||!t.connected)return e;let{id:o,message:i}=e,a={id:o,type:Sf,message:ts(t,s)};try{await rs({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(c){s.emit("strict:error",c)}return i},pf=e=>{var n;if((e==null?void 0:e.type)!==Sf)return!1;let{id:t,message:r}=e;return(n=Qn[t])==null||n.resolve({isDeadlock:!1,hasListeners:r}),!0},xf=async(e,t,r)=>{if((e==null?void 0:e.type)!==es)return;let n=Ue();Qn[e.id]=n;let s=new AbortController;try{let{isDeadlock:o,hasListeners:i}=await Promise.race([n,Ov(t,r,s)]);o&&Zl(r),i||Yl(r)}finally{s.abort(),delete Qn[e.id]}},Qn={},Ov=async(e,t,{signal:r})=>{St(e,1,r),await(0,yf.once)(e,"disconnect",{signal:r}),Xl(t)},es="execa:ipc:request",Sf="execa:ipc:response";var vf=(e,t,r)=>{Fr.has(e)||Fr.set(e,new Set);let n=Fr.get(e),s=Ue(),o=r?t.id:void 0,i={onMessageSent:s,id:o};return n.add(i),{outgoingMessages:n,outgoingMessage:i}},_f=({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()},mf=async(e,t,r)=>{var n;for(;!ts(e,t)&&((n=Fr.get(e))==null?void 0:n.size)>0;){let s=[...Fr.get(e)];wf(s,r),await Promise.all(s.map(({onMessageSent:o})=>o))}},Fr=new WeakMap,ts=(e,t)=>t.listenerCount("message")>Rv(e),Rv=e=>Ge.has(e)&&!Qe(Ge.get(e).options.buffer,"ipc")?1:0;var rs=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},s,{strict:o=!1}={})=>{let i="sendMessage";return tr({methodName:i,isSubprocess:r,ipc:n,isConnected:e.connected}),kv({anyProcess:e,channel:t,methodName:i,isSubprocess:r,message:s,strict:o})},kv=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:s,strict:o})=>{let i=bf({anyProcess:e,channel:t,isSubprocess:n,message:s,strict:o}),a=vf(e,i,o);try{await gi({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:i,message:s})}catch(c){throw rr(e),c}finally{_f(a)}},gi=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:s})=>{let o=Cv(e);try{await Promise.all([xf(n,e,r),o(n)])}catch(i){throw Ql({error:i,methodName:t,isSubprocess:r}),ef({error:i,methodName:t,isSubprocess:r,message:s}),i}},Cv=e=>{if(hi.has(e))return hi.get(e);let t=(0,Ef.promisify)(e.send.bind(e));return hi.set(e,t),t},hi=new WeakMap;var Rf=(e,t)=>{let r="cancelSignal";return fi(r,!1,e.connected),gi({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:Cf,message:t},message:t})},kf=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await Av({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),yi.signal),Av=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{if(!Tf){if(Tf=!0,!n){Jl();return}if(t===null){mi();return}lt(e,t,r),await Of.scheduler.yield()}},Tf=!1,hf=e=>(e==null?void 0:e.type)!==Cf?!1:(yi.abort(e.message),!0),Cf="execa:ipc:cancel",mi=()=>{yi.abort(Kl())},yi=new AbortController;var Af=({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(t===void 0)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if(n==="json")throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}},If=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:s,controller:o})=>r?[Iv({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:s,controller:o})]:[],Iv=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:s}})=>{await Vn(t,s);let o=$v(t);throw await Rf(e,o),li({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:s}),n.terminationReason??="gracefulCancel",t.reason},$v=({reason:e})=>{if(!(e instanceof DOMException))return e;let t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t};var $f=require("node:timers/promises");var Df=({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},Lf=(e,t,r,n)=>t===0||t===void 0?[]:[Dv(e,t,r,n)],Dv=async(e,t,r,{signal:n})=>{throw await(0,$f.setTimeout)(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new Le};var ns=require("node:process"),bi=q(require("node:path"),1);var Nf=({options:e})=>{if(e.node===!1)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}},Pf=(e,t,{node:r=!1,nodePath:n=ns.execPath,nodeOptions:s=ns.execArgv.filter(c=>!c.startsWith("--inspect")),cwd:o,execPath:i,...a})=>{if(i!==void 0)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');let c=Yt(n,'The "nodePath" option'),u=bi.default.resolve(o,c),l={...a,nodePath:u,node:r,cwd:o};if(!r)return[e,t,l];if(bi.default.basename(e,".exe")==="node")throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...s,e,...t],{ipc:!0,...l,shell:!1}]};var Mf=require("node:v8"),Ff=({ipcInput:e,ipc:t,serialization:r})=>{if(e!==void 0){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Pv[r](e)}},Lv=e=>{try{(0,Mf.serialize)(e)}catch(t){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:t})}},Nv=e=>{try{JSON.stringify(e)}catch(t){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:t})}},Pv={advanced:Lv,json:Nv},jf=async(e,t)=>{t!==void 0&&await e.sendMessage(t)};var Uf=({encoding:e})=>{if(wi.has(e))return;let t=Fv(e);if(t!==void 0)throw new TypeError(`Invalid option \`encoding: ${ss(e)}\`.
37
+ Please rename it to ${ss(t)}.`);let r=[...wi].map(n=>ss(n)).join(", ");throw new TypeError(`Invalid option \`encoding: ${ss(e)}\`.
38
+ Please rename it to one of: ${r}.`)},Mv=new Set(["utf8","utf16le"]),he=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),wi=new Set([...Mv,...he]),Fv=e=>{if(e===null)return"buffer";if(typeof e!="string")return;let t=e.toLowerCase();if(t in Bf)return Bf[t];if(wi.has(t))return t},Bf={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},ss=e=>typeof e=="string"?`"${e}"`:String(e);var Gf=require("node:fs"),qf=q(require("node:path"),1),Vf=q(require("node:process"),1);var zf=(e=Wf())=>{let t=Yt(e,'The "cwd" option');return qf.default.resolve(t)},Wf=()=>{try{return Vf.default.cwd()}catch(e){throw e.message=`The current directory does not exist.
39
+ ${e.message}`,e}},Hf=(e,t)=>{if(t===Wf())return e;let r;try{r=(0,Gf.statSync)(t)}catch(n){return`The "cwd" option is invalid: ${t}.
40
40
  ${n.message}
41
41
  ${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.
42
- ${e}`};var ns=(e,t,r)=>{r.cwd=Vf(r.cwd);let[n,s,o]=Nf(e,t,r),{command:i,args:a,options:c}=Hf.default._parse(n,s,o),u=fu(c),l=Bv(u);return $f(l),Bf(l),Mf(l),Vl(l),Cf(l),l.shell=Mo(l.shell),l.env=Uv(l),l.killSignal=Ml(l.killSignal),l.forceKillAfterDelay=Ul(l.forceKillAfterDelay),l.lines=l.lines.map((f,d)=>f&&!me.has(l.encoding)&&l.buffer[d]),gi.default.platform==="win32"&&Zf.default.basename(i,".exe")==="cmd"&&a.unshift("/q"),{file:i,commandArguments:a,options:l}},Bv=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:s="utf8",reject:o=!0,cleanup:i=!0,all:a=!1,windowsHide:c=!0,killSignal:u="SIGTERM",forceKillAfterDelay:l=!0,gracefulCancel:f=!1,ipcInput:d,ipc:p=d!==void 0||f,serialization:b="advanced",...T})=>({...T,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:s,reject:o,cleanup:i,all:a,windowsHide:c,killSignal:u,forceKillAfterDelay:l,gracefulCancel:f,ipcInput:d,ipc:p,serialization:b}),Uv=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:s,nodePath:o})=>{let i=t?{...gi.default.env,...e}:e;return r||n?El({env:i,cwd:s,execPath:o,preferLocal:r,addExecPath:n}):i};var gd=require("node:util");function rr(e){if(typeof e=="string")return Gv(e);if(!(ArrayBuffer.isView(e)&&e.BYTES_PER_ELEMENT===1))throw new Error("Input must be a string or a Uint8Array");return qv(e)}var Gv=e=>e.at(-1)===Yf?e.slice(0,e.at(-2)===Xf?-2:-1):e,qv=e=>e.at(-1)===Vv?e.subarray(0,e.at(-2)===zv?-2:-1):e,Yf=`
43
- `,Vv=Yf.codePointAt(0),Xf="\r",zv=Xf.codePointAt(0);var cd=require("node:events"),ud=require("node:stream/promises");function Pe(e,{checkOpen:t=!0}={}){return e!==null&&typeof e=="object"&&(e.writable||e.readable||!t||e.writable===void 0&&e.readable===void 0)&&typeof e.pipe=="function"}function yi(e,{checkOpen:t=!0}={}){return Pe(e,{checkOpen:t})&&(e.writable||!t)&&typeof e.write=="function"&&typeof e.end=="function"&&typeof e.writable=="boolean"&&typeof e.writableObjectMode=="boolean"&&typeof e.destroy=="function"&&typeof e.destroyed=="boolean"}function St(e,{checkOpen:t=!0}={}){return Pe(e,{checkOpen:t})&&(e.readable||!t)&&typeof e.read=="function"&&typeof e.readable=="boolean"&&typeof e.readableObjectMode=="boolean"&&typeof e.destroy=="function"&&typeof e.destroyed=="boolean"}function bi(e,t){return yi(e,t)&&St(e,t)}var Wv=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype),wi=class{#t;#r;#e=!1;#n=void 0;constructor(t,r){this.#t=t,this.#r=r}next(){let t=()=>this.#o();return this.#n=this.#n?this.#n.then(t,t):t(),this.#n}return(t){let r=()=>this.#s(t);return this.#n?this.#n.then(r,r):r()}async#o(){if(this.#e)return{done:!0,value:void 0};let t;try{t=await this.#t.read()}catch(r){throw this.#n=void 0,this.#e=!0,this.#t.releaseLock(),r}return t.done&&(this.#n=void 0,this.#e=!0,this.#t.releaseLock()),t}async#s(t){if(this.#e)return{done:!0,value:t};if(this.#e=!0,!this.#r){let r=this.#t.cancel(t);return this.#t.releaseLock(),await r,{done:!0,value:t}}return this.#t.releaseLock(),{done:!0,value:t}}},Si=Symbol();function Kf(){return this[Si].next()}Object.defineProperty(Kf,"name",{value:"next"});function Jf(e){return this[Si].return(e)}Object.defineProperty(Jf,"name",{value:"return"});var Zv=Object.create(Wv,{next:{enumerable:!0,configurable:!0,writable:!0,value:Kf},return:{enumerable:!0,configurable:!0,writable:!0,value:Jf}});function xi({preventCancel:e=!1}={}){let t=this.getReader(),r=new wi(t,e),n=Object.create(Zv);return n[Si]=r,n}var Qf=e=>{if(St(e,{checkOpen:!1})&&Mr.on!==void 0)return Yv(e);if(typeof(e==null?void 0:e[Symbol.asyncIterator])=="function")return e;if(Hv.call(e)==="[object ReadableStream]")return xi.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:Hv}=Object.prototype,Yv=async function*(e){let t=new AbortController,r={};Xv(e,t,r);try{for await(let[n]of Mr.on(e,"data",{signal:t.signal}))yield n}catch(n){if(r.error!==void 0)throw r.error;if(!t.signal.aborted)throw n}finally{e.destroy()}},Xv=async(e,t,r)=>{try{await Mr.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(n){r.error=n}finally{t.abort()}},Mr={};var nr=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:s,addChunk:o,getFinalChunk:i,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{let u=Qf(e),l=t();l.length=0;try{for await(let f of u){let d=Jv(f),p=r[d](f,l);rd({convertedChunk:p,state:l,getSize:n,truncateChunk:s,addChunk:o,maxBuffer:c})}return Kv({state:l,convertChunk:r,getSize:n,truncateChunk:s,addChunk:o,getFinalChunk:i,maxBuffer:c}),a(l)}catch(f){let d=typeof f=="object"&&f!==null?f:new Error(f);throw d.bufferedData=a(l),d}},Kv=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:s,maxBuffer:o})=>{let i=s(e);i!==void 0&&rd({convertedChunk:i,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:o})},rd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:s,maxBuffer:o})=>{let i=r(e),a=t.length+i;if(a<=o){ed(e,t,s,a);return}let c=n(e,o-t.length);throw c!==void 0&&ed(c,t,s,o),new Ge},ed=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},Jv=e=>{var n;let t=typeof e;if(t==="string")return"string";if(t!=="object"||e===null)return"others";if((n=globalThis.Buffer)!=null&&n.isBuffer(e))return"buffer";let r=td.call(e);return r==="[object ArrayBuffer]"?"arrayBuffer":r==="[object DataView]"?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&td.call(e.buffer)==="[object ArrayBuffer]"?"typedArray":"others"},{toString:td}=Object.prototype,Ge=class extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}};var Je=e=>e,Fr=()=>{},ss=({contents:e})=>e,os=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},is=e=>e.length;async function as(e,t){return nr(e,r_,t)}var Qv=()=>({contents:[]}),e_=()=>1,t_=(e,{contents:t})=>(t.push(e),t),r_={init:Qv,convertChunk:{string:Je,buffer:Je,arrayBuffer:Je,dataView:Je,typedArray:Je,others:Je},getSize:e_,truncateChunk:Fr,addChunk:t_,getFinalChunk:Fr,finalize:ss};async function cs(e,t){return nr(e,f_,t)}var n_=()=>({contents:new ArrayBuffer(0)}),s_=e=>o_.encode(e),o_=new TextEncoder,nd=e=>new Uint8Array(e),sd=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),i_=(e,t)=>e.slice(0,t),a_=(e,{contents:t,length:r},n)=>{let s=ad()?u_(t,n):c_(t,n);return new Uint8Array(s).set(e,r),s},c_=(e,t)=>{if(t<=e.byteLength)return e;let r=new ArrayBuffer(id(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},u_=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;let r=new ArrayBuffer(t,{maxByteLength:id(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},id=e=>od**Math.ceil(Math.log(e)/Math.log(od)),od=2,l_=({contents:e,length:t})=>ad()?e:e.slice(0,t),ad=()=>"resize"in ArrayBuffer.prototype,f_={init:n_,convertChunk:{string:s_,buffer:nd,arrayBuffer:nd,dataView:sd,typedArray:sd,others:os},getSize:is,truncateChunk:i_,addChunk:a_,getFinalChunk:Fr,finalize:l_};async function ls(e,t){return nr(e,g_,t)}var d_=()=>({contents:"",textDecoder:new TextDecoder}),us=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),p_=(e,{contents:t})=>t+e,m_=(e,t)=>e.slice(0,t),h_=({textDecoder:e})=>{let t=e.decode();return t===""?void 0:t},g_={init:d_,convertChunk:{string:Je,buffer:us,arrayBuffer:us,dataView:us,typedArray:us,others:os},getSize:is,truncateChunk:m_,addChunk:p_,getFinalChunk:h_,finalize:ss};Object.assign(Mr,{on:cd.on,finished:ud.finished});var ld=({error:e,stream:t,readableObjectMode:r,lines:n,encoding:s,fdNumber:o})=>{if(!(e instanceof Ge))throw e;if(o==="all")return e;let i=y_(r,n,s);throw e.maxBufferInfo={fdNumber:o,unit:i},t.destroy(),e},y_=(e,t,r)=>e?"objects":t?"lines":r==="buffer"?"bytes":"characters",fd=(e,t,r)=>{if(t.length!==r)return;let n=new Ge;throw n.maxBufferInfo={fdNumber:"ipc"},n},dd=(e,t)=>{let{streamName:r,threshold:n,unit:s}=b_(e,t);return`Command's ${r} was larger than ${n} ${s}`},b_=(e,t)=>{if((e==null?void 0:e.maxBufferInfo)===void 0)return{streamName:"output",threshold:t[1],unit:"bytes"};let{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;let s=Ke(t,r);return r==="ipc"?{streamName:"IPC output",threshold:s,unit:"messages"}:{streamName:Rn(r),threshold:s,unit:n}},pd=(e,t,r)=>(e==null?void 0:e.code)==="ENOBUFS"&&t!==null&&t.some(n=>n!==null&&n.length>fs(r)),md=(e,t,r)=>{if(!t)return e;let n=fs(r);return e.length>n?e.slice(0,n):e},fs=([,e])=>e;var yd=({stdio:e,all:t,ipcOutput:r,originalError:n,signal:s,signalDescription:o,exitCode:i,escapedCommand:a,timedOut:c,isCanceled:u,isGracefullyCanceled:l,isMaxBuffer:f,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:b,maxBuffer:T,timeout:N,cwd:P})=>{let j=n==null?void 0:n.code,Y=w_({originalError:n,timedOut:c,timeout:N,isMaxBuffer:f,maxBuffer:T,errorCode:j,signal:s,signalDescription:o,exitCode:i,isCanceled:u,isGracefullyCanceled:l,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:b}),X=x_(n,P),Se=X===void 0?"":`
44
- ${X}`,ce=`${Y}: ${a}${Se}`,Ae=t===void 0?[e[2],e[1]]:[t],Ie=[ce,...Ae,...e.slice(3),r.map(xe=>v_(xe)).join(`
45
- `)].map(xe=>Ir(rr(__(xe)))).filter(Boolean).join(`
42
+ ${e}`};var os=(e,t,r)=>{r.cwd=zf(r.cwd);let[n,s,o]=Pf(e,t,r),{command:i,args:a,options:c}=Yf.default._parse(n,s,o),u=du(c),l=jv(u);return Df(l),Uf(l),Ff(l),zl(l),Af(l),l.shell=Uo(l.shell),l.env=Bv(l),l.killSignal=Fl(l.killSignal),l.forceKillAfterDelay=Gl(l.forceKillAfterDelay),l.lines=l.lines.map((f,d)=>f&&!he.has(l.encoding)&&l.buffer[d]),xi.default.platform==="win32"&&Zf.default.basename(i,".exe")==="cmd"&&a.unshift("/q"),{file:i,commandArguments:a,options:l}},jv=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:s="utf8",reject:o=!0,cleanup:i=!0,all:a=!1,windowsHide:c=!0,killSignal:u="SIGTERM",forceKillAfterDelay:l=!0,gracefulCancel:f=!1,ipcInput:d,ipc:p=d!==void 0||f,serialization:b="advanced",...T})=>({...T,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:s,reject:o,cleanup:i,all:a,windowsHide:c,killSignal:u,forceKillAfterDelay:l,gracefulCancel:f,ipcInput:d,ipc:p,serialization:b}),Bv=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:s,nodePath:o})=>{let i=t?{...xi.default.env,...e}:e;return r||n?Tl({env:i,cwd:s,execPath:o,preferLocal:r,addExecPath:n}):i};var yd=require("node:util");function sr(e){if(typeof e=="string")return Uv(e);if(!(ArrayBuffer.isView(e)&&e.BYTES_PER_ELEMENT===1))throw new Error("Input must be a string or a Uint8Array");return Gv(e)}var Uv=e=>e.at(-1)===Xf?e.slice(0,e.at(-2)===Kf?-2:-1):e,Gv=e=>e.at(-1)===qv?e.subarray(0,e.at(-2)===Vv?-2:-1):e,Xf=`
43
+ `,qv=Xf.codePointAt(0),Kf="\r",Vv=Kf.codePointAt(0);var ud=require("node:events"),ld=require("node:stream/promises");function Pe(e,{checkOpen:t=!0}={}){return e!==null&&typeof e=="object"&&(e.writable||e.readable||!t||e.writable===void 0&&e.readable===void 0)&&typeof e.pipe=="function"}function Si(e,{checkOpen:t=!0}={}){return Pe(e,{checkOpen:t})&&(e.writable||!t)&&typeof e.write=="function"&&typeof e.end=="function"&&typeof e.writable=="boolean"&&typeof e.writableObjectMode=="boolean"&&typeof e.destroy=="function"&&typeof e.destroyed=="boolean"}function vt(e,{checkOpen:t=!0}={}){return Pe(e,{checkOpen:t})&&(e.readable||!t)&&typeof e.read=="function"&&typeof e.readable=="boolean"&&typeof e.readableObjectMode=="boolean"&&typeof e.destroy=="function"&&typeof e.destroyed=="boolean"}function vi(e,t){return Si(e,t)&&vt(e,t)}var zv=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype),_i=class{#t;#r;#e=!1;#n=void 0;constructor(t,r){this.#t=t,this.#r=r}next(){let t=()=>this.#o();return this.#n=this.#n?this.#n.then(t,t):t(),this.#n}return(t){let r=()=>this.#s(t);return this.#n?this.#n.then(r,r):r()}async#o(){if(this.#e)return{done:!0,value:void 0};let t;try{t=await this.#t.read()}catch(r){throw this.#n=void 0,this.#e=!0,this.#t.releaseLock(),r}return t.done&&(this.#n=void 0,this.#e=!0,this.#t.releaseLock()),t}async#s(t){if(this.#e)return{done:!0,value:t};if(this.#e=!0,!this.#r){let r=this.#t.cancel(t);return this.#t.releaseLock(),await r,{done:!0,value:t}}return this.#t.releaseLock(),{done:!0,value:t}}},Ei=Symbol();function Jf(){return this[Ei].next()}Object.defineProperty(Jf,"name",{value:"next"});function Qf(e){return this[Ei].return(e)}Object.defineProperty(Qf,"name",{value:"return"});var Wv=Object.create(zv,{next:{enumerable:!0,configurable:!0,writable:!0,value:Jf},return:{enumerable:!0,configurable:!0,writable:!0,value:Qf}});function Ti({preventCancel:e=!1}={}){let t=this.getReader(),r=new _i(t,e),n=Object.create(Wv);return n[Ei]=r,n}var ed=e=>{if(vt(e,{checkOpen:!1})&&jr.on!==void 0)return Zv(e);if(typeof(e==null?void 0:e[Symbol.asyncIterator])=="function")return e;if(Hv.call(e)==="[object ReadableStream]")return Ti.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:Hv}=Object.prototype,Zv=async function*(e){let t=new AbortController,r={};Yv(e,t,r);try{for await(let[n]of jr.on(e,"data",{signal:t.signal}))yield n}catch(n){if(r.error!==void 0)throw r.error;if(!t.signal.aborted)throw n}finally{e.destroy()}},Yv=async(e,t,r)=>{try{await jr.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(n){r.error=n}finally{t.abort()}},jr={};var or=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:s,addChunk:o,getFinalChunk:i,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{let u=ed(e),l=t();l.length=0;try{for await(let f of u){let d=Kv(f),p=r[d](f,l);nd({convertedChunk:p,state:l,getSize:n,truncateChunk:s,addChunk:o,maxBuffer:c})}return Xv({state:l,convertChunk:r,getSize:n,truncateChunk:s,addChunk:o,getFinalChunk:i,maxBuffer:c}),a(l)}catch(f){let d=typeof f=="object"&&f!==null?f:new Error(f);throw d.bufferedData=a(l),d}},Xv=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:s,maxBuffer:o})=>{let i=s(e);i!==void 0&&nd({convertedChunk:i,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:o})},nd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:s,maxBuffer:o})=>{let i=r(e),a=t.length+i;if(a<=o){td(e,t,s,a);return}let c=n(e,o-t.length);throw c!==void 0&&td(c,t,s,o),new qe},td=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},Kv=e=>{var n;let t=typeof e;if(t==="string")return"string";if(t!=="object"||e===null)return"others";if((n=globalThis.Buffer)!=null&&n.isBuffer(e))return"buffer";let r=rd.call(e);return r==="[object ArrayBuffer]"?"arrayBuffer":r==="[object DataView]"?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&rd.call(e.buffer)==="[object ArrayBuffer]"?"typedArray":"others"},{toString:rd}=Object.prototype,qe=class extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}};var et=e=>e,Br=()=>{},is=({contents:e})=>e,as=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},cs=e=>e.length;async function us(e,t){return or(e,t_,t)}var Jv=()=>({contents:[]}),Qv=()=>1,e_=(e,{contents:t})=>(t.push(e),t),t_={init:Jv,convertChunk:{string:et,buffer:et,arrayBuffer:et,dataView:et,typedArray:et,others:et},getSize:Qv,truncateChunk:Br,addChunk:e_,getFinalChunk:Br,finalize:is};async function ls(e,t){return or(e,l_,t)}var r_=()=>({contents:new ArrayBuffer(0)}),n_=e=>s_.encode(e),s_=new TextEncoder,sd=e=>new Uint8Array(e),od=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),o_=(e,t)=>e.slice(0,t),i_=(e,{contents:t,length:r},n)=>{let s=cd()?c_(t,n):a_(t,n);return new Uint8Array(s).set(e,r),s},a_=(e,t)=>{if(t<=e.byteLength)return e;let r=new ArrayBuffer(ad(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},c_=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;let r=new ArrayBuffer(t,{maxByteLength:ad(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},ad=e=>id**Math.ceil(Math.log(e)/Math.log(id)),id=2,u_=({contents:e,length:t})=>cd()?e:e.slice(0,t),cd=()=>"resize"in ArrayBuffer.prototype,l_={init:r_,convertChunk:{string:n_,buffer:sd,arrayBuffer:sd,dataView:od,typedArray:od,others:as},getSize:cs,truncateChunk:o_,addChunk:i_,getFinalChunk:Br,finalize:u_};async function ds(e,t){return or(e,h_,t)}var f_=()=>({contents:"",textDecoder:new TextDecoder}),fs=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),d_=(e,{contents:t})=>t+e,p_=(e,t)=>e.slice(0,t),m_=({textDecoder:e})=>{let t=e.decode();return t===""?void 0:t},h_={init:f_,convertChunk:{string:et,buffer:fs,arrayBuffer:fs,dataView:fs,typedArray:fs,others:as},getSize:cs,truncateChunk:p_,addChunk:d_,getFinalChunk:m_,finalize:is};Object.assign(jr,{on:ud.on,finished:ld.finished});var fd=({error:e,stream:t,readableObjectMode:r,lines:n,encoding:s,fdNumber:o})=>{if(!(e instanceof qe))throw e;if(o==="all")return e;let i=g_(r,n,s);throw e.maxBufferInfo={fdNumber:o,unit:i},t.destroy(),e},g_=(e,t,r)=>e?"objects":t?"lines":r==="buffer"?"bytes":"characters",dd=(e,t,r)=>{if(t.length!==r)return;let n=new qe;throw n.maxBufferInfo={fdNumber:"ipc"},n},pd=(e,t)=>{let{streamName:r,threshold:n,unit:s}=y_(e,t);return`Command's ${r} was larger than ${n} ${s}`},y_=(e,t)=>{if((e==null?void 0:e.maxBufferInfo)===void 0)return{streamName:"output",threshold:t[1],unit:"bytes"};let{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;let s=Qe(t,r);return r==="ipc"?{streamName:"IPC output",threshold:s,unit:"messages"}:{streamName:Cn(r),threshold:s,unit:n}},md=(e,t,r)=>(e==null?void 0:e.code)==="ENOBUFS"&&t!==null&&t.some(n=>n!==null&&n.length>ps(r)),hd=(e,t,r)=>{if(!t)return e;let n=ps(r);return e.length>n?e.slice(0,n):e},ps=([,e])=>e;var bd=({stdio:e,all:t,ipcOutput:r,originalError:n,signal:s,signalDescription:o,exitCode:i,escapedCommand:a,timedOut:c,isCanceled:u,isGracefullyCanceled:l,isMaxBuffer:f,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:b,maxBuffer:T,timeout:P,cwd:M})=>{let j=n==null?void 0:n.code,Y=b_({originalError:n,timedOut:c,timeout:P,isMaxBuffer:f,maxBuffer:T,errorCode:j,signal:s,signalDescription:o,exitCode:i,isCanceled:u,isGracefullyCanceled:l,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:b}),X=x_(n,M),we=X===void 0?"":`
44
+ ${X}`,ce=`${Y}: ${a}${we}`,Ae=t===void 0?[e[2],e[1]]:[t],Ie=[ce,...Ae,...e.slice(3),r.map(xe=>S_(xe)).join(`
45
+ `)].map(xe=>Dr(sr(v_(xe)))).filter(Boolean).join(`
46
46
 
47
- `);return{originalMessage:X,shortMessage:ce,message:Ie}},w_=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:s,errorCode:o,signal:i,signalDescription:a,exitCode:c,isCanceled:u,isGracefullyCanceled:l,isForcefullyTerminated:f,forceKillAfterDelay:d,killSignal:p})=>{let b=S_(f,d);return t?`Command timed out after ${r} milliseconds${b}`:l?i===void 0?`Command was gracefully canceled with exit code ${c}`:f?`Command was gracefully canceled${b}`:`Command was gracefully canceled with ${i} (${a})`:u?`Command was canceled${b}`:n?`${dd(e,s)}${b}`:o!==void 0?`Command failed with ${o}${b}`:f?`Command was killed with ${p} (${Un(p)})${b}`:i!==void 0?`Command was killed with ${i} (${a})`:c!==void 0?`Command failed with exit code ${c}`:"Command failed"},S_=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",x_=(e,t)=>{if(e instanceof Le)return;let r=Rl(e)?e.originalMessage:String((e==null?void 0:e.message)??e),n=Ir(Wf(r,t));return n===""?void 0:n},v_=e=>typeof e=="string"?e:(0,gd.inspect)(e),__=e=>Array.isArray(e)?e.map(t=>rr(hd(t))).filter(Boolean).join(`
48
- `):hd(e),hd=e=>typeof e=="string"?e:K(e)?En(e):"";var ds=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:s,options:{cwd:o},startTime:i})=>bd({command:e,escapedCommand:t,cwd:o,durationMs:Wo(i),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:s,pipedFrom:[]}),sr=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,isSync:i})=>jr({error:e,command:t,escapedCommand:r,startTime:o,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:s,isSync:i}),jr=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:u,signal:l,stdio:f,all:d,ipcOutput:p,options:{timeoutDuration:b,timeout:T=b,forceKillAfterDelay:N,killSignal:P,cwd:j,maxBuffer:Y},isSync:X})=>{let{exitCode:Se,signal:ce,signalDescription:Ae}=T_(u,l),{originalMessage:Ie,shortMessage:xe,message:kr}=yd({stdio:f,all:d,ipcOutput:p,originalError:e,signal:ce,signalDescription:Ae,exitCode:Se,escapedCommand:r,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:N,killSignal:P,maxBuffer:Y,timeout:T,cwd:j}),bt=Tl(e,kr,X);return Object.assign(bt,E_({error:bt,command:t,escapedCommand:r,startTime:n,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:Se,signal:ce,signalDescription:Ae,stdio:f,all:d,ipcOutput:p,cwd:j,originalMessage:Ie,shortMessage:xe})),bt},E_=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:u,signal:l,signalDescription:f,stdio:d,all:p,ipcOutput:b,cwd:T,originalMessage:N,shortMessage:P})=>{var j;return bd({shortMessage:P,originalMessage:N,command:t,escapedCommand:r,cwd:T,durationMs:Wo(n),failed:!0,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isTerminated:l!==void 0,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:u,signal:l,signalDescription:f,code:(j=e.cause)==null?void 0:j.code,stdout:d[1],stderr:d[2],all:p,stdio:d,ipcOutput:b,pipedFrom:[]})},bd=e=>Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)),T_=(e,t)=>{let r=e===null?void 0:e,n=t===null?void 0:t,s=n===void 0?void 0:Un(t);return{exitCode:r,signal:n,signalDescription:s}};var wd=e=>Number.isFinite(e)?e:0;function O_(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(wd(e*1e3)%1e3),nanoseconds:Math.trunc(wd(e*1e6)%1e3)}}function R_(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}function vi(e){switch(typeof e){case"number":{if(Number.isFinite(e))return O_(e);break}case"bigint":return R_(e)}throw new TypeError("Expected a finite number or bigint")}var k_=e=>e===0||e===0n,C_=(e,t)=>t===1||t===1n?e:`${e}s`,A_=1e-7,I_=24n*60n*60n*1000n;function _i(e,t){let r=typeof e=="bigint";if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");t={...t};let n=e<0?"-":"";e=e<0?-e:e,t.colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let s=[],o=(l,f)=>{let d=Math.floor(l*10**f+A_);return(Math.round(d)/10**f).toFixed(f)},i=(l,f,d,p)=>{if(!((s.length===0||!t.colonNotation)&&k_(l)&&!(t.colonNotation&&d==="m"))){if(p??=String(l),t.colonNotation){let b=p.includes(".")?p.split(".")[0].length:p.length,T=s.length>0?2:1;p="0".repeat(Math.max(0,T-b))+p}else p+=t.verbose?" "+C_(f,l):d;s.push(p)}},a=vi(e),c=BigInt(a.days);if(t.hideYearAndDays?i(BigInt(c)*24n+BigInt(a.hours),"hour","h"):(t.hideYear?i(c,"day","d"):(i(c/365n,"year","y"),i(c%365n,"day","d")),i(Number(a.hours),"hour","h")),i(Number(a.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3){let l=Number(a.seconds),f=Number(a.milliseconds),d=Number(a.microseconds),p=Number(a.nanoseconds);if(i(l,"second","s"),t.formatSubMilliseconds)i(f,"millisecond","ms"),i(d,"microsecond","\xB5s"),i(p,"nanosecond","ns");else{let b=f+d/1e3+p/1e6,T=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,N=b>=1?Math.round(b):Math.ceil(b),P=T?b.toFixed(T):N;i(Number.parseFloat(P),"millisecond","ms",P)}}else{let l=(r?Number(e%I_):e)/1e3%60,f=typeof t.secondsDecimalDigits=="number"?t.secondsDecimalDigits:1,d=o(l,f),p=t.keepDecimalsOnWholeSeconds?d:d.replace(/\.0+$/,"");i(Number.parseFloat(p),"second","s",p)}if(s.length===0)return n+"0"+(t.verbose?" milliseconds":"ms");let u=t.colonNotation?":":" ";return typeof t.unitCount=="number"&&(s=s.slice(0,Math.max(t.unitCount,1))),n+s.join(u)}var Sd=(e,t)=>{e.failed&&je({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})};var xd=(e,t)=>{Ht(t)&&(Sd(e,t),$_(e,t))},$_=(e,t)=>{let r=`(done in ${_i(e.durationMs)})`;je({type:"duration",verboseMessage:r,verboseInfo:t,result:e})};var or=(e,t,{reject:r})=>{if(xd(e,t),e.failed&&r)throw e;return e};var Ii=require("node:fs");var Ed=(e,t)=>xt(e)?"asyncGenerator":Rd(e)?"generator":ps(e)?"fileUrl":M_(e)?"filePath":B_(e)?"webStream":Pe(e,{checkOpen:!1})?"native":K(e)?"uint8Array":U_(e)?"asyncIterable":G_(e)?"iterable":Oi(e)?Td({transform:e},t):P_(e)?D_(e,t):"native",D_=(e,t)=>bi(e.transform,{checkOpen:!1})?L_(e,t):Oi(e.transform)?Td(e,t):N_(e,t),L_=(e,t)=>(Od(e,t,"Duplex stream"),"duplex"),Td=(e,t)=>(Od(e,t,"web TransformStream"),"webTransform"),Od=({final:e,binary:t,objectMode:r},n,s)=>{vd(e,`${n}.final`,s),vd(t,`${n}.binary`,s),Ei(r,`${n}.objectMode`)},vd=(e,t,r)=>{if(e!==void 0)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},N_=({transform:e,final:t,binary:r,objectMode:n},s)=>{if(e!==void 0&&!_d(e))throw new TypeError(`The \`${s}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(bi(t,{checkOpen:!1}))throw new TypeError(`The \`${s}.final\` option must not be a Duplex stream.`);if(Oi(t))throw new TypeError(`The \`${s}.final\` option must not be a web TransformStream.`);if(t!==void 0&&!_d(t))throw new TypeError(`The \`${s}.final\` option must be a generator.`);return Ei(r,`${s}.binary`),Ei(n,`${s}.objectMode`),xt(e)||xt(t)?"asyncGenerator":"generator"},Ei=(e,t)=>{if(e!==void 0&&typeof e!="boolean")throw new TypeError(`The \`${t}\` option must use a boolean.`)},_d=e=>xt(e)||Rd(e),xt=e=>Object.prototype.toString.call(e)==="[object AsyncGeneratorFunction]",Rd=e=>Object.prototype.toString.call(e)==="[object GeneratorFunction]",P_=e=>W(e)&&(e.transform!==void 0||e.final!==void 0),ps=e=>Object.prototype.toString.call(e)==="[object URL]",kd=e=>ps(e)&&e.protocol!=="file:",M_=e=>W(e)&&Object.keys(e).length>0&&Object.keys(e).every(t=>F_.has(t))&&Ti(e.file),F_=new Set(["file","append"]),Ti=e=>typeof e=="string",Cd=(e,t)=>e==="native"&&typeof t=="string"&&!j_.has(t),j_=new Set(["ipc","ignore","inherit","overlapped","pipe"]),Ad=e=>Object.prototype.toString.call(e)==="[object ReadableStream]",ms=e=>Object.prototype.toString.call(e)==="[object WritableStream]",B_=e=>Ad(e)||ms(e),Oi=e=>Ad(e==null?void 0:e.readable)&&ms(e==null?void 0:e.writable),U_=e=>Id(e)&&typeof e[Symbol.asyncIterator]=="function",G_=e=>Id(e)&&typeof e[Symbol.iterator]=="function",Id=e=>typeof e=="object"&&e!==null,_e=new Set(["generator","asyncGenerator","duplex","webTransform"]),hs=new Set(["fileUrl","filePath","fileNumber"]),Ri=new Set(["fileUrl","filePath"]),$d=new Set([...Ri,"webStream","nodeStream"]),Dd=new Set(["webTransform","duplex"]),lt={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"};var ki=(e,t,r,n)=>n==="output"?q_(e,t,r):V_(e,t,r),q_=(e,t,r)=>{let n=t!==0&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},V_=(e,t,r)=>{let n=t===0?e===!0:r[t-1].value.readableObjectMode,s=t!==r.length-1&&(e??n);return{writableObjectMode:n,readableObjectMode:s}},Ld=(e,t)=>{let r=e.findLast(({type:n})=>_e.has(n));return r===void 0?!1:t==="input"?r.value.writableObjectMode:r.value.readableObjectMode};var Nd=(e,t,r,n)=>[...e.filter(({type:s})=>!_e.has(s)),...z_(e,t,r,n)],z_=(e,t,r,{encoding:n})=>{let s=e.filter(({type:i})=>_e.has(i)),o=Array.from({length:s.length});for(let[i,a]of Object.entries(s))o[i]=W_({stdioItem:a,index:Number(i),newTransforms:o,optionName:t,direction:r,encoding:n});return X_(o,r)},W_=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:s,direction:o,encoding:i})=>t==="duplex"?Z_({stdioItem:e,optionName:s}):t==="webTransform"?H_({stdioItem:e,index:r,newTransforms:n,direction:o}):Y_({stdioItem:e,index:r,newTransforms:n,direction:o,encoding:i}),Z_=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:s=n}},optionName:o})=>{if(s&&!n)throw new TypeError(`The \`${o}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!s&&n)throw new TypeError(`The \`${o}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},H_=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:s})=>{let{transform:o,objectMode:i}=W(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=ki(i,r,n,s);return{...e,value:{transform:o,writableObjectMode:a,readableObjectMode:c}}},Y_=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:s,encoding:o})=>{let{transform:i,final:a,binary:c=!1,preserveNewlines:u=!1,objectMode:l}=W(t)?t:{transform:t},f=c||me.has(o),{writableObjectMode:d,readableObjectMode:p}=ki(l,r,n,s);return{...e,value:{transform:i,final:a,binary:f,preserveNewlines:u,writableObjectMode:d,readableObjectMode:p}}},X_=(e,t)=>t==="input"?e.reverse():e;var gs=q(require("node:process"),1);var Pd=(e,t,r)=>{let n=e.map(s=>K_(s,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??eE},K_=({type:e,value:t},r)=>J_[r]??Md[e](t),J_=["input","output","output"],ir=()=>{},Ci=()=>"input",Md={generator:ir,asyncGenerator:ir,fileUrl:ir,filePath:ir,iterable:Ci,asyncIterable:Ci,uint8Array:Ci,webStream:e=>ms(e)?"output":"input",nodeStream(e){return St(e,{checkOpen:!1})?yi(e,{checkOpen:!1})?void 0:"input":"output"},webTransform:ir,duplex:ir,native(e){let t=Q_(e);if(t!==void 0)return t;if(Pe(e,{checkOpen:!1}))return Md.nodeStream(e)}},Q_=e=>{if([0,gs.default.stdin].includes(e))return"input";if([1,2,gs.default.stdout,gs.default.stderr].includes(e))return"output"},eE="output";var Fd=(e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e;var jd=({stdio:e,ipc:t,buffer:r,...n},s,o)=>{let i=tE(e,n).map((a,c)=>Bd(a,c));return o?nE(i,r,s):Fd(i,t)},tE=(e,t)=>{if(e===void 0)return ve.map(n=>t[n]);if(rE(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${ve.map(n=>`\`${n}\``).join(", ")}`);if(typeof e=="string")return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);let r=Math.max(e.length,ve.length);return Array.from({length:r},(n,s)=>e[s])},rE=e=>ve.some(t=>e[t]!==void 0),Bd=(e,t)=>Array.isArray(e)?e.map(r=>Bd(r,t)):e??(t>=ve.length?"ignore":"pipe"),nE=(e,t,r)=>e.map((n,s)=>!t[s]&&s!==0&&!Yt(r,s)&&sE(n)?"ignore":n),sE=e=>e==="pipe"||Array.isArray(e)&&e.every(t=>t==="pipe");var Gd=require("node:fs"),qd=q(require("node:tty"),1);var Vd=({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:s,isSync:o})=>!r||t!=="native"?e:o?oE({stdioItem:e,fdNumber:n,direction:s}):cE({stdioItem:e,fdNumber:n}),oE=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:s})=>{let o=iE({value:t,optionName:r,fdNumber:n,direction:s});if(o!==void 0)return o;if(Pe(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},iE=({value:e,optionName:t,fdNumber:r,direction:n})=>{let s=aE(e,r);if(s!==void 0){if(n==="output")return{type:"fileNumber",value:s,optionName:t};if(qd.default.isatty(s))throw new TypeError(`The \`${t}: ${Vn(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:Xe((0,Gd.readFileSync)(s)),optionName:t}}},aE=(e,t)=>{if(e==="inherit")return t;if(typeof e=="number")return e;let r=On.indexOf(e);if(r!==-1)return r},cE=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>t==="inherit"?{type:"nodeStream",value:Ud(n,t,r),optionName:r}:typeof t=="number"?{type:"nodeStream",value:Ud(t,t,r),optionName:r}:Pe(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,Ud=(e,t,r)=>{let n=On[e];if(n===void 0)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n};var zd=({input:e,inputFile:t},r)=>r===0?[...uE(e),...fE(t)]:[],uE=e=>e===void 0?[]:[{type:lE(e),value:e,optionName:"input"}],lE=e=>{if(St(e,{checkOpen:!1}))return"nodeStream";if(typeof e=="string")return"string";if(K(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},fE=e=>e===void 0?[]:[{...dE(e),optionName:"inputFile"}],dE=e=>{if(ps(e))return{type:"fileUrl",value:e};if(Ti(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")};var Wd=e=>e.filter((t,r)=>e.every((n,s)=>t.value!==n.value||r>=s||t.type==="generator"||t.type==="asyncGenerator")),Zd=({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:s,isSync:o})=>{let i=pE(s,e);if(i.length!==0){if(o){mE({otherStdioItems:i,type:e,value:t,optionName:r,direction:n});return}if($d.has(e))return Hd({otherStdioItems:i,type:e,value:t,optionName:r,direction:n});Dd.has(e)&&gE({otherStdioItems:i,type:e,value:t,optionName:r})}},pE=(e,t)=>e.flatMap(({direction:r,stdioItems:n})=>n.filter(s=>s.type===t).map(s=>({...s,direction:r}))),mE=({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})=>{Ri.has(t)&&Hd({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})},Hd=({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})=>{let o=e.filter(a=>hE(a,r));if(o.length===0)return;let i=o.find(a=>a.direction!==s);return Yd(i,n,t),s==="output"?o[0].stream:void 0},hE=({type:e,value:t},r)=>e==="filePath"?t.file===r.file:e==="fileUrl"?t.href===r.href:t===r,gE=({otherStdioItems:e,type:t,value:r,optionName:n})=>{let s=e.find(({value:{transform:o}})=>o===r.transform);Yd(s,n,t)},Yd=(e,t,r)=>{if(e!==void 0)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${lt[r]} that is the same.`)};var ys=(e,t,r,n)=>{let o=jd(t,r,n).map((a,c)=>yE({stdioOption:a,fdNumber:c,options:t,isSync:n})),i=TE({initialFileDescriptors:o,addProperties:e,options:t,isSync:n});return t.stdio=i.map(({stdioItems:a})=>kE(a)),i},yE=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{let s=Rn(t),{stdioItems:o,isStdioArray:i}=bE({stdioOption:e,fdNumber:t,options:r,optionName:s}),a=Pd(o,t,s),c=o.map(f=>Vd({stdioItem:f,isStdioArray:i,fdNumber:t,direction:a,isSync:n})),u=Nd(c,s,a,r),l=Ld(u,a);return EE(u,l),{direction:a,objectMode:l,stdioItems:u}},bE=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{let o=[...(Array.isArray(e)?e:[e]).map(c=>wE(c,n)),...zd(r,t)],i=Wd(o),a=i.length>1;return SE(i,a,n),vE(i),{stdioItems:i,isStdioArray:a}},wE=(e,t)=>({type:Ed(e,t),value:e,optionName:t}),SE=(e,t,r)=>{if(e.length===0)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t){for(let{value:n,optionName:s}of e)if(xE.has(n))throw new Error(`The \`${s}\` option must not include \`${n}\`.`)}},xE=new Set(["ignore","ipc"]),vE=e=>{for(let t of e)_E(t)},_E=({type:e,value:t,optionName:r})=>{if(kd(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.
49
- For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(Cd(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},EE=(e,t)=>{if(!t)return;let r=e.find(({type:n})=>hs.has(n));if(r!==void 0)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},TE=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{let s=[];try{for(let o of e)s.push(OE({fileDescriptor:o,fileDescriptors:s,addProperties:t,options:r,isSync:n}));return s}catch(o){throw Ai(s),o}},OE=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:s,options:o,isSync:i})=>{let a=r.map(c=>RE({stdioItem:c,addProperties:s,direction:e,options:o,fileDescriptors:n,isSync:i}));return{direction:e,objectMode:t,stdioItems:a}},RE=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:s,isSync:o})=>{let i=Zd({stdioItem:e,direction:r,fileDescriptors:s,isSync:o});return i!==void 0?{...e,stream:i}:{...e,...t[r][e.type](e,n)}},Ai=e=>{for(let{stdioItems:t}of e)for(let{stream:r}of t)r!==void 0&&!De(r)&&r.destroy()},kE=e=>{if(e.length>1)return e.some(({value:n})=>n==="overlapped")?"overlapped":"pipe";let[{type:t,value:r}]=e;return t==="native"?r:"pipe"};var Kd=(e,t)=>ys(AE,e,t,!0),qe=({type:e,optionName:t})=>{Jd(t,lt[e])},CE=({optionName:e,value:t})=>((t==="ipc"||t==="overlapped")&&Jd(e,`"${t}"`),{}),Jd=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},Xd={generator(){},asyncGenerator:qe,webStream:qe,nodeStream:qe,webTransform:qe,duplex:qe,asyncIterable:qe,native:CE},AE={input:{...Xd,fileUrl:({value:e})=>({contents:[Xe((0,Ii.readFileSync)(e))]}),filePath:({value:{file:e}})=>({contents:[Xe((0,Ii.readFileSync)(e))]}),fileNumber:qe,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...Xd,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:qe,string:qe,uint8Array:qe}};var Qe=(e,{stripFinalNewline:t},r)=>$i(t,r)&&e!==void 0&&!Array.isArray(e)?rr(e):e,$i=(e,t)=>t==="all"?e[1]||e[2]:e[t];var Ur=require("node:stream");var bs=(e,t,r,n)=>e||r?void 0:ep(t,n),Li=(e,t,r)=>r?e.flatMap(n=>Qd(n,t)):Qd(e,t),Qd=(e,t)=>{let{transform:r,final:n}=ep(t,{});return[...r(e),...n()]},ep=(e,t)=>(t.previousChunks="",{transform:IE.bind(void 0,t,e),final:DE.bind(void 0,t)}),IE=function*(e,t,r){if(typeof r!="string"){yield r;return}let{previousChunks:n}=e,s=-1;for(let o=0;o<r.length;o+=1)if(r[o]===`
50
- `){let i=$E(r,o,t,e),a=r.slice(s+1,o+1-i);n.length>0&&(a=Di(n,a),n=""),yield a,s=o}s!==r.length-1&&(n=Di(n,r.slice(s+1))),e.previousChunks=n},$E=(e,t,r,n)=>r?0:(n.isWindowsNewline=t!==0&&e[t-1]==="\r",n.isWindowsNewline?2:1),DE=function*({previousChunks:e}){e.length>0&&(yield e)},tp=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:LE.bind(void 0,n)},LE=function*({isWindowsNewline:e=!1},t){let{unixNewline:r,windowsNewline:n,LF:s,concatBytes:o}=typeof t=="string"?NE:ME;if(t.at(-1)===s){yield t;return}yield o(t,e?n:r)},Di=(e,t)=>`${e}${t}`,NE={windowsNewline:`\r
47
+ `);return{originalMessage:X,shortMessage:ce,message:Ie}},b_=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:s,errorCode:o,signal:i,signalDescription:a,exitCode:c,isCanceled:u,isGracefullyCanceled:l,isForcefullyTerminated:f,forceKillAfterDelay:d,killSignal:p})=>{let b=w_(f,d);return t?`Command timed out after ${r} milliseconds${b}`:l?i===void 0?`Command was gracefully canceled with exit code ${c}`:f?`Command was gracefully canceled${b}`:`Command was gracefully canceled with ${i} (${a})`:u?`Command was canceled${b}`:n?`${pd(e,s)}${b}`:o!==void 0?`Command failed with ${o}${b}`:f?`Command was killed with ${p} (${qn(p)})${b}`:i!==void 0?`Command was killed with ${i} (${a})`:c!==void 0?`Command failed with exit code ${c}`:"Command failed"},w_=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",x_=(e,t)=>{if(e instanceof Le)return;let r=kl(e)?e.originalMessage:String((e==null?void 0:e.message)??e),n=Dr(Hf(r,t));return n===""?void 0:n},S_=e=>typeof e=="string"?e:(0,yd.inspect)(e),v_=e=>Array.isArray(e)?e.map(t=>sr(gd(t))).filter(Boolean).join(`
48
+ `):gd(e),gd=e=>typeof e=="string"?e:K(e)?On(e):"";var ms=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:s,options:{cwd:o},startTime:i})=>wd({command:e,escapedCommand:t,cwd:o,durationMs:Xo(i),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:s,pipedFrom:[]}),ir=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,isSync:i})=>Ur({error:e,command:t,escapedCommand:r,startTime:o,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:s,isSync:i}),Ur=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:u,signal:l,stdio:f,all:d,ipcOutput:p,options:{timeoutDuration:b,timeout:T=b,forceKillAfterDelay:P,killSignal:M,cwd:j,maxBuffer:Y},isSync:X})=>{let{exitCode:we,signal:ce,signalDescription:Ae}=E_(u,l),{originalMessage:Ie,shortMessage:xe,message:Ar}=bd({stdio:f,all:d,ipcOutput:p,originalError:e,signal:ce,signalDescription:Ae,exitCode:we,escapedCommand:r,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:P,killSignal:M,maxBuffer:Y,timeout:T,cwd:j}),xt=Ol(e,Ar,X);return Object.assign(xt,__({error:xt,command:t,escapedCommand:r,startTime:n,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:we,signal:ce,signalDescription:Ae,stdio:f,all:d,ipcOutput:p,cwd:j,originalMessage:Ie,shortMessage:xe})),xt},__=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:u,signal:l,signalDescription:f,stdio:d,all:p,ipcOutput:b,cwd:T,originalMessage:P,shortMessage:M})=>{var j;return wd({shortMessage:M,originalMessage:P,command:t,escapedCommand:r,cwd:T,durationMs:Xo(n),failed:!0,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isTerminated:l!==void 0,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:u,signal:l,signalDescription:f,code:(j=e.cause)==null?void 0:j.code,stdout:d[1],stderr:d[2],all:p,stdio:d,ipcOutput:b,pipedFrom:[]})},wd=e=>Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)),E_=(e,t)=>{let r=e===null?void 0:e,n=t===null?void 0:t,s=n===void 0?void 0:qn(t);return{exitCode:r,signal:n,signalDescription:s}};var xd=e=>Number.isFinite(e)?e:0;function T_(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(xd(e*1e3)%1e3),nanoseconds:Math.trunc(xd(e*1e6)%1e3)}}function O_(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}function Oi(e){switch(typeof e){case"number":{if(Number.isFinite(e))return T_(e);break}case"bigint":return O_(e)}throw new TypeError("Expected a finite number or bigint")}var R_=e=>e===0||e===0n,k_=(e,t)=>t===1||t===1n?e:`${e}s`,C_=1e-7,A_=24n*60n*60n*1000n;function Ri(e,t){let r=typeof e=="bigint";if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");t={...t};let n=e<0?"-":"";e=e<0?-e:e,t.colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let s=[],o=(l,f)=>{let d=Math.floor(l*10**f+C_);return(Math.round(d)/10**f).toFixed(f)},i=(l,f,d,p)=>{if(!((s.length===0||!t.colonNotation)&&R_(l)&&!(t.colonNotation&&d==="m"))){if(p??=String(l),t.colonNotation){let b=p.includes(".")?p.split(".")[0].length:p.length,T=s.length>0?2:1;p="0".repeat(Math.max(0,T-b))+p}else p+=t.verbose?" "+k_(f,l):d;s.push(p)}},a=Oi(e),c=BigInt(a.days);if(t.hideYearAndDays?i(BigInt(c)*24n+BigInt(a.hours),"hour","h"):(t.hideYear?i(c,"day","d"):(i(c/365n,"year","y"),i(c%365n,"day","d")),i(Number(a.hours),"hour","h")),i(Number(a.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3){let l=Number(a.seconds),f=Number(a.milliseconds),d=Number(a.microseconds),p=Number(a.nanoseconds);if(i(l,"second","s"),t.formatSubMilliseconds)i(f,"millisecond","ms"),i(d,"microsecond","\xB5s"),i(p,"nanosecond","ns");else{let b=f+d/1e3+p/1e6,T=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,P=b>=1?Math.round(b):Math.ceil(b),M=T?b.toFixed(T):P;i(Number.parseFloat(M),"millisecond","ms",M)}}else{let l=(r?Number(e%A_):e)/1e3%60,f=typeof t.secondsDecimalDigits=="number"?t.secondsDecimalDigits:1,d=o(l,f),p=t.keepDecimalsOnWholeSeconds?d:d.replace(/\.0+$/,"");i(Number.parseFloat(p),"second","s",p)}if(s.length===0)return n+"0"+(t.verbose?" milliseconds":"ms");let u=t.colonNotation?":":" ";return typeof t.unitCount=="number"&&(s=s.slice(0,Math.max(t.unitCount,1))),n+s.join(u)}var Sd=(e,t)=>{e.failed&&Be({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})};var vd=(e,t)=>{Xt(t)&&(Sd(e,t),I_(e,t))},I_=(e,t)=>{let r=`(done in ${Ri(e.durationMs)})`;Be({type:"duration",verboseMessage:r,verboseInfo:t,result:e})};var ar=(e,t,{reject:r})=>{if(vd(e,t),e.failed&&r)throw e;return e};var Ni=require("node:fs");var Td=(e,t)=>_t(e)?"asyncGenerator":kd(e)?"generator":hs(e)?"fileUrl":P_(e)?"filePath":j_(e)?"webStream":Pe(e,{checkOpen:!1})?"native":K(e)?"uint8Array":B_(e)?"asyncIterable":U_(e)?"iterable":Ai(e)?Od({transform:e},t):N_(e)?$_(e,t):"native",$_=(e,t)=>vi(e.transform,{checkOpen:!1})?D_(e,t):Ai(e.transform)?Od(e,t):L_(e,t),D_=(e,t)=>(Rd(e,t,"Duplex stream"),"duplex"),Od=(e,t)=>(Rd(e,t,"web TransformStream"),"webTransform"),Rd=({final:e,binary:t,objectMode:r},n,s)=>{_d(e,`${n}.final`,s),_d(t,`${n}.binary`,s),ki(r,`${n}.objectMode`)},_d=(e,t,r)=>{if(e!==void 0)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},L_=({transform:e,final:t,binary:r,objectMode:n},s)=>{if(e!==void 0&&!Ed(e))throw new TypeError(`The \`${s}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(vi(t,{checkOpen:!1}))throw new TypeError(`The \`${s}.final\` option must not be a Duplex stream.`);if(Ai(t))throw new TypeError(`The \`${s}.final\` option must not be a web TransformStream.`);if(t!==void 0&&!Ed(t))throw new TypeError(`The \`${s}.final\` option must be a generator.`);return ki(r,`${s}.binary`),ki(n,`${s}.objectMode`),_t(e)||_t(t)?"asyncGenerator":"generator"},ki=(e,t)=>{if(e!==void 0&&typeof e!="boolean")throw new TypeError(`The \`${t}\` option must use a boolean.`)},Ed=e=>_t(e)||kd(e),_t=e=>Object.prototype.toString.call(e)==="[object AsyncGeneratorFunction]",kd=e=>Object.prototype.toString.call(e)==="[object GeneratorFunction]",N_=e=>W(e)&&(e.transform!==void 0||e.final!==void 0),hs=e=>Object.prototype.toString.call(e)==="[object URL]",Cd=e=>hs(e)&&e.protocol!=="file:",P_=e=>W(e)&&Object.keys(e).length>0&&Object.keys(e).every(t=>M_.has(t))&&Ci(e.file),M_=new Set(["file","append"]),Ci=e=>typeof e=="string",Ad=(e,t)=>e==="native"&&typeof t=="string"&&!F_.has(t),F_=new Set(["ipc","ignore","inherit","overlapped","pipe"]),Id=e=>Object.prototype.toString.call(e)==="[object ReadableStream]",gs=e=>Object.prototype.toString.call(e)==="[object WritableStream]",j_=e=>Id(e)||gs(e),Ai=e=>Id(e==null?void 0:e.readable)&&gs(e==null?void 0:e.writable),B_=e=>$d(e)&&typeof e[Symbol.asyncIterator]=="function",U_=e=>$d(e)&&typeof e[Symbol.iterator]=="function",$d=e=>typeof e=="object"&&e!==null,ve=new Set(["generator","asyncGenerator","duplex","webTransform"]),ys=new Set(["fileUrl","filePath","fileNumber"]),Ii=new Set(["fileUrl","filePath"]),Dd=new Set([...Ii,"webStream","nodeStream"]),Ld=new Set(["webTransform","duplex"]),ft={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"};var $i=(e,t,r,n)=>n==="output"?G_(e,t,r):q_(e,t,r),G_=(e,t,r)=>{let n=t!==0&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},q_=(e,t,r)=>{let n=t===0?e===!0:r[t-1].value.readableObjectMode,s=t!==r.length-1&&(e??n);return{writableObjectMode:n,readableObjectMode:s}},Nd=(e,t)=>{let r=e.findLast(({type:n})=>ve.has(n));return r===void 0?!1:t==="input"?r.value.writableObjectMode:r.value.readableObjectMode};var Pd=(e,t,r,n)=>[...e.filter(({type:s})=>!ve.has(s)),...V_(e,t,r,n)],V_=(e,t,r,{encoding:n})=>{let s=e.filter(({type:i})=>ve.has(i)),o=Array.from({length:s.length});for(let[i,a]of Object.entries(s))o[i]=z_({stdioItem:a,index:Number(i),newTransforms:o,optionName:t,direction:r,encoding:n});return Y_(o,r)},z_=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:s,direction:o,encoding:i})=>t==="duplex"?W_({stdioItem:e,optionName:s}):t==="webTransform"?H_({stdioItem:e,index:r,newTransforms:n,direction:o}):Z_({stdioItem:e,index:r,newTransforms:n,direction:o,encoding:i}),W_=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:s=n}},optionName:o})=>{if(s&&!n)throw new TypeError(`The \`${o}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!s&&n)throw new TypeError(`The \`${o}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},H_=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:s})=>{let{transform:o,objectMode:i}=W(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=$i(i,r,n,s);return{...e,value:{transform:o,writableObjectMode:a,readableObjectMode:c}}},Z_=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:s,encoding:o})=>{let{transform:i,final:a,binary:c=!1,preserveNewlines:u=!1,objectMode:l}=W(t)?t:{transform:t},f=c||he.has(o),{writableObjectMode:d,readableObjectMode:p}=$i(l,r,n,s);return{...e,value:{transform:i,final:a,binary:f,preserveNewlines:u,writableObjectMode:d,readableObjectMode:p}}},Y_=(e,t)=>t==="input"?e.reverse():e;var bs=q(require("node:process"),1);var Md=(e,t,r)=>{let n=e.map(s=>X_(s,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??Q_},X_=({type:e,value:t},r)=>K_[r]??Fd[e](t),K_=["input","output","output"],cr=()=>{},Di=()=>"input",Fd={generator:cr,asyncGenerator:cr,fileUrl:cr,filePath:cr,iterable:Di,asyncIterable:Di,uint8Array:Di,webStream:e=>gs(e)?"output":"input",nodeStream(e){return vt(e,{checkOpen:!1})?Si(e,{checkOpen:!1})?void 0:"input":"output"},webTransform:cr,duplex:cr,native(e){let t=J_(e);if(t!==void 0)return t;if(Pe(e,{checkOpen:!1}))return Fd.nodeStream(e)}},J_=e=>{if([0,bs.default.stdin].includes(e))return"input";if([1,2,bs.default.stdout,bs.default.stderr].includes(e))return"output"},Q_="output";var jd=(e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e;var Bd=({stdio:e,ipc:t,buffer:r,...n},s,o)=>{let i=eE(e,n).map((a,c)=>Ud(a,c));return o?rE(i,r,s):jd(i,t)},eE=(e,t)=>{if(e===void 0)return Se.map(n=>t[n]);if(tE(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Se.map(n=>`\`${n}\``).join(", ")}`);if(typeof e=="string")return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);let r=Math.max(e.length,Se.length);return Array.from({length:r},(n,s)=>e[s])},tE=e=>Se.some(t=>e[t]!==void 0),Ud=(e,t)=>Array.isArray(e)?e.map(r=>Ud(r,t)):e??(t>=Se.length?"ignore":"pipe"),rE=(e,t,r)=>e.map((n,s)=>!t[s]&&s!==0&&!Kt(r,s)&&nE(n)?"ignore":n),nE=e=>e==="pipe"||Array.isArray(e)&&e.every(t=>t==="pipe");var qd=require("node:fs"),Vd=q(require("node:tty"),1);var zd=({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:s,isSync:o})=>!r||t!=="native"?e:o?sE({stdioItem:e,fdNumber:n,direction:s}):aE({stdioItem:e,fdNumber:n}),sE=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:s})=>{let o=oE({value:t,optionName:r,fdNumber:n,direction:s});if(o!==void 0)return o;if(Pe(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},oE=({value:e,optionName:t,fdNumber:r,direction:n})=>{let s=iE(e,r);if(s!==void 0){if(n==="output")return{type:"fileNumber",value:s,optionName:t};if(Vd.default.isatty(s))throw new TypeError(`The \`${t}: ${Wn(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:Je((0,qd.readFileSync)(s)),optionName:t}}},iE=(e,t)=>{if(e==="inherit")return t;if(typeof e=="number")return e;let r=kn.indexOf(e);if(r!==-1)return r},aE=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>t==="inherit"?{type:"nodeStream",value:Gd(n,t,r),optionName:r}:typeof t=="number"?{type:"nodeStream",value:Gd(t,t,r),optionName:r}:Pe(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,Gd=(e,t,r)=>{let n=kn[e];if(n===void 0)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n};var Wd=({input:e,inputFile:t},r)=>r===0?[...cE(e),...lE(t)]:[],cE=e=>e===void 0?[]:[{type:uE(e),value:e,optionName:"input"}],uE=e=>{if(vt(e,{checkOpen:!1}))return"nodeStream";if(typeof e=="string")return"string";if(K(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},lE=e=>e===void 0?[]:[{...fE(e),optionName:"inputFile"}],fE=e=>{if(hs(e))return{type:"fileUrl",value:e};if(Ci(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")};var Hd=e=>e.filter((t,r)=>e.every((n,s)=>t.value!==n.value||r>=s||t.type==="generator"||t.type==="asyncGenerator")),Zd=({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:s,isSync:o})=>{let i=dE(s,e);if(i.length!==0){if(o){pE({otherStdioItems:i,type:e,value:t,optionName:r,direction:n});return}if(Dd.has(e))return Yd({otherStdioItems:i,type:e,value:t,optionName:r,direction:n});Ld.has(e)&&hE({otherStdioItems:i,type:e,value:t,optionName:r})}},dE=(e,t)=>e.flatMap(({direction:r,stdioItems:n})=>n.filter(s=>s.type===t).map(s=>({...s,direction:r}))),pE=({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})=>{Ii.has(t)&&Yd({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})},Yd=({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})=>{let o=e.filter(a=>mE(a,r));if(o.length===0)return;let i=o.find(a=>a.direction!==s);return Xd(i,n,t),s==="output"?o[0].stream:void 0},mE=({type:e,value:t},r)=>e==="filePath"?t.file===r.file:e==="fileUrl"?t.href===r.href:t===r,hE=({otherStdioItems:e,type:t,value:r,optionName:n})=>{let s=e.find(({value:{transform:o}})=>o===r.transform);Xd(s,n,t)},Xd=(e,t,r)=>{if(e!==void 0)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${ft[r]} that is the same.`)};var ws=(e,t,r,n)=>{let o=Bd(t,r,n).map((a,c)=>gE({stdioOption:a,fdNumber:c,options:t,isSync:n})),i=EE({initialFileDescriptors:o,addProperties:e,options:t,isSync:n});return t.stdio=i.map(({stdioItems:a})=>RE(a)),i},gE=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{let s=Cn(t),{stdioItems:o,isStdioArray:i}=yE({stdioOption:e,fdNumber:t,options:r,optionName:s}),a=Md(o,t,s),c=o.map(f=>zd({stdioItem:f,isStdioArray:i,fdNumber:t,direction:a,isSync:n})),u=Pd(c,s,a,r),l=Nd(u,a);return _E(u,l),{direction:a,objectMode:l,stdioItems:u}},yE=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{let o=[...(Array.isArray(e)?e:[e]).map(c=>bE(c,n)),...Wd(r,t)],i=Hd(o),a=i.length>1;return wE(i,a,n),SE(i),{stdioItems:i,isStdioArray:a}},bE=(e,t)=>({type:Td(e,t),value:e,optionName:t}),wE=(e,t,r)=>{if(e.length===0)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t){for(let{value:n,optionName:s}of e)if(xE.has(n))throw new Error(`The \`${s}\` option must not include \`${n}\`.`)}},xE=new Set(["ignore","ipc"]),SE=e=>{for(let t of e)vE(t)},vE=({type:e,value:t,optionName:r})=>{if(Cd(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.
49
+ For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(Ad(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},_E=(e,t)=>{if(!t)return;let r=e.find(({type:n})=>ys.has(n));if(r!==void 0)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},EE=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{let s=[];try{for(let o of e)s.push(TE({fileDescriptor:o,fileDescriptors:s,addProperties:t,options:r,isSync:n}));return s}catch(o){throw Li(s),o}},TE=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:s,options:o,isSync:i})=>{let a=r.map(c=>OE({stdioItem:c,addProperties:s,direction:e,options:o,fileDescriptors:n,isSync:i}));return{direction:e,objectMode:t,stdioItems:a}},OE=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:s,isSync:o})=>{let i=Zd({stdioItem:e,direction:r,fileDescriptors:s,isSync:o});return i!==void 0?{...e,stream:i}:{...e,...t[r][e.type](e,n)}},Li=e=>{for(let{stdioItems:t}of e)for(let{stream:r}of t)r!==void 0&&!De(r)&&r.destroy()},RE=e=>{if(e.length>1)return e.some(({value:n})=>n==="overlapped")?"overlapped":"pipe";let[{type:t,value:r}]=e;return t==="native"?r:"pipe"};var Jd=(e,t)=>ws(CE,e,t,!0),Ve=({type:e,optionName:t})=>{Qd(t,ft[e])},kE=({optionName:e,value:t})=>((t==="ipc"||t==="overlapped")&&Qd(e,`"${t}"`),{}),Qd=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},Kd={generator(){},asyncGenerator:Ve,webStream:Ve,nodeStream:Ve,webTransform:Ve,duplex:Ve,asyncIterable:Ve,native:kE},CE={input:{...Kd,fileUrl:({value:e})=>({contents:[Je((0,Ni.readFileSync)(e))]}),filePath:({value:{file:e}})=>({contents:[Je((0,Ni.readFileSync)(e))]}),fileNumber:Ve,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...Kd,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:Ve,string:Ve,uint8Array:Ve}};var tt=(e,{stripFinalNewline:t},r)=>Pi(t,r)&&e!==void 0&&!Array.isArray(e)?sr(e):e,Pi=(e,t)=>t==="all"?e[1]||e[2]:e[t];var qr=require("node:stream");var xs=(e,t,r,n)=>e||r?void 0:tp(t,n),Fi=(e,t,r)=>r?e.flatMap(n=>ep(n,t)):ep(e,t),ep=(e,t)=>{let{transform:r,final:n}=tp(t,{});return[...r(e),...n()]},tp=(e,t)=>(t.previousChunks="",{transform:AE.bind(void 0,t,e),final:$E.bind(void 0,t)}),AE=function*(e,t,r){if(typeof r!="string"){yield r;return}let{previousChunks:n}=e,s=-1;for(let o=0;o<r.length;o+=1)if(r[o]===`
50
+ `){let i=IE(r,o,t,e),a=r.slice(s+1,o+1-i);n.length>0&&(a=Mi(n,a),n=""),yield a,s=o}s!==r.length-1&&(n=Mi(n,r.slice(s+1))),e.previousChunks=n},IE=(e,t,r,n)=>r?0:(n.isWindowsNewline=t!==0&&e[t-1]==="\r",n.isWindowsNewline?2:1),$E=function*({previousChunks:e}){e.length>0&&(yield e)},rp=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:DE.bind(void 0,n)},DE=function*({isWindowsNewline:e=!1},t){let{unixNewline:r,windowsNewline:n,LF:s,concatBytes:o}=typeof t=="string"?LE:PE;if(t.at(-1)===s){yield t;return}yield o(t,e?n:r)},Mi=(e,t)=>`${e}${t}`,LE={windowsNewline:`\r
51
51
  `,unixNewline:`
52
52
  `,LF:`
53
- `,concatBytes:Di},PE=(e,t)=>{let r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r},ME={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:PE};var rp=require("node:buffer");var np=(e,t)=>e?void 0:FE.bind(void 0,t),FE=function*(e,t){if(typeof t!="string"&&!K(t)&&!rp.Buffer.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},sp=(e,t)=>e?jE.bind(void 0,t):BE.bind(void 0,t),jE=function*(e,t){op(e,t),yield t},BE=function*(e,t){if(op(e,t),typeof t!="string"&&!K(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},op=(e,t)=>{if(t==null)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.
53
+ `,concatBytes:Mi},NE=(e,t)=>{let r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r},PE={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:NE};var np=require("node:buffer");var sp=(e,t)=>e?void 0:ME.bind(void 0,t),ME=function*(e,t){if(typeof t!="string"&&!K(t)&&!np.Buffer.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},op=(e,t)=>e?FE.bind(void 0,t):jE.bind(void 0,t),FE=function*(e,t){ip(e,t),yield t},jE=function*(e,t){if(ip(e,t),typeof t!="string"&&!K(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},ip=(e,t)=>{if(t==null)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.
54
54
  Instead, \`yield\` should either be called with a value, or not be called at all. For example:
55
- if (condition) { yield value; }`)};var ip=require("node:buffer"),ap=require("node:string_decoder");var ws=(e,t,r)=>{if(r)return;if(e)return{transform:UE.bind(void 0,new TextEncoder)};let n=new ap.StringDecoder(t);return{transform:GE.bind(void 0,n),final:qE.bind(void 0,n)}},UE=function*(e,t){ip.Buffer.isBuffer(t)?yield Xe(t):typeof t=="string"?yield e.encode(t):yield t},GE=function*(e,t){yield K(t)?e.write(t):t},qE=function*(e){let t=e.end();t!==""&&(yield t)};var Ni=require("node:util"),Pi=(0,Ni.callbackify)(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(let s of t.currentIterable)n.push(s)}finally{delete t.currentIterable}}),Ss=async function*(e,t,r){if(r===t.length){yield e;return}let{transform:n=zE}=t[r];for await(let s of n(e))yield*Ss(s,t,r+1)},cp=async function*(e){for(let[t,{final:r}]of Object.entries(e))yield*VE(r,Number(t),e)},VE=async function*(e,t,r){if(e!==void 0)for await(let n of e())yield*Ss(n,r,t+1)},up=(0,Ni.callbackify)(async({currentIterable:e},t)=>{if(e!==void 0){await(t?e.throw(t):e.return());return}if(t)throw t}),zE=function*(e){yield e};var Mi=(e,t,r,n)=>{try{for(let s of e(...t))r.push(s);n()}catch(s){n(s)}},lp=(e,t)=>[...t.flatMap(r=>[...vt(r,e,0)]),...Br(e)],vt=function*(e,t,r){if(r===t.length){yield e;return}let{transform:n=ZE}=t[r];for(let s of n(e))yield*vt(s,t,r+1)},Br=function*(e){for(let[t,{final:r}]of Object.entries(e))yield*WE(r,Number(t),e)},WE=function*(e,t,r){if(e!==void 0)for(let n of e())yield*vt(n,r,t+1)},ZE=function*(e){yield e};var Fi=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:s},optionName:o},{encoding:i})=>{let a={},c=fp(e,i,o),u=xt(t),l=xt(r),f=u?Pi.bind(void 0,Ss,a):Mi.bind(void 0,vt),d=u||l?Pi.bind(void 0,cp,a):Mi.bind(void 0,Br),p=u||l?up.bind(void 0,a):void 0;return{stream:new Ur.Transform({writableObjectMode:n,writableHighWaterMark:(0,Ur.getDefaultHighWaterMark)(n),readableObjectMode:s,readableHighWaterMark:(0,Ur.getDefaultHighWaterMark)(s),transform(T,N,P){f([T,c,0],this,P)},flush(T){d([c],this,T)},destroy:p})}},xs=(e,t,r,n)=>{let s=t.filter(({type:i})=>i==="generator"),o=n?s.reverse():s;for(let{value:i,optionName:a}of o){let c=fp(i,r,a);e=lp(c,e)}return e},fp=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:s,preserveNewlines:o},i,a)=>{let c={};return[{transform:np(n,a)},ws(r,i,n),bs(r,o,n,c),{transform:e,final:t},{transform:sp(s,a)},tp({binary:r,preserveNewlines:o,readableObjectMode:s,state:c})].filter(Boolean)};var dp=(e,t)=>{for(let r of HE(e))YE(e,r,t)},HE=e=>new Set(Object.entries(e).filter(([,{direction:t}])=>t==="input").map(([t])=>Number(t))),YE=(e,t,r)=>{let{stdioItems:n}=e[t],s=n.filter(({contents:a})=>a!==void 0);if(s.length===0)return;if(t!==0){let[{type:a,optionName:c}]=s;throw new TypeError(`Only the \`stdin\` option, not \`${c}\`, can be ${lt[a]} with synchronous methods.`)}let i=s.map(({contents:a})=>a).map(a=>XE(a,n));r.input=Ar(i)},XE=(e,t)=>{let r=xs(e,t,"utf8",!0);return KE(r),Ar(r)},KE=e=>{let t=e.find(r=>typeof r!="string"&&!K(r));if(t!==void 0)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)};var _s=require("node:fs");var vs=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>n!=="all"&&Yt(r,n)&&!me.has(t)&&JE(n)&&(e.some(({type:s,value:o})=>s==="native"&&QE.has(o))||e.every(({type:s})=>_e.has(s))),JE=e=>e===1||e===2,QE=new Set(["pipe","overlapped"]),pp=async(e,t,r,n)=>{for await(let s of e)e0(t)||hp(s,r,n)},mp=(e,t,r)=>{for(let n of e)hp(n,t,r)},e0=e=>e._readableState.pipes.length>0,hp=(e,t,r)=>{let n=Ln(e);je({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})};var gp=({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:s})=>{if(t===null)return{output:Array.from({length:3})};let o={},i=new Set([]);return{output:t.map((c,u)=>t0({result:c,fileDescriptors:e,fdNumber:u,state:o,outputFiles:i,isMaxBuffer:n,verboseInfo:s},r)),...o}},t0=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:s,isMaxBuffer:o,verboseInfo:i},{buffer:a,encoding:c,lines:u,stripFinalNewline:l,maxBuffer:f})=>{if(e===null)return;let d=md(e,o,f),p=Xe(d),{stdioItems:b,objectMode:T}=t[r],N=r0([p],b,c,n),{serializedResult:P,finalResult:j=P}=n0({chunks:N,objectMode:T,encoding:c,lines:u,stripFinalNewline:l,fdNumber:r});s0({serializedResult:P,fdNumber:r,state:n,verboseInfo:i,encoding:c,stdioItems:b,objectMode:T});let Y=a[r]?j:void 0;try{return n.error===void 0&&o0(P,b,s),Y}catch(X){return n.error=X,Y}},r0=(e,t,r,n)=>{try{return xs(e,t,r,!1)}catch(s){return n.error=s,e}},n0=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:s,fdNumber:o})=>{if(t)return{serializedResult:e};if(r==="buffer")return{serializedResult:Ar(e)};let i=ru(e,r);return n[o]?{serializedResult:i,finalResult:Li(i,!s[o],t)}:{serializedResult:i}},s0=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:s,stdioItems:o,objectMode:i})=>{if(!vs({stdioItems:o,encoding:s,verboseInfo:n,fdNumber:t}))return;let a=Li(e,!1,i);try{mp(a,t,n)}catch(c){r.error??=c}},o0=(e,t,r)=>{for(let{path:n,append:s}of t.filter(({type:o})=>hs.has(o))){let o=typeof n=="string"?n:n.toString();s||r.has(o)?(0,_s.appendFileSync)(n,e):(r.add(o),(0,_s.writeFileSync)(n,e))}};var yp=([,e,t],r)=>{if(r.all)return e===void 0?t:t===void 0?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Qe(t,r,"all")]:Array.isArray(t)?[Qe(e,r,"all"),...t]:K(e)&&K(t)?Fo([e,t]):`${e}${t}`};var Es=require("node:events");var bp=async(e,t)=>{let[r,n]=await i0(e);return t.isForcefullyTerminated??=!1,[r,n]},i0=async e=>{let[t,r]=await Promise.allSettled([(0,Es.once)(e,"spawn"),(0,Es.once)(e,"exit")]);return t.status==="rejected"?[]:r.status==="rejected"?wp(e):r.value},wp=async e=>{try{return await(0,Es.once)(e,"exit")}catch{return wp(e)}},Sp=async e=>{let[t,r]=await e;if(!a0(t,r)&&ji(t,r))throw new Le;return[t,r]},a0=(e,t)=>e===void 0&&t===void 0,ji=(e,t)=>e!==0||t!==null;var xp=({error:e,status:t,signal:r,output:n},{maxBuffer:s})=>{let o=c0(e,t,r),i=(o==null?void 0:o.code)==="ETIMEDOUT",a=pd(o,n,s);return{resultError:o,exitCode:t,signal:r,timedOut:i,isMaxBuffer:a}},c0=(e,t,r)=>e!==void 0?e:ji(t,r)?new Le:void 0;var _p=(e,t,r)=>{let{file:n,commandArguments:s,command:o,escapedCommand:i,startTime:a,verboseInfo:c,options:u,fileDescriptors:l}=u0(e,t,r),f=d0({file:n,commandArguments:s,options:u,command:o,escapedCommand:i,verboseInfo:c,fileDescriptors:l,startTime:a});return or(f,c,u)},u0=(e,t,r)=>{let{command:n,escapedCommand:s,startTime:o,verboseInfo:i}=Pn(e,t,r),a=l0(r),{file:c,commandArguments:u,options:l}=ns(e,t,a);f0(l);let f=Kd(l,i);return{file:c,commandArguments:u,command:n,escapedCommand:s,startTime:o,verboseInfo:i,options:l,fileDescriptors:f}},l0=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,f0=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Ts("ipcInput"),e&&Ts("ipc: true"),r&&Ts("detached: true"),n&&Ts("cancelSignal")},Ts=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},d0=({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,verboseInfo:o,fileDescriptors:i,startTime:a})=>{let c=p0({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,fileDescriptors:i,startTime:a});if(c.failed)return c;let{resultError:u,exitCode:l,signal:f,timedOut:d,isMaxBuffer:p}=xp(c,r),{output:b,error:T=u}=gp({fileDescriptors:i,syncResult:c,options:r,isMaxBuffer:p,verboseInfo:o}),N=b.map((j,Y)=>Qe(j,r,Y)),P=Qe(yp(b,r),r,"all");return h0({error:T,exitCode:l,signal:f,timedOut:d,isMaxBuffer:p,stdio:N,all:P,options:r,command:n,escapedCommand:s,startTime:a})},p0=({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,fileDescriptors:o,startTime:i})=>{try{dp(o,r);let a=m0(r);return(0,vp.spawnSync)(e,t,a)}catch(a){return sr({error:a,command:n,escapedCommand:s,fileDescriptors:o,options:r,startTime:i,isSync:!0})}},m0=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:fs(t)}),h0=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:s,stdio:o,all:i,options:a,command:c,escapedCommand:u,startTime:l})=>e===void 0?ds({command:c,escapedCommand:u,stdio:o,all:i,ipcOutput:[],options:a,startTime:l}):jr({error:e,command:c,escapedCommand:u,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:s,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:o,all:i,ipcOutput:[],options:a,startTime:l,isSync:!0});var Im=require("node:events"),$m=require("node:child_process");var Ui=q(require("node:process"),1);var ar=require("node:events");var Ep=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:s=!0,filter:o}={})=>(Qt({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Xn(e)}),g0({anyProcess:e,channel:t,isSubprocess:r,filter:o,reference:s})),g0=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:s})=>{Wn(t,s);let o=ut(e,t,r),i=new AbortController;try{return await Promise.race([y0(o,n,i),b0(o,r,i),w0(o,r,i)])}catch(a){throw er(e),a}finally{i.abort(),Zn(t,s)}},y0=async(e,t,{signal:r})=>{if(t===void 0){let[n]=await(0,ar.once)(e,"message",{signal:r});return n}for await(let[n]of(0,ar.on)(e,"message",{signal:r}))if(t(n))return n},b0=async(e,t,{signal:r})=>{await(0,ar.once)(e,"disconnect",{signal:r}),Wl(t)},w0=async(e,t,{signal:r})=>{let[n]=await(0,ar.once)(e,"strict:error",{signal:r});throw qn(n,t)};var Gr=require("node:events");var Op=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:s=!0}={})=>Bi({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:s}),Bi=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:s,reference:o})=>{Qt({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Xn(e)}),Wn(t,o);let i=ut(e,t,r),a=new AbortController,c={};return S0(e,i,a),x0({ipcEmitter:i,isSubprocess:r,controller:a,state:c}),v0({anyProcess:e,channel:t,ipcEmitter:i,isSubprocess:r,shouldAwait:s,controller:a,state:c,reference:o})},S0=async(e,t,r)=>{try{await(0,Gr.once)(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},x0=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{let[s]=await(0,Gr.once)(e,"strict:error",{signal:r.signal});n.error=qn(s,t),r.abort()}catch{}},v0=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:s,controller:o,state:i,reference:a}){try{for await(let[c]of(0,Gr.on)(r,"message",{signal:o.signal}))Tp(i),yield c}catch{Tp(i)}finally{o.abort(),Zn(t,a),n||er(e),s&&await e}},Tp=({error:e})=>{if(e)throw e};var Rp=(e,{ipc:t})=>{Object.assign(e,Cp(e,!1,t))},kp=()=>{let e=Ui.default,t=!0,r=Ui.default.channel!==void 0;return{...Cp(e,t,r),getCancelSignal:Rf.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}},Cp=(e,t,r)=>({sendMessage:es.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:Ep.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Op.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})});var Ap=require("node:child_process"),ft=require("node:stream");var Ip=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,verboseInfo:i})=>{Ai(n);let a=new Ap.ChildProcess;_0(a,n),Object.assign(a,{readable:E0,writable:T0,duplex:O0});let c=sr({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,isSync:!1}),u=R0(c,i,s);return{subprocess:a,promise:u}},_0=(e,t)=>{let r=qr(),n=qr(),s=qr(),o=Array.from({length:t.length-3},qr),i=qr(),a=[r,n,s,...o];Object.assign(e,{stdin:r,stdout:n,stderr:s,all:i,stdio:a})},qr=()=>{let e=new ft.PassThrough;return e.end(),e},E0=()=>new ft.Readable({read(){}}),T0=()=>new ft.Writable({write(){}}),O0=()=>new ft.Duplex({read(){},write(){}}),R0=async(e,t,r)=>or(e,t,r);var cr=require("node:fs"),Dp=require("node:buffer"),Ve=require("node:stream");var Lp=(e,t)=>ys(k0,e,t,!1),Vr=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${lt[e]}.`)},$p={fileNumber:Vr,generator:Fi,asyncGenerator:Fi,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){let n=t||r;return{stream:Ve.Duplex.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},k0={input:{...$p,fileUrl:({value:e})=>({stream:(0,cr.createReadStream)(e)}),filePath:({value:{file:e}})=>({stream:(0,cr.createReadStream)(e)}),webStream:({value:e})=>({stream:Ve.Readable.fromWeb(e)}),iterable:({value:e})=>({stream:Ve.Readable.from(e)}),asyncIterable:({value:e})=>({stream:Ve.Readable.from(e)}),string:({value:e})=>({stream:Ve.Readable.from(e)}),uint8Array:({value:e})=>({stream:Ve.Readable.from(Dp.Buffer.from(e))})},output:{...$p,fileUrl:({value:e})=>({stream:(0,cr.createWriteStream)(e)}),filePath:({value:{file:e,append:t}})=>({stream:(0,cr.createWriteStream)(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Ve.Writable.fromWeb(e)}),iterable:Vr,asyncIterable:Vr,string:Vr,uint8Array:Vr}};var zr=require("node:events"),Rs=require("node:stream"),Vi=require("node:stream/promises");function _t(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(let s of e)qi(s);let t=e.some(({readableObjectMode:s})=>s),r=C0(e,t),n=new Gi({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(let s of e)n.add(s);return n}var C0=(e,t)=>{if(e.length===0)return(0,Rs.getDefaultHighWaterMark)(t);let r=e.filter(({readableObjectMode:n})=>n===t).map(({readableHighWaterMark:n})=>n);return Math.max(...r)},Gi=class extends Rs.PassThrough{#t=new Set([]);#r=new Set([]);#e=new Set([]);#n;#o=Symbol("unpipe");#s=new WeakMap;add(t){if(qi(t),this.#t.has(t))return;this.#t.add(t),this.#n??=A0(this,this.#t,this.#o);let r=D0({passThroughStream:this,stream:t,streams:this.#t,ended:this.#r,aborted:this.#e,onFinished:this.#n,unpipeEvent:this.#o});this.#s.set(t,r),t.pipe(this,{end:!1})}async remove(t){if(qi(t),!this.#t.has(t))return!1;let r=this.#s.get(t);return r===void 0?!1:(this.#s.delete(t),t.unpipe(this),await r,!0)}},A0=async(e,t,r)=>{Os(e,Np);let n=new AbortController;try{await Promise.race([I0(e,n),$0(e,t,r,n)])}finally{n.abort(),Os(e,-Np)}},I0=async(e,{signal:t})=>{try{await(0,Vi.finished)(e,{signal:t,cleanup:!0})}catch(r){throw Mp(e,r),r}},$0=async(e,t,r,{signal:n})=>{for await(let[s]of(0,zr.on)(e,"unpipe",{signal:n}))t.has(s)&&s.emit(r)},qi=e=>{if(typeof(e==null?void 0:e.pipe)!="function")throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},D0=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,onFinished:o,unpipeEvent:i})=>{Os(e,Pp);let a=new AbortController;try{await Promise.race([L0(o,t,a),N0({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,controller:a}),P0({stream:t,streams:r,ended:n,aborted:s,unpipeEvent:i,controller:a})])}finally{a.abort(),Os(e,-Pp)}r.size>0&&r.size===n.size+s.size&&(n.size===0&&s.size>0?zi(e):M0(e))},L0=async(e,t,{signal:r})=>{try{await e,r.aborted||zi(t)}catch(n){r.aborted||Mp(t,n)}},N0=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,controller:{signal:o}})=>{try{await(0,Vi.finished)(t,{signal:o,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(i){if(o.aborted||!r.has(t))return;Fp(i)?s.add(t):jp(e,i)}},P0=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:s,controller:{signal:o}})=>{if(await(0,zr.once)(e,s,{signal:o}),!e.readable)return(0,zr.once)(o,"abort",{signal:o});t.delete(e),r.delete(e),n.delete(e)},M0=e=>{e.writable&&e.end()},Mp=(e,t)=>{Fp(t)?zi(e):jp(e,t)},Fp=e=>(e==null?void 0:e.code)==="ERR_STREAM_PREMATURE_CLOSE",zi=e=>{(e.readable||e.writable)&&e.destroy()},jp=(e,t)=>{e.destroyed||(e.once("error",F0),e.destroy(t))},F0=()=>{},Os=(e,t)=>{let r=e.getMaxListeners();r!==0&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Np=2,Pp=1;var Wi=require("node:stream/promises");var ur=(e,t)=>{e.pipe(t),j0(e,t),B0(e,t)},j0=async(e,t)=>{if(!(De(e)||De(t))){try{await(0,Wi.finished)(e,{cleanup:!0,readable:!0,writable:!1})}catch{}Zi(t)}},Zi=e=>{e.writable&&e.end()},B0=async(e,t)=>{if(!(De(e)||De(t))){try{await(0,Wi.finished)(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Hi(e)}},Hi=e=>{e.readable&&e.destroy()};var Bp=(e,t,r)=>{let n=new Map;for(let[s,{stdioItems:o,direction:i}]of Object.entries(t)){for(let{stream:a}of o.filter(({type:c})=>_e.has(c)))U0(e,a,i,s);for(let{stream:a}of o.filter(({type:c})=>!_e.has(c)))q0({subprocess:e,stream:a,direction:i,fdNumber:s,pipeGroups:n,controller:r})}for(let[s,o]of n.entries()){let i=o.length===1?o[0]:_t(o);ur(i,s)}},U0=(e,t,r,n)=>{r==="output"?ur(e.stdio[n],t):ur(t,e.stdio[n]);let s=G0[n];s!==void 0&&(e[s]=t),e.stdio[n]=t},G0=["stdin","stdout","stderr"],q0=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:s,controller:o})=>{if(t===void 0)return;V0(t,o);let[i,a]=r==="output"?[t,e.stdio[n]]:[e.stdio[n],t],c=s.get(i)??[];s.set(i,[...c,a])},V0=(e,{signal:t})=>{De(e)&&wt(e,z0,t)},z0=2;var Gp=require("node:events");var Et=[];Et.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Et.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Et.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var ks=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",Yi=Symbol.for("signal-exit emitter"),Xi=globalThis,W0=Object.defineProperty.bind(Object),Ki=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Xi[Yi])return Xi[Yi];W0(Xi,Yi,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,r){this.listeners[t].push(r)}removeListener(t,r){let n=this.listeners[t],s=n.indexOf(r);s!==-1&&(s===0&&n.length===1?n.length=0:n.splice(s,1))}emit(t,r,n){if(this.emitted[t])return!1;this.emitted[t]=!0;let s=!1;for(let o of this.listeners[t])s=o(r,n)===!0||s;return t==="exit"&&(s=this.emit("afterExit",r,n)||s),s}},Cs=class{},Z0=e=>({onExit(t,r){return e.onExit(t,r)},load(){return e.load()},unload(){return e.unload()}}),Ji=class extends Cs{onExit(){return()=>{}}load(){}unload(){}},Qi=class extends Cs{#t=ea.platform==="win32"?"SIGINT":"SIGHUP";#r=new Ki;#e;#n;#o;#s={};#i=!1;constructor(t){super(),this.#e=t,this.#s={};for(let r of Et)this.#s[r]=()=>{let n=this.#e.listeners(r),{count:s}=this.#r,o=t;if(typeof o.__signal_exit_emitter__=="object"&&typeof o.__signal_exit_emitter__.count=="number"&&(s+=o.__signal_exit_emitter__.count),n.length===s){this.unload();let i=this.#r.emit("exit",null,r),a=r==="SIGHUP"?this.#t:r;i||t.kill(t.pid,a)}};this.#o=t.reallyExit,this.#n=t.emit}onExit(t,r){if(!ks(this.#e))return()=>{};this.#i===!1&&this.load();let n=r!=null&&r.alwaysLast?"afterExit":"exit";return this.#r.on(n,t),()=>{this.#r.removeListener(n,t),this.#r.listeners.exit.length===0&&this.#r.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#r.count+=1;for(let t of Et)try{let r=this.#s[t];r&&this.#e.on(t,r)}catch{}this.#e.emit=(t,...r)=>this.#c(t,...r),this.#e.reallyExit=t=>this.#a(t)}}unload(){this.#i&&(this.#i=!1,Et.forEach(t=>{let r=this.#s[t];if(!r)throw new Error("Listener not defined for signal: "+t);try{this.#e.removeListener(t,r)}catch{}}),this.#e.emit=this.#n,this.#e.reallyExit=this.#o,this.#r.count-=1)}#a(t){return ks(this.#e)?(this.#e.exitCode=t||0,this.#r.emit("exit",this.#e.exitCode,null),this.#o.call(this.#e,this.#e.exitCode)):0}#c(t,...r){let n=this.#n;if(t==="exit"&&ks(this.#e)){typeof r[0]=="number"&&(this.#e.exitCode=r[0]);let s=n.call(this.#e,t,...r);return this.#r.emit("exit",this.#e.exitCode,null),s}else return n.call(this.#e,t,...r)}},ea=globalThis.process,{onExit:Up,load:Dj,unload:Lj}=Z0(ks(ea)?new Qi(ea):new Ji);var qp=(e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;let s=Up(()=>{e.kill()});(0,Gp.addAbortListener)(n,()=>{s()})};var zp=({source:e,sourcePromise:t,boundOptions:r,createNested:n},...s)=>{let o=Nn(),{destination:i,destinationStream:a,destinationError:c,from:u,unpipeSignal:l}=H0(r,n,s),{sourceStream:f,sourceError:d}=X0(e,u),{options:p,fileDescriptors:b}=Ue.get(e);return{sourcePromise:t,sourceStream:f,sourceOptions:p,sourceError:d,destination:i,destinationStream:a,destinationError:c,unpipeSignal:l,fileDescriptors:b,startTime:o}},H0=(e,t,r)=>{try{let{destination:n,pipeOptions:{from:s,to:o,unpipeSignal:i}={}}=Y0(e,t,...r),a=zn(n,o);return{destination:n,destinationStream:a,from:s,unpipeSignal:i}}catch(n){return{destinationError:n}}},Y0=(e,t,r,...n)=>{if(Array.isArray(r))return{destination:t(Vp,e)(r,...n),pipeOptions:e};if(typeof r=="string"||r instanceof URL||Po(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');let[s,o,i]=_n(r,...n);return{destination:t(Vp)(s,o,i),pipeOptions:i}}if(Ue.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},Vp=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),X0=(e,t)=>{try{return{sourceStream:tr(e,t)}}catch(r){return{sourceError:r}}};var Zp=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:s,sourceOptions:o,startTime:i})=>{let a=K0({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(a!==void 0)throw ta({error:a,fileDescriptors:s,sourceOptions:o,startTime:i})},K0=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>{if(t!==void 0&&n!==void 0)return n;if(n!==void 0)return Hi(e),n;if(t!==void 0)return Zi(r),t},ta=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>sr({error:e,command:Wp,escapedCommand:Wp,fileDescriptors:t,options:r,startTime:n,isSync:!1}),Wp="source.pipe(destination)";var Hp=async e=>{let[{status:t,reason:r,value:n=r},{status:s,reason:o,value:i=o}]=await e;if(i.pipedFrom.includes(n)||i.pipedFrom.push(n),s==="rejected")throw i;if(t==="rejected")throw n;return i};var Yp=require("node:stream/promises");var Xp=(e,t,r)=>{let n=As.has(t)?Q0(e,t):J0(e,t);return wt(e,tT,r.signal),wt(t,rT,r.signal),eT(t),n},J0=(e,t)=>{let r=_t([e]);return ur(r,t),As.set(t,r),r},Q0=(e,t)=>{let r=As.get(t);return r.add(e),r},eT=async e=>{try{await(0,Yp.finished)(e,{cleanup:!0,readable:!1,writable:!0})}catch{}As.delete(e)},As=new WeakMap,tT=2,rT=1;var Kp=require("node:util");var Jp=(e,t)=>e===void 0?[]:[nT(e,t)],nT=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:s,startTime:o})=>{await(0,Kp.aborted)(e,t),await r.remove(t);let i=new Error("Pipe canceled by `unpipeSignal` option.");throw ta({error:i,fileDescriptors:n,sourceOptions:s,startTime:o})};var Is=(e,...t)=>{if(W(t[0]))return Is.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});let{destination:r,...n}=zp(e,...t),s=sT({...n,destination:r});return s.pipe=Is.bind(void 0,{...e,source:r,sourcePromise:s,boundOptions:{}}),s},sT=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:s,destinationStream:o,destinationError:i,unpipeSignal:a,fileDescriptors:c,startTime:u})=>{let l=oT(e,s);Zp({sourceStream:t,sourceError:n,destinationStream:o,destinationError:i,fileDescriptors:c,sourceOptions:r,startTime:u});let f=new AbortController;try{let d=Xp(t,o,f);return await Promise.race([Hp(l),...Jp(a,{sourceStream:t,mergedStream:d,sourceOptions:r,fileDescriptors:c,startTime:u})])}finally{f.abort()}},oT=(e,t)=>Promise.allSettled([e,t]);var nm=require("node:timers/promises");var em=require("node:events"),tm=require("node:stream");var $s=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:s,preserveNewlines:o})=>{let i=new AbortController;return iT(t,i),rm({stream:e,controller:i,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:s,shouldSplit:!e.readableObjectMode,preserveNewlines:o})},iT=async(e,t)=>{try{await e}catch{}finally{t.abort()}},ra=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:s,allMixed:o})=>{let i=new AbortController;aT(t,i,e);let a=e.readableObjectMode&&!o;return rm({stream:e,controller:i,binary:n==="buffer",shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!s})},aT=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},rm=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i})=>{let a=(0,em.on)(e,"data",{signal:t.signal,highWaterMark:Qp,highWatermark:Qp});return cT({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i})},na=(0,tm.getDefaultHighWaterMark)(!0),Qp=na,cT=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i}){let a=uT({binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i});try{for await(let[c]of e)yield*vt(c,a,0)}catch(c){if(!t.signal.aborted)throw c}finally{yield*Br(a)}},uT=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:s})=>[ws(e,r,!t),bs(e,s,!n,{})].filter(Boolean);var sm=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:s,maxBuffer:o,lines:i,allMixed:a,stripFinalNewline:c,verboseInfo:u,streamInfo:l})=>{let f=lT({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:u,streamInfo:l});if(!s){await Promise.all([fT(e),f]);return}let d=$i(c,r),p=ra({stream:e,onStreamEnd:t,lines:i,encoding:n,stripFinalNewline:d,allMixed:a}),[b]=await Promise.all([dT({stream:e,iterable:p,fdNumber:r,encoding:n,maxBuffer:o,lines:i}),f]);return b},lT=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:s,verboseInfo:o,streamInfo:{fileDescriptors:i}})=>{var c;if(!vs({stdioItems:(c=i[r])==null?void 0:c.stdioItems,encoding:n,verboseInfo:o,fdNumber:r}))return;let a=ra({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:s});await pp(a,e,r,o)},fT=async e=>{await(0,nm.setImmediate)(),e.readableFlowing===null&&e.resume()},dT=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:s,maxBuffer:o,lines:i})=>{try{return t||i?await as(r,{maxBuffer:o}):s==="buffer"?new Uint8Array(await cs(r,{maxBuffer:o})):await ls(r,{maxBuffer:o})}catch(a){return om(ld({error:a,stream:e,readableObjectMode:t,lines:i,encoding:s,fdNumber:n}))}},sa=async e=>{try{return await e}catch(t){return om(t)}},om=({bufferedData:e})=>eu(e)?new Uint8Array(e):e;var am=require("node:stream/promises"),Wr=async(e,t,r,{isSameDirection:n,stopOnExit:s=!1}={})=>{let o=pT(e,r),i=new AbortController;try{await Promise.race([...s?[r.exitPromise]:[],(0,am.finished)(e,{cleanup:!0,signal:i.signal})])}catch(a){o.stdinCleanedUp||gT(a,t,r,n)}finally{i.abort()}},pT=(e,{originalStreams:[t],subprocess:r})=>{let n={stdinCleanedUp:!1};return e===t&&mT(e,r,n),n},mT=(e,t,r)=>{let{_destroy:n}=e;e._destroy=(...s)=>{hT(t,r),n.call(e,...s)}},hT=({exitCode:e,signalCode:t},r)=>{(e!==null||t!==null)&&(r.stdinCleanedUp=!0)},gT=(e,t,r,n)=>{if(!yT(e,t,r,n))throw e},yT=(e,t,r,n=!0)=>r.propagating?im(e)||Ds(e):(r.propagating=!0,oa(r,t)===n?im(e):Ds(e)),oa=({fileDescriptors:e},t)=>t!=="all"&&e[t].direction==="input",Ds=e=>(e==null?void 0:e.code)==="ERR_STREAM_PREMATURE_CLOSE",im=e=>(e==null?void 0:e.code)==="EPIPE";var cm=({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:o,verboseInfo:i,streamInfo:a})=>e.stdio.map((c,u)=>ia({stream:c,fdNumber:u,encoding:t,buffer:r[u],maxBuffer:n[u],lines:s[u],allMixed:!1,stripFinalNewline:o,verboseInfo:i,streamInfo:a})),ia=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:s,lines:o,allMixed:i,stripFinalNewline:a,verboseInfo:c,streamInfo:u})=>{if(!e)return;let l=Wr(e,t,u);if(oa(u,t)){await l;return}let[f]=await Promise.all([sm({stream:e,onStreamEnd:l,fdNumber:t,encoding:r,buffer:n,maxBuffer:s,lines:o,allMixed:i,stripFinalNewline:a,verboseInfo:c,streamInfo:u}),l]);return f};var um=({stdout:e,stderr:t},{all:r})=>r&&(e||t)?_t([e,t].filter(Boolean)):void 0,lm=({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:o,verboseInfo:i,streamInfo:a})=>ia({...bT(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:s[1]||s[2],allMixed:wT(e),stripFinalNewline:o,verboseInfo:i,streamInfo:a}),bT=({stdout:e,stderr:t,all:r},[,n,s])=>{let o=n||s;return o?n?s?{stream:r,buffer:o}:{stream:e,buffer:o}:{stream:t,buffer:o}:{stream:r,buffer:o}},wT=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode;var hm=require("node:events");var fm=e=>Yt(e,"ipc"),dm=(e,t)=>{let r=Ln(e);je({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})};var pm=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:s,verboseInfo:o})=>{if(!n)return s;let i=fm(o),a=Ke(t,"ipc"),c=Ke(r,"ipc");for await(let u of Bi({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(fd(e,s,c),s.push(u)),i&&dm(u,o);return s},mm=async(e,t)=>(await Promise.allSettled([e]),t);var gm=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:s,timeoutDuration:o,cancelSignal:i,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:u,ipc:l,ipcInput:f},context:d,verboseInfo:p,fileDescriptors:b,originalStreams:T,onInternalError:N,controller:P})=>{let j=bp(e,d),Y={originalStreams:T,fileDescriptors:b,subprocess:e,exitPromise:j,propagating:!1},X=cm({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:u,verboseInfo:p,streamInfo:Y}),Se=lm({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:u,verboseInfo:p,streamInfo:Y}),ce=[],Ae=pm({subprocess:e,buffer:r,maxBuffer:n,ipc:l,ipcOutput:ce,verboseInfo:p}),Ie=ST(T,e,Y),xe=xT(b,Y);try{return await Promise.race([Promise.all([{},Sp(j),Promise.all(X),Se,Ae,Ff(e,f),...Ie,...xe]),N,vT(e,P),...Df(e,o,d,P),...zl({subprocess:e,cancelSignal:i,gracefulCancel:a,context:d,controller:P}),...Af({subprocess:e,cancelSignal:i,gracefulCancel:a,forceKillAfterDelay:c,context:d,controller:P})])}catch(kr){return d.terminationReason??="other",Promise.all([{error:kr},j,Promise.all(X.map(bt=>sa(bt))),sa(Se),mm(Ae,ce),Promise.allSettled(Ie),Promise.allSettled(xe)])}},ST=(e,t,r)=>e.map((n,s)=>n===t.stdio[s]?void 0:Wr(n,s,r)),xT=(e,t)=>e.flatMap(({stdioItems:r},n)=>r.filter(({value:s,stream:o=s})=>Pe(o,{checkOpen:!1})&&!De(o)).map(({type:s,value:o,stream:i=o})=>Wr(i,n,t,{isSameDirection:_e.has(s),stopOnExit:s==="native"}))),vT=async(e,{signal:t})=>{let[r]=await(0,hm.once)(e,"error",{signal:t});throw r};var ym=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),Zr=(e,t,r)=>{let n=e[r];n.has(t)||n.set(t,[]);let s=n.get(t),o=Be();return s.push(o),{resolve:o.resolve.bind(o),promises:s}},lr=async({resolve:e,promises:t},r)=>{e();let[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n};var wm=require("node:stream"),Sm=require("node:util");var aa=require("node:stream/promises");var ca=async e=>{if(e!==void 0)try{await ua(e)}catch{}},bm=async e=>{if(e!==void 0)try{await la(e)}catch{}},ua=async e=>{await(0,aa.finished)(e,{cleanup:!0,readable:!1,writable:!0})},la=async e=>{await(0,aa.finished)(e,{cleanup:!0,readable:!0,writable:!1})},Ls=async(e,t)=>{if(await e,t)throw t},Ns=(e,t,r)=>{r&&!Ds(r)?e.destroy(r):t&&e.destroy()};var xm=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:s=!0,preserveNewlines:o=!0}={})=>{let i=s||me.has(r),{subprocessStdout:a,waitReadableDestroy:c}=fa(e,n,t),{readableEncoding:u,readableObjectMode:l,readableHighWaterMark:f}=da(a,i),{read:d,onStdoutDataDone:p}=pa({subprocessStdout:a,subprocess:e,binary:i,encoding:r,preserveNewlines:o}),b=new wm.Readable({read:d,destroy:(0,Sm.callbackify)(ha.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:f,objectMode:l,encoding:u});return ma({subprocessStdout:a,onStdoutDataDone:p,readable:b,subprocess:e}),b},fa=(e,t,r)=>{let n=tr(e,t),s=Zr(r,n,"readableDestroy");return{subprocessStdout:n,waitReadableDestroy:s}},da=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:na},pa=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:s})=>{let o=Be(),i=$s({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:s});return{read(){_T(this,i,o)},onStdoutDataDone:o}},_T=async(e,t,r)=>{try{let{value:n,done:s}=await t.next();s?r.resolve():e.push(n)}catch{}},ma=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:s})=>{try{await la(e),await n,await ca(s),await t,r.readable&&r.push(null)}catch(o){await ca(s),vm(r,o)}},ha=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await lr(r,t)&&(vm(e,n),await Ls(t,n))},vm=(e,t)=>{Ns(e,e.readable,t)};var _m=require("node:stream"),ga=require("node:util");var Em=({subprocess:e,concurrentStreams:t},{to:r}={})=>{let{subprocessStdin:n,waitWritableFinal:s,waitWritableDestroy:o}=ya(e,r,t),i=new _m.Writable({...ba(n,e,s),destroy:(0,ga.callbackify)(Sa.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:s,waitWritableDestroy:o})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wa(n,i),i},ya=(e,t,r)=>{let n=zn(e,t),s=Zr(r,n,"writableFinal"),o=Zr(r,n,"writableDestroy");return{subprocessStdin:n,waitWritableFinal:s,waitWritableDestroy:o}},ba=(e,t,r)=>({write:ET.bind(void 0,e),final:(0,ga.callbackify)(TT.bind(void 0,e,t,r))}),ET=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},TT=async(e,t,r)=>{await lr(r,t)&&(e.writable&&e.end(),await t)},wa=async(e,t,r)=>{try{await ua(e),t.writable&&t.end()}catch(n){await bm(r),Tm(t,n)}},Sa=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},s)=>{await lr(r,t),await lr(n,t)&&(Tm(e,s),await Ls(t,s))},Tm=(e,t)=>{Ns(e,e.writable,t)};var Om=require("node:stream"),Rm=require("node:util");var km=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:s,binary:o=!0,preserveNewlines:i=!0}={})=>{let a=o||me.has(r),{subprocessStdout:c,waitReadableDestroy:u}=fa(e,n,t),{subprocessStdin:l,waitWritableFinal:f,waitWritableDestroy:d}=ya(e,s,t),{readableEncoding:p,readableObjectMode:b,readableHighWaterMark:T}=da(c,a),{read:N,onStdoutDataDone:P}=pa({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:i}),j=new Om.Duplex({read:N,...ba(l,e,f),destroy:(0,Rm.callbackify)(OT.bind(void 0,{subprocessStdout:c,subprocessStdin:l,subprocess:e,waitReadableDestroy:u,waitWritableFinal:f,waitWritableDestroy:d})),readableHighWaterMark:T,writableHighWaterMark:l.writableHighWaterMark,readableObjectMode:b,writableObjectMode:l.writableObjectMode,encoding:p});return ma({subprocessStdout:c,onStdoutDataDone:P,readable:j,subprocess:e,subprocessStdin:l}),wa(l,j,c),j},OT=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:s,waitWritableDestroy:o},i)=>{await Promise.all([ha({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},i),Sa({subprocessStdin:t,subprocess:r,waitWritableFinal:s,waitWritableDestroy:o},i)])};var xa=(e,t,{from:r,binary:n=!1,preserveNewlines:s=!1}={})=>{let o=n||me.has(t),i=tr(e,r),a=$s({subprocessStdout:i,subprocess:e,binary:o,shouldEncode:!0,encoding:t,preserveNewlines:s});return RT(a,i,e)},RT=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}};var Cm=(e,{encoding:t})=>{let r=ym();e.readable=xm.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=Em.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=km.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=xa.bind(void 0,e,t),e[Symbol.asyncIterator]=xa.bind(void 0,e,t,{})};var Am=(e,t)=>{for(let[r,n]of CT){let s=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:s})}},kT=(async()=>{})().constructor.prototype,CT=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(kT,e)]);var Dm=(e,t,r,n)=>{let{file:s,commandArguments:o,command:i,escapedCommand:a,startTime:c,verboseInfo:u,options:l,fileDescriptors:f}=AT(e,t,r),{subprocess:d,promise:p}=$T({file:s,commandArguments:o,options:l,startTime:c,verboseInfo:u,command:i,escapedCommand:a,fileDescriptors:f});return d.pipe=Is.bind(void 0,{source:d,sourcePromise:p,boundOptions:{},createNested:n}),Am(d,p),Ue.set(d,{options:l,fileDescriptors:f}),d},AT=(e,t,r)=>{let{command:n,escapedCommand:s,startTime:o,verboseInfo:i}=Pn(e,t,r),{file:a,commandArguments:c,options:u}=ns(e,t,r),l=IT(u),f=Lp(l,i);return{file:a,commandArguments:c,command:n,escapedCommand:s,startTime:o,verboseInfo:i,options:l,fileDescriptors:f}},IT=({timeout:e,signal:t,...r})=>{if(t!==void 0)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},$T=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:s,command:o,escapedCommand:i,fileDescriptors:a})=>{let c;try{c=(0,$m.spawn)(e,t,r)}catch(b){return Ip({error:b,command:o,escapedCommand:i,fileDescriptors:a,options:r,startTime:n,verboseInfo:s})}let u=new AbortController;(0,Im.setMaxListeners)(Number.POSITIVE_INFINITY,u.signal);let l=[...c.stdio];Bp(c,a,u),qp(c,r,u);let f={},d=Be();c.kill=Gl.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:d,context:f,controller:u}),c.all=um(c,r),Cm(c,r),Rp(c,r);let p=DT({subprocess:c,options:r,startTime:n,verboseInfo:s,fileDescriptors:a,originalStreams:l,command:o,escapedCommand:i,context:f,onInternalError:d,controller:u});return{subprocess:c,promise:p}},DT=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:s,originalStreams:o,command:i,escapedCommand:a,context:c,onInternalError:u,controller:l})=>{let[f,[d,p],b,T,N]=await gm({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:s,originalStreams:o,onInternalError:u,controller:l});l.abort(),u.resolve();let P=b.map((X,Se)=>Qe(X,t,Se)),j=Qe(T,t,"all"),Y=LT({errorInfo:f,exitCode:d,signal:p,stdio:P,all:j,ipcOutput:N,context:c,options:t,command:i,escapedCommand:a,startTime:r});return or(Y,n,t)},LT=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:s,ipcOutput:o,context:i,options:a,command:c,escapedCommand:u,startTime:l})=>"error"in e?jr({error:e.error,command:c,escapedCommand:u,timedOut:i.terminationReason==="timeout",isCanceled:i.terminationReason==="cancel"||i.terminationReason==="gracefulCancel",isGracefullyCanceled:i.terminationReason==="gracefulCancel",isMaxBuffer:e.error instanceof Ge,isForcefullyTerminated:i.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:s,ipcOutput:o,options:a,startTime:l,isSync:!1}):ds({command:c,escapedCommand:u,stdio:n,all:s,ipcOutput:o,options:a,startTime:l});var Ps=(e,t)=>{let r=Object.fromEntries(Object.entries(t).map(([n,s])=>[n,NT(n,e[n],s)]));return{...e,...r}},NT=(e,t,r)=>PT.has(e)&&W(t)&&W(r)?{...t,...r}:r,PT=new Set(["env",...Uo]);var dt=(e,t,r,n)=>{let s=(i,a,c)=>dt(i,a,r,c),o=(...i)=>MT({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:s},...i);return n!==void 0&&n(o,s,t),o},MT=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:s},o,...i)=>{if(W(o))return s(e,Ps(r,o),n);let{file:a,commandArguments:c,options:u,isSync:l}=FT({mapArguments:e,firstArgument:o,nextArguments:i,deepOptions:t,boundOptions:r});return l?_p(a,c,u):Dm(a,c,u,s)},FT=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:s})=>{let o=au(t)?cu(t,r):[t,...r],[i,a,c]=_n(...o),u=Ps(Ps(n,s),c),{file:l=i,commandArguments:f=a,options:d=u,isSync:p=!1}=e({file:i,commandArguments:a,options:u});return{file:l,commandArguments:f,options:d,isSync:p}};var Lm=({file:e,commandArguments:t})=>Pm(e,t),Nm=({file:e,commandArguments:t})=>({...Pm(e,t),isSync:!0}),Pm=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);let[r,...n]=jT(e);return{file:r,commandArguments:n}},jT=e=>{if(typeof e!="string")throw new TypeError(`The command must be a string: ${String(e)}.`);let t=e.trim();if(t==="")return[];let r=[];for(let n of t.split(BT)){let s=r.at(-1);s&&s.endsWith("\\")?r[r.length-1]=`${s.slice(0,-1)} ${n}`:r.push(n)}return r},BT=/ +/g;var Mm=(e,t,r)=>{e.sync=t(UT,r),e.s=e.sync},Fm=({options:e})=>jm(e),UT=({options:e})=>({...jm(e),isSync:!0}),jm=e=>({options:{...GT(e),...e}}),GT=({input:e,inputFile:t,stdio:r})=>e===void 0&&t===void 0&&r===void 0?{stdin:"inherit"}:{},Bm={preferLocal:!0};var Um=dt(()=>({})),oG=dt(()=>({isSync:!0})),iG=dt(Lm),aG=dt(Nm),cG=dt(Lf),uG=dt(Fm,{},Bm,Mm),{sendMessage:lG,getOneMessage:fG,getEachMessage:dG,getCancelSignal:pG}=kp();var Xw=require("fs"),Ao=require("path"),Io=q($g());var M;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{let o={};for(let i of s)o[i]=i;return o},e.getValidEnumValues=s=>{let o=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),i={};for(let a of o)i[a]=s[a];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let o=[];for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},e.find=(s,o)=>{for(let i of s)if(o(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}e.joinValues=n,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(M||(M={}));var Ua;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Ua||(Ua={}));var S=M.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),tt=e=>{switch(typeof e){case"undefined":return S.undefined;case"string":return S.string;case"number":return isNaN(e)?S.nan:S.number;case"boolean":return S.boolean;case"function":return S.function;case"bigint":return S.bigint;case"symbol":return S.symbol;case"object":return Array.isArray(e)?S.array:e===null?S.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?S.promise:typeof Map<"u"&&e instanceof Map?S.map:typeof Set<"u"&&e instanceof Set?S.set:typeof Date<"u"&&e instanceof Date?S.date:S.object;default:return S.unknown}},m=M.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Fk=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),he=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(o){return o.message},n={_errors:[]},s=o=>{for(let i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let a=n,c=0;for(;c<i.path.length;){let u=i.path[c];c===i.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(i))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return s(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,M.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(t(s))):n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};he.create=e=>new he(e);var hr=(e,t)=>{let r;switch(e.code){case m.invalid_type:e.received===S.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case m.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,M.jsonStringifyReplacer)}`;break;case m.unrecognized_keys:r=`Unrecognized key(s) in object: ${M.joinValues(e.keys,", ")}`;break;case m.invalid_union:r="Invalid input";break;case m.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${M.joinValues(e.options)}`;break;case m.invalid_enum_value:r=`Invalid enum value. Expected ${M.joinValues(e.options)}, received '${e.received}'`;break;case m.invalid_arguments:r="Invalid function arguments";break;case m.invalid_return_type:r="Invalid function return type";break;case m.invalid_date:r="Invalid date";break;case m.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:M.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case m.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case m.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case m.custom:r="Invalid input";break;case m.invalid_intersection_types:r="Intersection results could not be merged";break;case m.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case m.not_finite:r="Number must be finite";break;default:r=t.defaultError,M.assertNever(e)}return{message:r}},Pg=hr;function jk(e){Pg=e}function Hs(){return Pg}var Ys=e=>{let{data:t,path:r,errorMaps:n,issueData:s}=e,o=[...r,...s.path||[]],i={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let a="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)a=u(i,{data:t,defaultError:a}).message;return{...s,path:o,message:a}},Bk=[];function y(e,t){let r=Hs(),n=Ys({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===hr?void 0:hr].filter(s=>!!s)});e.common.issues.push(n)}var te=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let s of r){if(s.status==="aborted")return k;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let s of r){let o=await s.key,i=await s.value;n.push({key:o,value:i})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let s of r){let{key:o,value:i}=s;if(o.status==="aborted"||i.status==="aborted")return k;o.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(n[o.value]=i.value)}return{status:t.value,value:n}}},k=Object.freeze({status:"aborted"}),mr=e=>({status:"dirty",value:e}),ie=e=>({status:"valid",value:e}),Ga=e=>e.status==="aborted",qa=e=>e.status==="dirty",Ot=e=>e.status==="valid",nn=e=>typeof Promise<"u"&&e instanceof Promise;function Xs(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function Mg(e,t,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(e,r):s?s.value=r:t.set(e,r),r}var _;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(_||(_={}));var tn,rn,Re=class{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Dg=(e,t)=>{if(Ot(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new he(e.common.issues);return this._error=r,this._error}}};function $(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(i,a)=>{var c,u;let{message:l}=e;return i.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:(c=l??n)!==null&&c!==void 0?c:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(u=l??r)!==null&&u!==void 0?u:a.defaultError}},description:s}}var D=class{get description(){return this._def.description}_getType(t){return tt(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:tt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new te,ctx:{common:t.parent.common,data:t.data,parsedType:tt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(nn(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;let s={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:tt(t)},o=this._parseSync({data:t,path:s.path,parent:s});return Dg(s,o)}"~validate"(t){var r,n;let s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:tt(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:s});return Ot(o)?{value:o.value}:{issues:s.common.issues}}catch(o){!((n=(r=o==null?void 0:o.message)===null||r===void 0?void 0:r.toLowerCase())===null||n===void 0)&&n.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:s}).then(o=>Ot(o)?{value:o.value}:{issues:s.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:tt(t)},s=this._parse({data:t,path:n.path,parent:n}),o=await(nn(s)?s:Promise.resolve(s));return Dg(n,o)}refine(t,r){let n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,o)=>{let i=t(s),a=()=>o.addIssue({code:m.custom,...n(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new ge({schema:this,typeName:R.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Oe.create(this,this._def)}nullable(){return Ze.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return nt.create(this)}promise(){return ht.create(this,this._def)}or(t){return Dt.create([this,t],this._def)}and(t){return Lt.create(this,t,this._def)}transform(t){return new ge({...$(this._def),schema:this,typeName:R.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new jt({...$(this._def),innerType:this,defaultValue:r,typeName:R.ZodDefault})}brand(){return new sn({typeName:R.ZodBranded,type:this,...$(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new Bt({...$(this._def),innerType:this,catchValue:r,typeName:R.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return on.create(this,t)}readonly(){return Ut.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Uk=/^c[^\s-]{8,}$/i,Gk=/^[0-9a-z]+$/,qk=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Vk=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,zk=/^[a-z0-9_-]{21}$/i,Wk=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Zk=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Hk=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Yk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Ba,Xk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Kk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Jk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Qk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,eC=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,tC=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Fg="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",rC=new RegExp(`^${Fg}$`);function jg(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function nC(e){return new RegExp(`^${jg(e)}$`)}function Bg(e){let t=`${Fg}T${jg(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function sC(e,t){return!!((t==="v4"||!t)&&Xk.test(e)||(t==="v6"||!t)&&Jk.test(e))}function oC(e,t){if(!Wk.test(e))return!1;try{let[r]=e.split("."),n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||!s.typ||!s.alg||t&&s.alg!==t)}catch{return!1}}function iC(e,t){return!!((t==="v4"||!t)&&Kk.test(e)||(t==="v6"||!t)&&Qk.test(e))}var pt=class e extends D{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==S.string){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:S.string,received:o.parsedType}),k}let n=new te,s;for(let o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),y(s,{code:m.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),y(s,{code:m.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let i=t.data.length>o.value,a=t.data.length<o.value;(i||a)&&(s=this._getOrReturnCtx(t,s),i?y(s,{code:m.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&y(s,{code:m.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")Hk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"email",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")Ba||(Ba=new RegExp(Yk,"u")),Ba.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"emoji",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")Vk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"uuid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")zk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"nanoid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")Uk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"cuid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")Gk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"cuid2",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")qk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"ulid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),y(s,{validation:"url",code:m.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"regex",code:m.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?Bg(o).test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?rC.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?nC(o).test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?Zk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"duration",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?sC(t.data,o.version)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"ip",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?oC(t.data,o.alg)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"jwt",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?iC(t.data,o.version)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"cidr",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?eC.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"base64",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?tC.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"base64url",code:m.invalid_string,message:o.message}),n.dirty()):M.assertNever(o);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:m.invalid_string,..._.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",..._.errToObj(t)})}url(t){return this._addCheck({kind:"url",..._.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",..._.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",..._.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",..._.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",..._.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",..._.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",..._.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",..._.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",..._.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",..._.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",..._.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",..._.errToObj(t)})}datetime(t){var r,n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,local:(n=t==null?void 0:t.local)!==null&&n!==void 0?n:!1,..._.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,..._.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",..._.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,..._.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,..._.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,..._.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,..._.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,..._.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,..._.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,..._.errToObj(r)})}nonempty(t){return this.min(1,_.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};pt.create=e=>{var t;return new pt({checks:[],typeName:R.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$(e)})};function aC(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,o=parseInt(e.toFixed(s).replace(".","")),i=parseInt(t.toFixed(s).replace(".",""));return o%i/Math.pow(10,s)}var Rt=class e extends D{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==S.number){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:S.number,received:o.parsedType}),k}let n,s=new te;for(let o of this._def.checks)o.kind==="int"?M.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),y(n,{code:m.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?aC(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),y(n,{code:m.not_finite,message:o.message}),s.dirty()):M.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,_.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:_.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:_.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:_.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:_.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:_.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:_.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:_.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:_.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:_.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&M.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};Rt.create=e=>new Rt({checks:[],typeName:R.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...$(e)});var kt=class e extends D{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==S.bigint)return this._getInvalidInput(t);let n,s=new te;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):M.assertNever(o);return{status:s.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return y(r,{code:m.invalid_type,expected:S.bigint,received:r.parsedType}),k}gte(t,r){return this.setLimit("min",t,!0,_.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:_.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:_.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:_.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:_.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:_.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};kt.create=e=>{var t;return new kt({checks:[],typeName:R.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$(e)})};var Ct=class extends D{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==S.boolean){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:S.boolean,received:n.parsedType}),k}return ie(t.data)}};Ct.create=e=>new Ct({typeName:R.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$(e)});var At=class e extends D{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==S.date){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:S.date,received:o.parsedType}),k}if(isNaN(t.data.getTime())){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_date}),k}let n=new te,s;for(let o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),y(s,{code:m.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),y(s,{code:m.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):M.assertNever(o);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:_.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:_.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};At.create=e=>new At({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:R.ZodDate,...$(e)});var gr=class extends D{_parse(t){if(this._getType(t)!==S.symbol){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:S.symbol,received:n.parsedType}),k}return ie(t.data)}};gr.create=e=>new gr({typeName:R.ZodSymbol,...$(e)});var It=class extends D{_parse(t){if(this._getType(t)!==S.undefined){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:S.undefined,received:n.parsedType}),k}return ie(t.data)}};It.create=e=>new It({typeName:R.ZodUndefined,...$(e)});var $t=class extends D{_parse(t){if(this._getType(t)!==S.null){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:S.null,received:n.parsedType}),k}return ie(t.data)}};$t.create=e=>new $t({typeName:R.ZodNull,...$(e)});var mt=class extends D{constructor(){super(...arguments),this._any=!0}_parse(t){return ie(t.data)}};mt.create=e=>new mt({typeName:R.ZodAny,...$(e)});var rt=class extends D{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ie(t.data)}};rt.create=e=>new rt({typeName:R.ZodUnknown,...$(e)});var Me=class extends D{_parse(t){let r=this._getOrReturnCtx(t);return y(r,{code:m.invalid_type,expected:S.never,received:r.parsedType}),k}};Me.create=e=>new Me({typeName:R.ZodNever,...$(e)});var yr=class extends D{_parse(t){if(this._getType(t)!==S.undefined){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:S.void,received:n.parsedType}),k}return ie(t.data)}};yr.create=e=>new yr({typeName:R.ZodVoid,...$(e)});var nt=class e extends D{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==S.array)return y(r,{code:m.invalid_type,expected:S.array,received:r.parsedType}),k;if(s.exactLength!==null){let i=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(i||a)&&(y(r,{code:i?m.too_big:m.too_small,minimum:a?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(y(r,{code:m.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(y(r,{code:m.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,a)=>s.type._parseAsync(new Re(r,i,r.path,a)))).then(i=>te.mergeArray(n,i));let o=[...r.data].map((i,a)=>s.type._parseSync(new Re(r,i,r.path,a)));return te.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:_.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:_.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:_.toString(r)}})}nonempty(t){return this.min(1,t)}};nt.create=(e,t)=>new nt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:R.ZodArray,...$(t)});function pr(e){if(e instanceof le){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Oe.create(pr(n))}return new le({...e._def,shape:()=>t})}else return e instanceof nt?new nt({...e._def,type:pr(e.element)}):e instanceof Oe?Oe.create(pr(e.unwrap())):e instanceof Ze?Ze.create(pr(e.unwrap())):e instanceof We?We.create(e.items.map(t=>pr(t))):e}var le=class e extends D{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=M.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==S.object){let u=this._getOrReturnCtx(t);return y(u,{code:m.invalid_type,expected:S.object,received:u.parsedType}),k}let{status:n,ctx:s}=this._processInputParams(t),{shape:o,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Me&&this._def.unknownKeys==="strip"))for(let u in s.data)i.includes(u)||a.push(u);let c=[];for(let u of i){let l=o[u],f=s.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Re(s,f,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Me){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of a)c.push({key:{status:"valid",value:l},value:{status:"valid",value:s.data[l]}});else if(u==="strict")a.length>0&&(y(s,{code:m.unrecognized_keys,keys:a}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let l of a){let f=s.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Re(s,f,s.path,l)),alwaysSet:l in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let f=await l.key,d=await l.value;u.push({key:f,value:d,alwaysSet:l.alwaysSet})}return u}).then(u=>te.mergeObjectSync(n,u)):te.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return _.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var s,o,i,a;let c=(i=(o=(s=this._def).errorMap)===null||o===void 0?void 0:o.call(s,r,n).message)!==null&&i!==void 0?i:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=_.errToObj(t).message)!==null&&a!==void 0?a:c}:{message:c}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:R.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};return M.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new e({...this._def,shape:()=>r})}omit(t){let r={};return M.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new e({...this._def,shape:()=>r})}deepPartial(){return pr(this)}partial(t){let r={};return M.objectKeys(this.shape).forEach(n=>{let s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}),new e({...this._def,shape:()=>r})}required(t){let r={};return M.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof Oe;)o=o._def.innerType;r[n]=o}}),new e({...this._def,shape:()=>r})}keyof(){return Ug(M.objectKeys(this.shape))}};le.create=(e,t)=>new le({shape:()=>e,unknownKeys:"strip",catchall:Me.create(),typeName:R.ZodObject,...$(t)});le.strictCreate=(e,t)=>new le({shape:()=>e,unknownKeys:"strict",catchall:Me.create(),typeName:R.ZodObject,...$(t)});le.lazycreate=(e,t)=>new le({shape:e,unknownKeys:"strip",catchall:Me.create(),typeName:R.ZodObject,...$(t)});var Dt=class extends D{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function s(o){for(let a of o)if(a.result.status==="valid")return a.result;for(let a of o)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let i=o.map(a=>new he(a.ctx.common.issues));return y(r,{code:m.invalid_union,unionErrors:i}),k}if(r.common.async)return Promise.all(n.map(async o=>{let i={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(s);{let o,i=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},l=c._parseSync({data:r.data,path:r.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!o&&(o={result:l,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let a=i.map(c=>new he(c));return y(r,{code:m.invalid_union,unionErrors:a}),k}}get options(){return this._def.options}};Dt.create=(e,t)=>new Dt({options:e,typeName:R.ZodUnion,...$(t)});var et=e=>e instanceof Nt?et(e.schema):e instanceof ge?et(e.innerType()):e instanceof Pt?[e.value]:e instanceof Mt?e.options:e instanceof Ft?M.objectValues(e.enum):e instanceof jt?et(e._def.innerType):e instanceof It?[void 0]:e instanceof $t?[null]:e instanceof Oe?[void 0,...et(e.unwrap())]:e instanceof Ze?[null,...et(e.unwrap())]:e instanceof sn||e instanceof Ut?et(e.unwrap()):e instanceof Bt?et(e._def.innerType):[],Ks=class e extends D{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==S.object)return y(r,{code:m.invalid_type,expected:S.object,received:r.parsedType}),k;let n=this.discriminator,s=r.data[n],o=this.optionsMap.get(s);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(y(r,{code:m.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),k)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let s=new Map;for(let o of r){let i=et(o.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of i){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,o)}}return new e({typeName:R.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...$(n)})}};function Va(e,t){let r=tt(e),n=tt(t);if(e===t)return{valid:!0,data:e};if(r===S.object&&n===S.object){let s=M.objectKeys(t),o=M.objectKeys(e).filter(a=>s.indexOf(a)!==-1),i={...e,...t};for(let a of o){let c=Va(e[a],t[a]);if(!c.valid)return{valid:!1};i[a]=c.data}return{valid:!0,data:i}}else if(r===S.array&&n===S.array){if(e.length!==t.length)return{valid:!1};let s=[];for(let o=0;o<e.length;o++){let i=e[o],a=t[o],c=Va(i,a);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===S.date&&n===S.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Lt=class extends D{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=(o,i)=>{if(Ga(o)||Ga(i))return k;let a=Va(o.value,i.value);return a.valid?((qa(o)||qa(i))&&r.dirty(),{status:r.value,value:a.data}):(y(n,{code:m.invalid_intersection_types}),k)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,i])=>s(o,i)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Lt.create=(e,t,r)=>new Lt({left:e,right:t,typeName:R.ZodIntersection,...$(r)});var We=class e extends D{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==S.array)return y(n,{code:m.invalid_type,expected:S.array,received:n.parsedType}),k;if(n.data.length<this._def.items.length)return y(n,{code:m.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),k;!this._def.rest&&n.data.length>this._def.items.length&&(y(n,{code:m.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...n.data].map((i,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new Re(n,i,n.path,a)):null}).filter(i=>!!i);return n.common.async?Promise.all(o).then(i=>te.mergeArray(r,i)):te.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};We.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new We({items:e,typeName:R.ZodTuple,rest:null,...$(t)})};var Js=class e extends D{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==S.object)return y(n,{code:m.invalid_type,expected:S.object,received:n.parsedType}),k;let s=[],o=this._def.keyType,i=this._def.valueType;for(let a in n.data)s.push({key:o._parse(new Re(n,a,n.path,a)),value:i._parse(new Re(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?te.mergeObjectAsync(r,s):te.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof D?new e({keyType:t,valueType:r,typeName:R.ZodRecord,...$(n)}):new e({keyType:pt.create(),valueType:t,typeName:R.ZodRecord,...$(r)})}},br=class extends D{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==S.map)return y(n,{code:m.invalid_type,expected:S.map,received:n.parsedType}),k;let s=this._def.keyType,o=this._def.valueType,i=[...n.data.entries()].map(([a,c],u)=>({key:s._parse(new Re(n,a,n.path,[u,"key"])),value:o._parse(new Re(n,c,n.path,[u,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of i){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return k;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let c of i){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return k;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}}}};br.create=(e,t,r)=>new br({valueType:t,keyType:e,typeName:R.ZodMap,...$(r)});var wr=class e extends D{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==S.set)return y(n,{code:m.invalid_type,expected:S.set,received:n.parsedType}),k;let s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(y(n,{code:m.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(y(n,{code:m.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let o=this._def.valueType;function i(c){let u=new Set;for(let l of c){if(l.status==="aborted")return k;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let a=[...n.data.values()].map((c,u)=>o._parse(new Re(n,c,n.path,u)));return n.common.async?Promise.all(a).then(c=>i(c)):i(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:_.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:_.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};wr.create=(e,t)=>new wr({valueType:e,minSize:null,maxSize:null,typeName:R.ZodSet,...$(t)});var Qs=class e extends D{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==S.function)return y(r,{code:m.invalid_type,expected:S.function,received:r.parsedType}),k;function n(a,c){return Ys({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Hs(),hr].filter(u=>!!u),issueData:{code:m.invalid_arguments,argumentsError:c}})}function s(a,c){return Ys({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Hs(),hr].filter(u=>!!u),issueData:{code:m.invalid_return_type,returnTypeError:c}})}let o={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof ht){let a=this;return ie(async function(...c){let u=new he([]),l=await a._def.args.parseAsync(c,o).catch(p=>{throw u.addIssue(n(c,p)),u}),f=await Reflect.apply(i,this,l);return await a._def.returns._def.type.parseAsync(f,o).catch(p=>{throw u.addIssue(s(f,p)),u})})}else{let a=this;return ie(function(...c){let u=a._def.args.safeParse(c,o);if(!u.success)throw new he([n(c,u.error)]);let l=Reflect.apply(i,this,u.data),f=a._def.returns.safeParse(l,o);if(!f.success)throw new he([s(l,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:We.create(t).rest(rt.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||We.create([]).rest(rt.create()),returns:r||rt.create(),typeName:R.ZodFunction,...$(n)})}},Nt=class extends D{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Nt.create=(e,t)=>new Nt({getter:e,typeName:R.ZodLazy,...$(t)});var Pt=class extends D{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return y(r,{received:r.data,code:m.invalid_literal,expected:this._def.value}),k}return{status:"valid",value:t.data}}get value(){return this._def.value}};Pt.create=(e,t)=>new Pt({value:e,typeName:R.ZodLiteral,...$(t)});function Ug(e,t){return new Mt({values:e,typeName:R.ZodEnum,...$(t)})}var Mt=class e extends D{constructor(){super(...arguments),tn.set(this,void 0)}_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return y(r,{expected:M.joinValues(n),received:r.parsedType,code:m.invalid_type}),k}if(Xs(this,tn,"f")||Mg(this,tn,new Set(this._def.values),"f"),!Xs(this,tn,"f").has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return y(r,{received:r.data,code:m.invalid_enum_value,options:n}),k}return ie(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};tn=new WeakMap;Mt.create=Ug;var Ft=class extends D{constructor(){super(...arguments),rn.set(this,void 0)}_parse(t){let r=M.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==S.string&&n.parsedType!==S.number){let s=M.objectValues(r);return y(n,{expected:M.joinValues(s),received:n.parsedType,code:m.invalid_type}),k}if(Xs(this,rn,"f")||Mg(this,rn,new Set(M.getValidEnumValues(this._def.values)),"f"),!Xs(this,rn,"f").has(t.data)){let s=M.objectValues(r);return y(n,{received:n.data,code:m.invalid_enum_value,options:s}),k}return ie(t.data)}get enum(){return this._def.values}};rn=new WeakMap;Ft.create=(e,t)=>new Ft({values:e,typeName:R.ZodNativeEnum,...$(t)});var ht=class extends D{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==S.promise&&r.common.async===!1)return y(r,{code:m.invalid_type,expected:S.promise,received:r.parsedType}),k;let n=r.parsedType===S.promise?r.data:Promise.resolve(r.data);return ie(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};ht.create=(e,t)=>new ht({type:e,typeName:R.ZodPromise,...$(t)});var ge=class extends D{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===R.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:i=>{y(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){let i=s.transform(n.data,o);if(n.common.async)return Promise.resolve(i).then(async a=>{if(r.value==="aborted")return k;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?k:c.status==="dirty"||r.value==="dirty"?mr(c.value):c});{if(r.value==="aborted")return k;let a=this._def.schema._parseSync({data:i,path:n.path,parent:n});return a.status==="aborted"?k:a.status==="dirty"||r.value==="dirty"?mr(a.value):a}}if(s.type==="refinement"){let i=a=>{let c=s.refinement(a,o);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?k:(a.status==="dirty"&&r.dirty(),i(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?k:(a.status==="dirty"&&r.dirty(),i(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){let i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Ot(i))return i;let a=s.transform(i.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>Ot(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:r.value,value:a})):i);M.assertNever(s)}};ge.create=(e,t,r)=>new ge({schema:e,typeName:R.ZodEffects,effect:t,...$(r)});ge.createWithPreprocess=(e,t,r)=>new ge({schema:t,effect:{type:"preprocess",transform:e},typeName:R.ZodEffects,...$(r)});var Oe=class extends D{_parse(t){return this._getType(t)===S.undefined?ie(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Oe.create=(e,t)=>new Oe({innerType:e,typeName:R.ZodOptional,...$(t)});var Ze=class extends D{_parse(t){return this._getType(t)===S.null?ie(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ze.create=(e,t)=>new Ze({innerType:e,typeName:R.ZodNullable,...$(t)});var jt=class extends D{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===S.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};jt.create=(e,t)=>new jt({innerType:e,typeName:R.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$(t)});var Bt=class extends D{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return nn(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new he(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new he(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Bt.create=(e,t)=>new Bt({innerType:e,typeName:R.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$(t)});var Sr=class extends D{_parse(t){if(this._getType(t)!==S.nan){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:S.nan,received:n.parsedType}),k}return{status:"valid",value:t.data}}};Sr.create=e=>new Sr({typeName:R.ZodNaN,...$(e)});var cC=Symbol("zod_brand"),sn=class extends D{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},on=class e extends D{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?k:o.status==="dirty"?(r.dirty(),mr(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?k:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:R.ZodPipeline})}},Ut=class extends D{_parse(t){let r=this._def.innerType._parse(t),n=s=>(Ot(s)&&(s.value=Object.freeze(s.value)),s);return nn(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}};Ut.create=(e,t)=>new Ut({innerType:e,typeName:R.ZodReadonly,...$(t)});function Lg(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function Gg(e,t={},r){return e?mt.create().superRefine((n,s)=>{var o,i;let a=e(n);if(a instanceof Promise)return a.then(c=>{var u,l;if(!c){let f=Lg(t,n),d=(l=(u=f.fatal)!==null&&u!==void 0?u:r)!==null&&l!==void 0?l:!0;s.addIssue({code:"custom",...f,fatal:d})}});if(!a){let c=Lg(t,n),u=(i=(o=c.fatal)!==null&&o!==void 0?o:r)!==null&&i!==void 0?i:!0;s.addIssue({code:"custom",...c,fatal:u})}}):mt.create()}var uC={object:le.lazycreate},R;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(R||(R={}));var lC=(e,t={message:`Input not instance of ${e.name}`})=>Gg(r=>r instanceof e,t),qg=pt.create,Vg=Rt.create,fC=Sr.create,dC=kt.create,zg=Ct.create,pC=At.create,mC=gr.create,hC=It.create,gC=$t.create,yC=mt.create,bC=rt.create,wC=Me.create,SC=yr.create,xC=nt.create,vC=le.create,_C=le.strictCreate,EC=Dt.create,TC=Ks.create,OC=Lt.create,RC=We.create,kC=Js.create,CC=br.create,AC=wr.create,IC=Qs.create,$C=Nt.create,DC=Pt.create,LC=Mt.create,NC=Ft.create,PC=ht.create,Ng=ge.create,MC=Oe.create,FC=Ze.create,jC=ge.createWithPreprocess,BC=on.create,UC=()=>qg().optional(),GC=()=>Vg().optional(),qC=()=>zg().optional(),VC={string:e=>pt.create({...e,coerce:!0}),number:e=>Rt.create({...e,coerce:!0}),boolean:e=>Ct.create({...e,coerce:!0}),bigint:e=>kt.create({...e,coerce:!0}),date:e=>At.create({...e,coerce:!0})},zC=k,st=Object.freeze({__proto__:null,defaultErrorMap:hr,setErrorMap:jk,getErrorMap:Hs,makeIssue:Ys,EMPTY_PATH:Bk,addIssueToContext:y,ParseStatus:te,INVALID:k,DIRTY:mr,OK:ie,isAborted:Ga,isDirty:qa,isValid:Ot,isAsync:nn,get util(){return M},get objectUtil(){return Ua},ZodParsedType:S,getParsedType:tt,ZodType:D,datetimeRegex:Bg,ZodString:pt,ZodNumber:Rt,ZodBigInt:kt,ZodBoolean:Ct,ZodDate:At,ZodSymbol:gr,ZodUndefined:It,ZodNull:$t,ZodAny:mt,ZodUnknown:rt,ZodNever:Me,ZodVoid:yr,ZodArray:nt,ZodObject:le,ZodUnion:Dt,ZodDiscriminatedUnion:Ks,ZodIntersection:Lt,ZodTuple:We,ZodRecord:Js,ZodMap:br,ZodSet:wr,ZodFunction:Qs,ZodLazy:Nt,ZodLiteral:Pt,ZodEnum:Mt,ZodNativeEnum:Ft,ZodPromise:ht,ZodEffects:ge,ZodTransformer:ge,ZodOptional:Oe,ZodNullable:Ze,ZodDefault:jt,ZodCatch:Bt,ZodNaN:Sr,BRAND:cC,ZodBranded:sn,ZodPipeline:on,ZodReadonly:Ut,custom:Gg,Schema:D,ZodSchema:D,late:uC,get ZodFirstPartyTypeKind(){return R},coerce:VC,any:yC,array:xC,bigint:dC,boolean:zg,date:pC,discriminatedUnion:TC,effect:Ng,enum:LC,function:IC,instanceof:lC,intersection:OC,lazy:$C,literal:DC,map:CC,nan:fC,nativeEnum:NC,never:wC,null:gC,nullable:FC,number:Vg,object:vC,oboolean:qC,onumber:GC,optional:MC,ostring:UC,pipeline:BC,preprocess:jC,promise:PC,record:kC,set:AC,strictObject:_C,string:qg,symbol:mC,transformer:Ng,tuple:RC,undefined:hC,union:EC,unknown:bC,void:SC,NEVER:zC,ZodIssueCode:m,quotelessJson:Fk,ZodError:he});var Wg=st.object({list:st.boolean().optional(),log:st.boolean().optional(),track:st.boolean().optional(),parser:st.enum(["babel","babylon","flow","ts","tsx"]).optional(),extensions:st.string().optional(),ignoreConfig:st.string().optional(),match:st.any().optional()});var wo=q(oy(),1),ho=q(Ha(),1),Ib=require("child_process"),mw=q(Xa(),1),Tr=q(Xa(),1),Bw=require("node:events"),yo=Object.defineProperty,vA=Object.defineProperties,_A=Object.getOwnPropertyDescriptor,EA=Object.getOwnPropertyDescriptors,gc=Object.getOwnPropertyNames,iy=Object.getOwnPropertySymbols,jy=Object.prototype.hasOwnProperty,TA=Object.prototype.propertyIsEnumerable,ay=(e,t,r)=>t in e?yo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ce=(e,t)=>{for(var r in t||(t={}))jy.call(t,r)&&ay(e,r,t[r]);if(iy)for(var r of iy(t))TA.call(t,r)&&ay(e,r,t[r]);return e},un=(e,t)=>vA(e,EA(t)),g=(e,t)=>function(){return e&&(t=(0,e[gc(e)[0]])(e=0)),t},OA=(e,t)=>function(){return t||(0,e[gc(e)[0]])((t={exports:{}}).exports,t),t.exports},H=(e,t)=>{for(var r in t)yo(e,r,{get:t[r],enumerable:!0})},RA=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of gc(t))!jy.call(e,s)&&s!==r&&yo(e,s,{get:()=>t[s],enumerable:!(n=_A(t,s))||n.enumerable});return e},V=e=>RA(yo({},"__esModule",{value:!0}),e),cn=(e,t,r)=>new Promise((n,s)=>{var o=c=>{try{a(r.next(c))}catch(u){s(u)}},i=c=>{try{a(r.throw(c))}catch(u){s(u)}},a=c=>c.done?n(c.value):Promise.resolve(c.value).then(o,i);a((r=r.apply(e,t)).next())});function kA(...e){let t=new String(e);return bo.set(t,e),t}function po(e){return e instanceof String&&bo.has(e)}function cy(e){return bo.get(e)||[]}var bo,pn=g({"src/lib/args/pathspec.ts"(){"use strict";bo=new WeakMap}}),it,yt=g({"src/lib/errors/git-error.ts"(){"use strict";it=class extends Error{constructor(e,t){super(t),this.task=e,Object.setPrototypeOf(this,new.target.prototype)}}}}),mn,Rr=g({"src/lib/errors/git-response-error.ts"(){"use strict";yt(),mn=class extends it{constructor(e,t){super(void 0,t||String(e)),this.git=e}}}}),By,Uy=g({"src/lib/errors/task-configuration-error.ts"(){"use strict";yt(),By=class extends it{constructor(e){super(void 0,e)}}}});function Gy(e){return typeof e=="function"?e:Wt}function qy(e){return typeof e=="function"&&e!==Wt}function Vy(e,t){let r=e.indexOf(t);return r<=0?[e,""]:[e.substr(0,r),e.substr(r+1)]}function zy(e,t=0){return Wy(e)&&e.length>t?e[t]:void 0}function zt(e,t=0){if(Wy(e)&&e.length>t)return e[e.length-1-t]}function Wy(e){return!!(e&&typeof e.length=="number")}function hn(e="",t=!0,r=`
56
- `){return e.split(r).reduce((n,s)=>{let o=t?s.trim():s;return o&&n.push(o),n},[])}function yc(e,t){return hn(e,!0).map(r=>t(r))}function bc(e){return(0,wo.exists)(e,wo.FOLDER)}function F(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function Zy(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function So(e,t){if(Array.isArray(e)){let r=e.indexOf(t);r>=0&&e.splice(r,1)}else e.delete(t);return t}function He(e){return Array.isArray(e)?e:[e]}function Hy(e){return e.replace(/[\s-]+(.)/g,(t,r)=>r.toUpperCase())}function Yy(e){return He(e).map(String)}function U(e,t=0){if(e==null)return t;let r=parseInt(e,10);return isNaN(r)?t:r}function ln(e,t){let r=[];for(let n=0,s=e.length;n<s;n++)r.push(t,e[n]);return r}function fn(e){return(Array.isArray(e)?Buffer.concat(e):e).toString("utf-8")}function Xy(e,t){return Object.assign({},...t.map(r=>r in e?{[r]:e[r]}:{}))}function nc(e=0){return new Promise(t=>setTimeout(t,e))}function sc(e){if(e!==!1)return e}var Or,Wt,gn,xo=g({"src/lib/utils/util.ts"(){"use strict";Or="\0",Wt=()=>{},gn=Object.prototype.toString.call.bind(Object.prototype.toString)}});function Ye(e,t,r){return t(e)?e:arguments.length>2?r:void 0}function wc(e,t){let r=po(e)?"string":typeof e;return/number|string|boolean/.test(r)&&(!t||!t.includes(r))}function Sc(e){return!!e&&gn(e)==="[object Object]"}function Ky(e){return typeof e=="function"}var yn,re,Jy,mo,xc,Qy=g({"src/lib/utils/argument-filters.ts"(){"use strict";xo(),pn(),yn=e=>Array.isArray(e),re=e=>typeof e=="string",Jy=e=>Array.isArray(e)&&e.every(re),mo=e=>re(e)||Array.isArray(e)&&e.every(re),xc=e=>e==null||"number|boolean|function".includes(typeof e)?!1:Array.isArray(e)||typeof e=="string"||typeof e.length=="number"}}),oc,CA=g({"src/lib/utils/exit-codes.ts"(){"use strict";oc=(e=>(e[e.SUCCESS=0]="SUCCESS",e[e.ERROR=1]="ERROR",e[e.NOT_FOUND=-2]="NOT_FOUND",e[e.UNCLEAN=128]="UNCLEAN",e))(oc||{})}}),dn,AA=g({"src/lib/utils/git-output-streams.ts"(){"use strict";dn=class{constructor(e,t){this.stdOut=e,this.stdErr=t}asStrings(){return new dn(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}}),I,gt,IA=g({"src/lib/utils/line-parser.ts"(){"use strict";I=class{constructor(e,t){this.matches=[],this.parse=(r,n)=>(this.resetMatches(),this._regExp.every((s,o)=>this.addMatch(s,o,r(o)))?this.useMatches(n,this.prepareMatches())!==!1:!1),this._regExp=Array.isArray(e)?e:[e],t&&(this.useMatches=t)}useMatches(e,t){throw new Error("LineParser:useMatches not implemented")}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(e,t,r){let n=r&&e.exec(r);return n&&this.pushMatch(t,n),!!n}pushMatch(e,t){this.matches.push(...t.slice(1))}},gt=class extends I{addMatch(e,t,r){return/^remote:\s/.test(String(r))&&super.addMatch(e,t,r)}pushMatch(e,t){(e>0||t.length>1)&&super.pushMatch(e,t)}}}});function eb(...e){let t=process.cwd(),r=Object.assign(Ce({baseDir:t},tb),...e.filter(n=>typeof n=="object"&&n));return r.baseDir=r.baseDir||t,r.trimmed=r.trimmed===!0,r}var tb,$A=g({"src/lib/utils/simple-git-options.ts"(){"use strict";tb={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function vc(e,t=[]){return Sc(e)?Object.keys(e).reduce((r,n)=>{let s=e[n];return po(s)?r.push(s):wc(s,["boolean"])?r.push(n+"="+s):r.push(n),r},t):t}function fe(e,t=0,r=!1){let n=[];for(let s=0,o=t<0?e.length:t;s<o;s++)"string|number".includes(typeof e[s])&&n.push(String(e[s]));return vc(_c(e),n),r||n.push(...DA(e)),n}function DA(e){let t=typeof zt(e)=="function";return Ye(zt(e,t?1:0),yn,[])}function _c(e){let t=Ky(zt(e));return Ye(zt(e,t?1:0),Sc)}function z(e,t=!0){let r=Gy(zt(e));return t||qy(r)?r:void 0}var LA=g({"src/lib/utils/task-options.ts"(){"use strict";Qy(),xo(),pn()}});function ic(e,t){return e(t.stdOut,t.stdErr)}function pe(e,t,r,n=!0){return He(r).forEach(s=>{for(let o=hn(s,n),i=0,a=o.length;i<a;i++){let c=(u=0)=>{if(!(i+u>=a))return o[i+u]};t.some(({parse:u})=>u(c,e))}}),e}var NA=g({"src/lib/utils/task-parser.ts"(){"use strict";xo()}}),rb={};H(rb,{ExitCodes:()=>oc,GitOutputStreams:()=>dn,LineParser:()=>I,NOOP:()=>Wt,NULL:()=>Or,RemoteLineParser:()=>gt,append:()=>F,appendTaskOptions:()=>vc,asArray:()=>He,asCamelCase:()=>Hy,asFunction:()=>Gy,asNumber:()=>U,asStringArray:()=>Yy,bufferToString:()=>fn,callTaskParser:()=>ic,createInstanceConfig:()=>eb,delay:()=>nc,filterArray:()=>yn,filterFunction:()=>Ky,filterHasLength:()=>xc,filterPlainObject:()=>Sc,filterPrimitives:()=>wc,filterString:()=>re,filterStringArray:()=>Jy,filterStringOrStringArray:()=>mo,filterType:()=>Ye,first:()=>zy,folderExists:()=>bc,forEachLineWithContent:()=>yc,getTrailingOptions:()=>fe,including:()=>Zy,isUserFunction:()=>qy,last:()=>zt,objectToString:()=>gn,orVoid:()=>sc,parseStringResponse:()=>pe,pick:()=>Xy,prefixedArray:()=>ln,remove:()=>So,splitOn:()=>Vy,toLinesWithContent:()=>hn,trailingFunctionArgument:()=>z,trailingOptionsArgument:()=>_c});var C=g({"src/lib/utils/index.ts"(){"use strict";Qy(),CA(),AA(),IA(),$A(),LA(),NA(),xo()}}),nb={};H(nb,{CheckRepoActions:()=>ac,checkIsBareRepoTask:()=>ob,checkIsRepoRootTask:()=>sb,checkIsRepoTask:()=>PA});function PA(e){switch(e){case"bare":return ob();case"root":return sb()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:vo,parser:Ec}}function sb(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:vo,parser(t){return/^\.(git)?$/.test(t.trim())}}}function ob(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:vo,parser:Ec}}function MA(e){return/(Not a git repository|Kein Git-Repository)/i.test(String(e))}var ac,vo,Ec,ib=g({"src/lib/tasks/check-is-repo.ts"(){"use strict";C(),ac=(e=>(e.BARE="bare",e.IN_TREE="tree",e.IS_REPO_ROOT="root",e))(ac||{}),vo=({exitCode:e},t,r,n)=>{if(e===128&&MA(t))return r(Buffer.from("false"));n(t)},Ec=e=>e.trim()==="true"}});function FA(e,t){let r=new ab(e),n=e?ub:cb;return hn(t).forEach(s=>{let o=s.replace(n,"");r.paths.push(o),(lb.test(o)?r.folders:r.files).push(o)}),r}var ab,cb,ub,lb,jA=g({"src/lib/responses/CleanSummary.ts"(){"use strict";C(),ab=class{constructor(e){this.dryRun=e,this.paths=[],this.files=[],this.folders=[]}},cb=/^[a-z]+\s*/i,ub=/^[a-z]+\s+[a-z]+\s*/i,lb=/\/$/}}),cc={};H(cc,{EMPTY_COMMANDS:()=>_o,adhocExecTask:()=>fb,configurationErrorTask:()=>de,isBufferTask:()=>pb,isEmptyTask:()=>mb,straightThroughBufferTask:()=>db,straightThroughStringTask:()=>ae});function fb(e){return{commands:_o,format:"empty",parser:e}}function de(e){return{commands:_o,format:"empty",parser(){throw typeof e=="string"?new By(e):e}}}function ae(e,t=!1){return{commands:e,format:"utf-8",parser(r){return t?String(r).trim():r}}}function db(e){return{commands:e,format:"buffer",parser(t){return t}}}function pb(e){return e.format==="buffer"}function mb(e){return e.format==="empty"||!e.commands.length}var _o,Z=g({"src/lib/tasks/task.ts"(){"use strict";Uy(),_o=[]}}),hb={};H(hb,{CONFIG_ERROR_INTERACTIVE_MODE:()=>Tc,CONFIG_ERROR_MODE_REQUIRED:()=>Oc,CONFIG_ERROR_UNKNOWN_OPTION:()=>Rc,CleanOptions:()=>co,cleanTask:()=>gb,cleanWithOptionsTask:()=>BA,isCleanOptionsArray:()=>UA});function BA(e,t){let{cleanMode:r,options:n,valid:s}=GA(e);return r?s.options?(n.push(...t),n.some(zA)?de(Tc):gb(r,n)):de(Rc+JSON.stringify(e)):de(Oc)}function gb(e,t){return{commands:["clean",`-${e}`,...t],format:"utf-8",parser(n){return FA(e==="n",n)}}}function UA(e){return Array.isArray(e)&&e.every(t=>kc.has(t))}function GA(e){let t,r=[],n={cleanMode:!1,options:!0};return e.replace(/[^a-z]i/g,"").split("").forEach(s=>{qA(s)?(t=s,n.cleanMode=!0):n.options=n.options&&VA(r[r.length]=`-${s}`)}),{cleanMode:t,options:r,valid:n}}function qA(e){return e==="f"||e==="n"}function VA(e){return/^-[a-z]$/i.test(e)&&kc.has(e.charAt(1))}function zA(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:e==="--interactive"}var Tc,Oc,Rc,co,kc,yb=g({"src/lib/tasks/clean.ts"(){"use strict";jA(),C(),Z(),Tc="Git clean interactive mode is not supported",Oc='Git clean mode parameter ("n" or "f") is required',Rc="Git clean unknown option found in: ",co=(e=>(e.DRY_RUN="n",e.FORCE="f",e.IGNORED_INCLUDED="x",e.IGNORED_ONLY="X",e.EXCLUDING="e",e.QUIET="q",e.RECURSIVE="d",e))(co||{}),kc=new Set(["i",...Yy(Object.values(co))])}});function WA(e){let t=new wb;for(let r of bb(e))t.addValue(r.file,String(r.key),r.value);return t}function ZA(e,t){let r=null,n=[],s=new Map;for(let o of bb(e,t))o.key===t&&(n.push(r=o.value),s.has(o.file)||s.set(o.file,[]),s.get(o.file).push(r));return{key:t,paths:Array.from(s.keys()),scopes:s,value:r,values:n}}function HA(e){return e.replace(/^(file):/,"")}function*bb(e,t=null){let r=e.split("\0");for(let n=0,s=r.length-1;n<s;){let o=HA(r[n++]),i=r[n++],a=t;if(i.includes(`
57
- `)){let c=Vy(i,`
58
- `);a=c[0],i=c[1]}yield{file:o,key:a,value:i}}}var wb,YA=g({"src/lib/responses/ConfigList.ts"(){"use strict";C(),wb=class{constructor(){this.files=[],this.values=Object.create(null)}get all(){return this._all||(this._all=this.files.reduce((e,t)=>Object.assign(e,this.values[t]),{})),this._all}addFile(e){if(!(e in this.values)){let t=zt(this.files);this.values[e]=t?Object.create(this.values[t]):{},this.files.push(e)}return this.values[e]}addValue(e,t,r){let n=this.addFile(e);n.hasOwnProperty(t)?Array.isArray(n[t])?n[t].push(r):n[t]=[n[t],r]:n[t]=r,this._all=void 0}}}});function Ka(e,t){return typeof e=="string"&&uc.hasOwnProperty(e)?e:t}function XA(e,t,r,n){let s=["config",`--${n}`];return r&&s.push("--add"),s.push(e,t),{commands:s,format:"utf-8",parser(o){return o}}}function KA(e,t){let r=["config","--null","--show-origin","--get-all",e];return t&&r.splice(1,0,`--${t}`),{commands:r,format:"utf-8",parser(n){return ZA(n,e)}}}function JA(e){let t=["config","--list","--show-origin","--null"];return e&&t.push(`--${e}`),{commands:t,format:"utf-8",parser(r){return WA(r)}}}function QA(){return{addConfig(e,t,...r){return this._runTask(XA(e,t,r[0]===!0,Ka(r[1],"local")),z(arguments))},getConfig(e,t){return this._runTask(KA(e,Ka(t,void 0)),z(arguments))},listConfig(...e){return this._runTask(JA(Ka(e[0],void 0)),z(arguments))}}}var uc,Sb=g({"src/lib/tasks/config.ts"(){"use strict";YA(),C(),uc=(e=>(e.system="system",e.global="global",e.local="local",e.worktree="worktree",e))(uc||{})}});function eI(e){return xb.has(e)}var Ja,xb,vb=g({"src/lib/tasks/diff-name-status.ts"(){"use strict";Ja=(e=>(e.ADDED="A",e.COPIED="C",e.DELETED="D",e.MODIFIED="M",e.RENAMED="R",e.CHANGED="T",e.UNMERGED="U",e.UNKNOWN="X",e.BROKEN="B",e))(Ja||{}),xb=new Set(Object.values(Ja))}});function tI(...e){return new Eb().param(...e)}function rI(e){let t=new Set,r={};return yc(e,n=>{let[s,o,i]=n.split(Or);t.add(s),(r[s]=r[s]||[]).push({line:U(o),path:s,preview:i})}),{paths:t,results:r}}function nI(){return{grep(e){let t=z(arguments),r=fe(arguments);for(let s of _b)if(r.includes(s))return this._runTask(de(`git.grep: use of "${s}" is not supported.`),t);typeof e=="string"&&(e=tI().param(e));let n=["grep","--null","-n","--full-name",...r,...e];return this._runTask({commands:n,format:"utf-8",parser(s){return rI(s)}},t)}}}var _b,an,uy,Eb,Tb=g({"src/lib/tasks/grep.ts"(){"use strict";C(),Z(),_b=["-h"],an=Symbol("grepQuery"),Eb=class{constructor(){this[uy]=[]}*[(uy=an,Symbol.iterator)](){for(let e of this[an])yield e}and(...e){return e.length&&this[an].push("--and","(",...ln(e,"-e"),")"),this}param(...e){return this[an].push(...ln(e,"-e")),this}}}}),Ob={};H(Ob,{ResetMode:()=>uo,getResetMode:()=>oI,resetTask:()=>sI});function sI(e,t){let r=["reset"];return Rb(e)&&r.push(`--${e}`),r.push(...t),ae(r)}function oI(e){if(Rb(e))return e;switch(typeof e){case"string":case"undefined":return"soft"}}function Rb(e){return kb.includes(e)}var uo,kb,Cb=g({"src/lib/tasks/reset.ts"(){"use strict";Z(),uo=(e=>(e.MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep",e))(uo||{}),kb=Array.from(Object.values(uo))}});function iI(){return(0,ho.default)("simple-git")}function ly(e,t,r){return!t||!String(t).replace(/\s*/,"")?r?(n,...s)=>{e(n,...s),r(n,...s)}:e:(n,...s)=>{e(`%s ${n}`,t,...s),r&&r(n,...s)}}function aI(e,t,{namespace:r}){if(typeof e=="string")return e;let n=t&&t.namespace||"";return n.startsWith(r)?n.substr(r.length+1):n||r}function Cc(e,t,r,n=iI()){let s=e&&`[${e}]`||"",o=[],i=typeof t=="string"?n.extend(t):t,a=aI(Ye(t,re),i,n);return u(r);function c(l,f){return F(o,Cc(e,a.replace(/^[^:]+/,l),f,n))}function u(l){let f=l&&`[${l}]`||"",d=i&&ly(i,f)||Wt,p=ly(n,`${s} ${f}`,d);return Object.assign(i?d:p,{label:e,sibling:c,info:p,step:u})}}var Ab=g({"src/lib/git-logger.ts"(){"use strict";C(),ho.default.formatters.L=e=>String(xc(e)?e.length:"-"),ho.default.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):gn(e)}}),io,lc,cI=g({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";yt(),Ab(),io=class{constructor(e="GitExecutor"){this.logLabel=e,this._queue=new Map}withProgress(e){return this._queue.get(e)}createProgress(e){let t=io.getName(e.commands[0]),r=Cc(this.logLabel,t);return{task:e,logger:r,name:t}}push(e){let t=this.createProgress(e);return t.logger("Adding task to the queue, commands = %o",e.commands),this._queue.set(e,t),t}fatal(e){for(let[t,{logger:r}]of Array.from(this._queue.entries()))t===e.task?(r.info("Failed %o",e),r("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):r.info("A fatal exception occurred in a previous task, the queue has been purged: %o",e.message),this.complete(t);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(e){this.withProgress(e)&&this._queue.delete(e)}attempt(e){let t=this.withProgress(e);if(!t)throw new it(void 0,"TasksPendingQueue: attempt called for an unknown task");return t.logger("Starting task"),t}static getName(e="empty"){return`task:${e}:${++io.counter}`}},lc=io,lc.counter=0}});function Vt(e,t){return{method:zy(e.commands)||"",commands:t}}function uI(e,t){return r=>{t("[ERROR] child process exception %o",r),e.push(Buffer.from(String(r.stack),"ascii"))}}function fy(e,t,r,n){return s=>{r("%s received %L bytes",t,s),n("%B",s),e.push(s)}}var fc,lI=g({"src/lib/runners/git-executor-chain.ts"(){"use strict";yt(),Z(),C(),cI(),fc=class{constructor(e,t,r){this._executor=e,this._scheduler=t,this._plugins=r,this._chain=Promise.resolve(),this._queue=new lc}get cwd(){return this._cwd||this._executor.cwd}set cwd(e){this._cwd=e}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(e){return this._queue.push(e),this._chain=this._chain.then(()=>this.attemptTask(e))}attemptTask(e){return cn(this,null,function*(){let t=yield this._scheduler.next(),r=()=>this._queue.complete(e);try{let{logger:n}=this._queue.attempt(e);return yield mb(e)?this.attemptEmptyTask(e,n):this.attemptRemoteTask(e,n)}catch(n){throw this.onFatalException(e,n)}finally{r(),t()}})}onFatalException(e,t){let r=t instanceof it?Object.assign(t,{task:e}):new it(e,t&&String(t));return this._chain=Promise.resolve(),this._queue.fatal(r),r}attemptRemoteTask(e,t){return cn(this,null,function*(){let r=this._plugins.exec("spawn.binary","",Vt(e,e.commands)),n=this._plugins.exec("spawn.args",[...e.commands],Vt(e,e.commands)),s=yield this.gitResponse(e,r,n,this.outputHandler,t.step("SPAWN")),o=yield this.handleTaskData(e,n,s,t.step("HANDLE"));return t("passing response to task's parser as a %s",e.format),pb(e)?ic(e.parser,o):ic(e.parser,o.asStrings())})}attemptEmptyTask(e,t){return cn(this,null,function*(){return t("empty task bypassing child process to call to task's parser"),e.parser(this)})}handleTaskData(e,t,r,n){let{exitCode:s,rejection:o,stdOut:i,stdErr:a}=r;return new Promise((c,u)=>{n("Preparing to handle process response exitCode=%d stdOut=",s);let{error:l}=this._plugins.exec("task.error",{error:o},Ce(Ce({},Vt(e,t)),r));if(l&&e.onError)return n.info("exitCode=%s handling with custom error handler"),e.onError(r,l,f=>{n.info("custom error handler treated as success"),n("custom error returned a %s",gn(f)),c(new dn(Array.isArray(f)?Buffer.concat(f):f,Buffer.concat(a)))},u);if(l)return n.info("handling as error: exitCode=%s stdErr=%s rejection=%o",s,a.length,o),u(l);n.info("retrieving task output complete"),c(new dn(Buffer.concat(i),Buffer.concat(a)))})}gitResponse(e,t,r,n,s){return cn(this,null,function*(){let o=s.sibling("output"),i=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},Vt(e,e.commands));return new Promise(a=>{let c=[],u=[];s.info("%s %o",t,r),s("%O",i);let l=this._beforeSpawn(e,r);if(l)return a({stdOut:c,stdErr:u,exitCode:9901,rejection:l});this._plugins.exec("spawn.before",void 0,un(Ce({},Vt(e,r)),{kill(d){l=d||l}}));let f=(0,Ib.spawn)(t,r,i);f.stdout.on("data",fy(c,"stdOut",s,o.step("stdOut"))),f.stderr.on("data",fy(u,"stdErr",s,o.step("stdErr"))),f.on("error",uI(u,s)),n&&(s("Passing child process stdOut/stdErr to custom outputHandler"),n(t,f.stdout,f.stderr,[...r])),this._plugins.exec("spawn.after",void 0,un(Ce({},Vt(e,r)),{spawned:f,close(d,p){a({stdOut:c,stdErr:u,exitCode:d,rejection:l||p})},kill(d){f.killed||(l=d,f.kill("SIGINT"))}}))})})}_beforeSpawn(e,t){let r;return this._plugins.exec("spawn.before",void 0,un(Ce({},Vt(e,t)),{kill(n){r=n||r}})),r}}}}),$b={};H($b,{GitExecutor:()=>Db});var Db,fI=g({"src/lib/runners/git-executor.ts"(){"use strict";lI(),Db=class{constructor(e,t,r){this.cwd=e,this._scheduler=t,this._plugins=r,this._chain=new fc(this,this._scheduler,this._plugins)}chain(){return new fc(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});function dI(e,t,r=Wt){let n=o=>{r(null,o)},s=o=>{(o==null?void 0:o.task)===e&&r(o instanceof mn?pI(o):o,void 0)};t.then(n,s)}function pI(e){let t=n=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${n} should be GitResponseError.git.${n}, this will no longer be available in version 3`),t=Wt};return Object.create(e,Object.getOwnPropertyNames(e.git).reduce(r,{}));function r(n,s){return s in e||(n[s]={enumerable:!1,configurable:!1,get(){return t(s),e.git[s]}}),n}}var mI=g({"src/lib/task-callback.ts"(){"use strict";Rr(),C()}});function dy(e,t){return fb(r=>{if(!bc(e))throw new Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||r).cwd=e})}var hI=g({"src/lib/tasks/change-working-directory.ts"(){"use strict";C(),Z()}});function Qa(e){let t=["checkout",...e];return t[1]==="-b"&&t.includes("-B")&&(t[1]=So(t,"-B")),ae(t)}function gI(){return{checkout(){return this._runTask(Qa(fe(arguments,1)),z(arguments))},checkoutBranch(e,t){return this._runTask(Qa(["-b",e,t,...fe(arguments)]),z(arguments))},checkoutLocalBranch(e){return this._runTask(Qa(["-b",e,...fe(arguments)]),z(arguments))}}}var yI=g({"src/lib/tasks/checkout.ts"(){"use strict";C(),Z()}});function bI(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function wI(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(e){return pe(bI(),[Lb],e)}})}}}var Lb,SI=g({"src/lib/tasks/count-objects.ts"(){"use strict";C(),Lb=new I(/([a-z-]+): (\d+)$/,(e,[t,r])=>{let n=Hy(t);e.hasOwnProperty(n)&&(e[n]=U(r))})}});function xI(e){return pe({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},Nb,e)}var Nb,vI=g({"src/lib/parsers/parse-commit.ts"(){"use strict";C(),Nb=[new I(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(e,[t,r,n])=>{e.branch=t,e.commit=n,e.root=!!r}),new I(/\s*Author:\s(.+)/i,(e,[t])=>{let r=t.split("<"),n=r.pop();!n||!n.includes("@")||(e.author={email:n.substr(0,n.length-1),name:r.join("<").trim()})}),new I(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0,e.summary.insertions=parseInt(r,10)||0,e.summary.deletions=parseInt(n,10)||0}),new I(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0;let s=parseInt(r,10)||0;n==="-"?e.summary.deletions=s:n==="+"&&(e.summary.insertions=s)})]}});function _I(e,t,r){return{commands:["-c","core.abbrev=40","commit",...ln(e,"-m"),...t,...r],format:"utf-8",parser:xI}}function EI(){return{commit(t,...r){let n=z(arguments),s=e(t)||_I(He(t),He(Ye(r[0],mo,[])),[...Ye(r[1],yn,[]),...fe(arguments,0,!0)]);return this._runTask(s,n)}};function e(t){return!mo(t)&&de("git.commit: requires the commit message to be supplied as a string/string[]")}}var TI=g({"src/lib/tasks/commit.ts"(){"use strict";vI(),C(),Z()}});function OI(){return{firstCommit(){return this._runTask(ae(["rev-list","--max-parents=0","HEAD"],!0),z(arguments))}}}var RI=g({"src/lib/tasks/first-commit.ts"(){"use strict";C(),Z()}});function kI(e,t){let r=["hash-object",e];return t&&r.push("-w"),ae(r,!0)}var CI=g({"src/lib/tasks/hash-object.ts"(){"use strict";Z()}});function AI(e,t,r){let n=String(r).trim(),s;if(s=Pb.exec(n))return new lo(e,t,!1,s[1]);if(s=Mb.exec(n))return new lo(e,t,!0,s[1]);let o="",i=n.split(" ");for(;i.length;)if(i.shift()==="in"){o=i.join(" ");break}return new lo(e,t,/^re/i.test(n),o)}var lo,Pb,Mb,II=g({"src/lib/responses/InitSummary.ts"(){"use strict";lo=class{constructor(e,t,r,n){this.bare=e,this.path=t,this.existing=r,this.gitDir=n}},Pb=/^Init.+ repository in (.+)$/,Mb=/^Rein.+ in (.+)$/}});function $I(e){return e.includes(Ac)}function DI(e=!1,t,r){let n=["init",...r];return e&&!$I(n)&&n.splice(1,0,Ac),{commands:n,format:"utf-8",parser(s){return AI(n.includes("--bare"),t,s)}}}var Ac,LI=g({"src/lib/tasks/init.ts"(){"use strict";II(),Ac="--bare"}});function Ic(e){for(let t=0;t<e.length;t++){let r=$c.exec(e[t]);if(r)return`--${r[1]}`}return""}function NI(e){return $c.test(e)}var $c,bn=g({"src/lib/args/log-format.ts"(){"use strict";$c=/^--(stat|numstat|name-only|name-status)(=|$)/}}),Fb,PI=g({"src/lib/responses/DiffSummary.ts"(){"use strict";Fb=class{constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});function jb(e=""){let t=Bb[e];return r=>pe(new Fb,t,r,!1)}var ec,py,my,hy,Bb,Ub=g({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";bn(),PI(),vb(),C(),ec=[new I(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(e,[t,r,n=""])=>{e.files.push({file:t.trim(),changes:U(r),insertions:n.replace(/[^+]/g,"").length,deletions:n.replace(/[^-]/g,"").length,binary:!1})}),new I(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(e,[t,r,n])=>{e.files.push({file:t.trim(),before:U(r),after:U(n),binary:!0})}),new I(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(e,[t,r])=>{let n=/(\d+) i/.exec(r),s=/(\d+) d/.exec(r);e.changed=U(t),e.insertions=U(n==null?void 0:n[1]),e.deletions=U(s==null?void 0:s[1])})],py=[new I(/(\d+)\t(\d+)\t(.+)$/,(e,[t,r,n])=>{let s=U(t),o=U(r);e.changed++,e.insertions+=s,e.deletions+=o,e.files.push({file:n,changes:s+o,insertions:s,deletions:o,binary:!1})}),new I(/-\t-\t(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,after:0,before:0,binary:!0})})],my=[new I(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],hy=[new I(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(e,[t,r,n,s,o])=>{e.changed++,e.files.push({file:o??n,changes:0,insertions:0,deletions:0,binary:!1,status:sc(eI(t)&&t),from:sc(!!o&&n!==o&&n),similarity:U(r)})})],Bb={"":ec,"--stat":ec,"--numstat":py,"--name-status":hy,"--name-only":my}}});function MI(e,t){return t.reduce((r,n,s)=>(r[n]=e[s]||"",r),Object.create({diff:null}))}function Gb(e=Nc,t=qb,r=""){let n=jb(r);return function(s){let o=hn(s.trim(),!1,Dc).map(function(i){let a=i.split(Lc),c=MI(a[0].split(e),t);return a.length>1&&a[1].trim()&&(c.diff=n(a[1])),c});return{all:o,latest:o.length&&o[0]||null,total:o.length}}}var Dc,Lc,Nc,qb,Vb=g({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";C(),Ub(),bn(),Dc="\xF2\xF2\xF2\xF2\xF2\xF2 ",Lc=" \xF2\xF2",Nc=" \xF2 ",qb=["hash","date","message","refs","author_name","author_email"]}}),zb={};H(zb,{diffSummaryTask:()=>FI,validateLogFormatConfig:()=>Eo});function FI(e){let t=Ic(e),r=["diff"];return t===""&&(t="--stat",r.push("--stat=4096")),r.push(...e),Eo(r)||{commands:r,format:"utf-8",parser:jb(t)}}function Eo(e){let t=e.filter(NI);if(t.length>1)return de(`Summary flags are mutually exclusive - pick one of ${t.join(",")}`);if(t.length&&e.includes("-z"))return de(`Summary flag ${t} parsing is not compatible with null termination option '-z'`)}var Pc=g({"src/lib/tasks/diff.ts"(){"use strict";bn(),Ub(),Z()}});function jI(e,t){let r=[],n=[];return Object.keys(e).forEach(s=>{r.push(s),n.push(String(e[s]))}),[r,n.join(t)]}function BI(e){return Object.keys(e).reduce((t,r)=>(r in dc||(t[r]=e[r]),t),{})}function Wb(e={},t=[]){let r=Ye(e.splitter,re,Nc),n=!wc(e.format)&&e.format?e.format:{hash:"%H",date:e.strictDate===!1?"%ai":"%aI",message:"%s",refs:"%D",body:e.multiLine?"%B":"%b",author_name:e.mailMap!==!1?"%aN":"%an",author_email:e.mailMap!==!1?"%aE":"%ae"},[s,o]=jI(n,r),i=[],a=[`--pretty=format:${Dc}${o}${Lc}`,...t],c=e.n||e["max-count"]||e.maxCount;if(c&&a.push(`--max-count=${c}`),e.from||e.to){let u=e.symmetric!==!1?"...":"..";i.push(`${e.from||""}${u}${e.to||""}`)}return re(e.file)&&a.push("--follow",kA(e.file)),vc(BI(e),a),{fields:s,splitter:r,commands:[...a,...i]}}function UI(e,t,r){let n=Gb(e,t,Ic(r));return{commands:["log",...r],format:"utf-8",parser:n}}function GI(){return{log(...r){let n=z(arguments),s=Wb(_c(arguments),Ye(arguments[0],yn)),o=t(...r)||Eo(s.commands)||e(s);return this._runTask(o,n)}};function e(r){return UI(r.splitter,r.fields,r.commands)}function t(r,n){return re(r)&&re(n)&&de("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}var dc,Zb=g({"src/lib/tasks/log.ts"(){"use strict";bn(),pn(),Vb(),C(),Z(),Pc(),dc=(e=>(e[e["--pretty"]=0]="--pretty",e[e["max-count"]=1]="max-count",e[e.maxCount=2]="maxCount",e[e.n=3]="n",e[e.file=4]="file",e[e.format=5]="format",e[e.from=6]="from",e[e.to=7]="to",e[e.splitter=8]="splitter",e[e.symmetric=9]="symmetric",e[e.mailMap=10]="mailMap",e[e.multiLine=11]="multiLine",e[e.strictDate=12]="strictDate",e))(dc||{})}}),fo,Hb,qI=g({"src/lib/responses/MergeSummary.ts"(){"use strict";fo=class{constructor(e,t=null,r){this.reason=e,this.file=t,this.meta=r}toString(){return`${this.file}:${this.reason}`}},Hb=class{constructor(){this.conflicts=[],this.merges=[],this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(", ")}`:"OK"}}}}),pc,Yb,VI=g({"src/lib/responses/PullSummary.ts"(){"use strict";pc=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},Yb=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function tc(e){return e.objects=e.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}function gy(e){let t=/^\s*(\d+)/.exec(e),r=/delta (\d+)/i.exec(e);return{count:U(t&&t[1]||"0"),delta:U(r&&r[1]||"0")}}var Xb,zI=g({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";C(),Xb=[new gt(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,r])=>{let n=t.toLowerCase(),s=tc(e.remoteMessages);Object.assign(s,{[n]:U(r)})}),new gt(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[t,r])=>{let n=t.toLowerCase(),s=tc(e.remoteMessages);Object.assign(s,{[n]:U(r)})}),new gt(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,r,n])=>{let s=tc(e.remoteMessages);s.total=gy(t),s.reused=gy(r),s.packReused=U(n)})]}});function Kb(e,t){return pe({remoteMessages:new Qb},Jb,t)}var Jb,Qb,ew=g({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";C(),zI(),Jb=[new gt(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...Xb,new gt([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(e,[t])=>{e.remoteMessages.pullRequestUrl=t}),new gt([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(e,[t,r,n])=>{e.remoteMessages.vulnerabilities={count:U(t),summary:r,url:n}})],Qb=class{constructor(){this.all=[]}}}});function WI(e,t){let r=pe(new Yb,tw,[e,t]);return r.message&&r}var yy,by,wy,Sy,tw,xy,Mc,rw=g({"src/lib/parsers/parse-pull.ts"(){"use strict";VI(),C(),ew(),yy=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,by=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,wy=/^(create|delete) mode \d+ (.+)/,Sy=[new I(yy,(e,[t,r,n])=>{e.files.push(t),r&&(e.insertions[t]=r.length),n&&(e.deletions[t]=n.length)}),new I(by,(e,[t,,r,,n])=>r!==void 0||n!==void 0?(e.summary.changes=+t||0,e.summary.insertions=+r||0,e.summary.deletions=+n||0,!0):!1),new I(wy,(e,[t,r])=>{F(e.files,r),F(t==="create"?e.created:e.deleted,r)})],tw=[new I(/^from\s(.+)$/i,(e,[t])=>void(e.remote=t)),new I(/^fatal:\s(.+)$/,(e,[t])=>void(e.message=t)),new I(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(e,[t,r,n,s])=>{e.branch.local=n,e.hash.local=t,e.branch.remote=s,e.hash.remote=r})],xy=(e,t)=>pe(new pc,Sy,[e,t]),Mc=(e,t)=>Object.assign(new pc,xy(e,t),Kb(e,t))}}),vy,nw,_y,ZI=g({"src/lib/parsers/parse-merge.ts"(){"use strict";qI(),C(),rw(),vy=[new I(/^Auto-merging\s+(.+)$/,(e,[t])=>{e.merges.push(t)}),new I(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(e,[t,r])=>{e.conflicts.push(new fo(t,r))}),new I(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,r,n])=>{e.conflicts.push(new fo(t,r,{deleteRef:n}))}),new I(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new fo(t,null))}),new I(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],nw=(e,t)=>Object.assign(_y(e,t),Mc(e,t)),_y=e=>pe(new Hb,vy,e)}});function Ey(e){return e.length?{commands:["merge",...e],format:"utf-8",parser(t,r){let n=nw(t,r);if(n.failed)throw new mn(n);return n}}:de("Git.merge requires at least one option")}var HI=g({"src/lib/tasks/merge.ts"(){"use strict";Rr(),ZI(),Z()}});function YI(e,t,r){let n=r.includes("deleted"),s=r.includes("tag")||/^refs\/tags/.test(e),o=!r.includes("new");return{deleted:n,tag:s,branch:!s,new:!o,alreadyUpdated:o,local:e,remote:t}}var Ty,sw,Oy,XI=g({"src/lib/parsers/parse-push.ts"(){"use strict";C(),ew(),Ty=[new I(/^Pushing to (.+)$/,(e,[t])=>{e.repo=t}),new I(/^updating local tracking ref '(.+)'/,(e,[t])=>{e.ref=un(Ce({},e.ref||{}),{local:t})}),new I(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(e,[t,r,n])=>{e.pushed.push(YI(t,r,n))}),new I(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[t,r,n])=>{e.branch=un(Ce({},e.branch||{}),{local:t,remote:r,remoteName:n})}),new I(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(e,[t,r,n,s])=>{e.update={head:{local:t,remote:r},hash:{from:n,to:s}}})],sw=(e,t)=>{let r=Oy(e,t),n=Kb(e,t);return Ce(Ce({},r),n)},Oy=(e,t)=>pe({pushed:[]},Ty,[e,t])}}),ow={};H(ow,{pushTagsTask:()=>KI,pushTask:()=>Fc});function KI(e={},t){return F(t,"--tags"),Fc(e,t)}function Fc(e={},t){let r=["push",...t];return e.branch&&r.splice(1,0,e.branch),e.remote&&r.splice(1,0,e.remote),So(r,"-v"),F(r,"--verbose"),F(r,"--porcelain"),{commands:r,format:"utf-8",parser:sw}}var iw=g({"src/lib/tasks/push.ts"(){"use strict";XI(),C()}});function JI(){return{showBuffer(){let e=["show",...fe(arguments,1)];return e.includes("--binary")||e.splice(1,0,"--binary"),this._runTask(db(e),z(arguments))},show(){let e=["show",...fe(arguments,1)];return this._runTask(ae(e),z(arguments))}}}var QI=g({"src/lib/tasks/show.ts"(){"use strict";C(),Z()}}),Ry,aw,e1=g({"src/lib/responses/FileStatusSummary.ts"(){"use strict";Ry=/^(.+)\0(.+)$/,aw=class{constructor(e,t,r){if(this.path=e,this.index=t,this.working_dir=r,t==="R"||r==="R"){let n=Ry.exec(e)||[null,e,e];this.from=n[2]||"",this.path=n[1]||""}}}}});function ky(e){let[t,r]=e.split(Or);return{from:r||t,to:t}}function we(e,t,r){return[`${e}${t}`,r]}function rc(e,...t){return t.map(r=>we(e,r,(n,s)=>F(n.conflicted,s)))}function t1(e,t){let r=t.trim();switch(" "){case r.charAt(2):return n(r.charAt(0),r.charAt(1),r.substr(3));case r.charAt(1):return n(" ",r.charAt(0),r.substr(2));default:return}function n(s,o,i){let a=`${s}${o}`,c=cw.get(a);c&&c(e,i),a!=="##"&&a!=="!!"&&e.files.push(new aw(i,s,o))}}var Cy,cw,uw,r1=g({"src/lib/responses/StatusSummary.ts"(){"use strict";C(),e1(),Cy=class{constructor(){this.not_added=[],this.conflicted=[],this.created=[],this.deleted=[],this.ignored=void 0,this.modified=[],this.renamed=[],this.files=[],this.staged=[],this.ahead=0,this.behind=0,this.current=null,this.tracking=null,this.detached=!1,this.isClean=()=>!this.files.length}},cw=new Map([we(" ","A",(e,t)=>F(e.created,t)),we(" ","D",(e,t)=>F(e.deleted,t)),we(" ","M",(e,t)=>F(e.modified,t)),we("A"," ",(e,t)=>F(e.created,t)&&F(e.staged,t)),we("A","M",(e,t)=>F(e.created,t)&&F(e.staged,t)&&F(e.modified,t)),we("D"," ",(e,t)=>F(e.deleted,t)&&F(e.staged,t)),we("M"," ",(e,t)=>F(e.modified,t)&&F(e.staged,t)),we("M","M",(e,t)=>F(e.modified,t)&&F(e.staged,t)),we("R"," ",(e,t)=>{F(e.renamed,ky(t))}),we("R","M",(e,t)=>{let r=ky(t);F(e.renamed,r),F(e.modified,r.to)}),we("!","!",(e,t)=>{F(e.ignored=e.ignored||[],t)}),we("?","?",(e,t)=>F(e.not_added,t)),...rc("A","A","U"),...rc("D","D","U"),...rc("U","A","D","U"),["##",(e,t)=>{let r=/ahead (\d+)/,n=/behind (\d+)/,s=/^(.+?(?=(?:\.{3}|\s|$)))/,o=/\.{3}(\S*)/,i=/\son\s([\S]+)$/,a;a=r.exec(t),e.ahead=a&&+a[1]||0,a=n.exec(t),e.behind=a&&+a[1]||0,a=s.exec(t),e.current=a&&a[1],a=o.exec(t),e.tracking=a&&a[1],a=i.exec(t),e.current=a&&a[1]||e.current,e.detached=/\(no branch\)/.test(t)}]]),uw=function(e){let t=e.split(Or),r=new Cy;for(let n=0,s=t.length;n<s;){let o=t[n++].trim();o&&(o.charAt(0)==="R"&&(o+=Or+(t[n++]||"")),t1(r,o))}return r}}});function n1(e){return{format:"utf-8",commands:["status","--porcelain","-b","-u","--null",...e.filter(r=>!lw.includes(r))],parser(r){return uw(r)}}}var lw,s1=g({"src/lib/tasks/status.ts"(){"use strict";r1(),lw=["--null","-z"]}});function go(e=0,t=0,r=0,n="",s=!0){return Object.defineProperty({major:e,minor:t,patch:r,agent:n,installed:s},"toString",{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}function o1(){return go(0,0,0,"",!1)}function i1(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:a1,onError(e,t,r,n){if(e.exitCode===-2)return r(Buffer.from(jc));n(t)}})}}}function a1(e){return e===jc?o1():pe(go(0,0,0,e),fw,e)}var jc,fw,c1=g({"src/lib/tasks/version.ts"(){"use strict";C(),jc="installed=false",fw=[new I(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,r,n,s=""])=>{Object.assign(e,go(U(t),U(r),U(n),s))}),new I(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,r,n,s=""])=>{Object.assign(e,go(U(t),U(r),n,s))})]}}),dw={};H(dw,{SimpleGitApi:()=>mc});var mc,u1=g({"src/lib/simple-git-api.ts"(){"use strict";mI(),hI(),yI(),SI(),TI(),Sb(),RI(),Tb(),CI(),LI(),Zb(),HI(),iw(),QI(),s1(),Z(),c1(),C(),mc=class{constructor(e){this._executor=e}_runTask(e,t){let r=this._executor.chain(),n=r.push(e);return t&&dI(e,n,t),Object.create(this,{then:{value:n.then.bind(n)},catch:{value:n.catch.bind(n)},_executor:{value:r}})}add(e){return this._runTask(ae(["add",...He(e)]),z(arguments))}cwd(e){let t=z(arguments);return typeof e=="string"?this._runTask(dy(e,this._executor),t):typeof(e==null?void 0:e.path)=="string"?this._runTask(dy(e.path,e.root&&this._executor||void 0),t):this._runTask(de("Git.cwd: workingDirectory must be supplied as a string"),t)}hashObject(e,t){return this._runTask(kI(e,t===!0),z(arguments))}init(e){return this._runTask(DI(e===!0,this._executor.cwd,fe(arguments)),z(arguments))}merge(){return this._runTask(Ey(fe(arguments)),z(arguments))}mergeFromTo(e,t){return re(e)&&re(t)?this._runTask(Ey([e,t,...fe(arguments)]),z(arguments,!1)):this._runTask(de("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(e){return this._executor.outputHandler=e,this}push(){let e=Fc({remote:Ye(arguments[0],re),branch:Ye(arguments[1],re)},fe(arguments));return this._runTask(e,z(arguments))}stash(){return this._runTask(ae(["stash",...fe(arguments)]),z(arguments))}status(){return this._runTask(n1(fe(arguments)),z(arguments))}},Object.assign(mc.prototype,gI(),EI(),QA(),wI(),OI(),nI(),GI(),JI(),i1())}}),pw={};H(pw,{Scheduler:()=>hw});var Ay,hw,l1=g({"src/lib/runners/scheduler.ts"(){"use strict";C(),Ab(),Ay=(()=>{let e=0;return()=>{e++;let{promise:t,done:r}=(0,mw.createDeferred)();return{promise:t,done:r,id:e}}})(),hw=class{constructor(e=2){this.concurrency=e,this.logger=Cc("","scheduler"),this.pending=[],this.running=[],this.logger("Constructed, concurrency=%s",e)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){this.logger("Schedule attempt ignored, pending=%s running=%s concurrency=%s",this.pending.length,this.running.length,this.concurrency);return}let e=F(this.running,this.pending.shift());this.logger("Attempting id=%s",e.id),e.done(()=>{this.logger("Completing id=",e.id),So(this.running,e),this.schedule()})}next(){let{promise:e,id:t}=F(this.pending,Ay());return this.logger("Scheduling id=%s",t),this.schedule(),e}}}}),gw={};H(gw,{applyPatchTask:()=>f1});function f1(e,t){return ae(["apply",...t,...e])}var d1=g({"src/lib/tasks/apply-patch.ts"(){"use strict";Z()}});function p1(e,t){return{branch:e,hash:t,success:!0}}function m1(e){return{branch:e,hash:null,success:!1}}var yw,h1=g({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";yw=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function bw(e,t){return t===1&&hc.test(e)}var Iy,hc,$y,To,g1=g({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";h1(),C(),Iy=/(\S+)\s+\(\S+\s([^)]+)\)/,hc=/^error[^']+'([^']+)'/m,$y=[new I(Iy,(e,[t,r])=>{let n=p1(t,r);e.all.push(n),e.branches[t]=n}),new I(hc,(e,[t])=>{let r=m1(t);e.errors.push(r),e.all.push(r),e.branches[t]=r})],To=(e,t)=>pe(new yw,$y,[e,t])}}),ww,y1=g({"src/lib/responses/BranchSummary.ts"(){"use strict";ww=class{constructor(){this.all=[],this.branches={},this.current="",this.detached=!1}push(e,t,r,n,s){e==="*"&&(this.detached=t,this.current=r),this.all.push(r),this.branches[r]={current:e==="*",linkedWorkTree:e==="+",name:r,commit:n,label:s}}}}});function Dy(e){return e?e.charAt(0):""}function Sw(e){return pe(new ww,xw,e)}var xw,b1=g({"src/lib/parsers/parse-branch.ts"(){"use strict";y1(),C(),xw=[new I(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,r,n,s])=>{e.push(Dy(t),!0,r,n,s)}),new I(new RegExp("^([*+]\\s)?(\\S+)\\s+([a-z0-9]+)\\s?(.*)$","s"),(e,[t,r,n,s])=>{e.push(Dy(t),!1,r,n,s)})]}}),vw={};H(vw,{branchLocalTask:()=>S1,branchTask:()=>w1,containsDeleteBranchCommand:()=>_w,deleteBranchTask:()=>v1,deleteBranchesTask:()=>x1});function _w(e){let t=["-d","-D","--delete"];return e.some(r=>t.includes(r))}function w1(e){let t=_w(e),r=["branch",...e];return r.length===1&&r.push("-a"),r.includes("-v")||r.splice(1,0,"-v"),{format:"utf-8",commands:r,parser(n,s){return t?To(n,s).all[0]:Sw(n)}}}function S1(){return{format:"utf-8",commands:["branch","-v"],parser:Sw}}function x1(e,t=!1){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser(r,n){return To(r,n)},onError({exitCode:r,stdOut:n},s,o,i){if(!bw(String(s),r))return i(s);o(n)}}}function v1(e,t=!1){let r={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser(n,s){return To(n,s).branches[e]},onError({exitCode:n,stdErr:s,stdOut:o},i,a,c){if(!bw(String(i),n))return c(i);throw new mn(r.parser(fn(o),fn(s)),String(i))}};return r}var _1=g({"src/lib/tasks/branch.ts"(){"use strict";Rr(),g1(),b1(),C()}}),Ew,E1=g({"src/lib/responses/CheckIgnore.ts"(){"use strict";Ew=e=>e.split(/\n/g).map(t=>t.trim()).filter(t=>!!t)}}),Tw={};H(Tw,{checkIgnoreTask:()=>T1});function T1(e){return{commands:["check-ignore",...e],format:"utf-8",parser:Ew}}var O1=g({"src/lib/tasks/check-ignore.ts"(){"use strict";E1()}}),Ow={};H(Ow,{cloneMirrorTask:()=>k1,cloneTask:()=>Rw});function R1(e){return/^--upload-pack(=|$)/.test(e)}function Rw(e,t,r){let n=["clone",...r];return re(e)&&n.push(e),re(t)&&n.push(t),n.find(R1)?de("git.fetch: potential exploit argument blocked."):ae(n)}function k1(e,t,r){return F(r,"--mirror"),Rw(e,t,r)}var C1=g({"src/lib/tasks/clone.ts"(){"use strict";Z(),C()}});function A1(e,t){return pe({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},kw,[e,t])}var kw,I1=g({"src/lib/parsers/parse-fetch.ts"(){"use strict";C(),kw=[new I(/From (.+)$/,(e,[t])=>{e.remote=t}),new I(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.branches.push({name:t,tracking:r})}),new I(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.tags.push({name:t,tracking:r})}),new I(/- \[deleted]\s+\S+\s*-> (.+)$/,(e,[t])=>{e.deleted.push({tracking:t})}),new I(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(e,[t,r,n,s])=>{e.updated.push({name:n,tracking:s,to:r,from:t})})]}}),Cw={};H(Cw,{fetchTask:()=>D1});function $1(e){return/^--upload-pack(=|$)/.test(e)}function D1(e,t,r){let n=["fetch",...r];return e&&t&&n.push(e,t),n.find($1)?de("git.fetch: potential exploit argument blocked."):{commands:n,format:"utf-8",parser:A1}}var L1=g({"src/lib/tasks/fetch.ts"(){"use strict";I1(),Z()}});function N1(e){return pe({moves:[]},Aw,e)}var Aw,P1=g({"src/lib/parsers/parse-move.ts"(){"use strict";C(),Aw=[new I(/^Renaming (.+) to (.+)$/,(e,[t,r])=>{e.moves.push({from:t,to:r})})]}}),Iw={};H(Iw,{moveTask:()=>M1});function M1(e,t){return{commands:["mv","-v",...He(e),t],format:"utf-8",parser:N1}}var F1=g({"src/lib/tasks/move.ts"(){"use strict";P1(),C()}}),$w={};H($w,{pullTask:()=>j1});function j1(e,t,r){let n=["pull",...r];return e&&t&&n.splice(1,0,e,t),{commands:n,format:"utf-8",parser(s,o){return Mc(s,o)},onError(s,o,i,a){let c=WI(fn(s.stdOut),fn(s.stdErr));if(c)return a(new mn(c));a(o)}}}var B1=g({"src/lib/tasks/pull.ts"(){"use strict";Rr(),rw(),C()}});function U1(e){let t={};return Dw(e,([r])=>t[r]={name:r}),Object.values(t)}function G1(e){let t={};return Dw(e,([r,n,s])=>{t.hasOwnProperty(r)||(t[r]={name:r,refs:{fetch:"",push:""}}),s&&n&&(t[r].refs[s.replace(/[^a-z]/g,"")]=n)}),Object.values(t)}function Dw(e,t){yc(e,r=>t(r.split(/\s+/)))}var q1=g({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";C()}}),Lw={};H(Lw,{addRemoteTask:()=>V1,getRemotesTask:()=>z1,listRemotesTask:()=>W1,remoteTask:()=>Z1,removeRemoteTask:()=>H1});function V1(e,t,r){return ae(["remote","add",...r,e,t])}function z1(e){let t=["remote"];return e&&t.push("-v"),{commands:t,format:"utf-8",parser:e?G1:U1}}function W1(e){let t=[...e];return t[0]!=="ls-remote"&&t.unshift("ls-remote"),ae(t)}function Z1(e){let t=[...e];return t[0]!=="remote"&&t.unshift("remote"),ae(t)}function H1(e){return ae(["remote","remove",e])}var Y1=g({"src/lib/tasks/remote.ts"(){"use strict";q1(),Z()}}),Nw={};H(Nw,{stashListTask:()=>X1});function X1(e={},t){let r=Wb(e),n=["stash","list",...r.commands,...t],s=Gb(r.splitter,r.fields,Ic(n));return Eo(n)||{commands:n,format:"utf-8",parser:s}}var K1=g({"src/lib/tasks/stash-list.ts"(){"use strict";bn(),Vb(),Pc(),Zb()}}),Pw={};H(Pw,{addSubModuleTask:()=>J1,initSubModuleTask:()=>Q1,subModuleTask:()=>Oo,updateSubModuleTask:()=>e$});function J1(e,t){return Oo(["add",e,t])}function Q1(e){return Oo(["init",...e])}function Oo(e){let t=[...e];return t[0]!=="submodule"&&t.unshift("submodule"),ae(t)}function e$(e){return Oo(["update",...e])}var t$=g({"src/lib/tasks/sub-module.ts"(){"use strict";Z()}});function r$(e,t){let r=isNaN(e),n=isNaN(t);return r!==n?r?1:-1:r?Mw(e,t):0}function Mw(e,t){return e===t?0:e>t?1:-1}function n$(e){return e.trim()}function ao(e){return typeof e=="string"&&parseInt(e.replace(/^\D+/g,""),10)||0}var Ly,Fw,s$=g({"src/lib/responses/TagList.ts"(){"use strict";Ly=class{constructor(e,t){this.all=e,this.latest=t}},Fw=function(e,t=!1){let r=e.split(`
59
- `).map(n$).filter(Boolean);t||r.sort(function(s,o){let i=s.split("."),a=o.split(".");if(i.length===1||a.length===1)return r$(ao(i[0]),ao(a[0]));for(let c=0,u=Math.max(i.length,a.length);c<u;c++){let l=Mw(ao(i[c]),ao(a[c]));if(l)return l}return 0});let n=t?r[0]:[...r].reverse().find(s=>s.indexOf(".")>=0);return new Ly(r,n)}}}),jw={};H(jw,{addAnnotatedTagTask:()=>a$,addTagTask:()=>i$,tagListTask:()=>o$});function o$(e=[]){let t=e.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...e],parser(r){return Fw(r,t)}}}function i$(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}function a$(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser(){return{name:e}}}}var c$=g({"src/lib/tasks/tag.ts"(){"use strict";s$()}}),u$=OA({"src/git.js"(e,t){"use strict";var{GitExecutor:r}=(fI(),V($b)),{SimpleGitApi:n}=(u1(),V(dw)),{Scheduler:s}=(l1(),V(pw)),{configurationErrorTask:o}=(Z(),V(cc)),{asArray:i,filterArray:a,filterPrimitives:c,filterString:u,filterStringOrStringArray:l,filterType:f,getTrailingOptions:d,trailingFunctionArgument:p,trailingOptionsArgument:b}=(C(),V(rb)),{applyPatchTask:T}=(d1(),V(gw)),{branchTask:N,branchLocalTask:P,deleteBranchesTask:j,deleteBranchTask:Y}=(_1(),V(vw)),{checkIgnoreTask:X}=(O1(),V(Tw)),{checkIsRepoTask:Se}=(ib(),V(nb)),{cloneTask:ce,cloneMirrorTask:Ae}=(C1(),V(Ow)),{cleanWithOptionsTask:Ie,isCleanOptionsArray:xe}=(yb(),V(hb)),{diffSummaryTask:kr}=(Pc(),V(zb)),{fetchTask:bt}=(L1(),V(Cw)),{moveTask:Qw}=(F1(),V(Iw)),{pullTask:eS}=(B1(),V($w)),{pushTagsTask:tS}=(iw(),V(ow)),{addRemoteTask:rS,getRemotesTask:nS,listRemotesTask:sS,remoteTask:oS,removeRemoteTask:iS}=(Y1(),V(Lw)),{getResetMode:aS,resetTask:cS}=(Cb(),V(Ob)),{stashListTask:uS}=(K1(),V(Nw)),{addSubModuleTask:lS,initSubModuleTask:fS,subModuleTask:dS,updateSubModuleTask:pS}=(t$(),V(Pw)),{addAnnotatedTagTask:mS,addTagTask:hS,tagListTask:gS}=(c$(),V(jw)),{straightThroughBufferTask:yS,straightThroughStringTask:Fe}=(Z(),V(cc));function O(h,E){this._plugins=E,this._executor=new r(h.baseDir,new s(h.maxConcurrentProcesses),E),this._trimmed=h.trimmed}(O.prototype=Object.create(n.prototype)).constructor=O,O.prototype.customBinary=function(h){return this._plugins.reconfigure("binary",h),this},O.prototype.env=function(h,E){return arguments.length===1&&typeof h=="object"?this._executor.env=h:(this._executor.env=this._executor.env||{})[h]=E,this},O.prototype.stashList=function(h){return this._runTask(uS(b(arguments)||{},a(h)&&h||[]),p(arguments))};function qc(h,E,B,ne){return typeof B!="string"?o(`git.${h}() requires a string 'repoPath'`):E(B,f(ne,u),d(arguments))}O.prototype.clone=function(){return this._runTask(qc("clone",ce,...arguments),p(arguments))},O.prototype.mirror=function(){return this._runTask(qc("mirror",Ae,...arguments),p(arguments))},O.prototype.mv=function(h,E){return this._runTask(Qw(h,E),p(arguments))},O.prototype.checkoutLatestTag=function(h){var E=this;return this.pull(function(){E.tags(function(B,ne){E.checkout(ne.latest,h)})})},O.prototype.pull=function(h,E,B,ne){return this._runTask(eS(f(h,u),f(E,u),d(arguments)),p(arguments))},O.prototype.fetch=function(h,E){return this._runTask(bt(f(h,u),f(E,u),d(arguments)),p(arguments))},O.prototype.silent=function(h){return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"),this},O.prototype.tags=function(h,E){return this._runTask(gS(d(arguments)),p(arguments))},O.prototype.rebase=function(){return this._runTask(Fe(["rebase",...d(arguments)]),p(arguments))},O.prototype.reset=function(h){return this._runTask(cS(aS(h),d(arguments)),p(arguments))},O.prototype.revert=function(h){let E=p(arguments);return typeof h!="string"?this._runTask(o("Commit must be a string"),E):this._runTask(Fe(["revert",...d(arguments,0,!0),h]),E)},O.prototype.addTag=function(h){let E=typeof h=="string"?hS(h):o("Git.addTag requires a tag name");return this._runTask(E,p(arguments))},O.prototype.addAnnotatedTag=function(h,E){return this._runTask(mS(h,E),p(arguments))},O.prototype.deleteLocalBranch=function(h,E,B){return this._runTask(Y(h,typeof E=="boolean"?E:!1),p(arguments))},O.prototype.deleteLocalBranches=function(h,E,B){return this._runTask(j(h,typeof E=="boolean"?E:!1),p(arguments))},O.prototype.branch=function(h,E){return this._runTask(N(d(arguments)),p(arguments))},O.prototype.branchLocal=function(h){return this._runTask(P(),p(arguments))},O.prototype.raw=function(h){let E=!Array.isArray(h),B=[].slice.call(E?arguments:h,0);for(let $e=0;$e<B.length&&E;$e++)if(!c(B[$e])){B.splice($e,B.length-$e);break}B.push(...d(arguments,0,!0));var ne=p(arguments);return B.length?this._runTask(Fe(B,this._trimmed),ne):this._runTask(o("Raw: must supply one or more command to execute"),ne)},O.prototype.submoduleAdd=function(h,E,B){return this._runTask(lS(h,E),p(arguments))},O.prototype.submoduleUpdate=function(h,E){return this._runTask(pS(d(arguments,!0)),p(arguments))},O.prototype.submoduleInit=function(h,E){return this._runTask(fS(d(arguments,!0)),p(arguments))},O.prototype.subModule=function(h,E){return this._runTask(dS(d(arguments)),p(arguments))},O.prototype.listRemote=function(){return this._runTask(sS(d(arguments)),p(arguments))},O.prototype.addRemote=function(h,E,B){return this._runTask(rS(h,E,d(arguments)),p(arguments))},O.prototype.removeRemote=function(h,E){return this._runTask(iS(h),p(arguments))},O.prototype.getRemotes=function(h,E){return this._runTask(nS(h===!0),p(arguments))},O.prototype.remote=function(h,E){return this._runTask(oS(d(arguments)),p(arguments))},O.prototype.tag=function(h,E){let B=d(arguments);return B[0]!=="tag"&&B.unshift("tag"),this._runTask(Fe(B),p(arguments))},O.prototype.updateServerInfo=function(h){return this._runTask(Fe(["update-server-info"]),p(arguments))},O.prototype.pushTags=function(h,E){let B=tS({remote:f(h,u)},d(arguments));return this._runTask(B,p(arguments))},O.prototype.rm=function(h){return this._runTask(Fe(["rm","-f",...i(h)]),p(arguments))},O.prototype.rmKeepLocal=function(h){return this._runTask(Fe(["rm","--cached",...i(h)]),p(arguments))},O.prototype.catFile=function(h,E){return this._catFile("utf-8",arguments)},O.prototype.binaryCatFile=function(){return this._catFile("buffer",arguments)},O.prototype._catFile=function(h,E){var B=p(E),ne=["cat-file"],$e=E[0];if(typeof $e=="string")return this._runTask(o("Git.catFile: options must be supplied as an array of strings"),B);Array.isArray($e)&&ne.push.apply(ne,$e);let $o=h==="buffer"?yS(ne):Fe(ne);return this._runTask($o,B)},O.prototype.diff=function(h,E){let B=u(h)?o("git.diff: supplying options as a single string is no longer supported, switch to an array of strings"):Fe(["diff",...d(arguments)]);return this._runTask(B,p(arguments))},O.prototype.diffSummary=function(){return this._runTask(kr(d(arguments,1)),p(arguments))},O.prototype.applyPatch=function(h){let E=l(h)?T(i(h),d([].slice.call(arguments,1))):o("git.applyPatch requires one or more string patches as the first argument");return this._runTask(E,p(arguments))},O.prototype.revparse=function(){let h=["rev-parse",...d(arguments,!0)];return this._runTask(Fe(h,!0),p(arguments))},O.prototype.clean=function(h,E,B){let ne=xe(h),$e=ne&&h.join("")||f(h,u)||"",$o=d([].slice.call(arguments,ne?1:0));return this._runTask(Ie($e,$o),p(arguments))},O.prototype.exec=function(h){let E={commands:[],format:"utf-8",parser(){typeof h=="function"&&h()}};return this._runTask(E)},O.prototype.clearQueue=function(){return this},O.prototype.checkIgnore=function(h,E){return this._runTask(X(i(f(h,l,[]))),p(arguments))},O.prototype.checkIsRepo=function(h,E){return this._runTask(Se(f(h,u)),p(arguments))},t.exports=O}});pn();yt();var l$=class extends it{constructor(e,t){super(void 0,t),this.config=e}};yt();yt();var ot=class extends it{constructor(e,t,r){super(e,r),this.task=e,this.plugin=t,Object.setPrototypeOf(this,new.target.prototype)}};Rr();Uy();ib();yb();Sb();vb();Tb();Cb();function f$(e){return e?[{type:"spawn.before",action(n,s){e.aborted&&s.kill(new ot(void 0,"abort","Abort already signaled"))}},{type:"spawn.after",action(n,s){function o(){s.kill(new ot(void 0,"abort","Abort signal received"))}e.addEventListener("abort",o),s.spawned.on("close",()=>e.removeEventListener("abort",o))}}]:void 0}function d$(e){return typeof e=="string"&&e.trim().toLowerCase()==="-c"}function p$(e,t){if(d$(e)&&/^\s*protocol(.[a-z]+)?.allow/.test(t))throw new ot(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}function m$(e,t){if(/^\s*--(upload|receive)-pack/.test(e))throw new ot(void 0,"unsafe","Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack");if(t==="clone"&&/^\s*-u\b/.test(e))throw new ot(void 0,"unsafe","Use of clone with option -u is not permitted without enabling allowUnsafePack");if(t==="push"&&/^\s*--exec\b/.test(e))throw new ot(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}function h$({allowUnsafeProtocolOverride:e=!1,allowUnsafePack:t=!1}={}){return{type:"spawn.args",action(r,n){return r.forEach((s,o)=>{let i=o<r.length?r[o+1]:"";e||p$(s,i),t||m$(s,n.method)}),r}}}C();function g$(e){let t=ln(e,"-c");return{type:"spawn.args",action(r){return[...t,...r]}}}C();var Ny=(0,Tr.deferred)().promise;function y$({onClose:e=!0,onExit:t=50}={}){function r(){let s=-1,o={close:(0,Tr.deferred)(),closeTimeout:(0,Tr.deferred)(),exit:(0,Tr.deferred)(),exitTimeout:(0,Tr.deferred)()},i=Promise.race([e===!1?Ny:o.closeTimeout.promise,t===!1?Ny:o.exitTimeout.promise]);return n(e,o.close,o.closeTimeout),n(t,o.exit,o.exitTimeout),{close(a){s=a,o.close.done()},exit(a){s=a,o.exit.done()},get exitCode(){return s},result:i}}function n(s,o,i){s!==!1&&(s===!0?o.promise:o.promise.then(()=>nc(s))).then(i.done)}return{type:"spawn.after",action(s,o){return cn(this,arguments,function*(i,{spawned:a,close:c}){var u,l;let f=r(),d=!0,p=()=>void(d=!1);(u=a.stdout)==null||u.on("data",p),(l=a.stderr)==null||l.on("data",p),a.on("error",p),a.on("close",b=>f.close(b)),a.on("exit",b=>f.exit(b));try{yield f.result,d&&(yield nc(50)),c(f.exitCode)}catch(b){c(f.exitCode,b)}})}}}C();var b$="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",Py="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function w$(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(e)}function My(e,t){if(e.length<1||e.length>2)throw new ot(void 0,"binary",b$);if(e.some(w$))if(t)console.warn(Py);else throw new ot(void 0,"binary",Py);let[n,s]=e;return{binary:n,prefix:s}}function S$(e,t=["git"],r=!1){let n=My(He(t),r);e.on("binary",s=>{n=My(He(s),r)}),e.append("spawn.binary",()=>n.binary),e.append("spawn.args",s=>n.prefix?[n.prefix,...s]:s)}yt();function x$(e){return!!(e.exitCode&&e.stdErr.length)}function v$(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function _$(e=!1,t=x$,r=v$){return(n,s)=>!e&&n||!t(s)?n:r(s)}function Fy(e){return{type:"task.error",action(t,r){let n=e(t.error,{stdErr:r.stdErr,stdOut:r.stdOut,exitCode:r.exitCode});return Buffer.isBuffer(n)?{error:new it(void 0,n.toString("utf-8"))}:{error:n}}}}C();var E$=class{constructor(){this.plugins=new Set,this.events=new Bw.EventEmitter}on(e,t){this.events.on(e,t)}reconfigure(e,t){this.events.emit(e,t)}append(e,t){let r=F(this.plugins,{type:e,action:t});return()=>this.plugins.delete(r)}add(e){let t=[];return He(e).forEach(r=>r&&this.plugins.add(F(t,r))),()=>{t.forEach(r=>this.plugins.delete(r))}}exec(e,t,r){let n=t,s=Object.freeze(Object.create(r));for(let o of this.plugins)o.type===e&&(n=o.action(n,s));return n}};C();function T$(e){let t="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(o,i){return r.includes(i.method)?Zy(o,t):o}},{type:"spawn.after",action(o,i){var a;i.commands.includes(t)&&((a=i.spawned.stderr)==null||a.on("data",c=>{let u=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(c.toString("utf8"));u&&e({method:i.method,stage:O$(u[1]),progress:U(u[2]),processed:U(u[3]),total:U(u[4])})}))}}]}function O$(e){return String(e.toLowerCase().split(" ",1))||"unknown"}C();function R$(e){let t=Xy(e,["uid","gid"]);return{type:"spawn.options",action(r){return Ce(Ce({},t),r)}}}function k$({block:e,stdErr:t=!0,stdOut:r=!0}){if(e>0)return{type:"spawn.after",action(n,s){var o,i;let a;function c(){a&&clearTimeout(a),a=setTimeout(l,e)}function u(){var f,d;(f=s.spawned.stdout)==null||f.off("data",c),(d=s.spawned.stderr)==null||d.off("data",c),s.spawned.off("exit",u),s.spawned.off("close",u),a&&clearTimeout(a)}function l(){u(),s.kill(new ot(void 0,"timeout","block timeout reached"))}r&&((o=s.spawned.stdout)==null||o.on("data",c)),t&&((i=s.spawned.stderr)==null||i.on("data",c)),s.spawned.on("exit",u),s.spawned.on("close",u),c()}}}pn();function C$(){return{type:"spawn.args",action(e){let t=[],r;function n(s){(r=r||[]).push(...s)}for(let s=0;s<e.length;s++){let o=e[s];if(po(o)){n(cy(o));continue}if(o==="--"){n(e.slice(s+1).flatMap(i=>po(i)&&cy(i)||i));break}t.push(o)}return r?[...t,"--",...r.map(String)]:t}}}C();var A$=u$();function I$(e,t){var r;let n=new E$,s=eb(e&&(typeof e=="string"?{baseDir:e}:e)||{},t);if(!bc(s.baseDir))throw new l$(s,"Cannot use simple-git on a directory that does not exist");return Array.isArray(s.config)&&n.add(g$(s.config)),n.add(h$(s.unsafe)),n.add(C$()),n.add(y$(s.completion)),s.abort&&n.add(f$(s.abort)),s.progress&&n.add(T$(s.progress)),s.timeout&&n.add(k$(s.timeout)),s.spawnOptions&&n.add(R$(s.spawnOptions)),n.add(Fy(_$(!0))),s.errors&&n.add(Fy(s.errors)),S$(n,s.binary,(r=s.unsafe)==null?void 0:r.allowUnsafeCustomBinary),new A$(s,n)}Rr();var Uw=I$;async function Gw(){let e=Uw();try{let{current:t}=await e.branchLocal(),r=(await e.getRemotes(!0)).map(({name:o,refs:{fetch:i}})=>({name:o,url:i})),n=r.find(({name:o})=>o==="origin")??r[0];return{possibleRepositoryName:n?n.url.split("/").slice(-2).join("/").replace(/\.git$/,""):(await e.revparse(["--show-toplevel"])).split("/").pop(),branch:t,remotes:r}}catch{return null}}var Ww=q(zw()),Uc=Ww.default.bold("@seed-design/codemod"),Zw=e=>({event:t,properties:r})=>console.log(Uc,t,r,e);var Kw=(0,Ao.resolve)(__dirname,"transforms"),Yw=Xc(),Co=Hw(),wn=null,Jw=null;function P$(){Gw().then(e=>{Jw=e,wn=Zw({...e}),M$(wn)})}function M$(e){F$(),Yw.version(Co.version).help().command("[transformName] [...paths]","\uCF54\uB4DC \uBCC0\uD658 (codemod)").option("-l, --list","\uC0AC\uC6A9 \uAC00\uB2A5\uD55C transform \uBAA9\uB85D\uC744 \uBCF4\uC5EC\uC918\uC694").option("--log","\uB85C\uADF8\uB97C \uD30C\uC77C\uB85C \uC800\uC7A5\uD574\uC694").option("--no-track","\uC0AC\uC6A9 \uD1B5\uACC4\uB97C \uC218\uC9D1\uD558\uC9C0 \uC54A\uC544\uC694").option("-p, --parser <parser>","jscodeshift\uAC00 \uC0AC\uC6A9\uD560 \uD30C\uC11C\uB97C \uC9C0\uC815\uD574\uC694 (babel|babylon|flow|ts|tsx)",{default:"tsx"}).option("--extensions <extensions>","\uBCC0\uD658\uD560 \uD30C\uC77C \uD655\uC7A5\uC790").option("--ignore-config <ignoreConfig>","Ignore config").example(" $ npx @seed-design/codemod replace-react-icon src/ui").action(async(t,r,n)=>{let s=Wg.parse(n);s.track&&(e==null||e({event:"\uC2E4\uD589",properties:{transformName:t,paths:r}}));let o=U$();s.list&&(Gc(o),process.exit(0)),t||(console.error("transform \uC774\uB984\uC744 \uC785\uB825\uD574\uC8FC\uC138\uC694"),Gc(o),process.exit(1)),o.includes(t)||(console.error(`\uC774\uB984\uC774 ${t}\uC778 transform\uC774 \uC5C6\uC5B4\uC694`),Gc(o),process.exit(1)),r.length===0&&(console.error("\uD30C\uC77C \uACBD\uB85C\uB97C \uC785\uB825\uD574\uC8FC\uC138\uC694"),process.exit(1));let i=(0,Ao.resolve)(Kw,t,"index.js");console.log(Uc,`${r.join(", ")}\uC5D0 ${t} transform\uC744 \uC2E4\uD589\uD574\uC694.`),await B$(i,t,r,s)}),Yw.parse()}function F$(){(0,Io.satisfies)(process.versions.node,Co.engines.node)===!1&&(console.error(`Node.js \uBC84\uC804 \uC694\uAD6C\uC0AC\uD56D\uC744 \uB9CC\uC871\uC2DC\uD0A4\uC9C0 \uC54A\uC544\uC694: "${Co.engines.node}"
55
+ if (condition) { yield value; }`)};var ap=require("node:buffer"),cp=require("node:string_decoder");var Ss=(e,t,r)=>{if(r)return;if(e)return{transform:BE.bind(void 0,new TextEncoder)};let n=new cp.StringDecoder(t);return{transform:UE.bind(void 0,n),final:GE.bind(void 0,n)}},BE=function*(e,t){ap.Buffer.isBuffer(t)?yield Je(t):typeof t=="string"?yield e.encode(t):yield t},UE=function*(e,t){yield K(t)?e.write(t):t},GE=function*(e){let t=e.end();t!==""&&(yield t)};var ji=require("node:util"),Bi=(0,ji.callbackify)(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(let s of t.currentIterable)n.push(s)}finally{delete t.currentIterable}}),vs=async function*(e,t,r){if(r===t.length){yield e;return}let{transform:n=VE}=t[r];for await(let s of n(e))yield*vs(s,t,r+1)},up=async function*(e){for(let[t,{final:r}]of Object.entries(e))yield*qE(r,Number(t),e)},qE=async function*(e,t,r){if(e!==void 0)for await(let n of e())yield*vs(n,r,t+1)},lp=(0,ji.callbackify)(async({currentIterable:e},t)=>{if(e!==void 0){await(t?e.throw(t):e.return());return}if(t)throw t}),VE=function*(e){yield e};var Ui=(e,t,r,n)=>{try{for(let s of e(...t))r.push(s);n()}catch(s){n(s)}},fp=(e,t)=>[...t.flatMap(r=>[...Et(r,e,0)]),...Gr(e)],Et=function*(e,t,r){if(r===t.length){yield e;return}let{transform:n=WE}=t[r];for(let s of n(e))yield*Et(s,t,r+1)},Gr=function*(e){for(let[t,{final:r}]of Object.entries(e))yield*zE(r,Number(t),e)},zE=function*(e,t,r){if(e!==void 0)for(let n of e())yield*Et(n,r,t+1)},WE=function*(e){yield e};var Gi=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:s},optionName:o},{encoding:i})=>{let a={},c=dp(e,i,o),u=_t(t),l=_t(r),f=u?Bi.bind(void 0,vs,a):Ui.bind(void 0,Et),d=u||l?Bi.bind(void 0,up,a):Ui.bind(void 0,Gr),p=u||l?lp.bind(void 0,a):void 0;return{stream:new qr.Transform({writableObjectMode:n,writableHighWaterMark:(0,qr.getDefaultHighWaterMark)(n),readableObjectMode:s,readableHighWaterMark:(0,qr.getDefaultHighWaterMark)(s),transform(T,P,M){f([T,c,0],this,M)},flush(T){d([c],this,T)},destroy:p})}},_s=(e,t,r,n)=>{let s=t.filter(({type:i})=>i==="generator"),o=n?s.reverse():s;for(let{value:i,optionName:a}of o){let c=dp(i,r,a);e=fp(c,e)}return e},dp=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:s,preserveNewlines:o},i,a)=>{let c={};return[{transform:sp(n,a)},Ss(r,i,n),xs(r,o,n,c),{transform:e,final:t},{transform:op(s,a)},rp({binary:r,preserveNewlines:o,readableObjectMode:s,state:c})].filter(Boolean)};var pp=(e,t)=>{for(let r of HE(e))ZE(e,r,t)},HE=e=>new Set(Object.entries(e).filter(([,{direction:t}])=>t==="input").map(([t])=>Number(t))),ZE=(e,t,r)=>{let{stdioItems:n}=e[t],s=n.filter(({contents:a})=>a!==void 0);if(s.length===0)return;if(t!==0){let[{type:a,optionName:c}]=s;throw new TypeError(`Only the \`stdin\` option, not \`${c}\`, can be ${ft[a]} with synchronous methods.`)}let i=s.map(({contents:a})=>a).map(a=>YE(a,n));r.input=$r(i)},YE=(e,t)=>{let r=_s(e,t,"utf8",!0);return XE(r),$r(r)},XE=e=>{let t=e.find(r=>typeof r!="string"&&!K(r));if(t!==void 0)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)};var Ts=require("node:fs");var Es=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>n!=="all"&&Kt(r,n)&&!he.has(t)&&KE(n)&&(e.some(({type:s,value:o})=>s==="native"&&JE.has(o))||e.every(({type:s})=>ve.has(s))),KE=e=>e===1||e===2,JE=new Set(["pipe","overlapped"]),mp=async(e,t,r,n)=>{for await(let s of e)QE(t)||gp(s,r,n)},hp=(e,t,r)=>{for(let n of e)gp(n,t,r)},QE=e=>e._readableState.pipes.length>0,gp=(e,t,r)=>{let n=Pn(e);Be({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})};var yp=({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:s})=>{if(t===null)return{output:Array.from({length:3})};let o={},i=new Set([]);return{output:t.map((c,u)=>eT({result:c,fileDescriptors:e,fdNumber:u,state:o,outputFiles:i,isMaxBuffer:n,verboseInfo:s},r)),...o}},eT=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:s,isMaxBuffer:o,verboseInfo:i},{buffer:a,encoding:c,lines:u,stripFinalNewline:l,maxBuffer:f})=>{if(e===null)return;let d=hd(e,o,f),p=Je(d),{stdioItems:b,objectMode:T}=t[r],P=tT([p],b,c,n),{serializedResult:M,finalResult:j=M}=rT({chunks:P,objectMode:T,encoding:c,lines:u,stripFinalNewline:l,fdNumber:r});nT({serializedResult:M,fdNumber:r,state:n,verboseInfo:i,encoding:c,stdioItems:b,objectMode:T});let Y=a[r]?j:void 0;try{return n.error===void 0&&sT(M,b,s),Y}catch(X){return n.error=X,Y}},tT=(e,t,r,n)=>{try{return _s(e,t,r,!1)}catch(s){return n.error=s,e}},rT=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:s,fdNumber:o})=>{if(t)return{serializedResult:e};if(r==="buffer")return{serializedResult:$r(e)};let i=nu(e,r);return n[o]?{serializedResult:i,finalResult:Fi(i,!s[o],t)}:{serializedResult:i}},nT=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:s,stdioItems:o,objectMode:i})=>{if(!Es({stdioItems:o,encoding:s,verboseInfo:n,fdNumber:t}))return;let a=Fi(e,!1,i);try{hp(a,t,n)}catch(c){r.error??=c}},sT=(e,t,r)=>{for(let{path:n,append:s}of t.filter(({type:o})=>ys.has(o))){let o=typeof n=="string"?n:n.toString();s||r.has(o)?(0,Ts.appendFileSync)(n,e):(r.add(o),(0,Ts.writeFileSync)(n,e))}};var bp=([,e,t],r)=>{if(r.all)return e===void 0?t:t===void 0?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,tt(t,r,"all")]:Array.isArray(t)?[tt(e,r,"all"),...t]:K(e)&&K(t)?Go([e,t]):`${e}${t}`};var Os=require("node:events");var wp=async(e,t)=>{let[r,n]=await oT(e);return t.isForcefullyTerminated??=!1,[r,n]},oT=async e=>{let[t,r]=await Promise.allSettled([(0,Os.once)(e,"spawn"),(0,Os.once)(e,"exit")]);return t.status==="rejected"?[]:r.status==="rejected"?xp(e):r.value},xp=async e=>{try{return await(0,Os.once)(e,"exit")}catch{return xp(e)}},Sp=async e=>{let[t,r]=await e;if(!iT(t,r)&&qi(t,r))throw new Le;return[t,r]},iT=(e,t)=>e===void 0&&t===void 0,qi=(e,t)=>e!==0||t!==null;var vp=({error:e,status:t,signal:r,output:n},{maxBuffer:s})=>{let o=aT(e,t,r),i=(o==null?void 0:o.code)==="ETIMEDOUT",a=md(o,n,s);return{resultError:o,exitCode:t,signal:r,timedOut:i,isMaxBuffer:a}},aT=(e,t,r)=>e!==void 0?e:qi(t,r)?new Le:void 0;var Ep=(e,t,r)=>{let{file:n,commandArguments:s,command:o,escapedCommand:i,startTime:a,verboseInfo:c,options:u,fileDescriptors:l}=cT(e,t,r),f=fT({file:n,commandArguments:s,options:u,command:o,escapedCommand:i,verboseInfo:c,fileDescriptors:l,startTime:a});return ar(f,c,u)},cT=(e,t,r)=>{let{command:n,escapedCommand:s,startTime:o,verboseInfo:i}=Fn(e,t,r),a=uT(r),{file:c,commandArguments:u,options:l}=os(e,t,a);lT(l);let f=Jd(l,i);return{file:c,commandArguments:u,command:n,escapedCommand:s,startTime:o,verboseInfo:i,options:l,fileDescriptors:f}},uT=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,lT=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Rs("ipcInput"),e&&Rs("ipc: true"),r&&Rs("detached: true"),n&&Rs("cancelSignal")},Rs=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},fT=({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,verboseInfo:o,fileDescriptors:i,startTime:a})=>{let c=dT({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,fileDescriptors:i,startTime:a});if(c.failed)return c;let{resultError:u,exitCode:l,signal:f,timedOut:d,isMaxBuffer:p}=vp(c,r),{output:b,error:T=u}=yp({fileDescriptors:i,syncResult:c,options:r,isMaxBuffer:p,verboseInfo:o}),P=b.map((j,Y)=>tt(j,r,Y)),M=tt(bp(b,r),r,"all");return mT({error:T,exitCode:l,signal:f,timedOut:d,isMaxBuffer:p,stdio:P,all:M,options:r,command:n,escapedCommand:s,startTime:a})},dT=({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,fileDescriptors:o,startTime:i})=>{try{pp(o,r);let a=pT(r);return(0,_p.spawnSync)(e,t,a)}catch(a){return ir({error:a,command:n,escapedCommand:s,fileDescriptors:o,options:r,startTime:i,isSync:!0})}},pT=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:ps(t)}),mT=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:s,stdio:o,all:i,options:a,command:c,escapedCommand:u,startTime:l})=>e===void 0?ms({command:c,escapedCommand:u,stdio:o,all:i,ipcOutput:[],options:a,startTime:l}):Ur({error:e,command:c,escapedCommand:u,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:s,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:o,all:i,ipcOutput:[],options:a,startTime:l,isSync:!0});var $m=require("node:events"),Dm=require("node:child_process");var zi=q(require("node:process"),1);var ur=require("node:events");var Tp=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:s=!0,filter:o}={})=>(tr({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Jn(e)}),hT({anyProcess:e,channel:t,isSubprocess:r,filter:o,reference:s})),hT=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:s})=>{Zn(t,s);let o=lt(e,t,r),i=new AbortController;try{return await Promise.race([gT(o,n,i),yT(o,r,i),bT(o,r,i)])}catch(a){throw rr(e),a}finally{i.abort(),Yn(t,s)}},gT=async(e,t,{signal:r})=>{if(t===void 0){let[n]=await(0,ur.once)(e,"message",{signal:r});return n}for await(let[n]of(0,ur.on)(e,"message",{signal:r}))if(t(n))return n},yT=async(e,t,{signal:r})=>{await(0,ur.once)(e,"disconnect",{signal:r}),Hl(t)},bT=async(e,t,{signal:r})=>{let[n]=await(0,ur.once)(e,"strict:error",{signal:r});throw zn(n,t)};var Vr=require("node:events");var Rp=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:s=!0}={})=>Vi({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:s}),Vi=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:s,reference:o})=>{tr({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Jn(e)}),Zn(t,o);let i=lt(e,t,r),a=new AbortController,c={};return wT(e,i,a),xT({ipcEmitter:i,isSubprocess:r,controller:a,state:c}),ST({anyProcess:e,channel:t,ipcEmitter:i,isSubprocess:r,shouldAwait:s,controller:a,state:c,reference:o})},wT=async(e,t,r)=>{try{await(0,Vr.once)(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},xT=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{let[s]=await(0,Vr.once)(e,"strict:error",{signal:r.signal});n.error=zn(s,t),r.abort()}catch{}},ST=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:s,controller:o,state:i,reference:a}){try{for await(let[c]of(0,Vr.on)(r,"message",{signal:o.signal}))Op(i),yield c}catch{Op(i)}finally{o.abort(),Yn(t,a),n||rr(e),s&&await e}},Op=({error:e})=>{if(e)throw e};var kp=(e,{ipc:t})=>{Object.assign(e,Ap(e,!1,t))},Cp=()=>{let e=zi.default,t=!0,r=zi.default.channel!==void 0;return{...Ap(e,t,r),getCancelSignal:kf.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}},Ap=(e,t,r)=>({sendMessage:rs.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:Tp.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Rp.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})});var Ip=require("node:child_process"),dt=require("node:stream");var $p=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,verboseInfo:i})=>{Li(n);let a=new Ip.ChildProcess;vT(a,n),Object.assign(a,{readable:_T,writable:ET,duplex:TT});let c=ir({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,isSync:!1}),u=OT(c,i,s);return{subprocess:a,promise:u}},vT=(e,t)=>{let r=zr(),n=zr(),s=zr(),o=Array.from({length:t.length-3},zr),i=zr(),a=[r,n,s,...o];Object.assign(e,{stdin:r,stdout:n,stderr:s,all:i,stdio:a})},zr=()=>{let e=new dt.PassThrough;return e.end(),e},_T=()=>new dt.Readable({read(){}}),ET=()=>new dt.Writable({write(){}}),TT=()=>new dt.Duplex({read(){},write(){}}),OT=async(e,t,r)=>ar(e,t,r);var lr=require("node:fs"),Lp=require("node:buffer"),ze=require("node:stream");var Np=(e,t)=>ws(RT,e,t,!1),Wr=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${ft[e]}.`)},Dp={fileNumber:Wr,generator:Gi,asyncGenerator:Gi,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){let n=t||r;return{stream:ze.Duplex.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},RT={input:{...Dp,fileUrl:({value:e})=>({stream:(0,lr.createReadStream)(e)}),filePath:({value:{file:e}})=>({stream:(0,lr.createReadStream)(e)}),webStream:({value:e})=>({stream:ze.Readable.fromWeb(e)}),iterable:({value:e})=>({stream:ze.Readable.from(e)}),asyncIterable:({value:e})=>({stream:ze.Readable.from(e)}),string:({value:e})=>({stream:ze.Readable.from(e)}),uint8Array:({value:e})=>({stream:ze.Readable.from(Lp.Buffer.from(e))})},output:{...Dp,fileUrl:({value:e})=>({stream:(0,lr.createWriteStream)(e)}),filePath:({value:{file:e,append:t}})=>({stream:(0,lr.createWriteStream)(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:ze.Writable.fromWeb(e)}),iterable:Wr,asyncIterable:Wr,string:Wr,uint8Array:Wr}};var Hr=require("node:events"),Cs=require("node:stream"),Zi=require("node:stream/promises");function Tt(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(let s of e)Hi(s);let t=e.some(({readableObjectMode:s})=>s),r=kT(e,t),n=new Wi({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(let s of e)n.add(s);return n}var kT=(e,t)=>{if(e.length===0)return(0,Cs.getDefaultHighWaterMark)(t);let r=e.filter(({readableObjectMode:n})=>n===t).map(({readableHighWaterMark:n})=>n);return Math.max(...r)},Wi=class extends Cs.PassThrough{#t=new Set([]);#r=new Set([]);#e=new Set([]);#n;#o=Symbol("unpipe");#s=new WeakMap;add(t){if(Hi(t),this.#t.has(t))return;this.#t.add(t),this.#n??=CT(this,this.#t,this.#o);let r=$T({passThroughStream:this,stream:t,streams:this.#t,ended:this.#r,aborted:this.#e,onFinished:this.#n,unpipeEvent:this.#o});this.#s.set(t,r),t.pipe(this,{end:!1})}async remove(t){if(Hi(t),!this.#t.has(t))return!1;let r=this.#s.get(t);return r===void 0?!1:(this.#s.delete(t),t.unpipe(this),await r,!0)}},CT=async(e,t,r)=>{ks(e,Pp);let n=new AbortController;try{await Promise.race([AT(e,n),IT(e,t,r,n)])}finally{n.abort(),ks(e,-Pp)}},AT=async(e,{signal:t})=>{try{await(0,Zi.finished)(e,{signal:t,cleanup:!0})}catch(r){throw Fp(e,r),r}},IT=async(e,t,r,{signal:n})=>{for await(let[s]of(0,Hr.on)(e,"unpipe",{signal:n}))t.has(s)&&s.emit(r)},Hi=e=>{if(typeof(e==null?void 0:e.pipe)!="function")throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},$T=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,onFinished:o,unpipeEvent:i})=>{ks(e,Mp);let a=new AbortController;try{await Promise.race([DT(o,t,a),LT({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,controller:a}),NT({stream:t,streams:r,ended:n,aborted:s,unpipeEvent:i,controller:a})])}finally{a.abort(),ks(e,-Mp)}r.size>0&&r.size===n.size+s.size&&(n.size===0&&s.size>0?Yi(e):PT(e))},DT=async(e,t,{signal:r})=>{try{await e,r.aborted||Yi(t)}catch(n){r.aborted||Fp(t,n)}},LT=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,controller:{signal:o}})=>{try{await(0,Zi.finished)(t,{signal:o,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(i){if(o.aborted||!r.has(t))return;jp(i)?s.add(t):Bp(e,i)}},NT=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:s,controller:{signal:o}})=>{if(await(0,Hr.once)(e,s,{signal:o}),!e.readable)return(0,Hr.once)(o,"abort",{signal:o});t.delete(e),r.delete(e),n.delete(e)},PT=e=>{e.writable&&e.end()},Fp=(e,t)=>{jp(t)?Yi(e):Bp(e,t)},jp=e=>(e==null?void 0:e.code)==="ERR_STREAM_PREMATURE_CLOSE",Yi=e=>{(e.readable||e.writable)&&e.destroy()},Bp=(e,t)=>{e.destroyed||(e.once("error",MT),e.destroy(t))},MT=()=>{},ks=(e,t)=>{let r=e.getMaxListeners();r!==0&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Pp=2,Mp=1;var Xi=require("node:stream/promises");var fr=(e,t)=>{e.pipe(t),FT(e,t),jT(e,t)},FT=async(e,t)=>{if(!(De(e)||De(t))){try{await(0,Xi.finished)(e,{cleanup:!0,readable:!0,writable:!1})}catch{}Ki(t)}},Ki=e=>{e.writable&&e.end()},jT=async(e,t)=>{if(!(De(e)||De(t))){try{await(0,Xi.finished)(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Ji(e)}},Ji=e=>{e.readable&&e.destroy()};var Up=(e,t,r)=>{let n=new Map;for(let[s,{stdioItems:o,direction:i}]of Object.entries(t)){for(let{stream:a}of o.filter(({type:c})=>ve.has(c)))BT(e,a,i,s);for(let{stream:a}of o.filter(({type:c})=>!ve.has(c)))GT({subprocess:e,stream:a,direction:i,fdNumber:s,pipeGroups:n,controller:r})}for(let[s,o]of n.entries()){let i=o.length===1?o[0]:Tt(o);fr(i,s)}},BT=(e,t,r,n)=>{r==="output"?fr(e.stdio[n],t):fr(t,e.stdio[n]);let s=UT[n];s!==void 0&&(e[s]=t),e.stdio[n]=t},UT=["stdin","stdout","stderr"],GT=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:s,controller:o})=>{if(t===void 0)return;qT(t,o);let[i,a]=r==="output"?[t,e.stdio[n]]:[e.stdio[n],t],c=s.get(i)??[];s.set(i,[...c,a])},qT=(e,{signal:t})=>{De(e)&&St(e,VT,t)},VT=2;var qp=require("node:events");var Ot=[];Ot.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Ot.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Ot.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var As=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",Qi=Symbol.for("signal-exit emitter"),ea=globalThis,zT=Object.defineProperty.bind(Object),ta=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(ea[Qi])return ea[Qi];zT(ea,Qi,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,r){this.listeners[t].push(r)}removeListener(t,r){let n=this.listeners[t],s=n.indexOf(r);s!==-1&&(s===0&&n.length===1?n.length=0:n.splice(s,1))}emit(t,r,n){if(this.emitted[t])return!1;this.emitted[t]=!0;let s=!1;for(let o of this.listeners[t])s=o(r,n)===!0||s;return t==="exit"&&(s=this.emit("afterExit",r,n)||s),s}},Is=class{},WT=e=>({onExit(t,r){return e.onExit(t,r)},load(){return e.load()},unload(){return e.unload()}}),ra=class extends Is{onExit(){return()=>{}}load(){}unload(){}},na=class extends Is{#t=sa.platform==="win32"?"SIGINT":"SIGHUP";#r=new ta;#e;#n;#o;#s={};#i=!1;constructor(t){super(),this.#e=t,this.#s={};for(let r of Ot)this.#s[r]=()=>{let n=this.#e.listeners(r),{count:s}=this.#r,o=t;if(typeof o.__signal_exit_emitter__=="object"&&typeof o.__signal_exit_emitter__.count=="number"&&(s+=o.__signal_exit_emitter__.count),n.length===s){this.unload();let i=this.#r.emit("exit",null,r),a=r==="SIGHUP"?this.#t:r;i||t.kill(t.pid,a)}};this.#o=t.reallyExit,this.#n=t.emit}onExit(t,r){if(!As(this.#e))return()=>{};this.#i===!1&&this.load();let n=r!=null&&r.alwaysLast?"afterExit":"exit";return this.#r.on(n,t),()=>{this.#r.removeListener(n,t),this.#r.listeners.exit.length===0&&this.#r.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#r.count+=1;for(let t of Ot)try{let r=this.#s[t];r&&this.#e.on(t,r)}catch{}this.#e.emit=(t,...r)=>this.#c(t,...r),this.#e.reallyExit=t=>this.#a(t)}}unload(){this.#i&&(this.#i=!1,Ot.forEach(t=>{let r=this.#s[t];if(!r)throw new Error("Listener not defined for signal: "+t);try{this.#e.removeListener(t,r)}catch{}}),this.#e.emit=this.#n,this.#e.reallyExit=this.#o,this.#r.count-=1)}#a(t){return As(this.#e)?(this.#e.exitCode=t||0,this.#r.emit("exit",this.#e.exitCode,null),this.#o.call(this.#e,this.#e.exitCode)):0}#c(t,...r){let n=this.#n;if(t==="exit"&&As(this.#e)){typeof r[0]=="number"&&(this.#e.exitCode=r[0]);let s=n.call(this.#e,t,...r);return this.#r.emit("exit",this.#e.exitCode,null),s}else return n.call(this.#e,t,...r)}},sa=globalThis.process,{onExit:Gp,load:Lj,unload:Nj}=WT(As(sa)?new na(sa):new ra);var Vp=(e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;let s=Gp(()=>{e.kill()});(0,qp.addAbortListener)(n,()=>{s()})};var Wp=({source:e,sourcePromise:t,boundOptions:r,createNested:n},...s)=>{let o=Mn(),{destination:i,destinationStream:a,destinationError:c,from:u,unpipeSignal:l}=HT(r,n,s),{sourceStream:f,sourceError:d}=YT(e,u),{options:p,fileDescriptors:b}=Ge.get(e);return{sourcePromise:t,sourceStream:f,sourceOptions:p,sourceError:d,destination:i,destinationStream:a,destinationError:c,unpipeSignal:l,fileDescriptors:b,startTime:o}},HT=(e,t,r)=>{try{let{destination:n,pipeOptions:{from:s,to:o,unpipeSignal:i}={}}=ZT(e,t,...r),a=Hn(n,o);return{destination:n,destinationStream:a,from:s,unpipeSignal:i}}catch(n){return{destinationError:n}}},ZT=(e,t,r,...n)=>{if(Array.isArray(r))return{destination:t(zp,e)(r,...n),pipeOptions:e};if(typeof r=="string"||r instanceof URL||Bo(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');let[s,o,i]=Tn(r,...n);return{destination:t(zp)(s,o,i),pipeOptions:i}}if(Ge.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},zp=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),YT=(e,t)=>{try{return{sourceStream:nr(e,t)}}catch(r){return{sourceError:r}}};var Zp=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:s,sourceOptions:o,startTime:i})=>{let a=XT({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(a!==void 0)throw oa({error:a,fileDescriptors:s,sourceOptions:o,startTime:i})},XT=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>{if(t!==void 0&&n!==void 0)return n;if(n!==void 0)return Ji(e),n;if(t!==void 0)return Ki(r),t},oa=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>ir({error:e,command:Hp,escapedCommand:Hp,fileDescriptors:t,options:r,startTime:n,isSync:!1}),Hp="source.pipe(destination)";var Yp=async e=>{let[{status:t,reason:r,value:n=r},{status:s,reason:o,value:i=o}]=await e;if(i.pipedFrom.includes(n)||i.pipedFrom.push(n),s==="rejected")throw i;if(t==="rejected")throw n;return i};var Xp=require("node:stream/promises");var Kp=(e,t,r)=>{let n=$s.has(t)?JT(e,t):KT(e,t);return St(e,e0,r.signal),St(t,t0,r.signal),QT(t),n},KT=(e,t)=>{let r=Tt([e]);return fr(r,t),$s.set(t,r),r},JT=(e,t)=>{let r=$s.get(t);return r.add(e),r},QT=async e=>{try{await(0,Xp.finished)(e,{cleanup:!0,readable:!1,writable:!0})}catch{}$s.delete(e)},$s=new WeakMap,e0=2,t0=1;var Jp=require("node:util");var Qp=(e,t)=>e===void 0?[]:[r0(e,t)],r0=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:s,startTime:o})=>{await(0,Jp.aborted)(e,t),await r.remove(t);let i=new Error("Pipe canceled by `unpipeSignal` option.");throw oa({error:i,fileDescriptors:n,sourceOptions:s,startTime:o})};var Ds=(e,...t)=>{if(W(t[0]))return Ds.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});let{destination:r,...n}=Wp(e,...t),s=n0({...n,destination:r});return s.pipe=Ds.bind(void 0,{...e,source:r,sourcePromise:s,boundOptions:{}}),s},n0=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:s,destinationStream:o,destinationError:i,unpipeSignal:a,fileDescriptors:c,startTime:u})=>{let l=s0(e,s);Zp({sourceStream:t,sourceError:n,destinationStream:o,destinationError:i,fileDescriptors:c,sourceOptions:r,startTime:u});let f=new AbortController;try{let d=Kp(t,o,f);return await Promise.race([Yp(l),...Qp(a,{sourceStream:t,mergedStream:d,sourceOptions:r,fileDescriptors:c,startTime:u})])}finally{f.abort()}},s0=(e,t)=>Promise.allSettled([e,t]);var sm=require("node:timers/promises");var tm=require("node:events"),rm=require("node:stream");var Ls=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:s,preserveNewlines:o})=>{let i=new AbortController;return o0(t,i),nm({stream:e,controller:i,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:s,shouldSplit:!e.readableObjectMode,preserveNewlines:o})},o0=async(e,t)=>{try{await e}catch{}finally{t.abort()}},ia=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:s,allMixed:o})=>{let i=new AbortController;i0(t,i,e);let a=e.readableObjectMode&&!o;return nm({stream:e,controller:i,binary:n==="buffer",shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!s})},i0=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},nm=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i})=>{let a=(0,tm.on)(e,"data",{signal:t.signal,highWaterMark:em,highWatermark:em});return a0({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i})},aa=(0,rm.getDefaultHighWaterMark)(!0),em=aa,a0=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i}){let a=c0({binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i});try{for await(let[c]of e)yield*Et(c,a,0)}catch(c){if(!t.signal.aborted)throw c}finally{yield*Gr(a)}},c0=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:s})=>[Ss(e,r,!t),xs(e,s,!n,{})].filter(Boolean);var om=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:s,maxBuffer:o,lines:i,allMixed:a,stripFinalNewline:c,verboseInfo:u,streamInfo:l})=>{let f=u0({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:u,streamInfo:l});if(!s){await Promise.all([l0(e),f]);return}let d=Pi(c,r),p=ia({stream:e,onStreamEnd:t,lines:i,encoding:n,stripFinalNewline:d,allMixed:a}),[b]=await Promise.all([f0({stream:e,iterable:p,fdNumber:r,encoding:n,maxBuffer:o,lines:i}),f]);return b},u0=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:s,verboseInfo:o,streamInfo:{fileDescriptors:i}})=>{var c;if(!Es({stdioItems:(c=i[r])==null?void 0:c.stdioItems,encoding:n,verboseInfo:o,fdNumber:r}))return;let a=ia({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:s});await mp(a,e,r,o)},l0=async e=>{await(0,sm.setImmediate)(),e.readableFlowing===null&&e.resume()},f0=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:s,maxBuffer:o,lines:i})=>{try{return t||i?await us(r,{maxBuffer:o}):s==="buffer"?new Uint8Array(await ls(r,{maxBuffer:o})):await ds(r,{maxBuffer:o})}catch(a){return im(fd({error:a,stream:e,readableObjectMode:t,lines:i,encoding:s,fdNumber:n}))}},ca=async e=>{try{return await e}catch(t){return im(t)}},im=({bufferedData:e})=>tu(e)?new Uint8Array(e):e;var cm=require("node:stream/promises"),Zr=async(e,t,r,{isSameDirection:n,stopOnExit:s=!1}={})=>{let o=d0(e,r),i=new AbortController;try{await Promise.race([...s?[r.exitPromise]:[],(0,cm.finished)(e,{cleanup:!0,signal:i.signal})])}catch(a){o.stdinCleanedUp||h0(a,t,r,n)}finally{i.abort()}},d0=(e,{originalStreams:[t],subprocess:r})=>{let n={stdinCleanedUp:!1};return e===t&&p0(e,r,n),n},p0=(e,t,r)=>{let{_destroy:n}=e;e._destroy=(...s)=>{m0(t,r),n.call(e,...s)}},m0=({exitCode:e,signalCode:t},r)=>{(e!==null||t!==null)&&(r.stdinCleanedUp=!0)},h0=(e,t,r,n)=>{if(!g0(e,t,r,n))throw e},g0=(e,t,r,n=!0)=>r.propagating?am(e)||Ns(e):(r.propagating=!0,ua(r,t)===n?am(e):Ns(e)),ua=({fileDescriptors:e},t)=>t!=="all"&&e[t].direction==="input",Ns=e=>(e==null?void 0:e.code)==="ERR_STREAM_PREMATURE_CLOSE",am=e=>(e==null?void 0:e.code)==="EPIPE";var um=({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:o,verboseInfo:i,streamInfo:a})=>e.stdio.map((c,u)=>la({stream:c,fdNumber:u,encoding:t,buffer:r[u],maxBuffer:n[u],lines:s[u],allMixed:!1,stripFinalNewline:o,verboseInfo:i,streamInfo:a})),la=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:s,lines:o,allMixed:i,stripFinalNewline:a,verboseInfo:c,streamInfo:u})=>{if(!e)return;let l=Zr(e,t,u);if(ua(u,t)){await l;return}let[f]=await Promise.all([om({stream:e,onStreamEnd:l,fdNumber:t,encoding:r,buffer:n,maxBuffer:s,lines:o,allMixed:i,stripFinalNewline:a,verboseInfo:c,streamInfo:u}),l]);return f};var lm=({stdout:e,stderr:t},{all:r})=>r&&(e||t)?Tt([e,t].filter(Boolean)):void 0,fm=({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:o,verboseInfo:i,streamInfo:a})=>la({...y0(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:s[1]||s[2],allMixed:b0(e),stripFinalNewline:o,verboseInfo:i,streamInfo:a}),y0=({stdout:e,stderr:t,all:r},[,n,s])=>{let o=n||s;return o?n?s?{stream:r,buffer:o}:{stream:e,buffer:o}:{stream:t,buffer:o}:{stream:r,buffer:o}},b0=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode;var gm=require("node:events");var dm=e=>Kt(e,"ipc"),pm=(e,t)=>{let r=Pn(e);Be({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})};var mm=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:s,verboseInfo:o})=>{if(!n)return s;let i=dm(o),a=Qe(t,"ipc"),c=Qe(r,"ipc");for await(let u of Vi({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(dd(e,s,c),s.push(u)),i&&pm(u,o);return s},hm=async(e,t)=>(await Promise.allSettled([e]),t);var ym=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:s,timeoutDuration:o,cancelSignal:i,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:u,ipc:l,ipcInput:f},context:d,verboseInfo:p,fileDescriptors:b,originalStreams:T,onInternalError:P,controller:M})=>{let j=wp(e,d),Y={originalStreams:T,fileDescriptors:b,subprocess:e,exitPromise:j,propagating:!1},X=um({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:u,verboseInfo:p,streamInfo:Y}),we=fm({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:u,verboseInfo:p,streamInfo:Y}),ce=[],Ae=mm({subprocess:e,buffer:r,maxBuffer:n,ipc:l,ipcOutput:ce,verboseInfo:p}),Ie=w0(T,e,Y),xe=x0(b,Y);try{return await Promise.race([Promise.all([{},Sp(j),Promise.all(X),we,Ae,jf(e,f),...Ie,...xe]),P,S0(e,M),...Lf(e,o,d,M),...Wl({subprocess:e,cancelSignal:i,gracefulCancel:a,context:d,controller:M}),...If({subprocess:e,cancelSignal:i,gracefulCancel:a,forceKillAfterDelay:c,context:d,controller:M})])}catch(Ar){return d.terminationReason??="other",Promise.all([{error:Ar},j,Promise.all(X.map(xt=>ca(xt))),ca(we),hm(Ae,ce),Promise.allSettled(Ie),Promise.allSettled(xe)])}},w0=(e,t,r)=>e.map((n,s)=>n===t.stdio[s]?void 0:Zr(n,s,r)),x0=(e,t)=>e.flatMap(({stdioItems:r},n)=>r.filter(({value:s,stream:o=s})=>Pe(o,{checkOpen:!1})&&!De(o)).map(({type:s,value:o,stream:i=o})=>Zr(i,n,t,{isSameDirection:ve.has(s),stopOnExit:s==="native"}))),S0=async(e,{signal:t})=>{let[r]=await(0,gm.once)(e,"error",{signal:t});throw r};var bm=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),Yr=(e,t,r)=>{let n=e[r];n.has(t)||n.set(t,[]);let s=n.get(t),o=Ue();return s.push(o),{resolve:o.resolve.bind(o),promises:s}},dr=async({resolve:e,promises:t},r)=>{e();let[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n};var xm=require("node:stream"),Sm=require("node:util");var fa=require("node:stream/promises");var da=async e=>{if(e!==void 0)try{await pa(e)}catch{}},wm=async e=>{if(e!==void 0)try{await ma(e)}catch{}},pa=async e=>{await(0,fa.finished)(e,{cleanup:!0,readable:!1,writable:!0})},ma=async e=>{await(0,fa.finished)(e,{cleanup:!0,readable:!0,writable:!1})},Ps=async(e,t)=>{if(await e,t)throw t},Ms=(e,t,r)=>{r&&!Ns(r)?e.destroy(r):t&&e.destroy()};var vm=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:s=!0,preserveNewlines:o=!0}={})=>{let i=s||he.has(r),{subprocessStdout:a,waitReadableDestroy:c}=ha(e,n,t),{readableEncoding:u,readableObjectMode:l,readableHighWaterMark:f}=ga(a,i),{read:d,onStdoutDataDone:p}=ya({subprocessStdout:a,subprocess:e,binary:i,encoding:r,preserveNewlines:o}),b=new xm.Readable({read:d,destroy:(0,Sm.callbackify)(wa.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:f,objectMode:l,encoding:u});return ba({subprocessStdout:a,onStdoutDataDone:p,readable:b,subprocess:e}),b},ha=(e,t,r)=>{let n=nr(e,t),s=Yr(r,n,"readableDestroy");return{subprocessStdout:n,waitReadableDestroy:s}},ga=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:aa},ya=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:s})=>{let o=Ue(),i=Ls({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:s});return{read(){v0(this,i,o)},onStdoutDataDone:o}},v0=async(e,t,r)=>{try{let{value:n,done:s}=await t.next();s?r.resolve():e.push(n)}catch{}},ba=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:s})=>{try{await ma(e),await n,await da(s),await t,r.readable&&r.push(null)}catch(o){await da(s),_m(r,o)}},wa=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await dr(r,t)&&(_m(e,n),await Ps(t,n))},_m=(e,t)=>{Ms(e,e.readable,t)};var Em=require("node:stream"),xa=require("node:util");var Tm=({subprocess:e,concurrentStreams:t},{to:r}={})=>{let{subprocessStdin:n,waitWritableFinal:s,waitWritableDestroy:o}=Sa(e,r,t),i=new Em.Writable({...va(n,e,s),destroy:(0,xa.callbackify)(Ea.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:s,waitWritableDestroy:o})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return _a(n,i),i},Sa=(e,t,r)=>{let n=Hn(e,t),s=Yr(r,n,"writableFinal"),o=Yr(r,n,"writableDestroy");return{subprocessStdin:n,waitWritableFinal:s,waitWritableDestroy:o}},va=(e,t,r)=>({write:_0.bind(void 0,e),final:(0,xa.callbackify)(E0.bind(void 0,e,t,r))}),_0=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},E0=async(e,t,r)=>{await dr(r,t)&&(e.writable&&e.end(),await t)},_a=async(e,t,r)=>{try{await pa(e),t.writable&&t.end()}catch(n){await wm(r),Om(t,n)}},Ea=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},s)=>{await dr(r,t),await dr(n,t)&&(Om(e,s),await Ps(t,s))},Om=(e,t)=>{Ms(e,e.writable,t)};var Rm=require("node:stream"),km=require("node:util");var Cm=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:s,binary:o=!0,preserveNewlines:i=!0}={})=>{let a=o||he.has(r),{subprocessStdout:c,waitReadableDestroy:u}=ha(e,n,t),{subprocessStdin:l,waitWritableFinal:f,waitWritableDestroy:d}=Sa(e,s,t),{readableEncoding:p,readableObjectMode:b,readableHighWaterMark:T}=ga(c,a),{read:P,onStdoutDataDone:M}=ya({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:i}),j=new Rm.Duplex({read:P,...va(l,e,f),destroy:(0,km.callbackify)(T0.bind(void 0,{subprocessStdout:c,subprocessStdin:l,subprocess:e,waitReadableDestroy:u,waitWritableFinal:f,waitWritableDestroy:d})),readableHighWaterMark:T,writableHighWaterMark:l.writableHighWaterMark,readableObjectMode:b,writableObjectMode:l.writableObjectMode,encoding:p});return ba({subprocessStdout:c,onStdoutDataDone:M,readable:j,subprocess:e,subprocessStdin:l}),_a(l,j,c),j},T0=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:s,waitWritableDestroy:o},i)=>{await Promise.all([wa({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},i),Ea({subprocessStdin:t,subprocess:r,waitWritableFinal:s,waitWritableDestroy:o},i)])};var Ta=(e,t,{from:r,binary:n=!1,preserveNewlines:s=!1}={})=>{let o=n||he.has(t),i=nr(e,r),a=Ls({subprocessStdout:i,subprocess:e,binary:o,shouldEncode:!0,encoding:t,preserveNewlines:s});return O0(a,i,e)},O0=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}};var Am=(e,{encoding:t})=>{let r=bm();e.readable=vm.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=Tm.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=Cm.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ta.bind(void 0,e,t),e[Symbol.asyncIterator]=Ta.bind(void 0,e,t,{})};var Im=(e,t)=>{for(let[r,n]of k0){let s=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:s})}},R0=(async()=>{})().constructor.prototype,k0=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(R0,e)]);var Lm=(e,t,r,n)=>{let{file:s,commandArguments:o,command:i,escapedCommand:a,startTime:c,verboseInfo:u,options:l,fileDescriptors:f}=C0(e,t,r),{subprocess:d,promise:p}=I0({file:s,commandArguments:o,options:l,startTime:c,verboseInfo:u,command:i,escapedCommand:a,fileDescriptors:f});return d.pipe=Ds.bind(void 0,{source:d,sourcePromise:p,boundOptions:{},createNested:n}),Im(d,p),Ge.set(d,{options:l,fileDescriptors:f}),d},C0=(e,t,r)=>{let{command:n,escapedCommand:s,startTime:o,verboseInfo:i}=Fn(e,t,r),{file:a,commandArguments:c,options:u}=os(e,t,r),l=A0(u),f=Np(l,i);return{file:a,commandArguments:c,command:n,escapedCommand:s,startTime:o,verboseInfo:i,options:l,fileDescriptors:f}},A0=({timeout:e,signal:t,...r})=>{if(t!==void 0)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},I0=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:s,command:o,escapedCommand:i,fileDescriptors:a})=>{let c;try{c=(0,Dm.spawn)(e,t,r)}catch(b){return $p({error:b,command:o,escapedCommand:i,fileDescriptors:a,options:r,startTime:n,verboseInfo:s})}let u=new AbortController;(0,$m.setMaxListeners)(Number.POSITIVE_INFINITY,u.signal);let l=[...c.stdio];Up(c,a,u),Vp(c,r,u);let f={},d=Ue();c.kill=ql.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:d,context:f,controller:u}),c.all=lm(c,r),Am(c,r),kp(c,r);let p=$0({subprocess:c,options:r,startTime:n,verboseInfo:s,fileDescriptors:a,originalStreams:l,command:o,escapedCommand:i,context:f,onInternalError:d,controller:u});return{subprocess:c,promise:p}},$0=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:s,originalStreams:o,command:i,escapedCommand:a,context:c,onInternalError:u,controller:l})=>{let[f,[d,p],b,T,P]=await ym({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:s,originalStreams:o,onInternalError:u,controller:l});l.abort(),u.resolve();let M=b.map((X,we)=>tt(X,t,we)),j=tt(T,t,"all"),Y=D0({errorInfo:f,exitCode:d,signal:p,stdio:M,all:j,ipcOutput:P,context:c,options:t,command:i,escapedCommand:a,startTime:r});return ar(Y,n,t)},D0=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:s,ipcOutput:o,context:i,options:a,command:c,escapedCommand:u,startTime:l})=>"error"in e?Ur({error:e.error,command:c,escapedCommand:u,timedOut:i.terminationReason==="timeout",isCanceled:i.terminationReason==="cancel"||i.terminationReason==="gracefulCancel",isGracefullyCanceled:i.terminationReason==="gracefulCancel",isMaxBuffer:e.error instanceof qe,isForcefullyTerminated:i.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:s,ipcOutput:o,options:a,startTime:l,isSync:!1}):ms({command:c,escapedCommand:u,stdio:n,all:s,ipcOutput:o,options:a,startTime:l});var Fs=(e,t)=>{let r=Object.fromEntries(Object.entries(t).map(([n,s])=>[n,L0(n,e[n],s)]));return{...e,...r}},L0=(e,t,r)=>N0.has(e)&&W(t)&&W(r)?{...t,...r}:r,N0=new Set(["env",...zo]);var pt=(e,t,r,n)=>{let s=(i,a,c)=>pt(i,a,r,c),o=(...i)=>P0({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:s},...i);return n!==void 0&&n(o,s,t),o},P0=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:s},o,...i)=>{if(W(o))return s(e,Fs(r,o),n);let{file:a,commandArguments:c,options:u,isSync:l}=M0({mapArguments:e,firstArgument:o,nextArguments:i,deepOptions:t,boundOptions:r});return l?Ep(a,c,u):Lm(a,c,u,s)},M0=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:s})=>{let o=cu(t)?uu(t,r):[t,...r],[i,a,c]=Tn(...o),u=Fs(Fs(n,s),c),{file:l=i,commandArguments:f=a,options:d=u,isSync:p=!1}=e({file:i,commandArguments:a,options:u});return{file:l,commandArguments:f,options:d,isSync:p}};var Nm=({file:e,commandArguments:t})=>Mm(e,t),Pm=({file:e,commandArguments:t})=>({...Mm(e,t),isSync:!0}),Mm=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);let[r,...n]=F0(e);return{file:r,commandArguments:n}},F0=e=>{if(typeof e!="string")throw new TypeError(`The command must be a string: ${String(e)}.`);let t=e.trim();if(t==="")return[];let r=[];for(let n of t.split(j0)){let s=r.at(-1);s&&s.endsWith("\\")?r[r.length-1]=`${s.slice(0,-1)} ${n}`:r.push(n)}return r},j0=/ +/g;var Fm=(e,t,r)=>{e.sync=t(B0,r),e.s=e.sync},jm=({options:e})=>Bm(e),B0=({options:e})=>({...Bm(e),isSync:!0}),Bm=e=>({options:{...U0(e),...e}}),U0=({input:e,inputFile:t,stdio:r})=>e===void 0&&t===void 0&&r===void 0?{stdin:"inherit"}:{},Um={preferLocal:!0};var Gm=pt(()=>({})),iG=pt(()=>({isSync:!0})),aG=pt(Nm),cG=pt(Pm),uG=pt(Nf),lG=pt(jm,{},Um,Fm),{sendMessage:fG,getOneMessage:dG,getEachMessage:pG,getCancelSignal:mG}=Cp();var Zw=require("fs"),Do=require("path"),Lo=q(Ig());var Fe={};Sx(Fe,{BRAND:()=>cC,DIRTY:()=>kt,EMPTY_PATH:()=>Bk,INVALID:()=>R,NEVER:()=>WC,OK:()=>re,ParseStatus:()=>ee,Schema:()=>L,ZodAny:()=>gt,ZodArray:()=>ot,ZodBigInt:()=>At,ZodBoolean:()=>It,ZodBranded:()=>an,ZodCatch:()=>Gt,ZodDate:()=>$t,ZodDefault:()=>Ut,ZodDiscriminatedUnion:()=>eo,ZodEffects:()=>Re,ZodEnum:()=>jt,ZodError:()=>le,ZodFirstPartyTypeKind:()=>k,ZodFunction:()=>ro,ZodIntersection:()=>Pt,ZodIssueCode:()=>m,ZodLazy:()=>Mt,ZodLiteral:()=>Ft,ZodMap:()=>xr,ZodNaN:()=>vr,ZodNativeEnum:()=>Bt,ZodNever:()=>Me,ZodNull:()=>Lt,ZodNullable:()=>Ye,ZodNumber:()=>Ct,ZodObject:()=>fe,ZodOptional:()=>Te,ZodParsedType:()=>w,ZodPipeline:()=>cn,ZodPromise:()=>yt,ZodReadonly:()=>qt,ZodRecord:()=>to,ZodSchema:()=>L,ZodSet:()=>Sr,ZodString:()=>ht,ZodSymbol:()=>br,ZodTransformer:()=>Re,ZodTuple:()=>Ze,ZodType:()=>L,ZodUndefined:()=>Dt,ZodUnion:()=>Nt,ZodUnknown:()=>st,ZodVoid:()=>wr,addIssueToContext:()=>y,any:()=>yC,array:()=>SC,bigint:()=>dC,boolean:()=>qg,coerce:()=>zC,custom:()=>Bg,date:()=>pC,datetimeRegex:()=>Fg,defaultErrorMap:()=>rt,discriminatedUnion:()=>TC,effect:()=>MC,enum:()=>LC,function:()=>IC,getErrorMap:()=>hr,getParsedType:()=>He,instanceof:()=>lC,intersection:()=>OC,isAborted:()=>Ks,isAsync:()=>gr,isDirty:()=>Js,isValid:()=>mt,late:()=>uC,lazy:()=>$C,literal:()=>DC,makeIssue:()=>nn,map:()=>CC,nan:()=>fC,nativeEnum:()=>NC,never:()=>wC,null:()=>gC,nullable:()=>jC,number:()=>Gg,object:()=>vC,objectUtil:()=>Va,oboolean:()=>VC,onumber:()=>qC,optional:()=>FC,ostring:()=>GC,pipeline:()=>UC,preprocess:()=>BC,promise:()=>PC,quotelessJson:()=>Mk,record:()=>kC,set:()=>AC,setErrorMap:()=>jk,strictObject:()=>_C,string:()=>Ug,symbol:()=>mC,transformer:()=>MC,tuple:()=>RC,undefined:()=>hC,union:()=>EC,unknown:()=>bC,util:()=>N,void:()=>xC});var N;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{let o={};for(let i of s)o[i]=i;return o},e.getValidEnumValues=s=>{let o=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),i={};for(let a of o)i[a]=s[a];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let o=[];for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},e.find=(s,o)=>{for(let i of s)if(o(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}e.joinValues=n,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(N||(N={}));var Va;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Va||(Va={}));var w=N.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),He=e=>{switch(typeof e){case"undefined":return w.undefined;case"string":return w.string;case"number":return Number.isNaN(e)?w.nan:w.number;case"boolean":return w.boolean;case"function":return w.function;case"bigint":return w.bigint;case"symbol":return w.symbol;case"object":return Array.isArray(e)?w.array:e===null?w.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?w.promise:typeof Map<"u"&&e instanceof Map?w.map:typeof Set<"u"&&e instanceof Set?w.set:typeof Date<"u"&&e instanceof Date?w.date:w.object;default:return w.unknown}};var m=N.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Mk=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),le=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(o){return o.message},n={_errors:[]},s=o=>{for(let i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let a=n,c=0;for(;c<i.path.length;){let u=i.path[c];c===i.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(i))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return s(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,N.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(t(s))):n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};le.create=e=>new le(e);var Fk=(e,t)=>{let r;switch(e.code){case m.invalid_type:e.received===w.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case m.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,N.jsonStringifyReplacer)}`;break;case m.unrecognized_keys:r=`Unrecognized key(s) in object: ${N.joinValues(e.keys,", ")}`;break;case m.invalid_union:r="Invalid input";break;case m.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${N.joinValues(e.options)}`;break;case m.invalid_enum_value:r=`Invalid enum value. Expected ${N.joinValues(e.options)}, received '${e.received}'`;break;case m.invalid_arguments:r="Invalid function arguments";break;case m.invalid_return_type:r="Invalid function return type";break;case m.invalid_date:r="Invalid date";break;case m.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:N.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case m.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case m.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case m.custom:r="Invalid input";break;case m.invalid_intersection_types:r="Intersection results could not be merged";break;case m.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case m.not_finite:r="Number must be finite";break;default:r=t.defaultError,N.assertNever(e)}return{message:r}},rt=Fk;var $g=rt;function jk(e){$g=e}function hr(){return $g}var nn=e=>{let{data:t,path:r,errorMaps:n,issueData:s}=e,o=[...r,...s.path||[]],i={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let a="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)a=u(i,{data:t,defaultError:a}).message;return{...s,path:o,message:a}},Bk=[];function y(e,t){let r=hr(),n=nn({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===rt?void 0:rt].filter(s=>!!s)});e.common.issues.push(n)}var ee=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let s of r){if(s.status==="aborted")return R;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let s of r){let o=await s.key,i=await s.value;n.push({key:o,value:i})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let s of r){let{key:o,value:i}=s;if(o.status==="aborted"||i.status==="aborted")return R;o.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(n[o.value]=i.value)}return{status:t.value,value:n}}},R=Object.freeze({status:"aborted"}),kt=e=>({status:"dirty",value:e}),re=e=>({status:"valid",value:e}),Ks=e=>e.status==="aborted",Js=e=>e.status==="dirty",mt=e=>e.status==="valid",gr=e=>typeof Promise<"u"&&e instanceof Promise;var _;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(_||(_={}));var Qs=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Ng=function(e,t,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(e,r):s?s.value=r:t.set(e,r),r},sn,on,Oe=class{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Dg=(e,t)=>{if(mt(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new le(e.common.issues);return this._error=r,this._error}}};function $(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(i,a)=>{let{message:c}=e;return i.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??n??a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:s}}var L=class{get description(){return this._def.description}_getType(t){return He(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:He(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ee,ctx:{common:t.parent.common,data:t.data,parsedType:He(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(gr(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:He(t)},s=this._parseSync({data:t,path:n.path,parent:n});return Dg(n,s)}"~validate"(t){var n,s;let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:He(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:r});return mt(o)?{value:o.value}:{issues:r.common.issues}}catch(o){(s=(n=o==null?void 0:o.message)==null?void 0:n.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(o=>mt(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:He(t)},s=this._parse({data:t,path:n.path,parent:n}),o=await(gr(s)?s:Promise.resolve(s));return Dg(n,o)}refine(t,r){let n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,o)=>{let i=t(s),a=()=>o.addIssue({code:m.custom,...n(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new Re({schema:this,typeName:k.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Te.create(this,this._def)}nullable(){return Ye.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ot.create(this)}promise(){return yt.create(this,this._def)}or(t){return Nt.create([this,t],this._def)}and(t){return Pt.create(this,t,this._def)}transform(t){return new Re({...$(this._def),schema:this,typeName:k.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Ut({...$(this._def),innerType:this,defaultValue:r,typeName:k.ZodDefault})}brand(){return new an({typeName:k.ZodBranded,type:this,...$(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new Gt({...$(this._def),innerType:this,catchValue:r,typeName:k.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return cn.create(this,t)}readonly(){return qt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Uk=/^c[^\s-]{8,}$/i,Gk=/^[0-9a-z]+$/,qk=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Vk=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,zk=/^[a-z0-9_-]{21}$/i,Wk=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Hk=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Zk=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Yk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",za,Xk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Kk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Jk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Qk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,eC=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,tC=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Pg="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",rC=new RegExp(`^${Pg}$`);function Mg(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function nC(e){return new RegExp(`^${Mg(e)}$`)}function Fg(e){let t=`${Pg}T${Mg(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function sC(e,t){return!!((t==="v4"||!t)&&Xk.test(e)||(t==="v6"||!t)&&Jk.test(e))}function oC(e,t){if(!Wk.test(e))return!1;try{let[r]=e.split("."),n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function iC(e,t){return!!((t==="v4"||!t)&&Kk.test(e)||(t==="v6"||!t)&&Qk.test(e))}var ht=class e extends L{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==w.string){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:w.string,received:o.parsedType}),R}let n=new ee,s;for(let o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),y(s,{code:m.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),y(s,{code:m.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let i=t.data.length>o.value,a=t.data.length<o.value;(i||a)&&(s=this._getOrReturnCtx(t,s),i?y(s,{code:m.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&y(s,{code:m.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")Zk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"email",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")za||(za=new RegExp(Yk,"u")),za.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"emoji",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")Vk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"uuid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")zk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"nanoid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")Uk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"cuid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")Gk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"cuid2",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")qk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"ulid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),y(s,{validation:"url",code:m.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"regex",code:m.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?Fg(o).test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?rC.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?nC(o).test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?Hk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"duration",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?sC(t.data,o.version)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"ip",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?oC(t.data,o.alg)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"jwt",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?iC(t.data,o.version)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"cidr",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?eC.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"base64",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?tC.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"base64url",code:m.invalid_string,message:o.message}),n.dirty()):N.assertNever(o);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:m.invalid_string,..._.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",..._.errToObj(t)})}url(t){return this._addCheck({kind:"url",..._.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",..._.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",..._.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",..._.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",..._.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",..._.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",..._.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",..._.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",..._.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",..._.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",..._.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",..._.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,..._.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,..._.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",..._.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,..._.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,..._.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,..._.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,..._.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,..._.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,..._.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,..._.errToObj(r)})}nonempty(t){return this.min(1,_.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};ht.create=e=>new ht({checks:[],typeName:k.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...$(e)});function aC(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,o=Number.parseInt(e.toFixed(s).replace(".","")),i=Number.parseInt(t.toFixed(s).replace(".",""));return o%i/10**s}var Ct=class e extends L{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==w.number){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:w.number,received:o.parsedType}),R}let n,s=new ee;for(let o of this._def.checks)o.kind==="int"?N.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),y(n,{code:m.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?aC(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),y(n,{code:m.not_finite,message:o.message}),s.dirty()):N.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,_.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:_.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:_.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:_.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:_.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:_.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:_.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:_.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:_.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:_.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&N.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};Ct.create=e=>new Ct({checks:[],typeName:k.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...$(e)});var At=class e extends L{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==w.bigint)return this._getInvalidInput(t);let n,s=new ee;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):N.assertNever(o);return{status:s.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return y(r,{code:m.invalid_type,expected:w.bigint,received:r.parsedType}),R}gte(t,r){return this.setLimit("min",t,!0,_.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:_.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:_.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:_.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:_.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:_.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};At.create=e=>new At({checks:[],typeName:k.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...$(e)});var It=class extends L{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==w.boolean){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:w.boolean,received:n.parsedType}),R}return re(t.data)}};It.create=e=>new It({typeName:k.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$(e)});var $t=class e extends L{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==w.date){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:w.date,received:o.parsedType}),R}if(Number.isNaN(t.data.getTime())){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_date}),R}let n=new ee,s;for(let o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),y(s,{code:m.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),y(s,{code:m.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):N.assertNever(o);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:_.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:_.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};$t.create=e=>new $t({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:k.ZodDate,...$(e)});var br=class extends L{_parse(t){if(this._getType(t)!==w.symbol){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:w.symbol,received:n.parsedType}),R}return re(t.data)}};br.create=e=>new br({typeName:k.ZodSymbol,...$(e)});var Dt=class extends L{_parse(t){if(this._getType(t)!==w.undefined){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:w.undefined,received:n.parsedType}),R}return re(t.data)}};Dt.create=e=>new Dt({typeName:k.ZodUndefined,...$(e)});var Lt=class extends L{_parse(t){if(this._getType(t)!==w.null){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:w.null,received:n.parsedType}),R}return re(t.data)}};Lt.create=e=>new Lt({typeName:k.ZodNull,...$(e)});var gt=class extends L{constructor(){super(...arguments),this._any=!0}_parse(t){return re(t.data)}};gt.create=e=>new gt({typeName:k.ZodAny,...$(e)});var st=class extends L{constructor(){super(...arguments),this._unknown=!0}_parse(t){return re(t.data)}};st.create=e=>new st({typeName:k.ZodUnknown,...$(e)});var Me=class extends L{_parse(t){let r=this._getOrReturnCtx(t);return y(r,{code:m.invalid_type,expected:w.never,received:r.parsedType}),R}};Me.create=e=>new Me({typeName:k.ZodNever,...$(e)});var wr=class extends L{_parse(t){if(this._getType(t)!==w.undefined){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:w.void,received:n.parsedType}),R}return re(t.data)}};wr.create=e=>new wr({typeName:k.ZodVoid,...$(e)});var ot=class e extends L{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==w.array)return y(r,{code:m.invalid_type,expected:w.array,received:r.parsedType}),R;if(s.exactLength!==null){let i=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(i||a)&&(y(r,{code:i?m.too_big:m.too_small,minimum:a?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(y(r,{code:m.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(y(r,{code:m.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,a)=>s.type._parseAsync(new Oe(r,i,r.path,a)))).then(i=>ee.mergeArray(n,i));let o=[...r.data].map((i,a)=>s.type._parseSync(new Oe(r,i,r.path,a)));return ee.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:_.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:_.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:_.toString(r)}})}nonempty(t){return this.min(1,t)}};ot.create=(e,t)=>new ot({type:e,minLength:null,maxLength:null,exactLength:null,typeName:k.ZodArray,...$(t)});function yr(e){if(e instanceof fe){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Te.create(yr(n))}return new fe({...e._def,shape:()=>t})}else return e instanceof ot?new ot({...e._def,type:yr(e.element)}):e instanceof Te?Te.create(yr(e.unwrap())):e instanceof Ye?Ye.create(yr(e.unwrap())):e instanceof Ze?Ze.create(e.items.map(t=>yr(t))):e}var fe=class e extends L{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=N.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==w.object){let u=this._getOrReturnCtx(t);return y(u,{code:m.invalid_type,expected:w.object,received:u.parsedType}),R}let{status:n,ctx:s}=this._processInputParams(t),{shape:o,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Me&&this._def.unknownKeys==="strip"))for(let u in s.data)i.includes(u)||a.push(u);let c=[];for(let u of i){let l=o[u],f=s.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Oe(s,f,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Me){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of a)c.push({key:{status:"valid",value:l},value:{status:"valid",value:s.data[l]}});else if(u==="strict")a.length>0&&(y(s,{code:m.unrecognized_keys,keys:a}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let l of a){let f=s.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Oe(s,f,s.path,l)),alwaysSet:l in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let f=await l.key,d=await l.value;u.push({key:f,value:d,alwaysSet:l.alwaysSet})}return u}).then(u=>ee.mergeObjectSync(n,u)):ee.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return _.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var o,i;let s=((i=(o=this._def).errorMap)==null?void 0:i.call(o,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:_.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:k.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of N.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of N.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return yr(this)}partial(t){let r={};for(let n of N.objectKeys(this.shape)){let s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of N.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof Te;)o=o._def.innerType;r[n]=o}return new e({...this._def,shape:()=>r})}keyof(){return jg(N.objectKeys(this.shape))}};fe.create=(e,t)=>new fe({shape:()=>e,unknownKeys:"strip",catchall:Me.create(),typeName:k.ZodObject,...$(t)});fe.strictCreate=(e,t)=>new fe({shape:()=>e,unknownKeys:"strict",catchall:Me.create(),typeName:k.ZodObject,...$(t)});fe.lazycreate=(e,t)=>new fe({shape:e,unknownKeys:"strip",catchall:Me.create(),typeName:k.ZodObject,...$(t)});var Nt=class extends L{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function s(o){for(let a of o)if(a.result.status==="valid")return a.result;for(let a of o)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let i=o.map(a=>new le(a.ctx.common.issues));return y(r,{code:m.invalid_union,unionErrors:i}),R}if(r.common.async)return Promise.all(n.map(async o=>{let i={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(s);{let o,i=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},l=c._parseSync({data:r.data,path:r.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!o&&(o={result:l,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let a=i.map(c=>new le(c));return y(r,{code:m.invalid_union,unionErrors:a}),R}}get options(){return this._def.options}};Nt.create=(e,t)=>new Nt({options:e,typeName:k.ZodUnion,...$(t)});var nt=e=>e instanceof Mt?nt(e.schema):e instanceof Re?nt(e.innerType()):e instanceof Ft?[e.value]:e instanceof jt?e.options:e instanceof Bt?N.objectValues(e.enum):e instanceof Ut?nt(e._def.innerType):e instanceof Dt?[void 0]:e instanceof Lt?[null]:e instanceof Te?[void 0,...nt(e.unwrap())]:e instanceof Ye?[null,...nt(e.unwrap())]:e instanceof an||e instanceof qt?nt(e.unwrap()):e instanceof Gt?nt(e._def.innerType):[],eo=class e extends L{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==w.object)return y(r,{code:m.invalid_type,expected:w.object,received:r.parsedType}),R;let n=this.discriminator,s=r.data[n],o=this.optionsMap.get(s);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(y(r,{code:m.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),R)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let s=new Map;for(let o of r){let i=nt(o.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of i){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,o)}}return new e({typeName:k.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...$(n)})}};function Wa(e,t){let r=He(e),n=He(t);if(e===t)return{valid:!0,data:e};if(r===w.object&&n===w.object){let s=N.objectKeys(t),o=N.objectKeys(e).filter(a=>s.indexOf(a)!==-1),i={...e,...t};for(let a of o){let c=Wa(e[a],t[a]);if(!c.valid)return{valid:!1};i[a]=c.data}return{valid:!0,data:i}}else if(r===w.array&&n===w.array){if(e.length!==t.length)return{valid:!1};let s=[];for(let o=0;o<e.length;o++){let i=e[o],a=t[o],c=Wa(i,a);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===w.date&&n===w.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Pt=class extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=(o,i)=>{if(Ks(o)||Ks(i))return R;let a=Wa(o.value,i.value);return a.valid?((Js(o)||Js(i))&&r.dirty(),{status:r.value,value:a.data}):(y(n,{code:m.invalid_intersection_types}),R)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,i])=>s(o,i)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Pt.create=(e,t,r)=>new Pt({left:e,right:t,typeName:k.ZodIntersection,...$(r)});var Ze=class e extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==w.array)return y(n,{code:m.invalid_type,expected:w.array,received:n.parsedType}),R;if(n.data.length<this._def.items.length)return y(n,{code:m.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),R;!this._def.rest&&n.data.length>this._def.items.length&&(y(n,{code:m.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...n.data].map((i,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new Oe(n,i,n.path,a)):null}).filter(i=>!!i);return n.common.async?Promise.all(o).then(i=>ee.mergeArray(r,i)):ee.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Ze.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ze({items:e,typeName:k.ZodTuple,rest:null,...$(t)})};var to=class e extends L{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==w.object)return y(n,{code:m.invalid_type,expected:w.object,received:n.parsedType}),R;let s=[],o=this._def.keyType,i=this._def.valueType;for(let a in n.data)s.push({key:o._parse(new Oe(n,a,n.path,a)),value:i._parse(new Oe(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?ee.mergeObjectAsync(r,s):ee.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof L?new e({keyType:t,valueType:r,typeName:k.ZodRecord,...$(n)}):new e({keyType:ht.create(),valueType:t,typeName:k.ZodRecord,...$(r)})}},xr=class extends L{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==w.map)return y(n,{code:m.invalid_type,expected:w.map,received:n.parsedType}),R;let s=this._def.keyType,o=this._def.valueType,i=[...n.data.entries()].map(([a,c],u)=>({key:s._parse(new Oe(n,a,n.path,[u,"key"])),value:o._parse(new Oe(n,c,n.path,[u,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of i){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return R;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let c of i){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return R;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}}}};xr.create=(e,t,r)=>new xr({valueType:t,keyType:e,typeName:k.ZodMap,...$(r)});var Sr=class e extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==w.set)return y(n,{code:m.invalid_type,expected:w.set,received:n.parsedType}),R;let s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(y(n,{code:m.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(y(n,{code:m.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let o=this._def.valueType;function i(c){let u=new Set;for(let l of c){if(l.status==="aborted")return R;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let a=[...n.data.values()].map((c,u)=>o._parse(new Oe(n,c,n.path,u)));return n.common.async?Promise.all(a).then(c=>i(c)):i(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:_.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:_.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Sr.create=(e,t)=>new Sr({valueType:e,minSize:null,maxSize:null,typeName:k.ZodSet,...$(t)});var ro=class e extends L{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==w.function)return y(r,{code:m.invalid_type,expected:w.function,received:r.parsedType}),R;function n(a,c){return nn({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,hr(),rt].filter(u=>!!u),issueData:{code:m.invalid_arguments,argumentsError:c}})}function s(a,c){return nn({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,hr(),rt].filter(u=>!!u),issueData:{code:m.invalid_return_type,returnTypeError:c}})}let o={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof yt){let a=this;return re(async function(...c){let u=new le([]),l=await a._def.args.parseAsync(c,o).catch(p=>{throw u.addIssue(n(c,p)),u}),f=await Reflect.apply(i,this,l);return await a._def.returns._def.type.parseAsync(f,o).catch(p=>{throw u.addIssue(s(f,p)),u})})}else{let a=this;return re(function(...c){let u=a._def.args.safeParse(c,o);if(!u.success)throw new le([n(c,u.error)]);let l=Reflect.apply(i,this,u.data),f=a._def.returns.safeParse(l,o);if(!f.success)throw new le([s(l,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Ze.create(t).rest(st.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||Ze.create([]).rest(st.create()),returns:r||st.create(),typeName:k.ZodFunction,...$(n)})}},Mt=class extends L{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Mt.create=(e,t)=>new Mt({getter:e,typeName:k.ZodLazy,...$(t)});var Ft=class extends L{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return y(r,{received:r.data,code:m.invalid_literal,expected:this._def.value}),R}return{status:"valid",value:t.data}}get value(){return this._def.value}};Ft.create=(e,t)=>new Ft({value:e,typeName:k.ZodLiteral,...$(t)});function jg(e,t){return new jt({values:e,typeName:k.ZodEnum,...$(t)})}var jt=class e extends L{constructor(){super(...arguments),sn.set(this,void 0)}_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return y(r,{expected:N.joinValues(n),received:r.parsedType,code:m.invalid_type}),R}if(Qs(this,sn,"f")||Ng(this,sn,new Set(this._def.values),"f"),!Qs(this,sn,"f").has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return y(r,{received:r.data,code:m.invalid_enum_value,options:n}),R}return re(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};sn=new WeakMap;jt.create=jg;var Bt=class extends L{constructor(){super(...arguments),on.set(this,void 0)}_parse(t){let r=N.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==w.string&&n.parsedType!==w.number){let s=N.objectValues(r);return y(n,{expected:N.joinValues(s),received:n.parsedType,code:m.invalid_type}),R}if(Qs(this,on,"f")||Ng(this,on,new Set(N.getValidEnumValues(this._def.values)),"f"),!Qs(this,on,"f").has(t.data)){let s=N.objectValues(r);return y(n,{received:n.data,code:m.invalid_enum_value,options:s}),R}return re(t.data)}get enum(){return this._def.values}};on=new WeakMap;Bt.create=(e,t)=>new Bt({values:e,typeName:k.ZodNativeEnum,...$(t)});var yt=class extends L{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==w.promise&&r.common.async===!1)return y(r,{code:m.invalid_type,expected:w.promise,received:r.parsedType}),R;let n=r.parsedType===w.promise?r.data:Promise.resolve(r.data);return re(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};yt.create=(e,t)=>new yt({type:e,typeName:k.ZodPromise,...$(t)});var Re=class extends L{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===k.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:i=>{y(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){let i=s.transform(n.data,o);if(n.common.async)return Promise.resolve(i).then(async a=>{if(r.value==="aborted")return R;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?R:c.status==="dirty"?kt(c.value):r.value==="dirty"?kt(c.value):c});{if(r.value==="aborted")return R;let a=this._def.schema._parseSync({data:i,path:n.path,parent:n});return a.status==="aborted"?R:a.status==="dirty"?kt(a.value):r.value==="dirty"?kt(a.value):a}}if(s.type==="refinement"){let i=a=>{let c=s.refinement(a,o);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?R:(a.status==="dirty"&&r.dirty(),i(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?R:(a.status==="dirty"&&r.dirty(),i(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){let i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!mt(i))return i;let a=s.transform(i.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>mt(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:r.value,value:a})):i);N.assertNever(s)}};Re.create=(e,t,r)=>new Re({schema:e,typeName:k.ZodEffects,effect:t,...$(r)});Re.createWithPreprocess=(e,t,r)=>new Re({schema:t,effect:{type:"preprocess",transform:e},typeName:k.ZodEffects,...$(r)});var Te=class extends L{_parse(t){return this._getType(t)===w.undefined?re(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Te.create=(e,t)=>new Te({innerType:e,typeName:k.ZodOptional,...$(t)});var Ye=class extends L{_parse(t){return this._getType(t)===w.null?re(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ye.create=(e,t)=>new Ye({innerType:e,typeName:k.ZodNullable,...$(t)});var Ut=class extends L{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===w.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Ut.create=(e,t)=>new Ut({innerType:e,typeName:k.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$(t)});var Gt=class extends L{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return gr(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new le(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new le(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Gt.create=(e,t)=>new Gt({innerType:e,typeName:k.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$(t)});var vr=class extends L{_parse(t){if(this._getType(t)!==w.nan){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:w.nan,received:n.parsedType}),R}return{status:"valid",value:t.data}}};vr.create=e=>new vr({typeName:k.ZodNaN,...$(e)});var cC=Symbol("zod_brand"),an=class extends L{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},cn=class e extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?R:o.status==="dirty"?(r.dirty(),kt(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?R:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:k.ZodPipeline})}},qt=class extends L{_parse(t){let r=this._def.innerType._parse(t),n=s=>(mt(s)&&(s.value=Object.freeze(s.value)),s);return gr(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}};qt.create=(e,t)=>new qt({innerType:e,typeName:k.ZodReadonly,...$(t)});function Lg(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function Bg(e,t={},r){return e?gt.create().superRefine((n,s)=>{let o=e(n);if(o instanceof Promise)return o.then(i=>{if(!i){let a=Lg(t,n),c=a.fatal??r??!0;s.addIssue({code:"custom",...a,fatal:c})}});if(!o){let i=Lg(t,n),a=i.fatal??r??!0;s.addIssue({code:"custom",...i,fatal:a})}}):gt.create()}var uC={object:fe.lazycreate},k;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(k||(k={}));var lC=(e,t={message:`Input not instance of ${e.name}`})=>Bg(r=>r instanceof e,t),Ug=ht.create,Gg=Ct.create,fC=vr.create,dC=At.create,qg=It.create,pC=$t.create,mC=br.create,hC=Dt.create,gC=Lt.create,yC=gt.create,bC=st.create,wC=Me.create,xC=wr.create,SC=ot.create,vC=fe.create,_C=fe.strictCreate,EC=Nt.create,TC=eo.create,OC=Pt.create,RC=Ze.create,kC=to.create,CC=xr.create,AC=Sr.create,IC=ro.create,$C=Mt.create,DC=Ft.create,LC=jt.create,NC=Bt.create,PC=yt.create,MC=Re.create,FC=Te.create,jC=Ye.create,BC=Re.createWithPreprocess,UC=cn.create,GC=()=>Ug().optional(),qC=()=>Gg().optional(),VC=()=>qg().optional(),zC={string:e=>ht.create({...e,coerce:!0}),number:e=>Ct.create({...e,coerce:!0}),boolean:e=>It.create({...e,coerce:!0}),bigint:e=>At.create({...e,coerce:!0}),date:e=>$t.create({...e,coerce:!0})};var WC=R;var Vg=Fe.object({list:Fe.boolean().optional(),log:Fe.boolean().optional(),track:Fe.boolean().optional(),parser:Fe.enum(["babel","babylon","flow","ts","tsx"]).optional(),extensions:Fe.string().optional(),ignoreConfig:Fe.string().optional(),match:Fe.any().optional()});var vo=q(ny(),1),bo=q(Xa(),1),Cb=require("child_process"),dw=q(Ja(),1),Rr=q(Ja(),1),Fw=require("node:events"),xo=Object.defineProperty,_A=Object.defineProperties,EA=Object.getOwnPropertyDescriptor,TA=Object.getOwnPropertyDescriptors,bc=Object.getOwnPropertyNames,sy=Object.getOwnPropertySymbols,My=Object.prototype.hasOwnProperty,OA=Object.prototype.propertyIsEnumerable,oy=(e,t,r)=>t in e?xo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ce=(e,t)=>{for(var r in t||(t={}))My.call(t,r)&&oy(e,r,t[r]);if(sy)for(var r of sy(t))OA.call(t,r)&&oy(e,r,t[r]);return e},fn=(e,t)=>_A(e,TA(t)),g=(e,t)=>function(){return e&&(t=(0,e[bc(e)[0]])(e=0)),t},RA=(e,t)=>function(){return t||(0,e[bc(e)[0]])((t={exports:{}}).exports,t),t.exports},Z=(e,t)=>{for(var r in t)xo(e,r,{get:t[r],enumerable:!0})},kA=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of bc(t))!My.call(e,s)&&s!==r&&xo(e,s,{get:()=>t[s],enumerable:!(n=EA(t,s))||n.enumerable});return e},V=e=>kA(xo({},"__esModule",{value:!0}),e),ln=(e,t,r)=>new Promise((n,s)=>{var o=c=>{try{a(r.next(c))}catch(u){s(u)}},i=c=>{try{a(r.throw(c))}catch(u){s(u)}},a=c=>c.done?n(c.value):Promise.resolve(c.value).then(o,i);a((r=r.apply(e,t)).next())});function CA(...e){let t=new String(e);return So.set(t,e),t}function go(e){return e instanceof String&&So.has(e)}function iy(e){return So.get(e)||[]}var So,hn=g({"src/lib/args/pathspec.ts"(){"use strict";So=new WeakMap}}),at,wt=g({"src/lib/errors/git-error.ts"(){"use strict";at=class extends Error{constructor(e,t){super(t),this.task=e,Object.setPrototypeOf(this,new.target.prototype)}}}}),gn,Cr=g({"src/lib/errors/git-response-error.ts"(){"use strict";wt(),gn=class extends at{constructor(e,t){super(void 0,t||String(e)),this.git=e}}}}),Fy,jy=g({"src/lib/errors/task-configuration-error.ts"(){"use strict";wt(),Fy=class extends at{constructor(e){super(void 0,e)}}}});function By(e){return typeof e=="function"?e:Zt}function Uy(e){return typeof e=="function"&&e!==Zt}function Gy(e,t){let r=e.indexOf(t);return r<=0?[e,""]:[e.substr(0,r),e.substr(r+1)]}function qy(e,t=0){return Vy(e)&&e.length>t?e[t]:void 0}function Ht(e,t=0){if(Vy(e)&&e.length>t)return e[e.length-1-t]}function Vy(e){return!!(e&&typeof e.length=="number")}function yn(e="",t=!0,r=`
56
+ `){return e.split(r).reduce((n,s)=>{let o=t?s.trim():s;return o&&n.push(o),n},[])}function wc(e,t){return yn(e,!0).map(r=>t(r))}function xc(e){return(0,vo.exists)(e,vo.FOLDER)}function F(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function zy(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function _o(e,t){if(Array.isArray(e)){let r=e.indexOf(t);r>=0&&e.splice(r,1)}else e.delete(t);return t}function Xe(e){return Array.isArray(e)?e:[e]}function Wy(e){return e.replace(/[\s-]+(.)/g,(t,r)=>r.toUpperCase())}function Hy(e){return Xe(e).map(String)}function U(e,t=0){if(e==null)return t;let r=parseInt(e,10);return isNaN(r)?t:r}function dn(e,t){let r=[];for(let n=0,s=e.length;n<s;n++)r.push(t,e[n]);return r}function pn(e){return(Array.isArray(e)?Buffer.concat(e):e).toString("utf-8")}function Zy(e,t){return Object.assign({},...t.map(r=>r in e?{[r]:e[r]}:{}))}function oc(e=0){return new Promise(t=>setTimeout(t,e))}function ic(e){if(e!==!1)return e}var kr,Zt,bn,Eo=g({"src/lib/utils/util.ts"(){"use strict";kr="\0",Zt=()=>{},bn=Object.prototype.toString.call.bind(Object.prototype.toString)}});function Ke(e,t,r){return t(e)?e:arguments.length>2?r:void 0}function Sc(e,t){let r=go(e)?"string":typeof e;return/number|string|boolean/.test(r)&&(!t||!t.includes(r))}function vc(e){return!!e&&bn(e)==="[object Object]"}function Yy(e){return typeof e=="function"}var wn,ne,Xy,yo,_c,Ky=g({"src/lib/utils/argument-filters.ts"(){"use strict";Eo(),hn(),wn=e=>Array.isArray(e),ne=e=>typeof e=="string",Xy=e=>Array.isArray(e)&&e.every(ne),yo=e=>ne(e)||Array.isArray(e)&&e.every(ne),_c=e=>e==null||"number|boolean|function".includes(typeof e)?!1:Array.isArray(e)||typeof e=="string"||typeof e.length=="number"}}),ac,AA=g({"src/lib/utils/exit-codes.ts"(){"use strict";ac=(e=>(e[e.SUCCESS=0]="SUCCESS",e[e.ERROR=1]="ERROR",e[e.NOT_FOUND=-2]="NOT_FOUND",e[e.UNCLEAN=128]="UNCLEAN",e))(ac||{})}}),mn,IA=g({"src/lib/utils/git-output-streams.ts"(){"use strict";mn=class{constructor(e,t){this.stdOut=e,this.stdErr=t}asStrings(){return new mn(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}}),I,bt,$A=g({"src/lib/utils/line-parser.ts"(){"use strict";I=class{constructor(e,t){this.matches=[],this.parse=(r,n)=>(this.resetMatches(),this._regExp.every((s,o)=>this.addMatch(s,o,r(o)))?this.useMatches(n,this.prepareMatches())!==!1:!1),this._regExp=Array.isArray(e)?e:[e],t&&(this.useMatches=t)}useMatches(e,t){throw new Error("LineParser:useMatches not implemented")}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(e,t,r){let n=r&&e.exec(r);return n&&this.pushMatch(t,n),!!n}pushMatch(e,t){this.matches.push(...t.slice(1))}},bt=class extends I{addMatch(e,t,r){return/^remote:\s/.test(String(r))&&super.addMatch(e,t,r)}pushMatch(e,t){(e>0||t.length>1)&&super.pushMatch(e,t)}}}});function Jy(...e){let t=process.cwd(),r=Object.assign(Ce({baseDir:t},Qy),...e.filter(n=>typeof n=="object"&&n));return r.baseDir=r.baseDir||t,r.trimmed=r.trimmed===!0,r}var Qy,DA=g({"src/lib/utils/simple-git-options.ts"(){"use strict";Qy={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function Ec(e,t=[]){return vc(e)?Object.keys(e).reduce((r,n)=>{let s=e[n];return go(s)?r.push(s):Sc(s,["boolean"])?r.push(n+"="+s):r.push(n),r},t):t}function de(e,t=0,r=!1){let n=[];for(let s=0,o=t<0?e.length:t;s<o;s++)"string|number".includes(typeof e[s])&&n.push(String(e[s]));return Ec(Tc(e),n),r||n.push(...LA(e)),n}function LA(e){let t=typeof Ht(e)=="function";return Ke(Ht(e,t?1:0),wn,[])}function Tc(e){let t=Yy(Ht(e));return Ke(Ht(e,t?1:0),vc)}function z(e,t=!0){let r=By(Ht(e));return t||Uy(r)?r:void 0}var NA=g({"src/lib/utils/task-options.ts"(){"use strict";Ky(),Eo(),hn()}});function cc(e,t){return e(t.stdOut,t.stdErr)}function me(e,t,r,n=!0){return Xe(r).forEach(s=>{for(let o=yn(s,n),i=0,a=o.length;i<a;i++){let c=(u=0)=>{if(!(i+u>=a))return o[i+u]};t.some(({parse:u})=>u(c,e))}}),e}var PA=g({"src/lib/utils/task-parser.ts"(){"use strict";Eo()}}),eb={};Z(eb,{ExitCodes:()=>ac,GitOutputStreams:()=>mn,LineParser:()=>I,NOOP:()=>Zt,NULL:()=>kr,RemoteLineParser:()=>bt,append:()=>F,appendTaskOptions:()=>Ec,asArray:()=>Xe,asCamelCase:()=>Wy,asFunction:()=>By,asNumber:()=>U,asStringArray:()=>Hy,bufferToString:()=>pn,callTaskParser:()=>cc,createInstanceConfig:()=>Jy,delay:()=>oc,filterArray:()=>wn,filterFunction:()=>Yy,filterHasLength:()=>_c,filterPlainObject:()=>vc,filterPrimitives:()=>Sc,filterString:()=>ne,filterStringArray:()=>Xy,filterStringOrStringArray:()=>yo,filterType:()=>Ke,first:()=>qy,folderExists:()=>xc,forEachLineWithContent:()=>wc,getTrailingOptions:()=>de,including:()=>zy,isUserFunction:()=>Uy,last:()=>Ht,objectToString:()=>bn,orVoid:()=>ic,parseStringResponse:()=>me,pick:()=>Zy,prefixedArray:()=>dn,remove:()=>_o,splitOn:()=>Gy,toLinesWithContent:()=>yn,trailingFunctionArgument:()=>z,trailingOptionsArgument:()=>Tc});var C=g({"src/lib/utils/index.ts"(){"use strict";Ky(),AA(),IA(),$A(),DA(),NA(),PA(),Eo()}}),tb={};Z(tb,{CheckRepoActions:()=>uc,checkIsBareRepoTask:()=>nb,checkIsRepoRootTask:()=>rb,checkIsRepoTask:()=>MA});function MA(e){switch(e){case"bare":return nb();case"root":return rb()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:To,parser:Oc}}function rb(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:To,parser(t){return/^\.(git)?$/.test(t.trim())}}}function nb(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:To,parser:Oc}}function FA(e){return/(Not a git repository|Kein Git-Repository)/i.test(String(e))}var uc,To,Oc,sb=g({"src/lib/tasks/check-is-repo.ts"(){"use strict";C(),uc=(e=>(e.BARE="bare",e.IN_TREE="tree",e.IS_REPO_ROOT="root",e))(uc||{}),To=({exitCode:e},t,r,n)=>{if(e===128&&FA(t))return r(Buffer.from("false"));n(t)},Oc=e=>e.trim()==="true"}});function jA(e,t){let r=new ob(e),n=e?ab:ib;return yn(t).forEach(s=>{let o=s.replace(n,"");r.paths.push(o),(cb.test(o)?r.folders:r.files).push(o)}),r}var ob,ib,ab,cb,BA=g({"src/lib/responses/CleanSummary.ts"(){"use strict";C(),ob=class{constructor(e){this.dryRun=e,this.paths=[],this.files=[],this.folders=[]}},ib=/^[a-z]+\s*/i,ab=/^[a-z]+\s+[a-z]+\s*/i,cb=/\/$/}}),lc={};Z(lc,{EMPTY_COMMANDS:()=>Oo,adhocExecTask:()=>ub,configurationErrorTask:()=>pe,isBufferTask:()=>fb,isEmptyTask:()=>db,straightThroughBufferTask:()=>lb,straightThroughStringTask:()=>ae});function ub(e){return{commands:Oo,format:"empty",parser:e}}function pe(e){return{commands:Oo,format:"empty",parser(){throw typeof e=="string"?new Fy(e):e}}}function ae(e,t=!1){return{commands:e,format:"utf-8",parser(r){return t?String(r).trim():r}}}function lb(e){return{commands:e,format:"buffer",parser(t){return t}}}function fb(e){return e.format==="buffer"}function db(e){return e.format==="empty"||!e.commands.length}var Oo,H=g({"src/lib/tasks/task.ts"(){"use strict";jy(),Oo=[]}}),pb={};Z(pb,{CONFIG_ERROR_INTERACTIVE_MODE:()=>Rc,CONFIG_ERROR_MODE_REQUIRED:()=>kc,CONFIG_ERROR_UNKNOWN_OPTION:()=>Cc,CleanOptions:()=>fo,cleanTask:()=>mb,cleanWithOptionsTask:()=>UA,isCleanOptionsArray:()=>GA});function UA(e,t){let{cleanMode:r,options:n,valid:s}=qA(e);return r?s.options?(n.push(...t),n.some(WA)?pe(Rc):mb(r,n)):pe(Cc+JSON.stringify(e)):pe(kc)}function mb(e,t){return{commands:["clean",`-${e}`,...t],format:"utf-8",parser(n){return jA(e==="n",n)}}}function GA(e){return Array.isArray(e)&&e.every(t=>Ac.has(t))}function qA(e){let t,r=[],n={cleanMode:!1,options:!0};return e.replace(/[^a-z]i/g,"").split("").forEach(s=>{VA(s)?(t=s,n.cleanMode=!0):n.options=n.options&&zA(r[r.length]=`-${s}`)}),{cleanMode:t,options:r,valid:n}}function VA(e){return e==="f"||e==="n"}function zA(e){return/^-[a-z]$/i.test(e)&&Ac.has(e.charAt(1))}function WA(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:e==="--interactive"}var Rc,kc,Cc,fo,Ac,hb=g({"src/lib/tasks/clean.ts"(){"use strict";BA(),C(),H(),Rc="Git clean interactive mode is not supported",kc='Git clean mode parameter ("n" or "f") is required',Cc="Git clean unknown option found in: ",fo=(e=>(e.DRY_RUN="n",e.FORCE="f",e.IGNORED_INCLUDED="x",e.IGNORED_ONLY="X",e.EXCLUDING="e",e.QUIET="q",e.RECURSIVE="d",e))(fo||{}),Ac=new Set(["i",...Hy(Object.values(fo))])}});function HA(e){let t=new yb;for(let r of gb(e))t.addValue(r.file,String(r.key),r.value);return t}function ZA(e,t){let r=null,n=[],s=new Map;for(let o of gb(e,t))o.key===t&&(n.push(r=o.value),s.has(o.file)||s.set(o.file,[]),s.get(o.file).push(r));return{key:t,paths:Array.from(s.keys()),scopes:s,value:r,values:n}}function YA(e){return e.replace(/^(file):/,"")}function*gb(e,t=null){let r=e.split("\0");for(let n=0,s=r.length-1;n<s;){let o=YA(r[n++]),i=r[n++],a=t;if(i.includes(`
57
+ `)){let c=Gy(i,`
58
+ `);a=c[0],i=c[1]}yield{file:o,key:a,value:i}}}var yb,XA=g({"src/lib/responses/ConfigList.ts"(){"use strict";C(),yb=class{constructor(){this.files=[],this.values=Object.create(null)}get all(){return this._all||(this._all=this.files.reduce((e,t)=>Object.assign(e,this.values[t]),{})),this._all}addFile(e){if(!(e in this.values)){let t=Ht(this.files);this.values[e]=t?Object.create(this.values[t]):{},this.files.push(e)}return this.values[e]}addValue(e,t,r){let n=this.addFile(e);n.hasOwnProperty(t)?Array.isArray(n[t])?n[t].push(r):n[t]=[n[t],r]:n[t]=r,this._all=void 0}}}});function Qa(e,t){return typeof e=="string"&&fc.hasOwnProperty(e)?e:t}function KA(e,t,r,n){let s=["config",`--${n}`];return r&&s.push("--add"),s.push(e,t),{commands:s,format:"utf-8",parser(o){return o}}}function JA(e,t){let r=["config","--null","--show-origin","--get-all",e];return t&&r.splice(1,0,`--${t}`),{commands:r,format:"utf-8",parser(n){return ZA(n,e)}}}function QA(e){let t=["config","--list","--show-origin","--null"];return e&&t.push(`--${e}`),{commands:t,format:"utf-8",parser(r){return HA(r)}}}function eI(){return{addConfig(e,t,...r){return this._runTask(KA(e,t,r[0]===!0,Qa(r[1],"local")),z(arguments))},getConfig(e,t){return this._runTask(JA(e,Qa(t,void 0)),z(arguments))},listConfig(...e){return this._runTask(QA(Qa(e[0],void 0)),z(arguments))}}}var fc,bb=g({"src/lib/tasks/config.ts"(){"use strict";XA(),C(),fc=(e=>(e.system="system",e.global="global",e.local="local",e.worktree="worktree",e))(fc||{})}});function tI(e){return wb.has(e)}var ec,wb,xb=g({"src/lib/tasks/diff-name-status.ts"(){"use strict";ec=(e=>(e.ADDED="A",e.COPIED="C",e.DELETED="D",e.MODIFIED="M",e.RENAMED="R",e.CHANGED="T",e.UNMERGED="U",e.UNKNOWN="X",e.BROKEN="B",e))(ec||{}),wb=new Set(Object.values(ec))}});function rI(...e){return new vb().param(...e)}function nI(e){let t=new Set,r={};return wc(e,n=>{let[s,o,i]=n.split(kr);t.add(s),(r[s]=r[s]||[]).push({line:U(o),path:s,preview:i})}),{paths:t,results:r}}function sI(){return{grep(e){let t=z(arguments),r=de(arguments);for(let s of Sb)if(r.includes(s))return this._runTask(pe(`git.grep: use of "${s}" is not supported.`),t);typeof e=="string"&&(e=rI().param(e));let n=["grep","--null","-n","--full-name",...r,...e];return this._runTask({commands:n,format:"utf-8",parser(s){return nI(s)}},t)}}}var Sb,un,ay,vb,_b=g({"src/lib/tasks/grep.ts"(){"use strict";C(),H(),Sb=["-h"],un=Symbol("grepQuery"),vb=class{constructor(){this[ay]=[]}*[(ay=un,Symbol.iterator)](){for(let e of this[un])yield e}and(...e){return e.length&&this[un].push("--and","(",...dn(e,"-e"),")"),this}param(...e){return this[un].push(...dn(e,"-e")),this}}}}),Eb={};Z(Eb,{ResetMode:()=>po,getResetMode:()=>iI,resetTask:()=>oI});function oI(e,t){let r=["reset"];return Tb(e)&&r.push(`--${e}`),r.push(...t),ae(r)}function iI(e){if(Tb(e))return e;switch(typeof e){case"string":case"undefined":return"soft"}}function Tb(e){return Ob.includes(e)}var po,Ob,Rb=g({"src/lib/tasks/reset.ts"(){"use strict";H(),po=(e=>(e.MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep",e))(po||{}),Ob=Array.from(Object.values(po))}});function aI(){return(0,bo.default)("simple-git")}function cy(e,t,r){return!t||!String(t).replace(/\s*/,"")?r?(n,...s)=>{e(n,...s),r(n,...s)}:e:(n,...s)=>{e(`%s ${n}`,t,...s),r&&r(n,...s)}}function cI(e,t,{namespace:r}){if(typeof e=="string")return e;let n=t&&t.namespace||"";return n.startsWith(r)?n.substr(r.length+1):n||r}function Ic(e,t,r,n=aI()){let s=e&&`[${e}]`||"",o=[],i=typeof t=="string"?n.extend(t):t,a=cI(Ke(t,ne),i,n);return u(r);function c(l,f){return F(o,Ic(e,a.replace(/^[^:]+/,l),f,n))}function u(l){let f=l&&`[${l}]`||"",d=i&&cy(i,f)||Zt,p=cy(n,`${s} ${f}`,d);return Object.assign(i?d:p,{label:e,sibling:c,info:p,step:u})}}var kb=g({"src/lib/git-logger.ts"(){"use strict";C(),bo.default.formatters.L=e=>String(_c(e)?e.length:"-"),bo.default.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):bn(e)}}),uo,dc,uI=g({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";wt(),kb(),uo=class{constructor(e="GitExecutor"){this.logLabel=e,this._queue=new Map}withProgress(e){return this._queue.get(e)}createProgress(e){let t=uo.getName(e.commands[0]),r=Ic(this.logLabel,t);return{task:e,logger:r,name:t}}push(e){let t=this.createProgress(e);return t.logger("Adding task to the queue, commands = %o",e.commands),this._queue.set(e,t),t}fatal(e){for(let[t,{logger:r}]of Array.from(this._queue.entries()))t===e.task?(r.info("Failed %o",e),r("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):r.info("A fatal exception occurred in a previous task, the queue has been purged: %o",e.message),this.complete(t);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(e){this.withProgress(e)&&this._queue.delete(e)}attempt(e){let t=this.withProgress(e);if(!t)throw new at(void 0,"TasksPendingQueue: attempt called for an unknown task");return t.logger("Starting task"),t}static getName(e="empty"){return`task:${e}:${++uo.counter}`}},dc=uo,dc.counter=0}});function Wt(e,t){return{method:qy(e.commands)||"",commands:t}}function lI(e,t){return r=>{t("[ERROR] child process exception %o",r),e.push(Buffer.from(String(r.stack),"ascii"))}}function uy(e,t,r,n){return s=>{r("%s received %L bytes",t,s),n("%B",s),e.push(s)}}var pc,fI=g({"src/lib/runners/git-executor-chain.ts"(){"use strict";wt(),H(),C(),uI(),pc=class{constructor(e,t,r){this._executor=e,this._scheduler=t,this._plugins=r,this._chain=Promise.resolve(),this._queue=new dc}get cwd(){return this._cwd||this._executor.cwd}set cwd(e){this._cwd=e}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(e){return this._queue.push(e),this._chain=this._chain.then(()=>this.attemptTask(e))}attemptTask(e){return ln(this,null,function*(){let t=yield this._scheduler.next(),r=()=>this._queue.complete(e);try{let{logger:n}=this._queue.attempt(e);return yield db(e)?this.attemptEmptyTask(e,n):this.attemptRemoteTask(e,n)}catch(n){throw this.onFatalException(e,n)}finally{r(),t()}})}onFatalException(e,t){let r=t instanceof at?Object.assign(t,{task:e}):new at(e,t&&String(t));return this._chain=Promise.resolve(),this._queue.fatal(r),r}attemptRemoteTask(e,t){return ln(this,null,function*(){let r=this._plugins.exec("spawn.binary","",Wt(e,e.commands)),n=this._plugins.exec("spawn.args",[...e.commands],Wt(e,e.commands)),s=yield this.gitResponse(e,r,n,this.outputHandler,t.step("SPAWN")),o=yield this.handleTaskData(e,n,s,t.step("HANDLE"));return t("passing response to task's parser as a %s",e.format),fb(e)?cc(e.parser,o):cc(e.parser,o.asStrings())})}attemptEmptyTask(e,t){return ln(this,null,function*(){return t("empty task bypassing child process to call to task's parser"),e.parser(this)})}handleTaskData(e,t,r,n){let{exitCode:s,rejection:o,stdOut:i,stdErr:a}=r;return new Promise((c,u)=>{n("Preparing to handle process response exitCode=%d stdOut=",s);let{error:l}=this._plugins.exec("task.error",{error:o},Ce(Ce({},Wt(e,t)),r));if(l&&e.onError)return n.info("exitCode=%s handling with custom error handler"),e.onError(r,l,f=>{n.info("custom error handler treated as success"),n("custom error returned a %s",bn(f)),c(new mn(Array.isArray(f)?Buffer.concat(f):f,Buffer.concat(a)))},u);if(l)return n.info("handling as error: exitCode=%s stdErr=%s rejection=%o",s,a.length,o),u(l);n.info("retrieving task output complete"),c(new mn(Buffer.concat(i),Buffer.concat(a)))})}gitResponse(e,t,r,n,s){return ln(this,null,function*(){let o=s.sibling("output"),i=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},Wt(e,e.commands));return new Promise(a=>{let c=[],u=[];s.info("%s %o",t,r),s("%O",i);let l=this._beforeSpawn(e,r);if(l)return a({stdOut:c,stdErr:u,exitCode:9901,rejection:l});this._plugins.exec("spawn.before",void 0,fn(Ce({},Wt(e,r)),{kill(d){l=d||l}}));let f=(0,Cb.spawn)(t,r,i);f.stdout.on("data",uy(c,"stdOut",s,o.step("stdOut"))),f.stderr.on("data",uy(u,"stdErr",s,o.step("stdErr"))),f.on("error",lI(u,s)),n&&(s("Passing child process stdOut/stdErr to custom outputHandler"),n(t,f.stdout,f.stderr,[...r])),this._plugins.exec("spawn.after",void 0,fn(Ce({},Wt(e,r)),{spawned:f,close(d,p){a({stdOut:c,stdErr:u,exitCode:d,rejection:l||p})},kill(d){f.killed||(l=d,f.kill("SIGINT"))}}))})})}_beforeSpawn(e,t){let r;return this._plugins.exec("spawn.before",void 0,fn(Ce({},Wt(e,t)),{kill(n){r=n||r}})),r}}}}),Ab={};Z(Ab,{GitExecutor:()=>Ib});var Ib,dI=g({"src/lib/runners/git-executor.ts"(){"use strict";fI(),Ib=class{constructor(e,t,r){this.cwd=e,this._scheduler=t,this._plugins=r,this._chain=new pc(this,this._scheduler,this._plugins)}chain(){return new pc(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});function pI(e,t,r=Zt){let n=o=>{r(null,o)},s=o=>{(o==null?void 0:o.task)===e&&r(o instanceof gn?mI(o):o,void 0)};t.then(n,s)}function mI(e){let t=n=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${n} should be GitResponseError.git.${n}, this will no longer be available in version 3`),t=Zt};return Object.create(e,Object.getOwnPropertyNames(e.git).reduce(r,{}));function r(n,s){return s in e||(n[s]={enumerable:!1,configurable:!1,get(){return t(s),e.git[s]}}),n}}var hI=g({"src/lib/task-callback.ts"(){"use strict";Cr(),C()}});function ly(e,t){return ub(r=>{if(!xc(e))throw new Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||r).cwd=e})}var gI=g({"src/lib/tasks/change-working-directory.ts"(){"use strict";C(),H()}});function tc(e){let t=["checkout",...e];return t[1]==="-b"&&t.includes("-B")&&(t[1]=_o(t,"-B")),ae(t)}function yI(){return{checkout(){return this._runTask(tc(de(arguments,1)),z(arguments))},checkoutBranch(e,t){return this._runTask(tc(["-b",e,t,...de(arguments)]),z(arguments))},checkoutLocalBranch(e){return this._runTask(tc(["-b",e,...de(arguments)]),z(arguments))}}}var bI=g({"src/lib/tasks/checkout.ts"(){"use strict";C(),H()}});function wI(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function xI(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(e){return me(wI(),[$b],e)}})}}}var $b,SI=g({"src/lib/tasks/count-objects.ts"(){"use strict";C(),$b=new I(/([a-z-]+): (\d+)$/,(e,[t,r])=>{let n=Wy(t);e.hasOwnProperty(n)&&(e[n]=U(r))})}});function vI(e){return me({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},Db,e)}var Db,_I=g({"src/lib/parsers/parse-commit.ts"(){"use strict";C(),Db=[new I(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(e,[t,r,n])=>{e.branch=t,e.commit=n,e.root=!!r}),new I(/\s*Author:\s(.+)/i,(e,[t])=>{let r=t.split("<"),n=r.pop();!n||!n.includes("@")||(e.author={email:n.substr(0,n.length-1),name:r.join("<").trim()})}),new I(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0,e.summary.insertions=parseInt(r,10)||0,e.summary.deletions=parseInt(n,10)||0}),new I(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0;let s=parseInt(r,10)||0;n==="-"?e.summary.deletions=s:n==="+"&&(e.summary.insertions=s)})]}});function EI(e,t,r){return{commands:["-c","core.abbrev=40","commit",...dn(e,"-m"),...t,...r],format:"utf-8",parser:vI}}function TI(){return{commit(t,...r){let n=z(arguments),s=e(t)||EI(Xe(t),Xe(Ke(r[0],yo,[])),[...Ke(r[1],wn,[]),...de(arguments,0,!0)]);return this._runTask(s,n)}};function e(t){return!yo(t)&&pe("git.commit: requires the commit message to be supplied as a string/string[]")}}var OI=g({"src/lib/tasks/commit.ts"(){"use strict";_I(),C(),H()}});function RI(){return{firstCommit(){return this._runTask(ae(["rev-list","--max-parents=0","HEAD"],!0),z(arguments))}}}var kI=g({"src/lib/tasks/first-commit.ts"(){"use strict";C(),H()}});function CI(e,t){let r=["hash-object",e];return t&&r.push("-w"),ae(r,!0)}var AI=g({"src/lib/tasks/hash-object.ts"(){"use strict";H()}});function II(e,t,r){let n=String(r).trim(),s;if(s=Lb.exec(n))return new mo(e,t,!1,s[1]);if(s=Nb.exec(n))return new mo(e,t,!0,s[1]);let o="",i=n.split(" ");for(;i.length;)if(i.shift()==="in"){o=i.join(" ");break}return new mo(e,t,/^re/i.test(n),o)}var mo,Lb,Nb,$I=g({"src/lib/responses/InitSummary.ts"(){"use strict";mo=class{constructor(e,t,r,n){this.bare=e,this.path=t,this.existing=r,this.gitDir=n}},Lb=/^Init.+ repository in (.+)$/,Nb=/^Rein.+ in (.+)$/}});function DI(e){return e.includes($c)}function LI(e=!1,t,r){let n=["init",...r];return e&&!DI(n)&&n.splice(1,0,$c),{commands:n,format:"utf-8",parser(s){return II(n.includes("--bare"),t,s)}}}var $c,NI=g({"src/lib/tasks/init.ts"(){"use strict";$I(),$c="--bare"}});function Dc(e){for(let t=0;t<e.length;t++){let r=Lc.exec(e[t]);if(r)return`--${r[1]}`}return""}function PI(e){return Lc.test(e)}var Lc,xn=g({"src/lib/args/log-format.ts"(){"use strict";Lc=/^--(stat|numstat|name-only|name-status)(=|$)/}}),Pb,MI=g({"src/lib/responses/DiffSummary.ts"(){"use strict";Pb=class{constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});function Mb(e=""){let t=Fb[e];return r=>me(new Pb,t,r,!1)}var rc,fy,dy,py,Fb,jb=g({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";xn(),MI(),xb(),C(),rc=[new I(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(e,[t,r,n=""])=>{e.files.push({file:t.trim(),changes:U(r),insertions:n.replace(/[^+]/g,"").length,deletions:n.replace(/[^-]/g,"").length,binary:!1})}),new I(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(e,[t,r,n])=>{e.files.push({file:t.trim(),before:U(r),after:U(n),binary:!0})}),new I(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(e,[t,r])=>{let n=/(\d+) i/.exec(r),s=/(\d+) d/.exec(r);e.changed=U(t),e.insertions=U(n==null?void 0:n[1]),e.deletions=U(s==null?void 0:s[1])})],fy=[new I(/(\d+)\t(\d+)\t(.+)$/,(e,[t,r,n])=>{let s=U(t),o=U(r);e.changed++,e.insertions+=s,e.deletions+=o,e.files.push({file:n,changes:s+o,insertions:s,deletions:o,binary:!1})}),new I(/-\t-\t(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,after:0,before:0,binary:!0})})],dy=[new I(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],py=[new I(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(e,[t,r,n,s,o])=>{e.changed++,e.files.push({file:o??n,changes:0,insertions:0,deletions:0,binary:!1,status:ic(tI(t)&&t),from:ic(!!o&&n!==o&&n),similarity:U(r)})})],Fb={"":rc,"--stat":rc,"--numstat":fy,"--name-status":py,"--name-only":dy}}});function FI(e,t){return t.reduce((r,n,s)=>(r[n]=e[s]||"",r),Object.create({diff:null}))}function Bb(e=Mc,t=Ub,r=""){let n=Mb(r);return function(s){let o=yn(s.trim(),!1,Nc).map(function(i){let a=i.split(Pc),c=FI(a[0].split(e),t);return a.length>1&&a[1].trim()&&(c.diff=n(a[1])),c});return{all:o,latest:o.length&&o[0]||null,total:o.length}}}var Nc,Pc,Mc,Ub,Gb=g({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";C(),jb(),xn(),Nc="\xF2\xF2\xF2\xF2\xF2\xF2 ",Pc=" \xF2\xF2",Mc=" \xF2 ",Ub=["hash","date","message","refs","author_name","author_email"]}}),qb={};Z(qb,{diffSummaryTask:()=>jI,validateLogFormatConfig:()=>Ro});function jI(e){let t=Dc(e),r=["diff"];return t===""&&(t="--stat",r.push("--stat=4096")),r.push(...e),Ro(r)||{commands:r,format:"utf-8",parser:Mb(t)}}function Ro(e){let t=e.filter(PI);if(t.length>1)return pe(`Summary flags are mutually exclusive - pick one of ${t.join(",")}`);if(t.length&&e.includes("-z"))return pe(`Summary flag ${t} parsing is not compatible with null termination option '-z'`)}var Fc=g({"src/lib/tasks/diff.ts"(){"use strict";xn(),jb(),H()}});function BI(e,t){let r=[],n=[];return Object.keys(e).forEach(s=>{r.push(s),n.push(String(e[s]))}),[r,n.join(t)]}function UI(e){return Object.keys(e).reduce((t,r)=>(r in mc||(t[r]=e[r]),t),{})}function Vb(e={},t=[]){let r=Ke(e.splitter,ne,Mc),n=!Sc(e.format)&&e.format?e.format:{hash:"%H",date:e.strictDate===!1?"%ai":"%aI",message:"%s",refs:"%D",body:e.multiLine?"%B":"%b",author_name:e.mailMap!==!1?"%aN":"%an",author_email:e.mailMap!==!1?"%aE":"%ae"},[s,o]=BI(n,r),i=[],a=[`--pretty=format:${Nc}${o}${Pc}`,...t],c=e.n||e["max-count"]||e.maxCount;if(c&&a.push(`--max-count=${c}`),e.from||e.to){let u=e.symmetric!==!1?"...":"..";i.push(`${e.from||""}${u}${e.to||""}`)}return ne(e.file)&&a.push("--follow",CA(e.file)),Ec(UI(e),a),{fields:s,splitter:r,commands:[...a,...i]}}function GI(e,t,r){let n=Bb(e,t,Dc(r));return{commands:["log",...r],format:"utf-8",parser:n}}function qI(){return{log(...r){let n=z(arguments),s=Vb(Tc(arguments),Ke(arguments[0],wn)),o=t(...r)||Ro(s.commands)||e(s);return this._runTask(o,n)}};function e(r){return GI(r.splitter,r.fields,r.commands)}function t(r,n){return ne(r)&&ne(n)&&pe("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}var mc,zb=g({"src/lib/tasks/log.ts"(){"use strict";xn(),hn(),Gb(),C(),H(),Fc(),mc=(e=>(e[e["--pretty"]=0]="--pretty",e[e["max-count"]=1]="max-count",e[e.maxCount=2]="maxCount",e[e.n=3]="n",e[e.file=4]="file",e[e.format=5]="format",e[e.from=6]="from",e[e.to=7]="to",e[e.splitter=8]="splitter",e[e.symmetric=9]="symmetric",e[e.mailMap=10]="mailMap",e[e.multiLine=11]="multiLine",e[e.strictDate=12]="strictDate",e))(mc||{})}}),ho,Wb,VI=g({"src/lib/responses/MergeSummary.ts"(){"use strict";ho=class{constructor(e,t=null,r){this.reason=e,this.file=t,this.meta=r}toString(){return`${this.file}:${this.reason}`}},Wb=class{constructor(){this.conflicts=[],this.merges=[],this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(", ")}`:"OK"}}}}),hc,Hb,zI=g({"src/lib/responses/PullSummary.ts"(){"use strict";hc=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},Hb=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function nc(e){return e.objects=e.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}function my(e){let t=/^\s*(\d+)/.exec(e),r=/delta (\d+)/i.exec(e);return{count:U(t&&t[1]||"0"),delta:U(r&&r[1]||"0")}}var Zb,WI=g({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";C(),Zb=[new bt(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,r])=>{let n=t.toLowerCase(),s=nc(e.remoteMessages);Object.assign(s,{[n]:U(r)})}),new bt(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[t,r])=>{let n=t.toLowerCase(),s=nc(e.remoteMessages);Object.assign(s,{[n]:U(r)})}),new bt(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,r,n])=>{let s=nc(e.remoteMessages);s.total=my(t),s.reused=my(r),s.packReused=U(n)})]}});function Yb(e,t){return me({remoteMessages:new Kb},Xb,t)}var Xb,Kb,Jb=g({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";C(),WI(),Xb=[new bt(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...Zb,new bt([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(e,[t])=>{e.remoteMessages.pullRequestUrl=t}),new bt([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(e,[t,r,n])=>{e.remoteMessages.vulnerabilities={count:U(t),summary:r,url:n}})],Kb=class{constructor(){this.all=[]}}}});function HI(e,t){let r=me(new Hb,Qb,[e,t]);return r.message&&r}var hy,gy,yy,by,Qb,wy,jc,ew=g({"src/lib/parsers/parse-pull.ts"(){"use strict";zI(),C(),Jb(),hy=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,gy=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,yy=/^(create|delete) mode \d+ (.+)/,by=[new I(hy,(e,[t,r,n])=>{e.files.push(t),r&&(e.insertions[t]=r.length),n&&(e.deletions[t]=n.length)}),new I(gy,(e,[t,,r,,n])=>r!==void 0||n!==void 0?(e.summary.changes=+t||0,e.summary.insertions=+r||0,e.summary.deletions=+n||0,!0):!1),new I(yy,(e,[t,r])=>{F(e.files,r),F(t==="create"?e.created:e.deleted,r)})],Qb=[new I(/^from\s(.+)$/i,(e,[t])=>void(e.remote=t)),new I(/^fatal:\s(.+)$/,(e,[t])=>void(e.message=t)),new I(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(e,[t,r,n,s])=>{e.branch.local=n,e.hash.local=t,e.branch.remote=s,e.hash.remote=r})],wy=(e,t)=>me(new hc,by,[e,t]),jc=(e,t)=>Object.assign(new hc,wy(e,t),Yb(e,t))}}),xy,tw,Sy,ZI=g({"src/lib/parsers/parse-merge.ts"(){"use strict";VI(),C(),ew(),xy=[new I(/^Auto-merging\s+(.+)$/,(e,[t])=>{e.merges.push(t)}),new I(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(e,[t,r])=>{e.conflicts.push(new ho(t,r))}),new I(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,r,n])=>{e.conflicts.push(new ho(t,r,{deleteRef:n}))}),new I(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new ho(t,null))}),new I(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],tw=(e,t)=>Object.assign(Sy(e,t),jc(e,t)),Sy=e=>me(new Wb,xy,e)}});function vy(e){return e.length?{commands:["merge",...e],format:"utf-8",parser(t,r){let n=tw(t,r);if(n.failed)throw new gn(n);return n}}:pe("Git.merge requires at least one option")}var YI=g({"src/lib/tasks/merge.ts"(){"use strict";Cr(),ZI(),H()}});function XI(e,t,r){let n=r.includes("deleted"),s=r.includes("tag")||/^refs\/tags/.test(e),o=!r.includes("new");return{deleted:n,tag:s,branch:!s,new:!o,alreadyUpdated:o,local:e,remote:t}}var _y,rw,Ey,KI=g({"src/lib/parsers/parse-push.ts"(){"use strict";C(),Jb(),_y=[new I(/^Pushing to (.+)$/,(e,[t])=>{e.repo=t}),new I(/^updating local tracking ref '(.+)'/,(e,[t])=>{e.ref=fn(Ce({},e.ref||{}),{local:t})}),new I(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(e,[t,r,n])=>{e.pushed.push(XI(t,r,n))}),new I(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[t,r,n])=>{e.branch=fn(Ce({},e.branch||{}),{local:t,remote:r,remoteName:n})}),new I(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(e,[t,r,n,s])=>{e.update={head:{local:t,remote:r},hash:{from:n,to:s}}})],rw=(e,t)=>{let r=Ey(e,t),n=Yb(e,t);return Ce(Ce({},r),n)},Ey=(e,t)=>me({pushed:[]},_y,[e,t])}}),nw={};Z(nw,{pushTagsTask:()=>JI,pushTask:()=>Bc});function JI(e={},t){return F(t,"--tags"),Bc(e,t)}function Bc(e={},t){let r=["push",...t];return e.branch&&r.splice(1,0,e.branch),e.remote&&r.splice(1,0,e.remote),_o(r,"-v"),F(r,"--verbose"),F(r,"--porcelain"),{commands:r,format:"utf-8",parser:rw}}var sw=g({"src/lib/tasks/push.ts"(){"use strict";KI(),C()}});function QI(){return{showBuffer(){let e=["show",...de(arguments,1)];return e.includes("--binary")||e.splice(1,0,"--binary"),this._runTask(lb(e),z(arguments))},show(){let e=["show",...de(arguments,1)];return this._runTask(ae(e),z(arguments))}}}var e1=g({"src/lib/tasks/show.ts"(){"use strict";C(),H()}}),Ty,ow,t1=g({"src/lib/responses/FileStatusSummary.ts"(){"use strict";Ty=/^(.+)\0(.+)$/,ow=class{constructor(e,t,r){if(this.path=e,this.index=t,this.working_dir=r,t==="R"||r==="R"){let n=Ty.exec(e)||[null,e,e];this.from=n[2]||"",this.path=n[1]||""}}}}});function Oy(e){let[t,r]=e.split(kr);return{from:r||t,to:t}}function be(e,t,r){return[`${e}${t}`,r]}function sc(e,...t){return t.map(r=>be(e,r,(n,s)=>F(n.conflicted,s)))}function r1(e,t){let r=t.trim();switch(" "){case r.charAt(2):return n(r.charAt(0),r.charAt(1),r.substr(3));case r.charAt(1):return n(" ",r.charAt(0),r.substr(2));default:return}function n(s,o,i){let a=`${s}${o}`,c=iw.get(a);c&&c(e,i),a!=="##"&&a!=="!!"&&e.files.push(new ow(i,s,o))}}var Ry,iw,aw,n1=g({"src/lib/responses/StatusSummary.ts"(){"use strict";C(),t1(),Ry=class{constructor(){this.not_added=[],this.conflicted=[],this.created=[],this.deleted=[],this.ignored=void 0,this.modified=[],this.renamed=[],this.files=[],this.staged=[],this.ahead=0,this.behind=0,this.current=null,this.tracking=null,this.detached=!1,this.isClean=()=>!this.files.length}},iw=new Map([be(" ","A",(e,t)=>F(e.created,t)),be(" ","D",(e,t)=>F(e.deleted,t)),be(" ","M",(e,t)=>F(e.modified,t)),be("A"," ",(e,t)=>F(e.created,t)&&F(e.staged,t)),be("A","M",(e,t)=>F(e.created,t)&&F(e.staged,t)&&F(e.modified,t)),be("D"," ",(e,t)=>F(e.deleted,t)&&F(e.staged,t)),be("M"," ",(e,t)=>F(e.modified,t)&&F(e.staged,t)),be("M","M",(e,t)=>F(e.modified,t)&&F(e.staged,t)),be("R"," ",(e,t)=>{F(e.renamed,Oy(t))}),be("R","M",(e,t)=>{let r=Oy(t);F(e.renamed,r),F(e.modified,r.to)}),be("!","!",(e,t)=>{F(e.ignored=e.ignored||[],t)}),be("?","?",(e,t)=>F(e.not_added,t)),...sc("A","A","U"),...sc("D","D","U"),...sc("U","A","D","U"),["##",(e,t)=>{let r=/ahead (\d+)/,n=/behind (\d+)/,s=/^(.+?(?=(?:\.{3}|\s|$)))/,o=/\.{3}(\S*)/,i=/\son\s([\S]+)$/,a;a=r.exec(t),e.ahead=a&&+a[1]||0,a=n.exec(t),e.behind=a&&+a[1]||0,a=s.exec(t),e.current=a&&a[1],a=o.exec(t),e.tracking=a&&a[1],a=i.exec(t),e.current=a&&a[1]||e.current,e.detached=/\(no branch\)/.test(t)}]]),aw=function(e){let t=e.split(kr),r=new Ry;for(let n=0,s=t.length;n<s;){let o=t[n++].trim();o&&(o.charAt(0)==="R"&&(o+=kr+(t[n++]||"")),r1(r,o))}return r}}});function s1(e){return{format:"utf-8",commands:["status","--porcelain","-b","-u","--null",...e.filter(r=>!cw.includes(r))],parser(r){return aw(r)}}}var cw,o1=g({"src/lib/tasks/status.ts"(){"use strict";n1(),cw=["--null","-z"]}});function wo(e=0,t=0,r=0,n="",s=!0){return Object.defineProperty({major:e,minor:t,patch:r,agent:n,installed:s},"toString",{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}function i1(){return wo(0,0,0,"",!1)}function a1(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:c1,onError(e,t,r,n){if(e.exitCode===-2)return r(Buffer.from(Uc));n(t)}})}}}function c1(e){return e===Uc?i1():me(wo(0,0,0,e),uw,e)}var Uc,uw,u1=g({"src/lib/tasks/version.ts"(){"use strict";C(),Uc="installed=false",uw=[new I(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,r,n,s=""])=>{Object.assign(e,wo(U(t),U(r),U(n),s))}),new I(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,r,n,s=""])=>{Object.assign(e,wo(U(t),U(r),n,s))})]}}),lw={};Z(lw,{SimpleGitApi:()=>gc});var gc,l1=g({"src/lib/simple-git-api.ts"(){"use strict";hI(),gI(),bI(),SI(),OI(),bb(),kI(),_b(),AI(),NI(),zb(),YI(),sw(),e1(),o1(),H(),u1(),C(),gc=class{constructor(e){this._executor=e}_runTask(e,t){let r=this._executor.chain(),n=r.push(e);return t&&pI(e,n,t),Object.create(this,{then:{value:n.then.bind(n)},catch:{value:n.catch.bind(n)},_executor:{value:r}})}add(e){return this._runTask(ae(["add",...Xe(e)]),z(arguments))}cwd(e){let t=z(arguments);return typeof e=="string"?this._runTask(ly(e,this._executor),t):typeof(e==null?void 0:e.path)=="string"?this._runTask(ly(e.path,e.root&&this._executor||void 0),t):this._runTask(pe("Git.cwd: workingDirectory must be supplied as a string"),t)}hashObject(e,t){return this._runTask(CI(e,t===!0),z(arguments))}init(e){return this._runTask(LI(e===!0,this._executor.cwd,de(arguments)),z(arguments))}merge(){return this._runTask(vy(de(arguments)),z(arguments))}mergeFromTo(e,t){return ne(e)&&ne(t)?this._runTask(vy([e,t,...de(arguments)]),z(arguments,!1)):this._runTask(pe("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(e){return this._executor.outputHandler=e,this}push(){let e=Bc({remote:Ke(arguments[0],ne),branch:Ke(arguments[1],ne)},de(arguments));return this._runTask(e,z(arguments))}stash(){return this._runTask(ae(["stash",...de(arguments)]),z(arguments))}status(){return this._runTask(s1(de(arguments)),z(arguments))}},Object.assign(gc.prototype,yI(),TI(),eI(),xI(),RI(),sI(),qI(),QI(),a1())}}),fw={};Z(fw,{Scheduler:()=>pw});var ky,pw,f1=g({"src/lib/runners/scheduler.ts"(){"use strict";C(),kb(),ky=(()=>{let e=0;return()=>{e++;let{promise:t,done:r}=(0,dw.createDeferred)();return{promise:t,done:r,id:e}}})(),pw=class{constructor(e=2){this.concurrency=e,this.logger=Ic("","scheduler"),this.pending=[],this.running=[],this.logger("Constructed, concurrency=%s",e)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){this.logger("Schedule attempt ignored, pending=%s running=%s concurrency=%s",this.pending.length,this.running.length,this.concurrency);return}let e=F(this.running,this.pending.shift());this.logger("Attempting id=%s",e.id),e.done(()=>{this.logger("Completing id=",e.id),_o(this.running,e),this.schedule()})}next(){let{promise:e,id:t}=F(this.pending,ky());return this.logger("Scheduling id=%s",t),this.schedule(),e}}}}),mw={};Z(mw,{applyPatchTask:()=>d1});function d1(e,t){return ae(["apply",...t,...e])}var p1=g({"src/lib/tasks/apply-patch.ts"(){"use strict";H()}});function m1(e,t){return{branch:e,hash:t,success:!0}}function h1(e){return{branch:e,hash:null,success:!1}}var hw,g1=g({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";hw=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function gw(e,t){return t===1&&yc.test(e)}var Cy,yc,Ay,ko,y1=g({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";g1(),C(),Cy=/(\S+)\s+\(\S+\s([^)]+)\)/,yc=/^error[^']+'([^']+)'/m,Ay=[new I(Cy,(e,[t,r])=>{let n=m1(t,r);e.all.push(n),e.branches[t]=n}),new I(yc,(e,[t])=>{let r=h1(t);e.errors.push(r),e.all.push(r),e.branches[t]=r})],ko=(e,t)=>me(new hw,Ay,[e,t])}}),yw,b1=g({"src/lib/responses/BranchSummary.ts"(){"use strict";yw=class{constructor(){this.all=[],this.branches={},this.current="",this.detached=!1}push(e,t,r,n,s){e==="*"&&(this.detached=t,this.current=r),this.all.push(r),this.branches[r]={current:e==="*",linkedWorkTree:e==="+",name:r,commit:n,label:s}}}}});function Iy(e){return e?e.charAt(0):""}function bw(e){return me(new yw,ww,e)}var ww,w1=g({"src/lib/parsers/parse-branch.ts"(){"use strict";b1(),C(),ww=[new I(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,r,n,s])=>{e.push(Iy(t),!0,r,n,s)}),new I(new RegExp("^([*+]\\s)?(\\S+)\\s+([a-z0-9]+)\\s?(.*)$","s"),(e,[t,r,n,s])=>{e.push(Iy(t),!1,r,n,s)})]}}),xw={};Z(xw,{branchLocalTask:()=>S1,branchTask:()=>x1,containsDeleteBranchCommand:()=>Sw,deleteBranchTask:()=>_1,deleteBranchesTask:()=>v1});function Sw(e){let t=["-d","-D","--delete"];return e.some(r=>t.includes(r))}function x1(e){let t=Sw(e),r=["branch",...e];return r.length===1&&r.push("-a"),r.includes("-v")||r.splice(1,0,"-v"),{format:"utf-8",commands:r,parser(n,s){return t?ko(n,s).all[0]:bw(n)}}}function S1(){return{format:"utf-8",commands:["branch","-v"],parser:bw}}function v1(e,t=!1){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser(r,n){return ko(r,n)},onError({exitCode:r,stdOut:n},s,o,i){if(!gw(String(s),r))return i(s);o(n)}}}function _1(e,t=!1){let r={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser(n,s){return ko(n,s).branches[e]},onError({exitCode:n,stdErr:s,stdOut:o},i,a,c){if(!gw(String(i),n))return c(i);throw new gn(r.parser(pn(o),pn(s)),String(i))}};return r}var E1=g({"src/lib/tasks/branch.ts"(){"use strict";Cr(),y1(),w1(),C()}}),vw,T1=g({"src/lib/responses/CheckIgnore.ts"(){"use strict";vw=e=>e.split(/\n/g).map(t=>t.trim()).filter(t=>!!t)}}),_w={};Z(_w,{checkIgnoreTask:()=>O1});function O1(e){return{commands:["check-ignore",...e],format:"utf-8",parser:vw}}var R1=g({"src/lib/tasks/check-ignore.ts"(){"use strict";T1()}}),Ew={};Z(Ew,{cloneMirrorTask:()=>C1,cloneTask:()=>Tw});function k1(e){return/^--upload-pack(=|$)/.test(e)}function Tw(e,t,r){let n=["clone",...r];return ne(e)&&n.push(e),ne(t)&&n.push(t),n.find(k1)?pe("git.fetch: potential exploit argument blocked."):ae(n)}function C1(e,t,r){return F(r,"--mirror"),Tw(e,t,r)}var A1=g({"src/lib/tasks/clone.ts"(){"use strict";H(),C()}});function I1(e,t){return me({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},Ow,[e,t])}var Ow,$1=g({"src/lib/parsers/parse-fetch.ts"(){"use strict";C(),Ow=[new I(/From (.+)$/,(e,[t])=>{e.remote=t}),new I(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.branches.push({name:t,tracking:r})}),new I(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.tags.push({name:t,tracking:r})}),new I(/- \[deleted]\s+\S+\s*-> (.+)$/,(e,[t])=>{e.deleted.push({tracking:t})}),new I(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(e,[t,r,n,s])=>{e.updated.push({name:n,tracking:s,to:r,from:t})})]}}),Rw={};Z(Rw,{fetchTask:()=>L1});function D1(e){return/^--upload-pack(=|$)/.test(e)}function L1(e,t,r){let n=["fetch",...r];return e&&t&&n.push(e,t),n.find(D1)?pe("git.fetch: potential exploit argument blocked."):{commands:n,format:"utf-8",parser:I1}}var N1=g({"src/lib/tasks/fetch.ts"(){"use strict";$1(),H()}});function P1(e){return me({moves:[]},kw,e)}var kw,M1=g({"src/lib/parsers/parse-move.ts"(){"use strict";C(),kw=[new I(/^Renaming (.+) to (.+)$/,(e,[t,r])=>{e.moves.push({from:t,to:r})})]}}),Cw={};Z(Cw,{moveTask:()=>F1});function F1(e,t){return{commands:["mv","-v",...Xe(e),t],format:"utf-8",parser:P1}}var j1=g({"src/lib/tasks/move.ts"(){"use strict";M1(),C()}}),Aw={};Z(Aw,{pullTask:()=>B1});function B1(e,t,r){let n=["pull",...r];return e&&t&&n.splice(1,0,e,t),{commands:n,format:"utf-8",parser(s,o){return jc(s,o)},onError(s,o,i,a){let c=HI(pn(s.stdOut),pn(s.stdErr));if(c)return a(new gn(c));a(o)}}}var U1=g({"src/lib/tasks/pull.ts"(){"use strict";Cr(),ew(),C()}});function G1(e){let t={};return Iw(e,([r])=>t[r]={name:r}),Object.values(t)}function q1(e){let t={};return Iw(e,([r,n,s])=>{t.hasOwnProperty(r)||(t[r]={name:r,refs:{fetch:"",push:""}}),s&&n&&(t[r].refs[s.replace(/[^a-z]/g,"")]=n)}),Object.values(t)}function Iw(e,t){wc(e,r=>t(r.split(/\s+/)))}var V1=g({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";C()}}),$w={};Z($w,{addRemoteTask:()=>z1,getRemotesTask:()=>W1,listRemotesTask:()=>H1,remoteTask:()=>Z1,removeRemoteTask:()=>Y1});function z1(e,t,r){return ae(["remote","add",...r,e,t])}function W1(e){let t=["remote"];return e&&t.push("-v"),{commands:t,format:"utf-8",parser:e?q1:G1}}function H1(e){let t=[...e];return t[0]!=="ls-remote"&&t.unshift("ls-remote"),ae(t)}function Z1(e){let t=[...e];return t[0]!=="remote"&&t.unshift("remote"),ae(t)}function Y1(e){return ae(["remote","remove",e])}var X1=g({"src/lib/tasks/remote.ts"(){"use strict";V1(),H()}}),Dw={};Z(Dw,{stashListTask:()=>K1});function K1(e={},t){let r=Vb(e),n=["stash","list",...r.commands,...t],s=Bb(r.splitter,r.fields,Dc(n));return Ro(n)||{commands:n,format:"utf-8",parser:s}}var J1=g({"src/lib/tasks/stash-list.ts"(){"use strict";xn(),Gb(),Fc(),zb()}}),Lw={};Z(Lw,{addSubModuleTask:()=>Q1,initSubModuleTask:()=>e$,subModuleTask:()=>Co,updateSubModuleTask:()=>t$});function Q1(e,t){return Co(["add",e,t])}function e$(e){return Co(["init",...e])}function Co(e){let t=[...e];return t[0]!=="submodule"&&t.unshift("submodule"),ae(t)}function t$(e){return Co(["update",...e])}var r$=g({"src/lib/tasks/sub-module.ts"(){"use strict";H()}});function n$(e,t){let r=isNaN(e),n=isNaN(t);return r!==n?r?1:-1:r?Nw(e,t):0}function Nw(e,t){return e===t?0:e>t?1:-1}function s$(e){return e.trim()}function lo(e){return typeof e=="string"&&parseInt(e.replace(/^\D+/g,""),10)||0}var $y,Pw,o$=g({"src/lib/responses/TagList.ts"(){"use strict";$y=class{constructor(e,t){this.all=e,this.latest=t}},Pw=function(e,t=!1){let r=e.split(`
59
+ `).map(s$).filter(Boolean);t||r.sort(function(s,o){let i=s.split("."),a=o.split(".");if(i.length===1||a.length===1)return n$(lo(i[0]),lo(a[0]));for(let c=0,u=Math.max(i.length,a.length);c<u;c++){let l=Nw(lo(i[c]),lo(a[c]));if(l)return l}return 0});let n=t?r[0]:[...r].reverse().find(s=>s.indexOf(".")>=0);return new $y(r,n)}}}),Mw={};Z(Mw,{addAnnotatedTagTask:()=>c$,addTagTask:()=>a$,tagListTask:()=>i$});function i$(e=[]){let t=e.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...e],parser(r){return Pw(r,t)}}}function a$(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}function c$(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser(){return{name:e}}}}var u$=g({"src/lib/tasks/tag.ts"(){"use strict";o$()}}),l$=RA({"src/git.js"(e,t){"use strict";var{GitExecutor:r}=(dI(),V(Ab)),{SimpleGitApi:n}=(l1(),V(lw)),{Scheduler:s}=(f1(),V(fw)),{configurationErrorTask:o}=(H(),V(lc)),{asArray:i,filterArray:a,filterPrimitives:c,filterString:u,filterStringOrStringArray:l,filterType:f,getTrailingOptions:d,trailingFunctionArgument:p,trailingOptionsArgument:b}=(C(),V(eb)),{applyPatchTask:T}=(p1(),V(mw)),{branchTask:P,branchLocalTask:M,deleteBranchesTask:j,deleteBranchTask:Y}=(E1(),V(xw)),{checkIgnoreTask:X}=(R1(),V(_w)),{checkIsRepoTask:we}=(sb(),V(tb)),{cloneTask:ce,cloneMirrorTask:Ae}=(A1(),V(Ew)),{cleanWithOptionsTask:Ie,isCleanOptionsArray:xe}=(hb(),V(pb)),{diffSummaryTask:Ar}=(Fc(),V(qb)),{fetchTask:xt}=(N1(),V(Rw)),{moveTask:Kw}=(j1(),V(Cw)),{pullTask:Jw}=(U1(),V(Aw)),{pushTagsTask:Qw}=(sw(),V(nw)),{addRemoteTask:ex,getRemotesTask:tx,listRemotesTask:rx,remoteTask:nx,removeRemoteTask:sx}=(X1(),V($w)),{getResetMode:ox,resetTask:ix}=(Rb(),V(Eb)),{stashListTask:ax}=(J1(),V(Dw)),{addSubModuleTask:cx,initSubModuleTask:ux,subModuleTask:lx,updateSubModuleTask:fx}=(r$(),V(Lw)),{addAnnotatedTagTask:dx,addTagTask:px,tagListTask:mx}=(u$(),V(Mw)),{straightThroughBufferTask:hx,straightThroughStringTask:je}=(H(),V(lc));function O(h,E){this._plugins=E,this._executor=new r(h.baseDir,new s(h.maxConcurrentProcesses),E),this._trimmed=h.trimmed}(O.prototype=Object.create(n.prototype)).constructor=O,O.prototype.customBinary=function(h){return this._plugins.reconfigure("binary",h),this},O.prototype.env=function(h,E){return arguments.length===1&&typeof h=="object"?this._executor.env=h:(this._executor.env=this._executor.env||{})[h]=E,this},O.prototype.stashList=function(h){return this._runTask(ax(b(arguments)||{},a(h)&&h||[]),p(arguments))};function zc(h,E,B,se){return typeof B!="string"?o(`git.${h}() requires a string 'repoPath'`):E(B,f(se,u),d(arguments))}O.prototype.clone=function(){return this._runTask(zc("clone",ce,...arguments),p(arguments))},O.prototype.mirror=function(){return this._runTask(zc("mirror",Ae,...arguments),p(arguments))},O.prototype.mv=function(h,E){return this._runTask(Kw(h,E),p(arguments))},O.prototype.checkoutLatestTag=function(h){var E=this;return this.pull(function(){E.tags(function(B,se){E.checkout(se.latest,h)})})},O.prototype.pull=function(h,E,B,se){return this._runTask(Jw(f(h,u),f(E,u),d(arguments)),p(arguments))},O.prototype.fetch=function(h,E){return this._runTask(xt(f(h,u),f(E,u),d(arguments)),p(arguments))},O.prototype.silent=function(h){return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"),this},O.prototype.tags=function(h,E){return this._runTask(mx(d(arguments)),p(arguments))},O.prototype.rebase=function(){return this._runTask(je(["rebase",...d(arguments)]),p(arguments))},O.prototype.reset=function(h){return this._runTask(ix(ox(h),d(arguments)),p(arguments))},O.prototype.revert=function(h){let E=p(arguments);return typeof h!="string"?this._runTask(o("Commit must be a string"),E):this._runTask(je(["revert",...d(arguments,0,!0),h]),E)},O.prototype.addTag=function(h){let E=typeof h=="string"?px(h):o("Git.addTag requires a tag name");return this._runTask(E,p(arguments))},O.prototype.addAnnotatedTag=function(h,E){return this._runTask(dx(h,E),p(arguments))},O.prototype.deleteLocalBranch=function(h,E,B){return this._runTask(Y(h,typeof E=="boolean"?E:!1),p(arguments))},O.prototype.deleteLocalBranches=function(h,E,B){return this._runTask(j(h,typeof E=="boolean"?E:!1),p(arguments))},O.prototype.branch=function(h,E){return this._runTask(P(d(arguments)),p(arguments))},O.prototype.branchLocal=function(h){return this._runTask(M(),p(arguments))},O.prototype.raw=function(h){let E=!Array.isArray(h),B=[].slice.call(E?arguments:h,0);for(let $e=0;$e<B.length&&E;$e++)if(!c(B[$e])){B.splice($e,B.length-$e);break}B.push(...d(arguments,0,!0));var se=p(arguments);return B.length?this._runTask(je(B,this._trimmed),se):this._runTask(o("Raw: must supply one or more command to execute"),se)},O.prototype.submoduleAdd=function(h,E,B){return this._runTask(cx(h,E),p(arguments))},O.prototype.submoduleUpdate=function(h,E){return this._runTask(fx(d(arguments,!0)),p(arguments))},O.prototype.submoduleInit=function(h,E){return this._runTask(ux(d(arguments,!0)),p(arguments))},O.prototype.subModule=function(h,E){return this._runTask(lx(d(arguments)),p(arguments))},O.prototype.listRemote=function(){return this._runTask(rx(d(arguments)),p(arguments))},O.prototype.addRemote=function(h,E,B){return this._runTask(ex(h,E,d(arguments)),p(arguments))},O.prototype.removeRemote=function(h,E){return this._runTask(sx(h),p(arguments))},O.prototype.getRemotes=function(h,E){return this._runTask(tx(h===!0),p(arguments))},O.prototype.remote=function(h,E){return this._runTask(nx(d(arguments)),p(arguments))},O.prototype.tag=function(h,E){let B=d(arguments);return B[0]!=="tag"&&B.unshift("tag"),this._runTask(je(B),p(arguments))},O.prototype.updateServerInfo=function(h){return this._runTask(je(["update-server-info"]),p(arguments))},O.prototype.pushTags=function(h,E){let B=Qw({remote:f(h,u)},d(arguments));return this._runTask(B,p(arguments))},O.prototype.rm=function(h){return this._runTask(je(["rm","-f",...i(h)]),p(arguments))},O.prototype.rmKeepLocal=function(h){return this._runTask(je(["rm","--cached",...i(h)]),p(arguments))},O.prototype.catFile=function(h,E){return this._catFile("utf-8",arguments)},O.prototype.binaryCatFile=function(){return this._catFile("buffer",arguments)},O.prototype._catFile=function(h,E){var B=p(E),se=["cat-file"],$e=E[0];if(typeof $e=="string")return this._runTask(o("Git.catFile: options must be supplied as an array of strings"),B);Array.isArray($e)&&se.push.apply(se,$e);let No=h==="buffer"?hx(se):je(se);return this._runTask(No,B)},O.prototype.diff=function(h,E){let B=u(h)?o("git.diff: supplying options as a single string is no longer supported, switch to an array of strings"):je(["diff",...d(arguments)]);return this._runTask(B,p(arguments))},O.prototype.diffSummary=function(){return this._runTask(Ar(d(arguments,1)),p(arguments))},O.prototype.applyPatch=function(h){let E=l(h)?T(i(h),d([].slice.call(arguments,1))):o("git.applyPatch requires one or more string patches as the first argument");return this._runTask(E,p(arguments))},O.prototype.revparse=function(){let h=["rev-parse",...d(arguments,!0)];return this._runTask(je(h,!0),p(arguments))},O.prototype.clean=function(h,E,B){let se=xe(h),$e=se&&h.join("")||f(h,u)||"",No=d([].slice.call(arguments,se?1:0));return this._runTask(Ie($e,No),p(arguments))},O.prototype.exec=function(h){let E={commands:[],format:"utf-8",parser(){typeof h=="function"&&h()}};return this._runTask(E)},O.prototype.clearQueue=function(){return this},O.prototype.checkIgnore=function(h,E){return this._runTask(X(i(f(h,l,[]))),p(arguments))},O.prototype.checkIsRepo=function(h,E){return this._runTask(we(f(h,u)),p(arguments))},t.exports=O}});hn();wt();var f$=class extends at{constructor(e,t){super(void 0,t),this.config=e}};wt();wt();var it=class extends at{constructor(e,t,r){super(e,r),this.task=e,this.plugin=t,Object.setPrototypeOf(this,new.target.prototype)}};Cr();jy();sb();hb();bb();xb();_b();Rb();function d$(e){return e?[{type:"spawn.before",action(n,s){e.aborted&&s.kill(new it(void 0,"abort","Abort already signaled"))}},{type:"spawn.after",action(n,s){function o(){s.kill(new it(void 0,"abort","Abort signal received"))}e.addEventListener("abort",o),s.spawned.on("close",()=>e.removeEventListener("abort",o))}}]:void 0}function p$(e){return typeof e=="string"&&e.trim().toLowerCase()==="-c"}function m$(e,t){if(p$(e)&&/^\s*protocol(.[a-z]+)?.allow/.test(t))throw new it(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}function h$(e,t){if(/^\s*--(upload|receive)-pack/.test(e))throw new it(void 0,"unsafe","Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack");if(t==="clone"&&/^\s*-u\b/.test(e))throw new it(void 0,"unsafe","Use of clone with option -u is not permitted without enabling allowUnsafePack");if(t==="push"&&/^\s*--exec\b/.test(e))throw new it(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}function g$({allowUnsafeProtocolOverride:e=!1,allowUnsafePack:t=!1}={}){return{type:"spawn.args",action(r,n){return r.forEach((s,o)=>{let i=o<r.length?r[o+1]:"";e||m$(s,i),t||h$(s,n.method)}),r}}}C();function y$(e){let t=dn(e,"-c");return{type:"spawn.args",action(r){return[...t,...r]}}}C();var Dy=(0,Rr.deferred)().promise;function b$({onClose:e=!0,onExit:t=50}={}){function r(){let s=-1,o={close:(0,Rr.deferred)(),closeTimeout:(0,Rr.deferred)(),exit:(0,Rr.deferred)(),exitTimeout:(0,Rr.deferred)()},i=Promise.race([e===!1?Dy:o.closeTimeout.promise,t===!1?Dy:o.exitTimeout.promise]);return n(e,o.close,o.closeTimeout),n(t,o.exit,o.exitTimeout),{close(a){s=a,o.close.done()},exit(a){s=a,o.exit.done()},get exitCode(){return s},result:i}}function n(s,o,i){s!==!1&&(s===!0?o.promise:o.promise.then(()=>oc(s))).then(i.done)}return{type:"spawn.after",action(s,o){return ln(this,arguments,function*(i,{spawned:a,close:c}){var u,l;let f=r(),d=!0,p=()=>void(d=!1);(u=a.stdout)==null||u.on("data",p),(l=a.stderr)==null||l.on("data",p),a.on("error",p),a.on("close",b=>f.close(b)),a.on("exit",b=>f.exit(b));try{yield f.result,d&&(yield oc(50)),c(f.exitCode)}catch(b){c(f.exitCode,b)}})}}}C();var w$="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",Ly="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function x$(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(e)}function Ny(e,t){if(e.length<1||e.length>2)throw new it(void 0,"binary",w$);if(e.some(x$))if(t)console.warn(Ly);else throw new it(void 0,"binary",Ly);let[n,s]=e;return{binary:n,prefix:s}}function S$(e,t=["git"],r=!1){let n=Ny(Xe(t),r);e.on("binary",s=>{n=Ny(Xe(s),r)}),e.append("spawn.binary",()=>n.binary),e.append("spawn.args",s=>n.prefix?[n.prefix,...s]:s)}wt();function v$(e){return!!(e.exitCode&&e.stdErr.length)}function _$(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function E$(e=!1,t=v$,r=_$){return(n,s)=>!e&&n||!t(s)?n:r(s)}function Py(e){return{type:"task.error",action(t,r){let n=e(t.error,{stdErr:r.stdErr,stdOut:r.stdOut,exitCode:r.exitCode});return Buffer.isBuffer(n)?{error:new at(void 0,n.toString("utf-8"))}:{error:n}}}}C();var T$=class{constructor(){this.plugins=new Set,this.events=new Fw.EventEmitter}on(e,t){this.events.on(e,t)}reconfigure(e,t){this.events.emit(e,t)}append(e,t){let r=F(this.plugins,{type:e,action:t});return()=>this.plugins.delete(r)}add(e){let t=[];return Xe(e).forEach(r=>r&&this.plugins.add(F(t,r))),()=>{t.forEach(r=>this.plugins.delete(r))}}exec(e,t,r){let n=t,s=Object.freeze(Object.create(r));for(let o of this.plugins)o.type===e&&(n=o.action(n,s));return n}};C();function O$(e){let t="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(o,i){return r.includes(i.method)?zy(o,t):o}},{type:"spawn.after",action(o,i){var a;i.commands.includes(t)&&((a=i.spawned.stderr)==null||a.on("data",c=>{let u=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(c.toString("utf8"));u&&e({method:i.method,stage:R$(u[1]),progress:U(u[2]),processed:U(u[3]),total:U(u[4])})}))}}]}function R$(e){return String(e.toLowerCase().split(" ",1))||"unknown"}C();function k$(e){let t=Zy(e,["uid","gid"]);return{type:"spawn.options",action(r){return Ce(Ce({},t),r)}}}function C$({block:e,stdErr:t=!0,stdOut:r=!0}){if(e>0)return{type:"spawn.after",action(n,s){var o,i;let a;function c(){a&&clearTimeout(a),a=setTimeout(l,e)}function u(){var f,d;(f=s.spawned.stdout)==null||f.off("data",c),(d=s.spawned.stderr)==null||d.off("data",c),s.spawned.off("exit",u),s.spawned.off("close",u),a&&clearTimeout(a)}function l(){u(),s.kill(new it(void 0,"timeout","block timeout reached"))}r&&((o=s.spawned.stdout)==null||o.on("data",c)),t&&((i=s.spawned.stderr)==null||i.on("data",c)),s.spawned.on("exit",u),s.spawned.on("close",u),c()}}}hn();function A$(){return{type:"spawn.args",action(e){let t=[],r;function n(s){(r=r||[]).push(...s)}for(let s=0;s<e.length;s++){let o=e[s];if(go(o)){n(iy(o));continue}if(o==="--"){n(e.slice(s+1).flatMap(i=>go(i)&&iy(i)||i));break}t.push(o)}return r?[...t,"--",...r.map(String)]:t}}}C();var I$=l$();function $$(e,t){var r;let n=new T$,s=Jy(e&&(typeof e=="string"?{baseDir:e}:e)||{},t);if(!xc(s.baseDir))throw new f$(s,"Cannot use simple-git on a directory that does not exist");return Array.isArray(s.config)&&n.add(y$(s.config)),n.add(g$(s.unsafe)),n.add(A$()),n.add(b$(s.completion)),s.abort&&n.add(d$(s.abort)),s.progress&&n.add(O$(s.progress)),s.timeout&&n.add(C$(s.timeout)),s.spawnOptions&&n.add(k$(s.spawnOptions)),n.add(Py(E$(!0))),s.errors&&n.add(Py(s.errors)),S$(n,s.binary,(r=s.unsafe)==null?void 0:r.allowUnsafeCustomBinary),new I$(s,n)}Cr();var jw=$$;async function Bw(){let e=jw();try{let{current:t}=await e.branchLocal(),r=(await e.getRemotes(!0)).map(({name:o,refs:{fetch:i}})=>({name:o,url:i})),n=r.find(({name:o})=>o==="origin")??r[0];return{possibleRepositoryName:n?n.url.split("/").slice(-2).join("/").replace(/\.git$/,""):(await e.revparse(["--show-toplevel"])).split("/").pop(),branch:t,remotes:r}}catch{return null}}var Vw=q(qw()),qc=Vw.default.bold("@seed-design/codemod"),zw=e=>({event:t,properties:r})=>console.log(qc,t,r,e);var Yw=(0,Do.resolve)(__dirname,"transforms"),Hw=Kc(),$o=Ww(),Sn=null,Xw=null;function M$(){Bw().then(e=>{Xw=e,Sn=zw({...e}),F$(Sn)})}function F$(e){j$(),Hw.version($o.version).help().command("[transformName] [...paths]","\uCF54\uB4DC \uBCC0\uD658 (codemod)").option("-l, --list","\uC0AC\uC6A9 \uAC00\uB2A5\uD55C transform \uBAA9\uB85D\uC744 \uBCF4\uC5EC\uC918\uC694").option("--log","\uB85C\uADF8\uB97C \uD30C\uC77C\uB85C \uC800\uC7A5\uD574\uC694").option("--no-track","\uC0AC\uC6A9 \uD1B5\uACC4\uB97C \uC218\uC9D1\uD558\uC9C0 \uC54A\uC544\uC694").option("-p, --parser <parser>","jscodeshift\uAC00 \uC0AC\uC6A9\uD560 \uD30C\uC11C\uB97C \uC9C0\uC815\uD574\uC694 (babel|babylon|flow|ts|tsx)",{default:"tsx"}).option("--extensions <extensions>","\uBCC0\uD658\uD560 \uD30C\uC77C \uD655\uC7A5\uC790").option("--ignore-config <ignoreConfig>","Ignore config").example(" $ npx @seed-design/codemod replace-react-icon src/ui").action(async(t,r,n)=>{let s=Vg.parse(n);s.track&&(e==null||e({event:"\uC2E4\uD589",properties:{transformName:t,paths:r}}));let o=G$();s.list&&(Vc(o),process.exit(0)),t||(console.error("transform \uC774\uB984\uC744 \uC785\uB825\uD574\uC8FC\uC138\uC694"),Vc(o),process.exit(1)),o.includes(t)||(console.error(`\uC774\uB984\uC774 ${t}\uC778 transform\uC774 \uC5C6\uC5B4\uC694`),Vc(o),process.exit(1)),r.length===0&&(console.error("\uD30C\uC77C \uACBD\uB85C\uB97C \uC785\uB825\uD574\uC8FC\uC138\uC694"),process.exit(1));let i=(0,Do.resolve)(Yw,t,"index.js");console.log(qc,`${r.join(", ")}\uC5D0 ${t} transform\uC744 \uC2E4\uD589\uD574\uC694.`),await U$(i,t,r,s)}),Hw.parse()}function j$(){(0,Lo.satisfies)(process.versions.node,$o.engines.node)===!1&&(console.error(`Node.js \uBC84\uC804 \uC694\uAD6C\uC0AC\uD56D\uC744 \uB9CC\uC871\uC2DC\uD0A4\uC9C0 \uC54A\uC544\uC694: "${$o.engines.node}"
60
60
  Node.js \uBC84\uC804\uC744 \uC5C5\uADF8\uB808\uC774\uB4DC\uD574\uC8FC\uC138\uC694.
61
61
  \uD604\uC7AC \uBC84\uC804: ${process.versions.node}
62
62
 
63
- $ nvm install ${(0,Io.minVersion)(Co.engines.node)}`),process.exit(1))}var j$=["replace-css-seed-design-color-variable","replace-css-seed-design-typography-variable"];async function B$(e,t,r,n){let{log:s,parser:o,extensions:i,ignoreConfig:a,track:c}=n,u=require.resolve("jscodeshift/bin/jscodeshift"),l=r.map(d=>(0,Ao.resolve)(process.cwd(),d));if(j$.includes(t)){require(e).processCssFiles(r,n);return}c&&(wn==null||wn({event:"transform \uC2E4\uD589",properties:{transformPath:e,paths:l,options:n}}));let f=[u,"--transform",e,"--parser",o,"--ignore-pattern","**/*.d.ts",...l];i&&f.push("--extensions",i),a&&f.push("--ignore-config",a);try{let d={...process.env,LOG:String(s),TRACK:String(c),GIT_INFO:JSON.stringify(Jw)};await Um("node",f,{stdio:"inherit",env:d});return}catch(d){throw d.exitCode?new Error(`Transform failed with code ${d.exitCode}`):d}}function U$(){return(0,Xw.readdirSync)(Kw)}function Gc(e){console.log(`
63
+ $ nvm install ${(0,Lo.minVersion)($o.engines.node)}`),process.exit(1))}var B$=["replace-css-seed-design-color-variable","replace-css-seed-design-typography-variable"];async function U$(e,t,r,n){let{log:s,parser:o,extensions:i,ignoreConfig:a,track:c}=n,u=require.resolve("jscodeshift/bin/jscodeshift"),l=r.map(d=>(0,Do.resolve)(process.cwd(),d));if(B$.includes(t)){require(e).processCssFiles(r,n);return}c&&(Sn==null||Sn({event:"transform \uC2E4\uD589",properties:{transformPath:e,paths:l,options:n}}));let f=[u,"--transform",e,"--parser",o,"--ignore-pattern","**/*.d.ts",...l];i&&f.push("--extensions",i),a&&f.push("--ignore-config",a);try{let d={...process.env,LOG:String(s),TRACK:String(c),GIT_INFO:JSON.stringify(Xw)};await Gm("node",f,{stdio:"inherit",env:d});return}catch(d){throw d.exitCode?new Error(`Transform failed with code ${d.exitCode}`):d}}function G$(){return(0,Zw.readdirSync)(Yw)}function Vc(e){console.log(`
64
64
  \uC0AC\uC6A9 \uAC00\uB2A5\uD55C transform \uBAA9\uB85D:
65
65
  `,e.join(`
66
- `))}P$();
66
+ `))}M$();