New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

it-length-prefixed

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

it-length-prefixed - npm Package Compare versions

Comparing version 3.1.0 to 4.0.0

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# [4.0.0](https://github.com/alanshaw/it-length-prefixed/compare/v3.1.0...v4.0.0) (2021-04-01)
<a name="3.1.0"></a>

@@ -2,0 +6,0 @@ # [3.1.0](https://github.com/alanshaw/it-length-prefixed/compare/v3.0.1...v3.1.0) (2020-07-27)

@@ -1,2 +0,10 @@

/*! For license information please see index.min.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ItLengthPrefixed=e():t.ItLengthPrefixed=e()}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=5)}([function(t,e,r){"use strict";(function(t){var n=r(9),o=r(10),i=r(11);function u(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function f(t,e){if(u()<e)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=s.prototype:(null===t&&(t=new s(e)),t.length=e),t}function s(t,e,r){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return h(this,t,e,r)}function h(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);s.TYPED_ARRAY_SUPPORT?(t=e).__proto__=s.prototype:t=l(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!s.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|g(e,r),o=(t=f(t,n)).write(e,r);o!==n&&(t=t.slice(0,o));return t}(t,e,r):function(t,e){if(s.isBuffer(e)){var r=0|p(e.length);return 0===(t=f(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?f(t,0):l(t,e);if("Buffer"===e.type&&i(e.data))return l(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function a(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t,e){if(a(e),t=f(t,e<0?0:0|p(e)),!s.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function l(t,e){var r=e.length<0?0:0|p(e.length);t=f(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function p(t){if(t>=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|t}function g(t,e){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return j(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(t).length;default:if(n)return j(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,e,r);case"utf8":case"utf-8":return S(this,e,r);case"ascii":return P(this,e,r);case"latin1":case"binary":return T(this,e,r);case"base64":return B(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function d(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function w(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,o);if("number"==typeof e)return e&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,o){var i,u=1,f=t.length,s=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;u=2,f/=2,s/=2,r/=2}function h(t,e){return 1===u?t[e]:t.readUInt16BE(e*u)}if(o){var a=-1;for(i=r;i<f;i++)if(h(t,i)===h(e,-1===a?0:i-a)){if(-1===a&&(a=i),i-a+1===s)return a*u}else-1!==a&&(i-=i-a),a=-1}else for(r+s>f&&(r=f-s),i=r;i>=0;i--){for(var c=!0,l=0;l<s;l++)if(h(t,i+l)!==h(e,l)){c=!1;break}if(c)return i}return-1}function v(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var u=0;u<n;++u){var f=parseInt(e.substr(2*u,2),16);if(isNaN(f))return u;t[r+u]=f}return u}function _(t,e,r,n){return z(j(e,t.length-r),t,r,n)}function E(t,e,r,n){return z(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function m(t,e,r,n){return E(t,e,r,n)}function A(t,e,r,n){return z(F(e),t,r,n)}function R(t,e,r,n){return z(function(t,e){for(var r,n,o,i=[],u=0;u<t.length&&!((e-=2)<0);++u)r=t.charCodeAt(u),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function B(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function S(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i,u,f,s,h=t[o],a=null,c=h>239?4:h>223?3:h>191?2:1;if(o+c<=r)switch(c){case 1:h<128&&(a=h);break;case 2:128==(192&(i=t[o+1]))&&(s=(31&h)<<6|63&i)>127&&(a=s);break;case 3:i=t[o+1],u=t[o+2],128==(192&i)&&128==(192&u)&&(s=(15&h)<<12|(63&i)<<6|63&u)>2047&&(s<55296||s>57343)&&(a=s);break;case 4:i=t[o+1],u=t[o+2],f=t[o+3],128==(192&i)&&128==(192&u)&&128==(192&f)&&(s=(15&h)<<18|(63&i)<<12|(63&u)<<6|63&f)>65535&&s<1114112&&(a=s)}null===a?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),o+=c}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}e.Buffer=s,e.SlowBuffer=function(t){+t!=t&&(t=0);return s.alloc(+t)},e.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(e){return!1}}(),e.kMaxLength=u(),s.poolSize=8192,s._augment=function(t){return t.__proto__=s.prototype,t},s.from=function(t,e,r){return h(null,t,e,r)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(t,e,r){return function(t,e,r,n){return a(e),e<=0?f(t,e):void 0!==r?"string"==typeof n?f(t,e).fill(r,n):f(t,e).fill(r):f(t,e)}(null,t,e,r)},s.allocUnsafe=function(t){return c(null,t)},s.allocUnsafeSlow=function(t){return c(null,t)},s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,e){if(!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,e){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=s.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var u=t[r];if(!s.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(n,o),o+=u.length}return n},s.byteLength=g,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)d(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)d(this,e,e+3),d(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)d(this,e,e+7),d(this,e+1,e+6),d(this,e+2,e+5),d(this,e+3,e+4);return this},s.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?S(this,0,t):y.apply(this,arguments)},s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},s.prototype.compare=function(t,e,r,n,o){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),u=(r>>>=0)-(e>>>=0),f=Math.min(i,u),h=this.slice(n,o),a=t.slice(e,r),c=0;c<f;++c)if(h[c]!==a[c]){i=h[c],u=a[c];break}return i<u?-1:u<i?1:0},s.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},s.prototype.indexOf=function(t,e,r){return w(this,t,e,r,!0)},s.prototype.lastIndexOf=function(t,e,r){return w(this,t,e,r,!1)},s.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":return E(this,t,e,r);case"latin1":case"binary":return m(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function P(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function T(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function x(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=N(t[i]);return o}function L(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function I(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function U(t,e,r,n,o,i){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function O(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o<i;++o)t[r+o]=(e&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function M(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o<i;++o)t[r+o]=e>>>8*(n?o:3-o)&255}function D(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Y(t,e,r,n,i){return i||D(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function k(t,e,r,n,i){return i||D(t,0,r,8),o.write(t,e,r,n,52,8),r+8}s.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),s.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=s.prototype;else{var o=e-t;r=new s(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+t]}return r},s.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||I(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},s.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||I(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},s.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||I(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*e)),n},s.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||I(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},s.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),o.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),o.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),o.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),o.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||U(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},s.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||U(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},s.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},s.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},s.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):M(this,t,e,!0),e+4},s.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},s.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);U(this,t,e,r,o-1,-o)}var i=0,u=1,f=0;for(this[e]=255&t;++i<r&&(u*=256);)t<0&&0===f&&0!==this[e+i-1]&&(f=1),this[e+i]=(t/u>>0)-f&255;return e+r},s.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);U(this,t,e,r,o-1,-o)}var i=r-1,u=1,f=0;for(this[e+i]=255&t;--i>=0&&(u*=256);)t<0&&0===f&&0!==this[e+i+1]&&(f=1),this[e+i]=(t/u>>0)-f&255;return e+r},s.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},s.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},s.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):M(this,t,e,!0),e+4},s.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},s.prototype.writeFloatLE=function(t,e,r){return Y(this,t,e,!0,r)},s.prototype.writeFloatBE=function(t,e,r){return Y(this,t,e,!1,r)},s.prototype.writeDoubleLE=function(t,e,r){return k(this,t,e,!0,r)},s.prototype.writeDoubleBE=function(t,e,r){return k(this,t,e,!1,r)},s.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var o,i=n-r;if(this===t&&r<e&&e<n)for(o=i-1;o>=0;--o)t[o+e]=this[o+r];else if(i<1e3||!s.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+i),e);return i},s.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var u=s.isBuffer(t)?t:j(new s(t,n).toString()),f=u.length;for(i=0;i<r-e;++i)this[i+e]=u[i%f]}return this};var C=/[^+\/0-9A-Za-z-_]/g;function N(t){return t<16?"0"+t.toString(16):t.toString(16)}function j(t,e){var r;e=e||1/0;for(var n=t.length,o=null,i=[],u=0;u<n;++u){if((r=t.charCodeAt(u))>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(u+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function F(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(C,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}}).call(this,r(8))},function(t,e,r){"use strict";const{Buffer:n}=r(0),o=Symbol.for("BufferList");function i(t){if(!(this instanceof i))return new i(t);i._init.call(this,t)}i._init=function(t){Object.defineProperty(this,o,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)},i.prototype._new=function(t){return new i(t)},i.prototype._offset=function(t){if(0===t)return[0,0];let e=0;for(let r=0;r<this._bufs.length;r++){const n=e+this._bufs[r].length;if(t<n||r===this._bufs.length-1)return[r,t-e];e=n}},i.prototype._reverseOffset=function(t){const e=t[0];let r=t[1];for(let n=0;n<e;n++)r+=this._bufs[n].length;return r},i.prototype.get=function(t){if(t>this.length||t<0)return;const e=this._offset(t);return this._bufs[e[0]][e[1]]},i.prototype.slice=function(t,e){return"number"==typeof t&&t<0&&(t+=this.length),"number"==typeof e&&e<0&&(e+=this.length),this.copy(null,0,t,e)},i.prototype.copy=function(t,e,r,o){if(("number"!=typeof r||r<0)&&(r=0),("number"!=typeof o||o>this.length)&&(o=this.length),r>=this.length)return t||n.alloc(0);if(o<=0)return t||n.alloc(0);const i=!!t,u=this._offset(r),f=o-r;let s=f,h=i&&e||0,a=u[1];if(0===r&&o===this.length){if(!i)return 1===this._bufs.length?this._bufs[0]:n.concat(this._bufs,this.length);for(let e=0;e<this._bufs.length;e++)this._bufs[e].copy(t,h),h+=this._bufs[e].length;return t}if(s<=this._bufs[u[0]].length-a)return i?this._bufs[u[0]].copy(t,e,a,a+s):this._bufs[u[0]].slice(a,a+s);i||(t=n.allocUnsafe(f));for(let n=u[0];n<this._bufs.length;n++){const e=this._bufs[n].length-a;if(!(s>e)){this._bufs[n].copy(t,h,a,a+s);break}this._bufs[n].copy(t,h,a),h+=e,s-=e,a&&(a=0)}return t},i.prototype.shallowSlice=function(t,e){if(t=t||0,e="number"!=typeof e?this.length:e,t<0&&(t+=this.length),e<0&&(e+=this.length),t===e)return this._new();const r=this._offset(t),n=this._offset(e),o=this._bufs.slice(r[0],n[0]+1);return 0===n[1]?o.pop():o[o.length-1]=o[o.length-1].slice(0,n[1]),0!==r[1]&&(o[0]=o[0].slice(r[1])),this._new(o)},i.prototype.toString=function(t,e,r){return this.slice(e,r).toString(t)},i.prototype.consume=function(t){for(;this._bufs.length;){if(!(t>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},i.prototype.duplicate=function(){const t=this._new();for(let e=0;e<this._bufs.length;e++)t.append(this._bufs[e]);return t},i.prototype.append=function(t){if(null==t)return this;if(t.buffer)this._appendBuffer(n.from(t.buffer,t.byteOffset,t.byteLength));else if(Array.isArray(t))for(let e=0;e<t.length;e++)this.append(t[e]);else if(this._isBufferList(t))for(let e=0;e<t._bufs.length;e++)this.append(t._bufs[e]);else"number"==typeof t&&(t=t.toString()),this._appendBuffer(n.from(t));return this},i.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length},i.prototype.indexOf=function(t,e,r){if(void 0===r&&"string"==typeof e&&(r=e,e=void 0),"function"==typeof t||Array.isArray(t))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if("number"==typeof t?t=n.from([t]):"string"==typeof t?t=n.from(t,r):this._isBufferList(t)?t=t.slice():Array.isArray(t.buffer)?t=n.from(t.buffer,t.byteOffset,t.byteLength):n.isBuffer(t)||(t=n.from(t)),e=Number(e||0),isNaN(e)&&(e=0),e<0&&(e=this.length+e),e<0&&(e=0),0===t.length)return e>this.length?this.length:e;const o=this._offset(e);let i=o[0],u=o[1];for(;i<this._bufs.length;i++){const e=this._bufs[i];for(;u<e.length;){if(e.length-u>=t.length){const r=e.indexOf(t,u);if(-1!==r)return this._reverseOffset([i,r]);u=e.length-t.length+1}else{const e=this._reverseOffset([i,u]);if(this._match(e,t))return e;u++}}u=0}return-1},i.prototype._match=function(t,e){if(this.length-t<e.length)return!1;for(let r=0;r<e.length;r++)if(this.get(t+r)!==e[r])return!1;return!0},function(){const t={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(const e in t)!function(e){i.prototype[e]=null===t[e]?function(t,r){return this.slice(t,t+r)[e](0,r)}:function(r){return this.slice(r,r+t[e])[e](0)}}(e)}(),i.prototype._isBufferList=function(t){return t instanceof i||i.isBufferList(t)},i.isBufferList=function(t){return null!=t&&t[o]},t.exports=i},function(t,e,r){"use strict";const n=r(3),{Buffer:o}=r(0),i=(t,e,r)=>{const u=n.encode(t,e,r);return i.bytes=n.encode.bytes,e||o.from(u)};t.exports=i},function(t,e,r){"use strict";t.exports={encode:r(12),decode:r(13),encodingLength:r(14)}},function(t,e,r){"use strict";const{Buffer:n}=r(0),o=r(3),i=t=>{const e=o.decode(n.isBuffer(t)?t:(r=t,new Proxy({},{get:(t,e)=>"l"===e[0]?r[e]:r.get(parseInt(e))})));var r;return i.bytes=o.decode.bytes,e};t.exports=i},function(t,e,r){t.exports=r(6)},function(t,e,r){"use strict";e.encode=r(7),e.decode=r(15),e.varintEncode=r(2),e.varintDecode=r(4),e.int32BEEncode=r(16),e.int32BEDecode=r(17)},function(t,e,r){"use strict";function n(t){return new i(t)}function o(t){var e,r;function n(e,r){try{var u=t[e](r),f=u.value,s=f instanceof i;Promise.resolve(s?f.wrapped:f).then((function(t){s?n("return"===e?"return":"next",t):o(u.done?"return":"normal",t)}),(function(t){n("throw",t)}))}catch(h){o("throw",h)}}function o(t,o){switch(t){case"return":e.resolve({value:o,done:!0});break;case"throw":e.reject(o);break;default:e.resolve({value:o,done:!1})}(e=e.next)?n(e.key,e.arg):r=null}this._invoke=function(t,o){return new Promise((function(i,u){var f={key:t,arg:o,resolve:i,reject:u,next:null};r?r=r.next=f:(e=r=f,n(t,o))}))},"function"!=typeof t.return&&(this.return=void 0)}function i(t){this.wrapped=t}"function"==typeof Symbol&&Symbol.asyncIterator&&(o.prototype[Symbol.asyncIterator]=function(){return this}),o.prototype.next=function(t){return this._invoke("next",t)},o.prototype.throw=function(t){return this._invoke("throw",t)},o.prototype.return=function(t){return this._invoke("return",t)};const{Buffer:u}=r(0),f=r(1),s=r(2);function h(t){t=t||{};const e=Math.max(t.poolSize||10240,t.minPoolSize||8),r=t.lengthEncoder||s;return t=>{return(i=function*(){let o=u.alloc(e),i=0;var s,h=!0,a=!1;try{for(var c,l,p=function(t){var e;if("undefined"!=typeof Symbol){if(Symbol.asyncIterator&&null!=(e=t[Symbol.asyncIterator]))return e.call(t);if(Symbol.iterator&&null!=(e=t[Symbol.iterator]))return e.call(t)}throw new TypeError("Object is not async iterable")}(t);h=(c=yield n(p.next())).done,l=yield n(c.value),!h;h=!0){const t=l;r(t.length,o,i);const n=o.slice(i,i+r.bytes);i+=r.bytes,o.length-i<8&&(o=u.alloc(e),i=0),yield(new f).append(n).append(t)}}catch(g){a=!0,s=g}finally{try{h||null==p.return||(yield n(p.return()))}finally{if(a)throw s}}},function(){return new o(i.apply(this,arguments))})();var i}}h.single=(t,e)=>{const r=(e=e||{}).lengthEncoder||s;return new f([r(t.length),t])},t.exports=h,t.exports.MIN_POOL_SIZE=8,t.exports.DEFAULT_POOL_SIZE=10240},function(t,e,r){"use strict";var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(o){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,r){"use strict";e.byteLength=function(t){var e=h(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,n=h(t),u=n[0],f=n[1],s=new i(function(t,e,r){return 3*(e+r)/4-r}(0,u,f)),a=0,c=f>0?u-4:u;for(r=0;r<c;r+=4)e=o[t.charCodeAt(r)]<<18|o[t.charCodeAt(r+1)]<<12|o[t.charCodeAt(r+2)]<<6|o[t.charCodeAt(r+3)],s[a++]=e>>16&255,s[a++]=e>>8&255,s[a++]=255&e;2===f&&(e=o[t.charCodeAt(r)]<<2|o[t.charCodeAt(r+1)]>>4,s[a++]=255&e);1===f&&(e=o[t.charCodeAt(r)]<<10|o[t.charCodeAt(r+1)]<<4|o[t.charCodeAt(r+2)]>>2,s[a++]=e>>8&255,s[a++]=255&e);return s},e.fromByteArray=function(t){for(var e,r=t.length,o=r%3,i=[],u=0,f=r-o;u<f;u+=16383)i.push(a(t,u,u+16383>f?f:u+16383));1===o?(e=t[r-1],i.push(n[e>>2]+n[e<<4&63]+"==")):2===o&&(e=(t[r-2]<<8)+t[r-1],i.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,s=u.length;f<s;++f)n[f]=u[f],o[u.charCodeAt(f)]=f;function h(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function a(t,e,r){for(var o,i,u=[],f=e;f<r;f+=3)o=(t[f]<<16&16711680)+(t[f+1]<<8&65280)+(255&t[f+2]),u.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return u.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,e,r){"use strict";e.read=function(t,e,r,n,o){var i,u,f=8*o-n-1,s=(1<<f)-1,h=s>>1,a=-7,c=r?o-1:0,l=r?-1:1,p=t[e+c];for(c+=l,i=p&(1<<-a)-1,p>>=-a,a+=f;a>0;i=256*i+t[e+c],c+=l,a-=8);for(u=i&(1<<-a)-1,i>>=-a,a+=n;a>0;u=256*u+t[e+c],c+=l,a-=8);if(0===i)i=1-h;else{if(i===s)return u?NaN:1/0*(p?-1:1);u+=Math.pow(2,n),i-=h}return(p?-1:1)*u*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var u,f,s,h=8*i-o-1,a=(1<<h)-1,c=a>>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,g=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(f=isNaN(e)?1:0,u=a):(u=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-u))<1&&(u--,s*=2),(e+=u+c>=1?l/s:l*Math.pow(2,1-c))*s>=2&&(u++,s/=2),u+c>=a?(f=0,u=a):u+c>=1?(f=(e*s-1)*Math.pow(2,o),u+=c):(f=e*Math.pow(2,c-1)*Math.pow(2,o),u=0));o>=8;t[r+p]=255&f,p+=g,f/=256,o-=8);for(u=u<<o|f,h+=o;h>0;t[r+p]=255&u,p+=g,u/=256,h-=8);t[r+p-g]|=128*y}},function(t,e,r){"use strict";var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,r){"use strict";t.exports=function t(e,r,o){r=r||[];var i=o=o||0;for(;e>=n;)r[o++]=255&e|128,e/=128;for(;-128&e;)r[o++]=255&e|128,e>>>=7;return r[o]=0|e,t.bytes=o-i+1,r};var n=Math.pow(2,31)},function(t,e,r){"use strict";t.exports=function t(e,r){var n,o=0,i=0,u=r=r||0,f=e.length;do{if(u>=f)throw t.bytes=0,new RangeError("Could not decode varint");n=e[u++],o+=i<28?(127&n)<<i:(127&n)*Math.pow(2,i),i+=7}while(n>=128);return t.bytes=u-r,o}},function(t,e,r){"use strict";var n=Math.pow(2,7),o=Math.pow(2,14),i=Math.pow(2,21),u=Math.pow(2,28),f=Math.pow(2,35),s=Math.pow(2,42),h=Math.pow(2,49),a=Math.pow(2,56),c=Math.pow(2,63);t.exports=function(t){return t<n?1:t<o?2:t<i?3:t<u?4:t<f?5:t<s?6:t<h?7:t<a?8:t<c?9:10}},function(t,e,r){"use strict";function n(t){return new i(t)}function o(t){var e,r;function n(e,r){try{var u=t[e](r),f=u.value,s=f instanceof i;Promise.resolve(s?f.wrapped:f).then((function(t){s?n("return"===e?"return":"next",t):o(u.done?"return":"normal",t)}),(function(t){n("throw",t)}))}catch(h){o("throw",h)}}function o(t,o){switch(t){case"return":e.resolve({value:o,done:!0});break;case"throw":e.reject(o);break;default:e.resolve({value:o,done:!1})}(e=e.next)?n(e.key,e.arg):r=null}this._invoke=function(t,o){return new Promise((function(i,u){var f={key:t,arg:o,resolve:i,reject:u,next:null};r?r=r.next=f:(e=r=f,n(t,o))}))},"function"!=typeof t.return&&(this.return=void 0)}function i(t){this.wrapped=t}"function"==typeof Symbol&&Symbol.asyncIterator&&(o.prototype[Symbol.asyncIterator]=function(){return this}),o.prototype.next=function(t){return this._invoke("next",t)},o.prototype.throw=function(t){return this._invoke("throw",t)},o.prototype.return=function(t){return this._invoke("return",t)};const{Buffer:u}=r(0),f=r(1),s=r(4),h=u.alloc(0),a="readLength",c="readData",l={[a]:(t,e,r,n)=>{let o;e=e.append(t);try{o=n.lengthDecoder(e)}catch(i){if(e.length>n.maxLengthLength)throw Object.assign(i,{message:"message length too long",code:"ERR_MSG_LENGTH_TOO_LONG"});if(i instanceof RangeError)return{mode:a,buffer:e};throw i}if(o>n.maxDataLength)throw Object.assign(new Error("message data too long"),{code:"ERR_MSG_DATA_TOO_LONG"});return t=e.shallowSlice(n.lengthDecoder.bytes),e=new f,n.onLength&&n.onLength(o),o<=0?(n.onData&&n.onData(h),{mode:a,chunk:t,buffer:e,data:h}):{mode:c,chunk:t,buffer:e,state:{dataLength:o}}},[c]:(t,e,r,n)=>{if((e=e.append(t)).length<r.dataLength)return{mode:c,buffer:e,state:r};const{dataLength:o}=r,i=e.shallowSlice(0,o);return t=e.length>o?e.shallowSlice(o):null,e=new f,n.onData&&n.onData(i),{mode:a,chunk:t,buffer:e,data:i}}};function p(t){return(t=t||{}).lengthDecoder=t.lengthDecoder||s,t.maxLengthLength=t.maxLengthLength||8,t.maxDataLength=t.maxDataLength||4194304,e=>{return(r=function*(){let r,o=new f,i=a;var u,s=!0,h=!1;try{for(var c,p,g=function(t){var e;if("undefined"!=typeof Symbol){if(Symbol.asyncIterator&&null!=(e=t[Symbol.asyncIterator]))return e.call(t);if(Symbol.iterator&&null!=(e=t[Symbol.iterator]))return e.call(t)}throw new TypeError("Object is not async iterable")}(e);s=(c=yield n(g.next())).done,p=yield n(c.value),!s;s=!0){let e=p;for(;e;){const n=l[i](e,o,r,t);({mode:i,chunk:e,buffer:o,state:r}=n),n.data&&(yield n.data)}}}catch(y){h=!0,u=y}finally{try{s||null==g.return||(yield n(g.return()))}finally{if(h)throw u}}if(o.length)throw Object.assign(new Error("unexpected end of input"),{code:"ERR_UNEXPECTED_EOF"})},function(){return new o(r.apply(this,arguments))})();var r}}p.fromReader=(t,e)=>{e=e||{};let r=1;const n={[Symbol.asyncIterator](){return this},next:async()=>{try{return await t.next(r)}catch(e){if("ERR_UNDER_READ"===e.code)return{done:!0,value:null};throw e}finally{r=1}}};return e.onLength=t=>{r=t},p(e)(n)},t.exports=p,t.exports.MAX_LENGTH_LENGTH=8,t.exports.MAX_DATA_LENGTH=4194304},function(t,e,r){"use strict";const{Buffer:n}=r(0),o=(t,e,r)=>((e=e||n.allocUnsafe(4)).writeInt32BE(t,r),e);o.bytes=4,t.exports=o},function(t,e,r){"use strict";const n=t=>{if(t.length<4)throw RangeError("Could not decode int32BE");return t.readInt32BE(0)};n.bytes=4,t.exports=n}])}));
(function (root, factory) {(typeof module === 'object' && module.exports) ? module.exports = factory() : root.ItLengthPrefixed = factory()}(typeof self !== 'undefined' ? self : this, function () {
var ItLengthPrefixed=(()=>{var B=(e,r)=>()=>(r||(r={exports:{}},e(r.exports,r)),r.exports);var Q=B(X=>{"use strict";X.byteLength=kt;X.toByteArray=Ot;X.fromByteArray=qt;var A=[],I=[],Gt=typeof Uint8Array!="undefined"?Uint8Array:Array,K="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var M=0,Pt=K.length;M<Pt;++M)A[M]=K[M],I[K.charCodeAt(M)]=M;I["-".charCodeAt(0)]=62;I["_".charCodeAt(0)]=63;function Ur(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=r);var i=t===r?0:4-t%4;return[t,i]}function kt(e){var r=Ur(e),t=r[0],i=r[1];return(t+i)*3/4-i}function $t(e,r,t){return(r+t)*3/4-t}function Ot(e){var r,t=Ur(e),i=t[0],n=t[1],o=new Gt($t(e,i,n)),u=0,c=n>0?i-4:i,p;for(p=0;p<c;p+=4)r=I[e.charCodeAt(p)]<<18|I[e.charCodeAt(p+1)]<<12|I[e.charCodeAt(p+2)]<<6|I[e.charCodeAt(p+3)],o[u++]=r>>16&255,o[u++]=r>>8&255,o[u++]=r&255;return n===2&&(r=I[e.charCodeAt(p)]<<2|I[e.charCodeAt(p+1)]>>4,o[u++]=r&255),n===1&&(r=I[e.charCodeAt(p)]<<10|I[e.charCodeAt(p+1)]<<4|I[e.charCodeAt(p+2)]>>2,o[u++]=r>>8&255,o[u++]=r&255),o}function Ht(e){return A[e>>18&63]+A[e>>12&63]+A[e>>6&63]+A[e&63]}function Wt(e,r,t){for(var i,n=[],o=r;o<t;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),n.push(Ht(i));return n.join("")}function qt(e){for(var r,t=e.length,i=t%3,n=[],o=16383,u=0,c=t-i;u<c;u+=o)n.push(Wt(e,u,u+o>c?c:u+o));return i===1?(r=e[t-1],n.push(A[r>>2]+A[r<<4&63]+"==")):i===2&&(r=(e[t-2]<<8)+e[t-1],n.push(A[r>>10]+A[r>>4&63]+A[r<<2&63]+"=")),n.join("")}});var rr=B(v=>{v.read=function(e,r,t,i,n){var o,u,c=n*8-i-1,p=(1<<c)-1,a=p>>1,l=-7,s=t?n-1:0,E=t?-1:1,d=e[r+s];for(s+=E,o=d&(1<<-l)-1,d>>=-l,l+=c;l>0;o=o*256+e[r+s],s+=E,l-=8);for(u=o&(1<<-l)-1,o>>=-l,l+=i;l>0;u=u*256+e[r+s],s+=E,l-=8);if(o===0)o=1-a;else{if(o===p)return u?NaN:(d?-1:1)*Infinity;u=u+Math.pow(2,i),o=o-a}return(d?-1:1)*u*Math.pow(2,o-i)};v.write=function(e,r,t,i,n,o){var u,c,p,a=o*8-n-1,l=(1<<a)-1,s=l>>1,E=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:o-1,N=i?1:-1,Mt=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===Infinity?(c=isNaN(r)?1:0,u=l):(u=Math.floor(Math.log(r)/Math.LN2),r*(p=Math.pow(2,-u))<1&&(u--,p*=2),u+s>=1?r+=E/p:r+=E*Math.pow(2,1-s),r*p>=2&&(u++,p/=2),u+s>=l?(c=0,u=l):u+s>=1?(c=(r*p-1)*Math.pow(2,n),u=u+s):(c=r*Math.pow(2,s-1)*Math.pow(2,n),u=0));n>=8;e[t+d]=c&255,d+=N,c/=256,n-=8);for(u=u<<n|c,a+=n;a>0;e[t+d]=u&255,d+=N,u/=256,a-=8);e[t+d-N]|=Mt*128}});var P=B(k=>{"use strict";var tr=Q(),O=rr(),_r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;k.Buffer=h;k.SlowBuffer=Xt;k.INSPECT_MAX_BYTES=50;var Y=2147483647;k.kMaxLength=Y;h.TYPED_ARRAY_SUPPORT=Yt();!h.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Yt(){try{let e=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(e,r),e.foo()===42}catch(e){return!1}}Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(!!h.isBuffer(this))return this.buffer}});Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(!!h.isBuffer(this))return this.byteOffset}});function T(e){if(e>Y)throw new RangeError('The value "'+e+'" is invalid for option "size"');let r=new Uint8Array(e);return Object.setPrototypeOf(r,h.prototype),r}function h(e,r,t){if(typeof e=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return er(e)}return Tr(e,r,t)}h.poolSize=8192;function Tr(e,r,t){if(typeof e=="string")return Vt(e,r);if(ArrayBuffer.isView(e))return jt(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(U(e,ArrayBuffer)||e&&U(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(U(e,SharedArrayBuffer)||e&&U(e.buffer,SharedArrayBuffer)))return ir(e,r,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let i=e.valueOf&&e.valueOf();if(i!=null&&i!==e)return h.from(i,r,t);let n=zt(e);if(n)return n;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return h.from(e[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}h.from=function(e,r,t){return Tr(e,r,t)};Object.setPrototypeOf(h.prototype,Uint8Array.prototype);Object.setPrototypeOf(h,Uint8Array);function Lr(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Zt(e,r,t){return Lr(e),e<=0?T(e):r!==void 0?typeof t=="string"?T(e).fill(r,t):T(e).fill(r):T(e)}h.alloc=function(e,r,t){return Zt(e,r,t)};function er(e){return Lr(e),T(e<0?0:nr(e)|0)}h.allocUnsafe=function(e){return er(e)};h.allocUnsafeSlow=function(e){return er(e)};function Vt(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!h.isEncoding(r))throw new TypeError("Unknown encoding: "+r);let t=Rr(e,r)|0,i=T(t),n=i.write(e,r);return n!==t&&(i=i.slice(0,n)),i}function or(e){let r=e.length<0?0:nr(e.length)|0,t=T(r);for(let i=0;i<r;i+=1)t[i]=e[i]&255;return t}function jt(e){if(U(e,Uint8Array)){let r=new Uint8Array(e);return ir(r.buffer,r.byteOffset,r.byteLength)}return or(e)}function ir(e,r,t){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(t||0))throw new RangeError('"length" is outside of buffer bounds');let i;return r===void 0&&t===void 0?i=new Uint8Array(e):t===void 0?i=new Uint8Array(e,r):i=new Uint8Array(e,r,t),Object.setPrototypeOf(i,h.prototype),i}function zt(e){if(h.isBuffer(e)){let r=nr(e.length)|0,t=T(r);return t.length===0||e.copy(t,0,0,r),t}if(e.length!==void 0)return typeof e.length!="number"||ur(e.length)?T(0):or(e);if(e.type==="Buffer"&&Array.isArray(e.data))return or(e.data)}function nr(e){if(e>=Y)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Y.toString(16)+" bytes");return e|0}function Xt(e){return+e!=e&&(e=0),h.alloc(+e)}h.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==h.prototype};h.compare=function(r,t){if(U(r,Uint8Array)&&(r=h.from(r,r.offset,r.byteLength)),U(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),!h.isBuffer(r)||!h.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;let i=r.length,n=t.length;for(let o=0,u=Math.min(i,n);o<u;++o)if(r[o]!==t[o]){i=r[o],n=t[o];break}return i<n?-1:n<i?1:0};h.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};h.concat=function(r,t){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return h.alloc(0);let i;if(t===void 0)for(t=0,i=0;i<r.length;++i)t+=r[i].length;let n=h.allocUnsafe(t),o=0;for(i=0;i<r.length;++i){let u=r[i];if(U(u,Uint8Array))o+u.length>n.length?(h.isBuffer(u)||(u=h.from(u)),u.copy(n,o)):Uint8Array.prototype.set.call(n,u,o);else if(h.isBuffer(u))u.copy(n,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=u.length}return n};function Rr(e,r){if(h.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||U(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let t=e.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&t===0)return 0;let n=!1;for(;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return hr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Sr(e).length;default:if(n)return i?-1:hr(e).length;r=(""+r).toLowerCase(),n=!0}}h.byteLength=Rr;function te(e,r,t){let i=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return"";for(e||(e="utf8");;)switch(e){case"hex":return vt(this,r,t);case"utf8":case"utf-8":return br(this,r,t);case"ascii":return Kt(this,r,t);case"latin1":case"binary":return Qt(this,r,t);case"base64":return Jt(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re(this,r,t);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}h.prototype._isBuffer=!0;function b(e,r,t){let i=e[r];e[r]=e[t],e[t]=i}h.prototype.swap16=function(){let r=this.length;if(r%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<r;t+=2)b(this,t,t+1);return this};h.prototype.swap32=function(){let r=this.length;if(r%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<r;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this};h.prototype.swap64=function(){let r=this.length;if(r%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<r;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this};h.prototype.toString=function(){let r=this.length;return r===0?"":arguments.length===0?br(this,0,r):te.apply(this,arguments)};h.prototype.toLocaleString=h.prototype.toString;h.prototype.equals=function(r){if(!h.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:h.compare(this,r)===0};h.prototype.inspect=function(){let r="",t=k.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"};_r&&(h.prototype[_r]=h.prototype.inspect);h.prototype.compare=function(r,t,i,n,o){if(U(r,Uint8Array)&&(r=h.from(r,r.offset,r.byteLength)),!h.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),i===void 0&&(i=r?r.length:0),n===void 0&&(n=0),o===void 0&&(o=this.length),t<0||i>r.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=i)return 0;if(n>=o)return-1;if(t>=i)return 1;if(t>>>=0,i>>>=0,n>>>=0,o>>>=0,this===r)return 0;let u=o-n,c=i-t,p=Math.min(u,c),a=this.slice(n,o),l=r.slice(t,i);for(let s=0;s<p;++s)if(a[s]!==l[s]){u=a[s],c=l[s];break}return u<c?-1:c<u?1:0};function Dr(e,r,t,i,n){if(e.length===0)return-1;if(typeof t=="string"?(i=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,ur(t)&&(t=n?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(n)return-1;t=e.length-1}else if(t<0)if(n)t=0;else return-1;if(typeof r=="string"&&(r=h.from(r,i)),h.isBuffer(r))return r.length===0?-1:Cr(e,r,t,i,n);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):Cr(e,[r],t,i,n);throw new TypeError("val must be string, number or Buffer")}function Cr(e,r,t,i,n){let o=1,u=e.length,c=r.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(e.length<2||r.length<2)return-1;o=2,u/=2,c/=2,t/=2}function p(l,s){return o===1?l[s]:l.readUInt16BE(s*o)}let a;if(n){let l=-1;for(a=t;a<u;a++)if(p(e,a)===p(r,l===-1?0:a-l)){if(l===-1&&(l=a),a-l+1===c)return l*o}else l!==-1&&(a-=a-l),l=-1}else for(t+c>u&&(t=u-c),a=t;a>=0;a--){let l=!0;for(let s=0;s<c;s++)if(p(e,a+s)!==p(r,s)){l=!1;break}if(l)return a}return-1}h.prototype.includes=function(r,t,i){return this.indexOf(r,t,i)!==-1};h.prototype.indexOf=function(r,t,i){return Dr(this,r,t,i,!0)};h.prototype.lastIndexOf=function(r,t,i){return Dr(this,r,t,i,!1)};function ee(e,r,t,i){t=Number(t)||0;let n=e.length-t;i?(i=Number(i),i>n&&(i=n)):i=n;let o=r.length;i>o/2&&(i=o/2);let u;for(u=0;u<i;++u){let c=parseInt(r.substr(u*2,2),16);if(ur(c))return u;e[t+u]=c}return u}function ie(e,r,t,i){return V(hr(r,e.length-t),e,t,i)}function oe(e,r,t,i){return V(ne(r),e,t,i)}function ue(e,r,t,i){return V(Sr(r),e,t,i)}function fe(e,r,t,i){return V(he(r,e.length-t),e,t,i)}h.prototype.write=function(r,t,i,n){if(t===void 0)n="utf8",i=this.length,t=0;else if(i===void 0&&typeof t=="string")n=t,i=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(i)?(i=i>>>0,n===void 0&&(n="utf8")):(n=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let o=this.length-t;if((i===void 0||i>o)&&(i=o),r.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let u=!1;for(;;)switch(n){case"hex":return ee(this,r,t,i);case"utf8":case"utf-8":return ie(this,r,t,i);case"ascii":case"latin1":case"binary":return oe(this,r,t,i);case"base64":return ue(this,r,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fe(this,r,t,i);default:if(u)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),u=!0}};h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Jt(e,r,t){return r===0&&t===e.length?tr.fromByteArray(e):tr.fromByteArray(e.slice(r,t))}function br(e,r,t){t=Math.min(e.length,t);let i=[],n=r;for(;n<t;){let o=e[n],u=null,c=o>239?4:o>223?3:o>191?2:1;if(n+c<=t){let p,a,l,s;switch(c){case 1:o<128&&(u=o);break;case 2:p=e[n+1],(p&192)==128&&(s=(o&31)<<6|p&63,s>127&&(u=s));break;case 3:p=e[n+1],a=e[n+2],(p&192)==128&&(a&192)==128&&(s=(o&15)<<12|(p&63)<<6|a&63,s>2047&&(s<55296||s>57343)&&(u=s));break;case 4:p=e[n+1],a=e[n+2],l=e[n+3],(p&192)==128&&(a&192)==128&&(l&192)==128&&(s=(o&15)<<18|(p&63)<<12|(a&63)<<6|l&63,s>65535&&s<1114112&&(u=s))}}u===null?(u=65533,c=1):u>65535&&(u-=65536,i.push(u>>>10&1023|55296),u=56320|u&1023),i.push(u),n+=c}return ce(i)}var Nr=4096;function ce(e){let r=e.length;if(r<=Nr)return String.fromCharCode.apply(String,e);let t="",i=0;for(;i<r;)t+=String.fromCharCode.apply(String,e.slice(i,i+=Nr));return t}function Kt(e,r,t){let i="";t=Math.min(e.length,t);for(let n=r;n<t;++n)i+=String.fromCharCode(e[n]&127);return i}function Qt(e,r,t){let i="";t=Math.min(e.length,t);for(let n=r;n<t;++n)i+=String.fromCharCode(e[n]);return i}function vt(e,r,t){let i=e.length;(!r||r<0)&&(r=0),(!t||t<0||t>i)&&(t=i);let n="";for(let o=r;o<t;++o)n+=pe[e[o]];return n}function re(e,r,t){let i=e.slice(r,t),n="";for(let o=0;o<i.length-1;o+=2)n+=String.fromCharCode(i[o]+i[o+1]*256);return n}h.prototype.slice=function(r,t){let i=this.length;r=~~r,t=t===void 0?i:~~t,r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),t<r&&(t=r);let n=this.subarray(r,t);return Object.setPrototypeOf(n,h.prototype),n};function w(e,r,t){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+r>t)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUintLE=h.prototype.readUIntLE=function(r,t,i){r=r>>>0,t=t>>>0,i||w(r,t,this.length);let n=this[r],o=1,u=0;for(;++u<t&&(o*=256);)n+=this[r+u]*o;return n};h.prototype.readUintBE=h.prototype.readUIntBE=function(r,t,i){r=r>>>0,t=t>>>0,i||w(r,t,this.length);let n=this[r+--t],o=1;for(;t>0&&(o*=256);)n+=this[r+--t]*o;return n};h.prototype.readUint8=h.prototype.readUInt8=function(r,t){return r=r>>>0,t||w(r,1,this.length),this[r]};h.prototype.readUint16LE=h.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||w(r,2,this.length),this[r]|this[r+1]<<8};h.prototype.readUint16BE=h.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||w(r,2,this.length),this[r]<<8|this[r+1]};h.prototype.readUint32LE=h.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||w(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};h.prototype.readUint32BE=h.prototype.readUInt32BE=function(r,t){return r=r>>>0,t||w(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};h.prototype.readBigUInt64LE=R(function(r){r=r>>>0,q(r,"offset");let t=this[r],i=this[r+7];(t===void 0||i===void 0)&&W(r,this.length-8);let n=t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24,o=this[++r]+this[++r]*2**8+this[++r]*2**16+i*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))});h.prototype.readBigUInt64BE=R(function(r){r=r>>>0,q(r,"offset");let t=this[r],i=this[r+7];(t===void 0||i===void 0)&&W(r,this.length-8);let n=t*2**24+this[++r]*2**16+this[++r]*2**8+this[++r],o=this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+i;return(BigInt(n)<<BigInt(32))+BigInt(o)});h.prototype.readIntLE=function(r,t,i){r=r>>>0,t=t>>>0,i||w(r,t,this.length);let n=this[r],o=1,u=0;for(;++u<t&&(o*=256);)n+=this[r+u]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n};h.prototype.readIntBE=function(r,t,i){r=r>>>0,t=t>>>0,i||w(r,t,this.length);let n=t,o=1,u=this[r+--n];for(;n>0&&(o*=256);)u+=this[r+--n]*o;return o*=128,u>=o&&(u-=Math.pow(2,8*t)),u};h.prototype.readInt8=function(r,t){return r=r>>>0,t||w(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};h.prototype.readInt16LE=function(r,t){r=r>>>0,t||w(r,2,this.length);let i=this[r]|this[r+1]<<8;return i&32768?i|4294901760:i};h.prototype.readInt16BE=function(r,t){r=r>>>0,t||w(r,2,this.length);let i=this[r+1]|this[r]<<8;return i&32768?i|4294901760:i};h.prototype.readInt32LE=function(r,t){return r=r>>>0,t||w(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};h.prototype.readInt32BE=function(r,t){return r=r>>>0,t||w(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};h.prototype.readBigInt64LE=R(function(r){r=r>>>0,q(r,"offset");let t=this[r],i=this[r+7];(t===void 0||i===void 0)&&W(r,this.length-8);let n=this[r+4]+this[r+5]*2**8+this[r+6]*2**16+(i<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24)});h.prototype.readBigInt64BE=R(function(r){r=r>>>0,q(r,"offset");let t=this[r],i=this[r+7];(t===void 0||i===void 0)&&W(r,this.length-8);let n=(t<<24)+this[++r]*2**16+this[++r]*2**8+this[++r];return(BigInt(n)<<BigInt(32))+BigInt(this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+i)});h.prototype.readFloatLE=function(r,t){return r=r>>>0,t||w(r,4,this.length),O.read(this,r,!0,23,4)};h.prototype.readFloatBE=function(r,t){return r=r>>>0,t||w(r,4,this.length),O.read(this,r,!1,23,4)};h.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||w(r,8,this.length),O.read(this,r,!0,52,8)};h.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||w(r,8,this.length),O.read(this,r,!1,52,8)};function g(e,r,t,i,n,o){if(!h.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>n||r<o)throw new RangeError('"value" argument is out of bounds');if(t+i>e.length)throw new RangeError("Index out of range")}h.prototype.writeUintLE=h.prototype.writeUIntLE=function(r,t,i,n){if(r=+r,t=t>>>0,i=i>>>0,!n){let c=Math.pow(2,8*i)-1;g(this,r,t,i,c,0)}let o=1,u=0;for(this[t]=r&255;++u<i&&(o*=256);)this[t+u]=r/o&255;return t+i};h.prototype.writeUintBE=h.prototype.writeUIntBE=function(r,t,i,n){if(r=+r,t=t>>>0,i=i>>>0,!n){let c=Math.pow(2,8*i)-1;g(this,r,t,i,c,0)}let o=i-1,u=1;for(this[t+o]=r&255;--o>=0&&(u*=256);)this[t+o]=r/u&255;return t+i};h.prototype.writeUint8=h.prototype.writeUInt8=function(r,t,i){return r=+r,t=t>>>0,i||g(this,r,t,1,255,0),this[t]=r&255,t+1};h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(r,t,i){return r=+r,t=t>>>0,i||g(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2};h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(r,t,i){return r=+r,t=t>>>0,i||g(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2};h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(r,t,i){return r=+r,t=t>>>0,i||g(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4};h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(r,t,i){return r=+r,t=t>>>0,i||g(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};function kr(e,r,t,i,n){Mr(r,i,n,e,t,7);let o=Number(r&BigInt(4294967295));e[t++]=o,o=o>>8,e[t++]=o,o=o>>8,e[t++]=o,o=o>>8,e[t++]=o;let u=Number(r>>BigInt(32)&BigInt(4294967295));return e[t++]=u,u=u>>8,e[t++]=u,u=u>>8,e[t++]=u,u=u>>8,e[t++]=u,t}function Or(e,r,t,i,n){Mr(r,i,n,e,t,7);let o=Number(r&BigInt(4294967295));e[t+7]=o,o=o>>8,e[t+6]=o,o=o>>8,e[t+5]=o,o=o>>8,e[t+4]=o;let u=Number(r>>BigInt(32)&BigInt(4294967295));return e[t+3]=u,u=u>>8,e[t+2]=u,u=u>>8,e[t+1]=u,u=u>>8,e[t]=u,t+8}h.prototype.writeBigUInt64LE=R(function(r,t=0){return kr(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))});h.prototype.writeBigUInt64BE=R(function(r,t=0){return Or(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))});h.prototype.writeIntLE=function(r,t,i,n){if(r=+r,t=t>>>0,!n){let p=Math.pow(2,8*i-1);g(this,r,t,i,p-1,-p)}let o=0,u=1,c=0;for(this[t]=r&255;++o<i&&(u*=256);)r<0&&c===0&&this[t+o-1]!==0&&(c=1),this[t+o]=(r/u>>0)-c&255;return t+i};h.prototype.writeIntBE=function(r,t,i,n){if(r=+r,t=t>>>0,!n){let p=Math.pow(2,8*i-1);g(this,r,t,i,p-1,-p)}let o=i-1,u=1,c=0;for(this[t+o]=r&255;--o>=0&&(u*=256);)r<0&&c===0&&this[t+o+1]!==0&&(c=1),this[t+o]=(r/u>>0)-c&255;return t+i};h.prototype.writeInt8=function(r,t,i){return r=+r,t=t>>>0,i||g(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1};h.prototype.writeInt16LE=function(r,t,i){return r=+r,t=t>>>0,i||g(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2};h.prototype.writeInt16BE=function(r,t,i){return r=+r,t=t>>>0,i||g(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2};h.prototype.writeInt32LE=function(r,t,i){return r=+r,t=t>>>0,i||g(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4};h.prototype.writeInt32BE=function(r,t,i){return r=+r,t=t>>>0,i||g(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};h.prototype.writeBigInt64LE=R(function(r,t=0){return kr(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});h.prototype.writeBigInt64BE=R(function(r,t=0){return Or(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function qr(e,r,t,i,n,o){if(t+i>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Gr(e,r,t,i,n){return r=+r,t=t>>>0,n||qr(e,r,t,4,34028234663852886e22,-34028234663852886e22),O.write(e,r,t,i,23,4),t+4}h.prototype.writeFloatLE=function(r,t,i){return Gr(this,r,t,!0,i)};h.prototype.writeFloatBE=function(r,t,i){return Gr(this,r,t,!1,i)};function Pr(e,r,t,i,n){return r=+r,t=t>>>0,n||qr(e,r,t,8,17976931348623157e292,-17976931348623157e292),O.write(e,r,t,i,52,8),t+8}h.prototype.writeDoubleLE=function(r,t,i){return Pr(this,r,t,!0,i)};h.prototype.writeDoubleBE=function(r,t,i){return Pr(this,r,t,!1,i)};h.prototype.copy=function(r,t,i,n){if(!h.isBuffer(r))throw new TypeError("argument should be a Buffer");if(i||(i=0),!n&&n!==0&&(n=this.length),t>=r.length&&(t=r.length),t||(t=0),n>0&&n<i&&(n=i),n===i||r.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),r.length-t<n-i&&(n=r.length-t+i);let o=n-i;return this===r&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,i,n):Uint8Array.prototype.set.call(r,this.subarray(i,n),t),o};h.prototype.fill=function(r,t,i,n){if(typeof r=="string"){if(typeof t=="string"?(n=t,t=0,i=this.length):typeof i=="string"&&(n=i,i=this.length),n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!h.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(r.length===1){let u=r.charCodeAt(0);(n==="utf8"&&u<128||n==="latin1")&&(r=u)}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;t=t>>>0,i=i===void 0?this.length:i>>>0,r||(r=0);let o;if(typeof r=="number")for(o=t;o<i;++o)this[o]=r;else{let u=h.isBuffer(r)?r:h.from(r,n),c=u.length;if(c===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(o=0;o<i-t;++o)this[o+t]=u[o%c]}return this};var G={};function fr(e,r,t){G[e]=class extends t{constructor(){super();Object.defineProperty(this,"message",{value:r.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(n){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:n,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}fr("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);fr("ERR_INVALID_ARG_TYPE",function(e,r){return`The "${e}" argument must be of type number. Received type ${typeof r}`},TypeError);fr("ERR_OUT_OF_RANGE",function(e,r,t){let i=`The value of "${e}" is out of range.`,n=t;return Number.isInteger(t)&&Math.abs(t)>2**32?n=$r(String(t)):typeof t=="bigint"&&(n=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(n=$r(n)),n+="n"),i+=` It must be ${r}. Received ${n}`,i},RangeError);function $r(e){let r="",t=e.length,i=e[0]==="-"?1:0;for(;t>=i+4;t-=3)r=`_${e.slice(t-3,t)}${r}`;return`${e.slice(0,t)}${r}`}function se(e,r,t){q(r,"offset"),(e[r]===void 0||e[r+t]===void 0)&&W(r,e.length-(t+1))}function Mr(e,r,t,i,n,o){if(e>t||e<r){let u=typeof r=="bigint"?"n":"",c;throw o>3?r===0||r===BigInt(0)?c=`>= 0${u} and < 2${u} ** ${(o+1)*8}${u}`:c=`>= -(2${u} ** ${(o+1)*8-1}${u}) and < 2 ** ${(o+1)*8-1}${u}`:c=`>= ${r}${u} and <= ${t}${u}`,new G.ERR_OUT_OF_RANGE("value",c,e)}se(i,n,o)}function q(e,r){if(typeof e!="number")throw new G.ERR_INVALID_ARG_TYPE(r,"number",e)}function W(e,r,t){throw Math.floor(e)!==e?(q(e,t),new G.ERR_OUT_OF_RANGE(t||"offset","an integer",e)):r<0?new G.ERR_BUFFER_OUT_OF_BOUNDS:new G.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${r}`,e)}var le=/[^+/0-9A-Za-z-_]/g;function ae(e){if(e=e.split("=")[0],e=e.trim().replace(le,""),e.length<2)return"";for(;e.length%4!=0;)e=e+"=";return e}function hr(e,r){r=r||Infinity;let t,i=e.length,n=null,o=[];for(let u=0;u<i;++u){if(t=e.charCodeAt(u),t>55295&&t<57344){if(!n){if(t>56319){(r-=3)>-1&&o.push(239,191,189);continue}else if(u+1===i){(r-=3)>-1&&o.push(239,191,189);continue}n=t;continue}if(t<56320){(r-=3)>-1&&o.push(239,191,189),n=t;continue}t=(n-55296<<10|t-56320)+65536}else n&&(r-=3)>-1&&o.push(239,191,189);if(n=null,t<128){if((r-=1)<0)break;o.push(t)}else if(t<2048){if((r-=2)<0)break;o.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;o.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;o.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return o}function ne(e){let r=[];for(let t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}function he(e,r){let t,i,n,o=[];for(let u=0;u<e.length&&!((r-=2)<0);++u)t=e.charCodeAt(u),i=t>>8,n=t%256,o.push(n),o.push(i);return o}function Sr(e){return tr.toByteArray(ae(e))}function V(e,r,t,i){let n;for(n=0;n<i&&!(n+t>=r.length||n>=e.length);++n)r[n+t]=e[n];return n}function U(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function ur(e){return e!==e}var pe=function(){let e="0123456789abcdef",r=new Array(256);for(let t=0;t<16;++t){let i=t*16;for(let n=0;n<16;++n)r[i+n]=e[t]+e[n]}return r}();function R(e){return typeof BigInt=="undefined"?ye:e}function ye(){throw new Error("BigInt not supported")}});var rt=B($=>{"use strict";var cr=Q(),H=rr(),Hr=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;$.Buffer=f;$.SlowBuffer=we;$.INSPECT_MAX_BYTES=50;var j=2147483647;$.kMaxLength=j;f.TYPED_ARRAY_SUPPORT=xe();!f.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function xe(){try{var e=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(e,r),e.foo()===42}catch(t){return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(!!f.isBuffer(this))return this.buffer}});Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(!!f.isBuffer(this))return this.byteOffset}});function L(e){if(e>j)throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=new Uint8Array(e);return Object.setPrototypeOf(r,f.prototype),r}function f(e,r,t){if(typeof e=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return pr(e)}return Wr(e,r,t)}f.poolSize=8192;function Wr(e,r,t){if(typeof e=="string")return Ee(e,r);if(ArrayBuffer.isView(e))return Be(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(_(e,ArrayBuffer)||e&&_(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(_(e,SharedArrayBuffer)||e&&_(e.buffer,SharedArrayBuffer)))return sr(e,r,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var i=e.valueOf&&e.valueOf();if(i!=null&&i!==e)return f.from(i,r,t);var n=ge(e);if(n)return n;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return f.from(e[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}f.from=function(e,r,t){return Wr(e,r,t)};Object.setPrototypeOf(f.prototype,Uint8Array.prototype);Object.setPrototypeOf(f,Uint8Array);function Xr(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function me(e,r,t){return Xr(e),e<=0?L(e):r!==void 0?typeof t=="string"?L(e).fill(r,t):L(e).fill(r):L(e)}f.alloc=function(e,r,t){return me(e,r,t)};function pr(e){return Xr(e),L(e<0?0:lr(e)|0)}f.allocUnsafe=function(e){return pr(e)};f.allocUnsafeSlow=function(e){return pr(e)};function Ee(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!f.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var t=Yr(e,r)|0,i=L(t),n=i.write(e,r);return n!==t&&(i=i.slice(0,n)),i}function ar(e){for(var r=e.length<0?0:lr(e.length)|0,t=L(r),i=0;i<r;i+=1)t[i]=e[i]&255;return t}function Be(e){if(_(e,Uint8Array)){var r=new Uint8Array(e);return sr(r.buffer,r.byteOffset,r.byteLength)}return ar(e)}function sr(e,r,t){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(t||0))throw new RangeError('"length" is outside of buffer bounds');var i;return r===void 0&&t===void 0?i=new Uint8Array(e):t===void 0?i=new Uint8Array(e,r):i=new Uint8Array(e,r,t),Object.setPrototypeOf(i,f.prototype),i}function ge(e){if(f.isBuffer(e)){var r=lr(e.length)|0,t=L(r);return t.length===0||e.copy(t,0,0,r),t}if(e.length!==void 0)return typeof e.length!="number"||yr(e.length)?L(0):ar(e);if(e.type==="Buffer"&&Array.isArray(e.data))return ar(e.data)}function lr(e){if(e>=j)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+j.toString(16)+" bytes");return e|0}function we(e){return+e!=e&&(e=0),f.alloc(+e)}f.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==f.prototype};f.compare=function(r,t){if(_(r,Uint8Array)&&(r=f.from(r,r.offset,r.byteLength)),_(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(r)||!f.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;for(var i=r.length,n=t.length,o=0,u=Math.min(i,n);o<u;++o)if(r[o]!==t[o]){i=r[o],n=t[o];break}return i<n?-1:n<i?1:0};f.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};f.concat=function(r,t){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return f.alloc(0);var i;if(t===void 0)for(t=0,i=0;i<r.length;++i)t+=r[i].length;var n=f.allocUnsafe(t),o=0;for(i=0;i<r.length;++i){var u=r[i];if(_(u,Uint8Array))o+u.length>n.length?f.from(u).copy(n,o):Uint8Array.prototype.set.call(n,u,o);else if(f.isBuffer(u))u.copy(n,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=u.length}return n};function Yr(e,r){if(f.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||_(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var t=e.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&t===0)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return wr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Vr(e).length;default:if(n)return i?-1:wr(e).length;r=(""+r).toLowerCase(),n=!0}}f.byteLength=Yr;function _e(e,r,t){var i=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ae(this,r,t);case"utf8":case"utf-8":return jr(this,r,t);case"ascii":return Ie(this,r,t);case"latin1":case"binary":return Fe(this,r,t);case"base64":return de(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ue(this,r,t);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}f.prototype._isBuffer=!0;function C(e,r,t){var i=e[r];e[r]=e[t],e[t]=i}f.prototype.swap16=function(){var r=this.length;if(r%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<r;t+=2)C(this,t,t+1);return this};f.prototype.swap32=function(){var r=this.length;if(r%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<r;t+=4)C(this,t,t+3),C(this,t+1,t+2);return this};f.prototype.swap64=function(){var r=this.length;if(r%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<r;t+=8)C(this,t,t+7),C(this,t+1,t+6),C(this,t+2,t+5),C(this,t+3,t+4);return this};f.prototype.toString=function(){var r=this.length;return r===0?"":arguments.length===0?jr(this,0,r):_e.apply(this,arguments)};f.prototype.toLocaleString=f.prototype.toString;f.prototype.equals=function(r){if(!f.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:f.compare(this,r)===0};f.prototype.inspect=function(){var r="",t=$.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"};Hr&&(f.prototype[Hr]=f.prototype.inspect);f.prototype.compare=function(r,t,i,n,o){if(_(r,Uint8Array)&&(r=f.from(r,r.offset,r.byteLength)),!f.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),i===void 0&&(i=r?r.length:0),n===void 0&&(n=0),o===void 0&&(o=this.length),t<0||i>r.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=i)return 0;if(n>=o)return-1;if(t>=i)return 1;if(t>>>=0,i>>>=0,n>>>=0,o>>>=0,this===r)return 0;for(var u=o-n,c=i-t,p=Math.min(u,c),a=this.slice(n,o),l=r.slice(t,i),s=0;s<p;++s)if(a[s]!==l[s]){u=a[s],c=l[s];break}return u<c?-1:c<u?1:0};function Zr(e,r,t,i,n){if(e.length===0)return-1;if(typeof t=="string"?(i=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,yr(t)&&(t=n?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(n)return-1;t=e.length-1}else if(t<0)if(n)t=0;else return-1;if(typeof r=="string"&&(r=f.from(r,i)),f.isBuffer(r))return r.length===0?-1:zr(e,r,t,i,n);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):zr(e,[r],t,i,n);throw new TypeError("val must be string, number or Buffer")}function zr(e,r,t,i,n){var o=1,u=e.length,c=r.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(e.length<2||r.length<2)return-1;o=2,u/=2,c/=2,t/=2}function p(d,N){return o===1?d[N]:d.readUInt16BE(N*o)}var a;if(n){var l=-1;for(a=t;a<u;a++)if(p(e,a)===p(r,l===-1?0:a-l)){if(l===-1&&(l=a),a-l+1===c)return l*o}else l!==-1&&(a-=a-l),l=-1}else for(t+c>u&&(t=u-c),a=t;a>=0;a--){for(var s=!0,E=0;E<c;E++)if(p(e,a+E)!==p(r,E)){s=!1;break}if(s)return a}return-1}f.prototype.includes=function(r,t,i){return this.indexOf(r,t,i)!==-1};f.prototype.indexOf=function(r,t,i){return Zr(this,r,t,i,!0)};f.prototype.lastIndexOf=function(r,t,i){return Zr(this,r,t,i,!1)};function Te(e,r,t,i){t=Number(t)||0;var n=e.length-t;i?(i=Number(i),i>n&&(i=n)):i=n;var o=r.length;i>o/2&&(i=o/2);for(var u=0;u<i;++u){var c=parseInt(r.substr(u*2,2),16);if(yr(c))return u;e[t+u]=c}return u}function Le(e,r,t,i){return z(wr(r,e.length-t),e,t,i)}function Se(e,r,t,i){return z(Re(r),e,t,i)}function be(e,r,t,i){return z(Vr(r),e,t,i)}function De(e,r,t,i){return z(Ce(r,e.length-t),e,t,i)}f.prototype.write=function(r,t,i,n){if(t===void 0)n="utf8",i=this.length,t=0;else if(i===void 0&&typeof t=="string")n=t,i=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(i)?(i=i>>>0,n===void 0&&(n="utf8")):(n=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-t;if((i===void 0||i>o)&&(i=o),r.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var u=!1;;)switch(n){case"hex":return Te(this,r,t,i);case"utf8":case"utf-8":return Le(this,r,t,i);case"ascii":case"latin1":case"binary":return Se(this,r,t,i);case"base64":return be(this,r,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return De(this,r,t,i);default:if(u)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),u=!0}};f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function de(e,r,t){return r===0&&t===e.length?cr.fromByteArray(e):cr.fromByteArray(e.slice(r,t))}function jr(e,r,t){t=Math.min(e.length,t);for(var i=[],n=r;n<t;){var o=e[n],u=null,c=o>239?4:o>223?3:o>191?2:1;if(n+c<=t){var p,a,l,s;switch(c){case 1:o<128&&(u=o);break;case 2:p=e[n+1],(p&192)==128&&(s=(o&31)<<6|p&63,s>127&&(u=s));break;case 3:p=e[n+1],a=e[n+2],(p&192)==128&&(a&192)==128&&(s=(o&15)<<12|(p&63)<<6|a&63,s>2047&&(s<55296||s>57343)&&(u=s));break;case 4:p=e[n+1],a=e[n+2],l=e[n+3],(p&192)==128&&(a&192)==128&&(l&192)==128&&(s=(o&15)<<18|(p&63)<<12|(a&63)<<6|l&63,s>65535&&s<1114112&&(u=s))}}u===null?(u=65533,c=1):u>65535&&(u-=65536,i.push(u>>>10&1023|55296),u=56320|u&1023),i.push(u),n+=c}return Ne(i)}var Jr=4096;function Ne(e){var r=e.length;if(r<=Jr)return String.fromCharCode.apply(String,e);for(var t="",i=0;i<r;)t+=String.fromCharCode.apply(String,e.slice(i,i+=Jr));return t}function Ie(e,r,t){var i="";t=Math.min(e.length,t);for(var n=r;n<t;++n)i+=String.fromCharCode(e[n]&127);return i}function Fe(e,r,t){var i="";t=Math.min(e.length,t);for(var n=r;n<t;++n)i+=String.fromCharCode(e[n]);return i}function Ae(e,r,t){var i=e.length;(!r||r<0)&&(r=0),(!t||t<0||t>i)&&(t=i);for(var n="",o=r;o<t;++o)n+=Me[e[o]];return n}function Ue(e,r,t){for(var i=e.slice(r,t),n="",o=0;o<i.length-1;o+=2)n+=String.fromCharCode(i[o]+i[o+1]*256);return n}f.prototype.slice=function(r,t){var i=this.length;r=~~r,t=t===void 0?i:~~t,r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),t<r&&(t=r);var n=this.subarray(r,t);return Object.setPrototypeOf(n,f.prototype),n};function x(e,r,t){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+r>t)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(r,t,i){r=r>>>0,t=t>>>0,i||x(r,t,this.length);for(var n=this[r],o=1,u=0;++u<t&&(o*=256);)n+=this[r+u]*o;return n};f.prototype.readUintBE=f.prototype.readUIntBE=function(r,t,i){r=r>>>0,t=t>>>0,i||x(r,t,this.length);for(var n=this[r+--t],o=1;t>0&&(o*=256);)n+=this[r+--t]*o;return n};f.prototype.readUint8=f.prototype.readUInt8=function(r,t){return r=r>>>0,t||x(r,1,this.length),this[r]};f.prototype.readUint16LE=f.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||x(r,2,this.length),this[r]|this[r+1]<<8};f.prototype.readUint16BE=f.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||x(r,2,this.length),this[r]<<8|this[r+1]};f.prototype.readUint32LE=f.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||x(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};f.prototype.readUint32BE=f.prototype.readUInt32BE=function(r,t){return r=r>>>0,t||x(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};f.prototype.readIntLE=function(r,t,i){r=r>>>0,t=t>>>0,i||x(r,t,this.length);for(var n=this[r],o=1,u=0;++u<t&&(o*=256);)n+=this[r+u]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n};f.prototype.readIntBE=function(r,t,i){r=r>>>0,t=t>>>0,i||x(r,t,this.length);for(var n=t,o=1,u=this[r+--n];n>0&&(o*=256);)u+=this[r+--n]*o;return o*=128,u>=o&&(u-=Math.pow(2,8*t)),u};f.prototype.readInt8=function(r,t){return r=r>>>0,t||x(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};f.prototype.readInt16LE=function(r,t){r=r>>>0,t||x(r,2,this.length);var i=this[r]|this[r+1]<<8;return i&32768?i|4294901760:i};f.prototype.readInt16BE=function(r,t){r=r>>>0,t||x(r,2,this.length);var i=this[r+1]|this[r]<<8;return i&32768?i|4294901760:i};f.prototype.readInt32LE=function(r,t){return r=r>>>0,t||x(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};f.prototype.readInt32BE=function(r,t){return r=r>>>0,t||x(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};f.prototype.readFloatLE=function(r,t){return r=r>>>0,t||x(r,4,this.length),H.read(this,r,!0,23,4)};f.prototype.readFloatBE=function(r,t){return r=r>>>0,t||x(r,4,this.length),H.read(this,r,!1,23,4)};f.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||x(r,8,this.length),H.read(this,r,!0,52,8)};f.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||x(r,8,this.length),H.read(this,r,!1,52,8)};function m(e,r,t,i,n,o){if(!f.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>n||r<o)throw new RangeError('"value" argument is out of bounds');if(t+i>e.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(r,t,i,n){if(r=+r,t=t>>>0,i=i>>>0,!n){var o=Math.pow(2,8*i)-1;m(this,r,t,i,o,0)}var u=1,c=0;for(this[t]=r&255;++c<i&&(u*=256);)this[t+c]=r/u&255;return t+i};f.prototype.writeUintBE=f.prototype.writeUIntBE=function(r,t,i,n){if(r=+r,t=t>>>0,i=i>>>0,!n){var o=Math.pow(2,8*i)-1;m(this,r,t,i,o,0)}var u=i-1,c=1;for(this[t+u]=r&255;--u>=0&&(c*=256);)this[t+u]=r/c&255;return t+i};f.prototype.writeUint8=f.prototype.writeUInt8=function(r,t,i){return r=+r,t=t>>>0,i||m(this,r,t,1,255,0),this[t]=r&255,t+1};f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(r,t,i){return r=+r,t=t>>>0,i||m(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2};f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(r,t,i){return r=+r,t=t>>>0,i||m(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2};f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(r,t,i){return r=+r,t=t>>>0,i||m(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4};f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(r,t,i){return r=+r,t=t>>>0,i||m(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};f.prototype.writeIntLE=function(r,t,i,n){if(r=+r,t=t>>>0,!n){var o=Math.pow(2,8*i-1);m(this,r,t,i,o-1,-o)}var u=0,c=1,p=0;for(this[t]=r&255;++u<i&&(c*=256);)r<0&&p===0&&this[t+u-1]!==0&&(p=1),this[t+u]=(r/c>>0)-p&255;return t+i};f.prototype.writeIntBE=function(r,t,i,n){if(r=+r,t=t>>>0,!n){var o=Math.pow(2,8*i-1);m(this,r,t,i,o-1,-o)}var u=i-1,c=1,p=0;for(this[t+u]=r&255;--u>=0&&(c*=256);)r<0&&p===0&&this[t+u+1]!==0&&(p=1),this[t+u]=(r/c>>0)-p&255;return t+i};f.prototype.writeInt8=function(r,t,i){return r=+r,t=t>>>0,i||m(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1};f.prototype.writeInt16LE=function(r,t,i){return r=+r,t=t>>>0,i||m(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2};f.prototype.writeInt16BE=function(r,t,i){return r=+r,t=t>>>0,i||m(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2};f.prototype.writeInt32LE=function(r,t,i){return r=+r,t=t>>>0,i||m(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4};f.prototype.writeInt32BE=function(r,t,i){return r=+r,t=t>>>0,i||m(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};function Kr(e,r,t,i,n,o){if(t+i>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Qr(e,r,t,i,n){return r=+r,t=t>>>0,n||Kr(e,r,t,4,34028234663852886e22,-34028234663852886e22),H.write(e,r,t,i,23,4),t+4}f.prototype.writeFloatLE=function(r,t,i){return Qr(this,r,t,!0,i)};f.prototype.writeFloatBE=function(r,t,i){return Qr(this,r,t,!1,i)};function vr(e,r,t,i,n){return r=+r,t=t>>>0,n||Kr(e,r,t,8,17976931348623157e292,-17976931348623157e292),H.write(e,r,t,i,52,8),t+8}f.prototype.writeDoubleLE=function(r,t,i){return vr(this,r,t,!0,i)};f.prototype.writeDoubleBE=function(r,t,i){return vr(this,r,t,!1,i)};f.prototype.copy=function(r,t,i,n){if(!f.isBuffer(r))throw new TypeError("argument should be a Buffer");if(i||(i=0),!n&&n!==0&&(n=this.length),t>=r.length&&(t=r.length),t||(t=0),n>0&&n<i&&(n=i),n===i||r.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),r.length-t<n-i&&(n=r.length-t+i);var o=n-i;return this===r&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,i,n):Uint8Array.prototype.set.call(r,this.subarray(i,n),t),o};f.prototype.fill=function(r,t,i,n){if(typeof r=="string"){if(typeof t=="string"?(n=t,t=0,i=this.length):typeof i=="string"&&(n=i,i=this.length),n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(r.length===1){var o=r.charCodeAt(0);(n==="utf8"&&o<128||n==="latin1")&&(r=o)}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;t=t>>>0,i=i===void 0?this.length:i>>>0,r||(r=0);var u;if(typeof r=="number")for(u=t;u<i;++u)this[u]=r;else{var c=f.isBuffer(r)?r:f.from(r,n),p=c.length;if(p===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(u=0;u<i-t;++u)this[u+t]=c[u%p]}return this};var ke=/[^+/0-9A-Za-z-_]/g;function Oe(e){if(e=e.split("=")[0],e=e.trim().replace(ke,""),e.length<2)return"";for(;e.length%4!=0;)e=e+"=";return e}function wr(e,r){r=r||Infinity;for(var t,i=e.length,n=null,o=[],u=0;u<i;++u){if(t=e.charCodeAt(u),t>55295&&t<57344){if(!n){if(t>56319){(r-=3)>-1&&o.push(239,191,189);continue}else if(u+1===i){(r-=3)>-1&&o.push(239,191,189);continue}n=t;continue}if(t<56320){(r-=3)>-1&&o.push(239,191,189),n=t;continue}t=(n-55296<<10|t-56320)+65536}else n&&(r-=3)>-1&&o.push(239,191,189);if(n=null,t<128){if((r-=1)<0)break;o.push(t)}else if(t<2048){if((r-=2)<0)break;o.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;o.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;o.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return o}function Re(e){for(var r=[],t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}function Ce(e,r){for(var t,i,n,o=[],u=0;u<e.length&&!((r-=2)<0);++u)t=e.charCodeAt(u),i=t>>8,n=t%256,o.push(n),o.push(i);return o}function Vr(e){return cr.toByteArray(Oe(e))}function z(e,r,t,i){for(var n=0;n<i&&!(n+t>=r.length||n>=e.length);++n)r[n+t]=e[n];return n}function _(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function yr(e){return e!==e}var Me=function(){for(var e="0123456789abcdef",r=new Array(256),t=0;t<16;++t)for(var i=t*16,n=0;n<16;++n)r[i+n]=e[t]+e[n];return r}()});var xr=B((pi,tt)=>{"use strict";var{Buffer:F}=rt(),et=Symbol.for("BufferList");function y(e){if(!(this instanceof y))return new y(e);y._init.call(this,e)}y._init=function(r){Object.defineProperty(this,et,{value:!0}),this._bufs=[],this.length=0,r&&this.append(r)};y.prototype._new=function(r){return new y(r)};y.prototype._offset=function(r){if(r===0)return[0,0];let t=0;for(let i=0;i<this._bufs.length;i++){let n=t+this._bufs[i].length;if(r<n||i===this._bufs.length-1)return[i,r-t];t=n}};y.prototype._reverseOffset=function(e){let r=e[0],t=e[1];for(let i=0;i<r;i++)t+=this._bufs[i].length;return t};y.prototype.get=function(r){if(r>this.length||r<0)return;let t=this._offset(r);return this._bufs[t[0]][t[1]]};y.prototype.slice=function(r,t){return typeof r=="number"&&r<0&&(r+=this.length),typeof t=="number"&&t<0&&(t+=this.length),this.copy(null,0,r,t)};y.prototype.copy=function(r,t,i,n){if((typeof i!="number"||i<0)&&(i=0),(typeof n!="number"||n>this.length)&&(n=this.length),i>=this.length||n<=0)return r||F.alloc(0);let o=!!r,u=this._offset(i),c=n-i,p=c,a=o&&t||0,l=u[1];if(i===0&&n===this.length){if(!o)return this._bufs.length===1?this._bufs[0]:F.concat(this._bufs,this.length);for(let s=0;s<this._bufs.length;s++)this._bufs[s].copy(r,a),a+=this._bufs[s].length;return r}if(p<=this._bufs[u[0]].length-l)return o?this._bufs[u[0]].copy(r,t,l,l+p):this._bufs[u[0]].slice(l,l+p);o||(r=F.allocUnsafe(c));for(let s=u[0];s<this._bufs.length;s++){let E=this._bufs[s].length-l;if(p>E)this._bufs[s].copy(r,a,l),a+=E;else{this._bufs[s].copy(r,a,l,l+p),a+=E;break}p-=E,l&&(l=0)}return r.length>a?r.slice(0,a):r};y.prototype.shallowSlice=function(r,t){if(r=r||0,t=typeof t!="number"?this.length:t,r<0&&(r+=this.length),t<0&&(t+=this.length),r===t)return this._new();let i=this._offset(r),n=this._offset(t),o=this._bufs.slice(i[0],n[0]+1);return n[1]===0?o.pop():o[o.length-1]=o[o.length-1].slice(0,n[1]),i[1]!==0&&(o[0]=o[0].slice(i[1])),this._new(o)};y.prototype.toString=function(r,t,i){return this.slice(t,i).toString(r)};y.prototype.consume=function(r){if(r=Math.trunc(r),Number.isNaN(r)||r<=0)return this;for(;this._bufs.length;)if(r>=this._bufs[0].length)r-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(r),this.length-=r;break}return this};y.prototype.duplicate=function(){let r=this._new();for(let t=0;t<this._bufs.length;t++)r.append(this._bufs[t]);return r};y.prototype.append=function(r){if(r==null)return this;if(r.buffer)this._appendBuffer(F.from(r.buffer,r.byteOffset,r.byteLength));else if(Array.isArray(r))for(let t=0;t<r.length;t++)this.append(r[t]);else if(this._isBufferList(r))for(let t=0;t<r._bufs.length;t++)this.append(r._bufs[t]);else typeof r=="number"&&(r=r.toString()),this._appendBuffer(F.from(r));return this};y.prototype._appendBuffer=function(r){this._bufs.push(r),this.length+=r.length};y.prototype.indexOf=function(e,r,t){if(t===void 0&&typeof r=="string"&&(t=r,r=void 0),typeof e=="function"||Array.isArray(e))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof e=="number"?e=F.from([e]):typeof e=="string"?e=F.from(e,t):this._isBufferList(e)?e=e.slice():Array.isArray(e.buffer)?e=F.from(e.buffer,e.byteOffset,e.byteLength):F.isBuffer(e)||(e=F.from(e)),r=Number(r||0),isNaN(r)&&(r=0),r<0&&(r=this.length+r),r<0&&(r=0),e.length===0)return r>this.length?this.length:r;let i=this._offset(r),n=i[0],o=i[1];for(;n<this._bufs.length;n++){let u=this._bufs[n];for(;o<u.length;)if(u.length-o>=e.length){let p=u.indexOf(e,o);if(p!==-1)return this._reverseOffset([n,p]);o=u.length-e.length+1}else{let p=this._reverseOffset([n,o]);if(this._match(p,e))return p;o++}o=0}return-1};y.prototype._match=function(e,r){if(this.length-e<r.length)return!1;for(let t=0;t<r.length;t++)if(this.get(e+t)!==r[t])return!1;return!0};(function(){let e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let r in e)(function(t){e[t]===null?y.prototype[t]=function(i,n){return this.slice(i,i+n)[t](0,n)}:y.prototype[t]=function(i=0){return this.slice(i,i+e[t])[t](0)}})(r)})();y.prototype._isBufferList=function(r){return r instanceof y||y.isBufferList(r)};y.isBufferList=function(r){return r!=null&&r[et]};tt.exports=y});var ot=B((si,it)=>{it.exports=Er;var nt=128,qe=127,Ge=~qe,Pe=Math.pow(2,31);function Er(e,r,t){if(Number.MAX_SAFE_INTEGER&&e>Number.MAX_SAFE_INTEGER)throw Er.bytes=0,new RangeError("Could not encode varint");r=r||[],t=t||0;for(var i=t;e>=Pe;)r[t++]=e&255|nt,e/=128;for(;e&Ge;)r[t++]=e&255|nt,e>>>=7;return r[t]=e|0,Er.bytes=t-i+1,r}});var ft=B((li,ut)=>{ut.exports=Br;var $e=128,ht=127;function Br(e,r){var t=0,r=r||0,i=0,n=r,o,u=e.length;do{if(n>=u||i>49)throw Br.bytes=0,new RangeError("Could not decode varint");o=e[n++],t+=i<28?(o&ht)<<i:(o&ht)*Math.pow(2,i),i+=7}while(o>=$e);return Br.bytes=n-r,t}});var pt=B((ai,ct)=>{var He=Math.pow(2,7),We=Math.pow(2,14),Xe=Math.pow(2,21),Ye=Math.pow(2,28),Ve=Math.pow(2,35),je=Math.pow(2,42),ze=Math.pow(2,49),Ze=Math.pow(2,56),Je=Math.pow(2,63);ct.exports=function(e){return e<He?1:e<We?2:e<Xe?3:e<Ye?4:e<Ve?5:e<je?6:e<ze?7:e<Ze?8:e<Je?9:10}});var gr=B((yi,st)=>{st.exports={encode:ot(),decode:ft(),encodingLength:pt()}});var mr=B((wi,lt)=>{"use strict";var at=gr(),{Buffer:Ke}=P(),yt=(e,r,t)=>{let i=at.encode(e,r,t);return yt.bytes=at.encode.bytes,r||Ke.from(i)};lt.exports=yt});var mt=B((xi,Z)=>{"use strict";var{Buffer:wt}=P(),xt=xr(),Et=mr(),dr=8,Bt=10*1024;function gt(e){e=e||{};let r=Math.max(e.poolSize||Bt,e.minPoolSize||dr),t=e.lengthEncoder||Et;return i=>async function*(){let n=wt.alloc(r),o=0;for await(let u of i){t(u.length,n,o);let c=n.slice(o,o+t.bytes);o+=t.bytes,n.length-o<dr&&(n=wt.alloc(r),o=0),yield new xt().append(c).append(u)}}()}gt.single=(e,r)=>{r=r||{};let t=r.lengthEncoder||Et;return new xt([t(e.length),e])};Z.exports=gt;Z.exports.MIN_POOL_SIZE=dr;Z.exports.DEFAULT_POOL_SIZE=Bt});var Ir=B((Ei,dt)=>{"use strict";var{Buffer:Qe}=P(),It=gr(),ve=e=>new Proxy({},{get:(r,t)=>t[0]==="l"?e[t]:e.get(parseInt(t))}),Ft=e=>{let r=It.decode(Qe.isBuffer(e)?e:ve(e));return Ft.bytes=It.decode.bytes,r};dt.exports=Ft});var Tt=B((Bi,J)=>{"use strict";var{Buffer:ri}=P(),Fr=xr(),ti=Ir(),At=8,Ut=1024*1024*4,_t=ri.alloc(0),S={LENGTH:"readLength",DATA:"readData"},ei={[S.LENGTH]:(e,r,t,i)=>{r=r.append(e);let n;try{n=i.lengthDecoder(r)}catch(o){if(r.length>i.maxLengthLength)throw Object.assign(o,{message:"message length too long",code:"ERR_MSG_LENGTH_TOO_LONG"});if(o instanceof RangeError)return{mode:S.LENGTH,buffer:r};throw o}if(n>i.maxDataLength)throw Object.assign(new Error("message data too long"),{code:"ERR_MSG_DATA_TOO_LONG"});return e=r.shallowSlice(i.lengthDecoder.bytes),r=new Fr,i.onLength&&i.onLength(n),n<=0?(i.onData&&i.onData(_t),{mode:S.LENGTH,chunk:e,buffer:r,data:_t}):{mode:S.DATA,chunk:e,buffer:r,state:{dataLength:n}}},[S.DATA]:(e,r,t,i)=>{if(r=r.append(e),r.length<t.dataLength)return{mode:S.DATA,buffer:r,state:t};let{dataLength:n}=t,o=r.shallowSlice(0,n);return e=r.length>n?r.shallowSlice(n):null,r=new Fr,i.onData&&i.onData(o),{mode:S.LENGTH,chunk:e,buffer:r,data:o}}};function Ar(e){return e=e||{},e.lengthDecoder=e.lengthDecoder||ti,e.maxLengthLength=e.maxLengthLength||At,e.maxDataLength=e.maxDataLength||Ut,r=>async function*(){let t=new Fr,i=S.LENGTH,n;for await(let o of r)for(;o;){let u=ei[i](o,t,n,e);({mode:i,chunk:o,buffer:t,state:n}=u),u.data&&(yield u.data)}if(t.length)throw Object.assign(new Error("unexpected end of input"),{code:"ERR_UNEXPECTED_EOF"})}()}Ar.fromReader=(e,r)=>{r=r||{};let t=1,i={[Symbol.asyncIterator](){return this},next:async()=>{try{return await e.next(t)}catch(n){if(n.code==="ERR_UNDER_READ")return{done:!0,value:null};throw n}finally{t=1}}};return r.onLength=n=>{t=n},Ar(r)(i)};J.exports=Ar;J.exports.MAX_LENGTH_LENGTH=At;J.exports.MAX_DATA_LENGTH=Ut});var St=B((gi,Lt)=>{"use strict";var{Buffer:ii}=P(),Rt=(e,r,t)=>(r=r||ii.allocUnsafe(4),r.writeInt32BE(e,t),r);Rt.bytes=4;Lt.exports=Rt});var Dt=B((mi,bt)=>{"use strict";var Ct=e=>{if(e.length<4)throw RangeError("Could not decode int32BE");return e.readInt32BE(0)};Ct.bytes=4;bt.exports=Ct});var Nt=B(D=>{"use strict";D.encode=mt();D.decode=Tt();D.varintEncode=mr();D.varintDecode=Ir();D.int32BEEncode=St();D.int32BEDecode=Dt()});return Nt();})();
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
return ItLengthPrefixed}));

15

package.json
{
"name": "it-length-prefixed",
"version": "3.1.0",
"version": "4.0.0",
"description": "Streaming length prefixed buffers with async iterables",

@@ -38,9 +38,9 @@ "main": "src/index.js",

"dependencies": {
"@types/bl": "^2.1.0",
"@types/bl": "^4.1.0",
"bl": "^4.0.2",
"buffer": "^5.5.0",
"varint": "^5.0.0"
"buffer": "^6.0.3",
"varint": "^6.0.0"
},
"devDependencies": {
"aegir": "^25.0.0",
"aegir": "^32.2.0",
"chai": "^4.2.0",

@@ -60,8 +60,9 @@ "iso-random-stream": "^1.1.1",

"Jacob Heun <jacobheun@gmail.com>",
"Alex Potsides <alex@achingbrain.net>",
"Maciej Krüger <mkg20001@gmail.com>",
"Projjol Banerji <probaner23@gmail.com>",
"Richard Littauer <richard.littauer@gmail.com>",
"Hugo Dias <mail@hugodias.me>",
"Dmitriy Ryajov <dryajov@gmail.com>"
"Dmitriy Ryajov <dryajov@gmail.com>",
"Hugo Dias <mail@hugodias.me>"
]
}

@@ -8,3 +8,3 @@ # it-length-prefixed

![Codecov](https://img.shields.io/codecov/c/gh/alanshaw/it-length-prefixed.svg?style=flat-square)
[![Dependency Status](https://david-dm.org/alanshaw/it-length-prefixed.svg?style=flat-square)](https://david-dm.org/alanshaw/it-length-prefixed)
[![Dependency Status](https://status.david-dm.org/gh/alanshaw/it-length-prefixed.svg?style=flat-square)](https://david-dm.org/alanshaw/it-length-prefixed)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)

@@ -11,0 +11,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc