@seed-design/codemod 0.0.24 → 0.0.25
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 +37 -37
- package/bin/transforms/replace-css-seed-design-color-variable/index.js +1 -1
- package/bin/transforms/replace-custom-imported-typography-variable/index.js +24 -24
- package/bin/transforms/replace-custom-seed-design-color/index.js +8 -8
- package/bin/transforms/replace-custom-seed-design-typography/index.js +1 -1
- package/bin/transforms/replace-stitches-styled-color/index.js +1 -1
- package/bin/transforms/replace-tailwind-color/index.js +19 -19
- package/package.json +2 -2
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 yx=Object.create;var No=Object.defineProperty;var bx=Object.getOwnPropertyDescriptor;var wx=Object.getOwnPropertyNames;var xx=Object.getPrototypeOf,Sx=Object.prototype.hasOwnProperty;var x=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),vx=(e,t)=>{for(var r in t)No(e,r,{get:t[r],enumerable:!0})},_x=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of wx(t))!Sx.call(e,s)&&s!==r&&No(e,s,{get:()=>t[s],enumerable:!(n=bx(t,s))||n.enumerable});return e};var q=(e,t,r)=>(r=e!=null?yx(xx(e)):{},_x(t||!e||!e.__esModule?No(r,"default",{value:e,enumerable:!0}):r,e));var Mu=x((yL,Pu)=>{Pu.exports=Nu;Nu.sync=OS;var Du=require("fs");function TS(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:TS(t,r)}function Nu(e,t,r){Du.stat(e,function(n,s){r(n,n?!1:Lu(s,e,t))})}function OS(e,t){return Lu(Du.statSync(e),e,t)}});var Gu=x((bL,Uu)=>{Uu.exports=ju;ju.sync=RS;var Fu=require("fs");function ju(e,t,r){Fu.stat(e,function(n,s){r(n,n?!1:Bu(s,t))})}function RS(e,t){return Bu(Fu.statSync(e),t)}function Bu(e,t){return e.isFile()&&kS(e,t)}function kS(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=x((xL,qu)=>{var wL=require("fs"),jn;process.platform==="win32"||global.TESTING_WINDOWS?jn=Mu():jn=Gu();qu.exports=Xo;Xo.sync=CS;function Xo(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){Xo(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 CS(e,t){try{return jn.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var Ku=x((SL,Xu)=>{var Jt=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",zu=require("path"),AS=Jt?";":":",Wu=Vu(),Hu=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Zu=(e,t)=>{let r=t.colon||AS,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}},Yu=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:s,pathExtExe:o}=Zu(e,t),i=[],a=u=>new Promise((l,f)=>{if(u===n.length)return t.all&&i.length?l(i):f(Hu(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,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)},IS=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:s}=Zu(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 Hu(e)};Xu.exports=Yu;Yu.sync=IS});var Qu=x((vL,Ko)=>{"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"};Ko.exports=Ju;Ko.exports.default=Ju});var nl=x((_L,rl)=>{"use strict";var el=require("path"),$S=Ku(),DS=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=$S.sync(e.command,{path:r[DS({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 LS(e){return tl(e)||tl(e,!0)}rl.exports=LS});var sl=x((EL,Qo)=>{"use strict";var Jo=/([()\][%!^"`<>&|;, *?])/g;function NS(e){return e=e.replace(Jo,"^$1"),e}function PS(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(Jo,"^$1"),t&&(e=e.replace(Jo,"^$1")),e}Qo.exports.command=NS;Qo.exports.argument=PS});var il=x((TL,ol)=>{"use strict";ol.exports=/^#!(.*)/});var cl=x((OL,al)=>{"use strict";var MS=il();al.exports=(e="")=>{let t=e.match(MS);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=x((RL,ul)=>{"use strict";var ei=require("fs"),FS=cl();function jS(e){let r=Buffer.alloc(150),n;try{n=ei.openSync(e,"r"),ei.readSync(n,r,0,150,0),ei.closeSync(n)}catch{}return FS(r.toString())}ul.exports=jS});var ml=x((kL,pl)=>{"use strict";var BS=require("path"),fl=nl(),dl=sl(),US=ll(),GS=process.platform==="win32",qS=/\.(?:com|exe)$/i,VS=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function zS(e){e.file=fl(e);let t=e.file&&US(e.file);return t?(e.args.unshift(e.file),e.command=t,fl(e)):e.file}function WS(e){if(!GS)return e;let t=zS(e),r=!qS.test(t);if(e.options.forceShell||r){let n=VS.test(t);e.command=BS.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 HS(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:WS(n)}pl.exports=HS});var yl=x((CL,gl)=>{"use strict";var ti=process.platform==="win32";function ri(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 ZS(e,t){if(!ti)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 ti&&e===1&&!t.file?ri(t.original,"spawn"):null}function YS(e,t){return ti&&e===1&&!t.file?ri(t.original,"spawnSync"):null}gl.exports={hookChildProcess:ZS,verifyENOENT:hl,verifyENOENTSync:YS,notFoundError:ri}});var xl=x((AL,Qt)=>{"use strict";var bl=require("child_process"),ni=ml(),si=yl();function wl(e,t,r){let n=ni(e,t,r),s=bl.spawn(n.command,n.args,n.options);return si.hookChildProcess(s,n),s}function XS(e,t,r){let n=ni(e,t,r),s=bl.spawnSync(n.command,n.args,n.options);return s.error=s.error||si.verifyENOENTSync(s.status,n),s}Qt.exports=wl;Qt.exports.spawn=wl;Qt.exports.sync=XS;Qt.exports._parse=ni;Qt.exports._enoent=si});var Xr=x((yG,Gm)=>{var q0="2.0.0",V0=Number.MAX_SAFE_INTEGER||9007199254740991,z0=16,W0=250,H0=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Gm.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:z0,MAX_SAFE_BUILD_LENGTH:W0,MAX_SAFE_INTEGER:V0,RELEASE_TYPES:H0,SEMVER_SPEC_VERSION:q0,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Kr=x((bG,qm)=>{var Z0=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};qm.exports=Z0});var pr=x((We,Vm)=>{var{MAX_SAFE_COMPONENT_LENGTH:Ta,MAX_SAFE_BUILD_LENGTH:Y0,MAX_LENGTH:X0}=Xr(),K0=Kr();We=Vm.exports={};var J0=We.re=[],Q0=We.safeRe=[],S=We.src=[],eO=We.safeSrc=[],v=We.t={},tO=0,Oa="[a-zA-Z0-9-]",rO=[["\\s",1],["\\d",X0],[Oa,Y0]],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++;K0(e,s,t),v[e]=s,S[s]=t,eO[s]=n,J0[s]=new RegExp(t,r?"g":void 0),Q0[s]=new RegExp(n,r?"g":void 0)};A("NUMERICIDENTIFIER","0|[1-9]\\d*");A("NUMERICIDENTIFIERLOOSE","\\d+");A("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Oa}*`);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.NUMERICIDENTIFIER]}|${S[v.NONNUMERICIDENTIFIER]})`);A("PRERELEASEIDENTIFIERLOOSE",`(?:${S[v.NUMERICIDENTIFIERLOOSE]}|${S[v.NONNUMERICIDENTIFIER]})`);A("PRERELEASE",`(?:-(${S[v.PRERELEASEIDENTIFIER]}(?:\\.${S[v.PRERELEASEIDENTIFIER]})*))`);A("PRERELEASELOOSE",`(?:-?(${S[v.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${S[v.PRERELEASEIDENTIFIERLOOSE]})*))`);A("BUILDIDENTIFIER",`${Oa}+`);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,${Ta}})(?:\\.(\\d{1,${Ta}}))?(?:\\.(\\d{1,${Ta}}))?`);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((wG,zm)=>{var sO=Object.freeze({loose:!0}),oO=Object.freeze({}),iO=e=>e?typeof e!="object"?sO:e:oO;zm.exports=iO});var Ra=x((xG,Zm)=>{var Wm=/^[0-9]+$/,Hm=(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)=>Hm(t,e);Zm.exports={compareIdentifiers:Hm,rcompareIdentifiers:aO}});var te=x((SG,Jm)=>{var Bs=Kr(),{MAX_LENGTH:Ym,MAX_SAFE_INTEGER:Us}=Xr(),{safeRe:Xm,safeSrc:Km,t:Gs}=pr(),cO=js(),{compareIdentifiers:mr}=Ra(),ka=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`);Bs("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=t.trim().match(r.loose?Xm[Gs.LOOSE]:Xm[Gs.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=new RegExp(`^${this.options.loose?Km[Gs.PRERELEASELOOSE]:Km[Gs.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]),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}};Jm.exports=ka});var Rt=x((vG,eh)=>{var Qm=te(),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=x((_G,th)=>{var lO=Rt(),fO=(e,t)=>{let r=lO(e,t);return r?r.version:null};th.exports=fO});var sh=x((EG,nh)=>{var dO=Rt(),pO=(e,t)=>{let r=dO(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};nh.exports=pO});var ah=x((TG,ih)=>{var oh=te(),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=x((OG,uh)=>{var ch=Rt(),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=x((RG,fh)=>{var gO=te(),yO=(e,t)=>new gO(e,t).major;fh.exports=yO});var mh=x((kG,ph)=>{var bO=te(),wO=(e,t)=>new bO(e,t).minor;ph.exports=wO});var gh=x((CG,hh)=>{var xO=te(),SO=(e,t)=>new xO(e,t).patch;hh.exports=SO});var bh=x((AG,yh)=>{var vO=Rt(),_O=(e,t)=>{let r=vO(e,t);return r&&r.prerelease.length?r.prerelease:null};yh.exports=_O});var _e=x((IG,xh)=>{var wh=te(),EO=(e,t,r)=>new wh(e,r).compare(new wh(t,r));xh.exports=EO});var vh=x(($G,Sh)=>{var TO=_e(),OO=(e,t,r)=>TO(t,e,r);Sh.exports=OO});var Eh=x((DG,_h)=>{var RO=_e(),kO=(e,t)=>RO(e,t,!0);_h.exports=kO});var qs=x((LG,Oh)=>{var Th=te(),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=x((NG,Rh)=>{var AO=qs(),IO=(e,t)=>e.sort((r,n)=>AO(r,n,t));Rh.exports=IO});var Ah=x((PG,Ch)=>{var $O=qs(),DO=(e,t)=>e.sort((r,n)=>$O(n,r,t));Ch.exports=DO});var Jr=x((MG,Ih)=>{var LO=_e(),NO=(e,t,r)=>LO(e,t,r)>0;Ih.exports=NO});var Vs=x((FG,$h)=>{var PO=_e(),MO=(e,t,r)=>PO(e,t,r)<0;$h.exports=MO});var Ca=x((jG,Dh)=>{var FO=_e(),jO=(e,t,r)=>FO(e,t,r)===0;Dh.exports=jO});var Aa=x((BG,Lh)=>{var BO=_e(),UO=(e,t,r)=>BO(e,t,r)!==0;Lh.exports=UO});var zs=x((UG,Nh)=>{var GO=_e(),qO=(e,t,r)=>GO(e,t,r)>=0;Nh.exports=qO});var Ws=x((GG,Ph)=>{var VO=_e(),zO=(e,t,r)=>VO(e,t,r)<=0;Ph.exports=zO});var Ia=x((qG,Mh)=>{var WO=Ca(),HO=Aa(),ZO=Jr(),YO=zs(),XO=Vs(),KO=Ws(),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 HO(e,r,n);case">":return ZO(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=x((VG,Fh)=>{var QO=te(),eR=Rt(),{safeRe:Hs,t:Zs}=pr(),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?Hs[Zs.COERCEFULL]:Hs[Zs.COERCE]);else{let c=t.includePrerelease?Hs[Zs.COERCERTLFULL]:Hs[Zs.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=x((zG,Bh)=>{var $a=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=$a});var Ee=x((WG,zh)=>{var rR=/\s+/g,Da=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 La)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[oe.HYPHENRANGELOOSE]:ue[oe.HYPHENRANGE];t=t.replace(i,SR(this.options.includePrerelease)),G("hyphen replace",t),t=t.replace(ue[oe.COMPARATORTRIM],iR),G("comparator trim",t),t=t.replace(ue[oe.TILDETRIM],aR),G("tilde trim",t),t=t.replace(ue[oe.CARETTRIM],cR),G("caret trim",t);let a=t.split(" ").map(f=>dR(f,this.options)).join(" ").split(/\s+/).map(f=>xR(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 La(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=Da;var nR=Uh(),Gh=new nR,sR=js(),La=Qr(),G=Kr(),oR=te(),{safeRe:ue,t:oe,comparatorTrimReplace:iR,tildeTrimReplace:aR,caretTrimReplace:cR}=pr(),{FLAG_INCLUDE_PRERELEASE:uR,FLAG_LOOSE:lR}=Xr(),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),ie=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[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})},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[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})},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[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})},wR=(e,t)=>(G("replaceStars",e,t),e.trim().replace(ue[oe.STAR],"")),xR=(e,t)=>(G("replaceGTE0",e,t),e.trim().replace(ue[t.includePrerelease?oe.GTE0PRE:oe.GTE0],"")),SR=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()),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!==La.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((HG,Kh)=>{var en=Symbol("SemVer ANY"),Ma=class e{static get ANY(){return en}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(" "),Pa("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,Pa("comp",this)}parse(t){let r=this.options.loose?Hh[Zh.COMPARATORLOOSE]:Hh[Zh.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=en}toString(){return this.value}test(t){if(Pa("Comparator.test",t,this.options.loose),this.semver===en||t===en)return!0;if(typeof t=="string")try{t=new Yh(t,this.options)}catch{return!1}return Na(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("=")||Na(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||Na(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};Kh.exports=Ma;var Wh=js(),{safeRe:Hh,t:Zh}=pr(),Na=Ia(),Pa=Kr(),Yh=te(),Xh=Ee()});var tn=x((ZG,Jh)=>{var _R=Ee(),ER=(e,t,r)=>{try{t=new _R(t,r)}catch{return!1}return t.test(e)};Jh.exports=ER});var eg=x((YG,Qh)=>{var TR=Ee(),OR=(e,t)=>new TR(e,t).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));Qh.exports=OR});var rg=x((XG,tg)=>{var RR=te(),kR=Ee(),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=x((KG,ng)=>{var AR=te(),IR=Ee(),$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=x((JG,ig)=>{var Fa=te(),DR=Ee(),og=Jr(),LR=(e,t)=>{e=new DR(e,t);let r=new Fa("0.0.0");if(e.test(r)||(r=new Fa("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 Fa(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=x((QG,cg)=>{var NR=Ee(),PR=(e,t)=>{try{return new NR(e,t).range||"*"}catch{return null}};cg.exports=PR});var Ys=x((e9,pg)=>{var MR=te(),dg=Qr(),{ANY:FR}=dg,jR=Ee(),BR=tn(),lg=Jr(),fg=Vs(),UR=Ws(),GR=zs(),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=x((t9,mg)=>{var VR=Ys(),zR=(e,t,r)=>VR(e,t,">",r);mg.exports=zR});var yg=x((r9,gg)=>{var WR=Ys(),HR=(e,t,r)=>WR(e,t,"<",r);gg.exports=HR});var xg=x((n9,wg)=>{var bg=Ee(),ZR=(e,t,r)=>(e=new bg(e,r),t=new bg(t,r),e.intersects(t,r));wg.exports=ZR});var vg=x((s9,Sg)=>{var YR=tn(),XR=_e();Sg.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=x((o9,Rg)=>{var _g=Ee(),Ba=Qr(),{ANY:ja}=Ba,rn=tn(),Ua=_e(),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 Ba(">=0.0.0-0")],Eg=[new Ba(">=0.0.0")],QR=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===ja){if(t.length===1&&t[0].semver===ja)return!0;r.includePrerelease?e=JR:e=Eg}if(t.length===1&&t[0].semver===ja){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=Ua(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=Tg(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=Og(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)},Tg=(e,t,r)=>{if(!e)return t;let n=Ua(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=Ua(e.semver,t.semver,r);return n<0?e:n>0||t.operator==="<"&&e.operator==="<="?t:e};Rg.exports=KR});var $g=x((i9,Ig)=>{var Ga=pr(),Cg=Xr(),ek=te(),Ag=Ra(),tk=Rt(),rk=rh(),nk=sh(),sk=ah(),ok=lh(),ik=dh(),ak=mh(),ck=gh(),uk=bh(),lk=_e(),fk=vh(),dk=Eh(),pk=qs(),mk=kh(),hk=Ah(),gk=Jr(),yk=Vs(),bk=Ca(),wk=Aa(),xk=zs(),Sk=Ws(),vk=Ia(),_k=jh(),Ek=Qr(),Tk=Ee(),Ok=tn(),Rk=eg(),kk=rg(),Ck=sg(),Ak=ag(),Ik=ug(),$k=Ys(),Dk=hg(),Lk=yg(),Nk=xg(),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:xk,lte:Sk,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:Ga.re,src:Ga.src,tokens:Ga.t,SEMVER_SPEC_VERSION:Cg.SEMVER_SPEC_VERSION,RELEASE_TYPES:Cg.RELEASE_TYPES,compareIdentifiers:Ag.compareIdentifiers,rcompareIdentifiers:Ag.rcompareIdentifiers}});var Hg=x((j9,Wg)=>{var _r=1e3,Er=_r*60,Tr=Er*60,Vt=Tr*24,ZC=Vt*7,YC=Vt*365.25;Wg.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return XC(e);if(r==="number"&&isFinite(e))return t.long?JC(e):KC(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function XC(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*YC;case"weeks":case"week":case"w":return r*ZC;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 KC(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 JC(e){var t=Math.abs(e);return t>=Vt?ro(e,t,Vt,"day"):t>=Tr?ro(e,t,Tr,"hour"):t>=Er?ro(e,t,Er,"minute"):t>=_r?ro(e,t,_r,"second"):e+" ms"}function ro(e,t,r,n){var s=t>=r*1.5;return Math.round(e/r)+" "+n+(s?"s":"")}});var Wa=x((B9,Zg)=>{function QC(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(...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}Zg.exports=QC});var Yg=x((ge,no)=>{ge.formatArgs=tA;ge.save=rA;ge.load=nA;ge.useColors=eA;ge.storage=sA();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 eA(){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 tA(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+no.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 rA(e){try{e?ge.storage.setItem("debug",e):ge.storage.removeItem("debug")}catch{}}function nA(){let e;try{e=ge.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function sA(){try{return localStorage}catch{}}no.exports=Wa()(ge);var{formatters:oA}=no.exports;oA.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Kg=x((U9,Xg)=>{"use strict";Xg.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 ey=x((G9,Qg)=>{"use strict";var iA=require("os"),Jg=require("tty"),ke=Kg(),{env:J}=process,so;ke("no-color")||ke("no-colors")||ke("color=false")||ke("color=never")?so=0:(ke("color")||ke("colors")||ke("color=true")||ke("color=always"))&&(so=1);function aA(){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 cA(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function uA(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=aA();n!==void 0&&(so=n);let s=r?so: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=iA.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 Ha(e,t={}){let r=uA(e,{streamIsTTY:e&&e.isTTY,...t});return cA(r)}Qg.exports={supportsColor:Ha,stdout:Ha({isTTY:Jg.isatty(1)}),stderr:Ha({isTTY:Jg.isatty(2)})}});var ry=x((Q,io)=>{var lA=require("tty"),oo=require("util");Q.init=yA;Q.log=mA;Q.formatArgs=dA;Q.save=hA;Q.load=gA;Q.useColors=fA;Q.destroy=oo.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=ey();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 fA(){return"colors"in Q.inspectOpts?!!Q.inspectOpts.colors:lA.isatty(process.stderr.fd)}function dA(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+"+
|
5
|
-
`)}function
|
6
|
-
`).map(t=>t.trim()).join(" ")};
|
4
|
+
`+o),e.push(s+"m+"+io.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=pA()+t+" "+e[0]}function pA(){return Q.inspectOpts.hideDate?"":new Date().toISOString()+" "}function mA(...e){return process.stderr.write(oo.formatWithOptions(Q.inspectOpts,...e)+`
|
5
|
+
`)}function hA(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function gA(){return process.env.DEBUG}function yA(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]]}io.exports=Wa()(Q);var{formatters:ty}=io.exports;ty.o=function(e){return this.inspectOpts.colors=this.useColors,oo.inspect(e,this.inspectOpts).split(`
|
6
|
+
`).map(t=>t.trim()).join(" ")};ty.O=function(e){return this.inspectOpts.colors=this.useColors,oo.inspect(e,this.inspectOpts)}});var Ya=x((q9,Za)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Za.exports=Yg():Za.exports=ry()});var ny=x(ye=>{"use strict";var bA=ye&&ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ye,"__esModule",{value:!0});var wA=require("fs"),xA=bA(Ya()),Or=xA.default("@kwsites/file-exists");function SA(e,t,r){Or("checking %s",e);try{let n=wA.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 vA(e,t=ye.READABLE){return SA(e,(t&ye.FILE)>0,(t&ye.FOLDER)>0)}ye.exists=vA;ye.FILE=1;ye.FOLDER=2;ye.READABLE=ye.FILE+ye.FOLDER});var sy=x(ao=>{"use strict";function _A(e){for(var t in e)ao.hasOwnProperty(t)||(ao[t]=e[t])}Object.defineProperty(ao,"__esModule",{value:!0});_A(ny())});var Ka=x(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.createDeferred=zt.deferred=void 0;function Xa(){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=Xa;zt.createDeferred=Xa;zt.default=Xa});var Vw=x((T3,Uc)=>{var Ao=process||{},Gw=Ao.argv||[],Co=Ao.env||{},L$=!(Co.NO_COLOR||Gw.includes("--no-color"))&&(!!Co.FORCE_COLOR||Gw.includes("--color")||Ao.platform==="win32"||(Ao.stdout||{}).isTTY&&Co.TERM!=="dumb"||!!Co.CI),N$=(e,t,r=e)=>n=>{let s=""+n,o=s.indexOf(t,e.length);return~o?e+P$(s,t,r,o)+t:e+s+t},P$=(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)},qw=(e=L$)=>{let t=e?N$:()=>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")}};Uc.exports=qw();Uc.exports.createColors=qw});var Hw=x((R3,M$)=>{M$.exports={name:"@seed-design/codemod",version:"0.0.25",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.24","@karrotmarket/react-multicolor-icon":"^0.0.16"},publishConfig:{access:"public"},engines:{node:">=20.16.0"}}});var Hc=require("events");function Po(e){return e==null?[]:Array.isArray(e)?e:[e]}function Ex(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 Tx(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=Po(t.string),t.boolean=Po(t.boolean),d)for(r in t.alias)for(n=t.alias[r]=Po(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);Ex(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 Zc=e=>e.replace(/[<[].+/,"").trim(),Ox=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},Rx=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)}`,kx=e=>e.replace(/([a-z])-([a-z])/g,(t,r,n)=>r+n.toUpperCase()),Cx=(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)?{}:[])},Ax=(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)))}},Ix=e=>{let t=/([^\\\/]+)$/.exec(e);return t?t[1]:""},Yc=e=>e.split(".").map((t,r)=>r===0?kx(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}},Mo=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=Zc(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}},$x=process.argv,Dx=`${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=Zc(t),this.args=Ox(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 Mo(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=zc(r.map(l=>l.rawName));i.push({title:"Commands",body:r.map(l=>` ${Wc(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
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(`
|
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} ${
|
14
|
-
`?(i-=1,a+=1):u==="u"&&t[a+2]==="{"?a=t.indexOf("}",a+3):a+=
|
15
|
-
`]),
|
13
|
+
`))}outputVersion(){let{name:t}=this.cli,{versionNumber:r}=this.cli.globalCommand;r&&console.log(`${t}/${r} ${Dx}`)}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,Fo=class extends Hc.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=$x,{run:r=!0}={}){this.rawArgs=t,this.name||(this.name=t[1]?Ix(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=Rx(n),o=[],i=t.indexOf("--");i>-1&&(o=t.slice(i+1),t=t.slice(0,i));let a=Tx(t,s);a=Object.keys(a).reduce((d,p)=>vn(vn({},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(".");Cx(u,p,a[d]),Ax(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 Fo(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"),Yt=(e,t)=>{let r=Bo(Lx(e));if(typeof r!="string")throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Lx=e=>jo(e)?e.toString():e,jo=e=>typeof e!="string"&&e&&Object.getPrototypeOf(e)===String.prototype,Bo=e=>e instanceof URL?(0,Kc.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 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]",Je=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Nx=new TextEncoder,tu=e=>Nx.encode(e),Px=new TextDecoder,On=e=>Px.decode(e),ru=(e,t)=>Mx(e,t).join(""),Mx=(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]},$r=e=>e.length===1&&K(e[0])?e[0]:Uo(Fx(e)),Fx=e=>e.map(t=>typeof t=="string"?tu(t):t),Uo=e=>{let t=new Uint8Array(jx(e)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t},jx=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=Bx({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,{}]},Bx=({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}=Ux(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)},Ux=(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+=Gx[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
|
+
`]),Gx={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 qx(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`)},qx=({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 vp=require("node:child_process");var lu=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 fu=e=>{let t={...e};for(let r of Vo)t[r]=Go(e,r);return t},Go=(e,t)=>{let r=Array.from({length:Vx(e)+1}),n=zx(e[t],r,t);return Xx(n,t)},Vx=({stdio:e})=>Array.isArray(e)?Math.max(e.length,Se.length):Se.length,zx=(e,t,r)=>W(e)?Wx(e,t,r):t.fill(e),Wx=(e,t,r)=>{for(let n of Object.keys(e).sort(Hx))for(let s of Zx(n,r,t))t[s]=e[n];return t},Hx=(e,t)=>uu(e)<uu(t)?1:-1,uu=e=>e==="stdout"||e==="stderr"?0:e==="all"?2:1,Zx=(e,t,r)=>{if(e==="ipc")return[r.length-1];let n=qo(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]},
|
17
|
+
Please set the "stdio" option to ensure that file descriptor exists.`);return n==="all"?[1,2]:[n]},qo=e=>{if(e==="all")return e;if(Se.includes(e))return Se.indexOf(e);let t=Yx.exec(e);if(t!==null)return Number(t[1])},Yx=/^fd(\d+)$/,Xx=(e,t)=>e.map(r=>r===void 0?Jx[t]:r),Kx=(0,lu.debuglog)("execa").enabled?"full":"none",Jx={lines:!1,buffer:!0,maxBuffer:1e3*1e3*100,verbose:Kx,stripFinalNewline:!0},Vo=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],Qe=(e,t)=>t==="ipc"?e.at(-1):e[t];var Xt=({verbose:e},t)=>zo(e,t)!=="none",Kt=({verbose:e},t)=>!["none","short"].includes(zo(e,t)),du=({verbose:e},t)=>{let r=zo(e,t);return An(r)?r:void 0},zo=(e,t)=>t===void 0?Qx(e):Qe(e,t),Qx=e=>e.find(t=>An(t))??In.findLast(t=>e.includes(t)),An=e=>typeof e=="function",In=["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=>oS(gu(o))).join(" ");return{command:n,escapedCommand:s}},Dr=e=>(0,mu.stripVTControlCharacters)(e).split(`
|
18
18
|
`).map(t=>gu(t)).join(`
|
19
|
-
`),gu=e=>e.replaceAll(
|
19
|
+
`),gu=e=>e.replaceAll(rS,t=>eS(t)),eS=e=>{let t=nS[e];if(t!==void 0)return t;let r=e.codePointAt(0),n=r.toString(16);return r<=sS?`\\u${n.padStart(4,"0")}`:`\\U${n}`},tS=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},rS=tS(),nS={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},sS=65535,oS=e=>iS.test(e)?e:pu.platform==="win32"?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,iS=/^[\w./-]+$/;var Wo=q(require("node:process"),1);function Ho(){let{env:e}=Wo.default,{TERM:t,TERM_PROGRAM:r}=e;return Wo.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"},aS={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"},cS={...yu,...bu},uS={...yu,...aS},lS=Ho(),fS=lS?cS:uS,$n=fS,lD=Object.entries(bu);var vu=q(require("node:tty"),1),wu,xu,Dn,Su,dS=((Su=(Dn=(xu=(wu=vu.default)==null?void 0:wu.WriteStream)==null?void 0:xu.prototype)==null?void 0:Dn.hasColors)==null?void 0:Su.call(Dn))??!1,D=(e,t)=>{if(!dS)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}},dD=D(0,0),_u=D(1,22),pD=D(2,22),mD=D(3,23),hD=D(4,24),gD=D(53,55),yD=D(7,27),bD=D(8,28),wD=D(9,29),xD=D(30,39),SD=D(31,39),vD=D(32,39),_D=D(33,39),ED=D(34,39),TD=D(35,39),OD=D(36,39),RD=D(37,39),Ln=D(90,39),kD=D(40,49),CD=D(41,49),AD=D(42,49),ID=D(43,49),$D=D(44,49),DD=D(45,49),LD=D(46,49),ND=D(47,49),PD=D(100,49),Eu=D(91,39),MD=D(92,39),Tu=D(93,39),FD=D(94,39),jD=D(95,39),BD=D(96,39),UD=D(97,39),GD=D(101,49),qD=D(102,49),VD=D(103,49),zD=D(104,49),WD=D(105,49),HD=D(106,49),ZD=D(107,49);var ku=({type:e,message:t,timestamp:r,piped:n,commandId:s,result:{failed:o=!1}={},options:{reject:i=!0}})=>{let a=pS(r),c=mS[e]({failed:o,reject:i,piped:n}),u=hS[e]({reject:i});return`${Ln(`[${a}]`)} ${Ln(`[${s}]`)} ${u(c)} ${u(t)}`},pS=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"),Ou=({failed:e,reject:t})=>e?t?$n.cross:$n.warning:$n.tick,mS={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:Ou,duration:Ou},Ru=e=>e,hS={command:()=>_u,output:()=>Ru,ipc:()=>Ru,error:({reject:e})=>e?Eu:Tu,duration:()=>Ln};var Cu=(e,t,r)=>{let n=du(t,r);return e.map(({verboseLine:s,verboseObject:o})=>gS(s,o,n)).filter(s=>s!==void 0).map(s=>yS(s)).join("")},gS=(e,t,r)=>{if(r===void 0)return e;let n=r(e,t);if(typeof n=="string")return n},yS=e=>e.endsWith(`
|
20
20
|
`)?e:`${e}
|
21
|
-
`;var
|
22
|
-
`).map(r=>
|
23
|
-
${
|
24
|
-
${
|
25
|
-
${
|
26
|
-
Available signal numbers: ${fv()}.`,lv=()=>Object.keys(
|
21
|
+
`;var Be=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:s})=>{let o=bS({type:e,result:s,verboseInfo:n}),i=wS(t,o),a=Cu(i,n,r);a!==""&&console.warn(a.slice(0,-1))},bS=({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}),wS=(e,t)=>e.split(`
|
22
|
+
`).map(r=>xS({...t,message:r})),xS=e=>({verboseLine:ku(e),verboseObject:e}),Pn=e=>{let t=typeof e=="string"?e:(0,Au.inspect)(e);return Dr(t).replaceAll(" "," ".repeat(SS))},SS=2;var Iu=(e,t)=>{Xt(t)&&Be({type:"command",verboseMessage:e,verboseInfo:t})};var $u=(e,t,r)=>{ES(e);let n=vS(e);return{verbose:e,escapedCommand:t,commandId:n,rawOptions:r}},vS=e=>Xt({verbose:e})?_S++:void 0,_S=0n,ES=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 Zo=require("node:process"),Mn=()=>Zo.hrtime.bigint(),Yo=e=>Number(Zo.hrtime.bigint()-e)/1e6;var Fn=(e,t,r)=>{let n=Mn(),{command:s,escapedCommand:o}=hu(e,t),i=Go(r,"verbose"),a=$u(i,o,{...r});return Iu(o,a),{command:s,escapedCommand:o,startTime:n,verboseInfo:a}};var Hf=q(require("node:path"),1),wi=q(require("node:process"),1),Zf=q(xl(),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 Sl=require("node:util"),ii=require("node:child_process"),oi=q(require("node:path"),1),vl=require("node:url"),$L=(0,Sl.promisify)(ii.execFile);function Un(e){return e instanceof URL?(0,vl.fileURLToPath)(e):e}function _l(e){return{*[Symbol.iterator](){let t=oi.default.resolve(Un(e)),r;for(;r!==t;)yield t,r=t,t=oi.default.resolve(t,"..")}}}var DL=10*1024*1024;var KS=({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&&JS(i,a,o),s&&QS(i,a,n,o),t===""||t===ct.default.delimiter?`${i.join(ct.default.delimiter)}${t}`:[...i,t].join(ct.default.delimiter)},JS=(e,t,r)=>{for(let n of _l(r)){let s=ct.default.join(n,"node_modules/.bin");t.includes(s)||e.push(s)}},QS=(e,t,r,n)=>{let s=ct.default.resolve(n,Un(r),"..");t.includes(s)||e.push(s)},El=({env:e=Lr.default.env,...t}={})=>{e={...e};let r=Bn({env:e});return t.path=e[r],e[r]=KS(t),e};var Bl=require("node:timers/promises");var Tl=(e,t,r)=>{let n=r?Pr:Nr,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=>Gn(e)&&kl in e,kl=Symbol("isExecaError"),Gn=e=>Object.prototype.toString.call(e)==="[object Error]",Nr=class extends Error{};Ol(Nr,Nr.name);var Pr=class extends Error{};Ol(Pr,Pr.name);var er=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 ai=()=>{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=ai();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=ai(),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)},WL=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
|
+
${ci()}`)},av=(e,t)=>{if(Pl.has(e))return Pl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.
|
24
|
+
${ci()}`)},cv=()=>new Map(Object.entries(er.constants.signals).reverse().map(([e,t])=>[t,e])),Pl=cv(),uv=(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
|
+
${ci()}`)},ci=()=>`Available signal names: ${lv()}.
|
26
|
+
Available signal numbers: ${fv()}.`,lv=()=>Object.keys(er.constants.signals).sort().map(e=>`'${e}'`).join(", "),fv=()=>[...new Set(Object.values(er.constants.signals).sort((e,t)=>e-t))].join(", "),qn=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]=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: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&&ui({kill:e,forceKillAfterDelay:r,context:o,controllerSignal:i.signal})},ui=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"),Vn=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 Vn(t,n),r.terminationReason??="cancel",e.kill(),t.reason};var Tf=require("node:timers/promises");var _f=require("node:util");var tr=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{yv(e,t,r),li(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\`.`)},li=(e,t,r)=>{if(!r)throw new Error(`${Ne(e,t)} cannot be used: the ${ut(t)} has already exited or disconnected.`)},Wl=e=>{throw new Error(`${Ne("getOneMessage",e)} could not complete: the ${ut(e)} exited or disconnected.`)},Hl=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
|
-
]);`)},
|
32
|
+
]);`)},zn=(e,t)=>new Error(`${Ne("sendMessage",t)} failed when sending an acknowledgment response to the ${ut(t)}.`,{cause:e}),Zl=e=>{throw new Error(`${Ne("sendMessage",e)} failed: the ${ut(e)} is not listening to incoming messages.`)},Yl=e=>{throw new Error(`${Ne("sendMessage",e)} failed: the ${ut(e)} exited without listening to incoming messages.`)},Xl=()=>new Error(`\`cancelSignal\` aborted: the ${ut(!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 ${ut(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)||xv.some(r=>t.includes(r)),wv=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),xv=["could not be cloned","circular structure","call stack size exceeded"],Ne=(e,t,r="")=>e==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${Sv(t)}${e}(${r})`,Sv=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=ef(s,t,!0),i=e.stdio[o];if(i===null)throw new TypeError(tf(o,t,n,!0));return i},nr=(e,t="stdout")=>{let{options:n,fileDescriptors:s}=Ge.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},Ge=new WeakMap,ef=(e,t,r)=>{let n=vv(t,r);return _v(n,t,r,e),n},vv=(e,t)=>{let r=qo(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(`"${
|
35
|
-
Please set the "stdio" option to ensure that file descriptor exists.`);if(s.direction==="input"&&!r)throw new TypeError(`"${
|
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,
|
37
|
-
Please rename it to ${
|
38
|
-
Please rename it to one of: ${r}.`)},Fv=new Set(["utf8","utf16le"]),
|
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(`"${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.`)},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}: ${Wn(o)}" option is incompatible with using "${Mr(n)}: ${Wn(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,Mr=e=>e?"to":"from",Wn=e=>typeof e=="string"?`'${e}'`:typeof e=="number"?`${e}`:"Stream";var gf=require("node:events");var nf=require("node:events"),St=(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 Zn=(e,t)=>{t&&fi(e)},fi=e=>{e.refCounted()},Yn=(e,t)=>{t&&di(e)},di=e=>{e.unrefCounted()},sf=(e,t)=>{t&&(di(e),di(e))},of=(e,t)=>{t&&(fi(e),fi(e))};var uf=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},s)=>{if(df(s)||mf(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 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})=>{pi();let o=Xn.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")},Xn=new WeakMap;var lt=(e,t,r)=>{if(Kn.has(e))return Kn.get(e);let n=new hf.EventEmitter;return n.connected=!0,Kn.set(e,n),Tv({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Kn=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)},Jn=e=>{let t=Kn.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=lt(e,t,r),i=ts(e,o);return{id:Ov++,type:es,message:n,hasListeners:i}},Ov=0n,bf=(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})},ff=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:xf,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},df=e=>{var n;if((e==null?void 0:e.type)!==xf)return!1;let{id:t,message:r}=e;return(n=Qn[t])==null||n.resolve({isDeadlock:!1,hasListeners:r}),!0},wf=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,Rv(t,r,s)]);o&&Hl(r),i||Zl(r)}finally{s.abort(),delete Qn[e.id]}},Qn={},Rv=async(e,t,{signal:r})=>{St(e,1,r),await(0,gf.once)(e,"disconnect",{signal:r}),Yl(t)},es="execa:ipc:request",xf="execa:ipc:response";var Sf=(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}},vf=({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()},pf=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)];bf(s,r),await Promise.all(s.map(({onMessageSent:o})=>o))}},Fr=new WeakMap,ts=(e,t)=>t.listenerCount("message")>kv(e),kv=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}),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=Sf(e,i,o);try{await hi({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:i,message:s})}catch(c){throw rr(e),c}finally{vf(a)}},hi=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(mi.has(e))return mi.get(e);let t=(0,_f.promisify)(e.send.bind(e));return mi.set(e,t),t},mi=new WeakMap;var Of=(e,t)=>{let r="cancelSignal";return li(r,!1,e.connected),hi({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}),gi.signal),Iv=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{if(!Ef){if(Ef=!0,!n){Kl();return}if(t===null){pi();return}lt(e,t,r),await Tf.scheduler.yield()}},Ef=!1,mf=e=>(e==null?void 0:e.type)!==kf?!1:(gi.abort(e.message),!0),kf="execa:ipc:cancel",pi=()=>{gi.abort(Xl())},gi=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 Vn(t,s);let o=Dv(t);throw await Of(e,o),ui({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 ns=require("node:process"),yi=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=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=yi.default.resolve(o,c),l={...a,nodePath:u,node:r,cwd:o};if(!r)return[e,t,l];if(yi.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(bi.has(e))return;let t=jv(e);if(t!==void 0)throw new TypeError(`Invalid option \`encoding: ${ss(e)}\`.
|
37
|
+
Please rename it to ${ss(t)}.`);let r=[...bi].map(n=>ss(n)).join(", ");throw new TypeError(`Invalid option \`encoding: ${ss(e)}\`.
|
38
|
+
Please rename it to one of: ${r}.`)},Fv=new Set(["utf8","utf16le"]),he=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),bi=new Set([...Fv,...he]),jv=e=>{if(e===null)return"buffer";if(typeof e!="string")return;let t=e.toLowerCase();if(t in jf)return jf[t];if(bi.has(t))return t},jf={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},ss=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=Yt(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
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}.
|
40
40
|
${n.message}
|
41
41
|
${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.
|
42
|
-
${e}`};var
|
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
|
44
|
-
${X}`,ce=`${Y}: ${a}${
|
45
|
-
`)].map(xe=>
|
42
|
+
${e}`};var os=(e,t,r)=>{r.cwd=Vf(r.cwd);let[n,s,o]=Nf(e,t,r),{command:i,args:a,options:c}=Zf.default._parse(n,s,o),u=fu(c),l=Bv(u);return $f(l),Bf(l),Mf(l),Vl(l),Cf(l),l.shell=Bo(l.shell),l.env=Uv(l),l.killSignal=Ml(l.killSignal),l.forceKillAfterDelay=Ul(l.forceKillAfterDelay),l.lines=l.lines.map((f,d)=>f&&!he.has(l.encoding)&&l.buffer[d]),wi.default.platform==="win32"&&Hf.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?{...wi.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 sr(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 xi(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 Si(e,t){return xi(e,t)&&vt(e,t)}var Wv=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype),vi=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}}},_i=Symbol();function Kf(){return this[_i].next()}Object.defineProperty(Kf,"name",{value:"next"});function Jf(e){return this[_i].return(e)}Object.defineProperty(Jf,"name",{value:"return"});var Hv=Object.create(Wv,{next:{enumerable:!0,configurable:!0,writable:!0,value:Kf},return:{enumerable:!0,configurable:!0,writable:!0,value:Jf}});function Ei({preventCancel:e=!1}={}){let t=this.getReader(),r=new vi(t,e),n=Object.create(Hv);return n[_i]=r,n}var Qf=e=>{if(vt(e,{checkOpen:!1})&&jr.on!==void 0)return Yv(e);if(typeof(e==null?void 0:e[Symbol.asyncIterator])=="function")return e;if(Zv.call(e)==="[object ReadableStream]")return Ei.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:Zv}=Object.prototype,Yv=async function*(e){let t=new AbortController,r={};Xv(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()}},Xv=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=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 qe},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,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,r_,t)}var Qv=()=>({contents:[]}),e_=()=>1,t_=(e,{contents:t})=>(t.push(e),t),r_={init:Qv,convertChunk:{string:et,buffer:et,arrayBuffer:et,dataView:et,typedArray:et,others:et},getSize:e_,truncateChunk:Br,addChunk:t_,getFinalChunk:Br,finalize:is};async function ls(e,t){return or(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:as},getSize:cs,truncateChunk:i_,addChunk:a_,getFinalChunk:Br,finalize:l_};async function ds(e,t){return or(e,g_,t)}var d_=()=>({contents:"",textDecoder:new TextDecoder}),fs=(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:et,buffer:fs,arrayBuffer:fs,dataView:fs,typedArray:fs,others:as},getSize:cs,truncateChunk:m_,addChunk:p_,getFinalChunk:h_,finalize:is};Object.assign(jr,{on:cd.on,finished:ud.finished});var ld=({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=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 qe;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=Qe(t,r);return r==="ipc"?{streamName:"IPC output",threshold:s,unit:"messages"}:{streamName:Cn(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>ps(r)),md=(e,t,r)=>{if(!t)return e;let n=ps(r);return e.length>n?e.slice(0,n):e},ps=([,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:P,cwd:M})=>{let j=n==null?void 0:n.code,Y=w_({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=S_(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=>v_(xe)).join(`
|
45
|
+
`)].map(xe=>Dr(sr(__(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=
|
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})=>
|
50
|
-
`){let i=$E(r,o,t,e),a=r.slice(s+1,o+1-i);n.length>0&&(a=
|
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=x_(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} (${qn(p)})${b}`:i!==void 0?`Command was killed with ${i} (${a})`:c!==void 0?`Command failed with exit code ${c}`:"Command failed"},x_=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",S_=(e,t)=>{if(e instanceof Le)return;let r=Rl(e)?e.originalMessage:String((e==null?void 0:e.message)??e),n=Dr(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=>sr(hd(t))).filter(Boolean).join(`
|
48
|
+
`):hd(e),hd=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})=>bd({command:e,escapedCommand:t,cwd:o,durationMs:Yo(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}=T_(u,l),{originalMessage:Ie,shortMessage:xe,message:Ar}=yd({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=Tl(e,Ar,X);return Object.assign(xt,E_({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},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:P,shortMessage:M})=>{var j;return bd({shortMessage:M,originalMessage:P,command:t,escapedCommand:r,cwd:T,durationMs:Yo(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:qn(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 Ti(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 Oi(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=Ti(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%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 xd=(e,t)=>{e.failed&&Be({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})};var Sd=(e,t)=>{Xt(t)&&(xd(e,t),$_(e,t))},$_=(e,t)=>{let r=`(done in ${Oi(e.durationMs)})`;Be({type:"duration",verboseMessage:r,verboseInfo:t,result:e})};var ar=(e,t,{reject:r})=>{if(Sd(e,t),e.failed&&r)throw e;return e};var Li=require("node:fs");var Ed=(e,t)=>_t(e)?"asyncGenerator":Rd(e)?"generator":hs(e)?"fileUrl":M_(e)?"filePath":B_(e)?"webStream":Pe(e,{checkOpen:!1})?"native":K(e)?"uint8Array":U_(e)?"asyncIterable":G_(e)?"iterable":Ci(e)?Td({transform:e},t):P_(e)?D_(e,t):"native",D_=(e,t)=>Si(e.transform,{checkOpen:!1})?L_(e,t):Ci(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),Ri(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(Si(t,{checkOpen:!1}))throw new TypeError(`The \`${s}.final\` option must not be a Duplex stream.`);if(Ci(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 Ri(r,`${s}.binary`),Ri(n,`${s}.objectMode`),_t(e)||_t(t)?"asyncGenerator":"generator"},Ri=(e,t)=>{if(e!==void 0&&typeof e!="boolean")throw new TypeError(`The \`${t}\` option must use a boolean.`)},_d=e=>_t(e)||Rd(e),_t=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),hs=e=>Object.prototype.toString.call(e)==="[object URL]",kd=e=>hs(e)&&e.protocol!=="file:",M_=e=>W(e)&&Object.keys(e).length>0&&Object.keys(e).every(t=>F_.has(t))&&ki(e.file),F_=new Set(["file","append"]),ki=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]",gs=e=>Object.prototype.toString.call(e)==="[object WritableStream]",B_=e=>Ad(e)||gs(e),Ci=e=>Ad(e==null?void 0:e.readable)&&gs(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,ve=new Set(["generator","asyncGenerator","duplex","webTransform"]),ys=new Set(["fileUrl","filePath","fileNumber"]),Ai=new Set(["fileUrl","filePath"]),$d=new Set([...Ai,"webStream","nodeStream"]),Dd=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 Ii=(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})=>ve.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})=>!ve.has(s)),...z_(e,t,r,n)],z_=(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]=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"?H_({stdioItem:e,optionName:s}):t==="webTransform"?Z_({stdioItem:e,index:r,newTransforms:n,direction:o}):Y_({stdioItem:e,index:r,newTransforms:n,direction:o,encoding:i}),H_=({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}}},Z_=({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}=Ii(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||he.has(o),{writableObjectMode:d,readableObjectMode:p}=Ii(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 bs=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"],cr=()=>{},$i=()=>"input",Md={generator:cr,asyncGenerator:cr,fileUrl:cr,filePath:cr,iterable:$i,asyncIterable:$i,uint8Array:$i,webStream:e=>gs(e)?"output":"input",nodeStream(e){return vt(e,{checkOpen:!1})?xi(e,{checkOpen:!1})?void 0:"input":"output"},webTransform:cr,duplex:cr,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,bs.default.stdin].includes(e))return"input";if([1,2,bs.default.stdout,bs.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 Se.map(n=>t[n]);if(rE(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])},rE=e=>Se.some(t=>e[t]!==void 0),Bd=(e,t)=>Array.isArray(e)?e.map(r=>Bd(r,t)):e??(t>=Se.length?"ignore":"pipe"),nE=(e,t,r)=>e.map((n,s)=>!t[s]&&s!==0&&!Kt(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}: ${Wn(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:Je((0,Gd.readFileSync)(s)),optionName:t}}},aE=(e,t)=>{if(e==="inherit")return t;if(typeof e=="number")return e;let r=kn.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=kn[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(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.")},fE=e=>e===void 0?[]:[{...dE(e),optionName:"inputFile"}],dE=e=>{if(hs(e))return{type:"fileUrl",value:e};if(ki(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")),Hd=({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 Zd({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})=>{Ai.has(t)&&Zd({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})},Zd=({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 ${ft[r]} that is the same.`)};var ws=(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=Cn(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 xE(i,a,n),vE(i),{stdioItems:i,isStdioArray:a}},wE=(e,t)=>({type:Ed(e,t),value:e,optionName:t}),xE=(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(SE.has(n))throw new Error(`The \`${s}\` option must not include \`${n}\`.`)}},SE=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})=>ys.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 Di(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=Hd({stdioItem:e,direction:r,fileDescriptors:s,isSync:o});return i!==void 0?{...e,stream:i}:{...e,...t[r][e.type](e,n)}},Di=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)=>ws(AE,e,t,!0),Ve=({type:e,optionName:t})=>{Jd(t,ft[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:Ve,webStream:Ve,nodeStream:Ve,webTransform:Ve,duplex:Ve,asyncIterable:Ve,native:CE},AE={input:{...Xd,fileUrl:({value:e})=>({contents:[Je((0,Li.readFileSync)(e))]}),filePath:({value:{file:e}})=>({contents:[Je((0,Li.readFileSync)(e))]}),fileNumber:Ve,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:Ve,string:Ve,uint8Array:Ve}};var tt=(e,{stripFinalNewline:t},r)=>Ni(t,r)&&e!==void 0&&!Array.isArray(e)?sr(e):e,Ni=(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:ep(t,n),Mi=(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=Pi(n,a),n=""),yield a,s=o}s!==r.length-1&&(n=Pi(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)},Pi=(e,t)=>`${e}${t}`,NE={windowsNewline:`\r
|
51
51
|
`,unixNewline:`
|
52
52
|
`,LF:`
|
53
|
-
`,concatBytes:
|
53
|
+
`,concatBytes:Pi},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}\`.
|
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
|
57
|
-
`)){let c=
|
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 ip=require("node:buffer"),ap=require("node:string_decoder");var Ss=(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 Je(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 Fi=require("node:util"),ji=(0,Fi.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=zE}=t[r];for await(let s of n(e))yield*vs(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*vs(n,r,t+1)},up=(0,Fi.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 Bi=(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=>[...Et(r,e,0)]),...Gr(e)],Et=function*(e,t,r){if(r===t.length){yield e;return}let{transform:n=HE}=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*WE(r,Number(t),e)},WE=function*(e,t,r){if(e!==void 0)for(let n of e())yield*Et(n,r,t+1)},HE=function*(e){yield e};var Ui=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:s},optionName:o},{encoding:i})=>{let a={},c=fp(e,i,o),u=_t(t),l=_t(r),f=u?ji.bind(void 0,vs,a):Bi.bind(void 0,Et),d=u||l?ji.bind(void 0,cp,a):Bi.bind(void 0,Gr),p=u||l?up.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=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)},Ss(r,i,n),xs(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 ZE(e))YE(e,r,t)},ZE=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 ${ft[a]} with synchronous methods.`)}let i=s.map(({contents:a})=>a).map(a=>XE(a,n));r.input=$r(i)},XE=(e,t)=>{let r=_s(e,t,"utf8",!0);return KE(r),$r(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 Ts=require("node:fs");var Es=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>n!=="all"&&Kt(r,n)&&!he.has(t)&&JE(n)&&(e.some(({type:s,value:o})=>s==="native"&&QE.has(o))||e.every(({type:s})=>ve.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)eT(t)||hp(s,r,n)},mp=(e,t,r)=>{for(let n of e)hp(n,t,r)},eT=e=>e._readableState.pipes.length>0,hp=(e,t,r)=>{let n=Pn(e);Be({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)=>tT({result:c,fileDescriptors:e,fdNumber:u,state:o,outputFiles:i,isMaxBuffer:n,verboseInfo:s},r)),...o}},tT=({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=Je(d),{stdioItems:b,objectMode:T}=t[r],P=rT([p],b,c,n),{serializedResult:M,finalResult:j=M}=nT({chunks:P,objectMode:T,encoding:c,lines:u,stripFinalNewline:l,fdNumber:r});sT({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&&oT(M,b,s),Y}catch(X){return n.error=X,Y}},rT=(e,t,r,n)=>{try{return _s(e,t,r,!1)}catch(s){return n.error=s,e}},nT=({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=ru(e,r);return n[o]?{serializedResult:i,finalResult:Mi(i,!s[o],t)}:{serializedResult:i}},sT=({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=Mi(e,!1,i);try{mp(a,t,n)}catch(c){r.error??=c}},oT=(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 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,tt(t,r,"all")]:Array.isArray(t)?[tt(e,r,"all"),...t]:K(e)&&K(t)?Uo([e,t]):`${e}${t}`};var Os=require("node:events");var bp=async(e,t)=>{let[r,n]=await iT(e);return t.isForcefullyTerminated??=!1,[r,n]},iT=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"?wp(e):r.value},wp=async e=>{try{return await(0,Os.once)(e,"exit")}catch{return wp(e)}},xp=async e=>{let[t,r]=await e;if(!aT(t,r)&&Gi(t,r))throw new Le;return[t,r]},aT=(e,t)=>e===void 0&&t===void 0,Gi=(e,t)=>e!==0||t!==null;var Sp=({error:e,status:t,signal:r,output:n},{maxBuffer:s})=>{let o=cT(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}},cT=(e,t,r)=>e!==void 0?e:Gi(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}=uT(e,t,r),f=dT({file:n,commandArguments:s,options:u,command:o,escapedCommand:i,verboseInfo:c,fileDescriptors:l,startTime:a});return ar(f,c,u)},uT=(e,t,r)=>{let{command:n,escapedCommand:s,startTime:o,verboseInfo:i}=Fn(e,t,r),a=lT(r),{file:c,commandArguments:u,options:l}=os(e,t,a);fT(l);let f=Kd(l,i);return{file:c,commandArguments:u,command:n,escapedCommand:s,startTime:o,verboseInfo:i,options:l,fileDescriptors:f}},lT=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,fT=({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.`)},dT=({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,verboseInfo:o,fileDescriptors:i,startTime:a})=>{let c=pT({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}=Sp(c,r),{output:b,error:T=u}=gp({fileDescriptors:i,syncResult:c,options:r,isMaxBuffer:p,verboseInfo:o}),P=b.map((j,Y)=>tt(j,r,Y)),M=tt(yp(b,r),r,"all");return hT({error:T,exitCode:l,signal:f,timedOut:d,isMaxBuffer:p,stdio:P,all:M,options:r,command:n,escapedCommand:s,startTime:a})},pT=({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,fileDescriptors:o,startTime:i})=>{try{dp(o,r);let a=mT(r);return(0,vp.spawnSync)(e,t,a)}catch(a){return ir({error:a,command:n,escapedCommand:s,fileDescriptors:o,options:r,startTime:i,isSync:!0})}},mT=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:ps(t)}),hT=({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 Im=require("node:events"),$m=require("node:child_process");var Vi=q(require("node:process"),1);var ur=require("node:events");var Ep=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:s=!0,filter:o}={})=>(tr({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Jn(e)}),gT({anyProcess:e,channel:t,isSubprocess:r,filter:o,reference:s})),gT=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([yT(o,n,i),bT(o,r,i),wT(o,r,i)])}catch(a){throw rr(e),a}finally{i.abort(),Yn(t,s)}},yT=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},bT=async(e,t,{signal:r})=>{await(0,ur.once)(e,"disconnect",{signal:r}),Wl(t)},wT=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 Op=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:s=!0}={})=>qi({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:s}),qi=({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 xT(e,i,a),ST({ipcEmitter:i,isSubprocess:r,controller:a,state:c}),vT({anyProcess:e,channel:t,ipcEmitter:i,isSubprocess:r,shouldAwait:s,controller:a,state:c,reference:o})},xT=async(e,t,r)=>{try{await(0,Vr.once)(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},ST=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{}},vT=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}))Tp(i),yield c}catch{Tp(i)}finally{o.abort(),Yn(t,a),n||rr(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=Vi.default,t=!0,r=Vi.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:rs.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"),dt=require("node:stream");var Ip=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,verboseInfo:i})=>{Di(n);let a=new Ap.ChildProcess;_T(a,n),Object.assign(a,{readable:ET,writable:TT,duplex:OT});let c=ir({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,isSync:!1}),u=RT(c,i,s);return{subprocess:a,promise:u}},_T=(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},ET=()=>new dt.Readable({read(){}}),TT=()=>new dt.Writable({write(){}}),OT=()=>new dt.Duplex({read(){},write(){}}),RT=async(e,t,r)=>ar(e,t,r);var lr=require("node:fs"),Dp=require("node:buffer"),ze=require("node:stream");var Lp=(e,t)=>ws(kT,e,t,!1),Wr=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${ft[e]}.`)},$p={fileNumber:Wr,generator:Ui,asyncGenerator:Ui,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(){}},kT={input:{...$p,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(Dp.Buffer.from(e))})},output:{...$p,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"),Hi=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)Wi(s);let t=e.some(({readableObjectMode:s})=>s),r=CT(e,t),n=new zi({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(let s of e)n.add(s);return n}var CT=(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)},zi=class extends Cs.PassThrough{#t=new Set([]);#r=new Set([]);#e=new Set([]);#n;#o=Symbol("unpipe");#s=new WeakMap;add(t){if(Wi(t),this.#t.has(t))return;this.#t.add(t),this.#n??=AT(this,this.#t,this.#o);let r=DT({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(Wi(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)}},AT=async(e,t,r)=>{ks(e,Np);let n=new AbortController;try{await Promise.race([IT(e,n),$T(e,t,r,n)])}finally{n.abort(),ks(e,-Np)}},IT=async(e,{signal:t})=>{try{await(0,Hi.finished)(e,{signal:t,cleanup:!0})}catch(r){throw Mp(e,r),r}},$T=async(e,t,r,{signal:n})=>{for await(let[s]of(0,Hr.on)(e,"unpipe",{signal:n}))t.has(s)&&s.emit(r)},Wi=e=>{if(typeof(e==null?void 0:e.pipe)!="function")throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},DT=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,onFinished:o,unpipeEvent:i})=>{ks(e,Pp);let a=new AbortController;try{await Promise.race([LT(o,t,a),NT({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,controller:a}),PT({stream:t,streams:r,ended:n,aborted:s,unpipeEvent:i,controller:a})])}finally{a.abort(),ks(e,-Pp)}r.size>0&&r.size===n.size+s.size&&(n.size===0&&s.size>0?Zi(e):MT(e))},LT=async(e,t,{signal:r})=>{try{await e,r.aborted||Zi(t)}catch(n){r.aborted||Mp(t,n)}},NT=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,controller:{signal:o}})=>{try{await(0,Hi.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)}},PT=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)},MT=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",FT),e.destroy(t))},FT=()=>{},ks=(e,t)=>{let r=e.getMaxListeners();r!==0&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Np=2,Pp=1;var Yi=require("node:stream/promises");var fr=(e,t)=>{e.pipe(t),jT(e,t),BT(e,t)},jT=async(e,t)=>{if(!(De(e)||De(t))){try{await(0,Yi.finished)(e,{cleanup:!0,readable:!0,writable:!1})}catch{}Xi(t)}},Xi=e=>{e.writable&&e.end()},BT=async(e,t)=>{if(!(De(e)||De(t))){try{await(0,Yi.finished)(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Ki(e)}},Ki=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})=>ve.has(c)))UT(e,a,i,s);for(let{stream:a}of o.filter(({type:c})=>!ve.has(c)))qT({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)}},UT=(e,t,r,n)=>{r==="output"?fr(e.stdio[n],t):fr(t,e.stdio[n]);let s=GT[n];s!==void 0&&(e[s]=t),e.stdio[n]=t},GT=["stdin","stdout","stderr"],qT=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:s,controller:o})=>{if(t===void 0)return;VT(t,o);let[i,a]=r==="output"?[t,e.stdio[n]]:[e.stdio[n],t],c=s.get(i)??[];s.set(i,[...c,a])},VT=(e,{signal:t})=>{De(e)&&St(e,zT,t)},zT=2;var Gp=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",Ji=Symbol.for("signal-exit emitter"),Qi=globalThis,WT=Object.defineProperty.bind(Object),ea=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Qi[Ji])return Qi[Ji];WT(Qi,Ji,{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{},HT=e=>({onExit(t,r){return e.onExit(t,r)},load(){return e.load()},unload(){return e.unload()}}),ta=class extends Is{onExit(){return()=>{}}load(){}unload(){}},ra=class extends Is{#t=na.platform==="win32"?"SIGINT":"SIGHUP";#r=new ea;#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)}},na=globalThis.process,{onExit:Up,load:Nj,unload:Pj}=HT(As(na)?new ra(na):new ta);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=Mn(),{destination:i,destinationStream:a,destinationError:c,from:u,unpipeSignal:l}=ZT(r,n,s),{sourceStream:f,sourceError:d}=XT(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}},ZT=(e,t,r)=>{try{let{destination:n,pipeOptions:{from:s,to:o,unpipeSignal:i}={}}=YT(e,t,...r),a=Hn(n,o);return{destination:n,destinationStream:a,from:s,unpipeSignal:i}}catch(n){return{destinationError:n}}},YT=(e,t,r,...n)=>{if(Array.isArray(r))return{destination:t(Vp,e)(r,...n),pipeOptions:e};if(typeof r=="string"||r instanceof URL||jo(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(Vp)(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}`)},Vp=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),XT=(e,t)=>{try{return{sourceStream:nr(e,t)}}catch(r){return{sourceError:r}}};var Hp=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:s,sourceOptions:o,startTime:i})=>{let a=KT({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(a!==void 0)throw sa({error:a,fileDescriptors:s,sourceOptions:o,startTime:i})},KT=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>{if(t!==void 0&&n!==void 0)return n;if(n!==void 0)return Ki(e),n;if(t!==void 0)return Xi(r),t},sa=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>ir({error:e,command:Wp,escapedCommand:Wp,fileDescriptors:t,options:r,startTime:n,isSync:!1}),Wp="source.pipe(destination)";var Zp=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=$s.has(t)?QT(e,t):JT(e,t);return St(e,t0,r.signal),St(t,r0,r.signal),e0(t),n},JT=(e,t)=>{let r=Tt([e]);return fr(r,t),$s.set(t,r),r},QT=(e,t)=>{let r=$s.get(t);return r.add(e),r},e0=async e=>{try{await(0,Yp.finished)(e,{cleanup:!0,readable:!1,writable:!0})}catch{}$s.delete(e)},$s=new WeakMap,t0=2,r0=1;var Kp=require("node:util");var Jp=(e,t)=>e===void 0?[]:[n0(e,t)],n0=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 sa({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}=zp(e,...t),s=s0({...n,destination:r});return s.pipe=Ds.bind(void 0,{...e,source:r,sourcePromise:s,boundOptions:{}}),s},s0=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:s,destinationStream:o,destinationError:i,unpipeSignal:a,fileDescriptors:c,startTime:u})=>{let l=o0(e,s);Hp({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([Zp(l),...Jp(a,{sourceStream:t,mergedStream:d,sourceOptions:r,fileDescriptors:c,startTime:u})])}finally{f.abort()}},o0=(e,t)=>Promise.allSettled([e,t]);var nm=require("node:timers/promises");var em=require("node:events"),tm=require("node:stream");var Ls=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:s,preserveNewlines:o})=>{let i=new AbortController;return i0(t,i),rm({stream:e,controller:i,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:s,shouldSplit:!e.readableObjectMode,preserveNewlines:o})},i0=async(e,t)=>{try{await e}catch{}finally{t.abort()}},oa=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:s,allMixed:o})=>{let i=new AbortController;a0(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})},a0=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 c0({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i})},ia=(0,tm.getDefaultHighWaterMark)(!0),Qp=ia,c0=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i}){let a=u0({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)}},u0=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:s})=>[Ss(e,r,!t),xs(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=l0({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:u,streamInfo:l});if(!s){await Promise.all([f0(e),f]);return}let d=Ni(c,r),p=oa({stream:e,onStreamEnd:t,lines:i,encoding:n,stripFinalNewline:d,allMixed:a}),[b]=await Promise.all([d0({stream:e,iterable:p,fdNumber:r,encoding:n,maxBuffer:o,lines:i}),f]);return b},l0=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=oa({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:s});await pp(a,e,r,o)},f0=async e=>{await(0,nm.setImmediate)(),e.readableFlowing===null&&e.resume()},d0=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 om(ld({error:a,stream:e,readableObjectMode:t,lines:i,encoding:s,fdNumber:n}))}},aa=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"),Zr=async(e,t,r,{isSameDirection:n,stopOnExit:s=!1}={})=>{let o=p0(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||g0(a,t,r,n)}finally{i.abort()}},p0=(e,{originalStreams:[t],subprocess:r})=>{let n={stdinCleanedUp:!1};return e===t&&m0(e,r,n),n},m0=(e,t,r)=>{let{_destroy:n}=e;e._destroy=(...s)=>{h0(t,r),n.call(e,...s)}},h0=({exitCode:e,signalCode:t},r)=>{(e!==null||t!==null)&&(r.stdinCleanedUp=!0)},g0=(e,t,r,n)=>{if(!y0(e,t,r,n))throw e},y0=(e,t,r,n=!0)=>r.propagating?im(e)||Ns(e):(r.propagating=!0,ca(r,t)===n?im(e):Ns(e)),ca=({fileDescriptors:e},t)=>t!=="all"&&e[t].direction==="input",Ns=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)=>ua({stream:c,fdNumber:u,encoding:t,buffer:r[u],maxBuffer:n[u],lines:s[u],allMixed:!1,stripFinalNewline:o,verboseInfo:i,streamInfo:a})),ua=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(ca(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)?Tt([e,t].filter(Boolean)):void 0,lm=({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:o,verboseInfo:i,streamInfo:a})=>ua({...b0(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:s[1]||s[2],allMixed:w0(e),stripFinalNewline:o,verboseInfo:i,streamInfo:a}),b0=({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}},w0=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode;var hm=require("node:events");var fm=e=>Kt(e,"ipc"),dm=(e,t)=>{let r=Pn(e);Be({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=Qe(t,"ipc"),c=Qe(r,"ipc");for await(let u of qi({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:P,controller:M})=>{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}),we=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=x0(T,e,Y),xe=S0(b,Y);try{return await Promise.race([Promise.all([{},xp(j),Promise.all(X),we,Ae,Ff(e,f),...Ie,...xe]),P,v0(e,M),...Df(e,o,d,M),...zl({subprocess:e,cancelSignal:i,gracefulCancel:a,context:d,controller:M}),...Af({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=>aa(xt))),aa(we),mm(Ae,ce),Promise.allSettled(Ie),Promise.allSettled(xe)])}},x0=(e,t,r)=>e.map((n,s)=>n===t.stdio[s]?void 0:Zr(n,s,r)),S0=(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"}))),v0=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}),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 wm=require("node:stream"),xm=require("node:util");var la=require("node:stream/promises");var fa=async e=>{if(e!==void 0)try{await da(e)}catch{}},bm=async e=>{if(e!==void 0)try{await pa(e)}catch{}},da=async e=>{await(0,la.finished)(e,{cleanup:!0,readable:!1,writable:!0})},pa=async e=>{await(0,la.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 Sm=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:s=!0,preserveNewlines:o=!0}={})=>{let i=s||he.has(r),{subprocessStdout:a,waitReadableDestroy:c}=ma(e,n,t),{readableEncoding:u,readableObjectMode:l,readableHighWaterMark:f}=ha(a,i),{read:d,onStdoutDataDone:p}=ga({subprocessStdout:a,subprocess:e,binary:i,encoding:r,preserveNewlines:o}),b=new wm.Readable({read:d,destroy:(0,xm.callbackify)(ba.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:f,objectMode:l,encoding:u});return ya({subprocessStdout:a,onStdoutDataDone:p,readable:b,subprocess:e}),b},ma=(e,t,r)=>{let n=nr(e,t),s=Yr(r,n,"readableDestroy");return{subprocessStdout:n,waitReadableDestroy:s}},ha=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:ia},ga=({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(){_0(this,i,o)},onStdoutDataDone:o}},_0=async(e,t,r)=>{try{let{value:n,done:s}=await t.next();s?r.resolve():e.push(n)}catch{}},ya=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:s})=>{try{await pa(e),await n,await fa(s),await t,r.readable&&r.push(null)}catch(o){await fa(s),vm(r,o)}},ba=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await dr(r,t)&&(vm(e,n),await Ps(t,n))},vm=(e,t)=>{Ms(e,e.readable,t)};var _m=require("node:stream"),wa=require("node:util");var Em=({subprocess:e,concurrentStreams:t},{to:r}={})=>{let{subprocessStdin:n,waitWritableFinal:s,waitWritableDestroy:o}=xa(e,r,t),i=new _m.Writable({...Sa(n,e,s),destroy:(0,wa.callbackify)(_a.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:s,waitWritableDestroy:o})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return va(n,i),i},xa=(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}},Sa=(e,t,r)=>({write:E0.bind(void 0,e),final:(0,wa.callbackify)(T0.bind(void 0,e,t,r))}),E0=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},T0=async(e,t,r)=>{await dr(r,t)&&(e.writable&&e.end(),await t)},va=async(e,t,r)=>{try{await da(e),t.writable&&t.end()}catch(n){await bm(r),Tm(t,n)}},_a=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},s)=>{await dr(r,t),await dr(n,t)&&(Tm(e,s),await Ps(t,s))},Tm=(e,t)=>{Ms(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||he.has(r),{subprocessStdout:c,waitReadableDestroy:u}=ma(e,n,t),{subprocessStdin:l,waitWritableFinal:f,waitWritableDestroy:d}=xa(e,s,t),{readableEncoding:p,readableObjectMode:b,readableHighWaterMark:T}=ha(c,a),{read:P,onStdoutDataDone:M}=ga({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:i}),j=new Om.Duplex({read:P,...Sa(l,e,f),destroy:(0,Rm.callbackify)(O0.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 ya({subprocessStdout:c,onStdoutDataDone:M,readable:j,subprocess:e,subprocessStdin:l}),va(l,j,c),j},O0=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:s,waitWritableDestroy:o},i)=>{await Promise.all([ba({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},i),_a({subprocessStdin:t,subprocess:r,waitWritableFinal:s,waitWritableDestroy:o},i)])};var Ea=(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 R0(a,i,e)},R0=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=Sm.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=Ea.bind(void 0,e,t),e[Symbol.asyncIterator]=Ea.bind(void 0,e,t,{})};var Am=(e,t)=>{for(let[r,n]of C0){let s=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:s})}},k0=(async()=>{})().constructor.prototype,C0=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(k0,e)]);var Dm=(e,t,r,n)=>{let{file:s,commandArguments:o,command:i,escapedCommand:a,startTime:c,verboseInfo:u,options:l,fileDescriptors:f}=A0(e,t,r),{subprocess:d,promise:p}=$0({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}),Am(d,p),Ge.set(d,{options:l,fileDescriptors:f}),d},A0=(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=I0(u),f=Lp(l,i);return{file:a,commandArguments:c,command:n,escapedCommand:s,startTime:o,verboseInfo:i,options:l,fileDescriptors:f}},I0=({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}},$0=({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=Ue();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=D0({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}},D0=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 gm({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=L0({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)},L0=({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,N0(n,e[n],s)]));return{...e,...r}},N0=(e,t,r)=>P0.has(e)&&W(t)&&W(r)?{...t,...r}:r,P0=new Set(["env",...Vo]);var pt=(e,t,r,n)=>{let s=(i,a,c)=>pt(i,a,r,c),o=(...i)=>M0({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:s},...i);return n!==void 0&&n(o,s,t),o},M0=({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}=F0({mapArguments:e,firstArgument:o,nextArguments:i,deepOptions:t,boundOptions:r});return l?_p(a,c,u):Dm(a,c,u,s)},F0=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:s})=>{let o=au(t)?cu(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 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]=j0(e);return{file:r,commandArguments:n}},j0=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(B0)){let s=r.at(-1);s&&s.endsWith("\\")?r[r.length-1]=`${s.slice(0,-1)} ${n}`:r.push(n)}return r},B0=/ +/g;var Mm=(e,t,r)=>{e.sync=t(U0,r),e.s=e.sync},Fm=({options:e})=>jm(e),U0=({options:e})=>({...jm(e),isSync:!0}),jm=e=>({options:{...G0(e),...e}}),G0=({input:e,inputFile:t,stdio:r})=>e===void 0&&t===void 0&&r===void 0?{stdin:"inherit"}:{},Bm={preferLocal:!0};var Um=pt(()=>({})),aG=pt(()=>({isSync:!0})),cG=pt(Lm),uG=pt(Nm),lG=pt(Lf),fG=pt(Fm,{},Bm,Mm),{sendMessage:dG,getOneMessage:pG,getEachMessage:mG,getCancelSignal:hG}=kp();var Yw=require("fs"),$o=require("path"),Do=q($g());var Fe={};vx(Fe,{BRAND:()=>uC,DIRTY:()=>kt,EMPTY_PATH:()=>Uk,INVALID:()=>R,NEVER:()=>HC,OK:()=>re,ParseStatus:()=>ee,Schema:()=>L,ZodAny:()=>gt,ZodArray:()=>ot,ZodBigInt:()=>At,ZodBoolean:()=>It,ZodBranded:()=>an,ZodCatch:()=>Gt,ZodDate:()=>$t,ZodDefault:()=>Ut,ZodDiscriminatedUnion:()=>Qs,ZodEffects:()=>Re,ZodEnum:()=>jt,ZodError:()=>le,ZodFirstPartyTypeKind:()=>k,ZodFunction:()=>to,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:()=>eo,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:()=>bC,array:()=>vC,bigint:()=>pC,boolean:()=>Vg,coerce:()=>WC,custom:()=>Ug,date:()=>mC,datetimeRegex:()=>jg,defaultErrorMap:()=>rt,discriminatedUnion:()=>OC,effect:()=>FC,enum:()=>NC,function:()=>$C,getErrorMap:()=>hr,getParsedType:()=>He,instanceof:()=>fC,intersection:()=>RC,isAborted:()=>Xs,isAsync:()=>gr,isDirty:()=>Ks,isValid:()=>mt,late:()=>lC,lazy:()=>DC,literal:()=>LC,makeIssue:()=>nn,map:()=>AC,nan:()=>dC,nativeEnum:()=>PC,never:()=>xC,null:()=>yC,nullable:()=>BC,number:()=>qg,object:()=>_C,objectUtil:()=>qa,oboolean:()=>zC,onumber:()=>VC,optional:()=>jC,ostring:()=>qC,pipeline:()=>GC,preprocess:()=>UC,promise:()=>MC,quotelessJson:()=>Fk,record:()=>CC,set:()=>IC,setErrorMap:()=>Bk,strictObject:()=>EC,string:()=>Gg,symbol:()=>hC,transformer:()=>FC,tuple:()=>kC,undefined:()=>gC,union:()=>TC,unknown:()=>wC,util:()=>N,void:()=>SC});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 qa;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(qa||(qa={}));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"]),Fk=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 jk=(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=jk;var Dg=rt;function Bk(e){Dg=e}function hr(){return Dg}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}},Uk=[];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}),Xs=e=>e.status==="aborted",Ks=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 Js=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)},Pg=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}},Lg=(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 Lg(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 Lg(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}},Gk=/^c[^\s-]{8,}$/i,qk=/^[0-9a-z]+$/,Vk=/^[0-9A-HJKMNP-TV-Z]{26}$/i,zk=/^[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,Wk=/^[a-z0-9_-]{21}$/i,Hk=/^[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)?)??$/,Yk=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Xk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Va,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])$/,Jk=/^(?:(?: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])$/,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]))$/,eC=/^(([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])$/,tC=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,rC=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Mg="((\\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])))",nC=new RegExp(`^${Mg}$`);function Fg(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 sC(e){return new RegExp(`^${Fg(e)}$`)}function jg(e){let t=`${Mg}T${Fg(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 oC(e,t){return!!((t==="v4"||!t)&&Kk.test(e)||(t==="v6"||!t)&&Qk.test(e))}function iC(e,t){if(!Hk.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 aC(e,t){return!!((t==="v4"||!t)&&Jk.test(e)||(t==="v6"||!t)&&eC.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")Yk.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")Va||(Va=new RegExp(Xk,"u")),Va.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")zk.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")Wk.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")Gk.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")qk.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")Vk.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"?jg(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"?nC.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?sC(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"?oC(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"?iC(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"?aC(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"?tC.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"base64",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?rC.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 cC(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"?cC(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 Bg(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):[],Qs=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 za(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=za(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=za(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(Xs(o)||Xs(i))return R;let a=za(o.value,i.value);return a.valid?((Ks(o)||Ks(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 eo=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 to=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 Bg(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(Js(this,sn,"f")||Pg(this,sn,new Set(this._def.values),"f"),!Js(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=Bg;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(Js(this,on,"f")||Pg(this,on,new Set(N.getValidEnumValues(this._def.values)),"f"),!Js(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 uC=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 Ng(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function Ug(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=Ng(t,n),c=a.fatal??r??!0;s.addIssue({code:"custom",...a,fatal:c})}});if(!o){let i=Ng(t,n),a=i.fatal??r??!0;s.addIssue({code:"custom",...i,fatal:a})}}):gt.create()}var lC={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 fC=(e,t={message:`Input not instance of ${e.name}`})=>Ug(r=>r instanceof e,t),Gg=ht.create,qg=Ct.create,dC=vr.create,pC=At.create,Vg=It.create,mC=$t.create,hC=br.create,gC=Dt.create,yC=Lt.create,bC=gt.create,wC=st.create,xC=Me.create,SC=wr.create,vC=ot.create,_C=fe.create,EC=fe.strictCreate,TC=Nt.create,OC=Qs.create,RC=Pt.create,kC=Ze.create,CC=eo.create,AC=xr.create,IC=Sr.create,$C=to.create,DC=Mt.create,LC=Ft.create,NC=jt.create,PC=Bt.create,MC=yt.create,FC=Re.create,jC=Te.create,BC=Ye.create,UC=Re.createWithPreprocess,GC=cn.create,qC=()=>Gg().optional(),VC=()=>qg().optional(),zC=()=>Vg().optional(),WC={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 HC=R;var zg=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 So=q(sy(),1),yo=q(Ya(),1),Ab=require("child_process"),pw=q(Ka(),1),Rr=q(Ka(),1),jw=require("node:events"),wo=Object.defineProperty,EA=Object.defineProperties,TA=Object.getOwnPropertyDescriptor,OA=Object.getOwnPropertyDescriptors,yc=Object.getOwnPropertyNames,oy=Object.getOwnPropertySymbols,Fy=Object.prototype.hasOwnProperty,RA=Object.prototype.propertyIsEnumerable,iy=(e,t,r)=>t in e?wo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ce=(e,t)=>{for(var r in t||(t={}))Fy.call(t,r)&&iy(e,r,t[r]);if(oy)for(var r of oy(t))RA.call(t,r)&&iy(e,r,t[r]);return e},fn=(e,t)=>EA(e,OA(t)),g=(e,t)=>function(){return e&&(t=(0,e[yc(e)[0]])(e=0)),t},kA=(e,t)=>function(){return t||(0,e[yc(e)[0]])((t={exports:{}}).exports,t),t.exports},Z=(e,t)=>{for(var r in t)wo(e,r,{get:t[r],enumerable:!0})},CA=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of yc(t))!Fy.call(e,s)&&s!==r&&wo(e,s,{get:()=>t[s],enumerable:!(n=TA(t,s))||n.enumerable});return e},V=e=>CA(wo({},"__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 AA(...e){let t=new String(e);return xo.set(t,e),t}function ho(e){return e instanceof String&&xo.has(e)}function ay(e){return xo.get(e)||[]}var xo,hn=g({"src/lib/args/pathspec.ts"(){"use strict";xo=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}}}}),jy,By=g({"src/lib/errors/task-configuration-error.ts"(){"use strict";wt(),jy=class extends at{constructor(e){super(void 0,e)}}}});function Uy(e){return typeof e=="function"?e:Zt}function Gy(e){return typeof e=="function"&&e!==Zt}function qy(e,t){let r=e.indexOf(t);return r<=0?[e,""]:[e.substr(0,r),e.substr(r+1)]}function Vy(e,t=0){return zy(e)&&e.length>t?e[t]:void 0}function Ht(e,t=0){if(zy(e)&&e.length>t)return e[e.length-1-t]}function zy(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 bc(e,t){return yn(e,!0).map(r=>t(r))}function wc(e){return(0,So.exists)(e,So.FOLDER)}function F(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function Wy(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function vo(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 Hy(e){return e.replace(/[\s-]+(.)/g,(t,r)=>r.toUpperCase())}function Zy(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 Yy(e,t){return Object.assign({},...t.map(r=>r in e?{[r]:e[r]}:{}))}function sc(e=0){return new Promise(t=>setTimeout(t,e))}function oc(e){if(e!==!1)return e}var kr,Zt,bn,_o=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 xc(e,t){let r=ho(e)?"string":typeof e;return/number|string|boolean/.test(r)&&(!t||!t.includes(r))}function Sc(e){return!!e&&bn(e)==="[object Object]"}function Xy(e){return typeof e=="function"}var wn,ne,Ky,go,vc,Jy=g({"src/lib/utils/argument-filters.ts"(){"use strict";_o(),hn(),wn=e=>Array.isArray(e),ne=e=>typeof e=="string",Ky=e=>Array.isArray(e)&&e.every(ne),go=e=>ne(e)||Array.isArray(e)&&e.every(ne),vc=e=>e==null||"number|boolean|function".includes(typeof e)?!1:Array.isArray(e)||typeof e=="string"||typeof e.length=="number"}}),ic,IA=g({"src/lib/utils/exit-codes.ts"(){"use strict";ic=(e=>(e[e.SUCCESS=0]="SUCCESS",e[e.ERROR=1]="ERROR",e[e.NOT_FOUND=-2]="NOT_FOUND",e[e.UNCLEAN=128]="UNCLEAN",e))(ic||{})}}),mn,$A=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,DA=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 Qy(...e){let t=process.cwd(),r=Object.assign(Ce({baseDir:t},eb),...e.filter(n=>typeof n=="object"&&n));return r.baseDir=r.baseDir||t,r.trimmed=r.trimmed===!0,r}var eb,LA=g({"src/lib/utils/simple-git-options.ts"(){"use strict";eb={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function _c(e,t=[]){return Sc(e)?Object.keys(e).reduce((r,n)=>{let s=e[n];return ho(s)?r.push(s):xc(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 _c(Ec(e),n),r||n.push(...NA(e)),n}function NA(e){let t=typeof Ht(e)=="function";return Ke(Ht(e,t?1:0),wn,[])}function Ec(e){let t=Xy(Ht(e));return Ke(Ht(e,t?1:0),Sc)}function z(e,t=!0){let r=Uy(Ht(e));return t||Gy(r)?r:void 0}var PA=g({"src/lib/utils/task-options.ts"(){"use strict";Jy(),_o(),hn()}});function ac(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 MA=g({"src/lib/utils/task-parser.ts"(){"use strict";_o()}}),tb={};Z(tb,{ExitCodes:()=>ic,GitOutputStreams:()=>mn,LineParser:()=>I,NOOP:()=>Zt,NULL:()=>kr,RemoteLineParser:()=>bt,append:()=>F,appendTaskOptions:()=>_c,asArray:()=>Xe,asCamelCase:()=>Hy,asFunction:()=>Uy,asNumber:()=>U,asStringArray:()=>Zy,bufferToString:()=>pn,callTaskParser:()=>ac,createInstanceConfig:()=>Qy,delay:()=>sc,filterArray:()=>wn,filterFunction:()=>Xy,filterHasLength:()=>vc,filterPlainObject:()=>Sc,filterPrimitives:()=>xc,filterString:()=>ne,filterStringArray:()=>Ky,filterStringOrStringArray:()=>go,filterType:()=>Ke,first:()=>Vy,folderExists:()=>wc,forEachLineWithContent:()=>bc,getTrailingOptions:()=>de,including:()=>Wy,isUserFunction:()=>Gy,last:()=>Ht,objectToString:()=>bn,orVoid:()=>oc,parseStringResponse:()=>me,pick:()=>Yy,prefixedArray:()=>dn,remove:()=>vo,splitOn:()=>qy,toLinesWithContent:()=>yn,trailingFunctionArgument:()=>z,trailingOptionsArgument:()=>Ec});var C=g({"src/lib/utils/index.ts"(){"use strict";Jy(),IA(),$A(),DA(),LA(),PA(),MA(),_o()}}),rb={};Z(rb,{CheckRepoActions:()=>cc,checkIsBareRepoTask:()=>sb,checkIsRepoRootTask:()=>nb,checkIsRepoTask:()=>FA});function FA(e){switch(e){case"bare":return sb();case"root":return nb()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:Eo,parser:Tc}}function nb(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:Eo,parser(t){return/^\.(git)?$/.test(t.trim())}}}function sb(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:Eo,parser:Tc}}function jA(e){return/(Not a git repository|Kein Git-Repository)/i.test(String(e))}var cc,Eo,Tc,ob=g({"src/lib/tasks/check-is-repo.ts"(){"use strict";C(),cc=(e=>(e.BARE="bare",e.IN_TREE="tree",e.IS_REPO_ROOT="root",e))(cc||{}),Eo=({exitCode:e},t,r,n)=>{if(e===128&&jA(t))return r(Buffer.from("false"));n(t)},Tc=e=>e.trim()==="true"}});function BA(e,t){let r=new ib(e),n=e?cb:ab;return yn(t).forEach(s=>{let o=s.replace(n,"");r.paths.push(o),(ub.test(o)?r.folders:r.files).push(o)}),r}var ib,ab,cb,ub,UA=g({"src/lib/responses/CleanSummary.ts"(){"use strict";C(),ib=class{constructor(e){this.dryRun=e,this.paths=[],this.files=[],this.folders=[]}},ab=/^[a-z]+\s*/i,cb=/^[a-z]+\s+[a-z]+\s*/i,ub=/\/$/}}),uc={};Z(uc,{EMPTY_COMMANDS:()=>To,adhocExecTask:()=>lb,configurationErrorTask:()=>pe,isBufferTask:()=>db,isEmptyTask:()=>pb,straightThroughBufferTask:()=>fb,straightThroughStringTask:()=>ae});function lb(e){return{commands:To,format:"empty",parser:e}}function pe(e){return{commands:To,format:"empty",parser(){throw typeof e=="string"?new jy(e):e}}}function ae(e,t=!1){return{commands:e,format:"utf-8",parser(r){return t?String(r).trim():r}}}function fb(e){return{commands:e,format:"buffer",parser(t){return t}}}function db(e){return e.format==="buffer"}function pb(e){return e.format==="empty"||!e.commands.length}var To,H=g({"src/lib/tasks/task.ts"(){"use strict";By(),To=[]}}),mb={};Z(mb,{CONFIG_ERROR_INTERACTIVE_MODE:()=>Oc,CONFIG_ERROR_MODE_REQUIRED:()=>Rc,CONFIG_ERROR_UNKNOWN_OPTION:()=>kc,CleanOptions:()=>lo,cleanTask:()=>hb,cleanWithOptionsTask:()=>GA,isCleanOptionsArray:()=>qA});function GA(e,t){let{cleanMode:r,options:n,valid:s}=VA(e);return r?s.options?(n.push(...t),n.some(HA)?pe(Oc):hb(r,n)):pe(kc+JSON.stringify(e)):pe(Rc)}function hb(e,t){return{commands:["clean",`-${e}`,...t],format:"utf-8",parser(n){return BA(e==="n",n)}}}function qA(e){return Array.isArray(e)&&e.every(t=>Cc.has(t))}function VA(e){let t,r=[],n={cleanMode:!1,options:!0};return e.replace(/[^a-z]i/g,"").split("").forEach(s=>{zA(s)?(t=s,n.cleanMode=!0):n.options=n.options&&WA(r[r.length]=`-${s}`)}),{cleanMode:t,options:r,valid:n}}function zA(e){return e==="f"||e==="n"}function WA(e){return/^-[a-z]$/i.test(e)&&Cc.has(e.charAt(1))}function HA(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:e==="--interactive"}var Oc,Rc,kc,lo,Cc,gb=g({"src/lib/tasks/clean.ts"(){"use strict";UA(),C(),H(),Oc="Git clean interactive mode is not supported",Rc='Git clean mode parameter ("n" or "f") is required',kc="Git clean unknown option found in: ",lo=(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))(lo||{}),Cc=new Set(["i",...Zy(Object.values(lo))])}});function ZA(e){let t=new bb;for(let r of yb(e))t.addValue(r.file,String(r.key),r.value);return t}function YA(e,t){let r=null,n=[],s=new Map;for(let o of yb(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 XA(e){return e.replace(/^(file):/,"")}function*yb(e,t=null){let r=e.split("\0");for(let n=0,s=r.length-1;n<s;){let o=XA(r[n++]),i=r[n++],a=t;if(i.includes(`
|
57
|
+
`)){let c=qy(i,`
|
58
|
+
`);a=c[0],i=c[1]}yield{file:o,key:a,value:i}}}var bb,KA=g({"src/lib/responses/ConfigList.ts"(){"use strict";C(),bb=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 Ja(e,t){return typeof e=="string"&&lc.hasOwnProperty(e)?e:t}function JA(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 QA(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 YA(n,e)}}}function eI(e){let t=["config","--list","--show-origin","--null"];return e&&t.push(`--${e}`),{commands:t,format:"utf-8",parser(r){return ZA(r)}}}function tI(){return{addConfig(e,t,...r){return this._runTask(JA(e,t,r[0]===!0,Ja(r[1],"local")),z(arguments))},getConfig(e,t){return this._runTask(QA(e,Ja(t,void 0)),z(arguments))},listConfig(...e){return this._runTask(eI(Ja(e[0],void 0)),z(arguments))}}}var lc,wb=g({"src/lib/tasks/config.ts"(){"use strict";KA(),C(),lc=(e=>(e.system="system",e.global="global",e.local="local",e.worktree="worktree",e))(lc||{})}});function rI(e){return xb.has(e)}var Qa,xb,Sb=g({"src/lib/tasks/diff-name-status.ts"(){"use strict";Qa=(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))(Qa||{}),xb=new Set(Object.values(Qa))}});function nI(...e){return new _b().param(...e)}function sI(e){let t=new Set,r={};return bc(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 oI(){return{grep(e){let t=z(arguments),r=de(arguments);for(let s of vb)if(r.includes(s))return this._runTask(pe(`git.grep: use of "${s}" is not supported.`),t);typeof e=="string"&&(e=nI().param(e));let n=["grep","--null","-n","--full-name",...r,...e];return this._runTask({commands:n,format:"utf-8",parser(s){return sI(s)}},t)}}}var vb,un,cy,_b,Eb=g({"src/lib/tasks/grep.ts"(){"use strict";C(),H(),vb=["-h"],un=Symbol("grepQuery"),_b=class{constructor(){this[cy]=[]}*[(cy=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}}}}),Tb={};Z(Tb,{ResetMode:()=>fo,getResetMode:()=>aI,resetTask:()=>iI});function iI(e,t){let r=["reset"];return Ob(e)&&r.push(`--${e}`),r.push(...t),ae(r)}function aI(e){if(Ob(e))return e;switch(typeof e){case"string":case"undefined":return"soft"}}function Ob(e){return Rb.includes(e)}var fo,Rb,kb=g({"src/lib/tasks/reset.ts"(){"use strict";H(),fo=(e=>(e.MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep",e))(fo||{}),Rb=Array.from(Object.values(fo))}});function cI(){return(0,yo.default)("simple-git")}function uy(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 uI(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 Ac(e,t,r,n=cI()){let s=e&&`[${e}]`||"",o=[],i=typeof t=="string"?n.extend(t):t,a=uI(Ke(t,ne),i,n);return u(r);function c(l,f){return F(o,Ac(e,a.replace(/^[^:]+/,l),f,n))}function u(l){let f=l&&`[${l}]`||"",d=i&&uy(i,f)||Zt,p=uy(n,`${s} ${f}`,d);return Object.assign(i?d:p,{label:e,sibling:c,info:p,step:u})}}var Cb=g({"src/lib/git-logger.ts"(){"use strict";C(),yo.default.formatters.L=e=>String(vc(e)?e.length:"-"),yo.default.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):bn(e)}}),co,fc,lI=g({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";wt(),Cb(),co=class{constructor(e="GitExecutor"){this.logLabel=e,this._queue=new Map}withProgress(e){return this._queue.get(e)}createProgress(e){let t=co.getName(e.commands[0]),r=Ac(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}:${++co.counter}`}},fc=co,fc.counter=0}});function Wt(e,t){return{method:Vy(e.commands)||"",commands:t}}function fI(e,t){return r=>{t("[ERROR] child process exception %o",r),e.push(Buffer.from(String(r.stack),"ascii"))}}function ly(e,t,r,n){return s=>{r("%s received %L bytes",t,s),n("%B",s),e.push(s)}}var dc,dI=g({"src/lib/runners/git-executor-chain.ts"(){"use strict";wt(),H(),C(),lI(),dc=class{constructor(e,t,r){this._executor=e,this._scheduler=t,this._plugins=r,this._chain=Promise.resolve(),this._queue=new fc}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 pb(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),db(e)?ac(e.parser,o):ac(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,Ab.spawn)(t,r,i);f.stdout.on("data",ly(c,"stdOut",s,o.step("stdOut"))),f.stderr.on("data",ly(u,"stdErr",s,o.step("stdErr"))),f.on("error",fI(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}}}}),Ib={};Z(Ib,{GitExecutor:()=>$b});var $b,pI=g({"src/lib/runners/git-executor.ts"(){"use strict";dI(),$b=class{constructor(e,t,r){this.cwd=e,this._scheduler=t,this._plugins=r,this._chain=new dc(this,this._scheduler,this._plugins)}chain(){return new dc(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});function mI(e,t,r=Zt){let n=o=>{r(null,o)},s=o=>{(o==null?void 0:o.task)===e&&r(o instanceof gn?hI(o):o,void 0)};t.then(n,s)}function hI(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 gI=g({"src/lib/task-callback.ts"(){"use strict";Cr(),C()}});function fy(e,t){return lb(r=>{if(!wc(e))throw new Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||r).cwd=e})}var yI=g({"src/lib/tasks/change-working-directory.ts"(){"use strict";C(),H()}});function ec(e){let t=["checkout",...e];return t[1]==="-b"&&t.includes("-B")&&(t[1]=vo(t,"-B")),ae(t)}function bI(){return{checkout(){return this._runTask(ec(de(arguments,1)),z(arguments))},checkoutBranch(e,t){return this._runTask(ec(["-b",e,t,...de(arguments)]),z(arguments))},checkoutLocalBranch(e){return this._runTask(ec(["-b",e,...de(arguments)]),z(arguments))}}}var wI=g({"src/lib/tasks/checkout.ts"(){"use strict";C(),H()}});function xI(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function SI(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(e){return me(xI(),[Db],e)}})}}}var Db,vI=g({"src/lib/tasks/count-objects.ts"(){"use strict";C(),Db=new I(/([a-z-]+): (\d+)$/,(e,[t,r])=>{let n=Hy(t);e.hasOwnProperty(n)&&(e[n]=U(r))})}});function _I(e){return me({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},Lb,e)}var Lb,EI=g({"src/lib/parsers/parse-commit.ts"(){"use strict";C(),Lb=[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 TI(e,t,r){return{commands:["-c","core.abbrev=40","commit",...dn(e,"-m"),...t,...r],format:"utf-8",parser:_I}}function OI(){return{commit(t,...r){let n=z(arguments),s=e(t)||TI(Xe(t),Xe(Ke(r[0],go,[])),[...Ke(r[1],wn,[]),...de(arguments,0,!0)]);return this._runTask(s,n)}};function e(t){return!go(t)&&pe("git.commit: requires the commit message to be supplied as a string/string[]")}}var RI=g({"src/lib/tasks/commit.ts"(){"use strict";EI(),C(),H()}});function kI(){return{firstCommit(){return this._runTask(ae(["rev-list","--max-parents=0","HEAD"],!0),z(arguments))}}}var CI=g({"src/lib/tasks/first-commit.ts"(){"use strict";C(),H()}});function AI(e,t){let r=["hash-object",e];return t&&r.push("-w"),ae(r,!0)}var II=g({"src/lib/tasks/hash-object.ts"(){"use strict";H()}});function $I(e,t,r){let n=String(r).trim(),s;if(s=Nb.exec(n))return new po(e,t,!1,s[1]);if(s=Pb.exec(n))return new po(e,t,!0,s[1]);let o="",i=n.split(" ");for(;i.length;)if(i.shift()==="in"){o=i.join(" ");break}return new po(e,t,/^re/i.test(n),o)}var po,Nb,Pb,DI=g({"src/lib/responses/InitSummary.ts"(){"use strict";po=class{constructor(e,t,r,n){this.bare=e,this.path=t,this.existing=r,this.gitDir=n}},Nb=/^Init.+ repository in (.+)$/,Pb=/^Rein.+ in (.+)$/}});function LI(e){return e.includes(Ic)}function NI(e=!1,t,r){let n=["init",...r];return e&&!LI(n)&&n.splice(1,0,Ic),{commands:n,format:"utf-8",parser(s){return $I(n.includes("--bare"),t,s)}}}var Ic,PI=g({"src/lib/tasks/init.ts"(){"use strict";DI(),Ic="--bare"}});function $c(e){for(let t=0;t<e.length;t++){let r=Dc.exec(e[t]);if(r)return`--${r[1]}`}return""}function MI(e){return Dc.test(e)}var Dc,xn=g({"src/lib/args/log-format.ts"(){"use strict";Dc=/^--(stat|numstat|name-only|name-status)(=|$)/}}),Mb,FI=g({"src/lib/responses/DiffSummary.ts"(){"use strict";Mb=class{constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});function Fb(e=""){let t=jb[e];return r=>me(new Mb,t,r,!1)}var tc,dy,py,my,jb,Bb=g({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";xn(),FI(),Sb(),C(),tc=[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])})],dy=[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})})],py=[new I(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],my=[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:oc(rI(t)&&t),from:oc(!!o&&n!==o&&n),similarity:U(r)})})],jb={"":tc,"--stat":tc,"--numstat":dy,"--name-status":my,"--name-only":py}}});function jI(e,t){return t.reduce((r,n,s)=>(r[n]=e[s]||"",r),Object.create({diff:null}))}function Ub(e=Pc,t=Gb,r=""){let n=Fb(r);return function(s){let o=yn(s.trim(),!1,Lc).map(function(i){let a=i.split(Nc),c=jI(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 Lc,Nc,Pc,Gb,qb=g({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";C(),Bb(),xn(),Lc="\xF2\xF2\xF2\xF2\xF2\xF2 ",Nc=" \xF2\xF2",Pc=" \xF2 ",Gb=["hash","date","message","refs","author_name","author_email"]}}),Vb={};Z(Vb,{diffSummaryTask:()=>BI,validateLogFormatConfig:()=>Oo});function BI(e){let t=$c(e),r=["diff"];return t===""&&(t="--stat",r.push("--stat=4096")),r.push(...e),Oo(r)||{commands:r,format:"utf-8",parser:Fb(t)}}function Oo(e){let t=e.filter(MI);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 Mc=g({"src/lib/tasks/diff.ts"(){"use strict";xn(),Bb(),H()}});function UI(e,t){let r=[],n=[];return Object.keys(e).forEach(s=>{r.push(s),n.push(String(e[s]))}),[r,n.join(t)]}function GI(e){return Object.keys(e).reduce((t,r)=>(r in pc||(t[r]=e[r]),t),{})}function zb(e={},t=[]){let r=Ke(e.splitter,ne,Pc),n=!xc(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]=UI(n,r),i=[],a=[`--pretty=format:${Lc}${o}${Nc}`,...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",AA(e.file)),_c(GI(e),a),{fields:s,splitter:r,commands:[...a,...i]}}function qI(e,t,r){let n=Ub(e,t,$c(r));return{commands:["log",...r],format:"utf-8",parser:n}}function VI(){return{log(...r){let n=z(arguments),s=zb(Ec(arguments),Ke(arguments[0],wn)),o=t(...r)||Oo(s.commands)||e(s);return this._runTask(o,n)}};function e(r){return qI(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 pc,Wb=g({"src/lib/tasks/log.ts"(){"use strict";xn(),hn(),qb(),C(),H(),Mc(),pc=(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))(pc||{})}}),mo,Hb,zI=g({"src/lib/responses/MergeSummary.ts"(){"use strict";mo=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"}}}}),mc,Zb,WI=g({"src/lib/responses/PullSummary.ts"(){"use strict";mc=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},Zb=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function rc(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 hy(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 Yb,HI=g({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";C(),Yb=[new bt(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,r])=>{let n=t.toLowerCase(),s=rc(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=rc(e.remoteMessages);Object.assign(s,{[n]:U(r)})}),new bt(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,r,n])=>{let s=rc(e.remoteMessages);s.total=hy(t),s.reused=hy(r),s.packReused=U(n)})]}});function Xb(e,t){return me({remoteMessages:new Jb},Kb,t)}var Kb,Jb,Qb=g({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";C(),HI(),Kb=[new bt(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...Yb,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}})],Jb=class{constructor(){this.all=[]}}}});function ZI(e,t){let r=me(new Zb,ew,[e,t]);return r.message&&r}var gy,yy,by,wy,ew,xy,Fc,tw=g({"src/lib/parsers/parse-pull.ts"(){"use strict";WI(),C(),Qb(),gy=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,yy=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,by=/^(create|delete) mode \d+ (.+)/,wy=[new I(gy,(e,[t,r,n])=>{e.files.push(t),r&&(e.insertions[t]=r.length),n&&(e.deletions[t]=n.length)}),new I(yy,(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(by,(e,[t,r])=>{F(e.files,r),F(t==="create"?e.created:e.deleted,r)})],ew=[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)=>me(new mc,wy,[e,t]),Fc=(e,t)=>Object.assign(new mc,xy(e,t),Xb(e,t))}}),Sy,rw,vy,YI=g({"src/lib/parsers/parse-merge.ts"(){"use strict";zI(),C(),tw(),Sy=[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 mo(t,r))}),new I(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,r,n])=>{e.conflicts.push(new mo(t,r,{deleteRef:n}))}),new I(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new mo(t,null))}),new I(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],rw=(e,t)=>Object.assign(vy(e,t),Fc(e,t)),vy=e=>me(new Hb,Sy,e)}});function _y(e){return e.length?{commands:["merge",...e],format:"utf-8",parser(t,r){let n=rw(t,r);if(n.failed)throw new gn(n);return n}}:pe("Git.merge requires at least one option")}var XI=g({"src/lib/tasks/merge.ts"(){"use strict";Cr(),YI(),H()}});function KI(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 Ey,nw,Ty,JI=g({"src/lib/parsers/parse-push.ts"(){"use strict";C(),Qb(),Ey=[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(KI(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}}})],nw=(e,t)=>{let r=Ty(e,t),n=Xb(e,t);return Ce(Ce({},r),n)},Ty=(e,t)=>me({pushed:[]},Ey,[e,t])}}),sw={};Z(sw,{pushTagsTask:()=>QI,pushTask:()=>jc});function QI(e={},t){return F(t,"--tags"),jc(e,t)}function jc(e={},t){let r=["push",...t];return e.branch&&r.splice(1,0,e.branch),e.remote&&r.splice(1,0,e.remote),vo(r,"-v"),F(r,"--verbose"),F(r,"--porcelain"),{commands:r,format:"utf-8",parser:nw}}var ow=g({"src/lib/tasks/push.ts"(){"use strict";JI(),C()}});function e1(){return{showBuffer(){let e=["show",...de(arguments,1)];return e.includes("--binary")||e.splice(1,0,"--binary"),this._runTask(fb(e),z(arguments))},show(){let e=["show",...de(arguments,1)];return this._runTask(ae(e),z(arguments))}}}var t1=g({"src/lib/tasks/show.ts"(){"use strict";C(),H()}}),Oy,iw,r1=g({"src/lib/responses/FileStatusSummary.ts"(){"use strict";Oy=/^(.+)\0(.+)$/,iw=class{constructor(e,t,r){if(this.path=e,this.index=t,this.working_dir=r,t==="R"||r==="R"){let n=Oy.exec(e)||[null,e,e];this.from=n[2]||"",this.path=n[1]||""}}}}});function Ry(e){let[t,r]=e.split(kr);return{from:r||t,to:t}}function be(e,t,r){return[`${e}${t}`,r]}function nc(e,...t){return t.map(r=>be(e,r,(n,s)=>F(n.conflicted,s)))}function n1(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=aw.get(a);c&&c(e,i),a!=="##"&&a!=="!!"&&e.files.push(new iw(i,s,o))}}var ky,aw,cw,s1=g({"src/lib/responses/StatusSummary.ts"(){"use strict";C(),r1(),ky=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}},aw=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,Ry(t))}),be("R","M",(e,t)=>{let r=Ry(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)),...nc("A","A","U"),...nc("D","D","U"),...nc("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)}]]),cw=function(e){let t=e.split(kr),r=new ky;for(let n=0,s=t.length;n<s;){let o=t[n++].trim();o&&(o.charAt(0)==="R"&&(o+=kr+(t[n++]||"")),n1(r,o))}return r}}});function o1(e){return{format:"utf-8",commands:["status","--porcelain","-b","-u","--null",...e.filter(r=>!uw.includes(r))],parser(r){return cw(r)}}}var uw,i1=g({"src/lib/tasks/status.ts"(){"use strict";s1(),uw=["--null","-z"]}});function bo(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 a1(){return bo(0,0,0,"",!1)}function c1(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:u1,onError(e,t,r,n){if(e.exitCode===-2)return r(Buffer.from(Bc));n(t)}})}}}function u1(e){return e===Bc?a1():me(bo(0,0,0,e),lw,e)}var Bc,lw,l1=g({"src/lib/tasks/version.ts"(){"use strict";C(),Bc="installed=false",lw=[new I(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,r,n,s=""])=>{Object.assign(e,bo(U(t),U(r),U(n),s))}),new I(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,r,n,s=""])=>{Object.assign(e,bo(U(t),U(r),n,s))})]}}),fw={};Z(fw,{SimpleGitApi:()=>hc});var hc,f1=g({"src/lib/simple-git-api.ts"(){"use strict";gI(),yI(),wI(),vI(),RI(),wb(),CI(),Eb(),II(),PI(),Wb(),XI(),ow(),t1(),i1(),H(),l1(),C(),hc=class{constructor(e){this._executor=e}_runTask(e,t){let r=this._executor.chain(),n=r.push(e);return t&&mI(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(fy(e,this._executor),t):typeof(e==null?void 0:e.path)=="string"?this._runTask(fy(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(AI(e,t===!0),z(arguments))}init(e){return this._runTask(NI(e===!0,this._executor.cwd,de(arguments)),z(arguments))}merge(){return this._runTask(_y(de(arguments)),z(arguments))}mergeFromTo(e,t){return ne(e)&&ne(t)?this._runTask(_y([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=jc({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(o1(de(arguments)),z(arguments))}},Object.assign(hc.prototype,bI(),OI(),tI(),SI(),kI(),oI(),VI(),e1(),c1())}}),dw={};Z(dw,{Scheduler:()=>mw});var Cy,mw,d1=g({"src/lib/runners/scheduler.ts"(){"use strict";C(),Cb(),Cy=(()=>{let e=0;return()=>{e++;let{promise:t,done:r}=(0,pw.createDeferred)();return{promise:t,done:r,id:e}}})(),mw=class{constructor(e=2){this.concurrency=e,this.logger=Ac("","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),vo(this.running,e),this.schedule()})}next(){let{promise:e,id:t}=F(this.pending,Cy());return this.logger("Scheduling id=%s",t),this.schedule(),e}}}}),hw={};Z(hw,{applyPatchTask:()=>p1});function p1(e,t){return ae(["apply",...t,...e])}var m1=g({"src/lib/tasks/apply-patch.ts"(){"use strict";H()}});function h1(e,t){return{branch:e,hash:t,success:!0}}function g1(e){return{branch:e,hash:null,success:!1}}var gw,y1=g({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";gw=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function yw(e,t){return t===1&&gc.test(e)}var Ay,gc,Iy,Ro,b1=g({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";y1(),C(),Ay=/(\S+)\s+\(\S+\s([^)]+)\)/,gc=/^error[^']+'([^']+)'/m,Iy=[new I(Ay,(e,[t,r])=>{let n=h1(t,r);e.all.push(n),e.branches[t]=n}),new I(gc,(e,[t])=>{let r=g1(t);e.errors.push(r),e.all.push(r),e.branches[t]=r})],Ro=(e,t)=>me(new gw,Iy,[e,t])}}),bw,w1=g({"src/lib/responses/BranchSummary.ts"(){"use strict";bw=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 $y(e){return e?e.charAt(0):""}function ww(e){return me(new bw,xw,e)}var xw,x1=g({"src/lib/parsers/parse-branch.ts"(){"use strict";w1(),C(),xw=[new I(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,r,n,s])=>{e.push($y(t),!0,r,n,s)}),new I(new RegExp("^([*+]\\s)?(\\S+)\\s+([a-z0-9]+)\\s?(.*)$","s"),(e,[t,r,n,s])=>{e.push($y(t),!1,r,n,s)})]}}),Sw={};Z(Sw,{branchLocalTask:()=>v1,branchTask:()=>S1,containsDeleteBranchCommand:()=>vw,deleteBranchTask:()=>E1,deleteBranchesTask:()=>_1});function vw(e){let t=["-d","-D","--delete"];return e.some(r=>t.includes(r))}function S1(e){let t=vw(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?Ro(n,s).all[0]:ww(n)}}}function v1(){return{format:"utf-8",commands:["branch","-v"],parser:ww}}function _1(e,t=!1){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser(r,n){return Ro(r,n)},onError({exitCode:r,stdOut:n},s,o,i){if(!yw(String(s),r))return i(s);o(n)}}}function E1(e,t=!1){let r={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser(n,s){return Ro(n,s).branches[e]},onError({exitCode:n,stdErr:s,stdOut:o},i,a,c){if(!yw(String(i),n))return c(i);throw new gn(r.parser(pn(o),pn(s)),String(i))}};return r}var T1=g({"src/lib/tasks/branch.ts"(){"use strict";Cr(),b1(),x1(),C()}}),_w,O1=g({"src/lib/responses/CheckIgnore.ts"(){"use strict";_w=e=>e.split(/\n/g).map(t=>t.trim()).filter(t=>!!t)}}),Ew={};Z(Ew,{checkIgnoreTask:()=>R1});function R1(e){return{commands:["check-ignore",...e],format:"utf-8",parser:_w}}var k1=g({"src/lib/tasks/check-ignore.ts"(){"use strict";O1()}}),Tw={};Z(Tw,{cloneMirrorTask:()=>A1,cloneTask:()=>Ow});function C1(e){return/^--upload-pack(=|$)/.test(e)}function Ow(e,t,r){let n=["clone",...r];return ne(e)&&n.push(e),ne(t)&&n.push(t),n.find(C1)?pe("git.fetch: potential exploit argument blocked."):ae(n)}function A1(e,t,r){return F(r,"--mirror"),Ow(e,t,r)}var I1=g({"src/lib/tasks/clone.ts"(){"use strict";H(),C()}});function $1(e,t){return me({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},Rw,[e,t])}var Rw,D1=g({"src/lib/parsers/parse-fetch.ts"(){"use strict";C(),Rw=[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})})]}}),kw={};Z(kw,{fetchTask:()=>N1});function L1(e){return/^--upload-pack(=|$)/.test(e)}function N1(e,t,r){let n=["fetch",...r];return e&&t&&n.push(e,t),n.find(L1)?pe("git.fetch: potential exploit argument blocked."):{commands:n,format:"utf-8",parser:$1}}var P1=g({"src/lib/tasks/fetch.ts"(){"use strict";D1(),H()}});function M1(e){return me({moves:[]},Cw,e)}var Cw,F1=g({"src/lib/parsers/parse-move.ts"(){"use strict";C(),Cw=[new I(/^Renaming (.+) to (.+)$/,(e,[t,r])=>{e.moves.push({from:t,to:r})})]}}),Aw={};Z(Aw,{moveTask:()=>j1});function j1(e,t){return{commands:["mv","-v",...Xe(e),t],format:"utf-8",parser:M1}}var B1=g({"src/lib/tasks/move.ts"(){"use strict";F1(),C()}}),Iw={};Z(Iw,{pullTask:()=>U1});function U1(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 Fc(s,o)},onError(s,o,i,a){let c=ZI(pn(s.stdOut),pn(s.stdErr));if(c)return a(new gn(c));a(o)}}}var G1=g({"src/lib/tasks/pull.ts"(){"use strict";Cr(),tw(),C()}});function q1(e){let t={};return $w(e,([r])=>t[r]={name:r}),Object.values(t)}function V1(e){let t={};return $w(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 $w(e,t){bc(e,r=>t(r.split(/\s+/)))}var z1=g({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";C()}}),Dw={};Z(Dw,{addRemoteTask:()=>W1,getRemotesTask:()=>H1,listRemotesTask:()=>Z1,remoteTask:()=>Y1,removeRemoteTask:()=>X1});function W1(e,t,r){return ae(["remote","add",...r,e,t])}function H1(e){let t=["remote"];return e&&t.push("-v"),{commands:t,format:"utf-8",parser:e?V1:q1}}function Z1(e){let t=[...e];return t[0]!=="ls-remote"&&t.unshift("ls-remote"),ae(t)}function Y1(e){let t=[...e];return t[0]!=="remote"&&t.unshift("remote"),ae(t)}function X1(e){return ae(["remote","remove",e])}var K1=g({"src/lib/tasks/remote.ts"(){"use strict";z1(),H()}}),Lw={};Z(Lw,{stashListTask:()=>J1});function J1(e={},t){let r=zb(e),n=["stash","list",...r.commands,...t],s=Ub(r.splitter,r.fields,$c(n));return Oo(n)||{commands:n,format:"utf-8",parser:s}}var Q1=g({"src/lib/tasks/stash-list.ts"(){"use strict";xn(),qb(),Mc(),Wb()}}),Nw={};Z(Nw,{addSubModuleTask:()=>e$,initSubModuleTask:()=>t$,subModuleTask:()=>ko,updateSubModuleTask:()=>r$});function e$(e,t){return ko(["add",e,t])}function t$(e){return ko(["init",...e])}function ko(e){let t=[...e];return t[0]!=="submodule"&&t.unshift("submodule"),ae(t)}function r$(e){return ko(["update",...e])}var n$=g({"src/lib/tasks/sub-module.ts"(){"use strict";H()}});function s$(e,t){let r=isNaN(e),n=isNaN(t);return r!==n?r?1:-1:r?Pw(e,t):0}function Pw(e,t){return e===t?0:e>t?1:-1}function o$(e){return e.trim()}function uo(e){return typeof e=="string"&&parseInt(e.replace(/^\D+/g,""),10)||0}var Dy,Mw,i$=g({"src/lib/responses/TagList.ts"(){"use strict";Dy=class{constructor(e,t){this.all=e,this.latest=t}},Mw=function(e,t=!1){let r=e.split(`
|
59
|
+
`).map(o$).filter(Boolean);t||r.sort(function(s,o){let i=s.split("."),a=o.split(".");if(i.length===1||a.length===1)return s$(uo(i[0]),uo(a[0]));for(let c=0,u=Math.max(i.length,a.length);c<u;c++){let l=Pw(uo(i[c]),uo(a[c]));if(l)return l}return 0});let n=t?r[0]:[...r].reverse().find(s=>s.indexOf(".")>=0);return new Dy(r,n)}}}),Fw={};Z(Fw,{addAnnotatedTagTask:()=>u$,addTagTask:()=>c$,tagListTask:()=>a$});function a$(e=[]){let t=e.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...e],parser(r){return Mw(r,t)}}}function c$(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}function u$(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser(){return{name:e}}}}var l$=g({"src/lib/tasks/tag.ts"(){"use strict";i$()}}),f$=kA({"src/git.js"(e,t){"use strict";var{GitExecutor:r}=(pI(),V(Ib)),{SimpleGitApi:n}=(f1(),V(fw)),{Scheduler:s}=(d1(),V(dw)),{configurationErrorTask:o}=(H(),V(uc)),{asArray:i,filterArray:a,filterPrimitives:c,filterString:u,filterStringOrStringArray:l,filterType:f,getTrailingOptions:d,trailingFunctionArgument:p,trailingOptionsArgument:b}=(C(),V(tb)),{applyPatchTask:T}=(m1(),V(hw)),{branchTask:P,branchLocalTask:M,deleteBranchesTask:j,deleteBranchTask:Y}=(T1(),V(Sw)),{checkIgnoreTask:X}=(k1(),V(Ew)),{checkIsRepoTask:we}=(ob(),V(rb)),{cloneTask:ce,cloneMirrorTask:Ae}=(I1(),V(Tw)),{cleanWithOptionsTask:Ie,isCleanOptionsArray:xe}=(gb(),V(mb)),{diffSummaryTask:Ar}=(Mc(),V(Vb)),{fetchTask:xt}=(P1(),V(kw)),{moveTask:Jw}=(B1(),V(Aw)),{pullTask:Qw}=(G1(),V(Iw)),{pushTagsTask:ex}=(ow(),V(sw)),{addRemoteTask:tx,getRemotesTask:rx,listRemotesTask:nx,remoteTask:sx,removeRemoteTask:ox}=(K1(),V(Dw)),{getResetMode:ix,resetTask:ax}=(kb(),V(Tb)),{stashListTask:cx}=(Q1(),V(Lw)),{addSubModuleTask:ux,initSubModuleTask:lx,subModuleTask:fx,updateSubModuleTask:dx}=(n$(),V(Nw)),{addAnnotatedTagTask:px,addTagTask:mx,tagListTask:hx}=(l$(),V(Fw)),{straightThroughBufferTask:gx,straightThroughStringTask:je}=(H(),V(uc));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(cx(b(arguments)||{},a(h)&&h||[]),p(arguments))};function Vc(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(Vc("clone",ce,...arguments),p(arguments))},O.prototype.mirror=function(){return this._runTask(Vc("mirror",Ae,...arguments),p(arguments))},O.prototype.mv=function(h,E){return this._runTask(Jw(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(Qw(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(hx(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(ax(ix(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"?mx(h):o("Git.addTag requires a tag name");return this._runTask(E,p(arguments))},O.prototype.addAnnotatedTag=function(h,E){return this._runTask(px(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(ux(h,E),p(arguments))},O.prototype.submoduleUpdate=function(h,E){return this._runTask(dx(d(arguments,!0)),p(arguments))},O.prototype.submoduleInit=function(h,E){return this._runTask(lx(d(arguments,!0)),p(arguments))},O.prototype.subModule=function(h,E){return this._runTask(fx(d(arguments)),p(arguments))},O.prototype.listRemote=function(){return this._runTask(nx(d(arguments)),p(arguments))},O.prototype.addRemote=function(h,E,B){return this._runTask(tx(h,E,d(arguments)),p(arguments))},O.prototype.removeRemote=function(h,E){return this._runTask(ox(h),p(arguments))},O.prototype.getRemotes=function(h,E){return this._runTask(rx(h===!0),p(arguments))},O.prototype.remote=function(h,E){return this._runTask(sx(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=ex({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 Lo=h==="buffer"?gx(se):je(se);return this._runTask(Lo,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)||"",Lo=d([].slice.call(arguments,se?1:0));return this._runTask(Ie($e,Lo),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 d$=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();By();ob();gb();wb();Sb();Eb();kb();function p$(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 m$(e){return typeof e=="string"&&e.trim().toLowerCase()==="-c"}function h$(e,t){if(m$(e)&&/^\s*protocol(.[a-z]+)?.allow/.test(t))throw new it(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}function g$(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 y$({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||h$(s,i),t||g$(s,n.method)}),r}}}C();function b$(e){let t=dn(e,"-c");return{type:"spawn.args",action(r){return[...t,...r]}}}C();var Ly=(0,Rr.deferred)().promise;function w$({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?Ly:o.closeTimeout.promise,t===!1?Ly: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(()=>sc(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 sc(50)),c(f.exitCode)}catch(b){c(f.exitCode,b)}})}}}C();var x$="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",Ny="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function S$(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(e)}function Py(e,t){if(e.length<1||e.length>2)throw new it(void 0,"binary",x$);if(e.some(S$))if(t)console.warn(Ny);else throw new it(void 0,"binary",Ny);let[n,s]=e;return{binary:n,prefix:s}}function v$(e,t=["git"],r=!1){let n=Py(Xe(t),r);e.on("binary",s=>{n=Py(Xe(s),r)}),e.append("spawn.binary",()=>n.binary),e.append("spawn.args",s=>n.prefix?[n.prefix,...s]:s)}wt();function _$(e){return!!(e.exitCode&&e.stdErr.length)}function E$(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function T$(e=!1,t=_$,r=E$){return(n,s)=>!e&&n||!t(s)?n:r(s)}function My(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 O$=class{constructor(){this.plugins=new Set,this.events=new jw.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 R$(e){let t="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(o,i){return r.includes(i.method)?Wy(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:k$(u[1]),progress:U(u[2]),processed:U(u[3]),total:U(u[4])})}))}}]}function k$(e){return String(e.toLowerCase().split(" ",1))||"unknown"}C();function C$(e){let t=Yy(e,["uid","gid"]);return{type:"spawn.options",action(r){return Ce(Ce({},t),r)}}}function A$({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 I$(){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(ho(o)){n(ay(o));continue}if(o==="--"){n(e.slice(s+1).flatMap(i=>ho(i)&&ay(i)||i));break}t.push(o)}return r?[...t,"--",...r.map(String)]:t}}}C();var $$=f$();function D$(e,t){var r;let n=new O$,s=Qy(e&&(typeof e=="string"?{baseDir:e}:e)||{},t);if(!wc(s.baseDir))throw new d$(s,"Cannot use simple-git on a directory that does not exist");return Array.isArray(s.config)&&n.add(b$(s.config)),n.add(y$(s.unsafe)),n.add(I$()),n.add(w$(s.completion)),s.abort&&n.add(p$(s.abort)),s.progress&&n.add(R$(s.progress)),s.timeout&&n.add(A$(s.timeout)),s.spawnOptions&&n.add(C$(s.spawnOptions)),n.add(My(T$(!0))),s.errors&&n.add(My(s.errors)),v$(n,s.binary,(r=s.unsafe)==null?void 0:r.allowUnsafeCustomBinary),new $$(s,n)}Cr();var Bw=D$;async function Uw(){let e=Bw();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 zw=q(Vw()),Gc=zw.default.bold("@seed-design/codemod"),Ww=e=>({event:t,properties:r})=>console.log(Gc,t,r,e);var Xw=(0,$o.resolve)(__dirname,"transforms"),Zw=Xc(),Io=Hw(),Sn=null,Kw=null;function F$(){Uw().then(e=>{Kw=e,Sn=Ww({...e}),j$(Sn)})}function j$(e){B$(),Zw.version(Io.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=zg.parse(n);s.track&&(e==null||e({event:"\uC2E4\uD589",properties:{transformName:t,paths:r}}));let o=q$();s.list&&(qc(o),process.exit(0)),t||(console.error("transform \uC774\uB984\uC744 \uC785\uB825\uD574\uC8FC\uC138\uC694"),qc(o),process.exit(1)),o.includes(t)||(console.error(`\uC774\uB984\uC774 ${t}\uC778 transform\uC774 \uC5C6\uC5B4\uC694`),qc(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,$o.resolve)(Xw,t,"index.js");console.log(Gc,`${r.join(", ")}\uC5D0 ${t} transform\uC744 \uC2E4\uD589\uD574\uC694.`),await G$(i,t,r,s)}),Zw.parse()}function B$(){(0,Do.satisfies)(process.versions.node,Io.engines.node)===!1&&(console.error(`Node.js \uBC84\uC804 \uC694\uAD6C\uC0AC\uD56D\uC744 \uB9CC\uC871\uC2DC\uD0A4\uC9C0 \uC54A\uC544\uC694: "${Io.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,
|
63
|
+
$ nvm install ${(0,Do.minVersion)(Io.engines.node)}`),process.exit(1))}var U$=["replace-css-seed-design-color-variable","replace-css-seed-design-typography-variable"];async function G$(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,$o.resolve)(process.cwd(),d));if(U$.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(Kw)};await Um("node",f,{stdio:"inherit",env:d});return}catch(d){throw d.exitCode?new Error(`Transform failed with code ${d.exitCode}`):d}}function q$(){return(0,Yw.readdirSync)(Xw)}function qc(e){console.log(`
|
64
64
|
\uC0AC\uC6A9 \uAC00\uB2A5\uD55C transform \uBAA9\uB85D:
|
65
65
|
`,e.join(`
|
66
|
-
`))}
|
66
|
+
`))}F$();
|