1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-06-07 17:29:31 +00:00
8bitworkshop/gen/index.esm-IVCZ4JDS.js

14 lines
129 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import"./chunk-5XVCUSSZ.js";function ri(t,e,n,r){return new(n||(n=Promise))(function(o,h){function l(a){try{y(r.next(a))}catch(c){h(c)}}function p(a){try{y(r.throw(a))}catch(c){h(c)}}function y(a){a.done?o(a.value):new n(function(c){c(a.value)}).then(l,p)}y((r=r.apply(t,e||[])).next())})}function ii(t,e){function n(a){return function(c){return r([a,c])}}function r(a){if(h)throw new TypeError("Generator is already executing.");for(;o;)try{if(h=1,l&&(p=a[0]&2?l.return:a[0]?l.throw||((p=l.return)&&p.call(l),0):l.next)&&!(p=p.call(l,a[1])).done)return p;switch(l=0,p&&(a=[a[0]&2,p.value]),a[0]){case 0:case 1:p=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(p=o.trys,!(p=0<p.length&&p[p.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!p||a[1]>p[0]&&a[1]<p[3]))o.label=a[1];else if(a[0]===6&&o.label<p[1])o.label=p[1],p=a;else if(p&&o.label<p[2])o.label=p[2],o.ops.push(a);else{p[2]&&o.ops.pop(),o.trys.pop();continue}}a=e.call(t,o)}catch(c){a=[6,c],l=0}finally{h=p=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}var o={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},h,l,p,y;return y={next:n(0),throw:n(1),return:n(2)},typeof Symbol=="function"&&(y[Symbol.iterator]=function(){return this}),y}function Te(t){var e=typeof Symbol=="function"&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function oi(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;t=n.call(t);var r,o=[];try{for(;(e===void 0||0<e--)&&!(r=t.next()).done;)o.push(r.value)}catch(l){var h={error:l}}finally{try{r&&!r.done&&(n=t.return)&&n.call(t)}finally{if(h)throw h.error}}return o}function si(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(oi(arguments[e]));return t}var k=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function D(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function C(t,e){return e={exports:{}},t(e,e.exports),e.exports}var R=C(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.constants={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:64,O_EXCL:128,O_NOCTTY:256,O_TRUNC:512,O_APPEND:1024,O_DIRECTORY:65536,O_NOATIME:262144,O_NOFOLLOW:131072,O_SYNC:1052672,O_DIRECT:16384,O_NONBLOCK:2048,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_FS_SYMLINK_DIR:1,UV_FS_SYMLINK_JUNCTION:2,UV_FS_COPYFILE_EXCL:1,UV_FS_COPYFILE_FICLONE:2,UV_FS_COPYFILE_FICLONE_FORCE:4,COPYFILE_EXCL:1,COPYFILE_FICLONE:2,COPYFILE_FICLONE_FORCE:4}});D(R);var ui=C(function(t,e){e.default=typeof BigInt=="function"?BigInt:function(){throw Error("BigInt is not supported in this environment.")}}),Ft=C(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=R.constants.S_IFMT,r=R.constants.S_IFDIR,o=R.constants.S_IFREG,h=R.constants.S_IFBLK,l=R.constants.S_IFCHR,p=R.constants.S_IFLNK,y=R.constants.S_IFIFO,a=R.constants.S_IFSOCK;t=function(){function c(){}return c.build=function(g,v){v===void 0&&(v=!1);var m=new c,S=g.gid,B=g.atime,ft=g.mtime,At=g.ctime;return v=v?ui.default:function(Wt){return Wt},m.uid=v(g.uid),m.gid=v(S),m.rdev=v(0),m.blksize=v(4096),m.ino=v(g.ino),m.size=v(g.getSize()),m.blocks=v(1),m.atime=B,m.mtime=ft,m.ctime=At,m.birthtime=At,m.atimeMs=v(B.getTime()),m.mtimeMs=v(ft.getTime()),S=v(At.getTime()),m.ctimeMs=S,m.birthtimeMs=S,m.dev=v(0),m.mode=v(g.mode),m.nlink=v(g.nlink),m},c.prototype._checkModeProperty=function(g){return(Number(this.mode)&n)===g},c.prototype.isDirectory=function(){return this._checkModeProperty(r)},c.prototype.isFile=function(){return this._checkModeProperty(o)},c.prototype.isBlockDevice=function(){return this._checkModeProperty(h)},c.prototype.isCharacterDevice=function(){return this._checkModeProperty(l)},c.prototype.isSymbolicLink=function(){return this._checkModeProperty(p)},c.prototype.isFIFO=function(){return this._checkModeProperty(y)},c.prototype.isSocket=function(){return this._checkModeProperty(a)},c}(),e.Stats=t,e.default=t});D(Ft);var wt=typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},Q=[],K=[],hi=typeof Uint8Array!="undefined"?Uint8Array:Array,Ae=!1;function Sn(){Ae=!0;for(var t=0;64>t;++t)Q[t]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[t],K["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(t)]=t;K[45]=62,K[95]=63}function fi(t,e,n){for(var r=[],o=e;o<n;o+=3)e=(t[o]<<16)+(t[o+1]<<8)+t[o+2],r.push(Q[e>>18&63]+Q[e>>12&63]+Q[e>>6&63]+Q[e&63]);return r.join("")}function Rn(t){Ae||Sn();for(var e=t.length,n=e%3,r="",o=[],h=0,l=e-n;h<l;h+=16383)o.push(fi(t,h,h+16383>l?l:h+16383));return n===1?(t=t[e-1],r+=Q[t>>2],r+=Q[t<<4&63],r+="=="):n===2&&(t=(t[e-2]<<8)+t[e-1],r+=Q[t>>10],r+=Q[t>>4&63],r+=Q[t<<2&63],r+="="),o.push(r),o.join("")}function he(t,e,n,r,o){var h=8*o-r-1,l=(1<<h)-1,p=l>>1,y=-7;o=n?o-1:0;var a=n?-1:1,c=t[e+o];for(o+=a,n=c&(1<<-y)-1,c>>=-y,y+=h;0<y;n=256*n+t[e+o],o+=a,y-=8);for(h=n&(1<<-y)-1,n>>=-y,y+=r;0<y;h=256*h+t[e+o],o+=a,y-=8);if(n===0)n=1-p;else{if(n===l)return h?NaN:1/0*(c?-1:1);h+=Math.pow(2,r),n-=p}return(c?-1:1)*h*Math.pow(2,n-r)}function fe(t,e,n,r,o,h){var l,p=8*h-o-1,y=(1<<p)-1,a=y>>1,c=o===23?Math.pow(2,-24)-Math.pow(2,-77):0;h=r?0:h-1;var g=r?1:-1,v=0>e||e===0&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(e=isNaN(e)?1:0,r=y):(r=Math.floor(Math.log(e)/Math.LN2),1>e*(l=Math.pow(2,-r))&&(r--,l*=2),e=1<=r+a?e+c/l:e+c*Math.pow(2,1-a),2<=e*l&&(r++,l/=2),r+a>=y?(e=0,r=y):1<=r+a?(e=(e*l-1)*Math.pow(2,o),r+=a):(e=e*Math.pow(2,a-1)*Math.pow(2,o),r=0));8<=o;t[n+h]=e&255,h+=g,e/=256,o-=8);for(r=r<<o|e,p+=o;0<p;t[n+h]=r&255,h+=g,r/=256,p-=8);t[n+h-g]|=128*v}var li={}.toString,On=Array.isArray||function(t){return li.call(t)=="[object Array]"};_.TYPED_ARRAY_SUPPORT=wt.TYPED_ARRAY_SUPPORT!==void 0?wt.TYPED_ARRAY_SUPPORT:!0;var pi=_.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function ot(t,e){if((_.TYPED_ARRAY_SUPPORT?2147483647:1073741823)<e)throw new RangeError("Invalid typed array length");return _.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=_.prototype):(t===null&&(t=new _(e)),t.length=e),t}function _(t,e,n){if(!(_.TYPED_ARRAY_SUPPORT||this instanceof _))return new _(t,e,n);if(typeof t=="number"){if(typeof e=="string")throw Error("If encoding is specified then the first argument must be a string");return Ne(this,t)}return Tn(this,t,e,n)}_.poolSize=8192;_._augment=function(t){return t.__proto__=_.prototype,t};function Tn(t,e,n,r){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');if(typeof ArrayBuffer!="undefined"&&e instanceof ArrayBuffer){if(e.byteLength,0>n||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return e=n===void 0&&r===void 0?new Uint8Array(e):r===void 0?new Uint8Array(e,n):new Uint8Array(e,n,r),_.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=_.prototype):t=Ie(t,e),t}if(typeof e=="string"){if(r=t,t=n,(typeof t!="string"||t==="")&&(t="utf8"),!_.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');return n=Nn(e,t)|0,r=ot(r,n),e=r.write(e,t),e!==n&&(r=r.slice(0,e)),r}return ci(t,e)}_.from=function(t,e,n){return Tn(null,t,e,n)};_.TYPED_ARRAY_SUPPORT&&(_.prototype.__proto__=Uint8Array.prototype,_.__proto__=Uint8Array);function An(t){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(0>t)throw new RangeError('"size" argument must not be negative')}_.alloc=function(t,e,n){return An(t),t=0>=t?ot(null,t):e!==void 0?typeof n=="string"?ot(null,t).fill(e,n):ot(null,t).fill(e):ot(null,t),t};function Ne(t,e){if(An(e),t=ot(t,0>e?0:Le(e)|0),!_.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}_.allocUnsafe=function(t){return Ne(null,t)};_.allocUnsafeSlow=function(t){return Ne(null,t)};function Ie(t,e){var n=0>e.length?0:Le(e.length)|0;t=ot(t,n);for(var r=0;r<n;r+=1)t[r]=e[r]&255;return t}function ci(t,e){if(b(e)){var n=Le(e.length)|0;return t=ot(t,n),t.length===0||e.copy(t,0,0,n),t}if(e){if(typeof ArrayBuffer!="undefined"&&e.buffer instanceof ArrayBuffer||"length"in e)return(n=typeof e.length!="number")||(n=e.length,n=n!==n),n?ot(t,0):Ie(t,e);if(e.type==="Buffer"&&On(e.data))return Ie(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Le(t){if(t>=(_.TYPED_ARRAY_SUPPORT?2147483647:1073741823))throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+(_.TYPED_ARRAY_SUPPORT?2147483647:1073741823).toString(16)+" bytes");return t|0}_.isBuffer=st;function b(t){return!(t==null||!t._isBuffer)}_.compare=function(t,e){if(!b(t)||!b(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,o=0,h=Math.min(n,r);o<h;++o)if(t[o]!==e[o]){n=t[o],r=e[o];break}return n<r?-1:r<n?1:0};_.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};_.concat=function(t,e){if(!On(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return _.alloc(0);var n;if(e===void 0)for(n=e=0;n<t.length;++n)e+=t[n].length;e=_.allocUnsafe(e);var r=0;for(n=0;n<t.length;++n){var o=t[n];if(!b(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(e,r),r+=o.length}return e};function Nn(t,e){if(b(t))return t.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var n=t.length;if(n===0)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return ae(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Cn(t).length;default:if(r)return ae(t).length;e=(""+e).toLowerCase(),r=!0}}_.byteLength=Nn;function ai(t,e,n){var r=!1;if((e===void 0||0>e)&&(e=0),e>this.length||((n===void 0||n>this.length)&&(n=this.length),0>=n)||(n>>>=0,e>>>=0,n<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":for(t=e,e=n,n=this.length,(!t||0>t)&&(t=0),(!e||0>e||e>n)&&(e=n),r="",n=t;n<e;++n)t=r,r=this[n],r=16>r?"0"+r.toString(16):r.toString(16),r=t+r;return r;case"utf8":case"utf-8":return kn(this,e,n);case"ascii":for(t="",n=Math.min(this.length,n);e<n;++e)t+=String.fromCharCode(this[e]&127);return t;case"latin1":case"binary":for(t="",n=Math.min(this.length,n);e<n;++e)t+=String.fromCharCode(this[e]);return t;case"base64":return e=e===0&&n===this.length?Rn(this):Rn(this.slice(e,n)),e;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":for(e=this.slice(e,n),n="",t=0;t<e.length;t+=2)n+=String.fromCharCode(e[t]+256*e[t+1]);return n;default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}_.prototype._isBuffer=!0;function _t(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}_.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)_t(this,e,e+1);return this};_.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)_t(this,e,e+3),_t(this,e+1,e+2);return this};_.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)_t(this,e,e+7),_t(this,e+1,e+6),_t(this,e+2,e+5),_t(this,e+3,e+4);return this};_.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?kn(this,0,t):ai.apply(this,arguments)};_.prototype.equals=function(t){if(!b(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:_.compare(this,t)===0};_.prototype.inspect=function(){var t="";return 0<this.length&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),50<this.length&&(t+=" ... ")),"<Buffer "+t+">"};_.prototype.compare=function(t,e,n,r,o){if(!b(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),r===void 0&&(r=0),o===void 0&&(o=this.length),0>e||n>t.length||0>r||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,o>>>=0,this===t)return 0;var h=o-r,l=n-e,p=Math.min(h,l);for(r=this.slice(r,o),t=t.slice(e,n),e=0;e<p;++e)if(r[e]!==t[e]){h=r[e],l=t[e];break}return h<l?-1:l<h?1:0};function In(t,e,n,r,o){if(t.length===0)return-1;if(typeof n=="string"?(r=n,n=0):2147483647<n?n=2147483647:-2147483648>n&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:t.length-1),0>n&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(0>n)if(o)n=0;else return-1;if(typeof e=="string"&&(e=_.from(e,r)),b(e))return e.length===0?-1:Ln(t,e,n,r,o);if(typeof e=="number")return e&=255,_.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):Ln(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function Ln(t,e,n,r,o){function h(a,c){return l===1?a[c]:a.readUInt16BE(c*l)}var l=1,p=t.length,y=e.length;if(r!==void 0&&(r=String(r).toLowerCase(),r==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le")){if(2>t.length||2>e.length)return-1;l=2,p/=2,y/=2,n/=2}if(o)for(r=-1;n<p;n++)if(h(t,n)===h(e,r===-1?0:n-r)){if(r===-1&&(r=n),n-r+1===y)return r*l}else r!==-1&&(n-=n-r),r=-1;else for(n+y>p&&(n=p-y);0<=n;n--){for(p=!0,r=0;r<y;r++)if(h(t,n+r)!==h(e,r)){p=!1;break}if(p)return n}return-1}_.prototype.includes=function(t,e,n){return this.indexOf(t,e,n)!==-1};_.prototype.indexOf=function(t,e,n){return In(this,t,e,n,!0)};_.prototype.lastIndexOf=function(t,e,n){return In(this,t,e,n,!1)};_.prototype.write=function(t,e,n,r){if(e===void 0)r="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")r=e,n=this.length,e=0;else if(isFinite(e))e|=0,isFinite(n)?(n|=0,r===void 0&&(r="utf8")):(r=n,n=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-e;if((n===void 0||n>o)&&(n=o),0<t.length&&(0>n||0>e)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");for(r||(r="utf8"),o=!1;;)switch(r){case"hex":t:{if(e=Number(e)||0,r=this.length-e,n?(n=Number(n),n>r&&(n=r)):n=r,r=t.length,r%2!=0)throw new TypeError("Invalid hex string");for(n>r/2&&(n=r/2),r=0;r<n;++r){if(o=parseInt(t.substr(2*r,2),16),isNaN(o)){t=r;break t}this[e+r]=o}t=r}return t;case"utf8":case"utf-8":return Gt(ae(t,this.length-e),this,e,n);case"ascii":return Gt(Bn(t),this,e,n);case"latin1":case"binary":return Gt(Bn(t),this,e,n);case"base64":return Gt(Cn(t),this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":r=t,o=this.length-e;for(var h=[],l=0;l<r.length&&!(0>(o-=2));++l){var p=r.charCodeAt(l);t=p>>8,p%=256,h.push(p),h.push(t)}return Gt(h,this,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}};_.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function kn(t,e,n){n=Math.min(t.length,n);for(var r=[];e<n;){var o=t[e],h=null,l=239<o?4:223<o?3:191<o?2:1;if(e+l<=n)switch(l){case 1:128>o&&(h=o);break;case 2:var p=t[e+1];(p&192)==128&&(o=(o&31)<<6|p&63,127<o&&(h=o));break;case 3:p=t[e+1];var y=t[e+2];(p&192)==128&&(y&192)==128&&(o=(o&15)<<12|(p&63)<<6|y&63,2047<o&&(55296>o||57343<o)&&(h=o));break;case 4:p=t[e+1],y=t[e+2];var a=t[e+3];(p&192)==128&&(y&192)==128&&(a&192)==128&&(o=(o&15)<<18|(p&63)<<12|(y&63)<<6|a&63,65535<o&&1114112>o&&(h=o))}h===null?(h=65533,l=1):65535<h&&(h-=65536,r.push(h>>>10&1023|55296),h=56320|h&1023),r.push(h),e+=l}if(t=r.length,t<=Fn)r=String.fromCharCode.apply(String,r);else{for(n="",e=0;e<t;)n+=String.fromCharCode.apply(String,r.slice(e,e+=Fn));r=n}return r}var Fn=4096;_.prototype.slice=function(t,e){var n=this.length;if(t=~~t,e=e===void 0?n:~~e,0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),e<t&&(e=t),_.TYPED_ARRAY_SUPPORT)e=this.subarray(t,e),e.__proto__=_.prototype;else{n=e-t,e=new _(n,void 0);for(var r=0;r<n;++r)e[r]=this[r+t]}return e};function F(t,e,n){if(t%1!=0||0>t)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}_.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||F(t,e,this.length),n=this[t];for(var r=1,o=0;++o<e&&(r*=256);)n+=this[t+o]*r;return n};_.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||F(t,e,this.length),n=this[t+--e];for(var r=1;0<e&&(r*=256);)n+=this[t+--e]*r;return n};_.prototype.readUInt8=function(t,e){return e||F(t,1,this.length),this[t]};_.prototype.readUInt16LE=function(t,e){return e||F(t,2,this.length),this[t]|this[t+1]<<8};_.prototype.readUInt16BE=function(t,e){return e||F(t,2,this.length),this[t]<<8|this[t+1]};_.prototype.readUInt32LE=function(t,e){return e||F(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]};_.prototype.readUInt32BE=function(t,e){return e||F(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])};_.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||F(t,e,this.length),n=this[t];for(var r=1,o=0;++o<e&&(r*=256);)n+=this[t+o]*r;return n>=128*r&&(n-=Math.pow(2,8*e)),n};_.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||F(t,e,this.length),n=e;for(var r=1,o=this[t+--n];0<n&&(r*=256);)o+=this[t+--n]*r;return o>=128*r&&(o-=Math.pow(2,8*e)),o};_.prototype.readInt8=function(t,e){return e||F(t,1,this.length),this[t]&128?-1*(255-this[t]+1):this[t]};_.prototype.readInt16LE=function(t,e){return e||F(t,2,this.length),t=this[t]|this[t+1]<<8,t&32768?t|4294901760:t};_.prototype.readInt16BE=function(t,e){return e||F(t,2,this.length),t=this[t+1]|this[t]<<8,t&32768?t|4294901760:t};_.prototype.readInt32LE=function(t,e){return e||F(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};_.prototype.readInt32BE=function(t,e){return e||F(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};_.prototype.readFloatLE=function(t,e){return e||F(t,4,this.length),he(this,t,!0,23,4)};_.prototype.readFloatBE=function(t,e){return e||F(t,4,this.length),he(this,t,!1,23,4)};_.prototype.readDoubleLE=function(t,e){return e||F(t,8,this.length),he(this,t,!0,52,8)};_.prototype.readDoubleBE=function(t,e){return e||F(t,8,this.length),he(this,t,!1,52,8)};function M(t,e,n,r,o,h){if(!b(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<h)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}_.prototype.writeUIntLE=function(t,e,n,r){t=+t,e|=0,n|=0,r||M(this,t,e,n,Math.pow(2,8*n)-1,0),r=1;var o=0;for(this[e]=t&255;++o<n&&(r*=256);)this[e+o]=t/r&255;return e+n};_.prototype.writeUIntBE=function(t,e,n,r){t=+t,e|=0,n|=0,r||M(this,t,e,n,Math.pow(2,8*n)-1,0),r=n-1;var o=1;for(this[e+r]=t&255;0<=--r&&(o*=256);)this[e+r]=t/o&255;return e+n};_.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,1,255,0),_.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};function le(t,e,n,r){0>e&&(e=65535+e+1);for(var o=0,h=Math.min(t.length-n,2);o<h;++o)t[n+o]=(e&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}_.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,65535,0),_.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):le(this,t,e,!0),e+2};_.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,65535,0),_.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):le(this,t,e,!1),e+2};function pe(t,e,n,r){0>e&&(e=4294967295+e+1);for(var o=0,h=Math.min(t.length-n,4);o<h;++o)t[n+o]=e>>>8*(r?o:3-o)&255}_.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,4294967295,0),_.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):pe(this,t,e,!0),e+4};_.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,4294967295,0),_.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):pe(this,t,e,!1),e+4};_.prototype.writeIntLE=function(t,e,n,r){t=+t,e|=0,r||(r=Math.pow(2,8*n-1),M(this,t,e,n,r-1,-r)),r=0;var o=1,h=0;for(this[e]=t&255;++r<n&&(o*=256);)0>t&&h===0&&this[e+r-1]!==0&&(h=1),this[e+r]=(t/o>>0)-h&255;return e+n};_.prototype.writeIntBE=function(t,e,n,r){t=+t,e|=0,r||(r=Math.pow(2,8*n-1),M(this,t,e,n,r-1,-r)),r=n-1;var o=1,h=0;for(this[e+r]=t&255;0<=--r&&(o*=256);)0>t&&h===0&&this[e+r+1]!==0&&(h=1),this[e+r]=(t/o>>0)-h&255;return e+n};_.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,1,127,-128),_.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[e]=t&255,e+1};_.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,32767,-32768),_.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):le(this,t,e,!0),e+2};_.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,32767,-32768),_.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):le(this,t,e,!1),e+2};_.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,2147483647,-2147483648),_.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):pe(this,t,e,!0),e+4};_.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),_.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):pe(this,t,e,!1),e+4};function ce(t,e,n,r){if(n+r>t.length)throw new RangeError("Index out of range");if(0>n)throw new RangeError("Index out of range")}_.prototype.writeFloatLE=function(t,e,n){return n||ce(this,t,e,4),fe(this,t,e,!0,23,4),e+4};_.prototype.writeFloatBE=function(t,e,n){return n||ce(this,t,e,4),fe(this,t,e,!1,23,4),e+4};_.prototype.writeDoubleLE=function(t,e,n){return n||ce(this,t,e,8),fe(this,t,e,!0,52,8),e+8};_.prototype.writeDoubleBE=function(t,e,n){return n||ce(this,t,e,8),fe(this,t,e,!1,52,8),e+8};_.prototype.copy=function(t,e,n,r){if(n||(n=0),r||r===0||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),0<r&&r<n&&(r=n),r===n||t.length===0||this.length===0)return 0;if(0>e)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var o=r-n;if(this===t&&n<e&&e<r)for(r=o-1;0<=r;--r)t[r+e]=this[r+n];else if(1e3>o||!_.TYPED_ARRAY_SUPPORT)for(r=0;r<o;++r)t[r+e]=this[r+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o};_.prototype.fill=function(t,e,n,r){if(typeof t=="string"){if(typeof e=="string"?(r=e,e=0,n=this.length):typeof n=="string"&&(r=n,n=this.length),t.length===1){var o=t.charCodeAt(0);256>o&&(t=o)}if(r!==void 0&&typeof r!="string")throw new TypeError("encoding must be a string");if(typeof r=="string"&&!_.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else typeof t=="number"&&(t&=255);if(0>e||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;if(e>>>=0,n=n===void 0?this.length:n>>>0,t||(t=0),typeof t=="number")for(r=e;r<n;++r)this[r]=t;else for(t=b(t)?t:ae(new _(t,r).toString()),o=t.length,r=0;r<n-e;++r)this[r+e]=t[r%o];return this};var di=/[^+\/0-9A-Za-z-_]/g;function ae(t,e){e=e||1/0;for(var n,r=t.length,o=null,h=[],l=0;l<r;++l){if(n=t.charCodeAt(l),55295<n&&57344>n){if(!o){if(56319<n){-1<(e-=3)&&h.push(239,191,189);continue}else if(l+1===r){-1<(e-=3)&&h.push(239,191,189);continue}o=n;continue}if(56320>n){-1<(e-=3)&&h.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&-1<(e-=3)&&h.push(239,191,189);if(o=null,128>n){if(0>--e)break;h.push(n)}else if(2048>n){if(0>(e-=2))break;h.push(n>>6|192,n&63|128)}else if(65536>n){if(0>(e-=3))break;h.push(n>>12|224,n>>6&63|128,n&63|128)}else if(1114112>n){if(0>(e-=4))break;h.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw Error("Invalid code point")}return h}function Bn(t){for(var e=[],n=0;n<t.length;++n)e.push(t.charCodeAt(n)&255);return e}function Cn(t){if(t=(t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")).replace(di,""),2>t.length)t="";else for(;t.length%4!=0;)t+="=";Ae||Sn();var e=t.length;if(0<e%4)throw Error("Invalid string. Length must be a multiple of 4");var n=t[e-2]==="="?2:t[e-1]==="="?1:0,r=new hi(3*e/4-n),o=0<n?e-4:e,h=0;for(e=0;e<o;e+=4){var l=K[t.charCodeAt(e)]<<18|K[t.charCodeAt(e+1)]<<12|K[t.charCodeAt(e+2)]<<6|K[t.charCodeAt(e+3)];r[h++]=l>>16&255,r[h++]=l>>8&255,r[h++]=l&255}return n===2?(l=K[t.charCodeAt(e)]<<2|K[t.charCodeAt(e+1)]>>4,r[h++]=l&255):n===1&&(l=K[t.charCodeAt(e)]<<10|K[t.charCodeAt(e+1)]<<4|K[t.charCodeAt(e+2)]>>2,r[h++]=l>>8&255,r[h++]=l&255),r}function Gt(t,e,n,r){for(var o=0;o<r&&!(o+n>=e.length||o>=t.length);++o)e[o+n]=t[o];return o}function st(t){return t!=null&&(!!t._isBuffer||Pn(t)||typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&Pn(t.slice(0,0)))}function Pn(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}var Ht=Object.freeze({__proto__:null,INSPECT_MAX_BYTES:50,kMaxLength:pi,Buffer:_,SlowBuffer:function(t){return+t!=t&&(t=0),_.alloc(+t)},isBuffer:st}),A=C(function(t,e){function n(o){for(var h=[],l=1;l<arguments.length;l++)h[l-1]=arguments[l];return new(Ht.Buffer.bind.apply(Ht.Buffer,r([void 0,o],h)))}var r=k&&k.__spreadArrays||function(){for(var o=0,h=0,l=arguments.length;h<l;h++)o+=arguments[h].length;o=Array(o);var p=0;for(h=0;h<l;h++)for(var y=arguments[h],a=0,c=y.length;a<c;a++,p++)o[p]=y[a];return o};Object.defineProperty(e,"__esModule",{value:!0}),e.Buffer=Ht.Buffer,e.bufferAllocUnsafe=Ht.Buffer.allocUnsafe||n,e.bufferFrom=Ht.Buffer.from||n});D(A);function Dn(){throw Error("setTimeout has not been defined")}function xn(){throw Error("clearTimeout has not been defined")}var ct=Dn,at=xn;typeof wt.setTimeout=="function"&&(ct=setTimeout);typeof wt.clearTimeout=="function"&&(at=clearTimeout);function Mn(t){if(ct===setTimeout)return setTimeout(t,0);if((ct===Dn||!ct)&&setTimeout)return ct=setTimeout,setTimeout(t,0);try{return ct(t,0)}catch(e){try{return ct.call(null,t,0)}catch(n){return ct.call(this,t,0)}}}function yi(t){if(at===clearTimeout)return clearTimeout(t);if((at===xn||!at)&&clearTimeout)return at=clearTimeout,clearTimeout(t);try{return at(t)}catch(e){try{return at.call(null,t)}catch(n){return at.call(this,t)}}}var ut=[],Bt=!1,Et,de=-1;function gi(){Bt&&Et&&(Bt=!1,Et.length?ut=Et.concat(ut):de=-1,ut.length&&Un())}function Un(){if(!Bt){var t=Mn(gi);Bt=!0;for(var e=ut.length;e;){for(Et=ut,ut=[];++de<e;)Et&&Et[de].run();de=-1,e=ut.length}Et=null,Bt=!1,yi(t)}}function W(t){var e=Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];ut.push(new jn(t,e)),ut.length!==1||Bt||Mn(Un)}function jn(t,e){this.fun=t,this.array=e}jn.prototype.run=function(){this.fun.apply(null,this.array)};function St(){}var Ct=wt.performance||{},mi=Ct.now||Ct.mozNow||Ct.msNow||Ct.oNow||Ct.webkitNow||function(){return new Date().getTime()},vi=new Date,Pt={nextTick:W,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:St,addListener:St,once:St,off:St,removeListener:St,removeAllListeners:St,emit:St,binding:function(){throw Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(){throw Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var e=.001*mi.call(Ct),n=Math.floor(e);return e=Math.floor(e%1*1e9),t&&(n-=t[0],e-=t[1],0>e&&(n--,e+=1e9)),[n,e]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-vi)/1e3}},dt=typeof Object.create=="function"?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){function n(){}t.super_=e,n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t},wi=/%[sdj%]/g;function ke(t){if(!Rt(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(tt(arguments[n]));return e.join(" ")}n=1;var r=arguments,o=r.length;e=String(t).replace(wi,function(l){if(l==="%%")return"%";if(n>=o)return l;switch(l){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(p){return"[Circular]"}default:return l}});for(var h=r[n];n<o;h=r[++n])e=h!==null&&yt(h)?e+(" "+tt(h)):e+(" "+h);return e}function Fe(t,e){if(ht(wt.process))return function(){return Fe(t,e).apply(this,arguments)};if(Pt.noDeprecation===!0)return t;var n=!1;return function(){if(!n){if(Pt.throwDeprecation)throw Error(e);Pt.traceDeprecation?console.trace(e):console.error(e),n=!0}return t.apply(this,arguments)}}var ye={},Be;function Yn(t){return ht(Be)&&(Be=Pt.env.NODE_DEBUG||""),t=t.toUpperCase(),ye[t]||(new RegExp("\\b"+t+"\\b","i").test(Be)?ye[t]=function(){var e=ke.apply(null,arguments);console.error("%s %d: %s",t,0,e)}:ye[t]=function(){}),ye[t]}function tt(t,e){var n={seen:[],stylize:Ei};return 3<=arguments.length&&(n.depth=arguments[2]),4<=arguments.length&&(n.colors=arguments[3]),De(e)?n.showHidden=e:e&&qn(n,e),ht(n.showHidden)&&(n.showHidden=!1),ht(n.depth)&&(n.depth=2),ht(n.colors)&&(n.colors=!1),ht(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=_i),ge(n,t,n.depth)}tt.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};tt.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function _i(t,e){return(e=tt.styles[e])?"["+tt.colors[e][0]+"m"+t+"["+tt.colors[e][1]+"m":t}function Ei(t){return t}function Si(t){var e={};return t.forEach(function(n){e[n]=!0}),e}function ge(t,e,n){if(t.customInspect&&e&&xt(e.inspect)&&e.inspect!==tt&&(!e.constructor||e.constructor.prototype!==e)){var r=e.inspect(n,t);return Rt(r)||(r=ge(t,r,n)),r}if(r=Ri(t,e))return r;var o=Object.keys(e),h=Si(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),Xt(e)&&(0<=o.indexOf("message")||0<=o.indexOf("description")))return Ce(e);if(o.length===0){if(xt(e))return t.stylize("[Function"+(e.name?": "+e.name:"")+"]","special");if(Dt(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(Jt(e))return t.stylize(Date.prototype.toString.call(e),"date");if(Xt(e))return Ce(e)}r="";var l=!1,p=["{","}"];return Wn(e)&&(l=!0,p=["[","]"]),xt(e)&&(r=" [Function"+(e.name?": "+e.name:"")+"]"),Dt(e)&&(r=" "+RegExp.prototype.toString.call(e)),Jt(e)&&(r=" "+Date.prototype.toUTCString.call(e)),Xt(e)&&(r=" "+Ce(e)),o.length===0&&(!l||e.length==0)?p[0]+r+p[1]:0>n?Dt(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),o=l?Oi(t,e,n,h,o):o.map(function(y){return Pe(t,e,n,h,y,l)}),t.seen.pop(),Ti(o,r,p))}function Ri(t,e){if(ht(e))return t.stylize("undefined","undefined");if(Rt(e))return e="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'",t.stylize(e,"string");if(Vn(e))return t.stylize(""+e,"number");if(De(e))return t.stylize(""+e,"boolean");if(e===null)return t.stylize("null","null")}function Ce(t){return"["+Error.prototype.toString.call(t)+"]"}function Oi(t,e,n,r,o){for(var h=[],l=0,p=e.length;l<p;++l)Object.prototype.hasOwnProperty.call(e,String(l))?h.push(Pe(t,e,n,r,String(l),!0)):h.push("");return o.forEach(function(y){y.match(/^\d+$/)||h.push(Pe(t,e,n,r,y,!0))}),h}function Pe(t,e,n,r,o,h){var l,p;if(e=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]},e.get?p=e.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):e.set&&(p=t.stylize("[Setter]","special")),Object.prototype.hasOwnProperty.call(r,o)||(l="["+o+"]"),p||(0>t.seen.indexOf(e.value)?(p=n===null?ge(t,e.value,null):ge(t,e.value,n-1),-1<p.indexOf(`
`)&&(p=h?p.split(`
`).map(function(y){return" "+y}).join(`
`).substr(2):`
`+p.split(`
`).map(function(y){return" "+y}).join(`
`))):p=t.stylize("[Circular]","special")),ht(l)){if(h&&o.match(/^\d+$/))return p;l=JSON.stringify(""+o),l.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(l=l.substr(1,l.length-2),l=t.stylize(l,"name")):(l=l.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),l=t.stylize(l,"string"))}return l+": "+p}function Ti(t,e,n){return 60<t.reduce(function(r,o){return o.indexOf(`
`),r+o.replace(/\u001b\[\d\d?m/g,"").length+1},0)?n[0]+(e===""?"":e+`
`)+" "+t.join(`,
`)+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}function Wn(t){return Array.isArray(t)}function De(t){return typeof t=="boolean"}function Vn(t){return typeof t=="number"}function Rt(t){return typeof t=="string"}function ht(t){return t===void 0}function Dt(t){return yt(t)&&Object.prototype.toString.call(t)==="[object RegExp]"}function yt(t){return typeof t=="object"&&t!==null}function Jt(t){return yt(t)&&Object.prototype.toString.call(t)==="[object Date]"}function Xt(t){return yt(t)&&(Object.prototype.toString.call(t)==="[object Error]"||t instanceof Error)}function xt(t){return typeof t=="function"}function xe(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t=="undefined"}function Me(t){return 10>t?"0"+t.toString(10):t.toString(10)}var Ai="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");function Ni(){var t=new Date,e=[Me(t.getHours()),Me(t.getMinutes()),Me(t.getSeconds())].join(":");return[t.getDate(),Ai[t.getMonth()],e].join(" ")}function qn(t,e){if(!e||!yt(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}var Zt={inherits:dt,_extend:qn,log:function(){console.log("%s - %s",Ni(),ke.apply(null,arguments))},isBuffer:function(t){return st(t)},isPrimitive:xe,isFunction:xt,isError:Xt,isDate:Jt,isObject:yt,isRegExp:Dt,isUndefined:ht,isSymbol:function(t){return typeof t=="symbol"},isString:Rt,isNumber:Vn,isNullOrUndefined:function(t){return t==null},isNull:function(t){return t===null},isBoolean:De,isArray:Wn,inspect:tt,deprecate:Fe,format:ke,debuglog:Yn};function zn(t,e){if(t===e)return 0;for(var n=t.length,r=e.length,o=0,h=Math.min(n,r);o<h;++o)if(t[o]!==e[o]){n=t[o],r=e[o];break}return n<r?-1:r<n?1:0}var Ii=Object.prototype.hasOwnProperty,Kn=Object.keys||function(t){var e=[],n;for(n in t)Ii.call(t,n)&&e.push(n);return e},Gn=Array.prototype.slice,Ue;function Hn(){return typeof Ue!="undefined"?Ue:Ue=function(){return function(){}.name==="foo"}()}function Jn(t){return st(t)||typeof wt.ArrayBuffer!="function"?!1:typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t?!!(t instanceof DataView||t.buffer&&t.buffer instanceof ArrayBuffer):!1}function N(t,e){t||U(t,!0,e,"==",Ye)}var Li=/\s*function\s+([^\(\s]*)\s*/;function Xn(t){if(xt(t))return Hn()?t.name:(t=t.toString().match(Li))&&t[1]}N.AssertionError=je;function je(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=Zn($n(this.actual),128)+" "+this.operator+" "+Zn($n(this.expected),128),this.generatedMessage=!0);var e=t.stackStartFunction||U;Error.captureStackTrace?Error.captureStackTrace(this,e):(t=Error(),t.stack&&(t=t.stack,e=Xn(e),e=t.indexOf(`
`+e),0<=e&&(e=t.indexOf(`
`,e+1),t=t.substring(e+1)),this.stack=t))}dt(je,Error);function Zn(t,e){return typeof t=="string"?t.length<e?t:t.slice(0,e):t}function $n(t){return Hn()||!xt(t)?tt(t):(t=Xn(t),"[Function"+(t?": "+t:"")+"]")}function U(t,e,n,r,o){throw new je({message:n,actual:t,expected:e,operator:r,stackStartFunction:o})}N.fail=U;function Ye(t,e){t||U(t,!0,e,"==",Ye)}N.ok=Ye;N.equal=Qn;function Qn(t,e,n){t!=e&&U(t,e,n,"==",Qn)}N.notEqual=bn;function bn(t,e,n){t==e&&U(t,e,n,"!=",bn)}N.deepEqual=tr;function tr(t,e,n){Mt(t,e,!1)||U(t,e,n,"deepEqual",tr)}N.deepStrictEqual=er;function er(t,e,n){Mt(t,e,!0)||U(t,e,n,"deepStrictEqual",er)}function Mt(t,e,n,r){if(t===e)return!0;if(st(t)&&st(e))return zn(t,e)===0;if(Jt(t)&&Jt(e))return t.getTime()===e.getTime();if(Dt(t)&&Dt(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(t!==null&&typeof t=="object"||e!==null&&typeof e=="object"){if(!Jn(t)||!Jn(e)||Object.prototype.toString.call(t)!==Object.prototype.toString.call(e)||t instanceof Float32Array||t instanceof Float64Array){if(st(t)!==st(e))return!1;r=r||{actual:[],expected:[]};var o=r.actual.indexOf(t);return o!==-1&&o===r.expected.indexOf(e)?!0:(r.actual.push(t),r.expected.push(e),ki(t,e,n,r))}return zn(new Uint8Array(t.buffer),new Uint8Array(e.buffer))===0}return n?t===e:t==e}function nr(t){return Object.prototype.toString.call(t)=="[object Arguments]"}function ki(t,e,n,r){if(t==null||e===null||e===void 0)return!1;if(xe(t)||xe(e))return t===e;if(n&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var o=nr(t),h=nr(e);if(o&&!h||!o&&h)return!1;if(o)return t=Gn.call(t),e=Gn.call(e),Mt(t,e,n);o=Kn(t);var l=Kn(e);if(o.length!==l.length)return!1;for(o.sort(),l.sort(),h=o.length-1;0<=h;h--)if(o[h]!==l[h])return!1;for(h=o.length-1;0<=h;h--)if(l=o[h],!Mt(t[l],e[l],n,r))return!1;return!0}N.notDeepEqual=rr;function rr(t,e,n){Mt(t,e,!1)&&U(t,e,n,"notDeepEqual",rr)}N.notDeepStrictEqual=ir;function ir(t,e,n){Mt(t,e,!0)&&U(t,e,n,"notDeepStrictEqual",ir)}N.strictEqual=or;function or(t,e,n){t!==e&&U(t,e,n,"===",or)}N.notStrictEqual=sr;function sr(t,e,n){t===e&&U(t,e,n,"!==",sr)}function ur(t,e){if(!t||!e)return!1;if(Object.prototype.toString.call(e)=="[object RegExp]")return e.test(t);try{if(t instanceof e)return!0}catch(n){}return Error.isPrototypeOf(e)?!1:e.call({},t)===!0}function hr(t,e,n,r){if(typeof e!="function")throw new TypeError('"block" argument must be a function');typeof n=="string"&&(r=n,n=null);try{e()}catch(p){var o=p}e=o,r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),t&&!e&&U(e,n,"Missing expected exception"+r),o=typeof r=="string";var h=!t&&Xt(e),l=!t&&e&&!n;if((h&&o&&ur(e,n)||l)&&U(e,n,"Got unwanted exception"+r),t&&e&&n&&!ur(e,n)||!t&&e)throw e}N.throws=Fi;function Fi(t,e,n){hr(!0,t,e,n)}N.doesNotThrow=Bi;function Bi(t,e,n){hr(!1,t,e,n)}N.ifError=Ci;function Ci(t){if(t)throw t}var $t=C(function(t,e){function n(a){return function(c){function g(v){for(var m=[],S=1;S<arguments.length;S++)m[S-1]=arguments[S];return m=c.call(this,r(v,m))||this,m.code=v,m[p]=v,m.name=c.prototype.name+" ["+m[p]+"]",m}return l(g,c),g}(a)}function r(a,c){N.strictEqual(typeof a,"string");var g=y[a];if(N(g,"An invalid error message key was used: "+a+"."),typeof g=="function")a=g;else{if(a=Zt.format,c===void 0||c.length===0)return g;c.unshift(g)}return String(a.apply(null,c))}function o(a,c){y[a]=typeof c=="function"?c:String(c)}function h(a,c){if(N(a,"expected is required"),N(typeof c=="string","thing is required"),Array.isArray(a)){var g=a.length;return N(0<g,"At least one expected value needs to be specified"),a=a.map(function(v){return String(v)}),2<g?"one of "+c+" "+a.slice(0,g-1).join(", ")+", or "+a[g-1]:g===2?"one of "+c+" "+a[0]+" or "+a[1]:"of "+c+" "+a[0]}return"of "+c+" "+String(a)}var l=k&&k.__extends||function(){function a(c,g){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,m){v.__proto__=m}||function(v,m){for(var S in m)m.hasOwnProperty(S)&&(v[S]=m[S])},a(c,g)}return function(c,g){function v(){this.constructor=c}a(c,g),c.prototype=g===null?Object.create(g):(v.prototype=g.prototype,new v)}}();Object.defineProperty(e,"__esModule",{value:!0});var p=typeof Symbol=="undefined"?"_kCode":Symbol("code"),y={};t=function(a){function c(g){if(typeof g!="object"||g===null)throw new e.TypeError("ERR_INVALID_ARG_TYPE","options","object");var v=g.message?a.call(this,g.message)||this:a.call(this,Zt.inspect(g.actual).slice(0,128)+" "+(g.operator+" "+Zt.inspect(g.expected).slice(0,128)))||this;return v.generatedMessage=!g.message,v.name="AssertionError [ERR_ASSERTION]",v.code="ERR_ASSERTION",v.actual=g.actual,v.expected=g.expected,v.operator=g.operator,e.Error.captureStackTrace(v,g.stackStartFunction),v}return l(c,a),c}(k.Error),e.AssertionError=t,e.message=r,e.E=o,e.Error=n(k.Error),e.TypeError=n(k.TypeError),e.RangeError=n(k.RangeError),o("ERR_ARG_NOT_ITERABLE","%s must be iterable"),o("ERR_ASSERTION","%s"),o("ERR_BUFFER_OUT_OF_BOUNDS",function(a,c){return c?"Attempt to write outside buffer bounds":'"'+a+'" is outside of buffer bounds'}),o("ERR_CHILD_CLOSED_BEFORE_REPLY","Child closed before reply received"),o("ERR_CONSOLE_WRITABLE_STREAM","Console expects a writable stream instance for %s"),o("ERR_CPU_USAGE","Unable to obtain cpu usage %s"),o("ERR_DNS_SET_SERVERS_FAILED",function(a,c){return'c-ares failed to set servers: "'+a+'" ['+c+"]"}),o("ERR_FALSY_VALUE_REJECTION","Promise was rejected with falsy value"),o("ERR_ENCODING_NOT_SUPPORTED",function(a){return'The "'+a+'" encoding is not supported'}),o("ERR_ENCODING_INVALID_ENCODED_DATA",function(a){return"The encoded data was not valid for encoding "+a}),o("ERR_HTTP_HEADERS_SENT","Cannot render headers after they are sent to the client"),o("ERR_HTTP_INVALID_STATUS_CODE","Invalid status code: %s"),o("ERR_HTTP_TRAILER_INVALID","Trailers are invalid with this transfer encoding"),o("ERR_INDEX_OUT_OF_RANGE","Index out of range"),o("ERR_INVALID_ARG_TYPE",function(a,c,g){if(N(a,"name is required"),c.includes("not ")){var v="must not be";c=c.split("not ")[1]}else v="must be";if(Array.isArray(a))v="The "+a.map(function(S){return'"'+S+'"'}).join(", ")+" arguments "+v+" "+h(c,"type");else if(a.includes(" argument"))v="The "+a+" "+v+" "+h(c,"type");else{var m=a.includes(".")?"property":"argument";v='The "'+a+'" '+m+" "+v+" "+h(c,"type")}return 3<=arguments.length&&(v+=". Received type "+(g!==null?typeof g:"null")),v}),o("ERR_INVALID_ARRAY_LENGTH",function(a,c,g){return N.strictEqual(typeof g,"number"),'The array "'+a+'" (length '+g+") must be of length "+c+"."}),o("ERR_INVALID_BUFFER_SIZE","Buffer size must be a multiple of %s"),o("ERR_INVALID_CALLBACK","Callback must be a function"),o("ERR_INVALID_CHAR","Invalid character in %s"),o("ERR_INVALID_CURSOR_POS","Cannot set cursor row without setting its column"),o("ERR_INVALID_FD",'"fd" must be a positive integer: %s'),o("ERR_INVALID_FILE_URL_HOST",'File URL host must be "localhost" or empty on %s'),o("ERR_INVALID_FILE_URL_PATH","File URL path %s"),o("ERR_INVALID_HANDLE_TYPE","This handle type cannot be sent"),o("ERR_INVALID_IP_ADDRESS","Invalid IP address: %s"),o("ERR_INVALID_OPT_VALUE",function(a,c){return'The value "'+String(c)+'" is invalid for option "'+a+'"'}),o("ERR_INVALID_OPT_VALUE_ENCODING",function(a){return'The value "'+String(a)+'" is invalid for option "encoding"'}),o("ERR_INVALID_REPL_EVAL_CONFIG",'Cannot specify both "breakEvalOnSigint" and "eval" for REPL'),o("ERR_INVALID_SYNC_FORK_INPUT","Asynchronous forks do not support Buffer, Uint8Array or string input: %s"),o("ERR_INVALID_THIS",'Value of "this" must be of type %s'),o("ERR_INVALID_TUPLE","%s must be an iterable %s tuple"),o("ERR_INVALID_URL","Invalid URL: %s"),o("ERR_INVALID_URL_SCHEME",function(a){return"The URL must be "+h(a,"scheme")}),o("ERR_IPC_CHANNEL_CLOSED","Channel closed"),o("ERR_IPC_DISCONNECTED","IPC channel is already disconnected"),o("ERR_IPC_ONE_PIPE","Child process can have only one IPC pipe"),o("ERR_IPC_SYNC_FORK","IPC cannot be used with synchronous forks"),o("ERR_MISSING_ARGS",function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];N(0<a.length,"At least one arg needs to be specified"),c="The ";var g=a.length;switch(a=a.map(function(v){return'"'+v+'"'}),g){case 1:c+=a[0]+" argument";break;case 2:c+=a[0]+" and "+a[1]+" arguments";break;default:c+=a.slice(0,g-1).join(", "),c+=", and "+a[g-1]+" arguments"}return c+" must be specified"}),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_NAPI_CONS_FUNCTION","Constructor must be a function"),o("ERR_NAPI_CONS_PROTOTYPE_OBJECT","Constructor.prototype must be an object"),o("ERR_NO_CRYPTO","Node.js is not compiled with OpenSSL crypto support"),o("ERR_NO_LONGER_SUPPORTED","%s is no longer supported"),o("ERR_PARSE_HISTORY_DATA","Could not parse history data in %s"),o("ERR_SOCKET_ALREADY_BOUND","Socket is already bound"),o("ERR_SOCKET_BAD_PORT","Port should be > 0 and < 65536"),o("ERR_SOCKET_BAD_TYPE","Bad socket type specified. Valid types are: udp4, udp6"),o("ERR_SOCKET_CANNOT_SEND","Unable to send data"),o("ERR_SOCKET_CLOSED","Socket is closed"),o("ERR_SOCKET_DGRAM_NOT_RUNNING","Not running"),o("ERR_STDERR_CLOSE","process.stderr cannot be closed"),o("ERR_STDOUT_CLOSE","process.stdout cannot be closed"),o("ERR_STREAM_WRAP","Stream has StringDecoder set or is in objectMode"),o("ERR_TLS_CERT_ALTNAME_INVALID","Hostname/IP does not match certificate's altnames: %s"),o("ERR_TLS_DH_PARAM_SIZE",function(a){return"DH parameter size "+a+" is less than 2048"}),o("ERR_TLS_HANDSHAKE_TIMEOUT","TLS handshake timeout"),o("ERR_TLS_RENEGOTIATION_FAILED","Failed to renegotiate"),o("ERR_TLS_REQUIRED_SERVER_NAME",'"servername" is required parameter for Server.addContext'),o("ERR_TLS_SESSION_ATTACK","TSL session renegotiation attack detected"),o("ERR_TRANSFORM_ALREADY_TRANSFORMING","Calling transform done when still transforming"),o("ERR_TRANSFORM_WITH_LENGTH_0","Calling transform done when writableState.length != 0"),o("ERR_UNKNOWN_ENCODING","Unknown encoding: %s"),o("ERR_UNKNOWN_SIGNAL","Unknown signal: %s"),o("ERR_UNKNOWN_STDIN_TYPE","Unknown stdin file type"),o("ERR_UNKNOWN_STREAM_TYPE","Unknown stream file type"),o("ERR_V8BREAKITERATOR","Full ICU data not installed. See https://github.com/nodejs/node/wiki/Intl")});D($t);var G=C(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ENCODING_UTF8="utf8",e.assertEncoding=function(n){if(n&&!A.Buffer.isEncoding(n))throw new $t.TypeError("ERR_INVALID_OPT_VALUE_ENCODING",n)},e.strToEncoding=function(n,r){return r&&r!==e.ENCODING_UTF8?r==="buffer"?new A.Buffer(n):new A.Buffer(n).toString(r):n}});D(G);var We=C(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=R.constants.S_IFMT,r=R.constants.S_IFDIR,o=R.constants.S_IFREG,h=R.constants.S_IFBLK,l=R.constants.S_IFCHR,p=R.constants.S_IFLNK,y=R.constants.S_IFIFO,a=R.constants.S_IFSOCK;t=function(){function c(){this.name="",this.mode=0}return c.build=function(g,v){var m=new c,S=g.getNode().mode;return m.name=G.strToEncoding(g.getName(),v),m.mode=S,m},c.prototype._checkModeProperty=function(g){return(this.mode&n)===g},c.prototype.isDirectory=function(){return this._checkModeProperty(r)},c.prototype.isFile=function(){return this._checkModeProperty(o)},c.prototype.isBlockDevice=function(){return this._checkModeProperty(h)},c.prototype.isCharacterDevice=function(){return this._checkModeProperty(l)},c.prototype.isSymbolicLink=function(){return this._checkModeProperty(p)},c.prototype.isFIFO=function(){return this._checkModeProperty(y)},c.prototype.isSocket=function(){return this._checkModeProperty(a)},c}(),e.Dirent=t,e.default=t});D(We);function fr(t,e){for(var n=0,r=t.length-1;0<=r;r--){var o=t[r];o==="."?t.splice(r,1):o===".."?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}var Ve=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;function qe(){for(var t="",e=!1,n=arguments.length-1;-1<=n&&!e;n--){var r=0<=n?arguments[n]:"/";if(typeof r!="string")throw new TypeError("Arguments to path.resolve must be strings");r&&(t=r+"/"+t,e=r.charAt(0)==="/")}return t=fr(Ge(t.split("/"),function(o){return!!o}),!e).join("/"),(e?"/":"")+t||"."}function lr(t){var e=pr(t),n=Pi(t,-1)==="/";return(t=fr(Ge(t.split("/"),function(r){return!!r}),!e).join("/"))||e||(t="."),t&&n&&(t+="/"),(e?"/":"")+t}function pr(t){return t.charAt(0)==="/"}function ze(t,e){function n(l){for(var p=0;p<l.length&&l[p]==="";p++);for(var y=l.length-1;0<=y&&l[y]==="";y--);return p>y?[]:l.slice(p,y-p+1)}t=qe(t).substr(1),e=qe(e).substr(1),t=n(t.split("/")),e=n(e.split("/"));for(var r=Math.min(t.length,e.length),o=r,h=0;h<r;h++)if(t[h]!==e[h]){o=h;break}for(r=[],h=o;h<t.length;h++)r.push("..");return r=r.concat(e.slice(o)),r.join("/")}var Ke={extname:function(t){return Ve.exec(t).slice(1)[3]},basename:function(t,e){return t=Ve.exec(t).slice(1)[2],e&&t.substr(-1*e.length)===e&&(t=t.substr(0,t.length-e.length)),t},dirname:function(t){var e=Ve.exec(t).slice(1);return t=e[0],e=e[1],!t&&!e?".":(e&&(e=e.substr(0,e.length-1)),t+e)},sep:"/",delimiter:":",relative:ze,join:function(){var t=Array.prototype.slice.call(arguments,0);return lr(Ge(t,function(e){if(typeof e!="string")throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},isAbsolute:pr,normalize:lr,resolve:qe};function Ge(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}var Pi="ab".substr(-1)==="b"?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return 0>e&&(e=t.length+e),t.substr(e,n)},Ut=C(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),t=typeof setImmediate=="function"?setImmediate.bind(k):setTimeout.bind(k),e.default=t});D(Ut);var x=C(function(t,e){function n(){var r=Pt||{};return r.getuid||(r.getuid=function(){return 0}),r.getgid||(r.getgid=function(){return 0}),r.cwd||(r.cwd=function(){return"/"}),r.nextTick||(r.nextTick=Ut.default),r.emitWarning||(r.emitWarning=function(o,h){console.warn(""+h+(h?": ":"")+o)}),r.env||(r.env={}),r}Object.defineProperty(e,"__esModule",{value:!0}),e.createProcess=n,e.default=n()});D(x);function gt(){}gt.prototype=Object.create(null);function O(){O.init.call(this)}O.EventEmitter=O;O.usingDomains=!1;O.prototype.domain=void 0;O.prototype._events=void 0;O.prototype._maxListeners=void 0;O.defaultMaxListeners=10;O.init=function(){this.domain=null,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new gt,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};O.prototype.setMaxListeners=function(t){if(typeof t!="number"||0>t||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this};O.prototype.getMaxListeners=function(){return this._maxListeners===void 0?O.defaultMaxListeners:this._maxListeners};O.prototype.emit=function(t){var e,n,r=t==="error";if(e=this._events)r=r&&e.error==null;else if(!r)return!1;var o=this.domain;if(r){if(e=arguments[1],o)e||(e=Error('Uncaught, unspecified "error" event')),e.domainEmitter=this,e.domain=o,e.domainThrown=!1,o.emit("error",e);else throw e instanceof Error?e:(o=Error('Uncaught, unspecified "error" event. ('+e+")"),o.context=e,o);return!1}if(o=e[t],!o)return!1;e=typeof o=="function";var h=arguments.length;switch(h){case 1:if(e)o.call(this);else for(e=o.length,o=Qt(o,e),r=0;r<e;++r)o[r].call(this);break;case 2:if(r=arguments[1],e)o.call(this,r);else for(e=o.length,o=Qt(o,e),h=0;h<e;++h)o[h].call(this,r);break;case 3:if(r=arguments[1],h=arguments[2],e)o.call(this,r,h);else for(e=o.length,o=Qt(o,e),n=0;n<e;++n)o[n].call(this,r,h);break;case 4:if(r=arguments[1],h=arguments[2],n=arguments[3],e)o.call(this,r,h,n);else{e=o.length,o=Qt(o,e);for(var l=0;l<e;++l)o[l].call(this,r,h,n)}break;default:for(r=Array(h-1),n=1;n<h;n++)r[n-1]=arguments[n];if(e)o.apply(this,r);else for(e=o.length,o=Qt(o,e),h=0;h<e;++h)o[h].apply(this,r)}return!0};function cr(t,e,n,r){var o;if(typeof n!="function")throw new TypeError('"listener" argument must be a function');if(o=t._events){o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events);var h=o[e]}else o=t._events=new gt,t._eventsCount=0;return h?(typeof h=="function"?h=o[e]=r?[n,h]:[h,n]:r?h.unshift(n):h.push(n),h.warned||(n=t._maxListeners===void 0?O.defaultMaxListeners:t._maxListeners)&&0<n&&h.length>n&&(h.warned=!0,n=Error("Possible EventEmitter memory leak detected. "+h.length+" "+e+" listeners added. Use emitter.setMaxListeners() to increase limit"),n.name="MaxListenersExceededWarning",n.emitter=t,n.type=e,n.count=h.length,typeof console.warn=="function"?console.warn(n):console.log(n))):(o[e]=n,++t._eventsCount),t}O.prototype.addListener=function(t,e){return cr(this,t,e,!1)};O.prototype.on=O.prototype.addListener;O.prototype.prependListener=function(t,e){return cr(this,t,e,!0)};function ar(t,e,n){function r(){t.removeListener(e,r),o||(o=!0,n.apply(t,arguments))}var o=!1;return r.listener=n,r}O.prototype.once=function(t,e){if(typeof e!="function")throw new TypeError('"listener" argument must be a function');return this.on(t,ar(this,t,e)),this};O.prototype.prependOnceListener=function(t,e){if(typeof e!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(t,ar(this,t,e)),this};O.prototype.removeListener=function(t,e){var n;if(typeof e!="function")throw new TypeError('"listener" argument must be a function');var r=this._events;if(!r)return this;var o=r[t];if(!o)return this;if(o===e||o.listener&&o.listener===e)--this._eventsCount==0?this._events=new gt:(delete r[t],r.removeListener&&this.emit("removeListener",t,o.listener||e));else if(typeof o!="function"){var h=-1;for(n=o.length;0<n--;)if(o[n]===e||o[n].listener&&o[n].listener===e){var l=o[n].listener;h=n;break}if(0>h)return this;if(o.length===1){if(o[0]=void 0,--this._eventsCount==0)return this._events=new gt,this;delete r[t]}else{n=h+1;for(var p=o.length;n<p;h+=1,n+=1)o[h]=o[n];o.pop()}r.removeListener&&this.emit("removeListener",t,l||e)}return this};O.prototype.removeAllListeners=function(t){var e=this._events;if(!e)return this;if(!e.removeListener)return arguments.length===0?(this._events=new gt,this._eventsCount=0):e[t]&&(--this._eventsCount==0?this._events=new gt:delete e[t]),this;if(arguments.length===0){e=Object.keys(e);for(var n=0,r;n<e.length;++n)r=e[n],r!=="removeListener"&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new gt,this._eventsCount=0,this}if(e=e[t],typeof e=="function")this.removeListener(t,e);else if(e)do this.removeListener(t,e[e.length-1]);while(e[0]);return this};O.prototype.listeners=function(t){var e=this._events;if(e)if(t=e[t])if(typeof t=="function")t=[t.listener||t];else{e=Array(t.length);for(var n=0;n<e.length;++n)e[n]=t[n].listener||t[n];t=e}else t=[];else t=[];return t};O.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):dr.call(t,e)};O.prototype.listenerCount=dr;function dr(t){var e=this._events;if(e){if(t=e[t],typeof t=="function")return 1;if(t)return t.length}return 0}O.prototype.eventNames=function(){return 0<this._eventsCount?Reflect.ownKeys(this._events):[]};function Qt(t,e){for(var n=Array(e);e--;)n[e]=t[e];return n}var bt=C(function(t,e){var n=k&&k.__extends||function(){function y(a,c){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,v){g.__proto__=v}||function(g,v){for(var m in v)v.hasOwnProperty(m)&&(g[m]=v[m])},y(a,c)}return function(a,c){function g(){this.constructor=a}y(a,c),a.prototype=c===null?Object.create(c):(g.prototype=c.prototype,new g)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=R.constants.S_IFMT,o=R.constants.S_IFDIR,h=R.constants.S_IFREG,l=R.constants.S_IFLNK,p=R.constants.O_APPEND;e.SEP="/",t=function(y){function a(c,g){g===void 0&&(g=438);var v=y.call(this)||this;return v.uid=x.default.getuid(),v.gid=x.default.getgid(),v.atime=new Date,v.mtime=new Date,v.ctime=new Date,v.perm=438,v.mode=h,v.nlink=1,v.perm=g,v.mode|=g,v.ino=c,v}return n(a,y),a.prototype.getString=function(c){return c===void 0&&(c="utf8"),this.getBuffer().toString(c)},a.prototype.setString=function(c){this.buf=A.bufferFrom(c,"utf8"),this.touch()},a.prototype.getBuffer=function(){return this.buf||this.setBuffer(A.bufferAllocUnsafe(0)),A.bufferFrom(this.buf)},a.prototype.setBuffer=function(c){this.buf=A.bufferFrom(c),this.touch()},a.prototype.getSize=function(){return this.buf?this.buf.length:0},a.prototype.setModeProperty=function(c){this.mode=this.mode&~r|c},a.prototype.setIsFile=function(){this.setModeProperty(h)},a.prototype.setIsDirectory=function(){this.setModeProperty(o)},a.prototype.setIsSymlink=function(){this.setModeProperty(l)},a.prototype.isFile=function(){return(this.mode&r)===h},a.prototype.isDirectory=function(){return(this.mode&r)===o},a.prototype.isSymlink=function(){return(this.mode&r)===l},a.prototype.makeSymlink=function(c){this.symlink=c,this.setIsSymlink()},a.prototype.write=function(c,g,v,m){if(g===void 0&&(g=0),v===void 0&&(v=c.length),m===void 0&&(m=0),this.buf||(this.buf=A.bufferAllocUnsafe(0)),m+v>this.buf.length){var S=A.bufferAllocUnsafe(m+v);this.buf.copy(S,0,0,this.buf.length),this.buf=S}return c.copy(this.buf,m,g,g+v),this.touch(),v},a.prototype.read=function(c,g,v,m){return g===void 0&&(g=0),v===void 0&&(v=c.byteLength),m===void 0&&(m=0),this.buf||(this.buf=A.bufferAllocUnsafe(0)),v>c.byteLength&&(v=c.byteLength),v+m>this.buf.length&&(v=this.buf.length-m),this.buf.copy(c,g,m,m+v),v},a.prototype.truncate=function(c){if(c===void 0&&(c=0),c)if(this.buf||(this.buf=A.bufferAllocUnsafe(0)),c<=this.buf.length)this.buf=this.buf.slice(0,c);else{var g=A.bufferAllocUnsafe(0);this.buf.copy(g),g.fill(0,c)}else this.buf=A.bufferAllocUnsafe(0);this.touch()},a.prototype.chmod=function(c){this.perm=c,this.mode=this.mode&-512|c,this.touch()},a.prototype.chown=function(c,g){this.uid=c,this.gid=g,this.touch()},a.prototype.touch=function(){this.mtime=new Date,this.emit("change",this)},a.prototype.canRead=function(c,g){return c===void 0&&(c=x.default.getuid()),g===void 0&&(g=x.default.getgid()),!!(this.perm&4||g===this.gid&&this.perm&32||c===this.uid&&this.perm&256)},a.prototype.canWrite=function(c,g){return c===void 0&&(c=x.default.getuid()),g===void 0&&(g=x.default.getgid()),!!(this.perm&2||g===this.gid&&this.perm&16||c===this.uid&&this.perm&128)},a.prototype.del=function(){this.emit("delete",this)},a.prototype.toJSON=function(){return{ino:this.ino,uid:this.uid,gid:this.gid,atime:this.atime.getTime(),mtime:this.mtime.getTime(),ctime:this.ctime.getTime(),perm:this.perm,mode:this.mode,nlink:this.nlink,symlink:this.symlink,data:this.getString()}},a}(O.EventEmitter),e.Node=t,t=function(y){function a(c,g,v){var m=y.call(this)||this;return m.children={},m.steps=[],m.ino=0,m.length=0,m.vol=c,m.parent=g,m.steps=g?g.steps.concat([v]):[v],m}return n(a,y),a.prototype.setNode=function(c){this.node=c,this.ino=c.ino},a.prototype.getNode=function(){return this.node},a.prototype.createChild=function(c,g){g===void 0&&(g=this.vol.createNode());var v=new a(this.vol,this,c);return v.setNode(g),g.isDirectory(),this.setChild(c,v),v},a.prototype.setChild=function(c,g){return g===void 0&&(g=new a(this.vol,this,c)),this.children[c]=g,g.parent=this,this.length++,this.emit("child:add",g,this),g},a.prototype.deleteChild=function(c){delete this.children[c.getName()],this.length--,this.emit("child:delete",c,this)},a.prototype.getChild=function(c){if(Object.hasOwnProperty.call(this.children,c))return this.children[c]},a.prototype.getPath=function(){return this.steps.join(e.SEP)},a.prototype.getName=function(){return this.steps[this.steps.length-1]},a.prototype.walk=function(c,g,v){if(g===void 0&&(g=c.length),v===void 0&&(v=0),v>=c.length||v>=g)return this;var m=this.getChild(c[v]);return m?m.walk(c,g,v+1):null},a.prototype.toJSON=function(){return{steps:this.steps,ino:this.ino,children:Object.keys(this.children)}},a}(O.EventEmitter),e.Link=t,t=function(){function y(a,c,g,v){this.position=0,this.link=a,this.node=c,this.flags=g,this.fd=v}return y.prototype.getString=function(){return this.node.getString()},y.prototype.setString=function(a){this.node.setString(a)},y.prototype.getBuffer=function(){return this.node.getBuffer()},y.prototype.setBuffer=function(a){this.node.setBuffer(a)},y.prototype.getSize=function(){return this.node.getSize()},y.prototype.truncate=function(a){this.node.truncate(a)},y.prototype.seekTo=function(a){this.position=a},y.prototype.stats=function(){return Ft.default.build(this.node)},y.prototype.write=function(a,c,g,v){return c===void 0&&(c=0),g===void 0&&(g=a.length),typeof v!="number"&&(v=this.position),this.flags&p&&(v=this.getSize()),a=this.node.write(a,c,g,v),this.position=v+a,a},y.prototype.read=function(a,c,g,v){return c===void 0&&(c=0),g===void 0&&(g=a.byteLength),typeof v!="number"&&(v=this.position),a=this.node.read(a,c,g,v),this.position=v+a,a},y.prototype.chmod=function(a){this.node.chmod(a)},y.prototype.chown=function(a,c){this.node.chown(a,c)},y}(),e.File=t});D(bt);var Di=bt.Node,yr=C(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(n,r,o){var h=setTimeout.apply(null,arguments);return h&&typeof h=="object"&&typeof h.unref=="function"&&h.unref(),h}});D(yr);function Ot(){this.tail=this.head=null,this.length=0}Ot.prototype.push=function(t){t={data:t,next:null},0<this.length?this.tail.next=t:this.head=t,this.tail=t,++this.length};Ot.prototype.unshift=function(t){t={data:t,next:this.head},this.length===0&&(this.tail=t),this.head=t,++this.length};Ot.prototype.shift=function(){if(this.length!==0){var t=this.head.data;return this.head=this.length===1?this.tail=null:this.head.next,--this.length,t}};Ot.prototype.clear=function(){this.head=this.tail=null,this.length=0};Ot.prototype.join=function(t){if(this.length===0)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n};Ot.prototype.concat=function(t){if(this.length===0)return _.alloc(0);if(this.length===1)return this.head.data;t=_.allocUnsafe(t>>>0);for(var e=this.head,n=0;e;)e.data.copy(t,n),n+=e.data.length,e=e.next;return t};var xi=_.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function te(t){if(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),t&&!xi(t))throw Error("Unknown encoding: "+t);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=Ui;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=ji;break;default:this.write=Mi;return}this.charBuffer=new _(6),this.charLength=this.charReceived=0}te.prototype.write=function(t){for(var e="";this.charLength;){if(e=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length,t.copy(this.charBuffer,this.charReceived,0,e),this.charReceived+=e,this.charReceived<this.charLength)return"";t=t.slice(e,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(55296<=n&&56319>=n)this.charLength+=this.surrogateSize,e="";else{if(this.charReceived=this.charLength=0,t.length===0)return e;break}}this.detectIncompleteChar(t);var r=t.length;return this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,r),r-=this.charReceived),e+=t.toString(this.encoding,0,r),r=e.length-1,n=e.charCodeAt(r),55296<=n&&56319>=n?(n=this.surrogateSize,this.charLength+=n,this.charReceived+=n,this.charBuffer.copy(this.charBuffer,n,0,n),t.copy(this.charBuffer,0,0,n),e.substring(0,r)):e};te.prototype.detectIncompleteChar=function(t){for(var e=3<=t.length?3:t.length;0<e;e--){var n=t[t.length-e];if(e==1&&n>>5==6){this.charLength=2;break}if(2>=e&&n>>4==14){this.charLength=3;break}if(3>=e&&n>>3==30){this.charLength=4;break}}this.charReceived=e};te.prototype.end=function(t){var e="";return t&&t.length&&(e=this.write(t)),this.charReceived&&(t=this.encoding,e+=this.charBuffer.slice(0,this.charReceived).toString(t)),e};function Mi(t){return t.toString(this.encoding)}function Ui(t){this.charLength=(this.charReceived=t.length%2)?2:0}function ji(t){this.charLength=(this.charReceived=t.length%3)?3:0}I.ReadableState=gr;var T=Yn("stream");dt(I,O);function Yi(t,e,n){if(typeof t.prependListener=="function")return t.prependListener(e,n);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}function gr(t,e){t=t||{},this.objectMode=!!t.objectMode,e instanceof H&&(this.objectMode=this.objectMode||!!t.readableObjectMode),e=t.highWaterMark;var n=this.objectMode?16:16384;this.highWaterMark=e||e===0?e:n,this.highWaterMark=~~this.highWaterMark,this.buffer=new Ot,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.reading=this.endEmitted=this.ended=!1,this.sync=!0,this.resumeScheduled=this.readableListening=this.emittedReadable=this.needReadable=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.encoding=this.decoder=null,t.encoding&&(this.decoder=new te(t.encoding),this.encoding=t.encoding)}function I(t){if(!(this instanceof I))return new I(t);this._readableState=new gr(t,this),this.readable=!0,t&&typeof t.read=="function"&&(this._read=t.read),O.call(this)}I.prototype.push=function(t,e){var n=this._readableState;return n.objectMode||typeof t!="string"||(e=e||n.defaultEncoding,e!==n.encoding&&(t=_.from(t,e),e="")),mr(this,n,t,e,!1)};I.prototype.unshift=function(t){return mr(this,this._readableState,t,"",!0)};I.prototype.isPaused=function(){return this._readableState.flowing===!1};function mr(t,e,n,r,o){var h=n,l=null;if(st(h)||typeof h=="string"||h===null||h===void 0||e.objectMode||(l=new TypeError("Invalid non-string/buffer chunk")),h=l)t.emit("error",h);else if(n===null)e.reading=!1,e.ended||(e.decoder&&(n=e.decoder.end())&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length),e.ended=!0,me(t));else if(e.objectMode||n&&0<n.length)if(e.ended&&!o)t.emit("error",Error("stream.push() after EOF"));else if(e.endEmitted&&o)t.emit("error",Error("stream.unshift() after end event"));else{if(e.decoder&&!o&&!r){n=e.decoder.write(n);var p=!e.objectMode&&n.length===0}o||(e.reading=!1),p||(e.flowing&&e.length===0&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,o?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&me(t))),e.readingMore||(e.readingMore=!0,W(Wi,t,e))}else o||(e.reading=!1);return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}I.prototype.setEncoding=function(t){return this._readableState.decoder=new te(t),this._readableState.encoding=t,this};function vr(t,e){if(0>=t||e.length===0&&e.ended)return 0;if(e.objectMode)return 1;if(t!==t)return e.flowing&&e.length?e.buffer.head.data.length:e.length;if(t>e.highWaterMark){var n=t;8388608<=n?n=8388608:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),e.highWaterMark=n}return t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0)}I.prototype.read=function(t){T("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return T("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Je(this):me(this),null;if(t=vr(t,e),t===0&&e.ended)return e.length===0&&Je(this),null;var r=e.needReadable;return T("need readable",r),(e.length===0||e.length-t<e.highWaterMark)&&(r=!0,T("length less than watermark",r)),e.ended||e.reading?T("reading or ended",!1):r&&(T("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=vr(n,e))),r=0<t?_r(t,e):null,r===null?(e.needReadable=!0,t=0):e.length-=t,e.length===0&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&Je(this)),r!==null&&this.emit("data",r),r};function me(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(T("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?W(wr,t):wr(t))}function wr(t){T("emit readable"),t.emit("readable"),He(t)}function Wi(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(T("maybeReadMore read 0"),t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}I.prototype._read=function(){this.emit("error",Error("not implemented"))};I.prototype.pipe=function(t,e){function n(B){T("onunpipe"),B===c&&o()}function r(){T("onend"),t.end()}function o(){T("cleanup"),t.removeListener("close",p),t.removeListener("finish",y),t.removeListener("drain",v),t.removeListener("error",l),t.removeListener("unpipe",n),c.removeListener("end",r),c.removeListener("end",o),c.removeListener("data",h),m=!0,!g.awaitDrain||t._writableState&&!t._writableState.needDrain||v()}function h(B){T("ondata"),S=!1,t.write(B)!==!1||S||((g.pipesCount===1&&g.pipes===t||1<g.pipesCount&&Er(g.pipes,t)!==-1)&&!m&&(T("false write response, pause",c._readableState.awaitDrain),c._readableState.awaitDrain++,S=!0),c.pause())}function l(B){T("onerror",B),a(),t.removeListener("error",l),t.listeners("error").length===0&&t.emit("error",B)}function p(){t.removeListener("finish",y),a()}function y(){T("onfinish"),t.removeListener("close",p),a()}function a(){T("unpipe"),c.unpipe(t)}var c=this,g=this._readableState;switch(g.pipesCount){case 0:g.pipes=t;break;case 1:g.pipes=[g.pipes,t];break;default:g.pipes.push(t)}g.pipesCount+=1,T("pipe count=%d opts=%j",g.pipesCount,e),e=e&&e.end===!1?o:r,g.endEmitted?W(e):c.once("end",e),t.on("unpipe",n);var v=Vi(c);t.on("drain",v);var m=!1,S=!1;return c.on("data",h),Yi(t,"error",l),t.once("close",p),t.once("finish",y),t.emit("pipe",c),g.flowing||(T("pipe resume"),c.resume()),t};function Vi(t){return function(){var e=t._readableState;T("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&t.listeners("data").length&&(e.flowing=!0,He(t))}}I.prototype.unpipe=function(t){var e=this._readableState;if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this),this);if(!t){t=e.pipes;var n=e.pipesCount;for(e.pipes=null,e.pipesCount=0,e.flowing=!1,e=0;e<n;e++)t[e].emit("unpipe",this);return this}return n=Er(e.pipes,t),n===-1?this:(e.pipes.splice(n,1),--e.pipesCount,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)};I.prototype.on=function(t,e){return e=O.prototype.on.call(this,t,e),t==="data"?this._readableState.flowing!==!1&&this.resume():t==="readable"&&(t=this._readableState,t.endEmitted||t.readableListening||(t.readableListening=t.needReadable=!0,t.emittedReadable=!1,t.reading?t.length&&me(this):W(qi,this))),e};I.prototype.addListener=I.prototype.on;function qi(t){T("readable nexttick read 0"),t.read(0)}I.prototype.resume=function(){var t=this._readableState;return t.flowing||(T("resume"),t.flowing=!0,t.resumeScheduled||(t.resumeScheduled=!0,W(zi,this,t))),this};function zi(t,e){e.reading||(T("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),He(t),e.flowing&&!e.reading&&t.read(0)}I.prototype.pause=function(){return T("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(T("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function He(t){var e=t._readableState;for(T("flow",e.flowing);e.flowing&&t.read()!==null;);}I.prototype.wrap=function(t){var e=this._readableState,n=!1,r=this;t.on("end",function(){if(T("wrapped end"),e.decoder&&!e.ended){var h=e.decoder.end();h&&h.length&&r.push(h)}r.push(null)}),t.on("data",function(h){T("wrapped data"),e.decoder&&(h=e.decoder.write(h)),e.objectMode&&h==null||!(e.objectMode||h&&h.length)||r.push(h)||(n=!0,t.pause())});for(var o in t)this[o]===void 0&&typeof t[o]=="function"&&(this[o]=function(h){return function(){return t[h].apply(t,arguments)}}(o));return Gi(["error","close","destroy","pause","resume"],function(h){t.on(h,r.emit.bind(r,h))}),r._read=function(h){T("wrapped _read",h),n&&(n=!1,t.resume())},r};I._fromList=_r;function _r(t,e){if(e.length===0)return null;if(e.objectMode)var n=e.buffer.shift();else if(!t||t>=e.length)n=e.decoder?e.buffer.join(""):e.buffer.length===1?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear();else{if(n=e.buffer,e=e.decoder,t<n.head.data.length)e=n.head.data.slice(0,t),n.head.data=n.head.data.slice(t);else{if(t===n.head.data.length)n=n.shift();else if(e){e=n.head;var r=1,o=e.data;for(t-=o.length;e=e.next;){var h=e.data,l=t>h.length?h.length:t;if(o=l===h.length?o+h:o+h.slice(0,t),t-=l,t===0){l===h.length?(++r,n.head=e.next?e.next:n.tail=null):(n.head=e,e.data=h.slice(l));break}++r}n.length-=r,n=o}else{for(e=_.allocUnsafe(t),r=n.head,o=1,r.data.copy(e),t-=r.data.length;r=r.next;){if(h=r.data,l=t>h.length?h.length:t,h.copy(e,e.length-t,0,l),t-=l,t===0){l===h.length?(++o,n.head=r.next?r.next:n.tail=null):(n.head=r,r.data=h.slice(l));break}++o}n.length-=o,n=e}e=n}n=e}return n}function Je(t){var e=t._readableState;if(0<e.length)throw Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,W(Ki,e,t))}function Ki(t,e){t.endEmitted||t.length!==0||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function Gi(t,e){for(var n=0,r=t.length;n<r;n++)e(t[n],n)}function Er(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}P.WritableState=Xe;dt(P,O);function Hi(){}function Ji(t,e,n){this.chunk=t,this.encoding=e,this.callback=n,this.next=null}function Xe(t,e){Object.defineProperty(this,"buffer",{get:Fe(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),t=t||{},this.objectMode=!!t.objectMode,e instanceof H&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||n===0?n:r,this.highWaterMark=~~this.highWaterMark,this.finished=this.ended=this.ending=this.needDrain=!1,this.decodeStrings=t.decodeStrings!==!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(o){var h=e._writableState,l=h.sync,p=h.writecb;h.writing=!1,h.writecb=null,h.length-=h.writelen,h.writelen=0,o?(--h.pendingcb,l?W(p,o):p(o),e._writableState.errorEmitted=!0,e.emit("error",o)):((o=Or(h))||h.corked||h.bufferProcessing||!h.bufferedRequest||Rr(e,h),l?W(Sr,e,h,o,p):Sr(e,h,o,p))},this.writecb=null,this.writelen=0,this.lastBufferedRequest=this.bufferedRequest=null,this.pendingcb=0,this.errorEmitted=this.prefinished=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Ar(this)}Xe.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e};function P(t){if(!(this instanceof P||this instanceof H))return new P(t);this._writableState=new Xe(t,this),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev)),O.call(this)}P.prototype.pipe=function(){this.emit("error",Error("Cannot pipe, not readable"))};P.prototype.write=function(t,e,n){var r=this._writableState,o=!1;if(typeof e=="function"&&(n=e,e=null),_.isBuffer(t)?e="buffer":e||(e=r.defaultEncoding),typeof n!="function"&&(n=Hi),r.ended)r=n,t=Error("write after end"),this.emit("error",t),W(r,t);else{var h=n,l=!0,p=!1;t===null?p=new TypeError("May not write null values to stream"):_.isBuffer(t)||typeof t=="string"||t===void 0||r.objectMode||(p=new TypeError("Invalid non-string/buffer chunk")),p&&(this.emit("error",p),W(h,p),l=!1),l&&(r.pendingcb++,o=e,r.objectMode||r.decodeStrings===!1||typeof t!="string"||(t=_.from(t,o)),_.isBuffer(t)&&(o="buffer"),h=r.objectMode?1:t.length,r.length+=h,e=r.length<r.highWaterMark,e||(r.needDrain=!0),r.writing||r.corked?(h=r.lastBufferedRequest,r.lastBufferedRequest=new Ji(t,o,n),h?h.next=r.lastBufferedRequest:r.bufferedRequest=r.lastBufferedRequest,r.bufferedRequestCount+=1):Ze(this,r,!1,h,t,o,n),o=e)}return o};P.prototype.cork=function(){this._writableState.corked++};P.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||Rr(this,t))};P.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(-1<"hex utf8 utf-8 ascii binary base64 ucs2 ucs-2 utf16le utf-16le raw".split(" ").indexOf((t+"").toLowerCase())))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this};function Ze(t,e,n,r,o,h,l){e.writelen=r,e.writecb=l,e.writing=!0,e.sync=!0,n?t._writev(o,e.onwrite):t._write(o,h,e.onwrite),e.sync=!1}function Sr(t,e,n,r){!n&&e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain")),e.pendingcb--,r(),Tr(t,e)}function Rr(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=Array(e.bufferedRequestCount),o=e.corkedRequestsFree;o.entry=n;for(var h=0;n;)r[h]=n,n=n.next,h+=1;Ze(t,e,!0,e.length,r,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new Ar(e)}else{for(;n&&(r=n.chunk,Ze(t,e,!1,e.objectMode?1:r.length,r,n.encoding,n.callback),n=n.next,!e.writing););n===null&&(e.lastBufferedRequest=null)}e.bufferedRequestCount=0,e.bufferedRequest=n,e.bufferProcessing=!1}P.prototype._write=function(t,e,n){n(Error("not implemented"))};P.prototype._writev=null;P.prototype.end=function(t,e,n){var r=this._writableState;typeof t=="function"?(n=t,e=t=null):typeof e=="function"&&(n=e,e=null),t!=null&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),!r.ending&&!r.finished&&(t=n,r.ending=!0,Tr(this,r),t&&(r.finished?W(t):this.once("finish",t)),r.ended=!0,this.writable=!1)};function Or(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function Tr(t,e){var n=Or(e);return n&&(e.pendingcb===0?(e.prefinished||(e.prefinished=!0,t.emit("prefinish")),e.finished=!0,t.emit("finish")):e.prefinished||(e.prefinished=!0,t.emit("prefinish"))),n}function Ar(t){var e=this;this.entry=this.next=null,this.finish=function(n){var r=e.entry;for(e.entry=null;r;){var o=r.callback;t.pendingcb--,o(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}}dt(H,I);for($e=Object.keys(P.prototype),ve=0;ve<$e.length;ve++)we=$e[ve],H.prototype[we]||(H.prototype[we]=P.prototype[we]);var we,$e,ve;function H(t){if(!(this instanceof H))return new H(t);I.call(this,t),P.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",Xi)}function Xi(){this.allowHalfOpen||this._writableState.ended||W(Zi,this)}function Zi(t){t.end()}dt(et,H);function $i(t){this.afterTransform=function(e,n){var r=t._transformState;r.transforming=!1;var o=r.writecb;return o?(r.writechunk=null,r.writecb=null,n!=null&&t.push(n),o(e),e=t._readableState,e.reading=!1,(e.needReadable||e.length<e.highWaterMark)&&t._read(e.highWaterMark),e=void 0):e=t.emit("error",Error("no writecb in Transform class")),e},this.transforming=this.needTransform=!1,this.writeencoding=this.writechunk=this.writecb=null}function et(t){if(!(this instanceof et))return new et(t);H.call(this,t),this._transformState=new $i(this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.once("prefinish",function(){typeof this._flush=="function"?this._flush(function(n){Nr(e,n)}):Nr(e)})}et.prototype.push=function(t,e){return this._transformState.needTransform=!1,H.prototype.push.call(this,t,e)};et.prototype._transform=function(){throw Error("Not implemented")};et.prototype._write=function(t,e,n){var r=this._transformState;r.writecb=n,r.writechunk=t,r.writeencoding=e,r.transforming||(t=this._readableState,(r.needTransform||t.needReadable||t.length<t.highWaterMark)&&this._read(t.highWaterMark))};et.prototype._read=function(){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};function Nr(t,e){if(e)return t.emit("error",e);if(e=t._transformState,t._writableState.length)throw Error("Calling transform done when ws.length != 0");if(e.transforming)throw Error("Calling transform done when still transforming");return t.push(null)}dt(ee,et);function ee(t){if(!(this instanceof ee))return new ee(t);et.call(this,t)}ee.prototype._transform=function(t,e,n){n(null,t)};dt(V,O);V.Readable=I;V.Writable=P;V.Duplex=H;V.Transform=et;V.PassThrough=ee;V.Stream=V;function V(){O.call(this)}V.prototype.pipe=function(t,e){function n(c){t.writable&&t.write(c)===!1&&y.pause&&y.pause()}function r(){y.readable&&y.resume&&y.resume()}function o(){a||(a=!0,t.end())}function h(){a||(a=!0,typeof t.destroy=="function"&&t.destroy())}function l(c){if(p(),O.listenerCount(this,"error")===0)throw c}function p(){y.removeListener("data",n),t.removeListener("drain",r),y.removeListener("end",o),y.removeListener("close",h),y.removeListener("error",l),t.removeListener("error",l),y.removeListener("end",p),y.removeListener("close",p),t.removeListener("close",p)}var y=this;y.on("data",n),t.on("drain",r),t._isStdio||e&&e.end===!1||(y.on("end",o),y.on("close",h));var a=!1;return y.on("error",l),t.on("error",l),y.on("end",p),y.on("close",p),t.on("close",p),t.emit("pipe",y),t};var Qi=Array.prototype.slice,bi={extend:function t(e,n){for(var r in n)e[r]=n[r];return 3>arguments.length?e:t.apply(null,[e].concat(Qi.call(arguments,2)))}},Ir=C(function(t,e){function n(h,l,p){return p===void 0&&(p=function(y){return y}),function(){for(var y=[],a=0;a<arguments.length;a++)y[a]=arguments[a];return new Promise(function(c,g){h[l].bind(h).apply(void 0,r(y,[function(v,m){return v?g(v):c(p(m))}]))})}}var r=k&&k.__spreadArrays||function(){for(var h=0,l=0,p=arguments.length;l<p;l++)h+=arguments[l].length;h=Array(h);var y=0;for(l=0;l<p;l++)for(var a=arguments[l],c=0,g=a.length;c<g;c++,y++)h[y]=a[c];return h};Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function h(l,p){this.vol=l,this.fd=p}return h.prototype.appendFile=function(l,p){return n(this.vol,"appendFile")(this.fd,l,p)},h.prototype.chmod=function(l){return n(this.vol,"fchmod")(this.fd,l)},h.prototype.chown=function(l,p){return n(this.vol,"fchown")(this.fd,l,p)},h.prototype.close=function(){return n(this.vol,"close")(this.fd)},h.prototype.datasync=function(){return n(this.vol,"fdatasync")(this.fd)},h.prototype.read=function(l,p,y,a){return n(this.vol,"read",function(c){return{bytesRead:c,buffer:l}})(this.fd,l,p,y,a)},h.prototype.readFile=function(l){return n(this.vol,"readFile")(this.fd,l)},h.prototype.stat=function(l){return n(this.vol,"fstat")(this.fd,l)},h.prototype.sync=function(){return n(this.vol,"fsync")(this.fd)},h.prototype.truncate=function(l){return n(this.vol,"ftruncate")(this.fd,l)},h.prototype.utimes=function(l,p){return n(this.vol,"futimes")(this.fd,l,p)},h.prototype.write=function(l,p,y,a){return n(this.vol,"write",function(c){return{bytesWritten:c,buffer:l}})(this.fd,l,p,y,a)},h.prototype.writeFile=function(l,p){return n(this.vol,"writeFile")(this.fd,l,p)},h}();e.FileHandle=o,e.default=function(h){return typeof Promise=="undefined"?null:{FileHandle:o,access:function(l,p){return n(h,"access")(l,p)},appendFile:function(l,p,y){return n(h,"appendFile")(l instanceof o?l.fd:l,p,y)},chmod:function(l,p){return n(h,"chmod")(l,p)},chown:function(l,p,y){return n(h,"chown")(l,p,y)},copyFile:function(l,p,y){return n(h,"copyFile")(l,p,y)},lchmod:function(l,p){return n(h,"lchmod")(l,p)},lchown:function(l,p,y){return n(h,"lchown")(l,p,y)},link:function(l,p){return n(h,"link")(l,p)},lstat:function(l,p){return n(h,"lstat")(l,p)},mkdir:function(l,p){return n(h,"mkdir")(l,p)},mkdtemp:function(l,p){return n(h,"mkdtemp")(l,p)},open:function(l,p,y){return n(h,"open",function(a){return new o(h,a)})(l,p,y)},readdir:function(l,p){return n(h,"readdir")(l,p)},readFile:function(l,p){return n(h,"readFile")(l instanceof o?l.fd:l,p)},readlink:function(l,p){return n(h,"readlink")(l,p)},realpath:function(l,p){return n(h,"realpath")(l,p)},rename:function(l,p){return n(h,"rename")(l,p)},rmdir:function(l){return n(h,"rmdir")(l)},stat:function(l,p){return n(h,"stat")(l,p)},symlink:function(l,p,y){return n(h,"symlink")(l,p,y)},truncate:function(l,p){return n(h,"truncate")(l,p)},unlink:function(l){return n(h,"unlink")(l)},utimes:function(l,p,y){return n(h,"utimes")(l,p,y)},writeFile:function(l,p,y){return n(h,"writeFile")(l instanceof o?l.fd:l,p,y)}}}});D(Ir);var to=/[^\x20-\x7E]/,eo=/[\x2E\u3002\uFF0E\uFF61]/g,Lr={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},jt=Math.floor,Qe=String.fromCharCode;function no(t,e){var n=t.split("@"),r="";1<n.length&&(r=n[0]+"@",t=n[1]),t=t.replace(eo,"."),t=t.split("."),n=t.length;for(var o=[];n--;)o[n]=e(t[n]);return e=o.join("."),r+e}function kr(t,e){return t+22+75*(26>t)-((e!=0)<<5)}function ro(t){return no(t,function(e){if(to.test(e)){var n,r=[],o=[],h=0;for(n=e.length;h<n;){var l=e.charCodeAt(h++);if(55296<=l&&56319>=l&&h<n){var p=e.charCodeAt(h++);(p&64512)==56320?o.push(((l&1023)<<10)+(p&1023)+65536):(o.push(l),h--)}else o.push(l)}e=o,p=e.length,o=128;var y=0,a=72;for(l=0;l<p;++l){var c=e[l];128>c&&r.push(Qe(c))}for((h=n=r.length)&&r.push("-");h<p;){var g=2147483647;for(l=0;l<p;++l)c=e[l],c>=o&&c<g&&(g=c);var v=h+1;if(g-o>jt((2147483647-y)/v))throw new RangeError(Lr.overflow);for(y+=(g-o)*v,o=g,l=0;l<p;++l){if(c=e[l],c<o&&2147483647<++y)throw new RangeError(Lr.overflow);if(c==o){var m=y;for(g=36;c=g<=a?1:g>=a+26?26:g-a,!(m<c);g+=36){var S=m-c;m=36-c,r.push(Qe(kr(c+S%m,0))),m=jt(S/m)}for(r.push(Qe(kr(m,0))),a=v,g=0,y=h==n?jt(y/700):y>>1,y+=jt(y/a);455<y;g+=36)y=jt(y/35);a=jt(g+36*y/(y+38)),y=0,++h}}++y,++o}r="xn--"+r.join("")}else r=e;return r})}var Fr=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function ne(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}}function io(t,e,n,r){return e=e||"&",n=n||"=",t===null&&(t=void 0),typeof t=="object"?Br(oo(t),function(o){var h=encodeURIComponent(ne(o))+n;return Fr(t[o])?Br(t[o],function(l){return h+encodeURIComponent(ne(l))}).join(e):h+encodeURIComponent(ne(t[o]))}).join(e):r?encodeURIComponent(ne(r))+n+encodeURIComponent(ne(t)):""}function Br(t,e){if(t.map)return t.map(e);for(var n=[],r=0;r<t.length;r++)n.push(e(t[r],r));return n}var oo=Object.keys||function(t){var e=[],n;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e};function Cr(t,e,n,r){n=n||"=";var o={};if(typeof t!="string"||t.length===0)return o;var h=/\+/g;for(t=t.split(e||"&"),e=1e3,r&&typeof r.maxKeys=="number"&&(e=r.maxKeys),r=t.length,0<e&&r>e&&(r=e),e=0;e<r;++e){var l=t[e].replace(h,"%20"),p=l.indexOf(n);if(0<=p){var y=l.substr(0,p);l=l.substr(p+1)}else y=l,l="";y=decodeURIComponent(y),l=decodeURIComponent(l),Object.prototype.hasOwnProperty.call(o,y)?Fr(o[y])?o[y].push(l):o[y]=[o[y],l]:o[y]=l}return o}var so={parse:_e,resolve:go,resolveObject:mo,format:yo,Url:nt};function nt(){this.href=this.path=this.pathname=this.query=this.search=this.hash=this.hostname=this.port=this.host=this.auth=this.slashes=this.protocol=null}var uo=/^([a-z0-9.+-]+:)/i,ho=/:[0-9]*$/,fo=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,lo="{}|\\^`".split("").concat('<>"` \r\n '.split("")),be=["'"].concat(lo),Pr=["%","/","?",";","#"].concat(be),Dr=["/","?","#"],po=255,xr=/^[+a-z0-9A-Z_-]{0,63}$/,co=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,ao={javascript:!0,"javascript:":!0},tn={javascript:!0,"javascript:":!0},Yt={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function _e(t,e,n){if(t&&yt(t)&&t instanceof nt)return t;var r=new nt;return r.parse(t,e,n),r}nt.prototype.parse=function(t,e,n){return Mr(this,t,e,n)};function Mr(t,e,n,r){if(!Rt(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?");if(o=o!==-1&&o<e.indexOf("#")?"?":"#",e=e.split(o),e[0]=e[0].replace(/\\/g,"/"),e=e.join(o),o=e.trim(),!r&&e.split("#").length===1&&(e=fo.exec(o)))return t.path=o,t.href=o,t.pathname=e[1],e[2]?(t.search=e[2],t.query=n?Cr(t.search.substr(1)):t.search.substr(1)):n&&(t.search="",t.query={}),t;if(e=uo.exec(o)){e=e[0];var h=e.toLowerCase();t.protocol=h,o=o.substr(e.length)}if(r||e||o.match(/^\/\/[^@\/]+@[^@\/]+/)){var l=o.substr(0,2)==="//";!l||e&&tn[e]||(o=o.substr(2),t.slashes=!0)}if(!tn[e]&&(l||e&&!Yt[e])){for(e=-1,r=0;r<Dr.length;r++)l=o.indexOf(Dr[r]),l!==-1&&(e===-1||l<e)&&(e=l);for(l=e===-1?o.lastIndexOf("@"):o.lastIndexOf("@",e),l!==-1&&(r=o.slice(0,l),o=o.slice(l+1),t.auth=decodeURIComponent(r)),e=-1,r=0;r<Pr.length;r++)l=o.indexOf(Pr[r]),l!==-1&&(e===-1||l<e)&&(e=l);if(e===-1&&(e=o.length),t.host=o.slice(0,e),o=o.slice(e),Ur(t),t.hostname=t.hostname||"",l=t.hostname[0]==="["&&t.hostname[t.hostname.length-1]==="]",!l){var p=t.hostname.split(/\./);for(r=0,e=p.length;r<e;r++){var y=p[r];if(y&&!y.match(xr)){for(var a="",c=0,g=y.length;c<g;c++)a=127<y.charCodeAt(c)?a+"x":a+y[c];if(!a.match(xr)){e=p.slice(0,r),r=p.slice(r+1),(y=y.match(co))&&(e.push(y[1]),r.unshift(y[2])),r.length&&(o="/"+r.join(".")+o),t.hostname=e.join(".");break}}}}t.hostname=t.hostname.length>po?"":t.hostname.toLowerCase(),l||(t.hostname=ro(t.hostname)),r=t.port?":"+t.port:"",t.host=(t.hostname||"")+r,t.href+=t.host,l&&(t.hostname=t.hostname.substr(1,t.hostname.length-2),o[0]!=="/"&&(o="/"+o))}if(!ao[h])for(r=0,e=be.length;r<e;r++)l=be[r],o.indexOf(l)!==-1&&(y=encodeURIComponent(l),y===l&&(y=escape(l)),o=o.split(l).join(y));return r=o.indexOf("#"),r!==-1&&(t.hash=o.substr(r),o=o.slice(0,r)),r=o.indexOf("?"),r!==-1?(t.search=o.substr(r),t.query=o.substr(r+1),n&&(t.query=Cr(t.query)),o=o.slice(0,r)):n&&(t.search="",t.query={}),o&&(t.pathname=o),Yt[h]&&t.hostname&&!t.pathname&&(t.pathname="/"),(t.pathname||t.search)&&(r=t.pathname||"",t.path=r+(t.search||"")),t.href=en(t),t}function yo(t){return Rt(t)&&(t=Mr({},t)),en(t)}function en(t){var e=t.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var n=t.protocol||"",r=t.pathname||"",o=t.hash||"",h=!1,l="";return t.host?h=e+t.host:t.hostname&&(h=e+(t.hostname.indexOf(":")===-1?t.hostname:"["+this.hostname+"]"),t.port&&(h+=":"+t.port)),t.query&&yt(t.query)&&Object.keys(t.query).length&&(l=io(t.query)),e=t.search||l&&"?"+l||"",n&&n.substr(-1)!==":"&&(n+=":"),t.slashes||(!n||Yt[n])&&h!==!1?(h="//"+(h||""),r&&r.charAt(0)!=="/"&&(r="/"+r)):h||(h=""),o&&o.charAt(0)!=="#"&&(o="#"+o),e&&e.charAt(0)!=="?"&&(e="?"+e),r=r.replace(/[?#]/g,function(p){return encodeURIComponent(p)}),e=e.replace("#","%23"),n+h+r+e+o}nt.prototype.format=function(){return en(this)};function go(t,e){return _e(t,!1,!0).resolve(e)}nt.prototype.resolve=function(t){return this.resolveObject(_e(t,!1,!0)).format()};function mo(t,e){return t?_e(t,!1,!0).resolveObject(e):e}nt.prototype.resolveObject=function(t){if(Rt(t)){var e=new nt;e.parse(t,!1,!0),t=e}e=new nt;for(var n=Object.keys(this),r=0;r<n.length;r++){var o=n[r];e[o]=this[o]}if(e.hash=t.hash,t.href==="")return e.href=e.format(),e;if(t.slashes&&!t.protocol){for(n=Object.keys(t),r=0;r<n.length;r++)o=n[r],o!=="protocol"&&(e[o]=t[o]);return Yt[e.protocol]&&e.hostname&&!e.pathname&&(e.path=e.pathname="/"),e.href=e.format(),e}var h;if(t.protocol&&t.protocol!==e.protocol){if(!Yt[t.protocol]){for(n=Object.keys(t),r=0;r<n.length;r++)o=n[r],e[o]=t[o];return e.href=e.format(),e}if(e.protocol=t.protocol,t.host||tn[t.protocol])e.pathname=t.pathname;else{for(h=(t.pathname||"").split("/");h.length&&!(t.host=h.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),h[0]!==""&&h.unshift(""),2>h.length&&h.unshift(""),e.pathname=h.join("/")}return e.search=t.search,e.query=t.query,e.host=t.host||"",e.auth=t.auth,e.hostname=t.hostname||t.host,e.port=t.port,(e.pathname||e.search)&&(e.path=(e.pathname||"")+(e.search||"")),e.slashes=e.slashes||t.slashes,e.href=e.format(),e}n=e.pathname&&e.pathname.charAt(0)==="/";var l=t.host||t.pathname&&t.pathname.charAt(0)==="/",p=n=l||n||e.host&&t.pathname;if(r=e.pathname&&e.pathname.split("/")||[],o=e.protocol&&!Yt[e.protocol],h=t.pathname&&t.pathname.split("/")||[],o&&(e.hostname="",e.port=null,e.host&&(r[0]===""?r[0]=e.host:r.unshift(e.host)),e.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(h[0]===""?h[0]=t.host:h.unshift(t.host)),t.host=null),n=n&&(h[0]===""||r[0]==="")),l)e.host=t.host||t.host===""?t.host:e.host,e.hostname=t.hostname||t.hostname===""?t.hostname:e.hostname,e.search=t.search,e.query=t.query,r=h;else if(h.length)r||(r=[]),r.pop(),r=r.concat(h),e.search=t.search,e.query=t.query;else if(t.search!=null)return o&&(e.hostname=e.host=r.shift(),o=e.host&&0<e.host.indexOf("@")?e.host.split("@"):!1)&&(e.auth=o.shift(),e.host=e.hostname=o.shift()),e.search=t.search,e.query=t.query,(e.pathname!==null||e.search!==null)&&(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=e.format(),e;if(!r.length)return e.pathname=null,e.path=e.search?"/"+e.search:null,e.href=e.format(),e;l=r.slice(-1)[0],h=(e.host||t.host||1<r.length)&&(l==="."||l==="..")||l==="";for(var y=0,a=r.length;0<=a;a--)l=r[a],l==="."?r.splice(a,1):l===".."?(r.splice(a,1),y++):y&&(r.splice(a,1),y--);if(!n&&!p)for(;y--;y)r.unshift("..");return!n||r[0]===""||r[0]&&r[0].charAt(0)==="/"||r.unshift(""),h&&r.join("/").substr(-1)!=="/"&&r.push(""),p=r[0]===""||r[0]&&r[0].charAt(0)==="/",o&&(e.hostname=e.host=p?"":r.length?r.shift():"",o=e.host&&0<e.host.indexOf("@")?e.host.split("@"):!1)&&(e.auth=o.shift(),e.host=e.hostname=o.shift()),(n=n||e.host&&r.length)&&!p&&r.unshift(""),r.length?e.pathname=r.join("/"):(e.pathname=null,e.path=null),(e.pathname!==null||e.search!==null)&&(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.auth=t.auth||e.auth,e.slashes=e.slashes||t.slashes,e.href=e.format(),e};nt.prototype.parseHost=function(){return Ur(this)};function Ur(t){var e=t.host,n=ho.exec(e);n&&(n=n[0],n!==":"&&(t.port=n.substr(1)),e=e.substr(0,e.length-n.length)),e&&(t.hostname=e)}var jr=C(function(t,e){function n(h,l){return h=h[l],0<l&&(h==="/"||o&&h==="\\")}function r(h){var l=1<arguments.length&&arguments[1]!==void 0?arguments[1]:!0;if(o){var p=h;if(typeof p!="string")throw new TypeError("expected a string");if(p=p.replace(/[\\\/]+/g,"/"),l!==!1)if(l=p,p=l.length-1,2>p)p=l;else{for(;n(l,p);)p--;p=l.substr(0,p+1)}return p.replace(/^([a-zA-Z]+:|\.\/)/,"")}return h}Object.defineProperty(e,"__esModule",{value:!0}),e.unixify=r,e.correctPath=function(h){return r(h.replace(/^\\\\\?\\.:\\/,"\\"))};var o=Pt.platform==="win32"});D(jr);var Tt=C(function(t,e){function n(f,i){return i===void 0&&(i=x.default.cwd()),Kr(i,f)}function r(f,i){return typeof f=="function"?[o(),f]:[o(f),g(i)]}function o(f){return f===void 0&&(f={}),$({},Qr,f)}function h(f){return typeof f=="number"?$({},dn,{mode:f}):$({},dn,f)}function l(f,i,s,u){i===void 0&&(i=""),s===void 0&&(s=""),u===void 0&&(u="");var d="";switch(s&&(d=" '"+s+"'"),u&&(d+=" -> '"+u+"'"),f){case"ENOENT":return"ENOENT: no such file or directory, "+i+d;case"EBADF":return"EBADF: bad file descriptor, "+i+d;case"EINVAL":return"EINVAL: invalid argument, "+i+d;case"EPERM":return"EPERM: operation not permitted, "+i+d;case"EPROTO":return"EPROTO: protocol error, "+i+d;case"EEXIST":return"EEXIST: file already exists, "+i+d;case"ENOTDIR":return"ENOTDIR: not a directory, "+i+d;case"EISDIR":return"EISDIR: illegal operation on a directory, "+i+d;case"EACCES":return"EACCES: permission denied, "+i+d;case"ENOTEMPTY":return"ENOTEMPTY: directory not empty, "+i+d;case"EMFILE":return"EMFILE: too many open files, "+i+d;case"ENOSYS":return"ENOSYS: function not implemented, "+i+d;default:return f+": error occurred, "+i+d}}function p(f,i,s,u,d){return i===void 0&&(i=""),s===void 0&&(s=""),u===void 0&&(u=""),d===void 0&&(d=Error),i=new d(l(f,i,s,u)),i.code=f,i}function y(f){if(typeof f=="number")return f;if(typeof f=="string"){var i=mt[f];if(typeof i!="undefined")return i}throw new $t.TypeError("ERR_INVALID_OPT_VALUE","flags",f)}function a(f,i){if(i){var s=typeof i;switch(s){case"string":f=$({},f,{encoding:i});break;case"object":f=$({},f,i);break;default:throw TypeError("Expected options to be either an object or a string, but got "+s+" instead")}}else return f;return f.encoding!=="buffer"&&G.assertEncoding(f.encoding),f}function c(f){return function(i){return a(f,i)}}function g(f){if(typeof f!="function")throw TypeError(it.CB);return f}function v(f){return function(i,s){return typeof i=="function"?[f(),i]:[f(i),g(s)]}}function m(f){if(typeof f!="string"&&!A.Buffer.isBuffer(f)){try{if(!(f instanceof so.URL))throw new TypeError(it.PATH_STR)}catch(u){throw new TypeError(it.PATH_STR)}if(f.hostname!=="")throw new $t.TypeError("ERR_INVALID_FILE_URL_HOST",x.default.platform);f=f.pathname;for(var i=0;i<f.length;i++)if(f[i]==="%"){var s=f.codePointAt(i+2)|32;if(f[i+1]==="2"&&s===102)throw new $t.TypeError("ERR_INVALID_FILE_URL_PATH","must not include encoded / characters")}f=decodeURIComponent(f)}return f=String(f),Wt(f),f}function S(f,i){return(f=n(f,i).substr(1))?f.split(Z):[]}function B(f){return S(m(f))}function ft(f,i){return i===void 0&&(i=G.ENCODING_UTF8),A.Buffer.isBuffer(f)?f:f instanceof Uint8Array?A.bufferFrom(f):A.bufferFrom(String(f),i)}function At(f,i){return i&&i!=="buffer"?f.toString(i):f}function Wt(f,i){if((""+f).indexOf("\0")!==-1){if(f=Error("Path must be a string without null bytes"),f.code="ENOENT",typeof i!="function")throw f;return x.default.nextTick(i,f),!1}return!0}function j(f,i){if(f=typeof f=="number"?f:typeof f=="string"?parseInt(f,8):i?j(i):void 0,typeof f!="number"||isNaN(f))throw new TypeError(it.MODE_INT);return f}function Vt(f){if(f>>>0!==f)throw TypeError(it.FD)}function rt(f){if(typeof f=="string"&&+f==f)return+f;if(f instanceof Date)return f.getTime()/1e3;if(isFinite(f))return 0>f?Date.now()/1e3:f;throw Error("Cannot parse time: "+f)}function Nt(f){if(typeof f!="number")throw TypeError(it.UID)}function It(f){if(typeof f!="number")throw TypeError(it.GID)}function qr(f){f.emit("stop")}function J(f,i,s){if(!(this instanceof J))return new J(f,i,s);if(this._vol=f,s=$({},a(s,{})),s.highWaterMark===void 0&&(s.highWaterMark=65536),V.Readable.call(this,s),this.path=m(i),this.fd=s.fd===void 0?null:s.fd,this.flags=s.flags===void 0?"r":s.flags,this.mode=s.mode===void 0?438:s.mode,this.start=s.start,this.end=s.end,this.autoClose=s.autoClose===void 0?!0:s.autoClose,this.pos=void 0,this.bytesRead=0,this.start!==void 0){if(typeof this.start!="number")throw new TypeError('"start" option must be a Number');if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw new TypeError('"end" option must be a Number');if(this.start>this.end)throw Error('"start" option must be <= "end" option');this.pos=this.start}typeof this.fd!="number"&&this.open(),this.on("end",function(){this.autoClose&&this.destroy&&this.destroy()})}function zr(){this.close()}function q(f,i,s){if(!(this instanceof q))return new q(f,i,s);if(this._vol=f,s=$({},a(s,{})),V.Writable.call(this,s),this.path=m(i),this.fd=s.fd===void 0?null:s.fd,this.flags=s.flags===void 0?"w":s.flags,this.mode=s.mode===void 0?438:s.mode,this.start=s.start,this.autoClose=s.autoClose===void 0?!0:!!s.autoClose,this.pos=void 0,this.bytesWritten=0,this.start!==void 0){if(typeof this.start!="number")throw new TypeError('"start" option must be a Number');if(0>this.start)throw Error('"start" must be >= zero');this.pos=this.start}s.encoding&&this.setDefaultEncoding(s.encoding),typeof this.fd!="number"&&this.open(),this.once("finish",function(){this.autoClose&&this.close()})}var Lt=k&&k.__extends||function(){function f(i,s){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var w in d)d.hasOwnProperty(w)&&(u[w]=d[w])},f(i,s)}return function(i,s){function u(){this.constructor=i}f(i,s),i.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Ee=k&&k.__spreadArrays||function(){for(var f=0,i=0,s=arguments.length;i<s;i++)f+=arguments[i].length;f=Array(f);var u=0;for(i=0;i<s;i++)for(var d=arguments[i],w=0,E=d.length;w<E;w++,u++)f[u]=d[w];return f};Object.defineProperty(e,"__esModule",{value:!0});var $=bi.extend,Kr=Ke.resolve,re=R.constants.O_RDONLY,kt=R.constants.O_WRONLY,lt=R.constants.O_RDWR,X=R.constants.O_CREAT,ie=R.constants.O_EXCL,qt=R.constants.O_TRUNC,zt=R.constants.O_APPEND,rn=R.constants.O_SYNC,Gr=R.constants.O_DIRECTORY,on=R.constants.F_OK,Hr=R.constants.COPYFILE_EXCL,Jr=R.constants.COPYFILE_FICLONE_FORCE,Z=Ke.sep,sn=Ke.relative,Se=x.default.platform==="win32",it={PATH_STR:"path must be a string or Buffer",FD:"fd must be a file descriptor",MODE_INT:"mode must be an int",CB:"callback must be a function",UID:"uid must be an unsigned int",GID:"gid must be an unsigned int",LEN:"len must be an integer",ATIME:"atime must be an integer",MTIME:"mtime must be an integer",PREFIX:"filename prefix is required",BUFFER:"buffer must be an instance of Buffer or StaticBuffer",OFFSET:"offset must be an integer",LENGTH:"length must be an integer",POSITION:"position must be an integer"},mt;(function(f){f[f.r=re]="r",f[f["r+"]=lt]="r+",f[f.rs=re|rn]="rs",f[f.sr=f.rs]="sr",f[f["rs+"]=lt|rn]="rs+",f[f["sr+"]=f["rs+"]]="sr+",f[f.w=kt|X|qt]="w",f[f.wx=kt|X|qt|ie]="wx",f[f.xw=f.wx]="xw",f[f["w+"]=lt|X|qt]="w+",f[f["wx+"]=lt|X|qt|ie]="wx+",f[f["xw+"]=f["wx+"]]="xw+",f[f.a=kt|zt|X]="a",f[f.ax=kt|zt|X|ie]="ax",f[f.xa=f.ax]="xa",f[f["a+"]=lt|zt|X]="a+",f[f["ax+"]=lt|zt|X|ie]="ax+",f[f["xa+"]=f["ax+"]]="xa+"})(mt=e.FLAGS||(e.FLAGS={})),e.flagsToNumber=y,t={encoding:"utf8"};var oe=c(t),un=v(oe),hn=c({flag:"r"}),fn={encoding:"utf8",mode:438,flag:mt[mt.w]},ln=c(fn),pn={encoding:"utf8",mode:438,flag:mt[mt.a]},cn=c(pn),Xr=v(cn),an=c(t),Zr=v(an),dn={mode:511,recursive:!1},yn={recursive:!1},gn=c({encoding:"utf8",withFileTypes:!1}),$r=v(gn),Qr={bigint:!1};if(e.pathToFilename=m,Se){var br=n,ti=jr.unixify;n=function(f,i){return ti(br(f,i))}}e.filenameToSteps=S,e.pathToSteps=B,e.dataToStr=function(f,i){return i===void 0&&(i=G.ENCODING_UTF8),A.Buffer.isBuffer(f)?f.toString(i):f instanceof Uint8Array?A.bufferFrom(f).toString(i):String(f)},e.dataToBuffer=ft,e.bufferToEncoding=At,e.toUnixTimestamp=rt,t=function(){function f(i){i===void 0&&(i={}),this.ino=0,this.inodes={},this.releasedInos=[],this.fds={},this.releasedFds=[],this.maxFiles=1e4,this.openFiles=0,this.promisesApi=Ir.default(this),this.statWatchers={},this.props=$({Node:bt.Node,Link:bt.Link,File:bt.File},i),i=this.createLink(),i.setNode(this.createNode(!0));var s=this;this.StatWatcher=function(u){function d(){return u.call(this,s)||this}return Lt(d,u),d}(mn),this.ReadStream=function(u){function d(){for(var w=[],E=0;E<arguments.length;E++)w[E]=arguments[E];return u.apply(this,Ee([s],w))||this}return Lt(d,u),d}(J),this.WriteStream=function(u){function d(){for(var w=[],E=0;E<arguments.length;E++)w[E]=arguments[E];return u.apply(this,Ee([s],w))||this}return Lt(d,u),d}(q),this.FSWatcher=function(u){function d(){return u.call(this,s)||this}return Lt(d,u),d}(vn),this.root=i}return f.fromJSON=function(i,s){var u=new f;return u.fromJSON(i,s),u},Object.defineProperty(f.prototype,"promises",{get:function(){if(this.promisesApi===null)throw Error("Promise is not supported in this environment.");return this.promisesApi},enumerable:!0,configurable:!0}),f.prototype.createLink=function(i,s,u,d){if(u===void 0&&(u=!1),!i)return new this.props.Link(this,null,"");if(!s)throw Error("createLink: name cannot be empty");return i.createChild(s,this.createNode(u,d))},f.prototype.deleteLink=function(i){var s=i.parent;return s?(s.deleteChild(i),!0):!1},f.prototype.newInoNumber=function(){var i=this.releasedInos.pop();return i||(this.ino=(this.ino+1)%4294967295)},f.prototype.newFdNumber=function(){var i=this.releasedFds.pop();return typeof i=="number"?i:f.fd--},f.prototype.createNode=function(i,s){return i===void 0&&(i=!1),s=new this.props.Node(this.newInoNumber(),s),i&&s.setIsDirectory(),this.inodes[s.ino]=s},f.prototype.getNode=function(i){return this.inodes[i]},f.prototype.deleteNode=function(i){i.del(),delete this.inodes[i.ino],this.releasedInos.push(i.ino)},f.prototype.genRndStr=function(){var i=(Math.random()+1).toString(36).substr(2,6);return i.length===6?i:this.genRndStr()},f.prototype.getLink=function(i){return this.root.walk(i)},f.prototype.getLinkOrThrow=function(i,s){var u=S(i);if(u=this.getLink(u),!u)throw p("ENOENT",s,i);return u},f.prototype.getResolvedLink=function(i){i=typeof i=="string"?S(i):i;for(var s=this.root,u=0;u<i.length;){if(s=s.getChild(i[u]),!s)return null;var d=s.getNode();d.isSymlink()?(i=d.symlink.concat(i.slice(u+1)),s=this.root,u=0):u++}return s},f.prototype.getResolvedLinkOrThrow=function(i,s){var u=this.getResolvedLink(i);if(!u)throw p("ENOENT",s,i);return u},f.prototype.resolveSymlinks=function(i){return this.getResolvedLink(i.steps.slice(1))},f.prototype.getLinkAsDirOrThrow=function(i,s){var u=this.getLinkOrThrow(i,s);if(!u.getNode().isDirectory())throw p("ENOTDIR",s,i);return u},f.prototype.getLinkParent=function(i){return this.root.walk(i,i.length-1)},f.prototype.getLinkParentAsDirOrThrow=function(i,s){i=i instanceof Array?i:S(i);var u=this.getLinkParent(i);if(!u)throw p("ENOENT",s,Z+i.join(Z));if(!u.getNode().isDirectory())throw p("ENOTDIR",s,Z+i.join(Z));return u},f.prototype.getFileByFd=function(i){return this.fds[String(i)]},f.prototype.getFileByFdOrThrow=function(i,s){if(i>>>0!==i)throw TypeError(it.FD);if(i=this.getFileByFd(i),!i)throw p("EBADF",s);return i},f.prototype.getNodeByIdOrCreate=function(i,s,u){if(typeof i=="number"){if(i=this.getFileByFd(i),!i)throw Error("File nto found");return i.node}var d=B(i),w=this.getLink(d);if(w)return w.getNode();if(s&X&&(s=this.getLinkParent(d)))return w=this.createLink(s,d[d.length-1],!1,u),w.getNode();throw p("ENOENT","getNodeByIdOrCreate",m(i))},f.prototype.wrapAsync=function(i,s,u){var d=this;g(u),Ut.default(function(){try{u(null,i.apply(d,s))}catch(w){u(w)}})},f.prototype._toJSON=function(i,s,u){var d;i===void 0&&(i=this.root),s===void 0&&(s={});var w=!0,E=i.children;i.getNode().isFile()&&(E=(d={},d[i.getName()]=i.parent.getChild(i.getName()),d),i=i.parent);for(var L in E){if(w=!1,E=i.getChild(L),!E)throw Error("_toJSON: unexpected undefined");d=E.getNode(),d.isFile()?(E=E.getPath(),u&&(E=sn(u,E)),s[E]=d.getString()):d.isDirectory()&&this._toJSON(E,s,u)}return i=i.getPath(),u&&(i=sn(u,i)),i&&w&&(s[i]=null),s},f.prototype.toJSON=function(i,s,u){s===void 0&&(s={}),u===void 0&&(u=!1);var d=[];if(i){i instanceof Array||(i=[i]);for(var w=0;w<i.length;w++){var E=m(i[w]);(E=this.getResolvedLink(E))&&d.push(E)}}else d.push(this.root);if(!d.length)return s;for(w=0;w<d.length;w++)E=d[w],this._toJSON(E,s,u?E.getPath():"");return s},f.prototype.fromJSON=function(i,s){s===void 0&&(s=x.default.cwd());for(var u in i){var d=i[u];if(typeof d=="string"){u=n(u,s);var w=S(u);1<w.length&&(w=Z+w.slice(0,w.length-1).join(Z),this.mkdirpBase(w,511)),this.writeFileSync(u,d)}else this.mkdirpBase(u,511)}},f.prototype.reset=function(){this.ino=0,this.inodes={},this.releasedInos=[],this.fds={},this.releasedFds=[],this.openFiles=0,this.root=this.createLink(),this.root.setNode(this.createNode(!0))},f.prototype.mountSync=function(i,s){this.fromJSON(s,i)},f.prototype.openLink=function(i,s,u){if(u===void 0&&(u=!0),this.openFiles>=this.maxFiles)throw p("EMFILE","open",i.getPath());var d=i;if(u&&(d=this.resolveSymlinks(i)),!d)throw p("ENOENT","open",i.getPath());if(u=d.getNode(),u.isDirectory()){if((s&(re|lt|kt))!==re)throw p("EISDIR","open",i.getPath())}else if(s&Gr)throw p("ENOTDIR","open",i.getPath());if(!(s&kt||u.canRead()))throw p("EACCES","open",i.getPath());return i=new this.props.File(i,u,s,this.newFdNumber()),this.fds[i.fd]=i,this.openFiles++,s&qt&&i.truncate(),i},f.prototype.openFile=function(i,s,u,d){d===void 0&&(d=!0);var w=S(i),E=d?this.getResolvedLink(w):this.getLink(w);if(!E&&s&X){var L=this.getResolvedLink(w.slice(0,w.length-1));if(!L)throw p("ENOENT","open",Z+w.join(Z));s&X&&typeof u=="number"&&(E=this.createLink(L,w[w.length-1],!1,u))}if(E)return this.openLink(E,s,d);throw p("ENOENT","open",i)},f.prototype.openBase=function(i,s,u,d){if(d===void 0&&(d=!0),s=this.openFile(i,s,u,d),!s)throw p("ENOENT","open",i);return s.fd},f.prototype.openSync=function(i,s,u){return u===void 0&&(u=438),u=j(u),i=m(i),s=y(s),this.openBase(i,s,u)},f.prototype.open=function(i,s,u,d){var w=u;typeof u=="function"&&(w=438,d=u),u=j(w||438),i=m(i),s=y(s),this.wrapAsync(this.openBase,[i,s,u],d)},f.prototype.closeFile=function(i){this.fds[i.fd]&&(this.openFiles--,delete this.fds[i.fd],this.releasedFds.push(i.fd))},f.prototype.closeSync=function(i){Vt(i),i=this.getFileByFdOrThrow(i,"close"),this.closeFile(i)},f.prototype.close=function(i,s){Vt(i),this.wrapAsync(this.closeSync,[i],s)},f.prototype.openFileOrGetById=function(i,s,u){if(typeof i=="number"){if(i=this.fds[i],!i)throw p("ENOENT");return i}return this.openFile(m(i),s,u)},f.prototype.readBase=function(i,s,u,d,w){return this.getFileByFdOrThrow(i).read(s,Number(u),Number(d),w)},f.prototype.readSync=function(i,s,u,d,w){return Vt(i),this.readBase(i,s,u,d,w)},f.prototype.read=function(i,s,u,d,w,E){var L=this;if(g(E),d===0)return x.default.nextTick(function(){E&&E(null,0,s)});Ut.default(function(){try{var Y=L.readBase(i,s,u,d,w);E(null,Y,s)}catch(pt){E(pt)}})},f.prototype.readFileBase=function(i,s,u){var d=typeof i=="number"&&i>>>0===i;if(!d){var w=m(i);if(w=S(w),(w=this.getResolvedLink(w))&&w.getNode().isDirectory())throw p("EISDIR","open",w.getPath());i=this.openSync(i,s)}try{var E=At(this.getFileByFdOrThrow(i).getBuffer(),u)}finally{d||this.closeSync(i)}return E},f.prototype.readFileSync=function(i,s){s=hn(s);var u=y(s.flag);return this.readFileBase(i,u,s.encoding)},f.prototype.readFile=function(i,s,u){u=v(hn)(s,u),s=u[0],u=u[1];var d=y(s.flag);this.wrapAsync(this.readFileBase,[i,d,s.encoding],u)},f.prototype.writeBase=function(i,s,u,d,w){return this.getFileByFdOrThrow(i,"write").write(s,u,d,w)},f.prototype.writeSync=function(i,s,u,d,w){Vt(i);var E=typeof s!="string";if(E){var L=(u||0)|0,Y=d;u=w}else var pt=d;return s=ft(s,pt),E?typeof Y=="undefined"&&(Y=s.length):(L=0,Y=s.length),this.writeBase(i,s,L,Y,u)},f.prototype.write=function(i,s,u,d,w,E){var L=this;Vt(i);var Y=typeof s,pt=typeof u,wn=typeof d,_n=typeof w;if(Y!=="string")if(pt==="function")var vt=u;else if(wn==="function"){var se=u|0;vt=d}else if(_n==="function"){se=u|0;var Kt=d;vt=w}else{se=u|0,Kt=d;var Re=w;vt=E}else if(pt==="function")vt=u;else if(wn==="function")Re=u,vt=d;else if(_n==="function"){Re=u;var ei=d;vt=w}var ue=ft(s,ei);Y!=="string"?typeof Kt=="undefined"&&(Kt=ue.length):(se=0,Kt=ue.length);var Oe=g(vt);Ut.default(function(){try{var En=L.writeBase(i,ue,se,Kt,Re);Y!=="string"?Oe(null,En,ue):Oe(null,En,s)}catch(ni){Oe(ni)}})},f.prototype.writeFileBase=function(i,s,u,d){var w=typeof i=="number";i=w?i:this.openBase(m(i),u,d),d=0;var E=s.length;u=u&zt?void 0:0;try{for(;0<E;){var L=this.writeSync(i,s,d,E,u);d+=L,E-=L,u!==void 0&&(u+=L)}}finally{w||this.closeSync(i)}},f.prototype.writeFileSync=function(i,s,u){var d=ln(u);u=y(d.flag);var w=j(d.mode);s=ft(s,d.encoding),this.writeFileBase(i,s,u,w)},f.prototype.writeFile=function(i,s,u,d){var w=u;typeof u=="function"&&(w=fn,d=u),u=g(d);var E=ln(w);w=y(E.flag),d=j(E.mode),s=ft(s,E.encoding),this.wrapAsync(this.writeFileBase,[i,s,w,d],u)},f.prototype.linkBase=function(i,s){var u=S(i),d=this.getLink(u);if(!d)throw p("ENOENT","link",i,s);var w=S(s);if(u=this.getLinkParent(w),!u)throw p("ENOENT","link",i,s);if(w=w[w.length-1],u.getChild(w))throw p("EEXIST","link",i,s);i=d.getNode(),i.nlink++,u.createChild(w,i)},f.prototype.copyFileBase=function(i,s,u){var d=this.readFileSync(i);if(u&Hr&&this.existsSync(s))throw p("EEXIST","copyFile",i,s);if(u&Jr)throw p("ENOSYS","copyFile",i,s);this.writeFileBase(s,d,mt.w,438)},f.prototype.copyFileSync=function(i,s,u){return i=m(i),s=m(s),this.copyFileBase(i,s,(u||0)|0)},f.prototype.copyFile=function(i,s,u,d){if(i=m(i),s=m(s),typeof u=="function")var w=0;else w=u,u=d;g(u),this.wrapAsync(this.copyFileBase,[i,s,w],u)},f.prototype.linkSync=function(i,s){i=m(i),s=m(s),this.linkBase(i,s)},f.prototype.link=function(i,s,u){i=m(i),s=m(s),this.wrapAsync(this.linkBase,[i,s],u)},f.prototype.unlinkBase=function(i){var s=S(i);if(s=this.getLink(s),!s)throw p("ENOENT","unlink",i);if(s.length)throw Error("Dir not empty...");this.deleteLink(s),i=s.getNode(),i.nlink--,0>=i.nlink&&this.deleteNode(i)},f.prototype.unlinkSync=function(i){i=m(i),this.unlinkBase(i)},f.prototype.unlink=function(i,s){i=m(i),this.wrapAsync(this.unlinkBase,[i],s)},f.prototype.symlinkBase=function(i,s){var u=S(s),d=this.getLinkParent(u);if(!d)throw p("ENOENT","symlink",i,s);if(u=u[u.length-1],d.getChild(u))throw p("EEXIST","symlink",i,s);return s=d.createChild(u),s.getNode().makeSymlink(S(i)),s},f.prototype.symlinkSync=function(i,s){i=m(i),s=m(s),this.symlinkBase(i,s)},f.prototype.symlink=function(i,s,u,d){u=g(typeof u=="function"?u:d),i=m(i),s=m(s),this.wrapAsync(this.symlinkBase,[i,s],u)},f.prototype.realpathBase=function(i,s){var u=S(i);if(u=this.getResolvedLink(u),!u)throw p("ENOENT","realpath",i);return G.strToEncoding(u.getPath(),s)},f.prototype.realpathSync=function(i,s){return this.realpathBase(m(i),an(s).encoding)},f.prototype.realpath=function(i,s,u){u=Zr(s,u),s=u[0],u=u[1],i=m(i),this.wrapAsync(this.realpathBase,[i,s.encoding],u)},f.prototype.lstatBase=function(i,s){s===void 0&&(s=!1);var u=this.getLink(S(i));if(!u)throw p("ENOENT","lstat",i);return Ft.default.build(u.getNode(),s)},f.prototype.lstatSync=function(i,s){return this.lstatBase(m(i),o(s).bigint)},f.prototype.lstat=function(i,s,u){u=r(s,u),s=u[0],u=u[1],this.wrapAsync(this.lstatBase,[m(i),s.bigint],u)},f.prototype.statBase=function(i,s){s===void 0&&(s=!1);var u=this.getResolvedLink(S(i));if(!u)throw p("ENOENT","stat",i);return Ft.default.build(u.getNode(),s)},f.prototype.statSync=function(i,s){return this.statBase(m(i),o(s).bigint)},f.prototype.stat=function(i,s,u){u=r(s,u),s=u[0],u=u[1],this.wrapAsync(this.statBase,[m(i),s.bigint],u)},f.prototype.fstatBase=function(i,s){if(s===void 0&&(s=!1),i=this.getFileByFd(i),!i)throw p("EBADF","fstat");return Ft.default.build(i.node,s)},f.prototype.fstatSync=function(i,s){return this.fstatBase(i,o(s).bigint)},f.prototype.fstat=function(i,s,u){s=r(s,u),this.wrapAsync(this.fstatBase,[i,s[0].bigint],s[1])},f.prototype.renameBase=function(i,s){var u=this.getLink(S(i));if(!u)throw p("ENOENT","rename",i,s);var d=S(s),w=this.getLinkParent(d);if(!w)throw p("ENOENT","rename",i,s);(i=u.parent)&&i.deleteChild(u),u.steps=Ee(w.steps,[d[d.length-1]]),w.setChild(u.getName(),u)},f.prototype.renameSync=function(i,s){i=m(i),s=m(s),this.renameBase(i,s)},f.prototype.rename=function(i,s,u){i=m(i),s=m(s),this.wrapAsync(this.renameBase,[i,s],u)},f.prototype.existsBase=function(i){return!!this.statBase(i)},f.prototype.existsSync=function(i){try{return this.existsBase(m(i))}catch(s){return!1}},f.prototype.exists=function(i,s){var u=this,d=m(i);if(typeof s!="function")throw Error(it.CB);Ut.default(function(){try{s(u.existsBase(d))}catch(w){s(!1)}})},f.prototype.accessBase=function(i){this.getLinkOrThrow(i,"access")},f.prototype.accessSync=function(i,s){s===void 0&&(s=on),i=m(i),this.accessBase(i,s|0)},f.prototype.access=function(i,s,u){var d=on;typeof s!="function"&&(d=s|0,s=g(u)),i=m(i),this.wrapAsync(this.accessBase,[i,d],s)},f.prototype.appendFileSync=function(i,s,u){u===void 0&&(u=pn),u=cn(u),u.flag&&i>>>0!==i||(u.flag="a"),this.writeFileSync(i,s,u)},f.prototype.appendFile=function(i,s,u,d){d=Xr(u,d),u=d[0],d=d[1],u.flag&&i>>>0!==i||(u.flag="a"),this.writeFile(i,s,u,d)},f.prototype.readdirBase=function(i,s){var u=S(i);if(u=this.getResolvedLink(u),!u)throw p("ENOENT","readdir",i);if(!u.getNode().isDirectory())throw p("ENOTDIR","scandir",i);if(s.withFileTypes){var d=[];for(w in u.children)(i=u.getChild(w))&&d.push(We.default.build(i,s.encoding));return Se||s.encoding==="buffer"||d.sort(function(E,L){return E.name<L.name?-1:E.name>L.name?1:0}),d}var w=[];for(d in u.children)w.push(G.strToEncoding(d,s.encoding));return Se||s.encoding==="buffer"||w.sort(),w},f.prototype.readdirSync=function(i,s){return s=gn(s),i=m(i),this.readdirBase(i,s)},f.prototype.readdir=function(i,s,u){u=$r(s,u),s=u[0],u=u[1],i=m(i),this.wrapAsync(this.readdirBase,[i,s],u)},f.prototype.readlinkBase=function(i,s){var u=this.getLinkOrThrow(i,"readlink").getNode();if(!u.isSymlink())throw p("EINVAL","readlink",i);return i=Z+u.symlink.join(Z),G.strToEncoding(i,s)},f.prototype.readlinkSync=function(i,s){return s=oe(s),i=m(i),this.readlinkBase(i,s.encoding)},f.prototype.readlink=function(i,s,u){u=un(s,u),s=u[0],u=u[1],i=m(i),this.wrapAsync(this.readlinkBase,[i,s.encoding],u)},f.prototype.fsyncBase=function(i){this.getFileByFdOrThrow(i,"fsync")},f.prototype.fsyncSync=function(i){this.fsyncBase(i)},f.prototype.fsync=function(i,s){this.wrapAsync(this.fsyncBase,[i],s)},f.prototype.fdatasyncBase=function(i){this.getFileByFdOrThrow(i,"fdatasync")},f.prototype.fdatasyncSync=function(i){this.fdatasyncBase(i)},f.prototype.fdatasync=function(i,s){this.wrapAsync(this.fdatasyncBase,[i],s)},f.prototype.ftruncateBase=function(i,s){this.getFileByFdOrThrow(i,"ftruncate").truncate(s)},f.prototype.ftruncateSync=function(i,s){this.ftruncateBase(i,s)},f.prototype.ftruncate=function(i,s,u){var d=typeof s=="number"?s:0;s=g(typeof s=="number"?u:s),this.wrapAsync(this.ftruncateBase,[i,d],s)},f.prototype.truncateBase=function(i,s){i=this.openSync(i,"r+");try{this.ftruncateSync(i,s)}finally{this.closeSync(i)}},f.prototype.truncateSync=function(i,s){if(i>>>0===i)return this.ftruncateSync(i,s);this.truncateBase(i,s)},f.prototype.truncate=function(i,s,u){var d=typeof s=="number"?s:0;if(s=g(typeof s=="number"?u:s),i>>>0===i)return this.ftruncate(i,d,s);this.wrapAsync(this.truncateBase,[i,d],s)},f.prototype.futimesBase=function(i,s,u){i=this.getFileByFdOrThrow(i,"futimes").node,i.atime=new Date(1e3*s),i.mtime=new Date(1e3*u)},f.prototype.futimesSync=function(i,s,u){this.futimesBase(i,rt(s),rt(u))},f.prototype.futimes=function(i,s,u,d){this.wrapAsync(this.futimesBase,[i,rt(s),rt(u)],d)},f.prototype.utimesBase=function(i,s,u){i=this.openSync(i,"r+");try{this.futimesBase(i,s,u)}finally{this.closeSync(i)}},f.prototype.utimesSync=function(i,s,u){this.utimesBase(m(i),rt(s),rt(u))},f.prototype.utimes=function(i,s,u,d){this.wrapAsync(this.utimesBase,[m(i),rt(s),rt(u)],d)},f.prototype.mkdirBase=function(i,s){var u=S(i);if(!u.length)throw p("EISDIR","mkdir",i);var d=this.getLinkParentAsDirOrThrow(i,"mkdir");if(u=u[u.length-1],d.getChild(u))throw p("EEXIST","mkdir",i);d.createChild(u,this.createNode(!0,s))},f.prototype.mkdirpBase=function(i,s){i=S(i);for(var u=this.root,d=0;d<i.length;d++){var w=i[d];if(!u.getNode().isDirectory())throw p("ENOTDIR","mkdir",u.getPath());var E=u.getChild(w);if(E)if(E.getNode().isDirectory())u=E;else throw p("ENOTDIR","mkdir",E.getPath());else u=u.createChild(w,this.createNode(!0,s))}},f.prototype.mkdirSync=function(i,s){s=h(s);var u=j(s.mode,511);i=m(i),s.recursive?this.mkdirpBase(i,u):this.mkdirBase(i,u)},f.prototype.mkdir=function(i,s,u){var d=h(s);s=g(typeof s=="function"?s:u),u=j(d.mode,511),i=m(i),d.recursive?this.wrapAsync(this.mkdirpBase,[i,u],s):this.wrapAsync(this.mkdirBase,[i,u],s)},f.prototype.mkdirpSync=function(i,s){this.mkdirSync(i,{mode:s,recursive:!0})},f.prototype.mkdirp=function(i,s,u){var d=typeof s=="function"?void 0:s;s=g(typeof s=="function"?s:u),this.mkdir(i,{mode:d,recursive:!0},s)},f.prototype.mkdtempBase=function(i,s,u){u===void 0&&(u=5);var d=i+this.genRndStr();try{return this.mkdirBase(d,511),G.strToEncoding(d,s)}catch(w){if(w.code==="EEXIST"){if(1<u)return this.mkdtempBase(i,s,u-1);throw Error("Could not create temp dir.")}throw w}},f.prototype.mkdtempSync=function(i,s){if(s=oe(s).encoding,!i||typeof i!="string")throw new TypeError("filename prefix is required");return Wt(i),this.mkdtempBase(i,s)},f.prototype.mkdtemp=function(i,s,u){if(u=un(s,u),s=u[0].encoding,u=u[1],!i||typeof i!="string")throw new TypeError("filename prefix is required");Wt(i)&&this.wrapAsync(this.mkdtempBase,[i,s],u)},f.prototype.rmdirBase=function(i,s){s=$({},yn,s);var u=this.getLinkAsDirOrThrow(i,"rmdir");if(u.length&&!s.recursive)throw p("ENOTEMPTY","rmdir",i);this.deleteLink(u)},f.prototype.rmdirSync=function(i,s){this.rmdirBase(m(i),s)},f.prototype.rmdir=function(i,s,u){var d=$({},yn,s);s=g(typeof s=="function"?s:u),this.wrapAsync(this.rmdirBase,[m(i),d],s)},f.prototype.fchmodBase=function(i,s){this.getFileByFdOrThrow(i,"fchmod").chmod(s)},f.prototype.fchmodSync=function(i,s){this.fchmodBase(i,j(s))},f.prototype.fchmod=function(i,s,u){this.wrapAsync(this.fchmodBase,[i,j(s)],u)},f.prototype.chmodBase=function(i,s){i=this.openSync(i,"r+");try{this.fchmodBase(i,s)}finally{this.closeSync(i)}},f.prototype.chmodSync=function(i,s){s=j(s),i=m(i),this.chmodBase(i,s)},f.prototype.chmod=function(i,s,u){s=j(s),i=m(i),this.wrapAsync(this.chmodBase,[i,s],u)},f.prototype.lchmodBase=function(i,s){i=this.openBase(i,lt,0,!1);try{this.fchmodBase(i,s)}finally{this.closeSync(i)}},f.prototype.lchmodSync=function(i,s){s=j(s),i=m(i),this.lchmodBase(i,s)},f.prototype.lchmod=function(i,s,u){s=j(s),i=m(i),this.wrapAsync(this.lchmodBase,[i,s],u)},f.prototype.fchownBase=function(i,s,u){this.getFileByFdOrThrow(i,"fchown").chown(s,u)},f.prototype.fchownSync=function(i,s,u){Nt(s),It(u),this.fchownBase(i,s,u)},f.prototype.fchown=function(i,s,u,d){Nt(s),It(u),this.wrapAsync(this.fchownBase,[i,s,u],d)},f.prototype.chownBase=function(i,s,u){this.getResolvedLinkOrThrow(i,"chown").getNode().chown(s,u)},f.prototype.chownSync=function(i,s,u){Nt(s),It(u),this.chownBase(m(i),s,u)},f.prototype.chown=function(i,s,u,d){Nt(s),It(u),this.wrapAsync(this.chownBase,[m(i),s,u],d)},f.prototype.lchownBase=function(i,s,u){this.getLinkOrThrow(i,"lchown").getNode().chown(s,u)},f.prototype.lchownSync=function(i,s,u){Nt(s),It(u),this.lchownBase(m(i),s,u)},f.prototype.lchown=function(i,s,u,d){Nt(s),It(u),this.wrapAsync(this.lchownBase,[m(i),s,u],d)},f.prototype.watchFile=function(i,s,u){i=m(i);var d=s;if(typeof d=="function"&&(u=s,d=null),typeof u!="function")throw Error('"watchFile()" requires a listener function');s=5007;var w=!0;return d&&typeof d=="object"&&(typeof d.interval=="number"&&(s=d.interval),typeof d.persistent=="boolean"&&(w=d.persistent)),d=this.statWatchers[i],d||(d=new this.StatWatcher,d.start(i,w,s),this.statWatchers[i]=d),d.addListener("change",u),d},f.prototype.unwatchFile=function(i,s){i=m(i);var u=this.statWatchers[i];u&&(typeof s=="function"?u.removeListener("change",s):u.removeAllListeners("change"),u.listenerCount("change")===0&&(u.stop(),delete this.statWatchers[i]))},f.prototype.createReadStream=function(i,s){return new this.ReadStream(i,s)},f.prototype.createWriteStream=function(i,s){return new this.WriteStream(i,s)},f.prototype.watch=function(i,s,u){i=m(i);var d=s;typeof s=="function"&&(u=s,d=null);var w=oe(d);s=w.persistent,d=w.recursive,w=w.encoding,s===void 0&&(s=!0),d===void 0&&(d=!1);var E=new this.FSWatcher;return E.start(i,s,d,w),u&&E.addListener("change",u),E},f.fd=2147483647,f}(),e.Volume=t;var mn=function(f){function i(s){var u=f.call(this)||this;return u.onInterval=function(){try{var d=u.vol.statSync(u.filename);u.hasChanged(d)&&(u.emit("change",d,u.prev),u.prev=d)}finally{u.loop()}},u.vol=s,u}return Lt(i,f),i.prototype.loop=function(){this.timeoutRef=this.setTimeout(this.onInterval,this.interval)},i.prototype.hasChanged=function(s){return s.mtimeMs>this.prev.mtimeMs||s.nlink!==this.prev.nlink},i.prototype.start=function(s,u,d){u===void 0&&(u=!0),d===void 0&&(d=5007),this.filename=m(s),this.setTimeout=u?setTimeout:yr.default,this.interval=d,this.prev=this.vol.statSync(this.filename),this.loop()},i.prototype.stop=function(){clearTimeout(this.timeoutRef),x.default.nextTick(qr,this)},i}(O.EventEmitter);e.StatWatcher=mn;var z;Zt.inherits(J,V.Readable),e.ReadStream=J,J.prototype.open=function(){var f=this;this._vol.open(this.path,this.flags,this.mode,function(i,s){i?(f.autoClose&&f.destroy&&f.destroy(),f.emit("error",i)):(f.fd=s,f.emit("open",s),f.read())})},J.prototype._read=function(f){if(typeof this.fd!="number")return this.once("open",function(){this._read(f)});if(!this.destroyed){(!z||128>z.length-z.used)&&(z=A.bufferAllocUnsafe(this._readableState.highWaterMark),z.used=0);var i=z,s=Math.min(z.length-z.used,f),u=z.used;if(this.pos!==void 0&&(s=Math.min(this.end-this.pos+1,s)),0>=s)return this.push(null);var d=this;this._vol.read(this.fd,z,z.used,s,this.pos,function(w,E){w?(d.autoClose&&d.destroy&&d.destroy(),d.emit("error",w)):(w=null,0<E&&(d.bytesRead+=E,w=i.slice(u,u+E)),d.push(w))}),this.pos!==void 0&&(this.pos+=s),z.used+=s}},J.prototype._destroy=function(f,i){this.close(function(s){i(f||s)})},J.prototype.close=function(f){var i=this;if(f&&this.once("close",f),this.closed||typeof this.fd!="number"){if(typeof this.fd!="number"){this.once("open",zr);return}return x.default.nextTick(function(){return i.emit("close")})}this.closed=!0,this._vol.close(this.fd,function(s){s?i.emit("error",s):i.emit("close")}),this.fd=null},Zt.inherits(q,V.Writable),e.WriteStream=q,q.prototype.open=function(){this._vol.open(this.path,this.flags,this.mode,function(f,i){f?(this.autoClose&&this.destroy&&this.destroy(),this.emit("error",f)):(this.fd=i,this.emit("open",i))}.bind(this))},q.prototype._write=function(f,i,s){if(!(f instanceof A.Buffer))return this.emit("error",Error("Invalid data"));if(typeof this.fd!="number")return this.once("open",function(){this._write(f,i,s)});var u=this;this._vol.write(this.fd,f,0,f.length,this.pos,function(d,w){if(d)return u.autoClose&&u.destroy&&u.destroy(),s(d);u.bytesWritten+=w,s()}),this.pos!==void 0&&(this.pos+=f.length)},q.prototype._writev=function(f,i){if(typeof this.fd!="number")return this.once("open",function(){this._writev(f,i)});for(var s=this,u=f.length,d=Array(u),w=0,E=0;E<u;E++){var L=f[E].chunk;d[E]=L,w+=L.length}u=A.Buffer.concat(d),this._vol.write(this.fd,u,0,u.length,this.pos,function(Y,pt){if(Y)return s.destroy&&s.destroy(),i(Y);s.bytesWritten+=pt,i()}),this.pos!==void 0&&(this.pos+=w)},q.prototype._destroy=J.prototype._destroy,q.prototype.close=J.prototype.close,q.prototype.destroySoon=q.prototype.end;var vn=function(f){function i(s){var u=f.call(this)||this;return u._filename="",u._filenameEncoded="",u._recursive=!1,u._encoding=G.ENCODING_UTF8,u._onNodeChange=function(){u._emit("change")},u._onParentChild=function(d){d.getName()===u._getName()&&u._emit("rename")},u._emit=function(d){u.emit("change",d,u._filenameEncoded)},u._persist=function(){u._timer=setTimeout(u._persist,1e6)},u._vol=s,u}return Lt(i,f),i.prototype._getName=function(){return this._steps[this._steps.length-1]},i.prototype.start=function(s,u,d,w){u===void 0&&(u=!0),d===void 0&&(d=!1),w===void 0&&(w=G.ENCODING_UTF8),this._filename=m(s),this._steps=S(this._filename),this._filenameEncoded=G.strToEncoding(this._filename),this._recursive=d,this._encoding=w;try{this._link=this._vol.getLinkOrThrow(this._filename,"FSWatcher")}catch(E){throw u=Error("watch "+this._filename+" "+E.code),u.code=E.code,u.errno=E.code,u}this._link.getNode().on("change",this._onNodeChange),this._link.on("child:add",this._onNodeChange),this._link.on("child:delete",this._onNodeChange),(s=this._link.parent)&&(s.setMaxListeners(s.getMaxListeners()+1),s.on("child:delete",this._onParentChild)),u&&this._persist()},i.prototype.close=function(){clearTimeout(this._timer),this._link.getNode().removeListener("change",this._onNodeChange);var s=this._link.parent;s&&s.removeListener("child:delete",this._onParentChild)},i}(O.EventEmitter);e.FSWatcher=vn});D(Tt);var vo=Tt.pathToFilename,wo=Tt.filenameToSteps,Yr=Tt.Volume,nn=C(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.fsProps="constants F_OK R_OK W_OK X_OK Stats".split(" "),e.fsSyncMethods="renameSync ftruncateSync truncateSync chownSync fchownSync lchownSync chmodSync fchmodSync lchmodSync statSync lstatSync fstatSync linkSync symlinkSync readlinkSync realpathSync unlinkSync rmdirSync mkdirSync mkdirpSync readdirSync closeSync openSync utimesSync futimesSync fsyncSync writeSync readSync readFileSync writeFileSync appendFileSync existsSync accessSync fdatasyncSync mkdtempSync copyFileSync createReadStream createWriteStream".split(" "),e.fsAsyncMethods="rename ftruncate truncate chown fchown lchown chmod fchmod lchmod stat lstat fstat link symlink readlink realpath unlink rmdir mkdir mkdirp readdir close open utimes futimes fsync write read readFile writeFile appendFile exists access fdatasync mkdtemp copyFile watchFile unwatchFile watch".split(" ")});D(nn);var Wr=C(function(t,e){function n(c){for(var g={F_OK:l,R_OK:p,W_OK:y,X_OK:a,constants:R.constants,Stats:Ft.default,Dirent:We.default},v=0,m=o;v<m.length;v++){var S=m[v];typeof c[S]=="function"&&(g[S]=c[S].bind(c))}for(v=0,m=h;v<m.length;v++)S=m[v],typeof c[S]=="function"&&(g[S]=c[S].bind(c));return g.StatWatcher=c.StatWatcher,g.FSWatcher=c.FSWatcher,g.WriteStream=c.WriteStream,g.ReadStream=c.ReadStream,g.promises=c.promises,g._toUnixTimestamp=Tt.toUnixTimestamp,g}var r=k&&k.__assign||function(){return r=Object.assign||function(c){for(var g,v=1,m=arguments.length;v<m;v++){g=arguments[v];for(var S in g)Object.prototype.hasOwnProperty.call(g,S)&&(c[S]=g[S])}return c},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var o=nn.fsSyncMethods,h=nn.fsAsyncMethods,l=R.constants.F_OK,p=R.constants.R_OK,y=R.constants.W_OK,a=R.constants.X_OK;e.Volume=Tt.Volume,e.vol=new Tt.Volume,e.createFsFromVolume=n,e.fs=n(e.vol),t.exports=r(r({},t.exports),e.fs),t.exports.semantic=!0});D(Wr);var Vr=Wr.createFsFromVolume;Di.prototype.emit=function(t){for(var e,n,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];o=this.listeners(t);try{for(var h=Te(o),l=h.next();!l.done;l=h.next()){var p=l.value;try{p.apply(void 0,si(r))}catch(y){console.error(y)}}}catch(y){e={error:y}}finally{try{l&&!l.done&&(n=h.return)&&n.call(h)}finally{if(e)throw e.error}}return 0<o.length};var _o=function(){function t(){this.volume=new Yr,this.fs=Vr(this.volume),this.fromJSON({"/dev/stdin":"","/dev/stdout":"","/dev/stderr":""})}return t.prototype._toJSON=function(e,n,r){n===void 0&&(n={});var o=!0,h;for(h in e.children){o=!1;var l=e.getChild(h);if(l){var p=l.getNode();p&&p.isFile()?(l=l.getPath(),r&&(l=ze(r,l)),n[l]=p.getBuffer()):p&&p.isDirectory()&&this._toJSON(l,n,r)}}return e=e.getPath(),r&&(e=ze(r,e)),e&&o&&(n[e]=null),n},t.prototype.toJSON=function(e,n,r){var o,h;n===void 0&&(n={}),r===void 0&&(r=!1);var l=[];if(e){e instanceof Array||(e=[e]);try{for(var p=Te(e),y=p.next();!y.done;y=p.next()){var a=vo(y.value),c=this.volume.getResolvedLink(a);c&&l.push(c)}}catch(B){var g={error:B}}finally{try{y&&!y.done&&(o=p.return)&&o.call(p)}finally{if(g)throw g.error}}}else l.push(this.volume.root);if(!l.length)return n;try{for(var v=Te(l),m=v.next();!m.done;m=v.next())c=m.value,this._toJSON(c,n,r?c.getPath():"")}catch(B){var S={error:B}}finally{try{m&&!m.done&&(h=v.return)&&h.call(v)}finally{if(S)throw S.error}}return n},t.prototype.fromJSONFixed=function(e,n){for(var r in n){var o=n[r];if(o?Object.getPrototypeOf(o)!==null:o!==null){var h=wo(r);1<h.length&&(h="/"+h.slice(0,h.length-1).join("/"),e.mkdirpBase(h,511)),e.writeFileSync(r,o||"")}else e.mkdirpBase(r,511)}},t.prototype.fromJSON=function(e){this.volume=new Yr,this.fromJSONFixed(this.volume,e),this.fs=Vr(this.volume),this.volume.releasedFds=[0,1,2],e=this.volume.openSync("/dev/stderr","w");var n=this.volume.openSync("/dev/stdout","w"),r=this.volume.openSync("/dev/stdin","r");if(e!==2)throw Error("invalid handle for stderr: "+e);if(n!==1)throw Error("invalid handle for stdout: "+n);if(r!==0)throw Error("invalid handle for stdin: "+r)},t.prototype.getStdOut=function(){return ri(this,void 0,void 0,function(){var e,n=this;return ii(this,function(){return e=new Promise(function(r){r(n.fs.readFileSync("/dev/stdout","utf8"))}),[2,e]})})},t}(),Eo=_o;export{_o as WasmFs,Eo as default};
//# sourceMappingURL=index.esm-IVCZ4JDS.js.map