cmake-ts
Version:
cmake-js rewrite in typescript to support advanced build configurations
7 lines (5 loc) • 294 kB
JavaScript
"use strict";var Bf=Object.create;var eo=Object.defineProperty;var jf=Object.getOwnPropertyDescriptor;var Hf=Object.getOwnPropertyNames;var Uf=Object.getPrototypeOf,Gf=Object.prototype.hasOwnProperty;var Wf=(e,t,s,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Hf(t))!Gf.call(e,a)&&a!==s&&eo(e,a,{get:()=>t[a],enumerable:!(c=jf(t,a))||c.enumerable});return e};var Vf=(e,t,s)=>(s=e!=null?Bf(Uf(e)):{},Wf(t||!e||!e.__esModule?eo(s,"default",{value:e,enumerable:!0}):s,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Q=require("path"),de=require("fs"),zf=require("constants"),xe=require("stream"),Wt=require("util"),ct=require("assert"),We=require("os"),$s=require("child_process"),Ve=require("events"),Yf=require("url"),Kf=require("http"),Xf=require("https"),ef=require("string_decoder"),Zf=require("buffer"),tf=require("zlib"),Jf=require("process"),rf=require("crypto"),Qf=require("module");var Ge=typeof document<"u"?document.currentScript:null;function eh(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const c=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,c.get?c:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const nf=eh($s);var Ne=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Te(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function th(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var s=function c(){return this instanceof c?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(c){var a=Object.getOwnPropertyDescriptor(e,c);Object.defineProperty(s,c,a.get?a:{enumerable:!0,get:function(){return e[c]}})}),s}var Qt={},lt={},to;function Ee(){return to||(to=1,lt.fromCallback=function(e){return Object.defineProperty(function(...t){if(typeof t[t.length-1]=="function")e.apply(this,t);else return new Promise((s,c)=>{t.push((a,i)=>a!=null?c(a):s(i)),e.apply(this,t)})},"name",{value:e.name})},lt.fromPromise=function(e){return Object.defineProperty(function(...t){const s=t[t.length-1];if(typeof s!="function")return e.apply(this,t);t.pop(),e.apply(this,t).then(c=>s(null,c),s)},"name",{value:e.name})}),lt}var er,ro;function rh(){if(ro)return er;ro=1;var e=zf,t=process.cwd,s=null,c=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return s||(s=t.call(process)),s};try{process.cwd()}catch{}if(typeof process.chdir=="function"){var a=process.chdir;process.chdir=function(r){s=null,a.call(process,r)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,a)}er=i;function i(r){e.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&n(r),r.lutimes||o(r),r.chown=m(r.chown),r.fchown=m(r.fchown),r.lchown=m(r.lchown),r.chmod=u(r.chmod),r.fchmod=u(r.fchmod),r.lchmod=u(r.lchmod),r.chownSync=h(r.chownSync),r.fchownSync=h(r.fchownSync),r.lchownSync=h(r.lchownSync),r.chmodSync=l(r.chmodSync),r.fchmodSync=l(r.fchmodSync),r.lchmodSync=l(r.lchmodSync),r.stat=E(r.stat),r.fstat=E(r.fstat),r.lstat=E(r.lstat),r.statSync=R(r.statSync),r.fstatSync=R(r.fstatSync),r.lstatSync=R(r.lstatSync),r.chmod&&!r.lchmod&&(r.lchmod=function(d,p,v){v&&process.nextTick(v)},r.lchmodSync=function(){}),r.chown&&!r.lchown&&(r.lchown=function(d,p,v,f){f&&process.nextTick(f)},r.lchownSync=function(){}),c==="win32"&&(r.rename=typeof r.rename!="function"?r.rename:function(d){function p(v,f,S){var _=Date.now(),w=0;d(v,f,function y(O){if(O&&(O.code==="EACCES"||O.code==="EPERM"||O.code==="EBUSY")&&Date.now()-_<6e4){setTimeout(function(){r.stat(f,function(A,D){A&&A.code==="ENOENT"?d(v,f,y):S(O)})},w),w<100&&(w+=10);return}S&&S(O)})}return Object.setPrototypeOf&&Object.setPrototypeOf(p,d),p}(r.rename)),r.read=typeof r.read!="function"?r.read:function(d){function p(v,f,S,_,w,y){var O;if(y&&typeof y=="function"){var A=0;O=function(D,x,q){if(D&&D.code==="EAGAIN"&&A<10)return A++,d.call(r,v,f,S,_,w,O);y.apply(this,arguments)}}return d.call(r,v,f,S,_,w,O)}return Object.setPrototypeOf&&Object.setPrototypeOf(p,d),p}(r.read),r.readSync=typeof r.readSync!="function"?r.readSync:function(d){return function(p,v,f,S,_){for(var w=0;;)try{return d.call(r,p,v,f,S,_)}catch(y){if(y.code==="EAGAIN"&&w<10){w++;continue}throw y}}}(r.readSync);function n(d){d.lchmod=function(p,v,f){d.open(p,e.O_WRONLY|e.O_SYMLINK,v,function(S,_){if(S){f&&f(S);return}d.fchmod(_,v,function(w){d.close(_,function(y){f&&f(w||y)})})})},d.lchmodSync=function(p,v){var f=d.openSync(p,e.O_WRONLY|e.O_SYMLINK,v),S=!0,_;try{_=d.fchmodSync(f,v),S=!1}finally{if(S)try{d.closeSync(f)}catch{}else d.closeSync(f)}return _}}function o(d){e.hasOwnProperty("O_SYMLINK")&&d.futimes?(d.lutimes=function(p,v,f,S){d.open(p,e.O_SYMLINK,function(_,w){if(_){S&&S(_);return}d.futimes(w,v,f,function(y){d.close(w,function(O){S&&S(y||O)})})})},d.lutimesSync=function(p,v,f){var S=d.openSync(p,e.O_SYMLINK),_,w=!0;try{_=d.futimesSync(S,v,f),w=!1}finally{if(w)try{d.closeSync(S)}catch{}else d.closeSync(S)}return _}):d.futimes&&(d.lutimes=function(p,v,f,S){S&&process.nextTick(S)},d.lutimesSync=function(){})}function u(d){return d&&function(p,v,f){return d.call(r,p,v,function(S){g(S)&&(S=null),f&&f.apply(this,arguments)})}}function l(d){return d&&function(p,v){try{return d.call(r,p,v)}catch(f){if(!g(f))throw f}}}function m(d){return d&&function(p,v,f,S){return d.call(r,p,v,f,function(_){g(_)&&(_=null),S&&S.apply(this,arguments)})}}function h(d){return d&&function(p,v,f){try{return d.call(r,p,v,f)}catch(S){if(!g(S))throw S}}}function E(d){return d&&function(p,v,f){typeof v=="function"&&(f=v,v=null);function S(_,w){w&&(w.uid<0&&(w.uid+=4294967296),w.gid<0&&(w.gid+=4294967296)),f&&f.apply(this,arguments)}return v?d.call(r,p,v,S):d.call(r,p,S)}}function R(d){return d&&function(p,v){var f=v?d.call(r,p,v):d.call(r,p);return f&&(f.uid<0&&(f.uid+=4294967296),f.gid<0&&(f.gid+=4294967296)),f}}function g(d){if(!d||d.code==="ENOSYS")return!0;var p=!process.getuid||process.getuid()!==0;return!!(p&&(d.code==="EINVAL"||d.code==="EPERM"))}}return er}var tr,no;function nh(){if(no)return tr;no=1;var e=xe.Stream;tr=t;function t(s){return{ReadStream:c,WriteStream:a};function c(i,r){if(!(this instanceof c))return new c(i,r);e.call(this);var n=this;this.path=i,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,r=r||{};for(var o=Object.keys(r),u=0,l=o.length;u<l;u++){var m=o[u];this[m]=r[m]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){n._read()});return}s.open(this.path,this.flags,this.mode,function(h,E){if(h){n.emit("error",h),n.readable=!1;return}n.fd=E,n.emit("open",E),n._read()})}function a(i,r){if(!(this instanceof a))return new a(i,r);e.call(this),this.path=i,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,r=r||{};for(var n=Object.keys(r),o=0,u=n.length;o<u;o++){var l=n[o];this[l]=r[l]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=s.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}return tr}var rr,io;function ih(){if(io)return rr;io=1,rr=t;var e=Object.getPrototypeOf||function(s){return s.__proto__};function t(s){if(s===null||typeof s!="object")return s;if(s instanceof Object)var c={__proto__:e(s)};else var c=Object.create(null);return Object.getOwnPropertyNames(s).forEach(function(a){Object.defineProperty(c,a,Object.getOwnPropertyDescriptor(s,a))}),c}return rr}var ft,so;function ge(){if(so)return ft;so=1;var e=de,t=rh(),s=nh(),c=ih(),a=Wt,i,r;typeof Symbol=="function"&&typeof Symbol.for=="function"?(i=Symbol.for("graceful-fs.queue"),r=Symbol.for("graceful-fs.previous")):(i="___graceful-fs.queue",r="___graceful-fs.previous");function n(){}function o(d,p){Object.defineProperty(d,i,{get:function(){return p}})}var u=n;if(a.debuglog?u=a.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(u=function(){var d=a.format.apply(a,arguments);d="GFS4: "+d.split(/\n/).join(`
GFS4: `),console.error(d)}),!e[i]){var l=Ne[i]||[];o(e,l),e.close=function(d){function p(v,f){return d.call(e,v,function(S){S||R(),typeof f=="function"&&f.apply(this,arguments)})}return Object.defineProperty(p,r,{value:d}),p}(e.close),e.closeSync=function(d){function p(v){d.apply(e,arguments),R()}return Object.defineProperty(p,r,{value:d}),p}(e.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){u(e[i]),ct.equal(e[i].length,0)})}Ne[i]||o(Ne,e[i]),ft=m(c(e)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!e.__patched&&(ft=m(e),e.__patched=!0);function m(d){t(d),d.gracefulify=m,d.createReadStream=b,d.createWriteStream=N;var p=d.readFile;d.readFile=v;function v(M,$,H){return typeof $=="function"&&(H=$,$=null),G(M,$,H);function G(F,B,Y,J){return p(F,B,function(re){re&&(re.code==="EMFILE"||re.code==="ENFILE")?h([G,[F,B,Y],re,J||Date.now(),Date.now()]):typeof Y=="function"&&Y.apply(this,arguments)})}}var f=d.writeFile;d.writeFile=S;function S(M,$,H,G){return typeof H=="function"&&(G=H,H=null),F(M,$,H,G);function F(B,Y,J,re,oe){return f(B,Y,J,function(Z){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?h([F,[B,Y,J,re],Z,oe||Date.now(),Date.now()]):typeof re=="function"&&re.apply(this,arguments)})}}var _=d.appendFile;_&&(d.appendFile=w);function w(M,$,H,G){return typeof H=="function"&&(G=H,H=null),F(M,$,H,G);function F(B,Y,J,re,oe){return _(B,Y,J,function(Z){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?h([F,[B,Y,J,re],Z,oe||Date.now(),Date.now()]):typeof re=="function"&&re.apply(this,arguments)})}}var y=d.copyFile;y&&(d.copyFile=O);function O(M,$,H,G){return typeof H=="function"&&(G=H,H=0),F(M,$,H,G);function F(B,Y,J,re,oe){return y(B,Y,J,function(Z){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?h([F,[B,Y,J,re],Z,oe||Date.now(),Date.now()]):typeof re=="function"&&re.apply(this,arguments)})}}var A=d.readdir;d.readdir=x;var D=/^v[0-5]\./;function x(M,$,H){typeof $=="function"&&(H=$,$=null);var G=D.test(process.version)?function(Y,J,re,oe){return A(Y,F(Y,J,re,oe))}:function(Y,J,re,oe){return A(Y,J,F(Y,J,re,oe))};return G(M,$,H);function F(B,Y,J,re){return function(oe,Z){oe&&(oe.code==="EMFILE"||oe.code==="ENFILE")?h([G,[B,Y,J],oe,re||Date.now(),Date.now()]):(Z&&Z.sort&&Z.sort(),typeof J=="function"&&J.call(this,oe,Z))}}}if(process.version.substr(0,4)==="v0.8"){var q=s(d);k=q.ReadStream,V=q.WriteStream}var C=d.ReadStream;C&&(k.prototype=Object.create(C.prototype),k.prototype.open=U);var L=d.WriteStream;L&&(V.prototype=Object.create(L.prototype),V.prototype.open=j),Object.defineProperty(d,"ReadStream",{get:function(){return k},set:function(M){k=M},enumerable:!0,configurable:!0}),Object.defineProperty(d,"WriteStream",{get:function(){return V},set:function(M){V=M},enumerable:!0,configurable:!0});var T=k;Object.defineProperty(d,"FileReadStream",{get:function(){return T},set:function(M){T=M},enumerable:!0,configurable:!0});var I=V;Object.defineProperty(d,"FileWriteStream",{get:function(){return I},set:function(M){I=M},enumerable:!0,configurable:!0});function k(M,$){return this instanceof k?(C.apply(this,arguments),this):k.apply(Object.create(k.prototype),arguments)}function U(){var M=this;ee(M.path,M.flags,M.mode,function($,H){$?(M.autoClose&&M.destroy(),M.emit("error",$)):(M.fd=H,M.emit("open",H),M.read())})}function V(M,$){return this instanceof V?(L.apply(this,arguments),this):V.apply(Object.create(V.prototype),arguments)}function j(){var M=this;ee(M.path,M.flags,M.mode,function($,H){$?(M.destroy(),M.emit("error",$)):(M.fd=H,M.emit("open",H))})}function b(M,$){return new d.ReadStream(M,$)}function N(M,$){return new d.WriteStream(M,$)}var z=d.open;d.open=ee;function ee(M,$,H,G){return typeof H=="function"&&(G=H,H=null),F(M,$,H,G);function F(B,Y,J,re,oe){return z(B,Y,J,function(Z,P){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?h([F,[B,Y,J,re],Z,oe||Date.now(),Date.now()]):typeof re=="function"&&re.apply(this,arguments)})}}return d}function h(d){u("ENQUEUE",d[0].name,d[1]),e[i].push(d),g()}var E;function R(){for(var d=Date.now(),p=0;p<e[i].length;++p)e[i][p].length>2&&(e[i][p][3]=d,e[i][p][4]=d);g()}function g(){if(clearTimeout(E),E=void 0,e[i].length!==0){var d=e[i].shift(),p=d[0],v=d[1],f=d[2],S=d[3],_=d[4];if(S===void 0)u("RETRY",p.name,v),p.apply(null,v);else if(Date.now()-S>=6e4){u("TIMEOUT",p.name,v);var w=v.pop();typeof w=="function"&&w.call(null,f)}else{var y=Date.now()-_,O=Math.max(_-S,1),A=Math.min(O*1.2,100);y>=A?(u("RETRY",p.name,v),p.apply(null,v.concat([S]))):e[i].push(d)}E===void 0&&(E=setTimeout(g,0))}}return ft}var oo;function ze(){return oo||(oo=1,function(e){const t=Ee().fromCallback,s=ge(),c=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(a=>typeof s[a]=="function");Object.assign(e,s),c.forEach(a=>{e[a]=t(s[a])}),e.exists=function(a,i){return typeof i=="function"?s.exists(a,i):new Promise(r=>s.exists(a,r))},e.read=function(a,i,r,n,o,u){return typeof u=="function"?s.read(a,i,r,n,o,u):new Promise((l,m)=>{s.read(a,i,r,n,o,(h,E,R)=>{if(h)return m(h);l({bytesRead:E,buffer:R})})})},e.write=function(a,i,...r){return typeof r[r.length-1]=="function"?s.write(a,i,...r):new Promise((n,o)=>{s.write(a,i,...r,(u,l,m)=>{if(u)return o(u);n({bytesWritten:l,buffer:m})})})},typeof s.writev=="function"&&(e.writev=function(a,i,...r){return typeof r[r.length-1]=="function"?s.writev(a,i,...r):new Promise((n,o)=>{s.writev(a,i,...r,(u,l,m)=>{if(u)return o(u);n({bytesWritten:l,buffers:m})})})}),typeof s.realpath.native=="function"?e.realpath.native=t(s.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")}(Qt)),Qt}var ht={},nr={},ao;function sh(){if(ao)return nr;ao=1;const e=Q;return nr.checkPath=function(s){if(process.platform==="win32"&&/[<>:"|?*]/.test(s.replace(e.parse(s).root,""))){const a=new Error(`Path contains invalid characters: ${s}`);throw a.code="EINVAL",a}},nr}var uo;function oh(){if(uo)return ht;uo=1;const e=ze(),{checkPath:t}=sh(),s=c=>{const a={mode:511};return typeof c=="number"?c:{...a,...c}.mode};return ht.makeDir=async(c,a)=>(t(c),e.mkdir(c,{mode:s(a),recursive:!0})),ht.makeDirSync=(c,a)=>(t(c),e.mkdirSync(c,{mode:s(a),recursive:!0})),ht}var ir,co;function we(){if(co)return ir;co=1;const e=Ee().fromPromise,{makeDir:t,makeDirSync:s}=oh(),c=e(t);return ir={mkdirs:c,mkdirsSync:s,mkdirp:c,mkdirpSync:s,ensureDir:c,ensureDirSync:s},ir}var sr,lo;function Fe(){if(lo)return sr;lo=1;const e=Ee().fromPromise,t=ze();function s(c){return t.access(c).then(()=>!0).catch(()=>!1)}return sr={pathExists:e(s),pathExistsSync:t.existsSync},sr}var or,fo;function sf(){if(fo)return or;fo=1;const e=ge();function t(c,a,i,r){e.open(c,"r+",(n,o)=>{if(n)return r(n);e.futimes(o,a,i,u=>{e.close(o,l=>{r&&r(u||l)})})})}function s(c,a,i){const r=e.openSync(c,"r+");return e.futimesSync(r,a,i),e.closeSync(r)}return or={utimesMillis:t,utimesMillisSync:s},or}var ar,ho;function Ye(){if(ho)return ar;ho=1;const e=ze(),t=Q,s=Wt;function c(h,E,R){const g=R.dereference?d=>e.stat(d,{bigint:!0}):d=>e.lstat(d,{bigint:!0});return Promise.all([g(h),g(E).catch(d=>{if(d.code==="ENOENT")return null;throw d})]).then(([d,p])=>({srcStat:d,destStat:p}))}function a(h,E,R){let g;const d=R.dereference?v=>e.statSync(v,{bigint:!0}):v=>e.lstatSync(v,{bigint:!0}),p=d(h);try{g=d(E)}catch(v){if(v.code==="ENOENT")return{srcStat:p,destStat:null};throw v}return{srcStat:p,destStat:g}}function i(h,E,R,g,d){s.callbackify(c)(h,E,g,(p,v)=>{if(p)return d(p);const{srcStat:f,destStat:S}=v;if(S){if(u(f,S)){const _=t.basename(h),w=t.basename(E);return R==="move"&&_!==w&&_.toLowerCase()===w.toLowerCase()?d(null,{srcStat:f,destStat:S,isChangingCase:!0}):d(new Error("Source and destination must not be the same."))}if(f.isDirectory()&&!S.isDirectory())return d(new Error(`Cannot overwrite non-directory '${E}' with directory '${h}'.`));if(!f.isDirectory()&&S.isDirectory())return d(new Error(`Cannot overwrite directory '${E}' with non-directory '${h}'.`))}return f.isDirectory()&&l(h,E)?d(new Error(m(h,E,R))):d(null,{srcStat:f,destStat:S})})}function r(h,E,R,g){const{srcStat:d,destStat:p}=a(h,E,g);if(p){if(u(d,p)){const v=t.basename(h),f=t.basename(E);if(R==="move"&&v!==f&&v.toLowerCase()===f.toLowerCase())return{srcStat:d,destStat:p,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(d.isDirectory()&&!p.isDirectory())throw new Error(`Cannot overwrite non-directory '${E}' with directory '${h}'.`);if(!d.isDirectory()&&p.isDirectory())throw new Error(`Cannot overwrite directory '${E}' with non-directory '${h}'.`)}if(d.isDirectory()&&l(h,E))throw new Error(m(h,E,R));return{srcStat:d,destStat:p}}function n(h,E,R,g,d){const p=t.resolve(t.dirname(h)),v=t.resolve(t.dirname(R));if(v===p||v===t.parse(v).root)return d();e.stat(v,{bigint:!0},(f,S)=>f?f.code==="ENOENT"?d():d(f):u(E,S)?d(new Error(m(h,R,g))):n(h,E,v,g,d))}function o(h,E,R,g){const d=t.resolve(t.dirname(h)),p=t.resolve(t.dirname(R));if(p===d||p===t.parse(p).root)return;let v;try{v=e.statSync(p,{bigint:!0})}catch(f){if(f.code==="ENOENT")return;throw f}if(u(E,v))throw new Error(m(h,R,g));return o(h,E,p,g)}function u(h,E){return E.ino&&E.dev&&E.ino===h.ino&&E.dev===h.dev}function l(h,E){const R=t.resolve(h).split(t.sep).filter(d=>d),g=t.resolve(E).split(t.sep).filter(d=>d);return R.reduce((d,p,v)=>d&&g[v]===p,!0)}function m(h,E,R){return`Cannot ${R} '${h}' to a subdirectory of itself, '${E}'.`}return ar={checkPaths:i,checkPathsSync:r,checkParentPaths:n,checkParentPathsSync:o,isSrcSubdir:l,areIdentical:u},ar}var ur,po;function ah(){if(po)return ur;po=1;const e=ge(),t=Q,s=we().mkdirs,c=Fe().pathExists,a=sf().utimesMillis,i=Ye();function r(x,q,C,L){typeof C=="function"&&!L?(L=C,C={}):typeof C=="function"&&(C={filter:C}),L=L||function(){},C=C||{},C.clobber="clobber"in C?!!C.clobber:!0,C.overwrite="overwrite"in C?!!C.overwrite:C.clobber,C.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001"),i.checkPaths(x,q,"copy",C,(T,I)=>{if(T)return L(T);const{srcStat:k,destStat:U}=I;i.checkParentPaths(x,k,q,"copy",V=>V?L(V):C.filter?o(n,U,x,q,C,L):n(U,x,q,C,L))})}function n(x,q,C,L,T){const I=t.dirname(C);c(I,(k,U)=>{if(k)return T(k);if(U)return l(x,q,C,L,T);s(I,V=>V?T(V):l(x,q,C,L,T))})}function o(x,q,C,L,T,I){Promise.resolve(T.filter(C,L)).then(k=>k?x(q,C,L,T,I):I(),k=>I(k))}function u(x,q,C,L,T){return L.filter?o(l,x,q,C,L,T):l(x,q,C,L,T)}function l(x,q,C,L,T){(L.dereference?e.stat:e.lstat)(q,(k,U)=>k?T(k):U.isDirectory()?S(U,x,q,C,L,T):U.isFile()||U.isCharacterDevice()||U.isBlockDevice()?m(U,x,q,C,L,T):U.isSymbolicLink()?A(x,q,C,L,T):U.isSocket()?T(new Error(`Cannot copy a socket file: ${q}`)):U.isFIFO()?T(new Error(`Cannot copy a FIFO pipe: ${q}`)):T(new Error(`Unknown file: ${q}`)))}function m(x,q,C,L,T,I){return q?h(x,C,L,T,I):E(x,C,L,T,I)}function h(x,q,C,L,T){if(L.overwrite)e.unlink(C,I=>I?T(I):E(x,q,C,L,T));else return L.errorOnExist?T(new Error(`'${C}' already exists`)):T()}function E(x,q,C,L,T){e.copyFile(q,C,I=>I?T(I):L.preserveTimestamps?R(x.mode,q,C,T):v(C,x.mode,T))}function R(x,q,C,L){return g(x)?d(C,x,T=>T?L(T):p(x,q,C,L)):p(x,q,C,L)}function g(x){return(x&128)===0}function d(x,q,C){return v(x,q|128,C)}function p(x,q,C,L){f(q,C,T=>T?L(T):v(C,x,L))}function v(x,q,C){return e.chmod(x,q,C)}function f(x,q,C){e.stat(x,(L,T)=>L?C(L):a(q,T.atime,T.mtime,C))}function S(x,q,C,L,T,I){return q?w(C,L,T,I):_(x.mode,C,L,T,I)}function _(x,q,C,L,T){e.mkdir(C,I=>{if(I)return T(I);w(q,C,L,k=>k?T(k):v(C,x,T))})}function w(x,q,C,L){e.readdir(x,(T,I)=>T?L(T):y(I,x,q,C,L))}function y(x,q,C,L,T){const I=x.pop();return I?O(x,I,q,C,L,T):T()}function O(x,q,C,L,T,I){const k=t.join(C,q),U=t.join(L,q);i.checkPaths(k,U,"copy",T,(V,j)=>{if(V)return I(V);const{destStat:b}=j;u(b,k,U,T,N=>N?I(N):y(x,C,L,T,I))})}function A(x,q,C,L,T){e.readlink(q,(I,k)=>{if(I)return T(I);if(L.dereference&&(k=t.resolve(process.cwd(),k)),x)e.readlink(C,(U,V)=>U?U.code==="EINVAL"||U.code==="UNKNOWN"?e.symlink(k,C,T):T(U):(L.dereference&&(V=t.resolve(process.cwd(),V)),i.isSrcSubdir(k,V)?T(new Error(`Cannot copy '${k}' to a subdirectory of itself, '${V}'.`)):x.isDirectory()&&i.isSrcSubdir(V,k)?T(new Error(`Cannot overwrite '${V}' with '${k}'.`)):D(k,C,T)));else return e.symlink(k,C,T)})}function D(x,q,C){e.unlink(q,L=>L?C(L):e.symlink(x,q,C))}return ur=r,ur}var cr,mo;function uh(){if(mo)return cr;mo=1;const e=ge(),t=Q,s=we().mkdirsSync,c=sf().utimesMillisSync,a=Ye();function i(y,O,A){typeof A=="function"&&(A={filter:A}),A=A||{},A.clobber="clobber"in A?!!A.clobber:!0,A.overwrite="overwrite"in A?!!A.overwrite:A.clobber,A.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");const{srcStat:D,destStat:x}=a.checkPathsSync(y,O,"copy",A);return a.checkParentPathsSync(y,D,O,"copy"),r(x,y,O,A)}function r(y,O,A,D){if(D.filter&&!D.filter(O,A))return;const x=t.dirname(A);return e.existsSync(x)||s(x),o(y,O,A,D)}function n(y,O,A,D){if(!(D.filter&&!D.filter(O,A)))return o(y,O,A,D)}function o(y,O,A,D){const q=(D.dereference?e.statSync:e.lstatSync)(O);if(q.isDirectory())return p(q,y,O,A,D);if(q.isFile()||q.isCharacterDevice()||q.isBlockDevice())return u(q,y,O,A,D);if(q.isSymbolicLink())return _(y,O,A,D);throw q.isSocket()?new Error(`Cannot copy a socket file: ${O}`):q.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${O}`):new Error(`Unknown file: ${O}`)}function u(y,O,A,D,x){return O?l(y,A,D,x):m(y,A,D,x)}function l(y,O,A,D){if(D.overwrite)return e.unlinkSync(A),m(y,O,A,D);if(D.errorOnExist)throw new Error(`'${A}' already exists`)}function m(y,O,A,D){return e.copyFileSync(O,A),D.preserveTimestamps&&h(y.mode,O,A),g(A,y.mode)}function h(y,O,A){return E(y)&&R(A,y),d(O,A)}function E(y){return(y&128)===0}function R(y,O){return g(y,O|128)}function g(y,O){return e.chmodSync(y,O)}function d(y,O){const A=e.statSync(y);return c(O,A.atime,A.mtime)}function p(y,O,A,D,x){return O?f(A,D,x):v(y.mode,A,D,x)}function v(y,O,A,D){return e.mkdirSync(A),f(O,A,D),g(A,y)}function f(y,O,A){e.readdirSync(y).forEach(D=>S(D,y,O,A))}function S(y,O,A,D){const x=t.join(O,y),q=t.join(A,y),{destStat:C}=a.checkPathsSync(x,q,"copy",D);return n(C,x,q,D)}function _(y,O,A,D){let x=e.readlinkSync(O);if(D.dereference&&(x=t.resolve(process.cwd(),x)),y){let q;try{q=e.readlinkSync(A)}catch(C){if(C.code==="EINVAL"||C.code==="UNKNOWN")return e.symlinkSync(x,A);throw C}if(D.dereference&&(q=t.resolve(process.cwd(),q)),a.isSrcSubdir(x,q))throw new Error(`Cannot copy '${x}' to a subdirectory of itself, '${q}'.`);if(e.statSync(A).isDirectory()&&a.isSrcSubdir(q,x))throw new Error(`Cannot overwrite '${q}' with '${x}'.`);return w(x,A)}else return e.symlinkSync(x,A)}function w(y,O){return e.unlinkSync(O),e.symlinkSync(y,O)}return cr=i,cr}var lr,_o;function Ls(){if(_o)return lr;_o=1;const e=Ee().fromCallback;return lr={copy:e(ah()),copySync:uh()},lr}var fr,yo;function ch(){if(yo)return fr;yo=1;const e=ge(),t=Q,s=ct,c=process.platform==="win32";function a(R){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(d=>{R[d]=R[d]||e[d],d=d+"Sync",R[d]=R[d]||e[d]}),R.maxBusyTries=R.maxBusyTries||3}function i(R,g,d){let p=0;typeof g=="function"&&(d=g,g={}),s(R,"rimraf: missing path"),s.strictEqual(typeof R,"string","rimraf: path should be a string"),s.strictEqual(typeof d,"function","rimraf: callback function required"),s(g,"rimraf: invalid options argument provided"),s.strictEqual(typeof g,"object","rimraf: options should be object"),a(g),r(R,g,function v(f){if(f){if((f.code==="EBUSY"||f.code==="ENOTEMPTY"||f.code==="EPERM")&&p<g.maxBusyTries){p++;const S=p*100;return setTimeout(()=>r(R,g,v),S)}f.code==="ENOENT"&&(f=null)}d(f)})}function r(R,g,d){s(R),s(g),s(typeof d=="function"),g.lstat(R,(p,v)=>{if(p&&p.code==="ENOENT")return d(null);if(p&&p.code==="EPERM"&&c)return n(R,g,p,d);if(v&&v.isDirectory())return u(R,g,p,d);g.unlink(R,f=>{if(f){if(f.code==="ENOENT")return d(null);if(f.code==="EPERM")return c?n(R,g,f,d):u(R,g,f,d);if(f.code==="EISDIR")return u(R,g,f,d)}return d(f)})})}function n(R,g,d,p){s(R),s(g),s(typeof p=="function"),g.chmod(R,438,v=>{v?p(v.code==="ENOENT"?null:d):g.stat(R,(f,S)=>{f?p(f.code==="ENOENT"?null:d):S.isDirectory()?u(R,g,d,p):g.unlink(R,p)})})}function o(R,g,d){let p;s(R),s(g);try{g.chmodSync(R,438)}catch(v){if(v.code==="ENOENT")return;throw d}try{p=g.statSync(R)}catch(v){if(v.code==="ENOENT")return;throw d}p.isDirectory()?h(R,g,d):g.unlinkSync(R)}function u(R,g,d,p){s(R),s(g),s(typeof p=="function"),g.rmdir(R,v=>{v&&(v.code==="ENOTEMPTY"||v.code==="EEXIST"||v.code==="EPERM")?l(R,g,p):v&&v.code==="ENOTDIR"?p(d):p(v)})}function l(R,g,d){s(R),s(g),s(typeof d=="function"),g.readdir(R,(p,v)=>{if(p)return d(p);let f=v.length,S;if(f===0)return g.rmdir(R,d);v.forEach(_=>{i(t.join(R,_),g,w=>{if(!S){if(w)return d(S=w);--f===0&&g.rmdir(R,d)}})})})}function m(R,g){let d;g=g||{},a(g),s(R,"rimraf: missing path"),s.strictEqual(typeof R,"string","rimraf: path should be a string"),s(g,"rimraf: missing options"),s.strictEqual(typeof g,"object","rimraf: options should be object");try{d=g.lstatSync(R)}catch(p){if(p.code==="ENOENT")return;p.code==="EPERM"&&c&&o(R,g,p)}try{d&&d.isDirectory()?h(R,g,null):g.unlinkSync(R)}catch(p){if(p.code==="ENOENT")return;if(p.code==="EPERM")return c?o(R,g,p):h(R,g,p);if(p.code!=="EISDIR")throw p;h(R,g,p)}}function h(R,g,d){s(R),s(g);try{g.rmdirSync(R)}catch(p){if(p.code==="ENOTDIR")throw d;if(p.code==="ENOTEMPTY"||p.code==="EEXIST"||p.code==="EPERM")E(R,g);else if(p.code!=="ENOENT")throw p}}function E(R,g){if(s(R),s(g),g.readdirSync(R).forEach(d=>m(t.join(R,d),g)),c){const d=Date.now();do try{return g.rmdirSync(R,g)}catch{}while(Date.now()-d<500)}else return g.rmdirSync(R,g)}return fr=i,i.sync=m,fr}var hr,vo;function Vt(){if(vo)return hr;vo=1;const e=ge(),t=Ee().fromCallback,s=ch();function c(i,r){if(e.rm)return e.rm(i,{recursive:!0,force:!0},r);s(i,r)}function a(i){if(e.rmSync)return e.rmSync(i,{recursive:!0,force:!0});s.sync(i)}return hr={remove:t(c),removeSync:a},hr}var dr,go;function lh(){if(go)return dr;go=1;const e=Ee().fromPromise,t=ze(),s=Q,c=we(),a=Vt(),i=e(async function(o){let u;try{u=await t.readdir(o)}catch{return c.mkdirs(o)}return Promise.all(u.map(l=>a.remove(s.join(o,l))))});function r(n){let o;try{o=t.readdirSync(n)}catch{return c.mkdirsSync(n)}o.forEach(u=>{u=s.join(n,u),a.removeSync(u)})}return dr={emptyDirSync:r,emptydirSync:r,emptyDir:i,emptydir:i},dr}var pr,Eo;function fh(){if(Eo)return pr;Eo=1;const e=Ee().fromCallback,t=Q,s=ge(),c=we();function a(r,n){function o(){s.writeFile(r,"",u=>{if(u)return n(u);n()})}s.stat(r,(u,l)=>{if(!u&&l.isFile())return n();const m=t.dirname(r);s.stat(m,(h,E)=>{if(h)return h.code==="ENOENT"?c.mkdirs(m,R=>{if(R)return n(R);o()}):n(h);E.isDirectory()?o():s.readdir(m,R=>{if(R)return n(R)})})})}function i(r){let n;try{n=s.statSync(r)}catch{}if(n&&n.isFile())return;const o=t.dirname(r);try{s.statSync(o).isDirectory()||s.readdirSync(o)}catch(u){if(u&&u.code==="ENOENT")c.mkdirsSync(o);else throw u}s.writeFileSync(r,"")}return pr={createFile:e(a),createFileSync:i},pr}var mr,So;function hh(){if(So)return mr;So=1;const e=Ee().fromCallback,t=Q,s=ge(),c=we(),a=Fe().pathExists,{areIdentical:i}=Ye();function r(o,u,l){function m(h,E){s.link(h,E,R=>{if(R)return l(R);l(null)})}s.lstat(u,(h,E)=>{s.lstat(o,(R,g)=>{if(R)return R.message=R.message.replace("lstat","ensureLink"),l(R);if(E&&i(g,E))return l(null);const d=t.dirname(u);a(d,(p,v)=>{if(p)return l(p);if(v)return m(o,u);c.mkdirs(d,f=>{if(f)return l(f);m(o,u)})})})})}function n(o,u){let l;try{l=s.lstatSync(u)}catch{}try{const E=s.lstatSync(o);if(l&&i(E,l))return}catch(E){throw E.message=E.message.replace("lstat","ensureLink"),E}const m=t.dirname(u);return s.existsSync(m)||c.mkdirsSync(m),s.linkSync(o,u)}return mr={createLink:e(r),createLinkSync:n},mr}var _r,Ro;function dh(){if(Ro)return _r;Ro=1;const e=Q,t=ge(),s=Fe().pathExists;function c(i,r,n){if(e.isAbsolute(i))return t.lstat(i,o=>o?(o.message=o.message.replace("lstat","ensureSymlink"),n(o)):n(null,{toCwd:i,toDst:i}));{const o=e.dirname(r),u=e.join(o,i);return s(u,(l,m)=>l?n(l):m?n(null,{toCwd:u,toDst:i}):t.lstat(i,h=>h?(h.message=h.message.replace("lstat","ensureSymlink"),n(h)):n(null,{toCwd:i,toDst:e.relative(o,i)})))}}function a(i,r){let n;if(e.isAbsolute(i)){if(n=t.existsSync(i),!n)throw new Error("absolute srcpath does not exist");return{toCwd:i,toDst:i}}else{const o=e.dirname(r),u=e.join(o,i);if(n=t.existsSync(u),n)return{toCwd:u,toDst:i};if(n=t.existsSync(i),!n)throw new Error("relative srcpath does not exist");return{toCwd:i,toDst:e.relative(o,i)}}}return _r={symlinkPaths:c,symlinkPathsSync:a},_r}var yr,wo;function ph(){if(wo)return yr;wo=1;const e=ge();function t(c,a,i){if(i=typeof a=="function"?a:i,a=typeof a=="function"?!1:a,a)return i(null,a);e.lstat(c,(r,n)=>{if(r)return i(null,"file");a=n&&n.isDirectory()?"dir":"file",i(null,a)})}function s(c,a){let i;if(a)return a;try{i=e.lstatSync(c)}catch{return"file"}return i&&i.isDirectory()?"dir":"file"}return yr={symlinkType:t,symlinkTypeSync:s},yr}var vr,bo;function mh(){if(bo)return vr;bo=1;const e=Ee().fromCallback,t=Q,s=ze(),c=we(),a=c.mkdirs,i=c.mkdirsSync,r=dh(),n=r.symlinkPaths,o=r.symlinkPathsSync,u=ph(),l=u.symlinkType,m=u.symlinkTypeSync,h=Fe().pathExists,{areIdentical:E}=Ye();function R(p,v,f,S){S=typeof f=="function"?f:S,f=typeof f=="function"?!1:f,s.lstat(v,(_,w)=>{!_&&w.isSymbolicLink()?Promise.all([s.stat(p),s.stat(v)]).then(([y,O])=>{if(E(y,O))return S(null);g(p,v,f,S)}):g(p,v,f,S)})}function g(p,v,f,S){n(p,v,(_,w)=>{if(_)return S(_);p=w.toDst,l(w.toCwd,f,(y,O)=>{if(y)return S(y);const A=t.dirname(v);h(A,(D,x)=>{if(D)return S(D);if(x)return s.symlink(p,v,O,S);a(A,q=>{if(q)return S(q);s.symlink(p,v,O,S)})})})})}function d(p,v,f){let S;try{S=s.lstatSync(v)}catch{}if(S&&S.isSymbolicLink()){const O=s.statSync(p),A=s.statSync(v);if(E(O,A))return}const _=o(p,v);p=_.toDst,f=m(_.toCwd,f);const w=t.dirname(v);return s.existsSync(w)||i(w),s.symlinkSync(p,v,f)}return vr={createSymlink:e(R),createSymlinkSync:d},vr}var gr,Oo;function _h(){if(Oo)return gr;Oo=1;const{createFile:e,createFileSync:t}=fh(),{createLink:s,createLinkSync:c}=hh(),{createSymlink:a,createSymlinkSync:i}=mh();return gr={createFile:e,createFileSync:t,ensureFile:e,ensureFileSync:t,createLink:s,createLinkSync:c,ensureLink:s,ensureLinkSync:c,createSymlink:a,createSymlinkSync:i,ensureSymlink:a,ensureSymlinkSync:i},gr}var Er,Po;function Ds(){if(Po)return Er;Po=1;function e(s,{EOL:c=`
`,finalEOL:a=!0,replacer:i=null,spaces:r}={}){const n=a?c:"";return JSON.stringify(s,i,r).replace(/\n/g,c)+n}function t(s){return Buffer.isBuffer(s)&&(s=s.toString("utf8")),s.replace(/^\uFEFF/,"")}return Er={stringify:e,stripBom:t},Er}var Sr,Ao;function yh(){if(Ao)return Sr;Ao=1;let e;try{e=ge()}catch{e=de}const t=Ee(),{stringify:s,stripBom:c}=Ds();async function a(m,h={}){typeof h=="string"&&(h={encoding:h});const E=h.fs||e,R="throws"in h?h.throws:!0;let g=await t.fromCallback(E.readFile)(m,h);g=c(g);let d;try{d=JSON.parse(g,h?h.reviver:null)}catch(p){if(R)throw p.message=`${m}: ${p.message}`,p;return null}return d}const i=t.fromPromise(a);function r(m,h={}){typeof h=="string"&&(h={encoding:h});const E=h.fs||e,R="throws"in h?h.throws:!0;try{let g=E.readFileSync(m,h);return g=c(g),JSON.parse(g,h.reviver)}catch(g){if(R)throw g.message=`${m}: ${g.message}`,g;return null}}async function n(m,h,E={}){const R=E.fs||e,g=s(h,E);await t.fromCallback(R.writeFile)(m,g,E)}const o=t.fromPromise(n);function u(m,h,E={}){const R=E.fs||e,g=s(h,E);return R.writeFileSync(m,g,E)}return Sr={readFile:i,readFileSync:r,writeFile:o,writeFileSync:u},Sr}var Rr,To;function vh(){if(To)return Rr;To=1;const e=yh();return Rr={readJson:e.readFile,readJsonSync:e.readFileSync,writeJson:e.writeFile,writeJsonSync:e.writeFileSync},Rr}var wr,Io;function xs(){if(Io)return wr;Io=1;const e=Ee().fromCallback,t=ge(),s=Q,c=we(),a=Fe().pathExists;function i(n,o,u,l){typeof u=="function"&&(l=u,u="utf8");const m=s.dirname(n);a(m,(h,E)=>{if(h)return l(h);if(E)return t.writeFile(n,o,u,l);c.mkdirs(m,R=>{if(R)return l(R);t.writeFile(n,o,u,l)})})}function r(n,...o){const u=s.dirname(n);if(t.existsSync(u))return t.writeFileSync(n,...o);c.mkdirsSync(u),t.writeFileSync(n,...o)}return wr={outputFile:e(i),outputFileSync:r},wr}var br,No;function gh(){if(No)return br;No=1;const{stringify:e}=Ds(),{outputFile:t}=xs();async function s(c,a,i={}){const r=e(a,i);await t(c,r,i)}return br=s,br}var Or,Co;function Eh(){if(Co)return Or;Co=1;const{stringify:e}=Ds(),{outputFileSync:t}=xs();function s(c,a,i){const r=e(a,i);t(c,r,i)}return Or=s,Or}var Pr,$o;function Sh(){if($o)return Pr;$o=1;const e=Ee().fromPromise,t=vh();return t.outputJson=e(gh()),t.outputJsonSync=Eh(),t.outputJSON=t.outputJson,t.outputJSONSync=t.outputJsonSync,t.writeJSON=t.writeJson,t.writeJSONSync=t.writeJsonSync,t.readJSON=t.readJson,t.readJSONSync=t.readJsonSync,Pr=t,Pr}var Ar,Lo;function Rh(){if(Lo)return Ar;Lo=1;const e=ge(),t=Q,s=Ls().copy,c=Vt().remove,a=we().mkdirp,i=Fe().pathExists,r=Ye();function n(h,E,R,g){typeof R=="function"&&(g=R,R={}),R=R||{};const d=R.overwrite||R.clobber||!1;r.checkPaths(h,E,"move",R,(p,v)=>{if(p)return g(p);const{srcStat:f,isChangingCase:S=!1}=v;r.checkParentPaths(h,f,E,"move",_=>{if(_)return g(_);if(o(E))return u(h,E,d,S,g);a(t.dirname(E),w=>w?g(w):u(h,E,d,S,g))})})}function o(h){const E=t.dirname(h);return t.parse(E).root===E}function u(h,E,R,g,d){if(g)return l(h,E,R,d);if(R)return c(E,p=>p?d(p):l(h,E,R,d));i(E,(p,v)=>p?d(p):v?d(new Error("dest already exists.")):l(h,E,R,d))}function l(h,E,R,g){e.rename(h,E,d=>d?d.code!=="EXDEV"?g(d):m(h,E,R,g):g())}function m(h,E,R,g){s(h,E,{overwrite:R,errorOnExist:!0},p=>p?g(p):c(h,g))}return Ar=n,Ar}var Tr,Do;function wh(){if(Do)return Tr;Do=1;const e=ge(),t=Q,s=Ls().copySync,c=Vt().removeSync,a=we().mkdirpSync,i=Ye();function r(m,h,E){E=E||{};const R=E.overwrite||E.clobber||!1,{srcStat:g,isChangingCase:d=!1}=i.checkPathsSync(m,h,"move",E);return i.checkParentPathsSync(m,g,h,"move"),n(h)||a(t.dirname(h)),o(m,h,R,d)}function n(m){const h=t.dirname(m);return t.parse(h).root===h}function o(m,h,E,R){if(R)return u(m,h,E);if(E)return c(h),u(m,h,E);if(e.existsSync(h))throw new Error("dest already exists.");return u(m,h,E)}function u(m,h,E){try{e.renameSync(m,h)}catch(R){if(R.code!=="EXDEV")throw R;return l(m,h,E)}}function l(m,h,E){return s(m,h,{overwrite:E,errorOnExist:!0}),c(m)}return Tr=r,Tr}var Ir,xo;function bh(){if(xo)return Ir;xo=1;const e=Ee().fromCallback;return Ir={move:e(Rh()),moveSync:wh()},Ir}var Nr,Fo;function Oh(){return Fo||(Fo=1,Nr={...ze(),...Ls(),...lh(),..._h(),...Sh(),...we(),...bh(),...xs(),...Fe(),...Vt()}),Nr}var pe=Oh(),Cr,qo;function Ph(){if(qo)return Cr;qo=1;var e=We;return Cr=e.homedir||function(){var s=process.env.HOME,c=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return process.platform==="win32"?process.env.USERPROFILE||process.env.HOMEDRIVE+process.env.HOMEPATH||s||null:process.platform==="darwin"?s||(c?"/Users/"+c:null):process.platform==="linux"?s||(process.getuid()===0?"/root":c?"/home/"+c:null):s||null},Cr}var $r,Mo;function Ah(){return Mo||(Mo=1,$r=function(){var e=Error.prepareStackTrace;Error.prepareStackTrace=function(s,c){return c};var t=new Error().stack;return Error.prepareStackTrace=e,t[2].getFileName()}),$r}var je={exports:{}},ko;function Th(){if(ko)return je.exports;ko=1;var e=process.platform==="win32",t=/^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/,s={};function c(n){return t.exec(n).slice(1)}s.parse=function(n){if(typeof n!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof n);var o=c(n);if(!o||o.length!==5)throw new TypeError("Invalid path '"+n+"'");return{root:o[1],dir:o[0]===o[1]?o[0]:o[0].slice(0,-1),base:o[2],ext:o[4],name:o[3]}};var a=/^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/,i={};function r(n){return a.exec(n).slice(1)}return i.parse=function(n){if(typeof n!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof n);var o=r(n);if(!o||o.length!==5)throw new TypeError("Invalid path '"+n+"'");return{root:o[1],dir:o[0].slice(0,-1),base:o[2],ext:o[4],name:o[3]}},e?je.exports=s.parse:je.exports=i.parse,je.exports.posix=i.parse,je.exports.win32=s.parse,je.exports}var Lr,Bo;function Ih(){if(Bo)return Lr;Bo=1;var e=Q,t=e.parse||Th(),s=function(a,i){var r="/";/^([A-Za-z]:)/.test(a)?r="":/^\\\\/.test(a)&&(r="\\\\");for(var n=[a],o=t(a);o.dir!==n[n.length-1];)n.push(o.dir),o=t(o.dir);return n.reduce(function(u,l){return u.concat(i.map(function(m){return e.resolve(r,l,m)}))},[])};return Lr=function(a,i,r){var n=i&&i.moduleDirectory?[].concat(i.moduleDirectory):["node_modules"];if(i&&typeof i.paths=="function")return i.paths(r,a,function(){return s(a,n)},i);var o=s(a,n);return i&&i.paths?o.concat(i.paths):o},Lr}var Dr,jo;function Nh(){return jo||(jo=1,Dr=function(e,t){return t||{}}),Dr}var xr,Ho;function Ch(){if(Ho)return xr;Ho=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,s=Math.max,c="[object Function]",a=function(o,u){for(var l=[],m=0;m<o.length;m+=1)l[m]=o[m];for(var h=0;h<u.length;h+=1)l[h+o.length]=u[h];return l},i=function(o,u){for(var l=[],m=u,h=0;m<o.length;m+=1,h+=1)l[h]=o[m];return l},r=function(n,o){for(var u="",l=0;l<n.length;l+=1)u+=n[l],l+1<n.length&&(u+=o);return u};return xr=function(o){var u=this;if(typeof u!="function"||t.apply(u)!==c)throw new TypeError(e+u);for(var l=i(arguments,1),m,h=function(){if(this instanceof m){var p=u.apply(this,a(l,arguments));return Object(p)===p?p:this}return u.apply(o,a(l,arguments))},E=s(0,u.length-l.length),R=[],g=0;g<E;g++)R[g]="$"+g;if(m=Function("binder","return function ("+r(R,",")+"){ return binder.apply(this,arguments); }")(h),u.prototype){var d=function(){};d.prototype=u.prototype,m.prototype=new d,d.prototype=null}return m},xr}var Fr,Uo;function $h(){if(Uo)return Fr;Uo=1;var e=Ch();return Fr=Function.prototype.bind||e,Fr}var qr,Go;function Lh(){if(Go)return qr;Go=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,s=$h();return qr=s.call(e,t),qr}const Dh=!0,xh=">= 8",Fh=">= 0.5 && < 0.9.7",qh=!0,Mh=!0,kh=">= 0.5",Bh=!0,jh=!0,Hh=!0,Uh=">= 1 && < 8",Gh="< 8",Wh=!0,Vh=[">= 14.17 && < 15",">= 15.1"],zh=!0,Yh=">= 0.7.12",Kh=!0,Xh="< 6",Zh=!0,Jh=">= 0.11.1",Qh=">= 0.11.1",ed=">= 0.11.1",td=">= 0.11.1",rd=">= 0.11.1",nd=">= 0.11.1",id=!0,sd=">= 8.8",od=!0,ad=">= 8",ud="< 8",cd=!0,ld=!0,fd=!0,hd=!0,dd=">= 8.5",pd=">= 1",md=">= 0.5",_d=!0,yd=!0,vd=!0,gd=">= 0.11.5 && < 3",Ed=">= 0.9.4",Sd=">= 0.9.4",Rd=">= 1.4.1",wd=">= 0.9.4",bd=">= 0.9.4",Od=">= 0.9.4",Pd=!0,Ad=!0,Td=[">= 0.4 && < 0.7",">= 0.8"],Id=!0,Nd=">= 0.11.13",Cd=">= 0.11.3 && < 10",$d=">= 0.11.3",Ld=!0,Dd=">= 10",xd=!0,Fd=!0,qd=!0,Md=">= 1",kd=!0,Bd=[">= 13.4 && < 13.5",">= 18.17 && < 19",">= 20"],jd=">= 11.7",Hd=">= 0.5",Ud={assert:Dh,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:xh,"node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:Fh,buffer:qh,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:Mh,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:kh,"node:cluster":[">= 14.18 && < 15",">= 16"],console:Bh,"node:console":[">= 14.18 && < 15",">= 16"],constants:jh,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:Hh,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:Uh,_debugger:Gh,dgram:Wh,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:Vh,"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:zh,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:Yh,"node:domain":[">= 14.18 && < 15",">= 16"],events:Kh,"node:events":[">= 14.18 && < 15",">= 16"],freelist:Xh,fs:Zh,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:Jh,"node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:Qh,"node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:ed,"node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:td,"node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:rd,"node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:nd,"node:_http_server":[">= 14.18 && < 15",">= 16"],http:id,"node:http":[">= 14.18 && < 15",">= 16"],http2:sd,"node:http2":[">= 14.18 && < 15",">= 16"],https:od,"node:https":[">= 14.18 && < 15",">= 16"],inspector:ad,"node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:ud,module:cd,"node:module":[">= 14.18 && < 15",">= 16"],net:ld,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:fd,"node:os":[">= 14.18 && < 15",">= 16"],path:hd,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:dd,"node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:pd,"node:process":[">= 14.18 && < 15",">= 16"],punycode:md,"node:punycode":[">= 14.18 && < 15",">= 16"],querystring:_d,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:yd,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:vd,"node:repl":[">= 14.18 && < 15",">= 16"],"node:sea":[">= 20.12 && < 21",">= 21.7"],smalloc:gd,"node:sqlite":[">= 22.13 && < 23",">= 23.4"],_stream_duplex:Ed,"node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:Sd,"node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:Rd,"node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:wd,"node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:bd,"node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:Od,"node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:Pd,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:Ad,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:Td,"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":">= 19.9 && < 20.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"test/mock_loader":">= 22.3 && < 22.7","node:test/mock_loader":">= 22.3 && < 22.7","node:test":[">= 16.17 && < 17",">= 18"],timers:Id,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:Nd,"node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:Cd,_tls_wrap:$d,"node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:Ld,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:Dd,"node:trace_events":[">= 14.18 && < 15",">= 16"],tty:xd,"node:tty":[">= 14.18 && < 15",">= 16"],url:Fd,"node:url":[">= 14.18 && < 15",">= 16"],util:qd,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:Md,"node:v8":[">= 14.18 && < 15",">= 16"],vm:kd,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:Bd,"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:jd,"node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:Hd,"node:zlib":[">= 14.18 && < 15",">= 16"]};var Mr,Wo;function Gd(){if(Wo)return Mr;Wo=1;var e=Lh();function t(i,r){for(var n=i.split("."),o=r.split(" "),u=o.length>1?o[0]:"=",l=(o.length>1?o[1]:o[0]).split("."),m=0;m<3;++m){var h=parseInt(n[m]||0,10),E=parseInt(l[m]||0,10);if(h!==E)return u==="<"?h<E:u===">="?h>=E:!1}return u===">="}function s(i,r){var n=r.split(/ ?&& ?/);if(n.length===0)return!1;for(var o=0;o<n.length;++o)if(!t(i,n[o]))return!1;return!0}function c(i,r){if(typeof r=="boolean")return r;var n=typeof i>"u"?process.versions&&process.versions.node:i;if(typeof n!="string")throw new TypeError(typeof i>"u"?"Unable to determine current node version":"If provided, a valid node version is required");if(r&&typeof r=="object"){for(var o=0;o<r.length;++o)if(s(n,r[o]))return!0;return!1}return s(n,r)}var a=Ud;return Mr=function(r,n){return e(a,r)&&c(n,a[r])},Mr}var kr,Vo;function Wd(){if(Vo)return kr;Vo=1;var e=de,t=Ph(),s=Q,c=Ah(),a=Ih(),i=Nh(),r=Gd(),n=process.platform!=="win32"&&e.realpath&&typeof e.realpath.native=="function"?e.realpath.native:e.realpath,o=t(),u=function(){return[s.join(o,".node_modules"),s.join(o,".node_libraries")]},l=function(p,v){e.stat(p,function(f,S){return f?f.code==="ENOENT"||f.code==="ENOTDIR"?v(null,!1):v(f):v(null,S.isFile()||S.isFIFO())})},m=function(p,v){e.stat(p,function(f,S){return f?f.code==="ENOENT"||f.code==="ENOTDIR"?v(null,!1):v(f):v(null,S.isDirectory())})},h=function(p,v){n(p,function(f,S){f&&f.code!=="ENOENT"?v(f):v(null,f?p:S)})},E=function(p,v,f,S){f&&f.preserveSymlinks===!1?p(v,S):S(null,v)},R=function(p,v,f){p(v,function(S,_){if(S)f(S);else try{var w=JSON.parse(_);f(null,w)}catch{f(null)}})},g=function(p,v,f){for(var S=a(v,f,p),_=0;_<S.length;_++)S[_]=s.join(S[_],p);return S};return kr=function(p,v,f){var S=f,_=v;if(typeof v=="function"&&(S=_,_={}),typeof p!="string"){var w=new TypeError("Path must be a string.");return process.nextTick(function(){S(w)})}_=i(p,_);var y=_.isFile||l,O=_.isDirectory||m,A=_.readFile||e.readFile,D=_.realpath||h,x=_.readPackage||R;if(_.readFile&&_.readPackage){var q=new TypeError("`readFile` and `readPackage` are mutually exclusive.");return process.nextTick(function(){S(q)})}var C=_.packageIterator,L=_.extensions||[".js"],T=_.includeCoreModules!==!1,I=_.basedir||s.dirname(c()),k=_.filename||I;_.paths=_.paths||u();var U=s.resolve(I);E(D,U,_,function(H,G){H?S(H):j(G)});var V;function j(H){if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(p))V=s.resolve(H,p),(p==="."||p===".."||p.slice(-1)==="/")&&(V+="/"),/\/$/.test(p)&&V===H?ee(V,_.package,b):N(V,_.package,b);else{if(T&&r(p))return S(null,p);$(p,H,function(G,F,B){if(G)S(G);else{if(F)return E(D,F,_,function(J,re){J?S(J):S(null,re,B)});var Y=new Error("Cannot find module '"+p+"' from '"+k+"'");Y.code="MODULE_NOT_FOUND",S(Y)}})}}function b(H,G,F){H?S(H):G?S(null,G,F):ee(V,function(B,Y,J){if(B)S(B);else if(Y)E(D,Y,_,function(oe,Z){oe?S(oe):S(null,Z,J)});else{var re=new Error("Cannot find module '"+p+"' from '"+k+"'");re.code="MODULE_NOT_FOUND",S(re)}})}function N(H,G,F){var B=G,Y=F;typeof B=="function"&&(Y=B,B=void 0);var J=[""].concat(L);re(J,H,B);function re(oe,Z,P){if(oe.length===0)return Y(null,void 0,P);var X=Z+oe[0],te=P;te?W(null,te):z(s.dirname(X),W);function W(K,ne,se){if(te=ne,K)return Y(K);if(se&&te&&_.pathFilter){var ce=s.relative(se,X),le=ce.slice(0,ce.length-oe[0].length),fe=_.pathFilter(te,Z,le);if(fe)return re([""].concat(L.slice()),s.resolve(se,fe),te)}y(X,ie)}function ie(K,ne){if(K)return Y(K);if(ne)return Y(null,X,te);re(oe.slice(1),Z,te)}}}function z(H,G){if(H===""||H==="/"||process.platform==="win32"&&/^\w:[/\\]*$/.test(H)||/[/\\]node_modules[/\\]*$/.test(H))return G(null);E(D,H,_,function(F,B){if(F)return z(s.dirname(H),G);var Y=s.join(B,"package.json");y(Y,function(J,re){if(!re)return z(s.dirname(H),G);x(A,Y,function(oe,Z){oe&&G(oe);var P=Z;P&&_.packageFilter&&(P=_.packageFilter(P,Y)),G(null,P,H)})})})}function ee(H,G,F){var B=F,Y=G;typeof Y=="function"&&(B=Y,Y=_.package),E(D,H,_,function(J,re){if(J)return B(J);var oe=s.join(re,"package.json");y(oe,function(Z,P){if(Z)return B(Z);if(!P)return N(s.join(H,"index"),Y,B);x(A,oe,function(X,te){if(X)return B(X);var W=te;if(W&&_.packageFilter&&(W=_.packageFilter(W,oe)),W&&W.main){if(typeof W.main!="string"){var ie=new TypeError("package “"+W.name+"” `main` must be a string");return ie.code="INVALID_PACKAGE_MAIN",B(ie)}(W.main==="."||W.main==="./")&&(W.main="index"),N(s.resolve(H,W.main),W,function(K,ne,se){if(K)return B(K);if(ne)return B(null,ne,se);if(!se)return N(s.join(H,"index"),se,B);var ce=s.resolve(H,se.main);ee(ce,se,function(le,fe,ye){if(le)return B(le);if(fe)return B(null,fe,ye);N(s.join(H,"index"),ye,B)})});return}N(s.join(H,"/index"),W,B)})})})}function M(H,G){if(G.length===0)return H(null,void 0);var F=G[0];O(s.dirname(F),B);function B(re,oe){if(re)return H(re);if(!oe)return M(H,G.slice(1));N(F,_.package,Y)}function Y(re,oe,Z){if(re)return H(re);if(oe)return H(null,oe,Z);ee(F,_.package,J)}function J(re,oe,Z){if(re)return H(re);if(oe)return H(null,oe,Z);M(H,G.slice(1))}}function $(H,G,F){var B=function(){return g(H,G,_)};