Comparing version 6.0.10 to 7.0.0
@@ -0,1 +1,6 @@ | ||
<a name="7.0.0"></a> | ||
# [7.0.0](https://github.com/multiformats/js-mafmt/compare/v6.0.10...v7.0.0) (2019-09-11) | ||
<a name="6.0.10"></a> | ||
@@ -2,0 +7,0 @@ ## [6.0.10](https://github.com/multiformats/js-mafmt/compare/v6.0.9...v6.0.10) (2019-09-11) |
@@ -1,2 +0,2 @@ | ||
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.Mafmt=r():t.Mafmt=r()}(window,(function(){return function(t){var r={};function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)e.d(n,o,function(r){return t[r]}.bind(null,o));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=5)}([function(t,r,e){"use strict";(function(t){var n=e(8),o=e(9),i=e(10);function s(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,r){if(s()<r)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=a.prototype:(null===t&&(t=new a(r)),t.length=r),t}function a(t,r,e){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return h(this,t)}return f(this,t,r,e)}function f(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?function(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n);a.TYPED_ARRAY_SUPPORT?(t=r).__proto__=a.prototype:t=p(t,r);return t}(t,r,e,n):"string"==typeof r?function(t,r,e){"string"==typeof e&&""!==e||(e="utf8");if(!a.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(r,e),o=(t=u(t,n)).write(r,e);o!==n&&(t=t.slice(0,o));return t}(t,r,e):function(t,r){if(a.isBuffer(r)){var e=0|l(r.length);return 0===(t=u(t,e)).length?t:(r.copy(t,0,0,e),t)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||(n=r.length)!=n?u(t,0):p(t,r);if("Buffer"===r.type&&i(r.data))return p(t,r.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,r)}function c(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 h(t,r){if(c(r),t=u(t,r<0?0:0|l(r)),!a.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function p(t,r){var e=r.length<0?0:0|l(r.length);t=u(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function l(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,r){if(a.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 e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return $(t).length;default:if(n)return F(t).length;r=(""+r).toLowerCase(),n=!0}}function g(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,r,e);case"utf8":case"utf-8":return C(this,r,e);case"ascii":return R(this,r,e);case"latin1":case"binary":return _(this,r,e);case"base64":return B(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function w(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function y(t,r,e,n,o){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=o?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(o)return-1;e=t.length-1}else if(e<0){if(!o)return-1;e=0}if("string"==typeof r&&(r=a.from(r,n)),a.isBuffer(r))return 0===r.length?-1:m(t,r,e,n,o);if("number"==typeof r)return r&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):m(t,[r],e,n,o);throw new TypeError("val must be string, number or Buffer")}function m(t,r,e,n,o){var i,s=1,u=t.length,a=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;s=2,u/=2,a/=2,e/=2}function f(t,r){return 1===s?t[r]:t.readUInt16BE(r*s)}if(o){var c=-1;for(i=e;i<u;i++)if(f(t,i)===f(r,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===a)return c*s}else-1!==c&&(i-=i-c),c=-1}else for(e+a>u&&(e=u-a),i=e;i>=0;i--){for(var h=!0,p=0;p<a;p++)if(f(t,i+p)!==f(r,p)){h=!1;break}if(h)return i}return-1}function v(t,r,e,n){e=Number(e)||0;var o=t.length-e;n?(n=Number(n))>o&&(n=o):n=o;var i=r.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var s=0;s<n;++s){var u=parseInt(r.substr(2*s,2),16);if(isNaN(u))return s;t[e+s]=u}return s}function b(t,r,e,n){return z(F(r,t.length-e),t,e,n)}function A(t,r,e,n){return z(function(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}(r),t,e,n)}function E(t,r,e,n){return A(t,r,e,n)}function S(t,r,e,n){return z($(r),t,e,n)}function T(t,r,e,n){return z(function(t,r){for(var e,n,o,i=[],s=0;s<t.length&&!((r-=2)<0);++s)e=t.charCodeAt(s),n=e>>8,o=e%256,i.push(o),i.push(n);return i}(r,t.length-e),t,e,n)}function B(t,r,e){return 0===r&&e===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(r,e))}function C(t,r,e){e=Math.min(t.length,e);for(var n=[],o=r;o<e;){var i,s,u,a,f=t[o],c=null,h=f>239?4:f>223?3:f>191?2:1;if(o+h<=e)switch(h){case 1:f<128&&(c=f);break;case 2:128==(192&(i=t[o+1]))&&(a=(31&f)<<6|63&i)>127&&(c=a);break;case 3:i=t[o+1],s=t[o+2],128==(192&i)&&128==(192&s)&&(a=(15&f)<<12|(63&i)<<6|63&s)>2047&&(a<55296||a>57343)&&(c=a);break;case 4:i=t[o+1],s=t[o+2],u=t[o+3],128==(192&i)&&128==(192&s)&&128==(192&u)&&(a=(15&f)<<18|(63&i)<<12|(63&s)<<6|63&u)>65535&&a<1114112&&(c=a)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),o+=h}return function(t){var r=t.length;if(r<=P)return String.fromCharCode.apply(String,t);var e="",n=0;for(;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=P));return e}(n)}r.Buffer=a,r.SlowBuffer=function(t){+t!=t&&(t=0);return a.alloc(+t)},r.INSPECT_MAX_BYTES=50,a.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(r){return!1}}(),r.kMaxLength=s(),a.poolSize=8192,a._augment=function(t){return t.__proto__=a.prototype,t},a.from=function(t,r,e){return f(null,t,r,e)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(t,r,e){return function(t,r,e,n){return c(r),r<=0?u(t,r):void 0!==e?"string"==typeof n?u(t,r).fill(e,n):u(t,r).fill(e):u(t,r)}(null,t,r,e)},a.allocUnsafe=function(t){return h(null,t)},a.allocUnsafeSlow=function(t){return h(null,t)},a.isBuffer=function(t){return!(null==t||!t._isBuffer)},a.compare=function(t,r){if(!a.isBuffer(t)||!a.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,o=0,i=Math.min(e,n);o<i;++o)if(t[o]!==r[o]){e=t[o],n=r[o];break}return e<n?-1:n<e?1:0},a.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}},a.concat=function(t,r){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var n=a.allocUnsafe(r),o=0;for(e=0;e<t.length;++e){var s=t[e];if(!a.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,o),o+=s.length}return n},a.byteLength=d,a.prototype._isBuffer=!0,a.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 r=0;r<t;r+=2)w(this,r,r+1);return this},a.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 r=0;r<t;r+=4)w(this,r,r+3),w(this,r+1,r+2);return this},a.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 r=0;r<t;r+=8)w(this,r,r+7),w(this,r+1,r+6),w(this,r+2,r+5),w(this,r+3,r+4);return this},a.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?C(this,0,t):g.apply(this,arguments)},a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},a.prototype.compare=function(t,r,e,n,o){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),r<0||e>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&r>=e)return 0;if(n>=o)return-1;if(r>=e)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(e>>>=0)-(r>>>=0),u=Math.min(i,s),f=this.slice(n,o),c=t.slice(r,e),h=0;h<u;++h)if(f[h]!==c[h]){i=f[h],s=c[h];break}return i<s?-1:s<i?1:0},a.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},a.prototype.indexOf=function(t,r,e){return y(this,t,r,e,!0)},a.prototype.lastIndexOf=function(t,r,e){return y(this,t,r,e,!1)},a.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var o=this.length-r;if((void 0===e||e>o)&&(e=o),t.length>0&&(e<0||r<0)||r>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,r,e);case"utf8":case"utf-8":return b(this,t,r,e);case"ascii":return A(this,t,r,e);case"latin1":case"binary":return E(this,t,r,e);case"base64":return S(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r,e);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var P=4096;function R(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(127&t[o]);return n}function _(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(t[o]);return n}function x(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var o="",i=r;i<e;++i)o+=D(t[i]);return o}function U(t,r,e){for(var n=t.slice(r,e),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function M(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function I(t,r,e,n,o,i){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<i)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function L(t,r,e,n){r<0&&(r=65535+r+1);for(var o=0,i=Math.min(t.length-e,2);o<i;++o)t[e+o]=(r&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function O(t,r,e,n){r<0&&(r=4294967295+r+1);for(var o=0,i=Math.min(t.length-e,4);o<i;++o)t[e+o]=r>>>8*(n?o:3-o)&255}function Y(t,r,e,n,o,i){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function N(t,r,e,n,i){return i||Y(t,0,e,4),o.write(t,r,e,n,23,4),e+4}function k(t,r,e,n,i){return i||Y(t,0,e,8),o.write(t,r,e,n,52,8),e+8}a.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<t&&(r=t),a.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,r)).__proto__=a.prototype;else{var o=r-t;e=new a(o,void 0);for(var i=0;i<o;++i)e[i]=this[i+t]}return e},a.prototype.readUIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],o=1,i=0;++i<r&&(o*=256);)n+=this[t+i]*o;return n},a.prototype.readUIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t+--r],o=1;r>0&&(o*=256);)n+=this[t+--r]*o;return n},a.prototype.readUInt8=function(t,r){return r||M(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,r){return r||M(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,r){return r||M(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,r){return r||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,r){return r||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],o=1,i=0;++i<r&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*r)),n},a.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=r,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*r)),i},a.prototype.readInt8=function(t,r){return r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,r){r||M(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},a.prototype.readInt16BE=function(t,r){r||M(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},a.prototype.readInt32LE=function(t,r){return r||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,r){return r||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,r){return r||M(t,4,this.length),o.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,r){return r||M(t,4,this.length),o.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,r){return r||M(t,8,this.length),o.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,r){return r||M(t,8,this.length),o.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||I(this,t,r,e,Math.pow(2,8*e)-1,0);var o=1,i=0;for(this[r]=255&t;++i<e&&(o*=256);)this[r+i]=t/o&255;return r+e},a.prototype.writeUIntBE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||I(this,t,r,e,Math.pow(2,8*e)-1,0);var o=e-1,i=1;for(this[r+o]=255&t;--o>=0&&(i*=256);)this[r+o]=t/i&255;return r+e},a.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},a.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):L(this,t,r,!0),r+2},a.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):L(this,t,r,!1),r+2},a.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):O(this,t,r,!0),r+4},a.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):O(this,t,r,!1),r+4},a.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var o=Math.pow(2,8*e-1);I(this,t,r,e,o-1,-o)}var i=0,s=1,u=0;for(this[r]=255&t;++i<e&&(s*=256);)t<0&&0===u&&0!==this[r+i-1]&&(u=1),this[r+i]=(t/s>>0)-u&255;return r+e},a.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var o=Math.pow(2,8*e-1);I(this,t,r,e,o-1,-o)}var i=e-1,s=1,u=0;for(this[r+i]=255&t;--i>=0&&(s*=256);)t<0&&0===u&&0!==this[r+i+1]&&(u=1),this[r+i]=(t/s>>0)-u&255;return r+e},a.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},a.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):L(this,t,r,!0),r+2},a.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):L(this,t,r,!1),r+2},a.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):O(this,t,r,!0),r+4},a.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):O(this,t,r,!1),r+4},a.prototype.writeFloatLE=function(t,r,e){return N(this,t,r,!0,e)},a.prototype.writeFloatBE=function(t,r,e){return N(this,t,r,!1,e)},a.prototype.writeDoubleLE=function(t,r,e){return k(this,t,r,!0,e)},a.prototype.writeDoubleBE=function(t,r,e){return k(this,t,r,!1,e)},a.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=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-r<n-e&&(n=t.length-r+e);var o,i=n-e;if(this===t&&e<r&&r<n)for(o=i-1;o>=0;--o)t[o+r]=this[o+e];else if(i<1e3||!a.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+r]=this[o+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+i),r);return i},a.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=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&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var i;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(i=r;i<e;++i)this[i]=t;else{var s=a.isBuffer(t)?t:F(new a(t,n).toString()),u=s.length;for(i=0;i<e-r;++i)this[i+r]=s[i%u]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function D(t){return t<16?"0"+t.toString(16):t.toString(16)}function F(t,r){var e;r=r||1/0;for(var n=t.length,o=null,i=[],s=0;s<n;++s){if((e=t.charCodeAt(s))>55295&&e<57344){if(!o){if(e>56319){(r-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(r-=3)>-1&&i.push(239,191,189);continue}o=e;continue}if(e<56320){(r-=3)>-1&&i.push(239,191,189),o=e;continue}e=65536+(o-55296<<10|e-56320)}else o&&(r-=3)>-1&&i.push(239,191,189);if(o=null,e<128){if((r-=1)<0)break;i.push(e)}else if(e<2048){if((r-=2)<0)break;i.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;i.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;i.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return i}function $(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(j,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,r,e,n){for(var o=0;o<n&&!(o+e>=r.length||o>=t.length);++o)r[o+e]=t[o];return o}}).call(this,e(3))},function(t,r,e){"use strict";function n(t){if("number"==typeof t){if(n.codes[t])return n.codes[t];throw new Error("no protocol with code: "+t)}if("string"==typeof t||t instanceof String){if(n.names[t])return n.names[t];throw new Error("no protocol with name: "+t)}throw new Error("invalid protocol id type: "+t)}const o=-1;function i(t,r,e,n,o){return{code:t,size:r,name:e,resolvable:Boolean(n),path:Boolean(o)}}n.lengthPrefixedVarSize=o,n.V=o,n.table=[[4,32,"ip4"],[6,16,"tcp"],[33,16,"dccp"],[41,128,"ip6"],[42,o,"ip6zone"],[53,o,"dns","resolvable"],[54,o,"dns4","resolvable"],[55,o,"dns6","resolvable"],[56,o,"dnsaddr","resolvable"],[132,16,"sctp"],[273,16,"udp"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[277,0,"p2p-stardust"],[290,0,"p2p-circuit"],[301,0,"udt"],[302,0,"utp"],[400,o,"unix",!1,"path"],[421,o,"p2p"],[421,o,"ipfs"],[443,0,"https"],[444,96,"onion"],[445,296,"onion3"],[446,o,"garlic64"],[460,0,"quic"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[480,0,"http"]],n.names={},n.codes={},n.table.map(t=>{const r=i.apply(null,t);n.codes[r.code]=r,n.names[r.name]=r}),n.object=i,t.exports=n},function(t,r,e){"use strict";t.exports={encode:e(22),decode:e(23),encodingLength:e(24)}},function(t,r,e){"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,r,e){"use strict";var n=e(17);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(t,r,e){t.exports=e(6)},function(t,r,e){"use strict";const n=e(7),o=R("dns4"),i=R("dns6"),s=P(R("dns"),R("dnsaddr"),o,i),u=P(R("ip4"),R("ip6")),a=P(C(u,R("tcp")),C(s,R("tcp"))),f=C(u,R("udp")),c=C(f,R("utp")),h=P(C(a,R("ws")),C(s,R("ws"))),p=P(C(a,R("wss")),C(s,R("wss"))),l=P(C(a,R("http")),C(u,R("http")),C(s,R("http"))),d=P(C(a,R("https")),C(u,R("https")),C(s,R("https"))),g=P(C(h,R("p2p-webrtc-star"),R("ipfs")),C(p,R("p2p-webrtc-star"),R("ipfs")),C(h,R("p2p-webrtc-star"),R("p2p")),C(p,R("p2p-webrtc-star"),R("p2p"))),w=P(C(h,R("p2p-websocket-star"),R("ipfs")),C(p,R("p2p-websocket-star"),R("ipfs")),C(h,R("p2p-websocket-star"),R("p2p")),C(p,R("p2p-websocket-star"),R("p2p")),C(h,R("p2p-websocket-star")),C(p,R("p2p-websocket-star"))),y=P(C(l,R("p2p-webrtc-direct")),C(d,R("p2p-webrtc-direct"))),m=P(h,p,l,d,g,y,a,c),v=P(C(m,R("p2p-stardust"),R("ipfs")),C(m,R("p2p-stardust"))),b=P(C(m,R("ipfs")),C(m,R("p2p")),g,R("ipfs"),R("p2p")),A=P(C(b,R("p2p-circuit"),b),C(b,R("p2p-circuit")),C(R("p2p-circuit"),b),C(m,R("p2p-circuit")),C(R("p2p-circuit"),m),R("p2p-circuit")),E=()=>P(C(A,E),A),S=E(),T=P(C(S,b,S),C(b,S),C(S,b),S,b);function B(t){return function(r){if(!n.isMultiaddr(r))try{r=n(r)}catch(o){return!1}const e=t(r.protoNames());return null!==e&&0===e.length}}function C(){const t=Array.from(arguments);function r(r){return r.length<t.length?null:(t.some(t=>{if(null===(r="function"==typeof t?t().partialMatch(r):t.partialMatch(r)))return!0}),r)}return{toString:function(){return"{ "+t.join(" ")+" }"},input:t,matches:B(r),partialMatch:r}}function P(){const t=Array.from(arguments);function r(r){let e=null;return t.some(t=>{const n="function"==typeof t?t().partialMatch(r):t.partialMatch(r);if(n)return e=n,!0}),e}return{toString:function(){return"{ "+t.join(" ")+" }"},input:t,matches:B(r),partialMatch:r}}function R(t){const r=t;return{toString:function(){return r},matches:function(t){if("string"==typeof t)try{t=n(t)}catch(o){return!1}const e=t.protoNames();return 1===e.length&&e[0]===r},partialMatch:function(t){return 0===t.length?null:t[0]===r?t.slice(1):null}}}r.DNS=s,r.DNS4=o,r.DNS6=i,r.IP=u,r.TCP=a,r.UDP=f,r.UTP=c,r.HTTP=l,r.HTTPS=d,r.WebSockets=h,r.WebSocketsSecure=p,r.WebSocketStar=w,r.WebRTCStar=g,r.WebRTCDirect=y,r.Reliable=m,r.Stardust=v,r.Circuit=S,r.P2P=T,r.IPFS=T},function(t,r,e){"use strict";(function(r){const n=e(11),o=e(1),i=e(2),s=e(4),u=e(25).proto((function(t){if(!(this instanceof u))return new u(t);if(null==t&&(t=""),t instanceof r)this.buffer=n.fromBuffer(t);else if("string"==typeof t||t instanceof String){if(t.length>0&&"/"!==t.charAt(0))throw new Error('multiaddr "'.concat(t,'" must start with a "/"'));this.buffer=n.fromString(t)}else{if(!(t.buffer&&t.protos&&t.protoCodes))throw new Error("addr must be a string, Buffer, or another Multiaddr");this.buffer=n.fromBuffer(t.buffer)}}),{className:"Multiaddr",symbolName:"@multiformats/js-multiaddr/multiaddr"});u.prototype.toString=function(){return n.bufferToString(this.buffer)},u.prototype.toJSON=u.prototype.toString,u.prototype.toOptions=function(){const t={},r=this.toString().split("/");return t.family="ip4"===r[1]?"ipv4":"ipv6",t.host=r[2],t.transport=r[3],t.port=r[4],t},u.prototype.inspect=function(){return"<Multiaddr "+this.buffer.toString("hex")+" - "+n.bufferToString(this.buffer)+">"},u.prototype.protos=function(){return this.protoCodes().map(t=>Object.assign({},o(t)))},u.prototype.protoCodes=function(){const t=[],r=this.buffer;let e=0;for(;e<r.length;){const s=i.decode(r,e),u=i.decode.bytes,a=o(s);e+=n.sizeForAddr(a,r.slice(e+u))+u,t.push(s)}return t},u.prototype.protoNames=function(){return this.protos().map(t=>t.name)},u.prototype.tuples=function(){return n.bufferToTuples(this.buffer)},u.prototype.stringTuples=function(){const t=n.bufferToTuples(this.buffer);return n.tuplesToStringTuples(t)},u.prototype.encapsulate=function(t){return t=u(t),u(this.toString()+t.toString())},u.prototype.decapsulate=function(t){t=t.toString();const r=this.toString(),e=r.lastIndexOf(t);if(e<0)throw new Error("Address "+this+" does not contain subaddress: "+t);return u(r.slice(0,e))},u.prototype.getPeerId=function(){let t=null;try{t=this.stringTuples().filter(t=>{if(t[0]===o.names.ipfs.code)return!0}).pop()[1],s.decode(t)}catch(r){t=null}return t},u.prototype.getPath=function(){let t=null;try{t=this.stringTuples().filter(t=>{if(o(t[0]).path)return!0})[0][1]}catch(r){t=null}return t},u.prototype.equals=function(t){return this.buffer.equals(t.buffer)},u.prototype.nodeAddress=function(){const t=this.protoCodes(),r=this.protoNames(),e=this.toString().split("/").slice(1);if(e.length<4)throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6}/{address}/{tcp, udp}/{port}".');if(4!==t[0]&&41!==t[0]&&54!==t[0]&&55!==t[0])throw new Error("no protocol with name: \"'".concat(r[0],'\'". Must have a valid family name: "{ip4, ip6, dns4, dns6}".'));if("tcp"!==e[2]&&"udp"!==e[2])throw new Error("no protocol with name: \"'".concat(r[1],'\'". Must have a valid transport protocol: "{tcp, udp}".'));return{family:41===t[0]||55===t[0]?6:4,address:e[1],port:e[3]}},u.fromNodeAddress=function(t,r){if(!t)throw new Error("requires node address object");if(!r)throw new Error("requires transport protocol");const e="IPv6"===t.family?"ip6":"ip4";return u("/"+[e,t.address,r,t.port].join("/"))},u.prototype.isThinWaistAddress=function(t){const r=(t||this).protos();return 2===r.length&&((4===r[0].code||41===r[0].code)&&(6===r[1].code||273===r[1].code))},u.protocols=o,u.isName=function(t){return!!u.isMultiaddr(t)&&t.protos().some(t=>t.resolvable)},u.resolve=function(t,r){return u.isMultiaddr(t)&&u.isName(t)?r(new Error("not implemented yet")):r(new Error("not a valid name"))},t.exports=u}).call(this,e(0).Buffer)},function(t,r,e){"use strict";r.byteLength=function(t){var r=f(t),e=r[0],n=r[1];return 3*(e+n)/4-n},r.toByteArray=function(t){var r,e,n=f(t),s=n[0],u=n[1],a=new i(function(t,r,e){return 3*(r+e)/4-e}(0,s,u)),c=0,h=u>0?s-4:s;for(e=0;e<h;e+=4)r=o[t.charCodeAt(e)]<<18|o[t.charCodeAt(e+1)]<<12|o[t.charCodeAt(e+2)]<<6|o[t.charCodeAt(e+3)],a[c++]=r>>16&255,a[c++]=r>>8&255,a[c++]=255&r;2===u&&(r=o[t.charCodeAt(e)]<<2|o[t.charCodeAt(e+1)]>>4,a[c++]=255&r);1===u&&(r=o[t.charCodeAt(e)]<<10|o[t.charCodeAt(e+1)]<<4|o[t.charCodeAt(e+2)]>>2,a[c++]=r>>8&255,a[c++]=255&r);return a},r.fromByteArray=function(t){for(var r,e=t.length,o=e%3,i=[],s=0,u=e-o;s<u;s+=16383)i.push(c(t,s,s+16383>u?u:s+16383));1===o?(r=t[e-1],i.push(n[r>>2]+n[r<<4&63]+"==")):2===o&&(r=(t[e-2]<<8)+t[e-1],i.push(n[r>>10]+n[r>>4&63]+n[r<<2&63]+"="));return i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,a=s.length;u<a;++u)n[u]=s[u],o[s.charCodeAt(u)]=u;function f(t){var r=t.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=t.indexOf("=");return-1===e&&(e=r),[e,e===r?0:4-e%4]}function c(t,r,e){for(var o,i,s=[],u=r;u<e;u+=3)o=(t[u]<<16&16711680)+(t[u+1]<<8&65280)+(255&t[u+2]),s.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,r,e){"use strict";r.read=function(t,r,e,n,o){var i,s,u=8*o-n-1,a=(1<<u)-1,f=a>>1,c=-7,h=e?o-1:0,p=e?-1:1,l=t[r+h];for(h+=p,i=l&(1<<-c)-1,l>>=-c,c+=u;c>0;i=256*i+t[r+h],h+=p,c-=8);for(s=i&(1<<-c)-1,i>>=-c,c+=n;c>0;s=256*s+t[r+h],h+=p,c-=8);if(0===i)i=1-f;else{if(i===a)return s?NaN:1/0*(l?-1:1);s+=Math.pow(2,n),i-=f}return(l?-1:1)*s*Math.pow(2,i-n)},r.write=function(t,r,e,n,o,i){var s,u,a,f=8*i-o-1,c=(1<<f)-1,h=c>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:i-1,d=n?1:-1,g=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(u=isNaN(r)?1:0,s=c):(s=Math.floor(Math.log(r)/Math.LN2),r*(a=Math.pow(2,-s))<1&&(s--,a*=2),(r+=s+h>=1?p/a:p*Math.pow(2,1-h))*a>=2&&(s++,a/=2),s+h>=c?(u=0,s=c):s+h>=1?(u=(r*a-1)*Math.pow(2,o),s+=h):(u=r*Math.pow(2,h-1)*Math.pow(2,o),s=0));o>=8;t[e+l]=255&u,l+=d,u/=256,o-=8);for(s=s<<o|u,f+=o;f>0;t[e+l]=255&s,l+=d,s/=256,f-=8);t[e+l-d]|=128*g}},function(t,r,e){"use strict";var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,r,e){"use strict";(function(r){const n=e(12),o=e(1),i=e(2);function s(t){const r=[],e=t.split("/").slice(1);if(1===e.length&&""===e[0])return[];for(let n=0;n<e.length;n++){const i=e[n],s=o(i);if(0!==s.size){if(++n>=e.length)throw y("invalid address: "+t);if(s.path){r.push([i,w(e.slice(n).join("/"))]);break}r.push([i,e[n]])}else r.push([i])}return r}function u(t){const r=[];return t.map(t=>{const e=m(t);r.push(e.name),t.length>1&&r.push(t[1])}),w(r.join("/"))}function a(t){return t.map(t=>{Array.isArray(t)||(t=[t]);const r=m(t);return t.length>1?[r.code,n.toBuffer(r.code,t[1])]:[r.code]})}function f(t){return t.map(t=>{const r=m(t);return t.length>1?[r.code,n.toString(r.code,t[1])]:[r.code]})}function c(t){return d(r.concat(t.map(t=>{const e=m(t);let n=r.from(i.encode(e.code));return t.length>1&&(n=r.concat([n,t[1]])),n})))}function h(t,r){if(t.size>0)return t.size/8;if(0===t.size)return 0;return i.decode(r)+i.decode.bytes}function p(t){const r=[];let e=0;for(;e<t.length;){const n=i.decode(t,e),s=i.decode.bytes,u=h(o(n),t.slice(e+s));if(0===u){r.push([n]),e+=s;continue}const a=t.slice(e+s,e+s+u);if((e+=u+s)>t.length)throw y("Invalid address buffer: "+t.toString("hex"));r.push([n,a])}return r}function l(t){return c(a(s(t=w(t))))}function d(t){const e=g(t);if(e)throw e;return r.from(t)}function g(t){try{p(t)}catch(r){return r}}function w(t){return"/"+t.trim().split("/").filter(t=>t).join("/")}function y(t){return new Error("Error parsing address: "+t)}function m(t){return o(t[0])}t.exports={stringToStringTuples:s,stringTuplesToString:u,tuplesToStringTuples:f,stringTuplesToTuples:a,bufferToTuples:p,tuplesToBuffer:c,bufferToString:function(t){return u(f(p(t)))},stringToBuffer:l,fromString:function(t){return l(t)},fromBuffer:d,validateBuffer:g,isValidBuffer:function(t){return void 0===g(t)},cleanPath:w,ParseError:y,protoFromTuple:m,sizeForAddr:h}}).call(this,e(0).Buffer)},function(t,r,e){"use strict";(function(r){const n=e(13),o=e(15),i=e(1),s=e(4),u=e(19),a=e(2);function f(t,e){return e instanceof r?f.toString(t,e):f.toBuffer(t,e)}function c(t){if(!o(t))throw new Error("invalid ip address");return n.toBuffer(t)}function h(t){const e=r.alloc(2);return e.writeUInt16BE(t,0),e}function p(t){return t.readUInt16BE(0)}function l(t){const r=t.slice(0,t.length-2),e=t.slice(t.length-2);return u.encode(r).toString("ascii").toLowerCase()+":"+p(e)}t.exports=f,f.toString=function(t,r){switch((t=i(t)).code){case 4:case 41:return function(t){const r=n.toString(t);if(!o(r))throw new Error("invalid ip address");return r}(r);case 6:case 273:case 33:case 132:return p(r);case 53:case 54:case 55:case 56:case 400:return function(t){const r=a.decode(t);if((t=t.slice(a.decode.bytes)).length!==r)throw new Error("inconsistent lengths");return t.toString()}(r);case 421:return function(t){const r=a.decode(t),e=t.slice(a.decode.bytes);if(e.length!==r)throw new Error("inconsistent lengths");return s.encode(e)}(r);case 444:case 445:return l(r);default:return r.toString("hex")}},f.toBuffer=function(t,e){switch((t=i(t)).code){case 4:case 41:return c(e);case 6:case 273:case 33:case 132:return h(parseInt(e,10));case 53:case 54:case 55:case 56:case 400:return function(t){const e=r.from(t),n=r.from(a.encode(e.length));return r.concat([n,e])}(e);case 421:return function(t){const e=r.from(s.decode(t)),n=r.from(a.encode(e.length));return r.concat([n,e])}(e);case 444:return function(t){const e=t.split(":");if(2!==e.length)throw new Error("failed to parse onion addr: "+e+" does not contain a port number");if(16!==e[0].length)throw new Error("failed to parse onion addr: "+e[0]+" not a Tor onion address.");const n=r.from(u.decode.asBytes(e[0].toUpperCase())),o=parseInt(e[1],10);if(o<1||o>65536)throw new Error("Port number is not in range(1, 65536)");const i=h(o);return r.concat([n,i])}(e);case 445:return function(t){const e=t.split(":");if(2!==e.length)throw new Error("failed to parse onion addr: "+e+" does not contain a port number");if(56!==e[0].length)throw new Error("failed to parse onion addr: "+e[0]+" not a Tor onion3 address.");const n=r.from(u.decode.asBytes(e[0].toUpperCase())),o=parseInt(e[1],10);if(o<1||o>65536)throw new Error("Port number is not in range(1, 65536)");const i=h(o);return r.concat([n,i])}(e);default:return r.from(e,"hex")}}}).call(this,e(0).Buffer)},function(t,r,e){"use strict";var n=r,o=e(0).Buffer,i=e(14);n.toBuffer=function(t,r,e){var n;if(e=~~e,this.isV4Format(t))n=r||new o(e+4),t.split(/\./g).map((function(t){n[e++]=255&parseInt(t,10)}));else if(this.isV6Format(t)){var i,s=t.split(":",8);for(i=0;i<s.length;i++){var u;this.isV4Format(s[i])&&(u=this.toBuffer(s[i]),s[i]=u.slice(0,2).toString("hex")),u&&++i<8&&s.splice(i,0,u.slice(2,4).toString("hex"))}if(""===s[0])for(;s.length<8;)s.unshift("0");else if(""===s[s.length-1])for(;s.length<8;)s.push("0");else if(s.length<8){for(i=0;i<s.length&&""!==s[i];i++);var a=[i,1];for(i=9-s.length;i>0;i--)a.push("0");s.splice.apply(s,a)}for(n=r||new o(e+16),i=0;i<s.length;i++){var f=parseInt(s[i],16);n[e++]=f>>8&255,n[e++]=255&f}}if(!n)throw Error("Invalid ip address: "+t);return n},n.toString=function(t,r,e){r=~~r;var n=[];if(4===(e=e||t.length-r)){for(var o=0;o<e;o++)n.push(t[r+o]);n=n.join(".")}else if(16===e){for(o=0;o<e;o+=2)n.push(t.readUInt16BE(r+o).toString(16));n=(n=(n=n.join(":")).replace(/(^|:)0(:0)*:0(:|$)/,"$1::$3")).replace(/:{3,4}/,"::")}return n};var s=/^(\d{1,3}\.){3,3}\d{1,3}$/,u=/^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i;function a(t){return t?t.toLowerCase():"ipv4"}n.isV4Format=function(t){return s.test(t)},n.isV6Format=function(t){return u.test(t)},n.fromPrefixLen=function(t,r){var e=4;"ipv6"===(r=t>32?"ipv6":a(r))&&(e=16);for(var i=new o(e),s=0,u=i.length;s<u;++s){var f=8;t<8&&(f=t),t-=f,i[s]=255&~(255>>f)}return n.toString(i)},n.mask=function(t,r){t=n.toBuffer(t),r=n.toBuffer(r);var e=new o(Math.max(t.length,r.length)),i=0;if(t.length===r.length)for(i=0;i<t.length;i++)e[i]=t[i]&r[i];else if(4===r.length)for(i=0;i<r.length;i++)e[i]=t[t.length-4+i]&r[i];else{for(i=0;i<e.length-6;i++)e[i]=0;for(e[10]=255,e[11]=255,i=0;i<t.length;i++)e[i+12]=t[i]&r[i+12];i+=12}for(;i<e.length;i++)e[i]=0;return n.toString(e)},n.cidr=function(t){var r=t.split("/"),e=r[0];if(2!==r.length)throw new Error("invalid CIDR subnet: "+e);var o=n.fromPrefixLen(parseInt(r[1],10));return n.mask(e,o)},n.subnet=function(t,r){for(var e=n.toLong(n.mask(t,r)),o=n.toBuffer(r),i=0,s=0;s<o.length;s++)if(255===o[s])i+=8;else for(var u=255&o[s];u;)u=u<<1&255,i++;var a=Math.pow(2,32-i);return{networkAddress:n.fromLong(e),firstAddress:a<=2?n.fromLong(e):n.fromLong(e+1),lastAddress:a<=2?n.fromLong(e+a-1):n.fromLong(e+a-2),broadcastAddress:n.fromLong(e+a-1),subnetMask:r,subnetMaskLength:i,numHosts:a<=2?a:a-2,length:a,contains:function(t){return e===n.toLong(n.mask(t,r))}}},n.cidrSubnet=function(t){var r=t.split("/"),e=r[0];if(2!==r.length)throw new Error("invalid CIDR subnet: "+e);var o=n.fromPrefixLen(parseInt(r[1],10));return n.subnet(e,o)},n.not=function(t){for(var r=n.toBuffer(t),e=0;e<r.length;e++)r[e]=255^r[e];return n.toString(r)},n.or=function(t,r){if(t=n.toBuffer(t),r=n.toBuffer(r),t.length===r.length){for(var e=0;e<t.length;++e)t[e]|=r[e];return n.toString(t)}var o=t,i=r;r.length>t.length&&(o=r,i=t);var s=o.length-i.length;for(e=s;e<o.length;++e)o[e]|=i[e-s];return n.toString(o)},n.isEqual=function(t,r){if(t=n.toBuffer(t),r=n.toBuffer(r),t.length===r.length){for(var e=0;e<t.length;e++)if(t[e]!==r[e])return!1;return!0}if(4===r.length){var o=r;r=t,t=o}for(e=0;e<10;e++)if(0!==r[e])return!1;var i=r.readUInt16BE(10);if(0!==i&&65535!==i)return!1;for(e=0;e<4;e++)if(t[e]!==r[e+12])return!1;return!0},n.isPrivate=function(t){return/^(::f{4}:)?10\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(t)||/^(::f{4}:)?192\.168\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(t)||/^(::f{4}:)?172\.(1[6-9]|2\d|30|31)\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(t)||/^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(t)||/^(::f{4}:)?169\.254\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(t)||/^f[cd][0-9a-f]{2}:/i.test(t)||/^fe80:/i.test(t)||/^::1$/.test(t)||/^::$/.test(t)},n.isPublic=function(t){return!n.isPrivate(t)},n.isLoopback=function(t){return/^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/.test(t)||/^fe80::1$/.test(t)||/^::1$/.test(t)||/^::$/.test(t)},n.loopback=function(t){if("ipv4"!==(t=a(t))&&"ipv6"!==t)throw new Error("family must be ipv4 or ipv6");return"ipv4"===t?"127.0.0.1":"fe80::1"},n.address=function(t,r){var e,o=i.networkInterfaces();if(r=a(r),t&&"private"!==t&&"public"!==t){var s=o[t].filter((function(t){return t.family.toLowerCase()===r}));if(0===s.length)return;return s[0].address}return(e=Object.keys(o).map((function(e){var i=o[e].filter((function(e){return e.family=e.family.toLowerCase(),e.family===r&&!n.isLoopback(e.address)&&(!t||("public"===t?n.isPrivate(e.address):n.isPublic(e.address)))}));return i.length?i[0].address:void 0})).filter(Boolean)).length?e[0]:n.loopback(r)},n.toLong=function(t){var r=0;return t.split(".").forEach((function(t){r<<=8,r+=parseInt(t)})),r>>>0},n.fromLong=function(t){return(t>>>24)+"."+(t>>16&255)+"."+(t>>8&255)+"."+(255&t)}},function(t,r,e){"use strict";r.endianness=function(){return"LE"},r.hostname=function(){return"undefined"!=typeof location?location.hostname:""},r.loadavg=function(){return[]},r.uptime=function(){return 0},r.freemem=function(){return Number.MAX_VALUE},r.totalmem=function(){return Number.MAX_VALUE},r.cpus=function(){return[]},r.type=function(){return"Browser"},r.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},r.networkInterfaces=r.getNetworkInterfaces=function(){return{}},r.arch=function(){return"javascript"},r.platform=function(){return"browser"},r.tmpdir=r.tmpDir=function(){return"/tmp"},r.EOL="\n",r.homedir=function(){return"/"}},function(t,r,e){"use strict";const n=e(16),o=t.exports=t=>n({exact:!0}).test(t);o.v4=t=>n.v4({exact:!0}).test(t),o.v6=t=>n.v6({exact:!0}).test(t)},function(t,r,e){"use strict";const n="(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])(?:\\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])){3}",o="[0-9a-fA-F]{1,4}",i="\n(\n(?:".concat(o,":){7}(?:").concat(o,"|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:").concat(o,":){6}(?:").concat(n,"|:").concat(o,"|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:").concat(o,":){5}(?::").concat(n,"|(:").concat(o,"){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:").concat(o,":){4}(?:(:").concat(o,"){0,1}:").concat(n,"|(:").concat(o,"){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:").concat(o,":){3}(?:(:").concat(o,"){0,2}:").concat(n,"|(:").concat(o,"){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:").concat(o,":){2}(?:(:").concat(o,"){0,3}:").concat(n,"|(:").concat(o,"){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:").concat(o,":){1}(?:(:").concat(o,"){0,4}:").concat(n,"|(:").concat(o,"){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::((?::").concat(o,"){0,5}:").concat(n,"|(?::").concat(o,"){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),s=t.exports=t=>t&&t.exact?new RegExp("(?:^".concat(n,"$)|(?:^").concat(i,"$)")):new RegExp("(?:".concat(n,")|(?:").concat(i,")"),"g");s.v4=t=>t&&t.exact?new RegExp("^".concat(n,"$")):new RegExp(n,"g"),s.v6=t=>t&&t.exact?new RegExp("^".concat(i,"$")):new RegExp(i,"g")},function(t,r,e){"use strict";var n=e(18).Buffer;t.exports=function(t){if(t.length>=255)throw new TypeError("Alphabet too long");var r=new Uint8Array(256);r.fill(255);for(var e=0;e<t.length;e++){var o=t.charAt(e),i=o.charCodeAt(0);if(255!==r[i])throw new TypeError(o+" is ambiguous");r[i]=e}var s=t.length,u=t.charAt(0),a=Math.log(s)/Math.log(256),f=Math.log(256)/Math.log(s);function c(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return n.alloc(0);var e=0;if(" "!==t[e]){for(var o=0,i=0;t[e]===u;)o++,e++;for(var f=(t.length-e)*a+1>>>0,c=new Uint8Array(f);t[e];){var h=r[t.charCodeAt(e)];if(255===h)return;for(var p=0,l=f-1;(0!==h||p<i)&&-1!==l;l--,p++)h+=s*c[l]>>>0,c[l]=h%256>>>0,h=h/256>>>0;if(0!==h)throw new Error("Non-zero carry");i=p,e++}if(" "!==t[e]){for(var d=f-i;d!==f&&0===c[d];)d++;var g=n.allocUnsafe(o+(f-d));g.fill(0,0,o);for(var w=o;d!==f;)g[w++]=c[d++];return g}}}return{encode:function(r){if(!n.isBuffer(r))throw new TypeError("Expected Buffer");if(0===r.length)return"";for(var e=0,o=0,i=0,a=r.length;i!==a&&0===r[i];)i++,e++;for(var c=(a-i)*f+1>>>0,h=new Uint8Array(c);i!==a;){for(var p=r[i],l=0,d=c-1;(0!==p||l<o)&&-1!==d;d--,l++)p+=256*h[d]>>>0,h[d]=p%s>>>0,p=p/s>>>0;if(0!==p)throw new Error("Non-zero carry");o=l,i++}for(var g=c-o;g!==c&&0===h[g];)g++;for(var w=u.repeat(e);g<c;++g)w+=t.charAt(h[g]);return w},decodeUnsafe:c,decode:function(t){var r=c(t);if(r)return r;throw new Error("Non-base"+s+" character")}}}},function(t,r,e){"use strict";var n=e(0),o=n.Buffer;function i(t,r){for(var e in t)r[e]=t[e]}function s(t,r,e){return o(t,r,e)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?t.exports=n:(i(n,r),r.Buffer=s),s.prototype=Object.create(o.prototype),i(o,s),s.from=function(t,r,e){if("number"==typeof t)throw new TypeError("Argument must not be a number");return o(t,r,e)},s.alloc=function(t,r,e){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=o(t);return void 0!==r?"string"==typeof e?n.fill(r,e):n.fill(r):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return o(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,r,e){"use strict";(function(r,n){var o;!function(){var i="object"==typeof window?window:{};!i.HI_BASE32_NO_NODE_JS&&"object"==typeof r&&r.versions&&r.versions.node&&(i=n);var s=!i.HI_BASE32_NO_COMMON_JS&&"object"==typeof t&&t.exports,u=e(21),a="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".split(""),f={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,2:26,3:27,4:28,5:29,6:30,7:31},c=[0,0,0,0,0,0,0,0],h=function(t,r){r.length>10&&(r="..."+r.substr(-10));var e=new Error("Decoded data is not valid UTF-8. Maybe try base32.decode.asBytes()? Partial data after reading "+t+" bytes: "+r+" <-");throw e.position=t,e},p=function(t){if(!/^[A-Z2-7=]+$/.test(t))throw new Error("Invalid base32 characters");for(var r,e,n,o,i,s,u,a,c=[],h=0,p=(t=t.replace(/=/g,"")).length,l=0,d=p>>3<<3;l<d;)r=f[t.charAt(l++)],e=f[t.charAt(l++)],n=f[t.charAt(l++)],o=f[t.charAt(l++)],i=f[t.charAt(l++)],s=f[t.charAt(l++)],u=f[t.charAt(l++)],a=f[t.charAt(l++)],c[h++]=255&(r<<3|e>>>2),c[h++]=255&(e<<6|n<<1|o>>>4),c[h++]=255&(o<<4|i>>>1),c[h++]=255&(i<<7|s<<2|u>>>3),c[h++]=255&(u<<5|a);var g=p-d;return 2===g?(r=f[t.charAt(l++)],e=f[t.charAt(l++)],c[h++]=255&(r<<3|e>>>2)):4===g?(r=f[t.charAt(l++)],e=f[t.charAt(l++)],n=f[t.charAt(l++)],o=f[t.charAt(l++)],c[h++]=255&(r<<3|e>>>2),c[h++]=255&(e<<6|n<<1|o>>>4)):5===g?(r=f[t.charAt(l++)],e=f[t.charAt(l++)],n=f[t.charAt(l++)],o=f[t.charAt(l++)],i=f[t.charAt(l++)],c[h++]=255&(r<<3|e>>>2),c[h++]=255&(e<<6|n<<1|o>>>4),c[h++]=255&(o<<4|i>>>1)):7===g&&(r=f[t.charAt(l++)],e=f[t.charAt(l++)],n=f[t.charAt(l++)],o=f[t.charAt(l++)],i=f[t.charAt(l++)],s=f[t.charAt(l++)],u=f[t.charAt(l++)],c[h++]=255&(r<<3|e>>>2),c[h++]=255&(e<<6|n<<1|o>>>4),c[h++]=255&(o<<4|i>>>1),c[h++]=255&(i<<7|s<<2|u>>>3)),c},l=function(t,r){if(!r)return function(t){for(var r,e,n="",o=t.length,i=0,s=0;i<o;)if((r=t[i++])<=127)n+=String.fromCharCode(r);else{r>191&&r<=223?(e=31&r,s=1):r<=239?(e=15&r,s=2):r<=247?(e=7&r,s=3):h(i,n);for(var u=0;u<s;++u)((r=t[i++])<128||r>191)&&h(i,n),e<<=6,e+=63&r;e>=55296&&e<=57343&&h(i,n),e>1114111&&h(i,n),e<=65535?n+=String.fromCharCode(e):(e-=65536,n+=String.fromCharCode(55296+(e>>10)),n+=String.fromCharCode(56320+(1023&e)))}return n}(p(t));if(!/^[A-Z2-7=]+$/.test(t))throw new Error("Invalid base32 characters");var e,n,o,i,s,u,a,c,l="",d=t.indexOf("=");-1===d&&(d=t.length);for(var g=0,w=d>>3<<3;g<w;)e=f[t.charAt(g++)],n=f[t.charAt(g++)],o=f[t.charAt(g++)],i=f[t.charAt(g++)],s=f[t.charAt(g++)],u=f[t.charAt(g++)],a=f[t.charAt(g++)],c=f[t.charAt(g++)],l+=String.fromCharCode(255&(e<<3|n>>>2))+String.fromCharCode(255&(n<<6|o<<1|i>>>4))+String.fromCharCode(255&(i<<4|s>>>1))+String.fromCharCode(255&(s<<7|u<<2|a>>>3))+String.fromCharCode(255&(a<<5|c));var y=d-w;return 2===y?(e=f[t.charAt(g++)],n=f[t.charAt(g++)],l+=String.fromCharCode(255&(e<<3|n>>>2))):4===y?(e=f[t.charAt(g++)],n=f[t.charAt(g++)],o=f[t.charAt(g++)],i=f[t.charAt(g++)],l+=String.fromCharCode(255&(e<<3|n>>>2))+String.fromCharCode(255&(n<<6|o<<1|i>>>4))):5===y?(e=f[t.charAt(g++)],n=f[t.charAt(g++)],o=f[t.charAt(g++)],i=f[t.charAt(g++)],s=f[t.charAt(g++)],l+=String.fromCharCode(255&(e<<3|n>>>2))+String.fromCharCode(255&(n<<6|o<<1|i>>>4))+String.fromCharCode(255&(i<<4|s>>>1))):7===y&&(e=f[t.charAt(g++)],n=f[t.charAt(g++)],o=f[t.charAt(g++)],i=f[t.charAt(g++)],s=f[t.charAt(g++)],u=f[t.charAt(g++)],a=f[t.charAt(g++)],l+=String.fromCharCode(255&(e<<3|n>>>2))+String.fromCharCode(255&(n<<6|o<<1|i>>>4))+String.fromCharCode(255&(i<<4|s>>>1))+String.fromCharCode(255&(s<<7|u<<2|a>>>3))),l},d={encode:function(t,r){var e="string"!=typeof t;return e&&t.constructor===ArrayBuffer&&(t=new Uint8Array(t)),e?function(t){for(var r,e,n,o,i,s="",u=t.length,f=0,c=5*parseInt(u/5);f<c;)r=t[f++],e=t[f++],n=t[f++],o=t[f++],i=t[f++],s+=a[r>>>3]+a[31&(r<<2|e>>>6)]+a[e>>>1&31]+a[31&(e<<4|n>>>4)]+a[31&(n<<1|o>>>7)]+a[o>>>2&31]+a[31&(o<<3|i>>>5)]+a[31&i];var h=u-c;return 1===h?(r=t[f],s+=a[r>>>3]+a[r<<2&31]+"======"):2===h?(r=t[f++],e=t[f],s+=a[r>>>3]+a[31&(r<<2|e>>>6)]+a[e>>>1&31]+a[e<<4&31]+"===="):3===h?(r=t[f++],e=t[f++],n=t[f],s+=a[r>>>3]+a[31&(r<<2|e>>>6)]+a[e>>>1&31]+a[31&(e<<4|n>>>4)]+a[n<<1&31]+"==="):4===h&&(r=t[f++],e=t[f++],n=t[f++],o=t[f],s+=a[r>>>3]+a[31&(r<<2|e>>>6)]+a[e>>>1&31]+a[31&(e<<4|n>>>4)]+a[31&(n<<1|o>>>7)]+a[o>>>2&31]+a[o<<3&31]+"="),s}(t):r?function(t){for(var r,e,n,o,i,s="",u=t.length,f=0,c=5*parseInt(u/5);f<c;)r=t.charCodeAt(f++),e=t.charCodeAt(f++),n=t.charCodeAt(f++),o=t.charCodeAt(f++),i=t.charCodeAt(f++),s+=a[r>>>3]+a[31&(r<<2|e>>>6)]+a[e>>>1&31]+a[31&(e<<4|n>>>4)]+a[31&(n<<1|o>>>7)]+a[o>>>2&31]+a[31&(o<<3|i>>>5)]+a[31&i];var h=u-c;return 1===h?(r=t.charCodeAt(f),s+=a[r>>>3]+a[r<<2&31]+"======"):2===h?(r=t.charCodeAt(f++),e=t.charCodeAt(f),s+=a[r>>>3]+a[31&(r<<2|e>>>6)]+a[e>>>1&31]+a[e<<4&31]+"===="):3===h?(r=t.charCodeAt(f++),e=t.charCodeAt(f++),n=t.charCodeAt(f),s+=a[r>>>3]+a[31&(r<<2|e>>>6)]+a[e>>>1&31]+a[31&(e<<4|n>>>4)]+a[n<<1&31]+"==="):4===h&&(r=t.charCodeAt(f++),e=t.charCodeAt(f++),n=t.charCodeAt(f++),o=t.charCodeAt(f),s+=a[r>>>3]+a[31&(r<<2|e>>>6)]+a[e>>>1&31]+a[31&(e<<4|n>>>4)]+a[31&(n<<1|o>>>7)]+a[o>>>2&31]+a[o<<3&31]+"="),s}(t):function(t){var r,e,n,o,i,s,u,f=!1,h="",p=0,l=0,d=t.length;do{for(c[0]=c[5],c[1]=c[6],c[2]=c[7],u=l;p<d&&u<5;++p)(s=t.charCodeAt(p))<128?c[u++]=s:s<2048?(c[u++]=192|s>>6,c[u++]=128|63&s):s<55296||s>=57344?(c[u++]=224|s>>12,c[u++]=128|s>>6&63,c[u++]=128|63&s):(s=65536+((1023&s)<<10|1023&t.charCodeAt(++p)),c[u++]=240|s>>18,c[u++]=128|s>>12&63,c[u++]=128|s>>6&63,c[u++]=128|63&s);u-l,l=u-5,p===d&&++p,p>d&&u<6&&(f=!0),r=c[0],u>4?(e=c[1],n=c[2],o=c[3],i=c[4],h+=a[r>>>3]+a[31&(r<<2|e>>>6)]+a[e>>>1&31]+a[31&(e<<4|n>>>4)]+a[31&(n<<1|o>>>7)]+a[o>>>2&31]+a[31&(o<<3|i>>>5)]+a[31&i]):1===u?h+=a[r>>>3]+a[r<<2&31]+"======":2===u?(e=c[1],h+=a[r>>>3]+a[31&(r<<2|e>>>6)]+a[e>>>1&31]+a[e<<4&31]+"===="):3===u?(e=c[1],n=c[2],h+=a[r>>>3]+a[31&(r<<2|e>>>6)]+a[e>>>1&31]+a[31&(e<<4|n>>>4)]+a[n<<1&31]+"==="):(e=c[1],n=c[2],o=c[3],h+=a[r>>>3]+a[31&(r<<2|e>>>6)]+a[e>>>1&31]+a[31&(e<<4|n>>>4)]+a[31&(n<<1|o>>>7)]+a[o>>>2&31]+a[o<<3&31]+"=")}while(!f);return h}(t)},decode:l};l.asBytes=p,s?t.exports=d:(i.base32=d,u&&(void 0===(o=function(){return d}.call(d,e,d,t))||(t.exports=o)))}()}).call(this,e(20),e(3))},function(t,r,e){"use strict";var n,o,i=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(r){try{return n.call(null,t,0)}catch(r){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(t){n=s}try{o="function"==typeof clearTimeout?clearTimeout:u}catch(t){o=u}}();var f,c=[],h=!1,p=-1;function l(){h&&f&&(h=!1,f.length?c=f.concat(c):p=-1,c.length&&d())}function d(){if(!h){var t=a(l);h=!0;for(var r=c.length;r;){for(f=c,c=[];++p<r;)f&&f[p].run();p=-1,r=c.length}f=null,h=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===u||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(r){try{return o.call(null,t)}catch(r){return o.call(this,t)}}}(t)}}function g(t,r){this.fun=t,this.array=r}function w(){}i.nextTick=function(t){var r=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)r[e-1]=arguments[e];c.push(new g(t,r)),1!==c.length||h||a(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=w,i.addListener=w,i.once=w,i.off=w,i.removeListener=w,i.removeAllListeners=w,i.emit=w,i.prependListener=w,i.prependOnceListener=w,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,r){(function(r){t.exports=r}).call(this,{})},function(t,r,e){"use strict";t.exports=function t(r,e,s){e=e||[];s=s||0;var u=s;for(;r>=i;)e[s++]=255&r|n,r/=128;for(;r&o;)e[s++]=255&r|n,r>>>=7;e[s]=0|r;t.bytes=s-u+1;return e};var n=128,o=-128,i=Math.pow(2,31)},function(t,r,e){"use strict";t.exports=function t(r,e){var i,s=0,u=(e=e||0,0),a=e,f=r.length;do{if(a>=f)throw t.bytes=0,new RangeError("Could not decode varint");i=r[a++],s+=u<28?(i&o)<<u:(i&o)*Math.pow(2,u),u+=7}while(i>=n);t.bytes=a-e;return s};var n=128,o=127},function(t,r,e){"use strict";var n=Math.pow(2,7),o=Math.pow(2,14),i=Math.pow(2,21),s=Math.pow(2,28),u=Math.pow(2,35),a=Math.pow(2,42),f=Math.pow(2,49),c=Math.pow(2,56),h=Math.pow(2,63);t.exports=function(t){return t<n?1:t<o?2:t<i?3:t<s?4:t<u?5:t<a?6:t<f?7:t<c?8:t<h?9:10}},function(t,r,e){"use strict";t.exports=function(t,r){let{className:e,symbolName:n}=r;const o=Symbol.for(n),i={[e]:class extends t{constructor(){super(...arguments),Object.defineProperty(this,o,{value:!0})}get[Symbol.toStringTag](){return e}}}[e];return i["is".concat(e)]=t=>!(!t||!t[o]),i},t.exports.proto=function(t,r){let{className:e,symbolName:n,withoutNew:o}=r;const i=Symbol.for(n),s={[e]:function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(o&&!(this instanceof s))return new s(...e);const u=t.call(this,...e)||this;return u&&!u[i]&&Object.defineProperty(u,i,{value:!0}),u}}[e];return s.prototype=Object.create(t.prototype),s.prototype.constructor=s,Object.defineProperty(s.prototype,Symbol.toStringTag,{get:()=>e}),s["is".concat(e)]=t=>!(!t||!t[i]),s}}])})); | ||
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.Mafmt=r():t.Mafmt=r()}(window,(function(){return function(t){var r={};function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)e.d(n,o,function(r){return t[r]}.bind(null,o));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=5)}([function(t,r,e){"use strict";(function(t){var n=e(8),o=e(9),i=e(10);function u(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,r){if(u()<r)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=a.prototype:(null===t&&(t=new a(r)),t.length=r),t}function a(t,r,e){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return h(this,t)}return f(this,t,r,e)}function f(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?function(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n);a.TYPED_ARRAY_SUPPORT?(t=r).__proto__=a.prototype:t=l(t,r);return t}(t,r,e,n):"string"==typeof r?function(t,r,e){"string"==typeof e&&""!==e||(e="utf8");if(!a.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(r,e),o=(t=s(t,n)).write(r,e);o!==n&&(t=t.slice(0,o));return t}(t,r,e):function(t,r){if(a.isBuffer(r)){var e=0|p(r.length);return 0===(t=s(t,e)).length?t:(r.copy(t,0,0,e),t)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||(n=r.length)!=n?s(t,0):l(t,r);if("Buffer"===r.type&&i(r.data))return l(t,r.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,r)}function c(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 h(t,r){if(c(r),t=s(t,r<0?0:0|p(r)),!a.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function l(t,r){var e=r.length<0?0:0|p(r.length);t=s(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[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 d(t,r){if(a.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 e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return $(t).length;default:if(n)return F(t).length;r=(""+r).toLowerCase(),n=!0}}function g(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,r,e);case"utf8":case"utf-8":return C(this,r,e);case"ascii":return R(this,r,e);case"latin1":case"binary":return _(this,r,e);case"base64":return B(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function w(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function y(t,r,e,n,o){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=o?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(o)return-1;e=t.length-1}else if(e<0){if(!o)return-1;e=0}if("string"==typeof r&&(r=a.from(r,n)),a.isBuffer(r))return 0===r.length?-1:m(t,r,e,n,o);if("number"==typeof r)return r&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):m(t,[r],e,n,o);throw new TypeError("val must be string, number or Buffer")}function m(t,r,e,n,o){var i,u=1,s=t.length,a=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,s/=2,a/=2,e/=2}function f(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(o){var c=-1;for(i=e;i<s;i++)if(f(t,i)===f(r,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===a)return c*u}else-1!==c&&(i-=i-c),c=-1}else for(e+a>s&&(e=s-a),i=e;i>=0;i--){for(var h=!0,l=0;l<a;l++)if(f(t,i+l)!==f(r,l)){h=!1;break}if(h)return i}return-1}function v(t,r,e,n){e=Number(e)||0;var o=t.length-e;n?(n=Number(n))>o&&(n=o):n=o;var i=r.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 s=parseInt(r.substr(2*u,2),16);if(isNaN(s))return u;t[e+u]=s}return u}function b(t,r,e,n){return z(F(r,t.length-e),t,e,n)}function A(t,r,e,n){return z(function(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}(r),t,e,n)}function E(t,r,e,n){return A(t,r,e,n)}function S(t,r,e,n){return z($(r),t,e,n)}function T(t,r,e,n){return z(function(t,r){for(var e,n,o,i=[],u=0;u<t.length&&!((r-=2)<0);++u)e=t.charCodeAt(u),n=e>>8,o=e%256,i.push(o),i.push(n);return i}(r,t.length-e),t,e,n)}function B(t,r,e){return 0===r&&e===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(r,e))}function C(t,r,e){e=Math.min(t.length,e);for(var n=[],o=r;o<e;){var i,u,s,a,f=t[o],c=null,h=f>239?4:f>223?3:f>191?2:1;if(o+h<=e)switch(h){case 1:f<128&&(c=f);break;case 2:128==(192&(i=t[o+1]))&&(a=(31&f)<<6|63&i)>127&&(c=a);break;case 3:i=t[o+1],u=t[o+2],128==(192&i)&&128==(192&u)&&(a=(15&f)<<12|(63&i)<<6|63&u)>2047&&(a<55296||a>57343)&&(c=a);break;case 4:i=t[o+1],u=t[o+2],s=t[o+3],128==(192&i)&&128==(192&u)&&128==(192&s)&&(a=(15&f)<<18|(63&i)<<12|(63&u)<<6|63&s)>65535&&a<1114112&&(c=a)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),o+=h}return function(t){var r=t.length;if(r<=P)return String.fromCharCode.apply(String,t);var e="",n=0;for(;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=P));return e}(n)}r.Buffer=a,r.SlowBuffer=function(t){+t!=t&&(t=0);return a.alloc(+t)},r.INSPECT_MAX_BYTES=50,a.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(r){return!1}}(),r.kMaxLength=u(),a.poolSize=8192,a._augment=function(t){return t.__proto__=a.prototype,t},a.from=function(t,r,e){return f(null,t,r,e)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(t,r,e){return function(t,r,e,n){return c(r),r<=0?s(t,r):void 0!==e?"string"==typeof n?s(t,r).fill(e,n):s(t,r).fill(e):s(t,r)}(null,t,r,e)},a.allocUnsafe=function(t){return h(null,t)},a.allocUnsafeSlow=function(t){return h(null,t)},a.isBuffer=function(t){return!(null==t||!t._isBuffer)},a.compare=function(t,r){if(!a.isBuffer(t)||!a.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,o=0,i=Math.min(e,n);o<i;++o)if(t[o]!==r[o]){e=t[o],n=r[o];break}return e<n?-1:n<e?1:0},a.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}},a.concat=function(t,r){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var n=a.allocUnsafe(r),o=0;for(e=0;e<t.length;++e){var u=t[e];if(!a.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(n,o),o+=u.length}return n},a.byteLength=d,a.prototype._isBuffer=!0,a.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 r=0;r<t;r+=2)w(this,r,r+1);return this},a.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 r=0;r<t;r+=4)w(this,r,r+3),w(this,r+1,r+2);return this},a.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 r=0;r<t;r+=8)w(this,r,r+7),w(this,r+1,r+6),w(this,r+2,r+5),w(this,r+3,r+4);return this},a.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?C(this,0,t):g.apply(this,arguments)},a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},a.prototype.compare=function(t,r,e,n,o){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),r<0||e>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&r>=e)return 0;if(n>=o)return-1;if(r>=e)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),s=Math.min(i,u),f=this.slice(n,o),c=t.slice(r,e),h=0;h<s;++h)if(f[h]!==c[h]){i=f[h],u=c[h];break}return i<u?-1:u<i?1:0},a.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},a.prototype.indexOf=function(t,r,e){return y(this,t,r,e,!0)},a.prototype.lastIndexOf=function(t,r,e){return y(this,t,r,e,!1)},a.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var o=this.length-r;if((void 0===e||e>o)&&(e=o),t.length>0&&(e<0||r<0)||r>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,r,e);case"utf8":case"utf-8":return b(this,t,r,e);case"ascii":return A(this,t,r,e);case"latin1":case"binary":return E(this,t,r,e);case"base64":return S(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r,e);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var P=4096;function R(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(127&t[o]);return n}function _(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(t[o]);return n}function x(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var o="",i=r;i<e;++i)o+=D(t[i]);return o}function U(t,r,e){for(var n=t.slice(r,e),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function M(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function I(t,r,e,n,o,i){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<i)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function L(t,r,e,n){r<0&&(r=65535+r+1);for(var o=0,i=Math.min(t.length-e,2);o<i;++o)t[e+o]=(r&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function O(t,r,e,n){r<0&&(r=4294967295+r+1);for(var o=0,i=Math.min(t.length-e,4);o<i;++o)t[e+o]=r>>>8*(n?o:3-o)&255}function Y(t,r,e,n,o,i){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function N(t,r,e,n,i){return i||Y(t,0,e,4),o.write(t,r,e,n,23,4),e+4}function j(t,r,e,n,i){return i||Y(t,0,e,8),o.write(t,r,e,n,52,8),e+8}a.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<t&&(r=t),a.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,r)).__proto__=a.prototype;else{var o=r-t;e=new a(o,void 0);for(var i=0;i<o;++i)e[i]=this[i+t]}return e},a.prototype.readUIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],o=1,i=0;++i<r&&(o*=256);)n+=this[t+i]*o;return n},a.prototype.readUIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t+--r],o=1;r>0&&(o*=256);)n+=this[t+--r]*o;return n},a.prototype.readUInt8=function(t,r){return r||M(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,r){return r||M(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,r){return r||M(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,r){return r||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,r){return r||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],o=1,i=0;++i<r&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*r)),n},a.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=r,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*r)),i},a.prototype.readInt8=function(t,r){return r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,r){r||M(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},a.prototype.readInt16BE=function(t,r){r||M(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},a.prototype.readInt32LE=function(t,r){return r||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,r){return r||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,r){return r||M(t,4,this.length),o.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,r){return r||M(t,4,this.length),o.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,r){return r||M(t,8,this.length),o.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,r){return r||M(t,8,this.length),o.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||I(this,t,r,e,Math.pow(2,8*e)-1,0);var o=1,i=0;for(this[r]=255&t;++i<e&&(o*=256);)this[r+i]=t/o&255;return r+e},a.prototype.writeUIntBE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||I(this,t,r,e,Math.pow(2,8*e)-1,0);var o=e-1,i=1;for(this[r+o]=255&t;--o>=0&&(i*=256);)this[r+o]=t/i&255;return r+e},a.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},a.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):L(this,t,r,!0),r+2},a.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):L(this,t,r,!1),r+2},a.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):O(this,t,r,!0),r+4},a.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):O(this,t,r,!1),r+4},a.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var o=Math.pow(2,8*e-1);I(this,t,r,e,o-1,-o)}var i=0,u=1,s=0;for(this[r]=255&t;++i<e&&(u*=256);)t<0&&0===s&&0!==this[r+i-1]&&(s=1),this[r+i]=(t/u>>0)-s&255;return r+e},a.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var o=Math.pow(2,8*e-1);I(this,t,r,e,o-1,-o)}var i=e-1,u=1,s=0;for(this[r+i]=255&t;--i>=0&&(u*=256);)t<0&&0===s&&0!==this[r+i+1]&&(s=1),this[r+i]=(t/u>>0)-s&255;return r+e},a.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},a.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):L(this,t,r,!0),r+2},a.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):L(this,t,r,!1),r+2},a.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):O(this,t,r,!0),r+4},a.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):O(this,t,r,!1),r+4},a.prototype.writeFloatLE=function(t,r,e){return N(this,t,r,!0,e)},a.prototype.writeFloatBE=function(t,r,e){return N(this,t,r,!1,e)},a.prototype.writeDoubleLE=function(t,r,e){return j(this,t,r,!0,e)},a.prototype.writeDoubleBE=function(t,r,e){return j(this,t,r,!1,e)},a.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=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-r<n-e&&(n=t.length-r+e);var o,i=n-e;if(this===t&&e<r&&r<n)for(o=i-1;o>=0;--o)t[o+r]=this[o+e];else if(i<1e3||!a.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+r]=this[o+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+i),r);return i},a.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=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&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var i;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(i=r;i<e;++i)this[i]=t;else{var u=a.isBuffer(t)?t:F(new a(t,n).toString()),s=u.length;for(i=0;i<e-r;++i)this[i+r]=u[i%s]}return this};var k=/[^+\/0-9A-Za-z-_]/g;function D(t){return t<16?"0"+t.toString(16):t.toString(16)}function F(t,r){var e;r=r||1/0;for(var n=t.length,o=null,i=[],u=0;u<n;++u){if((e=t.charCodeAt(u))>55295&&e<57344){if(!o){if(e>56319){(r-=3)>-1&&i.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&i.push(239,191,189);continue}o=e;continue}if(e<56320){(r-=3)>-1&&i.push(239,191,189),o=e;continue}e=65536+(o-55296<<10|e-56320)}else o&&(r-=3)>-1&&i.push(239,191,189);if(o=null,e<128){if((r-=1)<0)break;i.push(e)}else if(e<2048){if((r-=2)<0)break;i.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;i.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;i.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return i}function $(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(k,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,r,e,n){for(var o=0;o<n&&!(o+e>=r.length||o>=t.length);++o)r[o+e]=t[o];return o}}).call(this,e(3))},function(t,r,e){"use strict";function n(t){if("number"==typeof t){if(n.codes[t])return n.codes[t];throw new Error("no protocol with code: "+t)}if("string"==typeof t||t instanceof String){if(n.names[t])return n.names[t];throw new Error("no protocol with name: "+t)}throw new Error("invalid protocol id type: "+t)}const o=-1;function i(t,r,e,n,o){return{code:t,size:r,name:e,resolvable:Boolean(n),path:Boolean(o)}}n.lengthPrefixedVarSize=o,n.V=o,n.table=[[4,32,"ip4"],[6,16,"tcp"],[33,16,"dccp"],[41,128,"ip6"],[42,o,"ip6zone"],[53,o,"dns","resolvable"],[54,o,"dns4","resolvable"],[55,o,"dns6","resolvable"],[56,o,"dnsaddr","resolvable"],[132,16,"sctp"],[273,16,"udp"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[277,0,"p2p-stardust"],[290,0,"p2p-circuit"],[301,0,"udt"],[302,0,"utp"],[400,o,"unix",!1,"path"],[421,o,"ipfs"],[421,o,"p2p"],[443,0,"https"],[444,96,"onion"],[445,296,"onion3"],[446,o,"garlic64"],[460,0,"quic"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[480,0,"http"]],n.names={},n.codes={},n.table.map(t=>{const r=i.apply(null,t);n.codes[r.code]=r,n.names[r.name]=r}),n.object=i,t.exports=n},function(t,r,e){"use strict";t.exports={encode:e(22),decode:e(23),encodingLength:e(24)}},function(t,r,e){"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,r,e){"use strict";var n=e(17);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(t,r,e){t.exports=e(6)},function(t,r,e){"use strict";const n=e(7),o=R("dns4"),i=R("dns6"),u=P(R("dns"),R("dnsaddr"),o,i),s=P(R("ip4"),R("ip6")),a=P(C(s,R("tcp")),C(u,R("tcp"))),f=C(s,R("udp")),c=C(f,R("utp")),h=P(C(a,R("ws")),C(u,R("ws"))),l=P(C(a,R("wss")),C(u,R("wss"))),p=P(C(a,R("http")),C(s,R("http")),C(u,R("http"))),d=P(C(a,R("https")),C(s,R("https")),C(u,R("https"))),g=P(C(h,R("p2p-webrtc-star"),R("p2p")),C(l,R("p2p-webrtc-star"),R("p2p"))),w=P(C(h,R("p2p-websocket-star"),R("p2p")),C(l,R("p2p-websocket-star"),R("p2p")),C(h,R("p2p-websocket-star")),C(l,R("p2p-websocket-star"))),y=P(C(p,R("p2p-webrtc-direct")),C(d,R("p2p-webrtc-direct"))),m=P(h,l,p,d,g,y,a,c),v=P(C(m,R("p2p-stardust"),R("p2p")),C(m,R("p2p-stardust"))),b=P(C(m,R("p2p")),g,R("p2p")),A=P(C(b,R("p2p-circuit"),b),C(b,R("p2p-circuit")),C(R("p2p-circuit"),b),C(m,R("p2p-circuit")),C(R("p2p-circuit"),m),R("p2p-circuit")),E=()=>P(C(A,E),A),S=E(),T=P(C(S,b,S),C(b,S),C(S,b),S,b);function B(t){return function(r){if(!n.isMultiaddr(r))try{r=n(r)}catch(o){return!1}const e=t(r.protoNames());return null!==e&&0===e.length}}function C(){const t=Array.from(arguments);function r(r){return r.length<t.length?null:(t.some(t=>{if(null===(r="function"==typeof t?t().partialMatch(r):t.partialMatch(r)))return!0}),r)}return{toString:function(){return"{ "+t.join(" ")+" }"},input:t,matches:B(r),partialMatch:r}}function P(){const t=Array.from(arguments);function r(r){let e=null;return t.some(t=>{const n="function"==typeof t?t().partialMatch(r):t.partialMatch(r);if(n)return e=n,!0}),e}return{toString:function(){return"{ "+t.join(" ")+" }"},input:t,matches:B(r),partialMatch:r}}function R(t){const r=t;return{toString:function(){return r},matches:function(t){if("string"==typeof t)try{t=n(t)}catch(o){return!1}const e=t.protoNames();return 1===e.length&&e[0]===r},partialMatch:function(t){return 0===t.length?null:t[0]===r?t.slice(1):null}}}r.DNS=u,r.DNS4=o,r.DNS6=i,r.IP=s,r.TCP=a,r.UDP=f,r.UTP=c,r.HTTP=p,r.HTTPS=d,r.WebSockets=h,r.WebSocketsSecure=l,r.WebSocketStar=w,r.WebRTCStar=g,r.WebRTCDirect=y,r.Reliable=m,r.Stardust=v,r.Circuit=S,r.P2P=T,r.IPFS=T},function(t,r,e){"use strict";(function(r){const n=e(11),o=e(1),i=e(2),u=e(4),s=e(25).proto((function(t){if(!(this instanceof s))return new s(t);if(null==t&&(t=""),t instanceof r)this.buffer=n.fromBuffer(t);else if("string"==typeof t||t instanceof String){if(t.length>0&&"/"!==t.charAt(0))throw new Error('multiaddr "'.concat(t,'" must start with a "/"'));this.buffer=n.fromString(t)}else{if(!(t.buffer&&t.protos&&t.protoCodes))throw new Error("addr must be a string, Buffer, or another Multiaddr");this.buffer=n.fromBuffer(t.buffer)}}),{className:"Multiaddr",symbolName:"@multiformats/js-multiaddr/multiaddr"});s.prototype.toString=function(){return n.bufferToString(this.buffer)},s.prototype.toJSON=s.prototype.toString,s.prototype.toOptions=function(){const t={},r=this.toString().split("/");return t.family="ip4"===r[1]?"ipv4":"ipv6",t.host=r[2],t.transport=r[3],t.port=parseInt(r[4]),t},s.prototype.inspect=function(){return"<Multiaddr "+this.buffer.toString("hex")+" - "+n.bufferToString(this.buffer)+">"},s.prototype.protos=function(){return this.protoCodes().map(t=>Object.assign({},o(t)))},s.prototype.protoCodes=function(){const t=[],r=this.buffer;let e=0;for(;e<r.length;){const u=i.decode(r,e),s=i.decode.bytes,a=o(u);e+=n.sizeForAddr(a,r.slice(e+s))+s,t.push(u)}return t},s.prototype.protoNames=function(){return this.protos().map(t=>t.name)},s.prototype.tuples=function(){return n.bufferToTuples(this.buffer)},s.prototype.stringTuples=function(){const t=n.bufferToTuples(this.buffer);return n.tuplesToStringTuples(t)},s.prototype.encapsulate=function(t){return t=s(t),s(this.toString()+t.toString())},s.prototype.decapsulate=function(t){t=t.toString();const r=this.toString(),e=r.lastIndexOf(t);if(e<0)throw new Error("Address "+this+" does not contain subaddress: "+t);return s(r.slice(0,e))},s.prototype.decapsulateCode=function(t){const r=this.tuples();for(let e=r.length-1;e>=0;e--)if(r[e][0]===t)return s(n.tuplesToBuffer(r.slice(0,e)));return this},s.prototype.getPeerId=function(){let t=null;try{t=this.stringTuples().filter(t=>{if(t[0]===o.names.ipfs.code)return!0}).pop()[1],u.decode(t)}catch(r){t=null}return t},s.prototype.getPath=function(){let t=null;try{t=this.stringTuples().filter(t=>{if(o(t[0]).path)return!0})[0][1]}catch(r){t=null}return t},s.prototype.equals=function(t){return this.buffer.equals(t.buffer)},s.prototype.nodeAddress=function(){const t=this.protoCodes(),r=this.protoNames(),e=this.toString().split("/").slice(1);if(e.length<4)throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6}/{address}/{tcp, udp}/{port}".');if(4!==t[0]&&41!==t[0]&&54!==t[0]&&55!==t[0])throw new Error("no protocol with name: \"'".concat(r[0],'\'". Must have a valid family name: "{ip4, ip6, dns4, dns6}".'));if("tcp"!==e[2]&&"udp"!==e[2])throw new Error("no protocol with name: \"'".concat(r[1],'\'". Must have a valid transport protocol: "{tcp, udp}".'));return{family:41===t[0]||55===t[0]?6:4,address:e[1],port:parseInt(e[3])}},s.fromNodeAddress=function(t,r){if(!t)throw new Error("requires node address object");if(!r)throw new Error("requires transport protocol");const e="IPv6"===t.family?"ip6":"ip4";return s("/"+[e,t.address,r,t.port].join("/"))},s.prototype.isThinWaistAddress=function(t){const r=(t||this).protos();return 2===r.length&&((4===r[0].code||41===r[0].code)&&(6===r[1].code||273===r[1].code))},s.protocols=o,s.isName=function(t){return!!s.isMultiaddr(t)&&t.protos().some(t=>t.resolvable)},s.resolve=function(t){return s.isMultiaddr(t)&&s.isName(t)?Promise.reject(new Error("not implemented yet")):Promise.reject(Error("not a valid name"))},t.exports=s}).call(this,e(0).Buffer)},function(t,r,e){"use strict";r.byteLength=function(t){var r=f(t),e=r[0],n=r[1];return 3*(e+n)/4-n},r.toByteArray=function(t){var r,e,n=f(t),u=n[0],s=n[1],a=new i(function(t,r,e){return 3*(r+e)/4-e}(0,u,s)),c=0,h=s>0?u-4:u;for(e=0;e<h;e+=4)r=o[t.charCodeAt(e)]<<18|o[t.charCodeAt(e+1)]<<12|o[t.charCodeAt(e+2)]<<6|o[t.charCodeAt(e+3)],a[c++]=r>>16&255,a[c++]=r>>8&255,a[c++]=255&r;2===s&&(r=o[t.charCodeAt(e)]<<2|o[t.charCodeAt(e+1)]>>4,a[c++]=255&r);1===s&&(r=o[t.charCodeAt(e)]<<10|o[t.charCodeAt(e+1)]<<4|o[t.charCodeAt(e+2)]>>2,a[c++]=r>>8&255,a[c++]=255&r);return a},r.fromByteArray=function(t){for(var r,e=t.length,o=e%3,i=[],u=0,s=e-o;u<s;u+=16383)i.push(c(t,u,u+16383>s?s:u+16383));1===o?(r=t[e-1],i.push(n[r>>2]+n[r<<4&63]+"==")):2===o&&(r=(t[e-2]<<8)+t[e-1],i.push(n[r>>10]+n[r>>4&63]+n[r<<2&63]+"="));return i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=u.length;s<a;++s)n[s]=u[s],o[u.charCodeAt(s)]=s;function f(t){var r=t.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=t.indexOf("=");return-1===e&&(e=r),[e,e===r?0:4-e%4]}function c(t,r,e){for(var o,i,u=[],s=r;s<e;s+=3)o=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+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,r,e){"use strict";r.read=function(t,r,e,n,o){var i,u,s=8*o-n-1,a=(1<<s)-1,f=a>>1,c=-7,h=e?o-1:0,l=e?-1:1,p=t[r+h];for(h+=l,i=p&(1<<-c)-1,p>>=-c,c+=s;c>0;i=256*i+t[r+h],h+=l,c-=8);for(u=i&(1<<-c)-1,i>>=-c,c+=n;c>0;u=256*u+t[r+h],h+=l,c-=8);if(0===i)i=1-f;else{if(i===a)return u?NaN:1/0*(p?-1:1);u+=Math.pow(2,n),i-=f}return(p?-1:1)*u*Math.pow(2,i-n)},r.write=function(t,r,e,n,o,i){var u,s,a,f=8*i-o-1,c=(1<<f)-1,h=c>>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,g=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(s=isNaN(r)?1:0,u=c):(u=Math.floor(Math.log(r)/Math.LN2),r*(a=Math.pow(2,-u))<1&&(u--,a*=2),(r+=u+h>=1?l/a:l*Math.pow(2,1-h))*a>=2&&(u++,a/=2),u+h>=c?(s=0,u=c):u+h>=1?(s=(r*a-1)*Math.pow(2,o),u+=h):(s=r*Math.pow(2,h-1)*Math.pow(2,o),u=0));o>=8;t[e+p]=255&s,p+=d,s/=256,o-=8);for(u=u<<o|s,f+=o;f>0;t[e+p]=255&u,p+=d,u/=256,f-=8);t[e+p-d]|=128*g}},function(t,r,e){"use strict";var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,r,e){"use strict";(function(r){const n=e(12),o=e(1),i=e(2);function u(t){const r=[],e=t.split("/").slice(1);if(1===e.length&&""===e[0])return[];for(let n=0;n<e.length;n++){const i=e[n],u=o(i);if(0!==u.size){if(++n>=e.length)throw y("invalid address: "+t);if(u.path){r.push([i,w(e.slice(n).join("/"))]);break}r.push([i,e[n]])}else r.push([i])}return r}function s(t){const r=[];return t.map(t=>{const e=m(t);r.push(e.name),t.length>1&&r.push(t[1])}),w(r.join("/"))}function a(t){return t.map(t=>{Array.isArray(t)||(t=[t]);const r=m(t);return t.length>1?[r.code,n.toBuffer(r.code,t[1])]:[r.code]})}function f(t){return t.map(t=>{const r=m(t);return t.length>1?[r.code,n.toString(r.code,t[1])]:[r.code]})}function c(t){return d(r.concat(t.map(t=>{const e=m(t);let n=r.from(i.encode(e.code));return t.length>1&&(n=r.concat([n,t[1]])),n})))}function h(t,r){if(t.size>0)return t.size/8;if(0===t.size)return 0;return i.decode(r)+i.decode.bytes}function l(t){const r=[];let e=0;for(;e<t.length;){const n=i.decode(t,e),u=i.decode.bytes,s=h(o(n),t.slice(e+u));if(0===s){r.push([n]),e+=u;continue}const a=t.slice(e+u,e+u+s);if((e+=s+u)>t.length)throw y("Invalid address buffer: "+t.toString("hex"));r.push([n,a])}return r}function p(t){return c(a(u(t=w(t))))}function d(t){const e=g(t);if(e)throw e;return r.from(t)}function g(t){try{l(t)}catch(r){return r}}function w(t){return"/"+t.trim().split("/").filter(t=>t).join("/")}function y(t){return new Error("Error parsing address: "+t)}function m(t){return o(t[0])}t.exports={stringToStringTuples:u,stringTuplesToString:s,tuplesToStringTuples:f,stringTuplesToTuples:a,bufferToTuples:l,tuplesToBuffer:c,bufferToString:function(t){return s(f(l(t)))},stringToBuffer:p,fromString:function(t){return p(t)},fromBuffer:d,validateBuffer:g,isValidBuffer:function(t){return void 0===g(t)},cleanPath:w,ParseError:y,protoFromTuple:m,sizeForAddr:h}}).call(this,e(0).Buffer)},function(t,r,e){"use strict";(function(r){const n=e(13),o=e(15),i=e(1),u=e(4),s=e(19),a=e(2);function f(t,e){return e instanceof r?f.toString(t,e):f.toBuffer(t,e)}function c(t){if(!o(t))throw new Error("invalid ip address");return n.toBuffer(t)}function h(t){const e=r.alloc(2);return e.writeUInt16BE(t,0),e}function l(t){return t.readUInt16BE(0)}function p(t){const r=t.slice(0,t.length-2),e=t.slice(t.length-2);return s.encode(r).toString("ascii").toLowerCase()+":"+l(e)}t.exports=f,f.toString=function(t,r){switch((t=i(t)).code){case 4:case 41:return function(t){const r=n.toString(t);if(!o(r))throw new Error("invalid ip address");return r}(r);case 6:case 273:case 33:case 132:return l(r);case 53:case 54:case 55:case 56:case 400:return function(t){const r=a.decode(t);if((t=t.slice(a.decode.bytes)).length!==r)throw new Error("inconsistent lengths");return t.toString()}(r);case 421:return function(t){const r=a.decode(t),e=t.slice(a.decode.bytes);if(e.length!==r)throw new Error("inconsistent lengths");return u.encode(e)}(r);case 444:case 445:return p(r);default:return r.toString("hex")}},f.toBuffer=function(t,e){switch((t=i(t)).code){case 4:case 41:return c(e);case 6:case 273:case 33:case 132:return h(parseInt(e,10));case 53:case 54:case 55:case 56:case 400:return function(t){const e=r.from(t),n=r.from(a.encode(e.length));return r.concat([n,e])}(e);case 421:return function(t){const e=r.from(u.decode(t)),n=r.from(a.encode(e.length));return r.concat([n,e])}(e);case 444:return function(t){const e=t.split(":");if(2!==e.length)throw new Error("failed to parse onion addr: "+e+" does not contain a port number");if(16!==e[0].length)throw new Error("failed to parse onion addr: "+e[0]+" not a Tor onion address.");const n=r.from(s.decode.asBytes(e[0].toUpperCase())),o=parseInt(e[1],10);if(o<1||o>65536)throw new Error("Port number is not in range(1, 65536)");const i=h(o);return r.concat([n,i])}(e);case 445:return function(t){const e=t.split(":");if(2!==e.length)throw new Error("failed to parse onion addr: "+e+" does not contain a port number");if(56!==e[0].length)throw new Error("failed to parse onion addr: "+e[0]+" not a Tor onion3 address.");const n=r.from(s.decode.asBytes(e[0].toUpperCase())),o=parseInt(e[1],10);if(o<1||o>65536)throw new Error("Port number is not in range(1, 65536)");const i=h(o);return r.concat([n,i])}(e);default:return r.from(e,"hex")}}}).call(this,e(0).Buffer)},function(t,r,e){"use strict";var n=r,o=e(0).Buffer,i=e(14);n.toBuffer=function(t,r,e){var n;if(e=~~e,this.isV4Format(t))n=r||new o(e+4),t.split(/\./g).map((function(t){n[e++]=255&parseInt(t,10)}));else if(this.isV6Format(t)){var i,u=t.split(":",8);for(i=0;i<u.length;i++){var s;this.isV4Format(u[i])&&(s=this.toBuffer(u[i]),u[i]=s.slice(0,2).toString("hex")),s&&++i<8&&u.splice(i,0,s.slice(2,4).toString("hex"))}if(""===u[0])for(;u.length<8;)u.unshift("0");else if(""===u[u.length-1])for(;u.length<8;)u.push("0");else if(u.length<8){for(i=0;i<u.length&&""!==u[i];i++);var a=[i,1];for(i=9-u.length;i>0;i--)a.push("0");u.splice.apply(u,a)}for(n=r||new o(e+16),i=0;i<u.length;i++){var f=parseInt(u[i],16);n[e++]=f>>8&255,n[e++]=255&f}}if(!n)throw Error("Invalid ip address: "+t);return n},n.toString=function(t,r,e){r=~~r;var n=[];if(4===(e=e||t.length-r)){for(var o=0;o<e;o++)n.push(t[r+o]);n=n.join(".")}else if(16===e){for(o=0;o<e;o+=2)n.push(t.readUInt16BE(r+o).toString(16));n=(n=(n=n.join(":")).replace(/(^|:)0(:0)*:0(:|$)/,"$1::$3")).replace(/:{3,4}/,"::")}return n};var u=/^(\d{1,3}\.){3,3}\d{1,3}$/,s=/^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i;function a(t){return t?t.toLowerCase():"ipv4"}n.isV4Format=function(t){return u.test(t)},n.isV6Format=function(t){return s.test(t)},n.fromPrefixLen=function(t,r){var e=4;"ipv6"===(r=t>32?"ipv6":a(r))&&(e=16);for(var i=new o(e),u=0,s=i.length;u<s;++u){var f=8;t<8&&(f=t),t-=f,i[u]=255&~(255>>f)}return n.toString(i)},n.mask=function(t,r){t=n.toBuffer(t),r=n.toBuffer(r);var e=new o(Math.max(t.length,r.length)),i=0;if(t.length===r.length)for(i=0;i<t.length;i++)e[i]=t[i]&r[i];else if(4===r.length)for(i=0;i<r.length;i++)e[i]=t[t.length-4+i]&r[i];else{for(i=0;i<e.length-6;i++)e[i]=0;for(e[10]=255,e[11]=255,i=0;i<t.length;i++)e[i+12]=t[i]&r[i+12];i+=12}for(;i<e.length;i++)e[i]=0;return n.toString(e)},n.cidr=function(t){var r=t.split("/"),e=r[0];if(2!==r.length)throw new Error("invalid CIDR subnet: "+e);var o=n.fromPrefixLen(parseInt(r[1],10));return n.mask(e,o)},n.subnet=function(t,r){for(var e=n.toLong(n.mask(t,r)),o=n.toBuffer(r),i=0,u=0;u<o.length;u++)if(255===o[u])i+=8;else for(var s=255&o[u];s;)s=s<<1&255,i++;var a=Math.pow(2,32-i);return{networkAddress:n.fromLong(e),firstAddress:a<=2?n.fromLong(e):n.fromLong(e+1),lastAddress:a<=2?n.fromLong(e+a-1):n.fromLong(e+a-2),broadcastAddress:n.fromLong(e+a-1),subnetMask:r,subnetMaskLength:i,numHosts:a<=2?a:a-2,length:a,contains:function(t){return e===n.toLong(n.mask(t,r))}}},n.cidrSubnet=function(t){var r=t.split("/"),e=r[0];if(2!==r.length)throw new Error("invalid CIDR subnet: "+e);var o=n.fromPrefixLen(parseInt(r[1],10));return n.subnet(e,o)},n.not=function(t){for(var r=n.toBuffer(t),e=0;e<r.length;e++)r[e]=255^r[e];return n.toString(r)},n.or=function(t,r){if(t=n.toBuffer(t),r=n.toBuffer(r),t.length===r.length){for(var e=0;e<t.length;++e)t[e]|=r[e];return n.toString(t)}var o=t,i=r;r.length>t.length&&(o=r,i=t);var u=o.length-i.length;for(e=u;e<o.length;++e)o[e]|=i[e-u];return n.toString(o)},n.isEqual=function(t,r){if(t=n.toBuffer(t),r=n.toBuffer(r),t.length===r.length){for(var e=0;e<t.length;e++)if(t[e]!==r[e])return!1;return!0}if(4===r.length){var o=r;r=t,t=o}for(e=0;e<10;e++)if(0!==r[e])return!1;var i=r.readUInt16BE(10);if(0!==i&&65535!==i)return!1;for(e=0;e<4;e++)if(t[e]!==r[e+12])return!1;return!0},n.isPrivate=function(t){return/^(::f{4}:)?10\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(t)||/^(::f{4}:)?192\.168\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(t)||/^(::f{4}:)?172\.(1[6-9]|2\d|30|31)\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(t)||/^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(t)||/^(::f{4}:)?169\.254\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(t)||/^f[cd][0-9a-f]{2}:/i.test(t)||/^fe80:/i.test(t)||/^::1$/.test(t)||/^::$/.test(t)},n.isPublic=function(t){return!n.isPrivate(t)},n.isLoopback=function(t){return/^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/.test(t)||/^fe80::1$/.test(t)||/^::1$/.test(t)||/^::$/.test(t)},n.loopback=function(t){if("ipv4"!==(t=a(t))&&"ipv6"!==t)throw new Error("family must be ipv4 or ipv6");return"ipv4"===t?"127.0.0.1":"fe80::1"},n.address=function(t,r){var e,o=i.networkInterfaces();if(r=a(r),t&&"private"!==t&&"public"!==t){var u=o[t].filter((function(t){return t.family.toLowerCase()===r}));if(0===u.length)return;return u[0].address}return(e=Object.keys(o).map((function(e){var i=o[e].filter((function(e){return e.family=e.family.toLowerCase(),e.family===r&&!n.isLoopback(e.address)&&(!t||("public"===t?n.isPrivate(e.address):n.isPublic(e.address)))}));return i.length?i[0].address:void 0})).filter(Boolean)).length?e[0]:n.loopback(r)},n.toLong=function(t){var r=0;return t.split(".").forEach((function(t){r<<=8,r+=parseInt(t)})),r>>>0},n.fromLong=function(t){return(t>>>24)+"."+(t>>16&255)+"."+(t>>8&255)+"."+(255&t)}},function(t,r,e){"use strict";r.endianness=function(){return"LE"},r.hostname=function(){return"undefined"!=typeof location?location.hostname:""},r.loadavg=function(){return[]},r.uptime=function(){return 0},r.freemem=function(){return Number.MAX_VALUE},r.totalmem=function(){return Number.MAX_VALUE},r.cpus=function(){return[]},r.type=function(){return"Browser"},r.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},r.networkInterfaces=r.getNetworkInterfaces=function(){return{}},r.arch=function(){return"javascript"},r.platform=function(){return"browser"},r.tmpdir=r.tmpDir=function(){return"/tmp"},r.EOL="\n",r.homedir=function(){return"/"}},function(t,r,e){"use strict";const n=e(16),o=t=>n({exact:!0}).test(t);o.v4=t=>n.v4({exact:!0}).test(t),o.v6=t=>n.v6({exact:!0}).test(t),o.version=t=>o(t)?o.v4(t)?4:6:void 0,t.exports=o},function(t,r,e){"use strict";const n=t=>t&&t.includeBoundaries?"(?:(?<=\\s|^)(?=".concat("[a-fA-F\\d:]",")|(?<=").concat("[a-fA-F\\d:]",")(?=\\s|$))"):"",o="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",i="[a-fA-F\\d]{1,4}",u="\n(\n(?:".concat(i,":){7}(?:").concat(i,"|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:").concat(i,":){6}(?:").concat(o,"|:").concat(i,"|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:").concat(i,":){5}(?::").concat(o,"|(:").concat(i,"){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:").concat(i,":){4}(?:(:").concat(i,"){0,1}:").concat(o,"|(:").concat(i,"){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:").concat(i,":){3}(?:(:").concat(i,"){0,2}:").concat(o,"|(:").concat(i,"){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:").concat(i,":){2}(?:(:").concat(i,"){0,3}:").concat(o,"|(:").concat(i,"){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:").concat(i,":){1}(?:(:").concat(i,"){0,4}:").concat(o,"|(:").concat(i,"){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::((?::").concat(i,"){0,5}:").concat(o,"|(?::").concat(i,"){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),s=t=>t&&t.exact?new RegExp("(?:^".concat(o,"$)|(?:^").concat(u,"$)")):new RegExp("(?:".concat(n(t)).concat(o).concat(n(t),")|(?:").concat(n(t)).concat(u).concat(n(t),")"),"g");s.v4=t=>t&&t.exact?new RegExp("^".concat(o,"$")):new RegExp("".concat(n(t)).concat(o).concat(n(t)),"g"),s.v6=t=>t&&t.exact?new RegExp("^".concat(u,"$")):new RegExp("".concat(n(t)).concat(u).concat(n(t)),"g"),t.exports=s},function(t,r,e){"use strict";var n=e(18).Buffer;t.exports=function(t){if(t.length>=255)throw new TypeError("Alphabet too long");var r=new Uint8Array(256);r.fill(255);for(var e=0;e<t.length;e++){var o=t.charAt(e),i=o.charCodeAt(0);if(255!==r[i])throw new TypeError(o+" is ambiguous");r[i]=e}var u=t.length,s=t.charAt(0),a=Math.log(u)/Math.log(256),f=Math.log(256)/Math.log(u);function c(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return n.alloc(0);var e=0;if(" "!==t[e]){for(var o=0,i=0;t[e]===s;)o++,e++;for(var f=(t.length-e)*a+1>>>0,c=new Uint8Array(f);t[e];){var h=r[t.charCodeAt(e)];if(255===h)return;for(var l=0,p=f-1;(0!==h||l<i)&&-1!==p;p--,l++)h+=u*c[p]>>>0,c[p]=h%256>>>0,h=h/256>>>0;if(0!==h)throw new Error("Non-zero carry");i=l,e++}if(" "!==t[e]){for(var d=f-i;d!==f&&0===c[d];)d++;var g=n.allocUnsafe(o+(f-d));g.fill(0,0,o);for(var w=o;d!==f;)g[w++]=c[d++];return g}}}return{encode:function(r){if(!n.isBuffer(r))throw new TypeError("Expected Buffer");if(0===r.length)return"";for(var e=0,o=0,i=0,a=r.length;i!==a&&0===r[i];)i++,e++;for(var c=(a-i)*f+1>>>0,h=new Uint8Array(c);i!==a;){for(var l=r[i],p=0,d=c-1;(0!==l||p<o)&&-1!==d;d--,p++)l+=256*h[d]>>>0,h[d]=l%u>>>0,l=l/u>>>0;if(0!==l)throw new Error("Non-zero carry");o=p,i++}for(var g=c-o;g!==c&&0===h[g];)g++;for(var w=s.repeat(e);g<c;++g)w+=t.charAt(h[g]);return w},decodeUnsafe:c,decode:function(t){var r=c(t);if(r)return r;throw new Error("Non-base"+u+" character")}}}},function(t,r,e){"use strict";var n=e(0),o=n.Buffer;function i(t,r){for(var e in t)r[e]=t[e]}function u(t,r,e){return o(t,r,e)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?t.exports=n:(i(n,r),r.Buffer=u),u.prototype=Object.create(o.prototype),i(o,u),u.from=function(t,r,e){if("number"==typeof t)throw new TypeError("Argument must not be a number");return o(t,r,e)},u.alloc=function(t,r,e){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=o(t);return void 0!==r?"string"==typeof e?n.fill(r,e):n.fill(r):n.fill(0),n},u.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return o(t)},u.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,r,e){"use strict";(function(r,n){var o;!function(){var i="object"==typeof window?window:{};!i.HI_BASE32_NO_NODE_JS&&"object"==typeof r&&r.versions&&r.versions.node&&(i=n);var u=!i.HI_BASE32_NO_COMMON_JS&&"object"==typeof t&&t.exports,s=e(21),a="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".split(""),f={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,2:26,3:27,4:28,5:29,6:30,7:31},c=[0,0,0,0,0,0,0,0],h=function(t,r){r.length>10&&(r="..."+r.substr(-10));var e=new Error("Decoded data is not valid UTF-8. Maybe try base32.decode.asBytes()? Partial data after reading "+t+" bytes: "+r+" <-");throw e.position=t,e},l=function(t){if(!/^[A-Z2-7=]+$/.test(t))throw new Error("Invalid base32 characters");for(var r,e,n,o,i,u,s,a,c=[],h=0,l=(t=t.replace(/=/g,"")).length,p=0,d=l>>3<<3;p<d;)r=f[t.charAt(p++)],e=f[t.charAt(p++)],n=f[t.charAt(p++)],o=f[t.charAt(p++)],i=f[t.charAt(p++)],u=f[t.charAt(p++)],s=f[t.charAt(p++)],a=f[t.charAt(p++)],c[h++]=255&(r<<3|e>>>2),c[h++]=255&(e<<6|n<<1|o>>>4),c[h++]=255&(o<<4|i>>>1),c[h++]=255&(i<<7|u<<2|s>>>3),c[h++]=255&(s<<5|a);var g=l-d;return 2===g?(r=f[t.charAt(p++)],e=f[t.charAt(p++)],c[h++]=255&(r<<3|e>>>2)):4===g?(r=f[t.charAt(p++)],e=f[t.charAt(p++)],n=f[t.charAt(p++)],o=f[t.charAt(p++)],c[h++]=255&(r<<3|e>>>2),c[h++]=255&(e<<6|n<<1|o>>>4)):5===g?(r=f[t.charAt(p++)],e=f[t.charAt(p++)],n=f[t.charAt(p++)],o=f[t.charAt(p++)],i=f[t.charAt(p++)],c[h++]=255&(r<<3|e>>>2),c[h++]=255&(e<<6|n<<1|o>>>4),c[h++]=255&(o<<4|i>>>1)):7===g&&(r=f[t.charAt(p++)],e=f[t.charAt(p++)],n=f[t.charAt(p++)],o=f[t.charAt(p++)],i=f[t.charAt(p++)],u=f[t.charAt(p++)],s=f[t.charAt(p++)],c[h++]=255&(r<<3|e>>>2),c[h++]=255&(e<<6|n<<1|o>>>4),c[h++]=255&(o<<4|i>>>1),c[h++]=255&(i<<7|u<<2|s>>>3)),c},p=function(t,r){if(!r)return function(t){for(var r,e,n="",o=t.length,i=0,u=0;i<o;)if((r=t[i++])<=127)n+=String.fromCharCode(r);else{r>191&&r<=223?(e=31&r,u=1):r<=239?(e=15&r,u=2):r<=247?(e=7&r,u=3):h(i,n);for(var s=0;s<u;++s)((r=t[i++])<128||r>191)&&h(i,n),e<<=6,e+=63&r;e>=55296&&e<=57343&&h(i,n),e>1114111&&h(i,n),e<=65535?n+=String.fromCharCode(e):(e-=65536,n+=String.fromCharCode(55296+(e>>10)),n+=String.fromCharCode(56320+(1023&e)))}return n}(l(t));if(!/^[A-Z2-7=]+$/.test(t))throw new Error("Invalid base32 characters");var e,n,o,i,u,s,a,c,p="",d=t.indexOf("=");-1===d&&(d=t.length);for(var g=0,w=d>>3<<3;g<w;)e=f[t.charAt(g++)],n=f[t.charAt(g++)],o=f[t.charAt(g++)],i=f[t.charAt(g++)],u=f[t.charAt(g++)],s=f[t.charAt(g++)],a=f[t.charAt(g++)],c=f[t.charAt(g++)],p+=String.fromCharCode(255&(e<<3|n>>>2))+String.fromCharCode(255&(n<<6|o<<1|i>>>4))+String.fromCharCode(255&(i<<4|u>>>1))+String.fromCharCode(255&(u<<7|s<<2|a>>>3))+String.fromCharCode(255&(a<<5|c));var y=d-w;return 2===y?(e=f[t.charAt(g++)],n=f[t.charAt(g++)],p+=String.fromCharCode(255&(e<<3|n>>>2))):4===y?(e=f[t.charAt(g++)],n=f[t.charAt(g++)],o=f[t.charAt(g++)],i=f[t.charAt(g++)],p+=String.fromCharCode(255&(e<<3|n>>>2))+String.fromCharCode(255&(n<<6|o<<1|i>>>4))):5===y?(e=f[t.charAt(g++)],n=f[t.charAt(g++)],o=f[t.charAt(g++)],i=f[t.charAt(g++)],u=f[t.charAt(g++)],p+=String.fromCharCode(255&(e<<3|n>>>2))+String.fromCharCode(255&(n<<6|o<<1|i>>>4))+String.fromCharCode(255&(i<<4|u>>>1))):7===y&&(e=f[t.charAt(g++)],n=f[t.charAt(g++)],o=f[t.charAt(g++)],i=f[t.charAt(g++)],u=f[t.charAt(g++)],s=f[t.charAt(g++)],a=f[t.charAt(g++)],p+=String.fromCharCode(255&(e<<3|n>>>2))+String.fromCharCode(255&(n<<6|o<<1|i>>>4))+String.fromCharCode(255&(i<<4|u>>>1))+String.fromCharCode(255&(u<<7|s<<2|a>>>3))),p},d={encode:function(t,r){var e="string"!=typeof t;return e&&t.constructor===ArrayBuffer&&(t=new Uint8Array(t)),e?function(t){for(var r,e,n,o,i,u="",s=t.length,f=0,c=5*parseInt(s/5);f<c;)r=t[f++],e=t[f++],n=t[f++],o=t[f++],i=t[f++],u+=a[r>>>3]+a[31&(r<<2|e>>>6)]+a[e>>>1&31]+a[31&(e<<4|n>>>4)]+a[31&(n<<1|o>>>7)]+a[o>>>2&31]+a[31&(o<<3|i>>>5)]+a[31&i];var h=s-c;return 1===h?(r=t[f],u+=a[r>>>3]+a[r<<2&31]+"======"):2===h?(r=t[f++],e=t[f],u+=a[r>>>3]+a[31&(r<<2|e>>>6)]+a[e>>>1&31]+a[e<<4&31]+"===="):3===h?(r=t[f++],e=t[f++],n=t[f],u+=a[r>>>3]+a[31&(r<<2|e>>>6)]+a[e>>>1&31]+a[31&(e<<4|n>>>4)]+a[n<<1&31]+"==="):4===h&&(r=t[f++],e=t[f++],n=t[f++],o=t[f],u+=a[r>>>3]+a[31&(r<<2|e>>>6)]+a[e>>>1&31]+a[31&(e<<4|n>>>4)]+a[31&(n<<1|o>>>7)]+a[o>>>2&31]+a[o<<3&31]+"="),u}(t):r?function(t){for(var r,e,n,o,i,u="",s=t.length,f=0,c=5*parseInt(s/5);f<c;)r=t.charCodeAt(f++),e=t.charCodeAt(f++),n=t.charCodeAt(f++),o=t.charCodeAt(f++),i=t.charCodeAt(f++),u+=a[r>>>3]+a[31&(r<<2|e>>>6)]+a[e>>>1&31]+a[31&(e<<4|n>>>4)]+a[31&(n<<1|o>>>7)]+a[o>>>2&31]+a[31&(o<<3|i>>>5)]+a[31&i];var h=s-c;return 1===h?(r=t.charCodeAt(f),u+=a[r>>>3]+a[r<<2&31]+"======"):2===h?(r=t.charCodeAt(f++),e=t.charCodeAt(f),u+=a[r>>>3]+a[31&(r<<2|e>>>6)]+a[e>>>1&31]+a[e<<4&31]+"===="):3===h?(r=t.charCodeAt(f++),e=t.charCodeAt(f++),n=t.charCodeAt(f),u+=a[r>>>3]+a[31&(r<<2|e>>>6)]+a[e>>>1&31]+a[31&(e<<4|n>>>4)]+a[n<<1&31]+"==="):4===h&&(r=t.charCodeAt(f++),e=t.charCodeAt(f++),n=t.charCodeAt(f++),o=t.charCodeAt(f),u+=a[r>>>3]+a[31&(r<<2|e>>>6)]+a[e>>>1&31]+a[31&(e<<4|n>>>4)]+a[31&(n<<1|o>>>7)]+a[o>>>2&31]+a[o<<3&31]+"="),u}(t):function(t){var r,e,n,o,i,u,s,f=!1,h="",l=0,p=0,d=t.length;do{for(c[0]=c[5],c[1]=c[6],c[2]=c[7],s=p;l<d&&s<5;++l)(u=t.charCodeAt(l))<128?c[s++]=u:u<2048?(c[s++]=192|u>>6,c[s++]=128|63&u):u<55296||u>=57344?(c[s++]=224|u>>12,c[s++]=128|u>>6&63,c[s++]=128|63&u):(u=65536+((1023&u)<<10|1023&t.charCodeAt(++l)),c[s++]=240|u>>18,c[s++]=128|u>>12&63,c[s++]=128|u>>6&63,c[s++]=128|63&u);s-p,p=s-5,l===d&&++l,l>d&&s<6&&(f=!0),r=c[0],s>4?(e=c[1],n=c[2],o=c[3],i=c[4],h+=a[r>>>3]+a[31&(r<<2|e>>>6)]+a[e>>>1&31]+a[31&(e<<4|n>>>4)]+a[31&(n<<1|o>>>7)]+a[o>>>2&31]+a[31&(o<<3|i>>>5)]+a[31&i]):1===s?h+=a[r>>>3]+a[r<<2&31]+"======":2===s?(e=c[1],h+=a[r>>>3]+a[31&(r<<2|e>>>6)]+a[e>>>1&31]+a[e<<4&31]+"===="):3===s?(e=c[1],n=c[2],h+=a[r>>>3]+a[31&(r<<2|e>>>6)]+a[e>>>1&31]+a[31&(e<<4|n>>>4)]+a[n<<1&31]+"==="):(e=c[1],n=c[2],o=c[3],h+=a[r>>>3]+a[31&(r<<2|e>>>6)]+a[e>>>1&31]+a[31&(e<<4|n>>>4)]+a[31&(n<<1|o>>>7)]+a[o>>>2&31]+a[o<<3&31]+"=")}while(!f);return h}(t)},decode:p};p.asBytes=l,u?t.exports=d:(i.base32=d,s&&(void 0===(o=function(){return d}.call(d,e,d,t))||(t.exports=o)))}()}).call(this,e(20),e(3))},function(t,r,e){"use strict";var n,o,i=t.exports={};function u(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===u||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(r){try{return n.call(null,t,0)}catch(r){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:u}catch(t){n=u}try{o="function"==typeof clearTimeout?clearTimeout:s}catch(t){o=s}}();var f,c=[],h=!1,l=-1;function p(){h&&f&&(h=!1,f.length?c=f.concat(c):l=-1,c.length&&d())}function d(){if(!h){var t=a(p);h=!0;for(var r=c.length;r;){for(f=c,c=[];++l<r;)f&&f[l].run();l=-1,r=c.length}f=null,h=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===s||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(r){try{return o.call(null,t)}catch(r){return o.call(this,t)}}}(t)}}function g(t,r){this.fun=t,this.array=r}function w(){}i.nextTick=function(t){var r=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)r[e-1]=arguments[e];c.push(new g(t,r)),1!==c.length||h||a(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=w,i.addListener=w,i.once=w,i.off=w,i.removeListener=w,i.removeAllListeners=w,i.emit=w,i.prependListener=w,i.prependOnceListener=w,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,r){(function(r){t.exports=r}).call(this,{})},function(t,r,e){"use strict";t.exports=function t(r,e,u){e=e||[];u=u||0;var s=u;for(;r>=i;)e[u++]=255&r|n,r/=128;for(;r&o;)e[u++]=255&r|n,r>>>=7;e[u]=0|r;t.bytes=u-s+1;return e};var n=128,o=-128,i=Math.pow(2,31)},function(t,r,e){"use strict";t.exports=function t(r,e){var i,u=0,s=(e=e||0,0),a=e,f=r.length;do{if(a>=f)throw t.bytes=0,new RangeError("Could not decode varint");i=r[a++],u+=s<28?(i&o)<<s:(i&o)*Math.pow(2,s),s+=7}while(i>=n);t.bytes=a-e;return u};var n=128,o=127},function(t,r,e){"use strict";var n=Math.pow(2,7),o=Math.pow(2,14),i=Math.pow(2,21),u=Math.pow(2,28),s=Math.pow(2,35),a=Math.pow(2,42),f=Math.pow(2,49),c=Math.pow(2,56),h=Math.pow(2,63);t.exports=function(t){return t<n?1:t<o?2:t<i?3:t<u?4:t<s?5:t<a?6:t<f?7:t<c?8:t<h?9:10}},function(t,r,e){"use strict";t.exports=function(t,r){let{className:e,symbolName:n}=r;const o=Symbol.for(n),i={[e]:class extends t{constructor(){super(...arguments),Object.defineProperty(this,o,{value:!0})}get[Symbol.toStringTag](){return e}}}[e];return i["is".concat(e)]=t=>!(!t||!t[o]),i},t.exports.proto=function(t,r){let{className:e,symbolName:n,withoutNew:o}=r;const i=Symbol.for(n),u={[e]:function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(o&&!(this instanceof u))return new u(...e);const s=t.call(this,...e)||this;return s&&!s[i]&&Object.defineProperty(s,i,{value:!0}),s}}[e];return u.prototype=Object.create(t.prototype),u.prototype.constructor=u,Object.defineProperty(u.prototype,Symbol.toStringTag,{get:()=>e}),u["is".concat(e)]=t=>!(!t||!t[i]),u}}])})); | ||
//# sourceMappingURL=index.min.js.map |
{ | ||
"name": "mafmt", | ||
"version": "6.0.10", | ||
"version": "7.0.0", | ||
"description": "A multiaddr validator", | ||
@@ -20,4 +20,3 @@ "leadMaintainer": "Vasco Santos <vasco.santos@moxy.studio>", | ||
"pre-push": [ | ||
"lint", | ||
"test" | ||
"lint" | ||
], | ||
@@ -36,3 +35,3 @@ "repository": "github:multiformats/js-mafmt", | ||
"dependencies": { | ||
"multiaddr": "^6.1.0" | ||
"multiaddr": "^7.0.0" | ||
}, | ||
@@ -39,0 +38,0 @@ "contributors": [ |
@@ -48,4 +48,2 @@ 'use strict' | ||
const WebRTCStar = or( | ||
and(WebSockets, base('p2p-webrtc-star'), base('ipfs')), | ||
and(WebSocketsSecure, base('p2p-webrtc-star'), base('ipfs')), | ||
and(WebSockets, base('p2p-webrtc-star'), base('p2p')), | ||
@@ -56,4 +54,2 @@ and(WebSocketsSecure, base('p2p-webrtc-star'), base('p2p')) | ||
const WebSocketStar = or( | ||
and(WebSockets, base('p2p-websocket-star'), base('ipfs')), | ||
and(WebSocketsSecure, base('p2p-websocket-star'), base('ipfs')), | ||
and(WebSockets, base('p2p-websocket-star'), base('p2p')), | ||
@@ -83,3 +79,3 @@ and(WebSocketsSecure, base('p2p-websocket-star'), base('p2p')), | ||
const Stardust = or( | ||
and(Reliable, base('p2p-stardust'), base('ipfs')), | ||
and(Reliable, base('p2p-stardust'), base('p2p')), | ||
and(Reliable, base('p2p-stardust')) | ||
@@ -89,6 +85,4 @@ ) | ||
const _P2P = or( | ||
and(Reliable, base('ipfs')), | ||
and(Reliable, base('p2p')), | ||
WebRTCStar, | ||
base('ipfs'), | ||
base('p2p') | ||
@@ -95,0 +89,0 @@ ) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2171939
6331
+ Addedbase64-js@1.5.1(transitive)
+ Addedbuffer@5.7.1(transitive)
+ Addedcids@0.8.3(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addedip-regex@4.3.0(transitive)
+ Addedis-ip@3.1.0(transitive)
+ Addedmultiaddr@7.5.0(transitive)
+ Addedmultibase@0.7.01.0.1(transitive)
+ Addedmulticodec@1.0.4(transitive)
+ Addedmultihashes@1.0.1(transitive)
- Removedbs58@4.0.1(transitive)
- Removedhi-base32@0.5.1(transitive)
- Removedip@1.1.9(transitive)
- Removedip-regex@2.1.0(transitive)
- Removedis-ip@2.0.0(transitive)
- Removedmultiaddr@6.1.1(transitive)
Updatedmultiaddr@^7.0.0