spdy.js
218 KB
module.exports=(()=>{var e={5898:(e,t)=>{function isArray(e){if(Array.isArray){return Array.isArray(e)}return objectToString(e)==="[object Array]"}t.isArray=isArray;function isBoolean(e){return typeof e==="boolean"}t.isBoolean=isBoolean;function isNull(e){return e===null}t.isNull=isNull;function isNullOrUndefined(e){return e==null}t.isNullOrUndefined=isNullOrUndefined;function isNumber(e){return typeof e==="number"}t.isNumber=isNumber;function isString(e){return typeof e==="string"}t.isString=isString;function isSymbol(e){return typeof e==="symbol"}t.isSymbol=isSymbol;function isUndefined(e){return e===void 0}t.isUndefined=isUndefined;function isRegExp(e){return objectToString(e)==="[object RegExp]"}t.isRegExp=isRegExp;function isObject(e){return typeof e==="object"&&e!==null}t.isObject=isObject;function isDate(e){return objectToString(e)==="[object Date]"}t.isDate=isDate;function isError(e){return objectToString(e)==="[object Error]"||e instanceof Error}t.isError=isError;function isFunction(e){return typeof e==="function"}t.isFunction=isFunction;function isPrimitive(e){return e===null||typeof e==="boolean"||typeof e==="number"||typeof e==="string"||typeof e==="symbol"||typeof e==="undefined"}t.isPrimitive=isPrimitive;t.isBuffer=Buffer.isBuffer;function objectToString(e){return Object.prototype.toString.call(e)}},5284:e=>{e.exports=Object.prototype.toString.call(typeof process!=="undefined"?process:0)==="[object process]"},8207:(e,t,r)=>{var i=r(2357);var n=r(1669);var a=r(8614).EventEmitter;var s=r(4293).Buffer;var o=r(3542);var f=/^v(\d+)\.(\d+)\./.exec(process.version);var u=f?Number(f[1])+Number("0."+f[2]):11;var l=u>=11.1?2:1;var d="modern";var h;if(l===2){var c=process.binding("stream_wrap");h=function(e){c.streamBaseState[c.kReadBytesOrError]=e}}function Handle(e,t){a.call(this);this._stream=e;this._flowing=false;this._reading=false;this._options=t||{};this.onread=null;this.pending=new o}n.inherits(Handle,a);e.exports=Handle;Handle.mode=d;Handle.create=function create(e,t){return new Handle(e,t)};Handle.prototype._onread=function _onread(e,t){if(l===1){this.onread(e,t)}else{h(e);this.onread(t)}};Handle.prototype._queueReq=function _queueReq(e,t){return this.pending.append(e,t)};Handle.prototype._pendingList=function _pendingList(){var e=[];while(!this.pending.isEmpty()){e.push(this.pending.first().dequeue())}return e};Handle.prototype.setStream=function setStream(e){i(this._stream===null,"Can't set stream two times");this._stream=e;this.emit("stream",e)};Handle.prototype.readStart=function readStart(){this._reading=true;if(!this._stream){this.once("stream",this.readStart);return 0}if(!this._flowing){this._flowing=true;this._flow()}this._stream.resume();return 0};Handle.prototype.readStop=function readStop(){this._reading=false;if(!this._stream){this.once("stream",this.readStop);return 0}this._stream.pause();return 0};var p=process.binding("uv");Handle.prototype._flow=function flow(){var e=this;this._stream.on("data",function(t){e._onread(t.length,t)});this._stream.on("end",function(){e._onread(p.UV_EOF,s.alloc(0))});this._stream.on("close",function(){setImmediate(function(){if(e._reading){e._onread(p.UV_ECONNRESET,s.alloc(0))}})})};Handle.prototype._close=function _close(){var e=this._pendingList();var t=this;setImmediate(function(){for(var r=0;r<e.length;r++){var i=e[r];i.oncomplete(p.UV_ECANCELED,t,i)}});this.readStop()};Handle.prototype.shutdown=function shutdown(e){var t=this._queueReq("shutdown",e);if(!this._stream){this.once("stream",function(){this._shutdown(t)});return 0}return this._shutdown(t)};Handle.prototype._shutdown=function _shutdown(e){var t=this;this._stream.end(function(){var r=e.dequeue();if(!r){return}r.oncomplete(0,t,r)});return 0};Handle.prototype.close=function close(e){this._close();if(!this._stream){this.once("stream",function(){this.close(e)});return 0}if(this._options.close){this._options.close(e)}else{process.nextTick(e)}return 0};Handle.prototype.writeEnc=function writeEnc(e,t,r){var i=this._queueReq("write",e);if(!this._stream){this.once("stream",function(){this._writeEnc(i,e,t,r)});return 0}return this._writeEnc(i,e,t,r)};Handle.prototype._writeEnc=function _writeEnc(e,t,r,i){var n=this;t.async=true;t.bytes=r.length;if(e.isEmpty()){return 0}this._stream.write(r,i,function(){var t=e.dequeue();if(!t){return}t.oncomplete(0,n,t)});return 0};Handle.prototype.writev=function _writev(e,t,r){while(t.length>0){this._stream.write(t.shift(),t.shift())}return 0};Handle.prototype.writeBuffer=function writeBuffer(e,t){return this.writeEnc(e,t,null)};Handle.prototype.writeAsciiString=function writeAsciiString(e,t){return this.writeEnc(e,t,"ascii")};Handle.prototype.writeUtf8String=function writeUtf8String(e,t){return this.writeEnc(e,t,"utf8")};Handle.prototype.writeUcs2String=function writeUcs2String(e,t){return this.writeEnc(e,t,"ucs2")};Handle.prototype.writeBinaryString=function writeBinaryString(e,t){return this.writeEnc(e,t,"binary")};Handle.prototype.writeLatin1String=function writeLatin1String(e,t){return this.writeEnc(e,t,"binary")};Handle.prototype.getsockname=function getsockname(){if(this._options.getPeerName){return this._options.getPeerName()}return null};Handle.prototype.getpeername=function getpeername(e){var t=this.getsockname();if(!t){return-1}Object.keys(t).forEach(function(r){e[r]=t[r]});return 0}},3542:e=>{function Queue(){this.head=new Item("head",null)}e.exports=Queue;Queue.prototype.append=function append(e,t){var r=new Item(e,t);this.head.prepend(r);return r};Queue.prototype.isEmpty=function isEmpty(){return this.head.prev===this.head};Queue.prototype.first=function first(){return this.head.next};function Item(e,t){this.prev=this;this.next=this;this.kind=e;this.value=t}Item.prototype.prepend=function prepend(e){e.prev=this.prev;e.next=this;e.prev.next=e;e.next.prev=e};Item.prototype.dequeue=function dequeue(){var e=this.prev;var t=this.next;e.next=t;t.prev=e;this.prev=this;this.next=this;return this.value};Item.prototype.isEmpty=function isEmpty(){return this.prev===this}},7056:(e,t,r)=>{var i=t;i.utils=r(961);i.huffman=r(8219);i["static-table"]=r(4743);i.table=r(8966);i.decoder=r(5590);i.decompressor=r(6888);i.encoder=r(3148);i.compressor=r(1077)},1077:(e,t,r)=>{var i=r(7056);var n=i.utils;var a=i.encoder;var s=i.table;var o=n.assert;var f=r(4124);var u=r(1642).Duplex;function Compressor(e){u.call(this,{writableObjectMode:true});this._encoder=null;this._table=s.create(e.table)}f(Compressor,u);e.exports=Compressor;Compressor.create=function create(e){return new Compressor(e)};Compressor.prototype._read=function _read(){};Compressor.prototype._write=function _write(e,t,r){o(Array.isArray(e),"Compressor.write() expects list of headers");this._encoder=a.create();for(var i=0;i<e.length;i++)this._encodeHeader(e[i]);var e=this._encoder.render();this._encoder=null;r(null);for(var i=0;i<e.length;i++)this.push(e[i])};Compressor.prototype.updateTableSize=function updateTableSize(e){if(e>=this._table.protocolMaxSize){e=this._table.protocolMaxSize;var t=a.create();t.encodeBits(1,3);t.encodeInt(e);var r=t.render();for(var i=0;i<r.length;i++)this.push(r[i])}this._table.updateSize(e)};Compressor.prototype.reset=function reset(){var e=a.create();var t=this._table.maxSize;e.encodeBits(1,3);e.encodeInt(0);this._table.updateSize(0);e.encodeBits(1,3);e.encodeInt(t);this._table.updateSize(t);var r=e.render();for(var i=0;i<r.length;i++)this.push(r[i])};Compressor.prototype._encodeHeader=function _encodeHeader(e){if(e.neverIndex){var t=0;var r=1;var i=0;var a=0}else{var t=this._table.reverseLookup(e.name,e.value);var i=t>0;var a=e.incremental!==false;var r=0}this._encoder.encodeBit(i);if(i){this._encoder.encodeInt(t);return}var s=n.toArray(e.name);var o=n.toArray(e.value);this._encoder.encodeBit(a);if(a){this._table.add(e.name,e.value,s.length,o.length)}else{this._encoder.encodeBit(0);this._encoder.encodeBit(r)}this._encoder.encodeInt(-t);if(t===0)this._encoder.encodeStr(s,e.huffman!==false);this._encoder.encodeStr(o,e.huffman!==false)}},5590:(e,t,r)=>{var i=r(7056);var n=i.utils;var a=i.huffman.decode;var s=n.assert;var o=r(2259);function Decoder(){this.buffer=new o;this.bitOffset=0;this._huffmanNode=null}e.exports=Decoder;Decoder.create=function create(){return new Decoder};Decoder.prototype.isEmpty=function isEmpty(){return this.buffer.isEmpty()};Decoder.prototype.push=function push(e){this.buffer.push(e)};Decoder.prototype.decodeBit=function decodeBit(){s(this.buffer.has(1),"Buffer too small for an int");var e;var t=this.bitOffset;if(++this.bitOffset===8){e=this.buffer.readUInt8();this.bitOffset=0}else{e=this.buffer.peekUInt8()}return e>>>7-t&1};Decoder.prototype.skipBits=function skipBits(e){this.bitOffset+=e;this.buffer.skip(this.bitOffset>>3);this.bitOffset&=7};Decoder.prototype.decodeInt=function decodeInt(){s(this.buffer.has(1),"Buffer too small for an int");var e=8-this.bitOffset;this.bitOffset=0;var t=(1<<e)-1;var r=this.buffer.readUInt8()&t;if(r!==t)return r;var i=0;var n=false;var a=0;do{r=this.buffer.readUInt8();n=(r&128)===0;i<<=7;i|=r&127;a++}while(!n);s(n,"Incomplete data for multi-octet integer");s(a<=4,"Integer does not fit into 32 bits");i=i>>>21|(i>>14&127)<<7|(i>>7&127)<<14|(i&127)<<21;i>>=(4-a)*7;i+=t;return i};Decoder.prototype.decodeHuffmanWord=function decodeHuffmanWord(e,t,r){var i=a;var n=this._huffmanNode;var o=e;var f=t;for(;f>0;o&=(1<<f)-1){for(var u=Math.max(0,f-8);u<f;u++){var l=n[o>>>u];if(typeof l!=="number"){n=l;f=u;break}if(l===0)continue;if(l>>>9!==f-u){l=0;continue}var d=l&511;s(d!==256,"EOS in encoding");r.push(d);n=i;f=u;break}if(l===0)break}this._huffmanNode=n;return f};Decoder.prototype.decodeStr=function decodeStr(){var e=this.decodeBit();var t=this.decodeInt();s(this.buffer.has(t),"Not enough octets for string");if(!e)return this.buffer.take(t);this._huffmanNode=a;var r=[];var i=0;var n=0;var o=0;for(var f=0;f<t;f++){i<<=8;i|=this.buffer.readUInt8();n+=8;n=this.decodeHuffmanWord(i,n,r);o=i>>n;i&=(1<<n)-1}s(this._huffmanNode===a,"8-bit EOS");s(i+1===1<<n,"Final sequence is not EOS");this._huffmanNode=null;return r}},6888:(e,t,r)=>{var i=r(7056);var n=i.utils;var a=i.decoder;var s=i.table;var o=n.assert;var f=r(4124);var u=r(1642).Duplex;function Decompressor(e){u.call(this,{readableObjectMode:true});this._decoder=a.create();this._table=s.create(e.table)}f(Decompressor,u);e.exports=Decompressor;Decompressor.create=function create(e){return new Decompressor(e)};Decompressor.prototype._read=function _read(){};Decompressor.prototype._write=function _write(e,t,r){this._decoder.push(e);r(null)};Decompressor.prototype.execute=function execute(e){while(!this._decoder.isEmpty()){try{this._execute()}catch(t){if(e)return done(t);else return this.emit("error",t)}}if(e)done(null);function done(t){process.nextTick(function(){e(t)})}};Decompressor.prototype.updateTableSize=function updateTableSize(e){this._table.updateSize(e)};Decompressor.prototype._execute=function _execute(){var e=this._decoder.decodeBit();if(e)return this._processIndexed();var t=this._decoder.decodeBit();var r=0;if(!t){var i=this._decoder.decodeBit();if(i)return this._processUpdate();r=this._decoder.decodeBit()}this._processLiteral(t,r)};Decompressor.prototype._processIndexed=function _processIndexed(){var e=this._decoder.decodeInt();var t=this._table.lookup(e);this.push({name:t.name,value:t.value,neverIndex:false})};Decompressor.prototype._processLiteral=function _processLiteral(e,t){var r=this._decoder.decodeInt();var i;var a;if(r===0){i=this._decoder.decodeStr();a=i.length;i=n.stringify(i)}else{var s=this._table.lookup(r);a=s.nameSize;i=s.name}var o=this._decoder.decodeStr();var f=o.length;o=n.stringify(o);if(e)this._table.add(i,o,a,f);this.push({name:i,value:o,neverIndex:t!==0})};Decompressor.prototype._processUpdate=function _processUpdate(){var e=this._decoder.decodeInt();this.updateTableSize(e)}},3148:(e,t,r)=>{var i=r(7056);var n=i.utils;var a=i.huffman.encode;var s=n.assert;var o=r(9364);function Encoder(){this.buffer=new o;this.word=0;this.bitOffset=0}e.exports=Encoder;Encoder.create=function create(){return new Encoder};Encoder.prototype.render=function render(){return this.buffer.render()};Encoder.prototype.encodeBit=function encodeBit(e){var t;this.word<<=1;this.word|=e;this.bitOffset++;if(this.bitOffset===8){this.buffer.writeUInt8(this.word);this.word=0;this.bitOffset=0}};Encoder.prototype.encodeBits=function encodeBits(e,t){var r=e;var i=t;while(i>0){var n=Math.min(i,8-this.bitOffset);var a=r>>>i-n;if(n===8){this.buffer.writeUInt8(a)}else{this.word<<=n;this.word|=a;this.bitOffset+=n;if(this.bitOffset===8){this.buffer.writeUInt8(this.word);this.word=0;this.bitOffset=0}}i-=n;r&=(1<<i)-1}};Encoder.prototype.skipBits=function skipBits(e){this.bitOffset+=e;this.buffer.skip(this.bitOffset>>3);this.bitOffset&=7};Encoder.prototype.encodeInt=function encodeInt(e){var t=8-this.bitOffset;this.bitOffset=0;var r=(1<<t)-1;if(e<r){this.buffer.writeUInt8(this.word<<t|e);return n}var i=e-r;this.buffer.writeUInt8(this.word<<t|r);do{var n=i&127;i>>=7;if(i!==0)n|=128;this.buffer.writeUInt8(n)}while(i!==0)};Encoder.prototype.encodeStr=function encodeStr(e,t){this.encodeBit(t?1:0);if(!t){this.buffer.reserve(e.length+1);this.encodeInt(e.length);for(var r=0;r<e.length;r++)this.buffer.writeUInt8(e[r]);return}var i=[];var n=0;var s=0;for(var r=0;r<e.length;r++){var o=a[e[r]];i.push(o);n+=o[0]}if(n%8!==0)s=8-n%8;n+=s;this.buffer.reserve(n/8+1);this.encodeInt(n/8);for(var r=0;r<i.length;r++){var o=i[r];this.encodeBits(o[1],o[0])}this.encodeBits(255>>>8-s,s)}},8219:(e,t)=>{t.decode=[2608,2609,2610,2657,2659,2661,2665,2671,2675,2676,0,0,0,0,0,0,0,0,0,0,3104,3109,3117,3118,3119,3123,3124,3125,3126,3127,3128,3129,3133,3137,3167,3170,3172,3174,3175,3176,3180,3181,3182,3184,3186,3189,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3642,3650,3651,3652,3653,3654,3655,3656,3657,3658,3659,3660,3661,3662,3663,3664,3665,3666,3667,3668,3669,3670,3671,3673,3690,3691,3697,3702,3703,3704,3705,3706,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4134,4138,4140,4155,4184,4186,[1057,1058,1064,1065,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[1087,0,1575,1579,1660,0,0,0,0,0,2083,2110,0,0,0,0,0,0,0,0,0,0,0,0,2560,2596,2624,2651,2653,2686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3166,3197,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3644,3680,3707,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[1628,1731,1744,0,0,0,2176,2178,2179,2210,2232,2242,2272,2274,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2713,2721,2727,2732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[2736,2737,2739,2769,2776,2777,2787,2789,2790,0,0,0,0,0,0,0,0,0,3201,3204,3205,3206,3208,3218,3226,3228,3232,3235,3236,3241,3242,3245,3250,3253,3257,3258,3259,3261,3262,3268,3270,3300,3304,3305,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3585,3719,3721,3722,3723,3724,3725,3727,3731,3733,3734,3735,3736,3739,3741,3742,3749,3750,3752,3758,3759,3764,3766,3767,3772,3775,3781,3815,3823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4105,4238,4240,4241,4244,4255,4267,4302,4311,4321,4332,4333,[711,719,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[746,747,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[1216,1217,1224,1225,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[1226,1229,1234,1237,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[1242,1243,1262,1264,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[1266,1267,1279,0,0,0,1739,1740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[1747,1748,1750,1757,1758,1759,1777,1780,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[1781,1782,1783,1784,1786,1787,1788,1789,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[1790,0,2050,2051,2052,2053,2054,2055,2056,2059,2060,2062,2063,2064,2065,2066,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[2067,2068,2069,2071,2072,2073,2074,2075,2076,2077,2078,2079,2175,2268,2297,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3082,3085,3094,3328,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]]];t.encode=[[13,8184],[23,8388568],[28,268435426],[28,268435427],[28,268435428],[28,268435429],[28,268435430],[28,268435431],[28,268435432],[24,16777194],[30,1073741820],[28,268435433],[28,268435434],[30,1073741821],[28,268435435],[28,268435436],[28,268435437],[28,268435438],[28,268435439],[28,268435440],[28,268435441],[28,268435442],[30,1073741822],[28,268435443],[28,268435444],[28,268435445],[28,268435446],[28,268435447],[28,268435448],[28,268435449],[28,268435450],[28,268435451],[6,20],[10,1016],[10,1017],[12,4090],[13,8185],[6,21],[8,248],[11,2042],[10,1018],[10,1019],[8,249],[11,2043],[8,250],[6,22],[6,23],[6,24],[5,0],[5,1],[5,2],[6,25],[6,26],[6,27],[6,28],[6,29],[6,30],[6,31],[7,92],[8,251],[15,32764],[6,32],[12,4091],[10,1020],[13,8186],[6,33],[7,93],[7,94],[7,95],[7,96],[7,97],[7,98],[7,99],[7,100],[7,101],[7,102],[7,103],[7,104],[7,105],[7,106],[7,107],[7,108],[7,109],[7,110],[7,111],[7,112],[7,113],[7,114],[8,252],[7,115],[8,253],[13,8187],[19,524272],[13,8188],[14,16380],[6,34],[15,32765],[5,3],[6,35],[5,4],[6,36],[5,5],[6,37],[6,38],[6,39],[5,6],[7,116],[7,117],[6,40],[6,41],[6,42],[5,7],[6,43],[7,118],[6,44],[5,8],[5,9],[6,45],[7,119],[7,120],[7,121],[7,122],[7,123],[15,32766],[11,2044],[14,16381],[13,8189],[28,268435452],[20,1048550],[22,4194258],[20,1048551],[20,1048552],[22,4194259],[22,4194260],[22,4194261],[23,8388569],[22,4194262],[23,8388570],[23,8388571],[23,8388572],[23,8388573],[23,8388574],[24,16777195],[23,8388575],[24,16777196],[24,16777197],[22,4194263],[23,8388576],[24,16777198],[23,8388577],[23,8388578],[23,8388579],[23,8388580],[21,2097116],[22,4194264],[23,8388581],[22,4194265],[23,8388582],[23,8388583],[24,16777199],[22,4194266],[21,2097117],[20,1048553],[22,4194267],[22,4194268],[23,8388584],[23,8388585],[21,2097118],[23,8388586],[22,4194269],[22,4194270],[24,16777200],[21,2097119],[22,4194271],[23,8388587],[23,8388588],[21,2097120],[21,2097121],[22,4194272],[21,2097122],[23,8388589],[22,4194273],[23,8388590],[23,8388591],[20,1048554],[22,4194274],[22,4194275],[22,4194276],[23,8388592],[22,4194277],[22,4194278],[23,8388593],[26,67108832],[26,67108833],[20,1048555],[19,524273],[22,4194279],[23,8388594],[22,4194280],[25,33554412],[26,67108834],[26,67108835],[26,67108836],[27,134217694],[27,134217695],[26,67108837],[24,16777201],[25,33554413],[19,524274],[21,2097123],[26,67108838],[27,134217696],[27,134217697],[26,67108839],[27,134217698],[24,16777202],[21,2097124],[21,2097125],[26,67108840],[26,67108841],[28,268435453],[27,134217699],[27,134217700],[27,134217701],[20,1048556],[24,16777203],[20,1048557],[21,2097126],[22,4194281],[21,2097127],[21,2097128],[23,8388595],[22,4194282],[22,4194283],[25,33554414],[25,33554415],[24,16777204],[24,16777205],[26,67108842],[23,8388596],[26,67108843],[27,134217702],[26,67108844],[26,67108845],[27,134217703],[27,134217704],[27,134217705],[27,134217706],[27,134217707],[28,268435454],[27,134217708],[27,134217709],[27,134217710],[27,134217711],[27,134217712],[26,67108846],[30,1073741823]]},4743:(e,t)=>{t.table=[{name:":authority",value:"",nameSize:10,totalSize:42},{name:":method",value:"GET",nameSize:7,totalSize:42},{name:":method",value:"POST",nameSize:7,totalSize:43},{name:":path",value:"/",nameSize:5,totalSize:38},{name:":path",value:"/index.html",nameSize:5,totalSize:48},{name:":scheme",value:"http",nameSize:7,totalSize:43},{name:":scheme",value:"https",nameSize:7,totalSize:44},{name:":status",value:"200",nameSize:7,totalSize:42},{name:":status",value:"204",nameSize:7,totalSize:42},{name:":status",value:"206",nameSize:7,totalSize:42},{name:":status",value:"304",nameSize:7,totalSize:42},{name:":status",value:"400",nameSize:7,totalSize:42},{name:":status",value:"404",nameSize:7,totalSize:42},{name:":status",value:"500",nameSize:7,totalSize:42},{name:"accept-charset",value:"",nameSize:14,totalSize:46},{name:"accept-encoding",value:"gzip, deflate",nameSize:15,totalSize:60},{name:"accept-language",value:"",nameSize:15,totalSize:47},{name:"accept-ranges",value:"",nameSize:13,totalSize:45},{name:"accept",value:"",nameSize:6,totalSize:38},{name:"access-control-allow-origin",value:"",nameSize:27,totalSize:59},{name:"age",value:"",nameSize:3,totalSize:35},{name:"allow",value:"",nameSize:5,totalSize:37},{name:"authorization",value:"",nameSize:13,totalSize:45},{name:"cache-control",value:"",nameSize:13,totalSize:45},{name:"content-disposition",value:"",nameSize:19,totalSize:51},{name:"content-encoding",value:"",nameSize:16,totalSize:48},{name:"content-language",value:"",nameSize:16,totalSize:48},{name:"content-length",value:"",nameSize:14,totalSize:46},{name:"content-location",value:"",nameSize:16,totalSize:48},{name:"content-range",value:"",nameSize:13,totalSize:45},{name:"content-type",value:"",nameSize:12,totalSize:44},{name:"cookie",value:"",nameSize:6,totalSize:38},{name:"date",value:"",nameSize:4,totalSize:36},{name:"etag",value:"",nameSize:4,totalSize:36},{name:"expect",value:"",nameSize:6,totalSize:38},{name:"expires",value:"",nameSize:7,totalSize:39},{name:"from",value:"",nameSize:4,totalSize:36},{name:"host",value:"",nameSize:4,totalSize:36},{name:"if-match",value:"",nameSize:8,totalSize:40},{name:"if-modified-since",value:"",nameSize:17,totalSize:49},{name:"if-none-match",value:"",nameSize:13,totalSize:45},{name:"if-range",value:"",nameSize:8,totalSize:40},{name:"if-unmodified-since",value:"",nameSize:19,totalSize:51},{name:"last-modified",value:"",nameSize:13,totalSize:45},{name:"link",value:"",nameSize:4,totalSize:36},{name:"location",value:"",nameSize:8,totalSize:40},{name:"max-forwards",value:"",nameSize:12,totalSize:44},{name:"proxy-authenticate",value:"",nameSize:18,totalSize:50},{name:"proxy-authorization",value:"",nameSize:19,totalSize:51},{name:"range",value:"",nameSize:5,totalSize:37},{name:"referer",value:"",nameSize:7,totalSize:39},{name:"refresh",value:"",nameSize:7,totalSize:39},{name:"retry-after",value:"",nameSize:11,totalSize:43},{name:"server",value:"",nameSize:6,totalSize:38},{name:"set-cookie",value:"",nameSize:10,totalSize:42},{name:"strict-transport-security",value:"",nameSize:25,totalSize:57},{name:"transfer-encoding",value:"",nameSize:17,totalSize:49},{name:"user-agent",value:"",nameSize:10,totalSize:42},{name:"vary",value:"",nameSize:4,totalSize:36},{name:"via",value:"",nameSize:3,totalSize:35},{name:"www-authenticate",value:"",nameSize:16,totalSize:48}];t.map={":authority":{index:1,values:{"":1}},":method":{index:2,values:{GET:2,POST:3}},":path":{index:4,values:{"/":4,"/index.html":5}},":scheme":{index:6,values:{http:6,https:7}},":status":{index:8,values:{200:8,204:9,206:10,304:11,400:12,404:13,500:14}},"accept-charset":{index:15,values:{"":15}},"accept-encoding":{index:16,values:{"gzip, deflate":16}},"accept-language":{index:17,values:{"":17}},"accept-ranges":{index:18,values:{"":18}},accept:{index:19,values:{"":19}},"access-control-allow-origin":{index:20,values:{"":20}},age:{index:21,values:{"":21}},allow:{index:22,values:{"":22}},authorization:{index:23,values:{"":23}},"cache-control":{index:24,values:{"":24}},"content-disposition":{index:25,values:{"":25}},"content-encoding":{index:26,values:{"":26}},"content-language":{index:27,values:{"":27}},"content-length":{index:28,values:{"":28}},"content-location":{index:29,values:{"":29}},"content-range":{index:30,values:{"":30}},"content-type":{index:31,values:{"":31}},cookie:{index:32,values:{"":32}},date:{index:33,values:{"":33}},etag:{index:34,values:{"":34}},expect:{index:35,values:{"":35}},expires:{index:36,values:{"":36}},from:{index:37,values:{"":37}},host:{index:38,values:{"":38}},"if-match":{index:39,values:{"":39}},"if-modified-since":{index:40,values:{"":40}},"if-none-match":{index:41,values:{"":41}},"if-range":{index:42,values:{"":42}},"if-unmodified-since":{index:43,values:{"":43}},"last-modified":{index:44,values:{"":44}},link:{index:45,values:{"":45}},location:{index:46,values:{"":46}},"max-forwards":{index:47,values:{"":47}},"proxy-authenticate":{index:48,values:{"":48}},"proxy-authorization":{index:49,values:{"":49}},range:{index:50,values:{"":50}},referer:{index:51,values:{"":51}},refresh:{index:52,values:{"":52}},"retry-after":{index:53,values:{"":53}},server:{index:54,values:{"":54}},"set-cookie":{index:55,values:{"":55}},"strict-transport-security":{index:56,values:{"":56}},"transfer-encoding":{index:57,values:{"":57}},"user-agent":{index:58,values:{"":58}},vary:{index:59,values:{"":59}},via:{index:60,values:{"":60}},"www-authenticate":{index:61,values:{"":61}}}},8966:(e,t,r)=>{var i=r(7056);var n=i.utils;var a=n.assert;function Table(e){this["static"]=i["static-table"];this.dynamic=[];this.size=0;this.maxSize=0;this.length=this["static"].table.length;this.protocolMaxSize=e.maxSize;this.maxSize=this.protocolMaxSize;this.lookupDepth=e.lookupDepth||32}e.exports=Table;Table.create=function create(e){return new Table(e)};Table.prototype.lookup=function lookup(e){a(e!==0,"Zero indexed field");a(e<=this.length,"Indexed field OOB");if(e<=this["static"].table.length)return this["static"].table[e-1];else return this.dynamic[this.length-e]};Table.prototype.reverseLookup=function reverseLookup(e,t){var r=this["static"].map[e];if(r&&r.values[t])return r.values[t];var i=Math.max(0,this.dynamic.length-this.lookupDepth);for(var n=this.dynamic.length-1;n>=i;n--){var a=this.dynamic[n];if(a.name===e&&a.value===t)return this.length-n;if(a.name===e){if(r)break;return-(this.length-n)}}if(r)return-r.index;return 0};Table.prototype.add=function add(e,t,r,i){var n=r+i+32;this.dynamic.push({name:e,value:t,nameSize:r,totalSize:n});this.size+=n;this.length++;this.evict()};Table.prototype.evict=function evict(){while(this.size>this.maxSize){var e=this.dynamic.shift();this.size-=e.totalSize;this.length--}a(this.size>=0,"Table size sanity check failed")};Table.prototype.updateSize=function updateSize(e){a(e<=this.protocolMaxSize,"Table size bigger than maximum");this.maxSize=e;this.evict()}},961:(e,t)=>{t.assert=function assert(e,t){if(!e)throw new Error(t)};t.stringify=function stringify(e){var t="";for(var r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t};t.toArray=function toArray(e){var t=[];for(var r=0;r<e.length;r++){var i=e.charCodeAt(r);var n=i>>>8;var a=i&255;if(n)t.push(n,a);else t.push(a)}return t}},9698:(e,t,r)=>{var i=r(2357);var n=r(1669);var a=r(4293).Buffer;var s=/^v0\.8\./.test(process.version)?"rusty":/^v0\.(9|10)\./.test(process.version)?"old":/^v0\.12\./.test(process.version)?"normal":"modern";var o;var f;var u;var l;var d;var h;var c;if(s==="normal"||s==="modern"){o=process.binding("http_parser").HTTPParser;f=o.methods;if(!f)f=process.binding("http_parser").methods;u={};f.forEach(function(e,t){u[e]=t});l=o.kOnHeaders|0;d=o.kOnHeadersComplete|0;h=o.kOnMessageComplete|0;c=o.kOnBody|0}else{l="onHeaders";d="onHeadersComplete";h="onMessageComplete";c="onBody"}function Deceiver(e,t){this.socket=e;this.options=t||{};this.isClient=this.options.isClient}e.exports=Deceiver;Deceiver.create=function create(e,t){return new Deceiver(e,t)};Deceiver.prototype._toHeaderList=function _toHeaderList(e){var t=[];var r=Object.keys(e);for(var i=0;i<r.length;i++)t.push(r[i],e[r[i]]);return t};Deceiver.prototype._isUpgrade=function _isUpgrade(e){return e.method==="CONNECT"||e.headers.upgrade||e.headers.connection&&/(^|\W)upgrade(\W|$)/i.test(e.headers.connection)};if(s==="modern"){Deceiver.prototype.emitRequest=function emitRequest(e){var t=this.socket.parser;i(t,"No parser present");t.execute=null;var r=this;var n=u[e.method];t.execute=function execute(){r._skipExecute(this);this[d](1,1,r._toHeaderList(e.headers),n,e.path,0,"",r._isUpgrade(e),true);return 0};this._emitEmpty()};Deceiver.prototype.emitResponse=function emitResponse(e){var t=this.socket.parser;i(t,"No parser present");t.execute=null;var r=this;t.execute=function execute(){r._skipExecute(this);this[d](1,1,r._toHeaderList(e.headers),e.path,e.code,e.status,e.reason||"",r._isUpgrade(e),true);return 0};this._emitEmpty()}}else{Deceiver.prototype.emitRequest=function emitRequest(e){var t=this.socket.parser;i(t,"No parser present");var r=e.method;if(u)r=u[r];var n={versionMajor:1,versionMinor:1,url:e.path,headers:this._toHeaderList(e.headers),method:r,statusCode:0,statusMessage:"",upgrade:this._isUpgrade(e),shouldKeepAlive:true};var a=this;t.execute=function execute(){a._skipExecute(this);this[d](n);return 0};this._emitEmpty()};Deceiver.prototype.emitResponse=function emitResponse(e){var t=this.socket.parser;i(t,"No parser present");var r={versionMajor:1,versionMinor:1,url:e.path,headers:this._toHeaderList(e.headers),method:false,statusCode:e.status,statusMessage:e.reason||"",upgrade:this._isUpgrade(e),shouldKeepAlive:true};var n=this;t.execute=function execute(){n._skipExecute(this);this[d](r);return 0};this._emitEmpty()}}Deceiver.prototype._skipExecute=function _skipExecute(e){var t=this;var r=e.constructor.prototype.execute;var i=e.constructor.prototype.finish;e.execute=null;e.finish=null;e.execute=function execute(e,n,a){if(this.socket!==t.socket){this.execute=r;this.finish=i;return this.execute(e,n,a)}if(n!==undefined)e=e.slice(n,n+a);t.emitBody(e);return a};e.finish=function finish(){if(this.socket!==t.socket){this.execute=r;this.finish=i;return this.finish()}this.execute=r;this.finish=i;t.emitMessageComplete()}};Deceiver.prototype.emitBody=function emitBody(e){var t=this.socket.parser;i(t,"No parser present");t[c](e,0,e.length)};Deceiver.prototype._emitEmpty=function _emitEmpty(){var e=new a(0);if(this.socket.ondata)this.socket.ondata(e,0,0);else this.socket.emit("data",e)};Deceiver.prototype.emitMessageComplete=function emitMessageComplete(){var e=this.socket.parser;i(e,"No parser present");e[h]()}},4124:(e,t,r)=>{try{var i=r(1669);if(typeof i.inherits!=="function")throw"";e.exports=i.inherits}catch(t){e.exports=r(8544)}},8544:e=>{if(typeof Object.create==="function"){e.exports=function inherits(e,t){if(t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{e.exports=function inherits(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype;e.prototype=new r;e.prototype.constructor=e}}}},893:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return t.call(e)=="[object Array]"}},910:e=>{e.exports=assert;function assert(e,t){if(!e)throw new Error(t||"Assertion failed")}assert.equal=function assertEqual(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},2259:(e,t,r)=>{var i=r(4293).Buffer;function OffsetBuffer(){this.offset=0;this.size=0;this.buffers=[]}e.exports=OffsetBuffer;OffsetBuffer.prototype.isEmpty=function isEmpty(){return this.size===0};OffsetBuffer.prototype.clone=function clone(e){var t=new OffsetBuffer;t.offset=this.offset;t.size=e;t.buffers=this.buffers.slice();return t};OffsetBuffer.prototype.toChunks=function toChunks(){if(this.size===0)return[];if(this.offset!==0){this.buffers[0]=this.buffers[0].slice(this.offset);this.offset=0}var e=[];var t=0;for(var r=0;t<=this.size&&r<this.buffers.length;r++){var i=this.buffers[r];t+=i.length;if(t>this.size){i=i.slice(0,i.length-(t-this.size));this.buffers[r]=i}e.push(i)}if(r<this.buffers.length)this.buffers.length=r;return e};OffsetBuffer.prototype.toString=function toString(e){return this.toChunks().map(function(t){return t.toString(e)}).join("")};OffsetBuffer.prototype.use=function use(e,t,r){this.buffers=[e];this.offset=t;this.size=r};OffsetBuffer.prototype.push=function push(e){if(e.length===0)return;this.size+=e.length;this.buffers.push(e)};OffsetBuffer.prototype.has=function has(e){return this.size>=e};OffsetBuffer.prototype.skip=function skip(e){if(this.size===0)return;this.size-=e;if(this.offset+e<this.buffers[0].length){this.offset+=e;return}var t=e-(this.buffers[0].length-this.offset);this.offset=0;for(var r=1;t>0&&r<this.buffers.length;r++){var i=this.buffers[r];if(i.length>t){this.offset=t;break}t-=i.length}this.buffers=this.buffers.slice(r)};OffsetBuffer.prototype.copy=function copy(e,t,r,i){if(this.size===0)return;if(r!==0)throw new Error("Unsupported offset in .copy()");var n=t;var a=this.buffers[0];var s=Math.min(i,a.length-this.offset);a.copy(e,n,this.offset,this.offset+s);n+=s;var o=i-s;for(var f=1;o>0&&f<this.buffers.length;f++){var u=this.buffers[f];var s=Math.min(o,u.length);u.copy(e,n,0,s);n+=s;o-=s}};OffsetBuffer.prototype.take=function take(e){if(e===0)return new i(0);this.size-=e;var t=this.buffers[0].length-this.offset;if(t===e){var r=this.buffers.shift();if(this.offset!==0){r=r.slice(this.offset);this.offset=0}return r}else if(t>e){var r=this.buffers[0].slice(this.offset,this.offset+e);this.offset+=e;return r}var n=new i(e);var a=0;var s=this.offset;for(var o=0;a!==e&&o<this.buffers.length;o++){var f=this.buffers[o];var u=Math.min(f.length-s,e-a);f.copy(n,a,s,s+u);if(s+u<f.length){this.offset=s+u;break}else{a+=u;s=0}}this.buffers=this.buffers.slice(o);if(this.buffers.length===0)this.offset=0;return n};OffsetBuffer.prototype.peekUInt8=function peekUInt8(){return this.buffers[0][this.offset]};OffsetBuffer.prototype.readUInt8=function readUInt8(){this.size-=1;var e=this.buffers[0];var t=e[this.offset];if(++this.offset===e.length){this.offset=0;this.buffers.shift()}return t};OffsetBuffer.prototype.readUInt16LE=function readUInt16LE(){var e=this.buffers[0];this.size-=2;var t;var r;if(e.length-this.offset>=2){t=e.readUInt16LE(this.offset);r=0;this.offset+=2}else{t=e[this.offset]|this.buffers[1][0]<<8;r=1;this.offset=1}if(this.offset===this.buffers[r].length){this.offset=0;r++}if(r!==0)this.buffers=this.buffers.slice(r);return t};OffsetBuffer.prototype.readUInt24LE=function readUInt24LE(){var e=this.buffers[0];var t;var r;var i=e.length-this.offset;if(i>=3){t=e.readUInt16LE(this.offset)|e[this.offset+2]<<16;r=0;this.offset+=3}else if(i>=2){t=e.readUInt16LE(this.offset)|this.buffers[1][0]<<16;r=1;this.offset=1}else{t=e[this.offset];this.offset=0;this.buffers.shift();this.size-=1;t|=this.readUInt16LE()<<8;return t}this.size-=3;if(this.offset===this.buffers[r].length){this.offset=0;r++}if(r!==0)this.buffers=this.buffers.slice(r);return t};OffsetBuffer.prototype.readUInt32LE=function readUInt32LE(){var e=this.buffers[0];var t;var r;var i=e.length-this.offset;if(i>=4){t=e.readUInt32LE(this.offset);r=0;this.offset+=4}else if(i>=3){t=(e.readUInt16LE(this.offset)|e[this.offset+2]<<16)+this.buffers[1][0]*16777216;r=1;this.offset=1}else if(i>=2){t=e.readUInt16LE(this.offset);this.offset=0;this.buffers.shift();this.size-=2;t+=this.readUInt16LE()*65536;return t}else{t=e[this.offset];this.offset=0;this.buffers.shift();this.size-=1;t+=this.readUInt24LE()*256;return t}this.size-=4;if(this.offset===this.buffers[r].length){this.offset=0;r++}if(r!==0)this.buffers=this.buffers.slice(r);return t};OffsetBuffer.prototype.readUInt16BE=function readUInt16BE(){var e=this.readUInt16LE();return(e&255)<<8|e>>8};OffsetBuffer.prototype.readUInt24BE=function readUInt24BE(){var e=this.readUInt24LE();return(e&255)<<16|(e>>8&255)<<8|e>>16};OffsetBuffer.prototype.readUInt32BE=function readUInt32BE(){var e=this.readUInt32LE();return((e&255)<<24|(e>>>8&255)<<16|(e>>>16&255)<<8|e>>>24)>>>0};function signedInt8(e){if(e>=128)return-(255^e)-1;else return e}OffsetBuffer.prototype.peekInt8=function peekInt8(){return signedInt8(this.peekUInt8())};OffsetBuffer.prototype.readInt8=function readInt8(){return signedInt8(this.readUInt8())};function signedInt16(e){if(e>=32768)return-(65535^e)-1;else return e}OffsetBuffer.prototype.readInt16BE=function readInt16BE(){return signedInt16(this.readUInt16BE())};OffsetBuffer.prototype.readInt16LE=function readInt16LE(){return signedInt16(this.readUInt16LE())};function signedInt24(e){if(e>=8388608)return-(16777215^e)-1;else return e}OffsetBuffer.prototype.readInt24BE=function readInt24BE(){return signedInt24(this.readUInt24BE())};OffsetBuffer.prototype.readInt24LE=function readInt24LE(){return signedInt24(this.readUInt24LE())};function signedInt32(e){if(e>=2147483648)return-(4294967295^e)-1;else return e}OffsetBuffer.prototype.readInt32BE=function readInt32BE(){return signedInt32(this.readUInt32BE())};OffsetBuffer.prototype.readInt32LE=function readInt32LE(){return signedInt32(this.readUInt32LE())}},7810:e=>{"use strict";if(typeof process==="undefined"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0){e.exports={nextTick:nextTick}}else{e.exports=process}function nextTick(e,t,r,i){if(typeof e!=="function"){throw new TypeError('"callback" argument must be a function')}var n=arguments.length;var a,s;switch(n){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function afterTickOne(){e.call(null,t)});case 3:return process.nextTick(function afterTickTwo(){e.call(null,t,r)});case 4:return process.nextTick(function afterTickThree(){e.call(null,t,r,i)});default:a=new Array(n-1);s=0;while(s<a.length){a[s++]=arguments[s]}return process.nextTick(function afterTick(){e.apply(null,a)})}}},1359:(e,t,r)=>{"use strict";var i=r(7810);var n=Object.keys||function(e){var t=[];for(var r in e){t.push(r)}return t};e.exports=Duplex;var a=Object.create(r(5898));a.inherits=r(4124);var s=r(1433);var o=r(6993);a.inherits(Duplex,s);{var f=n(o.prototype);for(var u=0;u<f.length;u++){var l=f[u];if(!Duplex.prototype[l])Duplex.prototype[l]=o.prototype[l]}}function Duplex(e){if(!(this instanceof Duplex))return new Duplex(e);s.call(this,e);o.call(this,e);if(e&&e.readable===false)this.readable=false;if(e&&e.writable===false)this.writable=false;this.allowHalfOpen=true;if(e&&e.allowHalfOpen===false)this.allowHalfOpen=false;this.once("end",onend)}Object.defineProperty(Duplex.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function onend(){if(this.allowHalfOpen||this._writableState.ended)return;i.nextTick(onEndNT,this)}function onEndNT(e){e.end()}Object.defineProperty(Duplex.prototype,"destroyed",{get:function(){if(this._readableState===undefined||this._writableState===undefined){return false}return this._readableState.destroyed&&this._writableState.destroyed},set:function(e){if(this._readableState===undefined||this._writableState===undefined){return}this._readableState.destroyed=e;this._writableState.destroyed=e}});Duplex.prototype._destroy=function(e,t){this.push(null);this.end();i.nextTick(t,e)}},1542:(e,t,r)=>{"use strict";e.exports=PassThrough;var i=r(4415);var n=Object.create(r(5898));n.inherits=r(4124);n.inherits(PassThrough,i);function PassThrough(e){if(!(this instanceof PassThrough))return new PassThrough(e);i.call(this,e)}PassThrough.prototype._transform=function(e,t,r){r(null,e)}},1433:(e,t,r)=>{"use strict";var i=r(7810);e.exports=Readable;var n=r(893);var a;Readable.ReadableState=ReadableState;var s=r(8614).EventEmitter;var o=function(e,t){return e.listeners(t).length};var f=r(2387);var u=r(110).Buffer;var l=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return u.from(e)}function _isUint8Array(e){return u.isBuffer(e)||e instanceof l}var d=Object.create(r(5898));d.inherits=r(4124);var h=r(1669);var c=void 0;if(h&&h.debuglog){c=h.debuglog("stream")}else{c=function(){}}var p=r(7053);var v=r(7049);var y;d.inherits(Readable,f);var m=["error","close","destroy","pause","resume"];function prependListener(e,t,r){if(typeof e.prependListener==="function")return e.prependListener(t,r);if(!e._events||!e._events[t])e.on(t,r);else if(n(e._events[t]))e._events[t].unshift(r);else e._events[t]=[r,e._events[t]]}function ReadableState(e,t){a=a||r(1359);e=e||{};var i=t instanceof a;this.objectMode=!!e.objectMode;if(i)this.objectMode=this.objectMode||!!e.readableObjectMode;var n=e.highWaterMark;var s=e.readableHighWaterMark;var o=this.objectMode?16:16*1024;if(n||n===0)this.highWaterMark=n;else if(i&&(s||s===0))this.highWaterMark=s;else this.highWaterMark=o;this.highWaterMark=Math.floor(this.highWaterMark);this.buffer=new p;this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.ended=false;this.endEmitted=false;this.reading=false;this.sync=true;this.needReadable=false;this.emittedReadable=false;this.readableListening=false;this.resumeScheduled=false;this.destroyed=false;this.defaultEncoding=e.defaultEncoding||"utf8";this.awaitDrain=0;this.readingMore=false;this.decoder=null;this.encoding=null;if(e.encoding){if(!y)y=r(8536).s;this.decoder=new y(e.encoding);this.encoding=e.encoding}}function Readable(e){a=a||r(1359);if(!(this instanceof Readable))return new Readable(e);this._readableState=new ReadableState(e,this);this.readable=true;if(e){if(typeof e.read==="function")this._read=e.read;if(typeof e.destroy==="function")this._destroy=e.destroy}f.call(this)}Object.defineProperty(Readable.prototype,"destroyed",{get:function(){if(this._readableState===undefined){return false}return this._readableState.destroyed},set:function(e){if(!this._readableState){return}this._readableState.destroyed=e}});Readable.prototype.destroy=v.destroy;Readable.prototype._undestroy=v.undestroy;Readable.prototype._destroy=function(e,t){this.push(null);t(e)};Readable.prototype.push=function(e,t){var r=this._readableState;var i;if(!r.objectMode){if(typeof e==="string"){t=t||r.defaultEncoding;if(t!==r.encoding){e=u.from(e,t);t=""}i=true}}else{i=true}return readableAddChunk(this,e,t,false,i)};Readable.prototype.unshift=function(e){return readableAddChunk(this,e,null,true,false)};function readableAddChunk(e,t,r,i,n){var a=e._readableState;if(t===null){a.reading=false;onEofChunk(e,a)}else{var s;if(!n)s=chunkInvalid(a,t);if(s){e.emit("error",s)}else if(a.objectMode||t&&t.length>0){if(typeof t!=="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==u.prototype){t=_uint8ArrayToBuffer(t)}if(i){if(a.endEmitted)e.emit("error",new Error("stream.unshift() after end event"));else addChunk(e,a,t,true)}else if(a.ended){e.emit("error",new Error("stream.push() after EOF"))}else{a.reading=false;if(a.decoder&&!r){t=a.decoder.write(t);if(a.objectMode||t.length!==0)addChunk(e,a,t,false);else maybeReadMore(e,a)}else{addChunk(e,a,t,false)}}}else if(!i){a.reading=false}}return needMoreData(a)}function addChunk(e,t,r,i){if(t.flowing&&t.length===0&&!t.sync){e.emit("data",r);e.read(0)}else{t.length+=t.objectMode?1:r.length;if(i)t.buffer.unshift(r);else t.buffer.push(r);if(t.needReadable)emitReadable(e)}maybeReadMore(e,t)}function chunkInvalid(e,t){var r;if(!_isUint8Array(t)&&typeof t!=="string"&&t!==undefined&&!e.objectMode){r=new TypeError("Invalid non-string/buffer chunk")}return r}function needMoreData(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}Readable.prototype.isPaused=function(){return this._readableState.flowing===false};Readable.prototype.setEncoding=function(e){if(!y)y=r(8536).s;this._readableState.decoder=new y(e);this._readableState.encoding=e;return this};var g=8388608;function computeNewHighWaterMark(e){if(e>=g){e=g}else{e--;e|=e>>>1;e|=e>>>2;e|=e>>>4;e|=e>>>8;e|=e>>>16;e++}return e}function howMuchToRead(e,t){if(e<=0||t.length===0&&t.ended)return 0;if(t.objectMode)return 1;if(e!==e){if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length}if(e>t.highWaterMark)t.highWaterMark=computeNewHighWaterMark(e);if(e<=t.length)return e;if(!t.ended){t.needReadable=true;return 0}return t.length}Readable.prototype.read=function(e){c("read",e);e=parseInt(e,10);var t=this._readableState;var r=e;if(e!==0)t.emittedReadable=false;if(e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended)){c("read: emitReadable",t.length,t.ended);if(t.length===0&&t.ended)endReadable(this);else emitReadable(this);return null}e=howMuchToRead(e,t);if(e===0&&t.ended){if(t.length===0)endReadable(this);return null}var i=t.needReadable;c("need readable",i);if(t.length===0||t.length-e<t.highWaterMark){i=true;c("length less than watermark",i)}if(t.ended||t.reading){i=false;c("reading or ended",i)}else if(i){c("do read");t.reading=true;t.sync=true;if(t.length===0)t.needReadable=true;this._read(t.highWaterMark);t.sync=false;if(!t.reading)e=howMuchToRead(r,t)}var n;if(e>0)n=fromList(e,t);else n=null;if(n===null){t.needReadable=true;e=0}else{t.length-=e}if(t.length===0){if(!t.ended)t.needReadable=true;if(r!==e&&t.ended)endReadable(this)}if(n!==null)this.emit("data",n);return n};function onEofChunk(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();if(r&&r.length){t.buffer.push(r);t.length+=t.objectMode?1:r.length}}t.ended=true;emitReadable(e)}function emitReadable(e){var t=e._readableState;t.needReadable=false;if(!t.emittedReadable){c("emitReadable",t.flowing);t.emittedReadable=true;if(t.sync)i.nextTick(emitReadable_,e);else emitReadable_(e)}}function emitReadable_(e){c("emit readable");e.emit("readable");flow(e)}function maybeReadMore(e,t){if(!t.readingMore){t.readingMore=true;i.nextTick(maybeReadMore_,e,t)}}function maybeReadMore_(e,t){var r=t.length;while(!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark){c("maybeReadMore read 0");e.read(0);if(r===t.length)break;else r=t.length}t.readingMore=false}Readable.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))};Readable.prototype.pipe=function(e,t){var r=this;var n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1;c("pipe count=%d opts=%j",n.pipesCount,t);var a=(!t||t.end!==false)&&e!==process.stdout&&e!==process.stderr;var s=a?onend:unpipe;if(n.endEmitted)i.nextTick(s);else r.once("end",s);e.on("unpipe",onunpipe);function onunpipe(e,t){c("onunpipe");if(e===r){if(t&&t.hasUnpiped===false){t.hasUnpiped=true;cleanup()}}}function onend(){c("onend");e.end()}var f=pipeOnDrain(r);e.on("drain",f);var u=false;function cleanup(){c("cleanup");e.removeListener("close",onclose);e.removeListener("finish",onfinish);e.removeListener("drain",f);e.removeListener("error",onerror);e.removeListener("unpipe",onunpipe);r.removeListener("end",onend);r.removeListener("end",unpipe);r.removeListener("data",ondata);u=true;if(n.awaitDrain&&(!e._writableState||e._writableState.needDrain))f()}var l=false;r.on("data",ondata);function ondata(t){c("ondata");l=false;var i=e.write(t);if(false===i&&!l){if((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&indexOf(n.pipes,e)!==-1)&&!u){c("false write response, pause",r._readableState.awaitDrain);r._readableState.awaitDrain++;l=true}r.pause()}}function onerror(t){c("onerror",t);unpipe();e.removeListener("error",onerror);if(o(e,"error")===0)e.emit("error",t)}prependListener(e,"error",onerror);function onclose(){e.removeListener("finish",onfinish);unpipe()}e.once("close",onclose);function onfinish(){c("onfinish");e.removeListener("close",onclose);unpipe()}e.once("finish",onfinish);function unpipe(){c("unpipe");r.unpipe(e)}e.emit("pipe",r);if(!n.flowing){c("pipe resume");r.resume()}return e};function pipeOnDrain(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain);if(t.awaitDrain)t.awaitDrain--;if(t.awaitDrain===0&&o(e,"data")){t.flowing=true;flow(e)}}}Readable.prototype.unpipe=function(e){var t=this._readableState;var r={hasUnpiped:false};if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;if(!e)e=t.pipes;t.pipes=null;t.pipesCount=0;t.flowing=false;if(e)e.emit("unpipe",this,r);return this}if(!e){var i=t.pipes;var n=t.pipesCount;t.pipes=null;t.pipesCount=0;t.flowing=false;for(var a=0;a<n;a++){i[a].emit("unpipe",this,r)}return this}var s=indexOf(t.pipes,e);if(s===-1)return this;t.pipes.splice(s,1);t.pipesCount-=1;if(t.pipesCount===1)t.pipes=t.pipes[0];e.emit("unpipe",this,r);return this};Readable.prototype.on=function(e,t){var r=f.prototype.on.call(this,e,t);if(e==="data"){if(this._readableState.flowing!==false)this.resume()}else if(e==="readable"){var n=this._readableState;if(!n.endEmitted&&!n.readableListening){n.readableListening=n.needReadable=true;n.emittedReadable=false;if(!n.reading){i.nextTick(nReadingNextTick,this)}else if(n.length){emitReadable(this)}}}return r};Readable.prototype.addListener=Readable.prototype.on;function nReadingNextTick(e){c("readable nexttick read 0");e.read(0)}Readable.prototype.resume=function(){var e=this._readableState;if(!e.flowing){c("resume");e.flowing=true;resume(this,e)}return this};function resume(e,t){if(!t.resumeScheduled){t.resumeScheduled=true;i.nextTick(resume_,e,t)}}function resume_(e,t){if(!t.reading){c("resume read 0");e.read(0)}t.resumeScheduled=false;t.awaitDrain=0;e.emit("resume");flow(e);if(t.flowing&&!t.reading)e.read(0)}Readable.prototype.pause=function(){c("call pause flowing=%j",this._readableState.flowing);if(false!==this._readableState.flowing){c("pause");this._readableState.flowing=false;this.emit("pause")}return this};function flow(e){var t=e._readableState;c("flow",t.flowing);while(t.flowing&&e.read()!==null){}}Readable.prototype.wrap=function(e){var t=this;var r=this._readableState;var i=false;e.on("end",function(){c("wrapped end");if(r.decoder&&!r.ended){var e=r.decoder.end();if(e&&e.length)t.push(e)}t.push(null)});e.on("data",function(n){c("wrapped data");if(r.decoder)n=r.decoder.write(n);if(r.objectMode&&(n===null||n===undefined))return;else if(!r.objectMode&&(!n||!n.length))return;var a=t.push(n);if(!a){i=true;e.pause()}});for(var n in e){if(this[n]===undefined&&typeof e[n]==="function"){this[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n)}}for(var a=0;a<m.length;a++){e.on(m[a],this.emit.bind(this,m[a]))}this._read=function(t){c("wrapped _read",t);if(i){i=false;e.resume()}};return this};Object.defineProperty(Readable.prototype,"readableHighWaterMark",{enumerable:false,get:function(){return this._readableState.highWaterMark}});Readable._fromList=fromList;function fromList(e,t){if(t.length===0)return null;var r;if(t.objectMode)r=t.buffer.shift();else if(!e||e>=t.length){if(t.decoder)r=t.buffer.join("");else if(t.buffer.length===1)r=t.buffer.head.data;else r=t.buffer.concat(t.length);t.buffer.clear()}else{r=fromListPartial(e,t.buffer,t.decoder)}return r}function fromListPartial(e,t,r){var i;if(e<t.head.data.length){i=t.head.data.slice(0,e);t.head.data=t.head.data.slice(e)}else if(e===t.head.data.length){i=t.shift()}else{i=r?copyFromBufferString(e,t):copyFromBuffer(e,t)}return i}function copyFromBufferString(e,t){var r=t.head;var i=1;var n=r.data;e-=n.length;while(r=r.next){var a=r.data;var s=e>a.length?a.length:e;if(s===a.length)n+=a;else n+=a.slice(0,e);e-=s;if(e===0){if(s===a.length){++i;if(r.next)t.head=r.next;else t.head=t.tail=null}else{t.head=r;r.data=a.slice(s)}break}++i}t.length-=i;return n}function copyFromBuffer(e,t){var r=u.allocUnsafe(e);var i=t.head;var n=1;i.data.copy(r);e-=i.data.length;while(i=i.next){var a=i.data;var s=e>a.length?a.length:e;a.copy(r,r.length-e,0,s);e-=s;if(e===0){if(s===a.length){++n;if(i.next)t.head=i.next;else t.head=t.tail=null}else{t.head=i;i.data=a.slice(s)}break}++n}t.length-=n;return r}function endReadable(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');if(!t.endEmitted){t.ended=true;i.nextTick(endReadableNT,t,e)}}function endReadableNT(e,t){if(!e.endEmitted&&e.length===0){e.endEmitted=true;t.readable=false;t.emit("end")}}function indexOf(e,t){for(var r=0,i=e.length;r<i;r++){if(e[r]===t)return r}return-1}},4415:(e,t,r)=>{"use strict";e.exports=Transform;var i=r(1359);var n=Object.create(r(5898));n.inherits=r(4124);n.inherits(Transform,i);function afterTransform(e,t){var r=this._transformState;r.transforming=false;var i=r.writecb;if(!i){return this.emit("error",new Error("write callback called multiple times"))}r.writechunk=null;r.writecb=null;if(t!=null)this.push(t);i(e);var n=this._readableState;n.reading=false;if(n.needReadable||n.length<n.highWaterMark){this._read(n.highWaterMark)}}function Transform(e){if(!(this instanceof Transform))return new Transform(e);i.call(this,e);this._transformState={afterTransform:afterTransform.bind(this),needTransform:false,transforming:false,writecb:null,writechunk:null,writeencoding:null};this._readableState.needReadable=true;this._readableState.sync=false;if(e){if(typeof e.transform==="function")this._transform=e.transform;if(typeof e.flush==="function")this._flush=e.flush}this.on("prefinish",prefinish)}function prefinish(){var e=this;if(typeof this._flush==="function"){this._flush(function(t,r){done(e,t,r)})}else{done(this,null,null)}}Transform.prototype.push=function(e,t){this._transformState.needTransform=false;return i.prototype.push.call(this,e,t)};Transform.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")};Transform.prototype._write=function(e,t,r){var i=this._transformState;i.writecb=r;i.writechunk=e;i.writeencoding=t;if(!i.transforming){var n=this._readableState;if(i.needTransform||n.needReadable||n.length<n.highWaterMark)this._read(n.highWaterMark)}};Transform.prototype._read=function(e){var t=this._transformState;if(t.writechunk!==null&&t.writecb&&!t.transforming){t.transforming=true;this._transform(t.writechunk,t.writeencoding,t.afterTransform)}else{t.needTransform=true}};Transform.prototype._destroy=function(e,t){var r=this;i.prototype._destroy.call(this,e,function(e){t(e);r.emit("close")})};function done(e,t,r){if(t)return e.emit("error",t);if(r!=null)e.push(r);if(e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}},6993:(e,t,r)=>{"use strict";var i=r(7810);e.exports=Writable;function WriteReq(e,t,r){this.chunk=e;this.encoding=t;this.callback=r;this.next=null}function CorkedRequest(e){var t=this;this.next=null;this.entry=null;this.finish=function(){onCorkedFinish(t,e)}}var n=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:i.nextTick;var a;Writable.WritableState=WritableState;var s=Object.create(r(5898));s.inherits=r(4124);var o={deprecate:r(5278)};var f=r(2387);var u=r(110).Buffer;var l=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return u.from(e)}function _isUint8Array(e){return u.isBuffer(e)||e instanceof l}var d=r(7049);s.inherits(Writable,f);function nop(){}function WritableState(e,t){a=a||r(1359);e=e||{};var i=t instanceof a;this.objectMode=!!e.objectMode;if(i)this.objectMode=this.objectMode||!!e.writableObjectMode;var n=e.highWaterMark;var s=e.writableHighWaterMark;var o=this.objectMode?16:16*1024;if(n||n===0)this.highWaterMark=n;else if(i&&(s||s===0))this.highWaterMark=s;else this.highWaterMark=o;this.highWaterMark=Math.floor(this.highWaterMark);this.finalCalled=false;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;this.destroyed=false;var f=e.decodeStrings===false;this.decodeStrings=!f;this.defaultEncoding=e.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(e){onwrite(t,e)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function getBuffer(){var e=this.bufferedRequest;var t=[];while(e){t.push(e);e=e.next}return t};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:o.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}})();var h;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function"){h=Function.prototype[Symbol.hasInstance];Object.defineProperty(Writable,Symbol.hasInstance,{value:function(e){if(h.call(this,e))return true;if(this!==Writable)return false;return e&&e._writableState instanceof WritableState}})}else{h=function(e){return e instanceof this}}function Writable(e){a=a||r(1359);if(!h.call(Writable,this)&&!(this instanceof a)){return new Writable(e)}this._writableState=new WritableState(e,this);this.writable=true;if(e){if(typeof e.write==="function")this._write=e.write;if(typeof e.writev==="function")this._writev=e.writev;if(typeof e.destroy==="function")this._destroy=e.destroy;if(typeof e.final==="function")this._final=e.final}f.call(this)}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function writeAfterEnd(e,t){var r=new Error("write after end");e.emit("error",r);i.nextTick(t,r)}function validChunk(e,t,r,n){var a=true;var s=false;if(r===null){s=new TypeError("May not write null values to stream")}else if(typeof r!=="string"&&r!==undefined&&!t.objectMode){s=new TypeError("Invalid non-string/buffer chunk")}if(s){e.emit("error",s);i.nextTick(n,s);a=false}return a}Writable.prototype.write=function(e,t,r){var i=this._writableState;var n=false;var a=!i.objectMode&&_isUint8Array(e);if(a&&!u.isBuffer(e)){e=_uint8ArrayToBuffer(e)}if(typeof t==="function"){r=t;t=null}if(a)t="buffer";else if(!t)t=i.defaultEncoding;if(typeof r!=="function")r=nop;if(i.ended)writeAfterEnd(this,r);else if(a||validChunk(this,i,e,r)){i.pendingcb++;n=writeOrBuffer(this,i,a,e,t,r)}return n};Writable.prototype.cork=function(){var e=this._writableState;e.corked++};Writable.prototype.uncork=function(){var e=this._writableState;if(e.corked){e.corked--;if(!e.writing&&!e.corked&&!e.finished&&!e.bufferProcessing&&e.bufferedRequest)clearBuffer(this,e)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(e){if(typeof e==="string")e=e.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);this._writableState.defaultEncoding=e;return this};function decodeChunk(e,t,r){if(!e.objectMode&&e.decodeStrings!==false&&typeof t==="string"){t=u.from(t,r)}return t}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function writeOrBuffer(e,t,r,i,n,a){if(!r){var s=decodeChunk(t,i,n);if(i!==s){r=true;n="buffer";i=s}}var o=t.objectMode?1:i.length;t.length+=o;var f=t.length<t.highWaterMark;if(!f)t.needDrain=true;if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null};if(u){u.next=t.lastBufferedRequest}else{t.bufferedRequest=t.lastBufferedRequest}t.bufferedRequestCount+=1}else{doWrite(e,t,false,o,i,n,a)}return f}function doWrite(e,t,r,i,n,a,s){t.writelen=i;t.writecb=s;t.writing=true;t.sync=true;if(r)e._writev(n,t.onwrite);else e._write(n,a,t.onwrite);t.sync=false}function onwriteError(e,t,r,n,a){--t.pendingcb;if(r){i.nextTick(a,n);i.nextTick(finishMaybe,e,t);e._writableState.errorEmitted=true;e.emit("error",n)}else{a(n);e._writableState.errorEmitted=true;e.emit("error",n);finishMaybe(e,t)}}function onwriteStateUpdate(e){e.writing=false;e.writecb=null;e.length-=e.writelen;e.writelen=0}function onwrite(e,t){var r=e._writableState;var i=r.sync;var a=r.writecb;onwriteStateUpdate(r);if(t)onwriteError(e,r,i,t,a);else{var s=needFinish(r);if(!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest){clearBuffer(e,r)}if(i){n(afterWrite,e,r,s,a)}else{afterWrite(e,r,s,a)}}}function afterWrite(e,t,r,i){if(!r)onwriteDrain(e,t);t.pendingcb--;i();finishMaybe(e,t)}function onwriteDrain(e,t){if(t.length===0&&t.needDrain){t.needDrain=false;e.emit("drain")}}function clearBuffer(e,t){t.bufferProcessing=true;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount;var n=new Array(i);var a=t.corkedRequestsFree;a.entry=r;var s=0;var o=true;while(r){n[s]=r;if(!r.isBuf)o=false;r=r.next;s+=1}n.allBuffers=o;doWrite(e,t,true,t.length,n,"",a.finish);t.pendingcb++;t.lastBufferedRequest=null;if(a.next){t.corkedRequestsFree=a.next;a.next=null}else{t.corkedRequestsFree=new CorkedRequest(t)}t.bufferedRequestCount=0}else{while(r){var f=r.chunk;var u=r.encoding;var l=r.callback;var d=t.objectMode?1:f.length;doWrite(e,t,false,d,f,u,l);r=r.next;t.bufferedRequestCount--;if(t.writing){break}}if(r===null)t.lastBufferedRequest=null}t.bufferedRequest=r;t.bufferProcessing=false}Writable.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))};Writable.prototype._writev=null;Writable.prototype.end=function(e,t,r){var i=this._writableState;if(typeof e==="function"){r=e;e=null;t=null}else if(typeof t==="function"){r=t;t=null}if(e!==null&&e!==undefined)this.write(e,t);if(i.corked){i.corked=1;this.uncork()}if(!i.ending&&!i.finished)endWritable(this,i,r)};function needFinish(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function callFinal(e,t){e._final(function(r){t.pendingcb--;if(r){e.emit("error",r)}t.prefinished=true;e.emit("prefinish");finishMaybe(e,t)})}function prefinish(e,t){if(!t.prefinished&&!t.finalCalled){if(typeof e._final==="function"){t.pendingcb++;t.finalCalled=true;i.nextTick(callFinal,e,t)}else{t.prefinished=true;e.emit("prefinish")}}}function finishMaybe(e,t){var r=needFinish(t);if(r){prefinish(e,t);if(t.pendingcb===0){t.finished=true;e.emit("finish")}}return r}function endWritable(e,t,r){t.ending=true;finishMaybe(e,t);if(r){if(t.finished)i.nextTick(r);else e.once("finish",r)}t.ended=true;e.writable=false}function onCorkedFinish(e,t,r){var i=e.entry;e.entry=null;while(i){var n=i.callback;t.pendingcb--;n(r);i=i.next}if(t.corkedRequestsFree){t.corkedRequestsFree.next=e}else{t.corkedRequestsFree=e}}Object.defineProperty(Writable.prototype,"destroyed",{get:function(){if(this._writableState===undefined){return false}return this._writableState.destroyed},set:function(e){if(!this._writableState){return}this._writableState.destroyed=e}});Writable.prototype.destroy=d.destroy;Writable.prototype._undestroy=d.undestroy;Writable.prototype._destroy=function(e,t){this.end();t(e)}},7053:(e,t,r)=>{"use strict";function _classCallCheck(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var i=r(110).Buffer;var n=r(1669);function copyBuffer(e,t,r){e.copy(t,r)}e.exports=function(){function BufferList(){_classCallCheck(this,BufferList);this.head=null;this.tail=null;this.length=0}BufferList.prototype.push=function push(e){var t={data:e,next:null};if(this.length>0)this.tail.next=t;else this.head=t;this.tail=t;++this.length};BufferList.prototype.unshift=function unshift(e){var t={data:e,next:this.head};if(this.length===0)this.tail=t;this.head=t;++this.length};BufferList.prototype.shift=function shift(){if(this.length===0)return;var e=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return e};BufferList.prototype.clear=function clear(){this.head=this.tail=null;this.length=0};BufferList.prototype.join=function join(e){if(this.length===0)return"";var t=this.head;var r=""+t.data;while(t=t.next){r+=e+t.data}return r};BufferList.prototype.concat=function concat(e){if(this.length===0)return i.alloc(0);if(this.length===1)return this.head.data;var t=i.allocUnsafe(e>>>0);var r=this.head;var n=0;while(r){copyBuffer(r.data,t,n);n+=r.data.length;r=r.next}return t};return BufferList}();if(n&&n.inspect&&n.inspect.custom){e.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e}}},7049:(e,t,r)=>{"use strict";var i=r(7810);function destroy(e,t){var r=this;var n=this._readableState&&this._readableState.destroyed;var a=this._writableState&&this._writableState.destroyed;if(n||a){if(t){t(e)}else if(e&&(!this._writableState||!this._writableState.errorEmitted)){i.nextTick(emitErrorNT,this,e)}return this}if(this._readableState){this._readableState.destroyed=true}if(this._writableState){this._writableState.destroyed=true}this._destroy(e||null,function(e){if(!t&&e){i.nextTick(emitErrorNT,r,e);if(r._writableState){r._writableState.errorEmitted=true}}else if(t){t(e)}});return this}function undestroy(){if(this._readableState){this._readableState.destroyed=false;this._readableState.reading=false;this._readableState.ended=false;this._readableState.endEmitted=false}if(this._writableState){this._writableState.destroyed=false;this._writableState.ended=false;this._writableState.ending=false;this._writableState.finished=false;this._writableState.errorEmitted=false}}function emitErrorNT(e,t){e.emit("error",t)}e.exports={destroy:destroy,undestroy:undestroy}},2387:(e,t,r)=>{e.exports=r(2413)},110:(e,t,r)=>{var i=r(4293);var n=i.Buffer;function copyProps(e,t){for(var r in e){t[r]=e[r]}}if(n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow){e.exports=i}else{copyProps(i,t);t.Buffer=SafeBuffer}function SafeBuffer(e,t,r){return n(e,t,r)}copyProps(n,SafeBuffer);SafeBuffer.from=function(e,t,r){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return n(e,t,r)};SafeBuffer.alloc=function(e,t,r){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var i=n(e);if(t!==undefined){if(typeof r==="string"){i.fill(t,r)}else{i.fill(t)}}else{i.fill(0)}return i};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return n(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return i.SlowBuffer(e)}},8536:(e,t,r)=>{"use strict";var i=r(110).Buffer;var n=i.isEncoding||function(e){e=""+e;switch(e&&e.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 true;default:return false}};function _normalizeEncoding(e){if(!e)return"utf8";var t;while(true){switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase();t=true}}}function normalizeEncoding(e){var t=_normalizeEncoding(e);if(typeof t!=="string"&&(i.isEncoding===n||!n(e)))throw new Error("Unknown encoding: "+e);return t||e}t.s=StringDecoder;function StringDecoder(e){this.encoding=normalizeEncoding(e);var t;switch(this.encoding){case"utf16le":this.text=utf16Text;this.end=utf16End;t=4;break;case"utf8":this.fillLast=utf8FillLast;t=4;break;case"base64":this.text=base64Text;this.end=base64End;t=3;break;default:this.write=simpleWrite;this.end=simpleEnd;return}this.lastNeed=0;this.lastTotal=0;this.lastChar=i.allocUnsafe(t)}StringDecoder.prototype.write=function(e){if(e.length===0)return"";var t;var r;if(this.lastNeed){t=this.fillLast(e);if(t===undefined)return"";r=this.lastNeed;this.lastNeed=0}else{r=0}if(r<e.length)return t?t+this.text(e,r):this.text(e,r);return t||""};StringDecoder.prototype.end=utf8End;StringDecoder.prototype.text=utf8Text;StringDecoder.prototype.fillLast=function(e){if(this.lastNeed<=e.length){e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length);this.lastNeed-=e.length};function utf8CheckByte(e){if(e<=127)return 0;else if(e>>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function utf8CheckIncomplete(e,t,r){var i=t.length-1;if(i<r)return 0;var n=utf8CheckByte(t[i]);if(n>=0){if(n>0)e.lastNeed=n-1;return n}if(--i<r||n===-2)return 0;n=utf8CheckByte(t[i]);if(n>=0){if(n>0)e.lastNeed=n-2;return n}if(--i<r||n===-2)return 0;n=utf8CheckByte(t[i]);if(n>=0){if(n>0){if(n===2)n=0;else e.lastNeed=n-3}return n}return 0}function utf8CheckExtraBytes(e,t,r){if((t[0]&192)!==128){e.lastNeed=0;return"�"}if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128){e.lastNeed=1;return"�"}if(e.lastNeed>2&&t.length>2){if((t[2]&192)!==128){e.lastNeed=2;return"�"}}}}function utf8FillLast(e){var t=this.lastTotal-this.lastNeed;var r=utf8CheckExtraBytes(this,e,t);if(r!==undefined)return r;if(this.lastNeed<=e.length){e.copy(this.lastChar,t,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,t,0,e.length);this.lastNeed-=e.length}function utf8Text(e,t){var r=utf8CheckIncomplete(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);e.copy(this.lastChar,0,i);return e.toString("utf8",t,i)}function utf8End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+"�";return t}function utf16Text(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1];return r.slice(0,-1)}}return r}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=e[e.length-1];return e.toString("utf16le",t,e.length-1)}function utf16End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function base64Text(e,t){var r=(e.length-t)%3;if(r===0)return e.toString("base64",t);this.lastNeed=3-r;this.lastTotal=3;if(r===1){this.lastChar[0]=e[e.length-1]}else{this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1]}return e.toString("base64",t,e.length-r)}function base64End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+this.lastChar.toString("base64",0,3-this.lastNeed);return t}function simpleWrite(e){return e.toString(this.encoding)}function simpleEnd(e){return e&&e.length?this.write(e):""}},1642:(e,t,r)=>{var i=r(2413);if(process.env.READABLE_STREAM==="disable"&&i){e.exports=i;t=e.exports=i.Readable;t.Readable=i.Readable;t.Writable=i.Writable;t.Duplex=i.Duplex;t.Transform=i.Transform;t.PassThrough=i.PassThrough;t.Stream=i}else{t=e.exports=r(1433);t.Stream=i||t;t.Readable=t;t.Writable=r(6993);t.Duplex=r(1359);t.Transform=r(4415);t.PassThrough=r(1542)}},1867:(e,t,r)=>{var i=r(4293);var n=i.Buffer;function copyProps(e,t){for(var r in e){t[r]=e[r]}}if(n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow){e.exports=i}else{copyProps(i,t);t.Buffer=SafeBuffer}function SafeBuffer(e,t,r){return n(e,t,r)}SafeBuffer.prototype=Object.create(n.prototype);copyProps(n,SafeBuffer);SafeBuffer.from=function(e,t,r){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return n(e,t,r)};SafeBuffer.alloc=function(e,t,r){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var i=n(e);if(t!==undefined){if(typeof r==="string"){i.fill(t,r)}else{i.fill(t)}}else{i.fill(0)}return i};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return n(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return i.SlowBuffer(e)}},5435:(e,t,r)=>{"use strict";var i=r(1669);var n=r(8614).EventEmitter;function Hose(e,t,r){n.call(this);if(typeof t==="function"){r=t;t={}}this.socket=e;this.options=t;this.filter=r;this.buffer=null;var i=this;this.listeners={error:function(e){return i.onError(e)},data:function(e){return i.onData(e)},end:function(){return i.onEnd()}};this.socket.on("error",this.listeners.error);this.socket.on("data",this.listeners.data);this.socket.on("end",this.listeners.end)}i.inherits(Hose,n);e.exports=Hose;Hose.create=function create(e,t,r){return new Hose(e,t,r)};Hose.prototype.detach=function detach(){this.socket.pause();this.socket.removeListener("error",this.listeners.error);this.socket.removeListener("data",this.listeners.data);this.socket.removeListener("end",this.listeners.end)};Hose.prototype.reemit=function reemit(){var e=this.buffer;this.buffer=null;if(this.socket.unshift){this.socket.unshift(e);if(this.socket.listeners("data").length>0)this.socket.resume();return}if(this.socket.ondata)this.socket.ondata(e,0,e.length);this.socket.emit("data",e);this.socket.resume()};Hose.prototype.onError=function onError(e){this.detach();this.emit("error",e)};Hose.prototype.onData=function onData(e){if(this.buffer)this.buffer=Buffer.concat([this.buffer,e]);else this.buffer=e;var t=this;this.filter(this.buffer,function(e,r){if(e)return t.onError(e);if(!r)return;t.detach();t.emit("select",r,t.socket);t.reemit()})};Hose.prototype.onEnd=function onEnd(){this.detach();this.emit("error",new Error("Not enough data to recognize protocol"))}},1590:(e,t,r)=>{"use strict";var i=t;i.utils=r(7196);i.protocol={};i.protocol.base=r(9827);i.protocol.spdy=r(2692);i.protocol.http2=r(5041);i.Window=r(4960);i.Priority=r(3432);i.Stream=r(24).F;i.Connection=r(2109).e;i.connection=i.Connection},2109:(e,t,r)=>{"use strict";var i=r(1669);var n=r(1590);var a={server:r(1492)("spdy:connection:server"),client:r(1492)("spdy:connection:client")};var s=r(8614).EventEmitter;var o=n.Stream;function Connection(e,t){s.call(this);var r={};this._spdyState=r;this.httpAllowHalfOpen=true;r.timeout=new n.utils.Timeout(this);r.protocol=n.protocol[t.protocol];r.version=null;r.constants=r.protocol.constants;r.pair=null;r.isServer=t.isServer;r.priorityRoot=new n.Priority({defaultWeight:r.constants.DEFAULT_WEIGHT,maxCount:n.protocol.base.constants.MAX_PRIORITY_STREAMS});r.maxStreams=t.maxStreams||r.constants.MAX_CONCURRENT_STREAMS;r.autoSpdy31=t.protocol.name!=="h2"&&t.autoSpdy31;r.acceptPush=t.acceptPush===undefined?!r.isServer:t.acceptPush;if(t.maxChunk===false){r.maxChunk=Infinity}else if(t.maxChunk===undefined){r.maxChunk=n.protocol.base.constants.DEFAULT_MAX_CHUNK}else{r.maxChunk=t.maxChunk}var i=t.windowSize||1<<20;r.window=new n.Window({id:0,isServer:r.isServer,recv:{size:r.constants.DEFAULT_WINDOW,max:r.constants.MAX_INITIAL_WINDOW_SIZE},send:{size:r.constants.DEFAULT_WINDOW,max:r.constants.MAX_INITIAL_WINDOW_SIZE}});r.window.recv.setMax(i);r.streamWindow=new n.Window({id:-1,isServer:r.isServer,recv:{size:i,max:r.constants.MAX_INITIAL_WINDOW_SIZE},send:{size:r.constants.DEFAULT_WINDOW,max:r.constants.MAX_INITIAL_WINDOW_SIZE}});r.pool=r.protocol.compressionPool.create(t.headerCompression);r.counters={push:0,stream:0};r.stream={map:{},count:0,nextId:r.isServer?2:1,lastId:{both:0,received:0}};r.ping={nextId:r.isServer?2:1,map:{}};r.goaway=false;r.debug=r.isServer?a.server:a.client;r.xForward=null;r.parser=r.protocol.parser.create({isServer:r.isServer,window:r.window});r.framer=r.protocol.framer.create({window:r.window,timeout:r.timeout});if(r.protocol.name==="spdy"){r.framer.enablePush(r.isServer)}if(!r.isServer){r.parser.skipPreface()}this.socket=e;this._init()}i.inherits(Connection,s);t.e=Connection;Connection.create=function create(e,t){return new Connection(e,t)};Connection.prototype._init=function init(){var e=this;var t=this._spdyState;var r=t.pool;t.window.recv.on("drain",function(){e._onSessionWindowDrain()});t.parser.on("data",function(t){e._handleFrame(t)});t.parser.once("version",function(t){e._onVersion(t)});t.parser.on("error",function(t){e._onParserError(t)});t.framer.on("error",function(t){e.emit("error",t)});this.socket.pipe(t.parser);t.framer.pipe(this.socket);this.socket.on("error",function onSocketError(t){e.emit("error",t)});this.socket.once("close",function onclose(i){var n;if(i){n=new Error("socket hang up");n.code="ECONNRESET"}e.destroyStreams(n);e.emit("close");if(t.pair){r.put(t.pair)}t.framer.resume()});this.once("close",function(){e.setTimeout(0)});function _onWindowOverflow(){e._onWindowOverflow()}t.window.recv.on("overflow",_onWindowOverflow);t.window.send.on("overflow",_onWindowOverflow);this.socket.allowHalfOpen=false};Connection.prototype._onVersion=function _onVersion(e){var t=this._spdyState;var r=t.version;var i=t.parser;var n=t.framer;var a=t.pool;t.version=e;t.debug("id=0 version=%d",e);if(!r){t.pair=a.get(e);i.setCompression(t.pair);n.setCompression(t.pair)}n.setVersion(e);if(!t.isServer){n.prefaceFrame();if(t.xForward!==null){n.xForwardedFor({host:t.xForward})}}n.settingsFrame({max_header_list_size:t.constants.DEFAULT_MAX_HEADER_LIST_SIZE,max_concurrent_streams:t.maxStreams,enable_push:t.acceptPush?1:0,initial_window_size:t.window.recv.max});if(t.version>=3.1||t.isServer&&t.autoSpdy31){this._onSessionWindowDrain()}this.emit("version",e)};Connection.prototype._onParserError=function _onParserError(e){var t=this._spdyState;t.parser.kill();if(e instanceof n.protocol.base.utils.ProtocolError){this._goaway({lastId:t.stream.lastId.both,code:e.code,extra:e.message,send:true})}this.emit("error",e)};Connection.prototype._handleFrame=function _handleFrame(e){var t=this._spdyState;t.debug("id=0 frame",e);t.timeout.reset();this.emit("frame",e);var r;if(e.type==="WINDOW_UPDATE"&&e.id===0){if(t.version<3.1&&t.autoSpdy31){t.debug("id=0 switch version to 3.1");t.version=3.1;this.emit("version",3.1)}t.window.send.update(e.delta);return}if(t.isServer&&e.type==="PUSH_PROMISE"){t.debug("id=0 server PUSH_PROMISE");this._goaway({lastId:t.stream.lastId.both,code:"PROTOCOL_ERROR",send:true});return}if(!r&&e.id!==undefined){r=t.stream.map[e.id];if(!r&&e.type!=="HEADERS"&&e.type!=="PRIORITY"&&e.type!=="RST"){if(this._isGoaway(e.id)){return}t.debug("id=0 stream=%d not found",e.id);t.framer.rstFrame({id:e.id,code:"INVALID_STREAM"});return}}if(!r&&e.type==="HEADERS"){this._handleHeaders(e);return}if(r){r._handleFrame(e)}else if(e.type==="SETTINGS"){this._handleSettings(e.settings)}else if(e.type==="ACK_SETTINGS"){}else if(e.type==="PING"){this._handlePing(e)}else if(e.type==="GOAWAY"){this._handleGoaway(e)}else if(e.type==="X_FORWARDED_FOR"){if(t.xForward===null){t.xForward=e.host}}else if(e.type==="PRIORITY"){}else{t.debug("id=0 unknown frame type: %s",e.type)}};Connection.prototype._onWindowOverflow=function _onWindowOverflow(){var e=this._spdyState;e.debug("id=0 window overflow");this._goaway({lastId:e.stream.lastId.both,code:"FLOW_CONTROL_ERROR",send:true})};Connection.prototype._isGoaway=function _isGoaway(e){var t=this._spdyState;if(t.goaway!==false&&t.goaway<e){return true}return false};Connection.prototype._getId=function _getId(){var e=this._spdyState;var t=e.stream.nextId;e.stream.nextId+=2;return t};Connection.prototype._createStream=function _createStream(e){var t=this._spdyState;var r=e.id;if(r===undefined){r=this._getId()}var i=this._isGoaway(r);if(e.push&&!t.acceptPush){t.debug("id=0 push disabled promisedId=%d",r);this._goaway({lastId:t.stream.lastId.both,code:"PROTOCOL_ERROR",send:true});i=true}var n=new o(this,{id:r,request:e.request!==false,method:e.method,path:e.path,host:e.host,priority:e.priority,headers:e.headers,parent:e.parent,readable:!i&&e.readable,writable:!i&&e.writable});var a=this;if(i){return n}t.stream.lastId.both=Math.max(t.stream.lastId.both,r);t.debug("id=0 add stream=%d",n.id);t.stream.map[n.id]=n;t.stream.count++;t.counters.stream++;if(n.parent!==null){t.counters.push++}n.once("close",function(){a._removeStream(n)});return n};Connection.prototype._handleHeaders=function _handleHeaders(e){var t=this._spdyState;if(e.id<=t.stream.lastId.received){return}if((e.id+t.stream.nextId)%2===0){t.framer.rstFrame({id:e.id,code:"PROTOCOL_ERROR"});return}var r=this._createStream({id:e.id,request:false,method:e.headers[":method"],path:e.headers[":path"],host:e.headers[":authority"],priority:e.priority,headers:e.headers,writable:e.writable});if(this._isGoaway(r.id)){return}t.stream.lastId.received=Math.max(t.stream.lastId.received,r.id);if(!this.emit("stream",r)){r.abort();return}if(e.fin){r._handleFrame({type:"FIN",fin:true})}return r};Connection.prototype._onSessionWindowDrain=function _onSessionWindowDrain(){var e=this._spdyState;if(e.version<3.1&&!(e.isServer&&e.autoSpdy31)){return}var t=e.window.recv.getDelta();if(t===0){return}e.debug("id=0 session window drain, update by %d",t);e.framer.windowUpdateFrame({id:0,delta:t});e.window.recv.update(t)};Connection.prototype.start=function start(e){this._spdyState.parser.setVersion(e)};Connection.prototype.getVersion=function getVersion(){return this._spdyState.version};Connection.prototype._handleSettings=function _handleSettings(e){var t=this._spdyState;t.framer.ackSettingsFrame();this._setDefaultWindow(e);if(e.max_frame_size){t.framer.setMaxFrameSize(e.max_frame_size)}if(e.header_table_size){try{t.pair.compress.updateTableSize(e.header_table_size)}catch(e){this._goaway({lastId:0,code:"PROTOCOL_ERROR",send:true});return}}if(t.protocol.name!=="spdy"){if(e.enable_push===undefined){t.framer.enablePush(t.isServer)}else{t.framer.enablePush(e.enable_push===1)}}};Connection.prototype._setDefaultWindow=function _setDefaultWindow(e){if(e.initial_window_size===undefined){return}var t=this._spdyState;var r=t.streamWindow;r.send.setMax(e.initial_window_size);Object.keys(t.stream.map).forEach(function(r){var i=t.stream.map[r];var n=i._spdyState.window;n.send.updateMax(e.initial_window_size)})};Connection.prototype._handlePing=function handlePing(e){var t=this;var r=this._spdyState;if(!e.ack){r.framer.pingFrame({opaque:e.opaque,ack:true});t.emit("ping",e.opaque);return}var i=e.opaque.toString("hex");if(!r.ping.map[i]){return}var n=r.ping.map[i];delete r.ping.map[i];if(n.cb){n.cb(null)}};Connection.prototype._handleGoaway=function handleGoaway(e){this._goaway({lastId:e.lastId,code:e.code,send:false})};Connection.prototype.ping=function ping(e){var t=this._spdyState;var r=Buffer.alloc(t.constants.PING_OPAQUE_SIZE);r.fill(0);r.writeUInt32BE(t.ping.nextId,r.length-4);t.ping.nextId+=2;t.ping.map[r.toString("hex")]={cb:e};t.framer.pingFrame({opaque:r,ack:false})};Connection.prototype.getCounter=function getCounter(e){return this._spdyState.counters[e]};Connection.prototype.reserveStream=function reserveStream(e,t){var r=this._createStream(e);if(this._isGoaway(r.id)){var i=new Error("Can't send request after GOAWAY");process.nextTick(function(){if(t){t(i)}else{r.emit("error",i)}});return r}if(t){process.nextTick(function(){t(null,r)})}return r};Connection.prototype.request=function request(e,t){var r=this.reserveStream(e,function(e){if(e){if(t){t(e)}else{r.emit("error",e)}return}if(r._wasSent()){if(t){t(null,r)}return}r.send(function(e){if(e){if(t){return t(e)}else{return r.emit("error",e)}}if(t){t(null,r)}})});return r};Connection.prototype._removeStream=function _removeStream(e){var t=this._spdyState;t.debug("id=0 remove stream=%d",e.id);delete t.stream.map[e.id];t.stream.count--;if(t.stream.count===0){this.emit("_streamDrain")}};Connection.prototype._goaway=function _goaway(e){var t=this._spdyState;var r=this;t.goaway=e.lastId;t.debug("id=0 goaway from=%d",t.goaway);Object.keys(t.stream.map).forEach(function(r){var i=t.stream.map[r];if(i.id<=e.lastId){return}i.abort();i.emit("error",new Error("New stream after GOAWAY"))});function finish(){if(t.stream.count===0||e.code!=="OK"){t.parser.kill();process.nextTick(function(){var t=new Error("Fatal error: "+e.code);r._onStreamDrain(t)});return}r.on("_streamDrain",r._onStreamDrain)}if(e.send){t.framer.goawayFrame({lastId:e.lastId,code:e.code,extra:e.extra},finish)}else{finish()}};Connection.prototype._onStreamDrain=function _onStreamDrain(e){var t=this._spdyState;t.debug("id=0 _onStreamDrain");t.framer.dump();t.framer.unpipe(this.socket);t.framer.resume();if(this.socket.destroySoon){this.socket.destroySoon()}this.emit("close",e)};Connection.prototype.end=function end(e){var t=this._spdyState;if(e){this.once("close",e)}this._goaway({lastId:t.stream.lastId.both,code:"OK",send:true})};Connection.prototype.destroyStreams=function destroyStreams(e){var t=this._spdyState;Object.keys(t.stream.map).forEach(function(r){var i=t.stream.map[r];i.destroy();if(e){i.emit("error",e)}})};Connection.prototype.isServer=function isServer(){return this._spdyState.isServer};Connection.prototype.getXForwardedFor=function getXForwardFor(){return this._spdyState.xForward};Connection.prototype.sendXForwardedFor=function sendXForwardedFor(e){var t=this._spdyState;if(t.version!==null){t.framer.xForwardedFor({host:e})}else{t.xForward=e}};Connection.prototype.pushPromise=function pushPromise(e,t,r){var i=this._spdyState;var n=this._createStream({request:false,parent:e,method:t.method,path:t.path,host:t.host,priority:t.priority,headers:t.headers,readable:false});var a;if(this._isGoaway(n.id)){a=new Error("Can't send PUSH_PROMISE after GOAWAY");process.nextTick(function(){if(r){r(a)}else{n.emit("error",a)}});return n}if(t.push&&!i.acceptPush){a=new Error("Can't send PUSH_PROMISE, other side won't accept it");process.nextTick(function(){if(r){r(a)}else{n.emit("error",a)}});return n}n._sendPush(t.status,t.response,function(e){if(!r){if(e){n.emit("error",e)}return}if(e){return r(e)}r(null,n)});return n};Connection.prototype.setTimeout=function setTimeout(e,t){var r=this._spdyState;r.timeout.set(e,t)}},3432:(e,t,r)=>{"use strict";var i=r(1590);var n=i.utils;var a=r(2357);var s=r(1492)("spdy:priority");function PriorityNode(e,t){this.tree=e;this.id=t.id;this.parent=t.parent;this.weight=t.weight;this.priorityFrom=0;this.priorityTo=1;this.priority=1;this.children={list:[],weight:0};if(this.parent!==null){this.parent.addChild(this)}}function compareChildren(e,t){return e.weight===t.weight?e.id-t.id:e.weight-t.weight}PriorityNode.prototype.toJSON=function toJSON(){return{parent:this.parent,weight:this.weight,exclusive:this.exclusive}};PriorityNode.prototype.getPriority=function getPriority(){return this.priority};PriorityNode.prototype.getPriorityRange=function getPriorityRange(){return{from:this.priorityFrom,to:this.priorityTo}};PriorityNode.prototype.addChild=function addChild(e){e.parent=this;n.binaryInsert(this.children.list,e,compareChildren);this.children.weight+=e.weight;this._updatePriority(this.priorityFrom,this.priorityTo)};PriorityNode.prototype.remove=function remove(){a(this.parent,"Can't remove root node");this.parent.removeChild(this);this.tree._removeNode(this);for(var e=0;e<this.children.list.length;e++){this.parent.addChild(this.children.list[e])}};PriorityNode.prototype.removeChild=function removeChild(e){this.children.weight-=e.weight;var t=n.binarySearch(this.children.list,e,compareChildren);if(t!==-1&&this.children.list.length>=t){this.children.list.splice(t,1)}};PriorityNode.prototype.removeChildren=function removeChildren(){var e=this.children.list;this.children.list=[];this.children.weight=0;return e};PriorityNode.prototype._updatePriority=function _updatePriority(e,t){this.priority=t-e;this.priorityFrom=e;this.priorityTo=t;var r=0;for(var i=0;i<this.children.list.length;i++){var n=this.children.list[i];var a=r+n.weight;n._updatePriority(e+this.priority*(r/this.children.weight),e+this.priority*(a/this.children.weight));r=a}};function PriorityTree(e){this.map={};this.list=[];this.defaultWeight=e.defaultWeight||16;this.count=0;this.maxCount=e.maxCount;this.root=this.add({id:0,parent:null,weight:1})}e.exports=PriorityTree;PriorityTree.create=function create(e){return new PriorityTree(e)};PriorityTree.prototype.add=function add(e){if(e.id===e.parent){return this.addDefault(e.id)}var t=e.parent===null?null:this.map[e.parent];if(t===undefined){return this.addDefault(e.id)}s("add node=%d parent=%d weight=%d exclusive=%d",e.id,e.parent===null?-1:e.parent,e.weight||this.defaultWeight,e.exclusive?1:0);var r;if(e.exclusive){r=t.removeChildren()}var i=new PriorityNode(this,{id:e.id,parent:t,weight:e.weight||this.defaultWeight});this.map[e.id]=i;if(e.exclusive){for(var n=0;n<r.length;n++){i.addChild(r[n])}}this.count++;if(this.count>this.maxCount){s("hit maximum remove id=%d",this.list[0].id);this.list.shift().remove()}if(i.parent!==null){this.list.push(i)}return i};PriorityTree.prototype.get=function get(e){return this.map[e]};PriorityTree.prototype.addDefault=function addDefault(e){s("creating default node");return this.add({id:e,parent:0,weight:this.defaultWeight})};PriorityTree.prototype._removeNode=function _removeNode(e){delete this.map[e.id];var t=n.binarySearch(this.list,e,compareChildren);this.list.splice(t,1);this.count--}},7220:(e,t)=>{t.DEFAULT_METHOD="GET";t.DEFAULT_HOST="localhost";t.MAX_PRIORITY_STREAMS=100;t.DEFAULT_MAX_CHUNK=8*1024},5536:(e,t,r)=>{"use strict";var i=r(1669);var n=r(1590);var a=r(9827);var s=a.Scheduler;function Framer(e){s.call(this);this.version=null;this.compress=null;this.window=e.window;this.timeout=e.timeout;this.pushEnabled=null}i.inherits(Framer,s);e.exports=Framer;Framer.prototype.setVersion=function setVersion(e){this.version=e;this.emit("version")};Framer.prototype.setCompression=function setCompresion(e){this.compress=new n.utils.LockStream(e.compress)};Framer.prototype.enablePush=function enablePush(e){this.pushEnabled=e;this.emit("_pushEnabled")};Framer.prototype._checkPush=function _checkPush(e){if(this.pushEnabled===null){this.once("_pushEnabled",function(){this._checkPush(e)});return}var t=null;if(!this.pushEnabled){t=new Error("PUSH_PROMISE disabled by other side")}process.nextTick(function(){return e(t)})};Framer.prototype._resetTimeout=function _resetTimeout(){if(this.timeout){this.timeout.reset()}}},9827:(e,t,r)=>{"use strict";t.utils=r(3739);t.constants=r(7220);t.Scheduler=r(9236);t.Parser=r(2317);t.Framer=r(5536)},2317:(e,t,r)=>{"use strict";var i=r(1590);var n=r(1669);var a=r(9827).utils;var s=r(2259);var o=r(8740).Transform;function Parser(e){o.call(this,{readableObjectMode:true});this.buffer=new s;this.partial=false;this.waiting=0;this.window=e.window;this.version=null;this.decompress=null;this.dead=false}e.exports=Parser;n.inherits(Parser,o);Parser.prototype.error=a.error;Parser.prototype.kill=function kill(){this.dead=true};Parser.prototype._transform=function transform(e,t,r){if(!this.dead){this.buffer.push(e)}this._consume(r)};Parser.prototype._consume=function _consume(e){var t=this;function next(r,n){if(r){return e(r)}if(Array.isArray(n)){for(var a=0;a<n.length;a++){t.push(n[a])}}else if(n){t.push(n)}if(!i){return t._consume(e)}process.nextTick(function(){t._consume(e)})}if(this.dead){return e()}if(this.buffer.size<this.waiting){if(this.buffer.size===0){return e()}if(this.partial){var r=this.buffer.clone(this.buffer.size);this.buffer.skip(r.size);this.waiting-=r.size;this.executePartial(r,next);return}return e()}var i=true;var n=this.buffer.clone(this.waiting);this.buffer.skip(this.waiting);this.execute(n,next);i=false};Parser.prototype.setVersion=function setVersion(e){this.version=e;this.emit("version",e)};Parser.prototype.setCompression=function setCompresion(e){this.decompress=new i.utils.LockStream(e.decompress)}},9236:(e,t,r)=>{"use strict";var i=r(1590);var n=i.utils;var a=r(2357);var s=r(1669);var o=r(1492)("spdy:scheduler");var f=r(8740).Readable;function Scheduler(e){f.call(this);this.window=.25;if(e&&e.window){this.window=e.window}this.sync=[];this.list=[];this.count=0;this.pendingTick=false}s.inherits(Scheduler,f);e.exports=Scheduler;Scheduler.create=function create(e){return new Scheduler(e)};function insertCompare(e,t){return e.priority===t.priority?e.stream-t.stream:t.priority-e.priority}Scheduler.prototype.schedule=function schedule(e){var t=e.priority;var r=e.stream;var i=e.chunks;if(t===false){o("queue sync",i);this.sync.push(e);this.count+=i.length;this._read();return}o("queue async priority=%d stream=%d",t,r,i);var a=new SchedulerItem(r,t);var s=n.binaryLookup(this.list,a,insertCompare);if(s>=this.list.length||insertCompare(this.list[s],a)!==0){this.list.splice(s,0,a)}else{a=this.list[s]}a.push(e);this.count+=i.length;this._read()};Scheduler.prototype._read=function _read(){if(this.count===0){return}if(this.pendingTick){return}this.pendingTick=true;var e=this;process.nextTick(function(){e.pendingTick=false;e.tick()})};Scheduler.prototype.tick=function tick(){if(!this.tickSync()){return false}return this.tickAsync()};Scheduler.prototype.tickSync=function tickSync(){var e=this.sync;var t=true;this.sync=[];for(var r=0;r<e.length;r++){var i=e[r];o("tick sync pending=%d",this.count,i.chunks);for(var n=0;n<i.chunks.length;n++){this.count--;try{t=this.push(i.chunks[n])}catch(e){this.emit("error",e);return false}}o("after tick sync pending=%d",this.count);if(i.callback){i.callback(null)}}return t};Scheduler.prototype.tickAsync=function tickAsync(){var e=true;var t=this.list;if(t.length===0){return e}var r=t[0].priority;for(var i=0;t.length>0;i++){i%=t.length;if(r-t[i].priority>this.window){i=0}o("tick async index=%d start=%d",i,r);var n=t[i];var a=n.shift();if(n.isEmpty()){t.splice(i,1);if(i===0&&t.length>0){r=t[0].priority}i--}o("tick async pending=%d",this.count,a.chunks);for(var s=0;s<a.chunks.length;s++){this.count--;try{e=this.push(a.chunks[s])}catch(e){this.emit("error",e);return false}}o("after tick pending=%d",this.count);if(a.callback){a.callback(null)}if(!e){break}}return e};Scheduler.prototype.dump=function dump(){this.tickSync();while(!this.tickAsync()){}a.strictEqual(this.count,0)};function SchedulerItem(e,t){this.stream=e;this.priority=t;this.queue=[]}SchedulerItem.prototype.push=function push(e){this.queue.push(e)};SchedulerItem.prototype.shift=function shift(){return this.queue.shift()};SchedulerItem.prototype.isEmpty=function isEmpty(){return this.queue.length===0}},3739:(e,t,r)=>{"use strict";var i=t;var n=r(1669);function ProtocolError(e,t){this.code=e;this.message=t}n.inherits(ProtocolError,Error);i.ProtocolError=ProtocolError;i.error=function error(e,t){return new ProtocolError(e,t)};i.reverse=function reverse(e){var t=[];Object.keys(e).forEach(function(r){t[e[r]|0]=r});return t};i.weightToPriority=function weightToPriority(e){return Math.min(35,e-1)/35*7|0};i.priorityToWeight=function priorityToWeight(e){return(e/7*35|0)+1};t.addHeaderLine=function addHeaderLine(e,t,r){e=e.toLowerCase();if(/^:/.test(e)){r[e]=t;return}switch(e){case"set-cookie":if(r[e]!==undefined){r[e].push(t)}else{r[e]=[t]}break;case"content-type":case"content-length":case"user-agent":case"referer":case"host":case"authorization":case"proxy-authorization":case"if-modified-since":case"if-unmodified-since":case"from":case"location":case"max-forwards":if(r[e]===undefined){r[e]=t}break;case"cookie":if(r[e]!==undefined){r[e]+="; "+t}else{r[e]=t}break;default:if(r[e]!==undefined){r[e]+=", "+t}else{r[e]=t}}}},3850:(e,t,r)=>{"use strict";var i=r(1590);var n=i.protocol.base;t.PREFACE_SIZE=24;t.PREFACE="PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n";t.PREFACE_BUFFER=Buffer.from(t.PREFACE);t.PING_OPAQUE_SIZE=8;t.FRAME_HEADER_SIZE=9;t.INITIAL_MAX_FRAME_SIZE=16384;t.ABSOLUTE_MAX_FRAME_SIZE=16777215;t.HEADER_TABLE_SIZE=4096;t.DEFAULT_MAX_HEADER_LIST_SIZE=80*1024;t.MAX_INITIAL_WINDOW_SIZE=2147483647;t.DEFAULT_WEIGHT=16;t.MAX_CONCURRENT_STREAMS=Infinity;t.frameType={DATA:0,HEADERS:1,PRIORITY:2,RST_STREAM:3,SETTINGS:4,PUSH_PROMISE:5,PING:6,GOAWAY:7,WINDOW_UPDATE:8,CONTINUATION:9,X_FORWARDED_FOR:222};t.flags={ACK:1,END_STREAM:1,END_HEADERS:4,PADDED:8,PRIORITY:32};t.settings={SETTINGS_HEADER_TABLE_SIZE:1,SETTINGS_ENABLE_PUSH:2,SETTINGS_MAX_CONCURRENT_STREAMS:3,SETTINGS_INITIAL_WINDOW_SIZE:4,SETTINGS_MAX_FRAME_SIZE:5,SETTINGS_MAX_HEADER_LIST_SIZE:6};t.settingsIndex=[null,"header_table_size","enable_push","max_concurrent_streams","initial_window_size","max_frame_size","max_header_list_size"];t.error={OK:0,NO_ERROR:0,PROTOCOL_ERROR:1,INTERNAL_ERROR:2,FLOW_CONTROL_ERROR:3,SETTINGS_TIMEOUT:4,STREAM_CLOSED:5,INVALID_STREAM:5,FRAME_SIZE_ERROR:6,REFUSED_STREAM:7,CANCEL:8,COMPRESSION_ERROR:9,CONNECT_ERROR:10,ENHANCE_YOUR_CALM:11,INADEQUATE_SECURITY:12,HTTP_1_1_REQUIRED:13};t.errorByCode=n.utils.reverse(t.error);t.DEFAULT_WINDOW=64*1024-1;t.goaway=t.error;t.goawayByCode=Object.assign({},t.errorByCode);t.goawayByCode[0]="OK"},1933:(e,t,r)=>{"use strict";var i=r(1590);var n=i.protocol.base;var a=r(5041).constants;var s=r(2357);var o=r(1669);var f=r(9364);var u=r(2259);var l=r(1492)("spdy:framer");var d=r(1492)("spdy:framer:extra");function Framer(e){n.Framer.call(this,e);this.maxFrameSize=a.INITIAL_MAX_FRAME_SIZE}o.inherits(Framer,n.Framer);e.exports=Framer;Framer.create=function create(e){return new Framer(e)};Framer.prototype.setMaxFrameSize=function setMaxFrameSize(e){this.maxFrameSize=e};Framer.prototype._frame=function _frame(e,t,r){l("id=%d type=%s",e.id,e.type);var i=new f;i.reserve(a.FRAME_HEADER_SIZE);var n=i.skip(3);i.writeUInt8(a.frameType[e.type]);i.writeUInt8(e.flags);i.writeUInt32BE(e.id&2147483647);t(i);var s=i.size-a.FRAME_HEADER_SIZE;n.writeUInt24BE(s);var o=i.render();var u={stream:e.id,priority:e.priority===undefined?false:e.priority,chunks:o,callback:r};if(this.window&&e.type==="DATA"){var d=this;this._resetTimeout();this.window.send.update(-s,function(){d._resetTimeout();d.schedule(u)})}else{this._resetTimeout();this.schedule(u)}return o};Framer.prototype._split=function _split(e){var t=new u;for(var r=0;r<e.chunks.length;r++){t.push(e.chunks[r])}var i=[];while(!t.isEmpty()){var n=this.maxFrameSize;if(i.length===0){n-=e.reserve}n=Math.min(n,t.size);var a=t.clone(n);t.skip(n);i.push({size:a.size,chunks:a.toChunks()})}return i};Framer.prototype._continuationFrame=function _continuationFrame(e,t,r){var i=this._split(e);i.forEach(function(n,s){var o=s===0;var f=s===i.length-1;var u=f?a.flags.END_HEADERS:0;if(o){u|=e.flags}this._frame({id:e.id,priority:false,type:o?e.type:"CONTINUATION",flags:u},function(e){if(o&&t){t(e)}e.reserve(n.size);for(var r=0;r<n.chunks.length;r++){e.copyFrom(n.chunks[r])}},f?r:null)},this);if(i.length===0){this._frame({id:e.id,priority:false,type:e.type,flags:e.flags|a.flags.END_HEADERS},function(e){if(t){t(e)}},r)}};Framer.prototype._compressHeaders=function _compressHeaders(e,t,r){Object.keys(e||{}).forEach(function(r){var i=r.toLowerCase();switch(i){case"host":case"connection":case"keep-alive":case"proxy-connection":case"transfer-encoding":case"upgrade":return}if(/^:/.test(i)){return}var n=i==="cookie"||i==="set-cookie";var a=e[r];if(Array.isArray(a)){for(var s=0;s<a.length;s++){t.push({name:i,value:a[s]+"",neverIndex:n,huffman:!n})}}else{t.push({name:i,value:a+"",neverIndex:n,huffman:!n})}});s(this.compress!==null,"Framer version not initialized");d("compressing headers=%j",t);this.compress.write([t],r)};Framer.prototype._isDefaultPriority=function _isDefaultPriority(e){if(!e){return true}return!e.parent&&e.weight===a.DEFAULT&&!e.exclusive};Framer.prototype._defaultHeaders=function _defaultHeaders(e,t){if(!e.path){throw new Error("`path` is required frame argument")}t.push({name:":method",value:e.method||n.constants.DEFAULT_METHOD});t.push({name:":path",value:e.path});t.push({name:":scheme",value:e.scheme||"https"});t.push({name:":authority",value:e.host||e.headers&&e.headers.host||n.constants.DEFAULT_HOST})};Framer.prototype._headersFrame=function _headersFrame(e,t,r){var i=[];if(e==="request"){this._defaultHeaders(t,i)}else if(e==="response"){i.push({name:":status",value:(t.status||200)+""})}var n=this;this._compressHeaders(t.headers,i,function(e,i){if(e){if(r){return r(e)}else{return n.emit("error",e)}}var s=0;var o=t.priority;if(!n._isDefaultPriority(o)){s=5}var f=s===0?0:a.flags.PRIORITY;if(t.fin){f|=a.flags.END_STREAM}n._continuationFrame({id:t.id,type:"HEADERS",flags:f,reserve:s,chunks:i},function(e){if(s===0){return}e.writeUInt32BE(((o.exclusive?2147483648:0)|o.parent)>>>0);e.writeUInt8((o.weight|0)-1)},r)})};Framer.prototype.requestFrame=function requestFrame(e,t){return this._headersFrame("request",e,t)};Framer.prototype.responseFrame=function responseFrame(e,t){return this._headersFrame("response",e,t)};Framer.prototype.headersFrame=function headersFrame(e,t){return this._headersFrame("headers",e,t)};Framer.prototype.pushFrame=function pushFrame(e,t){var r=this;function compress(e,t,i){r._compressHeaders(e,t,function(e,t){if(e){if(i){return i(e)}else{return r.emit("error",e)}}i(t)})}function sendPromise(t){r._continuationFrame({id:e.id,type:"PUSH_PROMISE",reserve:4,chunks:t},function(t){t.writeUInt32BE(e.promisedId)})}function sendResponse(t,i){var n=e.priority;var s=r._isDefaultPriority(n);var o=s?0:a.flags.PRIORITY;if(e.fin){o|=a.flags.END_STREAM}r._continuationFrame({id:e.promisedId,type:"HEADERS",flags:o,reserve:s?0:5,chunks:t},function(e){if(s){return}e.writeUInt32BE((n.exclusive?2147483648:0)|n.parent);e.writeUInt8((n.weight|0)-1)},i)}this._checkPush(function(i){if(i){return t(i)}var n={promise:[],response:[]};r._defaultHeaders(e,n.promise);n.response.push({name:":status",value:(e.status||200)+""});compress(e.headers,n.promise,function(r){sendPromise(r);if(e.response===false){return t(null)}compress(e.response,n.response,function(e){sendResponse(e,t)})})})};Framer.prototype.priorityFrame=function priorityFrame(e,t){this._frame({id:e.id,priority:false,type:"PRIORITY",flags:0},function(t){var r=e.priority;t.writeUInt32BE((r.exclusive?2147483648:0)|r.parent);t.writeUInt8((r.weight|0)-1)},t)};Framer.prototype.dataFrame=function dataFrame(e,t){var r=this._split({reserve:0,chunks:[e.data]});var i=e.fin?a.flags.END_STREAM:0;var n=this;r.forEach(function(a,s){var o=s===r.length-1;var f=0;if(o){f|=i}n._frame({id:e.id,priority:e.priority,type:"DATA",flags:f},function(e){e.reserve(a.size);for(var t=0;t<a.chunks.length;t++){e.copyFrom(a.chunks[t])}},o?t:null)});if(r.length===0){this._frame({id:e.id,priority:e.priority,type:"DATA",flags:i},function(e){},t)}};Framer.prototype.pingFrame=function pingFrame(e,t){this._frame({id:0,type:"PING",flags:e.ack?a.flags.ACK:0},function(t){t.copyFrom(e.opaque)},t)};Framer.prototype.rstFrame=function rstFrame(e,t){this._frame({id:e.id,type:"RST_STREAM",flags:0},function(t){t.writeUInt32BE(a.error[e.code])},t)};Framer.prototype.prefaceFrame=function prefaceFrame(e){l("preface");this._resetTimeout();this.schedule({stream:0,priority:false,chunks:[a.PREFACE_BUFFER],callback:e})};Framer.prototype.settingsFrame=function settingsFrame(e,t){var r=JSON.stringify(e);var i=Framer.settingsCache[r];if(i){l("cached settings");this._resetTimeout();this.schedule({id:0,priority:false,chunks:i,callback:t});return}var n=[];for(var s=0;s<a.settingsIndex.length;s++){var o=a.settingsIndex[s];if(!o){continue}if(!isFinite(e[o])){continue}if(e[o]!==undefined){n.push({key:s,value:e[o]})}}var f=n.length*6;var u=this._frame({id:0,type:"SETTINGS",flags:0},function(e){e.reserve(f);for(var t=0;t<n.length;t++){var r=n[t];e.writeUInt16BE(r.key);e.writeUInt32BE(r.value)}},t);Framer.settingsCache[r]=u};Framer.settingsCache={};Framer.prototype.ackSettingsFrame=function ackSettingsFrame(e){this._frame({id:0,type:"SETTINGS",flags:a.flags.ACK},function(e){},e)};Framer.prototype.windowUpdateFrame=function windowUpdateFrame(e,t){this._frame({id:e.id,type:"WINDOW_UPDATE",flags:0},function(t){t.reserve(4);t.writeInt32BE(e.delta)},t)};Framer.prototype.goawayFrame=function goawayFrame(e,t){this._frame({type:"GOAWAY",id:0,flags:0},function(t){t.reserve(8);t.writeUInt32BE(e.lastId&2147483647);t.writeUInt32BE(a.goaway[e.code]);if(e.extra){t.write(e.extra)}},t)};Framer.prototype.xForwardedFor=function xForwardedFor(e,t){this._frame({type:"X_FORWARDED_FOR",id:0,flags:0},function(t){t.write(e.host)},t)}},5938:(e,t,r)=>{"use strict";var i=r(5041).constants;var n=r(7056);function Pool(){}e.exports=Pool;Pool.create=function create(){return new Pool};Pool.prototype.get=function get(e){var t={table:{maxSize:i.HEADER_TABLE_SIZE}};var r=n.compressor.create(t);var a=n.decompressor.create(t);return{version:e,compress:r,decompress:a}};Pool.prototype.put=function put(){}},5041:(e,t,r)=>{"use strict";t.name="h2";t.constants=r(3850);t.parser=r(846);t.framer=r(1933);t.compressionPool=r(5938)},846:(e,t,r)=>{"use strict";var i=t;var n=r(1590);var a=n.protocol.base;var s=a.utils;var o=r(5041).constants;var f=r(2357);var u=r(1669);function Parser(e){a.Parser.call(this,e);this.isServer=e.isServer;this.waiting=o.PREFACE_SIZE;this.state="preface";this.pendingHeader=null;this._lastHeaderBlock=null;this.maxFrameSize=o.INITIAL_MAX_FRAME_SIZE;this.maxHeaderListSize=o.DEFAULT_MAX_HEADER_LIST_SIZE}u.inherits(Parser,a.Parser);i.create=function create(e){return new Parser(e)};Parser.prototype.setMaxFrameSize=function setMaxFrameSize(e){this.maxFrameSize=e};Parser.prototype.setMaxHeaderListSize=function setMaxHeaderListSize(e){this.maxHeaderListSize=e};Parser.prototype.skipPreface=function skipPreface(){this.setVersion(4);this.state="frame-head";this.waiting=o.FRAME_HEADER_SIZE};Parser.prototype.execute=function execute(e,t){if(this.state==="preface"){return this.onPreface(e,t)}if(this.state==="frame-head"){return this.onFrameHead(e,t)}f(this.state==="frame-body"&&this.pendingHeader!==null);var r=this;var i=this.pendingHeader;this.pendingHeader=null;this.onFrameBody(i,e,function(e,i){if(e){return t(e)}r.state="frame-head";r.partial=false;r.waiting=o.FRAME_HEADER_SIZE;t(null,i)})};Parser.prototype.executePartial=function executePartial(e,t){var r=this.pendingHeader;f.strictEqual(r.flags&o.flags.PADDED,0);if(this.window){this.window.recv.update(-e.size)}t(null,{type:"DATA",id:r.id,fin:false,data:e.take(e.size)})};Parser.prototype.onPreface=function onPreface(e,t){if(e.take(e.size).toString()!==o.PREFACE){return t(this.error(o.error.PROTOCOL_ERROR,"Invalid preface"))}this.skipPreface();t(null,null)};Parser.prototype.onFrameHead=function onFrameHead(e,t){var r={length:e.readUInt24BE(),control:true,type:e.readUInt8(),flags:e.readUInt8(),id:e.readUInt32BE()&2147483647};if(r.length>this.maxFrameSize){return t(this.error(o.error.FRAME_SIZE_ERROR,"Frame length OOB"))}r.control=r.type!==o.frameType.DATA;this.state="frame-body";this.pendingHeader=r;this.waiting=r.length;this.partial=!r.control;if(this.partial){this.partial=(r.flags&o.flags.PADDED)===0}t(null,null)};Parser.prototype.onFrameBody=function onFrameBody(e,t,r){var i=o.frameType;if(e.type===i.DATA){this.onDataFrame(e,t,r)}else if(e.type===i.HEADERS){this.onHeadersFrame(e,t,r)}else if(e.type===i.CONTINUATION){this.onContinuationFrame(e,t,r)}else if(e.type===i.WINDOW_UPDATE){this.onWindowUpdateFrame(e,t,r)}else if(e.type===i.RST_STREAM){this.onRSTFrame(e,t,r)}else if(e.type===i.SETTINGS){this.onSettingsFrame(e,t,r)}else if(e.type===i.PUSH_PROMISE){this.onPushPromiseFrame(e,t,r)}else if(e.type===i.PING){this.onPingFrame(e,t,r)}else if(e.type===i.GOAWAY){this.onGoawayFrame(e,t,r)}else if(e.type===i.PRIORITY){this.onPriorityFrame(e,t,r)}else if(e.type===i.X_FORWARDED_FOR){this.onXForwardedFrame(e,t,r)}else{this.onUnknownFrame(e,t,r)}};Parser.prototype.onUnknownFrame=function onUnknownFrame(e,t,r){if(this._lastHeaderBlock!==null){r(this.error(o.error.PROTOCOL_ERROR,"Received unknown frame in the middle of a header block"));return}r(null,{type:"unknown: "+e.type})};Parser.prototype.unpadData=function unpadData(e,t,r){var i=(e.flags&o.flags.PADDED)!==0;if(!i){return r(null,t)}if(!t.has(1)){return r(this.error(o.error.FRAME_SIZE_ERROR,"Not enough space for padding"))}var n=t.readUInt8();if(!t.has(n)){return r(this.error(o.error.PROTOCOL_ERROR,"Invalid padding size"))}var a=t.clone(t.size-n);t.skip(t.size);r(null,a)};Parser.prototype.onDataFrame=function onDataFrame(e,t,r){var i=(e.flags&o.flags.END_STREAM)!==0;if(e.id===0){return r(this.error(o.error.PROTOCOL_ERROR,"Received DATA frame with stream=0"))}if(this.window){this.window.recv.update(-t.size)}this.unpadData(e,t,function(t,n){if(t){return r(t)}r(null,{type:"DATA",id:e.id,fin:i,data:n.take(n.size)})})};Parser.prototype.initHeaderBlock=function initHeaderBlock(e,t,r,i){if(this._lastHeaderBlock){return i(this.error(o.error.PROTOCOL_ERROR,"Duplicate Stream ID"))}this._lastHeaderBlock={id:e.id,frame:t,queue:[],size:0};this.queueHeaderBlock(e,r,i)};Parser.prototype.queueHeaderBlock=function queueHeaderBlock(e,t,r){var i=this;var n=this._lastHeaderBlock;if(!this._lastHeaderBlock||n.id!==e.id){return r(this.error(o.error.PROTOCOL_ERROR,"No matching stream for continuation"))}var a=(e.flags&o.flags.END_HEADERS)!==0;var f=t.toChunks();for(var u=0;u<f.length;u++){var l=f[u];n.queue.push(l);n.size+=l.length}if(n.size>=i.maxHeaderListSize){return r(this.error(o.error.PROTOCOL_ERROR,"Compressed header list is too large"))}if(!a){return r(null,null)}this._lastHeaderBlock=null;this.decompress.write(n.queue,function(e,t){if(e){return r(i.error(o.error.COMPRESSION_ERROR,e.message))}var a={};var f=0;for(var u=0;u<t.length;u++){var l=t[u];f+=l.name.length+l.value.length+32;if(f>=i.maxHeaderListSize){return r(i.error(o.error.PROTOCOL_ERROR,"Header list is too large"))}if(/[A-Z]/.test(l.name)){return r(i.error(o.error.PROTOCOL_ERROR,"Header name must be lowercase"))}s.addHeaderLine(l.name,l.value,a)}n.frame.headers=a;n.frame.path=a[":path"];r(null,n.frame)})};Parser.prototype.onHeadersFrame=function onHeadersFrame(e,t,r){var i=this;if(e.id===0){return r(this.error(o.error.PROTOCOL_ERROR,"Invalid stream id for HEADERS"))}this.unpadData(e,t,function(t,n){if(t){return r(t)}var a=(e.flags&o.flags.PRIORITY)!==0;if(!n.has(a?5:0)){return r(i.error(o.error.FRAME_SIZE_ERROR,"Not enough data for HEADERS"))}var s=false;var f=0;var u=o.DEFAULT_WEIGHT;if(a){f=n.readUInt32BE();s=(f&2147483648)!==0;f&=2147483647;u=n.readUInt8()+1}if(f===e.id){return r(i.error(o.error.PROTOCOL_ERROR,"Stream can't dependend on itself"))}var l={type:"HEADERS",id:e.id,priority:{parent:f,exclusive:s,weight:u},fin:(e.flags&o.flags.END_STREAM)!==0,writable:true,headers:null,path:null};i.initHeaderBlock(e,l,n,r)})};Parser.prototype.onContinuationFrame=function onContinuationFrame(e,t,r){this.queueHeaderBlock(e,t,r)};Parser.prototype.onRSTFrame=function onRSTFrame(e,t,r){if(t.size!==4){return r(this.error(o.error.FRAME_SIZE_ERROR,"RST_STREAM length not 4"))}if(e.id===0){return r(this.error(o.error.PROTOCOL_ERROR,"Invalid stream id for RST_STREAM"))}r(null,{type:"RST",id:e.id,code:o.errorByCode[t.readUInt32BE()]})};Parser.prototype._validateSettings=function _validateSettings(e){if(e["enable_push"]!==undefined&&e["enable_push"]!==0&&e["enable_push"]!==1){return this.error(o.error.PROTOCOL_ERROR,"SETTINGS_ENABLE_PUSH must be 0 or 1")}if(e["initial_window_size"]!==undefined&&(e["initial_window_size"]>o.MAX_INITIAL_WINDOW_SIZE||e["initial_window_size"]<0)){return this.error(o.error.FLOW_CONTROL_ERROR,"SETTINGS_INITIAL_WINDOW_SIZE is OOB")}if(e["max_frame_size"]!==undefined&&(e["max_frame_size"]>o.ABSOLUTE_MAX_FRAME_SIZE||e["max_frame_size"]<o.INITIAL_MAX_FRAME_SIZE)){return this.error(o.error.PROTOCOL_ERROR,"SETTINGS_MAX_FRAME_SIZE is OOB")}return undefined};Parser.prototype.onSettingsFrame=function onSettingsFrame(e,t,r){if(e.id!==0){return r(this.error(o.error.PROTOCOL_ERROR,"Invalid stream id for SETTINGS"))}var i=(e.flags&o.flags.ACK)!==0;if(i&&t.size!==0){return r(this.error(o.error.FRAME_SIZE_ERROR,"SETTINGS with ACK and non-zero length"))}if(i){return r(null,{type:"ACK_SETTINGS"})}if(t.size%6!==0){return r(this.error(o.error.FRAME_SIZE_ERROR,"SETTINGS length not multiple of 6"))}var n={};while(!t.isEmpty()){var a=t.readUInt16BE();var s=t.readUInt32BE();var f=o.settingsIndex[a];if(f){n[f]=s}}var u=this._validateSettings(n);if(u!==undefined){return r(u)}r(null,{type:"SETTINGS",settings:n})};Parser.prototype.onPushPromiseFrame=function onPushPromiseFrame(e,t,r){if(e.id===0){return r(this.error(o.error.PROTOCOL_ERROR,"Invalid stream id for PUSH_PROMISE"))}var i=this;this.unpadData(e,t,function(t,n){if(t){return r(t)}if(!n.has(4)){return r(i.error(o.error.FRAME_SIZE_ERROR,"PUSH_PROMISE length less than 4"))}var a={type:"PUSH_PROMISE",id:e.id,fin:false,promisedId:n.readUInt32BE()&2147483647,headers:null,path:null};i.initHeaderBlock(e,a,n,r)})};Parser.prototype.onPingFrame=function onPingFrame(e,t,r){if(t.size!==8){return r(this.error(o.error.FRAME_SIZE_ERROR,"PING length != 8"))}if(e.id!==0){return r(this.error(o.error.PROTOCOL_ERROR,"Invalid stream id for PING"))}var i=(e.flags&o.flags.ACK)!==0;r(null,{type:"PING",opaque:t.take(t.size),ack:i})};Parser.prototype.onGoawayFrame=function onGoawayFrame(e,t,r){if(!t.has(8)){return r(this.error(o.error.FRAME_SIZE_ERROR,"GOAWAY length < 8"))}if(e.id!==0){return r(this.error(o.error.PROTOCOL_ERROR,"Invalid stream id for GOAWAY"))}var i={type:"GOAWAY",lastId:t.readUInt32BE(),code:o.goawayByCode[t.readUInt32BE()]};if(t.size!==0){i.debug=t.take(t.size)}r(null,i)};Parser.prototype.onPriorityFrame=function onPriorityFrame(e,t,r){if(t.size!==5){return r(this.error(o.error.FRAME_SIZE_ERROR,"PRIORITY length != 5"))}if(e.id===0){return r(this.error(o.error.PROTOCOL_ERROR,"Invalid stream id for PRIORITY"))}var i=t.readUInt32BE();var n=t.readUInt8()+1;if(i===e.id){return r(this.error(o.error.PROTOCOL_ERROR,"Stream can't dependend on itself"))}r(null,{type:"PRIORITY",id:e.id,priority:{exclusive:(i&2147483648)!==0,parent:i&2147483647,weight:n}})};Parser.prototype.onWindowUpdateFrame=function onWindowUpdateFrame(e,t,r){if(t.size!==4){return r(this.error(o.error.FRAME_SIZE_ERROR,"WINDOW_UPDATE length != 4"))}var i=t.readInt32BE();if(i===0){return r(this.error(o.error.PROTOCOL_ERROR,"WINDOW_UPDATE delta == 0"))}r(null,{type:"WINDOW_UPDATE",id:e.id,delta:i})};Parser.prototype.onXForwardedFrame=function onXForwardedFrame(e,t,r){r(null,{type:"X_FORWARDED_FOR",host:t.take(t.size).toString()})}},5746:(e,t,r)=>{"use strict";var i=r(1590);var n=i.protocol.base;t.FRAME_HEADER_SIZE=8;t.PING_OPAQUE_SIZE=4;t.MAX_CONCURRENT_STREAMS=Infinity;t.DEFAULT_MAX_HEADER_LIST_SIZE=Infinity;t.DEFAULT_WEIGHT=16;t.frameType={SYN_STREAM:1,SYN_REPLY:2,RST_STREAM:3,SETTINGS:4,PING:6,GOAWAY:7,HEADERS:8,WINDOW_UPDATE:9,X_FORWARDED_FOR:61440};t.flags={FLAG_FIN:1,FLAG_COMPRESSED:2,FLAG_UNIDIRECTIONAL:2};t.error={PROTOCOL_ERROR:1,INVALID_STREAM:2,REFUSED_STREAM:3,UNSUPPORTED_VERSION:4,CANCEL:5,INTERNAL_ERROR:6,FLOW_CONTROL_ERROR:7,STREAM_IN_USE:8,STREAM_CLOSED:9,INVALID_CREDENTIALS:10,FRAME_TOO_LARGE:11};t.errorByCode=n.utils.reverse(t.error);t.settings={FLAG_SETTINGS_PERSIST_VALUE:1,FLAG_SETTINGS_PERSISTED:2,SETTINGS_UPLOAD_BANDWIDTH:1,SETTINGS_DOWNLOAD_BANDWIDTH:2,SETTINGS_ROUND_TRIP_TIME:3,SETTINGS_MAX_CONCURRENT_STREAMS:4,SETTINGS_CURRENT_CWND:5,SETTINGS_DOWNLOAD_RETRANS_RATE:6,SETTINGS_INITIAL_WINDOW_SIZE:7,SETTINGS_CLIENT_CERTIFICATE_VECTOR_SIZE:8};t.settingsIndex=[null,"upload_bandwidth","download_bandwidth","round_trip_time","max_concurrent_streams","current_cwnd","download_retrans_rate","initial_window_size","client_certificate_vector_size"];t.DEFAULT_WINDOW=64*1024;t.MAX_INITIAL_WINDOW_SIZE=2147483647;t.goaway={OK:0,PROTOCOL_ERROR:1,INTERNAL_ERROR:2};t.goawayByCode=n.utils.reverse(t.goaway);t.statusReason={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Time-out",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Large",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Time-out",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},6704:e=>{"use strict";var t={};e.exports=t;t[2]=Buffer.from(["optionsgetheadpostputdeletetraceacceptaccept-charsetaccept-encodingaccept-","languageauthorizationexpectfromhostif-modified-sinceif-matchif-none-matchi","f-rangeif-unmodifiedsincemax-forwardsproxy-authorizationrangerefererteuser","-agent10010120020120220320420520630030130230330430530630740040140240340440","5406407408409410411412413414415416417500501502503504505accept-rangesageeta","glocationproxy-authenticatepublicretry-afterservervarywarningwww-authentic","ateallowcontent-basecontent-encodingcache-controlconnectiondatetrailertran","sfer-encodingupgradeviawarningcontent-languagecontent-lengthcontent-locati","oncontent-md5content-rangecontent-typeetagexpireslast-modifiedset-cookieMo","ndayTuesdayWednesdayThursdayFridaySaturdaySundayJanFebMarAprMayJunJulAugSe","pOctNovDecchunkedtext/htmlimage/pngimage/jpgimage/gifapplication/xmlapplic","ation/xhtmltext/plainpublicmax-agecharset=iso-8859-1utf-8gzipdeflateHTTP/1",".1statusversionurl\0"].join(""));t[3]=Buffer.from([0,0,0,7,111,112,116,105,111,110,115,0,0,0,4,104,101,97,100,0,0,0,4,112,111,115,116,0,0,0,3,112,117,116,0,0,0,6,100,101,108,101,116,101,0,0,0,5,116,114,97,99,101,0,0,0,6,97,99,99,101,112,116,0,0,0,14,97,99,99,101,112,116,45,99,104,97,114,115,101,116,0,0,0,15,97,99,99,101,112,116,45,101,110,99,111,100,105,110,103,0,0,0,15,97,99,99,101,112,116,45,108,97,110,103,117,97,103,101,0,0,0,13,97,99,99,101,112,116,45,114,97,110,103,101,115,0,0,0,3,97,103,101,0,0,0,5,97,108,108,111,119,0,0,0,13,97,117,116,104,111,114,105,122,97,116,105,111,110,0,0,0,13,99,97,99,104,101,45,99,111,110,116,114,111,108,0,0,0,10,99,111,110,110,101,99,116,105,111,110,0,0,0,12,99,111,110,116,101,110,116,45,98,97,115,101,0,0,0,16,99,111,110,116,101,110,116,45,101,110,99,111,100,105,110,103,0,0,0,16,99,111,110,116,101,110,116,45,108,97,110,103,117,97,103,101,0,0,0,14,99,111,110,116,101,110,116,45,108,101,110,103,116,104,0,0,0,16,99,111,110,116,101,110,116,45,108,111,99,97,116,105,111,110,0,0,0,11,99,111,110,116,101,110,116,45,109,100,53,0,0,0,13,99,111,110,116,101,110,116,45,114,97,110,103,101,0,0,0,12,99,111,110,116,101,110,116,45,116,121,112,101,0,0,0,4,100,97,116,101,0,0,0,4,101,116,97,103,0,0,0,6,101,120,112,101,99,116,0,0,0,7,101,120,112,105,114,101,115,0,0,0,4,102,114,111,109,0,0,0,4,104,111,115,116,0,0,0,8,105,102,45,109,97,116,99,104,0,0,0,17,105,102,45,109,111,100,105,102,105,101,100,45,115,105,110,99,101,0,0,0,13,105,102,45,110,111,110,101,45,109,97,116,99,104,0,0,0,8,105,102,45,114,97,110,103,101,0,0,0,19,105,102,45,117,110,109,111,100,105,102,105,101,100,45,115,105,110,99,101,0,0,0,13,108,97,115,116,45,109,111,100,105,102,105,101,100,0,0,0,8,108,111,99,97,116,105,111,110,0,0,0,12,109,97,120,45,102,111,114,119,97,114,100,115,0,0,0,6,112,114,97,103,109,97,0,0,0,18,112,114,111,120,121,45,97,117,116,104,101,110,116,105,99,97,116,101,0,0,0,19,112,114,111,120,121,45,97,117,116,104,111,114,105,122,97,116,105,111,110,0,0,0,5,114,97,110,103,101,0,0,0,7,114,101,102,101,114,101,114,0,0,0,11,114,101,116,114,121,45,97,102,116,101,114,0,0,0,6,115,101,114,118,101,114,0,0,0,2,116,101,0,0,0,7,116,114,97,105,108,101,114,0,0,0,17,116,114,97,110,115,102,101,114,45,101,110,99,111,100,105,110,103,0,0,0,7,117,112,103,114,97,100,101,0,0,0,10,117,115,101,114,45,97,103,101,110,116,0,0,0,4,118,97,114,121,0,0,0,3,118,105,97,0,0,0,7,119,97,114,110,105,110,103,0,0,0,16,119,119,119,45,97,117,116,104,101,110,116,105,99,97,116,101,0,0,0,6,109,101,116,104,111,100,0,0,0,3,103,101,116,0,0,0,6,115,116,97,116,117,115,0,0,0,6,50,48,48,32,79,75,0,0,0,7,118,101,114,115,105,111,110,0,0,0,8,72,84,84,80,47,49,46,49,0,0,0,3,117,114,108,0,0,0,6,112,117,98,108,105,99,0,0,0,10,115,101,116,45,99,111,111,107,105,101,0,0,0,10,107,101,101,112,45,97,108,105,118,101,0,0,0,6,111,114,105,103,105,110,49,48,48,49,48,49,50,48,49,50,48,50,50,48,53,50,48,54,51,48,48,51,48,50,51,48,51,51,48,52,51,48,53,51,48,54,51,48,55,52,48,50,52,48,53,52,48,54,52,48,55,52,48,56,52,48,57,52,49,48,52,49,49,52,49,50,52,49,51,52,49,52,52,49,53,52,49,54,52,49,55,53,48,50,53,48,52,53,48,53,50,48,51,32,78,111,110,45,65,117,116,104,111,114,105,116,97,116,105,118,101,32,73,110,102,111,114,109,97,116,105,111,110,50,48,52,32,78,111,32,67,111,110,116,101,110,116,51,48,49,32,77,111,118,101,100,32,80,101,114,109,97,110,101,110,116,108,121,52,48,48,32,66,97,100,32,82,101,113,117,101,115,116,52,48,49,32,85,110,97,117,116,104,111,114,105,122,101,100,52,48,51,32,70,111,114,98,105,100,100,101,110,52,48,52,32,78,111,116,32,70,111,117,110,100,53,48,48,32,73,110,116,101,114,110,97,108,32,83,101,114,118,101,114,32,69,114,114,111,114,53,48,49,32,78,111,116,32,73,109,112,108,101,109,101,110,116,101,100,53,48,51,32,83,101,114,118,105,99,101,32,85,110,97,118,97,105,108,97,98,108,101,74,97,110,32,70,101,98,32,77,97,114,32,65,112,114,32,77,97,121,32,74,117,110,32,74,117,108,32,65,117,103,32,83,101,112,116,32,79,99,116,32,78,111,118,32,68,101,99,32,48,48,58,48,48,58,48,48,32,77,111,110,44,32,84,117,101,44,32,87,101,100,44,32,84,104,117,44,32,70,114,105,44,32,83,97,116,44,32,83,117,110,44,32,71,77,84,99,104,117,110,107,101,100,44,116,101,120,116,47,104,116,109,108,44,105,109,97,103,101,47,112,110,103,44,105,109,97,103,101,47,106,112,103,44,105,109,97,103,101,47,103,105,102,44,97,112,112,108,105,99,97,116,105,111,110,47,120,109,108,44,97,112,112,108,105,99,97,116,105,111,110,47,120,104,116,109,108,43,120,109,108,44,116,101,120,116,47,112,108,97,105,110,44,116,101,120,116,47,106,97,118,97,115,99,114,105,112,116,44,112,117,98,108,105,99,112,114,105,118,97,116,101,109,97,120,45,97,103,101,61,103,122,105,112,44,100,101,102,108,97,116,101,44,115,100,99,104,99,104,97,114,115,101,116,61,117,116,102,45,56,99,104,97,114,115,101,116,61,105,115,111,45,56,56,53,57,45,49,44,117,116,102,45,44,42,44,101,110,113,61,48,46]);t[3.1]=t[3]},4120:(e,t,r)=>{"use strict";var i=r(1590);var n=r(2692).constants;var a=i.protocol.base;var s=a.utils;var o=r(2357);var f=r(1669);var u=r(4293).Buffer;var l=r(9364);var d=r(1492)("spdy:framer");function Framer(e){a.Framer.call(this,e)}f.inherits(Framer,a.Framer);e.exports=Framer;Framer.create=function create(e){return new Framer(e)};Framer.prototype.setMaxFrameSize=function setMaxFrameSize(e){};Framer.prototype.headersToDict=function headersToDict(e,t,r){function stringify(e){if(e!==undefined){if(Array.isArray(e)){return e.join("\0")}else if(typeof e==="string"){return e}else{return e.toString()}}else{return""}}var i={};Object.keys(e||{}).map(function(t){i[t.toLowerCase()]=e[t]});if(t){t(i)}var n=this.version===2?2:4;var a=n;var s=Object.keys(i).filter(function(e){var t=e.toLowerCase();if(t==="host"&&this.version>=3){return false}return t!=="connection"&&t!=="keep-alive"&&t!=="proxy-connection"&&t!=="transfer-encoding"},this).map(function(e){var t=u.byteLength(e);var r=stringify(i[e]);var s=u.byteLength(r);a+=n*2+t+s;return[t,e,s,r]});var f=new l;f.reserve(a);if(this.version===2){f.writeUInt16BE(s.length)}else{f.writeUInt32BE(s.length)}s.forEach(function(e){if(this.version===2){f.writeUInt16BE(e[0])}else{f.writeUInt32BE(e[0])}f.write(e[1]);if(this.version===2){f.writeUInt16BE(e[2])}else{f.writeUInt32BE(e[2])}f.write(e[3])},this);o(this.compress!==null,"Framer version not initialized");this.compress.write(f.render(),r)};Framer.prototype._frame=function _frame(e,t,r){if(!this.version){this.on("version",function(){this._frame(e,t,r)});return}d("id=%d type=%s",e.id,e.type);var i=new l;i.writeUInt16BE(32768|this.version);i.writeUInt16BE(n.frameType[e.type]);i.writeUInt8(e.flags);var a=i.skip(3);t(i);var s=i.size-n.FRAME_HEADER_SIZE;a.writeUInt24BE(s);var o=i.render();var f={stream:e.id,priority:false,chunks:o,callback:r};this._resetTimeout();this.schedule(f);return o};Framer.prototype._synFrame=function _synFrame(e,t){var r=this;if(!e.path){throw new Error("`path` is required frame argument")}function preprocess(t){var i=e.method||a.constants.DEFAULT_METHOD;var n=e.version||"HTTP/1.1";var s=e.scheme||"https";var o=e.host||e.headers&&e.headers.host||a.constants.DEFAULT_HOST;if(r.version===2){t.method=i;t.version=n;t.url=e.path;t.scheme=s;t.host=o;if(e.status){t.status=e.status}}else{t[":method"]=i;t[":version"]=n;t[":path"]=e.path;t[":scheme"]=s;t[":host"]=o;if(e.status){t[":status"]=e.status}}}this.headersToDict(e.headers,preprocess,function(i,a){if(i){if(t){return t(i)}else{return r.emit("error",i)}}r._frame({type:"SYN_STREAM",id:e.id,flags:e.fin?n.flags.FLAG_FIN:0},function(t){t.reserve(10);t.writeUInt32BE(e.id&2147483647);t.writeUInt32BE(e.associated&2147483647);var r=e.priority&&e.priority.weight||n.DEFAULT_WEIGHT;var i=s.weightToPriority(r);t.writeUInt8(i<<5);t.writeUInt8(0);for(var o=0;o<a.length;o++){t.copyFrom(a[o])}},t)})};Framer.prototype.requestFrame=function requestFrame(e,t){this._synFrame({id:e.id,fin:e.fin,associated:0,method:e.method,version:e.version,scheme:e.scheme,host:e.host,path:e.path,priority:e.priority,headers:e.headers},t)};Framer.prototype.responseFrame=function responseFrame(e,t){var r=this;var i=e.reason;if(!i){i=n.statusReason[e.status]}function preprocess(t){if(r.version===2){t.status=e.status+" "+i;t.version="HTTP/1.1"}else{t[":status"]=e.status+" "+i;t[":version"]="HTTP/1.1"}}this.headersToDict(e.headers,preprocess,function(i,n){if(i){if(t){return t(i)}else{return r.emit("error",i)}}r._frame({type:"SYN_REPLY",id:e.id,flags:0},function(t){t.reserve(r.version===2?6:4);t.writeUInt32BE(e.id&2147483647);if(r.version===2){t.writeUInt16BE(0)}for(var i=0;i<n.length;i++){t.copyFrom(n[i])}},t)})};Framer.prototype.pushFrame=function pushFrame(e,t){var r=this;this._checkPush(function(i){if(i){return t(i)}r._synFrame({id:e.promisedId,associated:e.id,method:e.method,status:e.status||200,version:e.version,scheme:e.scheme,host:e.host,path:e.path,priority:e.priority,headers:Object.assign(Object.assign({},e.headers),e.response)},t)})};Framer.prototype.headersFrame=function headersFrame(e,t){var r=this;this.headersToDict(e.headers,null,function(i,n){if(i){if(t){return t(i)}else{return r.emit("error",i)}}r._frame({type:"HEADERS",id:e.id,priority:false,flags:0},function(t){t.reserve(4+(r.version===2?2:0));t.writeUInt32BE(e.id&2147483647);if(r.version===2){t.writeUInt16BE(0)}for(var i=0;i<n.length;i++){t.copyFrom(n[i])}},t)})};Framer.prototype.dataFrame=function dataFrame(e,t){if(!this.version){return this.on("version",function(){this.dataFrame(e,t)})}d("id=%d type=DATA",e.id);var r=new l;r.reserve(8+e.data.length);r.writeUInt32BE(e.id&2147483647);r.writeUInt8(e.fin?1:0);r.writeUInt24BE(e.data.length);r.copyFrom(e.data);var i=r.render();var n={stream:e.id,priority:e.priority,chunks:i,callback:t};var a=this;this._resetTimeout();var s=this.version<3.1;this.window.send.update(-e.data.length,s?undefined:function(){a._resetTimeout();a.schedule(n)});if(s){this._resetTimeout();this.schedule(n)}};Framer.prototype.pingFrame=function pingFrame(e,t){this._frame({type:"PING",id:0,flags:0},function(t,r){t.reserve(4);var i=e.opaque;t.writeUInt32BE(i.readUInt32BE(i.length-4,true))},t)};Framer.prototype.rstFrame=function rstFrame(e,t){this._frame({type:"RST_STREAM",id:e.id,flags:0},function(t){t.reserve(8);t.writeUInt32BE(e.id&2147483647);t.writeUInt32BE(n.error[e.code]);if(e.extra){t.write(e.extra)}},t)};Framer.prototype.prefaceFrame=function prefaceFrame(){};Framer.prototype.settingsFrame=function settingsFrame(e,t){var r=this;var i=this.version+"/"+JSON.stringify(e);var a=Framer.settingsCache[i];if(a){d("cached settings");this._resetTimeout();this.schedule({stream:0,priority:false,chunks:a,callback:t});return}var s=[];for(var o=0;o<n.settingsIndex.length;o++){var f=n.settingsIndex[o];if(!f){continue}if(!isFinite(e[f])){continue}if(e[f]!==undefined){s.push({key:o,value:e[f]})}}var u=this._frame({type:"SETTINGS",id:0,flags:0},function(e){e.reserve(4+8*s.length);e.writeUInt32BE(s.length);s.forEach(function(t){var i=n.settings.FLAG_SETTINGS_PERSIST_VALUE<<24;if(r.version===2){e.writeUInt32LE(i|t.key)}else{e.writeUInt32BE(i|t.key)}e.writeUInt32BE(t.value&2147483647)})},t);Framer.settingsCache[i]=u};Framer.settingsCache={};Framer.prototype.ackSettingsFrame=function ackSettingsFrame(e){if(e){process.nextTick(e)}};Framer.prototype.windowUpdateFrame=function windowUpdateFrame(e,t){this._frame({type:"WINDOW_UPDATE",id:e.id,flags:0},function(t){t.reserve(8);t.writeUInt32BE(e.id&2147483647);t.writeInt32BE(e.delta)},t)};Framer.prototype.goawayFrame=function goawayFrame(e,t){this._frame({type:"GOAWAY",id:0,flags:0},function(t){t.reserve(8);t.writeUInt32BE(e.lastId&2147483647);t.writeUInt32BE(n.goaway[e.code])},t)};Framer.prototype.priorityFrame=function priorityFrame(e,t){if(t){process.nextTick(t)}};Framer.prototype.xForwardedFor=function xForwardedFor(e,t){this._frame({type:"X_FORWARDED_FOR",id:0,flags:0},function(t){t.writeUInt32BE(u.byteLength(e.host));t.write(e.host)},t)}},2692:(e,t,r)=>{"use strict";t.name="spdy";t.dictionary=r(6704);t.constants=r(5746);t.parser=r(7234);t.framer=r(4120);t.compressionPool=r(187)},7234:(e,t,r)=>{"use strict";var i=t;var n=r(1590);var a=n.protocol.base;var s=a.utils;var o=r(5746);var f=r(2357);var u=r(1669);var l=r(2259);function Parser(e){a.Parser.call(this,e);this.isServer=e.isServer;this.waiting=o.FRAME_HEADER_SIZE;this.state="frame-head";this.pendingHeader=null}u.inherits(Parser,a.Parser);i.create=function create(e){return new Parser(e)};Parser.prototype.setMaxFrameSize=function setMaxFrameSize(e){};Parser.prototype.setMaxHeaderListSize=function setMaxHeaderListSize(e){};Parser.prototype.skipPreface=function skipPreface(){};Parser.prototype.execute=function execute(e,t){if(this.state==="frame-head"){return this.onFrameHead(e,t)}f(this.state==="frame-body"&&this.pendingHeader!==null);var r=this;var i=this.pendingHeader;this.pendingHeader=null;this.onFrameBody(i,e,function(e,i){if(e){return t(e)}r.state="frame-head";r.waiting=o.FRAME_HEADER_SIZE;r.partial=false;t(null,i)})};Parser.prototype.executePartial=function executePartial(e,t){var r=this.pendingHeader;if(this.window){this.window.recv.update(-e.size)}t(null,{type:"DATA",id:r.id,fin:false,data:e.take(e.size)})};Parser.prototype.onFrameHead=function onFrameHead(e,t){var r={control:(e.peekUInt8()&128)===128,version:null,type:null,id:null,flags:null,length:null};if(r.control){r.version=e.readUInt16BE()&32767;r.type=e.readUInt16BE()}else{r.id=e.readUInt32BE(0)&2147483647}r.flags=e.readUInt8();r.length=e.readUInt24BE();if(this.version===null&&r.control){if(r.version!==2&&r.version!==3){return t(new Error("Unsupported SPDY version: "+r.version))}this.setVersion(r.version)}this.state="frame-body";this.waiting=r.length;this.pendingHeader=r;this.partial=!r.control;t(null,null)};Parser.prototype.onFrameBody=function onFrameBody(e,t,r){if(!e.control){if(this.window){this.window.recv.update(-t.size)}if((e.flags&o.flags.FLAG_COMPRESSED)!==0){return r(new Error("DATA compression not supported"))}if(e.id===0){return r(this.error(o.error.PROTOCOL_ERROR,"Invalid stream id for DATA"))}return r(null,{type:"DATA",id:e.id,fin:(e.flags&o.flags.FLAG_FIN)!==0,data:t.take(t.size)})}if(e.type===1||e.type===2){this.onSynHeadFrame(e.type,e.flags,t,r)}else if(e.type===3){this.onRSTFrame(t,r)}else if(e.type===4){this.onSettingsFrame(t,r)}else if(e.type===5){r(null,{type:"NOOP"})}else if(e.type===6){this.onPingFrame(t,r)}else if(e.type===7){this.onGoawayFrame(t,r)}else if(e.type===8){this.onHeaderFrames(t,r)}else if(e.type===9){this.onWindowUpdateFrame(t,r)}else if(e.type===61440){this.onXForwardedFrame(t,r)}else{r(null,{type:"unknown: "+e.type})}};Parser.prototype._filterHeader=function _filterHeader(e,t){var r={};var i=Object.keys(e);for(var n=0;n<i.length;n++){var a=i[n];if(a!==t){r[a]=e[a]}}return r};Parser.prototype.onSynHeadFrame=function onSynHeadFrame(e,t,r,i){var n=this;var a=e===1;var f=a?10:this.version===2?6:4;if(!r.has(f)){return i(new Error("SynHead OOB"))}var u=r.clone(f);r.skip(f);this.parseKVs(r,function(e,r){if(e){return i(e)}if(a&&(!r[":method"]||!r[":path"])){return i(new Error("Missing `:method` and/or `:path` header"))}var f=u.readUInt32BE()&2147483647;if(f===0){return i(n.error(o.error.PROTOCOL_ERROR,"Invalid stream id for HEADERS"))}var l=a?u.readUInt32BE()&2147483647:0;var d=a?u.readUInt8()>>5:s.weightToPriority(o.DEFAULT_WEIGHT);var h=(t&o.flags.FLAG_FIN)!==0;var c=(t&o.flags.FLAG_UNIDIRECTIONAL)!==0;var p=r[":path"];var v=a&&l!==0;var y=s.priorityToWeight(d);var m={weight:y,exclusive:false,parent:0};if(!v){i(null,{type:"HEADERS",id:f,priority:m,fin:h,writable:!c,headers:r,path:p});return}if(a&&!r[":status"]){return i(new Error("Missing `:status` header"))}var g=n._filterHeader(r,":status");i(null,[{type:"PUSH_PROMISE",id:l,fin:false,promisedId:f,headers:g,path:p},{type:"HEADERS",id:f,fin:h,priority:m,writable:true,path:undefined,headers:{":status":r[":status"]}}])})};Parser.prototype.onHeaderFrames=function onHeaderFrames(e,t){var r=this.version===2?6:4;if(!e.has(r)){return t(new Error("HEADERS OOB"))}var i=e.readUInt32BE()&2147483647;if(this.version===2){e.skip(2)}this.parseKVs(e,function(e,r){if(e){return t(e)}t(null,{type:"HEADERS",priority:{parent:0,exclusive:false,weight:o.DEFAULT_WEIGHT},id:i,fin:false,writable:true,path:undefined,headers:r})})};Parser.prototype.parseKVs=function parseKVs(e,t){var r=this;this.decompress.write(e.toChunks(),function(e,i){if(e){return t(e)}var n=new l;for(var a=0;a<i.length;a++){n.push(i[a])}var o=r.version===2?2:4;if(!n.has(o)){return t(new Error("KV OOB"))}var f=r.version===2?n.readUInt16BE():n.readUInt32BE();var u={};function readString(){if(!n.has(o)){return null}var e=r.version===2?n.readUInt16BE():n.readUInt32BE();if(!n.has(e)){return null}var t=n.take(e);return t.toString()}while(f>0){var d=readString();var h=readString();if(d===null||h===null){return t(new Error("Headers OOB"))}if(r.version<3){var c=/^(method|version|url|host|scheme|status)$/.test(d);if(d==="url"){d="path"}if(c){d=":"+d}}if(d===":status"){h=h.split(/ /g,2)[0]}f--;if(d===":host"){d=":authority"}if(d===":version"){continue}h=h.split(/\0/g);for(var p=0;p<h.length;p++){s.addHeaderLine(d,h[p],u)}}t(null,u)})};Parser.prototype.onRSTFrame=function onRSTFrame(e,t){if(!e.has(8)){return t(new Error("RST OOB"))}var r={type:"RST",id:e.readUInt32BE()&2147483647,code:o.errorByCode[e.readUInt32BE()]};if(r.id===0){return t(this.error(o.error.PROTOCOL_ERROR,"Invalid stream id for RST"))}if(e.size!==0){r.extra=e.take(e.size)}t(null,r)};Parser.prototype.onSettingsFrame=function onSettingsFrame(e,t){if(!e.has(4)){return t(new Error("SETTINGS OOB"))}var r={};var i=e.readUInt32BE();var n={1:"upload_bandwidth",2:"download_bandwidth",3:"round_trip_time",4:"max_concurrent_streams",5:"current_cwnd",6:"download_retrans_rate",7:"initial_window_size",8:"client_certificate_vector_size"};if(!e.has(i*8)){return t(new Error("SETTINGS OOB#2"))}for(var a=0;a<i;a++){var s=this.version===2?e.readUInt32LE():e.readUInt32BE();var o=s>>24&255;s=s&16777215;if(o&2){continue}var f=n[s];r[f]=e.readUInt32BE()}t(null,{type:"SETTINGS",settings:r})};Parser.prototype.onPingFrame=function onPingFrame(e,t){if(!e.has(4)){return t(new Error("PING OOB"))}var r=this.isServer;var i=e.clone(e.size).take(e.size);var n=e.readUInt32BE();var a=r?n%2===0:n%2===1;t(null,{type:"PING",opaque:i,ack:a})};Parser.prototype.onGoawayFrame=function onGoawayFrame(e,t){if(!e.has(8)){return t(new Error("GOAWAY OOB"))}t(null,{type:"GOAWAY",lastId:e.readUInt32BE()&2147483647,code:o.goawayByCode[e.readUInt32BE()]})};Parser.prototype.onWindowUpdateFrame=function onWindowUpdateFrame(e,t){if(!e.has(8)){return t(new Error("WINDOW_UPDATE OOB"))}t(null,{type:"WINDOW_UPDATE",id:e.readUInt32BE()&2147483647,delta:e.readInt32BE()})};Parser.prototype.onXForwardedFrame=function onXForwardedFrame(e,t){if(!e.has(4)){return t(new Error("X_FORWARDED OOB"))}var r=e.readUInt32BE();if(!e.has(r)){return t(new Error("X_FORWARDED host length OOB"))}t(null,{type:"X_FORWARDED_FOR",host:e.take(r).toString()})}},187:(e,t,r)=>{"use strict";var i=t;var n=r(8761);var a=r(1590);function createDeflate(e,t){var r=n.createDeflate({dictionary:a.protocol.spdy.dictionary[e],flush:n.Z_SYNC_FLUSH,windowBits:11,level:t?n.Z_DEFAULT_COMPRESSION:n.Z_NO_COMPRESSION});r._flush=n.Z_SYNC_FLUSH;return r}function createInflate(e){var t=n.createInflate({dictionary:a.protocol.spdy.dictionary[e],flush:n.Z_SYNC_FLUSH});t._flush=n.Z_SYNC_FLUSH;return t}function Pool(e){this.compression=e;this.pool={2:[],3:[],3.1:[]}}i.create=function create(e){return new Pool(e)};Pool.prototype.get=function get(e){if(this.pool[e].length>0){return this.pool[e].pop()}else{var t=e;return{version:e,compress:createDeflate(t,this.compression),decompress:createInflate(t)}}};Pool.prototype.put=function put(e){this.pool[e.version].push(e)}},24:(e,t,r)=>{"use strict";var i=r(1590);var n=r(2357);var a=r(1669);var s={client:r(1492)("spdy:stream:client"),server:r(1492)("spdy:stream:server")};var o=r(8740).Duplex;function Stream(e,t){o.call(this);var r=e._spdyState;var n={};this._spdyState=n;this.id=t.id;this.method=t.method;this.path=t.path;this.host=t.host;this.headers=t.headers||{};this.connection=e;this.parent=t.parent||null;n.socket=null;n.protocol=r.protocol;n.constants=n.protocol.constants;n.priority=null;n.version=this.connection.getVersion();n.isServer=this.connection.isServer();n.debug=n.isServer?s.server:s.client;n.framer=r.framer;n.parser=r.parser;n.request=t.request;n.needResponse=t.request;n.window=r.streamWindow.clone(t.id);n.sessionWindow=r.window;n.maxChunk=r.maxChunk;n.sent=!n.request;n.readable=t.readable!==false;n.writable=t.writable!==false;n.aborted=false;n.corked=0;n.corkQueue=[];n.timeout=new i.utils.Timeout(this);this.on("finish",this._onFinish);this.on("end",this._onEnd);var a=this;function _onWindowOverflow(){a._onWindowOverflow()}n.window.recv.on("overflow",_onWindowOverflow);n.window.send.on("overflow",_onWindowOverflow);this._initPriority(t.priority);if(!n.readable){this.push(null)}if(!n.writable){this._writableState.ended=true;this._writableState.finished=true}}a.inherits(Stream,o);t.F=Stream;Stream.prototype._init=function _init(e){this.socket=e};Stream.prototype._initPriority=function _initPriority(e){var t=this._spdyState;var r=this.connection._spdyState;var i=r.priorityRoot;if(!e){t.priority=i.addDefault(this.id);return}t.priority=i.add({id:this.id,parent:e.parent,weight:e.weight,exclusive:e.exclusive})};Stream.prototype._handleFrame=function _handleFrame(e){var t=this._spdyState;if(t.aborted){t.debug("id=%d ignoring frame=%s after abort",this.id,e.type);return}t.timeout.reset();if(e.type==="DATA"){this._handleData(e)}else if(e.type==="HEADERS"){this._handleHeaders(e)}else if(e.type==="RST"){this._handleRST(e)}else if(e.type==="WINDOW_UPDATE"){this._handleWindowUpdate(e)}else if(e.type==="PRIORITY"){this._handlePriority(e)}else if(e.type==="PUSH_PROMISE"){this._handlePushPromise(e)}if(e.fin){t.debug("id=%d end",this.id);this.push(null)}};function checkAborted(e,t,r){if(t.aborted){t.debug("id=%d abort write",e.id);process.nextTick(function(){r(new Error("Stream write aborted"))});return true}return false}function _send(e,t,r,i){if(checkAborted(e,t,i)){return}t.debug("id=%d presend=%d",e.id,r.length);t.timeout.reset();t.window.send.update(-r.length,function(){if(checkAborted(e,t,i)){return}t.debug("id=%d send=%d",e.id,r.length);t.timeout.reset();t.framer.dataFrame({id:e.id,priority:t.priority.getPriority(),fin:false,data:r},function(n){t.debug("id=%d postsend=%d",e.id,r.length);i(n)})})}Stream.prototype._write=function _write(e,t,r){var i=this._spdyState;if(!i.sent){this.send()}if(i.corked!==0){var n=this;i.corkQueue.push(function(){n._write(e,t,r)});return}this._splitStart(e,_send,r)};Stream.prototype._splitStart=function _splitStart(e,t,r){return this._split(e,0,t,r)};Stream.prototype._split=function _split(e,t,r,i){if(t===e.length){return process.nextTick(i)}var n=this._spdyState;var a=n.window.send;var s=n.sessionWindow.send;var o=Math.max(0,s.getCurrent());if(o===0){o=s.getMax()}var f=Math.max(0,a.getCurrent());if(f===0){f=a.getMax()}var u=Math.min(o,f);u=Math.min(u,n.maxChunk);var l=this;if(u===0){n.window.send.update(0,function(){l._split(e,t,r,i)});return}var d=u;var h=Math.min(e.length-t,d);var c=e.slice(t,t+h);r(this,n,c,function(n){if(n){return i(n)}l._split(e,t+h,r,i)})};Stream.prototype._read=function _read(){var e=this._spdyState;if(!e.window.recv.isDraining()){return}var t=e.window.recv.getDelta();e.debug("id=%d window emptying, update by %d",this.id,t);e.window.recv.update(t);e.framer.windowUpdateFrame({id:this.id,delta:t})};Stream.prototype._handleData=function _handleData(e){var t=this._spdyState;if(!t.readable||this._readableState.ended){t.framer.rstFrame({id:this.id,code:"STREAM_CLOSED"});return}t.debug("id=%d recv=%d",this.id,e.data.length);t.window.recv.update(-e.data.length);this.push(e.data)};Stream.prototype._handleRST=function _handleRST(e){if(e.code!=="CANCEL"){this.emit("error",new Error("Got RST: "+e.code))}this.abort()};Stream.prototype._handleWindowUpdate=function _handleWindowUpdate(e){var t=this._spdyState;t.window.send.update(e.delta)};Stream.prototype._onWindowOverflow=function _onWindowOverflow(){var e=this._spdyState;e.debug("id=%d window overflow",this.id);e.framer.rstFrame({id:this.id,code:"FLOW_CONTROL_ERROR"});this.aborted=true;this.emit("error",new Error("HTTP2 window overflow"))};Stream.prototype._handlePriority=function _handlePriority(e){var t=this._spdyState;t.priority.remove();t.priority=null;this._initPriority(e.priority);this.emit("priority",e.priority)};Stream.prototype._handleHeaders=function _handleHeaders(e){var t=this._spdyState;if(!t.readable||this._readableState.ended){t.framer.rstFrame({id:this.id,code:"STREAM_CLOSED"});return}if(t.needResponse){return this._handleResponse(e)}this.emit("headers",e.headers)};Stream.prototype._handleResponse=function _handleResponse(e){var t=this._spdyState;if(e.headers[":status"]===undefined){t.framer.rstFrame({id:this.id,code:"PROTOCOL_ERROR"});return}t.needResponse=false;this.emit("response",e.headers[":status"]|0,e.headers)};Stream.prototype._onFinish=function _onFinish(){var e=this._spdyState;if(!e.sent){this.send()}else{if(e.corked!==0){var t=this;e.corkQueue.push(function(){t._onFinish()});return}e.framer.dataFrame({id:this.id,priority:e.priority.getPriority(),fin:true,data:Buffer.alloc(0)})}this._maybeClose()};Stream.prototype._onEnd=function _onEnd(){this._maybeClose()};Stream.prototype._checkEnded=function _checkEnded(e){var t=this._spdyState;var r=false;if(t.aborted){r=true}if(!t.writable||this._writableState.finished){r=true}if(!r){return true}if(!e){return false}var i=new Error("Ended stream can't send frames");process.nextTick(function(){e(i)});return false};Stream.prototype._maybeClose=function _maybeClose(){var e=this._spdyState;if(e.aborted){return}if((!e.readable||this._readableState.ended)&&this._writableState.finished){e.timeout.set(0);this.emit("close")}};Stream.prototype._handlePushPromise=function _handlePushPromise(e){var t=this.connection._createStream({id:e.promisedId,parent:this,push:true,request:true,method:e.headers[":method"],path:e.headers[":path"],host:e.headers[":authority"],priority:e.priority,headers:e.headers,writable:false});if(this.connection._isGoaway(t.id)){return}if(!this.emit("pushPromise",t)){t.abort()}};Stream.prototype._hardCork=function _hardCork(){var e=this._spdyState;this.cork();e.corked++};Stream.prototype._hardUncork=function _hardUncork(){var e=this._spdyState;this.uncork();e.corked--;if(e.corked!==0){return}var t=e.corkQueue;e.corkQueue=[];for(var r=0;r<t.length;r++){t[r]()}};Stream.prototype._sendPush=function _sendPush(e,t,r){var i=this;var n=this._spdyState;this._hardCork();n.framer.pushFrame({id:this.parent.id,promisedId:this.id,priority:n.priority.toJSON(),path:this.path,host:this.host,method:this.method,status:e,headers:this.headers,response:t},function(e){i._hardUncork();r(e)})};Stream.prototype._wasSent=function _wasSent(){var e=this._spdyState;return e.sent};Stream.prototype.send=function send(e){var t=this._spdyState;if(t.sent){var r=new Error("Stream was already sent");process.nextTick(function(){if(e){e(r)}});return}t.sent=true;t.timeout.reset();if(this.method==="GET"){this._writableState.ended=true;this._writableState.finished=true}var i=this;this._hardCork();t.framer.requestFrame({id:this.id,method:this.method,path:this.path,host:this.host,priority:t.priority.toJSON(),headers:this.headers,fin:this._writableState.finished},function(t){i._hardUncork();if(!e){return}e(t)})};Stream.prototype.respond=function respond(e,t,r){var i=this;var a=this._spdyState;n(!a.request,"Can't respond on request");a.timeout.reset();if(!this._checkEnded(r)){return}var s={id:this.id,status:e,headers:t};this._hardCork();a.framer.responseFrame(s,function(e){i._hardUncork();if(r){r(e)}})};Stream.prototype.setWindow=function setWindow(e){var t=this._spdyState;t.timeout.reset();if(!this._checkEnded()){return}t.debug("id=%d force window max=%d",this.id,e);t.window.recv.setMax(e);var r=t.window.recv.getDelta();if(r===0){return}t.framer.windowUpdateFrame({id:this.id,delta:r});t.window.recv.update(r)};Stream.prototype.sendHeaders=function sendHeaders(e,t){var r=this;var i=this._spdyState;i.timeout.reset();if(!this._checkEnded(t)){return}if(!i.sent){this.headers=Object.assign({},this.headers);Object.assign(this.headers,e);process.nextTick(function(){if(t){t(null)}});return}this._hardCork();i.framer.headersFrame({id:this.id,headers:e},function(e){r._hardUncork();if(t){t(e)}})};Stream.prototype._destroy=function destroy(){this.abort()};Stream.prototype.abort=function abort(e,t){var r=this._spdyState;if(typeof e==="function"){t=e;e=null}if(this._readableState.ended&&this._writableState.finished){r.debug("id=%d already closed",this.id);if(t){process.nextTick(t)}return}if(r.aborted){r.debug("id=%d already aborted",this.id);if(t){process.nextTick(t)}return}r.aborted=true;r.debug("id=%d abort",this.id);this.setTimeout(0);var i=e||"CANCEL";r.framer.rstFrame({id:this.id,code:i});var n=this;process.nextTick(function(){if(t){t(null)}n.emit("close",new Error("Aborted, code: "+i))})};Stream.prototype.setPriority=function setPriority(e){var t=this._spdyState;t.timeout.reset();if(!this._checkEnded()){return}t.debug("id=%d priority change",this.id,e);var r={id:this.id,priority:e};this._handlePriority(r);t.framer.priorityFrame(r)};Stream.prototype.pushPromise=function pushPromise(e,t){if(!this._checkEnded(t)){return}var r=this;this._hardCork();var i=this.connection.pushPromise(this,e,function(e){r._hardUncork();if(!e){i._hardUncork()}if(t){return t(e,i)}if(e){i.emit("error",e)}});i._hardCork();return i};Stream.prototype.setMaxChunk=function setMaxChunk(e){var t=this._spdyState;t.maxChunk=e};Stream.prototype.setTimeout=function setTimeout(e,t){var r=this._spdyState;r.timeout.set(e,t)}},7196:(e,t,r)=>{"use strict";var i=r(1669);var n=r(5284);Object.assign=process.versions.modules>=46||!n?Object.assign:i._extend;function QueueItem(){this.prev=null;this.next=null}t.QueueItem=QueueItem;function Queue(){QueueItem.call(this);this.prev=this;this.next=this}i.inherits(Queue,QueueItem);t.Queue=Queue;Queue.prototype.insertTail=function insertTail(e){e.prev=this.prev;e.next=this;e.prev.next=e;e.next.prev=e};Queue.prototype.remove=function remove(e){var t=e.next;var r=e.prev;e.next=e;e.prev=e;t.prev=r;r.next=t};Queue.prototype.head=function head(){return this.next};Queue.prototype.tail=function tail(){return this.prev};Queue.prototype.isEmpty=function isEmpty(){return this.next===this};Queue.prototype.isRoot=function isRoot(e){return this===e};function LockStream(e){this.locked=false;this.queue=[];this.stream=e}t.LockStream=LockStream;LockStream.prototype.write=function write(e,t){var r=this;if(this.locked){this.queue.push(function(){return r.write(e,t)});return}this.locked=true;function done(e,i){r.stream.removeListener("error",done);r.locked=false;if(r.queue.length>0){r.queue.shift()()}t(e,i)}this.stream.on("error",done);var i=[];function onData(e){i.push(e)}this.stream.on("data",onData);function next(e){r.stream.removeListener("data",onData);if(e){return done(e)}done(null,i)}for(var n=0;n<e.length-1;n++){this.stream.write(e[n])}if(e.length>0){this.stream.write(e[n],next)}else{process.nextTick(next)}if(this.stream.execute){this.stream.execute(function(e){if(e){return done(e)}})}};function binaryLookup(e,t,r){var i=0;var n=e.length;while(i<n){var a=i+n>>1;var s=r(t,e[a]);if(s===0){i=a;n=a;break}else if(s<0){n=a}else{i=a+1}}return i}t.binaryLookup=binaryLookup;function binaryInsert(e,t,r){var i=binaryLookup(e,t,r);e.splice(i,0,t)}t.binaryInsert=binaryInsert;function binarySearch(e,t,r){var i=binaryLookup(e,t,r);if(i>=e.length){return-1}if(r(t,e[i])===0){return i}return-1}t.binarySearch=binarySearch;function Timeout(e){this.delay=0;this.timer=null;this.object=e}t.Timeout=Timeout;Timeout.prototype.set=function set(e,t){this.delay=e;this.reset();if(!t){return}if(this.delay===0){this.object.removeListener("timeout",t)}else{this.object.once("timeout",t)}};Timeout.prototype.reset=function reset(){if(this.timer!==null){clearTimeout(this.timer);this.timer=null}if(this.delay===0){return}var e=this;this.timer=setTimeout(function(){e.timer=null;e.object.emit("timeout")},this.delay)}},4960:(e,t,r)=>{"use strict";var i=r(1669);var n=r(8614).EventEmitter;var a={server:r(1492)("spdy:window:server"),client:r(1492)("spdy:window:client")};function Side(e,t,r){n.call(this);this.name=t;this.window=e;this.current=r.size;this.max=r.size;this.limit=r.max;this.lowWaterMark=r.lowWaterMark===undefined?this.max/2:r.lowWaterMark;this._refilling=false;this._refillQueue=[]}i.inherits(Side,n);Side.prototype.setMax=function setMax(e){this.window.debug("id=%d side=%s setMax=%d",this.window.id,this.name,e);this.max=e;this.lowWaterMark=this.max/2};Side.prototype.updateMax=function updateMax(e){var t=e-this.max;this.window.debug("id=%d side=%s updateMax=%d delta=%d",this.window.id,this.name,e,t);this.max=e;this.lowWaterMark=e/2;this.update(t)};Side.prototype.setLowWaterMark=function setLowWaterMark(e){this.lowWaterMark=e};Side.prototype.update=function update(e,t){if(e<=0&&t&&this.isEmpty()){this.window.debug("id=%d side=%s wait for refill=%d [%d/%d]",this.window.id,this.name,-e,this.current,this.max);this._refillQueue.push({size:e,callback:t});return}this.current+=e;if(this.current>this.limit){this.emit("overflow");return}this.window.debug("id=%d side=%s update by=%d [%d/%d]",this.window.id,this.name,e,this.current,this.max);if(e<0&&this.isDraining()){this.window.debug("id=%d side=%s drained",this.window.id,this.name);this.emit("drain")}if(e>0&&this.current>0&&this.current<=e){this.window.debug("id=%d side=%s full",this.window.id,this.name);this.emit("full")}this._processRefillQueue();if(t){process.nextTick(t)}};Side.prototype.getCurrent=function getCurrent(){return this.current};Side.prototype.getMax=function getMax(){return this.max};Side.prototype.getDelta=function getDelta(){return this.max-this.current};Side.prototype.isDraining=function isDraining(){return this.current<=this.lowWaterMark};Side.prototype.isEmpty=function isEmpty(){return this.current<=0};Side.prototype._processRefillQueue=function _processRefillQueue(){if(this._refilling){return}this._refilling=true;while(this._refillQueue.length>0){var e=this._refillQueue[0];if(this.isEmpty()){break}this.window.debug("id=%d side=%s refilled for size=%d",this.window.id,this.name,-e.size);this._refillQueue.shift();this.update(e.size,e.callback)}this._refilling=false};function Window(e){this.id=e.id;this.isServer=e.isServer;this.debug=this.isServer?a.server:a.client;this.recv=new Side(this,"recv",e.recv);this.send=new Side(this,"send",e.send)}e.exports=Window;Window.prototype.clone=function clone(e){return new Window({id:e,isServer:this.isServer,recv:{size:this.recv.max,max:this.recv.limit,lowWaterMark:this.recv.lowWaterMark},send:{size:this.send.max,max:this.send.limit,lowWaterMark:this.send.lowWaterMark}})}},1758:e=>{"use strict";const t={};function createErrorType(e,r,i){if(!i){i=Error}function getMessage(e,t,i){if(typeof r==="string"){return r}else{return r(e,t,i)}}class NodeError extends i{constructor(e,t,r){super(getMessage(e,t,r))}}NodeError.prototype.name=i.name;NodeError.prototype.code=e;t[e]=NodeError}function oneOf(e,t){if(Array.isArray(e)){const r=e.length;e=e.map(e=>String(e));if(r>2){return`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]}else if(r===2){return`one of ${t} ${e[0]} or ${e[1]}`}else{return`of ${t} ${e[0]}`}}else{return`of ${t} ${String(e)}`}}function startsWith(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function endsWith(e,t,r){if(r===undefined||r>e.length){r=e.length}return e.substring(r-t.length,r)===t}function includes(e,t,r){if(typeof r!=="number"){r=0}if(r+t.length>e.length){return false}else{return e.indexOf(t,r)!==-1}}createErrorType("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);createErrorType("ERR_INVALID_ARG_TYPE",function(e,t,r){let i;if(typeof t==="string"&&startsWith(t,"not ")){i="must not be";t=t.replace(/^not /,"")}else{i="must be"}let n;if(endsWith(e," argument")){n=`The ${e} ${i} ${oneOf(t,"type")}`}else{const r=includes(e,".")?"property":"argument";n=`The "${e}" ${r} ${i} ${oneOf(t,"type")}`}n+=`. Received type ${typeof r}`;return n},TypeError);createErrorType("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");createErrorType("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});createErrorType("ERR_STREAM_PREMATURE_CLOSE","Premature close");createErrorType("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});createErrorType("ERR_MULTIPLE_CALLBACK","Callback called multiple times");createErrorType("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end");createErrorType("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);createErrorType("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");e.exports.q=t},1052:(e,t,r)=>{"use strict";var i=Object.keys||function(e){var t=[];for(var r in e){t.push(r)}return t};e.exports=Duplex;var n=r(28);var a=r(2874);r(4124)(Duplex,n);{var s=i(a.prototype);for(var o=0;o<s.length;o++){var f=s[o];if(!Duplex.prototype[f])Duplex.prototype[f]=a.prototype[f]}}function Duplex(e){if(!(this instanceof Duplex))return new Duplex(e);n.call(this,e);a.call(this,e);this.allowHalfOpen=true;if(e){if(e.readable===false)this.readable=false;if(e.writable===false)this.writable=false;if(e.allowHalfOpen===false){this.allowHalfOpen=false;this.once("end",onend)}}}Object.defineProperty(Duplex.prototype,"writableHighWaterMark",{enumerable:false,get:function get(){return this._writableState.highWaterMark}});Object.defineProperty(Duplex.prototype,"writableBuffer",{enumerable:false,get:function get(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Duplex.prototype,"writableLength",{enumerable:false,get:function get(){return this._writableState.length}});function onend(){if(this._writableState.ended)return;process.nextTick(onEndNT,this)}function onEndNT(e){e.end()}Object.defineProperty(Duplex.prototype,"destroyed",{enumerable:false,get:function get(){if(this._readableState===undefined||this._writableState===undefined){return false}return this._readableState.destroyed&&this._writableState.destroyed},set:function set(e){if(this._readableState===undefined||this._writableState===undefined){return}this._readableState.destroyed=e;this._writableState.destroyed=e}})},9915:(e,t,r)=>{"use strict";e.exports=PassThrough;var i=r(5958);r(4124)(PassThrough,i);function PassThrough(e){if(!(this instanceof PassThrough))return new PassThrough(e);i.call(this,e)}PassThrough.prototype._transform=function(e,t,r){r(null,e)}},28:(e,t,r)=>{"use strict";e.exports=Readable;var i;Readable.ReadableState=ReadableState;var n=r(8614).EventEmitter;var a=function EElistenerCount(e,t){return e.listeners(t).length};var s=r(6699);var o=r(4293).Buffer;var f=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return o.from(e)}function _isUint8Array(e){return o.isBuffer(e)||e instanceof f}var u=r(1669);var l;if(u&&u.debuglog){l=u.debuglog("stream")}else{l=function debug(){}}var d=r(2795);var h=r(5324);var c=r(2863),p=c.getHighWaterMark;var v=r(1758).q,y=v.ERR_INVALID_ARG_TYPE,m=v.ERR_STREAM_PUSH_AFTER_EOF,g=v.ERR_METHOD_NOT_IMPLEMENTED,_=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;var w;var S;var b;r(4124)(Readable,s);var E=h.errorOrDestroy;var R=["error","close","destroy","pause","resume"];function prependListener(e,t,r){if(typeof e.prependListener==="function")return e.prependListener(t,r);if(!e._events||!e._events[t])e.on(t,r);else if(Array.isArray(e._events[t]))e._events[t].unshift(r);else e._events[t]=[r,e._events[t]]}function ReadableState(e,t,n){i=i||r(1052);e=e||{};if(typeof n!=="boolean")n=t instanceof i;this.objectMode=!!e.objectMode;if(n)this.objectMode=this.objectMode||!!e.readableObjectMode;this.highWaterMark=p(this,e,"readableHighWaterMark",n);this.buffer=new d;this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.ended=false;this.endEmitted=false;this.reading=false;this.sync=true;this.needReadable=false;this.emittedReadable=false;this.readableListening=false;this.resumeScheduled=false;this.paused=true;this.emitClose=e.emitClose!==false;this.autoDestroy=!!e.autoDestroy;this.destroyed=false;this.defaultEncoding=e.defaultEncoding||"utf8";this.awaitDrain=0;this.readingMore=false;this.decoder=null;this.encoding=null;if(e.encoding){if(!w)w=r(4841).s;this.decoder=new w(e.encoding);this.encoding=e.encoding}}function Readable(e){i=i||r(1052);if(!(this instanceof Readable))return new Readable(e);var t=this instanceof i;this._readableState=new ReadableState(e,this,t);this.readable=true;if(e){if(typeof e.read==="function")this._read=e.read;if(typeof e.destroy==="function")this._destroy=e.destroy}s.call(this)}Object.defineProperty(Readable.prototype,"destroyed",{enumerable:false,get:function get(){if(this._readableState===undefined){return false}return this._readableState.destroyed},set:function set(e){if(!this._readableState){return}this._readableState.destroyed=e}});Readable.prototype.destroy=h.destroy;Readable.prototype._undestroy=h.undestroy;Readable.prototype._destroy=function(e,t){t(e)};Readable.prototype.push=function(e,t){var r=this._readableState;var i;if(!r.objectMode){if(typeof e==="string"){t=t||r.defaultEncoding;if(t!==r.encoding){e=o.from(e,t);t=""}i=true}}else{i=true}return readableAddChunk(this,e,t,false,i)};Readable.prototype.unshift=function(e){return readableAddChunk(this,e,null,true,false)};function readableAddChunk(e,t,r,i,n){l("readableAddChunk",t);var a=e._readableState;if(t===null){a.reading=false;onEofChunk(e,a)}else{var s;if(!n)s=chunkInvalid(a,t);if(s){E(e,s)}else if(a.objectMode||t&&t.length>0){if(typeof t!=="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==o.prototype){t=_uint8ArrayToBuffer(t)}if(i){if(a.endEmitted)E(e,new _);else addChunk(e,a,t,true)}else if(a.ended){E(e,new m)}else if(a.destroyed){return false}else{a.reading=false;if(a.decoder&&!r){t=a.decoder.write(t);if(a.objectMode||t.length!==0)addChunk(e,a,t,false);else maybeReadMore(e,a)}else{addChunk(e,a,t,false)}}}else if(!i){a.reading=false;maybeReadMore(e,a)}}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function addChunk(e,t,r,i){if(t.flowing&&t.length===0&&!t.sync){t.awaitDrain=0;e.emit("data",r)}else{t.length+=t.objectMode?1:r.length;if(i)t.buffer.unshift(r);else t.buffer.push(r);if(t.needReadable)emitReadable(e)}maybeReadMore(e,t)}function chunkInvalid(e,t){var r;if(!_isUint8Array(t)&&typeof t!=="string"&&t!==undefined&&!e.objectMode){r=new y("chunk",["string","Buffer","Uint8Array"],t)}return r}Readable.prototype.isPaused=function(){return this._readableState.flowing===false};Readable.prototype.setEncoding=function(e){if(!w)w=r(4841).s;var t=new w(e);this._readableState.decoder=t;this._readableState.encoding=this._readableState.decoder.encoding;var i=this._readableState.buffer.head;var n="";while(i!==null){n+=t.write(i.data);i=i.next}this._readableState.buffer.clear();if(n!=="")this._readableState.buffer.push(n);this._readableState.length=n.length;return this};var I=1073741824;function computeNewHighWaterMark(e){if(e>=I){e=I}else{e--;e|=e>>>1;e|=e>>>2;e|=e>>>4;e|=e>>>8;e|=e>>>16;e++}return e}function howMuchToRead(e,t){if(e<=0||t.length===0&&t.ended)return 0;if(t.objectMode)return 1;if(e!==e){if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length}if(e>t.highWaterMark)t.highWaterMark=computeNewHighWaterMark(e);if(e<=t.length)return e;if(!t.ended){t.needReadable=true;return 0}return t.length}Readable.prototype.read=function(e){l("read",e);e=parseInt(e,10);var t=this._readableState;var r=e;if(e!==0)t.emittedReadable=false;if(e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended)){l("read: emitReadable",t.length,t.ended);if(t.length===0&&t.ended)endReadable(this);else emitReadable(this);return null}e=howMuchToRead(e,t);if(e===0&&t.ended){if(t.length===0)endReadable(this);return null}var i=t.needReadable;l("need readable",i);if(t.length===0||t.length-e<t.highWaterMark){i=true;l("length less than watermark",i)}if(t.ended||t.reading){i=false;l("reading or ended",i)}else if(i){l("do read");t.reading=true;t.sync=true;if(t.length===0)t.needReadable=true;this._read(t.highWaterMark);t.sync=false;if(!t.reading)e=howMuchToRead(r,t)}var n;if(e>0)n=fromList(e,t);else n=null;if(n===null){t.needReadable=t.length<=t.highWaterMark;e=0}else{t.length-=e;t.awaitDrain=0}if(t.length===0){if(!t.ended)t.needReadable=true;if(r!==e&&t.ended)endReadable(this)}if(n!==null)this.emit("data",n);return n};function onEofChunk(e,t){l("onEofChunk");if(t.ended)return;if(t.decoder){var r=t.decoder.end();if(r&&r.length){t.buffer.push(r);t.length+=t.objectMode?1:r.length}}t.ended=true;if(t.sync){emitReadable(e)}else{t.needReadable=false;if(!t.emittedReadable){t.emittedReadable=true;emitReadable_(e)}}}function emitReadable(e){var t=e._readableState;l("emitReadable",t.needReadable,t.emittedReadable);t.needReadable=false;if(!t.emittedReadable){l("emitReadable",t.flowing);t.emittedReadable=true;process.nextTick(emitReadable_,e)}}function emitReadable_(e){var t=e._readableState;l("emitReadable_",t.destroyed,t.length,t.ended);if(!t.destroyed&&(t.length||t.ended)){e.emit("readable");t.emittedReadable=false}t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark;flow(e)}function maybeReadMore(e,t){if(!t.readingMore){t.readingMore=true;process.nextTick(maybeReadMore_,e,t)}}function maybeReadMore_(e,t){while(!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0)){var r=t.length;l("maybeReadMore read 0");e.read(0);if(r===t.length)break}t.readingMore=false}Readable.prototype._read=function(e){E(this,new g("_read()"))};Readable.prototype.pipe=function(e,t){var r=this;var i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1;l("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==false)&&e!==process.stdout&&e!==process.stderr;var s=n?onend:unpipe;if(i.endEmitted)process.nextTick(s);else r.once("end",s);e.on("unpipe",onunpipe);function onunpipe(e,t){l("onunpipe");if(e===r){if(t&&t.hasUnpiped===false){t.hasUnpiped=true;cleanup()}}}function onend(){l("onend");e.end()}var o=pipeOnDrain(r);e.on("drain",o);var f=false;function cleanup(){l("cleanup");e.removeListener("close",onclose);e.removeListener("finish",onfinish);e.removeListener("drain",o);e.removeListener("error",onerror);e.removeListener("unpipe",onunpipe);r.removeListener("end",onend);r.removeListener("end",unpipe);r.removeListener("data",ondata);f=true;if(i.awaitDrain&&(!e._writableState||e._writableState.needDrain))o()}r.on("data",ondata);function ondata(t){l("ondata");var n=e.write(t);l("dest.write",n);if(n===false){if((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&indexOf(i.pipes,e)!==-1)&&!f){l("false write response, pause",i.awaitDrain);i.awaitDrain++}r.pause()}}function onerror(t){l("onerror",t);unpipe();e.removeListener("error",onerror);if(a(e,"error")===0)E(e,t)}prependListener(e,"error",onerror);function onclose(){e.removeListener("finish",onfinish);unpipe()}e.once("close",onclose);function onfinish(){l("onfinish");e.removeListener("close",onclose);unpipe()}e.once("finish",onfinish);function unpipe(){l("unpipe");r.unpipe(e)}e.emit("pipe",r);if(!i.flowing){l("pipe resume");r.resume()}return e};function pipeOnDrain(e){return function pipeOnDrainFunctionResult(){var t=e._readableState;l("pipeOnDrain",t.awaitDrain);if(t.awaitDrain)t.awaitDrain--;if(t.awaitDrain===0&&a(e,"data")){t.flowing=true;flow(e)}}}Readable.prototype.unpipe=function(e){var t=this._readableState;var r={hasUnpiped:false};if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;if(!e)e=t.pipes;t.pipes=null;t.pipesCount=0;t.flowing=false;if(e)e.emit("unpipe",this,r);return this}if(!e){var i=t.pipes;var n=t.pipesCount;t.pipes=null;t.pipesCount=0;t.flowing=false;for(var a=0;a<n;a++){i[a].emit("unpipe",this,{hasUnpiped:false})}return this}var s=indexOf(t.pipes,e);if(s===-1)return this;t.pipes.splice(s,1);t.pipesCount-=1;if(t.pipesCount===1)t.pipes=t.pipes[0];e.emit("unpipe",this,r);return this};Readable.prototype.on=function(e,t){var r=s.prototype.on.call(this,e,t);var i=this._readableState;if(e==="data"){i.readableListening=this.listenerCount("readable")>0;if(i.flowing!==false)this.resume()}else if(e==="readable"){if(!i.endEmitted&&!i.readableListening){i.readableListening=i.needReadable=true;i.flowing=false;i.emittedReadable=false;l("on readable",i.length,i.reading);if(i.length){emitReadable(this)}else if(!i.reading){process.nextTick(nReadingNextTick,this)}}}return r};Readable.prototype.addListener=Readable.prototype.on;Readable.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);if(e==="readable"){process.nextTick(updateReadableListening,this)}return r};Readable.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);if(e==="readable"||e===undefined){process.nextTick(updateReadableListening,this)}return t};function updateReadableListening(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0;if(t.resumeScheduled&&!t.paused){t.flowing=true}else if(e.listenerCount("data")>0){e.resume()}}function nReadingNextTick(e){l("readable nexttick read 0");e.read(0)}Readable.prototype.resume=function(){var e=this._readableState;if(!e.flowing){l("resume");e.flowing=!e.readableListening;resume(this,e)}e.paused=false;return this};function resume(e,t){if(!t.resumeScheduled){t.resumeScheduled=true;process.nextTick(resume_,e,t)}}function resume_(e,t){l("resume",t.reading);if(!t.reading){e.read(0)}t.resumeScheduled=false;e.emit("resume");flow(e);if(t.flowing&&!t.reading)e.read(0)}Readable.prototype.pause=function(){l("call pause flowing=%j",this._readableState.flowing);if(this._readableState.flowing!==false){l("pause");this._readableState.flowing=false;this.emit("pause")}this._readableState.paused=true;return this};function flow(e){var t=e._readableState;l("flow",t.flowing);while(t.flowing&&e.read()!==null){}}Readable.prototype.wrap=function(e){var t=this;var r=this._readableState;var i=false;e.on("end",function(){l("wrapped end");if(r.decoder&&!r.ended){var e=r.decoder.end();if(e&&e.length)t.push(e)}t.push(null)});e.on("data",function(n){l("wrapped data");if(r.decoder)n=r.decoder.write(n);if(r.objectMode&&(n===null||n===undefined))return;else if(!r.objectMode&&(!n||!n.length))return;var a=t.push(n);if(!a){i=true;e.pause()}});for(var n in e){if(this[n]===undefined&&typeof e[n]==="function"){this[n]=function methodWrap(t){return function methodWrapReturnFunction(){return e[t].apply(e,arguments)}}(n)}}for(var a=0;a<R.length;a++){e.on(R[a],this.emit.bind(this,R[a]))}this._read=function(t){l("wrapped _read",t);if(i){i=false;e.resume()}};return this};if(typeof Symbol==="function"){Readable.prototype[Symbol.asyncIterator]=function(){if(S===undefined){S=r(5049)}return S(this)}}Object.defineProperty(Readable.prototype,"readableHighWaterMark",{enumerable:false,get:function get(){return this._readableState.highWaterMark}});Object.defineProperty(Readable.prototype,"readableBuffer",{enumerable:false,get:function get(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Readable.prototype,"readableFlowing",{enumerable:false,get:function get(){return this._readableState.flowing},set:function set(e){if(this._readableState){this._readableState.flowing=e}}});Readable._fromList=fromList;Object.defineProperty(Readable.prototype,"readableLength",{enumerable:false,get:function get(){return this._readableState.length}});function fromList(e,t){if(t.length===0)return null;var r;if(t.objectMode)r=t.buffer.shift();else if(!e||e>=t.length){if(t.decoder)r=t.buffer.join("");else if(t.buffer.length===1)r=t.buffer.first();else r=t.buffer.concat(t.length);t.buffer.clear()}else{r=t.buffer.consume(e,t.decoder)}return r}function endReadable(e){var t=e._readableState;l("endReadable",t.endEmitted);if(!t.endEmitted){t.ended=true;process.nextTick(endReadableNT,t,e)}}function endReadableNT(e,t){l("endReadableNT",e.endEmitted,e.length);if(!e.endEmitted&&e.length===0){e.endEmitted=true;t.readable=false;t.emit("end");if(e.autoDestroy){var r=t._writableState;if(!r||r.autoDestroy&&r.finished){t.destroy()}}}}if(typeof Symbol==="function"){Readable.from=function(e,t){if(b===undefined){b=r(6829)}return b(Readable,e,t)}}function indexOf(e,t){for(var r=0,i=e.length;r<i;r++){if(e[r]===t)return r}return-1}},5958:(e,t,r)=>{"use strict";e.exports=Transform;var i=r(1758).q,n=i.ERR_METHOD_NOT_IMPLEMENTED,a=i.ERR_MULTIPLE_CALLBACK,s=i.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=i.ERR_TRANSFORM_WITH_LENGTH_0;var f=r(1052);r(4124)(Transform,f);function afterTransform(e,t){var r=this._transformState;r.transforming=false;var i=r.writecb;if(i===null){return this.emit("error",new a)}r.writechunk=null;r.writecb=null;if(t!=null)this.push(t);i(e);var n=this._readableState;n.reading=false;if(n.needReadable||n.length<n.highWaterMark){this._read(n.highWaterMark)}}function Transform(e){if(!(this instanceof Transform))return new Transform(e);f.call(this,e);this._transformState={afterTransform:afterTransform.bind(this),needTransform:false,transforming:false,writecb:null,writechunk:null,writeencoding:null};this._readableState.needReadable=true;this._readableState.sync=false;if(e){if(typeof e.transform==="function")this._transform=e.transform;if(typeof e.flush==="function")this._flush=e.flush}this.on("prefinish",prefinish)}function prefinish(){var e=this;if(typeof this._flush==="function"&&!this._readableState.destroyed){this._flush(function(t,r){done(e,t,r)})}else{done(this,null,null)}}Transform.prototype.push=function(e,t){this._transformState.needTransform=false;return f.prototype.push.call(this,e,t)};Transform.prototype._transform=function(e,t,r){r(new n("_transform()"))};Transform.prototype._write=function(e,t,r){var i=this._transformState;i.writecb=r;i.writechunk=e;i.writeencoding=t;if(!i.transforming){var n=this._readableState;if(i.needTransform||n.needReadable||n.length<n.highWaterMark)this._read(n.highWaterMark)}};Transform.prototype._read=function(e){var t=this._transformState;if(t.writechunk!==null&&!t.transforming){t.transforming=true;this._transform(t.writechunk,t.writeencoding,t.afterTransform)}else{t.needTransform=true}};Transform.prototype._destroy=function(e,t){f.prototype._destroy.call(this,e,function(e){t(e)})};function done(e,t,r){if(t)return e.emit("error",t);if(r!=null)e.push(r);if(e._writableState.length)throw new o;if(e._transformState.transforming)throw new s;return e.push(null)}},2874:(e,t,r)=>{"use strict";e.exports=Writable;function WriteReq(e,t,r){this.chunk=e;this.encoding=t;this.callback=r;this.next=null}function CorkedRequest(e){var t=this;this.next=null;this.entry=null;this.finish=function(){onCorkedFinish(t,e)}}var i;Writable.WritableState=WritableState;var n={deprecate:r(5278)};var a=r(6699);var s=r(4293).Buffer;var o=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return s.from(e)}function _isUint8Array(e){return s.isBuffer(e)||e instanceof o}var f=r(5324);var u=r(2863),l=u.getHighWaterMark;var d=r(1758).q,h=d.ERR_INVALID_ARG_TYPE,c=d.ERR_METHOD_NOT_IMPLEMENTED,p=d.ERR_MULTIPLE_CALLBACK,v=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,m=d.ERR_STREAM_NULL_VALUES,g=d.ERR_STREAM_WRITE_AFTER_END,_=d.ERR_UNKNOWN_ENCODING;var w=f.errorOrDestroy;r(4124)(Writable,a);function nop(){}function WritableState(e,t,n){i=i||r(1052);e=e||{};if(typeof n!=="boolean")n=t instanceof i;this.objectMode=!!e.objectMode;if(n)this.objectMode=this.objectMode||!!e.writableObjectMode;this.highWaterMark=l(this,e,"writableHighWaterMark",n);this.finalCalled=false;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;this.destroyed=false;var a=e.decodeStrings===false;this.decodeStrings=!a;this.defaultEncoding=e.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(e){onwrite(t,e)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.emitClose=e.emitClose!==false;this.autoDestroy=!!e.autoDestroy;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function getBuffer(){var e=this.bufferedRequest;var t=[];while(e){t.push(e);e=e.next}return t};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:n.deprecate(function writableStateBufferGetter(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}})();var S;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function"){S=Function.prototype[Symbol.hasInstance];Object.defineProperty(Writable,Symbol.hasInstance,{value:function value(e){if(S.call(this,e))return true;if(this!==Writable)return false;return e&&e._writableState instanceof WritableState}})}else{S=function realHasInstance(e){return e instanceof this}}function Writable(e){i=i||r(1052);var t=this instanceof i;if(!t&&!S.call(Writable,this))return new Writable(e);this._writableState=new WritableState(e,this,t);this.writable=true;if(e){if(typeof e.write==="function")this._write=e.write;if(typeof e.writev==="function")this._writev=e.writev;if(typeof e.destroy==="function")this._destroy=e.destroy;if(typeof e.final==="function")this._final=e.final}a.call(this)}Writable.prototype.pipe=function(){w(this,new v)};function writeAfterEnd(e,t){var r=new g;w(e,r);process.nextTick(t,r)}function validChunk(e,t,r,i){var n;if(r===null){n=new m}else if(typeof r!=="string"&&!t.objectMode){n=new h("chunk",["string","Buffer"],r)}if(n){w(e,n);process.nextTick(i,n);return false}return true}Writable.prototype.write=function(e,t,r){var i=this._writableState;var n=false;var a=!i.objectMode&&_isUint8Array(e);if(a&&!s.isBuffer(e)){e=_uint8ArrayToBuffer(e)}if(typeof t==="function"){r=t;t=null}if(a)t="buffer";else if(!t)t=i.defaultEncoding;if(typeof r!=="function")r=nop;if(i.ending)writeAfterEnd(this,r);else if(a||validChunk(this,i,e,r)){i.pendingcb++;n=writeOrBuffer(this,i,a,e,t,r)}return n};Writable.prototype.cork=function(){this._writableState.corked++};Writable.prototype.uncork=function(){var e=this._writableState;if(e.corked){e.corked--;if(!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest)clearBuffer(this,e)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(e){if(typeof e==="string")e=e.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);this._writableState.defaultEncoding=e;return this};Object.defineProperty(Writable.prototype,"writableBuffer",{enumerable:false,get:function get(){return this._writableState&&this._writableState.getBuffer()}});function decodeChunk(e,t,r){if(!e.objectMode&&e.decodeStrings!==false&&typeof t==="string"){t=s.from(t,r)}return t}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:false,get:function get(){return this._writableState.highWaterMark}});function writeOrBuffer(e,t,r,i,n,a){if(!r){var s=decodeChunk(t,i,n);if(i!==s){r=true;n="buffer";i=s}}var o=t.objectMode?1:i.length;t.length+=o;var f=t.length<t.highWaterMark;if(!f)t.needDrain=true;if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null};if(u){u.next=t.lastBufferedRequest}else{t.bufferedRequest=t.lastBufferedRequest}t.bufferedRequestCount+=1}else{doWrite(e,t,false,o,i,n,a)}return f}function doWrite(e,t,r,i,n,a,s){t.writelen=i;t.writecb=s;t.writing=true;t.sync=true;if(t.destroyed)t.onwrite(new y("write"));else if(r)e._writev(n,t.onwrite);else e._write(n,a,t.onwrite);t.sync=false}function onwriteError(e,t,r,i,n){--t.pendingcb;if(r){process.nextTick(n,i);process.nextTick(finishMaybe,e,t);e._writableState.errorEmitted=true;w(e,i)}else{n(i);e._writableState.errorEmitted=true;w(e,i);finishMaybe(e,t)}}function onwriteStateUpdate(e){e.writing=false;e.writecb=null;e.length-=e.writelen;e.writelen=0}function onwrite(e,t){var r=e._writableState;var i=r.sync;var n=r.writecb;if(typeof n!=="function")throw new p;onwriteStateUpdate(r);if(t)onwriteError(e,r,i,t,n);else{var a=needFinish(r)||e.destroyed;if(!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest){clearBuffer(e,r)}if(i){process.nextTick(afterWrite,e,r,a,n)}else{afterWrite(e,r,a,n)}}}function afterWrite(e,t,r,i){if(!r)onwriteDrain(e,t);t.pendingcb--;i();finishMaybe(e,t)}function onwriteDrain(e,t){if(t.length===0&&t.needDrain){t.needDrain=false;e.emit("drain")}}function clearBuffer(e,t){t.bufferProcessing=true;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount;var n=new Array(i);var a=t.corkedRequestsFree;a.entry=r;var s=0;var o=true;while(r){n[s]=r;if(!r.isBuf)o=false;r=r.next;s+=1}n.allBuffers=o;doWrite(e,t,true,t.length,n,"",a.finish);t.pendingcb++;t.lastBufferedRequest=null;if(a.next){t.corkedRequestsFree=a.next;a.next=null}else{t.corkedRequestsFree=new CorkedRequest(t)}t.bufferedRequestCount=0}else{while(r){var f=r.chunk;var u=r.encoding;var l=r.callback;var d=t.objectMode?1:f.length;doWrite(e,t,false,d,f,u,l);r=r.next;t.bufferedRequestCount--;if(t.writing){break}}if(r===null)t.lastBufferedRequest=null}t.bufferedRequest=r;t.bufferProcessing=false}Writable.prototype._write=function(e,t,r){r(new c("_write()"))};Writable.prototype._writev=null;Writable.prototype.end=function(e,t,r){var i=this._writableState;if(typeof e==="function"){r=e;e=null;t=null}else if(typeof t==="function"){r=t;t=null}if(e!==null&&e!==undefined)this.write(e,t);if(i.corked){i.corked=1;this.uncork()}if(!i.ending)endWritable(this,i,r);return this};Object.defineProperty(Writable.prototype,"writableLength",{enumerable:false,get:function get(){return this._writableState.length}});function needFinish(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function callFinal(e,t){e._final(function(r){t.pendingcb--;if(r){w(e,r)}t.prefinished=true;e.emit("prefinish");finishMaybe(e,t)})}function prefinish(e,t){if(!t.prefinished&&!t.finalCalled){if(typeof e._final==="function"&&!t.destroyed){t.pendingcb++;t.finalCalled=true;process.nextTick(callFinal,e,t)}else{t.prefinished=true;e.emit("prefinish")}}}function finishMaybe(e,t){var r=needFinish(t);if(r){prefinish(e,t);if(t.pendingcb===0){t.finished=true;e.emit("finish");if(t.autoDestroy){var i=e._readableState;if(!i||i.autoDestroy&&i.endEmitted){e.destroy()}}}}return r}function endWritable(e,t,r){t.ending=true;finishMaybe(e,t);if(r){if(t.finished)process.nextTick(r);else e.once("finish",r)}t.ended=true;e.writable=false}function onCorkedFinish(e,t,r){var i=e.entry;e.entry=null;while(i){var n=i.callback;t.pendingcb--;n(r);i=i.next}t.corkedRequestsFree.next=e}Object.defineProperty(Writable.prototype,"destroyed",{enumerable:false,get:function get(){if(this._writableState===undefined){return false}return this._writableState.destroyed},set:function set(e){if(!this._writableState){return}this._writableState.destroyed=e}});Writable.prototype.destroy=f.destroy;Writable.prototype._undestroy=f.undestroy;Writable.prototype._destroy=function(e,t){t(e)}},5049:(e,t,r)=>{"use strict";var i;function _defineProperty(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}var n=r(3842);var a=Symbol("lastResolve");var s=Symbol("lastReject");var o=Symbol("error");var f=Symbol("ended");var u=Symbol("lastPromise");var l=Symbol("handlePromise");var d=Symbol("stream");function createIterResult(e,t){return{value:e,done:t}}function readAndResolve(e){var t=e[a];if(t!==null){var r=e[d].read();if(r!==null){e[u]=null;e[a]=null;e[s]=null;t(createIterResult(r,false))}}}function onReadable(e){process.nextTick(readAndResolve,e)}function wrapForNext(e,t){return function(r,i){e.then(function(){if(t[f]){r(createIterResult(undefined,true));return}t[l](r,i)},i)}}var h=Object.getPrototypeOf(function(){});var c=Object.setPrototypeOf((i={get stream(){return this[d]},next:function next(){var e=this;var t=this[o];if(t!==null){return Promise.reject(t)}if(this[f]){return Promise.resolve(createIterResult(undefined,true))}if(this[d].destroyed){return new Promise(function(t,r){process.nextTick(function(){if(e[o]){r(e[o])}else{t(createIterResult(undefined,true))}})})}var r=this[u];var i;if(r){i=new Promise(wrapForNext(r,this))}else{var n=this[d].read();if(n!==null){return Promise.resolve(createIterResult(n,false))}i=new Promise(this[l])}this[u]=i;return i}},_defineProperty(i,Symbol.asyncIterator,function(){return this}),_defineProperty(i,"return",function _return(){var e=this;return new Promise(function(t,r){e[d].destroy(null,function(e){if(e){r(e);return}t(createIterResult(undefined,true))})})}),i),h);var p=function createReadableStreamAsyncIterator(e){var t;var r=Object.create(c,(t={},_defineProperty(t,d,{value:e,writable:true}),_defineProperty(t,a,{value:null,writable:true}),_defineProperty(t,s,{value:null,writable:true}),_defineProperty(t,o,{value:null,writable:true}),_defineProperty(t,f,{value:e._readableState.endEmitted,writable:true}),_defineProperty(t,l,{value:function value(e,t){var i=r[d].read();if(i){r[u]=null;r[a]=null;r[s]=null;e(createIterResult(i,false))}else{r[a]=e;r[s]=t}},writable:true}),t));r[u]=null;n(e,function(e){if(e&&e.code!=="ERR_STREAM_PREMATURE_CLOSE"){var t=r[s];if(t!==null){r[u]=null;r[a]=null;r[s]=null;t(e)}r[o]=e;return}var i=r[a];if(i!==null){r[u]=null;r[a]=null;r[s]=null;i(createIterResult(undefined,true))}r[f]=true});e.on("readable",onReadable.bind(null,r));return r};e.exports=p},2795:(e,t,r)=>{"use strict";function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);if(t)i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable});r.push.apply(r,i)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};if(t%2){ownKeys(Object(r),true).forEach(function(t){_defineProperty(e,t,r[t])})}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(e,Object.getOwnPropertyDescriptors(r))}else{ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}}return e}function _defineProperty(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}function _classCallCheck(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}function _createClass(e,t,r){if(t)_defineProperties(e.prototype,t);if(r)_defineProperties(e,r);return e}var i=r(4293),n=i.Buffer;var a=r(1669),s=a.inspect;var o=s&&s.custom||"inspect";function copyBuffer(e,t,r){n.prototype.copy.call(e,t,r)}e.exports=function(){function BufferList(){_classCallCheck(this,BufferList);this.head=null;this.tail=null;this.length=0}_createClass(BufferList,[{key:"push",value:function push(e){var t={data:e,next:null};if(this.length>0)this.tail.next=t;else this.head=t;this.tail=t;++this.length}},{key:"unshift",value:function unshift(e){var t={data:e,next:this.head};if(this.length===0)this.tail=t;this.head=t;++this.length}},{key:"shift",value:function shift(){if(this.length===0)return;var e=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return e}},{key:"clear",value:function clear(){this.head=this.tail=null;this.length=0}},{key:"join",value:function join(e){if(this.length===0)return"";var t=this.head;var r=""+t.data;while(t=t.next){r+=e+t.data}return r}},{key:"concat",value:function concat(e){if(this.length===0)return n.alloc(0);var t=n.allocUnsafe(e>>>0);var r=this.head;var i=0;while(r){copyBuffer(r.data,t,i);i+=r.data.length;r=r.next}return t}},{key:"consume",value:function consume(e,t){var r;if(e<this.head.data.length){r=this.head.data.slice(0,e);this.head.data=this.head.data.slice(e)}else if(e===this.head.data.length){r=this.shift()}else{r=t?this._getString(e):this._getBuffer(e)}return r}},{key:"first",value:function first(){return this.head.data}},{key:"_getString",value:function _getString(e){var t=this.head;var r=1;var i=t.data;e-=i.length;while(t=t.next){var n=t.data;var a=e>n.length?n.length:e;if(a===n.length)i+=n;else i+=n.slice(0,e);e-=a;if(e===0){if(a===n.length){++r;if(t.next)this.head=t.next;else this.head=this.tail=null}else{this.head=t;t.data=n.slice(a)}break}++r}this.length-=r;return i}},{key:"_getBuffer",value:function _getBuffer(e){var t=n.allocUnsafe(e);var r=this.head;var i=1;r.data.copy(t);e-=r.data.length;while(r=r.next){var a=r.data;var s=e>a.length?a.length:e;a.copy(t,t.length-e,0,s);e-=s;if(e===0){if(s===a.length){++i;if(r.next)this.head=r.next;else this.head=this.tail=null}else{this.head=r;r.data=a.slice(s)}break}++i}this.length-=i;return t}},{key:o,value:function value(e,t){return s(this,_objectSpread({},t,{depth:0,customInspect:false}))}}]);return BufferList}()},5324:e=>{"use strict";function destroy(e,t){var r=this;var i=this._readableState&&this._readableState.destroyed;var n=this._writableState&&this._writableState.destroyed;if(i||n){if(t){t(e)}else if(e){if(!this._writableState){process.nextTick(emitErrorNT,this,e)}else if(!this._writableState.errorEmitted){this._writableState.errorEmitted=true;process.nextTick(emitErrorNT,this,e)}}return this}if(this._readableState){this._readableState.destroyed=true}if(this._writableState){this._writableState.destroyed=true}this._destroy(e||null,function(e){if(!t&&e){if(!r._writableState){process.nextTick(emitErrorAndCloseNT,r,e)}else if(!r._writableState.errorEmitted){r._writableState.errorEmitted=true;process.nextTick(emitErrorAndCloseNT,r,e)}else{process.nextTick(emitCloseNT,r)}}else if(t){process.nextTick(emitCloseNT,r);t(e)}else{process.nextTick(emitCloseNT,r)}});return this}function emitErrorAndCloseNT(e,t){emitErrorNT(e,t);emitCloseNT(e)}function emitCloseNT(e){if(e._writableState&&!e._writableState.emitClose)return;if(e._readableState&&!e._readableState.emitClose)return;e.emit("close")}function undestroy(){if(this._readableState){this._readableState.destroyed=false;this._readableState.reading=false;this._readableState.ended=false;this._readableState.endEmitted=false}if(this._writableState){this._writableState.destroyed=false;this._writableState.ended=false;this._writableState.ending=false;this._writableState.finalCalled=false;this._writableState.prefinished=false;this._writableState.finished=false;this._writableState.errorEmitted=false}}function emitErrorNT(e,t){e.emit("error",t)}function errorOrDestroy(e,t){var r=e._readableState;var i=e._writableState;if(r&&r.autoDestroy||i&&i.autoDestroy)e.destroy(t);else e.emit("error",t)}e.exports={destroy:destroy,undestroy:undestroy,errorOrDestroy:errorOrDestroy}},3842:(e,t,r)=>{"use strict";var i=r(1758).q.ERR_STREAM_PREMATURE_CLOSE;function once(e){var t=false;return function(){if(t)return;t=true;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++){i[n]=arguments[n]}e.apply(this,i)}}function noop(){}function isRequest(e){return e.setHeader&&typeof e.abort==="function"}function eos(e,t,r){if(typeof t==="function")return eos(e,null,t);if(!t)t={};r=once(r||noop);var n=t.readable||t.readable!==false&&e.readable;var a=t.writable||t.writable!==false&&e.writable;var s=function onlegacyfinish(){if(!e.writable)f()};var o=e._writableState&&e._writableState.finished;var f=function onfinish(){a=false;o=true;if(!n)r.call(e)};var u=e._readableState&&e._readableState.endEmitted;var l=function onend(){n=false;u=true;if(!a)r.call(e)};var d=function onerror(t){r.call(e,t)};var h=function onclose(){var t;if(n&&!u){if(!e._readableState||!e._readableState.ended)t=new i;return r.call(e,t)}if(a&&!o){if(!e._writableState||!e._writableState.ended)t=new i;return r.call(e,t)}};var c=function onrequest(){e.req.on("finish",f)};if(isRequest(e)){e.on("complete",f);e.on("abort",h);if(e.req)c();else e.on("request",c)}else if(a&&!e._writableState){e.on("end",s);e.on("close",s)}e.on("end",l);e.on("finish",f);if(t.error!==false)e.on("error",d);e.on("close",h);return function(){e.removeListener("complete",f);e.removeListener("abort",h);e.removeListener("request",c);if(e.req)e.req.removeListener("finish",f);e.removeListener("end",s);e.removeListener("close",s);e.removeListener("finish",f);e.removeListener("end",l);e.removeListener("error",d);e.removeListener("close",h)}}e.exports=eos},6829:(e,t,r)=>{"use strict";function asyncGeneratorStep(e,t,r,i,n,a,s){try{var o=e[a](s);var f=o.value}catch(e){r(e);return}if(o.done){t(f)}else{Promise.resolve(f).then(i,n)}}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise(function(i,n){var a=e.apply(t,r);function _next(e){asyncGeneratorStep(a,i,n,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(a,i,n,_next,_throw,"throw",e)}_next(undefined)})}}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);if(t)i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable});r.push.apply(r,i)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};if(t%2){ownKeys(Object(r),true).forEach(function(t){_defineProperty(e,t,r[t])})}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(e,Object.getOwnPropertyDescriptors(r))}else{ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}}return e}function _defineProperty(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}var i=r(1758).q.ERR_INVALID_ARG_TYPE;function from(e,t,r){var n;if(t&&typeof t.next==="function"){n=t}else if(t&&t[Symbol.asyncIterator])n=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])n=t[Symbol.iterator]();else throw new i("iterable",["Iterable"],t);var a=new e(_objectSpread({objectMode:true},r));var s=false;a._read=function(){if(!s){s=true;next()}};function next(){return _next2.apply(this,arguments)}function _next2(){_next2=_asyncToGenerator(function*(){try{var e=yield n.next(),t=e.value,r=e.done;if(r){a.push(null)}else if(a.push(yield t)){next()}else{s=false}}catch(e){a.destroy(e)}});return _next2.apply(this,arguments)}return a}e.exports=from},2278:(e,t,r)=>{"use strict";var i;function once(e){var t=false;return function(){if(t)return;t=true;e.apply(void 0,arguments)}}var n=r(1758).q,a=n.ERR_MISSING_ARGS,s=n.ERR_STREAM_DESTROYED;function noop(e){if(e)throw e}function isRequest(e){return e.setHeader&&typeof e.abort==="function"}function destroyer(e,t,n,a){a=once(a);var o=false;e.on("close",function(){o=true});if(i===undefined)i=r(3842);i(e,{readable:t,writable:n},function(e){if(e)return a(e);o=true;a()});var f=false;return function(t){if(o)return;if(f)return;f=true;if(isRequest(e))return e.abort();if(typeof e.destroy==="function")return e.destroy();a(t||new s("pipe"))}}function call(e){e()}function pipe(e,t){return e.pipe(t)}function popCallback(e){if(!e.length)return noop;if(typeof e[e.length-1]!=="function")return noop;return e.pop()}function pipeline(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}var i=popCallback(t);if(Array.isArray(t[0]))t=t[0];if(t.length<2){throw new a("streams")}var n;var s=t.map(function(e,r){var a=r<t.length-1;var o=r>0;return destroyer(e,a,o,function(e){if(!n)n=e;if(e)s.forEach(call);if(a)return;s.forEach(call);i(n)})});return t.reduce(pipe)}e.exports=pipeline},2863:(e,t,r)=>{"use strict";var i=r(1758).q.ERR_INVALID_OPT_VALUE;function highWaterMarkFrom(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function getHighWaterMark(e,t,r,n){var a=highWaterMarkFrom(t,n,r);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var s=n?r:"highWaterMark";throw new i(s,a)}return Math.floor(a)}return e.objectMode?16:16*1024}e.exports={getHighWaterMark:getHighWaterMark}},6699:(e,t,r)=>{e.exports=r(2413)},8740:(e,t,r)=>{var i=r(2413);if(process.env.READABLE_STREAM==="disable"&&i){e.exports=i.Readable;Object.assign(e.exports,i);e.exports.Stream=i}else{t=e.exports=r(28);t.Stream=i||t;t.Readable=t;t.Writable=r(2874);t.Duplex=r(1052);t.Transform=r(5958);t.PassThrough=r(9915);t.finished=r(3842);t.pipeline=r(2278)}},3309:(e,t,r)=>{"use strict";var i=t;i.handle=r(4070);i.request=r(8568);i.response=r(592);i.Socket=r(696);i.agent=r(3090);i.Agent=i.agent.Agent;i.createAgent=i.agent.create;i.server=r(4834);i.Server=i.server.Server;i.PlainServer=i.server.PlainServer;i.createServer=i.server.create},3090:(e,t,r)=>{"use strict";var i=r(2357);var n=r(8605);var a=r(7211);var s=r(1631);var o=r(1669);var f=r(1590);var u=r(1492)("spdy:client");Object.assign=process.versions.modules>=46?Object.assign:o._extend;var l=r(8614).EventEmitter;var d=r(3309);var h=/^v0\.8\./.test(process.version)?"rusty":/^v0\.(9|10)\./.test(process.version)?"old":/^v0\.12\./.test(process.version)?"normal":"modern";var c={};function instantiate(e){function Agent(t){this._init(e,t)}o.inherits(Agent,e);Agent.create=function create(e){return new Agent(e)};Object.keys(c).forEach(function(e){Agent.prototype[e]=c[e]});return Agent}c._init=function _init(e,t){e.call(this,t);var r={};this._spdyState=r;r.host=t.host;r.options=t.spdy||{};r.secure=this instanceof a.Agent;r.fallback=false;r.createSocket=this._getCreateSocket();r.socket=null;r.connection=null;this.keepAlive=false;var i=this;this._connect(t,function(e,t){if(e){return i.emit("error",e)}r.connection=t;i.emit("_connect")})};c._getCreateSocket=function _getCreateSocket(){var e;var t=this.constructor.super_;do{e=t.prototype.createSocket;if(t.super_===l||!t.super_){break}t=t.super_}while(!e);if(!e){e=n.Agent.prototype.createSocket}i(e,".createSocket() method not found");return e};c._connect=function _connect(e,t){var r=this;var i=this._spdyState;var n=i.options.protocols||["h2","spdy/3.1","spdy/3","spdy/2","http/1.1","http/1.0"];var a=this.createConnection(Object.assign({NPNProtocols:n,ALPNProtocols:n,servername:e.servername||e.host},e));i.socket=a;a.setNoDelay(true);function onError(e){return t(e)}a.on("error",onError);a.on(i.secure?"secureConnect":"connect",function(){a.removeListener("error",onError);var e;if(i.secure){e=a.npnProtocol||a.alpnProtocol||i.options.protocol}else{e=i.options.protocol}if(!e||e==="http/1.1"||e==="http/1.0"){u("activating fallback");a.destroy();i.fallback=true;return}u("connected protocol=%j",e);var n=f.connection.create(a,Object.assign({protocol:/spdy/.test(e)?"spdy":"http2",isServer:false},i.options.connection||{}));n.on("error",function(e){r.emit("error",e)});if(e==="h2"){n.start(4)}else if(e==="spdy/3.1"){n.start(3.1)}else if(e==="spdy/3"){n.start(3)}else if(e==="spdy/2"){n.start(2)}else{a.destroy();t(new Error("Unexpected protocol: "+e));return}if(i.options["x-forwarded-for"]!==undefined){n.sendXForwardedFor(i.options["x-forwarded-for"])}t(null,n)})};c._createSocket=function _createSocket(e,t,r){var i=this._spdyState;if(i.fallback){return i.createSocket(e,t)}var n=d.handle.create(null,null,i.socket);var a={handle:n,allowHalfOpen:true};var o;if(i.secure){o=new d.Socket(i.socket,a)}else{o=new s.Socket(a)}n.assignSocket(o);n.assignClientRequest(e);var f=this;n.once("needStream",function(){if(i.connection===null){f.once("_connect",function(){n.setStream(f._createStream(e,n))})}else{n.setStream(f._createStream(e,n))}});e.on("response",function(e){n.assignRequest(e)});n.assignResponse(e);e.addListener("newListener",d.request.onNewListener);o.readable=true;o.writable=true;if(r){return r(null,o)}return o};if(h==="modern"||h==="normal"){c.createSocket=c._createSocket}else{c.createSocket=function createSocket(e,t,r,i,n){var a=this._spdyState;if(a.fallback){return a.createSocket(e,t,r,i,n)}return this._createSocket(n,{host:t,port:r})}}c._createStream=function _createStream(e,t){var r=this._spdyState;var i=this;return r.connection.reserveStream({method:e.method,path:e.path,headers:e._headers,host:r.host},function(e,r){if(e){return i.emit("error",e)}r.on("response",function(e,r){t.emitResponse(e,r)})})};c.close=function close(e){var t=this._spdyState;if(t.connection===null){this.once("_connect",function(){this.close(e)});return}t.connection.end(e)};t.Agent=instantiate(a.Agent);t.PlainAgent=instantiate(n.Agent);t.create=function create(e,r){if(typeof e==="object"){r=e;e=null}if(e){return instantiate(e).create(r)}if(r.spdy&&r.spdy.plain){return t.PlainAgent.create(r)}else{return t.Agent.create(r)}}},4070:(e,t,r)=>{"use strict";var i=r(2357);var n=r(8207);var a=r(9698);var s=r(1669);function Handle(e,t,r){var i={};this._spdyState=i;i.options=e||{};i.stream=t;i.socket=null;i.rawSocket=r||t.connection.socket;i.deceiver=null;i.ending=false;var a=this;n.call(this,t,{getPeerName:function(){return a._getPeerName()},close:function(e){return a._closeCallback(e)}});if(!i.stream){this.on("stream",function(e){i.stream=e})}}s.inherits(Handle,n);e.exports=Handle;Handle.create=function create(e,t,r){return new Handle(e,t,r)};Handle.prototype._getPeerName=function _getPeerName(){var e=this._spdyState;if(e.rawSocket._getpeername){return e.rawSocket._getpeername()}return null};Handle.prototype._closeCallback=function _closeCallback(e){var t=this._spdyState;var r=t.stream;if(t.ending){if(r._writableState.finished){setImmediate(e)}else if(r._writableState.ending){r.once("finish",function(){e(null)})}else{r.end(e)}}else{r.abort(e)}t.ending=false};Handle.prototype.getStream=function getStream(e){var t=this._spdyState;if(!e){i(t.stream);return t.stream}if(t.stream){process.nextTick(function(){e(t.stream)});return}this.on("stream",e)};Handle.prototype.assignSocket=function assignSocket(e,t){var r=this._spdyState;r.socket=e;r.deceiver=a.create(e,t);function onStreamError(e){r.socket.emit("error",e)}this.getStream(function(e){e.on("error",onStreamError)})};Handle.prototype.assignClientRequest=function assignClientRequest(e){var t=this._spdyState;var r=e.end;var i=e._send;var a=this;if(n.mode!=="modern"){e.end=function end(){this.end=r;this._send("");return this.end.apply(this,arguments)}}e._send=function send(r){this._headerSent=true;this._header="ignore me";this.connection=t.socket;a.getStream(function(e){if(!e.connection._isGoaway(e.id)){e.send()}});a.emit("needStream");if(t.stream&&t.stream.connection._isGoaway(t.stream.id)){return}e._send=i;if(e.method==="GET"&&r.length===0){return}return e._send.apply(this,arguments)};e.useChunkedEncodingByDefault=false;e.on("finish",function(){e.socket.end()})};Handle.prototype.assignRequest=function assignRequest(e){this.getStream(function(t){t.on("headers",function(t){e.emit("trailers",t)})})};Handle.prototype.assignResponse=function assignResponse(e){var t=this;e.addTrailers=function addTrailers(e){t.getStream(function(t){t.sendHeaders(e)})}};Handle.prototype._transformHeaders=function _transformHeaders(e,t){var r=this._spdyState;var i={};var n=Object.keys(t);if(e==="request"&&r.options["x-forwarded-for"]){var a=r.stream.connection.getXForwardedFor();if(a!==null){i["x-forwarded-for"]=a}}for(var s=0;s<n.length;s++){var o=n[s];var f=t[o];if(o===":authority"){i.host=f}if(/^:/.test(o)){continue}i[o]=f}return i};Handle.prototype.emitRequest=function emitRequest(){var e=this._spdyState;var t=e.stream;e.deceiver.emitRequest({method:t.method,path:t.path,headers:this._transformHeaders("request",t.headers)})};Handle.prototype.emitResponse=function emitResponse(e,t){var r=this._spdyState;r.deceiver.emitResponse({status:e,headers:this._transformHeaders("response",t)})}},8568:(e,t)=>{"use strict";function attachPush(e){var t=e.socket._handle;t.getStream(function(t){t.on("pushPromise",function(t){e.emit("push",t)})})}t.onNewListener=function onNewListener(e){var t=this;if(e!=="push"){return}if(t.listeners("push").length!==0){return}if(!t.socket){t.on("socket",function(){attachPush(t)});return}attachPush(t)}},592:(e,t)=>{"use strict";t.writeHead=function writeHead(e,t,r){var i;if(typeof t==="string"){this.statusMessage=t}else{this.statusMessage=this.statusMessage||"unknown";r=t}this.statusCode=e;if(this._headers){if(r){var n=Object.keys(r);for(var a=0;a<n.length;a++){var s=n[a];if(s)this.setHeader(s,r[s])}}i=this._renderHeaders()}else{i=r}if(e===204||e===304||e>=100&&e<=199){this._hasBody=false}if(this._expect_continue&&!this._sent100){this.shouldKeepAlive=false}this._header=true;this._headerSent=true;if(this.socket._handle){this.socket._handle._spdyState.stream.respond(this.statusCode,i)}};t.end=function end(e,t,r){if(!this._headerSent){this.writeHead(this.statusCode)}if(!this.socket._handle){return}this.finished=true;var i=this;var n=this.socket._handle;n._spdyState.ending=true;this.socket.end(e,t,function(){i.constructor.prototype.end.call(i,"","utf8",r)})};t.push=function push(e,t,r){var i={path:e,method:t.method?t.method.toString():"GET",status:t.status?parseInt(t.status,10):200,host:this._req.headers.host,headers:t.request,response:t.response};var n=this.spdyStream;return n.pushPromise(i,r)};t.writeContinue=function writeContinue(e){if(this.socket._handle){this.socket._handle._spdyState.stream.respond(100,{},e)}}},4834:(e,t,r)=>{"use strict";var i=r(2357);var n=r(7211);var a=r(8605);var s=r(4016);var o=r(1631);var f=r(1669);var u=r(5435);var l=r(1590);var d=r(1492)("spdy:server");var h=r(8614).EventEmitter;Object.assign=process.versions.modules>=46?Object.assign:f._extend;var c=r(3309);var p={};function instantiate(e){function Server(t,r){this._init(e,t,r)}f.inherits(Server,e);Server.create=function create(e,t){return new Server(e,t)};Object.keys(p).forEach(function(e){Server.prototype[e]=p[e]});return Server}p._init=function _init(e,t,r){var n={};this._spdyState=n;n.options=t.spdy||{};var a=n.options.protocols||["h2","spdy/3.1","spdy/3","spdy/2","http/1.1","http/1.0"];var o=Object.assign({NPNProtocols:a,ALPNProtocols:a},t);n.secure=this instanceof s.Server;if(n.secure){e.call(this,o)}else{e.call(this)}this.httpAllowHalfOpen=true;var f=n.secure?"secureConnection":"connection";n.listeners=this.listeners(f).slice();i(n.listeners.length>0,"Server does not have default listeners");this.removeAllListeners(f);if(n.options.plain){this.on(f,this._onPlainConnection)}else{this.on(f,this._onConnection)}if(r){this.on("request",r)}d("server init secure=%d",n.secure)};p._onConnection=function _onConnection(e){var t=this._spdyState;var r;if(t.secure){r=e.npnProtocol||e.alpnProtocol}this._handleConnection(e,r)};p._handleConnection=function _handleConnection(e,t){var r=this._spdyState;if(!t){t=r.options.protocol}d("incoming socket protocol=%j",t);if(!t||t==="http/1.1"||t==="http/1.0"){d("to default handler it goes");return this._invokeDefault(e)}e.setNoDelay(true);var i=l.connection.create(e,Object.assign({protocol:/spdy/.test(t)?"spdy":"http2",isServer:true},r.options.connection||{}));if(t==="http2"){i.start(4)}else if(t==="spdy/3.1"){i.start(3.1)}else if(t==="spdy/3"){i.start(3)}else if(t==="spdy/2"){i.start(2)}i.on("error",function(){e.destroy()});var n=this;i.on("stream",function(e){n._onStream(e)})};var v="PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n";var y=Buffer.from(v);function hoseFilter(e,t){if(e.length<1){return t(null,null)}if(e[0]===128){return t(null,"spdy")}var r=Math.min(e.length,y.length);for(var i=0;i<r;i++){if(e[i]!==y[i]){return t(null,"http/1.1")}}if(r!==y.length){return t(null,null)}return t(null,"h2")}p._onPlainConnection=function _onPlainConnection(e){var t=u.create(e,{},hoseFilter);var r=this;t.on("select",function(e,t){r._handleConnection(t,e)});t.on("error",function(t){d("hose error %j",t.message);e.destroy()})};p._invokeDefault=function _invokeDefault(e){var t=this._spdyState;for(var r=0;r<t.listeners.length;r++){t.listeners[r].call(this,e)}};p._onStream=function _onStream(e){var t=this._spdyState;var r=c.handle.create(this._spdyState.options,e);var i={handle:r,allowHalfOpen:true};var n;if(t.secure){n=new c.Socket(e.connection.socket,i)}else{n=new o.Socket(i)}if(process.versions.modules>=46){n.server=this}r.assignSocket(n);n.readable=true;n.writable=true;this._invokeDefault(n);if(process.versions.modules<46){this.listenerCount=h.listenerCount.bind(this)}if(e.headers.expect!==undefined&&/100-continue/i.test(e.headers.expect)&&this.listenerCount("checkContinue")===0){this.once("checkContinue",function(e,t){t.writeContinue();this.emit("request",e,t)})}r.emitRequest()};p.emit=function emit(e,t,r){if(e!=="request"&&e!=="checkContinue"){return h.prototype.emit.apply(this,arguments)}if(!(t.socket._handle instanceof c.handle)){d("not spdy req/res");t.isSpdy=false;t.spdyVersion=1;r.isSpdy=false;r.spdyVersion=1;return h.prototype.emit.apply(this,arguments)}var i=t.connection._handle;t.isSpdy=true;t.spdyVersion=i.getStream().connection.getVersion();r.isSpdy=true;r.spdyVersion=t.spdyVersion;t.spdyStream=i.getStream();d("override req/res");r.writeHead=c.response.writeHead;r.end=c.response.end;r.push=c.response.push;r.writeContinue=c.response.writeContinue;r.spdyStream=i.getStream();r._req=t;i.assignRequest(t);i.assignResponse(r);return h.prototype.emit.apply(this,arguments)};t.Server=instantiate(n.Server);t.PlainServer=instantiate(a.Server);t.create=function create(e,r,i){if(typeof e==="object"){i=r;r=e;e=null}if(e){return instantiate(e).create(r,i)}if(r.spdy&&r.spdy.plain){return t.PlainServer.create(r,i)}else{return t.Server.create(r,i)}}},696:(e,t,r)=>{"use strict";var i=r(1669);var n=r(1631);function Socket(e,t){n.Socket.call(this,t);var r={};this._spdyState=r;r.parent=e;this.servername=e.servername;this.npnProtocol=e.npnProtocol;this.alpnProtocol=e.alpnProtocol;this.authorized=e.authorized;this.authorizationError=e.authorizationError;this.encrypted=true;this.allowHalfOpen=true}i.inherits(Socket,n.Socket);e.exports=Socket;var a=["renegotiate","setMaxSendFragment","getTLSTicket","setServername","setSession","getPeerCertificate","getSession","isSessionReused","getCipher","getEphemeralKeyInfo"];a.forEach(function(e){Socket.prototype[e]=function methodWrap(){var t=this._spdyState.parent;return t[e].apply(t,arguments)}})},4841:(e,t,r)=>{"use strict";var i=r(1867).Buffer;var n=i.isEncoding||function(e){e=""+e;switch(e&&e.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 true;default:return false}};function _normalizeEncoding(e){if(!e)return"utf8";var t;while(true){switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase();t=true}}}function normalizeEncoding(e){var t=_normalizeEncoding(e);if(typeof t!=="string"&&(i.isEncoding===n||!n(e)))throw new Error("Unknown encoding: "+e);return t||e}t.s=StringDecoder;function StringDecoder(e){this.encoding=normalizeEncoding(e);var t;switch(this.encoding){case"utf16le":this.text=utf16Text;this.end=utf16End;t=4;break;case"utf8":this.fillLast=utf8FillLast;t=4;break;case"base64":this.text=base64Text;this.end=base64End;t=3;break;default:this.write=simpleWrite;this.end=simpleEnd;return}this.lastNeed=0;this.lastTotal=0;this.lastChar=i.allocUnsafe(t)}StringDecoder.prototype.write=function(e){if(e.length===0)return"";var t;var r;if(this.lastNeed){t=this.fillLast(e);if(t===undefined)return"";r=this.lastNeed;this.lastNeed=0}else{r=0}if(r<e.length)return t?t+this.text(e,r):this.text(e,r);return t||""};StringDecoder.prototype.end=utf8End;StringDecoder.prototype.text=utf8Text;StringDecoder.prototype.fillLast=function(e){if(this.lastNeed<=e.length){e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length);this.lastNeed-=e.length};function utf8CheckByte(e){if(e<=127)return 0;else if(e>>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function utf8CheckIncomplete(e,t,r){var i=t.length-1;if(i<r)return 0;var n=utf8CheckByte(t[i]);if(n>=0){if(n>0)e.lastNeed=n-1;return n}if(--i<r||n===-2)return 0;n=utf8CheckByte(t[i]);if(n>=0){if(n>0)e.lastNeed=n-2;return n}if(--i<r||n===-2)return 0;n=utf8CheckByte(t[i]);if(n>=0){if(n>0){if(n===2)n=0;else e.lastNeed=n-3}return n}return 0}function utf8CheckExtraBytes(e,t,r){if((t[0]&192)!==128){e.lastNeed=0;return"�"}if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128){e.lastNeed=1;return"�"}if(e.lastNeed>2&&t.length>2){if((t[2]&192)!==128){e.lastNeed=2;return"�"}}}}function utf8FillLast(e){var t=this.lastTotal-this.lastNeed;var r=utf8CheckExtraBytes(this,e,t);if(r!==undefined)return r;if(this.lastNeed<=e.length){e.copy(this.lastChar,t,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,t,0,e.length);this.lastNeed-=e.length}function utf8Text(e,t){var r=utf8CheckIncomplete(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);e.copy(this.lastChar,0,i);return e.toString("utf8",t,i)}function utf8End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+"�";return t}function utf16Text(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1];return r.slice(0,-1)}}return r}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=e[e.length-1];return e.toString("utf16le",t,e.length-1)}function utf16End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function base64Text(e,t){var r=(e.length-t)%3;if(r===0)return e.toString("base64",t);this.lastNeed=3-r;this.lastTotal=3;if(r===1){this.lastChar[0]=e[e.length-1]}else{this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1]}return e.toString("base64",t,e.length-r)}function base64End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+this.lastChar.toString("base64",0,3-this.lastNeed);return t}function simpleWrite(e){return e.toString(this.encoding)}function simpleEnd(e){return e&&e.length?this.write(e):""}},5278:(e,t,r)=>{e.exports=r(1669).deprecate},9364:(e,t,r)=>{var i=r(910);var n=r(4293).Buffer;function WBuf(){this.buffers=[];this.toReserve=0;this.size=0;this.maxSize=0;this.avail=0;this.last=null;this.offset=0;this.sliceQueue=null;this.forceReserve=false;this.reserveRate=64}e.exports=WBuf;WBuf.prototype.reserve=function reserve(e){this.toReserve+=e;if(this.forceReserve)this.toReserve=Math.max(this.toReserve,this.reserveRate)};WBuf.prototype._ensure=function _ensure(e){if(this.avail>=e)return;if(this.toReserve===0)this.toReserve=this.reserveRate;this.toReserve=Math.max(e-this.avail,this.toReserve);if(this.avail===0)this._next()};WBuf.prototype._next=function _next(){var e;if(this.sliceQueue===null){e=new n(this.toReserve)}else{e=this.sliceQueue.shift();if(this.sliceQueue.length===0)this.sliceQueue=null}this.toReserve=0;this.buffers.push(e);this.avail=e.length;this.offset=0;this.last=e};WBuf.prototype._rangeCheck=function _rangeCheck(){if(this.maxSize!==0&&this.size>this.maxSize)throw new RangeError("WBuf overflow")};WBuf.prototype._move=function _move(e){this.size+=e;if(this.avail===0)this.last=null;this._rangeCheck()};WBuf.prototype.slice=function slice(e,t){i(0<=e&&e<=this.size);i(0<=t&&t<=this.size);if(this.last===null)this._next();var r=new WBuf;if(e>=this.size-this.offset){r.buffers.push(this.last);r.last=this.last;r.offset=e-this.size+this.offset;r.maxSize=t-e;r.avail=r.maxSize;return r}var n=-1;var a=0;var s=-1;var o=0;for(var f=0;f<this.buffers.length;f++){var u=this.buffers[f];var l=o+u.length;if(e>=o&&e<=l){n=f;a=e-o;if(s!==-1)break}if(t>=o&&t<=l){s=f;if(n!==-1)break}o=l}r.last=this.buffers[n];r.offset=a;r.maxSize=t-e;if(n<s){r.sliceQueue=this.buffers.slice(n+1,s+1);r.last=r.last.slice(r.offset);r.offset=0}r.avail=r.last.length-r.offset;r.buffers.push(r.last);return r};WBuf.prototype.skip=function skip(e){if(e===0)return this.slice(this.size,this.size);this._ensure(e);var t=e;while(t>0){var r=Math.min(t,this.avail);t-=r;this.size+=r;if(r===this.avail){if(t!==0){this._next()}else{this.avail-=r;this.offset+=r}}else{this.offset+=r;this.avail-=r}}this._rangeCheck();return this.slice(this.size-e,this.size)};WBuf.prototype.write=function write(e){var t=0;for(var r=0;r<e.length;r++){var i=e.charCodeAt(r);if(i>255)t+=2;else t+=1}this.reserve(t);for(var r=0;r<e.length;r++){var i=e.charCodeAt(r);var n=i>>>8;var a=i&255;if(n)this.writeUInt8(n);this.writeUInt8(a)}};WBuf.prototype.copyFrom=function copyFrom(e,t,r){var i=t===undefined?0:t;var n=r===undefined?e.length:r;if(i===n)return;this._ensure(n-i);while(i<n){var a=Math.min(n-i,this.avail);e.copy(this.last,this.offset,i,i+a);i+=a;this.size+=a;if(a===this.avail){if(i!==n){this._next()}else{this.avail=0;this.offset+=a}}else{this.offset+=a;this.avail-=a}}this._rangeCheck()};WBuf.prototype.writeUInt8=function writeUInt8(e){this._ensure(1);this.last[this.offset++]=e;this.avail--;this._move(1)};WBuf.prototype.writeUInt16BE=function writeUInt16BE(e){this._ensure(2);if(this.avail>=2){this.last.writeUInt16BE(e,this.offset);this.offset+=2;this.avail-=2}else{this.last[this.offset]=e>>>8;this._next();this.last[this.offset++]=e&255;this.avail--}this._move(2)};WBuf.prototype.writeUInt24BE=function writeUInt24BE(e){this._ensure(3);if(this.avail>=3){this.last.writeUInt16BE(e>>>8,this.offset);this.last[this.offset+2]=e&255;this.offset+=3;this.avail-=3;this._move(3)}else if(this.avail>=2){this.last.writeUInt16BE(e>>>8,this.offset);this._next();this.last[this.offset++]=e&255;this.avail--;this._move(3)}else{this.last[this.offset]=e>>>16;this._move(1);this._next();this.writeUInt16BE(e&65535)}};WBuf.prototype.writeUInt32BE=function writeUInt32BE(e){this._ensure(4);if(this.avail>=4){this.last.writeUInt32BE(e,this.offset);this.offset+=4;this.avail-=4;this._move(4)}else if(this.avail>=3){this.writeUInt24BE(e>>>8);this._next();this.last[this.offset++]=e&255;this.avail--;this._move(1)}else{this.writeUInt16BE(e>>>16);this.writeUInt16BE(e&65535)}};WBuf.prototype.writeUInt16LE=function writeUInt16LE(e){var t=(e&255)<<8|e>>>8;this.writeUInt16BE(t)};WBuf.prototype.writeUInt24LE=function writeUInt24LE(e){var t=(e&255)<<16|(e>>>8&255)<<8|e>>>16;this.writeUInt24BE(t)};WBuf.prototype.writeUInt32LE=function writeUInt32LE(e){this._ensure(4);if(this.avail>=4){this.last.writeUInt32LE(e,this.offset);this.offset+=4;this.avail-=4;this._move(4)}else if(this.avail>=3){this.writeUInt24LE(e&16777215);this._next();this.last[this.offset++]=e>>>24;this.avail--;this._move(1)}else{this.writeUInt16LE(e&65535);this.writeUInt16LE(e>>>16)}};WBuf.prototype.render=function render(){var e=this.size;var t=[];for(var r=0;r<this.buffers.length&&e>=0;r++){var i=this.buffers[r];e-=i.length;if(e>=0){t.push(i)}else{t.push(i.slice(0,i.length+e))}}return t};WBuf.prototype.writeInt8=function writeInt8(e){if(e<0)return this.writeUInt8(256+e);else return this.writeUInt8(e)};function toUnsigned16(e){if(e<0)return 65536+e;else return e}WBuf.prototype.writeInt16LE=function writeInt16LE(e){this.writeUInt16LE(toUnsigned16(e))};WBuf.prototype.writeInt16BE=function writeInt16BE(e){this.writeUInt16BE(toUnsigned16(e))};function toUnsigned24(e){if(e<0)return 16777216+e;else return e}WBuf.prototype.writeInt24LE=function writeInt24LE(e){this.writeUInt24LE(toUnsigned24(e))};WBuf.prototype.writeInt24BE=function writeInt24BE(e){this.writeUInt24BE(toUnsigned24(e))};function toUnsigned32(e){if(e<0)return 4294967295+e+1;else return e}WBuf.prototype.writeInt32LE=function writeInt32LE(e){this.writeUInt32LE(toUnsigned32(e))};WBuf.prototype.writeInt32BE=function writeInt32BE(e){this.writeUInt32BE(toUnsigned32(e))};WBuf.prototype.writeComb=function writeComb(e,t,r){if(e===1)return this.writeUInt8(r);if(t==="le"){if(e===2)this.writeUInt16LE(r);else if(e===3)this.writeUInt24LE(r);else if(e===4)this.writeUInt32LE(r)}else{if(e===2)this.writeUInt16BE(r);else if(e===3)this.writeUInt24BE(r);else if(e===4)this.writeUInt32BE(r)}}},1492:e=>{"use strict";e.exports=require("@umijs/deps/compiled/debug")},2357:e=>{"use strict";e.exports=require("assert")},4293:e=>{"use strict";e.exports=require("buffer")},8614:e=>{"use strict";e.exports=require("events")},8605:e=>{"use strict";e.exports=require("http")},7211:e=>{"use strict";e.exports=require("https")},1631:e=>{"use strict";e.exports=require("net")},2413:e=>{"use strict";e.exports=require("stream")},4016:e=>{"use strict";e.exports=require("tls")},1669:e=>{"use strict";e.exports=require("util")},8761:e=>{"use strict";e.exports=require("zlib")}};var t={};function __nccwpck_require__(r){if(t[r]){return t[r].exports}var i=t[r]={exports:{}};var n=true;try{e[r](i,i.exports,__nccwpck_require__);n=false}finally{if(n)delete t[r]}return i.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(3309)})();