!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.IpldDagCbor=t():e.IpldDagCbor=t()}(window,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=20)}([function(e,t,r){"use strict";(function(e){var n=r(24),i=r(9),s=r(25);function o(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function k(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return j(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(e).length;default:if(n)return j(e).length;t=(""+t).toLowerCase(),n=!0}}function p(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,r);case"utf8":case"utf-8":return N(this,t,r);case"ascii":return v(this,t,r);case"latin1":case"binary":return B(this,t,r);case"base64":return I(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return K(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function S(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:d(e,t,r,n,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):d(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function d(e,t,r,n,i){var s,o=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,a/=2,u/=2,r/=2}function h(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var f=-1;for(s=r;sa&&(r=a-u),s=r;s>=0;s--){for(var c=!0,l=0;li&&(n=i):n=i;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var o=0;o>8,i=r%256,s.push(i),s.push(n);return s}(t,e.length-r),e,r,n)}function I(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function N(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:h>223?3:h>191?2:1;if(i+c<=r)switch(c){case 1:h<128&&(f=h);break;case 2:128==(192&(s=e[i+1]))&&(u=(31&h)<<6|63&s)>127&&(f=u);break;case 3:s=e[i+1],o=e[i+2],128==(192&s)&&128==(192&o)&&(u=(15&h)<<12|(63&s)<<6|63&o)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:s=e[i+1],o=e[i+2],a=e[i+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&(u=(15&h)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&u<1114112&&(f=u)}null===f?(f=65533,c=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=c}return function(e){var t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var s=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),a=Math.min(s,o),h=this.slice(n,i),f=e.slice(t,r),c=0;ci)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return g(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":return E(this,e,t,r);case"latin1":case"binary":return x(this,e,t,r);case"base64":return y(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function v(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",s=t;sr)throw new RangeError("Trying to access beyond buffer length")}function U(e,t,r,n,i,s){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function R(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,s=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function L(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,s=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function P(e,t,r,n,i,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(e,t,r,n,s){return s||P(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,s){return s||P(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=this[e],i=1,s=0;++s=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=t,i=1,s=this[e+--n];n>0&&(i*=256);)s+=this[e+--n]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},u.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||U(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,s=0;for(this[t]=255&e;++s=0&&(s*=256);)this[t+i]=e/s&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);U(this,e,t,r,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s>0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);U(this,e,t,r,i-1,-i)}var s=r-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return C(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return C(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=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),e.length-t=0;--i)e[i+t]=this[i+r];else if(s<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=t;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function H(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(3))},function(e,t,r){"use strict";var n;!function(i){var s,o=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a=Math.ceil,u=Math.floor,h="[BigNumber Error] ",f=h+"Number primitive has more than 15 significant digits: ",c=1e14,l=14,b=9007199254740991,k=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],p=1e7,S=1e9;function m(e){var t=0|e;return e>0||e===t?t:t-1}function d(e){for(var t,r,n=1,i=e.length,s=e[0]+"";nh^r?1:-1;for(a=(u=i.length)<(h=s.length)?u:h,o=0;os[o]^r?1:-1;return u==h?0:u>h^r?1:-1}function _(e,t,r,n){if(er||e!==u(e))throw Error(h+(n||"Argument")+("number"==typeof e?er?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function E(e){var t=e.c.length-1;return m(e.e/l)==t&&e.c[t]%2!=0}function x(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function y(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else tP?m.c=m.e=null:e.e=10;c/=10,h++);return void(h>P?m.c=m.e=null:(m.e=h,m.c=[e]))}S=String(e)}else{if(!o.test(S=String(e)))return i(m,S,k);m.s=45==S.charCodeAt(0)?(S=S.slice(1),-1):1}(h=S.indexOf("."))>-1&&(S=S.replace(".","")),(c=S.search(/e/i))>0?(h<0&&(h=c),h+=+S.slice(c+1),S=S.substring(0,c)):h<0&&(h=S.length)}else{if(_(t,2,j.length,"Base"),10==t)return V(m=new H(e),K+m.e+1,O);if(S=String(e),k="number"==typeof e){if(0*e!=0)return i(m,S,k,t);if(m.s=1/e<0?(S=S.slice(1),-1):1,H.DEBUG&&S.replace(/^0\.0*|\./,"").length>15)throw Error(f+e)}else m.s=45===S.charCodeAt(0)?(S=S.slice(1),-1):1;for(r=j.slice(0,t),h=c=0,p=S.length;ch){h=p;continue}}else if(!a&&(S==S.toUpperCase()&&(S=S.toLowerCase())||S==S.toLowerCase()&&(S=S.toUpperCase()))){a=!0,c=-1,h=0;continue}return i(m,String(e),k,t)}k=!1,(h=(S=n(S,t,10,m.s)).indexOf("."))>-1?S=S.replace(".",""):h=S.length}for(c=0;48===S.charCodeAt(c);c++);for(p=S.length;48===S.charCodeAt(--p););if(S=S.slice(c,++p)){if(p-=c,k&&H.DEBUG&&p>15&&(e>b||e!==u(e)))throw Error(f+m.s*e);if((h=h-c-1)>P)m.c=m.e=null;else if(h=R)?x(u,o):y(u,o,"0");else if(s=(e=V(new H(e),t,r)).e,a=(u=d(e.c)).length,1==n||2==n&&(t<=s||s<=U)){for(;aa){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=s-a)>0)for(s+1==a&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function Y(e,t){for(var r,n=1,i=new H(e[0]);n=10;i/=10,n++);return(r=n+r*l-1)>P?e.c=e.e=null:r=10;h/=10,i++);if((s=t-i)<0)s+=l,o=t,p=(f=S[b=0])/m[i-o-1]%10|0;else if((b=a((s+1)/l))>=S.length){if(!n)break e;for(;S.length<=b;S.push(0));f=p=0,i=1,o=(s%=l)-l+1}else{for(f=h=S[b],i=1;h>=10;h/=10,i++);p=(o=(s%=l)-l+i)<0?0:f/m[i-o-1]%10|0}if(n=n||t<0||null!=S[b+1]||(o<0?f:f%m[i-o-1]),n=r<4?(p||n)&&(0==r||r==(e.s<0?3:2)):p>5||5==p&&(4==r||n||6==r&&(s>0?o>0?f/m[i-o]:0:S[b-1])%10&1||r==(e.s<0?8:7)),t<1||!S[0])return S.length=0,n?(t-=e.e+1,S[0]=m[(l-t%l)%l],e.e=-t||0):S[0]=e.e=0,e;if(0==s?(S.length=b,h=1,b--):(S.length=b+1,h=m[l-s],S[b]=o>0?u(f/m[i-o]%m[o])*h:0),n)for(;;){if(0==b){for(s=1,o=S[0];o>=10;o/=10,s++);for(o=S[0]+=h,h=1;o>=10;o/=10,h++);s!=h&&(e.e++,S[0]==c&&(S[0]=1));break}if(S[b]+=h,S[b]!=c)break;S[b--]=0,h=1}for(s=S.length;0===S[--s];S.pop());}e.e>P?e.c=e.e=null:e.e=R?x(t,r):y(t,r,"0"),e.s<0?"-"+t:t)}return H.clone=e,H.ROUND_UP=0,H.ROUND_DOWN=1,H.ROUND_CEIL=2,H.ROUND_FLOOR=3,H.ROUND_HALF_UP=4,H.ROUND_HALF_DOWN=5,H.ROUND_HALF_EVEN=6,H.ROUND_HALF_CEIL=7,H.ROUND_HALF_FLOOR=8,H.EUCLID=9,H.config=H.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(h+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(_(r=e[t],0,S,t),K=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(_(r=e[t],0,8,t),O=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(_(r[0],-S,0,t),_(r[1],0,S,t),U=r[0],R=r[1]):(_(r,-S,S,t),U=-(R=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)_(r[0],-S,-1,t),_(r[1],1,S,t),L=r[0],P=r[1];else{if(_(r,-S,S,t),!r)throw Error(h+t+" cannot be zero: "+r);L=-(P=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(h+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw C=!r,Error(h+"crypto unavailable");C=r}else C=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(_(r=e[t],0,9,t),F=r),e.hasOwnProperty(t="POW_PRECISION")&&(_(r=e[t],0,S,t),D=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(h+t+" not an object: "+r);M=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(h+t+" invalid: "+r);j=r}}return{DECIMAL_PLACES:K,ROUNDING_MODE:O,EXPONENTIAL_AT:[U,R],RANGE:[L,P],CRYPTO:C,MODULO_MODE:F,POW_PRECISION:D,FORMAT:M,ALPHABET:j}},H.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!H.DEBUG)return!0;var t,r,n=e.c,i=e.e,s=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===s||-1===s)&&i>=-S&&i<=S&&i===u(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%l)<1&&(t+=l),String(n[0]).length==t){for(t=0;t=c||r!==u(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===s||1===s||-1===s))return!0;throw Error(h+"Invalid BigNumber: "+e)},H.maximum=H.max=function(){return Y(arguments,B.lt)},H.minimum=H.min=function(){return Y(arguments,B.gt)},H.random=(s=9007199254740992*Math.random()&2097151?function(){return u(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,o,f=0,c=[],b=new H(T);if(null==e?e=K:_(e,0,S),i=a(e/l),C)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));f>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[f]=r[0],t[f+1]=r[1]):(c.push(o%1e14),f+=2);f=i/2}else{if(!crypto.randomBytes)throw C=!1,Error(h+"crypto unavailable");for(t=crypto.randomBytes(i*=7);f=9e15?crypto.randomBytes(7).copy(t,f):(c.push(o%1e14),f+=7);f=i/7}if(!C)for(;f=10;o/=10,f++);fr-1&&(null==o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/r|0,o[i]%=r)}return o.reverse()}return function(t,n,i,s,o){var a,u,h,f,c,l,b,k,p=t.indexOf("."),S=K,m=O;for(p>=0&&(f=D,D=0,t=t.replace(".",""),l=(k=new H(n)).pow(t.length-p),D=f,k.c=e(y(d(l.c),l.e,"0"),10,i,"0123456789"),k.e=k.c.length),h=f=(b=e(t,n,i,o?(a=j,"0123456789"):(a="0123456789",j))).length;0==b[--f];b.pop());if(!b[0])return a.charAt(0);if(p<0?--h:(l.c=b,l.e=h,l.s=s,b=(l=r(l,k,S,m,i)).c,c=l.r,h=l.e),p=b[u=h+S+1],f=i/2,c=c||u<0||null!=b[u+1],c=m<4?(null!=p||c)&&(0==m||m==(l.s<0?3:2)):p>f||p==f&&(4==m||c||6==m&&1&b[u-1]||m==(l.s<0?8:7)),u<1||!b[0])t=c?y(a.charAt(1),-S,a.charAt(0)):a.charAt(0);else{if(b.length=u,c)for(--i;++b[--u]>i;)b[u]=0,u||(++h,b=[1].concat(b));for(f=b.length;!b[--f];);for(p=0,t="";p<=f;t+=a.charAt(b[p++]));t=y(t,h,a.charAt(0))}return t}}(),r=function(){function e(e,t,r){var n,i,s,o,a=0,u=e.length,h=t%p,f=t/p|0;for(e=e.slice();u--;)a=((i=h*(s=e[u]%p)+(n=f*s+(o=e[u]/p|0)*h)%p*p+a)/r|0)+(n/p|0)+f*o,e[u]=i%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var i,s;if(r!=n)s=r>n?1:-1;else for(i=s=0;it[i]?1:-1;break}return s}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]1;e.splice(0,1));}return function(n,i,s,o,a){var h,f,b,k,p,S,d,g,_,E,x,y,w,I,N,A,v,B=n.s==i.s?1:-1,T=n.c,K=i.c;if(!(T&&T[0]&&K&&K[0]))return new H(n.s&&i.s&&(T?!K||T[0]!=K[0]:K)?T&&0==T[0]||!K?0*B:B/0:NaN);for(_=(g=new H(B)).c=[],B=s+(f=n.e-i.e)+1,a||(a=c,f=m(n.e/l)-m(i.e/l),B=B/l|0),b=0;K[b]==(T[b]||0);b++);if(K[b]>(T[b]||0)&&f--,B<0)_.push(1),k=!0;else{for(I=T.length,A=K.length,b=0,B+=2,(p=u(a/(K[0]+1)))>1&&(K=e(K,p,a),T=e(T,p,a),A=K.length,I=T.length),w=A,x=(E=T.slice(0,A)).length;x=a/2&&N++;do{if(p=0,(h=t(K,E,A,x))<0){if(y=E[0],A!=x&&(y=y*a+(E[1]||0)),(p=u(y/N))>1)for(p>=a&&(p=a-1),d=(S=e(K,p,a)).length,x=E.length;1==t(S,E,d,x);)p--,r(S,A=10;B/=10,b++);V(g,s+(g.e=b+f*l-1)+1,o,k)}else g.e=f,g.r=+k;return g}}(),w=/^(-?)0([xbo])(?=\w[\w.]*$)/i,I=/^([^.]+)\.$/,N=/^\.([^.]+)$/,A=/^-?(Infinity|NaN)$/,v=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,r,n){var i,s=r?t:t.replace(v,"");if(A.test(s))e.s=isNaN(s)?null:s<0?-1:1;else{if(!r&&(s=s.replace(w,function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t}),n&&(i=n,s=s.replace(I,"$1").replace(N,"0.$1")),t!=s))return new H(s,i);if(H.DEBUG)throw Error(h+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},B.absoluteValue=B.abs=function(){var e=new H(this);return e.s<0&&(e.s=1),e},B.comparedTo=function(e,t){return g(this,new H(e,t))},B.decimalPlaces=B.dp=function(e,t){var r,n,i,s=this;if(null!=e)return _(e,0,S),null==t?t=O:_(t,0,8),V(new H(s),e+s.e+1,t);if(!(r=s.c))return null;if(n=((i=r.length-1)-m(this.e/l))*l,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},B.dividedBy=B.div=function(e,t){return r(this,new H(e,t),K,O)},B.dividedToIntegerBy=B.idiv=function(e,t){return r(this,new H(e,t),0,1)},B.exponentiatedBy=B.pow=function(e,t){var r,n,i,s,o,f,c,b,k=this;if((e=new H(e)).c&&!e.isInteger())throw Error(h+"Exponent not an integer: "+W(e));if(null!=t&&(t=new H(t)),o=e.e>14,!k.c||!k.c[0]||1==k.c[0]&&!k.e&&1==k.c.length||!e.c||!e.c[0])return b=new H(Math.pow(+W(k),o?2-E(e):+W(e))),t?b.mod(t):b;if(f=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new H(NaN);(n=!f&&k.isInteger()&&t.isInteger())&&(k=k.mod(t))}else{if(e.e>9&&(k.e>0||k.e<-1||(0==k.e?k.c[0]>1||o&&k.c[1]>=24e7:k.c[0]<8e13||o&&k.c[0]<=9999975e7)))return s=k.s<0&&E(e)?-0:0,k.e>-1&&(s=1/s),new H(f?1/s:s);D&&(s=a(D/l+2))}for(o?(r=new H(.5),f&&(e.s=1),c=E(e)):c=(i=Math.abs(+W(e)))%2,b=new H(T);;){if(c){if(!(b=b.times(k)).c)break;s?b.c.length>s&&(b.c.length=s):n&&(b=b.mod(t))}if(i){if(0===(i=u(i/2)))break;c=i%2}else if(V(e=e.times(r),e.e+1,1),e.e>14)c=E(e);else{if(0==(i=+W(e)))break;c=i%2}k=k.times(k),s?k.c&&k.c.length>s&&(k.c.length=s):n&&(k=k.mod(t))}return n?b:(f&&(b=T.div(b)),t?b.mod(t):s?V(b,D,O,void 0):b)},B.integerValue=function(e){var t=new H(this);return null==e?e=O:_(e,0,8),V(t,t.e+1,e)},B.isEqualTo=B.eq=function(e,t){return 0===g(this,new H(e,t))},B.isFinite=function(){return!!this.c},B.isGreaterThan=B.gt=function(e,t){return g(this,new H(e,t))>0},B.isGreaterThanOrEqualTo=B.gte=function(e,t){return 1===(t=g(this,new H(e,t)))||0===t},B.isInteger=function(){return!!this.c&&m(this.e/l)>this.c.length-2},B.isLessThan=B.lt=function(e,t){return g(this,new H(e,t))<0},B.isLessThanOrEqualTo=B.lte=function(e,t){return-1===(t=g(this,new H(e,t)))||0===t},B.isNaN=function(){return!this.s},B.isNegative=function(){return this.s<0},B.isPositive=function(){return this.s>0},B.isZero=function(){return!!this.c&&0==this.c[0]},B.minus=function(e,t){var r,n,i,s,o=this,a=o.s;if(t=(e=new H(e,t)).s,!a||!t)return new H(NaN);if(a!=t)return e.s=-t,o.plus(e);var u=o.e/l,h=e.e/l,f=o.c,b=e.c;if(!u||!h){if(!f||!b)return f?(e.s=-t,e):new H(b?o:NaN);if(!f[0]||!b[0])return b[0]?(e.s=-t,e):new H(f[0]?o:3==O?-0:0)}if(u=m(u),h=m(h),f=f.slice(),a=u-h){for((s=a<0)?(a=-a,i=f):(h=u,i=b),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(n=(s=(a=f.length)<(t=b.length))?a:t,a=t=0;t0)for(;t--;f[r++]=0);for(t=c-1;n>a;){if(f[--n]=0;){for(r=0,k=y[i]%_,S=y[i]/_|0,s=i+(o=u);s>i;)r=((h=k*(h=x[--o]%_)+(a=S*h+(f=x[o]/_|0)*k)%_*_+d[s]+r)/g|0)+(a/_|0)+S*f,d[s--]=h%g;d[s]=r}return r?++n:d.splice(0,1),G(e,d,n)},B.negated=function(){var e=new H(this);return e.s=-e.s||null,e},B.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new H(e,t)).s,!i||!t)return new H(NaN);if(i!=t)return e.s=-t,n.minus(e);var s=n.e/l,o=e.e/l,a=n.c,u=e.c;if(!s||!o){if(!a||!u)return new H(i/0);if(!a[0]||!u[0])return u[0]?e:new H(a[0]?n:0*i)}if(s=m(s),o=m(o),a=a.slice(),i=s-o){for(i>0?(o=s,r=u):(i=-i,r=a),r.reverse();i--;r.push(0));r.reverse()}for((i=a.length)-(t=u.length)<0&&(r=u,u=a,a=r,t=i),i=0;t;)i=(a[--t]=a[t]+u[t]+i)/c|0,a[t]=c===a[t]?0:a[t]%c;return i&&(a=[i].concat(a),++o),G(e,a,o)},B.precision=B.sd=function(e,t){var r,n,i,s=this;if(null!=e&&e!==!!e)return _(e,1,S),null==t?t=O:_(t,0,8),V(new H(s),e,t);if(!(r=s.c))return null;if(n=(i=r.length-1)*l+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&s.e+1>n&&(n=s.e+1),n},B.shiftedBy=function(e){return _(e,-b,b),this.times("1e"+e)},B.squareRoot=B.sqrt=function(){var e,t,n,i,s,o=this,a=o.c,u=o.s,h=o.e,f=K+4,c=new H("0.5");if(1!==u||!a||!a[0])return new H(!u||u<0&&(!a||a[0])?NaN:a?o:1/0);if(0==(u=Math.sqrt(+W(o)))||u==1/0?(((t=d(a)).length+h)%2==0&&(t+="0"),u=Math.sqrt(+t),h=m((h+1)/2)-(h<0||h%2),n=new H(t=u==1/0?"1e"+h:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+h)):n=new H(u+""),n.c[0])for((u=(h=n.e)+f)<3&&(u=0);;)if(s=n,n=c.times(s.plus(r(o,s,f,1))),d(s.c).slice(0,u)===(t=d(n.c)).slice(0,u)){if(n.e0&&p>0){for(s=p%a||a,c=k.substr(0,s);s0&&(c+=f+k.slice(s)),b&&(c="-"+c)}n=l?c+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?l.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):l):c}return(r.prefix||"")+n+(r.suffix||"")},B.toFraction=function(e){var t,n,i,s,o,a,u,f,c,b,p,S,m=this,g=m.c;if(null!=e&&(!(u=new H(e)).isInteger()&&(u.c||1!==u.s)||u.lt(T)))throw Error(h+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+W(u));if(!g)return new H(m);for(t=new H(T),c=n=new H(T),i=f=new H(T),S=d(g),o=t.e=S.length-m.e-1,t.c[0]=k[(a=o%l)<0?l+a:a],e=!e||u.comparedTo(t)>0?o>0?t:c:u,a=P,P=1/0,u=new H(S),f.c[0]=0;b=r(u,t,0,1),1!=(s=n.plus(b.times(i))).comparedTo(e);)n=i,i=s,c=f.plus(b.times(s=c)),f=s,t=u.minus(b.times(s=t)),u=s;return s=r(e.minus(n),i,0,1),f=f.plus(s.times(c)),n=n.plus(s.times(i)),f.s=c.s=m.s,p=r(c,i,o*=2,O).minus(m).abs().comparedTo(r(f,n,o,O).minus(m).abs())<1?[c,i]:[f,n],P=a,p},B.toNumber=function(){return+W(this)},B.toPrecision=function(e,t){return null!=e&&_(e,1,S),z(this,e,t,2)},B.toString=function(e){var t,r=this,i=r.s,s=r.e;return null===s?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=s<=U||s>=R?x(d(r.c),s):y(d(r.c),s,"0"):10===e?t=y(d((r=V(new H(r),K+s+1,O)).c),r.e,"0"):(_(e,2,j.length,"Base"),t=n(y(d(r.c),s,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},B.valueOf=B.toJSON=function(){return W(this)},B._isBigNumber=!0,null!=t&&H.set(t),H}()).default=s.BigNumber=s,void 0===(n=function(){return s}.call(t,r,t,e))||(e.exports=n)}()},function(e,t,r){"use strict";const n=r(1).BigNumber;t.MT={POS_INT:0,NEG_INT:1,BYTE_STRING:2,UTF8_STRING:3,ARRAY:4,MAP:5,TAG:6,SIMPLE_FLOAT:7},t.TAG={DATE_STRING:0,DATE_EPOCH:1,POS_BIGINT:2,NEG_BIGINT:3,DECIMAL_FRAC:4,BIGFLOAT:5,BASE64URL_EXPECTED:21,BASE64_EXPECTED:22,BASE16_EXPECTED:23,CBOR:24,URI:32,BASE64URL:33,BASE64:34,REGEXP:35,MIME:36},t.NUMBYTES={ZERO:0,ONE:24,TWO:25,FOUR:26,EIGHT:27,INDEFINITE:31},t.SIMPLE={FALSE:20,TRUE:21,NULL:22,UNDEFINED:23},t.SYMS={NULL:Symbol("null"),UNDEFINED:Symbol("undef"),PARENT:Symbol("parent"),BREAK:Symbol("break"),STREAM:Symbol("stream")},t.SHIFT32=Math.pow(2,32),t.SHIFT16=Math.pow(2,16),t.MAX_SAFE_HIGH=2097151,t.NEG_ONE=new n(-1),t.TEN=new n(10),t.TWO=new n(2),t.PARENT={ARRAY:0,OBJECT:1,MAP:2,TAG:3,BYTE_STRING:4,UTF8_STRING:5}},function(e,t,r){"use strict";var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(i){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,r){"use strict";(function(e){const n=r(1).BigNumber,i=r(2),s=i.SHIFT32,o=i.SHIFT16;t.parseHalf=function(e){var t,r,n;return n=128&e[0]?-1:1,t=(124&e[0])>>2,r=(3&e[0])<<8|e[1],t?31===t?n*(r?NaN:Infinity):n*Math.pow(2,t-25)*(1024+r):5.960464477539063e-8*n*r},t.arrayBufferToBignumber=function(e){const t=e.byteLength;let r="";for(let n=0;n{const t=new Map,r=Object.keys(e),n=r.length;for(let i=0;ie*o+t,t.buildInt64=(e,r,i,o)=>{const a=t.buildInt32(e,r),u=t.buildInt32(i,o);return a>2097151?new n(a).times(s).plus(u):a*s+u},t.writeHalf=function(t,r){const n=e.allocUnsafe(4);n.writeFloatBE(r,0);const i=n.readUInt32BE(0);if(0!=(8191&i))return!1;var s=i>>16&32768;const o=i>>23&255,a=8388607&i;if(o>=113&&o<=142)s+=(o-112<<10)+(a>>13);else{if(!(o>=103&&o<113))return!1;if(a&(1<<126-o)-1)return!1;s+=a+8388608>>126-o}return t.writeUInt16BE(s,0),!0},t.keySorter=function(e,t){var r=e[0].byteLength,n=t[0].byteLength;return r>n?1:n>r?-1:e[0].compare(t[0])},t.isNegativeZero=e=>0===e&&1/e<0,t.nextPowerOf2=e=>{let t=0;if(e&&!(e&e-1))return e;for(;0!==e;)e>>=1,t+=1;return 1< 3 bytes.");const n=s.decode(r);if(!t.isValidCode(n))throw new Error("multihash unknown function code: 0x".concat(n.toString(16)));r=r.slice(s.decode.bytes);const o=s.decode(r);if(o<1)throw new Error("multihash invalid length: 0x".concat(o.toString(16)));if((r=r.slice(s.decode.bytes)).length!==o)throw new Error("multihash length inconsistent: 0x".concat(r.toString("hex")));return{code:n,name:i.codes[n],length:o,digest:r}},t.encode=function(r,n,i){if(!r||void 0===n)throw new Error("multihash encode requires at least two args: digest, code");const o=t.coerceCode(n);if(!e.isBuffer(r))throw new Error("digest should be a Buffer");if(null==i&&(i=r.length),i&&r.length!==i)throw new Error("digest length should be equal to specified length.");return e.concat([e.from(s.encode(o)),e.from(s.encode(i)),r])},t.coerceCode=function(e){let r=e;if("string"==typeof e){if(void 0===i.names[e])throw new Error("Unrecognized hash function named: ".concat(e));r=i.names[e]}if("number"!=typeof r)throw new Error("Hash function code should be a number. Got: ".concat(r));if(void 0===i.codes[r]&&!t.isAppCode(r))throw new Error("Unrecognized function code: ".concat(r));return r},t.isAppCode=function(e){return e>0&&e<16},t.isValidCode=function(e){return!!t.isAppCode(e)||!!i.codes[e]},t.validate=o,t.prefix=function(e){return o(e),e.slice(0,2)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(22),{Buffer:i}=r(0),s=r(15),o=r(36),a=r(19),u=r(61),h=42;function f(e){let t;try{t=u(e)}catch(r){t=!1}if(t)throw new Error("The object passed has circular references");return function e(t){if(!t||t instanceof Uint8Array||"string"==typeof t)return t;if(Array.isArray(t))return t.map(e);if(a.isCID(t))return"string"==typeof(r=t)?r=new a(r).buffer:a.isCID(r)&&(r=r.buffer),new n.Tagged(h,i.concat([i.from("00","hex"),r]));var r;const s=Object.keys(t);if(s.length>0){const r={};return s.forEach(n=>{"object"==typeof t[n]?r[n]=e(t[n]):r[n]=t[n]}),r}return t}(e)}(t=e.exports).codec=s.DAG_CBOR,t.defaultHashAlg=s.SHA2_256;const c={[h]:e=>(e=e.slice(1),new a(e))};let l=65536;let b=67108864,k=null;t.configureDecoder=e=>{let t=c;e?("number"==typeof e.size&&(l=e.size),"number"==typeof e.maxSize&&(b=e.maxSize),e.tags&&(t=Object.assign({},c,e&&e.tags))):(l=65536,b=67108864);const r={tags:t,size:l};k=new n.Decoder(r),l=r.size},t.configureDecoder(),t.serialize=e=>{const t=f(e);return n.encode(t)},t.deserialize=e=>{if(e.length>l&&e.length<=b&&t.configureDecoder({size:e.length}),e.length>l)throw new Error("Data is too large to deserialize with current decoder");return k.decodeFirst(e)},t.cid=async(e,r)=>{const n={cidVersion:1,hashAlg:t.defaultHashAlg},i=Object.assign(n,r),u=await o(e,i.hashAlg),h=s.print[t.codec];return new a(i.cidVersion,h,u)}},function(e,t,r){"use strict";t.read=function(e,t,r,n,i){var s,o,a=8*i-n-1,u=(1<>1,f=-7,c=r?i-1:0,l=r?-1:1,b=e[t+c];for(c+=l,s=b&(1<<-f)-1,b>>=-f,f+=a;f>0;s=256*s+e[t+c],c+=l,f-=8);for(o=s&(1<<-f)-1,s>>=-f,f+=n;f>0;o=256*o+e[t+c],c+=l,f-=8);if(0===s)s=1-h;else{if(s===u)return o?NaN:1/0*(b?-1:1);o+=Math.pow(2,n),s-=h}return(b?-1:1)*o*Math.pow(2,s-n)},t.write=function(e,t,r,n,i,s){var o,a,u,h=8*s-i-1,f=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,b=n?0:s-1,k=n?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=f):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+c>=1?l/u:l*Math.pow(2,1-c))*u>=2&&(o++,u/=2),o+c>=f?(a=0,o=f):o+c>=1?(a=(t*u-1)*Math.pow(2,i),o+=c):(a=t*Math.pow(2,c-1)*Math.pow(2,i),o=0));i>=8;e[r+b]=255&a,b+=k,a/=256,i-=8);for(o=o<0;e[r+b]=255&o,b+=k,o/=256,h-=8);e[r+b-k]|=128*p}},function(e,t,r){"use strict";(function(t,n){const i=r(9),s=r(1).BigNumber,o=r(26),a=r(4),u=r(2),h=r(11),f=r(12),{URL:c}=r(13);class l{constructor(e){!(e=e||{}).size||e.size<65536?e.size=65536:e.size=a.nextPowerOf2(e.size),this._heap=new ArrayBuffer(e.size),this._heap8=new Uint8Array(this._heap),this._buffer=t.from(this._heap),this._reset(),this._knownTags=Object.assign({0:e=>new Date(e),1:e=>new Date(1e3*e),2:e=>a.arrayBufferToBignumber(e),3:e=>u.NEG_ONE.minus(a.arrayBufferToBignumber(e)),4:e=>u.TEN.pow(e[0]).times(e[1]),5:e=>u.TWO.pow(e[0]).times(e[1]),32:e=>new c(e),35:e=>new RegExp(e)},e.tags),this.parser=o(n,{log:console.log.bind(console),pushInt:this.pushInt.bind(this),pushInt32:this.pushInt32.bind(this),pushInt32Neg:this.pushInt32Neg.bind(this),pushInt64:this.pushInt64.bind(this),pushInt64Neg:this.pushInt64Neg.bind(this),pushFloat:this.pushFloat.bind(this),pushFloatSingle:this.pushFloatSingle.bind(this),pushFloatDouble:this.pushFloatDouble.bind(this),pushTrue:this.pushTrue.bind(this),pushFalse:this.pushFalse.bind(this),pushUndefined:this.pushUndefined.bind(this),pushNull:this.pushNull.bind(this),pushInfinity:this.pushInfinity.bind(this),pushInfinityNeg:this.pushInfinityNeg.bind(this),pushNaN:this.pushNaN.bind(this),pushNaNNeg:this.pushNaNNeg.bind(this),pushArrayStart:this.pushArrayStart.bind(this),pushArrayStartFixed:this.pushArrayStartFixed.bind(this),pushArrayStartFixed32:this.pushArrayStartFixed32.bind(this),pushArrayStartFixed64:this.pushArrayStartFixed64.bind(this),pushObjectStart:this.pushObjectStart.bind(this),pushObjectStartFixed:this.pushObjectStartFixed.bind(this),pushObjectStartFixed32:this.pushObjectStartFixed32.bind(this),pushObjectStartFixed64:this.pushObjectStartFixed64.bind(this),pushByteString:this.pushByteString.bind(this),pushByteStringStart:this.pushByteStringStart.bind(this),pushUtf8String:this.pushUtf8String.bind(this),pushUtf8StringStart:this.pushUtf8StringStart.bind(this),pushSimpleUnassigned:this.pushSimpleUnassigned.bind(this),pushTagUnassigned:this.pushTagUnassigned.bind(this),pushTagStart:this.pushTagStart.bind(this),pushTagStart4:this.pushTagStart4.bind(this),pushTagStart8:this.pushTagStart8.bind(this),pushBreak:this.pushBreak.bind(this)},this._heap)}get _depth(){return this._parents.length}get _currentParent(){return this._parents[this._depth-1]}get _ref(){return this._currentParent.ref}_closeParent(){var e=this._parents.pop();if(e.length>0)throw new Error("Missing ".concat(e.length," elements"));switch(e.type){case u.PARENT.TAG:this._push(this.createTag(e.ref[0],e.ref[1]));break;case u.PARENT.BYTE_STRING:this._push(this.createByteString(e.ref,e.length));break;case u.PARENT.UTF8_STRING:this._push(this.createUtf8String(e.ref,e.length));break;case u.PARENT.MAP:if(e.values%2>0)throw new Error("Odd number of elements in the map");this._push(this.createMap(e.ref,e.length));break;case u.PARENT.OBJECT:if(e.values%2>0)throw new Error("Odd number of elements in the map");this._push(this.createObject(e.ref,e.length));break;case u.PARENT.ARRAY:this._push(this.createArray(e.ref,e.length))}this._currentParent&&this._currentParent.type===u.PARENT.TAG&&this._dec()}_dec(){const e=this._currentParent;e.length<0||(e.length--,0===e.length&&this._closeParent())}_push(e,t){const r=this._currentParent;switch(r.values++,r.type){case u.PARENT.ARRAY:case u.PARENT.BYTE_STRING:case u.PARENT.UTF8_STRING:r.length>-1?this._ref[this._ref.length-r.length]=e:this._ref.push(e),this._dec();break;case u.PARENT.OBJECT:null!=r.tmpKey?(this._ref[r.tmpKey]=e,r.tmpKey=null,this._dec()):(r.tmpKey=e,"string"!=typeof r.tmpKey&&(r.type=u.PARENT.MAP,r.ref=a.buildMap(r.ref)));break;case u.PARENT.MAP:null!=r.tmpKey?(this._ref.set(r.tmpKey,e),r.tmpKey=null,this._dec()):r.tmpKey=e;break;case u.PARENT.TAG:this._ref.push(e),t||this._dec();break;default:throw new Error("Unknown parent type")}}_createParent(e,t,r){this._parents[this._depth]={type:t,length:r,ref:e,values:0,tmpKey:null}}_reset(){this._res=[],this._parents=[{type:u.PARENT.ARRAY,length:-1,ref:this._res,values:0,tmpKey:null}]}createTag(e,t){const r=this._knownTags[e];return r?r(t):new f(e,t)}createMap(e,t){return e}createObject(e,t){return e}createArray(e,t){return e}createByteString(e,r){return t.concat(e)}createByteStringFromHeap(e,r){return e===r?t.alloc(0):t.from(this._heap.slice(e,r))}createInt(e){return e}createInt32(e,t){return a.buildInt32(e,t)}createInt64(e,t,r,n){return a.buildInt64(e,t,r,n)}createFloat(e){return e}createFloatSingle(e,t,r,n){return i.read([e,t,r,n],0,!1,23,4)}createFloatDouble(e,t,r,n,s,o,a,u){return i.read([e,t,r,n,s,o,a,u],0,!1,52,8)}createInt32Neg(e,t){return-1-a.buildInt32(e,t)}createInt64Neg(e,t,r,n){const i=a.buildInt32(e,t),o=a.buildInt32(r,n);return i>u.MAX_SAFE_HIGH?u.NEG_ONE.minus(new s(i).times(u.SHIFT32).plus(o)):-1-(i*u.SHIFT32+o)}createTrue(){return!0}createFalse(){return!1}createNull(){return null}createUndefined(){}createInfinity(){return 1/0}createInfinityNeg(){return-1/0}createNaN(){return NaN}createNaNNeg(){return NaN}createUtf8String(e,t){return e.join("")}createUtf8StringFromHeap(e,t){return e===t?"":this._buffer.toString("utf8",e,t)}createSimpleUnassigned(e){return new h(e)}pushInt(e){this._push(this.createInt(e))}pushInt32(e,t){this._push(this.createInt32(e,t))}pushInt64(e,t,r,n){this._push(this.createInt64(e,t,r,n))}pushFloat(e){this._push(this.createFloat(e))}pushFloatSingle(e,t,r,n){this._push(this.createFloatSingle(e,t,r,n))}pushFloatDouble(e,t,r,n,i,s,o,a){this._push(this.createFloatDouble(e,t,r,n,i,s,o,a))}pushInt32Neg(e,t){this._push(this.createInt32Neg(e,t))}pushInt64Neg(e,t,r,n){this._push(this.createInt64Neg(e,t,r,n))}pushTrue(){this._push(this.createTrue())}pushFalse(){this._push(this.createFalse())}pushNull(){this._push(this.createNull())}pushUndefined(){this._push(this.createUndefined())}pushInfinity(){this._push(this.createInfinity())}pushInfinityNeg(){this._push(this.createInfinityNeg())}pushNaN(){this._push(this.createNaN())}pushNaNNeg(){this._push(this.createNaNNeg())}pushArrayStart(){this._createParent([],u.PARENT.ARRAY,-1)}pushArrayStartFixed(e){this._createArrayStartFixed(e)}pushArrayStartFixed32(e,t){const r=a.buildInt32(e,t);this._createArrayStartFixed(r)}pushArrayStartFixed64(e,t,r,n){const i=a.buildInt64(e,t,r,n);this._createArrayStartFixed(i)}pushObjectStart(){this._createObjectStartFixed(-1)}pushObjectStartFixed(e){this._createObjectStartFixed(e)}pushObjectStartFixed32(e,t){const r=a.buildInt32(e,t);this._createObjectStartFixed(r)}pushObjectStartFixed64(e,t,r,n){const i=a.buildInt64(e,t,r,n);this._createObjectStartFixed(i)}pushByteStringStart(){this._parents[this._depth]={type:u.PARENT.BYTE_STRING,length:-1,ref:[],values:0,tmpKey:null}}pushByteString(e,t){this._push(this.createByteStringFromHeap(e,t))}pushUtf8StringStart(){this._parents[this._depth]={type:u.PARENT.UTF8_STRING,length:-1,ref:[],values:0,tmpKey:null}}pushUtf8String(e,t){this._push(this.createUtf8StringFromHeap(e,t))}pushSimpleUnassigned(e){this._push(this.createSimpleUnassigned(e))}pushTagStart(e){this._parents[this._depth]={type:u.PARENT.TAG,length:1,ref:[e]}}pushTagStart4(e,t){this.pushTagStart(a.buildInt32(e,t))}pushTagStart8(e,t,r,n){this.pushTagStart(a.buildInt64(e,t,r,n))}pushTagUnassigned(e){this._push(this.createTag(e))}pushBreak(){if(this._currentParent.length>-1)throw new Error("Unexpected break");this._closeParent()}_createObjectStartFixed(e){0!==e?this._createParent({},u.PARENT.OBJECT,e):this._push(this.createObject({}))}_createArrayStartFixed(e){0!==e?this._createParent(new Array(e),u.PARENT.ARRAY,e):this._push(this.createArray([]))}_decode(e){if(0===e.byteLength)throw new Error("Input too short");this._reset(),this._heap8.set(e);const t=this.parser.parse(e.byteLength);if(this._depth>1){for(;0===this._currentParent.length;)this._closeParent();if(this._depth>1)throw new Error("Undeterminated nesting")}if(t>0)throw new Error("Failed to parse");if(0===this._res.length)throw new Error("No valid result")}decodeFirst(e){return this._decode(e),this._res[0]}decodeAll(e){return this._decode(e),this._res}static decode(e,r){return"string"==typeof e&&(e=t.from(e,r||"hex")),new l({size:e.length}).decodeFirst(e)}static decodeAll(e,r){return"string"==typeof e&&(e=t.from(e,r||"hex")),new l({size:e.length}).decodeAll(e)}}l.decodeFirst=l.decode,e.exports=l}).call(this,r(0).Buffer,r(3))},function(e,t,r){"use strict";const n=r(2),i=n.MT,s=n.SIMPLE,o=n.SYMS;class a{constructor(e){if("number"!=typeof e)throw new Error("Invalid Simple type: "+typeof e);if(e<0||e>255||(0|e)!==e)throw new Error("value must be a small positive integer: "+e);this.value=e}toString(){return"simple("+this.value+")"}inspect(){return"simple("+this.value+")"}encodeCBOR(e){return e._pushInt(this.value,i.SIMPLE_FLOAT)}static isSimple(e){return e instanceof a}static decode(e,t){switch(null==t&&(t=!0),e){case s.FALSE:return!1;case s.TRUE:return!0;case s.NULL:return t?null:o.NULL;case s.UNDEFINED:return t?void 0:o.UNDEFINED;case-1:if(!t)throw new Error("Invalid BREAK");return o.BREAK;default:return new a(e)}}}e.exports=a},function(e,t,r){"use strict";class n{constructor(e,t,r){if(this.tag=e,this.value=t,this.err=r,"number"!=typeof this.tag)throw new Error("Invalid tag type ("+typeof this.tag+")");if(this.tag<0||(0|this.tag)!==this.tag)throw new Error("Tag must be a positive integer: "+this.tag)}toString(){return"".concat(this.tag,"(").concat(JSON.stringify(this.value),")")}encodeCBOR(e){return e._pushTag(this.tag),e.pushAny(this.value)}convert(e){var t,r;if("function"!=typeof(r=null!=e?e[this.tag]:void 0)&&"function"!=typeof(r=n["_tag"+this.tag]))return this;try{return r.call(n,this.value)}catch(i){return t=i,this.err=t,this}}}e.exports=n},function(e,t,r){"use strict";const{URLWithLegacySupport:n,format:i,URLSearchParams:s,defaultBase:o}=r(14),a=r(27);e.exports={URL:n,URLSearchParams:s,format:i,relative:a,defaultBase:o}},function(e,t,r){"use strict";const n=self.location?self.location.protocol+"//"+self.location.host:"",i=self.URL;e.exports={URLWithLegacySupport:class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;this.super=new i(e,t),this.path=this.pathname+this.search,this.auth=this.username&&this.password?this.username+":"+this.password:null,this.query=this.search&&this.search.startsWith("?")?this.search.slice(1):null}get hash(){return this.super.hash}get host(){return this.super.host}get hostname(){return this.super.hostname}get href(){return this.super.href}get origin(){return this.super.origin}get password(){return this.super.password}get pathname(){return this.super.pathname}get port(){return this.super.port}get protocol(){return this.super.protocol}get search(){return this.super.search}get searchParams(){return this.super.searchParams}get username(){return this.super.username}set hash(e){this.super.hash=e}set host(e){this.super.host=e}set hostname(e){this.super.hostname=e}set href(e){this.super.href=e}set origin(e){this.super.origin=e}set password(e){this.super.password=e}set pathname(e){this.super.pathname=e}set port(e){this.super.port=e}set protocol(e){this.super.protocol=e}set search(e){this.super.search=e}set searchParams(e){this.super.searchParams=e}set username(e){this.super.username=e}createObjectURL(e){return this.super.createObjectURL(e)}revokeObjectURL(e){this.super.revokeObjectURL(e)}toJSON(){return this.super.toJSON()}toString(){return this.super.toString()}format(){return this.toString()}},URLSearchParams:self.URLSearchParams,defaultBase:n,format:function(e){if("string"==typeof e)return new i(e).toString();if(!(e instanceof i)){const t=e.username&&e.password?"".concat(e.username,":").concat(e.password,"@"):"",r=e.auth?e.auth+"@":"",n=e.port?":"+e.port:"",i=e.protocol?e.protocol+"//":"",s=e.host||"",o=e.hostname||"",a=e.search||(e.query?"?"+e.query:""),u=e.hash||"",h=e.pathname||"",f=e.path||h+a;return"".concat(i).concat(t||r).concat(s||o+n).concat(f).concat(u)}}}},function(e,t,r){"use strict";(function(n){const i=r(5),s=r(32),o=r(33),a=r(16);(t=e.exports).addPrefix=(e,t)=>{let r;if(n.isBuffer(e))r=a.varintBufferEncode(e);else{if(!s[e])throw new Error("multicodec not recognized");r=s[e]}return n.concat([r,t])},t.rmPrefix=e=>(i.decode(e),e.slice(i.decode.bytes)),t.getCodec=e=>{const t=a.varintBufferDecode(e),r=o[t.toString("hex")];if(void 0===r)throw new Error("Code `0x"+t.toString("hex")+"` not found");return r},t.getName=e=>o[e.toString(16)],t.getNumber=e=>{const t=s[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return a.varintBufferDecode(t)[0]},t.getCode=e=>i.decode(e),t.getCodeVarint=e=>{const t=s[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return t},t.getVarint=e=>i.encode(e);const u=r(34);Object.assign(t,u),t.print=r(35)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(5);function i(e){return parseInt(e.toString("hex"),16)}function s(e){let r=e.toString(16);return r.length%2==1&&(r="0"+r),t.from(r,"hex")}e.exports={numberToBuffer:s,bufferToNumber:i,varintBufferEncode:function(e){return t.from(n.encode(i(e)))},varintBufferDecode:function(e){return s(n.decode(e))}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";var n=r(39).Buffer;e.exports=function(e){for(var t={},r=e.length,i=e.charAt(0),s=0;s>=8;for(;h>0;)s.push(255&h),h>>=8}for(var f=0;e[f]===i&&f0;)n.push(a%r),a=a/r|0}for(var u="",h=0;0===t[h]&&h=0;--f)u+=e[n[f]];return u},decodeUnsafe:a,decode:function(e){var t=a(e);if(t)return t;throw new Error("Non-base"+r+" character")}}}},function(e,t,r){"use strict";(function(t){var r="Input must be an string, Buffer or Uint8Array";function n(e){return(4294967296+e).toString(16).substring(1)}e.exports={normalizeInput:function(e){var n;if(e instanceof Uint8Array)n=e;else if(e instanceof t)n=new Uint8Array(e);else{if("string"!=typeof e)throw new Error(r);n=new Uint8Array(t.from(e,"utf8"))}return n},toHex:function(e){return Array.prototype.map.call(e,function(e){return(e<16?"0":"")+e.toString(16)}).join("")},debugPrint:function(e,t,r){for(var i="\n"+e+" = ",s=0;s0&&void 0!==arguments[0]?arguments[0]:this.multibaseName;if(this.string&&e===this.multibaseName)return this.string;let t=null;if(0===this.version){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()");t=n.toB58String(this.multihash)}else{if(1!==this.version)throw new Error("unsupported version");t=i.encode(e,this.buffer).toString()}return e===this.multibaseName&&Object.defineProperty(this,"string",{value:t}),t}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 t=a.checkCIDComponents(e);if(t)throw new Error(t)}}const h=r(60)(u,{className:"CID",symbolName:"@ipld/js-cid/CID"});h.codecs=o,e.exports=h}).call(this,r(0).Buffer)},function(e,t,r){e.exports=r(21)},function(e,t,r){"use strict";t.util=r(8),t.resolver=r(63),t.codec=t.util.codec,t.defaultHashAlg=t.util.defaultHashAlg},function(e,t,r){"use strict";t.Diagnose=r(23),t.Decoder=r(10),t.Encoder=r(28),t.Simple=r(11),t.Tagged=r(12),t.decodeAll=t.Decoder.decodeAll,t.decodeFirst=t.Decoder.decodeFirst,t.diagnose=t.Diagnose.diagnose,t.encode=t.Encoder.encode,t.decode=t.Decoder.decode,t.leveldb={decode:t.Decoder.decodeAll,encode:t.Encoder.encode,buffer:!0,name:"cbor"}},function(e,t,r){"use strict";(function(t){const n=r(10),i=r(4);class s extends n{createTag(e,t){return"".concat(e,"(").concat(t,")")}createInt(e){return super.createInt(e).toString()}createInt32(e,t){return super.createInt32(e,t).toString()}createInt64(e,t,r,n){return super.createInt64(e,t,r,n).toString()}createInt32Neg(e,t){return super.createInt32Neg(e,t).toString()}createInt64Neg(e,t,r,n){return super.createInt64Neg(e,t,r,n).toString()}createTrue(){return"true"}createFalse(){return"false"}createFloat(e){const t=super.createFloat(e);return i.isNegativeZero(e)?"-0_1":"".concat(t,"_1")}createFloatSingle(e,t,r,n){const i=super.createFloatSingle(e,t,r,n);return"".concat(i,"_2")}createFloatDouble(e,t,r,n,i,s,o,a){const u=super.createFloatDouble(e,t,r,n,i,s,o,a);return"".concat(u,"_3")}createByteString(e,t){const r=e.join(", ");return-1===t?"(_ ".concat(r,")"):"h'".concat(r)}createByteStringFromHeap(e,r){const n=t.from(super.createByteStringFromHeap(e,r)).toString("hex");return"h'".concat(n,"'")}createInfinity(){return"Infinity_1"}createInfinityNeg(){return"-Infinity_1"}createNaN(){return"NaN_1"}createNaNNeg(){return"-NaN_1"}createNull(){return"null"}createUndefined(){return"undefined"}createSimpleUnassigned(e){return"simple(".concat(e,")")}createArray(e,t){const r=super.createArray(e,t);return-1===t?"[_ ".concat(r.join(", "),"]"):"[".concat(r.join(", "),"]")}createMap(e,t){const r=super.createMap(e),n=Array.from(r.keys()).reduce(o(r),"");return-1===t?"{_ ".concat(n,"}"):"{".concat(n,"}")}createObject(e,t){const r=super.createObject(e),n=Object.keys(r).reduce(o(r),"");return-1===t?"{_ ".concat(n,"}"):"{".concat(n,"}")}createUtf8String(e,t){const r=e.join(", ");return-1===t?"(_ ".concat(r,")"):'"'.concat(r,'"')}createUtf8StringFromHeap(e,r){const n=t.from(super.createUtf8StringFromHeap(e,r)).toString("utf8");return'"'.concat(n,'"')}static diagnose(e,r){return"string"==typeof e&&(e=t.from(e,r||"hex")),(new s).decodeFirst(e)}}function o(e){return(t,r)=>t?"".concat(t,", ").concat(r,": ").concat(e[r]):"".concat(r,": ").concat(e[r])}e.exports=s}).call(this,r(0).Buffer)},function(e,t,r){"use strict";t.byteLength=function(e){var t=h(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){for(var t,r=h(e),n=r[0],o=r[1],a=new s(function(e,t,r){return 3*(t+r)/4-r}(0,n,o)),u=0,f=o>0?n-4:n,c=0;c>16&255,a[u++]=t>>8&255,a[u++]=255&t;2===o&&(t=i[e.charCodeAt(c)]<<2|i[e.charCodeAt(c+1)]>>4,a[u++]=255&t);1===o&&(t=i[e.charCodeAt(c)]<<10|i[e.charCodeAt(c+1)]<<4|i[e.charCodeAt(c+2)]>>2,a[u++]=t>>8&255,a[u++]=255&t);return a},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,s=[],o=0,a=r-i;oa?a:o+16383));1===i?(t=e[r-1],s.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],s.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return s.join("")};for(var n=[],i=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=o.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function f(e,t,r){for(var i,s,o=[],a=t;a>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t,r){"use strict";var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,r){"use strict";e.exports=function(e,t,r){"use asm";var n=new e.Uint8Array(r);var i=t.pushInt;var s=t.pushInt32;var o=t.pushInt32Neg;var a=t.pushInt64;var u=t.pushInt64Neg;var h=t.pushFloat;var f=t.pushFloatSingle;var c=t.pushFloatDouble;var l=t.pushTrue;var b=t.pushFalse;var k=t.pushUndefined;var p=t.pushNull;var S=t.pushInfinity;var m=t.pushInfinityNeg;var d=t.pushNaN;var g=t.pushNaNNeg;var _=t.pushArrayStart;var E=t.pushArrayStartFixed;var x=t.pushArrayStartFixed32;var y=t.pushArrayStartFixed64;var w=t.pushObjectStart;var I=t.pushObjectStartFixed;var N=t.pushObjectStartFixed32;var A=t.pushObjectStartFixed64;var v=t.pushByteString;var B=t.pushByteStringStart;var T=t.pushUtf8String;var K=t.pushUtf8StringStart;var O=t.pushSimpleUnassigned;var U=t.pushTagStart;var R=t.pushTagStart4;var L=t.pushTagStart8;var P=t.pushTagUnassigned;var C=t.pushBreak;var F=e.Math.pow;var D=0;var M=0;var j=0;function H(e){e=e|0;D=0;M=e;while((D|0)<(M|0)){j=Je[n[D]&255](n[D]|0)|0;if((j|0)>0){break}}return j|0}function z(e){e=e|0;if(((D|0)+(e|0)|0)<(M|0)){return 0}return 1}function Y(e){e=e|0;return n[e|0]<<8|n[e+1|0]|0}function G(e){e=e|0;return n[e|0]<<24|n[e+1|0]<<16|n[e+2|0]<<8|n[e+3|0]|0}function V(e){e=e|0;i(e|0);D=D+1|0;return 0}function W(e){e=e|0;if(z(1)|0){return 1}i(n[D+1|0]|0);D=D+2|0;return 0}function q(e){e=e|0;if(z(2)|0){return 1}i(Y(D+1|0)|0);D=D+3|0;return 0}function X(e){e=e|0;if(z(4)|0){return 1}s(Y(D+1|0)|0,Y(D+3|0)|0);D=D+5|0;return 0}function J(e){e=e|0;if(z(8)|0){return 1}a(Y(D+1|0)|0,Y(D+3|0)|0,Y(D+5|0)|0,Y(D+7|0)|0);D=D+9|0;return 0}function Z(e){e=e|0;i(-1-(e-32|0)|0);D=D+1|0;return 0}function $(e){e=e|0;if(z(1)|0){return 1}i(-1-(n[D+1|0]|0)|0);D=D+2|0;return 0}function Q(e){e=e|0;var t=0;if(z(2)|0){return 1}t=Y(D+1|0)|0;i(-1-(t|0)|0);D=D+3|0;return 0}function ee(e){e=e|0;if(z(4)|0){return 1}o(Y(D+1|0)|0,Y(D+3|0)|0);D=D+5|0;return 0}function te(e){e=e|0;if(z(8)|0){return 1}u(Y(D+1|0)|0,Y(D+3|0)|0,Y(D+5|0)|0,Y(D+7|0)|0);D=D+9|0;return 0}function re(e){e=e|0;var t=0;var r=0;var n=0;n=e-64|0;if(z(n|0)|0){return 1}t=D+1|0;r=(D+1|0)+(n|0)|0;v(t|0,r|0);D=r|0;return 0}function ne(e){e=e|0;var t=0;var r=0;var i=0;if(z(1)|0){return 1}i=n[D+1|0]|0;t=D+2|0;r=(D+2|0)+(i|0)|0;if(z(i+1|0)|0){return 1}v(t|0,r|0);D=r|0;return 0}function ie(e){e=e|0;var t=0;var r=0;var n=0;if(z(2)|0){return 1}n=Y(D+1|0)|0;t=D+3|0;r=(D+3|0)+(n|0)|0;if(z(n+2|0)|0){return 1}v(t|0,r|0);D=r|0;return 0}function se(e){e=e|0;var t=0;var r=0;var n=0;if(z(4)|0){return 1}n=G(D+1|0)|0;t=D+5|0;r=(D+5|0)+(n|0)|0;if(z(n+4|0)|0){return 1}v(t|0,r|0);D=r|0;return 0}function oe(e){e=e|0;return 1}function ae(e){e=e|0;B();D=D+1|0;return 0}function ue(e){e=e|0;var t=0;var r=0;var n=0;n=e-96|0;if(z(n|0)|0){return 1}t=D+1|0;r=(D+1|0)+(n|0)|0;T(t|0,r|0);D=r|0;return 0}function he(e){e=e|0;var t=0;var r=0;var i=0;if(z(1)|0){return 1}i=n[D+1|0]|0;t=D+2|0;r=(D+2|0)+(i|0)|0;if(z(i+1|0)|0){return 1}T(t|0,r|0);D=r|0;return 0}function fe(e){e=e|0;var t=0;var r=0;var n=0;if(z(2)|0){return 1}n=Y(D+1|0)|0;t=D+3|0;r=(D+3|0)+(n|0)|0;if(z(n+2|0)|0){return 1}T(t|0,r|0);D=r|0;return 0}function ce(e){e=e|0;var t=0;var r=0;var n=0;if(z(4)|0){return 1}n=G(D+1|0)|0;t=D+5|0;r=(D+5|0)+(n|0)|0;if(z(n+4|0)|0){return 1}T(t|0,r|0);D=r|0;return 0}function le(e){e=e|0;return 1}function be(e){e=e|0;K();D=D+1|0;return 0}function ke(e){e=e|0;E(e-128|0);D=D+1|0;return 0}function pe(e){e=e|0;if(z(1)|0){return 1}E(n[D+1|0]|0);D=D+2|0;return 0}function Se(e){e=e|0;if(z(2)|0){return 1}E(Y(D+1|0)|0);D=D+3|0;return 0}function me(e){e=e|0;if(z(4)|0){return 1}x(Y(D+1|0)|0,Y(D+3|0)|0);D=D+5|0;return 0}function de(e){e=e|0;if(z(8)|0){return 1}y(Y(D+1|0)|0,Y(D+3|0)|0,Y(D+5|0)|0,Y(D+7|0)|0);D=D+9|0;return 0}function ge(e){e=e|0;_();D=D+1|0;return 0}function _e(e){e=e|0;var t=0;t=e-160|0;if(z(t|0)|0){return 1}I(t|0);D=D+1|0;return 0}function Ee(e){e=e|0;if(z(1)|0){return 1}I(n[D+1|0]|0);D=D+2|0;return 0}function xe(e){e=e|0;if(z(2)|0){return 1}I(Y(D+1|0)|0);D=D+3|0;return 0}function ye(e){e=e|0;if(z(4)|0){return 1}N(Y(D+1|0)|0,Y(D+3|0)|0);D=D+5|0;return 0}function we(e){e=e|0;if(z(8)|0){return 1}A(Y(D+1|0)|0,Y(D+3|0)|0,Y(D+5|0)|0,Y(D+7|0)|0);D=D+9|0;return 0}function Ie(e){e=e|0;w();D=D+1|0;return 0}function Ne(e){e=e|0;U(e-192|0|0);D=D+1|0;return 0}function Ae(e){e|0;U(e|0);D=D+1|0;return 0}function ve(e){e|0;U(e|0);D=D+1|0;return 0}function Be(e){e|0;U(e|0);D=D+1|0;return 0}function Te(e){e|0;U(e|0);D=D+1|0;return 0}function Ke(e){e=e|0;U(e-192|0|0);D=D+1|0;return 0}function Oe(e){e|0;U(e|0);D=D+1|0;return 0}function Ue(e){e|0;U(e|0);D=D+1|0;return 0}function Re(e){e|0;U(e|0);D=D+1|0;return 0}function Le(e){e=e|0;if(z(1)|0){return 1}U(n[D+1|0]|0);D=D+2|0;return 0}function Pe(e){e=e|0;if(z(2)|0){return 1}U(Y(D+1|0)|0);D=D+3|0;return 0}function Ce(e){e=e|0;if(z(4)|0){return 1}R(Y(D+1|0)|0,Y(D+3|0)|0);D=D+5|0;return 0}function Fe(e){e=e|0;if(z(8)|0){return 1}L(Y(D+1|0)|0,Y(D+3|0)|0,Y(D+5|0)|0,Y(D+7|0)|0);D=D+9|0;return 0}function De(e){e=e|0;O((e|0)-224|0);D=D+1|0;return 0}function Me(e){e=e|0;b();D=D+1|0;return 0}function je(e){e=e|0;l();D=D+1|0;return 0}function He(e){e=e|0;p();D=D+1|0;return 0}function ze(e){e=e|0;k();D=D+1|0;return 0}function Ye(e){e=e|0;if(z(1)|0){return 1}O(n[D+1|0]|0);D=D+2|0;return 0}function Ge(e){e=e|0;var t=0;var r=0;var i=1.0;var s=0.0;var o=0.0;var a=0.0;if(z(2)|0){return 1}t=n[D+1|0]|0;r=n[D+2|0]|0;if((t|0)&0x80){i=-1.0}s=+(((t|0)&0x7C)>>2);o=+(((t|0)&0x03)<<8|r);if(+s==0.0){h(+(+i*+5.9604644775390625e-8*+o))}else if(+s==31.0){if(+i==1.0){if(+o>0.0){d()}else{S()}}else{if(+o>0.0){g()}else{m()}}}else{h(+(+i*F(+2,+(+s-25.0))*+(1024.0+o)))}D=D+3|0;return 0}function Ve(e){e=e|0;if(z(4)|0){return 1}f(n[D+1|0]|0,n[D+2|0]|0,n[D+3|0]|0,n[D+4|0]|0);D=D+5|0;return 0}function We(e){e=e|0;if(z(8)|0){return 1}c(n[D+1|0]|0,n[D+2|0]|0,n[D+3|0]|0,n[D+4|0]|0,n[D+5|0]|0,n[D+6|0]|0,n[D+7|0]|0,n[D+8|0]|0);D=D+9|0;return 0}function qe(e){e=e|0;return 1}function Xe(e){e=e|0;C();D=D+1|0;return 0}var Je=[V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,W,q,X,J,qe,qe,qe,qe,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,$,Q,ee,te,qe,qe,qe,qe,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,ne,ie,se,oe,qe,qe,qe,ae,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,he,fe,ce,le,qe,qe,qe,be,ke,ke,ke,ke,ke,ke,ke,ke,ke,ke,ke,ke,ke,ke,ke,ke,ke,ke,ke,ke,ke,ke,ke,ke,pe,Se,me,de,qe,qe,qe,ge,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,Ee,xe,ye,we,qe,qe,qe,Ie,Ne,Ne,Ne,Ne,Ne,Ne,Ke,Ke,Ke,Ke,Ke,Ke,Ke,Ke,Ke,Ke,Ke,Ke,Ke,Ke,Ke,Ke,Ke,Ke,Le,Pe,Ce,Fe,qe,qe,qe,qe,De,De,De,De,De,De,De,De,De,De,De,De,De,De,De,De,De,De,De,De,Me,je,He,ze,Ye,Ge,Ve,We,qe,qe,qe,Xe];return{parse:H}}},function(e,t,r){"use strict";const{URLWithLegacySupport:n,format:i}=r(14);e.exports=function(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0,a=r.protocol?r.protocol.replace(":",""):"http";a=(s[a]||o||a)+":";try{t=new n(e)}catch(h){t={}}const u=Object.assign({},r,{protocol:a||t.protocol,host:r.host||t.host});return new n(e,i(u)).toString()}},function(e,t,r){"use strict";(function(t){const{URL:n}=r(13),i=r(1).BigNumber,s=r(4),o=r(2),a=o.MT,u=o.NUMBYTES,h=o.SHIFT32,f=o.SYMS,c=o.TAG,l=o.MT.SIMPLE_FLOAT<<5|o.NUMBYTES.TWO,b=o.MT.SIMPLE_FLOAT<<5|o.NUMBYTES.FOUR,k=o.MT.SIMPLE_FLOAT<<5|o.NUMBYTES.EIGHT,p=o.MT.SIMPLE_FLOAT<<5|o.SIMPLE.TRUE,S=o.MT.SIMPLE_FLOAT<<5|o.SIMPLE.FALSE,m=o.MT.SIMPLE_FLOAT<<5|o.SIMPLE.UNDEFINED,d=o.MT.SIMPLE_FLOAT<<5|o.SIMPLE.NULL,g=new i("0x20000000000000"),_=t.from("f97e00","hex"),E=t.from("f9fc00","hex"),x=t.from("f97c00","hex");class y{constructor(e){e=e||{},this.streaming="function"==typeof e.stream,this.onData=e.stream,this.semanticTypes=[[n,this._pushUrl],[i,this._pushBigNumber]];const t=e.genTypes||[],r=t.length;for(let n=0;n[t,e[t]]))}_pushRawMap(e,t){t=t.map(function(e){return e[0]=y.encode(e[0]),e}).sort(s.keySorter);for(var r=0;r=s;)r[o++]=255&t|n,t/=128;for(;t&i;)r[o++]=255&t|n,t>>>=7;r[o]=0|t;e.bytes=o-a+1;return r};var n=128,i=-128,s=Math.pow(2,31)},function(e,t,r){"use strict";e.exports=function e(t,r){var s,o=0,r=r||0,a=0,u=r,h=t.length;do{if(u>=h)throw e.bytes=0,new RangeError("Could not decode varint");s=t[u++],o+=a<28?(s&i)<=n);e.bytes=u-r;return o};var n=128,i=127},function(e,t,r){"use strict";var n=Math.pow(2,7),i=Math.pow(2,14),s=Math.pow(2,21),o=Math.pow(2,28),a=Math.pow(2,35),u=Math.pow(2,42),h=Math.pow(2,49),f=Math.pow(2,56),c=Math.pow(2,63);e.exports=function(e){return e{const n=a.createHash(t),i=await n(e);return r?i.slice(0,r):i},a.createHash=function(e){if(!e)throw i("hash algorithm must be specified","ERR_HASH_ALGORITHM_NOT_SPECIFIED");if(e=s.coerceCode(e),!a.functions[e])throw i("multihash function '".concat(e,"' not yet supported"),"ERR_HASH_ALGORITHM_NOT_SUPPORTED");return a.functions[e]},a.functions={17:o.sha1,18:o.sha2256,19:o.sha2512,20:o.sha3512,21:o.sha3384,22:o.sha3256,23:o.sha3224,24:o.shake128,25:o.shake256,26:o.keccak224,27:o.keccak256,28:o.keccak384,29:o.keccak512,34:o.murmur3128,35:o.murmur332,86:o.dblSha2256},o.addBlake(a.functions),a.validate=async(e,t)=>{const r=await a(e,s.decode(t).name);return 0===n.compare(t,r)},e.exports=a},function(e,t,r){"use strict";e.exports=function(e,t,r){var n,i=e instanceof Error?e:new Error(e);if("object"==typeof t?r=t:null!=t&&(i.code=t),r)for(n in r)i[n]=r[n];return i}},function(e,t,r){"use strict";var n=r(17);e.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(e,t,r){"use strict";var n=r(0),i=n.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(s(n,t),t.Buffer=o),o.prototype=Object.create(i.prototype),s(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){"use strict";t.names=Object.freeze({identity:0,sha1:17,"sha2-256":18,"sha2-512":19,"dbl-sha2-256":86,"sha3-224":23,"sha3-256":22,"sha3-384":21,"sha3-512":20,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"murmur3-128":34,"murmur3-32":35,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"Skein256-8":45825,"Skein256-16":45826,"Skein256-24":45827,"Skein256-32":45828,"Skein256-40":45829,"Skein256-48":45830,"Skein256-56":45831,"Skein256-64":45832,"Skein256-72":45833,"Skein256-80":45834,"Skein256-88":45835,"Skein256-96":45836,"Skein256-104":45837,"Skein256-112":45838,"Skein256-120":45839,"Skein256-128":45840,"Skein256-136":45841,"Skein256-144":45842,"Skein256-152":45843,"Skein256-160":45844,"Skein256-168":45845,"Skein256-176":45846,"Skein256-184":45847,"Skein256-192":45848,"Skein256-200":45849,"Skein256-208":45850,"Skein256-216":45851,"Skein256-224":45852,"Skein256-232":45853,"Skein256-240":45854,"Skein256-248":45855,"Skein256-256":45856,"Skein512-8":45857,"Skein512-16":45858,"Skein512-24":45859,"Skein512-32":45860,"Skein512-40":45861,"Skein512-48":45862,"Skein512-56":45863,"Skein512-64":45864,"Skein512-72":45865,"Skein512-80":45866,"Skein512-88":45867,"Skein512-96":45868,"Skein512-104":45869,"Skein512-112":45870,"Skein512-120":45871,"Skein512-128":45872,"Skein512-136":45873,"Skein512-144":45874,"Skein512-152":45875,"Skein512-160":45876,"Skein512-168":45877,"Skein512-176":45878,"Skein512-184":45879,"Skein512-192":45880,"Skein512-200":45881,"Skein512-208":45882,"Skein512-216":45883,"Skein512-224":45884,"Skein512-232":45885,"Skein512-240":45886,"Skein512-248":45887,"Skein512-256":45888,"Skein512-264":45889,"Skein512-272":45890,"Skein512-280":45891,"Skein512-288":45892,"Skein512-296":45893,"Skein512-304":45894,"Skein512-312":45895,"Skein512-320":45896,"Skein512-328":45897,"Skein512-336":45898,"Skein512-344":45899,"Skein512-352":45900,"Skein512-360":45901,"Skein512-368":45902,"Skein512-376":45903,"Skein512-384":45904,"Skein512-392":45905,"Skein512-400":45906,"Skein512-408":45907,"Skein512-416":45908,"Skein512-424":45909,"Skein512-432":45910,"Skein512-440":45911,"Skein512-448":45912,"Skein512-456":45913,"Skein512-464":45914,"Skein512-472":45915,"Skein512-480":45916,"Skein512-488":45917,"Skein512-496":45918,"Skein512-504":45919,"Skein512-512":45920,"Skein1024-8":45921,"Skein1024-16":45922,"Skein1024-24":45923,"Skein1024-32":45924,"Skein1024-40":45925,"Skein1024-48":45926,"Skein1024-56":45927,"Skein1024-64":45928,"Skein1024-72":45929,"Skein1024-80":45930,"Skein1024-88":45931,"Skein1024-96":45932,"Skein1024-104":45933,"Skein1024-112":45934,"Skein1024-120":45935,"Skein1024-128":45936,"Skein1024-136":45937,"Skein1024-144":45938,"Skein1024-152":45939,"Skein1024-160":45940,"Skein1024-168":45941,"Skein1024-176":45942,"Skein1024-184":45943,"Skein1024-192":45944,"Skein1024-200":45945,"Skein1024-208":45946,"Skein1024-216":45947,"Skein1024-224":45948,"Skein1024-232":45949,"Skein1024-240":45950,"Skein1024-248":45951,"Skein1024-256":45952,"Skein1024-264":45953,"Skein1024-272":45954,"Skein1024-280":45955,"Skein1024-288":45956,"Skein1024-296":45957,"Skein1024-304":45958,"Skein1024-312":45959,"Skein1024-320":45960,"Skein1024-328":45961,"Skein1024-336":45962,"Skein1024-344":45963,"Skein1024-352":45964,"Skein1024-360":45965,"Skein1024-368":45966,"Skein1024-376":45967,"Skein1024-384":45968,"Skein1024-392":45969,"Skein1024-400":45970,"Skein1024-408":45971,"Skein1024-416":45972,"Skein1024-424":45973,"Skein1024-432":45974,"Skein1024-440":45975,"Skein1024-448":45976,"Skein1024-456":45977,"Skein1024-464":45978,"Skein1024-472":45979,"Skein1024-480":45980,"Skein1024-488":45981,"Skein1024-496":45982,"Skein1024-504":45983,"Skein1024-512":45984,"Skein1024-520":45985,"Skein1024-528":45986,"Skein1024-536":45987,"Skein1024-544":45988,"Skein1024-552":45989,"Skein1024-560":45990,"Skein1024-568":45991,"Skein1024-576":45992,"Skein1024-584":45993,"Skein1024-592":45994,"Skein1024-600":45995,"Skein1024-608":45996,"Skein1024-616":45997,"Skein1024-624":45998,"Skein1024-632":45999,"Skein1024-640":46e3,"Skein1024-648":46001,"Skein1024-656":46002,"Skein1024-664":46003,"Skein1024-672":46004,"Skein1024-680":46005,"Skein1024-688":46006,"Skein1024-696":46007,"Skein1024-704":46008,"Skein1024-712":46009,"Skein1024-720":46010,"Skein1024-728":46011,"Skein1024-736":46012,"Skein1024-744":46013,"Skein1024-752":46014,"Skein1024-760":46015,"Skein1024-768":46016,"Skein1024-776":46017,"Skein1024-784":46018,"Skein1024-792":46019,"Skein1024-800":46020,"Skein1024-808":46021,"Skein1024-816":46022,"Skein1024-824":46023,"Skein1024-832":46024,"Skein1024-840":46025,"Skein1024-848":46026,"Skein1024-856":46027,"Skein1024-864":46028,"Skein1024-872":46029,"Skein1024-880":46030,"Skein1024-888":46031,"Skein1024-896":46032,"Skein1024-904":46033,"Skein1024-912":46034,"Skein1024-920":46035,"Skein1024-928":46036,"Skein1024-936":46037,"Skein1024-944":46038,"Skein1024-952":46039,"Skein1024-960":46040,"Skein1024-968":46041,"Skein1024-976":46042,"Skein1024-984":46043,"Skein1024-992":46044,"Skein1024-1000":46045,"Skein1024-1008":46046,"Skein1024-1016":46047,"Skein1024-1024":46048}),t.codes=Object.freeze({0:"identity",17:"sha1",18:"sha2-256",19:"sha2-512",86:"dbl-sha2-256",23:"sha3-224",22:"sha3-256",21:"sha3-384",20:"sha3-512",24:"shake-128",25:"shake-256",26:"keccak-224",27:"keccak-256",28:"keccak-384",29:"keccak-512",34:"murmur3-128",35:"murmur3-32",45569:"blake2b-8",45570:"blake2b-16",45571:"blake2b-24",45572:"blake2b-32",45573:"blake2b-40",45574:"blake2b-48",45575:"blake2b-56",45576:"blake2b-64",45577:"blake2b-72",45578:"blake2b-80",45579:"blake2b-88",45580:"blake2b-96",45581:"blake2b-104",45582:"blake2b-112",45583:"blake2b-120",45584:"blake2b-128",45585:"blake2b-136",45586:"blake2b-144",45587:"blake2b-152",45588:"blake2b-160",45589:"blake2b-168",45590:"blake2b-176",45591:"blake2b-184",45592:"blake2b-192",45593:"blake2b-200",45594:"blake2b-208",45595:"blake2b-216",45596:"blake2b-224",45597:"blake2b-232",45598:"blake2b-240",45599:"blake2b-248",45600:"blake2b-256",45601:"blake2b-264",45602:"blake2b-272",45603:"blake2b-280",45604:"blake2b-288",45605:"blake2b-296",45606:"blake2b-304",45607:"blake2b-312",45608:"blake2b-320",45609:"blake2b-328",45610:"blake2b-336",45611:"blake2b-344",45612:"blake2b-352",45613:"blake2b-360",45614:"blake2b-368",45615:"blake2b-376",45616:"blake2b-384",45617:"blake2b-392",45618:"blake2b-400",45619:"blake2b-408",45620:"blake2b-416",45621:"blake2b-424",45622:"blake2b-432",45623:"blake2b-440",45624:"blake2b-448",45625:"blake2b-456",45626:"blake2b-464",45627:"blake2b-472",45628:"blake2b-480",45629:"blake2b-488",45630:"blake2b-496",45631:"blake2b-504",45632:"blake2b-512",45633:"blake2s-8",45634:"blake2s-16",45635:"blake2s-24",45636:"blake2s-32",45637:"blake2s-40",45638:"blake2s-48",45639:"blake2s-56",45640:"blake2s-64",45641:"blake2s-72",45642:"blake2s-80",45643:"blake2s-88",45644:"blake2s-96",45645:"blake2s-104",45646:"blake2s-112",45647:"blake2s-120",45648:"blake2s-128",45649:"blake2s-136",45650:"blake2s-144",45651:"blake2s-152",45652:"blake2s-160",45653:"blake2s-168",45654:"blake2s-176",45655:"blake2s-184",45656:"blake2s-192",45657:"blake2s-200",45658:"blake2s-208",45659:"blake2s-216",45660:"blake2s-224",45661:"blake2s-232",45662:"blake2s-240",45663:"blake2s-248",45664:"blake2s-256",45825:"Skein256-8",45826:"Skein256-16",45827:"Skein256-24",45828:"Skein256-32",45829:"Skein256-40",45830:"Skein256-48",45831:"Skein256-56",45832:"Skein256-64",45833:"Skein256-72",45834:"Skein256-80",45835:"Skein256-88",45836:"Skein256-96",45837:"Skein256-104",45838:"Skein256-112",45839:"Skein256-120",45840:"Skein256-128",45841:"Skein256-136",45842:"Skein256-144",45843:"Skein256-152",45844:"Skein256-160",45845:"Skein256-168",45846:"Skein256-176",45847:"Skein256-184",45848:"Skein256-192",45849:"Skein256-200",45850:"Skein256-208",45851:"Skein256-216",45852:"Skein256-224",45853:"Skein256-232",45854:"Skein256-240",45855:"Skein256-248",45856:"Skein256-256",45857:"Skein512-8",45858:"Skein512-16",45859:"Skein512-24",45860:"Skein512-32",45861:"Skein512-40",45862:"Skein512-48",45863:"Skein512-56",45864:"Skein512-64",45865:"Skein512-72",45866:"Skein512-80",45867:"Skein512-88",45868:"Skein512-96",45869:"Skein512-104",45870:"Skein512-112",45871:"Skein512-120",45872:"Skein512-128",45873:"Skein512-136",45874:"Skein512-144",45875:"Skein512-152",45876:"Skein512-160",45877:"Skein512-168",45878:"Skein512-176",45879:"Skein512-184",45880:"Skein512-192",45881:"Skein512-200",45882:"Skein512-208",45883:"Skein512-216",45884:"Skein512-224",45885:"Skein512-232",45886:"Skein512-240",45887:"Skein512-248",45888:"Skein512-256",45889:"Skein512-264",45890:"Skein512-272",45891:"Skein512-280",45892:"Skein512-288",45893:"Skein512-296",45894:"Skein512-304",45895:"Skein512-312",45896:"Skein512-320",45897:"Skein512-328",45898:"Skein512-336",45899:"Skein512-344",45900:"Skein512-352",45901:"Skein512-360",45902:"Skein512-368",45903:"Skein512-376",45904:"Skein512-384",45905:"Skein512-392",45906:"Skein512-400",45907:"Skein512-408",45908:"Skein512-416",45909:"Skein512-424",45910:"Skein512-432",45911:"Skein512-440",45912:"Skein512-448",45913:"Skein512-456",45914:"Skein512-464",45915:"Skein512-472",45916:"Skein512-480",45917:"Skein512-488",45918:"Skein512-496",45919:"Skein512-504",45920:"Skein512-512",45921:"Skein1024-8",45922:"Skein1024-16",45923:"Skein1024-24",45924:"Skein1024-32",45925:"Skein1024-40",45926:"Skein1024-48",45927:"Skein1024-56",45928:"Skein1024-64",45929:"Skein1024-72",45930:"Skein1024-80",45931:"Skein1024-88",45932:"Skein1024-96",45933:"Skein1024-104",45934:"Skein1024-112",45935:"Skein1024-120",45936:"Skein1024-128",45937:"Skein1024-136",45938:"Skein1024-144",45939:"Skein1024-152",45940:"Skein1024-160",45941:"Skein1024-168",45942:"Skein1024-176",45943:"Skein1024-184",45944:"Skein1024-192",45945:"Skein1024-200",45946:"Skein1024-208",45947:"Skein1024-216",45948:"Skein1024-224",45949:"Skein1024-232",45950:"Skein1024-240",45951:"Skein1024-248",45952:"Skein1024-256",45953:"Skein1024-264",45954:"Skein1024-272",45955:"Skein1024-280",45956:"Skein1024-288",45957:"Skein1024-296",45958:"Skein1024-304",45959:"Skein1024-312",45960:"Skein1024-320",45961:"Skein1024-328",45962:"Skein1024-336",45963:"Skein1024-344",45964:"Skein1024-352",45965:"Skein1024-360",45966:"Skein1024-368",45967:"Skein1024-376",45968:"Skein1024-384",45969:"Skein1024-392",45970:"Skein1024-400",45971:"Skein1024-408",45972:"Skein1024-416",45973:"Skein1024-424",45974:"Skein1024-432",45975:"Skein1024-440",45976:"Skein1024-448",45977:"Skein1024-456",45978:"Skein1024-464",45979:"Skein1024-472",45980:"Skein1024-480",45981:"Skein1024-488",45982:"Skein1024-496",45983:"Skein1024-504",45984:"Skein1024-512",45985:"Skein1024-520",45986:"Skein1024-528",45987:"Skein1024-536",45988:"Skein1024-544",45989:"Skein1024-552",45990:"Skein1024-560",45991:"Skein1024-568",45992:"Skein1024-576",45993:"Skein1024-584",45994:"Skein1024-592",45995:"Skein1024-600",45996:"Skein1024-608",45997:"Skein1024-616",45998:"Skein1024-624",45999:"Skein1024-632",46e3:"Skein1024-640",46001:"Skein1024-648",46002:"Skein1024-656",46003:"Skein1024-664",46004:"Skein1024-672",46005:"Skein1024-680",46006:"Skein1024-688",46007:"Skein1024-696",46008:"Skein1024-704",46009:"Skein1024-712",46010:"Skein1024-720",46011:"Skein1024-728",46012:"Skein1024-736",46013:"Skein1024-744",46014:"Skein1024-752",46015:"Skein1024-760",46016:"Skein1024-768",46017:"Skein1024-776",46018:"Skein1024-784",46019:"Skein1024-792",46020:"Skein1024-800",46021:"Skein1024-808",46022:"Skein1024-816",46023:"Skein1024-824",46024:"Skein1024-832",46025:"Skein1024-840",46026:"Skein1024-848",46027:"Skein1024-856",46028:"Skein1024-864",46029:"Skein1024-872",46030:"Skein1024-880",46031:"Skein1024-888",46032:"Skein1024-896",46033:"Skein1024-904",46034:"Skein1024-912",46035:"Skein1024-920",46036:"Skein1024-928",46037:"Skein1024-936",46038:"Skein1024-944",46039:"Skein1024-952",46040:"Skein1024-960",46041:"Skein1024-968",46042:"Skein1024-976",46043:"Skein1024-984",46044:"Skein1024-992",46045:"Skein1024-1000",46046:"Skein1024-1008",46047:"Skein1024-1016",46048:"Skein1024-1024"}),t.defaultLengths=Object.freeze({17:20,18:32,19:64,86:32,23:28,22:32,21:48,20:64,24:32,25:64,26:28,27:32,28:48,29:64,34:32,45569:1,45570:2,45571:3,45572:4,45573:5,45574:6,45575:7,45576:8,45577:9,45578:10,45579:11,45580:12,45581:13,45582:14,45583:15,45584:16,45585:17,45586:18,45587:19,45588:20,45589:21,45590:22,45591:23,45592:24,45593:25,45594:26,45595:27,45596:28,45597:29,45598:30,45599:31,45600:32,45601:33,45602:34,45603:35,45604:36,45605:37,45606:38,45607:39,45608:40,45609:41,45610:42,45611:43,45612:44,45613:45,45614:46,45615:47,45616:48,45617:49,45618:50,45619:51,45620:52,45621:53,45622:54,45623:55,45624:56,45625:57,45626:58,45627:59,45628:60,45629:61,45630:62,45631:63,45632:64,45633:1,45634:2,45635:3,45636:4,45637:5,45638:6,45639:7,45640:8,45641:9,45642:10,45643:11,45644:12,45645:13,45646:14,45647:15,45648:16,45649:17,45650:18,45651:19,45652:20,45653:21,45654:22,45655:23,45656:24,45657:25,45658:26,45659:27,45660:28,45661:29,45662:30,45663:31,45664:32,45825:1,45826:2,45827:3,45828:4,45829:5,45830:6,45831:7,45832:8,45833:9,45834:10,45835:11,45836:12,45837:13,45838:14,45839:15,45840:16,45841:17,45842:18,45843:19,45844:20,45845:21,45846:22,45847:23,45848:24,45849:25,45850:26,45851:27,45852:28,45853:29,45854:30,45855:31,45856:32,45857:1,45858:2,45859:3,45860:4,45861:5,45862:6,45863:7,45864:8,45865:9,45866:10,45867:11,45868:12,45869:13,45870:14,45871:15,45872:16,45873:17,45874:18,45875:19,45876:20,45877:21,45878:22,45879:23,45880:24,45881:25,45882:26,45883:27,45884:28,45885:29,45886:30,45887:31,45888:32,45889:33,45890:34,45891:35,45892:36,45893:37,45894:38,45895:39,45896:40,45897:41,45898:42,45899:43,45900:44,45901:45,45902:46,45903:47,45904:48,45905:49,45906:50,45907:51,45908:52,45909:53,45910:54,45911:55,45912:56,45913:57,45914:58,45915:59,45916:60,45917:61,45918:62,45919:63,45920:64,45921:1,45922:2,45923:3,45924:4,45925:5,45926:6,45927:7,45928:8,45929:9,45930:10,45931:11,45932:12,45933:13,45934:14,45935:15,45936:16,45937:17,45938:18,45939:19,45940:20,45941:21,45942:22,45943:23,45944:24,45945:25,45946:26,45947:27,45948:28,45949:29,45950:30,45951:31,45952:32,45953:33,45954:34,45955:35,45956:36,45957:37,45958:38,45959:39,45960:40,45961:41,45962:42,45963:43,45964:44,45965:45,45966:46,45967:47,45968:48,45969:49,45970:50,45971:51,45972:52,45973:53,45974:54,45975:55,45976:56,45977:57,45978:58,45979:59,45980:60,45981:61,45982:62,45983:63,45984:64,45985:65,45986:66,45987:67,45988:68,45989:69,45990:70,45991:71,45992:72,45993:73,45994:74,45995:75,45996:76,45997:77,45998:78,45999:79,46e3:80,46001:81,46002:82,46003:83,46004:84,46005:85,46006:86,46007:87,46008:88,46009:89,46010:90,46011:91,46012:92,46013:93,46014:94,46015:95,46016:96,46017:97,46018:98,46019:99,46020:100,46021:101,46022:102,46023:103,46024:104,46025:105,46026:106,46027:107,46028:108,46029:109,46030:110,46031:111,46032:112,46033:113,46034:114,46035:115,46036:116,46037:117,46038:118,46039:119,46040:120,46041:121,46042:122,46043:123,46044:124,46045:125,46046:126,46047:127,46048:128})},function(e,t,r){"use strict";const{Buffer:n}=r(0),i=r(42),s=r(45),o=r(47),{fromNumberTo32BitBuf:a}=r(48),u=e=>async t=>{switch(e){case"sha3-224":return n.from(i.sha3_224.arrayBuffer(t));case"sha3-256":return n.from(i.sha3_256.arrayBuffer(t));case"sha3-384":return n.from(i.sha3_384.arrayBuffer(t));case"sha3-512":return n.from(i.sha3_512.arrayBuffer(t));case"shake-128":return n.from(i.shake128.create(128).update(t).arrayBuffer());case"shake-256":return n.from(i.shake256.create(256).update(t).arrayBuffer());case"keccak-224":return n.from(i.keccak224.arrayBuffer(t));case"keccak-256":return n.from(i.keccak256.arrayBuffer(t));case"keccak-384":return n.from(i.keccak384.arrayBuffer(t));case"keccak-512":return n.from(i.keccak512.arrayBuffer(t));case"murmur3-128":return n.from(s.x64.hash128(t),"hex");case"murmur3-32":return a(s.x86.hash32(t));default:throw new TypeError("".concat(e," is not a supported algorithm"))}};e.exports={sha1:o("sha1"),sha2256:o("sha2-256"),sha2512:o("sha2-512"),dblSha2256:o("dbl-sha2-256"),sha3224:u("sha3-224"),sha3256:u("sha3-256"),sha3384:u("sha3-384"),sha3512:u("sha3-512"),shake128:u("shake-128"),shake256:u("shake-256"),keccak224:u("keccak-224"),keccak256:u("keccak-256"),keccak384:u("keccak-384"),keccak512:u("keccak-512"),murmur3128:u("murmur3-128"),murmur332:u("murmur3-32"),addBlake:r(49)}},function(e,t,r){"use strict";(function(n,i){var s;!function(){var o="input is invalid type",a="object"==typeof window,u=a?window:{};u.JS_SHA3_NO_WINDOW&&(a=!1);var h=!a&&"object"==typeof self;!u.JS_SHA3_NO_NODE_JS&&"object"==typeof n&&n.versions&&n.versions.node?u=i:h&&(u=self);var f=!u.JS_SHA3_NO_COMMON_JS&&"object"==typeof e&&e.exports,c=r(44),l=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,b="0123456789abcdef".split(""),k=[4,1024,262144,67108864],p=[0,8,16,24],S=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],m=[224,256,384,512],d=[128,256],g=["hex","buffer","arrayBuffer","array","digest"],_={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!l||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var E=function(e,t,r){return function(n){return new P(e,t,e).update(n)[r]()}},x=function(e,t,r){return function(n,i){return new P(e,t,i).update(n)[r]()}},y=function(e,t,r){return function(t,n,i,s){return v["cshake"+e].update(t,n,i,s)[r]()}},w=function(e,t,r){return function(t,n,i,s){return v["kmac"+e].update(t,n,i,s)[r]()}},I=function(e,t,r,n){for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function C(e,t,r){P.call(this,e,t,r)}P.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||l&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}for(var n,i,s=this.blocks,a=this.byteCount,u=e.length,h=this.blockCount,f=0,c=this.s;f>2]|=e[f]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(s[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=a){for(this.start=n-a,this.block=s[h],n=0;n>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},P.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||l&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}var n=0,i=e.length;if(t)n=i;else for(var s=0;s=57344?n+=3:(a=65536+((1023&a)<<10|1023&e.charCodeAt(++s)),n+=4)}return n+=this.encode(8*n),this.update(e),n},P.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+b[15&e]+b[e>>12&15]+b[e>>8&15]+b[e>>20&15]+b[e>>16&15]+b[e>>28&15]+b[e>>24&15];o%t==0&&(F(r),s=0)}return i&&(e=r[s],a+=b[e>>4&15]+b[15&e],i>1&&(a+=b[e>>12&15]+b[e>>8&15]),i>2&&(a+=b[e>>20&15]+b[e>>16&15])),a},P.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,s=0,o=0,a=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(a);for(var u=new Uint32Array(e);o>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;a%r==0&&F(n)}return s&&(e=a<<2,t=n[o],u[e]=255&t,s>1&&(u[e+1]=t>>8&255),s>2&&(u[e+2]=t>>16&255)),u},C.prototype=new P,C.prototype.finalize=function(){return this.encode(this.outputBits,!0),P.prototype.finalize.call(this)};var F=function(e){var t,r,n,i,s,o,a,u,h,f,c,l,b,k,p,m,d,g,_,E,x,y,w,I,N,A,v,B,T,K,O,U,R,L,P,C,F,D,M,j,H,z,Y,G,V,W,q,X,J,Z,$,Q,ee,te,re,ne,ie,se,oe,ae,ue,he,fe;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],s=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],h=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],c=e[7]^e[17]^e[27]^e[37]^e[47],t=(l=e[8]^e[18]^e[28]^e[38]^e[48])^(o<<1|a>>>31),r=(b=e[9]^e[19]^e[29]^e[39]^e[49])^(a<<1|o>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|h>>>31),r=s^(h<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=o^(f<<1|c>>>31),r=a^(c<<1|f>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(l<<1|b>>>31),r=h^(b<<1|l>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=f^(i<<1|s>>>31),r=c^(s<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,k=e[0],p=e[1],W=e[11]<<4|e[10]>>>28,q=e[10]<<4|e[11]>>>28,B=e[20]<<3|e[21]>>>29,T=e[21]<<3|e[20]>>>29,ae=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,z=e[40]<<18|e[41]>>>14,Y=e[41]<<18|e[40]>>>14,L=e[2]<<1|e[3]>>>31,P=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,d=e[12]<<12|e[13]>>>20,X=e[22]<<10|e[23]>>>22,J=e[23]<<10|e[22]>>>22,K=e[33]<<13|e[32]>>>19,O=e[32]<<13|e[33]>>>19,he=e[42]<<2|e[43]>>>30,fe=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,C=e[14]<<6|e[15]>>>26,F=e[15]<<6|e[14]>>>26,g=e[25]<<11|e[24]>>>21,_=e[24]<<11|e[25]>>>21,Z=e[34]<<15|e[35]>>>17,$=e[35]<<15|e[34]>>>17,U=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,I=e[6]<<28|e[7]>>>4,N=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,D=e[26]<<25|e[27]>>>7,M=e[27]<<25|e[26]>>>7,E=e[36]<<21|e[37]>>>11,x=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,G=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,A=e[18]<<20|e[19]>>>12,v=e[19]<<20|e[18]>>>12,se=e[29]<<7|e[28]>>>25,oe=e[28]<<7|e[29]>>>25,j=e[38]<<8|e[39]>>>24,H=e[39]<<8|e[38]>>>24,y=e[48]<<14|e[49]>>>18,w=e[49]<<14|e[48]>>>18,e[0]=k^~m&g,e[1]=p^~d&_,e[10]=I^~A&B,e[11]=N^~v&T,e[20]=L^~C&D,e[21]=P^~F&M,e[30]=G^~W&X,e[31]=V^~q&J,e[40]=te^~ne&se,e[41]=re^~ie&oe,e[2]=m^~g&E,e[3]=d^~_&x,e[12]=A^~B&K,e[13]=v^~T&O,e[22]=C^~D&j,e[23]=F^~M&H,e[32]=W^~X&Z,e[33]=q^~J&$,e[42]=ne^~se&ae,e[43]=ie^~oe&ue,e[4]=g^~E&y,e[5]=_^~x&w,e[14]=B^~K&U,e[15]=T^~O&R,e[24]=D^~j&z,e[25]=M^~H&Y,e[34]=X^~Z&Q,e[35]=J^~$&ee,e[44]=se^~ae&he,e[45]=oe^~ue&fe,e[6]=E^~y&k,e[7]=x^~w&p,e[16]=K^~U&I,e[17]=O^~R&N,e[26]=j^~z&L,e[27]=H^~Y&P,e[36]=Z^~Q&G,e[37]=$^~ee&V,e[46]=ae^~he&te,e[47]=ue^~fe&re,e[8]=y^~k&m,e[9]=w^~p&d,e[18]=U^~I&A,e[19]=R^~N&v,e[28]=z^~L&C,e[29]=Y^~P&F,e[38]=Q^~G&W,e[39]=ee^~V&q,e[48]=he^~te&ne,e[49]=fe^~re&ie,e[0]^=S[n],e[1]^=S[n+1]};if(f)e.exports=v;else{for(T=0;T1)for(var r=1;r255)return!1;return!0}function o(e,t){return(65535&e)*t+(((e>>>16)*t&65535)<<16)}function a(e,t){return e<>>32-t}function u(e){return e=o(e^=e>>>16,2246822507),e=o(e^=e>>>13,3266489909),e^=e>>>16}function h(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var r=[0,0,0,0];return r[3]+=e[3]+t[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]+t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]+t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]+t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function f(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var r=[0,0,0,0];return r[3]+=e[3]*t[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]*t[3],r[1]+=r[2]>>>16,r[2]&=65535,r[2]+=e[3]*t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]*t[3],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[2]*t[2],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[3]*t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function c(e,t){return 32===(t%=64)?[e[1],e[0]]:t<32?[e[0]<>>32-t,e[1]<>>32-t]:(t-=32,[e[1]<>>32-t,e[0]<>>32-t])}function l(e,t){return 0===(t%=64)?e:t<32?[e[0]<>>32-t,e[1]<>>1]),e=b(e=f(e,[4283543511,3981806797]),[0,e[0]>>>1]),e=b(e=f(e,[3301882366,444984403]),[0,e[0]>>>1])}i.x86.hash32=function(e,t){if(!i.inputValidation||s(e)){t=t||0;for(var r=e.length%4,n=e.length-r,h=t,f=0,c=3432918353,l=461845907,b=0;b>>0}},i.x86.hash128=function(e,t){if(!i.inputValidation||s(e)){t=t||0;for(var r=e.length%16,n=e.length-r,h=t,f=t,c=t,l=t,b=0,k=0,p=0,S=0,m=597399067,d=2869860233,g=951274213,_=2716044179,E=0;E>>0).toString(16)).slice(-8)+("00000000"+(f>>>0).toString(16)).slice(-8)+("00000000"+(c>>>0).toString(16)).slice(-8)+("00000000"+(l>>>0).toString(16)).slice(-8)}},i.x64.hash128=function(e,t){if(!i.inputValidation||s(e)){t=t||0;for(var r=e.length%16,n=e.length-r,o=[0,t],a=[0,t],u=[0,0],p=[0,0],S=[2277735313,289559509],m=[1291169091,658871167],d=0;d>>0).toString(16)).slice(-8)+("00000000"+(o[1]>>>0).toString(16)).slice(-8)+("00000000"+(a[0]>>>0).toString(16)).slice(-8)+("00000000"+(a[1]>>>0).toString(16)).slice(-8)}},e.exports&&(t=e.exports=i),t.murmurHash3=i}()},function(e,t,r){"use strict";const{Buffer:n}=r(0),i=self.crypto||self.msCrypto;e.exports=e=>{if("undefined"==typeof self||!self.crypto&&!self.msCrypto)throw new Error("Please use a browser with webcrypto support and ensure the code has been delivered securely via HTTPS/TLS and run within a Secure Context");return async t=>{switch(e){case"sha1":return n.from(await i.subtle.digest({name:"SHA-1"},t));case"sha2-256":return n.from(await i.subtle.digest({name:"SHA-256"},t));case"sha2-512":return n.from(await i.subtle.digest({name:"SHA-512"},t));case"dbl-sha2-256":{const e=await i.subtle.digest({name:"SHA-256"},t);return n.from(await i.subtle.digest({name:"SHA-256"},e))}default:throw new Error("".concat(e," is not a supported algorithm"))}}}},function(e,t,r){"use strict";const{Buffer:n}=r(0);e.exports={fromNumberTo32BitBuf:e=>{const t=new Array(4);for(let r=0;r<4;r++)t[r]=255&e,e>>=8;return n.from(t)}}},function(e,t,r){"use strict";const{Buffer:n}=r(0),i=r(50),s={init:i.blake2bInit,update:i.blake2bUpdate,digest:i.blake2bFinal},o={init:i.blake2sInit,update:i.blake2sUpdate,digest:i.blake2sFinal},a=(e,t)=>async r=>{const i=t.init(e,null);return t.update(i,r),n.from(t.digest(i))};e.exports=e=>{for(let t=0;t<64;t++)e[45569+t]=a(t+1,s);for(let t=0;t<32;t++)e[45633+t]=a(t+1,o)}},function(e,t,r){"use strict";var n=r(51),i=r(52);e.exports={blake2b:n.blake2b,blake2bHex:n.blake2bHex,blake2bInit:n.blake2bInit,blake2bUpdate:n.blake2bUpdate,blake2bFinal:n.blake2bFinal,blake2s:i.blake2s,blake2sHex:i.blake2sHex,blake2sInit:i.blake2sInit,blake2sUpdate:i.blake2sUpdate,blake2sFinal:i.blake2sFinal}},function(e,t,r){"use strict";var n=r(18);function i(e,t,r){var n=e[t]+e[r],i=e[t+1]+e[r+1];n>=4294967296&&i++,e[t]=n,e[t+1]=i}function s(e,t,r,n){var i=e[t]+r;r<0&&(i+=4294967296);var s=e[t+1]+n;i>=4294967296&&s++,e[t]=i,e[t+1]=s}function o(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function a(e,t,r,n,o,a){var u=c[o],h=c[o+1],l=c[a],b=c[a+1];i(f,e,t),s(f,e,u,h);var k=f[n]^f[e],p=f[n+1]^f[e+1];f[n]=p,f[n+1]=k,i(f,r,n),k=f[t]^f[r],p=f[t+1]^f[r+1],f[t]=k>>>24^p<<8,f[t+1]=p>>>24^k<<8,i(f,e,t),s(f,e,l,b),k=f[n]^f[e],p=f[n+1]^f[e+1],f[n]=k>>>16^p<<16,f[n+1]=p>>>16^k<<16,i(f,r,n),k=f[t]^f[r],p=f[t+1]^f[r+1],f[t]=p>>>31^k<<1,f[t+1]=k>>>31^p<<1}var u=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),h=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map(function(e){return 2*e})),f=new Uint32Array(32),c=new Uint32Array(32);function l(e,t){var r=0;for(r=0;r<16;r++)f[r]=e.h[r],f[r+16]=u[r];for(f[24]=f[24]^e.t,f[25]=f[25]^e.t/4294967296,t&&(f[28]=~f[28],f[29]=~f[29]),r=0;r<32;r++)c[r]=o(e.b,4*r);for(r=0;r<12;r++)a(0,8,16,24,h[16*r+0],h[16*r+1]),a(2,10,18,26,h[16*r+2],h[16*r+3]),a(4,12,20,28,h[16*r+4],h[16*r+5]),a(6,14,22,30,h[16*r+6],h[16*r+7]),a(0,10,20,30,h[16*r+8],h[16*r+9]),a(2,12,22,24,h[16*r+10],h[16*r+11]),a(4,14,16,26,h[16*r+12],h[16*r+13]),a(6,8,18,28,h[16*r+14],h[16*r+15]);for(r=0;r<16;r++)e.h[r]=e.h[r]^f[r]^f[r+16]}function b(e,t){if(0===e||e>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(t&&t.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");for(var r={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e},n=0;n<16;n++)r.h[n]=u[n];var i=t?t.length:0;return r.h[0]^=16842752^i<<8^e,t&&(k(r,t),r.c=128),r}function k(e,t){for(var r=0;r>2]>>8*(3&r);return t}function S(e,t,r){r=r||64,e=n.normalizeInput(e);var i=b(r,t);return k(i,e),p(i)}e.exports={blake2b:S,blake2bHex:function(e,t,r){var i=S(e,t,r);return n.toHex(i)},blake2bInit:b,blake2bUpdate:k,blake2bFinal:p}},function(e,t,r){"use strict";var n=r(18);function i(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function s(e,t,r,n,i,s){h[e]=h[e]+h[t]+i,h[n]=o(h[n]^h[e],16),h[r]=h[r]+h[n],h[t]=o(h[t]^h[r],12),h[e]=h[e]+h[t]+s,h[n]=o(h[n]^h[e],8),h[r]=h[r]+h[n],h[t]=o(h[t]^h[r],7)}function o(e,t){return e>>>t^e<<32-t}var a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),h=new Uint32Array(16),f=new Uint32Array(16);function c(e,t){var r=0;for(r=0;r<8;r++)h[r]=e.h[r],h[r+8]=a[r];for(h[12]^=e.t,h[13]^=e.t/4294967296,t&&(h[14]=~h[14]),r=0;r<16;r++)f[r]=i(e.b,4*r);for(r=0;r<10;r++)s(0,4,8,12,f[u[16*r+0]],f[u[16*r+1]]),s(1,5,9,13,f[u[16*r+2]],f[u[16*r+3]]),s(2,6,10,14,f[u[16*r+4]],f[u[16*r+5]]),s(3,7,11,15,f[u[16*r+6]],f[u[16*r+7]]),s(0,5,10,15,f[u[16*r+8]],f[u[16*r+9]]),s(1,6,11,12,f[u[16*r+10]],f[u[16*r+11]]),s(2,7,8,13,f[u[16*r+12]],f[u[16*r+13]]),s(3,4,9,14,f[u[16*r+14]],f[u[16*r+15]]);for(r=0;r<8;r++)e.h[r]^=h[r]^h[r+8]}function l(e,t){if(!(e>0&&e<=32))throw new Error("Incorrect output length, should be in [1, 32]");var r=t?t.length:0;if(t&&!(r>0&&r<=32))throw new Error("Incorrect key length, should be in [1, 32]");var n={h:new Uint32Array(a),b:new Uint32Array(64),c:0,t:0,outlen:e};return n.h[0]^=16842752^r<<8^e,r>0&&(b(n,t),n.c=64),n}function b(e,t){for(var r=0;r>2]>>8*(3&r)&255;return t}function p(e,t,r){r=r||32,e=n.normalizeInput(e);var i=l(r,t);return b(i,e),k(i)}e.exports={blake2s:p,blake2sHex:function(e,t,r){var i=p(e,t,r);return n.toHex(i)},blake2sInit:l,blake2sUpdate:b,blake2sFinal:k}},function(e,t,r){"use strict";(function(n){const i=r(54);(t=e.exports=o).encode=function(e,t){const r=a(e);return o(r.name,n.from(r.encode(t)))},t.decode=function(e){n.isBuffer(e)&&(e=e.toString());const t=e.substring(0,1);"string"==typeof(e=e.substring(1,e.length))&&(e=n.from(e));const r=a(t);return n.from(r.decode(e.toString()))},t.isEncoded=function(e){n.isBuffer(e)&&(e=e.toString());if("[object String]"!==Object.prototype.toString.call(e))return!1;const t=e.substring(0,1);try{const e=a(t);return e.name}catch(r){return!1}},t.names=Object.freeze(Object.keys(i.names)),t.codes=Object.freeze(Object.keys(i.codes));const s=new Error("Unsupported encoding");function o(e,t){if(!t)throw new Error("requires an encoded buffer");const r=a(e),i=n.from(r.code);return function(e,t){a(e).decode(t.toString())}(r.name,t),n.concat([i,t])}function a(e){let t;if(i.names[e])t=i.names[e];else{if(!i.codes[e])throw s;t=i.codes[e]}if(!t.isImplemented())throw new Error("Base "+e+" is not implemented yet");return t}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(55),i=r(17),s=r(56),o=r(57),a=r(58),u=[["base1","1","","1"],["base2","0",i,"01"],["base8","7",i,"01234567"],["base10","9",i,"0123456789"],["base16","f",s,"0123456789abcdef"],["base32","b",o,"abcdefghijklmnopqrstuvwxyz234567"],["base32pad","c",o,"abcdefghijklmnopqrstuvwxyz234567="],["base32hex","v",o,"0123456789abcdefghijklmnopqrstuv"],["base32hexpad","t",o,"0123456789abcdefghijklmnopqrstuv="],["base32z","h",o,"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=u.reduce((e,t)=>(e[t[0]]=new n(t[0],t[1],t[2],t[3]),e),{}),f=u.reduce((e,t)=>(e[t[1]]=h[t[0]],e),{});e.exports={names:h,codes:f}},function(e,t,r){"use strict";e.exports=class{constructor(e,t,r,n){this.name=e,this.code=t,this.alphabet=n,r&&n&&(this.engine=r(n))}encode(e){return this.engine.encode(e)}decode(e){return this.engine.decode(e)}isImplemented(){return this.engine}}},function(e,t,r){"use strict";(function(t){e.exports=function(e){return{encode:e=>"string"==typeof e?t.from(e).toString("hex"):e.toString("hex"),decode(r){for(let t of r)if(e.indexOf(t)<0)throw new Error("invalid base16 character");return t.from(r,"hex")}}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){function r(e,t){let r=e.byteLength,n=new Uint8Array(e),i=t.indexOf("=")===t.length-1;i&&(t=t.substring(0,t.length-2));let s=0,o=0,a="";for(let u=0;u=5;)a+=t[o>>>s-5&31],s-=5;if(s>0&&(a+=t[o<<5-s&31]),i)for(;a.length%8!=0;)a+="=";return a}e.exports=function(e){return{encode:n=>r("string"==typeof n?t.from(n):n,e),decode(t){for(let r of t)if(e.indexOf(r)<0)throw new Error("invalid base32 character");return function(e,t){let r=(e=e.replace(new RegExp("=","g"),"")).length,n=0,i=0,s=0,o=new Uint8Array(5*r/8|0);for(let a=0;a=8&&(o[s++]=i>>>n-8&255,n-=8);return o.buffer}(t,e)}}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){e.exports=function(e){const r=e.indexOf("=")>-1,n=e.indexOf("-")>-1&&e.indexOf("_")>-1;return{encode(e){let i="";i="string"==typeof e?t.from(e).toString("base64"):e.toString("base64"),n&&(i=i.replace(/\+/g,"-").replace(/\//g,"_"));const s=i.indexOf("=");return s>0&&!r&&(i=i.substring(0,s)),i},decode(r){for(let t of r)if(e.indexOf(t)<0)throw new Error("invalid base64 character");return t.from(r,"base64")}}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(7);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(0===e.version){if("dag-pb"!==e.codec)return"codec must be 'dag-pb' for CIDv0";if("base58btc"!==e.multibaseName)return"multibaseName must be 'base58btc' for CIDv0"}if(!t.isBuffer(e.multihash))return"multihash must be a Buffer";try{n.validate(e.multihash)}catch(r){let e=r.message;return e||(e="Multihash validation failed"),e}}};e.exports=i}).call(this,r(0).Buffer)},function(e,t,r){"use strict";e.exports=function(e,t){let{className:r,symbolName:n}=t;const i=Symbol.for(n),s={[r]:class extends e{constructor(){super(...arguments),Object.defineProperty(this,i,{value:!0})}get[Symbol.toStringTag](){return r}}}[r];return s["is".concat(r)]=e=>!(!e||!e[i]),s},e.exports.proto=function(e,t){let{className:r,symbolName:n,withoutNew:i}=t;const s=Symbol.for(n),o={[r]:function(){for(var t=arguments.length,r=new Array(t),n=0;nr}),o["is".concat(r)]=e=>!(!e||!e[s]),o}},function(e,t,r){"use strict";var n=r(62);e.exports=function(e){if(!(e instanceof Object))throw new TypeError('"obj" must be an object (or inherit from it)');return function e(t,r){r=new n(t,r);for(var i in t){var s=t[i];if(s instanceof Object&&(r.contains(s)||e(s,r)))return!0}return!1}(e)}},function(e,t,r){"use strict";function n(e,t){this.value=e,this.next=t}e.exports=n,n.prototype.contains=function(e){for(var t=this;t;){if(t.value===e)return!0;t=t.next}return!1}},function(e,t,r){"use strict";const n=r(19),{Buffer:i}=r(0),s=r(8);t.resolve=(e,t)=>{let r=s.deserialize(e);const i=t.split("/").filter(Boolean);for(;i.length;){const e=i.shift();if(void 0===r[e])throw new Error("Object has no property '".concat(e,"'"));if(r=r[e],n.isCID(r))return{value:r,remainderPath:i.join("/")}}return{value:r,remainderPath:""}};t.tree=function*(e){const t=s.deserialize(e);yield*function*e(t,r){if(!i.isBuffer(t)&&!n.isCID(t)&&"string"!=typeof t&&null!==t)for(const n of Object.keys(t)){const i=void 0===r?n:r+"/"+n;yield i,yield*e(t[n],i)}}(t)}}])}); //# sourceMappingURL=index.min.js.map