lix 15.11.5 → 15.11.6

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.
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- module.exports=function(e,t){"use strict";var n={};function __webpack_require__(t){if(n[t]){return n[t].exports}var i=n[t]={i:t,l:false,exports:{}};e[t].call(i.exports,i,i.exports,__webpack_require__);i.l=true;return i.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(610)}return startup()}({60:function(e,t,n){const i=n(761).constants||{ZLIB_VERNUM:4736};e.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:Infinity,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},i))},63:function(e,t,n){"use strict";const i=n(357);const r=n(614).EventEmitter;const s=n(203);const a=n(747);const o=n(827);const l=n(622);const u=n(577);const c=u.sync;const h=n(478);const f=n(182);const d=Symbol("onEntry");const m=Symbol("checkFs");const v=Symbol("checkFs2");const p=Symbol("isReusable");const w=Symbol("makeFs");const y=Symbol("file");const g=Symbol("directory");const b=Symbol("link");const S=Symbol("symlink");const E=Symbol("hardlink");const x=Symbol("unsupported");const R=Symbol("unknown");const _=Symbol("checkPath");const O=Symbol("mkdir");const N=Symbol("onError");const I=Symbol("pending");const D=Symbol("pend");const A=Symbol("unpend");const L=Symbol("ended");const C=Symbol("maybeClose");const B=Symbol("skip");const T=Symbol("doChown");const k=Symbol("uid");const M=Symbol("gid");const F=n(417);const U=n(953);const z=()=>{throw new Error("sync function called cb somehow?!?")};const W=(e,t)=>{if(process.platform!=="win32")return a.unlink(e,t);const n=e+".DELETE."+F.randomBytes(16).toString("hex");a.rename(e,n,e=>{if(e)return t(e);a.unlink(n,t)})};const P=e=>{if(process.platform!=="win32")return a.unlinkSync(e);const t=e+".DELETE."+F.randomBytes(16).toString("hex");a.renameSync(e,t);a.unlinkSync(t)};const H=(e,t,n)=>e===e>>>0?e:t===t>>>0?t:n;class Unpack extends s{constructor(e){if(!e)e={};e.ondone=(e=>{this[L]=true;this[C]()});super(e);this.reservations=f();this.transform=typeof e.transform==="function"?e.transform:null;this.writable=true;this.readable=false;this[I]=0;this[L]=false;this.dirCache=e.dirCache||new Map;if(typeof e.uid==="number"||typeof e.gid==="number"){if(typeof e.uid!=="number"||typeof e.gid!=="number")throw new TypeError("cannot set owner without number uid and gid");if(e.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=e.uid;this.gid=e.gid;this.setOwner=true}else{this.uid=null;this.gid=null;this.setOwner=false}if(e.preserveOwner===undefined&&typeof e.uid!=="number")this.preserveOwner=process.getuid&&process.getuid()===0;else this.preserveOwner=!!e.preserveOwner;this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null;this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null;this.forceChown=e.forceChown===true;this.win32=!!e.win32||process.platform==="win32";this.newer=!!e.newer;this.keep=!!e.keep;this.noMtime=!!e.noMtime;this.preservePaths=!!e.preservePaths;this.unlink=!!e.unlink;this.cwd=l.resolve(e.cwd||process.cwd());this.strip=+e.strip||0;this.processUmask=process.umask();this.umask=typeof e.umask==="number"?e.umask:this.processUmask;this.dmode=e.dmode||511&~this.umask;this.fmode=e.fmode||438&~this.umask;this.on("entry",e=>this[d](e))}warn(e,t,n={}){if(e==="TAR_BAD_ARCHIVE"||e==="TAR_ABORT")n.recoverable=false;return super.warn(e,t,n)}[C](){if(this[L]&&this[I]===0){this.emit("prefinish");this.emit("finish");this.emit("end");this.emit("close")}}[_](e){if(this.strip){const t=e.path.split(/\/|\\/);if(t.length<this.strip)return false;e.path=t.slice(this.strip).join("/");if(e.type==="Link"){const t=e.linkpath.split(/\/|\\/);if(t.length>=this.strip)e.linkpath=t.slice(this.strip).join("/")}}if(!this.preservePaths){const t=e.path;if(t.match(/(^|\/|\\)\.\.(\\|\/|$)/)){this.warn("TAR_ENTRY_ERROR",`path contains '..'`,{entry:e,path:t});return false}if(l.win32.isAbsolute(t)){const n=l.win32.parse(t);e.path=t.substr(n.root.length);const i=n.root;this.warn("TAR_ENTRY_INFO",`stripping ${i} from absolute path`,{entry:e,path:t})}}if(this.win32){const t=l.win32.parse(e.path);e.path=t.root===""?h.encode(e.path):t.root+h.encode(e.path.substr(t.root.length))}if(l.isAbsolute(e.path))e.absolute=e.path;else e.absolute=l.resolve(this.cwd,e.path);return true}[d](e){if(!this[_](e))return e.resume();i.equal(typeof e.absolute,"string");switch(e.type){case"Directory":case"GNUDumpDir":if(e.mode)e.mode=e.mode|448;case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[m](e);case"CharacterDevice":case"BlockDevice":case"FIFO":return this[x](e)}}[N](e,t){if(e.name==="CwdError")this.emit("error",e);else{this.warn("TAR_ENTRY_ERROR",e,{entry:t});this[A]();t.resume()}}[O](e,t,n){u(e,{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t},n)}[T](e){return this.forceChown||this.preserveOwner&&(typeof e.uid==="number"&&e.uid!==this.processUid||typeof e.gid==="number"&&e.gid!==this.processGid)||(typeof this.uid==="number"&&this.uid!==this.processUid||typeof this.gid==="number"&&this.gid!==this.processGid)}[k](e){return H(this.uid,e.uid,this.processUid)}[M](e){return H(this.gid,e.gid,this.processGid)}[y](e,t){const n=e.mode&4095||this.fmode;const i=new o.WriteStream(e.absolute,{flags:U(e.size),mode:n,autoClose:false});i.on("error",t=>this[N](t,e));let r=1;const s=n=>{if(n)return this[N](n,e);if(--r===0){a.close(i.fd,n=>{t();n?this[N](n,e):this[A]()})}};i.on("finish",t=>{const n=e.absolute;const o=i.fd;if(e.mtime&&!this.noMtime){r++;const t=e.atime||new Date;const i=e.mtime;a.futimes(o,t,i,e=>e?a.utimes(n,t,i,t=>s(t&&e)):s())}if(this[T](e)){r++;const t=this[k](e);const i=this[M](e);a.fchown(o,t,i,e=>e?a.chown(n,t,i,t=>s(t&&e)):s())}s()});const l=this.transform?this.transform(e)||e:e;if(l!==e){l.on("error",t=>this[N](t,e));e.pipe(l)}l.pipe(i)}[g](e,t){const n=e.mode&4095||this.dmode;this[O](e.absolute,n,n=>{if(n){t();return this[N](n,e)}let i=1;const r=n=>{if(--i===0){t();this[A]();e.resume()}};if(e.mtime&&!this.noMtime){i++;a.utimes(e.absolute,e.atime||new Date,e.mtime,r)}if(this[T](e)){i++;a.chown(e.absolute,this[k](e),this[M](e),r)}r()})}[x](e){e.unsupported=true;this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e});e.resume()}[S](e,t){this[b](e,e.linkpath,"symlink",t)}[E](e,t){this[b](e,l.resolve(this.cwd,e.linkpath),"link",t)}[D](){this[I]++}[A](){this[I]--;this[C]()}[B](e){this[A]();e.resume()}[p](e,t){return e.type==="File"&&!this.unlink&&t.isFile()&&t.nlink<=1&&process.platform!=="win32"}[m](e){this[D]();const t=[e.path];if(e.linkpath)t.push(e.linkpath);this.reservations.reserve(t,t=>this[v](e,t))}[v](e,t){this[O](l.dirname(e.absolute),this.dmode,n=>{if(n){t();return this[N](n,e)}a.lstat(e.absolute,(n,i)=>{if(i&&(this.keep||this.newer&&i.mtime>e.mtime)){this[B](e);t()}else if(n||this[p](e,i)){this[w](null,e,t)}else if(i.isDirectory()){if(e.type==="Directory"){if(!e.mode||(i.mode&4095)===e.mode)this[w](null,e,t);else a.chmod(e.absolute,e.mode,n=>this[w](n,e,t))}else a.rmdir(e.absolute,n=>this[w](n,e,t))}else W(e.absolute,n=>this[w](n,e,t))})})}[w](e,t,n){if(e)return this[N](e,t);switch(t.type){case"File":case"OldFile":case"ContiguousFile":return this[y](t,n);case"Link":return this[E](t,n);case"SymbolicLink":return this[S](t,n);case"Directory":case"GNUDumpDir":return this[g](t,n)}}[b](e,t,n,i){a[n](t,e.absolute,t=>{if(t)return this[N](t,e);i();this[A]();e.resume()})}}class UnpackSync extends Unpack{constructor(e){super(e)}[m](e){const t=this[O](l.dirname(e.absolute),this.dmode,z);if(t)return this[N](t,e);try{const n=a.lstatSync(e.absolute);if(this.keep||this.newer&&n.mtime>e.mtime)return this[B](e);else if(this[p](e,n))return this[w](null,e,z);else{try{if(n.isDirectory()){if(e.type==="Directory"){if(e.mode&&(n.mode&4095)!==e.mode)a.chmodSync(e.absolute,e.mode)}else a.rmdirSync(e.absolute)}else P(e.absolute);return this[w](null,e,z)}catch(t){return this[N](t,e)}}}catch(t){return this[w](null,e,z)}}[y](e,t){const n=e.mode&4095||this.fmode;const i=t=>{let n;try{a.closeSync(s)}catch(e){n=e}if(t||n)this[N](t||n,e)};let r;let s;try{s=a.openSync(e.absolute,U(e.size),n)}catch(e){return i(e)}const o=this.transform?this.transform(e)||e:e;if(o!==e){o.on("error",t=>this[N](t,e));e.pipe(o)}o.on("data",e=>{try{a.writeSync(s,e,0,e.length)}catch(e){i(e)}});o.on("end",t=>{let n=null;if(e.mtime&&!this.noMtime){const t=e.atime||new Date;const i=e.mtime;try{a.futimesSync(s,t,i)}catch(r){try{a.utimesSync(e.absolute,t,i)}catch(e){n=r}}}if(this[T](e)){const t=this[k](e);const i=this[M](e);try{a.fchownSync(s,t,i)}catch(r){try{a.chownSync(e.absolute,t,i)}catch(e){n=n||r}}}i(n)})}[g](e,t){const n=e.mode&4095||this.dmode;const i=this[O](e.absolute,n);if(i)return this[N](i,e);if(e.mtime&&!this.noMtime){try{a.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch(i){}}if(this[T](e)){try{a.chownSync(e.absolute,this[k](e),this[M](e))}catch(i){}}e.resume()}[O](e,t){try{return u.sync(e,{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t})}catch(e){return e}}[b](e,t,n,i){try{a[n+"Sync"](t,e.absolute);e.resume()}catch(t){return this[N](t,e)}}}Unpack.Sync=UnpackSync;e.exports=Unpack},92:function(e,t,n){const{dirname:i}=n(622);const r=(e,t,n=undefined)=>{if(n===t)return Promise.resolve();return e.statAsync(t).then(e=>e.isDirectory()?n:undefined,n=>n.code==="ENOENT"?r(e,i(t),t):undefined)};const s=(e,t,n=undefined)=>{if(n===t)return undefined;try{return e.statSync(t).isDirectory()?n:undefined}catch(n){return n.code==="ENOENT"?s(e,i(t),t):undefined}};e.exports={findMade:r,findMadeSync:s}},93:function(e,t,n){var i=n(413).Stream;e.exports=legacy;function legacy(e){return{ReadStream:ReadStream,WriteStream:WriteStream};function ReadStream(t,n){if(!(this instanceof ReadStream))return new ReadStream(t,n);i.call(this);var r=this;this.path=t;this.fd=null;this.readable=true;this.paused=false;this.flags="r";this.mode=438;this.bufferSize=64*1024;n=n||{};var s=Object.keys(n);for(var a=0,o=s.length;a<o;a++){var l=s[a];this[l]=n[l]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==undefined){if("number"!==typeof this.start){throw TypeError("start must be a Number")}if(this.end===undefined){this.end=Infinity}else if("number"!==typeof this.end){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(){r._read()});return}e.open(this.path,this.flags,this.mode,function(e,t){if(e){r.emit("error",e);r.readable=false;return}r.fd=t;r.emit("open",t);r._read()})}function WriteStream(t,n){if(!(this instanceof WriteStream))return new WriteStream(t,n);i.call(this);this.path=t;this.fd=null;this.writable=true;this.flags="w";this.encoding="binary";this.mode=438;this.bytesWritten=0;n=n||{};var r=Object.keys(n);for(var s=0,a=r.length;s<a;s++){var o=r[s];this[o]=n[o]}if(this.start!==undefined){if("number"!==typeof this.start){throw TypeError("start must be a Number")}if(this.start<0){throw new Error("start must be >= zero")}this.pos=this.start}this.busy=false;this._queue=[];if(this.fd===null){this._open=e.open;this._queue.push([this._open,this.path,this.flags,this.mode,undefined]);this.flush()}}}},129:function(e){e.exports=require("child_process")},133:function(e,t,n){"use strict";const i=n(357);const r=n(293).Buffer;const s=n(761);const a=t.constants=n(60);const o=n(720);const l=r.concat;const u=Symbol("_superWrite");class ZlibError extends Error{constructor(e){super("zlib: "+e.message);this.code=e.code;this.errno=e.errno;if(!this.code)this.code="ZLIB_ERROR";this.message="zlib: "+e.message;Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}}const c=Symbol("opts");const h=Symbol("flushFlag");const f=Symbol("finishFlushFlag");const d=Symbol("fullFlushFlag");const m=Symbol("handle");const v=Symbol("onError");const p=Symbol("sawError");const w=Symbol("level");const y=Symbol("strategy");const g=Symbol("ended");const b=Symbol("_defaultFullFlush");class ZlibBase extends o{constructor(e,t){if(!e||typeof e!=="object")throw new TypeError("invalid options for ZlibBase constructor");super(e);this[g]=false;this[c]=e;this[h]=e.flush;this[f]=e.finishFlush;try{this[m]=new s[t](e)}catch(e){throw new ZlibError(e)}this[v]=(e=>{this[p]=true;this.close();this.emit("error",e)});this[m].on("error",e=>this[v](new ZlibError(e)));this.once("end",()=>this.close)}close(){if(this[m]){this[m].close();this[m]=null;this.emit("close")}}reset(){if(!this[p]){i(this[m],"zlib binding closed");return this[m].reset()}}flush(e){if(this.ended)return;if(typeof e!=="number")e=this[d];this.write(Object.assign(r.alloc(0),{[h]:e}))}end(e,t,n){if(e)this.write(e,t);this.flush(this[f]);this[g]=true;return super.end(null,null,n)}get ended(){return this[g]}write(e,t,n){if(typeof t==="function")n=t,t="utf8";if(typeof e==="string")e=r.from(e,t);if(this[p])return;i(this[m],"zlib binding closed");const s=this[m]._handle;const a=s.close;s.close=(()=>{});const o=this[m].close;this[m].close=(()=>{});r.concat=(e=>e);let c;try{const t=typeof e[h]==="number"?e[h]:this[h];c=this[m]._processChunk(e,t);r.concat=l}catch(e){r.concat=l;this[v](new ZlibError(e))}finally{if(this[m]){this[m]._handle=s;s.close=a;this[m].close=o;this[m].removeAllListeners("error")}}let f;if(c){if(Array.isArray(c)&&c.length>0){f=this[u](r.from(c[0]));for(let e=1;e<c.length;e++){f=this[u](c[e])}}else{f=this[u](r.from(c))}}if(n)n();return f}[u](e){return super.write(e)}}class Zlib extends ZlibBase{constructor(e,t){e=e||{};e.flush=e.flush||a.Z_NO_FLUSH;e.finishFlush=e.finishFlush||a.Z_FINISH;super(e,t);this[d]=a.Z_FULL_FLUSH;this[w]=e.level;this[y]=e.strategy}params(e,t){if(this[p])return;if(!this[m])throw new Error("cannot switch params when binding is closed");if(!this[m].params)throw new Error("not supported in this implementation");if(this[w]!==e||this[y]!==t){this.flush(a.Z_SYNC_FLUSH);i(this[m],"zlib binding closed");const n=this[m].flush;this[m].flush=((e,t)=>{this.flush(e);t()});try{this[m].params(e,t)}finally{this[m].flush=n}if(this[m]){this[w]=e;this[y]=t}}}}class Deflate extends Zlib{constructor(e){super(e,"Deflate")}}class Inflate extends Zlib{constructor(e){super(e,"Inflate")}}const S=Symbol("_portable");class Gzip extends Zlib{constructor(e){super(e,"Gzip");this[S]=e&&!!e.portable}[u](e){if(!this[S])return super[u](e);this[S]=false;e[9]=255;return super[u](e)}}class Gunzip extends Zlib{constructor(e){super(e,"Gunzip")}}class DeflateRaw extends Zlib{constructor(e){super(e,"DeflateRaw")}}class InflateRaw extends Zlib{constructor(e){super(e,"InflateRaw")}}class Unzip extends Zlib{constructor(e){super(e,"Unzip")}}class Brotli extends ZlibBase{constructor(e,t){e=e||{};e.flush=e.flush||a.BROTLI_OPERATION_PROCESS;e.finishFlush=e.finishFlush||a.BROTLI_OPERATION_FINISH;super(e,t);this[d]=a.BROTLI_OPERATION_FLUSH}}class BrotliCompress extends Brotli{constructor(e){super(e,"BrotliCompress")}}class BrotliDecompress extends Brotli{constructor(e){super(e,"BrotliDecompress")}}t.Deflate=Deflate;t.Inflate=Inflate;t.Gzip=Gzip;t.Gunzip=Gunzip;t.DeflateRaw=DeflateRaw;t.InflateRaw=InflateRaw;t.Unzip=Unzip;if(typeof s.BrotliCompress==="function"){t.BrotliCompress=BrotliCompress;t.BrotliDecompress=BrotliDecompress}else{t.BrotliCompress=t.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}}},159:function(e,t,n){"use strict";const i=n(891);const r=n(726);const s=n(747);const a=n(827);const o=n(381);const l=n(622);const u=e.exports=((e,t,n)=>{if(typeof t==="function")n=t;if(Array.isArray(e))t=e,e={};if(!t||!Array.isArray(t)||!t.length)throw new TypeError("no files or directories specified");t=Array.from(t);const r=i(e);if(r.sync&&typeof n==="function")throw new TypeError("callback not supported for sync tar functions");if(!r.file&&typeof n==="function")throw new TypeError("callback only supported with file option");return r.file&&r.sync?c(r,t):r.file?h(r,t,n):r.sync?m(r,t):v(r,t)});const c=(e,t)=>{const n=new r.Sync(e);const i=new a.WriteStreamSync(e.file,{mode:e.mode||438});n.pipe(i);f(n,t)};const h=(e,t,n)=>{const i=new r(e);const s=new a.WriteStream(e.file,{mode:e.mode||438});i.pipe(s);const o=new Promise((e,t)=>{s.on("error",t);s.on("close",e);i.on("error",t)});d(i,t);return n?o.then(n,n):o};const f=(e,t)=>{t.forEach(t=>{if(t.charAt(0)==="@")o({file:l.resolve(e.cwd,t.substr(1)),sync:true,noResume:true,onentry:t=>e.add(t)});else e.add(t)});e.end()};const d=(e,t)=>{while(t.length){const n=t.shift();if(n.charAt(0)==="@")return o({file:l.resolve(e.cwd,n.substr(1)),noResume:true,onentry:t=>e.add(t)}).then(n=>d(e,t));else e.add(n)}e.end()};const m=(e,t)=>{const n=new r.Sync(e);f(n,t);return n};const v=(e,t)=>{const n=new r(e);d(n,t);return n}},182:function(e,t,n){const i=n(357);e.exports=(()=>{const e=new Map;const t=new Map;const{join:r}=n(622);const s=e=>r(e).split(/[\\\/]/).slice(0,-1).reduce((e,t)=>e.length?e.concat(r(e[e.length-1],t)):[t],[]);const a=new Set;const o=n=>{const i=t.get(n);if(!i)throw new Error("function does not have any path reservations");return{paths:i.paths.map(t=>e.get(t)),dirs:[...i.dirs].map(t=>e.get(t))}};const l=e=>{const{paths:t,dirs:n}=o(e);return t.every(t=>t[0]===e)&&n.every(t=>t[0]instanceof Set&&t[0].has(e))};const u=e=>{if(a.has(e)||!l(e))return false;a.add(e);e(()=>c(e));return true};const c=n=>{if(!a.has(n))return false;const{paths:r,dirs:s}=t.get(n);const o=new Set;r.forEach(t=>{const r=e.get(t);i.equal(r[0],n);if(r.length===1)e.delete(t);else{r.shift();if(typeof r[0]==="function")o.add(r[0]);else r[0].forEach(e=>o.add(e))}});s.forEach(t=>{const r=e.get(t);i(r[0]instanceof Set);if(r[0].size===1&&r.length===1){e.delete(t)}else if(r[0].size===1){r.shift();o.add(r[0])}else r[0].delete(n)});a.delete(n);o.forEach(e=>u(e));return true};const h=(n,i)=>{const r=new Set(n.map(e=>s(e)).reduce((e,t)=>e.concat(t)));t.set(i,{dirs:r,paths:n});n.forEach(t=>{const n=e.get(t);if(!n)e.set(t,[i]);else n.push(i)});r.forEach(t=>{const n=e.get(t);if(!n)e.set(t,[new Set([i])]);else if(n[n.length-1]instanceof Set)n[n.length-1].add(i);else n.push(new Set([i]))});return u(i)};return{check:l,reserve:h}})},203:function(e,t,n){"use strict";const i=n(796);const r=n(622);const s=n(232);const a=n(614);const o=n(612);const l=1024*1024;const u=n(662);const c=n(582);const h=n(133);const f=Buffer.from([31,139]);const d=Symbol("state");const m=Symbol("writeEntry");const v=Symbol("readEntry");const p=Symbol("nextEntry");const w=Symbol("processEntry");const y=Symbol("extendedHeader");const g=Symbol("globalExtendedHeader");const b=Symbol("meta");const S=Symbol("emitMeta");const E=Symbol("buffer");const x=Symbol("queue");const R=Symbol("ended");const _=Symbol("emittedEnd");const O=Symbol("emit");const N=Symbol("unzip");const I=Symbol("consumeChunk");const D=Symbol("consumeChunkSub");const A=Symbol("consumeBody");const L=Symbol("consumeMeta");const C=Symbol("consumeHeader");const B=Symbol("consuming");const T=Symbol("bufferConcat");const k=Symbol("maybeEnd");const M=Symbol("writing");const F=Symbol("aborted");const U=Symbol("onDone");const z=Symbol("sawValidEntry");const W=Symbol("sawNullBlock");const P=Symbol("sawEOF");const H=e=>true;e.exports=i(class Parser extends a{constructor(e){e=e||{};super(e);this.file=e.file||"";this[z]=null;this.on(U,e=>{if(this[d]==="begin"||this[z]===false){this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}});if(e.ondone)this.on(U,e.ondone);else this.on(U,e=>{this.emit("prefinish");this.emit("finish");this.emit("end");this.emit("close")});this.strict=!!e.strict;this.maxMetaEntrySize=e.maxMetaEntrySize||l;this.filter=typeof e.filter==="function"?e.filter:H;this.writable=true;this.readable=false;this[x]=new o;this[E]=null;this[v]=null;this[m]=null;this[d]="begin";this[b]="";this[y]=null;this[g]=null;this[R]=false;this[N]=null;this[F]=false;this[W]=false;this[P]=false;if(typeof e.onwarn==="function")this.on("warn",e.onwarn);if(typeof e.onentry==="function")this.on("entry",e.onentry)}[C](e,t){if(this[z]===null)this[z]=false;let n;try{n=new s(e,t,this[y],this[g])}catch(e){return this.warn("TAR_ENTRY_INVALID",e)}if(n.nullBlock){if(this[W]){this[P]=true;if(this[d]==="begin")this[d]="header";this[O]("eof")}else{this[W]=true;this[O]("nullBlock")}}else{this[W]=false;if(!n.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:n});else if(!n.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:n});else{const e=n.type;if(/^(Symbolic)?Link$/.test(e)&&!n.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:n});else if(!/^(Symbolic)?Link$/.test(e)&&n.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:n});else{const e=this[m]=new u(n,this[y],this[g]);if(!this[z]){if(e.remain){const t=()=>{if(!e.invalid)this[z]=true};e.on("end",t)}else{this[z]=true}}if(e.meta){if(e.size>this.maxMetaEntrySize){e.ignore=true;this[O]("ignoredEntry",e);this[d]="ignore";e.resume()}else if(e.size>0){this[b]="";e.on("data",e=>this[b]+=e);this[d]="meta"}}else{this[y]=null;e.ignore=e.ignore||!this.filter(e.path,e);if(e.ignore){this[O]("ignoredEntry",e);this[d]=e.remain?"ignore":"header";e.resume()}else{if(e.remain)this[d]="body";else{this[d]="header";e.end()}if(!this[v]){this[x].push(e);this[p]()}else this[x].push(e)}}}}}}[w](e){let t=true;if(!e){this[v]=null;t=false}else if(Array.isArray(e))this.emit.apply(this,e);else{this[v]=e;this.emit("entry",e);if(!e.emittedEnd){e.on("end",e=>this[p]());t=false}}return t}[p](){do{}while(this[w](this[x].shift()));if(!this[x].length){const e=this[v];const t=!e||e.flowing||e.size===e.remain;if(t){if(!this[M])this.emit("drain")}else e.once("drain",e=>this.emit("drain"))}}[A](e,t){const n=this[m];const i=n.blockRemain;const r=i>=e.length&&t===0?e:e.slice(t,t+i);n.write(r);if(!n.blockRemain){this[d]="header";this[m]=null;n.end()}return r.length}[L](e,t){const n=this[m];const i=this[A](e,t);if(!this[m])this[S](n);return i}[O](e,t,n){if(!this[x].length&&!this[v])this.emit(e,t,n);else this[x].push([e,t,n])}[S](e){this[O]("meta",this[b]);switch(e.type){case"ExtendedHeader":case"OldExtendedHeader":this[y]=c.parse(this[b],this[y],false);break;case"GlobalExtendedHeader":this[g]=c.parse(this[b],this[g],true);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[y]=this[y]||Object.create(null);this[y].path=this[b].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[y]=this[y]||Object.create(null);this[y].linkpath=this[b].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+e.type)}}abort(e){this[F]=true;this.emit("abort",e);this.warn("TAR_ABORT",e,{recoverable:false})}write(e){if(this[F])return;if(this[N]===null&&e){if(this[E]){e=Buffer.concat([this[E],e]);this[E]=null}if(e.length<f.length){this[E]=e;return true}for(let t=0;this[N]===null&&t<f.length;t++){if(e[t]!==f[t])this[N]=false}if(this[N]===null){const t=this[R];this[R]=false;this[N]=new h.Unzip;this[N].on("data",e=>this[I](e));this[N].on("error",e=>this.abort(e));this[N].on("end",e=>{this[R]=true;this[I]()});this[M]=true;const n=this[N][t?"end":"write"](e);this[M]=false;return n}}this[M]=true;if(this[N])this[N].write(e);else this[I](e);this[M]=false;const t=this[x].length?false:this[v]?this[v].flowing:true;if(!t&&!this[x].length)this[v].once("drain",e=>this.emit("drain"));return t}[T](e){if(e&&!this[F])this[E]=this[E]?Buffer.concat([this[E],e]):e}[k](){if(this[R]&&!this[_]&&!this[F]&&!this[B]){this[_]=true;const e=this[m];if(e&&e.blockRemain){const t=this[E]?this[E].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${t} available)`,{entry:e});if(this[E])e.write(this[E]);e.end()}this[O](U)}}[I](e){if(this[B])this[T](e);else if(!e&&!this[E])this[k]();else{this[B]=true;if(this[E]){this[T](e);const t=this[E];this[E]=null;this[D](t)}else{this[D](e)}while(this[E]&&this[E].length>=512&&!this[F]&&!this[P]){const e=this[E];this[E]=null;this[D](e)}this[B]=false}if(!this[E]||this[R])this[k]()}[D](e){let t=0;let n=e.length;while(t+512<=n&&!this[F]&&!this[P]){switch(this[d]){case"begin":case"header":this[C](e,t);t+=512;break;case"ignore":case"body":t+=this[A](e,t);break;case"meta":t+=this[L](e,t);break;default:throw new Error("invalid state: "+this[d])}}if(t<n){if(this[E])this[E]=Buffer.concat([e.slice(t),this[E]]);else this[E]=e.slice(t)}}end(e){if(!this[F]){if(this[N])this[N].end(e);else{this[R]=true;this.write(e)}}}})},211:function(e){e.exports=require("https")},232:function(e,t,n){"use strict";const i=n(554);const r=n(622).posix;const s=n(858);const a=Symbol("slurp");const o=Symbol("type");class Header{constructor(e,t,n,i){this.cksumValid=false;this.needPax=false;this.nullBlock=false;this.block=null;this.path=null;this.mode=null;this.uid=null;this.gid=null;this.size=null;this.mtime=null;this.cksum=null;this[o]="0";this.linkpath=null;this.uname=null;this.gname=null;this.devmaj=0;this.devmin=0;this.atime=null;this.ctime=null;if(Buffer.isBuffer(e))this.decode(e,t||0,n,i);else if(e)this.set(e)}decode(e,t,n,i){if(!t)t=0;if(!e||!(e.length>=t+512))throw new Error("need 512 bytes for header");this.path=u(e,t,100);this.mode=f(e,t+100,8);this.uid=f(e,t+108,8);this.gid=f(e,t+116,8);this.size=f(e,t+124,12);this.mtime=c(e,t+136,12);this.cksum=f(e,t+148,12);this[a](n);this[a](i,true);this[o]=u(e,t+156,1);if(this[o]==="")this[o]="0";if(this[o]==="0"&&this.path.substr(-1)==="/")this[o]="5";if(this[o]==="5")this.size=0;this.linkpath=u(e,t+157,100);if(e.slice(t+257,t+265).toString()==="ustar\x0000"){this.uname=u(e,t+265,32);this.gname=u(e,t+297,32);this.devmaj=f(e,t+329,8);this.devmin=f(e,t+337,8);if(e[t+475]!==0){const n=u(e,t+345,155);this.path=n+"/"+this.path}else{const n=u(e,t+345,130);if(n)this.path=n+"/"+this.path;this.atime=c(e,t+476,12);this.ctime=c(e,t+488,12)}}let r=8*32;for(let n=t;n<t+148;n++){r+=e[n]}for(let n=t+156;n<t+512;n++){r+=e[n]}this.cksumValid=r===this.cksum;if(this.cksum===null&&r===8*32)this.nullBlock=true}[a](e,t){for(let n in e){if(e[n]!==null&&e[n]!==undefined&&!(t&&n==="path"))this[n]=e[n]}}encode(e,t){if(!e){e=this.block=Buffer.alloc(512);t=0}if(!t)t=0;if(!(e.length>=t+512))throw new Error("need 512 bytes for header");const n=this.ctime||this.atime?130:155;const i=l(this.path||"",n);const r=i[0];const s=i[1];this.needPax=i[2];this.needPax=E(e,t,100,r)||this.needPax;this.needPax=p(e,t+100,8,this.mode)||this.needPax;this.needPax=p(e,t+108,8,this.uid)||this.needPax;this.needPax=p(e,t+116,8,this.gid)||this.needPax;this.needPax=p(e,t+124,12,this.size)||this.needPax;this.needPax=b(e,t+136,12,this.mtime)||this.needPax;e[t+156]=this[o].charCodeAt(0);this.needPax=E(e,t+157,100,this.linkpath)||this.needPax;e.write("ustar\x0000",t+257,8);this.needPax=E(e,t+265,32,this.uname)||this.needPax;this.needPax=E(e,t+297,32,this.gname)||this.needPax;this.needPax=p(e,t+329,8,this.devmaj)||this.needPax;this.needPax=p(e,t+337,8,this.devmin)||this.needPax;this.needPax=E(e,t+345,n,s)||this.needPax;if(e[t+475]!==0)this.needPax=E(e,t+345,155,s)||this.needPax;else{this.needPax=E(e,t+345,130,s)||this.needPax;this.needPax=b(e,t+476,12,this.atime)||this.needPax;this.needPax=b(e,t+488,12,this.ctime)||this.needPax}let a=8*32;for(let n=t;n<t+148;n++){a+=e[n]}for(let n=t+156;n<t+512;n++){a+=e[n]}this.cksum=a;p(e,t+148,8,this.cksum);this.cksumValid=true;return this.needPax}set(e){for(let t in e){if(e[t]!==null&&e[t]!==undefined)this[t]=e[t]}}get type(){return i.name.get(this[o])||this[o]}get typeKey(){return this[o]}set type(e){if(i.code.has(e))this[o]=i.code.get(e);else this[o]=e}}const l=(e,t)=>{const n=100;let i=e;let s="";let a;const o=r.parse(e).root||".";if(Buffer.byteLength(i)<n)a=[i,s,false];else{s=r.dirname(i);i=r.basename(i);do{if(Buffer.byteLength(i)<=n&&Buffer.byteLength(s)<=t)a=[i,s,false];else if(Buffer.byteLength(i)>n&&Buffer.byteLength(s)<=t)a=[i.substr(0,n-1),s,true];else{i=r.join(r.basename(s),i);s=r.dirname(s)}}while(s!==o&&!a);if(!a)a=[e.substr(0,n-1),"",true]}return a};const u=(e,t,n)=>e.slice(t,t+n).toString("utf8").replace(/\0.*/,"");const c=(e,t,n)=>h(f(e,t,n));const h=e=>e===null?null:new Date(e*1e3);const f=(e,t,n)=>e[t]&128?s.parse(e.slice(t,t+n)):m(e,t,n);const d=e=>isNaN(e)?null:e;const m=(e,t,n)=>d(parseInt(e.slice(t,t+n).toString("utf8").replace(/\0.*$/,"").trim(),8));const v={12:8589934591,8:2097151};const p=(e,t,n,i)=>i===null?false:i>v[n]||i<0?(s.encode(i,e.slice(t,t+n)),true):(w(e,t,n,i),false);const w=(e,t,n,i)=>e.write(y(i,n),t,n,"ascii");const y=(e,t)=>g(Math.floor(e).toString(8),t);const g=(e,t)=>(e.length===t-1?e:new Array(t-e.length-1).join("0")+e+" ")+"\0";const b=(e,t,n,i)=>i===null?false:p(e,t,n,i.getTime()/1e3);const S=new Array(156).join("\0");const E=(e,t,n,i)=>i===null?false:(e.write(i+S,t,n,"utf8"),i.length!==Buffer.byteLength(i)||i.length>n);e.exports=Header},250:function(e,t,n){var i=n(619);var r=process.cwd;var s=null;var a=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!s)s=r.call(process);return s};try{process.cwd()}catch(e){}var o=process.chdir;process.chdir=function(e){s=null;o.call(process,e)};e.exports=patch;function patch(e){if(i.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)){patchLchmod(e)}if(!e.lutimes){patchLutimes(e)}e.chown=chownFix(e.chown);e.fchown=chownFix(e.fchown);e.lchown=chownFix(e.lchown);e.chmod=chmodFix(e.chmod);e.fchmod=chmodFix(e.fchmod);e.lchmod=chmodFix(e.lchmod);e.chownSync=chownFixSync(e.chownSync);e.fchownSync=chownFixSync(e.fchownSync);e.lchownSync=chownFixSync(e.lchownSync);e.chmodSync=chmodFixSync(e.chmodSync);e.fchmodSync=chmodFixSync(e.fchmodSync);e.lchmodSync=chmodFixSync(e.lchmodSync);e.stat=statFix(e.stat);e.fstat=statFix(e.fstat);e.lstat=statFix(e.lstat);e.statSync=statFixSync(e.statSync);e.fstatSync=statFixSync(e.fstatSync);e.lstatSync=statFixSync(e.lstatSync);if(!e.lchmod){e.lchmod=function(e,t,n){if(n)process.nextTick(n)};e.lchmodSync=function(){}}if(!e.lchown){e.lchown=function(e,t,n,i){if(i)process.nextTick(i)};e.lchownSync=function(){}}if(a==="win32"){e.rename=function(t){return function(n,i,r){var s=Date.now();var a=0;t(n,i,function CB(o){if(o&&(o.code==="EACCES"||o.code==="EPERM")&&Date.now()-s<6e4){setTimeout(function(){e.stat(i,function(e,s){if(e&&e.code==="ENOENT")t(n,i,CB);else r(o)})},a);if(a<100)a+=10;return}if(r)r(o)})}}(e.rename)}e.read=function(t){function read(n,i,r,s,a,o){var l;if(o&&typeof o==="function"){var u=0;l=function(c,h,f){if(c&&c.code==="EAGAIN"&&u<10){u++;return t.call(e,n,i,r,s,a,l)}o.apply(this,arguments)}}return t.call(e,n,i,r,s,a,l)}read.__proto__=t;return read}(e.read);e.readSync=function(t){return function(n,i,r,s,a){var o=0;while(true){try{return t.call(e,n,i,r,s,a)}catch(e){if(e.code==="EAGAIN"&&o<10){o++;continue}throw e}}}}(e.readSync);function patchLchmod(e){e.lchmod=function(t,n,r){e.open(t,i.O_WRONLY|i.O_SYMLINK,n,function(t,i){if(t){if(r)r(t);return}e.fchmod(i,n,function(t){e.close(i,function(e){if(r)r(t||e)})})})};e.lchmodSync=function(t,n){var r=e.openSync(t,i.O_WRONLY|i.O_SYMLINK,n);var s=true;var a;try{a=e.fchmodSync(r,n);s=false}finally{if(s){try{e.closeSync(r)}catch(e){}}else{e.closeSync(r)}}return a}}function patchLutimes(e){if(i.hasOwnProperty("O_SYMLINK")){e.lutimes=function(t,n,r,s){e.open(t,i.O_SYMLINK,function(t,i){if(t){if(s)s(t);return}e.futimes(i,n,r,function(t){e.close(i,function(e){if(s)s(t||e)})})})};e.lutimesSync=function(t,n,r){var s=e.openSync(t,i.O_SYMLINK);var a;var o=true;try{a=e.futimesSync(s,n,r);o=false}finally{if(o){try{e.closeSync(s)}catch(e){}}else{e.closeSync(s)}}return a}}else{e.lutimes=function(e,t,n,i){if(i)process.nextTick(i)};e.lutimesSync=function(){}}}function chmodFix(t){if(!t)return t;return function(n,i,r){return t.call(e,n,i,function(e){if(chownErOk(e))e=null;if(r)r.apply(this,arguments)})}}function chmodFixSync(t){if(!t)return t;return function(n,i){try{return t.call(e,n,i)}catch(e){if(!chownErOk(e))throw e}}}function chownFix(t){if(!t)return t;return function(n,i,r,s){return t.call(e,n,i,r,function(e){if(chownErOk(e))e=null;if(s)s.apply(this,arguments)})}}function chownFixSync(t){if(!t)return t;return function(n,i,r){try{return t.call(e,n,i,r)}catch(e){if(!chownErOk(e))throw e}}}function statFix(t){if(!t)return t;return function(n,i,r){if(typeof i==="function"){r=i;i=null}function callback(e,t){if(t){if(t.uid<0)t.uid+=4294967296;if(t.gid<0)t.gid+=4294967296}if(r)r.apply(this,arguments)}return i?t.call(e,n,i,callback):t.call(e,n,callback)}}function statFixSync(t){if(!t)return t;return function(n,i){var r=i?t.call(e,n,i):t.call(e,n);if(r.uid<0)r.uid+=4294967296;if(r.gid<0)r.gid+=4294967296;return r}}function chownErOk(e){if(!e)return true;if(e.code==="ENOSYS")return true;var t=!process.getuid||process.getuid()!==0;if(t){if(e.code==="EINVAL"||e.code==="EPERM")return true}return false}}},293:function(e){e.exports=require("buffer")},303:function(e,t,n){"use strict";const i=n(720);const r=n(582);const s=n(232);const a=n(662);const o=n(747);const l=n(622);const u=n(554);const c=16*1024*1024;const h=Symbol("process");const f=Symbol("file");const d=Symbol("directory");const m=Symbol("symlink");const v=Symbol("hardlink");const p=Symbol("header");const w=Symbol("read");const y=Symbol("lstat");const g=Symbol("onlstat");const b=Symbol("onread");const S=Symbol("onreadlink");const E=Symbol("openfile");const x=Symbol("onopenfile");const R=Symbol("close");const _=Symbol("mode");const O=n(796);const N=n(478);const I=n(904);const D=O(class WriteEntry extends i{constructor(e,t){t=t||{};super(t);if(typeof e!=="string")throw new TypeError("path is required");this.path=e;this.portable=!!t.portable;this.myuid=process.getuid&&process.getuid();this.myuser=process.env.USER||"";this.maxReadSize=t.maxReadSize||c;this.linkCache=t.linkCache||new Map;this.statCache=t.statCache||new Map;this.preservePaths=!!t.preservePaths;this.cwd=t.cwd||process.cwd();this.strict=!!t.strict;this.noPax=!!t.noPax;this.noMtime=!!t.noMtime;this.mtime=t.mtime||null;if(typeof t.onwarn==="function")this.on("warn",t.onwarn);let n=false;if(!this.preservePaths&&l.win32.isAbsolute(e)){const t=l.win32.parse(e);this.path=e.substr(t.root.length);n=t.root}this.win32=!!t.win32||process.platform==="win32";if(this.win32){this.path=N.decode(this.path.replace(/\\/g,"/"));e=e.replace(/\\/g,"/")}this.absolute=t.absolute||l.resolve(this.cwd,e);if(this.path==="")this.path="./";if(n){this.warn("TAR_ENTRY_INFO",`stripping ${n} from absolute path`,{entry:this,path:n+this.path})}if(this.statCache.has(this.absolute))this[g](this.statCache.get(this.absolute));else this[y]()}[y](){o.lstat(this.absolute,(e,t)=>{if(e)return this.emit("error",e);this[g](t)})}[g](e){this.statCache.set(this.absolute,e);this.stat=e;if(!e.isFile())e.size=0;this.type=L(e);this.emit("stat",e);this[h]()}[h](){switch(this.type){case"File":return this[f]();case"Directory":return this[d]();case"SymbolicLink":return this[m]();default:return this.end()}}[_](e){return I(e,this.type==="Directory",this.portable)}[p](){if(this.type==="Directory"&&this.portable)this.noMtime=true;this.header=new s({path:this.path,linkpath:this.linkpath,mode:this[_](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime});if(this.header.encode()&&!this.noPax)this.write(new r({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this.path,linkpath:this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode());this.write(this.header.block)}[d](){if(this.path.substr(-1)!=="/")this.path+="/";this.stat.size=0;this[p]();this.end()}[m](){o.readlink(this.absolute,(e,t)=>{if(e)return this.emit("error",e);this[S](t)})}[S](e){this.linkpath=e.replace(/\\/g,"/");this[p]();this.end()}[v](e){this.type="Link";this.linkpath=l.relative(this.cwd,e).replace(/\\/g,"/");this.stat.size=0;this[p]();this.end()}[f](){if(this.stat.nlink>1){const e=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(e)){const t=this.linkCache.get(e);if(t.indexOf(this.cwd)===0)return this[v](t)}this.linkCache.set(e,this.absolute)}this[p]();if(this.stat.size===0)return this.end();this[E]()}[E](){o.open(this.absolute,"r",(e,t)=>{if(e)return this.emit("error",e);this[x](t)})}[x](e){const t=512*Math.ceil(this.stat.size/512);const n=Math.min(t,this.maxReadSize);const i=Buffer.allocUnsafe(n);this[w](e,i,0,i.length,0,this.stat.size,t)}[w](e,t,n,i,r,s,a){o.read(e,t,n,i,r,(o,l)=>{if(o){return this[R](e,()=>this.emit("error",o))}this[b](e,t,n,i,r,s,a,l)})}[R](e,t){o.close(e,t)}[b](e,t,n,i,r,s,a,o){if(o<=0&&s>0){const t=new Error("encountered unexpected EOF");t.path=this.absolute;t.syscall="read";t.code="EOF";return this[R](e,()=>this.emit("error",t))}if(o>s){const t=new Error("did not encounter expected EOF");t.path=this.absolute;t.syscall="read";t.code="EOF";return this[R](e,()=>this.emit("error",t))}if(o===s){for(let e=o;e<i&&o<a;e++){t[e+n]=0;o++;s++}}const l=n===0&&o===t.length?t:t.slice(n,n+o);s-=o;a-=o;r+=o;n+=o;this.write(l);if(!s){if(a)this.write(Buffer.alloc(a));return this[R](e,e=>e?this.emit("error",e):this.end())}if(n>=i){t=Buffer.allocUnsafe(i);n=0}i=t.length-n;this[w](e,t,n,i,r,s,a)}});class WriteEntrySync extends D{constructor(e,t){super(e,t)}[y](){this[g](o.lstatSync(this.absolute))}[m](){this[S](o.readlinkSync(this.absolute))}[E](){this[x](o.openSync(this.absolute,"r"))}[w](e,t,n,i,r,s,a){let l=true;try{const u=o.readSync(e,t,n,i,r);this[b](e,t,n,i,r,s,a,u);l=false}finally{if(l)try{this[R](e,()=>{})}catch(e){}}}[R](e,t){o.closeSync(e);t()}}const A=O(class WriteEntryTar extends i{constructor(e,t){t=t||{};super(t);this.preservePaths=!!t.preservePaths;this.portable=!!t.portable;this.strict=!!t.strict;this.noPax=!!t.noPax;this.noMtime=!!t.noMtime;this.readEntry=e;this.type=e.type;if(this.type==="Directory"&&this.portable)this.noMtime=true;this.path=e.path;this.mode=this[_](e.mode);this.uid=this.portable?null:e.uid;this.gid=this.portable?null:e.gid;this.uname=this.portable?null:e.uname;this.gname=this.portable?null:e.gname;this.size=e.size;this.mtime=this.noMtime?null:t.mtime||e.mtime;this.atime=this.portable?null:e.atime;this.ctime=this.portable?null:e.ctime;this.linkpath=e.linkpath;if(typeof t.onwarn==="function")this.on("warn",t.onwarn);let n=false;if(l.isAbsolute(this.path)&&!this.preservePaths){const e=l.parse(this.path);n=e.root;this.path=this.path.substr(e.root.length)}this.remain=e.size;this.blockRemain=e.startBlockSize;this.header=new s({path:this.path,linkpath:this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime});if(n){this.warn("TAR_ENTRY_INFO",`stripping ${n} from absolute path`,{entry:this,path:n+this.path})}if(this.header.encode()&&!this.noPax)super.write(new r({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this.path,linkpath:this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode());super.write(this.header.block);e.pipe(this)}[_](e){return I(e,this.type==="Directory",this.portable)}write(e){const t=e.length;if(t>this.blockRemain)throw new Error("writing more to entry than is appropriate");this.blockRemain-=t;return super.write(e)}end(){if(this.blockRemain)this.write(Buffer.alloc(this.blockRemain));return super.end()}});D.Sync=WriteEntrySync;D.Tar=A;const L=e=>e.isFile()?"File":e.isDirectory()?"Directory":e.isSymbolicLink()?"SymbolicLink":"Unsupported";e.exports=D},304:function(e){e.exports=require("string_decoder")},324:function(e,t,n){var i=n(747);var r=n(669);var s=n(413);var a=s.Readable;var o=s.Writable;var l=s.PassThrough;var u=n(965);var c=n(614).EventEmitter;t.createFromBuffer=createFromBuffer;t.createFromFd=createFromFd;t.BufferSlicer=BufferSlicer;t.FdSlicer=FdSlicer;r.inherits(FdSlicer,c);function FdSlicer(e,t){t=t||{};c.call(this);this.fd=e;this.pend=new u;this.pend.max=1;this.refCount=0;this.autoClose=!!t.autoClose}FdSlicer.prototype.read=function(e,t,n,r,s){var a=this;a.pend.go(function(o){i.read(a.fd,e,t,n,r,function(e,t,n){o();s(e,t,n)})})};FdSlicer.prototype.write=function(e,t,n,r,s){var a=this;a.pend.go(function(o){i.write(a.fd,e,t,n,r,function(e,t,n){o();s(e,t,n)})})};FdSlicer.prototype.createReadStream=function(e){return new ReadStream(this,e)};FdSlicer.prototype.createWriteStream=function(e){return new WriteStream(this,e)};FdSlicer.prototype.ref=function(){this.refCount+=1};FdSlicer.prototype.unref=function(){var e=this;e.refCount-=1;if(e.refCount>0)return;if(e.refCount<0)throw new Error("invalid unref");if(e.autoClose){i.close(e.fd,onCloseDone)}function onCloseDone(t){if(t){e.emit("error",t)}else{e.emit("close")}}};r.inherits(ReadStream,a);function ReadStream(e,t){t=t||{};a.call(this,t);this.context=e;this.context.ref();this.start=t.start||0;this.endOffset=t.end;this.pos=this.start;this.destroyed=false}ReadStream.prototype._read=function(e){var t=this;if(t.destroyed)return;var n=Math.min(t._readableState.highWaterMark,e);if(t.endOffset!=null){n=Math.min(n,t.endOffset-t.pos)}if(n<=0){t.destroyed=true;t.push(null);t.context.unref();return}t.context.pend.go(function(e){if(t.destroyed)return e();var r=new Buffer(n);i.read(t.context.fd,r,0,n,t.pos,function(n,i){if(n){t.destroy(n)}else if(i===0){t.destroyed=true;t.push(null);t.context.unref()}else{t.pos+=i;t.push(r.slice(0,i))}e()})})};ReadStream.prototype.destroy=function(e){if(this.destroyed)return;e=e||new Error("stream destroyed");this.destroyed=true;this.emit("error",e);this.context.unref()};r.inherits(WriteStream,o);function WriteStream(e,t){t=t||{};o.call(this,t);this.context=e;this.context.ref();this.start=t.start||0;this.endOffset=t.end==null?Infinity:+t.end;this.bytesWritten=0;this.pos=this.start;this.destroyed=false;this.on("finish",this.destroy.bind(this))}WriteStream.prototype._write=function(e,t,n){var r=this;if(r.destroyed)return;if(r.pos+e.length>r.endOffset){var s=new Error("maximum file length exceeded");s.code="ETOOBIG";r.destroy();n(s);return}r.context.pend.go(function(t){if(r.destroyed)return t();i.write(r.context.fd,e,0,e.length,r.pos,function(e,i){if(e){r.destroy();t();n(e)}else{r.bytesWritten+=i;r.pos+=i;r.emit("progress");t();n()}})})};WriteStream.prototype.destroy=function(){if(this.destroyed)return;this.destroyed=true;this.context.unref()};r.inherits(BufferSlicer,c);function BufferSlicer(e,t){c.call(this);t=t||{};this.refCount=0;this.buffer=e;this.maxChunkSize=t.maxChunkSize||Number.MAX_SAFE_INTEGER}BufferSlicer.prototype.read=function(e,t,n,i,r){var s=i+n;var a=s-this.buffer.length;var o=a>0?a:n;this.buffer.copy(e,t,i,s);setImmediate(function(){r(null,o)})};BufferSlicer.prototype.write=function(e,t,n,i,r){e.copy(this.buffer,i,t,t+n);setImmediate(function(){r(null,n,e)})};BufferSlicer.prototype.createReadStream=function(e){e=e||{};var t=new l(e);t.destroyed=false;t.start=e.start||0;t.endOffset=e.end;t.pos=t.endOffset||this.buffer.length;var n=this.buffer.slice(t.start,t.pos);var i=0;while(true){var r=i+this.maxChunkSize;if(r>=n.length){if(i<n.length){t.write(n.slice(i,n.length))}break}t.write(n.slice(i,r));i=r}t.end();t.destroy=function(){t.destroyed=true};return t};BufferSlicer.prototype.createWriteStream=function(e){var t=this;e=e||{};var n=new o(e);n.start=e.start||0;n.endOffset=e.end==null?this.buffer.length:+e.end;n.bytesWritten=0;n.pos=n.start;n.destroyed=false;n._write=function(e,i,r){if(n.destroyed)return;var s=n.pos+e.length;if(s>n.endOffset){var a=new Error("maximum file length exceeded");a.code="ETOOBIG";n.destroyed=true;r(a);return}e.copy(t.buffer,n.pos,0,e.length);n.bytesWritten+=e.length;n.pos=s;n.emit("progress");r()};n.destroy=function(){n.destroyed=true};return n};BufferSlicer.prototype.ref=function(){this.refCount+=1};BufferSlicer.prototype.unref=function(){this.refCount-=1;if(this.refCount<0){throw new Error("invalid unref")}};function createFromBuffer(e,t){return new BufferSlicer(e,t)}function createFromFd(e,t){return new FdSlicer(e,t)}},336:function(e,t,n){const i=n(747);const r=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version;const s=r.replace(/^v/,"").split(".");const a=+s[0]>10||+s[0]===10&&+s[1]>=12;const o=!a?()=>false:e=>e.mkdir===i.mkdir;const l=!a?()=>false:e=>e.mkdirSync===i.mkdirSync;e.exports={useNative:o,useNativeSync:l}},357:function(e){e.exports=require("assert")},381:function(e,t,n){"use strict";const i=n(891);const r=n(203);const s=n(747);const a=n(827);const o=n(622);const l=e.exports=((e,t,n)=>{if(typeof e==="function")n=e,t=null,e={};else if(Array.isArray(e))t=e,e={};if(typeof t==="function")n=t,t=null;if(!t)t=[];else t=Array.from(t);const r=i(e);if(r.sync&&typeof n==="function")throw new TypeError("callback not supported for sync tar functions");if(!r.file&&typeof n==="function")throw new TypeError("callback only supported with file option");if(t.length)c(r,t);if(!r.noResume)u(r);return r.file&&r.sync?h(r):r.file?f(r,n):d(r)});const u=e=>{const t=e.onentry;e.onentry=t?e=>{t(e);e.resume()}:e=>e.resume()};const c=(e,t)=>{const n=new Map(t.map(e=>[e.replace(/\/+$/,""),true]));const i=e.filter;const r=(e,t)=>{const i=t||o.parse(e).root||".";const s=e===i?false:n.has(e)?n.get(e):r(o.dirname(e),i);n.set(e,s);return s};e.filter=i?(e,t)=>i(e,t)&&r(e.replace(/\/+$/,"")):e=>r(e.replace(/\/+$/,""))};const h=e=>{const t=d(e);const n=e.file;let i=true;let r;try{const a=s.statSync(n);const o=e.maxReadSize||16*1024*1024;if(a.size<o){t.end(s.readFileSync(n))}else{let e=0;const i=Buffer.allocUnsafe(o);r=s.openSync(n,"r");while(e<a.size){let n=s.readSync(r,i,0,o,e);e+=n;t.write(i.slice(0,n))}t.end()}i=false}finally{if(i&&r)try{s.closeSync(r)}catch(e){}}};const f=(e,t)=>{const n=new r(e);const i=e.maxReadSize||16*1024*1024;const o=e.file;const l=new Promise((e,t)=>{n.on("error",t);n.on("end",e);s.stat(o,(e,r)=>{if(e)t(e);else{const e=new a.ReadStream(o,{readSize:i,size:r.size});e.on("error",t);e.pipe(n)}})});return t?l.then(t,t):l};const d=e=>new r(e)},396:function(e){"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next){yield e.value}}}},413:function(e){e.exports=require("stream")},417:function(e){e.exports=require("crypto")},478:function(e){"use strict";const t=["|","<",">","?",":"];const n=t.map(e=>String.fromCharCode(61440+e.charCodeAt(0)));const i=new Map(t.map((e,t)=>[e,n[t]]));const r=new Map(n.map((e,n)=>[e,t[n]]));e.exports={encode:e=>t.reduce((e,t)=>e.split(t).join(i.get(t)),e),decode:e=>n.reduce((e,t)=>e.split(t).join(r.get(t)),e)}},538:function(e,t,n){var i=n(293).Buffer;var r=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];if(typeof Int32Array!=="undefined"){r=new Int32Array(r)}function ensureBuffer(e){if(i.isBuffer(e)){return e}var t=typeof i.alloc==="function"&&typeof i.from==="function";if(typeof e==="number"){return t?i.alloc(e):new i(e)}else if(typeof e==="string"){return t?i.from(e):new i(e)}else{throw new Error("input must be buffer, number, or string, received "+typeof e)}}function bufferizeInt(e){var t=ensureBuffer(4);t.writeInt32BE(e,0);return t}function _crc32(e,t){e=ensureBuffer(e);if(i.isBuffer(t)){t=t.readUInt32BE(0)}var n=~~t^-1;for(var s=0;s<e.length;s++){n=r[(n^e[s])&255]^n>>>8}return n^-1}function crc32(){return bufferizeInt(_crc32.apply(null,arguments))}crc32.signed=function(){return _crc32.apply(null,arguments)};crc32.unsigned=function(){return _crc32.apply(null,arguments)>>>0};e.exports=crc32},554:function(e,t){"use strict";t.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);t.code=new Map(Array.from(t.name).map(e=>[e[1],e[0]]))},561:function(e,t,n){const{dirname:i}=n(622);const{findMade:r,findMadeSync:s}=n(92);const{mkdirpManual:a,mkdirpManualSync:o}=n(806);const l=(e,t)=>{t.recursive=true;const n=i(e);if(n===e)return t.mkdirAsync(e,t);return r(t,e).then(n=>t.mkdirAsync(e,t).then(()=>n).catch(n=>{if(n.code==="ENOENT")return a(e,t);else throw n}))};const u=(e,t)=>{t.recursive=true;const n=i(e);if(n===e)return t.mkdirSync(e,t);const r=s(t,e);try{t.mkdirSync(e,t);return r}catch(n){if(n.code==="ENOENT")return o(e,t);else throw n}};e.exports={mkdirpNative:l,mkdirpNativeSync:u}},577:function(e,t,n){"use strict";const i=n(626);const r=n(747);const s=n(622);const a=n(941);class SymlinkError extends Error{constructor(e,t){super("Cannot extract through symbolic link");this.path=t;this.symlink=e}get name(){return"SylinkError"}}class CwdError extends Error{constructor(e,t){super(t+": Cannot cd into '"+e+"'");this.path=e;this.code=t}get name(){return"CwdError"}}const o=e.exports=((e,t,n)=>{const o=t.umask;const u=t.mode|448;const c=(u&o)!==0;const h=t.uid;const f=t.gid;const d=typeof h==="number"&&typeof f==="number"&&(h!==t.processUid||f!==t.processGid);const m=t.preserve;const v=t.unlink;const p=t.cache;const w=t.cwd;const y=(t,i)=>{if(t)n(t);else{p.set(e,true);if(i&&d)a(i,h,f,e=>y(e));else if(c)r.chmod(e,u,n);else n()}};if(p&&p.get(e)===true)return y();if(e===w)return r.stat(e,(t,n)=>{if(t||!n.isDirectory())t=new CwdError(e,t&&t.code||"ENOTDIR");y(t)});if(m)return i(e,{mode:u}).then(e=>y(null,e),y);const g=s.relative(w,e);const b=g.split(/\/|\\/);l(w,b,u,p,v,w,null,y)});const l=(e,t,n,i,s,a,o,c)=>{if(!t.length)return c(null,o);const h=t.shift();const f=e+"/"+h;if(i.get(f))return l(f,t,n,i,s,a,o,c);r.mkdir(f,n,u(f,t,n,i,s,a,o,c))};const u=(e,t,n,i,a,o,c,h)=>f=>{if(f){if(f.path&&s.dirname(f.path)===o&&(f.code==="ENOTDIR"||f.code==="ENOENT"))return h(new CwdError(o,f.code));r.lstat(e,(s,d)=>{if(s)h(s);else if(d.isDirectory())l(e,t,n,i,a,o,c,h);else if(a)r.unlink(e,s=>{if(s)return h(s);r.mkdir(e,n,u(e,t,n,i,a,o,c,h))});else if(d.isSymbolicLink())return h(new SymlinkError(e,e+"/"+t.join("/")));else h(f)})}else{c=c||e;l(e,t,n,i,a,o,c,h)}};const c=e.exports.sync=((e,t)=>{const n=t.umask;const o=t.mode|448;const l=(o&n)!==0;const u=t.uid;const c=t.gid;const h=typeof u==="number"&&typeof c==="number"&&(u!==t.processUid||c!==t.processGid);const f=t.preserve;const d=t.unlink;const m=t.cache;const v=t.cwd;const p=t=>{m.set(e,true);if(t&&h)a.sync(t,u,c);if(l)r.chmodSync(e,o)};if(m&&m.get(e)===true)return p();if(e===v){let t=false;let n="ENOTDIR";try{t=r.statSync(e).isDirectory()}catch(e){n=e.code}finally{if(!t)throw new CwdError(e,n)}p();return}if(f)return p(i.sync(e,o));const w=s.relative(v,e);const y=w.split(/\/|\\/);let g=null;for(let e=y.shift(),t=v;e&&(t+="/"+e);e=y.shift()){if(m.get(t))continue;try{r.mkdirSync(t,o);g=g||t;m.set(t,true)}catch(e){if(e.path&&s.dirname(e.path)===v&&(e.code==="ENOTDIR"||e.code==="ENOENT"))return new CwdError(v,e.code);const n=r.lstatSync(t);if(n.isDirectory()){m.set(t,true);continue}else if(d){r.unlinkSync(t);r.mkdirSync(t,o);g=g||t;m.set(t,true);continue}else if(n.isSymbolicLink())return new SymlinkError(t,t+"/"+y.join("/"))}}return p(g)})},582:function(e,t,n){"use strict";const i=n(232);const r=n(622);class Pax{constructor(e,t){this.atime=e.atime||null;this.charset=e.charset||null;this.comment=e.comment||null;this.ctime=e.ctime||null;this.gid=e.gid||null;this.gname=e.gname||null;this.linkpath=e.linkpath||null;this.mtime=e.mtime||null;this.path=e.path||null;this.size=e.size||null;this.uid=e.uid||null;this.uname=e.uname||null;this.dev=e.dev||null;this.ino=e.ino||null;this.nlink=e.nlink||null;this.global=t||false}encode(){const e=this.encodeBody();if(e==="")return null;const t=Buffer.byteLength(e);const n=512*Math.ceil(1+t/512);const s=Buffer.allocUnsafe(n);for(let e=0;e<512;e++){s[e]=0}new i({path:("PaxHeader/"+r.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:t,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(s);s.write(e,512,t,"utf8");for(let e=t+512;e<s.length;e++){s[e]=0}return s}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(e){if(this[e]===null||this[e]===undefined)return"";const t=this[e]instanceof Date?this[e].getTime()/1e3:this[e];const n=" "+(e==="dev"||e==="ino"||e==="nlink"?"SCHILY.":"")+e+"="+t+"\n";const i=Buffer.byteLength(n);let r=Math.floor(Math.log(i)/Math.log(10))+1;if(i+r>=Math.pow(10,r))r+=1;const s=r+i;return s+n}}Pax.parse=((e,t,n)=>new Pax(s(a(e),t),n));const s=(e,t)=>t?Object.keys(e).reduce((t,n)=>(t[n]=e[n],t),t):e;const a=e=>e.replace(/\n$/,"").split("\n").reduce(o,Object.create(null));const o=(e,t)=>{const n=parseInt(t,10);if(n!==Buffer.byteLength(t)+1)return e;t=t.substr((n+" ").length);const i=t.split("=");const r=i.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!r)return e;const s=i.join("=");e[r]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(r)?new Date(s*1e3):/^[0-9]+$/.test(s)?+s:s;return e};e.exports=Pax},598:function(e,t,n){var i=n(747);var r=n(250);var s=n(93);var a=n(608);var o=n(669);var l;var u;if(typeof Symbol==="function"&&typeof Symbol.for==="function"){l=Symbol.for("graceful-fs.queue");u=Symbol.for("graceful-fs.previous")}else{l="___graceful-fs.queue";u="___graceful-fs.previous"}function noop(){}var c=noop;if(o.debuglog)c=o.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))c=function(){var e=o.format.apply(o,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: ");console.error(e)};if(!global[l]){var h=[];Object.defineProperty(global,l,{get:function(){return h}});i.close=function(e){function close(t,n){return e.call(i,t,function(e){if(!e){retry()}if(typeof n==="function")n.apply(this,arguments)})}Object.defineProperty(close,u,{value:e});return close}(i.close);i.closeSync=function(e){function closeSync(t){e.apply(i,arguments);retry()}Object.defineProperty(closeSync,u,{value:e});return closeSync}(i.closeSync);if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")){process.on("exit",function(){c(global[l]);n(357).equal(global[l].length,0)})}}e.exports=patch(a(i));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!i.__patched){e.exports=patch(i);i.__patched=true}function patch(e){r(e);e.gracefulify=patch;e.createReadStream=createReadStream;e.createWriteStream=createWriteStream;var t=e.readFile;e.readFile=readFile;function readFile(e,n,i){if(typeof n==="function")i=n,n=null;return go$readFile(e,n,i);function go$readFile(e,n,i){return t(e,n,function(t){if(t&&(t.code==="EMFILE"||t.code==="ENFILE"))enqueue([go$readFile,[e,n,i]]);else{if(typeof i==="function")i.apply(this,arguments);retry()}})}}var n=e.writeFile;e.writeFile=writeFile;function writeFile(e,t,i,r){if(typeof i==="function")r=i,i=null;return go$writeFile(e,t,i,r);function go$writeFile(e,t,i,r){return n(e,t,i,function(n){if(n&&(n.code==="EMFILE"||n.code==="ENFILE"))enqueue([go$writeFile,[e,t,i,r]]);else{if(typeof r==="function")r.apply(this,arguments);retry()}})}}var i=e.appendFile;if(i)e.appendFile=appendFile;function appendFile(e,t,n,r){if(typeof n==="function")r=n,n=null;return go$appendFile(e,t,n,r);function go$appendFile(e,t,n,r){return i(e,t,n,function(i){if(i&&(i.code==="EMFILE"||i.code==="ENFILE"))enqueue([go$appendFile,[e,t,n,r]]);else{if(typeof r==="function")r.apply(this,arguments);retry()}})}}var a=e.readdir;e.readdir=readdir;function readdir(e,t,n){var i=[e];if(typeof t!=="function"){i.push(t)}else{n=t}i.push(go$readdir$cb);return go$readdir(i);function go$readdir$cb(e,t){if(t&&t.sort)t.sort();if(e&&(e.code==="EMFILE"||e.code==="ENFILE"))enqueue([go$readdir,[i]]);else{if(typeof n==="function")n.apply(this,arguments);retry()}}}function go$readdir(t){return a.apply(e,t)}if(process.version.substr(0,4)==="v0.8"){var o=s(e);ReadStream=o.ReadStream;WriteStream=o.WriteStream}var l=e.ReadStream;if(l){ReadStream.prototype=Object.create(l.prototype);ReadStream.prototype.open=ReadStream$open}var u=e.WriteStream;if(u){WriteStream.prototype=Object.create(u.prototype);WriteStream.prototype.open=WriteStream$open}Object.defineProperty(e,"ReadStream",{get:function(){return ReadStream},set:function(e){ReadStream=e},enumerable:true,configurable:true});Object.defineProperty(e,"WriteStream",{get:function(){return WriteStream},set:function(e){WriteStream=e},enumerable:true,configurable:true});var c=ReadStream;Object.defineProperty(e,"FileReadStream",{get:function(){return c},set:function(e){c=e},enumerable:true,configurable:true});var h=WriteStream;Object.defineProperty(e,"FileWriteStream",{get:function(){return h},set:function(e){h=e},enumerable:true,configurable:true});function ReadStream(e,t){if(this instanceof ReadStream)return l.apply(this,arguments),this;else return ReadStream.apply(Object.create(ReadStream.prototype),arguments)}function ReadStream$open(){var e=this;open(e.path,e.flags,e.mode,function(t,n){if(t){if(e.autoClose)e.destroy();e.emit("error",t)}else{e.fd=n;e.emit("open",n);e.read()}})}function WriteStream(e,t){if(this instanceof WriteStream)return u.apply(this,arguments),this;else return WriteStream.apply(Object.create(WriteStream.prototype),arguments)}function WriteStream$open(){var e=this;open(e.path,e.flags,e.mode,function(t,n){if(t){e.destroy();e.emit("error",t)}else{e.fd=n;e.emit("open",n)}})}function createReadStream(t,n){return new e.ReadStream(t,n)}function createWriteStream(t,n){return new e.WriteStream(t,n)}var f=e.open;e.open=open;function open(e,t,n,i){if(typeof n==="function")i=n,n=null;return go$open(e,t,n,i);function go$open(e,t,n,i){return f(e,t,n,function(r,s){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))enqueue([go$open,[e,t,n,i]]);else{if(typeof i==="function")i.apply(this,arguments);retry()}})}}return e}function enqueue(e){c("ENQUEUE",e[0].name,e[1]);global[l].push(e)}function retry(){var e=global[l].shift();if(e){c("RETRY",e[0].name,e[1]);e[0].apply(null,e[1])}}},605:function(e){e.exports=require("http")},608:function(e){"use strict";e.exports=clone;function clone(e){if(e===null||typeof e!=="object")return e;if(e instanceof Object)var t={__proto__:e.__proto__};else var t=Object.create(null);Object.getOwnPropertyNames(e).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}},610:function(e,t,n){(function(e){"use strict";var t=function(){return u.__string_rec(this,"")},i=i||{},r;function $extend(e,t){var n=Object.create(e);for(var i in t)n[i]=t[i];if(t.toString!==Object.prototype.toString)n.toString=t.toString;return n}var s=i["Attribute"]={__ename__:true,__constructs__:["Off","Bold","Underline","Blink","ReverseVideo","Concealed","BoldOff","UnderlineOff","BlinkOff","NormalVideo","ConcealedOff","Black","Red","Green","Yellow","Blue","Magenta","Cyan","White","DefaultForeground","BlackBack","RedBack","GreenBack","YellowBack","BlueBack","MagentaBack","CyanBack","WhiteBack","DefaultBackground"],Off:{_hx_index:0,__enum__:"Attribute",toString:t},Bold:{_hx_index:1,__enum__:"Attribute",toString:t},Underline:{_hx_index:2,__enum__:"Attribute",toString:t},Blink:{_hx_index:3,__enum__:"Attribute",toString:t},ReverseVideo:{_hx_index:4,__enum__:"Attribute",toString:t},Concealed:{_hx_index:5,__enum__:"Attribute",toString:t},BoldOff:{_hx_index:6,__enum__:"Attribute",toString:t},UnderlineOff:{_hx_index:7,__enum__:"Attribute",toString:t},BlinkOff:{_hx_index:8,__enum__:"Attribute",toString:t},NormalVideo:{_hx_index:9,__enum__:"Attribute",toString:t},ConcealedOff:{_hx_index:10,__enum__:"Attribute",toString:t},Black:{_hx_index:11,__enum__:"Attribute",toString:t},Red:{_hx_index:12,__enum__:"Attribute",toString:t},Green:{_hx_index:13,__enum__:"Attribute",toString:t},Yellow:{_hx_index:14,__enum__:"Attribute",toString:t},Blue:{_hx_index:15,__enum__:"Attribute",toString:t},Magenta:{_hx_index:16,__enum__:"Attribute",toString:t},Cyan:{_hx_index:17,__enum__:"Attribute",toString:t},White:{_hx_index:18,__enum__:"Attribute",toString:t},DefaultForeground:{_hx_index:19,__enum__:"Attribute",toString:t},BlackBack:{_hx_index:20,__enum__:"Attribute",toString:t},RedBack:{_hx_index:21,__enum__:"Attribute",toString:t},GreenBack:{_hx_index:22,__enum__:"Attribute",toString:t},YellowBack:{_hx_index:23,__enum__:"Attribute",toString:t},BlueBack:{_hx_index:24,__enum__:"Attribute",toString:t},MagentaBack:{_hx_index:25,__enum__:"Attribute",toString:t},CyanBack:{_hx_index:26,__enum__:"Attribute",toString:t},WhiteBack:{_hx_index:27,__enum__:"Attribute",toString:t},DefaultBackground:{_hx_index:28,__enum__:"Attribute",toString:t}};var a=function(){};a.__name__=true;a.systemName=function(){var e=process.platform;switch(e){case"darwin":return"Mac";case"freebsd":return"BSD";case"linux":return"Linux";case"win32":return"Windows";default:var t=e;return t}};var o=n(129);var l=function(){};l.__name__=true;l.field=function(e,t){try{return e[t]}catch(e){var n=e instanceof ae?e.val:e;return null}};l.fields=function(e){var t=[];if(e!=null){var n=Object.prototype.hasOwnProperty;for(var i in e){if(i!="__id__"&&i!="hx__closures__"&&n.call(e,i)){t.push(i)}}}return t};l.compare=function(e,t){if(e==t){return 0}else if(e>t){return 1}else{return-1}};l.isEnumValue=function(e){if(e!=null){return e.__enum__!=null}else{return false}};l.copy=function(e){if(e==null){return null}var t={};var n=0;var i=l.fields(e);while(n<i.length){var r=i[n];++n;t[r]=l.field(e,r)}return t};var u=function(){};u.__name__=true;u.getClass=function(e){if(e==null){return null}else if(e instanceof Array){return Array}else{var t=e.__class__;if(t!=null){return t}var n=u.__nativeClassName(e);if(n!=null){return u.__resolveNativeClass(n)}return null}};u.__string_rec=function(e,t){if(e==null){return"null"}if(t.length>=5){return"<...>"}var n=typeof e;if(n=="function"&&(e.__name__||e.__ename__)){n="object"}switch(n){case"function":return"<function>";case"object":if(e.__enum__){var r=i[e.__enum__];var s=r.__constructs__[e._hx_index];var a=r[s];if(a.__params__){t=t+"\t";return s+"("+function(n){var i;var r=[];{var s=0;var o=a.__params__;while(true){if(!(s<o.length)){break}var l=o[s];s=s+1;r.push(u.__string_rec(e[l],t))}}i=r;return i}(this).join(",")+")"}else{return s}}if(e instanceof Array){var o="[";t+="\t";var l=0;var c=e.length;while(l<c){var h=l++;o+=(h>0?",":"")+u.__string_rec(e[h],t)}o+="]";return o}var f;try{f=e.toString}catch(e){var d=e instanceof ae?e.val:e;return"???"}if(f!=null&&f!=Object.toString&&typeof f=="function"){var m=e.toString();if(m!="[object Object]"){return m}}var v="{\n";t+="\t";var p=e.hasOwnProperty!=null;var w=null;for(w in e){if(p&&!e.hasOwnProperty(w)){continue}if(w=="prototype"||w=="__class__"||w=="__super__"||w=="__interfaces__"||w=="__properties__"){continue}if(v.length!=2){v+=", \n"}v+=t+w+" : "+u.__string_rec(e[w],t)}t=t.substring(1);v+="\n"+t+"}";return v;case"string":return e;default:return String(e)}};u.__interfLoop=function(e,t){if(e==null){return false}if(e==t){return true}if(Object.prototype.hasOwnProperty.call(e,"__interfaces__")){var n=e.__interfaces__;var i=0;var r=n.length;while(i<r){var s=i++;var a=n[s];if(a==t||u.__interfLoop(a,t)){return true}}}return u.__interfLoop(e.__super__,t)};u.__instanceof=function(e,t){if(t==null){return false}switch(t){case Array:return e instanceof Array;case Ke:return typeof e=="boolean";case je:return e!=null;case Qe:return typeof e=="number";case Je:if(typeof e=="number"){return(e|0)===e}else{return false}break;case String:return typeof e=="string";default:if(e!=null){if(typeof t=="function"){if(u.__downcastCheck(e,t)){return true}}else if(typeof t=="object"&&u.__isNativeObj(t)){if(e instanceof t){return true}}}else{return false}if(t==$e?e.__name__!=null:false){return true}if(t==et?e.__ename__!=null:false){return true}return e.__enum__!=null?i[e.__enum__]==t:false}};u.__downcastCheck=function(e,t){if(!(e instanceof t)){if(t.__isInterface__){return u.__interfLoop(u.getClass(e),t)}else{return false}}else{return true}};u.__nativeClassName=function(e){var t=u.__toStr.call(e).slice(8,-1);if(t=="Object"||t=="Function"||t=="Math"||t=="JSON"){return null}return t};u.__isNativeObj=function(e){return u.__nativeClassName(e)!=null};u.__resolveNativeClass=function(t){return e[t]};var c=function(){};c.__name__=true;c.string=function(e){return u.__string_rec(e,"")};c.parseInt=function(e){if(e!=null){var t=0;var n=e.length;while(t<n){var i=t++;var r=e.charCodeAt(i);if(r<=8||r>=14&&r!=32&&r!=45){var s=parseInt(e,e[i+1]=="x"||e[i+1]=="X"?16:10);if(isNaN(s)){return null}else{return s}}}}return null};var h=function(){};h.__name__=true;h.aset=function(e){if(h.strip||h.stripIfUnavailable&&!h.available){return""}var t=""+"[";var n=[];var i=0;while(i<e.length){var r=e[i];++i;if(!u.__instanceof(r,s)){throw new ae("Set argument is not an Attribute: "+c.string(r))}n.push(h.values.get(r))}return t+n.join(";")+"m"};h.detectSupport=function(){if(a.systemName().toLowerCase().indexOf("window")==-1){var e=-1;try{e=o.spawnSync("tput",["colors"]).error==null?0:125}catch(e){var t=e instanceof ae?e.val:e}return e==0}else{return process.env["ANSICON"]!=null}};var f=function(){};f.__name__=true;f.__format_get=function(e,t){switch(t){case"%":return"%";case"A":return f.DAY_NAMES[e.getDay()];case"B":return f.MONTH_NAMES[e.getMonth()];case"C":return y.lpad(c.string(e.getFullYear()/100|0),"0",2);case"D":return f.__format(e,"%m/%d/%y");case"F":return f.__format(e,"%Y-%m-%d");case"I":case"l":var n=e.getHours()%12;return y.lpad(c.string(n==0?12:n),t=="I"?"0":" ",2);case"M":return y.lpad(c.string(e.getMinutes()),"0",2);case"R":return f.__format(e,"%H:%M");case"S":return y.lpad(c.string(e.getSeconds()),"0",2);case"T":return f.__format(e,"%H:%M:%S");case"Y":return c.string(e.getFullYear());case"a":return f.DAY_SHORT_NAMES[e.getDay()];case"b":case"h":return f.MONTH_SHORT_NAMES[e.getMonth()];case"d":return y.lpad(c.string(e.getDate()),"0",2);case"e":return c.string(e.getDate());case"H":case"k":return y.lpad(c.string(e.getHours()),t=="H"?"0":" ",2);case"m":return y.lpad(c.string(e.getMonth()+1),"0",2);case"n":return"\n";case"p":if(e.getHours()>11){return"PM"}else{return"AM"}break;case"r":return f.__format(e,"%I:%M:%S %p");case"s":return c.string(e.getTime()/1e3|0);case"t":return"\t";case"u":var i=e.getDay();if(i==0){return"7"}else if(i==null){return"null"}else{return""+i}break;case"w":return c.string(e.getDay());case"y":return y.lpad(c.string(e.getFullYear()%100),"0",2);default:throw new ae("Date.format %"+t+"- not implemented yet.")}};f.__format=function(e,t){var n="";var i=0;while(true){var r=t.indexOf("%",i);if(r<0){break}var s=r-i;n+=s==null?m.substr(t,i,null):m.substr(t,i,s);n+=c.string(f.__format_get(e,m.substr(t,r+1,1)));i=r+2}var a=t.length-i;n+=a==null?m.substr(t,i,null):m.substr(t,i,a);return n};f.format=function(e,t){return f.__format(e,t)};var d=function(e,t){this.r=new RegExp(e,t.split("u").join(""))};d.__name__=true;d.prototype={match:function(e){if(this.r.global){this.r.lastIndex=0}this.r.m=this.r.exec(e);this.r.s=e;return this.r.m!=null},__class__:d};var m=function(){};m.__name__=true;m.dateStr=function(e){var t=e.getMonth()+1;var n=e.getDate();var i=e.getHours();var r=e.getMinutes();var s=e.getSeconds();return e.getFullYear()+"-"+(t<10?"0"+t:""+t)+"-"+(n<10?"0"+n:""+n)+" "+(i<10?"0"+i:""+i)+":"+(r<10?"0"+r:""+r)+":"+(s<10?"0"+s:""+s)};m.strDate=function(e){switch(e.length){case 8:var t=e.split(":");var n=new Date;n["setTime"](0);n["setUTCHours"](t[0]);n["setUTCMinutes"](t[1]);n["setUTCSeconds"](t[2]);return n;case 10:var i=e.split("-");return new Date(i[0],i[1]-1,i[2],0,0,0);case 19:var r=e.split(" ");var s=r[0].split("-");var a=r[1].split(":");return new Date(s[0],s[1]-1,s[2],a[0],a[1],a[2]);default:throw new ae("Invalid date format : "+e)}};m.cca=function(e,t){var n=e.charCodeAt(t);if(n!=n){return undefined}return n};m.substr=function(e,t,n){if(n==null){n=e.length}else if(n<0){if(t==0){n=e.length+n}else{return""}}return e.substr(t,n)};m.iter=function(e){return{cur:0,arr:e,hasNext:function(){return this.cur<this.arr.length},next:function(){return this.arr[this.cur++]}}};var v=function(){};v.__name__=true;v.has=function(e,t){var n=$getIterator(e);while(n.hasNext()){var i=n.next();if(i==t){return true}}return false};Math.__name__=true;var p=function(){this.b=""};p.__name__=true;p.prototype={__class__:p};var w=function(){};w.__name__=true;w.quoteUnixArg=function(e){if(e==""){return"''"}if(!new d("[^a-zA-Z0-9_@%+=:,./-]","").match(e)){return e}return"'"+y.replace(e,"'","'\"'\"'")+"'"};w.quoteWinArg=function(e,t){if(!new d('^[^ \t\\\\"]+$',"").match(e)){var n="";var i=e.indexOf(" ")!=-1||e.indexOf("\t")!=-1||e=="";if(i){n+='"'}var r=new p;var s=0;var a=e.length;while(s<a){var o=s++;var l=m.cca(e,o);if(l==null){var u=l;if(r.b.length>0){n+=c.string(r.b);r=new p}n+=String.fromCodePoint(u)}else{switch(l){case 34:var h=r.b;n+=h==null?"null":""+h;n+=h==null?"null":""+h;r=new p;n+='\\"';break;case 92:r.b+="\\";break;default:var f=l;if(r.b.length>0){n+=c.string(r.b);r=new p}n+=String.fromCodePoint(f)}}}n+=c.string(r.b);if(i){n+=c.string(r.b);n+='"'}e=n}if(t){var v="";var y=0;var g=e.length;while(y<g){var b=y++;var S=m.cca(e,b);if(w.winMetaCharacters.indexOf(S)>=0){v+=String.fromCodePoint(94)}v+=String.fromCodePoint(S)}return v}else{return e}};var y=function(){};y.__name__=true;y.startsWith=function(e,t){if(e.length>=t.length){return e.lastIndexOf(t,0)==0}else{return false}};y.endsWith=function(e,t){var n=t.length;var i=e.length;if(i>=n){return e.indexOf(t,i-n)==i-n}else{return false}};y.isSpace=function(e,t){var n=m.cca(e,t);if(!(n>8&&n<14)){return n==32}else{return true}};y.ltrim=function(e){var t=e.length;var n=0;while(n<t&&y.isSpace(e,n))++n;if(n>0){return m.substr(e,n,t-n)}else{return e}};y.rtrim=function(e){var t=e.length;var n=0;while(n<t&&y.isSpace(e,t-n-1))++n;if(n>0){return m.substr(e,0,t-n)}else{return e}};y.trim=function(e){return y.ltrim(y.rtrim(e))};y.lpad=function(e,t,n){if(t.length<=0){return e}var i="";n-=e.length;while(i.length<n)i+=t==null?"null":""+t;i+=e==null?"null":""+e;return i};y.replace=function(e,t,n){return e.split(t).join(n)};var g=function(){};g.__name__=true;g.prototype={writeByte:function(e){throw new ae("Not implemented")},writeBytes:function(e,t,n){if(t<0||n<0||t+n>e.length){throw new ae(M.OutsideBounds)}var i=e.b;var r=n;while(r>0){this.writeByte(i[t]);++t;--r}return n},writeFullBytes:function(e,t,n){while(n>0){var i=this.writeBytes(e,t,n);t+=i;n-=i}},writeString:function(e,t){var n=C.ofString(e,t);this.writeFullBytes(n,0,n.length)},__class__:g};var b=function(e){this.fd=e};b.__name__=true;b.__super__=g;b.prototype=$extend(g.prototype,{writeByte:function(e){te.writeSync(this.fd,String.fromCodePoint(e))},writeBytes:function(e,t,n){var i=e.b;return te.writeSync(this.fd,fe.from(i.buffer,i.byteOffset,e.length),t,n)},writeString:function(e,t){te.writeSync(this.fd,e)},__class__:b});var S=function(){};S.__name__=true;S.prototype={readByte:function(){throw new ae("Not implemented")},readBytes:function(e,t,n){var i=n;var r=e.b;if(t<0||n<0||t+n>e.length){throw new ae(M.OutsideBounds)}try{while(i>0){r[t]=this.readByte();++t;--i}}catch(e){var s=e instanceof ae?e.val:e;if(s instanceof k){var a=s}else{throw e}}return n-i},readAll:function(e){if(e==null){e=16384}var t=new C(new ArrayBuffer(e));var n=new B;try{while(true){var i=this.readBytes(t,0,e);if(i==0){throw new ae(M.Blocked)}n.addBytes(t,0,i)}}catch(e){var r=e instanceof ae?e.val:e;if(r instanceof k){var s=r}else{throw e}}return n.getBytes()},__class__:S};var E=function(){};E.__name__=true;E.enumParameters=function(e){var t=i[e.__enum__];var n=t.__constructs__[e._hx_index];var r=t[n].__params__;if(r!=null){var s=[];var a=0;while(a<r.length){var o=r[a];++a;s.push(e[o])}return s}else{return[]}};var x=i["haxe.StackItem"]={__ename__:true,__constructs__:["CFunction","Module","FilePos","Method","LocalFunction"],CFunction:{_hx_index:0,__enum__:"haxe.StackItem",toString:t},Module:(r=function(e){return{_hx_index:1,m:e,__enum__:"haxe.StackItem",toString:t}},r.__params__=["m"],r),FilePos:(r=function(e,n,i,r){return{_hx_index:2,s:e,file:n,line:i,column:r,__enum__:"haxe.StackItem",toString:t}},r.__params__=["s","file","line","column"],r),Method:(r=function(e,n){return{_hx_index:3,classname:e,method:n,__enum__:"haxe.StackItem",toString:t}},r.__params__=["classname","method"],r),LocalFunction:(r=function(e){return{_hx_index:4,v:e,__enum__:"haxe.StackItem",toString:t}},r.__params__=["v"],r)};var R=function(){};R.__name__=true;R.__isInterface__=true;var _=function(e){var t=this;this.id=setInterval(function(){t.run()},e)};_.__name__=true;_.delay=function(e,t){var n=new _(t);n.run=function(){n.stop();e()};return n};_.prototype={stop:function(){if(this.id==null){return}clearInterval(this.id);this.id=null},run:function(){},__class__:_};var O=function(){};O.__name__=true;O.__interfaces__=[R];O.prototype={set:function(e,t){this.root=this.setLoop(e,t,this.root)},get:function(e){var t=this.root;while(t!=null){var n=this.compare(e,t.key);if(n==0){return t.value}if(n<0){t=t.left}else{t=t.right}}return null},setLoop:function(e,t,n){if(n==null){return new N(null,e,t,null)}var i=this.compare(e,n.key);if(i==0){return new N(n.left,e,t,n.right,n==null?0:n._height)}else if(i<0){var r=this.setLoop(e,t,n.left);return this.balance(r,n.key,n.value,n.right)}else{var s=this.setLoop(e,t,n.right);return this.balance(n.left,n.key,n.value,s)}},balance:function(e,t,n,i){var r=e==null?0:e._height;var s=i==null?0:i._height;if(r>s+2){var a=e.left;var o=e.right;if((a==null?0:a._height)>=(o==null?0:o._height)){return new N(e.left,e.key,e.value,new N(e.right,t,n,i))}else{return new N(new N(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new N(e.right.right,t,n,i))}}else if(s>r+2){var l=i.right;var u=i.left;if((l==null?0:l._height)>(u==null?0:u._height)){return new N(new N(e,t,n,i.left),i.key,i.value,i.right)}else{return new N(new N(e,t,n,i.left.left),i.left.key,i.left.value,new N(i.left.right,i.key,i.value,i.right))}}else{return new N(e,t,n,i,(r>s?r:s)+1)}},compare:function(e,t){return l.compare(e,t)},__class__:O};var N=function(e,t,n,i,r){if(r==null){r=-1}this.left=e;this.key=t;this.value=n;this.right=i;if(r==-1){var s;var a=this.left;var o=this.right;if((a==null?0:a._height)>(o==null?0:o._height)){var l=this.left;s=l==null?0:l._height}else{var u=this.right;s=u==null?0:u._height}this._height=s+1}else{this._height=r}};N.__name__=true;N.prototype={__class__:N};var I=function(){O.call(this)};I.__name__=true;I.__interfaces__=[R];I.__super__=O;I.prototype=$extend(O.prototype,{compare:function(e,t){var n=e._hx_index-t._hx_index;if(n!=0){return n}var i=E.enumParameters(e);var r=E.enumParameters(t);if(i.length==0&&r.length==0){return 0}return this.compareArgs(i,r)},compareArgs:function(e,t){var n=e.length-t.length;if(n!=0){return n}var i=0;var r=e.length;while(i<r){var s=i++;var a=this.compareArg(e[s],t[s]);if(a!=0){return a}}return 0},compareArg:function(e,t){if(l.isEnumValue(e)&&l.isEnumValue(t)){return this.compare(e,t)}else if(e instanceof Array&&t instanceof Array){return this.compareArgs(e,t)}else{return l.compare(e,t)}},__class__:I});var D=function(){this.h={}};D.__name__=true;D.__interfaces__=[R];D.prototype={__class__:D};var A=i["haxe.ds.Option"]={__ename__:true,__constructs__:["Some","None"],Some:(r=function(e){return{_hx_index:0,v:e,__enum__:"haxe.ds.Option",toString:t}},r.__params__=["v"],r),None:{_hx_index:1,__enum__:"haxe.ds.Option",toString:t}};var L=function(){this.h={}};L.__name__=true;L.__interfaces__=[R];L.prototype={setReserved:function(e,t){if(this.rh==null){this.rh={}}this.rh["$"+e]=t},getReserved:function(e){if(this.rh==null){return null}else{return this.rh["$"+e]}},keys:function(){return m.iter(this.arrayKeys())},arrayKeys:function(){var e=[];for(var t in this.h){if(this.h.hasOwnProperty(t)){e.push(t)}}if(this.rh!=null){for(var t in this.rh){if(t.charCodeAt(0)==36){e.push(t.substr(1))}}}return e},__class__:L};var C=function(e){this.length=e.byteLength;this.b=new Uint8Array(e);this.b.bufferValue=e;e.hxBytes=this;e.bytes=this.b};C.__name__=true;C.ofString=function(e,t){if(t==T.RawNative){var n=new Uint8Array(e.length<<1);var i=0;var r=e.length;while(i<r){var s=i++;var a=e.charCodeAt(s);n[s<<1]=a&255;n[s<<1|1]=a>>8}return new C(n.buffer)}var o=[];var l=0;while(l<e.length){var u=e.charCodeAt(l++);if(55296<=u&&u<=56319){u=u-55232<<10|e.charCodeAt(l++)&1023}if(u<=127){o.push(u)}else if(u<=2047){o.push(192|u>>6);o.push(128|u&63)}else if(u<=65535){o.push(224|u>>12);o.push(128|u>>6&63);o.push(128|u&63)}else{o.push(240|u>>18);o.push(128|u>>12&63);o.push(128|u>>6&63);o.push(128|u&63)}}return new C(new Uint8Array(o).buffer)};C.prototype={sub:function(e,t){if(e<0||t<0||e+t>this.length){throw new ae(M.OutsideBounds)}return new C(this.b.buffer.slice(e+this.b.byteOffset,e+this.b.byteOffset+t))},getString:function(e,t,n){if(e<0||t<0||e+t>this.length){throw new ae(M.OutsideBounds)}if(n==null){n=T.UTF8}var i="";var r=this.b;var s=e;var a=e+t;switch(n._hx_index){case 0:var o=e>0;while(s<a){var l=r[s++];if(l<128){if(l==0){break}i+=String.fromCodePoint(l)}else if(l<224){var u=(l&63)<<6|r[s++]&127;i+=String.fromCodePoint(u)}else if(l<240){var c=r[s++];var h=(l&31)<<12|(c&127)<<6|r[s++]&127;i+=String.fromCodePoint(h)}else{var f=r[s++];var d=r[s++];var m=(l&15)<<18|(f&127)<<12|(d&127)<<6|r[s++]&127;i+=String.fromCodePoint(m)}}break;case 1:while(s<a){var v=r[s++]|r[s++]<<8;i+=String.fromCodePoint(v)}break}return i},toString:function(){return this.getString(0,this.length)},__class__:C};var B=function(){this.pos=0;this.size=0};B.__name__=true;B.prototype={addBytes:function(e,t,n){if(t<0||n<0||t+n>e.length){throw new ae(M.OutsideBounds)}if(this.pos+n>this.size){this.grow(n)}if(this.size==0){return}var i=new Uint8Array(e.b.buffer,e.b.byteOffset+t,n);this.u8.set(i,this.pos);this.pos+=n},grow:function(e){var t=this.pos+e;var n=this.size==0?16:this.size;while(n<t)n=n*3>>1;var i=new ArrayBuffer(n);var r=new Uint8Array(i);if(this.size>0){r.set(this.u8)}this.size=n;this.buffer=i;this.u8=r;this.view=new DataView(this.buffer)},getBytes:function(){if(this.size==0){return new C(new ArrayBuffer(0))}var e=new C(this.buffer);e.length=this.pos;return e},__class__:B};var T=i["haxe.io.Encoding"]={__ename__:true,__constructs__:["UTF8","RawNative"],UTF8:{_hx_index:0,__enum__:"haxe.io.Encoding",toString:t},RawNative:{_hx_index:1,__enum__:"haxe.io.Encoding",toString:t}};var k=function(){};k.__name__=true;k.prototype={toString:function(){return"Eof"},__class__:k};var M=i["haxe.io.Error"]={__ename__:true,__constructs__:["Blocked","Overflow","OutsideBounds","Custom"],Blocked:{_hx_index:0,__enum__:"haxe.io.Error",toString:t},Overflow:{_hx_index:1,__enum__:"haxe.io.Error",toString:t},OutsideBounds:{_hx_index:2,__enum__:"haxe.io.Error",toString:t},Custom:(r=function(e){return{_hx_index:3,e:e,__enum__:"haxe.io.Error",toString:t}},r.__params__=["e"],r)};var F=function(e){switch(e){case".":case"..":this.dir=e;this.file="";return}var t=e.lastIndexOf("/");var n=e.lastIndexOf("\\");if(t<n){this.dir=m.substr(e,0,n);e=m.substr(e,n+1,null);this.backslash=true}else if(n<t){this.dir=m.substr(e,0,t);e=m.substr(e,t+1,null)}else{this.dir=null}var i=e.lastIndexOf(".");if(i!=-1){this.ext=m.substr(e,i+1,null);this.file=m.substr(e,0,i)}else{this.ext=null;this.file=e}};F.__name__=true;F.directory=function(e){var t=new F(e);if(t.dir==null){return""}return t.dir};F.extension=function(e){var t=new F(e);if(t.ext==null){return""}return t.ext};F.join=function(e){var t=[];var n=0;var i=e;while(n<i.length){var r=i[n];++n;if(r!=null&&r!=""){t.push(r)}}var s=t;if(s.length==0){return""}var a=s[0];var o=1;var l=s.length;while(o<l){var u=o++;a=F.addTrailingSlash(a);a+=s[u]}return F.normalize(a)};F.normalize=function(e){var t="/";e=e.split("\\").join(t);if(e==t){return t}var n=[];var i=0;var r=e.split(t);while(i<r.length){var s=r[i];++i;if(s==".."&&n.length>0&&n[n.length-1]!=".."){n.pop()}else if(s==""){if(n.length>0||m.cca(e,0)==47){n.push(s)}}else if(s!="."){n.push(s)}}var a=n.join(t);var o="";var l=false;var u=false;var c=0;var h=a;while(c<h.length){var f=h;var d=c++;var v=f.charCodeAt(d);if(v>=55296&&v<=56319){v=v-55232<<10|f.charCodeAt(d+1)&1023}var p=v;if(p>=65536){++c}var w=p;switch(w){case 47:if(!l){u=true}else{var y=w;l=false;if(u){o+="/";u=false}o+=String.fromCodePoint(y)}break;case 58:o+=":";l=true;break;default:var g=w;l=false;if(u){o+="/";u=false}o+=String.fromCodePoint(g)}}return o};F.addTrailingSlash=function(e){if(e.length==0){return"/"}var t=e.lastIndexOf("/");var n=e.lastIndexOf("\\");if(t<n){if(n!=e.length-1){return e+"\\"}else{return e}}else if(t!=e.length-1){return e+"/"}else{return e}};F.removeTrailingSlashes=function(e){e:while(true){var t=m.cca(e,e.length-1);if(t==null){break}else{switch(t){case 47:case 92:e=m.substr(e,0,-1);break;default:break e}}}return e};F.isAbsolute=function(e){if(y.startsWith(e,"/")){return true}if(e.charAt(1)==":"){return true}if(y.startsWith(e,"\\\\")){return true}return false};F.prototype={__class__:F};var U=function(e,t){this.cwd=e;this.args=t};U.__name__=true;U.interpolate=function(e,t){if(e.indexOf("${")==-1){return ne.Success(e)}var n="";var i=0;while(i<e.length){var r=e.indexOf("${",i);if(r==-1){var s=null;n+=s==null?m.substr(e,i,null):m.substr(e,i,s);break}else{var a=r;var o=a-i;n+=o==null?m.substr(e,i,null):m.substr(e,i,o);var l=a+2;var u;var h=e.indexOf("}",l);if(h==-1){return ne.Failure("unclosed interpolation in "+e)}else{var f=h;u=f}var d=m.substr(e,l,u-l);var v;var p=t(d);if(p==null){return ne.Failure("unknown variable "+d)}else{var w=p;if(w=="$"+"{"+d+"}"){v=w}else{var y=U.interpolate(w,t);if(y._hx_index==0){var g=y.data;v=g}else{var b=y;return b}}}n+=c.string(v);i=u+1}}return ne.Success(n)};U.fromMultilineString=function(e,t,n,i){if(i==null){i=false}var r=[];var s=new P;var a=function(e){if(e=="__dirname"){return F.directory(t)}else{return n(e)}};var o=function(e,n){var i=function(e){r.push({pos:H.File(t,n),val:e})};if(e.charAt(0)=="-"){i(e)}else{var o=U.interpolate(e,a);switch(o._hx_index){case 0:var l=o.data;i(l);break;case 1:var u=o.failure;s.fail(u,H.File(t,n));break}}};var l=e.split("\n");var u=y.trim;var c=new Array(l.length);var h=0;var f=l.length;while(h<f){var d=h++;c[d]=u(l[d])}var v=c;var p=0;var w=v.length;while(p<w){var g=p++;var b=v[g];var S=function(e,t){return function(n){t[0](n,e[0])}}([g],[o]);var E=b.charAt(0);if(E!=null){switch(E){case"#":break;case"-":var x=b.indexOf(" ");if(x==-1){S(b)}else{var R=x;S(m.substr(b,0,R));S(y.trim(m.substr(b,R,null)))}break;default:var _=y.trim(b);if(_!=""){var O=_;if(i){S("-cp")}S(O)}}}}return s.produce(r)};U.getNdll=function(e){if(y.startsWith(e,"ndll:")){return A.Some(m.substr(e,5,null))}else{return A.None}};U.split=function(e,t,n,i){var r=[];var s=0;var a=e.length;while(s<a){var o=s++;r.push({val:e[o],pos:H.Cmd(o)})}var l=r;var u=[];var c=[];var h=[];var f=new P;var d=function(e){if(F.isAbsolute(e)){return e}else{return F.join([t,e])}};var m=function(){if(c.length>0){var e=u.concat(c);var n=new U(t,e);c=[];h.push(n)}};while(true){var v=l.shift();if(v==null){m();break}else{var p=[v];var w=function(e){return function(t){var n=l.shift();if(n==null){f.fail(""+e[0].val+" without argument",e[0].pos)}else{var i=n;t(i)}}}(p);var g=p[0].val;switch(g){case"--each":u=c;c=[];break;case"--next":m();break;case"--run":case"-x":var b=[p[0]].concat(l);c=c.concat(b);l=[];m();break;case"--cwd":case"-C":var S=l.shift();if(S==null){f.fail(""+p[0].val+" without argument",p[0].pos)}else{var E=S;t=d(E.val);if(!n.isDirectory(t)){f.fail("Cannot use "+t+" as working directory",E.pos);l=[]}}break;default:var x=g;if(F.extension(x)=="hxml"){l=U.readHxml(d(x),n,i,f,p[0].pos).concat(l)}else{var R=g;if(y.startsWith(R,"${")){var _=U.interpolate(R,i);switch(_._hx_index){case 0:var O=_.data;c.push({val:O,pos:p[0].pos});break;case 1:var N=_.failure;f.fail(N,p[0].pos);break}}else{c.push(p[0])}}}}}return f.produce(h)};U.readHxml=function(e,t,n,i,r){var s=t.readFile(e);switch(s._hx_index){case 0:var a=s.data;return i.getResult(U.fromMultilineString(a,e,n));case 1:var o=s.failure;i.fail(o,r);return[]}};U.prototype={__class__:U};var z=function(){};z.__name__=true;z.to=function(e,t,n){return new We(new Ye(function(){return Fe.catchExceptions(t,function(t){return Fe.withData(null,"Failed to "+e,t,n)},{fileName:"haxeshim/Attempt.hx",lineNumber:8,className:"haxeshim.Attempt",methodName:"to"})}))};var W={};W.__name__=true;W.ofVars=function(e){var t={};var n=t;var i=0;var r=l.fields(e);while(i<r.length){var s=r[i];++i;n[X.IS_WINDOWS?s.toUpperCase():s]=e[s]}var a=n;return a};W.ofMap=function(e){var t={};var n=t;var i=e.keys();while(i.hasNext()){var r=i.next();n[X.IS_WINDOWS?r.toUpperCase():r]=tt[r]!=null?e.getReserved(r):e.h[r]}var s=n;return s};W.vars=function(e){return e};W.toVars=function(e){return l.copy(e)};W.get=function(e,t){return e[X.IS_WINDOWS?t.toUpperCase():t]};W.mergeInto=function(e,t){var n=W.vars(t);if(e==null){var i=n;var r=i;return r}else if(n==null){var s=e;var a=s;return a}else{var o=e;var u=n;var c={};var h=c;var f=u;var d=0;var m=l.fields(f);while(d<m.length){var v=m[d];++d;h[v]=f[v]}var p=o;var w=0;var y=l.fields(p);while(w<y.length){var g=y[w];++w;h[g]=p[g]}var b=h;return b}};var P=function(){this.errors=[]};P.__name__=true;P.prototype={fail:function(e,t,n){this.errors.push({message:e,pos:t,code:n})},produce:function(e){if(this.errors.length==0){return ne.Success(e)}else{return ne.Failure({result:e,errors:this.errors})}},getResult:function(e){switch(e._hx_index){case 0:var t=e.data;return t;case 1:var n=e.failure;var i=0;var r=n.errors;while(i<r.length){var s=r[i];++i;this.errors.push(s)}return n.result}},__class__:P};var H=i["haxeshim.Pos"]={__ename__:true,__constructs__:["File","Cmd","Custom"],File:(r=function(e,n){return{_hx_index:0,path:e,line:n,__enum__:"haxeshim.Pos",toString:t}},r.__params__=["path","line"],r),Cmd:(r=function(e){return{_hx_index:1,index:e,__enum__:"haxeshim.Pos",toString:t}},r.__params__=["index"],r),Custom:(r=function(e){return{_hx_index:2,source:e,__enum__:"haxeshim.Pos",toString:t}},r.__params__=["source"],r)};var G=function(){};G.__name__=true;G.die=function(e,t){if(t!=null){J.get().error(t)}process.exit(e);throw new ae("unreachable")};G.gracefully=function(e){try{return e()}catch(e){var t=e instanceof ae?e.val:e;if(t instanceof Fe){var n=t;return G.die(n.code,n.message)}else{return G.die(500,c.string(t))}}};G.mergeEnv=function(e){return W.mergeInto(e,W.ofVars(process.env))};G.shell=function(e,t,n){try{return ne.Success(o.execSync(e,{cwd:t,stdio:"inherit",env:W.toVars(G.mergeEnv(n))}))}catch(t){var i=t instanceof ae?t.val:t;return ne.Failure(new Fe(i.status,"Failed to invoke `"+e+"` because "+c.string(i),{fileName:"haxeshim/Exec.hx",lineNumber:47,className:"haxeshim.Exec",methodName:"shell"}))}};G.sync=function(e,t,n,i){var r=o.spawnSync(e,n,{cwd:t,stdio:"inherit",env:W.toVars(G.mergeEnv(i))});var s=r.stdout;var a=r.stderr;var l=r.status;var u=r.signal;var h=r.pid;var f=r.output;var d=r.error;if(d==null){var m=l;return ne.Success(m)}else{var v=l;var p=d;return ne.Failure(new Fe(v,"Failed to call "+e+" because "+c.string(p),{fileName:"haxeshim/Exec.hx",lineNumber:54,className:"haxeshim.Exec",methodName:"sync"}))}};G.eval=function(e,t,n,i){var r=o.spawnSync(e,n,{cwd:t,env:W.toVars(G.mergeEnv(i))});var s=r;if(s.error==null){return ne.Success({status:s.status,stdout:s.stdout.toString(),stderr:s.stderr.toString()})}else{var a=r.stdout;var l=r.stderr;var u=r.status;var h=r.signal;var f=r.pid;var d=r.output;var m=r.error;return ne.Failure(new Fe(null,"Failed to call "+e+" because "+c.string(m),{fileName:"haxeshim/Exec.hx",lineNumber:66,className:"haxeshim.Exec",methodName:"eval"}))}};var Y={};Y.__name__=true;Y.ofString=function(e){return C.ofString(e)};var Z=function(){};Z.__name__=true;Z.get=function(e,t){var n=e;return z.to("get content of "+e,function(){return te.readFileSync(n,{encoding:"utf8"})},t)};Z.save=function(e,t,n){return Xe.noise(Xe.next(Z.ensureDir(e),function(i){var r=e;var s=function(e){var t=e.b;var n=fe.from(t.buffer,t.byteOffset,e.length);te.writeFileSync(r,n)};var a=t;var o=function(){s(a)};return z.to("save to "+e,o,n)}))};Z.exists=function(e){var t=e;return z.to("check the existence of "+e,function(){return ee.exists(t)},{fileName:"haxeshim/Fs.hx",lineNumber:26,className:"haxeshim.Fs",methodName:"exists"})};Z.ensureDir=function(e){var t=y.endsWith(e,"/")||y.endsWith(e,"\\");if(t){e=F.removeTrailingSlashes(e)}var n=F.directory(e);if(F.removeTrailingSlashes(n)==e){return new We(new $(ne.Success(ze.Noise)))}else{return Xe.next(Xe.next(Z.exists(n),function(e){if(e){return new We(new $(ne.Success(ze.Noise)))}else{return Z.ensureDir(F.addTrailingSlash(n))}}),function(n){if(t){return Xe.next(Z.exists(e),function(t){return z.to("create directory "+e,function(){if(!t){ee.createDirectory(e)}return ze.Noise},{fileName:"haxeshim/Fs.hx",lineNumber:49,className:"haxeshim.Fs",methodName:"ensureDir"})})}else{return new We(new $(ne.Success(ze.Noise)))}})}};Z.ls=function(e,t){var n=[];var i=0;var r=te.readdirSync(e);while(i<r.length){var s=r[i];++i;var a=""+e+"/"+s;var o;if(t==null||t(a)){o=a}else{continue}n.push(o)}return n};Z.delete=function(e){return z.to("delete "+e,function(){if(e!=null&&ee.exists(e)){if(ee.isDirectory(e)){var t=0;var n=te.readdirSync(e);while(t<n.length){var i=n[t];++t;Z.delete(""+e+"/"+i)}if(ee.exists(e)){var r=0;var s=te.readdirSync(e);while(r<s.length){var a=s[r];++r;var o=e+"/"+a;if(ee.isDirectory(o)){if(ee.exists(o)){var l=0;var u=te.readdirSync(o);while(l<u.length){var c=u[l];++l;var h=o+"/"+c;if(ee.isDirectory(h)){ee.deleteDirectory(h)}else{te.unlinkSync(h)}}te.rmdirSync(o)}}else{te.unlinkSync(o)}}te.rmdirSync(e)}}else{te.unlinkSync(e)}}return},{fileName:"haxeshim/Fs.hx",lineNumber:107,className:"haxeshim.Fs",methodName:"delete"})};Z.peel=function(e,t){var n=0;var i=0;var r=t;while(i<r){var s=i++;var a=e.indexOf("/",n);if(a==-1){return A.None}else{var o=a;n=o+1}}return A.Some(m.substr(e,n,null))};Z.findNearest=function(e,t){while(true)if(ee.exists(""+t+"/"+e)){return A.Some(""+t+"/"+e)}else{var n=F.directory(t);var i=n;if(t==i){return A.None}else{var r=n;t=r}}};var X=function(){};X.__name__=true;X.slashes=function(e){if(X.IS_WINDOWS){return y.replace(e,"/","\\")}else{return e}};var V=function(e,t,n){this.path=e;this.version=t;this.compiler=""+e+"/haxe"+V.EXT;this.haxelib=""+e+"/haxelib"+V.EXT;this.stdLib=""+e+"/std";this.haxelibRepo=n};V.__name__=true;V.prototype={env:function(){var e=W.ofVars({HAXE_STD_PATH:this.stdLib,HAXEPATH:this.path,HAXELIB_PATH:this.haxelibRepo,HAXE_VERSION:this.version});return W.mergeInto(e,re.ENV)},__class__:V};var q=function(e){re.setEnv();this.scope=e;this.installation=e.haxeInstallation};q.__name__=true;q.exit=function(e){switch(e._hx_index){case 0:var t=e.data;process.exit(0);break;case 1:var n=e.failure;G.die(n.code,n.message);break}};q.exitWithCode=function(e){switch(e._hx_index){case 0:var t=e.data;process.exit(t);break;case 1:var n=e.failure;G.die(n.code,n.message);break}};q.main=function(){process.stdout.on("error",function(){});new q(ie.seek()).dispatch(process.argv.slice(2))};q.prototype={callHaxelib:function(e){q.exitWithCode(G.sync(this.installation.haxelib,process.cwd(),e,this.installation.env()))},path:function(e){var t=[];var n=[];var i=0;while(i<e.length){var s=e[i];++i;var a=U.getNdll(s);if(a._hx_index==0){var o=a.v;n.push("-L "+o)}else{t.push("-lib");t.push(s.split(":")[0])}}var l=(r=this.scope,$bind(r,r.resolve));var u=t;var h=G.gracefully(function(){return l(u)});var f=0;while(f<h.length){var d=h[f];switch(d){case"--cwd":++f;break;case"-cp":n.push(F.addTrailingSlash(h[++f]));break;case"-lib":var v=h[++f];var p=U.getNdll(v);if(p._hx_index==0){var w=p.v;n.push("-L "+w)}else{var y=v;var g="Unexpected -lib "+y+" returned from haxelib path "+e.join(" ");process.stdout.write(c.string(g));process.stdout.write("\n");process.exit(500)}break;default:var b=d;if(m.cca(b,0)==45){n.push(""+b+" "+h[++f])}}++f}var S=n.join("\n");process.stdout.write(c.string(S));process.exit(0)},run:function(e){var t=this;this.scope.getLibCommand(e).handle(function(n){switch(n._hx_index){case 0:var i=n.data;q.exit(i());break;case 1:var r=n.failure;var s=["run"].concat(e);t.callHaxelib(s);break}})},runDir:function(e,t,n){var i=this;Xe.next(Xe.next(Z.get(""+t+"/haxelib.json",{fileName:"haxeshim/HaxelibCli.hx",lineNumber:81,className:"haxeshim.HaxelibCli",methodName:"runDir"}),function(e){try{return new We(new $(ne.Success(JSON.parse(e).main)))}catch(e){return new We(new $(ne.Failure(Fe.withData(null,"failed to parse haxelib.json",e instanceof ae?e.val:e,{fileName:"haxeshim/HaxelibCli.hx",lineNumber:85,className:"haxeshim.HaxelibCli",methodName:"runDir"}))))}}),function(r){if(r==null){var s=[""+t+"/run.n"].concat(n).concat([F.removeTrailingSlashes(process.cwd())+"/"]);return new We(new $(G.sync("neko",t,s,W.ofVars({HAXELIB_RUN:"1",HAXELIB_LIBNAME:e}))))}else{var a=r;var o=i.installation.compiler;var l=o;if(ee.exists(l)){var u=["--run",r].concat(n).concat([F.removeTrailingSlashes(process.cwd())+"/"]);return new We(new $(G.sync(l,t,u,W.ofVars({HAXELIB_RUN:"1",HAXELIB_LIBNAME:e}))))}else{var c=o;return G.die(404,'haxe compiler not found at the expected location "'+c+'"')}}}).handle(q.exitWithCode)},dispatch:function(e){switch(e[0]){case"path":this.path(e.slice(1));break;case"run":this.run(e.slice(1));break;case"run-dir":if(e.length<3){G.die(402,"Not enough arguments. Syntax is `haxelib run-dir <name> <path> <...args>")}var t=e.slice(1);var n=(r=this.scope,$bind(r,r.interpolate));var i=function(e){return n(e)};var s=new Array(t.length);var a=0;var o=t.length;while(a<o){var l=a++;s[l]=i(t[l])}e=s;var u=e.shift();var c=e.shift();this.runDir(u,c,e);break;default:this.callHaxelib(e)}},__class__:q};var J=function(){};J.__name__=true;J.get=function(e){if(e==null){e=false}if(e){if(J.SILENT==null){J.SILENT=new J}return J.SILENT}else{if(J.DEFAULT==null){J.DEFAULT=new j}return J.DEFAULT}};J.prototype={error:function(e){},info:function(e){},success:function(e){},progress:function(e){},__class__:J};var j=function(){J.call(this)};j.__name__=true;j.__super__=J;j.prototype=$extend(J.prototype,{log:function(e,t){this.progress("");var n=j.out;var i;switch(e._hx_index){case 0:i=[s.Red];break;case 1:i=[s.Yellow];break;case 2:i=[s.DefaultForeground];break;case 3:i=[s.Green];break}n.writeString(h.aset(i)+t+h.aset([s.Off])+"\n")},error:function(e){this.log(Q.Error,e)},info:function(e){this.log(Q.Info,e)},success:function(e){this.log(Q.Success,e)},progress:function(e){if(j.isTTY){if(e.length>80){e=m.substr(e,0,77)+"..."}j.out.writeString((h.strip||h.stripIfUnavailable&&!h.available?"":"")+(h.strip||h.stripIfUnavailable&&!h.available?"":"["+1+"G")+e)}},__class__:j});var Q=i["haxeshim._Logger.Level"]={__ename__:true,__constructs__:["Error","Warning","Info","Success"],Error:{_hx_index:0,__enum__:"haxeshim._Logger.Level",toString:t},Warning:{_hx_index:1,__enum__:"haxeshim._Logger.Level",toString:t},Info:{_hx_index:2,__enum__:"haxeshim._Logger.Level",toString:t},Success:{_hx_index:3,__enum__:"haxeshim._Logger.Level",toString:t}};var K=function(){};K.__name__=true;K.__isInterface__=true;K.prototype={__class__:K};var $=function(e){this.value=e};$.__name__=true;$.__interfaces__=[K];$.prototype={get:function(){return this.value},__class__:$};var ee=function(){};ee.__name__=true;ee.exists=function(e){try{te.accessSync(e);return true}catch(e){var t=e instanceof ae?e.val:e;return false}};ee.isDirectory=function(e){try{return te.statSync(e).isDirectory()}catch(e){var t=e instanceof ae?e.val:e;return false}};ee.createDirectory=function(e){try{te.mkdirSync(e)}catch(r){var t=r instanceof ae?r.val:r;if(t.code=="ENOENT"){ee.createDirectory(ce.dirname(e));te.mkdirSync(e)}else{var n;try{n=te.statSync(e)}catch(e){var i=e instanceof ae?e.val:e;throw t}if(!n.isDirectory()){throw t}}}};ee.deleteDirectory=function(e){if(ee.exists(e)){var t=0;var n=te.readdirSync(e);while(t<n.length){var i=n[t];++t;var r=e+"/"+i;if(ee.isDirectory(r)){ee.deleteDirectory(r)}else{te.unlinkSync(r)}}te.rmdirSync(e)}};var te=n(747);var ne=i["tink.core.Outcome"]={__ename__:true,__constructs__:["Success","Failure"],Success:(r=function(e){return{_hx_index:0,data:e,__enum__:"tink.core.Outcome",toString:t}},r.__params__=["data"],r),Failure:(r=function(e){return{_hx_index:1,failure:e,__enum__:"tink.core.Outcome",toString:t}},r.__params__=["failure"],r)};var ie=function(e,t,n,i){this.haxeshimRoot=e;this.isGlobal=t;this.scopeDir=n;this.scopeLibDir=""+n+"/haxe_libraries";this.cwd=i;this.configFile=""+n+"/"+ie.CONFIG_FILE;this.versionDir=""+e+"/versions";this.haxelibRepo=""+e+"/haxelib";var r=process.env["HAXE_LIBCACHE"];var s=process.env["HAXESHIM_LIBCACHE"];var a;if(s==null){if(r==null){a=""+e+"/haxe_libraries"}else{var o=r;a=o}}else{var l=s;a=l}this.libCache=a};ie.__name__=true;ie.create=function(e,t){return Z.save(""+e+"/"+ie.CONFIG_FILE,Y.ofString(JSON.stringify(t,null," ")),{fileName:"haxeshim/Scope.hx",lineNumber:194,className:"haxeshim.Scope",methodName:"create"})};ie.exists=function(e){return ee.exists(""+e+"/"+ie.CONFIG_FILE)};ie.seek=function(e){if(e==null){e={}}var t;var n=e.cwd;if(n==null){t=process.cwd()}else{var i=n;t=i}var r;var s=e.startLookingIn;if(s==null){r=t}else{var a=s;r=a}var o;var l=e.haxeshimRoot;if(l==null){o=ie.DEFAULT_ROOT}else{var u=l;o=u}var c=function(e,t,n,i){return new ie(e,t,n,i)};var h=o;var f=t;var d=function(e,t){return c(h,e,t,f)};var m;var v=Z.findNearest(ie.CONFIG_FILE,ce.resolve(r));switch(v._hx_index){case 0:var p=v.v;m=d(false,F.directory(p));break;case 1:m=d(true,o);break}m.reload();return m};ie.env=function(e){var t=process.env[e];if(t==null){return A.None}else if(t==""){return A.None}else{var n=t;return A.Some(n)}};ie.prototype={reload:function(){var e;try{e=te.readFileSync(this.configFile,{encoding:"utf8"})}catch(e){throw new ae(this.isGlobal?"Global config file "+this.configFile+" does not exist or cannot be opened":"Unable to open file "+this.configFile+" because "+c.string(e instanceof ae?e.val:e))}var t;try{t=JSON.parse(e)}catch(t){var n=t instanceof ae?t.val:t;new b(2).writeString("Invalid JSON in file "+this.configFile+":\n\n"+e+"\n\n");throw ae.wrap(n)}this.setConfig(t)},setConfig:function(e){if(e.version==null){throw new ae("No version set in "+this.configFile)}if(e.resolveLibs==null){e.resolveLibs=this.isGlobal?"mixed":"scoped"}var t=e.resolveLibs;switch(t){case"haxelib":case"mixed":case"scoped":break;default:var n=t;throw new ae("invalid value "+n+" for `resolveLibs` in "+this.configFile)}this.config=e;this.haxeInstallation=this.getInstallation(e.version)},getVar:function(e){var t=process.env[e];if(t==null){return this.getDefault(e)}else if(t==""){return this.getDefault(e)}else{var n=t;return n}},getDefault:function(e){switch(e){case"CWD":return this.cwd;case"HAXESHIM_LIBCACHE":case"HAXE_LIBCACHE":return this.libCache;case"SCOPE_DIR":return this.scopeDir;default:return null}},reconfigure:function(e){var t=this;return Xe.next(Z.save(this.configFile,Y.ofString(JSON.stringify(e,null," ")),{fileName:"haxeshim/Scope.hx",lineNumber:201,className:"haxeshim.Scope",methodName:"reconfigure"}),function(n){t.setConfig(e);return new We(new $(ne.Success(n)))})},path:function(e){if(F.isAbsolute(e)){return A.Some(e)}else if(y.startsWith(e,"./")||y.startsWith(e,"../")){return A.Some(""+this.cwd+"/"+e)}else{return A.None}},getInstallation:function(e){var t=this.path(e);switch(t._hx_index){case 0:var n=t.v;return new V(n,e,this.haxelibRepo);case 1:return new V(""+this.versionDir+"/"+e,e,this.haxelibRepo)}},resolveThroughHaxelib:function(e){var t=this.haxeInstallation.haxelib;var n=this.cwd;var i=[];var r=0;while(r<e.length){var s=e[r];++r;i.push(s.val)}var a=G.eval(t,n,["path"].concat(i),this.haxeInstallation.env());switch(a._hx_index){case 0:var o=a.data;var l;var u=o.stderr;if(o.status==0){var c=o.stdout;return Ze.map(U.fromMultilineString(c,"haxelib path",$bind(this,this.getVar),true),function(e){var t=0;var n=e.length;while(t<n){var i=t++;if(e[i].val=="-L"){var r=function(t,n){var i=e[t].pos;var r=n(e[t].val);e[t]={pos:i,val:r}};r(i,function(e){return"-lib"});r(i+1,function(e){return"ndll:"+e})}}return e})}else{l=new Fe(o.status,o.stdout+o.stderr,{fileName:"haxeshim/Scope.hx",lineNumber:248,className:"haxeshim.Scope",methodName:"resolveThroughHaxelib"});var h=l;var f=new P;f.fail(h.message,H.Custom("haxelib path"),h.code);return f.produce([])}break;case 1:var d=a.failure;var m=new P;m.fail(d.message,H.Custom("haxelib path"),d.code);return m.produce([])}},interpolate:function(e,t){var n=this;var i;if(t==null){i=$bind(this,this.getVar)}else{var r=t;i=function(e){var t=r(e);if(t==null){return n.getVar(e)}else{var i=t;return i}}}return Ze.sure(U.interpolate(e,i))},parseDirectives:function(e){var t=new L;var n=0;var i=e.split("\n");var r=y.trim;var s=new Array(i.length);var a=0;var o=i.length;while(a<o){var l=a++;s[l]=r(i[l])}var u=s;while(n<u.length){var c=u[n];++n;if(y.startsWith(c,"#")){var h=y.ltrim(m.substr(c,1,null));if(y.startsWith(h,"@")){var f=h.indexOf(":");if(f!=-1){var d=f;var v=h.substring(1,d);var p;var w=tt[v]!=null?t.getReserved(v):t.h[v];if(w==null){var g=[];if(tt[v]!=null){t.setReserved(v,g)}else{t.h[v]=g}p=g}else{var b=w;p=b}p.push(this.interpolate(y.ltrim(m.substr(h,d+1,null))))}}}}return t},libHxml:function(e){return""+this.scopeLibDir+"/"+e+".hxml"},getDirectives:function(e){return Xe.next(Z.get(this.libHxml(e),{fileName:"haxeshim/Scope.hx",lineNumber:286,className:"haxeshim.Scope",methodName:"getDirectives"}),Ve.ofSafeSync($bind(this,this.parseDirectives)))},getLibCommand:function(e){var t=this;var n=[];var i=0;while(i<e.length){var r=e[i];++i;n.push(this.interpolate(r))}e=n;var s=e.shift();return Xe.next(this.getDirectives(s),function(n){var i=tt["run"]!=null?n.getReserved("run"):n.h["run"];if(i==null){return new We(new $(ne.Failure(new Fe(null,"no @run directive found for library "+s,{fileName:"haxeshim/Scope.hx",lineNumber:295,className:"haxeshim.Scope",methodName:"getLibCommand"}))))}else{switch(i.length){case 0:return new We(new $(ne.Failure(new Fe(null,"no @run directive found for library "+s,{fileName:"haxeshim/Scope.hx",lineNumber:295,className:"haxeshim.Scope",methodName:"getLibCommand"}))));case 1:var r=i[0];var a=[t.interpolate(r)];var o=X.IS_WINDOWS?function(e){return w.quoteWinArg(e,true)}:w.quoteUnixArg;var l=new Array(e.length);var u=0;var c=e.length;while(u<c){var h=u++;l[h]=o(e[h])}var f=a.concat(l).join(" ");var d=process.cwd();var m=t.haxeInstallation.env();return new We(new $(ne.Success(function(){return G.shell(f,d,m)})));default:return new We(new $(ne.Failure(new Fe(null,"more than one @run directive for library "+s,{fileName:"haxeshim/Scope.hx",lineNumber:300,className:"haxeshim.Scope",methodName:"getLibCommand"}))))}}})},resolveArgs:function(e){var t=this.cwd;var n=function(e){if(F.isAbsolute(e)){return e}else{return F.join([t,e])}};t=n(e.cwd);var i=[];var r=[];var s=new P;var a=[];var o=[];var l=[];var u=0;e:while(u<e.args.length){var c=e.args[u++];switch(c.val){case"--run":l=e.args.slice(u-1);break e;case"--connect":case"--display":case"--server-connect":case"--server-listen":o.push(c);var h=e.args[u++];if(h==null){s.fail(""+c.val+" requires argument",c.pos)}else{var f=h;o.push(f)}break;case"--wait":o.push(c);break;default:a.push(c)}}var d=new L;e:while(a.length>0){var m=[a.shift()];var v=function(e){return function(t){s.fail(t,e[0].pos)}}(m);var p=m[0].val;switch(p){case"--connect":case"--cwd":case"--each":case"--next":case"--run":case"--wait":case"-C":var w=p;if(y.endsWith(w,".hxml")){a=U.readHxml(n(w),ie.fs,$bind(this,this.getVar),s,m[0].pos).concat(a)}else{var g=p;v(""+g+" not allowed here");break e}break;case"--lib":case"-L":case"-lib":var b=a.shift();var S;if(b==null){v("-lib requires argument")}else{S=U.getNdll(b.val);if(S._hx_index==0){var E=S.v;var x=b;i.push(m[0]);i.push(x)}else{var R=b;var _=R.val;if(!(tt[_]!=null?d.getReserved(_):d.h[_])){var O=R.val;if(tt[O]!=null){d.setReserved(O,true)}else{d.h[O]=true}var N=this.config.resolveLibs;var I;if(N=="haxelib"){r.push(R)}else{I=N=="mixed";var D=I;var A=this.libHxml(R.val);var C=ie.fs.readFile(A);switch(C._hx_index){case 0:var B=C.data;var T=U.fromMultilineString(B,A,$bind(this,this.getVar));a=s.getResult(T).concat(a);break;case 1:var k=C.failure;if(ee.exists(A)){v(k)}else if(D){r.push(R)}else{v("-lib "+R.val+" is missing "+A)}break}}}}}break;default:var M=p;if(y.endsWith(M,".hxml")){a=U.readHxml(n(M),ie.fs,$bind(this,this.getVar),s,m[0].pos).concat(a)}else{i.push(m[0])}}}var z=o.concat(i);var W=this.resolveThroughHaxelib(r);i=z.concat(s.getResult(W)).concat(l);return s.produce(new se(t,i))},resolve:function(e){var t=[];var n=new P;var i=0;var r=n.getResult(U.split(e,this.cwd,ie.fs,$bind(this,this.getVar)));while(i<r.length){var s=r[i];++i;if(s.args.length>0){if(t.length!=0){t.push("--next")}if(s.cwd!=this.cwd){t.push("--cwd");t.push(s.cwd)}var a=0;var o=n.getResult(this.resolveArgs(s)).args;while(a<o.length){var l=o[a];++a;t.push(l.val)}}}var u=n.produce(42);if(u._hx_index==1){var h;h=u.failure.errors[0];var f=h;process.stdout.write(c.string(f.message));process.stdout.write("\n");var d;var m=f.code;if(m==null){d=500}else{var v=m;d=v}process.exit(d)}return t},__class__:ie};var re=function(){};re.__name__=true;re.setEnv=function(){if(re.isset){if(X.IS_WINDOWS){var e=0;var t=re.ENV;var n=t==null?[]:l.fields(t);while(e<n.length){var i=n[e];++e;var r=W.get(re.ENV,i);process.env[i]=r}}re.isset=false}};var se=function(e,t){U.call(this,e,t)};se.__name__=true;se.__super__=U;se.prototype=$extend(U.prototype,{__class__:se});var ae=function(e){Error.call(this);this.val=e;if(Error.captureStackTrace){Error.captureStackTrace(this,ae)}};ae.__name__=true;ae.wrap=function(e){if(e instanceof Error){return e}else{return new ae(e)}};ae.__super__=Error;ae.prototype=$extend(Error.prototype,{__class__:ae});var oe=function(){};oe.__name__=true;oe.sliceImpl=function(e,t){var n=new Uint8Array(this,e,t==null?null:t-e);var i=new Uint8Array(n.byteLength);i.set(n);return i.buffer};var le=n(605);var ue=n(211);var ce=n(622);var he=n(835);var fe=n(293).Buffer;var de=function(){};de.__name__=true;de.bytesOfBuffer=function(e){var t=Object.create(C.prototype);t.length=e.byteLength;t.b=e;e.bufferValue=e;e.hxBytes=t;e.bytes=e;return t};var me=n(413).PassThrough;var ve=function(){};ve.__name__=true;ve.attempt=function(e,t){var n=qe.ofSync(ve.reportError);var i=e.flatMap(function(e){switch(e._hx_index){case 0:var t=e.data;return new We(new $(t));case 1:var i=e.failure;return n(i)}});i.gather().handle(t)};ve.reportError=function(e){J.get().error(e.message);process.exit(e.code);return null};var pe=function(){};pe.__name__=true;pe.ensureScope=function(){if(ie.exists(ie.DEFAULT_ROOT)){return new We(new $(ne.Success(ze.Noise)))}else{return ie.create(ie.DEFAULT_ROOT,{version:"stable",resolveLibs:"mixed"})}};pe.ensure=function(e){return Xe.next(pe.ensureScope(),function(t){var n=ie.seek();var i=new _e(n,e);var r;if(!ee.exists(i.scope.haxeInstallation.path)){var s=i.scope.config.version;e.info("Version "+s+" configured in "+i.scope.configFile+" does not exist. Attempting download ...");r=i.install(s,{force:false})}else{r=new We(new $(ne.Success(ze.Noise)))}return Xe.next(r,function(e){return new We(new $(ne.Success(ze.Noise)))})})};var we=function(){};we.__name__=true;we.ensure=function(e){return Xe.next(ye.ensure(e),function(t){return pe.ensure(e)})};we.main=function(){ve.attempt(we.ensure(J.get()),Ae.fromNiladic(q.main))};var ye=function(){};ye.__name__=true;ye.ensure=function(e){return _e.ensureNeko(e)};var ge=n(766);var be=function(){};be.__name__=true;be.text=function(e){return Xe.next(be.bytes(e),function(e){return new We(new $(ne.Success(e.toString())))})};be.bytes=function(e){return be.download(e,function(e,t,n){be.buffered(t).handle(n)})};be.buffered=function(e){return Pe.async(function(t){var n=[];e.on("data",$bind(n,$arrayPush));e.on("end",function(){var e=ne.Success(de.bytesOfBuffer(fe.concat(n)));t(e)})})};be.archive=function(e,t,n,i){var r=be.withLogger(i,function(i,r,s){if(r.headers["content-type"]=="application/zip"||y.endsWith(e,".zip")||y.endsWith(i,".zip")){be.unzip(e,n,t,r,s)}else{be.untar(e,n,t,r,s)}});return be.download(e,r)};be.unzip=function(e,t,i,r,s){Xe.next(be.buffered(r),function(r){return Pe.async(function(a){var o=r.length-4;while(o-- >0)if(r.b[o]==80&&r.b[o+1]==75&&r.b[o+2]==5&&r.b[o+3]==6){r.b[o+20]=0;r.b[o+21]=0;r=r.sub(0,o+22);break}if(o==0){var l=ne.Failure(new Fe(422,"Unzip failed to find central directory in "+e,{fileName:"src/lix/client/Download.hx",lineNumber:70,className:"lix.client.Download",methodName:"unzip"}));a(l);return}var u=r.b;ge.fromBuffer(fe.from(u.buffer,u.byteOffset,r.length),function(r,o){var l=-1;var u=function(){l+=1;s.onProgress(l,o.entryCount,false);if(l==o.entryCount){var e=a;var n=ne.Success(t);_.delay(function(){e(n)},100)}};if(r!=null){var h=ne.Failure(new Fe(422,"Failed to unzip "+e+" because "+c.string(r),{fileName:"src/lix/client/Download.hx",lineNumber:83,className:"lix.client.Download",methodName:"unzip"}));a(h)}o.on("entry",function(e){var r=Z.peel(be.stripLeadingSlashes(e.fileName),i);switch(r._hx_index){case 0:var s=r.v;var a=""+t+"/"+s;if(y.endsWith(a,"/")){u()}else{Z.ensureDir(a).eager();o.openReadStream(e,function(e,t){var i=n(598).createWriteStream(a);t.pipe(i,{end:true});i.on("close",u)})}break;case 1:break}});o.on("end",function(){o.close();u()})})})}).handle($bind(s,s.done))};be.stripLeadingSlashes=function(e){if(e.charAt(0)=="/"){return be.stripLeadingSlashes(m.substr(e,1,null))}else{return e}};be.untar=function(e,t,i,r,s){return Pe.async(function(e){var a=0;var o=0;var l=[];var u=function(){s.onProgress(o,a+1,true)};var c=1;var h=function(n){if(n==null){n=0}o+=n;u();_.delay(function(){if((c-=1)<=0){s.onProgress(a,a,true);var n=[];var i=0;while(i<l.length){var r=[l[i]];++i;n.push(Pe.async(function(e){return function(t){te.unlink(e[0].to,function(e){return function(n){te.symlink(e[0].from,e[0].to,function(){return function(e){var n=e==null?ne.Success(ze.Noise):ne.Failure(new Fe(null,e.message,{fileName:"src/lix/client/Download.hx",lineNumber:142,className:"lix.client.Download",methodName:"untar"}));t(n)}}())}}(e))}}(r)))}Xe.next(Xe.inParallel(n),function(e){return new We(new $(ne.Success(t)))}).handle(e)}},100)};var f=null;var d=function(t){f=new Fe(null,t,{fileName:"src/lix/client/Download.hx",lineNumber:154,className:"lix.client.Download",methodName:"untar"});e(ne.Failure(f))};Ie.parse(r,function(r){if(f!=null){return}a+=r.size;u();var s=function(){r.on("data",function(){})};var o=Z.peel(be.stripLeadingSlashes(r.path),i);switch(o._hx_index){case 0:var d=o.v;var m=""+t+"/"+d;if(y.endsWith(m,"/")){s()}else{Z.ensureDir(m).handle(function(t){if(t._hx_index==1){var i=t.failure;f=i;e(ne.Failure(f))}else if(r.type=="SymbolicLink"){s();l.push({from:r.linkpath,to:m})}else{c+=1;var a=new me;var o=n(598).createWriteStream(m,{mode:r.mode});r.pipe(a,{end:true});a.pipe(o,{end:true});var u=h;var d=r.size;o.on("close",function(){u(d)})}})}break;case 1:s();break}}).handle(function(t){if(t._hx_index==1){var n=t.failure;e(ne.Failure(n))}else{h()}})}).handle($bind(s,s.done))};be.tar=function(e,t,n,i){var r=n;var s=t;return be.download(e,be.withLogger(i,function(e,t,n){return be.untar(e,r,s,t,n)}))};be.zip=function(e,t,n,i){var r=n;var s=t;return be.download(e,be.withLogger(i,function(e,t,n){be.unzip(e,r,s,t,n)}))};be.withLogger=function(e,t){return function(n,i,r){var s=c.parseInt(i.headers["content-length"]);var a=0;var o=0;var l=1;var u=null;var h=function(t){if(t==u){return}u=t;e.progress(t)};var f=function(e){e=Math.min(1,Math.max(0,e));var t=c.string(Math.round(1e3*e)/10);var n;if(t.indexOf(".")==-1){var i=t;n=""+i+".0"}else{var r=t;n=r}return y.lpad(n," ",5)+"%"};var d=new Date(0).getTime();var m=function(){if(!(o==l||o/l>=1)){var e=(new Date).getTime();if(e>d+137){d=e;var t=[];if(a<s){t.push("Downloaded: "+f(a/s))}if(o>0){t.push("Saved: "+f(o/l))}var n=" "+t.join(" ");h(n)}}};i.on("data",function(e){a+=e.length;m()});var v=0;t(n,i,{onProgress:function(e,t,n){o=e;l=t;if(n){var i=a/s;var r=o/l;var u=i*r;if(u<v){u=v}v=u;o=Math.round(u*1e3);l=1e3}m()},done:function(t){e.success("-> Done!");r(t)}})}};be.download=function(e,t){return Pe.async(function(n){var i=he.parse(e);i.agent=false;if(i.headers==null){i.headers={}}i.headers["user-agent"]=be.USER_AGENT;var r=function(t){var i=ne.Failure(Fe.withData(null,"Failed to download "+e+" because "+t.message,t,{fileName:"src/lix/client/Download.hx",lineNumber:293,className:"lix.client.Download",methodName:"download"}));n(i)};var s=y.startsWith(e,"https:")?ue.get(i):le.get(i);s.setTimeout(3e4);s.on("error",r);s.on("response",function(s){if(s.statusCode>=400){var a=ne.Failure(Fe.withData(s.statusCode,s.statusMessage,s,{fileName:"src/lix/client/Download.hx",lineNumber:304,className:"lix.client.Download",methodName:"download"}));n(a)}else{var o=s.headers["location"];if(o==null){s.on("error",r);t(e,s,function(e){switch(e._hx_index){case 0:var t=e.data;n(ne.Success(t));break;case 1:var i=e.failure;n(ne.Failure(i));break}})}else{var l=o;var u=he.parse(l);var c=u.slashes;var h=u.search;var f=u.query;var d=u.port;var m=u.pathname;var v=u.path;var p=u.href;var w=u.hostname;var y=u.host;var g=u.hash;var b=u.auth;be.download(u.protocol==null?i.protocol+"//"+i.host+l:l,t).handle(n)}}})})};var Se={};Se.__name__=true;Se.get_isPrerelease=function(e){return e.indexOf("-")!=-1};Se.isNumber=function(e){return new d("^[0-9]*$","").match(e)};Se.fragment=function(e,t){if(Se.isNumber(e)&&Se.isNumber(t)){return c.parseInt(e)-c.parseInt(t)}else{return l.compare(e,t)}};Se.compare=function(e,t){var n=e.split("-");var i=t.split("-");var r=0;while(r<n.length&&r<i.length){var s=n[r].split(".");var a=i[r++].split(".");var o=0;while(o<s.length&&o<a.length){var l=Se.fragment(s[o],a[o]);if(l==0){++o}else{var u=l;return-u}}var c=s.length-a.length;if(c!=0){var h=c;return-h}}return(n.length-i.length)*(r==1?1:-1)};var Ee=i["lix.client.haxe.ResolvedUserVersionData"]={__ename__:true,__constructs__:["RNightly","ROfficial","RCustom"],RNightly:(r=function(e){return{_hx_index:0,nightly:e,__enum__:"lix.client.haxe.ResolvedUserVersionData",toString:t}},r.__params__=["nightly"],r),ROfficial:(r=function(e){return{_hx_index:1,version:e,__enum__:"lix.client.haxe.ResolvedUserVersionData",toString:t}},r.__params__=["version"],r),RCustom:(r=function(e){return{_hx_index:2,path:e,__enum__:"lix.client.haxe.ResolvedUserVersionData",toString:t}},r.__params__=["path"],r)};var xe={};xe.__name__=true;xe.get_id=function(e){switch(e._hx_index){case 0:var t=e.nightly;var n=t.published;var i=t.file;var r=t.development;var s=t.hash;return s;case 1:var a=e.version;return a;case 2:var o=e.path;return o}};xe.toString=function(e){return Oe.toString(Oe.ofResolved(e))};var Re=i["lix.client.haxe.PickOfficial"]={__ename__:true,__constructs__:["StableOnly","IncludePrereleases"],StableOnly:{_hx_index:0,__enum__:"lix.client.haxe.PickOfficial",toString:t},IncludePrereleases:{_hx_index:1,__enum__:"lix.client.haxe.PickOfficial",toString:t}};var _e=function(e,t){this.scope=e;this.logger=t;Z.ensureDir(F.addTrailingSlash(e.versionDir)).eager();Z.ensureDir(F.addTrailingSlash(e.haxelibRepo)).eager();Z.ensureDir(this.downloads=e.haxeshimRoot+"/downloads/").eager()};_e.__name__=true;_e.linkToNightly=function(e,t,n){if(n==null){var i=_e.PLATFORM=="windows"&&t.getTime()>14944608e5?"zip":"tar.gz";n=f.format(t,"haxe_%Y-%m-%d_development_"+e+"."+i)}return f.format(t,""+_e.NIGHTLIES+"/"+_e.PLATFORM+"/"+n)};_e.sortedOfficial=function(e,t){if(e==Re.StableOnly){var n=[];var i=0;while(i<t.length){var r=t[i];++i;if(!Se.get_isPrerelease(r)){n.push(r)}}t=n}t.sort(Se.compare);return t};_e.officialOnline=function(e){return Xe.next(be.text("https://haxe.org/website-content/downloads/versions.json"),function(t){var n=JSON.parse(t).versions.map(function(e){return e.version});return new We(new $(ne.Success(_e.sortedOfficial(e,n))))})};_e.sortedNightlies=function(e){e.sort(function(e,t){return l.compare(t.published.getTime(),e.published.getTime())});return e};_e.nightliesOnline=function(){return Xe.next(be.text(""+_e.NIGHTLIES+"/"+_e.PLATFORM+"/"),Ve.ofSafeSync(function(e){var t=e.split("------------------\n").pop().split("\n");var n=[];var i=function(e){try{return A.Some(m.strDate(e))}catch(e){var t=e instanceof ae?e.val:e;return A.None}};var r=0;while(r<t.length){var s=t[r];++r;var a=y.trim(s).split('<a href="');if(a.length==2){var o=a[1];var l=i(a[0].split(" ")[0]);if(l._hx_index==0){var u;u=o.split('"')[0];var c=u;var h=l.v;var f=c.split(".")[0].split("_").pop();if(f==null){var d=f;n.push({hash:d,file:c,development:c.indexOf("_development_")!=-1,published:h})}else if(f!="latest"){var v=f;n.push({hash:v,file:c,development:c.indexOf("_development_")!=-1,published:h})}}}}return _e.sortedNightlies(n)}))};_e.attempt=function(e,t){try{return new We(new $(ne.Success(t.get())))}catch(t){return new We(new $(ne.Failure(new Fe(null,"Failed to "+e+" because "+c.string(t instanceof ae?t.val:t),{fileName:"src/lix/client/haxe/Switcher.hx",lineNumber:106,className:"lix.client.haxe.Switcher",methodName:"attempt"}))))}};_e.pickFirst=function(e,t,n){if(n==null){return _e.pickFirst(e,t,function(e){return true})}else{return function(i){var r=$getIterator(i);while(r.hasNext()){var s=r.next();if(n(s)){return new We(new $(ne.Success(t(s))))}}return new We(new $(ne.Failure(new Fe(404,"No "+e+" build found",{fileName:"src/lix/client/haxe/Switcher.hx",lineNumber:140,className:"lix.client.haxe.Switcher",methodName:"pickFirst"}))))}}};_e.ensureNeko=function(e){var t=re.PATH;if(ee.exists(t)){return new We(new $(ne.Success(t)))}else{e.info("Neko seems to be missing. Attempting download ...");var n;switch(a.systemName()){case"Mac":n=be.tar("https://github.com/HaxeFoundation/neko/releases/download/v2-3-0/neko-2.3.0-osx64.tar.gz",1,t,e);break;case"Windows":n=be.zip("https://github.com/HaxeFoundation/neko/releases/download/v2-3-0/neko-2.3.0-win.zip",1,t,e);break;default:n=be.tar("https://github.com/HaxeFoundation/neko/releases/download/v2-3-0/neko-2.3.0-linux64.tar.gz",1,t,e)}return Xe.next(n,function(t){e.success("done");return new We(new $(ne.Success(t)))})}};_e.prototype={officialInstalled:function(e){var t=[];var n=0;var i=te.readdirSync(this.scope.versionDir);while(n<i.length){var r=i[n];++n;if(!Oe.isHash(r)&&ee.isDirectory(this.versionDir(r))){t.push(r)}}return _e.attempt("Get installed Haxe versions",new $(_e.sortedOfficial(e,t)))},nightliesInstalled:function(){var e=[];var t=0;var n=Oe.isHash;var i=[];var r=0;var s=te.readdirSync(this.scope.versionDir);while(r<s.length){var a=s[r];++r;if(n(a)){i.push(a)}}var o=i;while(t<o.length){var l=o[t];++t;e.push({hash:l,published:m.strDate(JSON.parse(te.readFileSync(""+this.versionDir(l)+"/"+_e.VERSION_INFO,{encoding:"utf8"})).published)})}return _e.attempt("get installed Haxe versions",new $(_e.sortedNightlies(e)))},switchTo:function(e){if(xe.get_id(e)==this.scope.config.version){return new We(new $(ne.Success(ze.Noise)))}else{return this.scope.reconfigure({version:xe.get_id(e),resolveLibs:this.scope.config.resolveLibs})}},resolveInstalled:function(e){return this.resolve(e,$bind(this,this.officialInstalled),$bind(this,this.nightliesInstalled))},resolveOnline:function(e){return this.resolve(e,_e.officialOnline,_e.nightliesOnline)},resolve:function(e,t,n){switch(e._hx_index){case 0:return Xe.next(n(),_e.pickFirst("nightly",Ee.RNightly,function(e){return e.development!=false}));case 1:return Xe.next(t(Re.IncludePrereleases),_e.pickFirst("official",Ee.ROfficial));case 2:return Xe.next(t(Re.StableOnly),_e.pickFirst("stable",Ee.ROfficial));case 3:var i=e.hash;return Xe.ofSpecific(Xe.next(n(),function(e){var t=$getIterator(e);while(t.hasNext()){var n=t.next();if(n.hash==i){return new We(new $(ne.Success(Ee.RNightly(n))))}}return new We(new $(ne.Failure(new Fe(404,"Unable to resolve nightly version "+i+" locally, install it first with `lix install haxe "+i+"`",{fileName:"src/lix/client/haxe/Switcher.hx",lineNumber:165,className:"lix.client.haxe.Switcher",methodName:"resolve"}))))}));case 4:var r=e.version;return Xe.ofSpecific(Xe.next(t(Re.IncludePrereleases),function(e){if(v.has(e,r)){return new We(new $(ne.Success(Ee.ROfficial(r))))}else{return new We(new $(ne.Failure(new Fe(404,"Unable to resolve version "+r+" locally, install it first with `lix install haxe "+r+"`",{fileName:"src/lix/client/haxe/Switcher.hx",lineNumber:173,className:"lix.client.haxe.Switcher",methodName:"resolve"}))))}}));case 5:var s=e.path;return new We(new $(ne.Success(Ee.RCustom(s))))}},versionDir:function(e){return this.scope.getInstallation(e).path},isDownloaded:function(e){return ee.exists(this.versionDir(xe.get_id(e)))},linkToOfficial:function(e){var t="https://haxe.org/website-content/downloads/"+e+"/downloads/haxe-"+e+"-";var n;switch(a.systemName()){case"Mac":n="osx.tar.gz";break;case"Windows":var i="";if(e>"3.4.3"&&e!="4.0.0-preview.1"){var r=new sys.io.Process("WMIC OS GET osarchitecture /value");try{var s=r.stdout.readAll().toString();if(s.indexOf("64")>=0){i="64"}}catch(e){var o=e instanceof ae?e.val:e}r.close()}n="win"+i+".zip";break;default:n=e<"3"?"linux.tar.gz":"linux64.tar.gz"}return t+n},replace:function(e,t,n,i){var r=t;while(true){var s=Z.ls(t);if(s.length==1){var a=s[0];t=a}else{break}}if(i!=null){i(t)}if(ee.exists(e)){var o=""+this.downloads+"/"+n+"@"+Math.floor(te.statSync(e).ctime.getTime());te.renameSync(e,o);te.renameSync(t,e)}else{te.renameSync(t,e)}if(ee.exists(r)){Z.delete(r)}},install:function(e,t){return Xe.next(this.resolveAndDownload(e,t),$bind(this,this.switchTo))},resolveAndDownload:function(e,t){var n=this;var i;var r=Oe.ofString(e);if(r._hx_index==4){var s=r.version;i=this.resolveInstalled(Oe.ofString(e))}else{i=new We(new $(ne.Failure(new Fe(null,""+e+" needs to be resolved online",{fileName:"src/lix/client/haxe/Switcher.hx",lineNumber:244,className:"lix.client.haxe.Switcher",methodName:"resolveAndDownload"}))))}var a=function(t){n.logger.info('Looking up Haxe version "'+e+'" online');return Xe.next(n.resolveOnline(Oe.ofString(e)),function(e){n.logger.info(" Resolved to "+xe.toString(e)+". Downloading ...");return new We(new $(ne.Success(e)))})};var o=i.flatMap(function(e){switch(e._hx_index){case 0:var t=e.data;return new We(new $(e));case 1:var n=e.failure;return a(n)}});return Xe.next(o.gather(),function(e){return Xe.next(n.download(e,t),function(t){n.logger.success(!t?" ... already downloaded!":" ... download complete!");return new We(new $(ne.Success(e)))})})},download:function(e,t){var n=this;if(this.isDownloaded(e)==true){if(t.force!=true){return new We(new $(ne.Success(false)))}else{switch(e._hx_index){case 0:var i=e.nightly;var r=i.development;var s=i.published;var a=i.hash;var o=i.file;var l=_e.linkToNightly(a,s,o);var u=""+this.downloads+"/"+a+"@"+Math.floor((new Date).getTime());n.logger.info("Downloading Haxe: "+xe.toString(e));return Xe.next(be.archive(l,0,u,n.logger),function(e){var t=n.versionDir(a);n.replace(t,e,a,function(e){te.writeFileSync(""+e+"/"+_e.VERSION_INFO,JSON.stringify({published:m.dateStr(s)}))});return new We(new $(ne.Success(true)))});case 1:var c=e.version;var h=this.linkToOfficial(c);var f=""+this.downloads+"/"+c+"@"+Math.floor((new Date).getTime());n.logger.info("Downloading Haxe: "+xe.toString(e));var d=be.archive(h,0,f,n.logger);return Xe.next(d,function(e){var t=n.versionDir(c);n.replace(t,e,c);return new We(new $(ne.Success(true)))});case 2:var v=e.path;return new We(new $(ne.Failure(new Fe(null,"Cannot download custom version",{fileName:"src/lix/client/haxe/Switcher.hx",lineNumber:281,className:"lix.client.haxe.Switcher",methodName:"download"}))))}}}else{switch(e._hx_index){case 0:var p=e.nightly;var w=p.development;var y=p.published;var g=p.hash;var b=p.file;var S=_e.linkToNightly(g,y,b);var E=""+this.downloads+"/"+g+"@"+Math.floor((new Date).getTime());n.logger.info("Downloading Haxe: "+xe.toString(e));return Xe.next(be.archive(S,0,E,n.logger),function(e){var t=n.versionDir(g);n.replace(t,e,g,function(e){te.writeFileSync(""+e+"/"+_e.VERSION_INFO,JSON.stringify({published:m.dateStr(y)}))});return new We(new $(ne.Success(true)))});case 1:var x=e.version;var R=this.linkToOfficial(x);var _=""+this.downloads+"/"+x+"@"+Math.floor((new Date).getTime());n.logger.info("Downloading Haxe: "+xe.toString(e));var O=be.archive(R,0,_,n.logger);return Xe.next(O,function(e){var t=n.versionDir(x);n.replace(t,e,x);return new We(new $(ne.Success(true)))});case 2:var N=e.path;return new We(new $(ne.Failure(new Fe(null,"Cannot download custom version",{fileName:"src/lix/client/haxe/Switcher.hx",lineNumber:281,className:"lix.client.haxe.Switcher",methodName:"download"}))))}}},__class__:_e};var Oe={};Oe.__name__=true;Oe.ofResolved=function(e){switch(e._hx_index){case 0:var t=e.nightly;var n=t.published;var i=t.file;var r=t.development;var s=t.hash;return Ne.UNightly(s);case 1:var a=e.version;return Ne.UOfficial(a);case 2:var o=e.path;return Ne.UCustom(o)}};Oe.isHash=function(e){var t=0;var n=e.length;while(t<n){var i=t++;var r=Oe.hex;var s=e.charCodeAt(i);if(!r.h[s]){return false}}return true};Oe.toString=function(e){switch(e._hx_index){case 0:return"latest nightly build";case 1:return"latest official";case 2:return"latest stable release";case 3:var t=e.hash;return"nightly build "+t;case 4:var n=e.version;return"official release "+n;case 5:var i=e.path;return"custom version at `"+i+"`"}};Oe.isPath=function(e){if(!F.isAbsolute(e)){return e.charAt(0)=="."}else{return true}};Oe.ofString=function(e){if(e==null){return null}else{var t;var n;if(e==null){t=Oe.isHash(e);if(t==true){return Ne.UNightly(e)}else{n=Oe.isPath(e);if(n==true){return Ne.UCustom(e)}else{return Ne.UOfficial(e)}}}else{switch(e){case"auto":return null;case"latest":return Ne.ULatest;case"edge":case"nightly":return Ne.UEdge;case"stable":return Ne.UStable;default:t=Oe.isHash(e);if(t==true){return Ne.UNightly(e)}else{n=Oe.isPath(e);if(n==true){return Ne.UCustom(e)}else{return Ne.UOfficial(e)}}}}}};var Ne=i["lix.client.haxe.UserVersionData"]={__ename__:true,__constructs__:["UEdge","ULatest","UStable","UNightly","UOfficial","UCustom"],UEdge:{_hx_index:0,__enum__:"lix.client.haxe.UserVersionData",toString:t},ULatest:{_hx_index:1,__enum__:"lix.client.haxe.UserVersionData",toString:t},UStable:{_hx_index:2,__enum__:"lix.client.haxe.UserVersionData",toString:t},UNightly:(r=function(e){return{_hx_index:3,hash:e,__enum__:"lix.client.haxe.UserVersionData",toString:t}},r.__params__=["hash"],r),UOfficial:(r=function(e){return{_hx_index:4,version:e,__enum__:"lix.client.haxe.UserVersionData",toString:t}},r.__params__=["version"],r),UCustom:(r=function(e){return{_hx_index:5,path:e,__enum__:"lix.client.haxe.UserVersionData",toString:t}},r.__params__=["path"],r)};var Ie=function(){};Ie.__name__=true;Ie.parse=function(e,t){return Pe.async(function(n){var i=0;var r=0;var s=new De({onentry:function(e){i+=1;t(e)}});s.on("warn",function(){r+=1});s.on("end",function(){var e=i==0&&r!=0?ne.Failure(new Fe(422,"Invalid tar archive.",{fileName:"src/lix/client/uncompress/Tar.hx",lineNumber:23,className:"lix.client.uncompress.Tar",methodName:"parse"})):ne.Success(ze.Noise);n(e)});s.on("error",function(e){var t=ne.Failure(new Fe(null,e.message,{fileName:"src/lix/client/uncompress/Tar.hx",lineNumber:26,className:"lix.client.uncompress.Tar",methodName:"parse"}));n(t)});e.pipe(s,{end:true})})};var De=n(885).Parse;var Ae={};Ae.__name__=true;Ae.invoke=function(e,t){if(Ae.depth<500){Ae.depth++;e(t);Ae.depth--}else{var n=e;var i=function(e){Ae.invoke(n,e)};var r=t;Ae.defer(function(){i(r)})}};Ae.fromNiladic=function(e){return e};Ae.defer=function(e){process.nextTick(e)};var Le=function(){};Le.__name__=true;Le.__isInterface__=true;Le.prototype={__class__:Le};var Ce={};Ce.__name__=true;Ce.fromMany=function(e){var t=new Be(function(){if(e!=null){var t=0;while(t<e.length){var n=e[t];++t;if(n!=null){n.cancel()}}}else{e=null}});return t};var Be=function(e){this.f=e};Be.__name__=true;Be.__interfaces__=[Le];Be.prototype={cancel:function(){if(this.f!=null){this.f();this.f=null}},__class__:Be};var Te=function(e,t){this.dissolved=false;this.a=e;this.b=t};Te.__name__=true;Te.__interfaces__=[Le];Te.prototype={cancel:function(){if(!this.dissolved){this.dissolved=true;var e=this.a;if(e!=null){e.cancel()}var t=this.b;if(t!=null){t.cancel()}this.a=null;this.b=null}},__class__:Te};var ke=function(e,t){if(e==null){throw new ae("callback expected but null received")}this.cb=e;this.list=t};ke.__name__=true;ke.__interfaces__=[Le];ke.prototype={cancel:function(){if(this.list!=null){var e=this.list;this.cb=null;this.list=null;if(--e.used<e.used>>1){e.compact()}}},__class__:ke};var Me=function(){this.busy=false;this.queue=[];this.used=0;this.cells=[]};Me.__name__=true;Me.prototype={ondrain:function(){},invoke:function(e,t){if(this.busy){var n=$bind(this,this.invoke);var i=e;var r=t;var s=function(){n(i,r);return};this.queue.push(s)}else{this.busy=true;var a=this.cells.length;var o=0;var l=a;while(o<l){var u=o++;var c=this.cells[u];if(c.list!=null){Ae.invoke(c.cb,e)}}this.busy=false;if(t){var h=this.cells.length-a;var f=0;var d=a;while(f<d){var m=f++;var v=this.cells[m];v.cb=null;v.list=null}var p=0;var w=h;while(p<w){var y=p++;this.cells[y]=this.cells[a+y]}this.resize(h)}else if(this.used<this.cells.length){this.compact()}if(this.queue.length>0){this.queue.shift()()}}},compact:function(){if(this.busy){return}else if(this.used==0){this.resize(0);this.ondrain()}else{var e=0;var t=0;var n=this.cells.length;while(t<n){var i=t++;var r=this.cells[i];var s=r.list;if(r.cb!=null){var a=r;if(e!=i){this.cells[e]=a}if(++e==this.used){break}}}this.resize(this.used)}},resize:function(e){this.cells.length=e},__class__:Me};var Fe=function(e,t,n){if(e==null){e=500}this.isTinkError=true;this.code=e;this.message=t;this.pos=n;this.exceptionStack=[];this.callStack=[]};Fe.__name__=true;Fe.withData=function(e,t,n,i){return Fe.typed(e,t,n,i)};Fe.typed=function(e,t,n,i){var r=new Fe(e,t,i);r.data=n;return r};Fe.asError=function(e){if(e!=null&&e.isTinkError){return e}else{return null}};Fe.catchExceptions=function(e,t,n){try{return ne.Success(e())}catch(e){var i=e instanceof ae?e.val:e;var r=Fe.asError(i);var s;if(r==null){s=t==null?Fe.withData(null,"Unexpected Error",i,n):t(i)}else{var a=r;s=a}return ne.Failure(s)}};Fe.prototype={throwSelf:function(){var e=this;throw ae.wrap(e)},__class__:Fe};var Ue=function(){};Ue.__name__=true;Ue.__isInterface__=true;Ue.prototype={__class__:Ue};var ze=i["tink.core.Noise"]={__ename__:true,__constructs__:["Noise"],Noise:{_hx_index:0,__enum__:"tink.core.Noise",toString:t}};var We=function(e){this.value=e};We.__name__=true;We.__interfaces__=[Ue];We.prototype={flatMap:function(e){var t=this;return new Ge(function(n){var i=t.value.get();return e(i).handle(n)})},handle:function(e){Ae.invoke(e,this.value.get());return null},eager:function(){return this},gather:function(){return this},__class__:We};var Pe={};Pe.__name__=true;Pe.flatten=function(e){return new Ge(function(t){var n=null;var i=e.handle(function(e){n=e.handle(t)});var r=new Be(function(){if(n!=null){n.cancel()}});return new Te(i,r)})};Pe.async=function(e,t){if(t==null){t=false}if(t){return new Ge(function(t){e(t);return null})}else{var n=new He;var i=e;Ae.invoke(i,$bind(n,n.trigger));return n}};var He=function(){this.list=new Me};He.__name__=true;He.__interfaces__=[Ue];He.prototype={handle:function(e){var t=this.list;if(t==null){Ae.invoke(e,this.result);return null}else{var n=t;var i=new ke(e,n);n.cells.push(i);n.used++;return i}},flatMap:function(e){var t=this.list;if(t==null){return e(this.result)}else{var n=t;var i=new He;var r=this.list;var s=new ke(function(t){e(t).handle($bind(i,i.trigger))},r);r.cells.push(s);r.used++;return i}},gather:function(){return this},eager:function(){return this},trigger:function(e){if(this.list==null){return false}else{var t=this.list;this.list=null;this.result=e;t.invoke(e,true);return true}},__class__:He};var Ge=function(e){this.suspended=true;var t=this;this.wakeup=e;this.callbacks=new Me;this.callbacks.ondrain=function(){if(t.callbacks!=null){t.suspended=true;var e=t.link;if(e!=null){e.cancel()}t.link=null}}};Ge.__name__=true;Ge.__interfaces__=[Ue];Ge.prototype={trigger:function(e){var t=this.callbacks;if(t!=null){var n=t;this.callbacks=null;this.suspended=false;this.result=e;this.link=null;this.wakeup=null;n.invoke(e,true)}},handle:function(e){var t=this.callbacks;if(t==null){Ae.invoke(e,this.result);return null}else{var n=t;var i=this.callbacks;var r=new ke(e,i);i.cells.push(r);i.used++;var s=r;if(this.suspended){this.suspended=false;this.link=this.wakeup($bind(this,this.trigger))}return s}},map:function(e){var t=this;return new Ge(function(n){return t.handle(function(t){var i=e(t);n(i)})})},flatMap:function(e){return Pe.flatten(this.map(e))},gather:function(){return this},eager:function(){this.handle(Ae.fromNiladic(function(){}));return this},__class__:Ge};var Ye=function(e){this.f=e};Ye.__name__=true;Ye.__interfaces__=[K];Ye.prototype={get:function(){if(this.f!=null){this.result=this.f();this.f=null}return this.result},__class__:Ye};var Ze=function(){};Ze.__name__=true;Ze.sure=function(e){switch(e._hx_index){case 0:var t=e.data;return t;case 1:var n=e.failure;var i=Fe.asError(n);if(i==null){throw new ae(n)}else{var r=i;return r.throwSelf()}break}};Ze.map=function(e,t){switch(e._hx_index){case 0:var n=e.data;return ne.Success(t(n));case 1:var i=e.failure;return ne.Failure(i)}};var Xe={};Xe.__name__=true;Xe.noise=function(e){return Xe.next(e,function(e){return new We(new $(ne.Success(ze.Noise)))})};Xe.next=function(e,t,n){if(n==null){n=true}var i=n;if(i==null){i=true}var r=e.flatMap(function(e){switch(e._hx_index){case 0:var n=e.data;return t(n);case 1:var i=e.failure;return new We(new $(ne.Failure(i)))}});if(i){return r.gather()}else{return r}};Xe.ofSpecific=function(e){return e};Xe.inParallel=function(e,t,n){if(e.length==0){return new We(new $(ne.Success([])))}else{return Pe.async(function(n){var i=[];var r=e.length;var s=null;var a=[];var o=false;var l=0;var u=m.iter(e);var c=null;var h=function(e){if(s==null){o=true}else if(s!=null){s.cancel()}n(e)};var f=function(e){r=0;h(ne.Failure(e))};var d=function(e,t){i[e]=t;if((r-=1)==0){h(ne.Success(i))}else if(u.hasNext()&&r>0){c()}};c=function(){l+=1;var e=l-1;var t=u.next().handle(function(t){switch(t._hx_index){case 0:var n=t.data;d(e,n);break;case 1:var i=t.failure;f(i);break}});a.push(t)};while(true){var v;if(u.hasNext()&&r>0){if(t!=null){t-=1;v=t+1>0}else{v=true}}else{v=false}if(!v){break}c()}s=Ce.fromMany(a);if(o){if(s!=null){s.cancel()}}},n)}};var Ve={};Ve.__name__=true;Ve.ofSafeSync=function(e){return function(t){return new We(new $(ne.Success(e(t))))}};var qe={};qe.__name__=true;qe.ofSync=function(e){return function(t){return new We(new $(e(t)))}};function $getIterator(e){if(e instanceof Array)return m.iter(e);else return e.iterator()}function $bind(t,n){if(n==null)return null;if(n.__id__==null)n.__id__=e.$haxeUID++;var i;if(t.hx__closures__==null)t.hx__closures__={};else i=t.hx__closures__[n.__id__];if(i==null){i=n.bind(t);t.hx__closures__[n.__id__]=i}return i}function $arrayPush(e){this.push(e)}e.$haxeUID|=0;u.__toStr={}.toString;if(String.fromCodePoint==null)String.fromCodePoint=function(e){return e<65536?String.fromCharCode(e):String.fromCharCode((e>>10)+55232)+String.fromCharCode((e&1023)+56320)};String.prototype.__class__=String;String.__name__=true;Array.__name__=true;Date.prototype.__class__=Date;Date.__name__="Date";var Je={};var je={};var Qe=Number;var Ke=Boolean;var $e={};var et={};var tt={};Object.defineProperty(ae.prototype,"message",{get:function(){return String(this.val)}});if(ArrayBuffer.prototype.slice==null){ArrayBuffer.prototype.slice=oe.sliceImpl}h.values=function(e){var t;var n=new I;n.set(s.Off,0);n.set(s.Bold,1);n.set(s.Underline,4);n.set(s.Blink,5);n.set(s.ReverseVideo,7);n.set(s.Concealed,8);n.set(s.BoldOff,22);n.set(s.UnderlineOff,24);n.set(s.BlinkOff,25);n.set(s.NormalVideo,27);n.set(s.ConcealedOff,28);n.set(s.Black,30);n.set(s.Red,31);n.set(s.Green,32);n.set(s.Yellow,33);n.set(s.Blue,34);n.set(s.Magenta,35);n.set(s.Cyan,36);n.set(s.White,37);n.set(s.DefaultForeground,39);n.set(s.BlackBack,40);n.set(s.RedBack,41);n.set(s.GreenBack,42);n.set(s.YellowBack,43);n.set(s.BlueBack,44);n.set(s.MagentaBack,45);n.set(s.CyanBack,46);n.set(s.WhiteBack,47);n.set(s.DefaultBackground,49);t=n;return t}(this);h.available=h.detectSupport();h.strip=false;h.stripIfUnavailable=true;f.DAY_SHORT_NAMES=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];f.DAY_NAMES=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];f.MONTH_SHORT_NAMES=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];f.MONTH_NAMES=["January","February","March","April","May","June","July","August","September","October","November","December"];w.winMetaCharacters=[32,40,41,37,33,94,34,60,62,38,124,10,13,44,59];X.IS_WINDOWS=a.systemName()=="Windows";X.DELIMITER=X.IS_WINDOWS?";":":";V.EXT=X.IS_WINDOWS?".exe":"";j.isTTY=process.stderr.isTTY;j.out=function(e){var t;h.available=j.isTTY;t=new b(2);return t}(this);ie.CONFIG_FILE=".haxerc";ie.fs={isDirectory:function(e){try{return ee.isDirectory(e)}catch(e){var t=e instanceof ae?e.val:e;return false}},readFile:function(e){try{return ne.Success(te.readFileSync(e,{encoding:"utf8"}))}catch(t){return ne.Failure("Cannot read "+e+" because "+c.string(t instanceof ae?t.val:t))}}};ie.DEFAULT_ROOT=function(e){var t;var n=ie.env("HAXE_ROOT");var i=ie.env("HAXESHIM_ROOT");var r=new $(process.env[X.IS_WINDOWS?"APPDATA":"HOME"]+"/haxe");var s;if(i._hx_index==0){var a=i.v;s=a}else{s=r.get()}var o=new $(s);t=n._hx_index==0?function(e){var t;var i=n.v;t=i;return t}(e):o.get();return t}(this);re.PATH=X.slashes(ie.DEFAULT_ROOT+"/neko");re.isset=false;re.ENV=function(e){var t;var n;switch(a.systemName()){case"Mac":n="DYLD_LIBRARY_PATH";break;case"Windows":n="PATH";break;default:n="LD_LIBRARY_PATH"}var i=process.env[n];t=i==null?function(e){var t;var i=new L;{var r=re.PATH;if(tt[n]!=null){i.setReserved(n,r)}else{i.h[n]=r}}t=W.ofMap(i);return t}(e):function(e){var t;var r=i;t=r.indexOf(re.PATH)!=-1?W.ofVars({}):function(e){var t;var r=i;var s=new L;{var a=r+X.DELIMITER+re.PATH;if(tt[n]!=null){s.setReserved(n,a)}else{s.h[n]=a}}t=W.ofMap(s);return t}(e);return t}(e);return t}(this);be.initZip=function(e){var t;var n=ge.validateFileName;ge.validateFileName=function(e){return null};t=true;return t}(this);be.USER_AGENT="switchx";_e.VERSION_INFO="version.json";_e.NIGHTLIES="https://build.haxe.org/builds/haxe";_e.PLATFORM=function(e){var t;switch(a.systemName()){case"Mac":t="mac";break;case"Windows":t="windows";break;default:t="linux64"}return t}(this);Oe.hex=function(e){var t;var n=new D;{var i=0;var r="0123456789abcdefABCDEF".split("");while(i<r.length){var s=r[i];++i;n.h[m.cca(s,0)]=true}}t=n;return t}(this);Ae.depth=0;we.main()})(typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this)},612:function(e,t,n){"use strict";e.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(e){var t=this;if(!(t instanceof Yallist)){t=new Yallist}t.tail=null;t.head=null;t.length=0;if(e&&typeof e.forEach==="function"){e.forEach(function(e){t.push(e)})}else if(arguments.length>0){for(var n=0,i=arguments.length;n<i;n++){t.push(arguments[n])}}return t}Yallist.prototype.removeNode=function(e){if(e.list!==this){throw new Error("removing node which does not belong to this list")}var t=e.next;var n=e.prev;if(t){t.prev=n}if(n){n.next=t}if(e===this.head){this.head=t}if(e===this.tail){this.tail=n}e.list.length--;e.next=null;e.prev=null;e.list=null;return t};Yallist.prototype.unshiftNode=function(e){if(e===this.head){return}if(e.list){e.list.removeNode(e)}var t=this.head;e.list=this;e.next=t;if(t){t.prev=e}this.head=e;if(!this.tail){this.tail=e}this.length++};Yallist.prototype.pushNode=function(e){if(e===this.tail){return}if(e.list){e.list.removeNode(e)}var t=this.tail;e.list=this;e.prev=t;if(t){t.next=e}this.tail=e;if(!this.head){this.head=e}this.length++};Yallist.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++){push(this,arguments[e])}return this.length};Yallist.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++){unshift(this,arguments[e])}return this.length};Yallist.prototype.pop=function(){if(!this.tail){return undefined}var e=this.tail.value;this.tail=this.tail.prev;if(this.tail){this.tail.next=null}else{this.head=null}this.length--;return e};Yallist.prototype.shift=function(){if(!this.head){return undefined}var e=this.head.value;this.head=this.head.next;if(this.head){this.head.prev=null}else{this.tail=null}this.length--;return e};Yallist.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,i=0;n!==null;i++){e.call(t,n.value,i,this);n=n.next}};Yallist.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,i=this.length-1;n!==null;i--){e.call(t,n.value,i,this);n=n.prev}};Yallist.prototype.get=function(e){for(var t=0,n=this.head;n!==null&&t<e;t++){n=n.next}if(t===e&&n!==null){return n.value}};Yallist.prototype.getReverse=function(e){for(var t=0,n=this.tail;n!==null&&t<e;t++){n=n.prev}if(t===e&&n!==null){return n.value}};Yallist.prototype.map=function(e,t){t=t||this;var n=new Yallist;for(var i=this.head;i!==null;){n.push(e.call(t,i.value,this));i=i.next}return n};Yallist.prototype.mapReverse=function(e,t){t=t||this;var n=new Yallist;for(var i=this.tail;i!==null;){n.push(e.call(t,i.value,this));i=i.prev}return n};Yallist.prototype.reduce=function(e,t){var n;var i=this.head;if(arguments.length>1){n=t}else if(this.head){i=this.head.next;n=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var r=0;i!==null;r++){n=e(n,i.value,r);i=i.next}return n};Yallist.prototype.reduceReverse=function(e,t){var n;var i=this.tail;if(arguments.length>1){n=t}else if(this.tail){i=this.tail.prev;n=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var r=this.length-1;i!==null;r--){n=e(n,i.value,r);i=i.prev}return n};Yallist.prototype.toArray=function(){var e=new Array(this.length);for(var t=0,n=this.head;n!==null;t++){e[t]=n.value;n=n.next}return e};Yallist.prototype.toArrayReverse=function(){var e=new Array(this.length);for(var t=0,n=this.tail;n!==null;t++){e[t]=n.value;n=n.prev}return e};Yallist.prototype.slice=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var n=new Yallist;if(t<e||t<0){return n}if(e<0){e=0}if(t>this.length){t=this.length}for(var i=0,r=this.head;r!==null&&i<e;i++){r=r.next}for(;r!==null&&i<t;i++,r=r.next){n.push(r.value)}return n};Yallist.prototype.sliceReverse=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var n=new Yallist;if(t<e||t<0){return n}if(e<0){e=0}if(t>this.length){t=this.length}for(var i=this.length,r=this.tail;r!==null&&i>t;i--){r=r.prev}for(;r!==null&&i>e;i--,r=r.prev){n.push(r.value)}return n};Yallist.prototype.splice=function(e,t,...n){if(e>this.length){e=this.length-1}if(e<0){e=this.length+e}for(var i=0,r=this.head;r!==null&&i<e;i++){r=r.next}var s=[];for(var i=0;r&&i<t;i++){s.push(r.value);r=this.removeNode(r)}if(r===null){r=this.tail}if(r!==this.head&&r!==this.tail){r=r.prev}for(var i=0;i<n.length;i++){r=insert(this,r,n[i])}return s};Yallist.prototype.reverse=function(){var e=this.head;var t=this.tail;for(var n=e;n!==null;n=n.prev){var i=n.prev;n.prev=n.next;n.next=i}this.head=t;this.tail=e;return this};function insert(e,t,n){var i=t===e.head?new Node(n,null,t,e):new Node(n,t,t.next,e);if(i.next===null){e.tail=i}if(i.prev===null){e.head=i}e.length++;return i}function push(e,t){e.tail=new Node(t,e.tail,null,e);if(!e.head){e.head=e.tail}e.length++}function unshift(e,t){e.head=new Node(t,null,e.head,e);if(!e.tail){e.tail=e.head}e.length++}function Node(e,t,n,i){if(!(this instanceof Node)){return new Node(e,t,n,i)}this.list=i;this.value=e;if(t){t.next=this;this.prev=t}else{this.prev=null}if(n){n.prev=this;this.next=n}else{this.next=null}}try{n(396)(Yallist)}catch(e){}},614:function(e){e.exports=require("events")},619:function(e){e.exports=require("constants")},622:function(e){e.exports=require("path")},626:function(e,t,n){const i=n(795);const r=n(870);const{mkdirpNative:s,mkdirpNativeSync:a}=n(561);const{mkdirpManual:o,mkdirpManualSync:l}=n(806);const{useNative:u,useNativeSync:c}=n(336);const h=(e,t)=>{e=r(e);t=i(t);return u(t)?s(e,t):o(e,t)};const f=(e,t)=>{e=r(e);t=i(t);return c(t)?a(e,t):l(e,t)};h.sync=f;h.native=((e,t)=>s(r(e),i(t)));h.manual=((e,t)=>o(r(e),i(t)));h.nativeSync=((e,t)=>a(r(e),i(t)));h.manualSync=((e,t)=>l(r(e),i(t)));e.exports=h},630:function(e,t,n){"use strict";const i=n(891);const r=n(726);const s=n(203);const a=n(747);const o=n(827);const l=n(381);const u=n(622);const c=n(232);const h=e.exports=((e,t,n)=>{const r=i(e);if(!r.file)throw new TypeError("file is required");if(r.gzip)throw new TypeError("cannot append to compressed archives");if(!t||!Array.isArray(t)||!t.length)throw new TypeError("no files or directories specified");t=Array.from(t);return r.sync?f(r,t):m(r,t,n)});const f=(e,t)=>{const n=new r.Sync(e);let i=true;let s;let o;try{try{s=a.openSync(e.file,"r+")}catch(t){if(t.code==="ENOENT")s=a.openSync(e.file,"w+");else throw t}const r=a.fstatSync(s);const l=Buffer.alloc(512);e:for(o=0;o<r.size;o+=512){for(let e=0,t=0;e<512;e+=t){t=a.readSync(s,l,e,l.length-e,o+e);if(o===0&&l[0]===31&&l[1]===139)throw new Error("cannot append to compressed archives");if(!t)break e}let t=new c(l);if(!t.cksumValid)break;let n=512*Math.ceil(t.size/512);if(o+n+512>r.size)break;o+=n;if(e.mtimeCache)e.mtimeCache.set(t.path,t.mtime)}i=false;d(e,n,o,s,t)}finally{if(i)try{a.closeSync(s)}catch(e){}}};const d=(e,t,n,i,r)=>{const s=new o.WriteStreamSync(e.file,{fd:i,start:n});t.pipe(s);v(t,r)};const m=(e,t,n)=>{t=Array.from(t);const i=new r(e);const s=(t,n,i)=>{const r=(e,n)=>{if(e)a.close(t,t=>i(e));else i(null,n)};let s=0;if(n===0)return r(null,0);let o=0;const l=Buffer.alloc(512);const u=(i,h)=>{if(i)return r(i);o+=h;if(o<512&&h)return a.read(t,l,o,l.length-o,s+o,u);if(s===0&&l[0]===31&&l[1]===139)return r(new Error("cannot append to compressed archives"));if(o<512)return r(null,s);const f=new c(l);if(!f.cksumValid)return r(null,s);const d=512*Math.ceil(f.size/512);if(s+d+512>n)return r(null,s);s+=d+512;if(s>=n)return r(null,s);if(e.mtimeCache)e.mtimeCache.set(f.path,f.mtime);o=0;a.read(t,l,0,512,s,u)};a.read(t,l,0,512,s,u)};const l=new Promise((n,r)=>{i.on("error",r);let l="r+";const u=(c,h)=>{if(c&&c.code==="ENOENT"&&l==="r+"){l="w+";return a.open(e.file,l,u)}if(c)return r(c);a.fstat(h,(a,l)=>{if(a)return r(a);s(h,l.size,(s,a)=>{if(s)return r(s);const l=new o.WriteStream(e.file,{fd:h,start:a});i.pipe(l);l.on("error",r);l.on("close",n);p(i,t)})})};a.open(e.file,l,u)});return n?l.then(n,n):l};const v=(e,t)=>{t.forEach(t=>{if(t.charAt(0)==="@")l({file:u.resolve(e.cwd,t.substr(1)),sync:true,noResume:true,onentry:t=>e.add(t)});else e.add(t)});e.end()};const p=(e,t)=>{while(t.length){const n=t.shift();if(n.charAt(0)==="@")return l({file:u.resolve(e.cwd,n.substr(1)),noResume:true,onentry:t=>e.add(t)}).then(n=>p(e,t));else e.add(n)}e.end()}},656:function(e,t,n){"use strict";const i=n(891);const r=n(63);const s=n(747);const a=n(827);const o=n(622);const l=e.exports=((e,t,n)=>{if(typeof e==="function")n=e,t=null,e={};else if(Array.isArray(e))t=e,e={};if(typeof t==="function")n=t,t=null;if(!t)t=[];else t=Array.from(t);const r=i(e);if(r.sync&&typeof n==="function")throw new TypeError("callback not supported for sync tar functions");if(!r.file&&typeof n==="function")throw new TypeError("callback only supported with file option");if(t.length)u(r,t);return r.file&&r.sync?c(r):r.file?h(r,n):r.sync?f(r):d(r)});const u=(e,t)=>{const n=new Map(t.map(e=>[e.replace(/\/+$/,""),true]));const i=e.filter;const r=(e,t)=>{const i=t||o.parse(e).root||".";const s=e===i?false:n.has(e)?n.get(e):r(o.dirname(e),i);n.set(e,s);return s};e.filter=i?(e,t)=>i(e,t)&&r(e.replace(/\/+$/,"")):e=>r(e.replace(/\/+$/,""))};const c=e=>{const t=new r.Sync(e);const n=e.file;let i=true;let o;const l=s.statSync(n);const u=e.maxReadSize||16*1024*1024;const c=new a.ReadStreamSync(n,{readSize:u,size:l.size});c.pipe(t)};const h=(e,t)=>{const n=new r(e);const i=e.maxReadSize||16*1024*1024;const o=e.file;const l=new Promise((e,t)=>{n.on("error",t);n.on("close",e);s.stat(o,(e,r)=>{if(e)t(e);else{const e=new a.ReadStream(o,{readSize:i,size:r.size});e.on("error",t);e.pipe(n)}})});return t?l.then(t,t):l};const f=e=>{return new r.Sync(e)};const d=e=>{return new r(e)}},662:function(e,t,n){"use strict";const i=n(554);const r=n(720);const s=Symbol("slurp");e.exports=class ReadEntry extends r{constructor(e,t,n){super();this.pause();this.extended=t;this.globalExtended=n;this.header=e;this.startBlockSize=512*Math.ceil(e.size/512);this.blockRemain=this.startBlockSize;this.remain=e.size;this.type=e.type;this.meta=false;this.ignore=false;switch(this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=true;break;default:this.ignore=true}this.path=e.path;this.mode=e.mode;if(this.mode)this.mode=this.mode&4095;this.uid=e.uid;this.gid=e.gid;this.uname=e.uname;this.gname=e.gname;this.size=e.size;this.mtime=e.mtime;this.atime=e.atime;this.ctime=e.ctime;this.linkpath=e.linkpath;this.uname=e.uname;this.gname=e.gname;if(t)this[s](t);if(n)this[s](n,true)}write(e){const t=e.length;if(t>this.blockRemain)throw new Error("writing more to entry than is appropriate");const n=this.remain;const i=this.blockRemain;this.remain=Math.max(0,n-t);this.blockRemain=Math.max(0,i-t);if(this.ignore)return true;if(n>=t)return super.write(e);return super.write(e.slice(0,n))}[s](e,t){for(let n in e){if(e[n]!==null&&e[n]!==undefined&&!(t&&n==="path"))this[n]=e[n]}}}},669:function(e){e.exports=require("util")},720:function(e,t,n){"use strict";const i=n(614);const r=n(413);const s=n(612);const a=n(304).StringDecoder;const o=Symbol("EOF");const l=Symbol("maybeEmitEnd");const u=Symbol("emittedEnd");const c=Symbol("emittingEnd");const h=Symbol("closed");const f=Symbol("read");const d=Symbol("flush");const m=Symbol("flushChunk");const v=Symbol("encoding");const p=Symbol("decoder");const w=Symbol("flowing");const y=Symbol("paused");const g=Symbol("resume");const b=Symbol("bufferLength");const S=Symbol("bufferPush");const E=Symbol("bufferShift");const x=Symbol("objectMode");const R=Symbol("destroyed");const _=global._MP_NO_ITERATOR_SYMBOLS_!=="1";const O=_&&Symbol.asyncIterator||Symbol("asyncIterator not implemented");const N=_&&Symbol.iterator||Symbol("iterator not implemented");const I=e=>e==="end"||e==="finish"||e==="prefinish";const D=e=>e instanceof ArrayBuffer||typeof e==="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0;const A=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e);e.exports=class Minipass extends r{constructor(e){super();this[w]=false;this[y]=false;this.pipes=new s;this.buffer=new s;this[x]=e&&e.objectMode||false;if(this[x])this[v]=null;else this[v]=e&&e.encoding||null;if(this[v]==="buffer")this[v]=null;this[p]=this[v]?new a(this[v]):null;this[o]=false;this[u]=false;this[c]=false;this[h]=false;this.writable=true;this.readable=true;this[b]=0;this[R]=false}get bufferLength(){return this[b]}get encoding(){return this[v]}set encoding(e){if(this[x])throw new Error("cannot set encoding in objectMode");if(this[v]&&e!==this[v]&&(this[p]&&this[p].lastNeed||this[b]))throw new Error("cannot change encoding");if(this[v]!==e){this[p]=e?new a(e):null;if(this.buffer.length)this.buffer=this.buffer.map(e=>this[p].write(e))}this[v]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[x]}set objectMode(e){this[x]=this[x]||!!e}write(e,t,n){if(this[o])throw new Error("write after end");if(this[R]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof t==="function")n=t,t="utf8";if(!t)t="utf8";if(!this[x]&&!Buffer.isBuffer(e)){if(A(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(D(e))e=Buffer.from(e);else if(typeof e!=="string")this.objectMode=true}if(!this.objectMode&&!e.length){const e=this.flowing;if(this[b]!==0)this.emit("readable");if(n)n();return e}if(typeof e==="string"&&!this[x]&&!(t===this[v]&&!this[p].lastNeed)){e=Buffer.from(e,t)}if(Buffer.isBuffer(e)&&this[v])e=this[p].write(e);try{return this.flowing?(this.emit("data",e),this.flowing):(this[S](e),false)}finally{if(this[b]!==0)this.emit("readable");if(n)n()}}read(e){if(this[R])return null;try{if(this[b]===0||e===0||e>this[b])return null;if(this[x])e=null;if(this.buffer.length>1&&!this[x]){if(this.encoding)this.buffer=new s([Array.from(this.buffer).join("")]);else this.buffer=new s([Buffer.concat(Array.from(this.buffer),this[b])])}return this[f](e||null,this.buffer.head.value)}finally{this[l]()}}[f](e,t){if(e===t.length||e===null)this[E]();else{this.buffer.head.value=t.slice(e);t=t.slice(0,e);this[b]-=e}this.emit("data",t);if(!this.buffer.length&&!this[o])this.emit("drain");return t}end(e,t,n){if(typeof e==="function")n=e,e=null;if(typeof t==="function")n=t,t="utf8";if(e)this.write(e,t);if(n)this.once("end",n);this[o]=true;this.writable=false;if(this.flowing||!this[y])this[l]();return this}[g](){if(this[R])return;this[y]=false;this[w]=true;this.emit("resume");if(this.buffer.length)this[d]();else if(this[o])this[l]();else this.emit("drain")}resume(){return this[g]()}pause(){this[w]=false;this[y]=true}get destroyed(){return this[R]}get flowing(){return this[w]}get paused(){return this[y]}[S](e){if(this[x])this[b]+=1;else this[b]+=e.length;return this.buffer.push(e)}[E](){if(this.buffer.length){if(this[x])this[b]-=1;else this[b]-=this.buffer.head.value.length}return this.buffer.shift()}[d](){do{}while(this[m](this[E]()));if(!this.buffer.length&&!this[o])this.emit("drain")}[m](e){return e?(this.emit("data",e),this.flowing):false}pipe(e,t){if(this[R])return;const n=this[u];t=t||{};if(e===process.stdout||e===process.stderr)t.end=false;else t.end=t.end!==false;const i={dest:e,opts:t,ondrain:e=>this[g]()};this.pipes.push(i);e.on("drain",i.ondrain);this[g]();if(n&&i.opts.end)i.dest.end();return e}addListener(e,t){return this.on(e,t)}on(e,t){try{return super.on(e,t)}finally{if(e==="data"&&!this.pipes.length&&!this.flowing)this[g]();else if(I(e)&&this[u]){super.emit(e);this.removeAllListeners(e)}}}get emittedEnd(){return this[u]}[l](){if(!this[c]&&!this[u]&&!this[R]&&this.buffer.length===0&&this[o]){this[c]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[h])this.emit("close");this[c]=false}}emit(e,t){if(e!=="error"&&e!=="close"&&e!==R&&this[R])return;else if(e==="data"){if(!t)return;if(this.pipes.length)this.pipes.forEach(e=>e.dest.write(t)===false&&this.pause())}else if(e==="end"){if(this[u]===true)return;this[u]=true;this.readable=false;if(this[p]){t=this[p].end();if(t){this.pipes.forEach(e=>e.dest.write(t));super.emit("data",t)}}this.pipes.forEach(e=>{e.dest.removeListener("drain",e.ondrain);if(e.opts.end)e.dest.end()})}else if(e==="close"){this[h]=true;if(!this[u]&&!this[R])return}const n=new Array(arguments.length);n[0]=e;n[1]=t;if(arguments.length>2){for(let e=2;e<arguments.length;e++){n[e]=arguments[e]}}try{return super.emit.apply(this,n)}finally{if(!I(e))this[l]();else this.removeAllListeners(e)}}collect(){const e=[];if(!this[x])e.dataLength=0;const t=this.promise();this.on("data",t=>{e.push(t);if(!this[x])e.dataLength+=t.length});return t.then(()=>e)}concat(){return this[x]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(e=>this[x]?Promise.reject(new Error("cannot concat in objectMode")):this[v]?e.join(""):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,t)=>{this.on(R,()=>t(new Error("stream destroyed")));this.on("end",()=>e());this.on("error",e=>t(e))})}[O](){const e=()=>{const e=this.read();if(e!==null)return Promise.resolve({done:false,value:e});if(this[o])return Promise.resolve({done:true});let t=null;let n=null;const i=e=>{this.removeListener("data",r);this.removeListener("end",s);n(e)};const r=e=>{this.removeListener("error",i);this.removeListener("end",s);this.pause();t({value:e,done:!!this[o]})};const s=()=>{this.removeListener("error",i);this.removeListener("data",r);t({done:true})};const a=()=>i(new Error("stream destroyed"));return new Promise((e,o)=>{n=o;t=e;this.once(R,a);this.once("error",i);this.once("end",s);this.once("data",r)})};return{next:e}}[N](){const e=()=>{const e=this.read();const t=e===null;return{value:e,done:t}};return{next:e}}destroy(e){if(this[R]){if(e)this.emit("error",e);else this.emit(R);return this}this[R]=true;this.buffer=new s;this[b]=0;if(typeof this.close==="function"&&!this[h])this.close();if(e)this.emit("error",e);else this.emit(R);return this}static isStream(e){return!!e&&(e instanceof Minipass||e instanceof r||e instanceof i&&(typeof e.pipe==="function"||typeof e.write==="function"&&typeof e.end==="function"))}}},726:function(e,t,n){"use strict";class PackJob{constructor(e,t){this.path=e||"./";this.absolute=t;this.entry=null;this.stat=null;this.readdir=null;this.pending=false;this.ignore=false;this.piped=false}}const i=n(720);const r=n(133);const s=n(662);const a=n(303);const o=a.Sync;const l=a.Tar;const u=n(612);const c=Buffer.alloc(1024);const h=Symbol("onStat");const f=Symbol("ended");const d=Symbol("queue");const m=Symbol("current");const v=Symbol("process");const p=Symbol("processing");const w=Symbol("processJob");const y=Symbol("jobs");const g=Symbol("jobDone");const b=Symbol("addFSEntry");const S=Symbol("addTarEntry");const E=Symbol("stat");const x=Symbol("readdir");const R=Symbol("onreaddir");const _=Symbol("pipe");const O=Symbol("entry");const N=Symbol("entryOpt");const I=Symbol("writeEntryClass");const D=Symbol("write");const A=Symbol("ondrain");const L=n(747);const C=n(622);const B=n(796);const T=B(class Pack extends i{constructor(e){super(e);e=e||Object.create(null);this.opt=e;this.file=e.file||"";this.cwd=e.cwd||process.cwd();this.maxReadSize=e.maxReadSize;this.preservePaths=!!e.preservePaths;this.strict=!!e.strict;this.noPax=!!e.noPax;this.prefix=(e.prefix||"").replace(/(\\|\/)+$/,"");this.linkCache=e.linkCache||new Map;this.statCache=e.statCache||new Map;this.readdirCache=e.readdirCache||new Map;this[I]=a;if(typeof e.onwarn==="function")this.on("warn",e.onwarn);this.portable=!!e.portable;this.zip=null;if(e.gzip){if(typeof e.gzip!=="object")e.gzip={};if(this.portable)e.gzip.portable=true;this.zip=new r.Gzip(e.gzip);this.zip.on("data",e=>super.write(e));this.zip.on("end",e=>super.end());this.zip.on("drain",e=>this[A]());this.on("resume",e=>this.zip.resume())}else this.on("drain",this[A]);this.noDirRecurse=!!e.noDirRecurse;this.follow=!!e.follow;this.noMtime=!!e.noMtime;this.mtime=e.mtime||null;this.filter=typeof e.filter==="function"?e.filter:e=>true;this[d]=new u;this[y]=0;this.jobs=+e.jobs||4;this[p]=false;this[f]=false}[D](e){return super.write(e)}add(e){this.write(e);return this}end(e){if(e)this.write(e);this[f]=true;this[v]();return this}write(e){if(this[f])throw new Error("write after end");if(e instanceof s)this[S](e);else this[b](e);return this.flowing}[S](e){const t=C.resolve(this.cwd,e.path);if(this.prefix)e.path=this.prefix+"/"+e.path.replace(/^\.(\/+|$)/,"");if(!this.filter(e.path,e))e.resume();else{const n=new PackJob(e.path,t,false);n.entry=new l(e,this[N](n));n.entry.on("end",e=>this[g](n));this[y]+=1;this[d].push(n)}this[v]()}[b](e){const t=C.resolve(this.cwd,e);if(this.prefix)e=this.prefix+"/"+e.replace(/^\.(\/+|$)/,"");this[d].push(new PackJob(e,t));this[v]()}[E](e){e.pending=true;this[y]+=1;const t=this.follow?"stat":"lstat";L[t](e.absolute,(t,n)=>{e.pending=false;this[y]-=1;if(t)this.emit("error",t);else this[h](e,n)})}[h](e,t){this.statCache.set(e.absolute,t);e.stat=t;if(!this.filter(e.path,t))e.ignore=true;this[v]()}[x](e){e.pending=true;this[y]+=1;L.readdir(e.absolute,(t,n)=>{e.pending=false;this[y]-=1;if(t)return this.emit("error",t);this[R](e,n)})}[R](e,t){this.readdirCache.set(e.absolute,t);e.readdir=t;this[v]()}[v](){if(this[p])return;this[p]=true;for(let e=this[d].head;e!==null&&this[y]<this.jobs;e=e.next){this[w](e.value);if(e.value.ignore){const t=e.next;this[d].removeNode(e);e.next=t}}this[p]=false;if(this[f]&&!this[d].length&&this[y]===0){if(this.zip)this.zip.end(c);else{super.write(c);super.end()}}}get[m](){return this[d]&&this[d].head&&this[d].head.value}[g](e){this[d].shift();this[y]-=1;this[v]()}[w](e){if(e.pending)return;if(e.entry){if(e===this[m]&&!e.piped)this[_](e);return}if(!e.stat){if(this.statCache.has(e.absolute))this[h](e,this.statCache.get(e.absolute));else this[E](e)}if(!e.stat)return;if(e.ignore)return;if(!this.noDirRecurse&&e.stat.isDirectory()&&!e.readdir){if(this.readdirCache.has(e.absolute))this[R](e,this.readdirCache.get(e.absolute));else this[x](e);if(!e.readdir)return}e.entry=this[O](e);if(!e.entry){e.ignore=true;return}if(e===this[m]&&!e.piped)this[_](e)}[N](e){return{onwarn:(e,t,n)=>this.warn(e,t,n),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime}}[O](e){this[y]+=1;try{return new this[I](e.path,this[N](e)).on("end",()=>this[g](e)).on("error",e=>this.emit("error",e))}catch(e){this.emit("error",e)}}[A](){if(this[m]&&this[m].entry)this[m].entry.resume()}[_](e){e.piped=true;if(e.readdir)e.readdir.forEach(t=>{const n=this.prefix?e.path.slice(this.prefix.length+1)||"./":e.path;const i=n==="./"?"":n.replace(/\/*$/,"/");this[b](i+t)});const t=e.entry;const n=this.zip;if(n)t.on("data",e=>{if(!n.write(e))t.pause()});else t.on("data",e=>{if(!super.write(e))t.pause()})}pause(){if(this.zip)this.zip.pause();return super.pause()}});class PackSync extends T{constructor(e){super(e);this[I]=o}pause(){}resume(){}[E](e){const t=this.follow?"statSync":"lstatSync";this[h](e,L[t](e.absolute))}[x](e,t){this[R](e,L.readdirSync(e.absolute))}[_](e){const t=e.entry;const n=this.zip;if(e.readdir)e.readdir.forEach(t=>{const n=this.prefix?e.path.slice(this.prefix.length+1)||"./":e.path;const i=n==="./"?"":n.replace(/\/*$/,"/");this[b](i+t)});if(n)t.on("data",e=>{n.write(e)});else t.on("data",e=>{super[D](e)})}}T.Sync=PackSync;e.exports=T},747:function(e){e.exports=require("fs")},761:function(e){e.exports=require("zlib")},766:function(e,t,n){var i=n(747);var r=n(761);var s=n(324);var a=n(538);var o=n(669);var l=n(614).EventEmitter;var u=n(413).Transform;var c=n(413).PassThrough;var h=n(413).Writable;t.open=open;t.fromFd=fromFd;t.fromBuffer=fromBuffer;t.fromRandomAccessReader=fromRandomAccessReader;t.dosDateTimeToDate=dosDateTimeToDate;t.validateFileName=validateFileName;t.ZipFile=ZipFile;t.Entry=Entry;t.RandomAccessReader=RandomAccessReader;function open(e,t,n){if(typeof t==="function"){n=t;t=null}if(t==null)t={};if(t.autoClose==null)t.autoClose=true;if(t.lazyEntries==null)t.lazyEntries=false;if(t.decodeStrings==null)t.decodeStrings=true;if(t.validateEntrySizes==null)t.validateEntrySizes=true;if(t.strictFileNames==null)t.strictFileNames=false;if(n==null)n=defaultCallback;i.open(e,"r",function(e,r){if(e)return n(e);fromFd(r,t,function(e,t){if(e)i.close(r,defaultCallback);n(e,t)})})}function fromFd(e,t,n){if(typeof t==="function"){n=t;t=null}if(t==null)t={};if(t.autoClose==null)t.autoClose=false;if(t.lazyEntries==null)t.lazyEntries=false;if(t.decodeStrings==null)t.decodeStrings=true;if(t.validateEntrySizes==null)t.validateEntrySizes=true;if(t.strictFileNames==null)t.strictFileNames=false;if(n==null)n=defaultCallback;i.fstat(e,function(i,r){if(i)return n(i);var a=s.createFromFd(e,{autoClose:true});fromRandomAccessReader(a,r.size,t,n)})}function fromBuffer(e,t,n){if(typeof t==="function"){n=t;t=null}if(t==null)t={};t.autoClose=false;if(t.lazyEntries==null)t.lazyEntries=false;if(t.decodeStrings==null)t.decodeStrings=true;if(t.validateEntrySizes==null)t.validateEntrySizes=true;if(t.strictFileNames==null)t.strictFileNames=false;var i=s.createFromBuffer(e,{maxChunkSize:65536});fromRandomAccessReader(i,e.length,t,n)}function fromRandomAccessReader(e,t,n,i){if(typeof n==="function"){i=n;n=null}if(n==null)n={};if(n.autoClose==null)n.autoClose=true;if(n.lazyEntries==null)n.lazyEntries=false;if(n.decodeStrings==null)n.decodeStrings=true;var r=!!n.decodeStrings;if(n.validateEntrySizes==null)n.validateEntrySizes=true;if(n.strictFileNames==null)n.strictFileNames=false;if(i==null)i=defaultCallback;if(typeof t!=="number")throw new Error("expected totalSize parameter to be a number");if(t>Number.MAX_SAFE_INTEGER){throw new Error("zip file too large. only file sizes up to 2^52 are supported due to JavaScript's Number type being an IEEE 754 double.")}e.ref();var s=22;var a=65535;var o=Math.min(s+a,t);var l=d(o);var u=t-l.length;readAndAssertNoEof(e,l,0,o,u,function(a){if(a)return i(a);for(var c=o-s;c>=0;c-=1){if(l.readUInt32LE(c)!==101010256)continue;var h=l.slice(c);var f=h.readUInt16LE(4);if(f!==0){return i(new Error("multi-disk zip files are not supported: found disk number: "+f))}var m=h.readUInt16LE(10);var v=h.readUInt32LE(16);var p=h.readUInt16LE(20);var w=h.length-s;if(p!==w){return i(new Error("invalid comment length. expected: "+w+". found: "+p))}var y=r?decodeBuffer(h,22,h.length,false):h.slice(22);if(!(m===65535||v===4294967295)){return i(null,new ZipFile(e,v,t,m,y,n.autoClose,n.lazyEntries,r,n.validateEntrySizes,n.strictFileNames))}var g=d(20);var b=u+c-g.length;readAndAssertNoEof(e,g,0,g.length,b,function(s){if(s)return i(s);if(g.readUInt32LE(0)!==117853008){return i(new Error("invalid zip64 end of central directory locator signature"))}var a=readUInt64LE(g,8);var o=d(56);readAndAssertNoEof(e,o,0,o.length,a,function(s){if(s)return i(s);if(o.readUInt32LE(0)!==101075792){return i(new Error("invalid zip64 end of central directory record signature"))}m=readUInt64LE(o,32);v=readUInt64LE(o,48);return i(null,new ZipFile(e,v,t,m,y,n.autoClose,n.lazyEntries,r,n.validateEntrySizes,n.strictFileNames))})});return}i(new Error("end of central directory record signature not found"))})}o.inherits(ZipFile,l);function ZipFile(e,t,n,i,r,s,a,o,u,c){var h=this;l.call(h);h.reader=e;h.reader.on("error",function(e){emitError(h,e)});h.reader.once("close",function(){h.emit("close")});h.readEntryCursor=t;h.fileSize=n;h.entryCount=i;h.comment=r;h.entriesRead=0;h.autoClose=!!s;h.lazyEntries=!!a;h.decodeStrings=!!o;h.validateEntrySizes=!!u;h.strictFileNames=!!c;h.isOpen=true;h.emittedError=false;if(!h.lazyEntries)h._readEntry()}ZipFile.prototype.close=function(){if(!this.isOpen)return;this.isOpen=false;this.reader.unref()};function emitErrorAndAutoClose(e,t){if(e.autoClose)e.close();emitError(e,t)}function emitError(e,t){if(e.emittedError)return;e.emittedError=true;e.emit("error",t)}ZipFile.prototype.readEntry=function(){if(!this.lazyEntries)throw new Error("readEntry() called without lazyEntries:true");this._readEntry()};ZipFile.prototype._readEntry=function(){var e=this;if(e.entryCount===e.entriesRead){setImmediate(function(){if(e.autoClose)e.close();if(e.emittedError)return;e.emit("end")});return}if(e.emittedError)return;var n=d(46);readAndAssertNoEof(e.reader,n,0,n.length,e.readEntryCursor,function(i){if(i)return emitErrorAndAutoClose(e,i);if(e.emittedError)return;var r=new Entry;var s=n.readUInt32LE(0);if(s!==33639248)return emitErrorAndAutoClose(e,new Error("invalid central directory file header signature: 0x"+s.toString(16)));r.versionMadeBy=n.readUInt16LE(4);r.versionNeededToExtract=n.readUInt16LE(6);r.generalPurposeBitFlag=n.readUInt16LE(8);r.compressionMethod=n.readUInt16LE(10);r.lastModFileTime=n.readUInt16LE(12);r.lastModFileDate=n.readUInt16LE(14);r.crc32=n.readUInt32LE(16);r.compressedSize=n.readUInt32LE(20);r.uncompressedSize=n.readUInt32LE(24);r.fileNameLength=n.readUInt16LE(28);r.extraFieldLength=n.readUInt16LE(30);r.fileCommentLength=n.readUInt16LE(32);r.internalFileAttributes=n.readUInt16LE(36);r.externalFileAttributes=n.readUInt32LE(38);r.relativeOffsetOfLocalHeader=n.readUInt32LE(42);if(r.generalPurposeBitFlag&64)return emitErrorAndAutoClose(e,new Error("strong encryption is not supported"));e.readEntryCursor+=46;n=d(r.fileNameLength+r.extraFieldLength+r.fileCommentLength);readAndAssertNoEof(e.reader,n,0,n.length,e.readEntryCursor,function(i){if(i)return emitErrorAndAutoClose(e,i);if(e.emittedError)return;var s=(r.generalPurposeBitFlag&2048)!==0;r.fileName=e.decodeStrings?decodeBuffer(n,0,r.fileNameLength,s):n.slice(0,r.fileNameLength);var o=r.fileNameLength+r.extraFieldLength;var l=n.slice(r.fileNameLength,o);r.extraFields=[];var u=0;while(u<l.length-3){var c=l.readUInt16LE(u+0);var h=l.readUInt16LE(u+2);var f=u+4;var m=f+h;if(m>l.length)return emitErrorAndAutoClose(e,new Error("extra field length exceeds extra field buffer size"));var v=d(h);l.copy(v,0,f,m);r.extraFields.push({id:c,data:v});u=m}r.fileComment=e.decodeStrings?decodeBuffer(n,o,o+r.fileCommentLength,s):n.slice(o,o+r.fileCommentLength);r.comment=r.fileComment;e.readEntryCursor+=n.length;e.entriesRead+=1;if(r.uncompressedSize===4294967295||r.compressedSize===4294967295||r.relativeOffsetOfLocalHeader===4294967295){var p=null;for(var u=0;u<r.extraFields.length;u++){var w=r.extraFields[u];if(w.id===1){p=w.data;break}}if(p==null){return emitErrorAndAutoClose(e,new Error("expected zip64 extended information extra field"))}var y=0;if(r.uncompressedSize===4294967295){if(y+8>p.length){return emitErrorAndAutoClose(e,new Error("zip64 extended information extra field does not include uncompressed size"))}r.uncompressedSize=readUInt64LE(p,y);y+=8}if(r.compressedSize===4294967295){if(y+8>p.length){return emitErrorAndAutoClose(e,new Error("zip64 extended information extra field does not include compressed size"))}r.compressedSize=readUInt64LE(p,y);y+=8}if(r.relativeOffsetOfLocalHeader===4294967295){if(y+8>p.length){return emitErrorAndAutoClose(e,new Error("zip64 extended information extra field does not include relative header offset"))}r.relativeOffsetOfLocalHeader=readUInt64LE(p,y);y+=8}}if(e.decodeStrings){for(var u=0;u<r.extraFields.length;u++){var w=r.extraFields[u];if(w.id===28789){if(w.data.length<6){continue}if(w.data.readUInt8(0)!==1){continue}var g=w.data.readUInt32LE(1);if(a.unsigned(n.slice(0,r.fileNameLength))!==g){continue}r.fileName=decodeBuffer(w.data,5,w.data.length,true);break}}}if(e.validateEntrySizes&&r.compressionMethod===0){var b=r.uncompressedSize;if(r.isEncrypted()){b+=12}if(r.compressedSize!==b){var S="compressed/uncompressed size mismatch for stored file: "+r.compressedSize+" != "+r.uncompressedSize;return emitErrorAndAutoClose(e,new Error(S))}}if(e.decodeStrings){if(!e.strictFileNames){r.fileName=r.fileName.replace(/\\/g,"/")}var E=t.validateFileName(r.fileName);if(E!=null)return emitErrorAndAutoClose(e,new Error(E))}e.emit("entry",r);if(!e.lazyEntries)e._readEntry()})})};ZipFile.prototype.openReadStream=function(e,t,n){var i=this;var s=0;var a=e.compressedSize;if(n==null){n=t;t={}}else{if(t.decrypt!=null){if(!e.isEncrypted()){throw new Error("options.decrypt can only be specified for encrypted entries")}if(t.decrypt!==false)throw new Error("invalid options.decrypt value: "+t.decrypt);if(e.isCompressed()){if(t.decompress!==false)throw new Error("entry is encrypted and compressed, and options.decompress !== false")}}if(t.decompress!=null){if(!e.isCompressed()){throw new Error("options.decompress can only be specified for compressed entries")}if(!(t.decompress===false||t.decompress===true)){throw new Error("invalid options.decompress value: "+t.decompress)}}if(t.start!=null||t.end!=null){if(e.isCompressed()&&t.decompress!==false){throw new Error("start/end range not allowed for compressed entry without options.decompress === false")}if(e.isEncrypted()&&t.decrypt!==false){throw new Error("start/end range not allowed for encrypted entry without options.decrypt === false")}}if(t.start!=null){s=t.start;if(s<0)throw new Error("options.start < 0");if(s>e.compressedSize)throw new Error("options.start > entry.compressedSize")}if(t.end!=null){a=t.end;if(a<0)throw new Error("options.end < 0");if(a>e.compressedSize)throw new Error("options.end > entry.compressedSize");if(a<s)throw new Error("options.end < options.start")}}if(!i.isOpen)return n(new Error("closed"));if(e.isEncrypted()){if(t.decrypt!==false)return n(new Error("entry is encrypted, and options.decrypt !== false"))}i.reader.ref();var o=d(30);readAndAssertNoEof(i.reader,o,0,o.length,e.relativeOffsetOfLocalHeader,function(l){try{if(l)return n(l);var u=o.readUInt32LE(0);if(u!==67324752){return n(new Error("invalid local file header signature: 0x"+u.toString(16)))}var c=o.readUInt16LE(26);var h=o.readUInt16LE(28);var f=e.relativeOffsetOfLocalHeader+o.length+c+h;var d;if(e.compressionMethod===0){d=false}else if(e.compressionMethod===8){d=t.decompress!=null?t.decompress:true}else{return n(new Error("unsupported compression method: "+e.compressionMethod))}var m=f;var v=m+e.compressedSize;if(e.compressedSize!==0){if(v>i.fileSize){return n(new Error("file data overflows file bounds: "+m+" + "+e.compressedSize+" > "+i.fileSize))}}var p=i.reader.createReadStream({start:m+s,end:m+a});var w=p;if(d){var y=false;var g=r.createInflateRaw();p.on("error",function(e){setImmediate(function(){if(!y)g.emit("error",e)})});p.pipe(g);if(i.validateEntrySizes){w=new AssertByteCountStream(e.uncompressedSize);g.on("error",function(e){setImmediate(function(){if(!y)w.emit("error",e)})});g.pipe(w)}else{w=g}w.destroy=function(){y=true;if(g!==w)g.unpipe(w);p.unpipe(g);p.destroy()}}n(null,w)}finally{i.reader.unref()}})};function Entry(){}Entry.prototype.getLastModDate=function(){return dosDateTimeToDate(this.lastModFileDate,this.lastModFileTime)};Entry.prototype.isEncrypted=function(){return(this.generalPurposeBitFlag&1)!==0};Entry.prototype.isCompressed=function(){return this.compressionMethod===8};function dosDateTimeToDate(e,t){var n=e&31;var i=(e>>5&15)-1;var r=(e>>9&127)+1980;var s=0;var a=(t&31)*2;var o=t>>5&63;var l=t>>11&31;return new Date(r,i,n,l,o,a,s)}function validateFileName(e){if(e.indexOf("\\")!==-1){return"invalid characters in fileName: "+e}if(/^[a-zA-Z]:/.test(e)||/^\//.test(e)){return"absolute path: "+e}if(e.split("/").indexOf("..")!==-1){return"invalid relative path: "+e}return null}function readAndAssertNoEof(e,t,n,i,r,s){if(i===0){return setImmediate(function(){s(null,d(0))})}e.read(t,n,i,r,function(e,t){if(e)return s(e);if(t<i){return s(new Error("unexpected EOF"))}s()})}o.inherits(AssertByteCountStream,u);function AssertByteCountStream(e){u.call(this);this.actualByteCount=0;this.expectedByteCount=e}AssertByteCountStream.prototype._transform=function(e,t,n){this.actualByteCount+=e.length;if(this.actualByteCount>this.expectedByteCount){var i="too many bytes in the stream. expected "+this.expectedByteCount+". got at least "+this.actualByteCount;return n(new Error(i))}n(null,e)};AssertByteCountStream.prototype._flush=function(e){if(this.actualByteCount<this.expectedByteCount){var t="not enough bytes in the stream. expected "+this.expectedByteCount+". got only "+this.actualByteCount;return e(new Error(t))}e()};o.inherits(RandomAccessReader,l);function RandomAccessReader(){l.call(this);this.refCount=0}RandomAccessReader.prototype.ref=function(){this.refCount+=1};RandomAccessReader.prototype.unref=function(){var e=this;e.refCount-=1;if(e.refCount>0)return;if(e.refCount<0)throw new Error("invalid unref");e.close(onCloseDone);function onCloseDone(t){if(t)return e.emit("error",t);e.emit("close")}};RandomAccessReader.prototype.createReadStream=function(e){var t=e.start;var n=e.end;if(t===n){var i=new c;setImmediate(function(){i.end()});return i}var r=this._readStreamForRange(t,n);var s=false;var a=new RefUnrefFilter(this);r.on("error",function(e){setImmediate(function(){if(!s)a.emit("error",e)})});a.destroy=function(){r.unpipe(a);a.unref();r.destroy()};var o=new AssertByteCountStream(n-t);a.on("error",function(e){setImmediate(function(){if(!s)o.emit("error",e)})});o.destroy=function(){s=true;a.unpipe(o);a.destroy()};return r.pipe(a).pipe(o)};RandomAccessReader.prototype._readStreamForRange=function(e,t){throw new Error("not implemented")};RandomAccessReader.prototype.read=function(e,t,n,i,r){var s=this.createReadStream({start:i,end:i+n});var a=new h;var o=0;a._write=function(n,i,r){n.copy(e,t+o,0,n.length);o+=n.length;r()};a.on("finish",r);s.on("error",function(e){r(e)});s.pipe(a)};RandomAccessReader.prototype.close=function(e){setImmediate(e)};o.inherits(RefUnrefFilter,c);function RefUnrefFilter(e){c.call(this);this.context=e;this.context.ref();this.unreffedYet=false}RefUnrefFilter.prototype._flush=function(e){this.unref();e()};RefUnrefFilter.prototype.unref=function(e){if(this.unreffedYet)return;this.unreffedYet=true;this.context.unref()};var f="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ";function decodeBuffer(e,t,n,i){if(i){return e.toString("utf8",t,n)}else{var r="";for(var s=t;s<n;s++){r+=f[e[s]]}return r}}function readUInt64LE(e,t){var n=e.readUInt32LE(t);var i=e.readUInt32LE(t+4);return i*4294967296+n}var d;if(typeof Buffer.allocUnsafe==="function"){d=function(e){return Buffer.allocUnsafe(e)}}else{d=function(e){return new Buffer(e)}}function defaultCallback(e){if(e)throw e}},795:function(e,t,n){const{promisify:i}=n(669);const r=n(747);const s=e=>{if(!e)e={mode:511&~process.umask(),fs:r};else if(typeof e==="object")e={mode:511&~process.umask(),fs:r,...e};else if(typeof e==="number")e={mode:e,fs:r};else if(typeof e==="string")e={mode:parseInt(e,8),fs:r};else throw new TypeError("invalid options argument");e.mkdir=e.mkdir||e.fs.mkdir||r.mkdir;e.mkdirAsync=i(e.mkdir);e.stat=e.stat||e.fs.stat||r.stat;e.statAsync=i(e.stat);e.statSync=e.statSync||e.fs.statSync||r.statSync;e.mkdirSync=e.mkdirSync||e.fs.mkdirSync||r.mkdirSync;return e};e.exports=s},796:function(e){"use strict";e.exports=(e=>(class extends e{warn(e,t,n={}){if(this.file)n.file=this.file;if(this.cwd)n.cwd=this.cwd;n.code=t instanceof Error&&t.code||e;n.tarCode=e;if(!this.strict&&n.recoverable!==false){if(t instanceof Error){n=Object.assign(t,n);t=t.message}this.emit("warn",n.tarCode,t,n)}else if(t instanceof Error){this.emit("error",Object.assign(t,n))}else this.emit("error",Object.assign(new Error(`${e}: ${t}`),n))}}))},806:function(e,t,n){const{dirname:i}=n(622);const r=(e,t,n)=>{t.recursive=false;const s=i(e);if(s===e){return t.mkdirAsync(e,t).catch(e=>{if(e.code!=="EISDIR")throw e})}return t.mkdirAsync(e,t).then(()=>n||e,i=>{if(i.code==="ENOENT")return r(s,t).then(n=>r(e,t,n));if(i.code!=="EEXIST"&&i.code!=="EROFS")throw i;return t.statAsync(e).then(e=>{if(e.isDirectory())return n;else throw i},()=>{throw i})})};const s=(e,t,n)=>{const r=i(e);t.recursive=false;if(r===e){try{return t.mkdirSync(e,t)}catch(e){if(e.code!=="EISDIR")throw e;else return}}try{t.mkdirSync(e,t);return n||e}catch(i){if(i.code==="ENOENT")return s(e,t,s(r,t,n));if(i.code!=="EEXIST"&&i.code!=="EROFS")throw i;try{if(!t.statSync(e).isDirectory())throw i}catch(e){throw i}}};e.exports={mkdirpManual:r,mkdirpManualSync:s}},827:function(e,t,n){"use strict";const i=n(720);const r=n(614).EventEmitter;const s=n(747);let a=s.writev;if(!a){const e=process.binding("fs");const t=e.FSReqWrap||e.FSReqCallback;a=((n,i,r,s)=>{const a=(e,t)=>s(e,t,i);const o=new t;o.oncomplete=a;e.writeBuffers(n,i,r,o)})}const o=Symbol("_autoClose");const l=Symbol("_close");const u=Symbol("_ended");const c=Symbol("_fd");const h=Symbol("_finished");const f=Symbol("_flags");const d=Symbol("_flush");const m=Symbol("_handleChunk");const v=Symbol("_makeBuf");const p=Symbol("_mode");const w=Symbol("_needDrain");const y=Symbol("_onerror");const g=Symbol("_onopen");const b=Symbol("_onread");const S=Symbol("_onwrite");const E=Symbol("_open");const x=Symbol("_path");const R=Symbol("_pos");const _=Symbol("_queue");const O=Symbol("_read");const N=Symbol("_readSize");const I=Symbol("_reading");const D=Symbol("_remain");const A=Symbol("_size");const L=Symbol("_write");const C=Symbol("_writing");const B=Symbol("_defaultFlag");const T=Symbol("_errored");class ReadStream extends i{constructor(e,t){t=t||{};super(t);this.readable=true;this.writable=false;if(typeof e!=="string")throw new TypeError("path must be a string");this[T]=false;this[c]=typeof t.fd==="number"?t.fd:null;this[x]=e;this[N]=t.readSize||16*1024*1024;this[I]=false;this[A]=typeof t.size==="number"?t.size:Infinity;this[D]=this[A];this[o]=typeof t.autoClose==="boolean"?t.autoClose:true;if(typeof this[c]==="number")this[O]();else this[E]()}get fd(){return this[c]}get path(){return this[x]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[E](){s.open(this[x],"r",(e,t)=>this[g](e,t))}[g](e,t){if(e)this[y](e);else{this[c]=t;this.emit("open",t);this[O]()}}[v](){return Buffer.allocUnsafe(Math.min(this[N],this[D]))}[O](){if(!this[I]){this[I]=true;const e=this[v]();if(e.length===0)return process.nextTick(()=>this[b](null,0,e));s.read(this[c],e,0,e.length,null,(e,t,n)=>this[b](e,t,n))}}[b](e,t,n){this[I]=false;if(e)this[y](e);else if(this[m](t,n))this[O]()}[l](){if(this[o]&&typeof this[c]==="number"){const e=this[c];this[c]=null;s.close(e,e=>e?this.emit("error",e):this.emit("close"))}}[y](e){this[I]=true;this[l]();this.emit("error",e)}[m](e,t){let n=false;this[D]-=e;if(e>0)n=super.write(e<t.length?t.slice(0,e):t);if(e===0||this[D]<=0){n=false;this[l]();super.end()}return n}emit(e,t){switch(e){case"prefinish":case"finish":break;case"drain":if(typeof this[c]==="number")this[O]();break;case"error":if(this[T])return;this[T]=true;return super.emit(e,t);default:return super.emit(e,t)}}}class ReadStreamSync extends ReadStream{[E](){let e=true;try{this[g](null,s.openSync(this[x],"r"));e=false}finally{if(e)this[l]()}}[O](){let e=true;try{if(!this[I]){this[I]=true;do{const e=this[v]();const t=e.length===0?0:s.readSync(this[c],e,0,e.length,null);if(!this[m](t,e))break}while(true);this[I]=false}e=false}finally{if(e)this[l]()}}[l](){if(this[o]&&typeof this[c]==="number"){const e=this[c];this[c]=null;s.closeSync(e);this.emit("close")}}}class WriteStream extends r{constructor(e,t){t=t||{};super(t);this.readable=false;this.writable=true;this[T]=false;this[C]=false;this[u]=false;this[w]=false;this[_]=[];this[x]=e;this[c]=typeof t.fd==="number"?t.fd:null;this[p]=t.mode===undefined?438:t.mode;this[R]=typeof t.start==="number"?t.start:null;this[o]=typeof t.autoClose==="boolean"?t.autoClose:true;const n=this[R]!==null?"r+":"w";this[B]=t.flags===undefined;this[f]=this[B]?n:t.flags;if(this[c]===null)this[E]()}emit(e,t){if(e==="error"){if(this[T])return;this[T]=true}return super.emit(e,t)}get fd(){return this[c]}get path(){return this[x]}[y](e){this[l]();this[C]=true;this.emit("error",e)}[E](){s.open(this[x],this[f],this[p],(e,t)=>this[g](e,t))}[g](e,t){if(this[B]&&this[f]==="r+"&&e&&e.code==="ENOENT"){this[f]="w";this[E]()}else if(e)this[y](e);else{this[c]=t;this.emit("open",t);this[d]()}}end(e,t){if(e)this.write(e,t);this[u]=true;if(!this[C]&&!this[_].length&&typeof this[c]==="number")this[S](null,0);return this}write(e,t){if(typeof e==="string")e=Buffer.from(e,t);if(this[u]){this.emit("error",new Error("write() after end()"));return false}if(this[c]===null||this[C]||this[_].length){this[_].push(e);this[w]=true;return false}this[C]=true;this[L](e);return true}[L](e){s.write(this[c],e,0,e.length,this[R],(e,t)=>this[S](e,t))}[S](e,t){if(e)this[y](e);else{if(this[R]!==null)this[R]+=t;if(this[_].length)this[d]();else{this[C]=false;if(this[u]&&!this[h]){this[h]=true;this[l]();this.emit("finish")}else if(this[w]){this[w]=false;this.emit("drain")}}}}[d](){if(this[_].length===0){if(this[u])this[S](null,0)}else if(this[_].length===1)this[L](this[_].pop());else{const e=this[_];this[_]=[];a(this[c],e,this[R],(e,t)=>this[S](e,t))}}[l](){if(this[o]&&typeof this[c]==="number"){const e=this[c];this[c]=null;s.close(e,e=>e?this.emit("error",e):this.emit("close"))}}}class WriteStreamSync extends WriteStream{[E](){let e;if(this[B]&&this[f]==="r+"){try{e=s.openSync(this[x],this[f],this[p])}catch(e){if(e.code==="ENOENT"){this[f]="w";return this[E]()}else throw e}}else e=s.openSync(this[x],this[f],this[p]);this[g](null,e)}[l](){if(this[o]&&typeof this[c]==="number"){const e=this[c];this[c]=null;s.closeSync(e);this.emit("close")}}[L](e){let t=true;try{this[S](null,s.writeSync(this[c],e,0,e.length,this[R]));t=false}finally{if(t)try{this[l]()}catch(e){}}}}t.ReadStream=ReadStream;t.ReadStreamSync=ReadStreamSync;t.WriteStream=WriteStream;t.WriteStreamSync=WriteStreamSync},835:function(e){e.exports=require("url")},858:function(e,t){"use strict";const n=t.encode=((e,t)=>{if(!Number.isSafeInteger(e))throw Error("cannot encode number outside of javascript safe integer range");else if(e<0)r(e,t);else i(e,t);return t});const i=(e,t)=>{t[0]=128;for(var n=t.length;n>1;n--){t[n-1]=e&255;e=Math.floor(e/256)}};const r=(e,t)=>{t[0]=255;var n=false;e=e*-1;for(var i=t.length;i>1;i--){var r=e&255;e=Math.floor(e/256);if(n)t[i-1]=l(r);else if(r===0)t[i-1]=0;else{n=true;t[i-1]=u(r)}}};const s=t.parse=(e=>{var t=e[e.length-1];var n=e[0];var i;if(n===128)i=o(e.slice(1,e.length));else if(n===255)i=a(e);else throw Error("invalid base256 encoding");if(!Number.isSafeInteger(i))throw Error("parsed number outside of javascript safe integer range");return i});const a=e=>{var t=e.length;var n=0;var i=false;for(var r=t-1;r>-1;r--){var s=e[r];var a;if(i)a=l(s);else if(s===0)a=s;else{i=true;a=u(s)}if(a!==0)n-=a*Math.pow(256,t-r-1)}return n};const o=e=>{var t=e.length;var n=0;for(var i=t-1;i>-1;i--){var r=e[i];if(r!==0)n+=r*Math.pow(256,t-i-1)}return n};const l=e=>(255^e)&255;const u=e=>(255^e)+1&255},870:function(e,t,n){const i=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform;const{resolve:r,parse:s}=n(622);const a=e=>{if(/\0/.test(e)){throw Object.assign(new TypeError("path must be a string without null bytes"),{path:e,code:"ERR_INVALID_ARG_VALUE"})}e=r(e);if(i==="win32"){const t=/[*|"<>?:]/;const{root:n}=s(e);if(t.test(e.substr(n.length))){throw Object.assign(new Error("Illegal characters in path."),{path:e,code:"EINVAL"})}}return e};e.exports=a},885:function(e,t,n){"use strict";t.c=t.create=n(159);t.r=t.replace=n(630);t.t=t.list=n(381);t.u=t.update=n(966);t.x=t.extract=n(656);t.Pack=n(726);t.Unpack=n(63);t.Parse=n(203);t.ReadEntry=n(662);t.WriteEntry=n(303);t.Header=n(232);t.Pax=n(582);t.types=n(554)},891:function(e){"use strict";const t=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);const n=e.exports=(e=>e?Object.keys(e).map(n=>[t.has(n)?t.get(n):n,e[n]]).reduce((e,t)=>(e[t[0]]=t[1],e),Object.create(null)):{})},904:function(e){"use strict";e.exports=((e,t,n)=>{e&=4095;if(n){e=(e|384)&~18}if(t){if(e&256)e|=64;if(e&32)e|=8;if(e&4)e|=1}return e})},941:function(e,t,n){"use strict";const i=n(747);const r=n(622);const s=i.lchown?"lchown":"chown";const a=i.lchownSync?"lchownSync":"chownSync";const o=i.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/);const l=(e,t,n)=>{try{return i[a](e,t,n)}catch(e){if(e.code!=="ENOENT")throw e}};const u=(e,t,n)=>{try{return i.chownSync(e,t,n)}catch(e){if(e.code!=="ENOENT")throw e}};const c=o?(e,t,n,r)=>s=>{if(!s||s.code!=="EISDIR")r(s);else i.chown(e,t,n,r)}:(e,t,n,i)=>i;const h=o?(e,t,n)=>{try{return l(e,t,n)}catch(i){if(i.code!=="EISDIR")throw i;u(e,t,n)}}:(e,t,n)=>l(e,t,n);const f=process.version;let d=(e,t,n)=>i.readdir(e,t,n);let m=(e,t)=>i.readdirSync(e,t);if(/^v4\./.test(f))d=((e,t,n)=>i.readdir(e,n));const v=(e,t,n,r)=>{i[s](e,t,n,c(e,t,n,e=>{r(e&&e.code!=="ENOENT"?e:null)}))};const p=(e,t,n,s,a)=>{if(typeof t==="string")return i.lstat(r.resolve(e,t),(i,r)=>{if(i)return a(i.code!=="ENOENT"?i:null);r.name=t;p(e,r,n,s,a)});if(t.isDirectory()){w(r.resolve(e,t.name),n,s,i=>{if(i)return a(i);const o=r.resolve(e,t.name);v(o,n,s,a)})}else{const i=r.resolve(e,t.name);v(i,n,s,a)}};const w=(e,t,n,i)=>{d(e,{withFileTypes:true},(r,s)=>{if(r){if(r.code==="ENOENT")return i();else if(r.code!=="ENOTDIR"&&r.code!=="ENOTSUP")return i(r)}if(r||!s.length)return v(e,t,n,i);let a=s.length;let o=null;const l=r=>{if(o)return;if(r)return i(o=r);if(--a===0)return v(e,t,n,i)};s.forEach(i=>p(e,i,t,n,l))})};const y=(e,t,n,s)=>{if(typeof t==="string"){try{const n=i.lstatSync(r.resolve(e,t));n.name=t;t=n}catch(e){if(e.code==="ENOENT")return;else throw e}}if(t.isDirectory())g(r.resolve(e,t.name),n,s);h(r.resolve(e,t.name),n,s)};const g=(e,t,n)=>{let i;try{i=m(e,{withFileTypes:true})}catch(i){if(i.code==="ENOENT")return;else if(i.code==="ENOTDIR"||i.code==="ENOTSUP")return h(e,t,n);else throw i}if(i&&i.length)i.forEach(i=>y(e,i,t,n));return h(e,t,n)};e.exports=w;w.sync=g},953:function(e,t,n){const i=process.env.__FAKE_PLATFORM__||process.platform;const r=i==="win32";const s=global.__FAKE_TESTING_FS__||n(747);const{O_CREAT:a,O_TRUNC:o,O_WRONLY:l,UV_FS_O_FILEMAP:u=0}=s.constants;const c=r&&!!u;const h=512*1024;const f=u|o|a|l;e.exports=!c?()=>"w":e=>e<h?f:"w"},965:function(e){e.exports=Pend;function Pend(){this.pending=0;this.max=Infinity;this.listeners=[];this.waiting=[];this.error=null}Pend.prototype.go=function(e){if(this.pending<this.max){pendGo(this,e)}else{this.waiting.push(e)}};Pend.prototype.wait=function(e){if(this.pending===0){e(this.error)}else{this.listeners.push(e)}};Pend.prototype.hold=function(){return pendHold(this)};function pendHold(e){e.pending+=1;var t=false;return onCb;function onCb(n){if(t)throw new Error("callback called twice");t=true;e.error=e.error||n;e.pending-=1;if(e.waiting.length>0&&e.pending<e.max){pendGo(e,e.waiting.shift())}else if(e.pending===0){var i=e.listeners;e.listeners=[];i.forEach(cbListener)}}function cbListener(t){t(e.error)}}function pendGo(e,t){t(pendHold(e))}},966:function(e,t,n){"use strict";const i=n(891);const r=n(630);const s=e.exports=((e,t,n)=>{const s=i(e);if(!s.file)throw new TypeError("file is required");if(s.gzip)throw new TypeError("cannot append to compressed archives");if(!t||!Array.isArray(t)||!t.length)throw new TypeError("no files or directories specified");t=Array.from(t);a(s);return r(s,t,n)});const a=e=>{const t=e.filter;if(!e.mtimeCache)e.mtimeCache=new Map;e.filter=t?(n,i)=>t(n,i)&&!(e.mtimeCache.get(n)>i.mtime):(t,n)=>!(e.mtimeCache.get(t)>n.mtime)}}});
2
+ module.exports=function(e,t){"use strict";var n={};function __webpack_require__(t){if(n[t]){return n[t].exports}var i=n[t]={i:t,l:false,exports:{}};e[t].call(i.exports,i,i.exports,__webpack_require__);i.l=true;return i.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(610)}return startup()}({60:function(e,t,n){const i=n(761).constants||{ZLIB_VERNUM:4736};e.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:Infinity,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},i))},63:function(e,t,n){"use strict";const i=n(357);const r=n(614).EventEmitter;const s=n(203);const a=n(747);const o=n(827);const l=n(622);const u=n(577);const c=u.sync;const h=n(478);const f=n(182);const d=Symbol("onEntry");const m=Symbol("checkFs");const v=Symbol("checkFs2");const p=Symbol("isReusable");const w=Symbol("makeFs");const y=Symbol("file");const g=Symbol("directory");const b=Symbol("link");const S=Symbol("symlink");const E=Symbol("hardlink");const x=Symbol("unsupported");const R=Symbol("unknown");const N=Symbol("checkPath");const O=Symbol("mkdir");const _=Symbol("onError");const I=Symbol("pending");const D=Symbol("pend");const L=Symbol("unpend");const A=Symbol("ended");const C=Symbol("maybeClose");const B=Symbol("skip");const T=Symbol("doChown");const k=Symbol("uid");const M=Symbol("gid");const F=n(417);const U=n(953);const z=()=>{throw new Error("sync function called cb somehow?!?")};const W=(e,t)=>{if(process.platform!=="win32")return a.unlink(e,t);const n=e+".DELETE."+F.randomBytes(16).toString("hex");a.rename(e,n,e=>{if(e)return t(e);a.unlink(n,t)})};const P=e=>{if(process.platform!=="win32")return a.unlinkSync(e);const t=e+".DELETE."+F.randomBytes(16).toString("hex");a.renameSync(e,t);a.unlinkSync(t)};const H=(e,t,n)=>e===e>>>0?e:t===t>>>0?t:n;class Unpack extends s{constructor(e){if(!e)e={};e.ondone=(e=>{this[A]=true;this[C]()});super(e);this.reservations=f();this.transform=typeof e.transform==="function"?e.transform:null;this.writable=true;this.readable=false;this[I]=0;this[A]=false;this.dirCache=e.dirCache||new Map;if(typeof e.uid==="number"||typeof e.gid==="number"){if(typeof e.uid!=="number"||typeof e.gid!=="number")throw new TypeError("cannot set owner without number uid and gid");if(e.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=e.uid;this.gid=e.gid;this.setOwner=true}else{this.uid=null;this.gid=null;this.setOwner=false}if(e.preserveOwner===undefined&&typeof e.uid!=="number")this.preserveOwner=process.getuid&&process.getuid()===0;else this.preserveOwner=!!e.preserveOwner;this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null;this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null;this.forceChown=e.forceChown===true;this.win32=!!e.win32||process.platform==="win32";this.newer=!!e.newer;this.keep=!!e.keep;this.noMtime=!!e.noMtime;this.preservePaths=!!e.preservePaths;this.unlink=!!e.unlink;this.cwd=l.resolve(e.cwd||process.cwd());this.strip=+e.strip||0;this.processUmask=process.umask();this.umask=typeof e.umask==="number"?e.umask:this.processUmask;this.dmode=e.dmode||511&~this.umask;this.fmode=e.fmode||438&~this.umask;this.on("entry",e=>this[d](e))}warn(e,t,n={}){if(e==="TAR_BAD_ARCHIVE"||e==="TAR_ABORT")n.recoverable=false;return super.warn(e,t,n)}[C](){if(this[A]&&this[I]===0){this.emit("prefinish");this.emit("finish");this.emit("end");this.emit("close")}}[N](e){if(this.strip){const t=e.path.split(/\/|\\/);if(t.length<this.strip)return false;e.path=t.slice(this.strip).join("/");if(e.type==="Link"){const t=e.linkpath.split(/\/|\\/);if(t.length>=this.strip)e.linkpath=t.slice(this.strip).join("/")}}if(!this.preservePaths){const t=e.path;if(t.match(/(^|\/|\\)\.\.(\\|\/|$)/)){this.warn("TAR_ENTRY_ERROR",`path contains '..'`,{entry:e,path:t});return false}if(l.win32.isAbsolute(t)){const n=l.win32.parse(t);e.path=t.substr(n.root.length);const i=n.root;this.warn("TAR_ENTRY_INFO",`stripping ${i} from absolute path`,{entry:e,path:t})}}if(this.win32){const t=l.win32.parse(e.path);e.path=t.root===""?h.encode(e.path):t.root+h.encode(e.path.substr(t.root.length))}if(l.isAbsolute(e.path))e.absolute=e.path;else e.absolute=l.resolve(this.cwd,e.path);return true}[d](e){if(!this[N](e))return e.resume();i.equal(typeof e.absolute,"string");switch(e.type){case"Directory":case"GNUDumpDir":if(e.mode)e.mode=e.mode|448;case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[m](e);case"CharacterDevice":case"BlockDevice":case"FIFO":return this[x](e)}}[_](e,t){if(e.name==="CwdError")this.emit("error",e);else{this.warn("TAR_ENTRY_ERROR",e,{entry:t});this[L]();t.resume()}}[O](e,t,n){u(e,{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t},n)}[T](e){return this.forceChown||this.preserveOwner&&(typeof e.uid==="number"&&e.uid!==this.processUid||typeof e.gid==="number"&&e.gid!==this.processGid)||(typeof this.uid==="number"&&this.uid!==this.processUid||typeof this.gid==="number"&&this.gid!==this.processGid)}[k](e){return H(this.uid,e.uid,this.processUid)}[M](e){return H(this.gid,e.gid,this.processGid)}[y](e,t){const n=e.mode&4095||this.fmode;const i=new o.WriteStream(e.absolute,{flags:U(e.size),mode:n,autoClose:false});i.on("error",t=>this[_](t,e));let r=1;const s=n=>{if(n)return this[_](n,e);if(--r===0){a.close(i.fd,n=>{t();n?this[_](n,e):this[L]()})}};i.on("finish",t=>{const n=e.absolute;const o=i.fd;if(e.mtime&&!this.noMtime){r++;const t=e.atime||new Date;const i=e.mtime;a.futimes(o,t,i,e=>e?a.utimes(n,t,i,t=>s(t&&e)):s())}if(this[T](e)){r++;const t=this[k](e);const i=this[M](e);a.fchown(o,t,i,e=>e?a.chown(n,t,i,t=>s(t&&e)):s())}s()});const l=this.transform?this.transform(e)||e:e;if(l!==e){l.on("error",t=>this[_](t,e));e.pipe(l)}l.pipe(i)}[g](e,t){const n=e.mode&4095||this.dmode;this[O](e.absolute,n,n=>{if(n){t();return this[_](n,e)}let i=1;const r=n=>{if(--i===0){t();this[L]();e.resume()}};if(e.mtime&&!this.noMtime){i++;a.utimes(e.absolute,e.atime||new Date,e.mtime,r)}if(this[T](e)){i++;a.chown(e.absolute,this[k](e),this[M](e),r)}r()})}[x](e){e.unsupported=true;this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e});e.resume()}[S](e,t){this[b](e,e.linkpath,"symlink",t)}[E](e,t){this[b](e,l.resolve(this.cwd,e.linkpath),"link",t)}[D](){this[I]++}[L](){this[I]--;this[C]()}[B](e){this[L]();e.resume()}[p](e,t){return e.type==="File"&&!this.unlink&&t.isFile()&&t.nlink<=1&&process.platform!=="win32"}[m](e){this[D]();const t=[e.path];if(e.linkpath)t.push(e.linkpath);this.reservations.reserve(t,t=>this[v](e,t))}[v](e,t){this[O](l.dirname(e.absolute),this.dmode,n=>{if(n){t();return this[_](n,e)}a.lstat(e.absolute,(n,i)=>{if(i&&(this.keep||this.newer&&i.mtime>e.mtime)){this[B](e);t()}else if(n||this[p](e,i)){this[w](null,e,t)}else if(i.isDirectory()){if(e.type==="Directory"){if(!e.mode||(i.mode&4095)===e.mode)this[w](null,e,t);else a.chmod(e.absolute,e.mode,n=>this[w](n,e,t))}else a.rmdir(e.absolute,n=>this[w](n,e,t))}else W(e.absolute,n=>this[w](n,e,t))})})}[w](e,t,n){if(e)return this[_](e,t);switch(t.type){case"File":case"OldFile":case"ContiguousFile":return this[y](t,n);case"Link":return this[E](t,n);case"SymbolicLink":return this[S](t,n);case"Directory":case"GNUDumpDir":return this[g](t,n)}}[b](e,t,n,i){a[n](t,e.absolute,t=>{if(t)return this[_](t,e);i();this[L]();e.resume()})}}class UnpackSync extends Unpack{constructor(e){super(e)}[m](e){const t=this[O](l.dirname(e.absolute),this.dmode,z);if(t)return this[_](t,e);try{const n=a.lstatSync(e.absolute);if(this.keep||this.newer&&n.mtime>e.mtime)return this[B](e);else if(this[p](e,n))return this[w](null,e,z);else{try{if(n.isDirectory()){if(e.type==="Directory"){if(e.mode&&(n.mode&4095)!==e.mode)a.chmodSync(e.absolute,e.mode)}else a.rmdirSync(e.absolute)}else P(e.absolute);return this[w](null,e,z)}catch(t){return this[_](t,e)}}}catch(t){return this[w](null,e,z)}}[y](e,t){const n=e.mode&4095||this.fmode;const i=t=>{let n;try{a.closeSync(s)}catch(e){n=e}if(t||n)this[_](t||n,e)};let r;let s;try{s=a.openSync(e.absolute,U(e.size),n)}catch(e){return i(e)}const o=this.transform?this.transform(e)||e:e;if(o!==e){o.on("error",t=>this[_](t,e));e.pipe(o)}o.on("data",e=>{try{a.writeSync(s,e,0,e.length)}catch(e){i(e)}});o.on("end",t=>{let n=null;if(e.mtime&&!this.noMtime){const t=e.atime||new Date;const i=e.mtime;try{a.futimesSync(s,t,i)}catch(r){try{a.utimesSync(e.absolute,t,i)}catch(e){n=r}}}if(this[T](e)){const t=this[k](e);const i=this[M](e);try{a.fchownSync(s,t,i)}catch(r){try{a.chownSync(e.absolute,t,i)}catch(e){n=n||r}}}i(n)})}[g](e,t){const n=e.mode&4095||this.dmode;const i=this[O](e.absolute,n);if(i)return this[_](i,e);if(e.mtime&&!this.noMtime){try{a.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch(i){}}if(this[T](e)){try{a.chownSync(e.absolute,this[k](e),this[M](e))}catch(i){}}e.resume()}[O](e,t){try{return u.sync(e,{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t})}catch(e){return e}}[b](e,t,n,i){try{a[n+"Sync"](t,e.absolute);e.resume()}catch(t){return this[_](t,e)}}}Unpack.Sync=UnpackSync;e.exports=Unpack},92:function(e,t,n){const{dirname:i}=n(622);const r=(e,t,n=undefined)=>{if(n===t)return Promise.resolve();return e.statAsync(t).then(e=>e.isDirectory()?n:undefined,n=>n.code==="ENOENT"?r(e,i(t),t):undefined)};const s=(e,t,n=undefined)=>{if(n===t)return undefined;try{return e.statSync(t).isDirectory()?n:undefined}catch(n){return n.code==="ENOENT"?s(e,i(t),t):undefined}};e.exports={findMade:r,findMadeSync:s}},93:function(e,t,n){var i=n(413).Stream;e.exports=legacy;function legacy(e){return{ReadStream:ReadStream,WriteStream:WriteStream};function ReadStream(t,n){if(!(this instanceof ReadStream))return new ReadStream(t,n);i.call(this);var r=this;this.path=t;this.fd=null;this.readable=true;this.paused=false;this.flags="r";this.mode=438;this.bufferSize=64*1024;n=n||{};var s=Object.keys(n);for(var a=0,o=s.length;a<o;a++){var l=s[a];this[l]=n[l]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==undefined){if("number"!==typeof this.start){throw TypeError("start must be a Number")}if(this.end===undefined){this.end=Infinity}else if("number"!==typeof this.end){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(){r._read()});return}e.open(this.path,this.flags,this.mode,function(e,t){if(e){r.emit("error",e);r.readable=false;return}r.fd=t;r.emit("open",t);r._read()})}function WriteStream(t,n){if(!(this instanceof WriteStream))return new WriteStream(t,n);i.call(this);this.path=t;this.fd=null;this.writable=true;this.flags="w";this.encoding="binary";this.mode=438;this.bytesWritten=0;n=n||{};var r=Object.keys(n);for(var s=0,a=r.length;s<a;s++){var o=r[s];this[o]=n[o]}if(this.start!==undefined){if("number"!==typeof this.start){throw TypeError("start must be a Number")}if(this.start<0){throw new Error("start must be >= zero")}this.pos=this.start}this.busy=false;this._queue=[];if(this.fd===null){this._open=e.open;this._queue.push([this._open,this.path,this.flags,this.mode,undefined]);this.flush()}}}},129:function(e){e.exports=require("child_process")},133:function(e,t,n){"use strict";const i=n(357);const r=n(293).Buffer;const s=n(761);const a=t.constants=n(60);const o=n(720);const l=r.concat;const u=Symbol("_superWrite");class ZlibError extends Error{constructor(e){super("zlib: "+e.message);this.code=e.code;this.errno=e.errno;if(!this.code)this.code="ZLIB_ERROR";this.message="zlib: "+e.message;Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}}const c=Symbol("opts");const h=Symbol("flushFlag");const f=Symbol("finishFlushFlag");const d=Symbol("fullFlushFlag");const m=Symbol("handle");const v=Symbol("onError");const p=Symbol("sawError");const w=Symbol("level");const y=Symbol("strategy");const g=Symbol("ended");const b=Symbol("_defaultFullFlush");class ZlibBase extends o{constructor(e,t){if(!e||typeof e!=="object")throw new TypeError("invalid options for ZlibBase constructor");super(e);this[g]=false;this[c]=e;this[h]=e.flush;this[f]=e.finishFlush;try{this[m]=new s[t](e)}catch(e){throw new ZlibError(e)}this[v]=(e=>{this[p]=true;this.close();this.emit("error",e)});this[m].on("error",e=>this[v](new ZlibError(e)));this.once("end",()=>this.close)}close(){if(this[m]){this[m].close();this[m]=null;this.emit("close")}}reset(){if(!this[p]){i(this[m],"zlib binding closed");return this[m].reset()}}flush(e){if(this.ended)return;if(typeof e!=="number")e=this[d];this.write(Object.assign(r.alloc(0),{[h]:e}))}end(e,t,n){if(e)this.write(e,t);this.flush(this[f]);this[g]=true;return super.end(null,null,n)}get ended(){return this[g]}write(e,t,n){if(typeof t==="function")n=t,t="utf8";if(typeof e==="string")e=r.from(e,t);if(this[p])return;i(this[m],"zlib binding closed");const s=this[m]._handle;const a=s.close;s.close=(()=>{});const o=this[m].close;this[m].close=(()=>{});r.concat=(e=>e);let c;try{const t=typeof e[h]==="number"?e[h]:this[h];c=this[m]._processChunk(e,t);r.concat=l}catch(e){r.concat=l;this[v](new ZlibError(e))}finally{if(this[m]){this[m]._handle=s;s.close=a;this[m].close=o;this[m].removeAllListeners("error")}}let f;if(c){if(Array.isArray(c)&&c.length>0){f=this[u](r.from(c[0]));for(let e=1;e<c.length;e++){f=this[u](c[e])}}else{f=this[u](r.from(c))}}if(n)n();return f}[u](e){return super.write(e)}}class Zlib extends ZlibBase{constructor(e,t){e=e||{};e.flush=e.flush||a.Z_NO_FLUSH;e.finishFlush=e.finishFlush||a.Z_FINISH;super(e,t);this[d]=a.Z_FULL_FLUSH;this[w]=e.level;this[y]=e.strategy}params(e,t){if(this[p])return;if(!this[m])throw new Error("cannot switch params when binding is closed");if(!this[m].params)throw new Error("not supported in this implementation");if(this[w]!==e||this[y]!==t){this.flush(a.Z_SYNC_FLUSH);i(this[m],"zlib binding closed");const n=this[m].flush;this[m].flush=((e,t)=>{this.flush(e);t()});try{this[m].params(e,t)}finally{this[m].flush=n}if(this[m]){this[w]=e;this[y]=t}}}}class Deflate extends Zlib{constructor(e){super(e,"Deflate")}}class Inflate extends Zlib{constructor(e){super(e,"Inflate")}}const S=Symbol("_portable");class Gzip extends Zlib{constructor(e){super(e,"Gzip");this[S]=e&&!!e.portable}[u](e){if(!this[S])return super[u](e);this[S]=false;e[9]=255;return super[u](e)}}class Gunzip extends Zlib{constructor(e){super(e,"Gunzip")}}class DeflateRaw extends Zlib{constructor(e){super(e,"DeflateRaw")}}class InflateRaw extends Zlib{constructor(e){super(e,"InflateRaw")}}class Unzip extends Zlib{constructor(e){super(e,"Unzip")}}class Brotli extends ZlibBase{constructor(e,t){e=e||{};e.flush=e.flush||a.BROTLI_OPERATION_PROCESS;e.finishFlush=e.finishFlush||a.BROTLI_OPERATION_FINISH;super(e,t);this[d]=a.BROTLI_OPERATION_FLUSH}}class BrotliCompress extends Brotli{constructor(e){super(e,"BrotliCompress")}}class BrotliDecompress extends Brotli{constructor(e){super(e,"BrotliDecompress")}}t.Deflate=Deflate;t.Inflate=Inflate;t.Gzip=Gzip;t.Gunzip=Gunzip;t.DeflateRaw=DeflateRaw;t.InflateRaw=InflateRaw;t.Unzip=Unzip;if(typeof s.BrotliCompress==="function"){t.BrotliCompress=BrotliCompress;t.BrotliDecompress=BrotliDecompress}else{t.BrotliCompress=t.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}}},159:function(e,t,n){"use strict";const i=n(891);const r=n(726);const s=n(747);const a=n(827);const o=n(381);const l=n(622);const u=e.exports=((e,t,n)=>{if(typeof t==="function")n=t;if(Array.isArray(e))t=e,e={};if(!t||!Array.isArray(t)||!t.length)throw new TypeError("no files or directories specified");t=Array.from(t);const r=i(e);if(r.sync&&typeof n==="function")throw new TypeError("callback not supported for sync tar functions");if(!r.file&&typeof n==="function")throw new TypeError("callback only supported with file option");return r.file&&r.sync?c(r,t):r.file?h(r,t,n):r.sync?m(r,t):v(r,t)});const c=(e,t)=>{const n=new r.Sync(e);const i=new a.WriteStreamSync(e.file,{mode:e.mode||438});n.pipe(i);f(n,t)};const h=(e,t,n)=>{const i=new r(e);const s=new a.WriteStream(e.file,{mode:e.mode||438});i.pipe(s);const o=new Promise((e,t)=>{s.on("error",t);s.on("close",e);i.on("error",t)});d(i,t);return n?o.then(n,n):o};const f=(e,t)=>{t.forEach(t=>{if(t.charAt(0)==="@")o({file:l.resolve(e.cwd,t.substr(1)),sync:true,noResume:true,onentry:t=>e.add(t)});else e.add(t)});e.end()};const d=(e,t)=>{while(t.length){const n=t.shift();if(n.charAt(0)==="@")return o({file:l.resolve(e.cwd,n.substr(1)),noResume:true,onentry:t=>e.add(t)}).then(n=>d(e,t));else e.add(n)}e.end()};const m=(e,t)=>{const n=new r.Sync(e);f(n,t);return n};const v=(e,t)=>{const n=new r(e);d(n,t);return n}},182:function(e,t,n){const i=n(357);e.exports=(()=>{const e=new Map;const t=new Map;const{join:r}=n(622);const s=e=>r(e).split(/[\\\/]/).slice(0,-1).reduce((e,t)=>e.length?e.concat(r(e[e.length-1],t)):[t],[]);const a=new Set;const o=n=>{const i=t.get(n);if(!i)throw new Error("function does not have any path reservations");return{paths:i.paths.map(t=>e.get(t)),dirs:[...i.dirs].map(t=>e.get(t))}};const l=e=>{const{paths:t,dirs:n}=o(e);return t.every(t=>t[0]===e)&&n.every(t=>t[0]instanceof Set&&t[0].has(e))};const u=e=>{if(a.has(e)||!l(e))return false;a.add(e);e(()=>c(e));return true};const c=n=>{if(!a.has(n))return false;const{paths:r,dirs:s}=t.get(n);const o=new Set;r.forEach(t=>{const r=e.get(t);i.equal(r[0],n);if(r.length===1)e.delete(t);else{r.shift();if(typeof r[0]==="function")o.add(r[0]);else r[0].forEach(e=>o.add(e))}});s.forEach(t=>{const r=e.get(t);i(r[0]instanceof Set);if(r[0].size===1&&r.length===1){e.delete(t)}else if(r[0].size===1){r.shift();o.add(r[0])}else r[0].delete(n)});a.delete(n);o.forEach(e=>u(e));return true};const h=(n,i)=>{const r=new Set(n.map(e=>s(e)).reduce((e,t)=>e.concat(t)));t.set(i,{dirs:r,paths:n});n.forEach(t=>{const n=e.get(t);if(!n)e.set(t,[i]);else n.push(i)});r.forEach(t=>{const n=e.get(t);if(!n)e.set(t,[new Set([i])]);else if(n[n.length-1]instanceof Set)n[n.length-1].add(i);else n.push(new Set([i]))});return u(i)};return{check:l,reserve:h}})},203:function(e,t,n){"use strict";const i=n(796);const r=n(622);const s=n(232);const a=n(614);const o=n(612);const l=1024*1024;const u=n(662);const c=n(582);const h=n(133);const f=Buffer.from([31,139]);const d=Symbol("state");const m=Symbol("writeEntry");const v=Symbol("readEntry");const p=Symbol("nextEntry");const w=Symbol("processEntry");const y=Symbol("extendedHeader");const g=Symbol("globalExtendedHeader");const b=Symbol("meta");const S=Symbol("emitMeta");const E=Symbol("buffer");const x=Symbol("queue");const R=Symbol("ended");const N=Symbol("emittedEnd");const O=Symbol("emit");const _=Symbol("unzip");const I=Symbol("consumeChunk");const D=Symbol("consumeChunkSub");const L=Symbol("consumeBody");const A=Symbol("consumeMeta");const C=Symbol("consumeHeader");const B=Symbol("consuming");const T=Symbol("bufferConcat");const k=Symbol("maybeEnd");const M=Symbol("writing");const F=Symbol("aborted");const U=Symbol("onDone");const z=Symbol("sawValidEntry");const W=Symbol("sawNullBlock");const P=Symbol("sawEOF");const H=e=>true;e.exports=i(class Parser extends a{constructor(e){e=e||{};super(e);this.file=e.file||"";this[z]=null;this.on(U,e=>{if(this[d]==="begin"||this[z]===false){this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}});if(e.ondone)this.on(U,e.ondone);else this.on(U,e=>{this.emit("prefinish");this.emit("finish");this.emit("end");this.emit("close")});this.strict=!!e.strict;this.maxMetaEntrySize=e.maxMetaEntrySize||l;this.filter=typeof e.filter==="function"?e.filter:H;this.writable=true;this.readable=false;this[x]=new o;this[E]=null;this[v]=null;this[m]=null;this[d]="begin";this[b]="";this[y]=null;this[g]=null;this[R]=false;this[_]=null;this[F]=false;this[W]=false;this[P]=false;if(typeof e.onwarn==="function")this.on("warn",e.onwarn);if(typeof e.onentry==="function")this.on("entry",e.onentry)}[C](e,t){if(this[z]===null)this[z]=false;let n;try{n=new s(e,t,this[y],this[g])}catch(e){return this.warn("TAR_ENTRY_INVALID",e)}if(n.nullBlock){if(this[W]){this[P]=true;if(this[d]==="begin")this[d]="header";this[O]("eof")}else{this[W]=true;this[O]("nullBlock")}}else{this[W]=false;if(!n.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:n});else if(!n.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:n});else{const e=n.type;if(/^(Symbolic)?Link$/.test(e)&&!n.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:n});else if(!/^(Symbolic)?Link$/.test(e)&&n.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:n});else{const e=this[m]=new u(n,this[y],this[g]);if(!this[z]){if(e.remain){const t=()=>{if(!e.invalid)this[z]=true};e.on("end",t)}else{this[z]=true}}if(e.meta){if(e.size>this.maxMetaEntrySize){e.ignore=true;this[O]("ignoredEntry",e);this[d]="ignore";e.resume()}else if(e.size>0){this[b]="";e.on("data",e=>this[b]+=e);this[d]="meta"}}else{this[y]=null;e.ignore=e.ignore||!this.filter(e.path,e);if(e.ignore){this[O]("ignoredEntry",e);this[d]=e.remain?"ignore":"header";e.resume()}else{if(e.remain)this[d]="body";else{this[d]="header";e.end()}if(!this[v]){this[x].push(e);this[p]()}else this[x].push(e)}}}}}}[w](e){let t=true;if(!e){this[v]=null;t=false}else if(Array.isArray(e))this.emit.apply(this,e);else{this[v]=e;this.emit("entry",e);if(!e.emittedEnd){e.on("end",e=>this[p]());t=false}}return t}[p](){do{}while(this[w](this[x].shift()));if(!this[x].length){const e=this[v];const t=!e||e.flowing||e.size===e.remain;if(t){if(!this[M])this.emit("drain")}else e.once("drain",e=>this.emit("drain"))}}[L](e,t){const n=this[m];const i=n.blockRemain;const r=i>=e.length&&t===0?e:e.slice(t,t+i);n.write(r);if(!n.blockRemain){this[d]="header";this[m]=null;n.end()}return r.length}[A](e,t){const n=this[m];const i=this[L](e,t);if(!this[m])this[S](n);return i}[O](e,t,n){if(!this[x].length&&!this[v])this.emit(e,t,n);else this[x].push([e,t,n])}[S](e){this[O]("meta",this[b]);switch(e.type){case"ExtendedHeader":case"OldExtendedHeader":this[y]=c.parse(this[b],this[y],false);break;case"GlobalExtendedHeader":this[g]=c.parse(this[b],this[g],true);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[y]=this[y]||Object.create(null);this[y].path=this[b].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[y]=this[y]||Object.create(null);this[y].linkpath=this[b].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+e.type)}}abort(e){this[F]=true;this.emit("abort",e);this.warn("TAR_ABORT",e,{recoverable:false})}write(e){if(this[F])return;if(this[_]===null&&e){if(this[E]){e=Buffer.concat([this[E],e]);this[E]=null}if(e.length<f.length){this[E]=e;return true}for(let t=0;this[_]===null&&t<f.length;t++){if(e[t]!==f[t])this[_]=false}if(this[_]===null){const t=this[R];this[R]=false;this[_]=new h.Unzip;this[_].on("data",e=>this[I](e));this[_].on("error",e=>this.abort(e));this[_].on("end",e=>{this[R]=true;this[I]()});this[M]=true;const n=this[_][t?"end":"write"](e);this[M]=false;return n}}this[M]=true;if(this[_])this[_].write(e);else this[I](e);this[M]=false;const t=this[x].length?false:this[v]?this[v].flowing:true;if(!t&&!this[x].length)this[v].once("drain",e=>this.emit("drain"));return t}[T](e){if(e&&!this[F])this[E]=this[E]?Buffer.concat([this[E],e]):e}[k](){if(this[R]&&!this[N]&&!this[F]&&!this[B]){this[N]=true;const e=this[m];if(e&&e.blockRemain){const t=this[E]?this[E].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${t} available)`,{entry:e});if(this[E])e.write(this[E]);e.end()}this[O](U)}}[I](e){if(this[B])this[T](e);else if(!e&&!this[E])this[k]();else{this[B]=true;if(this[E]){this[T](e);const t=this[E];this[E]=null;this[D](t)}else{this[D](e)}while(this[E]&&this[E].length>=512&&!this[F]&&!this[P]){const e=this[E];this[E]=null;this[D](e)}this[B]=false}if(!this[E]||this[R])this[k]()}[D](e){let t=0;let n=e.length;while(t+512<=n&&!this[F]&&!this[P]){switch(this[d]){case"begin":case"header":this[C](e,t);t+=512;break;case"ignore":case"body":t+=this[L](e,t);break;case"meta":t+=this[A](e,t);break;default:throw new Error("invalid state: "+this[d])}}if(t<n){if(this[E])this[E]=Buffer.concat([e.slice(t),this[E]]);else this[E]=e.slice(t)}}end(e){if(!this[F]){if(this[_])this[_].end(e);else{this[R]=true;this.write(e)}}}})},211:function(e){e.exports=require("https")},232:function(e,t,n){"use strict";const i=n(554);const r=n(622).posix;const s=n(858);const a=Symbol("slurp");const o=Symbol("type");class Header{constructor(e,t,n,i){this.cksumValid=false;this.needPax=false;this.nullBlock=false;this.block=null;this.path=null;this.mode=null;this.uid=null;this.gid=null;this.size=null;this.mtime=null;this.cksum=null;this[o]="0";this.linkpath=null;this.uname=null;this.gname=null;this.devmaj=0;this.devmin=0;this.atime=null;this.ctime=null;if(Buffer.isBuffer(e))this.decode(e,t||0,n,i);else if(e)this.set(e)}decode(e,t,n,i){if(!t)t=0;if(!e||!(e.length>=t+512))throw new Error("need 512 bytes for header");this.path=u(e,t,100);this.mode=f(e,t+100,8);this.uid=f(e,t+108,8);this.gid=f(e,t+116,8);this.size=f(e,t+124,12);this.mtime=c(e,t+136,12);this.cksum=f(e,t+148,12);this[a](n);this[a](i,true);this[o]=u(e,t+156,1);if(this[o]==="")this[o]="0";if(this[o]==="0"&&this.path.substr(-1)==="/")this[o]="5";if(this[o]==="5")this.size=0;this.linkpath=u(e,t+157,100);if(e.slice(t+257,t+265).toString()==="ustar\x0000"){this.uname=u(e,t+265,32);this.gname=u(e,t+297,32);this.devmaj=f(e,t+329,8);this.devmin=f(e,t+337,8);if(e[t+475]!==0){const n=u(e,t+345,155);this.path=n+"/"+this.path}else{const n=u(e,t+345,130);if(n)this.path=n+"/"+this.path;this.atime=c(e,t+476,12);this.ctime=c(e,t+488,12)}}let r=8*32;for(let n=t;n<t+148;n++){r+=e[n]}for(let n=t+156;n<t+512;n++){r+=e[n]}this.cksumValid=r===this.cksum;if(this.cksum===null&&r===8*32)this.nullBlock=true}[a](e,t){for(let n in e){if(e[n]!==null&&e[n]!==undefined&&!(t&&n==="path"))this[n]=e[n]}}encode(e,t){if(!e){e=this.block=Buffer.alloc(512);t=0}if(!t)t=0;if(!(e.length>=t+512))throw new Error("need 512 bytes for header");const n=this.ctime||this.atime?130:155;const i=l(this.path||"",n);const r=i[0];const s=i[1];this.needPax=i[2];this.needPax=E(e,t,100,r)||this.needPax;this.needPax=p(e,t+100,8,this.mode)||this.needPax;this.needPax=p(e,t+108,8,this.uid)||this.needPax;this.needPax=p(e,t+116,8,this.gid)||this.needPax;this.needPax=p(e,t+124,12,this.size)||this.needPax;this.needPax=b(e,t+136,12,this.mtime)||this.needPax;e[t+156]=this[o].charCodeAt(0);this.needPax=E(e,t+157,100,this.linkpath)||this.needPax;e.write("ustar\x0000",t+257,8);this.needPax=E(e,t+265,32,this.uname)||this.needPax;this.needPax=E(e,t+297,32,this.gname)||this.needPax;this.needPax=p(e,t+329,8,this.devmaj)||this.needPax;this.needPax=p(e,t+337,8,this.devmin)||this.needPax;this.needPax=E(e,t+345,n,s)||this.needPax;if(e[t+475]!==0)this.needPax=E(e,t+345,155,s)||this.needPax;else{this.needPax=E(e,t+345,130,s)||this.needPax;this.needPax=b(e,t+476,12,this.atime)||this.needPax;this.needPax=b(e,t+488,12,this.ctime)||this.needPax}let a=8*32;for(let n=t;n<t+148;n++){a+=e[n]}for(let n=t+156;n<t+512;n++){a+=e[n]}this.cksum=a;p(e,t+148,8,this.cksum);this.cksumValid=true;return this.needPax}set(e){for(let t in e){if(e[t]!==null&&e[t]!==undefined)this[t]=e[t]}}get type(){return i.name.get(this[o])||this[o]}get typeKey(){return this[o]}set type(e){if(i.code.has(e))this[o]=i.code.get(e);else this[o]=e}}const l=(e,t)=>{const n=100;let i=e;let s="";let a;const o=r.parse(e).root||".";if(Buffer.byteLength(i)<n)a=[i,s,false];else{s=r.dirname(i);i=r.basename(i);do{if(Buffer.byteLength(i)<=n&&Buffer.byteLength(s)<=t)a=[i,s,false];else if(Buffer.byteLength(i)>n&&Buffer.byteLength(s)<=t)a=[i.substr(0,n-1),s,true];else{i=r.join(r.basename(s),i);s=r.dirname(s)}}while(s!==o&&!a);if(!a)a=[e.substr(0,n-1),"",true]}return a};const u=(e,t,n)=>e.slice(t,t+n).toString("utf8").replace(/\0.*/,"");const c=(e,t,n)=>h(f(e,t,n));const h=e=>e===null?null:new Date(e*1e3);const f=(e,t,n)=>e[t]&128?s.parse(e.slice(t,t+n)):m(e,t,n);const d=e=>isNaN(e)?null:e;const m=(e,t,n)=>d(parseInt(e.slice(t,t+n).toString("utf8").replace(/\0.*$/,"").trim(),8));const v={12:8589934591,8:2097151};const p=(e,t,n,i)=>i===null?false:i>v[n]||i<0?(s.encode(i,e.slice(t,t+n)),true):(w(e,t,n,i),false);const w=(e,t,n,i)=>e.write(y(i,n),t,n,"ascii");const y=(e,t)=>g(Math.floor(e).toString(8),t);const g=(e,t)=>(e.length===t-1?e:new Array(t-e.length-1).join("0")+e+" ")+"\0";const b=(e,t,n,i)=>i===null?false:p(e,t,n,i.getTime()/1e3);const S=new Array(156).join("\0");const E=(e,t,n,i)=>i===null?false:(e.write(i+S,t,n,"utf8"),i.length!==Buffer.byteLength(i)||i.length>n);e.exports=Header},250:function(e,t,n){var i=n(619);var r=process.cwd;var s=null;var a=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!s)s=r.call(process);return s};try{process.cwd()}catch(e){}var o=process.chdir;process.chdir=function(e){s=null;o.call(process,e)};e.exports=patch;function patch(e){if(i.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)){patchLchmod(e)}if(!e.lutimes){patchLutimes(e)}e.chown=chownFix(e.chown);e.fchown=chownFix(e.fchown);e.lchown=chownFix(e.lchown);e.chmod=chmodFix(e.chmod);e.fchmod=chmodFix(e.fchmod);e.lchmod=chmodFix(e.lchmod);e.chownSync=chownFixSync(e.chownSync);e.fchownSync=chownFixSync(e.fchownSync);e.lchownSync=chownFixSync(e.lchownSync);e.chmodSync=chmodFixSync(e.chmodSync);e.fchmodSync=chmodFixSync(e.fchmodSync);e.lchmodSync=chmodFixSync(e.lchmodSync);e.stat=statFix(e.stat);e.fstat=statFix(e.fstat);e.lstat=statFix(e.lstat);e.statSync=statFixSync(e.statSync);e.fstatSync=statFixSync(e.fstatSync);e.lstatSync=statFixSync(e.lstatSync);if(!e.lchmod){e.lchmod=function(e,t,n){if(n)process.nextTick(n)};e.lchmodSync=function(){}}if(!e.lchown){e.lchown=function(e,t,n,i){if(i)process.nextTick(i)};e.lchownSync=function(){}}if(a==="win32"){e.rename=function(t){return function(n,i,r){var s=Date.now();var a=0;t(n,i,function CB(o){if(o&&(o.code==="EACCES"||o.code==="EPERM")&&Date.now()-s<6e4){setTimeout(function(){e.stat(i,function(e,s){if(e&&e.code==="ENOENT")t(n,i,CB);else r(o)})},a);if(a<100)a+=10;return}if(r)r(o)})}}(e.rename)}e.read=function(t){function read(n,i,r,s,a,o){var l;if(o&&typeof o==="function"){var u=0;l=function(c,h,f){if(c&&c.code==="EAGAIN"&&u<10){u++;return t.call(e,n,i,r,s,a,l)}o.apply(this,arguments)}}return t.call(e,n,i,r,s,a,l)}read.__proto__=t;return read}(e.read);e.readSync=function(t){return function(n,i,r,s,a){var o=0;while(true){try{return t.call(e,n,i,r,s,a)}catch(e){if(e.code==="EAGAIN"&&o<10){o++;continue}throw e}}}}(e.readSync);function patchLchmod(e){e.lchmod=function(t,n,r){e.open(t,i.O_WRONLY|i.O_SYMLINK,n,function(t,i){if(t){if(r)r(t);return}e.fchmod(i,n,function(t){e.close(i,function(e){if(r)r(t||e)})})})};e.lchmodSync=function(t,n){var r=e.openSync(t,i.O_WRONLY|i.O_SYMLINK,n);var s=true;var a;try{a=e.fchmodSync(r,n);s=false}finally{if(s){try{e.closeSync(r)}catch(e){}}else{e.closeSync(r)}}return a}}function patchLutimes(e){if(i.hasOwnProperty("O_SYMLINK")){e.lutimes=function(t,n,r,s){e.open(t,i.O_SYMLINK,function(t,i){if(t){if(s)s(t);return}e.futimes(i,n,r,function(t){e.close(i,function(e){if(s)s(t||e)})})})};e.lutimesSync=function(t,n,r){var s=e.openSync(t,i.O_SYMLINK);var a;var o=true;try{a=e.futimesSync(s,n,r);o=false}finally{if(o){try{e.closeSync(s)}catch(e){}}else{e.closeSync(s)}}return a}}else{e.lutimes=function(e,t,n,i){if(i)process.nextTick(i)};e.lutimesSync=function(){}}}function chmodFix(t){if(!t)return t;return function(n,i,r){return t.call(e,n,i,function(e){if(chownErOk(e))e=null;if(r)r.apply(this,arguments)})}}function chmodFixSync(t){if(!t)return t;return function(n,i){try{return t.call(e,n,i)}catch(e){if(!chownErOk(e))throw e}}}function chownFix(t){if(!t)return t;return function(n,i,r,s){return t.call(e,n,i,r,function(e){if(chownErOk(e))e=null;if(s)s.apply(this,arguments)})}}function chownFixSync(t){if(!t)return t;return function(n,i,r){try{return t.call(e,n,i,r)}catch(e){if(!chownErOk(e))throw e}}}function statFix(t){if(!t)return t;return function(n,i,r){if(typeof i==="function"){r=i;i=null}function callback(e,t){if(t){if(t.uid<0)t.uid+=4294967296;if(t.gid<0)t.gid+=4294967296}if(r)r.apply(this,arguments)}return i?t.call(e,n,i,callback):t.call(e,n,callback)}}function statFixSync(t){if(!t)return t;return function(n,i){var r=i?t.call(e,n,i):t.call(e,n);if(r.uid<0)r.uid+=4294967296;if(r.gid<0)r.gid+=4294967296;return r}}function chownErOk(e){if(!e)return true;if(e.code==="ENOSYS")return true;var t=!process.getuid||process.getuid()!==0;if(t){if(e.code==="EINVAL"||e.code==="EPERM")return true}return false}}},293:function(e){e.exports=require("buffer")},303:function(e,t,n){"use strict";const i=n(720);const r=n(582);const s=n(232);const a=n(662);const o=n(747);const l=n(622);const u=n(554);const c=16*1024*1024;const h=Symbol("process");const f=Symbol("file");const d=Symbol("directory");const m=Symbol("symlink");const v=Symbol("hardlink");const p=Symbol("header");const w=Symbol("read");const y=Symbol("lstat");const g=Symbol("onlstat");const b=Symbol("onread");const S=Symbol("onreadlink");const E=Symbol("openfile");const x=Symbol("onopenfile");const R=Symbol("close");const N=Symbol("mode");const O=n(796);const _=n(478);const I=n(904);const D=O(class WriteEntry extends i{constructor(e,t){t=t||{};super(t);if(typeof e!=="string")throw new TypeError("path is required");this.path=e;this.portable=!!t.portable;this.myuid=process.getuid&&process.getuid();this.myuser=process.env.USER||"";this.maxReadSize=t.maxReadSize||c;this.linkCache=t.linkCache||new Map;this.statCache=t.statCache||new Map;this.preservePaths=!!t.preservePaths;this.cwd=t.cwd||process.cwd();this.strict=!!t.strict;this.noPax=!!t.noPax;this.noMtime=!!t.noMtime;this.mtime=t.mtime||null;if(typeof t.onwarn==="function")this.on("warn",t.onwarn);let n=false;if(!this.preservePaths&&l.win32.isAbsolute(e)){const t=l.win32.parse(e);this.path=e.substr(t.root.length);n=t.root}this.win32=!!t.win32||process.platform==="win32";if(this.win32){this.path=_.decode(this.path.replace(/\\/g,"/"));e=e.replace(/\\/g,"/")}this.absolute=t.absolute||l.resolve(this.cwd,e);if(this.path==="")this.path="./";if(n){this.warn("TAR_ENTRY_INFO",`stripping ${n} from absolute path`,{entry:this,path:n+this.path})}if(this.statCache.has(this.absolute))this[g](this.statCache.get(this.absolute));else this[y]()}[y](){o.lstat(this.absolute,(e,t)=>{if(e)return this.emit("error",e);this[g](t)})}[g](e){this.statCache.set(this.absolute,e);this.stat=e;if(!e.isFile())e.size=0;this.type=A(e);this.emit("stat",e);this[h]()}[h](){switch(this.type){case"File":return this[f]();case"Directory":return this[d]();case"SymbolicLink":return this[m]();default:return this.end()}}[N](e){return I(e,this.type==="Directory",this.portable)}[p](){if(this.type==="Directory"&&this.portable)this.noMtime=true;this.header=new s({path:this.path,linkpath:this.linkpath,mode:this[N](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime});if(this.header.encode()&&!this.noPax)this.write(new r({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this.path,linkpath:this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode());this.write(this.header.block)}[d](){if(this.path.substr(-1)!=="/")this.path+="/";this.stat.size=0;this[p]();this.end()}[m](){o.readlink(this.absolute,(e,t)=>{if(e)return this.emit("error",e);this[S](t)})}[S](e){this.linkpath=e.replace(/\\/g,"/");this[p]();this.end()}[v](e){this.type="Link";this.linkpath=l.relative(this.cwd,e).replace(/\\/g,"/");this.stat.size=0;this[p]();this.end()}[f](){if(this.stat.nlink>1){const e=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(e)){const t=this.linkCache.get(e);if(t.indexOf(this.cwd)===0)return this[v](t)}this.linkCache.set(e,this.absolute)}this[p]();if(this.stat.size===0)return this.end();this[E]()}[E](){o.open(this.absolute,"r",(e,t)=>{if(e)return this.emit("error",e);this[x](t)})}[x](e){const t=512*Math.ceil(this.stat.size/512);const n=Math.min(t,this.maxReadSize);const i=Buffer.allocUnsafe(n);this[w](e,i,0,i.length,0,this.stat.size,t)}[w](e,t,n,i,r,s,a){o.read(e,t,n,i,r,(o,l)=>{if(o){return this[R](e,()=>this.emit("error",o))}this[b](e,t,n,i,r,s,a,l)})}[R](e,t){o.close(e,t)}[b](e,t,n,i,r,s,a,o){if(o<=0&&s>0){const t=new Error("encountered unexpected EOF");t.path=this.absolute;t.syscall="read";t.code="EOF";return this[R](e,()=>this.emit("error",t))}if(o>s){const t=new Error("did not encounter expected EOF");t.path=this.absolute;t.syscall="read";t.code="EOF";return this[R](e,()=>this.emit("error",t))}if(o===s){for(let e=o;e<i&&o<a;e++){t[e+n]=0;o++;s++}}const l=n===0&&o===t.length?t:t.slice(n,n+o);s-=o;a-=o;r+=o;n+=o;this.write(l);if(!s){if(a)this.write(Buffer.alloc(a));return this[R](e,e=>e?this.emit("error",e):this.end())}if(n>=i){t=Buffer.allocUnsafe(i);n=0}i=t.length-n;this[w](e,t,n,i,r,s,a)}});class WriteEntrySync extends D{constructor(e,t){super(e,t)}[y](){this[g](o.lstatSync(this.absolute))}[m](){this[S](o.readlinkSync(this.absolute))}[E](){this[x](o.openSync(this.absolute,"r"))}[w](e,t,n,i,r,s,a){let l=true;try{const u=o.readSync(e,t,n,i,r);this[b](e,t,n,i,r,s,a,u);l=false}finally{if(l)try{this[R](e,()=>{})}catch(e){}}}[R](e,t){o.closeSync(e);t()}}const L=O(class WriteEntryTar extends i{constructor(e,t){t=t||{};super(t);this.preservePaths=!!t.preservePaths;this.portable=!!t.portable;this.strict=!!t.strict;this.noPax=!!t.noPax;this.noMtime=!!t.noMtime;this.readEntry=e;this.type=e.type;if(this.type==="Directory"&&this.portable)this.noMtime=true;this.path=e.path;this.mode=this[N](e.mode);this.uid=this.portable?null:e.uid;this.gid=this.portable?null:e.gid;this.uname=this.portable?null:e.uname;this.gname=this.portable?null:e.gname;this.size=e.size;this.mtime=this.noMtime?null:t.mtime||e.mtime;this.atime=this.portable?null:e.atime;this.ctime=this.portable?null:e.ctime;this.linkpath=e.linkpath;if(typeof t.onwarn==="function")this.on("warn",t.onwarn);let n=false;if(l.isAbsolute(this.path)&&!this.preservePaths){const e=l.parse(this.path);n=e.root;this.path=this.path.substr(e.root.length)}this.remain=e.size;this.blockRemain=e.startBlockSize;this.header=new s({path:this.path,linkpath:this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime});if(n){this.warn("TAR_ENTRY_INFO",`stripping ${n} from absolute path`,{entry:this,path:n+this.path})}if(this.header.encode()&&!this.noPax)super.write(new r({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this.path,linkpath:this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode());super.write(this.header.block);e.pipe(this)}[N](e){return I(e,this.type==="Directory",this.portable)}write(e){const t=e.length;if(t>this.blockRemain)throw new Error("writing more to entry than is appropriate");this.blockRemain-=t;return super.write(e)}end(){if(this.blockRemain)this.write(Buffer.alloc(this.blockRemain));return super.end()}});D.Sync=WriteEntrySync;D.Tar=L;const A=e=>e.isFile()?"File":e.isDirectory()?"Directory":e.isSymbolicLink()?"SymbolicLink":"Unsupported";e.exports=D},304:function(e){e.exports=require("string_decoder")},324:function(e,t,n){var i=n(747);var r=n(669);var s=n(413);var a=s.Readable;var o=s.Writable;var l=s.PassThrough;var u=n(965);var c=n(614).EventEmitter;t.createFromBuffer=createFromBuffer;t.createFromFd=createFromFd;t.BufferSlicer=BufferSlicer;t.FdSlicer=FdSlicer;r.inherits(FdSlicer,c);function FdSlicer(e,t){t=t||{};c.call(this);this.fd=e;this.pend=new u;this.pend.max=1;this.refCount=0;this.autoClose=!!t.autoClose}FdSlicer.prototype.read=function(e,t,n,r,s){var a=this;a.pend.go(function(o){i.read(a.fd,e,t,n,r,function(e,t,n){o();s(e,t,n)})})};FdSlicer.prototype.write=function(e,t,n,r,s){var a=this;a.pend.go(function(o){i.write(a.fd,e,t,n,r,function(e,t,n){o();s(e,t,n)})})};FdSlicer.prototype.createReadStream=function(e){return new ReadStream(this,e)};FdSlicer.prototype.createWriteStream=function(e){return new WriteStream(this,e)};FdSlicer.prototype.ref=function(){this.refCount+=1};FdSlicer.prototype.unref=function(){var e=this;e.refCount-=1;if(e.refCount>0)return;if(e.refCount<0)throw new Error("invalid unref");if(e.autoClose){i.close(e.fd,onCloseDone)}function onCloseDone(t){if(t){e.emit("error",t)}else{e.emit("close")}}};r.inherits(ReadStream,a);function ReadStream(e,t){t=t||{};a.call(this,t);this.context=e;this.context.ref();this.start=t.start||0;this.endOffset=t.end;this.pos=this.start;this.destroyed=false}ReadStream.prototype._read=function(e){var t=this;if(t.destroyed)return;var n=Math.min(t._readableState.highWaterMark,e);if(t.endOffset!=null){n=Math.min(n,t.endOffset-t.pos)}if(n<=0){t.destroyed=true;t.push(null);t.context.unref();return}t.context.pend.go(function(e){if(t.destroyed)return e();var r=new Buffer(n);i.read(t.context.fd,r,0,n,t.pos,function(n,i){if(n){t.destroy(n)}else if(i===0){t.destroyed=true;t.push(null);t.context.unref()}else{t.pos+=i;t.push(r.slice(0,i))}e()})})};ReadStream.prototype.destroy=function(e){if(this.destroyed)return;e=e||new Error("stream destroyed");this.destroyed=true;this.emit("error",e);this.context.unref()};r.inherits(WriteStream,o);function WriteStream(e,t){t=t||{};o.call(this,t);this.context=e;this.context.ref();this.start=t.start||0;this.endOffset=t.end==null?Infinity:+t.end;this.bytesWritten=0;this.pos=this.start;this.destroyed=false;this.on("finish",this.destroy.bind(this))}WriteStream.prototype._write=function(e,t,n){var r=this;if(r.destroyed)return;if(r.pos+e.length>r.endOffset){var s=new Error("maximum file length exceeded");s.code="ETOOBIG";r.destroy();n(s);return}r.context.pend.go(function(t){if(r.destroyed)return t();i.write(r.context.fd,e,0,e.length,r.pos,function(e,i){if(e){r.destroy();t();n(e)}else{r.bytesWritten+=i;r.pos+=i;r.emit("progress");t();n()}})})};WriteStream.prototype.destroy=function(){if(this.destroyed)return;this.destroyed=true;this.context.unref()};r.inherits(BufferSlicer,c);function BufferSlicer(e,t){c.call(this);t=t||{};this.refCount=0;this.buffer=e;this.maxChunkSize=t.maxChunkSize||Number.MAX_SAFE_INTEGER}BufferSlicer.prototype.read=function(e,t,n,i,r){var s=i+n;var a=s-this.buffer.length;var o=a>0?a:n;this.buffer.copy(e,t,i,s);setImmediate(function(){r(null,o)})};BufferSlicer.prototype.write=function(e,t,n,i,r){e.copy(this.buffer,i,t,t+n);setImmediate(function(){r(null,n,e)})};BufferSlicer.prototype.createReadStream=function(e){e=e||{};var t=new l(e);t.destroyed=false;t.start=e.start||0;t.endOffset=e.end;t.pos=t.endOffset||this.buffer.length;var n=this.buffer.slice(t.start,t.pos);var i=0;while(true){var r=i+this.maxChunkSize;if(r>=n.length){if(i<n.length){t.write(n.slice(i,n.length))}break}t.write(n.slice(i,r));i=r}t.end();t.destroy=function(){t.destroyed=true};return t};BufferSlicer.prototype.createWriteStream=function(e){var t=this;e=e||{};var n=new o(e);n.start=e.start||0;n.endOffset=e.end==null?this.buffer.length:+e.end;n.bytesWritten=0;n.pos=n.start;n.destroyed=false;n._write=function(e,i,r){if(n.destroyed)return;var s=n.pos+e.length;if(s>n.endOffset){var a=new Error("maximum file length exceeded");a.code="ETOOBIG";n.destroyed=true;r(a);return}e.copy(t.buffer,n.pos,0,e.length);n.bytesWritten+=e.length;n.pos=s;n.emit("progress");r()};n.destroy=function(){n.destroyed=true};return n};BufferSlicer.prototype.ref=function(){this.refCount+=1};BufferSlicer.prototype.unref=function(){this.refCount-=1;if(this.refCount<0){throw new Error("invalid unref")}};function createFromBuffer(e,t){return new BufferSlicer(e,t)}function createFromFd(e,t){return new FdSlicer(e,t)}},336:function(e,t,n){const i=n(747);const r=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version;const s=r.replace(/^v/,"").split(".");const a=+s[0]>10||+s[0]===10&&+s[1]>=12;const o=!a?()=>false:e=>e.mkdir===i.mkdir;const l=!a?()=>false:e=>e.mkdirSync===i.mkdirSync;e.exports={useNative:o,useNativeSync:l}},357:function(e){e.exports=require("assert")},381:function(e,t,n){"use strict";const i=n(891);const r=n(203);const s=n(747);const a=n(827);const o=n(622);const l=e.exports=((e,t,n)=>{if(typeof e==="function")n=e,t=null,e={};else if(Array.isArray(e))t=e,e={};if(typeof t==="function")n=t,t=null;if(!t)t=[];else t=Array.from(t);const r=i(e);if(r.sync&&typeof n==="function")throw new TypeError("callback not supported for sync tar functions");if(!r.file&&typeof n==="function")throw new TypeError("callback only supported with file option");if(t.length)c(r,t);if(!r.noResume)u(r);return r.file&&r.sync?h(r):r.file?f(r,n):d(r)});const u=e=>{const t=e.onentry;e.onentry=t?e=>{t(e);e.resume()}:e=>e.resume()};const c=(e,t)=>{const n=new Map(t.map(e=>[e.replace(/\/+$/,""),true]));const i=e.filter;const r=(e,t)=>{const i=t||o.parse(e).root||".";const s=e===i?false:n.has(e)?n.get(e):r(o.dirname(e),i);n.set(e,s);return s};e.filter=i?(e,t)=>i(e,t)&&r(e.replace(/\/+$/,"")):e=>r(e.replace(/\/+$/,""))};const h=e=>{const t=d(e);const n=e.file;let i=true;let r;try{const a=s.statSync(n);const o=e.maxReadSize||16*1024*1024;if(a.size<o){t.end(s.readFileSync(n))}else{let e=0;const i=Buffer.allocUnsafe(o);r=s.openSync(n,"r");while(e<a.size){let n=s.readSync(r,i,0,o,e);e+=n;t.write(i.slice(0,n))}t.end()}i=false}finally{if(i&&r)try{s.closeSync(r)}catch(e){}}};const f=(e,t)=>{const n=new r(e);const i=e.maxReadSize||16*1024*1024;const o=e.file;const l=new Promise((e,t)=>{n.on("error",t);n.on("end",e);s.stat(o,(e,r)=>{if(e)t(e);else{const e=new a.ReadStream(o,{readSize:i,size:r.size});e.on("error",t);e.pipe(n)}})});return t?l.then(t,t):l};const d=e=>new r(e)},396:function(e){"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next){yield e.value}}}},413:function(e){e.exports=require("stream")},417:function(e){e.exports=require("crypto")},478:function(e){"use strict";const t=["|","<",">","?",":"];const n=t.map(e=>String.fromCharCode(61440+e.charCodeAt(0)));const i=new Map(t.map((e,t)=>[e,n[t]]));const r=new Map(n.map((e,n)=>[e,t[n]]));e.exports={encode:e=>t.reduce((e,t)=>e.split(t).join(i.get(t)),e),decode:e=>n.reduce((e,t)=>e.split(t).join(r.get(t)),e)}},538:function(e,t,n){var i=n(293).Buffer;var r=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];if(typeof Int32Array!=="undefined"){r=new Int32Array(r)}function ensureBuffer(e){if(i.isBuffer(e)){return e}var t=typeof i.alloc==="function"&&typeof i.from==="function";if(typeof e==="number"){return t?i.alloc(e):new i(e)}else if(typeof e==="string"){return t?i.from(e):new i(e)}else{throw new Error("input must be buffer, number, or string, received "+typeof e)}}function bufferizeInt(e){var t=ensureBuffer(4);t.writeInt32BE(e,0);return t}function _crc32(e,t){e=ensureBuffer(e);if(i.isBuffer(t)){t=t.readUInt32BE(0)}var n=~~t^-1;for(var s=0;s<e.length;s++){n=r[(n^e[s])&255]^n>>>8}return n^-1}function crc32(){return bufferizeInt(_crc32.apply(null,arguments))}crc32.signed=function(){return _crc32.apply(null,arguments)};crc32.unsigned=function(){return _crc32.apply(null,arguments)>>>0};e.exports=crc32},554:function(e,t){"use strict";t.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);t.code=new Map(Array.from(t.name).map(e=>[e[1],e[0]]))},561:function(e,t,n){const{dirname:i}=n(622);const{findMade:r,findMadeSync:s}=n(92);const{mkdirpManual:a,mkdirpManualSync:o}=n(806);const l=(e,t)=>{t.recursive=true;const n=i(e);if(n===e)return t.mkdirAsync(e,t);return r(t,e).then(n=>t.mkdirAsync(e,t).then(()=>n).catch(n=>{if(n.code==="ENOENT")return a(e,t);else throw n}))};const u=(e,t)=>{t.recursive=true;const n=i(e);if(n===e)return t.mkdirSync(e,t);const r=s(t,e);try{t.mkdirSync(e,t);return r}catch(n){if(n.code==="ENOENT")return o(e,t);else throw n}};e.exports={mkdirpNative:l,mkdirpNativeSync:u}},577:function(e,t,n){"use strict";const i=n(626);const r=n(747);const s=n(622);const a=n(941);class SymlinkError extends Error{constructor(e,t){super("Cannot extract through symbolic link");this.path=t;this.symlink=e}get name(){return"SylinkError"}}class CwdError extends Error{constructor(e,t){super(t+": Cannot cd into '"+e+"'");this.path=e;this.code=t}get name(){return"CwdError"}}const o=e.exports=((e,t,n)=>{const o=t.umask;const u=t.mode|448;const c=(u&o)!==0;const h=t.uid;const f=t.gid;const d=typeof h==="number"&&typeof f==="number"&&(h!==t.processUid||f!==t.processGid);const m=t.preserve;const v=t.unlink;const p=t.cache;const w=t.cwd;const y=(t,i)=>{if(t)n(t);else{p.set(e,true);if(i&&d)a(i,h,f,e=>y(e));else if(c)r.chmod(e,u,n);else n()}};if(p&&p.get(e)===true)return y();if(e===w)return r.stat(e,(t,n)=>{if(t||!n.isDirectory())t=new CwdError(e,t&&t.code||"ENOTDIR");y(t)});if(m)return i(e,{mode:u}).then(e=>y(null,e),y);const g=s.relative(w,e);const b=g.split(/\/|\\/);l(w,b,u,p,v,w,null,y)});const l=(e,t,n,i,s,a,o,c)=>{if(!t.length)return c(null,o);const h=t.shift();const f=e+"/"+h;if(i.get(f))return l(f,t,n,i,s,a,o,c);r.mkdir(f,n,u(f,t,n,i,s,a,o,c))};const u=(e,t,n,i,a,o,c,h)=>f=>{if(f){if(f.path&&s.dirname(f.path)===o&&(f.code==="ENOTDIR"||f.code==="ENOENT"))return h(new CwdError(o,f.code));r.lstat(e,(s,d)=>{if(s)h(s);else if(d.isDirectory())l(e,t,n,i,a,o,c,h);else if(a)r.unlink(e,s=>{if(s)return h(s);r.mkdir(e,n,u(e,t,n,i,a,o,c,h))});else if(d.isSymbolicLink())return h(new SymlinkError(e,e+"/"+t.join("/")));else h(f)})}else{c=c||e;l(e,t,n,i,a,o,c,h)}};const c=e.exports.sync=((e,t)=>{const n=t.umask;const o=t.mode|448;const l=(o&n)!==0;const u=t.uid;const c=t.gid;const h=typeof u==="number"&&typeof c==="number"&&(u!==t.processUid||c!==t.processGid);const f=t.preserve;const d=t.unlink;const m=t.cache;const v=t.cwd;const p=t=>{m.set(e,true);if(t&&h)a.sync(t,u,c);if(l)r.chmodSync(e,o)};if(m&&m.get(e)===true)return p();if(e===v){let t=false;let n="ENOTDIR";try{t=r.statSync(e).isDirectory()}catch(e){n=e.code}finally{if(!t)throw new CwdError(e,n)}p();return}if(f)return p(i.sync(e,o));const w=s.relative(v,e);const y=w.split(/\/|\\/);let g=null;for(let e=y.shift(),t=v;e&&(t+="/"+e);e=y.shift()){if(m.get(t))continue;try{r.mkdirSync(t,o);g=g||t;m.set(t,true)}catch(e){if(e.path&&s.dirname(e.path)===v&&(e.code==="ENOTDIR"||e.code==="ENOENT"))return new CwdError(v,e.code);const n=r.lstatSync(t);if(n.isDirectory()){m.set(t,true);continue}else if(d){r.unlinkSync(t);r.mkdirSync(t,o);g=g||t;m.set(t,true);continue}else if(n.isSymbolicLink())return new SymlinkError(t,t+"/"+y.join("/"))}}return p(g)})},582:function(e,t,n){"use strict";const i=n(232);const r=n(622);class Pax{constructor(e,t){this.atime=e.atime||null;this.charset=e.charset||null;this.comment=e.comment||null;this.ctime=e.ctime||null;this.gid=e.gid||null;this.gname=e.gname||null;this.linkpath=e.linkpath||null;this.mtime=e.mtime||null;this.path=e.path||null;this.size=e.size||null;this.uid=e.uid||null;this.uname=e.uname||null;this.dev=e.dev||null;this.ino=e.ino||null;this.nlink=e.nlink||null;this.global=t||false}encode(){const e=this.encodeBody();if(e==="")return null;const t=Buffer.byteLength(e);const n=512*Math.ceil(1+t/512);const s=Buffer.allocUnsafe(n);for(let e=0;e<512;e++){s[e]=0}new i({path:("PaxHeader/"+r.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:t,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(s);s.write(e,512,t,"utf8");for(let e=t+512;e<s.length;e++){s[e]=0}return s}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(e){if(this[e]===null||this[e]===undefined)return"";const t=this[e]instanceof Date?this[e].getTime()/1e3:this[e];const n=" "+(e==="dev"||e==="ino"||e==="nlink"?"SCHILY.":"")+e+"="+t+"\n";const i=Buffer.byteLength(n);let r=Math.floor(Math.log(i)/Math.log(10))+1;if(i+r>=Math.pow(10,r))r+=1;const s=r+i;return s+n}}Pax.parse=((e,t,n)=>new Pax(s(a(e),t),n));const s=(e,t)=>t?Object.keys(e).reduce((t,n)=>(t[n]=e[n],t),t):e;const a=e=>e.replace(/\n$/,"").split("\n").reduce(o,Object.create(null));const o=(e,t)=>{const n=parseInt(t,10);if(n!==Buffer.byteLength(t)+1)return e;t=t.substr((n+" ").length);const i=t.split("=");const r=i.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!r)return e;const s=i.join("=");e[r]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(r)?new Date(s*1e3):/^[0-9]+$/.test(s)?+s:s;return e};e.exports=Pax},598:function(e,t,n){var i=n(747);var r=n(250);var s=n(93);var a=n(608);var o=n(669);var l;var u;if(typeof Symbol==="function"&&typeof Symbol.for==="function"){l=Symbol.for("graceful-fs.queue");u=Symbol.for("graceful-fs.previous")}else{l="___graceful-fs.queue";u="___graceful-fs.previous"}function noop(){}var c=noop;if(o.debuglog)c=o.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))c=function(){var e=o.format.apply(o,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: ");console.error(e)};if(!global[l]){var h=[];Object.defineProperty(global,l,{get:function(){return h}});i.close=function(e){function close(t,n){return e.call(i,t,function(e){if(!e){retry()}if(typeof n==="function")n.apply(this,arguments)})}Object.defineProperty(close,u,{value:e});return close}(i.close);i.closeSync=function(e){function closeSync(t){e.apply(i,arguments);retry()}Object.defineProperty(closeSync,u,{value:e});return closeSync}(i.closeSync);if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")){process.on("exit",function(){c(global[l]);n(357).equal(global[l].length,0)})}}e.exports=patch(a(i));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!i.__patched){e.exports=patch(i);i.__patched=true}function patch(e){r(e);e.gracefulify=patch;e.createReadStream=createReadStream;e.createWriteStream=createWriteStream;var t=e.readFile;e.readFile=readFile;function readFile(e,n,i){if(typeof n==="function")i=n,n=null;return go$readFile(e,n,i);function go$readFile(e,n,i){return t(e,n,function(t){if(t&&(t.code==="EMFILE"||t.code==="ENFILE"))enqueue([go$readFile,[e,n,i]]);else{if(typeof i==="function")i.apply(this,arguments);retry()}})}}var n=e.writeFile;e.writeFile=writeFile;function writeFile(e,t,i,r){if(typeof i==="function")r=i,i=null;return go$writeFile(e,t,i,r);function go$writeFile(e,t,i,r){return n(e,t,i,function(n){if(n&&(n.code==="EMFILE"||n.code==="ENFILE"))enqueue([go$writeFile,[e,t,i,r]]);else{if(typeof r==="function")r.apply(this,arguments);retry()}})}}var i=e.appendFile;if(i)e.appendFile=appendFile;function appendFile(e,t,n,r){if(typeof n==="function")r=n,n=null;return go$appendFile(e,t,n,r);function go$appendFile(e,t,n,r){return i(e,t,n,function(i){if(i&&(i.code==="EMFILE"||i.code==="ENFILE"))enqueue([go$appendFile,[e,t,n,r]]);else{if(typeof r==="function")r.apply(this,arguments);retry()}})}}var a=e.readdir;e.readdir=readdir;function readdir(e,t,n){var i=[e];if(typeof t!=="function"){i.push(t)}else{n=t}i.push(go$readdir$cb);return go$readdir(i);function go$readdir$cb(e,t){if(t&&t.sort)t.sort();if(e&&(e.code==="EMFILE"||e.code==="ENFILE"))enqueue([go$readdir,[i]]);else{if(typeof n==="function")n.apply(this,arguments);retry()}}}function go$readdir(t){return a.apply(e,t)}if(process.version.substr(0,4)==="v0.8"){var o=s(e);ReadStream=o.ReadStream;WriteStream=o.WriteStream}var l=e.ReadStream;if(l){ReadStream.prototype=Object.create(l.prototype);ReadStream.prototype.open=ReadStream$open}var u=e.WriteStream;if(u){WriteStream.prototype=Object.create(u.prototype);WriteStream.prototype.open=WriteStream$open}Object.defineProperty(e,"ReadStream",{get:function(){return ReadStream},set:function(e){ReadStream=e},enumerable:true,configurable:true});Object.defineProperty(e,"WriteStream",{get:function(){return WriteStream},set:function(e){WriteStream=e},enumerable:true,configurable:true});var c=ReadStream;Object.defineProperty(e,"FileReadStream",{get:function(){return c},set:function(e){c=e},enumerable:true,configurable:true});var h=WriteStream;Object.defineProperty(e,"FileWriteStream",{get:function(){return h},set:function(e){h=e},enumerable:true,configurable:true});function ReadStream(e,t){if(this instanceof ReadStream)return l.apply(this,arguments),this;else return ReadStream.apply(Object.create(ReadStream.prototype),arguments)}function ReadStream$open(){var e=this;open(e.path,e.flags,e.mode,function(t,n){if(t){if(e.autoClose)e.destroy();e.emit("error",t)}else{e.fd=n;e.emit("open",n);e.read()}})}function WriteStream(e,t){if(this instanceof WriteStream)return u.apply(this,arguments),this;else return WriteStream.apply(Object.create(WriteStream.prototype),arguments)}function WriteStream$open(){var e=this;open(e.path,e.flags,e.mode,function(t,n){if(t){e.destroy();e.emit("error",t)}else{e.fd=n;e.emit("open",n)}})}function createReadStream(t,n){return new e.ReadStream(t,n)}function createWriteStream(t,n){return new e.WriteStream(t,n)}var f=e.open;e.open=open;function open(e,t,n,i){if(typeof n==="function")i=n,n=null;return go$open(e,t,n,i);function go$open(e,t,n,i){return f(e,t,n,function(r,s){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))enqueue([go$open,[e,t,n,i]]);else{if(typeof i==="function")i.apply(this,arguments);retry()}})}}return e}function enqueue(e){c("ENQUEUE",e[0].name,e[1]);global[l].push(e)}function retry(){var e=global[l].shift();if(e){c("RETRY",e[0].name,e[1]);e[0].apply(null,e[1])}}},605:function(e){e.exports=require("http")},608:function(e){"use strict";e.exports=clone;function clone(e){if(e===null||typeof e!=="object")return e;if(e instanceof Object)var t={__proto__:e.__proto__};else var t=Object.create(null);Object.getOwnPropertyNames(e).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}},610:function(e,t,n){(function(e){"use strict";var t=function(){return u.__string_rec(this,"")},i=i||{},r;function $extend(e,t){var n=Object.create(e);for(var i in t)n[i]=t[i];if(t.toString!==Object.prototype.toString)n.toString=t.toString;return n}var s=i["Attribute"]={__ename__:true,__constructs__:["Off","Bold","Underline","Blink","ReverseVideo","Concealed","BoldOff","UnderlineOff","BlinkOff","NormalVideo","ConcealedOff","Black","Red","Green","Yellow","Blue","Magenta","Cyan","White","DefaultForeground","BlackBack","RedBack","GreenBack","YellowBack","BlueBack","MagentaBack","CyanBack","WhiteBack","DefaultBackground"],Off:{_hx_index:0,__enum__:"Attribute",toString:t},Bold:{_hx_index:1,__enum__:"Attribute",toString:t},Underline:{_hx_index:2,__enum__:"Attribute",toString:t},Blink:{_hx_index:3,__enum__:"Attribute",toString:t},ReverseVideo:{_hx_index:4,__enum__:"Attribute",toString:t},Concealed:{_hx_index:5,__enum__:"Attribute",toString:t},BoldOff:{_hx_index:6,__enum__:"Attribute",toString:t},UnderlineOff:{_hx_index:7,__enum__:"Attribute",toString:t},BlinkOff:{_hx_index:8,__enum__:"Attribute",toString:t},NormalVideo:{_hx_index:9,__enum__:"Attribute",toString:t},ConcealedOff:{_hx_index:10,__enum__:"Attribute",toString:t},Black:{_hx_index:11,__enum__:"Attribute",toString:t},Red:{_hx_index:12,__enum__:"Attribute",toString:t},Green:{_hx_index:13,__enum__:"Attribute",toString:t},Yellow:{_hx_index:14,__enum__:"Attribute",toString:t},Blue:{_hx_index:15,__enum__:"Attribute",toString:t},Magenta:{_hx_index:16,__enum__:"Attribute",toString:t},Cyan:{_hx_index:17,__enum__:"Attribute",toString:t},White:{_hx_index:18,__enum__:"Attribute",toString:t},DefaultForeground:{_hx_index:19,__enum__:"Attribute",toString:t},BlackBack:{_hx_index:20,__enum__:"Attribute",toString:t},RedBack:{_hx_index:21,__enum__:"Attribute",toString:t},GreenBack:{_hx_index:22,__enum__:"Attribute",toString:t},YellowBack:{_hx_index:23,__enum__:"Attribute",toString:t},BlueBack:{_hx_index:24,__enum__:"Attribute",toString:t},MagentaBack:{_hx_index:25,__enum__:"Attribute",toString:t},CyanBack:{_hx_index:26,__enum__:"Attribute",toString:t},WhiteBack:{_hx_index:27,__enum__:"Attribute",toString:t},DefaultBackground:{_hx_index:28,__enum__:"Attribute",toString:t}};var a=function(){};a.__name__=true;a.systemName=function(){var e=process.platform;switch(e){case"darwin":return"Mac";case"freebsd":return"BSD";case"linux":return"Linux";case"win32":return"Windows";default:var t=e;return t}};var o=n(129);var l=function(){};l.__name__=true;l.field=function(e,t){try{return e[t]}catch(e){var n=e instanceof ie?e.val:e;return null}};l.fields=function(e){var t=[];if(e!=null){var n=Object.prototype.hasOwnProperty;for(var i in e){if(i!="__id__"&&i!="hx__closures__"&&n.call(e,i)){t.push(i)}}}return t};l.compare=function(e,t){if(e==t){return 0}else if(e>t){return 1}else{return-1}};l.isEnumValue=function(e){if(e!=null){return e.__enum__!=null}else{return false}};l.copy=function(e){if(e==null){return null}var t={};var n=0;var i=l.fields(e);while(n<i.length){var r=i[n];++n;t[r]=l.field(e,r)}return t};var u=function(){};u.__name__=true;u.getClass=function(e){if(e==null){return null}else if(e instanceof Array){return Array}else{var t=e.__class__;if(t!=null){return t}var n=u.__nativeClassName(e);if(n!=null){return u.__resolveNativeClass(n)}return null}};u.__string_rec=function(e,t){if(e==null){return"null"}if(t.length>=5){return"<...>"}var n=typeof e;if(n=="function"&&(e.__name__||e.__ename__)){n="object"}switch(n){case"function":return"<function>";case"object":if(e.__enum__){var r=i[e.__enum__];var s=r.__constructs__[e._hx_index];var a=r[s];if(a.__params__){t=t+"\t";return s+"("+function(n){var i;var r=[];{var s=0;var o=a.__params__;while(true){if(!(s<o.length)){break}var l=o[s];s=s+1;r.push(u.__string_rec(e[l],t))}}i=r;return i}(this).join(",")+")"}else{return s}}if(e instanceof Array){var o="[";t+="\t";var l=0;var c=e.length;while(l<c){var h=l++;o+=(h>0?",":"")+u.__string_rec(e[h],t)}o+="]";return o}var f;try{f=e.toString}catch(e){var d=e instanceof ie?e.val:e;return"???"}if(f!=null&&f!=Object.toString&&typeof f=="function"){var m=e.toString();if(m!="[object Object]"){return m}}var v="{\n";t+="\t";var p=e.hasOwnProperty!=null;var w=null;for(w in e){if(p&&!e.hasOwnProperty(w)){continue}if(w=="prototype"||w=="__class__"||w=="__super__"||w=="__interfaces__"||w=="__properties__"){continue}if(v.length!=2){v+=", \n"}v+=t+w+" : "+u.__string_rec(e[w],t)}t=t.substring(1);v+="\n"+t+"}";return v;case"string":return e;default:return String(e)}};u.__interfLoop=function(e,t){if(e==null){return false}if(e==t){return true}if(Object.prototype.hasOwnProperty.call(e,"__interfaces__")){var n=e.__interfaces__;var i=0;var r=n.length;while(i<r){var s=i++;var a=n[s];if(a==t||u.__interfLoop(a,t)){return true}}}return u.__interfLoop(e.__super__,t)};u.__instanceof=function(e,t){if(t==null){return false}switch(t){case Array:return e instanceof Array;case Je:return typeof e=="boolean";case Ve:return e!=null;case qe:return typeof e=="number";case Xe:if(typeof e=="number"){return(e|0)===e}else{return false}break;case String:return typeof e=="string";default:if(e!=null){if(typeof t=="function"){if(u.__downcastCheck(e,t)){return true}}else if(typeof t=="object"&&u.__isNativeObj(t)){if(e instanceof t){return true}}}else{return false}if(t==je?e.__name__!=null:false){return true}if(t==Qe?e.__ename__!=null:false){return true}return e.__enum__!=null?i[e.__enum__]==t:false}};u.__downcastCheck=function(e,t){if(!(e instanceof t)){if(t.__isInterface__){return u.__interfLoop(u.getClass(e),t)}else{return false}}else{return true}};u.__nativeClassName=function(e){var t=u.__toStr.call(e).slice(8,-1);if(t=="Object"||t=="Function"||t=="Math"||t=="JSON"){return null}return t};u.__isNativeObj=function(e){return u.__nativeClassName(e)!=null};u.__resolveNativeClass=function(t){return e[t]};var c=function(){};c.__name__=true;c.string=function(e){return u.__string_rec(e,"")};c.parseInt=function(e){if(e!=null){var t=0;var n=e.length;while(t<n){var i=t++;var r=e.charCodeAt(i);if(r<=8||r>=14&&r!=32&&r!=45){var s=parseInt(e,e[i+1]=="x"||e[i+1]=="X"?16:10);if(isNaN(s)){return null}else{return s}}}}return null};var h=function(){};h.__name__=true;h.aset=function(e){if(h.strip||h.stripIfUnavailable&&!h.available){return""}var t=""+"[";var n=[];var i=0;while(i<e.length){var r=e[i];++i;if(!u.__instanceof(r,s)){throw new ie("Set argument is not an Attribute: "+c.string(r))}n.push(h.values.get(r))}return t+n.join(";")+"m"};h.detectSupport=function(){if(a.systemName().toLowerCase().indexOf("window")==-1){var e=-1;try{e=o.spawnSync("tput",["colors"]).error==null?0:125}catch(e){var t=e instanceof ie?e.val:e}return e==0}else{return process.env["ANSICON"]!=null}};var f=function(){};f.__name__=true;f.__format_get=function(e,t){switch(t){case"%":return"%";case"A":return f.DAY_NAMES[e.getDay()];case"B":return f.MONTH_NAMES[e.getMonth()];case"C":return y.lpad(c.string(e.getFullYear()/100|0),"0",2);case"D":return f.__format(e,"%m/%d/%y");case"F":return f.__format(e,"%Y-%m-%d");case"I":case"l":var n=e.getHours()%12;return y.lpad(c.string(n==0?12:n),t=="I"?"0":" ",2);case"M":return y.lpad(c.string(e.getMinutes()),"0",2);case"R":return f.__format(e,"%H:%M");case"S":return y.lpad(c.string(e.getSeconds()),"0",2);case"T":return f.__format(e,"%H:%M:%S");case"Y":return c.string(e.getFullYear());case"a":return f.DAY_SHORT_NAMES[e.getDay()];case"b":case"h":return f.MONTH_SHORT_NAMES[e.getMonth()];case"d":return y.lpad(c.string(e.getDate()),"0",2);case"e":return c.string(e.getDate());case"H":case"k":return y.lpad(c.string(e.getHours()),t=="H"?"0":" ",2);case"m":return y.lpad(c.string(e.getMonth()+1),"0",2);case"n":return"\n";case"p":if(e.getHours()>11){return"PM"}else{return"AM"}break;case"r":return f.__format(e,"%I:%M:%S %p");case"s":return c.string(e.getTime()/1e3|0);case"t":return"\t";case"u":var i=e.getDay();if(i==0){return"7"}else if(i==null){return"null"}else{return""+i}break;case"w":return c.string(e.getDay());case"y":return y.lpad(c.string(e.getFullYear()%100),"0",2);default:throw new ie("Date.format %"+t+"- not implemented yet.")}};f.__format=function(e,t){var n="";var i=0;while(true){var r=t.indexOf("%",i);if(r<0){break}var s=r-i;n+=s==null?m.substr(t,i,null):m.substr(t,i,s);n+=c.string(f.__format_get(e,m.substr(t,r+1,1)));i=r+2}var a=t.length-i;n+=a==null?m.substr(t,i,null):m.substr(t,i,a);return n};f.format=function(e,t){return f.__format(e,t)};var d=function(e,t){this.r=new RegExp(e,t.split("u").join(""))};d.__name__=true;d.prototype={match:function(e){if(this.r.global){this.r.lastIndex=0}this.r.m=this.r.exec(e);this.r.s=e;return this.r.m!=null},__class__:d};var m=function(){};m.__name__=true;m.dateStr=function(e){var t=e.getMonth()+1;var n=e.getDate();var i=e.getHours();var r=e.getMinutes();var s=e.getSeconds();return e.getFullYear()+"-"+(t<10?"0"+t:""+t)+"-"+(n<10?"0"+n:""+n)+" "+(i<10?"0"+i:""+i)+":"+(r<10?"0"+r:""+r)+":"+(s<10?"0"+s:""+s)};m.strDate=function(e){switch(e.length){case 8:var t=e.split(":");var n=new Date;n["setTime"](0);n["setUTCHours"](t[0]);n["setUTCMinutes"](t[1]);n["setUTCSeconds"](t[2]);return n;case 10:var i=e.split("-");return new Date(i[0],i[1]-1,i[2],0,0,0);case 19:var r=e.split(" ");var s=r[0].split("-");var a=r[1].split(":");return new Date(s[0],s[1]-1,s[2],a[0],a[1],a[2]);default:throw new ie("Invalid date format : "+e)}};m.cca=function(e,t){var n=e.charCodeAt(t);if(n!=n){return undefined}return n};m.substr=function(e,t,n){if(n==null){n=e.length}else if(n<0){if(t==0){n=e.length+n}else{return""}}return e.substr(t,n)};m.iter=function(e){return{cur:0,arr:e,hasNext:function(){return this.cur<this.arr.length},next:function(){return this.arr[this.cur++]}}};var v=function(){};v.__name__=true;v.has=function(e,t){var n=$getIterator(e);while(n.hasNext()){var i=n.next();if(i==t){return true}}return false};Math.__name__=true;var p=function(){this.b=""};p.__name__=true;p.prototype={__class__:p};var w=function(){};w.__name__=true;w.quoteUnixArg=function(e){if(e==""){return"''"}if(!new d("[^a-zA-Z0-9_@%+=:,./-]","").match(e)){return e}return"'"+y.replace(e,"'","'\"'\"'")+"'"};w.quoteWinArg=function(e,t){if(!new d('^[^ \t\\\\"]+$',"").match(e)){var n="";var i=e.indexOf(" ")!=-1||e.indexOf("\t")!=-1||e=="";if(i){n+='"'}var r=new p;var s=0;var a=e.length;while(s<a){var o=s++;var l=m.cca(e,o);if(l==null){var u=l;if(r.b.length>0){n+=c.string(r.b);r=new p}n+=String.fromCodePoint(u)}else{switch(l){case 34:var h=r.b;n+=h==null?"null":""+h;n+=h==null?"null":""+h;r=new p;n+='\\"';break;case 92:r.b+="\\";break;default:var f=l;if(r.b.length>0){n+=c.string(r.b);r=new p}n+=String.fromCodePoint(f)}}}n+=c.string(r.b);if(i){n+=c.string(r.b);n+='"'}e=n}if(t){var v="";var y=0;var g=e.length;while(y<g){var b=y++;var S=m.cca(e,b);if(w.winMetaCharacters.indexOf(S)>=0){v+=String.fromCodePoint(94)}v+=String.fromCodePoint(S)}return v}else{return e}};var y=function(){};y.__name__=true;y.startsWith=function(e,t){if(e.length>=t.length){return e.lastIndexOf(t,0)==0}else{return false}};y.endsWith=function(e,t){var n=t.length;var i=e.length;if(i>=n){return e.indexOf(t,i-n)==i-n}else{return false}};y.isSpace=function(e,t){var n=m.cca(e,t);if(!(n>8&&n<14)){return n==32}else{return true}};y.ltrim=function(e){var t=e.length;var n=0;while(n<t&&y.isSpace(e,n))++n;if(n>0){return m.substr(e,n,t-n)}else{return e}};y.rtrim=function(e){var t=e.length;var n=0;while(n<t&&y.isSpace(e,t-n-1))++n;if(n>0){return m.substr(e,0,t-n)}else{return e}};y.trim=function(e){return y.ltrim(y.rtrim(e))};y.lpad=function(e,t,n){if(t.length<=0){return e}var i="";n-=e.length;while(i.length<n)i+=t==null?"null":""+t;i+=e==null?"null":""+e;return i};y.replace=function(e,t,n){return e.split(t).join(n)};var g=function(){};g.__name__=true;g.prototype={writeByte:function(e){throw new ie("Not implemented")},writeBytes:function(e,t,n){if(t<0||n<0||t+n>e.length){throw new ie(B.OutsideBounds)}var i=e.b;var r=n;while(r>0){this.writeByte(i[t]);++t;--r}return n},writeFullBytes:function(e,t,n){while(n>0){var i=this.writeBytes(e,t,n);t+=i;n-=i}},writeString:function(e,t){var n=A.ofString(e,t);this.writeFullBytes(n,0,n.length)},__class__:g};var b=function(e){this.fd=e};b.__name__=true;b.__super__=g;b.prototype=$extend(g.prototype,{writeByte:function(e){K.writeSync(this.fd,String.fromCodePoint(e))},writeBytes:function(e,t,n){var i=e.b;return K.writeSync(this.fd,ue.from(i.buffer,i.byteOffset,e.length),t,n)},writeString:function(e,t){K.writeSync(this.fd,e)},__class__:b});var S=function(){};S.__name__=true;S.enumParameters=function(e){var t=i[e.__enum__];var n=t.__constructs__[e._hx_index];var r=t[n].__params__;if(r!=null){var s=[];var a=0;while(a<r.length){var o=r[a];++a;s.push(e[o])}return s}else{return[]}};var E=i["haxe.StackItem"]={__ename__:true,__constructs__:["CFunction","Module","FilePos","Method","LocalFunction"],CFunction:{_hx_index:0,__enum__:"haxe.StackItem",toString:t},Module:(r=function(e){return{_hx_index:1,m:e,__enum__:"haxe.StackItem",toString:t}},r.__params__=["m"],r),FilePos:(r=function(e,n,i,r){return{_hx_index:2,s:e,file:n,line:i,column:r,__enum__:"haxe.StackItem",toString:t}},r.__params__=["s","file","line","column"],r),Method:(r=function(e,n){return{_hx_index:3,classname:e,method:n,__enum__:"haxe.StackItem",toString:t}},r.__params__=["classname","method"],r),LocalFunction:(r=function(e){return{_hx_index:4,v:e,__enum__:"haxe.StackItem",toString:t}},r.__params__=["v"],r)};var x=function(){};x.__name__=true;x.__isInterface__=true;var R=function(e){var t=this;this.id=setInterval(function(){t.run()},e)};R.__name__=true;R.delay=function(e,t){var n=new R(t);n.run=function(){n.stop();e()};return n};R.prototype={stop:function(){if(this.id==null){return}clearInterval(this.id);this.id=null},run:function(){},__class__:R};var N=function(){};N.__name__=true;N.__interfaces__=[x];N.prototype={set:function(e,t){this.root=this.setLoop(e,t,this.root)},get:function(e){var t=this.root;while(t!=null){var n=this.compare(e,t.key);if(n==0){return t.value}if(n<0){t=t.left}else{t=t.right}}return null},setLoop:function(e,t,n){if(n==null){return new O(null,e,t,null)}var i=this.compare(e,n.key);if(i==0){return new O(n.left,e,t,n.right,n==null?0:n._height)}else if(i<0){var r=this.setLoop(e,t,n.left);return this.balance(r,n.key,n.value,n.right)}else{var s=this.setLoop(e,t,n.right);return this.balance(n.left,n.key,n.value,s)}},balance:function(e,t,n,i){var r=e==null?0:e._height;var s=i==null?0:i._height;if(r>s+2){var a=e.left;var o=e.right;if((a==null?0:a._height)>=(o==null?0:o._height)){return new O(e.left,e.key,e.value,new O(e.right,t,n,i))}else{return new O(new O(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new O(e.right.right,t,n,i))}}else if(s>r+2){var l=i.right;var u=i.left;if((l==null?0:l._height)>(u==null?0:u._height)){return new O(new O(e,t,n,i.left),i.key,i.value,i.right)}else{return new O(new O(e,t,n,i.left.left),i.left.key,i.left.value,new O(i.left.right,i.key,i.value,i.right))}}else{return new O(e,t,n,i,(r>s?r:s)+1)}},compare:function(e,t){return l.compare(e,t)},__class__:N};var O=function(e,t,n,i,r){if(r==null){r=-1}this.left=e;this.key=t;this.value=n;this.right=i;if(r==-1){var s;var a=this.left;var o=this.right;if((a==null?0:a._height)>(o==null?0:o._height)){var l=this.left;s=l==null?0:l._height}else{var u=this.right;s=u==null?0:u._height}this._height=s+1}else{this._height=r}};O.__name__=true;O.prototype={__class__:O};var _=function(){N.call(this)};_.__name__=true;_.__interfaces__=[x];_.__super__=N;_.prototype=$extend(N.prototype,{compare:function(e,t){var n=e._hx_index-t._hx_index;if(n!=0){return n}var i=S.enumParameters(e);var r=S.enumParameters(t);if(i.length==0&&r.length==0){return 0}return this.compareArgs(i,r)},compareArgs:function(e,t){var n=e.length-t.length;if(n!=0){return n}var i=0;var r=e.length;while(i<r){var s=i++;var a=this.compareArg(e[s],t[s]);if(a!=0){return a}}return 0},compareArg:function(e,t){if(l.isEnumValue(e)&&l.isEnumValue(t)){return this.compare(e,t)}else if(e instanceof Array&&t instanceof Array){return this.compareArgs(e,t)}else{return l.compare(e,t)}},__class__:_});var I=function(){this.h={}};I.__name__=true;I.__interfaces__=[x];I.prototype={__class__:I};var D=i["haxe.ds.Option"]={__ename__:true,__constructs__:["Some","None"],Some:(r=function(e){return{_hx_index:0,v:e,__enum__:"haxe.ds.Option",toString:t}},r.__params__=["v"],r),None:{_hx_index:1,__enum__:"haxe.ds.Option",toString:t}};var L=function(){this.h={}};L.__name__=true;L.__interfaces__=[x];L.prototype={setReserved:function(e,t){if(this.rh==null){this.rh={}}this.rh["$"+e]=t},getReserved:function(e){if(this.rh==null){return null}else{return this.rh["$"+e]}},keys:function(){return m.iter(this.arrayKeys())},arrayKeys:function(){var e=[];for(var t in this.h){if(this.h.hasOwnProperty(t)){e.push(t)}}if(this.rh!=null){for(var t in this.rh){if(t.charCodeAt(0)==36){e.push(t.substr(1))}}}return e},__class__:L};var A=function(e){this.length=e.byteLength;this.b=new Uint8Array(e);this.b.bufferValue=e;e.hxBytes=this;e.bytes=this.b};A.__name__=true;A.ofString=function(e,t){if(t==C.RawNative){var n=new Uint8Array(e.length<<1);var i=0;var r=e.length;while(i<r){var s=i++;var a=e.charCodeAt(s);n[s<<1]=a&255;n[s<<1|1]=a>>8}return new A(n.buffer)}var o=[];var l=0;while(l<e.length){var u=e.charCodeAt(l++);if(55296<=u&&u<=56319){u=u-55232<<10|e.charCodeAt(l++)&1023}if(u<=127){o.push(u)}else if(u<=2047){o.push(192|u>>6);o.push(128|u&63)}else if(u<=65535){o.push(224|u>>12);o.push(128|u>>6&63);o.push(128|u&63)}else{o.push(240|u>>18);o.push(128|u>>12&63);o.push(128|u>>6&63);o.push(128|u&63)}}return new A(new Uint8Array(o).buffer)};A.prototype={sub:function(e,t){if(e<0||t<0||e+t>this.length){throw new ie(B.OutsideBounds)}return new A(this.b.buffer.slice(e+this.b.byteOffset,e+this.b.byteOffset+t))},getString:function(e,t,n){if(e<0||t<0||e+t>this.length){throw new ie(B.OutsideBounds)}if(n==null){n=C.UTF8}var i="";var r=this.b;var s=e;var a=e+t;switch(n._hx_index){case 0:var o=e>0;while(s<a){var l=r[s++];if(l<128){if(l==0){break}i+=String.fromCodePoint(l)}else if(l<224){var u=(l&63)<<6|r[s++]&127;i+=String.fromCodePoint(u)}else if(l<240){var c=r[s++];var h=(l&31)<<12|(c&127)<<6|r[s++]&127;i+=String.fromCodePoint(h)}else{var f=r[s++];var d=r[s++];var m=(l&15)<<18|(f&127)<<12|(d&127)<<6|r[s++]&127;i+=String.fromCodePoint(m)}}break;case 1:while(s<a){var v=r[s++]|r[s++]<<8;i+=String.fromCodePoint(v)}break}return i},toString:function(){return this.getString(0,this.length)},__class__:A};var C=i["haxe.io.Encoding"]={__ename__:true,__constructs__:["UTF8","RawNative"],UTF8:{_hx_index:0,__enum__:"haxe.io.Encoding",toString:t},RawNative:{_hx_index:1,__enum__:"haxe.io.Encoding",toString:t}};var B=i["haxe.io.Error"]={__ename__:true,__constructs__:["Blocked","Overflow","OutsideBounds","Custom"],Blocked:{_hx_index:0,__enum__:"haxe.io.Error",toString:t},Overflow:{_hx_index:1,__enum__:"haxe.io.Error",toString:t},OutsideBounds:{_hx_index:2,__enum__:"haxe.io.Error",toString:t},Custom:(r=function(e){return{_hx_index:3,e:e,__enum__:"haxe.io.Error",toString:t}},r.__params__=["e"],r)};var T=function(e){switch(e){case".":case"..":this.dir=e;this.file="";return}var t=e.lastIndexOf("/");var n=e.lastIndexOf("\\");if(t<n){this.dir=m.substr(e,0,n);e=m.substr(e,n+1,null);this.backslash=true}else if(n<t){this.dir=m.substr(e,0,t);e=m.substr(e,t+1,null)}else{this.dir=null}var i=e.lastIndexOf(".");if(i!=-1){this.ext=m.substr(e,i+1,null);this.file=m.substr(e,0,i)}else{this.ext=null;this.file=e}};T.__name__=true;T.directory=function(e){var t=new T(e);if(t.dir==null){return""}return t.dir};T.extension=function(e){var t=new T(e);if(t.ext==null){return""}return t.ext};T.join=function(e){var t=[];var n=0;var i=e;while(n<i.length){var r=i[n];++n;if(r!=null&&r!=""){t.push(r)}}var s=t;if(s.length==0){return""}var a=s[0];var o=1;var l=s.length;while(o<l){var u=o++;a=T.addTrailingSlash(a);a+=s[u]}return T.normalize(a)};T.normalize=function(e){var t="/";e=e.split("\\").join(t);if(e==t){return t}var n=[];var i=0;var r=e.split(t);while(i<r.length){var s=r[i];++i;if(s==".."&&n.length>0&&n[n.length-1]!=".."){n.pop()}else if(s==""){if(n.length>0||m.cca(e,0)==47){n.push(s)}}else if(s!="."){n.push(s)}}var a=n.join(t);var o="";var l=false;var u=false;var c=0;var h=a;while(c<h.length){var f=h;var d=c++;var v=f.charCodeAt(d);if(v>=55296&&v<=56319){v=v-55232<<10|f.charCodeAt(d+1)&1023}var p=v;if(p>=65536){++c}var w=p;switch(w){case 47:if(!l){u=true}else{var y=w;l=false;if(u){o+="/";u=false}o+=String.fromCodePoint(y)}break;case 58:o+=":";l=true;break;default:var g=w;l=false;if(u){o+="/";u=false}o+=String.fromCodePoint(g)}}return o};T.addTrailingSlash=function(e){if(e.length==0){return"/"}var t=e.lastIndexOf("/");var n=e.lastIndexOf("\\");if(t<n){if(n!=e.length-1){return e+"\\"}else{return e}}else if(t!=e.length-1){return e+"/"}else{return e}};T.removeTrailingSlashes=function(e){e:while(true){var t=m.cca(e,e.length-1);if(t==null){break}else{switch(t){case 47:case 92:e=m.substr(e,0,-1);break;default:break e}}}return e};T.isAbsolute=function(e){if(y.startsWith(e,"/")){return true}if(e.charAt(1)==":"){return true}if(y.startsWith(e,"\\\\")){return true}return false};T.prototype={__class__:T};var k=function(e,t){this.cwd=e;this.args=t};k.__name__=true;k.interpolate=function(e,t){if(e.indexOf("${")==-1){return $.Success(e)}var n="";var i=0;while(i<e.length){var r=e.indexOf("${",i);if(r==-1){var s=null;n+=s==null?m.substr(e,i,null):m.substr(e,i,s);break}else{var a=r;var o=a-i;n+=o==null?m.substr(e,i,null):m.substr(e,i,o);var l=a+2;var u;var h=e.indexOf("}",l);if(h==-1){return $.Failure("unclosed interpolation in "+e)}else{var f=h;u=f}var d=m.substr(e,l,u-l);var v;var p=t(d);if(p==null){return $.Failure("unknown variable "+d)}else{var w=p;if(w=="$"+"{"+d+"}"){v=w}else{var y=k.interpolate(w,t);if(y._hx_index==0){var g=y.data;v=g}else{var b=y;return b}}}n+=c.string(v);i=u+1}}return $.Success(n)};k.fromMultilineString=function(e,t,n,i){if(i==null){i=false}var r=[];var s=new U;var a=function(e){if(e=="__dirname"){return T.directory(t)}else{return n(e)}};var o=function(e,n){var i=function(e){r.push({pos:z.File(t,n),val:e})};if(e.charAt(0)=="-"){i(e)}else{var o=k.interpolate(e,a);switch(o._hx_index){case 0:var l=o.data;i(l);break;case 1:var u=o.failure;s.fail(u,z.File(t,n));break}}};var l=e.split("\n");var u=y.trim;var c=new Array(l.length);var h=0;var f=l.length;while(h<f){var d=h++;c[d]=u(l[d])}var v=c;var p=0;var w=v.length;while(p<w){var g=p++;var b=v[g];var S=function(e,t){return function(n){t[0](n,e[0])}}([g],[o]);var E=b.charAt(0);if(E!=null){switch(E){case"#":break;case"-":var x=b.indexOf(" ");if(x==-1){S(b)}else{var R=x;S(m.substr(b,0,R));S(y.trim(m.substr(b,R,null)))}break;default:var N=y.trim(b);if(N!=""){var O=N;if(i){S("-cp")}S(O)}}}}return s.produce(r)};k.getNdll=function(e){if(y.startsWith(e,"ndll:")){return D.Some(m.substr(e,5,null))}else{return D.None}};k.split=function(e,t,n,i){var r=[];var s=0;var a=e.length;while(s<a){var o=s++;r.push({val:e[o],pos:z.Cmd(o)})}var l=r;var u=[];var c=[];var h=[];var f=new U;var d=function(e){if(T.isAbsolute(e)){return e}else{return T.join([t,e])}};var m=function(){if(c.length>0){var e=u.concat(c);var n=new k(t,e);c=[];h.push(n)}};while(true){var v=l.shift();if(v==null){m();break}else{var p=[v];var w=function(e){return function(t){var n=l.shift();if(n==null){f.fail(""+e[0].val+" without argument",e[0].pos)}else{var i=n;t(i)}}}(p);var g=p[0].val;switch(g){case"--each":u=c;c=[];break;case"--next":m();break;case"--run":case"-x":var b=[p[0]].concat(l);c=c.concat(b);l=[];m();break;case"--cwd":case"-C":var S=l.shift();if(S==null){f.fail(""+p[0].val+" without argument",p[0].pos)}else{var E=S;t=d(E.val);if(!n.isDirectory(t)){f.fail("Cannot use "+t+" as working directory",E.pos);l=[]}}break;default:var x=g;if(T.extension(x)=="hxml"){l=k.readHxml(d(x),n,i,f,p[0].pos).concat(l)}else{var R=g;if(y.startsWith(R,"${")){var N=k.interpolate(R,i);switch(N._hx_index){case 0:var O=N.data;c.push({val:O,pos:p[0].pos});break;case 1:var _=N.failure;f.fail(_,p[0].pos);break}}else{c.push(p[0])}}}}}return f.produce(h)};k.readHxml=function(e,t,n,i,r){var s=t.readFile(e);switch(s._hx_index){case 0:var a=s.data;return i.getResult(k.fromMultilineString(a,e,n));case 1:var o=s.failure;i.fail(o,r);return[]}};k.prototype={__class__:k};var M=function(){};M.__name__=true;M.to=function(e,t,n){return new Fe(new Pe(function(){return Te.catchExceptions(t,function(t){return Te.withData(null,"Failed to "+e,t,n)},{fileName:"haxeshim/Attempt.hx",lineNumber:8,className:"haxeshim.Attempt",methodName:"to"})}))};var F={};F.__name__=true;F.ofVars=function(e){var t={};var n=t;var i=0;var r=l.fields(e);while(i<r.length){var s=r[i];++i;n[G.IS_WINDOWS?s.toUpperCase():s]=e[s]}var a=n;return a};F.ofMap=function(e){var t={};var n=t;var i=e.keys();while(i.hasNext()){var r=i.next();n[G.IS_WINDOWS?r.toUpperCase():r]=Ke[r]!=null?e.getReserved(r):e.h[r]}var s=n;return s};F.vars=function(e){return e};F.toVars=function(e){return l.copy(e)};F.get=function(e,t){return e[G.IS_WINDOWS?t.toUpperCase():t]};F.mergeInto=function(e,t){var n=F.vars(t);if(e==null){var i=n;var r=i;return r}else if(n==null){var s=e;var a=s;return a}else{var o=e;var u=n;var c={};var h=c;var f=u;var d=0;var m=l.fields(f);while(d<m.length){var v=m[d];++d;h[v]=f[v]}var p=o;var w=0;var y=l.fields(p);while(w<y.length){var g=y[w];++w;h[g]=p[g]}var b=h;return b}};var U=function(){this.errors=[]};U.__name__=true;U.prototype={fail:function(e,t,n){this.errors.push({message:e,pos:t,code:n})},produce:function(e){if(this.errors.length==0){return $.Success(e)}else{return $.Failure({result:e,errors:this.errors})}},getResult:function(e){switch(e._hx_index){case 0:var t=e.data;return t;case 1:var n=e.failure;var i=0;var r=n.errors;while(i<r.length){var s=r[i];++i;this.errors.push(s)}return n.result}},__class__:U};var z=i["haxeshim.Pos"]={__ename__:true,__constructs__:["File","Cmd","Custom"],File:(r=function(e,n){return{_hx_index:0,path:e,line:n,__enum__:"haxeshim.Pos",toString:t}},r.__params__=["path","line"],r),Cmd:(r=function(e){return{_hx_index:1,index:e,__enum__:"haxeshim.Pos",toString:t}},r.__params__=["index"],r),Custom:(r=function(e){return{_hx_index:2,source:e,__enum__:"haxeshim.Pos",toString:t}},r.__params__=["source"],r)};var W=function(){};W.__name__=true;W.die=function(e,t){if(t!=null){X.get().error(t)}process.exit(e);throw new ie("unreachable")};W.gracefully=function(e){try{return e()}catch(e){var t=e instanceof ie?e.val:e;if(t instanceof Te){var n=t;return W.die(n.code,n.message)}else{return W.die(500,c.string(t))}}};W.mergeEnv=function(e){return F.mergeInto(e,F.ofVars(process.env))};W.shell=function(e,t,n){try{return $.Success(o.execSync(e,{cwd:t,stdio:"inherit",env:F.toVars(W.mergeEnv(n))}))}catch(t){var i=t instanceof ie?t.val:t;return $.Failure(new Te(i.status,"Failed to invoke `"+e+"` because "+c.string(i),{fileName:"haxeshim/Exec.hx",lineNumber:47,className:"haxeshim.Exec",methodName:"shell"}))}};W.sync=function(e,t,n,i){var r=o.spawnSync(e,n,{cwd:t,stdio:"inherit",env:F.toVars(W.mergeEnv(i))});var s=r.stdout;var a=r.stderr;var l=r.status;var u=r.signal;var h=r.pid;var f=r.output;var d=r.error;if(d==null){var m=l;return $.Success(m)}else{var v=l;var p=d;return $.Failure(new Te(v,"Failed to call "+e+" because "+c.string(p),{fileName:"haxeshim/Exec.hx",lineNumber:54,className:"haxeshim.Exec",methodName:"sync"}))}};W.eval=function(e,t,n,i){var r=o.spawnSync(e,n,{cwd:t,env:F.toVars(W.mergeEnv(i))});var s=r;if(s.error==null){return $.Success({status:s.status,stdout:s.stdout.toString(),stderr:s.stderr.toString()})}else{var a=r.stdout;var l=r.stderr;var u=r.status;var h=r.signal;var f=r.pid;var d=r.output;var m=r.error;return $.Failure(new Te(null,"Failed to call "+e+" because "+c.string(m),{fileName:"haxeshim/Exec.hx",lineNumber:66,className:"haxeshim.Exec",methodName:"eval"}))}};var P={};P.__name__=true;P.ofString=function(e){return A.ofString(e)};var H=function(){};H.__name__=true;H.get=function(e,t){var n=e;return M.to("get content of "+e,function(){return K.readFileSync(n,{encoding:"utf8"})},t)};H.save=function(e,t,n){return Ge.noise(Ge.next(H.ensureDir(e),function(i){var r=e;var s=function(e){var t=e.b;var n=ue.from(t.buffer,t.byteOffset,e.length);K.writeFileSync(r,n)};var a=t;var o=function(){s(a)};return M.to("save to "+e,o,n)}))};H.exists=function(e){var t=e;return M.to("check the existence of "+e,function(){return Q.exists(t)},{fileName:"haxeshim/Fs.hx",lineNumber:26,className:"haxeshim.Fs",methodName:"exists"})};H.ensureDir=function(e){var t=y.endsWith(e,"/")||y.endsWith(e,"\\");if(t){e=T.removeTrailingSlashes(e)}var n=T.directory(e);if(T.removeTrailingSlashes(n)==e){return new Fe(new j($.Success(Me.Noise)))}else{return Ge.next(Ge.next(H.exists(n),function(e){if(e){return new Fe(new j($.Success(Me.Noise)))}else{return H.ensureDir(T.addTrailingSlash(n))}}),function(n){if(t){return Ge.next(H.exists(e),function(t){return M.to("create directory "+e,function(){if(!t){Q.createDirectory(e)}return Me.Noise},{fileName:"haxeshim/Fs.hx",lineNumber:49,className:"haxeshim.Fs",methodName:"ensureDir"})})}else{return new Fe(new j($.Success(Me.Noise)))}})}};H.ls=function(e,t){var n=[];var i=0;var r=K.readdirSync(e);while(i<r.length){var s=r[i];++i;var a=""+e+"/"+s;var o;if(t==null||t(a)){o=a}else{continue}n.push(o)}return n};H.delete=function(e){return M.to("delete "+e,function(){if(e!=null&&Q.exists(e)){if(Q.isDirectory(e)){var t=0;var n=K.readdirSync(e);while(t<n.length){var i=n[t];++t;H.delete(""+e+"/"+i)}if(Q.exists(e)){var r=0;var s=K.readdirSync(e);while(r<s.length){var a=s[r];++r;var o=e+"/"+a;if(Q.isDirectory(o)){if(Q.exists(o)){var l=0;var u=K.readdirSync(o);while(l<u.length){var c=u[l];++l;var h=o+"/"+c;if(Q.isDirectory(h)){Q.deleteDirectory(h)}else{K.unlinkSync(h)}}K.rmdirSync(o)}}else{K.unlinkSync(o)}}K.rmdirSync(e)}}else{K.unlinkSync(e)}}return},{fileName:"haxeshim/Fs.hx",lineNumber:107,className:"haxeshim.Fs",methodName:"delete"})};H.peel=function(e,t){var n=0;var i=0;var r=t;while(i<r){var s=i++;var a=e.indexOf("/",n);if(a==-1){return D.None}else{var o=a;n=o+1}}return D.Some(m.substr(e,n,null))};H.findNearest=function(e,t){while(true)if(Q.exists(""+t+"/"+e)){return D.Some(""+t+"/"+e)}else{var n=T.directory(t);var i=n;if(t==i){return D.None}else{var r=n;t=r}}};var G=function(){};G.__name__=true;G.slashes=function(e){if(G.IS_WINDOWS){return y.replace(e,"/","\\")}else{return e}};var Y=function(e,t,n){this.path=e;this.version=t;this.compiler=""+e+"/haxe"+Y.EXT;this.haxelib=""+e+"/haxelib"+Y.EXT;this.stdLib=""+e+"/std";this.haxelibRepo=n};Y.__name__=true;Y.prototype={env:function(){var e=F.ofVars({HAXE_STD_PATH:this.stdLib,HAXEPATH:this.path,HAXELIB_PATH:this.haxelibRepo,HAXE_VERSION:this.version});return F.mergeInto(e,te.ENV)},__class__:Y};var Z=function(e){te.setEnv();this.scope=e;this.installation=e.haxeInstallation};Z.__name__=true;Z.exit=function(e){switch(e._hx_index){case 0:var t=e.data;process.exit(0);break;case 1:var n=e.failure;W.die(n.code,n.message);break}};Z.exitWithCode=function(e){switch(e._hx_index){case 0:var t=e.data;process.exit(t);break;case 1:var n=e.failure;W.die(n.code,n.message);break}};Z.main=function(){process.stdout.on("error",function(){});new Z(ee.seek()).dispatch(process.argv.slice(2))};Z.prototype={callHaxelib:function(e){Z.exitWithCode(W.sync(this.installation.haxelib,process.cwd(),e,this.installation.env()))},path:function(e){var t=[];var n=[];var i=0;while(i<e.length){var s=e[i];++i;var a=k.getNdll(s);if(a._hx_index==0){var o=a.v;n.push("-L "+o)}else{t.push("-lib");t.push(s.split(":")[0])}}var l=(r=this.scope,$bind(r,r.resolve));var u=t;var h=W.gracefully(function(){return l(u)});var f=0;while(f<h.length){var d=h[f];switch(d){case"--cwd":++f;break;case"-cp":n.push(T.addTrailingSlash(h[++f]));break;case"-lib":var v=h[++f];var p=k.getNdll(v);if(p._hx_index==0){var w=p.v;n.push("-L "+w)}else{var y=v;var g="Unexpected -lib "+y+" returned from haxelib path "+e.join(" ");process.stdout.write(c.string(g));process.stdout.write("\n");process.exit(500)}break;default:var b=d;if(m.cca(b,0)==45){n.push(""+b+" "+h[++f])}}++f}var S=n.join("\n");process.stdout.write(c.string(S));process.exit(0)},run:function(e){var t=this;this.scope.getLibCommand(e).handle(function(n){switch(n._hx_index){case 0:var i=n.data;Z.exit(i());break;case 1:var r=n.failure;var s=["run"].concat(e);t.callHaxelib(s);break}})},runDir:function(e,t,n){var i=this;Ge.next(Ge.next(H.get(""+t+"/haxelib.json",{fileName:"haxeshim/HaxelibCli.hx",lineNumber:81,className:"haxeshim.HaxelibCli",methodName:"runDir"}),function(e){try{return new Fe(new j($.Success(JSON.parse(e).main)))}catch(e){return new Fe(new j($.Failure(Te.withData(null,"failed to parse haxelib.json",e instanceof ie?e.val:e,{fileName:"haxeshim/HaxelibCli.hx",lineNumber:85,className:"haxeshim.HaxelibCli",methodName:"runDir"}))))}}),function(r){if(r==null){var s=[""+t+"/run.n"].concat(n).concat([T.removeTrailingSlashes(process.cwd())+"/"]);return new Fe(new j(W.sync("neko",t,s,F.ofVars({HAXELIB_RUN:"1",HAXELIB_LIBNAME:e}))))}else{var a=r;var o=i.installation.compiler;var l=o;if(Q.exists(l)){var u=["--run",r].concat(n).concat([T.removeTrailingSlashes(process.cwd())+"/"]);return new Fe(new j(W.sync(l,t,u,F.ofVars({HAXELIB_RUN:"1",HAXELIB_LIBNAME:e}))))}else{var c=o;return W.die(404,'haxe compiler not found at the expected location "'+c+'"')}}}).handle(Z.exitWithCode)},dispatch:function(e){switch(e[0]){case"path":this.path(e.slice(1));break;case"run":this.run(e.slice(1));break;case"run-dir":if(e.length<3){W.die(402,"Not enough arguments. Syntax is `haxelib run-dir <name> <path> <...args>")}var t=e.slice(1);var n=(r=this.scope,$bind(r,r.interpolate));var i=function(e){return n(e)};var s=new Array(t.length);var a=0;var o=t.length;while(a<o){var l=a++;s[l]=i(t[l])}e=s;var u=e.shift();var c=e.shift();this.runDir(u,c,e);break;default:this.callHaxelib(e)}},__class__:Z};var X=function(){};X.__name__=true;X.get=function(e){if(e==null){e=false}if(e){if(X.SILENT==null){X.SILENT=new X}return X.SILENT}else{if(X.DEFAULT==null){X.DEFAULT=new V}return X.DEFAULT}};X.prototype={error:function(e){},info:function(e){},success:function(e){},progress:function(e){},__class__:X};var V=function(){X.call(this)};V.__name__=true;V.__super__=X;V.prototype=$extend(X.prototype,{log:function(e,t){this.progress("");var n=V.out;var i;switch(e._hx_index){case 0:i=[s.Red];break;case 1:i=[s.Yellow];break;case 2:i=[s.DefaultForeground];break;case 3:i=[s.Green];break}n.writeString(h.aset(i)+t+h.aset([s.Off])+"\n")},error:function(e){this.log(q.Error,e)},info:function(e){this.log(q.Info,e)},success:function(e){this.log(q.Success,e)},progress:function(e){if(V.isTTY){if(e.length>80){e=m.substr(e,0,77)+"..."}V.out.writeString((h.strip||h.stripIfUnavailable&&!h.available?"":"")+(h.strip||h.stripIfUnavailable&&!h.available?"":"["+1+"G")+e)}},__class__:V});var q=i["haxeshim._Logger.Level"]={__ename__:true,__constructs__:["Error","Warning","Info","Success"],Error:{_hx_index:0,__enum__:"haxeshim._Logger.Level",toString:t},Warning:{_hx_index:1,__enum__:"haxeshim._Logger.Level",toString:t},Info:{_hx_index:2,__enum__:"haxeshim._Logger.Level",toString:t},Success:{_hx_index:3,__enum__:"haxeshim._Logger.Level",toString:t}};var J=function(){};J.__name__=true;J.__isInterface__=true;J.prototype={__class__:J};var j=function(e){this.value=e};j.__name__=true;j.__interfaces__=[J];j.prototype={get:function(){return this.value},__class__:j};var Q=function(){};Q.__name__=true;Q.exists=function(e){try{K.accessSync(e);return true}catch(e){var t=e instanceof ie?e.val:e;return false}};Q.isDirectory=function(e){try{return K.statSync(e).isDirectory()}catch(e){var t=e instanceof ie?e.val:e;return false}};Q.createDirectory=function(e){try{K.mkdirSync(e)}catch(r){var t=r instanceof ie?r.val:r;if(t.code=="ENOENT"){Q.createDirectory(oe.dirname(e));K.mkdirSync(e)}else{var n;try{n=K.statSync(e)}catch(e){var i=e instanceof ie?e.val:e;throw t}if(!n.isDirectory()){throw t}}}};Q.deleteDirectory=function(e){if(Q.exists(e)){var t=0;var n=K.readdirSync(e);while(t<n.length){var i=n[t];++t;var r=e+"/"+i;if(Q.isDirectory(r)){Q.deleteDirectory(r)}else{K.unlinkSync(r)}}K.rmdirSync(e)}};var K=n(747);var $=i["tink.core.Outcome"]={__ename__:true,__constructs__:["Success","Failure"],Success:(r=function(e){return{_hx_index:0,data:e,__enum__:"tink.core.Outcome",toString:t}},r.__params__=["data"],r),Failure:(r=function(e){return{_hx_index:1,failure:e,__enum__:"tink.core.Outcome",toString:t}},r.__params__=["failure"],r)};var ee=function(e,t,n,i){this.haxeshimRoot=e;this.isGlobal=t;this.scopeDir=n;this.scopeLibDir=""+n+"/haxe_libraries";this.cwd=i;this.configFile=""+n+"/"+ee.CONFIG_FILE;this.versionDir=""+e+"/versions";this.haxelibRepo=""+e+"/haxelib";var r=process.env["HAXE_LIBCACHE"];var s=process.env["HAXESHIM_LIBCACHE"];var a;if(s==null){if(r==null){a=""+e+"/haxe_libraries"}else{var o=r;a=o}}else{var l=s;a=l}this.libCache=a};ee.__name__=true;ee.create=function(e,t){return H.save(""+e+"/"+ee.CONFIG_FILE,P.ofString(JSON.stringify(t,null," ")),{fileName:"haxeshim/Scope.hx",lineNumber:194,className:"haxeshim.Scope",methodName:"create"})};ee.exists=function(e){return Q.exists(""+e+"/"+ee.CONFIG_FILE)};ee.seek=function(e){if(e==null){e={}}var t;var n=e.cwd;if(n==null){t=process.cwd()}else{var i=n;t=i}var r;var s=e.startLookingIn;if(s==null){r=t}else{var a=s;r=a}var o;var l=e.haxeshimRoot;if(l==null){o=ee.DEFAULT_ROOT}else{var u=l;o=u}var c=function(e,t,n,i){return new ee(e,t,n,i)};var h=o;var f=t;var d=function(e,t){return c(h,e,t,f)};var m;var v=H.findNearest(ee.CONFIG_FILE,oe.resolve(r));switch(v._hx_index){case 0:var p=v.v;m=d(false,T.directory(p));break;case 1:m=d(true,o);break}m.reload();return m};ee.env=function(e){var t=process.env[e];if(t==null){return D.None}else if(t==""){return D.None}else{var n=t;return D.Some(n)}};ee.prototype={reload:function(){var e;try{e=K.readFileSync(this.configFile,{encoding:"utf8"})}catch(e){throw new ie(this.isGlobal?"Global config file "+this.configFile+" does not exist or cannot be opened":"Unable to open file "+this.configFile+" because "+c.string(e instanceof ie?e.val:e))}var t;try{t=JSON.parse(e)}catch(t){var n=t instanceof ie?t.val:t;new b(2).writeString("Invalid JSON in file "+this.configFile+":\n\n"+e+"\n\n");throw ie.wrap(n)}this.setConfig(t)},setConfig:function(e){if(e.version==null){throw new ie("No version set in "+this.configFile)}if(e.resolveLibs==null){e.resolveLibs=this.isGlobal?"mixed":"scoped"}var t=e.resolveLibs;switch(t){case"haxelib":case"mixed":case"scoped":break;default:var n=t;throw new ie("invalid value "+n+" for `resolveLibs` in "+this.configFile)}this.config=e;this.haxeInstallation=this.getInstallation(e.version)},getVar:function(e){var t=process.env[e];if(t==null){return this.getDefault(e)}else if(t==""){return this.getDefault(e)}else{var n=t;return n}},getDefault:function(e){switch(e){case"CWD":return this.cwd;case"HAXESHIM_LIBCACHE":case"HAXE_LIBCACHE":return this.libCache;case"SCOPE_DIR":return this.scopeDir;default:return null}},reconfigure:function(e){var t=this;return Ge.next(H.save(this.configFile,P.ofString(JSON.stringify(e,null," ")),{fileName:"haxeshim/Scope.hx",lineNumber:201,className:"haxeshim.Scope",methodName:"reconfigure"}),function(n){t.setConfig(e);return new Fe(new j($.Success(n)))})},path:function(e){if(T.isAbsolute(e)){return D.Some(e)}else if(y.startsWith(e,"./")||y.startsWith(e,"../")){return D.Some(""+this.cwd+"/"+e)}else{return D.None}},getInstallation:function(e){var t=this.path(e);switch(t._hx_index){case 0:var n=t.v;return new Y(n,e,this.haxelibRepo);case 1:return new Y(""+this.versionDir+"/"+e,e,this.haxelibRepo)}},resolveThroughHaxelib:function(e){var t=this.haxeInstallation.haxelib;var n=this.cwd;var i=[];var r=0;while(r<e.length){var s=e[r];++r;i.push(s.val)}var a=W.eval(t,n,["path"].concat(i),this.haxeInstallation.env());switch(a._hx_index){case 0:var o=a.data;var l;var u=o.stderr;if(o.status==0){var c=o.stdout;return He.map(k.fromMultilineString(c,"haxelib path",$bind(this,this.getVar),true),function(e){var t=0;var n=e.length;while(t<n){var i=t++;if(e[i].val=="-L"){var r=function(t,n){var i=e[t].pos;var r=n(e[t].val);e[t]={pos:i,val:r}};r(i,function(e){return"-lib"});r(i+1,function(e){return"ndll:"+e})}}return e})}else{l=new Te(o.status,o.stdout+o.stderr,{fileName:"haxeshim/Scope.hx",lineNumber:248,className:"haxeshim.Scope",methodName:"resolveThroughHaxelib"});var h=l;var f=new U;f.fail(h.message,z.Custom("haxelib path"),h.code);return f.produce([])}break;case 1:var d=a.failure;var m=new U;m.fail(d.message,z.Custom("haxelib path"),d.code);return m.produce([])}},interpolate:function(e,t){var n=this;var i;if(t==null){i=$bind(this,this.getVar)}else{var r=t;i=function(e){var t=r(e);if(t==null){return n.getVar(e)}else{var i=t;return i}}}return He.sure(k.interpolate(e,i))},parseDirectives:function(e){var t=new L;var n=0;var i=e.split("\n");var r=y.trim;var s=new Array(i.length);var a=0;var o=i.length;while(a<o){var l=a++;s[l]=r(i[l])}var u=s;while(n<u.length){var c=u[n];++n;if(y.startsWith(c,"#")){var h=y.ltrim(m.substr(c,1,null));if(y.startsWith(h,"@")){var f=h.indexOf(":");if(f!=-1){var d=f;var v=h.substring(1,d);var p;var w=Ke[v]!=null?t.getReserved(v):t.h[v];if(w==null){var g=[];if(Ke[v]!=null){t.setReserved(v,g)}else{t.h[v]=g}p=g}else{var b=w;p=b}p.push(this.interpolate(y.ltrim(m.substr(h,d+1,null))))}}}}return t},libHxml:function(e){return""+this.scopeLibDir+"/"+e+".hxml"},getDirectives:function(e){return Ge.next(H.get(this.libHxml(e),{fileName:"haxeshim/Scope.hx",lineNumber:286,className:"haxeshim.Scope",methodName:"getDirectives"}),Ye.ofSafeSync($bind(this,this.parseDirectives)))},getLibCommand:function(e){var t=this;var n=[];var i=0;while(i<e.length){var r=e[i];++i;n.push(this.interpolate(r))}e=n;var s=e.shift();return Ge.next(this.getDirectives(s),function(n){var i=Ke["run"]!=null?n.getReserved("run"):n.h["run"];if(i==null){return new Fe(new j($.Failure(new Te(null,"no @run directive found for library "+s,{fileName:"haxeshim/Scope.hx",lineNumber:295,className:"haxeshim.Scope",methodName:"getLibCommand"}))))}else{switch(i.length){case 0:return new Fe(new j($.Failure(new Te(null,"no @run directive found for library "+s,{fileName:"haxeshim/Scope.hx",lineNumber:295,className:"haxeshim.Scope",methodName:"getLibCommand"}))));case 1:var r=i[0];var a=[t.interpolate(r)];var o=G.IS_WINDOWS?function(e){return w.quoteWinArg(e,true)}:w.quoteUnixArg;var l=new Array(e.length);var u=0;var c=e.length;while(u<c){var h=u++;l[h]=o(e[h])}var f=a.concat(l).join(" ");var d=process.cwd();var m=t.haxeInstallation.env();return new Fe(new j($.Success(function(){return W.shell(f,d,m)})));default:return new Fe(new j($.Failure(new Te(null,"more than one @run directive for library "+s,{fileName:"haxeshim/Scope.hx",lineNumber:300,className:"haxeshim.Scope",methodName:"getLibCommand"}))))}}})},resolveArgs:function(e){var t=this.cwd;var n=function(e){if(T.isAbsolute(e)){return e}else{return T.join([t,e])}};t=n(e.cwd);var i=[];var r=[];var s=new U;var a=[];var o=[];var l=[];var u=0;e:while(u<e.args.length){var c=e.args[u++];switch(c.val){case"--run":l=e.args.slice(u-1);break e;case"--connect":case"--display":case"--server-connect":case"--server-listen":o.push(c);var h=e.args[u++];if(h==null){s.fail(""+c.val+" requires argument",c.pos)}else{var f=h;o.push(f)}break;case"--wait":o.push(c);break;default:a.push(c)}}var d=new L;e:while(a.length>0){var m=[a.shift()];var v=function(e){return function(t){s.fail(t,e[0].pos)}}(m);var p=m[0].val;switch(p){case"--connect":case"--cwd":case"--each":case"--next":case"--run":case"--wait":case"-C":var w=p;if(y.endsWith(w,".hxml")){a=k.readHxml(n(w),ee.fs,$bind(this,this.getVar),s,m[0].pos).concat(a)}else{var g=p;v(""+g+" not allowed here");break e}break;case"--lib":case"-L":case"-lib":var b=a.shift();var S;if(b==null){v("-lib requires argument")}else{S=k.getNdll(b.val);if(S._hx_index==0){var E=S.v;var x=b;i.push(m[0]);i.push(x)}else{var R=b;var N=R.val;if(!(Ke[N]!=null?d.getReserved(N):d.h[N])){var O=R.val;if(Ke[O]!=null){d.setReserved(O,true)}else{d.h[O]=true}var _=this.config.resolveLibs;var I;if(_=="haxelib"){r.push(R)}else{I=_=="mixed";var D=I;var A=this.libHxml(R.val);var C=ee.fs.readFile(A);switch(C._hx_index){case 0:var B=C.data;var M=k.fromMultilineString(B,A,$bind(this,this.getVar));a=s.getResult(M).concat(a);break;case 1:var F=C.failure;if(Q.exists(A)){v(F)}else if(D){r.push(R)}else{v("-lib "+R.val+" is missing "+A)}break}}}}}break;default:var z=p;if(y.endsWith(z,".hxml")){a=k.readHxml(n(z),ee.fs,$bind(this,this.getVar),s,m[0].pos).concat(a)}else{i.push(m[0])}}}var W=o.concat(i);var P=this.resolveThroughHaxelib(r);i=W.concat(s.getResult(P)).concat(l);return s.produce(new ne(t,i))},resolve:function(e){var t=[];var n=new U;var i=0;var r=n.getResult(k.split(e,this.cwd,ee.fs,$bind(this,this.getVar)));while(i<r.length){var s=r[i];++i;if(s.args.length>0){if(t.length!=0){t.push("--next")}if(s.cwd!=this.cwd){t.push("--cwd");t.push(s.cwd)}var a=0;var o=n.getResult(this.resolveArgs(s)).args;while(a<o.length){var l=o[a];++a;t.push(l.val)}}}var u=n.produce(42);if(u._hx_index==1){var h;h=u.failure.errors[0];var f=h;process.stdout.write(c.string(f.message));process.stdout.write("\n");var d;var m=f.code;if(m==null){d=500}else{var v=m;d=v}process.exit(d)}return t},__class__:ee};var te=function(){};te.__name__=true;te.setEnv=function(){if(te.isset){if(G.IS_WINDOWS){var e=0;var t=te.ENV;var n=t==null?[]:l.fields(t);while(e<n.length){var i=n[e];++e;var r=F.get(te.ENV,i);process.env[i]=r}}te.isset=false}};var ne=function(e,t){k.call(this,e,t)};ne.__name__=true;ne.__super__=k;ne.prototype=$extend(k.prototype,{__class__:ne});var ie=function(e){Error.call(this);this.val=e;if(Error.captureStackTrace){Error.captureStackTrace(this,ie)}};ie.__name__=true;ie.wrap=function(e){if(e instanceof Error){return e}else{return new ie(e)}};ie.__super__=Error;ie.prototype=$extend(Error.prototype,{__class__:ie});var re=function(){};re.__name__=true;re.sliceImpl=function(e,t){var n=new Uint8Array(this,e,t==null?null:t-e);var i=new Uint8Array(n.byteLength);i.set(n);return i.buffer};var se=n(605);var ae=n(211);var oe=n(622);var le=n(835);var ue=n(293).Buffer;var ce=function(){};ce.__name__=true;ce.bytesOfBuffer=function(e){var t=Object.create(A.prototype);t.length=e.byteLength;t.b=e;e.bufferValue=e;e.hxBytes=t;e.bytes=e;return t};var he=n(413).PassThrough;var fe=function(){};fe.__name__=true;fe.attempt=function(e,t){var n=Ze.ofSync(fe.reportError);var i=e.flatMap(function(e){switch(e._hx_index){case 0:var t=e.data;return new Fe(new j(t));case 1:var i=e.failure;return n(i)}});i.gather().handle(t)};fe.reportError=function(e){X.get().error(e.message);process.exit(e.code);return null};var de=function(){};de.__name__=true;de.ensureScope=function(){if(ee.exists(ee.DEFAULT_ROOT)){return new Fe(new j($.Success(Me.Noise)))}else{return ee.create(ee.DEFAULT_ROOT,{version:"stable",resolveLibs:"mixed"})}};de.ensure=function(e){return Ge.next(de.ensureScope(),function(t){var n=ee.seek();var i=new Ee(n,e);var r;if(!Q.exists(i.scope.haxeInstallation.path)){var s=i.scope.config.version;e.info("Version "+s+" configured in "+i.scope.configFile+" does not exist. Attempting download ...");r=i.install(s,{force:false})}else{r=new Fe(new j($.Success(Me.Noise)))}return Ge.next(r,function(e){return new Fe(new j($.Success(Me.Noise)))})})};var me=function(){};me.__name__=true;me.ensure=function(e){return Ge.next(ve.ensure(e),function(t){return de.ensure(e)})};me.main=function(){fe.attempt(me.ensure(X.get()),_e.fromNiladic(Z.main))};var ve=function(){};ve.__name__=true;ve.ensure=function(e){return Ee.ensureNeko(e)};var pe=n(766);var we=function(){};we.__name__=true;we.text=function(e){return Ge.next(we.bytes(e),function(e){return new Fe(new j($.Success(e.toString())))})};we.bytes=function(e){return we.download(e,function(e,t,n){we.buffered(t).handle(n)})};we.buffered=function(e){return Ue.async(function(t){var n=[];e.on("data",$bind(n,$arrayPush));e.on("end",function(){var e=$.Success(ce.bytesOfBuffer(ue.concat(n)));t(e)})})};we.archive=function(e,t,n,i){var r=we.withLogger(i,function(i,r,s){if(r.headers["content-type"]=="application/zip"||y.endsWith(e,".zip")||y.endsWith(i,".zip")){we.unzip(e,n,t,r,s)}else{we.untar(e,n,t,r,s)}});return we.download(e,r)};we.unzip=function(e,t,i,r,s){Ge.next(we.buffered(r),function(r){return Ue.async(function(a){var o=r.length-4;while(o-- >0)if(r.b[o]==80&&r.b[o+1]==75&&r.b[o+2]==5&&r.b[o+3]==6){r.b[o+20]=0;r.b[o+21]=0;r=r.sub(0,o+22);break}if(o==0){var l=$.Failure(new Te(422,"Unzip failed to find central directory in "+e,{fileName:"src/lix/client/Download.hx",lineNumber:70,className:"lix.client.Download",methodName:"unzip"}));a(l);return}var u=r.b;pe.fromBuffer(ue.from(u.buffer,u.byteOffset,r.length),function(r,o){var l=-1;var u=function(){l+=1;s.onProgress(l,o.entryCount,false);if(l==o.entryCount){var e=a;var n=$.Success(t);R.delay(function(){e(n)},100)}};if(r!=null){var h=$.Failure(new Te(422,"Failed to unzip "+e+" because "+c.string(r),{fileName:"src/lix/client/Download.hx",lineNumber:83,className:"lix.client.Download",methodName:"unzip"}));a(h)}o.on("entry",function(e){var r=H.peel(we.stripLeadingSlashes(e.fileName),i);switch(r._hx_index){case 0:var s=r.v;var a=""+t+"/"+s;if(y.endsWith(a,"/")){u()}else{H.ensureDir(a).eager();o.openReadStream(e,function(e,t){var i=n(598).createWriteStream(a);t.pipe(i,{end:true});i.on("close",u)})}break;case 1:break}});o.on("end",function(){o.close();u()})})})}).handle($bind(s,s.done))};we.stripLeadingSlashes=function(e){if(e.charAt(0)=="/"){return we.stripLeadingSlashes(m.substr(e,1,null))}else{return e}};we.untar=function(e,t,i,r,s){return Ue.async(function(e){var a=0;var o=0;var l=[];var u=function(){s.onProgress(o,a+1,true)};var c=1;var h=function(n){if(n==null){n=0}o+=n;u();R.delay(function(){if((c-=1)<=0){s.onProgress(a,a,true);var n=[];var i=0;while(i<l.length){var r=[l[i]];++i;n.push(Ue.async(function(e){return function(t){K.unlink(e[0].to,function(e){return function(n){K.symlink(e[0].from,e[0].to,function(){return function(e){var n=e==null?$.Success(Me.Noise):$.Failure(new Te(null,e.message,{fileName:"src/lix/client/Download.hx",lineNumber:142,className:"lix.client.Download",methodName:"untar"}));t(n)}}())}}(e))}}(r)))}Ge.next(Ge.inParallel(n),function(e){return new Fe(new j($.Success(t)))}).handle(e)}},100)};var f=null;var d=function(t){f=new Te(null,t,{fileName:"src/lix/client/Download.hx",lineNumber:154,className:"lix.client.Download",methodName:"untar"});e($.Failure(f))};Ne.parse(r,function(r){if(f!=null){return}a+=r.size;u();var s=function(){r.on("data",function(){})};var o=H.peel(we.stripLeadingSlashes(r.path),i);switch(o._hx_index){case 0:var d=o.v;var m=""+t+"/"+d;if(y.endsWith(m,"/")){s()}else{H.ensureDir(m).handle(function(t){if(t._hx_index==1){var i=t.failure;f=i;e($.Failure(f))}else if(r.type=="SymbolicLink"){s();l.push({from:r.linkpath,to:m})}else{c+=1;var a=new he;var o=n(598).createWriteStream(m,{mode:r.mode});r.pipe(a,{end:true});a.pipe(o,{end:true});var u=h;var d=r.size;o.on("close",function(){u(d)})}})}break;case 1:s();break}}).handle(function(t){if(t._hx_index==1){var n=t.failure;e($.Failure(n))}else{h()}})}).handle($bind(s,s.done))};we.tar=function(e,t,n,i){var r=n;var s=t;return we.download(e,we.withLogger(i,function(e,t,n){return we.untar(e,r,s,t,n)}))};we.zip=function(e,t,n,i){var r=n;var s=t;return we.download(e,we.withLogger(i,function(e,t,n){we.unzip(e,r,s,t,n)}))};we.withLogger=function(e,t){return function(n,i,r){var s=c.parseInt(i.headers["content-length"]);var a=0;var o=0;var l=1;var u=null;var h=function(t){if(t==u){return}u=t;e.progress(t)};var f=function(e){e=Math.min(1,Math.max(0,e));var t=c.string(Math.round(1e3*e)/10);var n;if(t.indexOf(".")==-1){var i=t;n=""+i+".0"}else{var r=t;n=r}return y.lpad(n," ",5)+"%"};var d=new Date(0).getTime();var m=function(){if(!(o==l||o/l>=1)){var e=(new Date).getTime();if(e>d+137){d=e;var t=[];if(a<s){t.push("Downloaded: "+f(a/s))}if(o>0){t.push("Saved: "+f(o/l))}var n=" "+t.join(" ");h(n)}}};i.on("data",function(e){a+=e.length;m()});var v=0;t(n,i,{onProgress:function(e,t,n){o=e;l=t;if(n){var i=a/s;var r=o/l;var u=i*r;if(u<v){u=v}v=u;o=Math.round(u*1e3);l=1e3}m()},done:function(t){e.success("-> Done!");r(t)}})}};we.download=function(e,t){return Ue.async(function(n){var i=le.parse(e);i.agent=false;if(i.headers==null){i.headers={}}i.headers["user-agent"]=we.USER_AGENT;var r=function(t){var i=$.Failure(Te.withData(null,"Failed to download "+e+" because "+t.message,t,{fileName:"src/lix/client/Download.hx",lineNumber:293,className:"lix.client.Download",methodName:"download"}));n(i)};var s=y.startsWith(e,"https:")?ae.get(i):se.get(i);s.setTimeout(3e4);s.on("error",r);s.on("response",function(s){if(s.statusCode>=400){var a=$.Failure(Te.withData(s.statusCode,s.statusMessage,s,{fileName:"src/lix/client/Download.hx",lineNumber:304,className:"lix.client.Download",methodName:"download"}));n(a)}else{var o=s.headers["location"];if(o==null){s.on("error",r);t(e,s,function(e){switch(e._hx_index){case 0:var t=e.data;n($.Success(t));break;case 1:var i=e.failure;n($.Failure(i));break}})}else{var l=o;var u=le.parse(l);var c=u.slashes;var h=u.search;var f=u.query;var d=u.port;var m=u.pathname;var v=u.path;var p=u.href;var w=u.hostname;var y=u.host;var g=u.hash;var b=u.auth;we.download(u.protocol==null?i.protocol+"//"+i.host+l:l,t).handle(n)}}})})};var ye={};ye.__name__=true;ye.get_isPrerelease=function(e){return e.indexOf("-")!=-1};ye.isNumber=function(e){return new d("^[0-9]*$","").match(e)};ye.fragment=function(e,t){if(ye.isNumber(e)&&ye.isNumber(t)){return c.parseInt(e)-c.parseInt(t)}else{return l.compare(e,t)}};ye.compare=function(e,t){var n=e.split("-");var i=t.split("-");var r=0;while(r<n.length&&r<i.length){var s=n[r].split(".");var a=i[r++].split(".");var o=0;while(o<s.length&&o<a.length){var l=ye.fragment(s[o],a[o]);if(l==0){++o}else{var u=l;return-u}}var c=s.length-a.length;if(c!=0){var h=c;return-h}}return(n.length-i.length)*(r==1?1:-1)};var ge=i["lix.client.haxe.ResolvedUserVersionData"]={__ename__:true,__constructs__:["RNightly","ROfficial","RCustom"],RNightly:(r=function(e){return{_hx_index:0,nightly:e,__enum__:"lix.client.haxe.ResolvedUserVersionData",toString:t}},r.__params__=["nightly"],r),ROfficial:(r=function(e){return{_hx_index:1,version:e,__enum__:"lix.client.haxe.ResolvedUserVersionData",toString:t}},r.__params__=["version"],r),RCustom:(r=function(e){return{_hx_index:2,path:e,__enum__:"lix.client.haxe.ResolvedUserVersionData",toString:t}},r.__params__=["path"],r)};var be={};be.__name__=true;be.get_id=function(e){switch(e._hx_index){case 0:var t=e.nightly;var n=t.published;var i=t.file;var r=t.development;var s=t.hash;return s;case 1:var a=e.version;return a;case 2:var o=e.path;return o}};be.toString=function(e){return xe.toString(xe.ofResolved(e))};var Se=i["lix.client.haxe.PickOfficial"]={__ename__:true,__constructs__:["StableOnly","IncludePrereleases"],StableOnly:{_hx_index:0,__enum__:"lix.client.haxe.PickOfficial",toString:t},IncludePrereleases:{_hx_index:1,__enum__:"lix.client.haxe.PickOfficial",toString:t}};var Ee=function(e,t){this.scope=e;this.logger=t;H.ensureDir(T.addTrailingSlash(e.versionDir)).eager();H.ensureDir(T.addTrailingSlash(e.haxelibRepo)).eager();H.ensureDir(this.downloads=e.haxeshimRoot+"/downloads/").eager()};Ee.__name__=true;Ee.linkToNightly=function(e,t,n){if(n==null){var i=Ee.PLATFORM=="windows"&&t.getTime()>14944608e5?"zip":"tar.gz";n=f.format(t,"haxe_%Y-%m-%d_development_"+e+"."+i)}return f.format(t,""+Ee.NIGHTLIES+"/"+Ee.PLATFORM+"/"+n)};Ee.sortedOfficial=function(e,t){if(e==Se.StableOnly){var n=[];var i=0;while(i<t.length){var r=t[i];++i;if(!ye.get_isPrerelease(r)){n.push(r)}}t=n}t.sort(ye.compare);return t};Ee.officialOnline=function(e){return Ge.next(we.text("https://haxe.org/website-content/downloads/versions.json"),function(t){var n=JSON.parse(t).versions.map(function(e){return e.version});return new Fe(new j($.Success(Ee.sortedOfficial(e,n))))})};Ee.sortedNightlies=function(e){e.sort(function(e,t){return l.compare(t.published.getTime(),e.published.getTime())});return e};Ee.nightliesOnline=function(){return Ge.next(we.text(""+Ee.NIGHTLIES+"/"+Ee.PLATFORM+"/"),Ye.ofSafeSync(function(e){var t=e.split("------------------\n").pop().split("\n");var n=[];var i=function(e){try{return D.Some(m.strDate(e))}catch(e){var t=e instanceof ie?e.val:e;return D.None}};var r=0;while(r<t.length){var s=t[r];++r;var a=y.trim(s).split('<a href="');if(a.length==2){var o=a[1];var l=i(a[0].split(" ")[0]);if(l._hx_index==0){var u;u=o.split('"')[0];var c=u;var h=l.v;var f=c.split(".")[0].split("_").pop();if(f==null){var d=f;n.push({hash:d,file:c,development:c.indexOf("_development_")!=-1,published:h})}else if(f!="latest"){var v=f;n.push({hash:v,file:c,development:c.indexOf("_development_")!=-1,published:h})}}}}return Ee.sortedNightlies(n)}))};Ee.attempt=function(e,t){try{return new Fe(new j($.Success(t.get())))}catch(t){return new Fe(new j($.Failure(new Te(null,"Failed to "+e+" because "+c.string(t instanceof ie?t.val:t),{fileName:"src/lix/client/haxe/Switcher.hx",lineNumber:106,className:"lix.client.haxe.Switcher",methodName:"attempt"}))))}};Ee.pickFirst=function(e,t,n){if(n==null){return Ee.pickFirst(e,t,function(e){return true})}else{return function(i){var r=$getIterator(i);while(r.hasNext()){var s=r.next();if(n(s)){return new Fe(new j($.Success(t(s))))}}return new Fe(new j($.Failure(new Te(404,"No "+e+" build found",{fileName:"src/lix/client/haxe/Switcher.hx",lineNumber:140,className:"lix.client.haxe.Switcher",methodName:"pickFirst"}))))}}};Ee.ensureNeko=function(e){var t=te.PATH;if(Q.exists(t)){return new Fe(new j($.Success(t)))}else{e.info("Neko seems to be missing. Attempting download ...");var n;switch(a.systemName()){case"Mac":n=we.tar("https://github.com/HaxeFoundation/neko/releases/download/v2-3-0/neko-2.3.0-osx64.tar.gz",1,t,e);break;case"Windows":n=we.zip("https://github.com/HaxeFoundation/neko/releases/download/v2-3-0/neko-2.3.0-win.zip",1,t,e);break;default:n=we.tar("https://github.com/HaxeFoundation/neko/releases/download/v2-3-0/neko-2.3.0-linux64.tar.gz",1,t,e)}return Ge.next(n,function(t){e.success("done");return new Fe(new j($.Success(t)))})}};Ee.prototype={officialInstalled:function(e){var t=[];var n=0;var i=K.readdirSync(this.scope.versionDir);while(n<i.length){var r=i[n];++n;if(!xe.isHash(r)&&Q.isDirectory(this.versionDir(r))){t.push(r)}}return Ee.attempt("Get installed Haxe versions",new j(Ee.sortedOfficial(e,t)))},nightliesInstalled:function(){var e=[];var t=0;var n=xe.isHash;var i=[];var r=0;var s=K.readdirSync(this.scope.versionDir);while(r<s.length){var a=s[r];++r;if(n(a)){i.push(a)}}var o=i;while(t<o.length){var l=o[t];++t;e.push({hash:l,published:m.strDate(JSON.parse(K.readFileSync(""+this.versionDir(l)+"/"+Ee.VERSION_INFO,{encoding:"utf8"})).published)})}return Ee.attempt("get installed Haxe versions",new j(Ee.sortedNightlies(e)))},switchTo:function(e){if(be.get_id(e)==this.scope.config.version){return new Fe(new j($.Success(Me.Noise)))}else{return this.scope.reconfigure({version:be.get_id(e),resolveLibs:this.scope.config.resolveLibs})}},resolveInstalled:function(e){return this.resolve(e,$bind(this,this.officialInstalled),$bind(this,this.nightliesInstalled))},resolveOnline:function(e){return this.resolve(e,Ee.officialOnline,Ee.nightliesOnline)},resolve:function(e,t,n){switch(e._hx_index){case 0:return Ge.next(n(),Ee.pickFirst("nightly",ge.RNightly,function(e){return e.development!=false}));case 1:return Ge.next(t(Se.IncludePrereleases),Ee.pickFirst("official",ge.ROfficial));case 2:return Ge.next(t(Se.StableOnly),Ee.pickFirst("stable",ge.ROfficial));case 3:var i=e.hash;return Ge.ofSpecific(Ge.next(n(),function(e){var t=$getIterator(e);while(t.hasNext()){var n=t.next();if(n.hash==i){return new Fe(new j($.Success(ge.RNightly(n))))}}return new Fe(new j($.Failure(new Te(404,"Unable to resolve nightly version "+i+" locally, install it first with `lix install haxe "+i+"`",{fileName:"src/lix/client/haxe/Switcher.hx",lineNumber:165,className:"lix.client.haxe.Switcher",methodName:"resolve"}))))}));case 4:var r=e.version;return Ge.ofSpecific(Ge.next(t(Se.IncludePrereleases),function(e){if(v.has(e,r)){return new Fe(new j($.Success(ge.ROfficial(r))))}else{return new Fe(new j($.Failure(new Te(404,"Unable to resolve version "+r+" locally, install it first with `lix install haxe "+r+"`",{fileName:"src/lix/client/haxe/Switcher.hx",lineNumber:173,className:"lix.client.haxe.Switcher",methodName:"resolve"}))))}}));case 5:var s=e.path;return new Fe(new j($.Success(ge.RCustom(s))))}},versionDir:function(e){return this.scope.getInstallation(e).path},isDownloaded:function(e){return Q.exists(this.versionDir(be.get_id(e)))},linkToOfficial:function(e){var t="https://haxe.org/website-content/downloads/"+e+"/downloads/haxe-"+e+"-";var n;switch(a.systemName()){case"Mac":n="osx.tar.gz";break;case"Windows":var i="";n="win"+i+".zip";break;default:n=e<"3"?"linux.tar.gz":"linux64.tar.gz"}return t+n},replace:function(e,t,n,i){var r=t;while(true){var s=H.ls(t);if(s.length==1){var a=s[0];t=a}else{break}}if(i!=null){i(t)}if(Q.exists(e)){var o=""+this.downloads+"/"+n+"@"+Math.floor(K.statSync(e).ctime.getTime());K.renameSync(e,o);K.renameSync(t,e)}else{K.renameSync(t,e)}if(Q.exists(r)){H.delete(r)}},install:function(e,t){return Ge.next(this.resolveAndDownload(e,t),$bind(this,this.switchTo))},resolveAndDownload:function(e,t){var n=this;var i;var r=xe.ofString(e);if(r._hx_index==4){var s=r.version;i=this.resolveInstalled(xe.ofString(e))}else{i=new Fe(new j($.Failure(new Te(null,""+e+" needs to be resolved online",{fileName:"src/lix/client/haxe/Switcher.hx",lineNumber:250,className:"lix.client.haxe.Switcher",methodName:"resolveAndDownload"}))))}var a=function(t){n.logger.info('Looking up Haxe version "'+e+'" online');return Ge.next(n.resolveOnline(xe.ofString(e)),function(e){n.logger.info(" Resolved to "+be.toString(e)+". Downloading ...");return new Fe(new j($.Success(e)))})};var o=i.flatMap(function(e){switch(e._hx_index){case 0:var t=e.data;return new Fe(new j(e));case 1:var n=e.failure;return a(n)}});return Ge.next(o.gather(),function(e){return Ge.next(n.download(e,t),function(t){n.logger.success(!t?" ... already downloaded!":" ... download complete!");return new Fe(new j($.Success(e)))})})},download:function(e,t){var n=this;if(this.isDownloaded(e)==true){if(t.force!=true){return new Fe(new j($.Success(false)))}else{switch(e._hx_index){case 0:var i=e.nightly;var r=i.development;var s=i.published;var a=i.hash;var o=i.file;var l=Ee.linkToNightly(a,s,o);var u=""+this.downloads+"/"+a+"@"+Math.floor((new Date).getTime());n.logger.info("Downloading Haxe: "+be.toString(e));return Ge.next(we.archive(l,0,u,n.logger),function(e){var t=n.versionDir(a);n.replace(t,e,a,function(e){K.writeFileSync(""+e+"/"+Ee.VERSION_INFO,JSON.stringify({published:m.dateStr(s)}))});return new Fe(new j($.Success(true)))});case 1:var c=e.version;var h=this.linkToOfficial(c);var f=""+this.downloads+"/"+c+"@"+Math.floor((new Date).getTime());n.logger.info("Downloading Haxe: "+be.toString(e));var d=we.archive(h,0,f,n.logger);return Ge.next(d,function(e){var t=n.versionDir(c);n.replace(t,e,c);return new Fe(new j($.Success(true)))});case 2:var v=e.path;return new Fe(new j($.Failure(new Te(null,"Cannot download custom version",{fileName:"src/lix/client/haxe/Switcher.hx",lineNumber:287,className:"lix.client.haxe.Switcher",methodName:"download"}))))}}}else{switch(e._hx_index){case 0:var p=e.nightly;var w=p.development;var y=p.published;var g=p.hash;var b=p.file;var S=Ee.linkToNightly(g,y,b);var E=""+this.downloads+"/"+g+"@"+Math.floor((new Date).getTime());n.logger.info("Downloading Haxe: "+be.toString(e));return Ge.next(we.archive(S,0,E,n.logger),function(e){var t=n.versionDir(g);n.replace(t,e,g,function(e){K.writeFileSync(""+e+"/"+Ee.VERSION_INFO,JSON.stringify({published:m.dateStr(y)}))});return new Fe(new j($.Success(true)))});case 1:var x=e.version;var R=this.linkToOfficial(x);var N=""+this.downloads+"/"+x+"@"+Math.floor((new Date).getTime());n.logger.info("Downloading Haxe: "+be.toString(e));var O=we.archive(R,0,N,n.logger);return Ge.next(O,function(e){var t=n.versionDir(x);n.replace(t,e,x);return new Fe(new j($.Success(true)))});case 2:var _=e.path;return new Fe(new j($.Failure(new Te(null,"Cannot download custom version",{fileName:"src/lix/client/haxe/Switcher.hx",lineNumber:287,className:"lix.client.haxe.Switcher",methodName:"download"}))))}}},__class__:Ee};var xe={};xe.__name__=true;xe.ofResolved=function(e){switch(e._hx_index){case 0:var t=e.nightly;var n=t.published;var i=t.file;var r=t.development;var s=t.hash;return Re.UNightly(s);case 1:var a=e.version;return Re.UOfficial(a);case 2:var o=e.path;return Re.UCustom(o)}};xe.isHash=function(e){var t=0;var n=e.length;while(t<n){var i=t++;var r=xe.hex;var s=e.charCodeAt(i);if(!r.h[s]){return false}}return true};xe.toString=function(e){switch(e._hx_index){case 0:return"latest nightly build";case 1:return"latest official";case 2:return"latest stable release";case 3:var t=e.hash;return"nightly build "+t;case 4:var n=e.version;return"official release "+n;case 5:var i=e.path;return"custom version at `"+i+"`"}};xe.isPath=function(e){if(!T.isAbsolute(e)){return e.charAt(0)=="."}else{return true}};xe.ofString=function(e){if(e==null){return null}else{var t;var n;if(e==null){t=xe.isHash(e);if(t==true){return Re.UNightly(e)}else{n=xe.isPath(e);if(n==true){return Re.UCustom(e)}else{return Re.UOfficial(e)}}}else{switch(e){case"auto":return null;case"latest":return Re.ULatest;case"edge":case"nightly":return Re.UEdge;case"stable":return Re.UStable;default:t=xe.isHash(e);if(t==true){return Re.UNightly(e)}else{n=xe.isPath(e);if(n==true){return Re.UCustom(e)}else{return Re.UOfficial(e)}}}}}};var Re=i["lix.client.haxe.UserVersionData"]={__ename__:true,__constructs__:["UEdge","ULatest","UStable","UNightly","UOfficial","UCustom"],UEdge:{_hx_index:0,__enum__:"lix.client.haxe.UserVersionData",toString:t},ULatest:{_hx_index:1,__enum__:"lix.client.haxe.UserVersionData",toString:t},UStable:{_hx_index:2,__enum__:"lix.client.haxe.UserVersionData",toString:t},UNightly:(r=function(e){return{_hx_index:3,hash:e,__enum__:"lix.client.haxe.UserVersionData",toString:t}},r.__params__=["hash"],r),UOfficial:(r=function(e){return{_hx_index:4,version:e,__enum__:"lix.client.haxe.UserVersionData",toString:t}},r.__params__=["version"],r),UCustom:(r=function(e){return{_hx_index:5,path:e,__enum__:"lix.client.haxe.UserVersionData",toString:t}},r.__params__=["path"],r)};var Ne=function(){};Ne.__name__=true;Ne.parse=function(e,t){return Ue.async(function(n){var i=0;var r=0;var s=new Oe({onentry:function(e){i+=1;t(e)}});s.on("warn",function(){r+=1});s.on("end",function(){var e=i==0&&r!=0?$.Failure(new Te(422,"Invalid tar archive.",{fileName:"src/lix/client/uncompress/Tar.hx",lineNumber:23,className:"lix.client.uncompress.Tar",methodName:"parse"})):$.Success(Me.Noise);n(e)});s.on("error",function(e){var t=$.Failure(new Te(null,e.message,{fileName:"src/lix/client/uncompress/Tar.hx",lineNumber:26,className:"lix.client.uncompress.Tar",methodName:"parse"}));n(t)});e.pipe(s,{end:true})})};var Oe=n(885).Parse;var _e={};_e.__name__=true;_e.invoke=function(e,t){if(_e.depth<500){_e.depth++;e(t);_e.depth--}else{var n=e;var i=function(e){_e.invoke(n,e)};var r=t;_e.defer(function(){i(r)})}};_e.fromNiladic=function(e){return e};_e.defer=function(e){process.nextTick(e)};var Ie=function(){};Ie.__name__=true;Ie.__isInterface__=true;Ie.prototype={__class__:Ie};var De={};De.__name__=true;De.fromMany=function(e){var t=new Le(function(){if(e!=null){var t=0;while(t<e.length){var n=e[t];++t;if(n!=null){n.cancel()}}}else{e=null}});return t};var Le=function(e){this.f=e};Le.__name__=true;Le.__interfaces__=[Ie];Le.prototype={cancel:function(){if(this.f!=null){this.f();this.f=null}},__class__:Le};var Ae=function(e,t){this.dissolved=false;this.a=e;this.b=t};Ae.__name__=true;Ae.__interfaces__=[Ie];Ae.prototype={cancel:function(){if(!this.dissolved){this.dissolved=true;var e=this.a;if(e!=null){e.cancel()}var t=this.b;if(t!=null){t.cancel()}this.a=null;this.b=null}},__class__:Ae};var Ce=function(e,t){if(e==null){throw new ie("callback expected but null received")}this.cb=e;this.list=t};Ce.__name__=true;Ce.__interfaces__=[Ie];Ce.prototype={cancel:function(){if(this.list!=null){var e=this.list;this.cb=null;this.list=null;if(--e.used<e.used>>1){e.compact()}}},__class__:Ce};var Be=function(){this.busy=false;this.queue=[];this.used=0;this.cells=[]};Be.__name__=true;Be.prototype={ondrain:function(){},invoke:function(e,t){if(this.busy){var n=$bind(this,this.invoke);var i=e;var r=t;var s=function(){n(i,r);return};this.queue.push(s)}else{this.busy=true;var a=this.cells.length;var o=0;var l=a;while(o<l){var u=o++;var c=this.cells[u];if(c.list!=null){_e.invoke(c.cb,e)}}this.busy=false;if(t){var h=this.cells.length-a;var f=0;var d=a;while(f<d){var m=f++;var v=this.cells[m];v.cb=null;v.list=null}var p=0;var w=h;while(p<w){var y=p++;this.cells[y]=this.cells[a+y]}this.resize(h)}else if(this.used<this.cells.length){this.compact()}if(this.queue.length>0){this.queue.shift()()}}},compact:function(){if(this.busy){return}else if(this.used==0){this.resize(0);this.ondrain()}else{var e=0;var t=0;var n=this.cells.length;while(t<n){var i=t++;var r=this.cells[i];var s=r.list;if(r.cb!=null){var a=r;if(e!=i){this.cells[e]=a}if(++e==this.used){break}}}this.resize(this.used)}},resize:function(e){this.cells.length=e},__class__:Be};var Te=function(e,t,n){if(e==null){e=500}this.isTinkError=true;this.code=e;this.message=t;this.pos=n;this.exceptionStack=[];this.callStack=[]};Te.__name__=true;Te.withData=function(e,t,n,i){return Te.typed(e,t,n,i)};Te.typed=function(e,t,n,i){var r=new Te(e,t,i);r.data=n;return r};Te.asError=function(e){if(e!=null&&e.isTinkError){return e}else{return null}};Te.catchExceptions=function(e,t,n){try{return $.Success(e())}catch(e){var i=e instanceof ie?e.val:e;var r=Te.asError(i);var s;if(r==null){s=t==null?Te.withData(null,"Unexpected Error",i,n):t(i)}else{var a=r;s=a}return $.Failure(s)}};Te.prototype={throwSelf:function(){var e=this;throw ie.wrap(e)},__class__:Te};var ke=function(){};ke.__name__=true;ke.__isInterface__=true;ke.prototype={__class__:ke};var Me=i["tink.core.Noise"]={__ename__:true,__constructs__:["Noise"],Noise:{_hx_index:0,__enum__:"tink.core.Noise",toString:t}};var Fe=function(e){this.value=e};Fe.__name__=true;Fe.__interfaces__=[ke];Fe.prototype={flatMap:function(e){var t=this;return new We(function(n){var i=t.value.get();return e(i).handle(n)})},handle:function(e){_e.invoke(e,this.value.get());return null},eager:function(){return this},gather:function(){return this},__class__:Fe};var Ue={};Ue.__name__=true;Ue.flatten=function(e){return new We(function(t){var n=null;var i=e.handle(function(e){n=e.handle(t)});var r=new Le(function(){if(n!=null){n.cancel()}});return new Ae(i,r)})};Ue.async=function(e,t){if(t==null){t=false}if(t){return new We(function(t){e(t);return null})}else{var n=new ze;var i=e;_e.invoke(i,$bind(n,n.trigger));return n}};var ze=function(){this.list=new Be};ze.__name__=true;ze.__interfaces__=[ke];ze.prototype={handle:function(e){var t=this.list;if(t==null){_e.invoke(e,this.result);return null}else{var n=t;var i=new Ce(e,n);n.cells.push(i);n.used++;return i}},flatMap:function(e){var t=this.list;if(t==null){return e(this.result)}else{var n=t;var i=new ze;var r=this.list;var s=new Ce(function(t){e(t).handle($bind(i,i.trigger))},r);r.cells.push(s);r.used++;return i}},gather:function(){return this},eager:function(){return this},trigger:function(e){if(this.list==null){return false}else{var t=this.list;this.list=null;this.result=e;t.invoke(e,true);return true}},__class__:ze};var We=function(e){this.suspended=true;var t=this;this.wakeup=e;this.callbacks=new Be;this.callbacks.ondrain=function(){if(t.callbacks!=null){t.suspended=true;var e=t.link;if(e!=null){e.cancel()}t.link=null}}};We.__name__=true;We.__interfaces__=[ke];We.prototype={trigger:function(e){var t=this.callbacks;if(t!=null){var n=t;this.callbacks=null;this.suspended=false;this.result=e;this.link=null;this.wakeup=null;n.invoke(e,true)}},handle:function(e){var t=this.callbacks;if(t==null){_e.invoke(e,this.result);return null}else{var n=t;var i=this.callbacks;var r=new Ce(e,i);i.cells.push(r);i.used++;var s=r;if(this.suspended){this.suspended=false;this.link=this.wakeup($bind(this,this.trigger))}return s}},map:function(e){var t=this;return new We(function(n){return t.handle(function(t){var i=e(t);n(i)})})},flatMap:function(e){return Ue.flatten(this.map(e))},gather:function(){return this},eager:function(){this.handle(_e.fromNiladic(function(){}));return this},__class__:We};var Pe=function(e){this.f=e};Pe.__name__=true;Pe.__interfaces__=[J];Pe.prototype={get:function(){if(this.f!=null){this.result=this.f();this.f=null}return this.result},__class__:Pe};var He=function(){};He.__name__=true;He.sure=function(e){switch(e._hx_index){case 0:var t=e.data;return t;case 1:var n=e.failure;var i=Te.asError(n);if(i==null){throw new ie(n)}else{var r=i;return r.throwSelf()}break}};He.map=function(e,t){switch(e._hx_index){case 0:var n=e.data;return $.Success(t(n));case 1:var i=e.failure;return $.Failure(i)}};var Ge={};Ge.__name__=true;Ge.noise=function(e){return Ge.next(e,function(e){return new Fe(new j($.Success(Me.Noise)))})};Ge.next=function(e,t,n){if(n==null){n=true}var i=n;if(i==null){i=true}var r=e.flatMap(function(e){switch(e._hx_index){case 0:var n=e.data;return t(n);case 1:var i=e.failure;return new Fe(new j($.Failure(i)))}});if(i){return r.gather()}else{return r}};Ge.ofSpecific=function(e){return e};Ge.inParallel=function(e,t,n){if(e.length==0){return new Fe(new j($.Success([])))}else{return Ue.async(function(n){var i=[];var r=e.length;var s=null;var a=[];var o=false;var l=0;var u=m.iter(e);var c=null;var h=function(e){if(s==null){o=true}else if(s!=null){s.cancel()}n(e)};var f=function(e){r=0;h($.Failure(e))};var d=function(e,t){i[e]=t;if((r-=1)==0){h($.Success(i))}else if(u.hasNext()&&r>0){c()}};c=function(){l+=1;var e=l-1;var t=u.next().handle(function(t){switch(t._hx_index){case 0:var n=t.data;d(e,n);break;case 1:var i=t.failure;f(i);break}});a.push(t)};while(true){var v;if(u.hasNext()&&r>0){if(t!=null){t-=1;v=t+1>0}else{v=true}}else{v=false}if(!v){break}c()}s=De.fromMany(a);if(o){if(s!=null){s.cancel()}}},n)}};var Ye={};Ye.__name__=true;Ye.ofSafeSync=function(e){return function(t){return new Fe(new j($.Success(e(t))))}};var Ze={};Ze.__name__=true;Ze.ofSync=function(e){return function(t){return new Fe(new j(e(t)))}};function $getIterator(e){if(e instanceof Array)return m.iter(e);else return e.iterator()}function $bind(t,n){if(n==null)return null;if(n.__id__==null)n.__id__=e.$haxeUID++;var i;if(t.hx__closures__==null)t.hx__closures__={};else i=t.hx__closures__[n.__id__];if(i==null){i=n.bind(t);t.hx__closures__[n.__id__]=i}return i}function $arrayPush(e){this.push(e)}e.$haxeUID|=0;u.__toStr={}.toString;if(String.fromCodePoint==null)String.fromCodePoint=function(e){return e<65536?String.fromCharCode(e):String.fromCharCode((e>>10)+55232)+String.fromCharCode((e&1023)+56320)};String.prototype.__class__=String;String.__name__=true;Array.__name__=true;Date.prototype.__class__=Date;Date.__name__="Date";var Xe={};var Ve={};var qe=Number;var Je=Boolean;var je={};var Qe={};var Ke={};Object.defineProperty(ie.prototype,"message",{get:function(){return String(this.val)}});if(ArrayBuffer.prototype.slice==null){ArrayBuffer.prototype.slice=re.sliceImpl}h.values=function(e){var t;var n=new _;n.set(s.Off,0);n.set(s.Bold,1);n.set(s.Underline,4);n.set(s.Blink,5);n.set(s.ReverseVideo,7);n.set(s.Concealed,8);n.set(s.BoldOff,22);n.set(s.UnderlineOff,24);n.set(s.BlinkOff,25);n.set(s.NormalVideo,27);n.set(s.ConcealedOff,28);n.set(s.Black,30);n.set(s.Red,31);n.set(s.Green,32);n.set(s.Yellow,33);n.set(s.Blue,34);n.set(s.Magenta,35);n.set(s.Cyan,36);n.set(s.White,37);n.set(s.DefaultForeground,39);n.set(s.BlackBack,40);n.set(s.RedBack,41);n.set(s.GreenBack,42);n.set(s.YellowBack,43);n.set(s.BlueBack,44);n.set(s.MagentaBack,45);n.set(s.CyanBack,46);n.set(s.WhiteBack,47);n.set(s.DefaultBackground,49);t=n;return t}(this);h.available=h.detectSupport();h.strip=false;h.stripIfUnavailable=true;f.DAY_SHORT_NAMES=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];f.DAY_NAMES=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];f.MONTH_SHORT_NAMES=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];f.MONTH_NAMES=["January","February","March","April","May","June","July","August","September","October","November","December"];w.winMetaCharacters=[32,40,41,37,33,94,34,60,62,38,124,10,13,44,59];G.IS_WINDOWS=a.systemName()=="Windows";G.DELIMITER=G.IS_WINDOWS?";":":";Y.EXT=G.IS_WINDOWS?".exe":"";V.isTTY=process.stderr.isTTY;V.out=function(e){var t;h.available=V.isTTY;t=new b(2);return t}(this);ee.CONFIG_FILE=".haxerc";ee.fs={isDirectory:function(e){try{return Q.isDirectory(e)}catch(e){var t=e instanceof ie?e.val:e;return false}},readFile:function(e){try{return $.Success(K.readFileSync(e,{encoding:"utf8"}))}catch(t){return $.Failure("Cannot read "+e+" because "+c.string(t instanceof ie?t.val:t))}}};ee.DEFAULT_ROOT=function(e){var t;var n=ee.env("HAXE_ROOT");var i=ee.env("HAXESHIM_ROOT");var r=new j(process.env[G.IS_WINDOWS?"APPDATA":"HOME"]+"/haxe");var s;if(i._hx_index==0){var a=i.v;s=a}else{s=r.get()}var o=new j(s);t=n._hx_index==0?function(e){var t;var i=n.v;t=i;return t}(e):o.get();return t}(this);te.PATH=G.slashes(ee.DEFAULT_ROOT+"/neko");te.isset=false;te.ENV=function(e){var t;var n;switch(a.systemName()){case"Mac":n="DYLD_LIBRARY_PATH";break;case"Windows":n="PATH";break;default:n="LD_LIBRARY_PATH"}var i=process.env[n];t=i==null?function(e){var t;var i=new L;{var r=te.PATH;if(Ke[n]!=null){i.setReserved(n,r)}else{i.h[n]=r}}t=F.ofMap(i);return t}(e):function(e){var t;var r=i;t=r.indexOf(te.PATH)!=-1?F.ofVars({}):function(e){var t;var r=i;var s=new L;{var a=r+G.DELIMITER+te.PATH;if(Ke[n]!=null){s.setReserved(n,a)}else{s.h[n]=a}}t=F.ofMap(s);return t}(e);return t}(e);return t}(this);we.initZip=function(e){var t;var n=pe.validateFileName;pe.validateFileName=function(e){return null};t=true;return t}(this);we.USER_AGENT="switchx";Ee.VERSION_INFO="version.json";Ee.NIGHTLIES="https://build.haxe.org/builds/haxe";Ee.PLATFORM=function(e){var t;switch(a.systemName()){case"Mac":t="mac";break;case"Windows":t="windows";break;default:t="linux64"}return t}(this);xe.hex=function(e){var t;var n=new I;{var i=0;var r="0123456789abcdefABCDEF".split("");while(i<r.length){var s=r[i];++i;n.h[m.cca(s,0)]=true}}t=n;return t}(this);_e.depth=0;me.main()})(typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this)},612:function(e,t,n){"use strict";e.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(e){var t=this;if(!(t instanceof Yallist)){t=new Yallist}t.tail=null;t.head=null;t.length=0;if(e&&typeof e.forEach==="function"){e.forEach(function(e){t.push(e)})}else if(arguments.length>0){for(var n=0,i=arguments.length;n<i;n++){t.push(arguments[n])}}return t}Yallist.prototype.removeNode=function(e){if(e.list!==this){throw new Error("removing node which does not belong to this list")}var t=e.next;var n=e.prev;if(t){t.prev=n}if(n){n.next=t}if(e===this.head){this.head=t}if(e===this.tail){this.tail=n}e.list.length--;e.next=null;e.prev=null;e.list=null;return t};Yallist.prototype.unshiftNode=function(e){if(e===this.head){return}if(e.list){e.list.removeNode(e)}var t=this.head;e.list=this;e.next=t;if(t){t.prev=e}this.head=e;if(!this.tail){this.tail=e}this.length++};Yallist.prototype.pushNode=function(e){if(e===this.tail){return}if(e.list){e.list.removeNode(e)}var t=this.tail;e.list=this;e.prev=t;if(t){t.next=e}this.tail=e;if(!this.head){this.head=e}this.length++};Yallist.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++){push(this,arguments[e])}return this.length};Yallist.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++){unshift(this,arguments[e])}return this.length};Yallist.prototype.pop=function(){if(!this.tail){return undefined}var e=this.tail.value;this.tail=this.tail.prev;if(this.tail){this.tail.next=null}else{this.head=null}this.length--;return e};Yallist.prototype.shift=function(){if(!this.head){return undefined}var e=this.head.value;this.head=this.head.next;if(this.head){this.head.prev=null}else{this.tail=null}this.length--;return e};Yallist.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,i=0;n!==null;i++){e.call(t,n.value,i,this);n=n.next}};Yallist.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,i=this.length-1;n!==null;i--){e.call(t,n.value,i,this);n=n.prev}};Yallist.prototype.get=function(e){for(var t=0,n=this.head;n!==null&&t<e;t++){n=n.next}if(t===e&&n!==null){return n.value}};Yallist.prototype.getReverse=function(e){for(var t=0,n=this.tail;n!==null&&t<e;t++){n=n.prev}if(t===e&&n!==null){return n.value}};Yallist.prototype.map=function(e,t){t=t||this;var n=new Yallist;for(var i=this.head;i!==null;){n.push(e.call(t,i.value,this));i=i.next}return n};Yallist.prototype.mapReverse=function(e,t){t=t||this;var n=new Yallist;for(var i=this.tail;i!==null;){n.push(e.call(t,i.value,this));i=i.prev}return n};Yallist.prototype.reduce=function(e,t){var n;var i=this.head;if(arguments.length>1){n=t}else if(this.head){i=this.head.next;n=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var r=0;i!==null;r++){n=e(n,i.value,r);i=i.next}return n};Yallist.prototype.reduceReverse=function(e,t){var n;var i=this.tail;if(arguments.length>1){n=t}else if(this.tail){i=this.tail.prev;n=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var r=this.length-1;i!==null;r--){n=e(n,i.value,r);i=i.prev}return n};Yallist.prototype.toArray=function(){var e=new Array(this.length);for(var t=0,n=this.head;n!==null;t++){e[t]=n.value;n=n.next}return e};Yallist.prototype.toArrayReverse=function(){var e=new Array(this.length);for(var t=0,n=this.tail;n!==null;t++){e[t]=n.value;n=n.prev}return e};Yallist.prototype.slice=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var n=new Yallist;if(t<e||t<0){return n}if(e<0){e=0}if(t>this.length){t=this.length}for(var i=0,r=this.head;r!==null&&i<e;i++){r=r.next}for(;r!==null&&i<t;i++,r=r.next){n.push(r.value)}return n};Yallist.prototype.sliceReverse=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var n=new Yallist;if(t<e||t<0){return n}if(e<0){e=0}if(t>this.length){t=this.length}for(var i=this.length,r=this.tail;r!==null&&i>t;i--){r=r.prev}for(;r!==null&&i>e;i--,r=r.prev){n.push(r.value)}return n};Yallist.prototype.splice=function(e,t,...n){if(e>this.length){e=this.length-1}if(e<0){e=this.length+e}for(var i=0,r=this.head;r!==null&&i<e;i++){r=r.next}var s=[];for(var i=0;r&&i<t;i++){s.push(r.value);r=this.removeNode(r)}if(r===null){r=this.tail}if(r!==this.head&&r!==this.tail){r=r.prev}for(var i=0;i<n.length;i++){r=insert(this,r,n[i])}return s};Yallist.prototype.reverse=function(){var e=this.head;var t=this.tail;for(var n=e;n!==null;n=n.prev){var i=n.prev;n.prev=n.next;n.next=i}this.head=t;this.tail=e;return this};function insert(e,t,n){var i=t===e.head?new Node(n,null,t,e):new Node(n,t,t.next,e);if(i.next===null){e.tail=i}if(i.prev===null){e.head=i}e.length++;return i}function push(e,t){e.tail=new Node(t,e.tail,null,e);if(!e.head){e.head=e.tail}e.length++}function unshift(e,t){e.head=new Node(t,null,e.head,e);if(!e.tail){e.tail=e.head}e.length++}function Node(e,t,n,i){if(!(this instanceof Node)){return new Node(e,t,n,i)}this.list=i;this.value=e;if(t){t.next=this;this.prev=t}else{this.prev=null}if(n){n.prev=this;this.next=n}else{this.next=null}}try{n(396)(Yallist)}catch(e){}},614:function(e){e.exports=require("events")},619:function(e){e.exports=require("constants")},622:function(e){e.exports=require("path")},626:function(e,t,n){const i=n(795);const r=n(870);const{mkdirpNative:s,mkdirpNativeSync:a}=n(561);const{mkdirpManual:o,mkdirpManualSync:l}=n(806);const{useNative:u,useNativeSync:c}=n(336);const h=(e,t)=>{e=r(e);t=i(t);return u(t)?s(e,t):o(e,t)};const f=(e,t)=>{e=r(e);t=i(t);return c(t)?a(e,t):l(e,t)};h.sync=f;h.native=((e,t)=>s(r(e),i(t)));h.manual=((e,t)=>o(r(e),i(t)));h.nativeSync=((e,t)=>a(r(e),i(t)));h.manualSync=((e,t)=>l(r(e),i(t)));e.exports=h},630:function(e,t,n){"use strict";const i=n(891);const r=n(726);const s=n(203);const a=n(747);const o=n(827);const l=n(381);const u=n(622);const c=n(232);const h=e.exports=((e,t,n)=>{const r=i(e);if(!r.file)throw new TypeError("file is required");if(r.gzip)throw new TypeError("cannot append to compressed archives");if(!t||!Array.isArray(t)||!t.length)throw new TypeError("no files or directories specified");t=Array.from(t);return r.sync?f(r,t):m(r,t,n)});const f=(e,t)=>{const n=new r.Sync(e);let i=true;let s;let o;try{try{s=a.openSync(e.file,"r+")}catch(t){if(t.code==="ENOENT")s=a.openSync(e.file,"w+");else throw t}const r=a.fstatSync(s);const l=Buffer.alloc(512);e:for(o=0;o<r.size;o+=512){for(let e=0,t=0;e<512;e+=t){t=a.readSync(s,l,e,l.length-e,o+e);if(o===0&&l[0]===31&&l[1]===139)throw new Error("cannot append to compressed archives");if(!t)break e}let t=new c(l);if(!t.cksumValid)break;let n=512*Math.ceil(t.size/512);if(o+n+512>r.size)break;o+=n;if(e.mtimeCache)e.mtimeCache.set(t.path,t.mtime)}i=false;d(e,n,o,s,t)}finally{if(i)try{a.closeSync(s)}catch(e){}}};const d=(e,t,n,i,r)=>{const s=new o.WriteStreamSync(e.file,{fd:i,start:n});t.pipe(s);v(t,r)};const m=(e,t,n)=>{t=Array.from(t);const i=new r(e);const s=(t,n,i)=>{const r=(e,n)=>{if(e)a.close(t,t=>i(e));else i(null,n)};let s=0;if(n===0)return r(null,0);let o=0;const l=Buffer.alloc(512);const u=(i,h)=>{if(i)return r(i);o+=h;if(o<512&&h)return a.read(t,l,o,l.length-o,s+o,u);if(s===0&&l[0]===31&&l[1]===139)return r(new Error("cannot append to compressed archives"));if(o<512)return r(null,s);const f=new c(l);if(!f.cksumValid)return r(null,s);const d=512*Math.ceil(f.size/512);if(s+d+512>n)return r(null,s);s+=d+512;if(s>=n)return r(null,s);if(e.mtimeCache)e.mtimeCache.set(f.path,f.mtime);o=0;a.read(t,l,0,512,s,u)};a.read(t,l,0,512,s,u)};const l=new Promise((n,r)=>{i.on("error",r);let l="r+";const u=(c,h)=>{if(c&&c.code==="ENOENT"&&l==="r+"){l="w+";return a.open(e.file,l,u)}if(c)return r(c);a.fstat(h,(a,l)=>{if(a)return r(a);s(h,l.size,(s,a)=>{if(s)return r(s);const l=new o.WriteStream(e.file,{fd:h,start:a});i.pipe(l);l.on("error",r);l.on("close",n);p(i,t)})})};a.open(e.file,l,u)});return n?l.then(n,n):l};const v=(e,t)=>{t.forEach(t=>{if(t.charAt(0)==="@")l({file:u.resolve(e.cwd,t.substr(1)),sync:true,noResume:true,onentry:t=>e.add(t)});else e.add(t)});e.end()};const p=(e,t)=>{while(t.length){const n=t.shift();if(n.charAt(0)==="@")return l({file:u.resolve(e.cwd,n.substr(1)),noResume:true,onentry:t=>e.add(t)}).then(n=>p(e,t));else e.add(n)}e.end()}},656:function(e,t,n){"use strict";const i=n(891);const r=n(63);const s=n(747);const a=n(827);const o=n(622);const l=e.exports=((e,t,n)=>{if(typeof e==="function")n=e,t=null,e={};else if(Array.isArray(e))t=e,e={};if(typeof t==="function")n=t,t=null;if(!t)t=[];else t=Array.from(t);const r=i(e);if(r.sync&&typeof n==="function")throw new TypeError("callback not supported for sync tar functions");if(!r.file&&typeof n==="function")throw new TypeError("callback only supported with file option");if(t.length)u(r,t);return r.file&&r.sync?c(r):r.file?h(r,n):r.sync?f(r):d(r)});const u=(e,t)=>{const n=new Map(t.map(e=>[e.replace(/\/+$/,""),true]));const i=e.filter;const r=(e,t)=>{const i=t||o.parse(e).root||".";const s=e===i?false:n.has(e)?n.get(e):r(o.dirname(e),i);n.set(e,s);return s};e.filter=i?(e,t)=>i(e,t)&&r(e.replace(/\/+$/,"")):e=>r(e.replace(/\/+$/,""))};const c=e=>{const t=new r.Sync(e);const n=e.file;let i=true;let o;const l=s.statSync(n);const u=e.maxReadSize||16*1024*1024;const c=new a.ReadStreamSync(n,{readSize:u,size:l.size});c.pipe(t)};const h=(e,t)=>{const n=new r(e);const i=e.maxReadSize||16*1024*1024;const o=e.file;const l=new Promise((e,t)=>{n.on("error",t);n.on("close",e);s.stat(o,(e,r)=>{if(e)t(e);else{const e=new a.ReadStream(o,{readSize:i,size:r.size});e.on("error",t);e.pipe(n)}})});return t?l.then(t,t):l};const f=e=>{return new r.Sync(e)};const d=e=>{return new r(e)}},662:function(e,t,n){"use strict";const i=n(554);const r=n(720);const s=Symbol("slurp");e.exports=class ReadEntry extends r{constructor(e,t,n){super();this.pause();this.extended=t;this.globalExtended=n;this.header=e;this.startBlockSize=512*Math.ceil(e.size/512);this.blockRemain=this.startBlockSize;this.remain=e.size;this.type=e.type;this.meta=false;this.ignore=false;switch(this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=true;break;default:this.ignore=true}this.path=e.path;this.mode=e.mode;if(this.mode)this.mode=this.mode&4095;this.uid=e.uid;this.gid=e.gid;this.uname=e.uname;this.gname=e.gname;this.size=e.size;this.mtime=e.mtime;this.atime=e.atime;this.ctime=e.ctime;this.linkpath=e.linkpath;this.uname=e.uname;this.gname=e.gname;if(t)this[s](t);if(n)this[s](n,true)}write(e){const t=e.length;if(t>this.blockRemain)throw new Error("writing more to entry than is appropriate");const n=this.remain;const i=this.blockRemain;this.remain=Math.max(0,n-t);this.blockRemain=Math.max(0,i-t);if(this.ignore)return true;if(n>=t)return super.write(e);return super.write(e.slice(0,n))}[s](e,t){for(let n in e){if(e[n]!==null&&e[n]!==undefined&&!(t&&n==="path"))this[n]=e[n]}}}},669:function(e){e.exports=require("util")},720:function(e,t,n){"use strict";const i=n(614);const r=n(413);const s=n(612);const a=n(304).StringDecoder;const o=Symbol("EOF");const l=Symbol("maybeEmitEnd");const u=Symbol("emittedEnd");const c=Symbol("emittingEnd");const h=Symbol("closed");const f=Symbol("read");const d=Symbol("flush");const m=Symbol("flushChunk");const v=Symbol("encoding");const p=Symbol("decoder");const w=Symbol("flowing");const y=Symbol("paused");const g=Symbol("resume");const b=Symbol("bufferLength");const S=Symbol("bufferPush");const E=Symbol("bufferShift");const x=Symbol("objectMode");const R=Symbol("destroyed");const N=global._MP_NO_ITERATOR_SYMBOLS_!=="1";const O=N&&Symbol.asyncIterator||Symbol("asyncIterator not implemented");const _=N&&Symbol.iterator||Symbol("iterator not implemented");const I=e=>e==="end"||e==="finish"||e==="prefinish";const D=e=>e instanceof ArrayBuffer||typeof e==="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0;const L=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e);e.exports=class Minipass extends r{constructor(e){super();this[w]=false;this[y]=false;this.pipes=new s;this.buffer=new s;this[x]=e&&e.objectMode||false;if(this[x])this[v]=null;else this[v]=e&&e.encoding||null;if(this[v]==="buffer")this[v]=null;this[p]=this[v]?new a(this[v]):null;this[o]=false;this[u]=false;this[c]=false;this[h]=false;this.writable=true;this.readable=true;this[b]=0;this[R]=false}get bufferLength(){return this[b]}get encoding(){return this[v]}set encoding(e){if(this[x])throw new Error("cannot set encoding in objectMode");if(this[v]&&e!==this[v]&&(this[p]&&this[p].lastNeed||this[b]))throw new Error("cannot change encoding");if(this[v]!==e){this[p]=e?new a(e):null;if(this.buffer.length)this.buffer=this.buffer.map(e=>this[p].write(e))}this[v]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[x]}set objectMode(e){this[x]=this[x]||!!e}write(e,t,n){if(this[o])throw new Error("write after end");if(this[R]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof t==="function")n=t,t="utf8";if(!t)t="utf8";if(!this[x]&&!Buffer.isBuffer(e)){if(L(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(D(e))e=Buffer.from(e);else if(typeof e!=="string")this.objectMode=true}if(!this.objectMode&&!e.length){const e=this.flowing;if(this[b]!==0)this.emit("readable");if(n)n();return e}if(typeof e==="string"&&!this[x]&&!(t===this[v]&&!this[p].lastNeed)){e=Buffer.from(e,t)}if(Buffer.isBuffer(e)&&this[v])e=this[p].write(e);try{return this.flowing?(this.emit("data",e),this.flowing):(this[S](e),false)}finally{if(this[b]!==0)this.emit("readable");if(n)n()}}read(e){if(this[R])return null;try{if(this[b]===0||e===0||e>this[b])return null;if(this[x])e=null;if(this.buffer.length>1&&!this[x]){if(this.encoding)this.buffer=new s([Array.from(this.buffer).join("")]);else this.buffer=new s([Buffer.concat(Array.from(this.buffer),this[b])])}return this[f](e||null,this.buffer.head.value)}finally{this[l]()}}[f](e,t){if(e===t.length||e===null)this[E]();else{this.buffer.head.value=t.slice(e);t=t.slice(0,e);this[b]-=e}this.emit("data",t);if(!this.buffer.length&&!this[o])this.emit("drain");return t}end(e,t,n){if(typeof e==="function")n=e,e=null;if(typeof t==="function")n=t,t="utf8";if(e)this.write(e,t);if(n)this.once("end",n);this[o]=true;this.writable=false;if(this.flowing||!this[y])this[l]();return this}[g](){if(this[R])return;this[y]=false;this[w]=true;this.emit("resume");if(this.buffer.length)this[d]();else if(this[o])this[l]();else this.emit("drain")}resume(){return this[g]()}pause(){this[w]=false;this[y]=true}get destroyed(){return this[R]}get flowing(){return this[w]}get paused(){return this[y]}[S](e){if(this[x])this[b]+=1;else this[b]+=e.length;return this.buffer.push(e)}[E](){if(this.buffer.length){if(this[x])this[b]-=1;else this[b]-=this.buffer.head.value.length}return this.buffer.shift()}[d](){do{}while(this[m](this[E]()));if(!this.buffer.length&&!this[o])this.emit("drain")}[m](e){return e?(this.emit("data",e),this.flowing):false}pipe(e,t){if(this[R])return;const n=this[u];t=t||{};if(e===process.stdout||e===process.stderr)t.end=false;else t.end=t.end!==false;const i={dest:e,opts:t,ondrain:e=>this[g]()};this.pipes.push(i);e.on("drain",i.ondrain);this[g]();if(n&&i.opts.end)i.dest.end();return e}addListener(e,t){return this.on(e,t)}on(e,t){try{return super.on(e,t)}finally{if(e==="data"&&!this.pipes.length&&!this.flowing)this[g]();else if(I(e)&&this[u]){super.emit(e);this.removeAllListeners(e)}}}get emittedEnd(){return this[u]}[l](){if(!this[c]&&!this[u]&&!this[R]&&this.buffer.length===0&&this[o]){this[c]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[h])this.emit("close");this[c]=false}}emit(e,t){if(e!=="error"&&e!=="close"&&e!==R&&this[R])return;else if(e==="data"){if(!t)return;if(this.pipes.length)this.pipes.forEach(e=>e.dest.write(t)===false&&this.pause())}else if(e==="end"){if(this[u]===true)return;this[u]=true;this.readable=false;if(this[p]){t=this[p].end();if(t){this.pipes.forEach(e=>e.dest.write(t));super.emit("data",t)}}this.pipes.forEach(e=>{e.dest.removeListener("drain",e.ondrain);if(e.opts.end)e.dest.end()})}else if(e==="close"){this[h]=true;if(!this[u]&&!this[R])return}const n=new Array(arguments.length);n[0]=e;n[1]=t;if(arguments.length>2){for(let e=2;e<arguments.length;e++){n[e]=arguments[e]}}try{return super.emit.apply(this,n)}finally{if(!I(e))this[l]();else this.removeAllListeners(e)}}collect(){const e=[];if(!this[x])e.dataLength=0;const t=this.promise();this.on("data",t=>{e.push(t);if(!this[x])e.dataLength+=t.length});return t.then(()=>e)}concat(){return this[x]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(e=>this[x]?Promise.reject(new Error("cannot concat in objectMode")):this[v]?e.join(""):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,t)=>{this.on(R,()=>t(new Error("stream destroyed")));this.on("end",()=>e());this.on("error",e=>t(e))})}[O](){const e=()=>{const e=this.read();if(e!==null)return Promise.resolve({done:false,value:e});if(this[o])return Promise.resolve({done:true});let t=null;let n=null;const i=e=>{this.removeListener("data",r);this.removeListener("end",s);n(e)};const r=e=>{this.removeListener("error",i);this.removeListener("end",s);this.pause();t({value:e,done:!!this[o]})};const s=()=>{this.removeListener("error",i);this.removeListener("data",r);t({done:true})};const a=()=>i(new Error("stream destroyed"));return new Promise((e,o)=>{n=o;t=e;this.once(R,a);this.once("error",i);this.once("end",s);this.once("data",r)})};return{next:e}}[_](){const e=()=>{const e=this.read();const t=e===null;return{value:e,done:t}};return{next:e}}destroy(e){if(this[R]){if(e)this.emit("error",e);else this.emit(R);return this}this[R]=true;this.buffer=new s;this[b]=0;if(typeof this.close==="function"&&!this[h])this.close();if(e)this.emit("error",e);else this.emit(R);return this}static isStream(e){return!!e&&(e instanceof Minipass||e instanceof r||e instanceof i&&(typeof e.pipe==="function"||typeof e.write==="function"&&typeof e.end==="function"))}}},726:function(e,t,n){"use strict";class PackJob{constructor(e,t){this.path=e||"./";this.absolute=t;this.entry=null;this.stat=null;this.readdir=null;this.pending=false;this.ignore=false;this.piped=false}}const i=n(720);const r=n(133);const s=n(662);const a=n(303);const o=a.Sync;const l=a.Tar;const u=n(612);const c=Buffer.alloc(1024);const h=Symbol("onStat");const f=Symbol("ended");const d=Symbol("queue");const m=Symbol("current");const v=Symbol("process");const p=Symbol("processing");const w=Symbol("processJob");const y=Symbol("jobs");const g=Symbol("jobDone");const b=Symbol("addFSEntry");const S=Symbol("addTarEntry");const E=Symbol("stat");const x=Symbol("readdir");const R=Symbol("onreaddir");const N=Symbol("pipe");const O=Symbol("entry");const _=Symbol("entryOpt");const I=Symbol("writeEntryClass");const D=Symbol("write");const L=Symbol("ondrain");const A=n(747);const C=n(622);const B=n(796);const T=B(class Pack extends i{constructor(e){super(e);e=e||Object.create(null);this.opt=e;this.file=e.file||"";this.cwd=e.cwd||process.cwd();this.maxReadSize=e.maxReadSize;this.preservePaths=!!e.preservePaths;this.strict=!!e.strict;this.noPax=!!e.noPax;this.prefix=(e.prefix||"").replace(/(\\|\/)+$/,"");this.linkCache=e.linkCache||new Map;this.statCache=e.statCache||new Map;this.readdirCache=e.readdirCache||new Map;this[I]=a;if(typeof e.onwarn==="function")this.on("warn",e.onwarn);this.portable=!!e.portable;this.zip=null;if(e.gzip){if(typeof e.gzip!=="object")e.gzip={};if(this.portable)e.gzip.portable=true;this.zip=new r.Gzip(e.gzip);this.zip.on("data",e=>super.write(e));this.zip.on("end",e=>super.end());this.zip.on("drain",e=>this[L]());this.on("resume",e=>this.zip.resume())}else this.on("drain",this[L]);this.noDirRecurse=!!e.noDirRecurse;this.follow=!!e.follow;this.noMtime=!!e.noMtime;this.mtime=e.mtime||null;this.filter=typeof e.filter==="function"?e.filter:e=>true;this[d]=new u;this[y]=0;this.jobs=+e.jobs||4;this[p]=false;this[f]=false}[D](e){return super.write(e)}add(e){this.write(e);return this}end(e){if(e)this.write(e);this[f]=true;this[v]();return this}write(e){if(this[f])throw new Error("write after end");if(e instanceof s)this[S](e);else this[b](e);return this.flowing}[S](e){const t=C.resolve(this.cwd,e.path);if(this.prefix)e.path=this.prefix+"/"+e.path.replace(/^\.(\/+|$)/,"");if(!this.filter(e.path,e))e.resume();else{const n=new PackJob(e.path,t,false);n.entry=new l(e,this[_](n));n.entry.on("end",e=>this[g](n));this[y]+=1;this[d].push(n)}this[v]()}[b](e){const t=C.resolve(this.cwd,e);if(this.prefix)e=this.prefix+"/"+e.replace(/^\.(\/+|$)/,"");this[d].push(new PackJob(e,t));this[v]()}[E](e){e.pending=true;this[y]+=1;const t=this.follow?"stat":"lstat";A[t](e.absolute,(t,n)=>{e.pending=false;this[y]-=1;if(t)this.emit("error",t);else this[h](e,n)})}[h](e,t){this.statCache.set(e.absolute,t);e.stat=t;if(!this.filter(e.path,t))e.ignore=true;this[v]()}[x](e){e.pending=true;this[y]+=1;A.readdir(e.absolute,(t,n)=>{e.pending=false;this[y]-=1;if(t)return this.emit("error",t);this[R](e,n)})}[R](e,t){this.readdirCache.set(e.absolute,t);e.readdir=t;this[v]()}[v](){if(this[p])return;this[p]=true;for(let e=this[d].head;e!==null&&this[y]<this.jobs;e=e.next){this[w](e.value);if(e.value.ignore){const t=e.next;this[d].removeNode(e);e.next=t}}this[p]=false;if(this[f]&&!this[d].length&&this[y]===0){if(this.zip)this.zip.end(c);else{super.write(c);super.end()}}}get[m](){return this[d]&&this[d].head&&this[d].head.value}[g](e){this[d].shift();this[y]-=1;this[v]()}[w](e){if(e.pending)return;if(e.entry){if(e===this[m]&&!e.piped)this[N](e);return}if(!e.stat){if(this.statCache.has(e.absolute))this[h](e,this.statCache.get(e.absolute));else this[E](e)}if(!e.stat)return;if(e.ignore)return;if(!this.noDirRecurse&&e.stat.isDirectory()&&!e.readdir){if(this.readdirCache.has(e.absolute))this[R](e,this.readdirCache.get(e.absolute));else this[x](e);if(!e.readdir)return}e.entry=this[O](e);if(!e.entry){e.ignore=true;return}if(e===this[m]&&!e.piped)this[N](e)}[_](e){return{onwarn:(e,t,n)=>this.warn(e,t,n),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime}}[O](e){this[y]+=1;try{return new this[I](e.path,this[_](e)).on("end",()=>this[g](e)).on("error",e=>this.emit("error",e))}catch(e){this.emit("error",e)}}[L](){if(this[m]&&this[m].entry)this[m].entry.resume()}[N](e){e.piped=true;if(e.readdir)e.readdir.forEach(t=>{const n=this.prefix?e.path.slice(this.prefix.length+1)||"./":e.path;const i=n==="./"?"":n.replace(/\/*$/,"/");this[b](i+t)});const t=e.entry;const n=this.zip;if(n)t.on("data",e=>{if(!n.write(e))t.pause()});else t.on("data",e=>{if(!super.write(e))t.pause()})}pause(){if(this.zip)this.zip.pause();return super.pause()}});class PackSync extends T{constructor(e){super(e);this[I]=o}pause(){}resume(){}[E](e){const t=this.follow?"statSync":"lstatSync";this[h](e,A[t](e.absolute))}[x](e,t){this[R](e,A.readdirSync(e.absolute))}[N](e){const t=e.entry;const n=this.zip;if(e.readdir)e.readdir.forEach(t=>{const n=this.prefix?e.path.slice(this.prefix.length+1)||"./":e.path;const i=n==="./"?"":n.replace(/\/*$/,"/");this[b](i+t)});if(n)t.on("data",e=>{n.write(e)});else t.on("data",e=>{super[D](e)})}}T.Sync=PackSync;e.exports=T},747:function(e){e.exports=require("fs")},761:function(e){e.exports=require("zlib")},766:function(e,t,n){var i=n(747);var r=n(761);var s=n(324);var a=n(538);var o=n(669);var l=n(614).EventEmitter;var u=n(413).Transform;var c=n(413).PassThrough;var h=n(413).Writable;t.open=open;t.fromFd=fromFd;t.fromBuffer=fromBuffer;t.fromRandomAccessReader=fromRandomAccessReader;t.dosDateTimeToDate=dosDateTimeToDate;t.validateFileName=validateFileName;t.ZipFile=ZipFile;t.Entry=Entry;t.RandomAccessReader=RandomAccessReader;function open(e,t,n){if(typeof t==="function"){n=t;t=null}if(t==null)t={};if(t.autoClose==null)t.autoClose=true;if(t.lazyEntries==null)t.lazyEntries=false;if(t.decodeStrings==null)t.decodeStrings=true;if(t.validateEntrySizes==null)t.validateEntrySizes=true;if(t.strictFileNames==null)t.strictFileNames=false;if(n==null)n=defaultCallback;i.open(e,"r",function(e,r){if(e)return n(e);fromFd(r,t,function(e,t){if(e)i.close(r,defaultCallback);n(e,t)})})}function fromFd(e,t,n){if(typeof t==="function"){n=t;t=null}if(t==null)t={};if(t.autoClose==null)t.autoClose=false;if(t.lazyEntries==null)t.lazyEntries=false;if(t.decodeStrings==null)t.decodeStrings=true;if(t.validateEntrySizes==null)t.validateEntrySizes=true;if(t.strictFileNames==null)t.strictFileNames=false;if(n==null)n=defaultCallback;i.fstat(e,function(i,r){if(i)return n(i);var a=s.createFromFd(e,{autoClose:true});fromRandomAccessReader(a,r.size,t,n)})}function fromBuffer(e,t,n){if(typeof t==="function"){n=t;t=null}if(t==null)t={};t.autoClose=false;if(t.lazyEntries==null)t.lazyEntries=false;if(t.decodeStrings==null)t.decodeStrings=true;if(t.validateEntrySizes==null)t.validateEntrySizes=true;if(t.strictFileNames==null)t.strictFileNames=false;var i=s.createFromBuffer(e,{maxChunkSize:65536});fromRandomAccessReader(i,e.length,t,n)}function fromRandomAccessReader(e,t,n,i){if(typeof n==="function"){i=n;n=null}if(n==null)n={};if(n.autoClose==null)n.autoClose=true;if(n.lazyEntries==null)n.lazyEntries=false;if(n.decodeStrings==null)n.decodeStrings=true;var r=!!n.decodeStrings;if(n.validateEntrySizes==null)n.validateEntrySizes=true;if(n.strictFileNames==null)n.strictFileNames=false;if(i==null)i=defaultCallback;if(typeof t!=="number")throw new Error("expected totalSize parameter to be a number");if(t>Number.MAX_SAFE_INTEGER){throw new Error("zip file too large. only file sizes up to 2^52 are supported due to JavaScript's Number type being an IEEE 754 double.")}e.ref();var s=22;var a=65535;var o=Math.min(s+a,t);var l=d(o);var u=t-l.length;readAndAssertNoEof(e,l,0,o,u,function(a){if(a)return i(a);for(var c=o-s;c>=0;c-=1){if(l.readUInt32LE(c)!==101010256)continue;var h=l.slice(c);var f=h.readUInt16LE(4);if(f!==0){return i(new Error("multi-disk zip files are not supported: found disk number: "+f))}var m=h.readUInt16LE(10);var v=h.readUInt32LE(16);var p=h.readUInt16LE(20);var w=h.length-s;if(p!==w){return i(new Error("invalid comment length. expected: "+w+". found: "+p))}var y=r?decodeBuffer(h,22,h.length,false):h.slice(22);if(!(m===65535||v===4294967295)){return i(null,new ZipFile(e,v,t,m,y,n.autoClose,n.lazyEntries,r,n.validateEntrySizes,n.strictFileNames))}var g=d(20);var b=u+c-g.length;readAndAssertNoEof(e,g,0,g.length,b,function(s){if(s)return i(s);if(g.readUInt32LE(0)!==117853008){return i(new Error("invalid zip64 end of central directory locator signature"))}var a=readUInt64LE(g,8);var o=d(56);readAndAssertNoEof(e,o,0,o.length,a,function(s){if(s)return i(s);if(o.readUInt32LE(0)!==101075792){return i(new Error("invalid zip64 end of central directory record signature"))}m=readUInt64LE(o,32);v=readUInt64LE(o,48);return i(null,new ZipFile(e,v,t,m,y,n.autoClose,n.lazyEntries,r,n.validateEntrySizes,n.strictFileNames))})});return}i(new Error("end of central directory record signature not found"))})}o.inherits(ZipFile,l);function ZipFile(e,t,n,i,r,s,a,o,u,c){var h=this;l.call(h);h.reader=e;h.reader.on("error",function(e){emitError(h,e)});h.reader.once("close",function(){h.emit("close")});h.readEntryCursor=t;h.fileSize=n;h.entryCount=i;h.comment=r;h.entriesRead=0;h.autoClose=!!s;h.lazyEntries=!!a;h.decodeStrings=!!o;h.validateEntrySizes=!!u;h.strictFileNames=!!c;h.isOpen=true;h.emittedError=false;if(!h.lazyEntries)h._readEntry()}ZipFile.prototype.close=function(){if(!this.isOpen)return;this.isOpen=false;this.reader.unref()};function emitErrorAndAutoClose(e,t){if(e.autoClose)e.close();emitError(e,t)}function emitError(e,t){if(e.emittedError)return;e.emittedError=true;e.emit("error",t)}ZipFile.prototype.readEntry=function(){if(!this.lazyEntries)throw new Error("readEntry() called without lazyEntries:true");this._readEntry()};ZipFile.prototype._readEntry=function(){var e=this;if(e.entryCount===e.entriesRead){setImmediate(function(){if(e.autoClose)e.close();if(e.emittedError)return;e.emit("end")});return}if(e.emittedError)return;var n=d(46);readAndAssertNoEof(e.reader,n,0,n.length,e.readEntryCursor,function(i){if(i)return emitErrorAndAutoClose(e,i);if(e.emittedError)return;var r=new Entry;var s=n.readUInt32LE(0);if(s!==33639248)return emitErrorAndAutoClose(e,new Error("invalid central directory file header signature: 0x"+s.toString(16)));r.versionMadeBy=n.readUInt16LE(4);r.versionNeededToExtract=n.readUInt16LE(6);r.generalPurposeBitFlag=n.readUInt16LE(8);r.compressionMethod=n.readUInt16LE(10);r.lastModFileTime=n.readUInt16LE(12);r.lastModFileDate=n.readUInt16LE(14);r.crc32=n.readUInt32LE(16);r.compressedSize=n.readUInt32LE(20);r.uncompressedSize=n.readUInt32LE(24);r.fileNameLength=n.readUInt16LE(28);r.extraFieldLength=n.readUInt16LE(30);r.fileCommentLength=n.readUInt16LE(32);r.internalFileAttributes=n.readUInt16LE(36);r.externalFileAttributes=n.readUInt32LE(38);r.relativeOffsetOfLocalHeader=n.readUInt32LE(42);if(r.generalPurposeBitFlag&64)return emitErrorAndAutoClose(e,new Error("strong encryption is not supported"));e.readEntryCursor+=46;n=d(r.fileNameLength+r.extraFieldLength+r.fileCommentLength);readAndAssertNoEof(e.reader,n,0,n.length,e.readEntryCursor,function(i){if(i)return emitErrorAndAutoClose(e,i);if(e.emittedError)return;var s=(r.generalPurposeBitFlag&2048)!==0;r.fileName=e.decodeStrings?decodeBuffer(n,0,r.fileNameLength,s):n.slice(0,r.fileNameLength);var o=r.fileNameLength+r.extraFieldLength;var l=n.slice(r.fileNameLength,o);r.extraFields=[];var u=0;while(u<l.length-3){var c=l.readUInt16LE(u+0);var h=l.readUInt16LE(u+2);var f=u+4;var m=f+h;if(m>l.length)return emitErrorAndAutoClose(e,new Error("extra field length exceeds extra field buffer size"));var v=d(h);l.copy(v,0,f,m);r.extraFields.push({id:c,data:v});u=m}r.fileComment=e.decodeStrings?decodeBuffer(n,o,o+r.fileCommentLength,s):n.slice(o,o+r.fileCommentLength);r.comment=r.fileComment;e.readEntryCursor+=n.length;e.entriesRead+=1;if(r.uncompressedSize===4294967295||r.compressedSize===4294967295||r.relativeOffsetOfLocalHeader===4294967295){var p=null;for(var u=0;u<r.extraFields.length;u++){var w=r.extraFields[u];if(w.id===1){p=w.data;break}}if(p==null){return emitErrorAndAutoClose(e,new Error("expected zip64 extended information extra field"))}var y=0;if(r.uncompressedSize===4294967295){if(y+8>p.length){return emitErrorAndAutoClose(e,new Error("zip64 extended information extra field does not include uncompressed size"))}r.uncompressedSize=readUInt64LE(p,y);y+=8}if(r.compressedSize===4294967295){if(y+8>p.length){return emitErrorAndAutoClose(e,new Error("zip64 extended information extra field does not include compressed size"))}r.compressedSize=readUInt64LE(p,y);y+=8}if(r.relativeOffsetOfLocalHeader===4294967295){if(y+8>p.length){return emitErrorAndAutoClose(e,new Error("zip64 extended information extra field does not include relative header offset"))}r.relativeOffsetOfLocalHeader=readUInt64LE(p,y);y+=8}}if(e.decodeStrings){for(var u=0;u<r.extraFields.length;u++){var w=r.extraFields[u];if(w.id===28789){if(w.data.length<6){continue}if(w.data.readUInt8(0)!==1){continue}var g=w.data.readUInt32LE(1);if(a.unsigned(n.slice(0,r.fileNameLength))!==g){continue}r.fileName=decodeBuffer(w.data,5,w.data.length,true);break}}}if(e.validateEntrySizes&&r.compressionMethod===0){var b=r.uncompressedSize;if(r.isEncrypted()){b+=12}if(r.compressedSize!==b){var S="compressed/uncompressed size mismatch for stored file: "+r.compressedSize+" != "+r.uncompressedSize;return emitErrorAndAutoClose(e,new Error(S))}}if(e.decodeStrings){if(!e.strictFileNames){r.fileName=r.fileName.replace(/\\/g,"/")}var E=t.validateFileName(r.fileName);if(E!=null)return emitErrorAndAutoClose(e,new Error(E))}e.emit("entry",r);if(!e.lazyEntries)e._readEntry()})})};ZipFile.prototype.openReadStream=function(e,t,n){var i=this;var s=0;var a=e.compressedSize;if(n==null){n=t;t={}}else{if(t.decrypt!=null){if(!e.isEncrypted()){throw new Error("options.decrypt can only be specified for encrypted entries")}if(t.decrypt!==false)throw new Error("invalid options.decrypt value: "+t.decrypt);if(e.isCompressed()){if(t.decompress!==false)throw new Error("entry is encrypted and compressed, and options.decompress !== false")}}if(t.decompress!=null){if(!e.isCompressed()){throw new Error("options.decompress can only be specified for compressed entries")}if(!(t.decompress===false||t.decompress===true)){throw new Error("invalid options.decompress value: "+t.decompress)}}if(t.start!=null||t.end!=null){if(e.isCompressed()&&t.decompress!==false){throw new Error("start/end range not allowed for compressed entry without options.decompress === false")}if(e.isEncrypted()&&t.decrypt!==false){throw new Error("start/end range not allowed for encrypted entry without options.decrypt === false")}}if(t.start!=null){s=t.start;if(s<0)throw new Error("options.start < 0");if(s>e.compressedSize)throw new Error("options.start > entry.compressedSize")}if(t.end!=null){a=t.end;if(a<0)throw new Error("options.end < 0");if(a>e.compressedSize)throw new Error("options.end > entry.compressedSize");if(a<s)throw new Error("options.end < options.start")}}if(!i.isOpen)return n(new Error("closed"));if(e.isEncrypted()){if(t.decrypt!==false)return n(new Error("entry is encrypted, and options.decrypt !== false"))}i.reader.ref();var o=d(30);readAndAssertNoEof(i.reader,o,0,o.length,e.relativeOffsetOfLocalHeader,function(l){try{if(l)return n(l);var u=o.readUInt32LE(0);if(u!==67324752){return n(new Error("invalid local file header signature: 0x"+u.toString(16)))}var c=o.readUInt16LE(26);var h=o.readUInt16LE(28);var f=e.relativeOffsetOfLocalHeader+o.length+c+h;var d;if(e.compressionMethod===0){d=false}else if(e.compressionMethod===8){d=t.decompress!=null?t.decompress:true}else{return n(new Error("unsupported compression method: "+e.compressionMethod))}var m=f;var v=m+e.compressedSize;if(e.compressedSize!==0){if(v>i.fileSize){return n(new Error("file data overflows file bounds: "+m+" + "+e.compressedSize+" > "+i.fileSize))}}var p=i.reader.createReadStream({start:m+s,end:m+a});var w=p;if(d){var y=false;var g=r.createInflateRaw();p.on("error",function(e){setImmediate(function(){if(!y)g.emit("error",e)})});p.pipe(g);if(i.validateEntrySizes){w=new AssertByteCountStream(e.uncompressedSize);g.on("error",function(e){setImmediate(function(){if(!y)w.emit("error",e)})});g.pipe(w)}else{w=g}w.destroy=function(){y=true;if(g!==w)g.unpipe(w);p.unpipe(g);p.destroy()}}n(null,w)}finally{i.reader.unref()}})};function Entry(){}Entry.prototype.getLastModDate=function(){return dosDateTimeToDate(this.lastModFileDate,this.lastModFileTime)};Entry.prototype.isEncrypted=function(){return(this.generalPurposeBitFlag&1)!==0};Entry.prototype.isCompressed=function(){return this.compressionMethod===8};function dosDateTimeToDate(e,t){var n=e&31;var i=(e>>5&15)-1;var r=(e>>9&127)+1980;var s=0;var a=(t&31)*2;var o=t>>5&63;var l=t>>11&31;return new Date(r,i,n,l,o,a,s)}function validateFileName(e){if(e.indexOf("\\")!==-1){return"invalid characters in fileName: "+e}if(/^[a-zA-Z]:/.test(e)||/^\//.test(e)){return"absolute path: "+e}if(e.split("/").indexOf("..")!==-1){return"invalid relative path: "+e}return null}function readAndAssertNoEof(e,t,n,i,r,s){if(i===0){return setImmediate(function(){s(null,d(0))})}e.read(t,n,i,r,function(e,t){if(e)return s(e);if(t<i){return s(new Error("unexpected EOF"))}s()})}o.inherits(AssertByteCountStream,u);function AssertByteCountStream(e){u.call(this);this.actualByteCount=0;this.expectedByteCount=e}AssertByteCountStream.prototype._transform=function(e,t,n){this.actualByteCount+=e.length;if(this.actualByteCount>this.expectedByteCount){var i="too many bytes in the stream. expected "+this.expectedByteCount+". got at least "+this.actualByteCount;return n(new Error(i))}n(null,e)};AssertByteCountStream.prototype._flush=function(e){if(this.actualByteCount<this.expectedByteCount){var t="not enough bytes in the stream. expected "+this.expectedByteCount+". got only "+this.actualByteCount;return e(new Error(t))}e()};o.inherits(RandomAccessReader,l);function RandomAccessReader(){l.call(this);this.refCount=0}RandomAccessReader.prototype.ref=function(){this.refCount+=1};RandomAccessReader.prototype.unref=function(){var e=this;e.refCount-=1;if(e.refCount>0)return;if(e.refCount<0)throw new Error("invalid unref");e.close(onCloseDone);function onCloseDone(t){if(t)return e.emit("error",t);e.emit("close")}};RandomAccessReader.prototype.createReadStream=function(e){var t=e.start;var n=e.end;if(t===n){var i=new c;setImmediate(function(){i.end()});return i}var r=this._readStreamForRange(t,n);var s=false;var a=new RefUnrefFilter(this);r.on("error",function(e){setImmediate(function(){if(!s)a.emit("error",e)})});a.destroy=function(){r.unpipe(a);a.unref();r.destroy()};var o=new AssertByteCountStream(n-t);a.on("error",function(e){setImmediate(function(){if(!s)o.emit("error",e)})});o.destroy=function(){s=true;a.unpipe(o);a.destroy()};return r.pipe(a).pipe(o)};RandomAccessReader.prototype._readStreamForRange=function(e,t){throw new Error("not implemented")};RandomAccessReader.prototype.read=function(e,t,n,i,r){var s=this.createReadStream({start:i,end:i+n});var a=new h;var o=0;a._write=function(n,i,r){n.copy(e,t+o,0,n.length);o+=n.length;r()};a.on("finish",r);s.on("error",function(e){r(e)});s.pipe(a)};RandomAccessReader.prototype.close=function(e){setImmediate(e)};o.inherits(RefUnrefFilter,c);function RefUnrefFilter(e){c.call(this);this.context=e;this.context.ref();this.unreffedYet=false}RefUnrefFilter.prototype._flush=function(e){this.unref();e()};RefUnrefFilter.prototype.unref=function(e){if(this.unreffedYet)return;this.unreffedYet=true;this.context.unref()};var f="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ";function decodeBuffer(e,t,n,i){if(i){return e.toString("utf8",t,n)}else{var r="";for(var s=t;s<n;s++){r+=f[e[s]]}return r}}function readUInt64LE(e,t){var n=e.readUInt32LE(t);var i=e.readUInt32LE(t+4);return i*4294967296+n}var d;if(typeof Buffer.allocUnsafe==="function"){d=function(e){return Buffer.allocUnsafe(e)}}else{d=function(e){return new Buffer(e)}}function defaultCallback(e){if(e)throw e}},795:function(e,t,n){const{promisify:i}=n(669);const r=n(747);const s=e=>{if(!e)e={mode:511&~process.umask(),fs:r};else if(typeof e==="object")e={mode:511&~process.umask(),fs:r,...e};else if(typeof e==="number")e={mode:e,fs:r};else if(typeof e==="string")e={mode:parseInt(e,8),fs:r};else throw new TypeError("invalid options argument");e.mkdir=e.mkdir||e.fs.mkdir||r.mkdir;e.mkdirAsync=i(e.mkdir);e.stat=e.stat||e.fs.stat||r.stat;e.statAsync=i(e.stat);e.statSync=e.statSync||e.fs.statSync||r.statSync;e.mkdirSync=e.mkdirSync||e.fs.mkdirSync||r.mkdirSync;return e};e.exports=s},796:function(e){"use strict";e.exports=(e=>(class extends e{warn(e,t,n={}){if(this.file)n.file=this.file;if(this.cwd)n.cwd=this.cwd;n.code=t instanceof Error&&t.code||e;n.tarCode=e;if(!this.strict&&n.recoverable!==false){if(t instanceof Error){n=Object.assign(t,n);t=t.message}this.emit("warn",n.tarCode,t,n)}else if(t instanceof Error){this.emit("error",Object.assign(t,n))}else this.emit("error",Object.assign(new Error(`${e}: ${t}`),n))}}))},806:function(e,t,n){const{dirname:i}=n(622);const r=(e,t,n)=>{t.recursive=false;const s=i(e);if(s===e){return t.mkdirAsync(e,t).catch(e=>{if(e.code!=="EISDIR")throw e})}return t.mkdirAsync(e,t).then(()=>n||e,i=>{if(i.code==="ENOENT")return r(s,t).then(n=>r(e,t,n));if(i.code!=="EEXIST"&&i.code!=="EROFS")throw i;return t.statAsync(e).then(e=>{if(e.isDirectory())return n;else throw i},()=>{throw i})})};const s=(e,t,n)=>{const r=i(e);t.recursive=false;if(r===e){try{return t.mkdirSync(e,t)}catch(e){if(e.code!=="EISDIR")throw e;else return}}try{t.mkdirSync(e,t);return n||e}catch(i){if(i.code==="ENOENT")return s(e,t,s(r,t,n));if(i.code!=="EEXIST"&&i.code!=="EROFS")throw i;try{if(!t.statSync(e).isDirectory())throw i}catch(e){throw i}}};e.exports={mkdirpManual:r,mkdirpManualSync:s}},827:function(e,t,n){"use strict";const i=n(720);const r=n(614).EventEmitter;const s=n(747);let a=s.writev;if(!a){const e=process.binding("fs");const t=e.FSReqWrap||e.FSReqCallback;a=((n,i,r,s)=>{const a=(e,t)=>s(e,t,i);const o=new t;o.oncomplete=a;e.writeBuffers(n,i,r,o)})}const o=Symbol("_autoClose");const l=Symbol("_close");const u=Symbol("_ended");const c=Symbol("_fd");const h=Symbol("_finished");const f=Symbol("_flags");const d=Symbol("_flush");const m=Symbol("_handleChunk");const v=Symbol("_makeBuf");const p=Symbol("_mode");const w=Symbol("_needDrain");const y=Symbol("_onerror");const g=Symbol("_onopen");const b=Symbol("_onread");const S=Symbol("_onwrite");const E=Symbol("_open");const x=Symbol("_path");const R=Symbol("_pos");const N=Symbol("_queue");const O=Symbol("_read");const _=Symbol("_readSize");const I=Symbol("_reading");const D=Symbol("_remain");const L=Symbol("_size");const A=Symbol("_write");const C=Symbol("_writing");const B=Symbol("_defaultFlag");const T=Symbol("_errored");class ReadStream extends i{constructor(e,t){t=t||{};super(t);this.readable=true;this.writable=false;if(typeof e!=="string")throw new TypeError("path must be a string");this[T]=false;this[c]=typeof t.fd==="number"?t.fd:null;this[x]=e;this[_]=t.readSize||16*1024*1024;this[I]=false;this[L]=typeof t.size==="number"?t.size:Infinity;this[D]=this[L];this[o]=typeof t.autoClose==="boolean"?t.autoClose:true;if(typeof this[c]==="number")this[O]();else this[E]()}get fd(){return this[c]}get path(){return this[x]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[E](){s.open(this[x],"r",(e,t)=>this[g](e,t))}[g](e,t){if(e)this[y](e);else{this[c]=t;this.emit("open",t);this[O]()}}[v](){return Buffer.allocUnsafe(Math.min(this[_],this[D]))}[O](){if(!this[I]){this[I]=true;const e=this[v]();if(e.length===0)return process.nextTick(()=>this[b](null,0,e));s.read(this[c],e,0,e.length,null,(e,t,n)=>this[b](e,t,n))}}[b](e,t,n){this[I]=false;if(e)this[y](e);else if(this[m](t,n))this[O]()}[l](){if(this[o]&&typeof this[c]==="number"){const e=this[c];this[c]=null;s.close(e,e=>e?this.emit("error",e):this.emit("close"))}}[y](e){this[I]=true;this[l]();this.emit("error",e)}[m](e,t){let n=false;this[D]-=e;if(e>0)n=super.write(e<t.length?t.slice(0,e):t);if(e===0||this[D]<=0){n=false;this[l]();super.end()}return n}emit(e,t){switch(e){case"prefinish":case"finish":break;case"drain":if(typeof this[c]==="number")this[O]();break;case"error":if(this[T])return;this[T]=true;return super.emit(e,t);default:return super.emit(e,t)}}}class ReadStreamSync extends ReadStream{[E](){let e=true;try{this[g](null,s.openSync(this[x],"r"));e=false}finally{if(e)this[l]()}}[O](){let e=true;try{if(!this[I]){this[I]=true;do{const e=this[v]();const t=e.length===0?0:s.readSync(this[c],e,0,e.length,null);if(!this[m](t,e))break}while(true);this[I]=false}e=false}finally{if(e)this[l]()}}[l](){if(this[o]&&typeof this[c]==="number"){const e=this[c];this[c]=null;s.closeSync(e);this.emit("close")}}}class WriteStream extends r{constructor(e,t){t=t||{};super(t);this.readable=false;this.writable=true;this[T]=false;this[C]=false;this[u]=false;this[w]=false;this[N]=[];this[x]=e;this[c]=typeof t.fd==="number"?t.fd:null;this[p]=t.mode===undefined?438:t.mode;this[R]=typeof t.start==="number"?t.start:null;this[o]=typeof t.autoClose==="boolean"?t.autoClose:true;const n=this[R]!==null?"r+":"w";this[B]=t.flags===undefined;this[f]=this[B]?n:t.flags;if(this[c]===null)this[E]()}emit(e,t){if(e==="error"){if(this[T])return;this[T]=true}return super.emit(e,t)}get fd(){return this[c]}get path(){return this[x]}[y](e){this[l]();this[C]=true;this.emit("error",e)}[E](){s.open(this[x],this[f],this[p],(e,t)=>this[g](e,t))}[g](e,t){if(this[B]&&this[f]==="r+"&&e&&e.code==="ENOENT"){this[f]="w";this[E]()}else if(e)this[y](e);else{this[c]=t;this.emit("open",t);this[d]()}}end(e,t){if(e)this.write(e,t);this[u]=true;if(!this[C]&&!this[N].length&&typeof this[c]==="number")this[S](null,0);return this}write(e,t){if(typeof e==="string")e=Buffer.from(e,t);if(this[u]){this.emit("error",new Error("write() after end()"));return false}if(this[c]===null||this[C]||this[N].length){this[N].push(e);this[w]=true;return false}this[C]=true;this[A](e);return true}[A](e){s.write(this[c],e,0,e.length,this[R],(e,t)=>this[S](e,t))}[S](e,t){if(e)this[y](e);else{if(this[R]!==null)this[R]+=t;if(this[N].length)this[d]();else{this[C]=false;if(this[u]&&!this[h]){this[h]=true;this[l]();this.emit("finish")}else if(this[w]){this[w]=false;this.emit("drain")}}}}[d](){if(this[N].length===0){if(this[u])this[S](null,0)}else if(this[N].length===1)this[A](this[N].pop());else{const e=this[N];this[N]=[];a(this[c],e,this[R],(e,t)=>this[S](e,t))}}[l](){if(this[o]&&typeof this[c]==="number"){const e=this[c];this[c]=null;s.close(e,e=>e?this.emit("error",e):this.emit("close"))}}}class WriteStreamSync extends WriteStream{[E](){let e;if(this[B]&&this[f]==="r+"){try{e=s.openSync(this[x],this[f],this[p])}catch(e){if(e.code==="ENOENT"){this[f]="w";return this[E]()}else throw e}}else e=s.openSync(this[x],this[f],this[p]);this[g](null,e)}[l](){if(this[o]&&typeof this[c]==="number"){const e=this[c];this[c]=null;s.closeSync(e);this.emit("close")}}[A](e){let t=true;try{this[S](null,s.writeSync(this[c],e,0,e.length,this[R]));t=false}finally{if(t)try{this[l]()}catch(e){}}}}t.ReadStream=ReadStream;t.ReadStreamSync=ReadStreamSync;t.WriteStream=WriteStream;t.WriteStreamSync=WriteStreamSync},835:function(e){e.exports=require("url")},858:function(e,t){"use strict";const n=t.encode=((e,t)=>{if(!Number.isSafeInteger(e))throw Error("cannot encode number outside of javascript safe integer range");else if(e<0)r(e,t);else i(e,t);return t});const i=(e,t)=>{t[0]=128;for(var n=t.length;n>1;n--){t[n-1]=e&255;e=Math.floor(e/256)}};const r=(e,t)=>{t[0]=255;var n=false;e=e*-1;for(var i=t.length;i>1;i--){var r=e&255;e=Math.floor(e/256);if(n)t[i-1]=l(r);else if(r===0)t[i-1]=0;else{n=true;t[i-1]=u(r)}}};const s=t.parse=(e=>{var t=e[e.length-1];var n=e[0];var i;if(n===128)i=o(e.slice(1,e.length));else if(n===255)i=a(e);else throw Error("invalid base256 encoding");if(!Number.isSafeInteger(i))throw Error("parsed number outside of javascript safe integer range");return i});const a=e=>{var t=e.length;var n=0;var i=false;for(var r=t-1;r>-1;r--){var s=e[r];var a;if(i)a=l(s);else if(s===0)a=s;else{i=true;a=u(s)}if(a!==0)n-=a*Math.pow(256,t-r-1)}return n};const o=e=>{var t=e.length;var n=0;for(var i=t-1;i>-1;i--){var r=e[i];if(r!==0)n+=r*Math.pow(256,t-i-1)}return n};const l=e=>(255^e)&255;const u=e=>(255^e)+1&255},870:function(e,t,n){const i=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform;const{resolve:r,parse:s}=n(622);const a=e=>{if(/\0/.test(e)){throw Object.assign(new TypeError("path must be a string without null bytes"),{path:e,code:"ERR_INVALID_ARG_VALUE"})}e=r(e);if(i==="win32"){const t=/[*|"<>?:]/;const{root:n}=s(e);if(t.test(e.substr(n.length))){throw Object.assign(new Error("Illegal characters in path."),{path:e,code:"EINVAL"})}}return e};e.exports=a},885:function(e,t,n){"use strict";t.c=t.create=n(159);t.r=t.replace=n(630);t.t=t.list=n(381);t.u=t.update=n(966);t.x=t.extract=n(656);t.Pack=n(726);t.Unpack=n(63);t.Parse=n(203);t.ReadEntry=n(662);t.WriteEntry=n(303);t.Header=n(232);t.Pax=n(582);t.types=n(554)},891:function(e){"use strict";const t=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);const n=e.exports=(e=>e?Object.keys(e).map(n=>[t.has(n)?t.get(n):n,e[n]]).reduce((e,t)=>(e[t[0]]=t[1],e),Object.create(null)):{})},904:function(e){"use strict";e.exports=((e,t,n)=>{e&=4095;if(n){e=(e|384)&~18}if(t){if(e&256)e|=64;if(e&32)e|=8;if(e&4)e|=1}return e})},941:function(e,t,n){"use strict";const i=n(747);const r=n(622);const s=i.lchown?"lchown":"chown";const a=i.lchownSync?"lchownSync":"chownSync";const o=i.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/);const l=(e,t,n)=>{try{return i[a](e,t,n)}catch(e){if(e.code!=="ENOENT")throw e}};const u=(e,t,n)=>{try{return i.chownSync(e,t,n)}catch(e){if(e.code!=="ENOENT")throw e}};const c=o?(e,t,n,r)=>s=>{if(!s||s.code!=="EISDIR")r(s);else i.chown(e,t,n,r)}:(e,t,n,i)=>i;const h=o?(e,t,n)=>{try{return l(e,t,n)}catch(i){if(i.code!=="EISDIR")throw i;u(e,t,n)}}:(e,t,n)=>l(e,t,n);const f=process.version;let d=(e,t,n)=>i.readdir(e,t,n);let m=(e,t)=>i.readdirSync(e,t);if(/^v4\./.test(f))d=((e,t,n)=>i.readdir(e,n));const v=(e,t,n,r)=>{i[s](e,t,n,c(e,t,n,e=>{r(e&&e.code!=="ENOENT"?e:null)}))};const p=(e,t,n,s,a)=>{if(typeof t==="string")return i.lstat(r.resolve(e,t),(i,r)=>{if(i)return a(i.code!=="ENOENT"?i:null);r.name=t;p(e,r,n,s,a)});if(t.isDirectory()){w(r.resolve(e,t.name),n,s,i=>{if(i)return a(i);const o=r.resolve(e,t.name);v(o,n,s,a)})}else{const i=r.resolve(e,t.name);v(i,n,s,a)}};const w=(e,t,n,i)=>{d(e,{withFileTypes:true},(r,s)=>{if(r){if(r.code==="ENOENT")return i();else if(r.code!=="ENOTDIR"&&r.code!=="ENOTSUP")return i(r)}if(r||!s.length)return v(e,t,n,i);let a=s.length;let o=null;const l=r=>{if(o)return;if(r)return i(o=r);if(--a===0)return v(e,t,n,i)};s.forEach(i=>p(e,i,t,n,l))})};const y=(e,t,n,s)=>{if(typeof t==="string"){try{const n=i.lstatSync(r.resolve(e,t));n.name=t;t=n}catch(e){if(e.code==="ENOENT")return;else throw e}}if(t.isDirectory())g(r.resolve(e,t.name),n,s);h(r.resolve(e,t.name),n,s)};const g=(e,t,n)=>{let i;try{i=m(e,{withFileTypes:true})}catch(i){if(i.code==="ENOENT")return;else if(i.code==="ENOTDIR"||i.code==="ENOTSUP")return h(e,t,n);else throw i}if(i&&i.length)i.forEach(i=>y(e,i,t,n));return h(e,t,n)};e.exports=w;w.sync=g},953:function(e,t,n){const i=process.env.__FAKE_PLATFORM__||process.platform;const r=i==="win32";const s=global.__FAKE_TESTING_FS__||n(747);const{O_CREAT:a,O_TRUNC:o,O_WRONLY:l,UV_FS_O_FILEMAP:u=0}=s.constants;const c=r&&!!u;const h=512*1024;const f=u|o|a|l;e.exports=!c?()=>"w":e=>e<h?f:"w"},965:function(e){e.exports=Pend;function Pend(){this.pending=0;this.max=Infinity;this.listeners=[];this.waiting=[];this.error=null}Pend.prototype.go=function(e){if(this.pending<this.max){pendGo(this,e)}else{this.waiting.push(e)}};Pend.prototype.wait=function(e){if(this.pending===0){e(this.error)}else{this.listeners.push(e)}};Pend.prototype.hold=function(){return pendHold(this)};function pendHold(e){e.pending+=1;var t=false;return onCb;function onCb(n){if(t)throw new Error("callback called twice");t=true;e.error=e.error||n;e.pending-=1;if(e.waiting.length>0&&e.pending<e.max){pendGo(e,e.waiting.shift())}else if(e.pending===0){var i=e.listeners;e.listeners=[];i.forEach(cbListener)}}function cbListener(t){t(e.error)}}function pendGo(e,t){t(pendHold(e))}},966:function(e,t,n){"use strict";const i=n(891);const r=n(630);const s=e.exports=((e,t,n)=>{const s=i(e);if(!s.file)throw new TypeError("file is required");if(s.gzip)throw new TypeError("cannot append to compressed archives");if(!t||!Array.isArray(t)||!t.length)throw new TypeError("no files or directories specified");t=Array.from(t);a(s);return r(s,t,n)});const a=e=>{const t=e.filter;if(!e.mtimeCache)e.mtimeCache=new Map;e.filter=t?(n,i)=>t(n,i)&&!(e.mtimeCache.get(n)>i.mtime):(t,n)=>!(e.mtimeCache.get(t)>n.mtime)}}});