whoisens-lib
Version:
Whois for ENS (Ethereum Name Service) lookup service
15 lines • 312 kB
JavaScript
var WhoisENS=function(e){var r={};function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var i in e)t.d(n,i,function(r){return e[r]}.bind(null,i));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=19)}([function(e,r){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch(e){"object"==typeof window&&(t=window)}e.exports=t},function(e,r){var t,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var f,h=[],u=!1,c=-1;function l(){u&&f&&(u=!1,f.length?h=f.concat(h):c=-1,h.length&&b())}function b(){if(!u){var e=a(l);u=!0;for(var r=h.length;r;){for(f=h,h=[];++c<r;)f&&f[c].run();c=-1,r=h.length}f=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(r){try{return n.call(null,e)}catch(r){return n.call(this,e)}}}(e)}}function y(e,r){this.fun=e,this.array=r}function d(){}i.nextTick=function(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)r[t-1]=arguments[t];h.push(new y(e,r)),1!==h.length||u||a(b)},y.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=d,i.addListener=d,i.once=d,i.off=d,i.removeListener=d,i.removeAllListeners=d,i.emit=d,i.prependListener=d,i.prependOnceListener=d,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,r,t){var n;e.exports=function e(r,t,i){function o(a,f){if(!t[a]){if(!r[a]){var h="function"==typeof n&&n;if(!f&&h)return n(a,!0);if(s)return s(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=t[a]={exports:{}};r[a][0].call(c.exports,function(e){var t=r[a][1][e];return o(t||e)},c,c.exports,e,r,t,i)}return t[a].exports}for(var s="function"==typeof n&&n,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(e,r,t){const n=e("cids"),i=e("multicodec"),o=e("multihashes"),s=e("./package.json");function a(e){let r=e.slice(0,2),t=e.slice(2),n="";return n="0x"===r?t:e,o.fromHexString(n)}r.exports={version:s.version,decode:function(e){let r=a(e);const t=i.getCodec(r);let s=i.rmPrefix(r),f=new n(s),h=s.toString("hex");return"swarm-ns"===t?(s=f.multihash,h=o.decode(s).digest.toString("hex")):"ipfs-ns"===t?(s=f.multihash,h=o.toB58String(s)):console.warn("⚠️ WARNING ⚠️ : unknown codec "+t.toString("hex")+" for content-hash "+h),h},fromIpfs:function(e){let r=o.fromB58String(e),t=new n(1,"dag-pb",r);return(t=i.addPrefix("ipfs-ns",t.buffer)).toString("hex")},fromSwarm:function(e){e=a(e);let r=o.encode(e,"keccak-256"),t=new n(1,"swarm-manifest",r);return(t=i.addPrefix("swarm-ns",t.buffer)).toString("hex")},getCodec:function(e){let r=a(e);return i.getCodec(r)}}},{"./package.json":32,cids:7,multicodec:20,multihashes:26}],2:[function(e,r,t){const n=e("safe-buffer").Buffer;r.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");const r=new Uint8Array(256);r.fill(255);for(let t=0;t<e.length;t++){const n=e.charAt(t),i=n.charCodeAt(0);if(255!==r[i])throw new TypeError(n+" is ambiguous");r[i]=t}const t=e.length,i=e.charAt(0),o=Math.log(t)/Math.log(256),s=Math.log(256)/Math.log(t);function a(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return n.alloc(0);let s=0;if(" "===e[s])return;let a=0,f=0;for(;e[s]===i;)a++,s++;const h=(e.length-s)*o+1>>>0,u=new Uint8Array(h);for(;e[s];){let n=r[e.charCodeAt(s)];if(255===n)return;let i=0;for(let e=h-1;(0!==n||i<f)&&-1!==e;e--,i++)n+=t*u[e]>>>0,u[e]=n%256>>>0,n=n/256>>>0;if(0!==n)throw new Error("Non-zero carry");f=i,s++}if(" "===e[s])return;let c=h-f;for(;c!==h&&0===u[c];)c++;const l=n.allocUnsafe(a+(h-c));l.fill(0,0,a);let b=a;for(;c!==h;)l[b++]=u[c++];return l}return{encode:function(r){if(!n.isBuffer(r))throw new TypeError("Expected Buffer");if(0===r.length)return"";let o=0,a=0,f=0;const h=r.length;for(;f!==h&&0===r[f];)f++,o++;const u=(h-f)*s+1>>>0,c=new Uint8Array(u);for(;f!==h;){let e=r[f],n=0;for(let r=u-1;(0!==e||n<a)&&-1!==r;r--,n++)e+=256*c[r]>>>0,c[r]=e%t>>>0,e=e/t>>>0;if(0!==e)throw new Error("Non-zero carry");a=n,f++}let l=u-a;for(;l!==u&&0===c[l];)l++;let b=i.repeat(o);for(;l<u;++l)b+=e.charAt(c[l]);return b},decodeUnsafe:a,decode:function(e){const r=a(e);if(r)return r;throw new Error("Non-base"+t+" character")}}}},{"safe-buffer":27}],3:[function(e,r,t){"use strict";t.byteLength=function(e){var r=h(e),t=r[0],n=r[1];return 3*(t+n)/4-n},t.toByteArray=function(e){for(var r,t=h(e),n=t[0],s=t[1],a=new o(function(e,r,t){return 3*(r+t)/4-t}(0,n,s)),f=0,u=s>0?n-4:n,c=0;c<u;c+=4)r=i[e.charCodeAt(c)]<<18|i[e.charCodeAt(c+1)]<<12|i[e.charCodeAt(c+2)]<<6|i[e.charCodeAt(c+3)],a[f++]=r>>16&255,a[f++]=r>>8&255,a[f++]=255&r;return 2===s&&(r=i[e.charCodeAt(c)]<<2|i[e.charCodeAt(c+1)]>>4,a[f++]=255&r),1===s&&(r=i[e.charCodeAt(c)]<<10|i[e.charCodeAt(c+1)]<<4|i[e.charCodeAt(c+2)]>>2,a[f++]=r>>8&255,a[f++]=255&r),a},t.fromByteArray=function(e){for(var r,t=e.length,i=t%3,o=[],s=0,a=t-i;s<a;s+=16383)o.push(u(e,s,s+16383>a?a:s+16383));return 1===i?(r=e[t-1],o.push(n[r>>2]+n[r<<4&63]+"==")):2===i&&(r=(e[t-2]<<8)+e[t-1],o.push(n[r>>10]+n[r>>4&63]+n[r<<2&63]+"=")),o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,f=s.length;a<f;++a)n[a]=s[a],i[s.charCodeAt(a)]=a;function h(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");-1===t&&(t=r);var n=t===r?0:4-t%4;return[t,n]}function u(e,r,t){for(var i,o,s=[],a=r;a<t;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],4:[function(e,r,t){var n=e("base-x");r.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},{"base-x":2}],5:[function(e,r,t){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
"use strict";var n=e("base64-js"),i=e("ieee754");t.Buffer=a,t.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},t.INSPECT_MAX_BYTES=50;var o=2147483647;function s(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=new Uint8Array(e);return r.__proto__=a.prototype,r}function a(e,r,t){if("number"==typeof e){if("string"==typeof r)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return f(e,r,t)}function f(e,r,t){if("string"==typeof e)return function(e,r){if("string"==typeof r&&""!==r||(r="utf8"),!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var t=0|b(e,r),n=s(t),i=n.write(e,r);return i!==t&&(n=n.slice(0,i)),n}(e,r);if(ArrayBuffer.isView(e))return c(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(j(e,ArrayBuffer)||e&&j(e.buffer,ArrayBuffer))return function(e,r,t){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(t||0))throw new RangeError('"length" is outside of buffer bounds');var n;return(n=void 0===r&&void 0===t?new Uint8Array(e):void 0===t?new Uint8Array(e,r):new Uint8Array(e,r,t)).__proto__=a.prototype,n}(e,r,t);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return a.from(n,r,t);var i=function(e){if(a.isBuffer(e)){var r=0|l(e.length),t=s(r);return 0===t.length?t:(e.copy(t,0,0,r),t)}return void 0!==e.length?"number"!=typeof e.length||D(e.length)?s(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return h(e),s(e<0?0:0|l(e))}function c(e){for(var r=e.length<0?0:0|l(e.length),t=s(r),n=0;n<r;n+=1)t[n]=255&e[n];return t}function l(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function b(e,r){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||j(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var t=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===t)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return O(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return P(e).length;default:if(i)return n?-1:O(e).length;r=(""+r).toLowerCase(),i=!0}}function y(e,r,t){var n=e[r];e[r]=e[t],e[t]=n}function d(e,r,t,n,i){if(0===e.length)return-1;if("string"==typeof t?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),D(t=+t)&&(t=i?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(i)return-1;t=e.length-1}else if(t<0){if(!i)return-1;t=0}if("string"==typeof r&&(r=a.from(r,n)),a.isBuffer(r))return 0===r.length?-1:k(e,r,t,n,i);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):k(e,[r],t,n,i);throw new TypeError("val must be string, number or Buffer")}function k(e,r,t,n,i){var o,s=1,a=e.length,f=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||r.length<2)return-1;s=2,a/=2,f/=2,t/=2}function h(e,r){return 1===s?e[r]:e.readUInt16BE(r*s)}if(i){var u=-1;for(o=t;o<a;o++)if(h(e,o)===h(r,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===f)return u*s}else-1!==u&&(o-=o-u),u=-1}else for(t+f>a&&(t=a-f),o=t;o>=0;o--){for(var c=!0,l=0;l<f;l++)if(h(e,o+l)!==h(r,l)){c=!1;break}if(c)return o}return-1}function w(e,r,t,n){t=Number(t)||0;var i=e.length-t;n?(n=Number(n))>i&&(n=i):n=i;var o=r.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(r.substr(2*s,2),16);if(D(a))return s;e[t+s]=a}return s}function p(e,r,t,n){return M(O(r,e.length-t),e,t,n)}function A(e,r,t,n){return M(function(e){for(var r=[],t=0;t<e.length;++t)r.push(255&e.charCodeAt(t));return r}(r),e,t,n)}function m(e,r,t,n){return A(e,r,t,n)}function S(e,r,t,n){return M(P(r),e,t,n)}function g(e,r,t,n){return M(function(e,r){for(var t,n,i,o=[],s=0;s<e.length&&!((r-=2)<0);++s)t=e.charCodeAt(s),n=t>>8,i=t%256,o.push(i),o.push(n);return o}(r,e.length-t),e,t,n)}function U(e,r,t){return 0===r&&t===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(r,t))}function E(e,r,t){t=Math.min(e.length,t);for(var n=[],i=r;i<t;){var o,s,a,f,h=e[i],u=null,c=h>239?4:h>223?3:h>191?2:1;if(i+c<=t)switch(c){case 1:h<128&&(u=h);break;case 2:128==(192&(o=e[i+1]))&&(f=(31&h)<<6|63&o)>127&&(u=f);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(f=(15&h)<<12|(63&o)<<6|63&s)>2047&&(f<55296||f>57343)&&(u=f);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(f=(15&h)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&f<1114112&&(u=f)}null===u?(u=65533,c=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=c}return function(e){var r=e.length;if(r<=x)return String.fromCharCode.apply(String,e);for(var t="",n=0;n<r;)t+=String.fromCharCode.apply(String,e.slice(n,n+=x));return t}(n)}t.kMaxLength=o,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),a.poolSize=8192,a.from=function(e,r,t){return f(e,r,t)},a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,a.alloc=function(e,r,t){return function(e,r,t){return h(e),e<=0?s(e):void 0!==r?"string"==typeof t?s(e).fill(r,t):s(e).fill(r):s(e)}(e,r,t)},a.allocUnsafe=function(e){return u(e)},a.allocUnsafeSlow=function(e){return u(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,r){if(j(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),j(r,Uint8Array)&&(r=a.from(r,r.offset,r.byteLength)),!a.isBuffer(e)||!a.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;for(var t=e.length,n=r.length,i=0,o=Math.min(t,n);i<o;++i)if(e[i]!==r[i]){t=e[i],n=r[i];break}return t<n?-1:n<t?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var t;if(void 0===r)for(r=0,t=0;t<e.length;++t)r+=e[t].length;var n=a.allocUnsafe(r),i=0;for(t=0;t<e.length;++t){var o=e[t];if(j(o,Uint8Array)&&(o=a.from(o)),!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},a.byteLength=b,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<e;r+=2)y(this,r,r+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<e;r+=4)y(this,r,r+3),y(this,r+1,r+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<e;r+=8)y(this,r,r+7),y(this,r+1,r+6),y(this,r+2,r+5),y(this,r+3,r+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?E(this,0,e):function(e,r,t){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if((t>>>=0)<=(r>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,r,t);case"utf8":case"utf-8":return E(this,r,t);case"ascii":return v(this,r,t);case"latin1":case"binary":return _(this,r,t);case"base64":return U(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,r,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},a.prototype.compare=function(e,r,t,n,i){if(j(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===r&&(r=0),void 0===t&&(t=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||t>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=t)return 0;if(n>=i)return-1;if(r>=t)return 1;if(r>>>=0,t>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var o=i-n,s=t-r,f=Math.min(o,s),h=this.slice(n,i),u=e.slice(r,t),c=0;c<f;++c)if(h[c]!==u[c]){o=h[c],s=u[c];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(e,r,t){return-1!==this.indexOf(e,r,t)},a.prototype.indexOf=function(e,r,t){return d(this,e,r,t,!0)},a.prototype.lastIndexOf=function(e,r,t){return d(this,e,r,t,!1)},a.prototype.write=function(e,r,t,n){if(void 0===r)n="utf8",t=this.length,r=0;else if(void 0===t&&"string"==typeof r)n=r,t=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r>>>=0,isFinite(t)?(t>>>=0,void 0===n&&(n="utf8")):(n=t,t=void 0)}var i=this.length-r;if((void 0===t||t>i)&&(t=i),e.length>0&&(t<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return w(this,e,r,t);case"utf8":case"utf-8":return p(this,e,r,t);case"ascii":return A(this,e,r,t);case"latin1":case"binary":return m(this,e,r,t);case"base64":return S(this,e,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g(this,e,r,t);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function v(e,r,t){var n="";t=Math.min(e.length,t);for(var i=r;i<t;++i)n+=String.fromCharCode(127&e[i]);return n}function _(e,r,t){var n="";t=Math.min(e.length,t);for(var i=r;i<t;++i)n+=String.fromCharCode(e[i]);return n}function I(e,r,t){var n,i=e.length;(!r||r<0)&&(r=0),(!t||t<0||t>i)&&(t=i);for(var o="",s=r;s<t;++s)o+=(n=e[s])<16?"0"+n.toString(16):n.toString(16);return o}function B(e,r,t){for(var n=e.slice(r,t),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function C(e,r,t){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+r>t)throw new RangeError("Trying to access beyond buffer length")}function N(e,r,t,n,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(t+n>e.length)throw new RangeError("Index out of range")}function K(e,r,t,n,i,o){if(t+n>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function R(e,r,t,n,o){return r=+r,t>>>=0,o||K(e,0,t,4),i.write(e,r,t,n,23,4),t+4}function T(e,r,t,n,o){return r=+r,t>>>=0,o||K(e,0,t,8),i.write(e,r,t,n,52,8),t+8}a.prototype.slice=function(e,r){var t=this.length;(e=~~e)<0?(e+=t)<0&&(e=0):e>t&&(e=t),(r=void 0===r?t:~~r)<0?(r+=t)<0&&(r=0):r>t&&(r=t),r<e&&(r=e);var n=this.subarray(e,r);return n.__proto__=a.prototype,n},a.prototype.readUIntLE=function(e,r,t){e>>>=0,r>>>=0,t||C(e,r,this.length);for(var n=this[e],i=1,o=0;++o<r&&(i*=256);)n+=this[e+o]*i;return n},a.prototype.readUIntBE=function(e,r,t){e>>>=0,r>>>=0,t||C(e,r,this.length);for(var n=this[e+--r],i=1;r>0&&(i*=256);)n+=this[e+--r]*i;return n},a.prototype.readUInt8=function(e,r){return e>>>=0,r||C(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,r){return e>>>=0,r||C(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,r){return e>>>=0,r||C(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,r){return e>>>=0,r||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,r){return e>>>=0,r||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,r,t){e>>>=0,r>>>=0,t||C(e,r,this.length);for(var n=this[e],i=1,o=0;++o<r&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*r)),n},a.prototype.readIntBE=function(e,r,t){e>>>=0,r>>>=0,t||C(e,r,this.length);for(var n=r,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},a.prototype.readInt8=function(e,r){return e>>>=0,r||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,r){e>>>=0,r||C(e,2,this.length);var t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},a.prototype.readInt16BE=function(e,r){e>>>=0,r||C(e,2,this.length);var t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},a.prototype.readInt32LE=function(e,r){return e>>>=0,r||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,r){return e>>>=0,r||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,r){return e>>>=0,r||C(e,4,this.length),i.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,r){return e>>>=0,r||C(e,4,this.length),i.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,r){return e>>>=0,r||C(e,8,this.length),i.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,r){return e>>>=0,r||C(e,8,this.length),i.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,r,t,n){if(e=+e,r>>>=0,t>>>=0,!n){var i=Math.pow(2,8*t)-1;N(this,e,r,t,i,0)}var o=1,s=0;for(this[r]=255&e;++s<t&&(o*=256);)this[r+s]=e/o&255;return r+t},a.prototype.writeUIntBE=function(e,r,t,n){if(e=+e,r>>>=0,t>>>=0,!n){var i=Math.pow(2,8*t)-1;N(this,e,r,t,i,0)}var o=t-1,s=1;for(this[r+o]=255&e;--o>=0&&(s*=256);)this[r+o]=e/s&255;return r+t},a.prototype.writeUInt8=function(e,r,t){return e=+e,r>>>=0,t||N(this,e,r,1,255,0),this[r]=255&e,r+1},a.prototype.writeUInt16LE=function(e,r,t){return e=+e,r>>>=0,t||N(this,e,r,2,65535,0),this[r]=255&e,this[r+1]=e>>>8,r+2},a.prototype.writeUInt16BE=function(e,r,t){return e=+e,r>>>=0,t||N(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=255&e,r+2},a.prototype.writeUInt32LE=function(e,r,t){return e=+e,r>>>=0,t||N(this,e,r,4,4294967295,0),this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=255&e,r+4},a.prototype.writeUInt32BE=function(e,r,t){return e=+e,r>>>=0,t||N(this,e,r,4,4294967295,0),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e,r+4},a.prototype.writeIntLE=function(e,r,t,n){if(e=+e,r>>>=0,!n){var i=Math.pow(2,8*t-1);N(this,e,r,t,i-1,-i)}var o=0,s=1,a=0;for(this[r]=255&e;++o<t&&(s*=256);)e<0&&0===a&&0!==this[r+o-1]&&(a=1),this[r+o]=(e/s>>0)-a&255;return r+t},a.prototype.writeIntBE=function(e,r,t,n){if(e=+e,r>>>=0,!n){var i=Math.pow(2,8*t-1);N(this,e,r,t,i-1,-i)}var o=t-1,s=1,a=0;for(this[r+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[r+o+1]&&(a=1),this[r+o]=(e/s>>0)-a&255;return r+t},a.prototype.writeInt8=function(e,r,t){return e=+e,r>>>=0,t||N(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=255&e,r+1},a.prototype.writeInt16LE=function(e,r,t){return e=+e,r>>>=0,t||N(this,e,r,2,32767,-32768),this[r]=255&e,this[r+1]=e>>>8,r+2},a.prototype.writeInt16BE=function(e,r,t){return e=+e,r>>>=0,t||N(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=255&e,r+2},a.prototype.writeInt32LE=function(e,r,t){return e=+e,r>>>=0,t||N(this,e,r,4,2147483647,-2147483648),this[r]=255&e,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24,r+4},a.prototype.writeInt32BE=function(e,r,t){return e=+e,r>>>=0,t||N(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e,r+4},a.prototype.writeFloatLE=function(e,r,t){return R(this,e,r,!0,t)},a.prototype.writeFloatBE=function(e,r,t){return R(this,e,r,!1,t)},a.prototype.writeDoubleLE=function(e,r,t){return T(this,e,r,!0,t)},a.prototype.writeDoubleBE=function(e,r,t){return T(this,e,r,!1,t)},a.prototype.copy=function(e,r,t,n){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");if(t||(t=0),n||0===n||(n=this.length),r>=e.length&&(r=e.length),r||(r=0),n>0&&n<t&&(n=t),n===t)return 0;if(0===e.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(t<0||t>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-r<n-t&&(n=e.length-r+t);var i=n-t;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(r,t,n);else if(this===e&&t<r&&r<n)for(var o=i-1;o>=0;--o)e[o+r]=this[o+t];else Uint8Array.prototype.set.call(e,this.subarray(t,n),r);return i},a.prototype.fill=function(e,r,t,n){if("string"==typeof e){if("string"==typeof r?(n=r,r=0,t=this.length):"string"==typeof t&&(n=t,t=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e&&(e&=255);if(r<0||this.length<r||this.length<t)throw new RangeError("Out of range index");if(t<=r)return this;var o;if(r>>>=0,t=void 0===t?this.length:t>>>0,e||(e=0),"number"==typeof e)for(o=r;o<t;++o)this[o]=e;else{var s=a.isBuffer(e)?e:a.from(e,n),f=s.length;if(0===f)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<t-r;++o)this[o+r]=s[o%f]}return this};var L=/[^+\/0-9A-Za-z-_]/g;function O(e,r){var t;r=r||1/0;for(var n=e.length,i=null,o=[],s=0;s<n;++s){if((t=e.charCodeAt(s))>55295&&t<57344){if(!i){if(t>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=t;continue}if(t<56320){(r-=3)>-1&&o.push(239,191,189),i=t;continue}t=65536+(i-55296<<10|t-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,t<128){if((r-=1)<0)break;o.push(t)}else if(t<2048){if((r-=2)<0)break;o.push(t>>6|192,63&t|128)}else if(t<65536){if((r-=3)<0)break;o.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return o}function P(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function M(e,r,t,n){for(var i=0;i<n&&!(i+t>=r.length||i>=e.length);++i)r[i+t]=e[i];return i}function j(e,r){return e instanceof r||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===r.name}function D(e){return e!=e}},{"base64-js":3,ieee754:9}],6:[function(e,r,t){(function(t){"use strict";const n=e("multihashes");var i={checkCIDComponents:function(e){if(null==e)return"null values are not valid CIDs";if(0!==e.version&&1!==e.version)return"Invalid version, must be a number equal to 1 or 0";if("string"!=typeof e.codec)return"codec must be string";if(!t.isBuffer(e.multihash))return"multihash must be a Buffer";try{n.validate(e.multihash)}catch(e){let r=e.message;return r||(r="Multihash validation failed"),r}}};r.exports=i}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":10,multihashes:26}],7:[function(e,r,t){(function(t){"use strict";const n=e("multihashes"),i=e("multibase"),o=e("multicodec"),s=e("multicodec/src/base-table"),a=e("./cid-util"),f=e("class-is");class h{constructor(e,s,a){if(r.exports.isCID(e)){let r=e;return this.version=r.version,this.codec=r.codec,void(this.multihash=t.from(r.multihash))}if("string"==typeof e)if(i.isEncoded(e)){const r=i.decode(e);e=parseInt(r.slice(0,1).toString("hex"),16),s=o.getCodec(r.slice(1)),a=o.rmPrefix(r.slice(1))}else s="dag-pb",a=n.fromB58String(e),e=0;else if(t.isBuffer(e)){const r=e.slice(0,1),t=parseInt(r.toString("hex"),16);if(0===t||1===t){const r=e;e=t,s=o.getCodec(r.slice(1)),a=o.rmPrefix(r.slice(1))}else s="dag-pb",a=e,e=0}this.codec=s,this.version=e,this.multihash=a,h.validateCID(this)}get buffer(){let e=this._buffer;if(!e){if(0===this.version)e=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");e=t.concat([t.from("01","hex"),o.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:e})}return e}get prefix(){return t.concat([t.from(`0${this.version}`,"hex"),o.getCodeVarint(this.codec),n.prefix(this.multihash)])}toV0(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");const{name:e,length:r}=n.decode(this.multihash);if("sha2-256"!==e)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==r)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new u(0,this.codec,this.multihash)}toV1(){return new u(1,this.codec,this.multihash)}toBaseEncodedString(e){switch(e=e||"base58btc",this.version){case 0:if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");return n.toB58String(this.multihash);case 1:return i.encode(e,this.buffer).toString();default:throw new Error("Unsupported version")}}toString(e){return this.toBaseEncodedString(e)}toJSON(){return{codec:this.codec,version:this.version,hash:this.multihash}}equals(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}static validateCID(e){let r=a.checkCIDComponents(e);if(r)throw new Error(r)}}const u=f(h,{className:"CID",symbolName:"@ipld/js-cid/CID"});u.codecs=s,r.exports=u}).call(this,e("buffer").Buffer)},{"./cid-util":6,buffer:5,"class-is":8,multibase:17,multicodec:20,"multicodec/src/base-table":18,multihashes:26}],8:[function(e,r,t){"use strict";r.exports=function(e,{className:r,symbolName:t}){const n=Symbol.for(t),i={[r]:class extends e{constructor(...e){super(...e),Object.defineProperty(this,n,{value:!0})}get[Symbol.toStringTag](){return r}}}[r];return i[`is${r}`]=e=>!(!e||!e[n]),i},r.exports.proto=function(e,{className:r,symbolName:t,withoutNew:n}){const i=Symbol.for(t),o={[r]:function(...r){if(n&&!(this instanceof o))return new o(...r);const t=e.call(this,...r)||this;return t&&!t[i]&&Object.defineProperty(t,i,{value:!0}),t}}[r];return o.prototype=Object.create(e.prototype),o.prototype.constructor=o,Object.defineProperty(o.prototype,Symbol.toStringTag,{get:()=>r}),o[`is${r}`]=e=>!(!e||!e[i]),o}},{}],9:[function(e,r,t){t.read=function(e,r,t,n,i){var o,s,a=8*i-n-1,f=(1<<a)-1,h=f>>1,u=-7,c=t?i-1:0,l=t?-1:1,b=e[r+c];for(c+=l,o=b&(1<<-u)-1,b>>=-u,u+=a;u>0;o=256*o+e[r+c],c+=l,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=n;u>0;s=256*s+e[r+c],c+=l,u-=8);if(0===o)o=1-h;else{if(o===f)return s?NaN:1/0*(b?-1:1);s+=Math.pow(2,n),o-=h}return(b?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,r,t,n,i,o){var s,a,f,h=8*o-i-1,u=(1<<h)-1,c=u>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,b=n?0:o-1,y=n?1:-1,d=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(a=isNaN(r)?1:0,s=u):(s=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-s))<1&&(s--,f*=2),(r+=s+c>=1?l/f:l*Math.pow(2,1-c))*f>=2&&(s++,f/=2),s+c>=u?(a=0,s=u):s+c>=1?(a=(r*f-1)*Math.pow(2,i),s+=c):(a=r*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;e[t+b]=255&a,b+=y,a/=256,i-=8);for(s=s<<i|a,h+=i;h>0;e[t+b]=255&s,b+=y,s/=256,h-=8);e[t+b-y]|=128*d}},{}],10:[function(e,r,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
r.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],11:[function(e,r,t){var n=e("safe-buffer").Buffer;r.exports=function(e){for(var r={},t=e.length,i=e.charAt(0),o=0;o<e.length;o++){var s=e.charAt(o);if(void 0!==r[s])throw new TypeError(s+" is ambiguous");r[s]=o}function a(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return n.allocUnsafe(0);for(var o=[0],s=0;s<e.length;s++){var a=r[e[s]];if(void 0===a)return;for(var f=0,h=a;f<o.length;++f)h+=o[f]*t,o[f]=255&h,h>>=8;for(;h>0;)o.push(255&h),h>>=8}for(var u=0;e[u]===i&&u<e.length-1;++u)o.push(0);return n.from(o.reverse())}return{encode:function(r){if(0===r.length)return"";for(var n=[0],o=0;o<r.length;++o){for(var s=0,a=r[o];s<n.length;++s)a+=n[s]<<8,n[s]=a%t,a=a/t|0;for(;a>0;)n.push(a%t),a=a/t|0}for(var f="",h=0;0===r[h]&&h<r.length-1;++h)f+=i;for(var u=n.length-1;u>=0;--u)f+=e[n[u]];return f},decodeUnsafe:a,decode:function(e){var r=a(e);if(r)return r;throw new Error("Non-base"+t+" character")}}}},{"safe-buffer":27}],12:[function(e,r,t){"use strict";r.exports=class{constructor(e,r,t,n){this.name=e,this.code=r,this.alphabet=n,t&&n&&(this.engine=t(n))}encode(e){return this.engine.encode(e)}decode(e){return this.engine.decode(e)}isImplemented(){return this.engine}}},{}],13:[function(e,r,t){(function(e){"use strict";r.exports=function(r){return{encode:r=>"string"==typeof r?e.from(r).toString("hex"):r.toString("hex"),decode(t){for(let e of t)if(r.indexOf(e)<0)throw new Error("invalid base16 character");return e.from(t,"hex")}}}}).call(this,e("buffer").Buffer)},{buffer:5}],14:[function(e,r,t){(function(e){"use strict";function t(e,r){let t=e.byteLength,n=new Uint8Array(e),i=r.indexOf("=")===r.length-1;i&&(r=r.substring(0,r.length-2));let o=0,s=0,a="";for(let e=0;e<t;e++)for(s=s<<8|n[e],o+=8;o>=5;)a+=r[s>>>o-5&31],o-=5;if(o>0&&(a+=r[s<<5-o&31]),i)for(;a.length%8!=0;)a+="=";return a}r.exports=function(r){return{encode:n=>t("string"==typeof n?e.from(n):n,r),decode(e){for(let t of e)if(r.indexOf(t)<0)throw new Error("invalid base32 character");return function(e,r){let t=(e=e.replace(new RegExp("=","g"),"")).length,n=0,i=0,o=0,s=new Uint8Array(5*t/8|0);for(let a=0;a<t;a++)i=i<<5|r.indexOf(e[a]),(n+=5)>=8&&(s[o++]=i>>>n-8&255,n-=8);return s.buffer}(e,r)}}}}).call(this,e("buffer").Buffer)},{buffer:5}],15:[function(e,r,t){(function(e){"use strict";r.exports=function(r){const t=r.indexOf("=")>-1,n=r.indexOf("-")>-1&&r.indexOf("_")>-1;return{encode(r){let i="";i="string"==typeof r?e.from(r).toString("base64"):r.toString("base64"),n&&(i=i.replace(/\+/g,"-").replace(/\//g,"_"));const o=i.indexOf("=");return o>0&&!t&&(i=i.substring(0,o)),i},decode(t){for(let e of t)if(r.indexOf(e)<0)throw new Error("invalid base64 character");return e.from(t,"base64")}}}}).call(this,e("buffer").Buffer)},{buffer:5}],16:[function(e,r,t){"use strict";const n=e("./base.js"),i=e("base-x"),o=e("./base16"),s=e("./base32"),a=e("./base64"),f=[["base1","1","","1"],["base2","0",i,"01"],["base8","7",i,"01234567"],["base10","9",i,"0123456789"],["base16","f",o,"0123456789abcdef"],["base32","b",s,"abcdefghijklmnopqrstuvwxyz234567"],["base32pad","c",s,"abcdefghijklmnopqrstuvwxyz234567="],["base32hex","v",s,"0123456789abcdefghijklmnopqrstuv"],["base32hexpad","t",s,"0123456789abcdefghijklmnopqrstuv="],["base32z","h",s,"ybndrfg8ejkmcpqxot1uwisza345h769"],["base58flickr","Z",i,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base58btc","z",i,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base64","m",a,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",a,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",a,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",a,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],h=f.reduce((e,r)=>(e[r[0]]=new n(r[0],r[1],r[2],r[3]),e),{}),u=f.reduce((e,r)=>(e[r[1]]=h[r[0]],e),{});r.exports={names:h,codes:u}},{"./base.js":12,"./base16":13,"./base32":14,"./base64":15,"base-x":11}],17:[function(e,r,t){(function(n){"use strict";const i=e("./constants");(t=r.exports=s).encode=function(e,r){const t=a(e);return s(t.name,n.from(t.encode(r)))},t.decode=function(e){n.isBuffer(e)&&(e=e.toString());const r=e.substring(0,1);"string"==typeof(e=e.substring(1,e.length))&&(e=n.from(e));const t=a(r);return n.from(t.decode(e.toString()))},t.isEncoded=function(e){if(n.isBuffer(e)&&(e=e.toString()),"[object String]"!==Object.prototype.toString.call(e))return!1;const r=e.substring(0,1);try{const e=a(r);return e.name}catch(e){return!1}},t.names=Object.freeze(Object.keys(i.names)),t.codes=Object.freeze(Object.keys(i.codes));const o=new Error("Unsupported encoding");function s(e,r){if(!r)throw new Error("requires an encoded buffer");const t=a(e),i=n.from(t.code),o=t.name;return function(e,r){a(e).decode(r.toString())}(o,r),n.concat([i,r])}function a(e){let r;if(i.names[e])r=i.names[e];else{if(!i.codes[e])throw o;r=i.codes[e]}if(!r.isImplemented())throw new Error("Base "+e+" is not implemented yet");return r}}).call(this,e("buffer").Buffer)},{"./constants":16,buffer:5}],18:[function(e,r,t){(function(e){"use strict";t.raw=e.from("55","hex"),t.cbor=e.from("51","hex"),t.protobuf=e.from("50","hex"),t.rlp=e.from("60","hex"),t.bencode=e.from("63","hex"),t.multicodec=e.from("30","hex"),t.multihash=e.from("31","hex"),t.multiaddr=e.from("32","hex"),t.multibase=e.from("33","hex"),t.identity=e.from("00","hex"),t.md4=e.from("d4","hex"),t.md5=e.from("d5","hex"),t.sha1=e.from("11","hex"),t["sha2-256"]=e.from("12","hex"),t["sha2-512"]=e.from("13","hex"),t["dbl-sha2-256"]=e.from("56","hex"),t["sha3-224"]=e.from("17","hex"),t["sha3-256"]=e.from("16","hex"),t["sha3-384"]=e.from("15","hex"),t["sha3-512"]=e.from("14","hex"),t["shake-128"]=e.from("18","hex"),t["shake-256"]=e.from("19","hex"),t["keccak-224"]=e.from("1a","hex"),t["keccak-256"]=e.from("1b","hex"),t["keccak-384"]=e.from("1c","hex"),t["keccak-512"]=e.from("1d","hex"),t["murmur3-128"]=e.from("22","hex"),t["murmur3-32"]=e.from("23","hex"),t.x11=e.from("1100","hex"),t["blake2b-8"]=e.from("b201","hex"),t["blake2b-16"]=e.from("b202","hex"),t["blake2b-24"]=e.from("b203","hex"),t["blake2b-32"]=e.from("b204","hex"),t["blake2b-40"]=e.from("b205","hex"),t["blake2b-48"]=e.from("b206","hex"),t["blake2b-56"]=e.from("b207","hex"),t["blake2b-64"]=e.from("b208","hex"),t["blake2b-72"]=e.from("b209","hex"),t["blake2b-80"]=e.from("b20a","hex"),t["blake2b-88"]=e.from("b20b","hex"),t["blake2b-96"]=e.from("b20c","hex"),t["blake2b-104"]=e.from("b20d","hex"),t["blake2b-112"]=e.from("b20e","hex"),t["blake2b-120"]=e.from("b20f","hex"),t["blake2b-128"]=e.from("b210","hex"),t["blake2b-136"]=e.from("b211","hex"),t["blake2b-144"]=e.from("b212","hex"),t["blake2b-152"]=e.from("b213","hex"),t["blake2b-160"]=e.from("b214","hex"),t["blake2b-168"]=e.from("b215","hex"),t["blake2b-176"]=e.from("b216","hex"),t["blake2b-184"]=e.from("b217","hex"),t["blake2b-192"]=e.from("b218","hex"),t["blake2b-200"]=e.from("b219","hex"),t["blake2b-208"]=e.from("b21a","hex"),t["blake2b-216"]=e.from("b21b","hex"),t["blake2b-224"]=e.from("b21c","hex"),t["blake2b-232"]=e.from("b21d","hex"),t["blake2b-240"]=e.from("b21e","hex"),t["blake2b-248"]=e.from("b21f","hex"),t["blake2b-256"]=e.from("b220","hex"),t["blake2b-264"]=e.from("b221","hex"),t["blake2b-272"]=e.from("b222","hex"),t["blake2b-280"]=e.from("b223","hex"),t["blake2b-288"]=e.from("b224","hex"),t["blake2b-296"]=e.from("b225","hex"),t["blake2b-304"]=e.from("b226","hex"),t["blake2b-312"]=e.from("b227","hex"),t["blake2b-320"]=e.from("b228","hex"),t["blake2b-328"]=e.from("b229","hex"),t["blake2b-336"]=e.from("b22a","hex"),t["blake2b-344"]=e.from("b22b","hex"),t["blake2b-352"]=e.from("b22c","hex"),t["blake2b-360"]=e.from("b22d","hex"),t["blake2b-368"]=e.from("b22e","hex"),t["blake2b-376"]=e.from("b22f","hex"),t["blake2b-384"]=e.from("b230","hex"),t["blake2b-392"]=e.from("b231","hex"),t["blake2b-400"]=e.from("b232","hex"),t["blake2b-408"]=e.from("b233","hex"),t["blake2b-416"]=e.from("b234","hex"),t["blake2b-424"]=e.from("b235","hex"),t["blake2b-432"]=e.from("b236","hex"),t["blake2b-440"]=e.from("b237","hex"),t["blake2b-448"]=e.from("b238","hex"),t["blake2b-456"]=e.from("b239","hex"),t["blake2b-464"]=e.from("b23a","hex"),t["blake2b-472"]=e.from("b23b","hex"),t["blake2b-480"]=e.from("b23c","hex"),t["blake2b-488"]=e.from("b23d","hex"),t["blake2b-496"]=e.from("b23e","hex"),t["blake2b-504"]=e.from("b23f","hex"),t["blake2b-512"]=e.from("b240","hex"),t["blake2s-8"]=e.from("b241","hex"),t["blake2s-16"]=e.from("b242","hex"),t["blake2s-24"]=e.from("b243","hex"),t["blake2s-32"]=e.from("b244","hex"),t["blake2s-40"]=e.from("b245","hex"),t["blake2s-48"]=e.from("b246","hex"),t["blake2s-56"]=e.from("b247","hex"),t["blake2s-64"]=e.from("b248","hex"),t["blake2s-72"]=e.from("b249","hex"),t["blake2s-80"]=e.from("b24a","hex"),t["blake2s-88"]=e.from("b24b","hex"),t["blake2s-96"]=e.from("b24c","hex"),t["blake2s-104"]=e.from("b24d","hex"),t["blake2s-112"]=e.from("b24e","hex"),t["blake2s-120"]=e.from("b24f","hex"),t["blake2s-128"]=e.from("b250","hex"),t["blake2s-136"]=e.from("b251","hex"),t["blake2s-144"]=e.from("b252","hex"),t["blake2s-152"]=e.from("b253","hex"),t["blake2s-160"]=e.from("b254","hex"),t["blake2s-168"]=e.from("b255","hex"),t["blake2s-176"]=e.from("b256","hex"),t["blake2s-184"]=e.from("b257","hex"),t["blake2s-192"]=e.from("b258","hex"),t["blake2s-200"]=e.from("b259","hex"),t["blake2s-208"]=e.from("b25a","hex"),t["blake2s-216"]=e.from("b25b","hex"),t["blake2s-224"]=e.from("b25c","hex"),t["blake2s-232"]=e.from("b25d","hex"),t["blake2s-240"]=e.from("b25e","hex"),t["blake2s-248"]=e.from("b25f","hex"),t["blake2s-256"]=e.from("b260","hex"),t["skein256-8"]=e.from("b301","hex"),t["skein256-16"]=e.from("b302","hex"),t["skein256-24"]=e.from("b303","hex"),t["skein256-32"]=e.from("b304","hex"),t["skein256-40"]=e.from("b305","hex"),t["skein256-48"]=e.from("b306","hex"),t["skein256-56"]=e.from("b307","hex"),t["skein256-64"]=e.from("b308","hex"),t["skein256-72"]=e.from("b309","hex"),t["skein256-80"]=e.from("b30a","hex"),t["skein256-88"]=e.from("b30b","hex"),t["skein256-96"]=e.from("b30c","hex"),t["skein256-104"]=e.from("b30d","hex"),t["skein256-112"]=e.from("b30e","hex"),t["skein256-120"]=e.from("b30f","hex"),t["skein256-128"]=e.from("b310","hex"),t["skein256-136"]=e.from("b311","hex"),t["skein256-144"]=e.from("b312","hex"),t["skein256-152"]=e.from("b313","hex"),t["skein256-160"]=e.from("b314","hex"),t["skein256-168"]=e.from("b315","hex"),t["skein256-176"]=e.from("b316","hex"),t["skein256-184"]=e.from("b317","hex"),t["skein256-192"]=e.from("b318","hex"),t["skein256-200"]=e.from("b319","hex"),t["skein256-208"]=e.from("b31a","hex"),t["skein256-216"]=e.from("b31b","hex"),t["skein256-224"]=e.from("b31c","hex"),t["skein256-232"]=e.from("b31d","hex"),t["skein256-240"]=e.from("b31e","hex"),t["skein256-248"]=e.from("b31f","hex"),t["skein256-256"]=e.from("b320","hex"),t["skein512-8"]=e.from("b321","hex"),t["skein512-16"]=e.from("b322","hex"),t["skein512-24"]=e.from("b323","hex"),t["skein512-32"]=e.from("b324","hex"),t["skein512-40"]=e.from("b325","hex"),t["skein512-48"]=e.from("b326","hex"),t["skein512-56"]=e.from("b327","hex"),t["skein512-64"]=e.from("b328","hex"),t["skein512-72"]=e.from("b329","hex"),t["skein512-80"]=e.from("b32a","hex"),t["skein512-88"]=e.from("b32b","hex"),t["skein512-96"]=e.from("b32c","hex"),t["skein512-104"]=e.from("b32d","hex"),t["skein512-112"]=e.from("b32e","hex"),t["skein512-120"]=e.from("b32f","hex"),t["skein512-128"]=e.from("b330","hex"),t["skein512-136"]=e.from("b331","hex"),t["skein512-144"]=e.from("b332","hex"),t["skein512-152"]=e.from("b333","hex"),t["skein512-160"]=e.from("b334","hex"),t["skein512-168"]=e.from("b335","hex"),t["skein512-176"]=e.from("b336","hex"),t["skein512-184"]=e.from("b337","hex"),t["skein512-192"]=e.from("b338","hex"),t["skein512-200"]=e.from("b339","hex"),t["skein512-208"]=e.from("b33a","hex"),t["skein512-216"]=e.from("b33b","hex"),t["skein512-224"]=e.from("b33c","hex"),t["skein512-232"]=e.from("b33d","hex"),t["skein512-240"]=e.from("b33e","hex"),t["skein512-248"]=e.from("b33f","hex"),t["skein512-256"]=e.from("b340","hex"),t["skein512-264"]=e.from("b341","hex"),t["skein512-272"]=e.from("b342","hex"),t["skein512-280"]=e.from("b343","hex"),t["skein512-288"]=e.from("b344","hex"),t["skein512-296"]=e.from("b345","hex"),t["skein512-304"]=e.from("b346","hex"),t["skein512-312"]=e.from("b347","hex"),t["skein512-320"]=e.from("b348","hex"),t["skein512-328"]=e.from("b349","hex"),t["skein512-336"]=e.from("b34a","hex"),t["skein512-344"]=e.from("b34b","hex"),t["skein512-352"]=e.from("b34c","hex"),t["skein512-360"]=e.from("b34d","hex"),t["skein512-368"]=e.from("b34e","hex"),t["skein512-376"]=e.from("b34f","hex"),t["skein512-384"]=e.from("b350","hex"),t["skein512-392"]=e.from("b351","hex"),t["skein512-400"]=e.from("b352","hex"),t["skein512-408"]=e.from("b353","hex"),t["skein512-416"]=e.from("b354","hex"),t["skein512-424"]=e.from("b355","hex"),t["skein512-432"]=e.from("b356","hex"),t["skein512-440"]=e.from("b357","hex"),t["skein512-448"]=e.from("b358","hex"),t["skein512-456"]=e.from("b359","hex"),t["skein512-464"]=e.from("b35a","hex"),t["skein512-472"]=e.from("b35b","hex"),t["skein512-480"]=e.from("b35c","hex"),t["skein512-488"]=e.from("b35d","hex"),t["skein512-496"]=e.from("b35e","hex"),t["skein512-504"]=e.from("b35f","hex"),t["skein512-512"]=e.from("b360","hex"),t["skein1024-8"]=e.from("b361","hex"),t["skein1024-16"]=e.from("b362","hex"),t["skein1024-24"]=e.from("b363","hex"),t["skein1024-32"]=e.from("b364","hex"),t["skein1024-40"]=e.from("b365","hex"),t["skein1024-48"]=e.from("b366","hex"),t["skein1024-56"]=e.from("b367","hex"),t["skein1024-64"]=e.from("b368","hex"),t["skein1024-72"]=e.from("b369","hex"),t["skein1024-80"]=e.from("b36a","hex"),t["skein1024-88"]=e.from("b36b","hex"),t["skein1024-96"]=e.from("b36c","hex"),t["skein1024-104"]=e.from("b36d","hex"),t["skein1024-112"]=e.from("b36e","hex"),t["skein1024-120"]=e.from("b36f","hex"),t["skein1024-128"]=e.from("b370","hex"),t["skein1024-136"]=e.from("b371","hex"),t["skein1024-144"]=e.from("b372","hex"),t["skein1024-152"]=e.from("b373","hex"),t["skein1024-160"]=e.from("b374","hex"),t["skein1024-168"]=e.from("b375","hex"),t["skein1024-176"]=e.from("b376","hex"),t["skein1024-184"]=e.from("b377","hex"),t["skein1024-192"]=e.from("b378","hex"),t["skein1024-200"]=e.from("b379","hex"),t["skein1024-208"]=e.from("b37a","hex"),t["skein1024-216"]=e.from("b37b","hex"),t["skein1024-224"]=e.from("b37c","hex"),t["skein1024-232"]=e.from("b37d","hex"),t["skein1024-240"]=e.from("b37e","hex"),t["skein1024-248"]=e.from("b37f","hex"),t["skein1024-256"]=e.from("b380","hex"),t["skein1024-264"]=e.from("b381","hex"),t["skein1024-272"]=e.from("b382","hex"),t["skein1024-280"]=e.from("b383","hex"),t["skein1024-288"]=e.from("b384","hex"),t["skein1024-296"]=e.from("b385","hex"),t["skein1024-304"]=e.from("b386","hex"),t["skein1024-312"]=e.from("b387","hex"),t["skein1024-320"]=e.from("b388","hex"),t["skein1024-328"]=e.from("b389","hex"),t["skein1024-336"]=e.from("b38a","hex"),t["skein1024-344"]=e.from("b38b","hex"),t["skein1024-352"]=e.from("b38c","hex"),t["skein1024-360"]=e.from("b38d","hex"),t["skein1024-368"]=e.from("b38e","hex"),t["skein1024-376"]=e.from("b38f","hex"),t["skein1024-384"]=e.from("b390","hex"),t["skein1024-392"]=e.from("b391","hex"),t["skein1024-400"]=e.from("b392","hex"),t["skein1024-408"]=e.from("b393","hex"),t["skein1024-416"]=e.from("b394","hex"),t["skein1024-424"]=e.from("b395","hex"),t["skein1024-432"]=e.from("b396","hex"),t["skein1024-440"]=e.from("b397","hex"),t["skein1024-448"]=e.from("b398","hex"),t["skein1024-456"]=e.from("b399","hex"),t["skein1024-464"]=e.from("b39a","hex"),t["skein1024-472"]=e.from("b39b","hex"),t["skein1024-480"]=e.from("b39c","hex"),t["skein1024-488"]=e.from("b39d","hex"),t["skein1024-496"]=e.from("b39e","hex"),t["skein1024-504"]=e.from("b39f","hex"),t["skein1024-512"]=e.from("b3a0","hex"),t["skein1024-520"]=e.from("b3a1","hex"),t["skein1024-528"]=e.from("b3a2","hex"),t["skein1024-536"]=e.from("b3a3","hex"),t["skein1024-544"]=e.from("b3a4","hex"),t["skein1024-552"]=e.from("b3a5","hex"),t["skein1024-560"]=e.from("b3a6","hex"),t["skein1024-568"]=e.from("b3a7","hex"),t["skein1024-576"]=e.from("b3a8","hex"),t["skein1024-584"]=e.from("b3a9","hex"),t["skein1024-592"]=e.from("b3aa","hex"),t["skein1024-600"]=e.from("b3ab","hex"),t["skein1024-608"]=e.from("b3ac","hex"),t["skein1024-616"]=e.from("b3ad","hex"),t["skein1024-624"]=e.from("b3ae","hex"),t["skein1024-632"]=e.from("b3af","hex"),t["skein1024-640"]=e.from("b3b0","hex"),t["skein1024-648"]=e.from("b3b1","hex"),t["skein1024-656"]=e.from("b3b2","hex"),t["skein1024-664"]=e.from("b3b3","hex"),t["skein1024-672"]=e.from("b3b4","hex"),t["skein1024-680"]=e.from("b3b5","hex"),t["skein1024-688"]=e.from("b3b6","hex"),t["skein1024-696"]=e.from("b3b7","hex"),t["skein1024-704"]=e.from("b3b8","hex"),t["skein1024-712"]=e.from("b3b9","hex"),t["skein1024-720"]=e.from("b3ba","hex"),t["skein1024-728"]=e.from("b3bb","hex"),t["skein1024-736"]=e.from("b3bc","hex"),t["skein1024-744"]=e.from("b3bd","hex"),t["skein1024-752"]=e.from("b3be","hex"),t["skein1024-760"]=e.from("b3bf","hex"),t["skein1024-768"]=e.from("b3c0","hex"),t["skein1024-776"]=e.from("b3c1","hex"),t["skein1024-784"]=e.from("b3c2","hex"),t["skein1024-792"]=e.from("b3c3","hex"),t["skein1024-800"]=e.from("b3c4","hex"),t["skein1024-808"]