@omer-x/buttler
Version:
automates CI/CD workflows using Docker and GitHub webhooks
1 lines • 43.2 kB
JavaScript
exports.id=629,exports.ids=[629],exports.modules={5945:t=>{function e(t){return Buffer.isBuffer(t)?t:Buffer.from(t.buffer,t.byteOffset,t.byteLength)}t.exports={isBuffer:function(t){return Buffer.isBuffer(t)||t instanceof Uint8Array},isEncoding:function(t){return Buffer.isEncoding(t)},alloc:function(t,e,i){return Buffer.alloc(t,e,i)},allocUnsafe:function(t){return Buffer.allocUnsafe(t)},allocUnsafeSlow:function(t){return Buffer.allocUnsafeSlow(t)},byteLength:function(t,e){return Buffer.byteLength(t,e)},compare:function(t,e){return Buffer.compare(t,e)},concat:function(t,e){return Buffer.concat(t,e)},copy:function(t,i,r,n,s){return e(t).copy(i,r,n,s)},equals:function(t,i){return e(t).equals(i)},fill:function(t,i,r,n,s){return e(t).fill(i,r,n,s)},from:function(t,e,i){return Buffer.from(t,e,i)},includes:function(t,i,r,n){return e(t).includes(i,r,n)},indexOf:function(t,i,r,n){return e(t).indexOf(i,r,n)},lastIndexOf:function(t,i,r,n){return e(t).lastIndexOf(i,r,n)},swap16:function(t){return e(t).swap16()},swap32:function(t){return e(t).swap32()},swap64:function(t){return e(t).swap64()},toBuffer:e,toString:function(t,i,r,n){return e(t).toString(i,r,n)},write:function(t,i,r,n,s){return e(t).write(i,r,n,s)},writeDoubleLE:function(t,i,r){return e(t).writeDoubleLE(i,r)},writeFloatLE:function(t,i,r){return e(t).writeFloatLE(i,r)},writeUInt32LE:function(t,i,r){return e(t).writeUInt32LE(i,r)},writeInt32LE:function(t,i,r){return e(t).writeInt32LE(i,r)},readDoubleLE:function(t,i){return e(t).readDoubleLE(i)},readFloatLE:function(t,i){return e(t).readFloatLE(i)},readUInt32LE:function(t,i){return e(t).readUInt32LE(i)},readInt32LE:function(t,i){return e(t).readInt32LE(i)},writeDoubleBE:function(t,i,r){return e(t).writeDoubleBE(i,r)},writeFloatBE:function(t,i,r){return e(t).writeFloatBE(i,r)},writeUInt32BE:function(t,i,r){return e(t).writeUInt32BE(i,r)},writeInt32BE:function(t,i,r){return e(t).writeInt32BE(i,r)},readDoubleBE:function(t,i){return e(t).readDoubleBE(i)},readFloatBE:function(t,i){return e(t).readFloatBE(i)},readUInt32BE:function(t,i){return e(t).readUInt32BE(i)},readInt32BE:function(t,i){return e(t).readInt32BE(i)}}},15624:(t,e,i)=>{var r=i(93432);function n(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function s(t){var e=function(){if(e.called)throw Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)};return e.onceError=(t.name||"Function wrapped with `once`")+" shouldn't be called more than once",e.called=!1,e}t.exports=r(n),t.exports.strict=r(s),n.proto=n(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return n(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return s(this)},configurable:!0})})},24571:(t,e,i)=>{let r={S_IFMT:61440,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960};try{t.exports=i(29021).constants||r}catch{t.exports=r}},36420:(t,e,i)=>{let{EventEmitter:r}=i(94735),n=Error("Stream was destroyed"),s=Error("Premature close"),a=i(97031),u=i(89370),l=0x1ffffcff,o=0x1ffdfeff,h=0x200800f,f=17423,d=16527,c=1167,p=12431,_=214047,m=17422,b=32879,x=0x880000f,y=6553615,S=0x1024000f,g=0x8a4000f,w=0x8c0000e,k=0x218000f,v=0x880000e,L=Symbol.asyncIterator||Symbol("asyncIterator");class E{constructor(t,{highWaterMark:e=16384,map:i=null,mapWritable:r,byteLength:n,byteLengthWritable:s}={}){this.stream=t,this.queue=new a,this.highWaterMark=e,this.buffered=0,this.error=null,this.pipeline=null,this.drains=null,this.byteLength=s||n||Y,this.map=r||i,this.afterWrite=z.bind(this),this.afterUpdateNextTick=U.bind(this)}get ended(){return(8388608&this.stream._duplexState)!=0}push(t){return(this.stream._duplexState&v)==0&&((null!==this.map&&(t=this.map(t)),this.buffered+=this.byteLength(t),this.queue.push(t),this.buffered<this.highWaterMark)?(this.stream._duplexState|=2097152,!0):(this.stream._duplexState|=6291456,!1))}shift(){let t=this.queue.shift();return this.buffered-=this.byteLength(t),0===this.buffered&&(this.stream._duplexState&=0x1fdfffff),t}end(t){"function"==typeof t?this.stream.once("finish",t):null!=t&&this.push(t),this.stream._duplexState=(0x8000000|this.stream._duplexState)&0x1fefffff}autoBatch(t,e){let i=[],r=this.stream;for(i.push(t);(r._duplexState&S)==2359296;)i.push(r._writableState.shift());if((15&r._duplexState)!=0)return e(null);r._writev(i,e)}update(){let t=this.stream;t._duplexState|=524288;do{for(;(t._duplexState&S)==2097152;){let e=this.shift();t._duplexState|=0x4040000,t._write(e,this.afterWrite)}(1310720&t._duplexState)==0&&this.updateNonPrimary()}while(!0===this.continueUpdate());t._duplexState&=0x1ff7ffff}updateNonPrimary(){let t=this.stream;if((t._duplexState&g)==0x8000000){t._duplexState=262144|t._duplexState,t._final(T.bind(this));return}if((14&t._duplexState)==4){(0x2008000&t._duplexState)==0&&(t._duplexState|=262160,t._destroy(F.bind(this)));return}(t._duplexState&h)==1&&(t._duplexState=(262160|t._duplexState)&0x1ffffffe,t._open(M.bind(this)))}continueUpdate(){return(0x2000000&this.stream._duplexState)!=0&&(this.stream._duplexState&=0x1dffffff,!0)}updateCallback(){(this.stream._duplexState&k)==1048576?this.update():this.updateNextTick()}updateNextTick(){(0x2000000&this.stream._duplexState)==0&&(this.stream._duplexState|=0x2000000,(524288&this.stream._duplexState)==0&&queueMicrotask(this.afterUpdateNextTick))}}class P{constructor(t,{highWaterMark:e=16384,map:i=null,mapReadable:r,byteLength:n,byteLengthReadable:s}={}){this.stream=t,this.queue=new a,this.highWaterMark=0===e?1:e,this.buffered=0,this.readAhead=e>0,this.error=null,this.pipeline=null,this.byteLength=s||n||Y,this.map=r||i,this.pipeTo=null,this.afterRead=q.bind(this),this.afterUpdateNextTick=O.bind(this)}get ended(){return(16384&this.stream._duplexState)!=0}pipe(t,e){if(null!==this.pipeTo)throw Error("Can only pipe to one destination");if("function"!=typeof e&&(e=null),this.stream._duplexState|=512,this.pipeTo=t,this.pipeline=new I(this.stream,t,e),e&&this.stream.on("error",Z),X(t))t._writableState.pipeline=this.pipeline,e&&t.on("error",Z),t.on("finish",this.pipeline.finished.bind(this.pipeline));else{let e=this.pipeline.done.bind(this.pipeline,t),i=this.pipeline.done.bind(this.pipeline,t,null);t.on("error",e),t.on("close",i),t.on("finish",this.pipeline.finished.bind(this.pipeline))}t.on("drain",N.bind(this)),this.stream.emit("piping",t),t.emit("pipe",this.stream)}push(t){let e=this.stream;return null===t?(this.highWaterMark=0,e._duplexState=(1024|e._duplexState)&0x1ffeffbf,!1):(null!==this.map&&null===(t=this.map(t))?e._duplexState&=0x1ffeffff:(this.buffered+=this.byteLength(t),this.queue.push(t),e._duplexState=(128|e._duplexState)&0x1ffeffff),this.buffered<this.highWaterMark)}shift(){let t=this.queue.shift();return this.buffered-=this.byteLength(t),0===this.buffered&&(this.stream._duplexState&=0x1fffdf7f),t}unshift(t){let e=[null!==this.map?this.map(t):t];for(;this.buffered>0;)e.push(this.shift());for(let t=0;t<e.length-1;t++){let i=e[t];this.buffered+=this.byteLength(i),this.queue.push(i)}this.push(e[e.length-1])}read(){let t=this.stream;if((t._duplexState&d)==128){let e=this.shift();return null!==this.pipeTo&&!1===this.pipeTo.write(e)&&(t._duplexState&=l),(2048&t._duplexState)!=0&&t.emit("data",e),e}return!1===this.readAhead&&(t._duplexState|=131072,this.updateNextTick()),null}drain(){let t=this.stream;for(;(t._duplexState&d)==128&&(768&t._duplexState)!=0;){let e=this.shift();null!==this.pipeTo&&!1===this.pipeTo.write(e)&&(t._duplexState&=l),(2048&t._duplexState)!=0&&t.emit("data",e)}}update(){let t=this.stream;t._duplexState|=32;do{for(this.drain();this.buffered<this.highWaterMark&&(t._duplexState&_)==131072;)t._duplexState|=65552,t._read(this.afterRead),this.drain();(t._duplexState&p)==4224&&(t._duplexState|=8192,t.emit("readable")),(80&t._duplexState)==0&&this.updateNonPrimary()}while(!0===this.continueUpdate());t._duplexState&=0x1fffffdf}updateNonPrimary(){let t=this.stream;if((t._duplexState&c)==1024&&(t._duplexState=(16384|t._duplexState)&0x1ffffbff,t.emit("end"),(8405006&t._duplexState)==8404992&&(t._duplexState|=4),null!==this.pipeTo&&this.pipeTo.end()),(14&t._duplexState)==4){(0x2008000&t._duplexState)==0&&(t._duplexState|=262160,t._destroy(F.bind(this)));return}(t._duplexState&h)==1&&(t._duplexState=(262160|t._duplexState)&0x1ffffffe,t._open(M.bind(this)))}continueUpdate(){return(32768&this.stream._duplexState)!=0&&(this.stream._duplexState&=0x1fff7fff,!0)}updateCallback(){(this.stream._duplexState&b)==64?this.update():this.updateNextTick()}updateNextTickIfOpen(){(32769&this.stream._duplexState)==0&&(this.stream._duplexState|=32768,(32&this.stream._duplexState)==0&&queueMicrotask(this.afterUpdateNextTick))}updateNextTick(){(32768&this.stream._duplexState)==0&&(this.stream._duplexState|=32768,(32&this.stream._duplexState)==0&&queueMicrotask(this.afterUpdateNextTick))}}class B{constructor(t){this.data=null,this.afterTransform=W.bind(t),this.afterFinal=null}}class I{constructor(t,e,i){this.from=t,this.to=e,this.afterPipe=i,this.error=null,this.pipeToFinished=!1}finished(){this.pipeToFinished=!0}done(t,e){if(e&&(this.error=e),t===this.to&&(this.to=null,null!==this.from)){(16384&this.from._duplexState)!=0&&this.pipeToFinished||this.from.destroy(this.error||Error("Writable stream closed prematurely"));return}if(t===this.from&&(this.from=null,null!==this.to)){(16384&t._duplexState)==0&&this.to.destroy(this.error||Error("Readable stream closed before ending"));return}null!==this.afterPipe&&this.afterPipe(this.error),this.to=this.from=this.afterPipe=null}}function N(){this.stream._duplexState|=512,this.updateCallback()}function T(t){let e=this.stream;t&&e.destroy(t),(14&e._duplexState)==0&&(e._duplexState|=8388608,e.emit("finish")),(8405006&e._duplexState)==8404992&&(e._duplexState|=4),e._duplexState&=0x17fbffff,(524288&e._duplexState)==0?this.update():this.updateNextTick()}function F(t){let e=this.stream;t||this.error===n||(t=this.error),t&&e.emit("error",t),e._duplexState|=8,e.emit("close");let i=e._readableState,r=e._writableState;if(null!==i&&null!==i.pipeline&&i.pipeline.done(e,t),null!==r){for(;null!==r.drains&&r.drains.length>0;)r.drains.shift().resolve(!1);null!==r.pipeline&&r.pipeline.done(e,t)}}function z(t){let e=this.stream;t&&e.destroy(t),e._duplexState&=0x1bfbffff,null!==this.drains&&function(t){for(let e=0;e<t.length;e++)0==--t[e].writes&&(t.shift().resolve(!0),e--)}(this.drains),(e._duplexState&y)==4194304&&(e._duplexState&=0x1fbfffff,(0x1000000&e._duplexState)==0x1000000&&e.emit("drain")),this.updateCallback()}function q(t){t&&this.stream.destroy(t),this.stream._duplexState&=0x1fffffef,!1===this.readAhead&&(256&this.stream._duplexState)==0&&(this.stream._duplexState&=0x1ffdffff),this.updateCallback()}function O(){(32&this.stream._duplexState)==0&&(this.stream._duplexState&=0x1fff7fff,this.update())}function U(){(524288&this.stream._duplexState)==0&&(this.stream._duplexState&=0x1dffffff,this.update())}function M(t){let e=this.stream;t&&e.destroy(t),(4&e._duplexState)==0&&((e._duplexState&f)==0&&(e._duplexState|=64),(e._duplexState&x)==0&&(e._duplexState|=1048576),e.emit("open")),e._duplexState&=0x1ffbffef,null!==e._writableState&&e._writableState.updateCallback(),null!==e._readableState&&e._readableState.updateCallback()}function W(t,e){null!=e&&this.push(e),this._writableState.afterWrite(t)}function j(t){null!==this._readableState&&("data"===t&&(this._duplexState|=133376,this._readableState.updateNextTick()),"readable"===t&&(this._duplexState|=4096,this._readableState.updateNextTick())),null!==this._writableState&&"drain"===t&&(this._duplexState|=0x1000000,this._writableState.updateNextTick())}class D extends r{constructor(t){super(),this._duplexState=0,this._readableState=null,this._writableState=null,t&&(t.open&&(this._open=t.open),t.destroy&&(this._destroy=t.destroy),t.predestroy&&(this._predestroy=t.predestroy),t.signal&&t.signal.addEventListener("abort",$.bind(this))),this.on("newListener",j)}_open(t){t(null)}_destroy(t){t(null)}_predestroy(){}get readable(){return null!==this._readableState||void 0}get writable(){return null!==this._writableState||void 0}get destroyed(){return(8&this._duplexState)!=0}get destroying(){return(14&this._duplexState)!=0}destroy(t){(14&this._duplexState)==0&&(t||(t=n),this._duplexState=(4|this._duplexState)&0x1fefffbf,null!==this._readableState&&(this._readableState.highWaterMark=0,this._readableState.error=t),null!==this._writableState&&(this._writableState.highWaterMark=0,this._writableState.error=t),this._duplexState|=2,this._predestroy(),this._duplexState&=0x1ffffffd,null!==this._readableState&&this._readableState.updateNextTick(),null!==this._writableState&&this._writableState.updateNextTick())}}class A extends D{constructor(t){super(t),this._duplexState|=8519681,this._readableState=new P(this,t),t&&(!1===this._readableState.readAhead&&(this._duplexState&=0x1ffdffff),t.read&&(this._read=t.read),t.eagerOpen&&this._readableState.updateNextTick(),t.encoding&&this.setEncoding(t.encoding))}setEncoding(t){let e=new u(t),i=this._readableState.map||J;return this._readableState.map=function(t){let r=e.push(t);return""===r&&(0!==t.byteLength||e.remaining>0)?null:i(r)},this}_read(t){t(null)}pipe(t,e){return this._readableState.updateNextTick(),this._readableState.pipe(t,e),t}read(){return this._readableState.updateNextTick(),this._readableState.read()}push(t){return this._readableState.updateNextTickIfOpen(),this._readableState.push(t)}unshift(t){return this._readableState.updateNextTickIfOpen(),this._readableState.unshift(t)}resume(){return this._duplexState|=131328,this._readableState.updateNextTick(),this}pause(){return this._duplexState&=!1===this._readableState.readAhead?o:0x1ffffeff,this}static _fromAsyncIterator(t,e){let i;let r=new A({...e,read(e){t.next().then(n).then(e.bind(null,null)).catch(e)},predestroy(){i=t.return()},destroy(t){if(!i)return t(null);i.then(t.bind(null,null)).catch(t)}});return r;function n(t){t.done?r.push(null):r.push(t.value)}}static from(t,e){var i;if(X(i=t)&&i.readable)return t;if(t[L])return this._fromAsyncIterator(t[L](),e);Array.isArray(t)||(t=void 0===t?[]:[t]);let r=0;return new A({...e,read(e){this.push(r===t.length?null:t[r++]),e(null)}})}static isBackpressured(t){return(t._duplexState&m)!=0||t._readableState.buffered>=t._readableState.highWaterMark}static isPaused(t){return(256&t._duplexState)==0}[L](){let t=this,e=null,i=null,r=null;return this.on("error",t=>{e=t}),this.on("readable",function(){null!==i&&s(t.read())}),this.on("close",function(){null!==i&&s(null)}),{[L](){return this},next:()=>new Promise(function(e,n){i=e,r=n;let a=t.read();null!==a?s(a):(8&t._duplexState)!=0&&s(null)}),return:()=>a(null),throw:t=>a(t)};function s(s){null!==r&&(e?r(e):null===s&&(16384&t._duplexState)==0?r(n):i({value:s,done:null===s}),r=i=null)}function a(e){return t.destroy(e),new Promise((i,r)=>{if(8&t._duplexState)return i({value:void 0,done:!0});t.once("close",function(){e?r(e):i({value:void 0,done:!0})})})}}}class C extends D{constructor(t){super(t),this._duplexState|=16385,this._writableState=new E(this,t),t&&(t.writev&&(this._writev=t.writev),t.write&&(this._write=t.write),t.final&&(this._final=t.final),t.eagerOpen&&this._writableState.updateNextTick())}cork(){this._duplexState|=0x10000000}uncork(){this._duplexState&=0xfffffff,this._writableState.updateNextTick()}_writev(t,e){e(null)}_write(t,e){this._writableState.autoBatch(t,e)}_final(t){t(null)}static isBackpressured(t){return(t._duplexState&w)!=0}static drained(t){var e;if(t.destroyed)return Promise.resolve(!1);let i=t._writableState,r=((e=t)._writev!==C.prototype._writev&&e._writev!==H.prototype._writev?Math.min(1,i.queue.length):i.queue.length)+(0x4000000&t._duplexState?1:0);return 0===r?Promise.resolve(!0):(null===i.drains&&(i.drains=[]),new Promise(t=>{i.drains.push({writes:r,resolve:t})}))}write(t){return this._writableState.updateNextTick(),this._writableState.push(t)}end(t){return this._writableState.updateNextTick(),this._writableState.end(t),this}}class H extends A{constructor(t){super(t),this._duplexState=1|131072&this._duplexState,this._writableState=new E(this,t),t&&(t.writev&&(this._writev=t.writev),t.write&&(this._write=t.write),t.final&&(this._final=t.final))}cork(){this._duplexState|=0x10000000}uncork(){this._duplexState&=0xfffffff,this._writableState.updateNextTick()}_writev(t,e){e(null)}_write(t,e){this._writableState.autoBatch(t,e)}_final(t){t(null)}write(t){return this._writableState.updateNextTick(),this._writableState.push(t)}end(t){return this._writableState.updateNextTick(),this._writableState.end(t),this}}class R extends H{constructor(t){super(t),this._transformState=new B(this),t&&(t.transform&&(this._transform=t.transform),t.flush&&(this._flush=t.flush))}_write(t,e){this._readableState.buffered>=this._readableState.highWaterMark?this._transformState.data=t:this._transform(t,this._transformState.afterTransform)}_read(t){if(null!==this._transformState.data){let e=this._transformState.data;this._transformState.data=null,t(null),this._transform(e,this._transformState.afterTransform)}else t(null)}destroy(t){super.destroy(t),null!==this._transformState.data&&(this._transformState.data=null,this._transformState.afterTransform())}_transform(t,e){e(null,t)}_flush(t){t(null)}_final(t){this._transformState.afterFinal=t,this._flush(K.bind(this))}}class G extends R{}function K(t,e){let i=this._transformState.afterFinal;if(t)return i(t);null!=e&&this.push(e),this.push(null),i(null)}function V(t,...e){let i=Array.isArray(t)?[...t,...e]:[t,...e],r=i.length&&"function"==typeof i[i.length-1]?i.pop():null;if(i.length<2)throw Error("Pipeline requires at least 2 streams");let n=i[0],a=null,u=null;for(let t=1;t<i.length;t++)a=i[t],X(n)?n.pipe(a,l):(function(t,e,i,r){t.on("error",r),t.on("close",function(){if(e&&t._readableState&&!t._readableState.ended||i&&t._writableState&&!t._writableState.ended)return r(s)})}(n,!0,t>1,l),n.pipe(a)),n=a;if(r){let t=!1,e=X(a)||!!(a._writableState&&a._writableState.autoDestroy);a.on("error",t=>{null===u&&(u=t)}),a.on("finish",()=>{t=!0,e||r(u)}),e&&a.on("close",()=>r(u||(t?null:s)))}return a;function l(t){if(t&&!u)for(let e of(u=t,i))e.destroy(t)}}function J(t){return t}function Q(t){return!!t._readableState||!!t._writableState}function X(t){return"number"==typeof t._duplexState&&Q(t)}function Y(t){return"object"==typeof t&&null!==t&&"number"==typeof t.byteLength?t.byteLength:1024}function Z(){}function $(){this.destroy(Error("Stream aborted."))}t.exports={pipeline:V,pipelinePromise:function(...t){return new Promise((e,i)=>V(...t,t=>{if(t)return i(t);e()}))},isStream:Q,isStreamx:X,isEnded:function(t){return!!t._readableState&&t._readableState.ended},isFinished:function(t){return!!t._writableState&&t._writableState.ended},isDisturbed:function(t){return(1&t._duplexState)!=1||(0x2008000&t._duplexState)!=0},getStreamError:function(t,e={}){let i=t._readableState&&t._readableState.error||t._writableState&&t._writableState.error;return e.all||i!==n?i:null},Stream:D,Writable:C,Readable:A,Duplex:H,Transform:R,PassThrough:G}},49629:(t,e,i)=>{let r=i(72754),n=i(64686),s=i(29021),a=i(33873),u="win32"===(global.Bare?.platform||process.platform);function l(){return process.umask?process.umask():0}function o(){}function h(t){return t}function f(t){return u?t.replace(/\\/g,"/").replace(/[:?<>|]/g,"_"):t}function d(t,e){return function(i){i.name=i.name.split("/").slice(e).join("/");let r=i.linkname;return r&&("link"===i.type||a.isAbsolute(r))&&(i.linkname=r.split("/").slice(e).join("/")),t(i)}}e.pack=function(t,e){t||(t="."),e||(e={});let i=e.fs||s,u=e.ignore||e.filter||o,c=e.mapStream||h,p=function(t,e,i,r,n,s){n||(n=["."]);let u=n.slice(0);return function(l){if(!u.length)return l(null);let o=u.shift(),h=a.join(i,o);e.call(t,h,function(e,f){return e?l(-1===n.indexOf(o)&&"ENOENT"===e.code?null:e):f.isDirectory()?void t.readdir(h,function(t,e){if(t)return l(t);s&&e.sort();for(let t=0;t<e.length;t++)r(a.join(i,o,e[t]))||u.push(a.join(o,e[t]));l(null,o,f)}):l(null,o,f)})}}(i,e.dereference?i.stat:i.lstat,t,u,e.entries,e.sort),_=!1!==e.strict,m="number"==typeof e.umask?~e.umask:~l(),b=e.pack||r.pack(),x=e.finish||o,y=e.map||o,S="number"==typeof e.dmode?e.dmode:0,g="number"==typeof e.fmode?e.fmode:0;function w(r,s,u){if(b.destroyed)return;if(r)return b.destroy(r);if(!s)return!1!==e.finalize&&b.finalize(),x(b);if(u.isSocket())return k();let l={name:f(s),mode:(u.mode|(u.isDirectory()?S:g))&m,mtime:u.mtime,size:u.size,type:"file",uid:u.uid,gid:u.gid};if(u.isDirectory())return l.size=0,l.type="directory",l=y(l)||l,b.entry(l,k);if(u.isSymbolicLink()){var o;return l.size=0,l.type="symlink",o=l=y(l)||l,void i.readlink(a.join(t,s),function(t,e){if(t)return b.destroy(t);o.linkname=f(e),b.entry(o,k)})}if(l=y(l)||l,!u.isFile())return _?b.destroy(Error("unsupported type for "+s)):k();let h=b.entry(l,k),d=c(i.createReadStream(a.join(t,s),{start:0,end:l.size>0?l.size-1:l.size}),l);d.on("error",function(t){h.destroy(t)}),n(d,h)}function k(t){if(t)return b.destroy(t);p(w)}return e.strip&&(y=d(y,e.strip)),e.readable&&(S|=parseInt(555,8),g|=parseInt(444,8)),e.writable&&(S|=parseInt(333,8),g|=parseInt(222,8)),k(),b},e.extract=function(t,e){t||(t="."),e||(e={}),t=a.resolve(t);let i=e.fs||s,c=e.ignore||e.filter||o,p=e.mapStream||h,_=!1!==e.chown&&!u&&0===(process.getuid?process.getuid():-1),m=e.extract||r.extract(),b=[],x=new Date,y="number"==typeof e.umask?~e.umask:~l(),S=!1!==e.strict,g=e.map||o,w="number"==typeof e.dmode?e.dmode:0,k="number"==typeof e.fmode?e.fmode:0;return e.strip&&(g=d(g,e.strip)),e.readable&&(w|=parseInt(555,8),k|=parseInt(444,8)),e.writable&&(w|=parseInt(333,8),k|=parseInt(222,8)),m.on("entry",function(r,s,l){(r=g(r)||r).name=f(r.name);let o=a.join(t,a.join("/",r.name));if(c(o,r))return s.resume(),l();if("directory"===r.type)return b.push([o,r.mtime]),E(o,{fs:i,own:_,uid:r.uid,gid:r.gid,mode:r.mode},d);let h=a.dirname(o);function d(t){var n,s,a;if(t)return l(t);n=o,s=r,a=function(t){return t?l(t):u?l():void L(o,r,l)},!1===e.utimes?a():"directory"===s.type?i.utimes(n,x,s.mtime,a):"symlink"===s.type?v(n,a):i.utimes(n,x,s.mtime,function(t){if(t)return a(t);v(n,a)})}function m(){let t=i.createWriteStream(o),e=p(s,r);t.on("error",function(t){e.destroy(t)}),n(e,t,function(e){if(e)return l(e);t.on("close",d)})}(function t(e,i,r,n){if(i===r)return n(null,!0);e.lstat(i,function(s,u){return s&&"ENOENT"===s.code?t(e,a.join(i,".."),r,n):s?n(s):void n(null,u.isDirectory())})})(i,h,a.join(t,"."),function(n,f){return n?l(n):f?void E(h,{fs:i,own:_,uid:r.uid,gid:r.gid,mode:493},function(n){if(n)return l(n);switch(r.type){case"file":return m();case"link":return function(){if(u)return l();i.unlink(o,function(){let n=a.join(t,a.join("/",r.linkname));i.link(n,o,function(t){if(t&&"EPERM"===t.code&&e.hardlinkAsFilesFallback)return s=i.createReadStream(n),m();d(t)})})}();case"symlink":return function(){if(u)return l();i.unlink(o,function(){if(!a.resolve(a.dirname(o),r.linkname).startsWith(t))return l(Error(o+" is not a valid symlink"));i.symlink(r.linkname,o,d)})}()}if(S)return l(Error("unsupported type for "+o+" ("+r.type+")"));s.resume(),l()}):l(Error(h+" is not a valid path"))})}),e.finish&&m.on("finish",e.finish),m;function v(t,e){let r;for(;(r=b.length?b[b.length-1]:null)&&t.slice(0,r[0].length)!==r[0];)b.pop();if(!r)return e();i.utimes(r[0],x,r[1],e)}function L(t,e,r){let n="symlink"===e.type,s=n?i.lchmod:i.chmod,a=n?i.lchown:i.chown;if(!s)return r();let u=(e.mode|("directory"===e.type?w:k))&y;function l(e){return e?r(e):s?void s.call(i,t,u,r):r()}a&&_?a.call(i,t,e.uid,e.gid,l):l(null)}function E(t,e,r){i.stat(t,function(n){return n?"ENOENT"!==n.code?r(n):void i.mkdir(t,{mode:e.mode,recursive:!0},function(i,n){if(i)return r(i);L(t,e,r)}):r(null)})}}},53860:(t,e,i)=>{let r=i(5945),n=r.from([117,115,116,97,114,0]),s=r.from([48,48]),a=r.from([117,115,116,97,114,32]),u=r.from([32,0]);function l(t,e,i,r){for(;i<r;i++)if(t[i]===e)return i;return r}function o(t){let e=256;for(let i=0;i<148;i++)e+=t[i];for(let i=156;i<512;i++)e+=t[i];return e}function h(t,e){return(t=t.toString(8)).length>e?"7777777777777777777".slice(0,e)+" ":"0000000000000000000".slice(0,e-t.length)+t+" "}function f(t,e,i){if(128&(t=t.subarray(e,e+i))[e=0])return function(t){let e,i;if(128===t[0])e=!0;else{if(255!==t[0])return null;e=!1}let r=[];for(i=t.length-1;i>0;i--){let n=t[i];e?r.push(n):r.push(255-n)}let n=0,s=r.length;for(i=0;i<s;i++)n+=r[i]*Math.pow(256,i);return e?n:-1*n}(t);{for(var n,s,a;e<t.length&&32===t[e];)e++;let i=(n=l(t,32,e,t.length),s=t.length,a=t.length,"number"!=typeof n?a:(n=~~n)>=s?s:n>=0||(n+=s)>=0?n:0);for(;e<i&&0===t[e];)e++;return i===e?0:parseInt(r.toString(t.subarray(e,i)),8)}}function d(t,e,i,n){return r.toString(t.subarray(e,l(t,0,e,e+i)),n)}function c(t){let e=r.byteLength(t),i=Math.floor(Math.log(e)/Math.log(10))+1;return e+i>=Math.pow(10,i)&&i++,e+i+t}e.decodeLongPath=function(t,e){return d(t,0,t.length,e)},e.encodePax=function(t){let e="";t.name&&(e+=c(" path="+t.name+"\n")),t.linkname&&(e+=c(" linkpath="+t.linkname+"\n"));let i=t.pax;if(i)for(let t in i)e+=c(" "+t+"="+i[t]+"\n");return r.from(e)},e.decodePax=function(t){let e={};for(;t.length;){let i=0;for(;i<t.length&&32!==t[i];)i++;let n=parseInt(r.toString(t.subarray(0,i)),10);if(!n)break;let s=r.toString(t.subarray(i+1,n-1)),a=s.indexOf("=");if(-1===a)break;e[s.slice(0,a)]=s.slice(a+1),t=t.subarray(n)}return e},e.encode=function(t){var e,i,a;let u=r.alloc(512),l=t.name,f="";if(5===t.typeflag&&"/"!==l[l.length-1]&&(l+="/"),r.byteLength(l)!==l.length)return null;for(;r.byteLength(l)>100;){let t=l.indexOf("/");if(-1===t)return null;f+=f?"/"+l.slice(0,t):l.slice(0,t),l=l.slice(t+1)}return r.byteLength(l)>100||r.byteLength(f)>155||t.linkname&&r.byteLength(t.linkname)>100?null:(r.write(u,l),r.write(u,h(4095&t.mode,6),100),r.write(u,h(t.uid,6),108),r.write(u,h(t.gid,6),116),e=t.size,i=u,a=124,e.toString(8).length>11?function(t,e,i){e[i]=128;for(let r=11;r>0;r--)e[i+r]=255&t,t=Math.floor(t/256)}(e,i,124):r.write(i,h(e,11),a),r.write(u,h(t.mtime.getTime()/1e3|0,11),136),u[156]=48+function(t){switch(t){case"file":break;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0}(t.type),t.linkname&&r.write(u,t.linkname,157),r.copy(n,u,257),r.copy(s,u,263),t.uname&&r.write(u,t.uname,265),t.gname&&r.write(u,t.gname,297),r.write(u,h(t.devmajor||0,6),329),r.write(u,h(t.devminor||0,6),337),f&&r.write(u,f,345),r.write(u,h(o(u),6),148),u)},e.decode=function(t,e,i){var s,l;let h=0===t[156]?0:t[156]-48,c=d(t,0,100,e),p=f(t,100,8),_=f(t,108,8),m=f(t,116,8),b=f(t,124,12),x=f(t,136,12),y=function(t){switch(t){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null}(h),S=0===t[157]?null:d(t,157,100,e),g=d(t,265,32),w=d(t,297,32),k=f(t,329,8),v=f(t,337,8),L=o(t);if(256===L)return null;if(L!==f(t,148,8))throw Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(s=t,r.equals(n,s.subarray(257,263)))t[345]&&(c=d(t,345,155,e)+"/"+c);else{if(l=t,r.equals(a,l.subarray(257,263))&&r.equals(u,l.subarray(263,265)));else if(!i)throw Error("Invalid tar header: unknown format.")}return 0===h&&c&&"/"===c[c.length-1]&&(h=5),{name:c,mode:p,uid:_,gid:m,size:b,mtime:new Date(1e3*x),type:y,linkname:S,uname:g,gname:w,devmajor:k,devminor:v,pax:null}}},63535:t=>{t.exports=class{constructor(t){if(!(t>0)||(t-1&t)!=0)throw Error("Max size for a FixedFIFO should be a power of two");this.buffer=Array(t),this.mask=t-1,this.top=0,this.btm=0,this.next=null}clear(){this.top=this.btm=0,this.next=null,this.buffer.fill(void 0)}push(t){return void 0===this.buffer[this.top]&&(this.buffer[this.top]=t,this.top=this.top+1&this.mask,!0)}shift(){let t=this.buffer[this.btm];if(void 0!==t)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,t}peek(){return this.buffer[this.btm]}isEmpty(){return void 0===this.buffer[this.btm]}}},64686:(t,e,i)=>{var r,n=i(15624),s=i(81584);try{r=i(29021)}catch(t){}var a=function(){},u=/^v?\.0/.test(process.version),l=function(t){return"function"==typeof t},o=function(t,e,i,o){o=n(o);var h=!1;t.on("close",function(){h=!0}),s(t,{readable:e,writable:i},function(t){if(t)return o(t);h=!0,o()});var f=!1;return function(e){if(!h&&!f){if(f=!0,u&&r&&(t instanceof(r.ReadStream||a)||t instanceof(r.WriteStream||a))&&l(t.close))return t.close(a);if(t.setHeader&&l(t.abort))return t.abort();if(l(t.destroy))return t.destroy();o(e||Error("stream was destroyed"))}}},h=function(t){t()},f=function(t,e){return t.pipe(e)};t.exports=function(){var t,e=Array.prototype.slice.call(arguments),i=l(e[e.length-1]||a)&&e.pop()||a;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw Error("pump requires two streams per minimum");var r=e.map(function(n,s){var a=s<e.length-1;return o(n,a,s>0,function(e){t||(t=e),e&&r.forEach(h),a||(r.forEach(h),i(t))})});return e.reduce(f)}},71704:(t,e,i)=>{let r=i(5945);t.exports=class{constructor(t){this.encoding=t}get remaining(){return 0}decode(t){return r.toString(t,this.encoding)}flush(){return""}}},72754:(t,e,i)=>{e.extract=i(84271),e.pack=i(80253)},80253:(t,e,i)=>{let{Readable:r,Writable:n,getStreamError:s}=i(36420),a=i(5945),u=i(24571),l=i(53860),o=a.alloc(1024);class h extends n{constructor(t,e,i){super({mapWritable:p,eagerOpen:!0}),this.written=0,this.header=e,this._callback=i,this._linkname=null,this._isLinkname="symlink"===e.type&&!e.linkname,this._isVoid="file"!==e.type&&"contiguous-file"!==e.type,this._finished=!1,this._pack=t,this._openCallback=null,null===this._pack._stream?this._pack._stream=this:this._pack._pending.push(this)}_open(t){this._openCallback=t,this._pack._stream===this&&this._continueOpen()}_continuePack(t){if(null===this._callback)return;let e=this._callback;this._callback=null,e(t)}_continueOpen(){null===this._pack._stream&&(this._pack._stream=this);let t=this._openCallback;if(this._openCallback=null,null!==t){if(this._pack.destroying)return t(Error("pack stream destroyed"));if(this._pack._finalized)return t(Error("pack stream is already finalized"));this._pack._stream=this,this._isLinkname||this._pack._encode(this.header),this._isVoid&&(this._finish(),this._continuePack(null)),t(null)}}_write(t,e){return this._isLinkname?(this._linkname=this._linkname?a.concat([this._linkname,t]):t,e(null)):this._isVoid?t.byteLength>0?e(Error("No body allowed for this entry")):e():(this.written+=t.byteLength,this._pack.push(t))?e():void(this._pack._drain=e)}_finish(){this._finished||(this._finished=!0,this._isLinkname&&(this.header.linkname=this._linkname?a.toString(this._linkname,"utf-8"):"",this._pack._encode(this.header)),c(this._pack,this.header.size),this._pack._done(this))}_final(t){if(this.written!==this.header.size)return t(Error("Size mismatch"));this._finish(),t(null)}_getError(){return s(this)||Error("tar entry destroyed")}_predestroy(){this._pack.destroy(this._getError())}_destroy(t){this._pack._done(this),this._continuePack(this._finished?null:this._getError()),t()}}class f extends r{constructor(t){super(t),this._drain=d,this._finalized=!1,this._finalizing=!1,this._pending=[],this._stream=null}entry(t,e,i){if(this._finalized||this.destroying)throw Error("already finalized or destroyed");"function"==typeof e&&(i=e,e=null),i||(i=d),t.size&&"symlink"!==t.type||(t.size=0),t.type||(t.type=function(t){switch(t&u.S_IFMT){case u.S_IFBLK:return"block-device";case u.S_IFCHR:return"character-device";case u.S_IFDIR:return"directory";case u.S_IFIFO:return"fifo";case u.S_IFLNK:return"symlink"}return"file"}(t.mode)),t.mode||(t.mode="directory"===t.type?493:420),t.uid||(t.uid=0),t.gid||(t.gid=0),t.mtime||(t.mtime=new Date),"string"==typeof e&&(e=a.from(e));let r=new h(this,t,i);return a.isBuffer(e)?(t.size=e.byteLength,r.write(e),r.end()):r._isVoid,r}finalize(){if(this._stream||this._pending.length>0){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(o),this.push(null))}_done(t){t===this._stream&&(this._stream=null,this._finalizing&&this.finalize(),this._pending.length&&this._pending.shift()._continueOpen())}_encode(t){if(!t.pax){let e=l.encode(t);if(e){this.push(e);return}}this._encodePax(t)}_encodePax(t){let e=l.encodePax({name:t.name,linkname:t.linkname,pax:t.pax}),i={name:"PaxHeader",mode:t.mode,uid:t.uid,gid:t.gid,size:e.byteLength,mtime:t.mtime,type:"pax-header",linkname:t.linkname&&"PaxHeader",uname:t.uname,gname:t.gname,devmajor:t.devmajor,devminor:t.devminor};this.push(l.encode(i)),this.push(e),c(this,e.byteLength),i.size=t.size,i.type=t.type,this.push(l.encode(i))}_doDrain(){let t=this._drain;this._drain=d,t()}_predestroy(){let t=s(this);for(this._stream&&this._stream.destroy(t);this._pending.length;){let e=this._pending.shift();e.destroy(t),e._continueOpen()}this._doDrain()}_read(t){this._doDrain(),t()}}function d(){}function c(t,e){(e&=511)&&t.push(o.subarray(0,512-e))}function p(t){return a.isBuffer(t)?t:a.from(t)}t.exports=function(t){return new f(t)}},81584:(t,e,i)=>{var r=i(15624),n=function(){},s=function(t,e,i){if("function"==typeof e)return s(t,null,e);e||(e={}),i=r(i||n);var a=t._writableState,u=t._readableState,l=e.readable||!1!==e.readable&&t.readable,o=e.writable||!1!==e.writable&&t.writable,h=!1,f=function(){t.writable||d()},d=function(){o=!1,l||i.call(t)},c=function(){l=!1,o||i.call(t)},p=function(e){i.call(t,e?Error("exited with error code: "+e):null)},_=function(e){i.call(t,e)},m=function(){process.nextTick(b)},b=function(){if(!h&&(l&&!(u&&u.ended&&!u.destroyed)||o&&!(a&&a.ended&&!a.destroyed)))return i.call(t,Error("premature close"))},x=function(){t.req.on("finish",d)};return t.setHeader&&"function"==typeof t.abort?(t.on("complete",d),t.on("abort",m),t.req?x():t.on("request",x)):o&&!a&&(t.on("end",f),t.on("close",f)),t.stdio&&Array.isArray(t.stdio)&&3===t.stdio.length&&t.on("exit",p),t.on("end",c),t.on("finish",d),!1!==e.error&&t.on("error",_),t.on("close",m),function(){h=!0,t.removeListener("complete",d),t.removeListener("abort",m),t.removeListener("request",x),t.req&&t.req.removeListener("finish",d),t.removeListener("end",f),t.removeListener("close",f),t.removeListener("finish",d),t.removeListener("exit",p),t.removeListener("end",c),t.removeListener("error",_),t.removeListener("close",m)}};t.exports=s},84271:(t,e,i)=>{let{Writable:r,Readable:n,getStreamError:s}=i(36420),a=i(97031),u=i(5945),l=i(53860),o=u.alloc(0);class h{constructor(){this.buffered=0,this.shifted=0,this.queue=new a,this._offset=0}push(t){this.buffered+=t.byteLength,this.queue.push(t)}shiftFirst(t){return 0===this._buffered?null:this._next(t)}shift(t){if(t>this.buffered)return null;if(0===t)return o;let e=this._next(t);if(t===e.byteLength)return e;let i=[e];for(;(t-=e.byteLength)>0;)e=this._next(t),i.push(e);return u.concat(i)}_next(t){let e=this.queue.peek(),i=e.byteLength-this._offset;if(t>=i){let t=this._offset?e.subarray(this._offset,e.byteLength):e;return this.queue.shift(),this._offset=0,this.buffered-=i,this.shifted+=i,t}return this.buffered-=t,this.shifted+=t,e.subarray(this._offset,this._offset+=t)}}class f extends n{constructor(t,e,i){super(),this.header=e,this.offset=i,this._parent=t}_read(t){0===this.header.size&&this.push(null),this._parent._stream===this&&this._parent._update(),t(null)}_predestroy(){this._parent.destroy(s(this))}_detach(){this._parent._stream===this&&(this._parent._stream=null,this._parent._missing=p(this.header.size),this._parent._update())}_destroy(t){this._detach(),t(null)}}class d extends r{constructor(t){super(t),t||(t={}),this._buffer=new h,this._offset=0,this._header=null,this._stream=null,this._missing=0,this._longHeader=!1,this._callback=c,this._locked=!1,this._finished=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null,this._filenameEncoding=t.filenameEncoding||"utf-8",this._allowUnknownFormat=!!t.allowUnknownFormat,this._unlockBound=this._unlock.bind(this)}_unlock(t){if(this._locked=!1,t){this.destroy(t),this._continueWrite(t);return}this._update()}_consumeHeader(){if(this._locked)return!1;this._offset=this._buffer.shifted;try{this._header=l.decode(this._buffer.shift(512),this._filenameEncoding,this._allowUnknownFormat)}catch(t){return this._continueWrite(t),!1}if(!this._header)return!0;switch(this._header.type){case"gnu-long-path":case"gnu-long-link-path":case"pax-global-header":case"pax-header":return this._longHeader=!0,this._missing=this._header.size,!0}return(this._locked=!0,this._applyLongHeaders(),0===this._header.size||"directory"===this._header.type)?this.emit("entry",this._header,this._createStream(),this._unlockBound):(this._stream=this._createStream(),this._missing=this._header.size,this.emit("entry",this._header,this._stream,this._unlockBound)),!0}_applyLongHeaders(){this._gnuLongPath&&(this._header.name=this._gnuLongPath,this._gnuLongPath=null),this._gnuLongLinkPath&&(this._header.linkname=this._gnuLongLinkPath,this._gnuLongLinkPath=null),this._pax&&(this._pax.path&&(this._header.name=this._pax.path),this._pax.linkpath&&(this._header.linkname=this._pax.linkpath),this._pax.size&&(this._header.size=parseInt(this._pax.size,10)),this._header.pax=this._pax,this._pax=null)}_decodeLongHeader(t){switch(this._header.type){case"gnu-long-path":this._gnuLongPath=l.decodeLongPath(t,this._filenameEncoding);break;case"gnu-long-link-path":this._gnuLongLinkPath=l.decodeLongPath(t,this._filenameEncoding);break;case"pax-global-header":this._paxGlobal=l.decodePax(t);break;case"pax-header":this._pax=null===this._paxGlobal?l.decodePax(t):Object.assign({},this._paxGlobal,l.decodePax(t))}}_consumeLongHeader(){this._longHeader=!1,this._missing=p(this._header.size);let t=this._buffer.shift(this._header.size);try{this._decodeLongHeader(t)}catch(t){return this._continueWrite(t),!1}return!0}_consumeStream(){let t=this._buffer.shiftFirst(this._missing);if(null===t)return!1;this._missing-=t.byteLength;let e=this._stream.push(t);return 0===this._missing?(this._stream.push(null),e&&this._stream._detach(),e&&!1===this._locked):e}_createStream(){return new f(this,this._header,this._offset)}_update(){for(;this._buffer.buffered>0&&!this.destroying;){if(this._missing>0){if(null!==this._stream){if(!1===this._consumeStream())return;continue}if(!0===this._longHeader){if(this._missing>this._buffer.buffered)break;if(!1===this._consumeLongHeader())return!1;continue}let t=this._buffer.shiftFirst(this._missing);null!==t&&(this._missing-=t.byteLength);continue}if(this._buffer.buffered<512)break;if(null!==this._stream||!1===this._consumeHeader())return}this._continueWrite(null)}_continueWrite(t){let e=this._callback;this._callback=c,e(t)}_write(t,e){this._callback=e,this._buffer.push(t),this._update()}_final(t){this._finished=0===this._missing&&0===this._buffer.buffered,t(this._finished?null:Error("Unexpected end of data"))}_predestroy(){this._continueWrite(null)}_destroy(t){this._stream&&this._stream.destroy(s(this)),t(null)}[Symbol.asyncIterator](){let t=null,e=null,i=null,r=null,n=null,s=this;return this.on("entry",function(t,s,a){n=a,s.on("error",c),e?(e({value:s,done:!1}),e=i=null):r=s}),this.on("error",e=>{t=e}),this.on("close",function(){a(t),e&&(t?i(t):e({value:void 0,done:!0}),e=i=null)}),{[Symbol.asyncIterator](){return this},next:()=>new Promise(u),return:()=>l(null),throw:t=>l(t)};function a(t){if(!n)return;let e=n;n=null,e(t)}function u(n,u){if(t)return u(t);if(r){n({value:r,done:!1}),r=null;return}e=n,i=u,a(null),s._finished&&e&&(e({value:void 0,done:!0}),e=i=null)}function l(t){return s.destroy(t),a(t),new Promise((e,i)=>{if(s.destroyed)return e({value:void 0,done:!0});s.once("close",function(){t?i(t):e({value:void 0,done:!0})})})}}}function c(){}function p(t){return(t&=511)&&512-t}t.exports=function(t){return new d(t)}},89370:(t,e,i)=>{let r=i(71704),n=i(92794);t.exports=class{constructor(t="utf8"){switch(this.encoding=function(t){switch(t=t.toLowerCase()){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:throw Error("Unknown encoding: "+t)}}(t),this.encoding){case"utf8":this.decoder=new n;break;case"utf16le":case"base64":throw Error("Unsupported encoding: "+this.encoding);default:this.decoder=new r(this.encoding)}}get remaining(){return this.decoder.remaining}push(t){return"string"==typeof t?t:this.decoder.decode(t)}write(t){return this.push(t)}end(t){let e="";return t&&(e=this.push(t)),e+=this.decoder.flush()}}},92794:(t,e,i)=>{let r=i(5945);t.exports=class{constructor(){this.codePoint=0,this.bytesSeen=0,this.bytesNeeded=0,this.lowerBoundary=128,this.upperBoundary=191}get remaining(){return this.bytesSeen}decode(t){if(0===this.bytesNeeded){let e=!0;for(let i=Math.max(0,t.byteLength-4),r=t.byteLength;i<r&&e;i++)e=t[i]<=127;if(e)return r.toString(t,"utf8")}let e="";for(let i=0,r=t.byteLength;i<r;i++){let r=t[i];if(0===this.bytesNeeded){r<=127?e+=String.fromCharCode(r):(this.bytesSeen=1,r>=194&&r<=223?(this.bytesNeeded=2,this.codePoint=31&r):r>=224&&r<=239?(224===r?this.lowerBoundary=160:237===r&&(this.upperBoundary=159),this.bytesNeeded=3,this.codePoint=15&r):r>=240&&r<=244?(240===r&&(this.lowerBoundary=144),244===r&&(this.upperBoundary=143),this.bytesNeeded=4,this.codePoint=7&r):e+="�");continue}if(r<this.lowerBoundary||r>this.upperBoundary){this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0,this.lowerBoundary=128,this.upperBoundary=191,e+="�";continue}this.lowerBoundary=128,this.upperBoundary=191,this.codePoint=this.codePoint<<6|63&r,this.bytesSeen++,this.bytesSeen===this.bytesNeeded&&(e+=String.fromCodePoint(this.codePoint),this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0)}return e}flush(){let t=this.bytesNeeded>0?"�":"";return this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0,this.lowerBoundary=128,this.upperBoundary=191,t}}},93432:t=>{t.exports=function t(e,i){if(e&&i)return t(e)(i);if("function"!=typeof e)throw TypeError("need wrapper function");return Object.keys(e).forEach(function(t){r[t]=e[t]}),r;function r(){for(var t=Array(arguments.length),i=0;i<t.length;i++)t[i]=arguments[i];var r=e.apply(this,t),n=t[t.length-1];return"function"==typeof r&&r!==n&&Object.keys(n).forEach(function(t){r[t]=n[t]}),r}}},97031:(t,e,i)=>{let r=i(63535);t.exports=class{constructor(t){this.hwm=t||16,this.head=new r(this.hwm),this.tail=this.head,this.length=0}clear(){this.head=this.tail,this.head.clear(),this.length=0}push(t){if(this.length++,!this.head.push(t)){let e=this.head;this.head=e.next=new r(2*this.head.buffer.length),this.head.push(t)}}shift(){0!==this.length&&this.length--;let t=this.tail.shift();if(void 0===t&&this.tail.next){let t=this.tail.next;return this.tail.next=null,this.tail=t,this.tail.shift()}return t}peek(){let t=this.tail.peek();return void 0===t&&this.tail.next?this.tail.next.peek():t}isEmpty(){return 0===this.length}}}};