Comparing version 6.0.4 to 6.0.5
@@ -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=4)}([function(t,r,e){"use strict";(function(t){var n=e(8),o=e(9),i=e(10);function u(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function f(t,r){if(u()<r)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=s.prototype:(null===t&&(t=new s(r)),t.length=r),t}function s(t,r,e){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(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 a(this,t,r,e)}function a(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);s.TYPED_ARRAY_SUPPORT?(t=r).__proto__=s.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(!s.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|g(r,e),o=(t=f(t,n)).write(r,e);o!==n&&(t=t.slice(0,o));return t}(t,r,e):function(t,r){if(s.isBuffer(r)){var e=0|l(r.length);return 0===(t=f(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?f(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=f(t,r<0?0:0|l(r)),!s.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=f(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function l(t){if(t>=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|t}function g(t,r){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var 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 D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return z(t).length;default:if(n)return D(t).length;r=(""+r).toLowerCase(),n=!0}}function d(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=s.from(r,n)),s.isBuffer(r))return 0===r.length?-1:w(t,r,e,n,o);if("number"==typeof r)return r&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):w(t,[r],e,n,o);throw new TypeError("val must be string, number or Buffer")}function w(t,r,e,n,o){var i,u=1,f=t.length,s=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,f/=2,s/=2,e/=2}function a(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(o){var c=-1;for(i=e;i<f;i++)if(a(t,i)===a(r,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===s)return c*u}else-1!==c&&(i-=i-c),c=-1}else for(e+s>f&&(e=f-s),i=e;i>=0;i--){for(var h=!0,p=0;p<s;p++)if(a(t,i+p)!==a(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 u=0;u<n;++u){var f=parseInt(r.substr(2*u,2),16);if(isNaN(f))return u;t[e+u]=f}return u}function m(t,r,e,n){return F(D(r,t.length-e),t,e,n)}function b(t,r,e,n){return F(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 b(t,r,e,n)}function A(t,r,e,n){return F(z(r),t,e,n)}function S(t,r,e,n){return F(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 T(t,r,e){return 0===r&&e===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(r,e))}function P(t,r,e){e=Math.min(t.length,e);for(var n=[],o=r;o<e;){var i,u,f,s,a=t[o],c=null,h=a>239?4:a>223?3:a>191?2:1;if(o+h<=e)switch(h){case 1:a<128&&(c=a);break;case 2:128==(192&(i=t[o+1]))&&(s=(31&a)<<6|63&i)>127&&(c=s);break;case 3:i=t[o+1],u=t[o+2],128==(192&i)&&128==(192&u)&&(s=(15&a)<<12|(63&i)<<6|63&u)>2047&&(s<55296||s>57343)&&(c=s);break;case 4:i=t[o+1],u=t[o+2],f=t[o+3],128==(192&i)&&128==(192&u)&&128==(192&f)&&(s=(15&a)<<18|(63&i)<<12|(63&u)<<6|63&f)>65535&&s<1114112&&(c=s)}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<=R)return String.fromCharCode.apply(String,t);var e="",n=0;for(;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=R));return e}(n)}r.Buffer=s,r.SlowBuffer=function(t){+t!=t&&(t=0);return s.alloc(+t)},r.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}(),r.kMaxLength=u(),s.poolSize=8192,s._augment=function(t){return t.__proto__=s.prototype,t},s.from=function(t,r,e){return a(null,t,r,e)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(t,r,e){return function(t,r,e,n){return c(r),r<=0?f(t,r):void 0!==e?"string"==typeof n?f(t,r).fill(e,n):f(t,r).fill(e):f(t,r)}(null,t,r,e)},s.allocUnsafe=function(t){return h(null,t)},s.allocUnsafeSlow=function(t){return h(null,t)},s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,r){if(!s.isBuffer(t)||!s.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},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,r){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var n=s.allocUnsafe(r),o=0;for(e=0;e<t.length;++e){var u=t[e];if(!s.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(n,o),o+=u.length}return n},s.byteLength=g,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)d(this,r,r+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)d(this,r,r+3),d(this,r+1,r+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)d(this,r,r+7),d(this,r+1,r+6),d(this,r+2,r+5),d(this,r+3,r+4);return this},s.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?P(this,0,t):function(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 P(this,r,e);case"ascii":return B(this,r,e);case"latin1":case"binary":return _(this,r,e);case"base64":return T(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}}.apply(this,arguments)},s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",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+">"},s.prototype.compare=function(t,r,e,n,o){if(!s.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),f=Math.min(i,u),a=this.slice(n,o),c=t.slice(r,e),h=0;h<f;++h)if(a[h]!==c[h]){i=a[h],u=c[h];break}return i<u?-1:u<i?1:0},s.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},s.prototype.indexOf=function(t,r,e){return y(this,t,r,e,!0)},s.prototype.lastIndexOf=function(t,r,e){return y(this,t,r,e,!1)},s.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 m(this,t,r,e);case"ascii":return b(this,t,r,e);case"latin1":case"binary":return E(this,t,r,e);case"base64":return A(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,r,e);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;function B(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+=k(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(!s.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 O(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 L(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 C(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 Y(t,r,e,n,i){return i||C(t,0,e,4),o.write(t,r,e,n,23,4),e+4}function j(t,r,e,n,i){return i||C(t,0,e,8),o.write(t,r,e,n,52,8),e+8}s.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),s.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,r)).__proto__=s.prototype;else{var o=r-t;e=new s(o,void 0);for(var i=0;i<o;++i)e[i]=this[i+t]}return e},s.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},s.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},s.prototype.readUInt8=function(t,r){return r||M(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,r){return r||M(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,r){return r||M(t,2,this.length),this[t]<<8|this[t+1]},s.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]},s.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])},s.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},s.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},s.prototype.readInt8=function(t,r){return r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.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},s.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},s.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},s.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]},s.prototype.readFloatLE=function(t,r){return r||M(t,4,this.length),o.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,r){return r||M(t,4,this.length),o.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,r){return r||M(t,8,this.length),o.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,r){return r||M(t,8,this.length),o.read(this,t,!1,52,8)},s.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},s.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},s.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},s.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):O(this,t,r,!0),r+2},s.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):O(this,t,r,!1),r+2},s.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):L(this,t,r,!0),r+4},s.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):L(this,t,r,!1),r+4},s.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,f=0;for(this[r]=255&t;++i<e&&(u*=256);)t<0&&0===f&&0!==this[r+i-1]&&(f=1),this[r+i]=(t/u>>0)-f&255;return r+e},s.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,f=0;for(this[r+i]=255&t;--i>=0&&(u*=256);)t<0&&0===f&&0!==this[r+i+1]&&(f=1),this[r+i]=(t/u>>0)-f&255;return r+e},s.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},s.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):O(this,t,r,!0),r+2},s.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):O(this,t,r,!1),r+2},s.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):L(this,t,r,!0),r+4},s.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),s.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):L(this,t,r,!1),r+4},s.prototype.writeFloatLE=function(t,r,e){return Y(this,t,r,!0,e)},s.prototype.writeFloatBE=function(t,r,e){return Y(this,t,r,!1,e)},s.prototype.writeDoubleLE=function(t,r,e){return j(this,t,r,!0,e)},s.prototype.writeDoubleBE=function(t,r,e){return j(this,t,r,!1,e)},s.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||!s.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},s.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&&!s.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=s.isBuffer(t)?t:D(new s(t,n).toString()),f=u.length;for(i=0;i<e-r;++i)this[i+r]=u[i%f]}return this};var N=/[^+\/0-9A-Za-z-_]/g;function k(t){return t<16?"0"+t.toString(16):t.toString(16)}function D(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 z(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(N,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function F(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(7))},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)}function o(t,r,e,n){return{code:t,size:r,name:e,resolvable:Boolean(n)}}n.lengthPrefixedVarSize=-1,n.V=-1,n.table=[[4,32,"ip4"],[6,16,"tcp"],[273,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[54,-1,"dns4","resolvable"],[55,-1,"dns6","resolvable"],[56,-1,"dnsaddr","resolvable"],[132,16,"sctp"],[302,0,"utp"],[421,n.lengthPrefixedVarSize,"p2p"],[421,n.lengthPrefixedVarSize,"ipfs"],[480,0,"http"],[443,0,"https"],[460,0,"quic"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[290,0,"p2p-circuit"]],n.names={},n.codes={},n.table.map(function(t){var r=o.apply(null,t);n.codes[r.code]=r,n.names[r.name]=r}),n.object=o,t.exports=n},function(t,r,e){"use strict";t.exports={encode:e(19),decode:e(20),encodingLength:e(21)}},function(t,r,e){"use strict";var n=e(17);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(t,r,e){t.exports=e(5)},function(t,r,e){"use strict";var n=e(6),o=R("dns4"),i=R("dns6"),u=P(R("dnsaddr"),o,i),f=P(R("ip4"),R("ip6")),s=P(T(f,R("tcp")),T(u,R("tcp"))),a=T(f,R("udp")),c=T(a,R("utp")),h=P(T(u,R("tcp")),u),p=P(T(s,R("ws")),T(h,R("ws"))),l=P(T(s,R("wss")),T(h,R("wss"))),g=P(T(s,R("http")),T(f,R("http")),T(h,R("http")),T(h)),d=P(T(s,R("https")),T(f,R("https")),T(h,R("https"))),y=P(T(p,R("p2p-webrtc-star"),R("ipfs")),T(l,R("p2p-webrtc-star"),R("ipfs"))),w=P(T(p,R("p2p-websocket-star"),R("ipfs")),T(l,R("p2p-websocket-star"),R("ipfs")),T(p,R("p2p-websocket-star")),T(l,R("p2p-websocket-star"))),v=P(T(g,R("p2p-webrtc-direct")),T(d,R("p2p-webrtc-direct"))),m=P(p,l,g,d,y,v,s,c),b=P(T(m,R("ipfs")),y,R("ipfs")),E=P(T(b,R("p2p-circuit"),b),T(b,R("p2p-circuit")),T(R("p2p-circuit"),b),T(m,R("p2p-circuit")),T(R("p2p-circuit"),m),R("p2p-circuit")),A=function t(){return P(T(E,t),E)}(),S=P(T(A,b,A),T(b,A),T(A,b),A,b);function T(){var t=Array.from(arguments);function r(r){return r.length<t.length?null:(t.some(function(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:function(t){"string"==typeof t&&(t=n(t));var e=r(t.protoNames());return null!==e&&0===e.length},partialMatch:r}}function P(){var t=Array.from(arguments);function r(r){var e=null;return t.some(function(t){var 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:function(t){"string"==typeof t&&(t=n(t));var e=r(t.protoNames());return null!==e&&0===e.length},partialMatch:r}}function R(t){var r=t;return{toString:function(){return r},matches:function(t){"string"==typeof t&&(t=n(t));var 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=h,r.DNS4=o,r.DNS6=i,r.IP=f,r.TCP=s,r.UDP=a,r.UTP=c,r.HTTP=g,r.HTTPS=d,r.WebSockets=p,r.WebSocketsSecure=l,r.WebSocketStar=w,r.WebRTCStar=y,r.WebRTCDirect=v,r.Reliable=m,r.Circuit=A,r.IPFS=S},function(t,r,e){"use strict";(function(r){var n=e(11),o=e(1),i=e(2),u=e(3),f=e(22),s=new Error("Sorry, Not Implemented Yet."),a=f.proto(function(t){if(!(this instanceof a))return new a(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"});a.prototype.toString=function(){return n.bufferToString(this.buffer)},a.prototype.toOptions=function(){var 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},a.prototype.inspect=function(){return"<Multiaddr "+this.buffer.toString("hex")+" - "+n.bufferToString(this.buffer)+">"},a.prototype.protos=function(){return this.protoCodes().map(function(t){return Object.assign({},o(t))})},a.prototype.protoCodes=function(){for(var t=[],r=this.buffer,e=0;e<r.length;){var u=i.decode(r,e),f=i.decode.bytes,s=o(u);e+=n.sizeForAddr(s,r.slice(e+f))+f,t.push(u)}return t},a.prototype.protoNames=function(){return this.protos().map(function(t){return t.name})},a.prototype.tuples=function(){return n.bufferToTuples(this.buffer)},a.prototype.stringTuples=function(){var t=n.bufferToTuples(this.buffer);return n.tuplesToStringTuples(t)},a.prototype.encapsulate=function(t){return t=a(t),a(this.toString()+t.toString())},a.prototype.decapsulate=function(t){t=t.toString();var r=this.toString(),e=r.lastIndexOf(t);if(e<0)throw new Error("Address "+this+" does not contain subaddress: "+t);return a(r.slice(0,e))},a.prototype.getPeerId=function(){var t=null;try{t=this.stringTuples().filter(function(t){if(t[0]===o.names.ipfs.code)return!0})[0][1],u.decode(t)}catch(r){t=null}return t},a.prototype.equals=function(t){return this.buffer.equals(t.buffer)},a.prototype.nodeAddress=function(){var 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]}},a.fromNodeAddress=function(t,r){if(!t)throw new Error("requires node address object");if(!r)throw new Error("requires transport protocol");var e="IPv6"===t.family?"ip6":"ip4";return a("/"+[e,t.address,r,t.port].join("/"))},a.prototype.isThinWaistAddress=function(t){var r=(t||this).protos();return 2===r.length&&((4===r[0].code||41===r[0].code)&&(6===r[1].code||273===r[1].code))},a.prototype.fromStupidString=function(t){throw s},a.protocols=o,a.isName=function(t){return!!a.isMultiaddr(t)&&t.protos().some(function(t){return t.resolvable})},a.resolve=function(t,r){return a.isMultiaddr(t)&&a.isName(t)?r(new Error("not implemented yet")):r(new Error("not a valid name"))},t.exports=a}).call(this,e(0).Buffer)},function(t,r,e){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(i){"object"===("undefined"==typeof window?"undefined":n(window))&&(o=window)}t.exports=o},function(t,r,e){"use strict";r.byteLength=function(t){var r=a(t),e=r[0],n=r[1];return 3*(e+n)/4-n},r.toByteArray=function(t){for(var r,e=a(t),n=e[0],u=e[1],f=new i(function(t,r,e){return 3*(r+e)/4-e}(0,n,u)),s=0,c=u>0?n-4:n,h=0;h<c;h+=4)r=o[t.charCodeAt(h)]<<18|o[t.charCodeAt(h+1)]<<12|o[t.charCodeAt(h+2)]<<6|o[t.charCodeAt(h+3)],f[s++]=r>>16&255,f[s++]=r>>8&255,f[s++]=255&r;2===u&&(r=o[t.charCodeAt(h)]<<2|o[t.charCodeAt(h+1)]>>4,f[s++]=255&r);1===u&&(r=o[t.charCodeAt(h)]<<10|o[t.charCodeAt(h+1)]<<4|o[t.charCodeAt(h+2)]>>2,f[s++]=r>>8&255,f[s++]=255&r);return f},r.fromByteArray=function(t){for(var r,e=t.length,o=e%3,i=[],u=0,f=e-o;u<f;u+=16383)i.push(c(t,u,u+16383>f?f: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+/",f=0,s=u.length;f<s;++f)n[f]=u[f],o[u.charCodeAt(f)]=f;function a(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=[],f=r;f<e;f+=3)o=(t[f]<<16&16711680)+(t[f+1]<<8&65280)+(255&t[f+2]),u.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return u.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,r,e){"use strict";r.read=function(t,r,e,n,o){var i,u,f=8*o-n-1,s=(1<<f)-1,a=s>>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+=f;c>0;i=256*i+t[r+h],h+=p,c-=8);for(u=i&(1<<-c)-1,i>>=-c,c+=n;c>0;u=256*u+t[r+h],h+=p,c-=8);if(0===i)i=1-a;else{if(i===s)return u?NaN:1/0*(l?-1:1);u+=Math.pow(2,n),i-=a}return(l?-1:1)*u*Math.pow(2,i-n)},r.write=function(t,r,e,n,o,i){var u,f,s,a=8*i-o-1,c=(1<<a)-1,h=c>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:i-1,g=n?1:-1,d=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(f=isNaN(r)?1:0,u=c):(u=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-u))<1&&(u--,s*=2),(r+=u+h>=1?p/s:p*Math.pow(2,1-h))*s>=2&&(u++,s/=2),u+h>=c?(f=0,u=c):u+h>=1?(f=(r*s-1)*Math.pow(2,o),u+=h):(f=r*Math.pow(2,h-1)*Math.pow(2,o),u=0));o>=8;t[e+l]=255&f,l+=g,f/=256,o-=8);for(u=u<<o|f,a+=o;a>0;t[e+l]=255&u,l+=g,u/=256,a-=8);t[e+l-g]|=128*d}},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){var n=e(12),o=e(1),i=e(2);function u(t){var r=[],e=t.split("/").slice(1);if(1===e.length&&""===e[0])return[];for(var n=0;n<e.length;n++){var i=e[n];if(0!==o(i).size){if(++n>=e.length)throw w("invalid address: "+t);r.push([i,e[n]])}else r.push([i])}return r}function f(t){var r=[];return t.map(function(t){var e=v(t);r.push(e.name),t.length>1&&r.push(t[1])}),"/"+r.join("/")}function s(t){return t.map(function(t){Array.isArray(t)||(t=[t]);var r=v(t);return t.length>1?[r.code,n.toBuffer(r.code,t[1])]:[r.code]})}function a(t){return t.map(function(t){var r=v(t);return t.length>1?[r.code,n.toString(r.code,t[1])]:[r.code]})}function c(t){return g(r.concat(t.map(function(t){var e=v(t),n=r.from(i.encode(e.code));return t.length>1&&(n=r.concat([n,t[1]])),n})))}function h(t,r){return t.size>0?t.size/8:0===t.size?0:i.decode(r)+i.decode.bytes}function p(t){for(var r=[],e=0;e<t.length;){var n=i.decode(t,e),u=i.decode.bytes,f=h(o(n),t.slice(e+u));if(0!==f){var s=t.slice(e+u,e+u+f);if((e+=f+u)>t.length)throw w("Invalid address buffer: "+t.toString("hex"));r.push([n,s])}else r.push([n]),e+=u}return r}function l(t){return c(s(u(t=y(t))))}function g(t){var e=d(t);if(e)throw e;return r.from(t)}function d(t){try{p(t)}catch(r){return r}}function y(t){return"/"+t.trim().split("/").filter(function(t){return t}).join("/")}function w(t){return new Error("Error parsing address: "+t)}function v(t){return o(t[0])}t.exports={stringToStringTuples:u,stringTuplesToString:f,tuplesToStringTuples:a,stringTuplesToTuples:s,bufferToTuples:p,tuplesToBuffer:c,bufferToString:function(t){return f(a(p(t)))},stringToBuffer:l,fromString:function(t){return l(t)},fromBuffer:g,validateBuffer:d,isValidBuffer:function(t){return void 0===d(t)},cleanPath:y,ParseError:w,protoFromTuple:v,sizeForAddr:h}}).call(this,e(0).Buffer)},function(t,r,e){"use strict";(function(r){var n=e(13),o=e(15),i=e(1),u=e(3),f=e(2);function s(t,e){return e instanceof r?s.toString(t,e):s.toBuffer(t,e)}function a(t){if(!o(t))throw new Error("invalid ip address");return n.toBuffer(t)}t.exports=s,s.toString=function(t,r){switch((t=i(t)).code){case 4:case 41:return function(t){var 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 function(t){return t.readUInt16BE(0)}(r);case 54:case 55:case 56:return function(t){var r=f.decode(t);if((t=t.slice(f.decode.bytes)).length!==r)throw new Error("inconsistent lengths");return t.toString()}(r);case 421:return function(t){var r=f.decode(t),e=t.slice(f.decode.bytes);if(e.length!==r)throw new Error("inconsistent lengths");return u.encode(e)}(r);default:return r.toString("hex")}},s.toBuffer=function(t,e){switch((t=i(t)).code){case 4:case 41:return a(e);case 6:case 273:case 33:case 132:return c=parseInt(e,10),(h=r.alloc(2)).writeUInt16BE(c,0),h;case 54:case 55:case 56:return function(t){var e=r.from(t),n=r.from(f.encode(e.length));return r.concat([n,e])}(e);case 421:return n=e,o=r.from(u.decode(n)),s=r.from(f.encode(o.length)),r.concat([s,o]);default:return r.from(e,"hex")}var n,o,s,c,h}}).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 f;this.isV4Format(u[i])&&(f=this.toBuffer(u[i]),u[i]=f.slice(0,2).toString("hex")),f&&++i<8&&u.splice(i,0,f.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 s=[i,1];for(i=9-u.length;i>0;i--)s.push("0");u.splice.apply(u,s)}for(n=r||new o(e+16),i=0;i<u.length;i++){var a=parseInt(u[i],16);n[e++]=a>>8&255,n[e++]=255&a}}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}$/,f=/^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i;function s(t){return t?t.toLowerCase():"ipv4"}n.isV4Format=function(t){return u.test(t)},n.isV6Format=function(t){return f.test(t)},n.fromPrefixLen=function(t,r){var e=4;"ipv6"===(r=t>32?"ipv6":s(r))&&(e=16);for(var i=new o(e),u=0,f=i.length;u<f;++u){var a=8;t<8&&(a=t),t-=a,i[u]=255&~(255>>a)}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 f=255&o[u];f;)f=f<<1&255,i++;var s=Math.pow(2,32-i);return{networkAddress:n.fromLong(e),firstAddress:s<=2?n.fromLong(e):n.fromLong(e+1),lastAddress:s<=2?n.fromLong(e+s-1):n.fromLong(e+s-2),broadcastAddress:n.fromLong(e+s-1),subnetMask:r,subnetMaskLength:i,numHosts:s<=2?s:s-2,length:s,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=s(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=s(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";var n=e(16),o=t.exports=function(t){return n({exact:!0}).test(t)};o.v4=function(t){return n.v4({exact:!0}).test(t)},o.v6=function(t){return n.v6({exact:!0}).test(t)}},function(t,r,e){"use strict";var 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(),u=t.exports=function(t){return t&&t.exact?new RegExp("(?:^".concat(n,"$)|(?:^").concat(i,"$)")):new RegExp("(?:".concat(n,")|(?:").concat(i,")"),"g")};u.v4=function(t){return t&&t.exact?new RegExp("^".concat(n,"$")):new RegExp(n,"g")},u.v6=function(t){return 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 u=t.length,f=t.charAt(0),s=Math.log(u)/Math.log(256),a=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]===f;)o++,e++;for(var a=(t.length-e)*s+1>>>0,c=new Uint8Array(a);t[e];){var h=r[t.charCodeAt(e)];if(255===h)return;for(var p=0,l=a-1;(0!==h||p<i)&&-1!==l;l--,p++)h+=u*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 g=a-i;g!==a&&0===c[g];)g++;var d=n.allocUnsafe(o+(a-g));d.fill(0,0,o);for(var y=o;g!==a;)d[y++]=c[g++];return d}}}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,s=r.length;i!==s&&0===r[i];)i++,e++;for(var c=(s-i)*a+1>>>0,h=new Uint8Array(c);i!==s;){for(var p=r[i],l=0,g=c-1;(0!==p||l<o)&&-1!==g;g--,l++)p+=256*h[g]>>>0,h[g]=p%u>>>0,p=p/u>>>0;if(0!==p)throw new Error("Non-zero carry");o=l,i++}for(var d=c-o;d!==c&&0===h[d];)d++;for(var y=f.repeat(e);d<c;++d)y+=t.charAt(h[d]);return y},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),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";t.exports=function t(r,e,u){e=e||[];u=u||0;var f=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-f+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,e=e||0,f=0,s=e,a=r.length;do{if(s>=a)throw t.bytes=0,new RangeError("Could not decode varint");i=r[s++],u+=f<28?(i&o)<<f:(i&o)*Math.pow(2,f),f+=7}while(i>=n);t.bytes=s-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),f=Math.pow(2,35),s=Math.pow(2,42),a=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<f?5:t<s?6:t<a?7:t<c?8:t<h?9:10}},function(t,r,e){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,r,e){return(o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?Reflect.construct:function(t,r,e){var n=[null];n.push.apply(n,r);var o=new(Function.bind.apply(t,n));return e&&s(o,e.prototype),o}).apply(null,arguments)}function i(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function u(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,r){return(s=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t})(t,r)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}t.exports=function(t,r){var e=r.className,o=r.symbolName,c=Symbol.for(o),h=i({},e,function(r){function o(){var t,r,e,i;!function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,o);for(var u=arguments.length,s=new Array(u),h=0;h<u;h++)s[h]=arguments[h];return e=this,r=!(i=(t=f(o)).call.apply(t,[this].concat(s)))||"object"!==n(i)&&"function"!=typeof i?a(e):i,Object.defineProperty(a(a(r)),c,{value:!0}),r}var i,h,p;return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),r&&s(t,r)}(o,t),i=o,(h=[{key:Symbol.toStringTag,get:function(){return e}}])&&u(i.prototype,h),p&&u(i,p),o}())[e];return h["is".concat(e)]=function(t){return!(!t||!t[c])},h},t.exports.proto=function(t,r){var e=r.className,n=r.symbolName,u=r.withoutNew,f=Symbol.for(n),s=i({},e,function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(u&&!(this instanceof s))return o(s,e);var i=t.call.apply(t,[this].concat(e))||this;return i&&!i[f]&&Object.defineProperty(i,f,{value:!0}),i})[e];return s.prototype=Object.create(t.prototype),s.prototype.constructor=s,Object.defineProperty(s.prototype,Symbol.toStringTag,{get:function(){return e}}),s["is".concat(e)]=function(t){return!(!t||!t[f])},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=4)}([function(t,r,e){"use strict";(function(t){var n=e(8),o=e(9),i=e(10);function u(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function f(t,r){if(u()<r)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=s.prototype:(null===t&&(t=new s(r)),t.length=r),t}function s(t,r,e){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(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 a(this,t,r,e)}function a(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);s.TYPED_ARRAY_SUPPORT?(t=r).__proto__=s.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(!s.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|g(r,e),o=(t=f(t,n)).write(r,e);o!==n&&(t=t.slice(0,o));return t}(t,r,e):function(t,r){if(s.isBuffer(r)){var e=0|l(r.length);return 0===(t=f(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?f(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=f(t,r<0?0:0|l(r)),!s.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=f(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function l(t){if(t>=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|t}function g(t,r){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var 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 D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return z(t).length;default:if(n)return D(t).length;r=(""+r).toLowerCase(),n=!0}}function d(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=s.from(r,n)),s.isBuffer(r))return 0===r.length?-1:w(t,r,e,n,o);if("number"==typeof r)return r&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):w(t,[r],e,n,o);throw new TypeError("val must be string, number or Buffer")}function w(t,r,e,n,o){var i,u=1,f=t.length,s=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,f/=2,s/=2,e/=2}function a(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(o){var c=-1;for(i=e;i<f;i++)if(a(t,i)===a(r,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===s)return c*u}else-1!==c&&(i-=i-c),c=-1}else for(e+s>f&&(e=f-s),i=e;i>=0;i--){for(var h=!0,p=0;p<s;p++)if(a(t,i+p)!==a(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 u=0;u<n;++u){var f=parseInt(r.substr(2*u,2),16);if(isNaN(f))return u;t[e+u]=f}return u}function m(t,r,e,n){return F(D(r,t.length-e),t,e,n)}function b(t,r,e,n){return F(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 b(t,r,e,n)}function A(t,r,e,n){return F(z(r),t,e,n)}function S(t,r,e,n){return F(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 T(t,r,e){return 0===r&&e===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(r,e))}function P(t,r,e){e=Math.min(t.length,e);for(var n=[],o=r;o<e;){var i,u,f,s,a=t[o],c=null,h=a>239?4:a>223?3:a>191?2:1;if(o+h<=e)switch(h){case 1:a<128&&(c=a);break;case 2:128==(192&(i=t[o+1]))&&(s=(31&a)<<6|63&i)>127&&(c=s);break;case 3:i=t[o+1],u=t[o+2],128==(192&i)&&128==(192&u)&&(s=(15&a)<<12|(63&i)<<6|63&u)>2047&&(s<55296||s>57343)&&(c=s);break;case 4:i=t[o+1],u=t[o+2],f=t[o+3],128==(192&i)&&128==(192&u)&&128==(192&f)&&(s=(15&a)<<18|(63&i)<<12|(63&u)<<6|63&f)>65535&&s<1114112&&(c=s)}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<=R)return String.fromCharCode.apply(String,t);var e="",n=0;for(;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=R));return e}(n)}r.Buffer=s,r.SlowBuffer=function(t){+t!=t&&(t=0);return s.alloc(+t)},r.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}(),r.kMaxLength=u(),s.poolSize=8192,s._augment=function(t){return t.__proto__=s.prototype,t},s.from=function(t,r,e){return a(null,t,r,e)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(t,r,e){return function(t,r,e,n){return c(r),r<=0?f(t,r):void 0!==e?"string"==typeof n?f(t,r).fill(e,n):f(t,r).fill(e):f(t,r)}(null,t,r,e)},s.allocUnsafe=function(t){return h(null,t)},s.allocUnsafeSlow=function(t){return h(null,t)},s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,r){if(!s.isBuffer(t)||!s.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},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,r){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var n=s.allocUnsafe(r),o=0;for(e=0;e<t.length;++e){var u=t[e];if(!s.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(n,o),o+=u.length}return n},s.byteLength=g,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)d(this,r,r+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)d(this,r,r+3),d(this,r+1,r+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)d(this,r,r+7),d(this,r+1,r+6),d(this,r+2,r+5),d(this,r+3,r+4);return this},s.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?P(this,0,t):function(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 P(this,r,e);case"ascii":return B(this,r,e);case"latin1":case"binary":return _(this,r,e);case"base64":return T(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}}.apply(this,arguments)},s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",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+">"},s.prototype.compare=function(t,r,e,n,o){if(!s.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),f=Math.min(i,u),a=this.slice(n,o),c=t.slice(r,e),h=0;h<f;++h)if(a[h]!==c[h]){i=a[h],u=c[h];break}return i<u?-1:u<i?1:0},s.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},s.prototype.indexOf=function(t,r,e){return y(this,t,r,e,!0)},s.prototype.lastIndexOf=function(t,r,e){return y(this,t,r,e,!1)},s.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 m(this,t,r,e);case"ascii":return b(this,t,r,e);case"latin1":case"binary":return E(this,t,r,e);case"base64":return A(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,r,e);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;function B(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+=N(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(!s.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 O(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 L(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 C(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 Y(t,r,e,n,i){return i||C(t,0,e,4),o.write(t,r,e,n,23,4),e+4}function j(t,r,e,n,i){return i||C(t,0,e,8),o.write(t,r,e,n,52,8),e+8}s.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),s.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,r)).__proto__=s.prototype;else{var o=r-t;e=new s(o,void 0);for(var i=0;i<o;++i)e[i]=this[i+t]}return e},s.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},s.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},s.prototype.readUInt8=function(t,r){return r||M(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,r){return r||M(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,r){return r||M(t,2,this.length),this[t]<<8|this[t+1]},s.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]},s.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])},s.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},s.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},s.prototype.readInt8=function(t,r){return r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.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},s.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},s.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},s.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]},s.prototype.readFloatLE=function(t,r){return r||M(t,4,this.length),o.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,r){return r||M(t,4,this.length),o.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,r){return r||M(t,8,this.length),o.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,r){return r||M(t,8,this.length),o.read(this,t,!1,52,8)},s.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},s.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},s.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},s.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):O(this,t,r,!0),r+2},s.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):O(this,t,r,!1),r+2},s.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):L(this,t,r,!0),r+4},s.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):L(this,t,r,!1),r+4},s.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,f=0;for(this[r]=255&t;++i<e&&(u*=256);)t<0&&0===f&&0!==this[r+i-1]&&(f=1),this[r+i]=(t/u>>0)-f&255;return r+e},s.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,f=0;for(this[r+i]=255&t;--i>=0&&(u*=256);)t<0&&0===f&&0!==this[r+i+1]&&(f=1),this[r+i]=(t/u>>0)-f&255;return r+e},s.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},s.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):O(this,t,r,!0),r+2},s.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):O(this,t,r,!1),r+2},s.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||I(this,t,r,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):L(this,t,r,!0),r+4},s.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),s.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):L(this,t,r,!1),r+4},s.prototype.writeFloatLE=function(t,r,e){return Y(this,t,r,!0,e)},s.prototype.writeFloatBE=function(t,r,e){return Y(this,t,r,!1,e)},s.prototype.writeDoubleLE=function(t,r,e){return j(this,t,r,!0,e)},s.prototype.writeDoubleBE=function(t,r,e){return j(this,t,r,!1,e)},s.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||!s.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},s.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&&!s.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=s.isBuffer(t)?t:D(new s(t,n).toString()),f=u.length;for(i=0;i<e-r;++i)this[i+r]=u[i%f]}return this};var k=/[^+\/0-9A-Za-z-_]/g;function N(t){return t<16?"0"+t.toString(16):t.toString(16)}function D(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 z(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 F(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(7))},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)}function o(t,r,e,n){return{code:t,size:r,name:e,resolvable:Boolean(n)}}n.lengthPrefixedVarSize=-1,n.V=-1,n.table=[[4,32,"ip4"],[6,16,"tcp"],[273,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[54,-1,"dns4","resolvable"],[55,-1,"dns6","resolvable"],[56,-1,"dnsaddr","resolvable"],[132,16,"sctp"],[302,0,"utp"],[421,n.lengthPrefixedVarSize,"p2p"],[421,n.lengthPrefixedVarSize,"ipfs"],[480,0,"http"],[443,0,"https"],[460,0,"quic"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[290,0,"p2p-circuit"]],n.names={},n.codes={},n.table.map(function(t){var r=o.apply(null,t);n.codes[r.code]=r,n.names[r.name]=r}),n.object=o,t.exports=n},function(t,r,e){"use strict";t.exports={encode:e(19),decode:e(20),encodingLength:e(21)}},function(t,r,e){"use strict";var n=e(17);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(t,r,e){t.exports=e(5)},function(t,r,e){"use strict";var n=e(6),o=B("dns4"),i=B("dns6"),u=R(B("dnsaddr"),o,i),f=R(B("ip4"),B("ip6")),s=R(P(f,B("tcp")),P(u,B("tcp"))),a=P(f,B("udp")),c=P(a,B("utp")),h=R(P(u,B("tcp")),u),p=R(P(s,B("ws")),P(h,B("ws"))),l=R(P(s,B("wss")),P(h,B("wss"))),g=R(P(s,B("http")),P(f,B("http")),P(h,B("http")),P(h)),d=R(P(s,B("https")),P(f,B("https")),P(h,B("https"))),y=R(P(p,B("p2p-webrtc-star"),B("ipfs")),P(l,B("p2p-webrtc-star"),B("ipfs"))),w=R(P(p,B("p2p-websocket-star"),B("ipfs")),P(l,B("p2p-websocket-star"),B("ipfs")),P(p,B("p2p-websocket-star")),P(l,B("p2p-websocket-star"))),v=R(P(g,B("p2p-webrtc-direct")),P(d,B("p2p-webrtc-direct"))),m=R(p,l,g,d,y,v,s,c),b=R(P(m,B("ipfs")),y,B("ipfs")),E=R(P(b,B("p2p-circuit"),b),P(b,B("p2p-circuit")),P(B("p2p-circuit"),b),P(m,B("p2p-circuit")),P(B("p2p-circuit"),m),B("p2p-circuit")),A=function t(){return R(P(E,t),E)}(),S=R(P(A,b,A),P(b,A),P(A,b),A,b);function T(t){return function(r){if("string"==typeof r)try{r=n(r)}catch(o){return!1}var e=t(r.protoNames());return null!==e&&0===e.length}}function P(){var t=Array.from(arguments);function r(r){return r.length<t.length?null:(t.some(function(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:T(r),partialMatch:r}}function R(){var t=Array.from(arguments);function r(r){var e=null;return t.some(function(t){var 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:T(r),partialMatch:r}}function B(t){var r=t;return{toString:function(){return r},matches:function(t){if("string"==typeof t)try{t=n(t)}catch(o){return!1}var 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=h,r.DNS4=o,r.DNS6=i,r.IP=f,r.TCP=s,r.UDP=a,r.UTP=c,r.HTTP=g,r.HTTPS=d,r.WebSockets=p,r.WebSocketsSecure=l,r.WebSocketStar=w,r.WebRTCStar=y,r.WebRTCDirect=v,r.Reliable=m,r.Circuit=A,r.IPFS=S},function(t,r,e){"use strict";(function(r){var n=e(11),o=e(1),i=e(2),u=e(3),f=e(22),s=new Error("Sorry, Not Implemented Yet."),a=f.proto(function(t){if(!(this instanceof a))return new a(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"});a.prototype.toString=function(){return n.bufferToString(this.buffer)},a.prototype.toOptions=function(){var 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},a.prototype.inspect=function(){return"<Multiaddr "+this.buffer.toString("hex")+" - "+n.bufferToString(this.buffer)+">"},a.prototype.protos=function(){return this.protoCodes().map(function(t){return Object.assign({},o(t))})},a.prototype.protoCodes=function(){for(var t=[],r=this.buffer,e=0;e<r.length;){var u=i.decode(r,e),f=i.decode.bytes,s=o(u);e+=n.sizeForAddr(s,r.slice(e+f))+f,t.push(u)}return t},a.prototype.protoNames=function(){return this.protos().map(function(t){return t.name})},a.prototype.tuples=function(){return n.bufferToTuples(this.buffer)},a.prototype.stringTuples=function(){var t=n.bufferToTuples(this.buffer);return n.tuplesToStringTuples(t)},a.prototype.encapsulate=function(t){return t=a(t),a(this.toString()+t.toString())},a.prototype.decapsulate=function(t){t=t.toString();var r=this.toString(),e=r.lastIndexOf(t);if(e<0)throw new Error("Address "+this+" does not contain subaddress: "+t);return a(r.slice(0,e))},a.prototype.getPeerId=function(){var t=null;try{t=this.stringTuples().filter(function(t){if(t[0]===o.names.ipfs.code)return!0})[0][1],u.decode(t)}catch(r){t=null}return t},a.prototype.equals=function(t){return this.buffer.equals(t.buffer)},a.prototype.nodeAddress=function(){var 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]}},a.fromNodeAddress=function(t,r){if(!t)throw new Error("requires node address object");if(!r)throw new Error("requires transport protocol");var e="IPv6"===t.family?"ip6":"ip4";return a("/"+[e,t.address,r,t.port].join("/"))},a.prototype.isThinWaistAddress=function(t){var r=(t||this).protos();return 2===r.length&&((4===r[0].code||41===r[0].code)&&(6===r[1].code||273===r[1].code))},a.prototype.fromStupidString=function(t){throw s},a.protocols=o,a.isName=function(t){return!!a.isMultiaddr(t)&&t.protos().some(function(t){return t.resolvable})},a.resolve=function(t,r){return a.isMultiaddr(t)&&a.isName(t)?r(new Error("not implemented yet")):r(new Error("not a valid name"))},t.exports=a}).call(this,e(0).Buffer)},function(t,r,e){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(i){"object"===("undefined"==typeof window?"undefined":n(window))&&(o=window)}t.exports=o},function(t,r,e){"use strict";r.byteLength=function(t){var r=a(t),e=r[0],n=r[1];return 3*(e+n)/4-n},r.toByteArray=function(t){for(var r,e=a(t),n=e[0],u=e[1],f=new i(function(t,r,e){return 3*(r+e)/4-e}(0,n,u)),s=0,c=u>0?n-4:n,h=0;h<c;h+=4)r=o[t.charCodeAt(h)]<<18|o[t.charCodeAt(h+1)]<<12|o[t.charCodeAt(h+2)]<<6|o[t.charCodeAt(h+3)],f[s++]=r>>16&255,f[s++]=r>>8&255,f[s++]=255&r;2===u&&(r=o[t.charCodeAt(h)]<<2|o[t.charCodeAt(h+1)]>>4,f[s++]=255&r);1===u&&(r=o[t.charCodeAt(h)]<<10|o[t.charCodeAt(h+1)]<<4|o[t.charCodeAt(h+2)]>>2,f[s++]=r>>8&255,f[s++]=255&r);return f},r.fromByteArray=function(t){for(var r,e=t.length,o=e%3,i=[],u=0,f=e-o;u<f;u+=16383)i.push(c(t,u,u+16383>f?f: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+/",f=0,s=u.length;f<s;++f)n[f]=u[f],o[u.charCodeAt(f)]=f;function a(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=[],f=r;f<e;f+=3)o=(t[f]<<16&16711680)+(t[f+1]<<8&65280)+(255&t[f+2]),u.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return u.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,r,e){"use strict";r.read=function(t,r,e,n,o){var i,u,f=8*o-n-1,s=(1<<f)-1,a=s>>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+=f;c>0;i=256*i+t[r+h],h+=p,c-=8);for(u=i&(1<<-c)-1,i>>=-c,c+=n;c>0;u=256*u+t[r+h],h+=p,c-=8);if(0===i)i=1-a;else{if(i===s)return u?NaN:1/0*(l?-1:1);u+=Math.pow(2,n),i-=a}return(l?-1:1)*u*Math.pow(2,i-n)},r.write=function(t,r,e,n,o,i){var u,f,s,a=8*i-o-1,c=(1<<a)-1,h=c>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:i-1,g=n?1:-1,d=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(f=isNaN(r)?1:0,u=c):(u=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-u))<1&&(u--,s*=2),(r+=u+h>=1?p/s:p*Math.pow(2,1-h))*s>=2&&(u++,s/=2),u+h>=c?(f=0,u=c):u+h>=1?(f=(r*s-1)*Math.pow(2,o),u+=h):(f=r*Math.pow(2,h-1)*Math.pow(2,o),u=0));o>=8;t[e+l]=255&f,l+=g,f/=256,o-=8);for(u=u<<o|f,a+=o;a>0;t[e+l]=255&u,l+=g,u/=256,a-=8);t[e+l-g]|=128*d}},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){var n=e(12),o=e(1),i=e(2);function u(t){var r=[],e=t.split("/").slice(1);if(1===e.length&&""===e[0])return[];for(var n=0;n<e.length;n++){var i=e[n];if(0!==o(i).size){if(++n>=e.length)throw w("invalid address: "+t);r.push([i,e[n]])}else r.push([i])}return r}function f(t){var r=[];return t.map(function(t){var e=v(t);r.push(e.name),t.length>1&&r.push(t[1])}),"/"+r.join("/")}function s(t){return t.map(function(t){Array.isArray(t)||(t=[t]);var r=v(t);return t.length>1?[r.code,n.toBuffer(r.code,t[1])]:[r.code]})}function a(t){return t.map(function(t){var r=v(t);return t.length>1?[r.code,n.toString(r.code,t[1])]:[r.code]})}function c(t){return g(r.concat(t.map(function(t){var e=v(t),n=r.from(i.encode(e.code));return t.length>1&&(n=r.concat([n,t[1]])),n})))}function h(t,r){return t.size>0?t.size/8:0===t.size?0:i.decode(r)+i.decode.bytes}function p(t){for(var r=[],e=0;e<t.length;){var n=i.decode(t,e),u=i.decode.bytes,f=h(o(n),t.slice(e+u));if(0!==f){var s=t.slice(e+u,e+u+f);if((e+=f+u)>t.length)throw w("Invalid address buffer: "+t.toString("hex"));r.push([n,s])}else r.push([n]),e+=u}return r}function l(t){return c(s(u(t=y(t))))}function g(t){var e=d(t);if(e)throw e;return r.from(t)}function d(t){try{p(t)}catch(r){return r}}function y(t){return"/"+t.trim().split("/").filter(function(t){return t}).join("/")}function w(t){return new Error("Error parsing address: "+t)}function v(t){return o(t[0])}t.exports={stringToStringTuples:u,stringTuplesToString:f,tuplesToStringTuples:a,stringTuplesToTuples:s,bufferToTuples:p,tuplesToBuffer:c,bufferToString:function(t){return f(a(p(t)))},stringToBuffer:l,fromString:function(t){return l(t)},fromBuffer:g,validateBuffer:d,isValidBuffer:function(t){return void 0===d(t)},cleanPath:y,ParseError:w,protoFromTuple:v,sizeForAddr:h}}).call(this,e(0).Buffer)},function(t,r,e){"use strict";(function(r){var n=e(13),o=e(15),i=e(1),u=e(3),f=e(2);function s(t,e){return e instanceof r?s.toString(t,e):s.toBuffer(t,e)}function a(t){if(!o(t))throw new Error("invalid ip address");return n.toBuffer(t)}t.exports=s,s.toString=function(t,r){switch((t=i(t)).code){case 4:case 41:return function(t){var 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 function(t){return t.readUInt16BE(0)}(r);case 54:case 55:case 56:return function(t){var r=f.decode(t);if((t=t.slice(f.decode.bytes)).length!==r)throw new Error("inconsistent lengths");return t.toString()}(r);case 421:return function(t){var r=f.decode(t),e=t.slice(f.decode.bytes);if(e.length!==r)throw new Error("inconsistent lengths");return u.encode(e)}(r);default:return r.toString("hex")}},s.toBuffer=function(t,e){switch((t=i(t)).code){case 4:case 41:return a(e);case 6:case 273:case 33:case 132:return c=parseInt(e,10),(h=r.alloc(2)).writeUInt16BE(c,0),h;case 54:case 55:case 56:return function(t){var e=r.from(t),n=r.from(f.encode(e.length));return r.concat([n,e])}(e);case 421:return n=e,o=r.from(u.decode(n)),s=r.from(f.encode(o.length)),r.concat([s,o]);default:return r.from(e,"hex")}var n,o,s,c,h}}).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 f;this.isV4Format(u[i])&&(f=this.toBuffer(u[i]),u[i]=f.slice(0,2).toString("hex")),f&&++i<8&&u.splice(i,0,f.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 s=[i,1];for(i=9-u.length;i>0;i--)s.push("0");u.splice.apply(u,s)}for(n=r||new o(e+16),i=0;i<u.length;i++){var a=parseInt(u[i],16);n[e++]=a>>8&255,n[e++]=255&a}}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}$/,f=/^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i;function s(t){return t?t.toLowerCase():"ipv4"}n.isV4Format=function(t){return u.test(t)},n.isV6Format=function(t){return f.test(t)},n.fromPrefixLen=function(t,r){var e=4;"ipv6"===(r=t>32?"ipv6":s(r))&&(e=16);for(var i=new o(e),u=0,f=i.length;u<f;++u){var a=8;t<8&&(a=t),t-=a,i[u]=255&~(255>>a)}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 f=255&o[u];f;)f=f<<1&255,i++;var s=Math.pow(2,32-i);return{networkAddress:n.fromLong(e),firstAddress:s<=2?n.fromLong(e):n.fromLong(e+1),lastAddress:s<=2?n.fromLong(e+s-1):n.fromLong(e+s-2),broadcastAddress:n.fromLong(e+s-1),subnetMask:r,subnetMaskLength:i,numHosts:s<=2?s:s-2,length:s,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=s(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=s(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";var n=e(16),o=t.exports=function(t){return n({exact:!0}).test(t)};o.v4=function(t){return n.v4({exact:!0}).test(t)},o.v6=function(t){return n.v6({exact:!0}).test(t)}},function(t,r,e){"use strict";var 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(),u=t.exports=function(t){return t&&t.exact?new RegExp("(?:^".concat(n,"$)|(?:^").concat(i,"$)")):new RegExp("(?:".concat(n,")|(?:").concat(i,")"),"g")};u.v4=function(t){return t&&t.exact?new RegExp("^".concat(n,"$")):new RegExp(n,"g")},u.v6=function(t){return 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 u=t.length,f=t.charAt(0),s=Math.log(u)/Math.log(256),a=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]===f;)o++,e++;for(var a=(t.length-e)*s+1>>>0,c=new Uint8Array(a);t[e];){var h=r[t.charCodeAt(e)];if(255===h)return;for(var p=0,l=a-1;(0!==h||p<i)&&-1!==l;l--,p++)h+=u*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 g=a-i;g!==a&&0===c[g];)g++;var d=n.allocUnsafe(o+(a-g));d.fill(0,0,o);for(var y=o;g!==a;)d[y++]=c[g++];return d}}}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,s=r.length;i!==s&&0===r[i];)i++,e++;for(var c=(s-i)*a+1>>>0,h=new Uint8Array(c);i!==s;){for(var p=r[i],l=0,g=c-1;(0!==p||l<o)&&-1!==g;g--,l++)p+=256*h[g]>>>0,h[g]=p%u>>>0,p=p/u>>>0;if(0!==p)throw new Error("Non-zero carry");o=l,i++}for(var d=c-o;d!==c&&0===h[d];)d++;for(var y=f.repeat(e);d<c;++d)y+=t.charAt(h[d]);return y},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),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";t.exports=function t(r,e,u){e=e||[];u=u||0;var f=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-f+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,e=e||0,f=0,s=e,a=r.length;do{if(s>=a)throw t.bytes=0,new RangeError("Could not decode varint");i=r[s++],u+=f<28?(i&o)<<f:(i&o)*Math.pow(2,f),f+=7}while(i>=n);t.bytes=s-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),f=Math.pow(2,35),s=Math.pow(2,42),a=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<f?5:t<s?6:t<a?7:t<c?8:t<h?9:10}},function(t,r,e){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,r,e){return(o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?Reflect.construct:function(t,r,e){var n=[null];n.push.apply(n,r);var o=new(Function.bind.apply(t,n));return e&&s(o,e.prototype),o}).apply(null,arguments)}function i(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function u(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,r){return(s=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t})(t,r)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}t.exports=function(t,r){var e=r.className,o=r.symbolName,c=Symbol.for(o),h=i({},e,function(r){function o(){var t,r,e,i;!function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,o);for(var u=arguments.length,s=new Array(u),h=0;h<u;h++)s[h]=arguments[h];return e=this,r=!(i=(t=f(o)).call.apply(t,[this].concat(s)))||"object"!==n(i)&&"function"!=typeof i?a(e):i,Object.defineProperty(a(a(r)),c,{value:!0}),r}var i,h,p;return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),r&&s(t,r)}(o,t),i=o,(h=[{key:Symbol.toStringTag,get:function(){return e}}])&&u(i.prototype,h),p&&u(i,p),o}())[e];return h["is".concat(e)]=function(t){return!(!t||!t[c])},h},t.exports.proto=function(t,r){var e=r.className,n=r.symbolName,u=r.withoutNew,f=Symbol.for(n),s=i({},e,function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];if(u&&!(this instanceof s))return o(s,e);var i=t.call.apply(t,[this].concat(e))||this;return i&&!i[f]&&Object.defineProperty(i,f,{value:!0}),i})[e];return s.prototype=Object.create(t.prototype),s.prototype.constructor=s,Object.defineProperty(s.prototype,Symbol.toStringTag,{get:function(){return e}}),s["is".concat(e)]=function(t){return!(!t||!t[f])},s}}])}); | ||
//# sourceMappingURL=index.min.js.map |
{ | ||
"name": "mafmt", | ||
"version": "6.0.4", | ||
"version": "6.0.5", | ||
"description": "A multiaddr validator", | ||
@@ -5,0 +5,0 @@ "leadMaintainer": "Vasco Santos <vasco.santos@moxy.studio>", |
@@ -132,8 +132,10 @@ 'use strict' | ||
function and () { | ||
const args = Array.from(arguments) | ||
function matches (a) { | ||
function makeMatchesFunction (partialMatch) { | ||
return function matches (a) { | ||
if (typeof a === 'string') { | ||
a = multiaddr(a) | ||
try { | ||
a = multiaddr(a) | ||
} catch (err) { // catch error | ||
return false // also if it's invalid it's propably not matching as well so return false | ||
} | ||
} | ||
@@ -146,3 +148,6 @@ let out = partialMatch(a.protoNames()) | ||
} | ||
} | ||
function and () { | ||
const args = Array.from(arguments) | ||
function partialMatch (a) { | ||
@@ -168,3 +173,3 @@ if (a.length < args.length) { | ||
input: args, | ||
matches: matches, | ||
matches: makeMatchesFunction(partialMatch), | ||
partialMatch: partialMatch | ||
@@ -177,13 +182,2 @@ } | ||
function matches (a) { | ||
if (typeof a === 'string') { | ||
a = multiaddr(a) | ||
} | ||
const out = partialMatch(a.protoNames()) | ||
if (out === null) { | ||
return false | ||
} | ||
return out.length === 0 | ||
} | ||
function partialMatch (a) { | ||
@@ -207,3 +201,3 @@ let out = null | ||
input: args, | ||
matches: matches, | ||
matches: makeMatchesFunction(partialMatch), | ||
partialMatch: partialMatch | ||
@@ -220,3 +214,7 @@ } | ||
if (typeof a === 'string') { | ||
a = multiaddr(a) | ||
try { | ||
a = multiaddr(a) | ||
} catch (err) { // catch error | ||
return false // also if it's invalid it's propably not matching as well so return false | ||
} | ||
} | ||
@@ -223,0 +221,0 @@ |
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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
3789
0
507580
9