diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..1ad23b8 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,30 @@ +language: node_js +cache: npm +stages: + - check + - test + - cov + +node_js: + - '10' + +os: + - linux + - osx + +script: npx nyc -s npm run test:node -- --bail +after_success: npx nyc report --reporter=text-lcov > coverage.lcov && npx codecov + +jobs: + include: + - os: windows + cache: false + + - stage: check + script: + - npx aegir commitlint --travis + - npx aegir dep-check + - npm run lint + +notifications: + email: false diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile deleted file mode 100644 index a7da2e5..0000000 --- a/ci/Jenkinsfile +++ /dev/null @@ -1,2 +0,0 @@ -// Warning: This file is automatically synced from https://github.com/ipfs/ci-sync so if you want to change it, please change it there and ask someone to sync all repositories. -javascript() diff --git a/example/public/bundle.js b/example/public/bundle.js index 892bb16..235ed03 100644 --- a/example/public/bundle.js +++ b/example/public/bundle.js @@ -1,18 +1,24 @@ -!function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1994)}([function(t,e,r){"use strict";(function(t){ +!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}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=1273)}([function(e,t,r){"use strict";(function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ -var n=r(402),i=r(403),o=r(216);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return j(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(t).length;default:if(n)return j(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function g(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:m(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var f=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){for(var l=!0,h=0;hi&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function k(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function C(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(t){var e=t.length;if(e<=A)return String.fromCharCode.apply(String,t);var r="",n=0;for(;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,r);case"utf8":case"utf-8":return C(this,e,r);case"ascii":return T(this,e,r);case"latin1":case"binary":return B(this,e,r);case"base64":return k(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),c=this.slice(n,i),f=t.slice(e,r),l=0;li)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return _(this,t,e,r);case"latin1":case"binary":return S(this,t,e,r);case"base64":return w(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function T(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function N(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function P(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function L(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(t,e,r,n,o){return o||L(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function O(t,e,r,n,o){return o||L(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||x(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||x(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||x(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||x(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||x(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||x(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||x(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||x(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||x(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||x(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||x(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||x(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||x(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||x(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||x(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||x(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||R(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):P(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);R(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);R(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):P(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return D(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return D(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return O(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return O(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function F(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(U,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function V(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(12))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(387);Object.defineProperty(e,"caller",{enumerable:!0,get:function(){return o(n).default}}),Object.defineProperty(e,"call",{enumerable:!0,get:function(){return n.call}});var i=r(396);function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"expose",{enumerable:!0,get:function(){return o(i).default}})},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(397);Object.defineProperty(e,"pre",{enumerable:!0,get:function(){return o(n).default}});var i=r(398);function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"post",{enumerable:!0,get:function(){return o(i).default}})},function(t,e,r){var n=r(0),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){t.exports={encode:r(404),decode:r(405),encodingLength:r(406)}},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var u,c=[],f=!1,l=-1;function h(){f&&u&&(f=!1,u.length?c=u.concat(c):l=-1,c.length&&p())}function p(){if(!f){var t=a(h);f=!0;for(var e=c.length;e;){for(u=c,c=[];++l1)for(var r=1;r15?(i=Date.now(),u(t)):(r.push(t),1===r.length&&s.setAttribute("a",o=!o))}}a.nextTick=a.setImmediate}(),a.isNodejs=void 0!==e&&e.versions&&e.versions.node,a.isArray=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},a.isArrayBuffer=function(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer},a.isArrayBufferView=function(t){return t&&a.isArrayBuffer(t.buffer)&&void 0!==t.byteLength},a.ByteBuffer=c,a.ByteStringBuffer=c;a.ByteStringBuffer.prototype._optimizeConstructedString=function(t){this._constructedStringLength+=t,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},a.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},a.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},a.ByteStringBuffer.prototype.putByte=function(t){return this.putBytes(String.fromCharCode(t))},a.ByteStringBuffer.prototype.fillWithByte=function(t,e){t=String.fromCharCode(t);for(var r=this.data;e>0;)1&e&&(r+=t),(e>>>=1)>0&&(t+=t);return this.data=r,this._optimizeConstructedString(e),this},a.ByteStringBuffer.prototype.putBytes=function(t){return this.data+=t,this._optimizeConstructedString(t.length),this},a.ByteStringBuffer.prototype.putString=function(t){return this.putBytes(a.encodeUtf8(t))},a.ByteStringBuffer.prototype.putInt16=function(t){return this.putBytes(String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},a.ByteStringBuffer.prototype.putInt24=function(t){return this.putBytes(String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},a.ByteStringBuffer.prototype.putInt32=function(t){return this.putBytes(String.fromCharCode(t>>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},a.ByteStringBuffer.prototype.putInt16Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255))},a.ByteStringBuffer.prototype.putInt24Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255)+String.fromCharCode(t>>16&255))},a.ByteStringBuffer.prototype.putInt32Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>24&255))},a.ByteStringBuffer.prototype.putInt=function(t,e){u(e);var r="";do{e-=8,r+=String.fromCharCode(t>>e&255)}while(e>0);return this.putBytes(r)},a.ByteStringBuffer.prototype.putSignedInt=function(t,e){return t<0&&(t+=2<0);return e},a.ByteStringBuffer.prototype.getSignedInt=function(t){var e=this.getInt(t),r=2<=r&&(e-=r<<1),e},a.ByteStringBuffer.prototype.getBytes=function(t){var e;return t?(t=Math.min(this.length(),t),e=this.data.slice(this.read,this.read+t),this.read+=t):0===t?e="":(e=0===this.read?this.data:this.data.slice(this.read),this.clear()),e},a.ByteStringBuffer.prototype.bytes=function(t){return void 0===t?this.data.slice(this.read):this.data.slice(this.read,this.read+t)},a.ByteStringBuffer.prototype.at=function(t){return this.data.charCodeAt(this.read+t)},a.ByteStringBuffer.prototype.setAt=function(t,e){return this.data=this.data.substr(0,this.read+t)+String.fromCharCode(e)+this.data.substr(this.read+t+1),this},a.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},a.ByteStringBuffer.prototype.copy=function(){var t=a.createBuffer(this.data);return t.read=this.read,t},a.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},a.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},a.ByteStringBuffer.prototype.truncate=function(t){var e=Math.max(0,this.length()-t);return this.data=this.data.substr(this.read,e),this.read=0,this},a.ByteStringBuffer.prototype.toHex=function(){for(var t="",e=this.read;e=t)return this;e=Math.max(e||this.growSize,t);var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+e);return n.set(r),this.data=new DataView(n.buffer),this},a.DataBuffer.prototype.putByte=function(t){return this.accommodate(1),this.data.setUint8(this.write++,t),this},a.DataBuffer.prototype.fillWithByte=function(t,e){this.accommodate(e);for(var r=0;r>8&65535),this.data.setInt8(this.write,t>>16&255),this.write+=3,this},a.DataBuffer.prototype.putInt32=function(t){return this.accommodate(4),this.data.setInt32(this.write,t),this.write+=4,this},a.DataBuffer.prototype.putInt16Le=function(t){return this.accommodate(2),this.data.setInt16(this.write,t,!0),this.write+=2,this},a.DataBuffer.prototype.putInt24Le=function(t){return this.accommodate(3),this.data.setInt8(this.write,t>>16&255),this.data.setInt16(this.write,t>>8&65535,!0),this.write+=3,this},a.DataBuffer.prototype.putInt32Le=function(t){return this.accommodate(4),this.data.setInt32(this.write,t,!0),this.write+=4,this},a.DataBuffer.prototype.putInt=function(t,e){u(e),this.accommodate(e/8);do{e-=8,this.data.setInt8(this.write++,t>>e&255)}while(e>0);return this},a.DataBuffer.prototype.putSignedInt=function(t,e){return u(e),this.accommodate(e/8),t<0&&(t+=2<0);return e},a.DataBuffer.prototype.getSignedInt=function(t){var e=this.getInt(t),r=2<=r&&(e-=r<<1),e},a.DataBuffer.prototype.getBytes=function(t){var e;return t?(t=Math.min(this.length(),t),e=this.data.slice(this.read,this.read+t),this.read+=t):0===t?e="":(e=0===this.read?this.data:this.data.slice(this.read),this.clear()),e},a.DataBuffer.prototype.bytes=function(t){return void 0===t?this.data.slice(this.read):this.data.slice(this.read,this.read+t)},a.DataBuffer.prototype.at=function(t){return this.data.getUint8(this.read+t)},a.DataBuffer.prototype.setAt=function(t,e){return this.data.setUint8(t,e),this},a.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},a.DataBuffer.prototype.copy=function(){return new a.DataBuffer(this)},a.DataBuffer.prototype.compact=function(){if(this.read>0){var t=new Uint8Array(this.data.buffer,this.read),e=new Uint8Array(t.byteLength);e.set(t),this.data=new DataView(e),this.write-=this.read,this.read=0}return this},a.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},a.DataBuffer.prototype.truncate=function(t){return this.write=Math.max(0,this.length()-t),this.read=Math.min(this.read,this.write),this},a.DataBuffer.prototype.toHex=function(){for(var t="",e=this.read;e0;)1&e&&(r+=t),(e>>>=1)>0&&(t+=t);return r},a.xorBytes=function(t,e,r){for(var n="",i="",o="",s=0,a=0;r>0;--r,++s)i=t.charCodeAt(s)^e.charCodeAt(s),a>=10&&(n+=o,o="",a=0),o+=String.fromCharCode(i),++a;return n+=o},a.hexToBytes=function(t){var e="",r=0;for(!0&t.length&&(r=1,e+=String.fromCharCode(parseInt(t[0],16)));r>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t)};var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],h="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";a.encode64=function(t,e){for(var r,n,i,o="",s="",a=0;a>2),o+=f.charAt((3&r)<<4|n>>4),isNaN(n)?o+="==":(o+=f.charAt((15&n)<<2|i>>6),o+=isNaN(i)?"=":f.charAt(63&i)),e&&o.length>e&&(s+=o.substr(0,e)+"\r\n",o=o.substr(e));return s+=o},a.decode64=function(t){t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var e,r,n,i,o="",s=0;s>4),64!==n&&(o+=String.fromCharCode((15&r)<<4|n>>2),64!==i&&(o+=String.fromCharCode((3&n)<<6|i)));return o},a.encodeUtf8=function(t){return unescape(encodeURIComponent(t))},a.decodeUtf8=function(t){return decodeURIComponent(escape(t))},a.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:s.encode,decode:s.decode}},a.binary.raw.encode=function(t){return String.fromCharCode.apply(null,t)},a.binary.raw.decode=function(t,e,r){var n=e;n||(n=new Uint8Array(t.length));for(var i=r=r||0,o=0;o>2),o+=f.charAt((3&r)<<4|n>>4),isNaN(n)?o+="==":(o+=f.charAt((15&n)<<2|i>>6),o+=isNaN(i)?"=":f.charAt(63&i)),e&&o.length>e&&(s+=o.substr(0,e)+"\r\n",o=o.substr(e));return s+=o},a.binary.base64.decode=function(t,e,r){var n,i,o,s,a=e;a||(a=new Uint8Array(3*Math.ceil(t.length/4))),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var u=0,c=r=r||0;u>4,64!==o&&(a[c++]=(15&i)<<4|o>>2,64!==s&&(a[c++]=(3&o)<<6|s));return e?c-r:a.subarray(0,c)},a.binary.base58.encode=function(t,e){return a.binary.baseN.encode(t,h,e)},a.binary.base58.decode=function(t,e){return a.binary.baseN.decode(t,h,e)},a.text={utf8:{},utf16:{}},a.text.utf8.encode=function(t,e,r){t=a.encodeUtf8(t);var n=e;n||(n=new Uint8Array(t.length));for(var i=r=r||0,o=0;o0?(i=r[n].substring(0,s),o=r[n].substring(s+1)):(i=r[n],o=null),i in e||(e[i]=[]),i in Object.prototype||null===o||e[i].push(unescape(o))}return e};return void 0===t?(null===_&&(_="undefined"!=typeof window&&window.location&&window.location.search?r(window.location.search.substring(1)):{}),e=_):e=r(t),e},a.parseFragment=function(t){var e=t,r="",n=t.indexOf("?");n>0&&(e=t.substring(0,n),r=t.substring(n+1));var i=e.split("/");return i.length>0&&""===i[0]&&i.shift(),{pathString:e,queryString:r,path:i,query:""===r?{}:a.getQueryVariables(r)}},a.makeRequest=function(t){var e=a.parseFragment(t),r={path:e.pathString,query:e.queryString,getPath:function(t){return void 0===t?e.path:e.path[t]},getQuery:function(t,r){var n;return void 0===t?n=e.query:(n=e.query[t])&&void 0!==r&&(n=n[r]),n},getQueryLast:function(t,e){var n=r.getQuery(t);return n?n[n.length-1]:e}};return r},a.makeLink=function(t,e,r){t=jQuery.isArray(t)?t.join("/"):t;var n=jQuery.param(e||{});return r=r||"",t+(n.length>0?"?"+n:"")+(r.length>0?"#"+r:"")},a.setPath=function(t,e,r){if("object"==typeof t&&null!==t)for(var n=0,i=e.length;n0&&o.push(r),s=n.lastIndex;var a=e[0][1];switch(a){case"s":case"o":i");break;case"%":o.push("%");break;default:o.push("<%"+a+"?>")}}return o.push(t.substring(s)),o.join("")},a.formatNumber=function(t,e,r,n){var i=t,o=isNaN(e=Math.abs(e))?2:e,s=void 0===r?",":r,a=void 0===n?".":n,u=i<0?"-":"",c=parseInt(i=Math.abs(+i||0).toFixed(o),10)+"",f=c.length>3?c.length%3:0;return u+(f?c.substr(0,f)+a:"")+c.substr(f).replace(/(\d{3})(?=\d)/g,"$1"+a)+(o?s+Math.abs(i-c).toFixed(o).slice(2):"")},a.formatSize=function(t){return t=t>=1073741824?a.formatNumber(t/1073741824,2,".","")+" GiB":t>=1048576?a.formatNumber(t/1048576,2,".","")+" MiB":t>=1024?a.formatNumber(t/1024,0)+" KiB":a.formatNumber(t,0)+" bytes"},a.bytesFromIP=function(t){return-1!==t.indexOf(".")?a.bytesFromIPv4(t):-1!==t.indexOf(":")?a.bytesFromIPv6(t):null},a.bytesFromIPv4=function(t){if(4!==(t=t.split(".")).length)return null;for(var e=a.createBuffer(),r=0;rr[n].end-r[n].start&&(n=r.length-1)):r.push({start:u,end:u})}e.push(o)}if(r.length>0){var c=r[n];c.end-c.start>0&&(e.splice(c.start,c.end-c.start+1,""),0===c.start&&e.unshift(""),7===c.end&&e.push(""))}return e.join(":")},a.estimateCores=function(t,e){if("function"==typeof t&&(e=t,t={}),t=t||{},"cores"in a&&!t.update)return e(null,a.cores);if("undefined"!=typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return a.cores=navigator.hardwareConcurrency,e(null,a.cores);if("undefined"==typeof Worker)return a.cores=1,e(null,a.cores);if("undefined"==typeof Blob)return a.cores=2,e(null,a.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(t){for(var e=Date.now(),r=e+4;Date.now()a.st&&i.sti.st&&a.st-1},Ct.prototype.set=function(t,e){var r=this.__data__,n=Mt(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},At.prototype.clear=function(){this.__data__={hash:new kt,map:new(lt||Ct),string:new kt}},At.prototype.delete=function(t){return Jt(this,t).delete(t)},At.prototype.get=function(t){return Jt(this,t).get(t)},At.prototype.has=function(t){return Jt(this,t).has(t)},At.prototype.set=function(t,e){return Jt(this,t).set(t,e),this},Tt.prototype.add=Tt.prototype.push=function(t){return this.__data__.set(t,o),this},Tt.prototype.has=function(t){return this.__data__.has(t)},Bt.prototype.clear=function(){this.__data__=new Ct},Bt.prototype.delete=function(t){return this.__data__.delete(t)},Bt.prototype.get=function(t){return this.__data__.get(t)},Bt.prototype.has=function(t){return this.__data__.has(t)},Bt.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Ct){var i=r.__data__;if(!lt||i.lengthc))return!1;var l=o.get(t);if(l&&o.get(e))return l==e;var h=-1,p=!0,d=i&s?new Tt:void 0;for(o.set(t,e),o.set(e,t);++h-1&&t%1==0&&t-1&&t%1==0&&t<=c}function ae(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function ue(t){return!!t&&"object"==typeof t}function ce(t){return"symbol"==typeof t||ue(t)&&nt.call(t)==E}var fe=F?function(t){return function(e){return t(e)}}(F):function(t){return ue(t)&&se(t.length)&&!!N[nt.call(t)]};function le(t){return ie(t)?It(t):jt(t)}function he(t){return t}r.exports=function(t,e){return(ne(t)?V:Ft)(t,Kt(e))}}).call(this,r(12),r(39)(t))},function(t,e,r){"use strict";(function(e){const n=r(24),i=r(147),o=r(412),s=r(148),a=r(414);class u{constructor(r,s,a){if(t.exports.isCID(r)){let t=r;return this.version=t.version,this.codec=t.codec,void(this.multihash=e.from(t.multihash))}if("string"==typeof r)if(i.isEncoded(r)){const t=i.decode(r);r=parseInt(t.slice(0,1).toString("hex"),16),s=o.getCodec(t.slice(1)),a=o.rmPrefix(t.slice(1))}else s="dag-pb",a=n.fromB58String(r),r=0;else if(e.isBuffer(r)){const t=r.slice(0,1),e=parseInt(t.toString("hex"),16);if(0===e||1===e){const t=r;r=e,s=o.getCodec(t.slice(1)),a=o.rmPrefix(t.slice(1))}else s="dag-pb",a=r,r=0}this.codec=s,this.version=r,this.multihash=a,u.validateCID(this)}get buffer(){switch(this.version){case 0:return this.multihash;case 1:return e.concat([e.from("01","hex"),o.getCodeVarint(this.codec),this.multihash]);default:throw new Error("unsupported version")}}get prefix(){return e.concat([e.from(`0${this.version}`,"hex"),o.getCodeVarint(this.codec),n.prefix(this.multihash)])}toV0(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");const{name:t,length:e}=n.decode(this.multihash);if("sha2-256"!==t)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==e)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new c(0,this.codec,this.multihash)}toV1(){return new c(1,this.codec,this.multihash)}toBaseEncodedString(t){switch(t=t||"base58btc",this.version){case 0:if("base58btc"!==t)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");return n.toB58String(this.multihash);case 1:return i.encode(t,this.buffer).toString();default:throw new Error("Unsupported version")}}toString(t){return this.toBaseEncodedString(t)}toJSON(){return{codec:this.codec,version:this.version,hash:this.multihash}}equals(t){return this.codec===t.codec&&this.version===t.version&&this.multihash.equals(t.multihash)}static validateCID(t){let e=a.checkCIDComponents(t);if(e)throw new Error(e)}}const c=r(26)(u,{className:"CID",symbolName:"@ipld/js-cid/CID"});c.codecs=s,t.exports=c}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.preArrayOfBufferFromJson=e.preArrayOfBufferToJson=e.preBufferToJson=e.preBufferFromJson=e.isBufferJson=e.isBuffer=e.bufferToJson=e.bufferFromJson=void 0;var n=r(129),i=e.bufferFromJson=function(e){return t.from(JSON.parse(e.data).data)},o=e.bufferToJson=function(t){return{__ipfsPostMsgProxyType:"Buffer",data:JSON.stringify(t)}},s=e.isBuffer=t.isBuffer,a=e.isBufferJson=function(t){return t&&"Buffer"===t.__ipfsPostMsgProxyType};e.preBufferFromJson=function(t){return function(){for(var e=arguments.length,r=Array(e),n=0;n=1&&"function"==typeof e[e.length-1]))return t.apply(r,arguments);var n=e.pop();t.apply(this,e).then(function(t){n.call(r,null,t)},function(t){n.call(r,t)})}}},function(t,e,r){"use strict";(function(e){var n=r(438),i=r(442);t.exports=function(t,r){if(r||(r={}),!t)throw new Error("Pass in a .proto string or a protobuf-schema parsed object");var o="object"!=typeof t||e.isBuffer(t)?n.parse(t):t,s=function(){var t=this;i(o,r.encodings||{}).forEach(function(e){t[e.name]=function(t){if(!t)return null;var e={};return Object.keys(t).forEach(function(r){e[r]=t[r].value}),e}(e.values)||e})};return s.prototype.toString=function(){return n.stringify(o)},s.prototype.toJSON=function(){return o},new s}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e){ +var n=r(328),i=r(329),o=r(172);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function d(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 F(e).length;default:if(n)return j(e).length;t=(""+t).toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(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:m(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):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){var o,s=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;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var f=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){for(var l=!0,h=0;hi&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function k(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function A(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(e){var t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);var r="",n=0;for(;nthis.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 I(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return B(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return k(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(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 o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(o,s),c=this.slice(n,i),f=e.slice(t,r),l=0;li)&&(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 o=!1;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return b(this,e,t,r);case"ascii":return _(this,e,t,r);case"latin1":case"binary":return E(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function B(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,r,n,i,o){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 L(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function R(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function P(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function K(e,t,r,n,o){return o||P(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function O(e,t,r,n,o){return o||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||M(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||M(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||M(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||M(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||M(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||M(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||M(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||M(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||M(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||M(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||M(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||M(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||M(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||M(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||M(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)||N(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||N(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||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||N(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):R(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||N(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):R(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);N(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o>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);N(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||N(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||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||N(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):R(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||N(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):R(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return K(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return K(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return O(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return O(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(o<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(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.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;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function F(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 V(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(12))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(312);Object.defineProperty(t,"caller",{enumerable:!0,get:function(){return o(n).default}}),Object.defineProperty(t,"call",{enumerable:!0,get:function(){return n.call}});var i=r(321);function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"expose",{enumerable:!0,get:function(){return o(i).default}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(322);Object.defineProperty(t,"pre",{enumerable:!0,get:function(){return o(n).default}});var i=r(323);function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"post",{enumerable:!0,get:function(){return o(i).default}})},function(e,t){e.exports={options:{usePureJavaScript:!1}}},function(e,t){var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var u,c=[],f=!1,l=-1;function h(){f&&u&&(f=!1,u.length?c=u.concat(c):l=-1,c.length&&p())}function p(){if(!f){var e=a(h);f=!0;for(var t=c.length;t;){for(u=c,c=[];++l1)for(var r=1;r15?(i=Date.now(),u(e)):(r.push(e),1===r.length&&s.setAttribute("a",o=!o))}}a.nextTick=a.setImmediate}(),a.isNodejs=void 0!==t&&t.versions&&t.versions.node,a.isArray=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},a.isArrayBuffer=function(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer},a.isArrayBufferView=function(e){return e&&a.isArrayBuffer(e.buffer)&&void 0!==e.byteLength},a.ByteBuffer=c,a.ByteStringBuffer=c;a.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},a.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},a.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},a.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))},a.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var r=this.data;t>0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e);return this.data=r,this._optimizeConstructedString(t),this},a.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this},a.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(a.encodeUtf8(e))},a.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},a.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},a.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},a.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255))},a.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))},a.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))},a.ByteStringBuffer.prototype.putInt=function(e,t){u(t);var r="";do{t-=8,r+=String.fromCharCode(e>>t&255)}while(t>0);return this.putBytes(r)},a.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<0);return t},a.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<=r&&(t-=r<<1),t},a.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},a.ByteStringBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},a.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)},a.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this},a.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},a.ByteStringBuffer.prototype.copy=function(){var e=a.createBuffer(this.data);return e.read=this.read,e},a.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},a.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},a.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this},a.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t=e)return this;t=Math.max(t||this.growSize,e);var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+t);return n.set(r),this.data=new DataView(n.buffer),this},a.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this},a.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var r=0;r>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this},a.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this},a.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this},a.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this},a.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this},a.DataBuffer.prototype.putInt=function(e,t){u(t),this.accommodate(t/8);do{t-=8,this.data.setInt8(this.write++,e>>t&255)}while(t>0);return this},a.DataBuffer.prototype.putSignedInt=function(e,t){return u(t),this.accommodate(t/8),e<0&&(e+=2<0);return t},a.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<=r&&(t-=r<<1),t},a.DataBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},a.DataBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},a.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)},a.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this},a.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},a.DataBuffer.prototype.copy=function(){return new a.DataBuffer(this)},a.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength);t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this},a.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},a.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this},a.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e);return r},a.xorBytes=function(e,t,r){for(var n="",i="",o="",s=0,a=0;r>0;--r,++s)i=e.charCodeAt(s)^t.charCodeAt(s),a>=10&&(n+=o,o="",a=0),o+=String.fromCharCode(i),++a;return n+=o},a.hexToBytes=function(e){var t="",r=0;for(!0&e.length&&(r=1,t+=String.fromCharCode(parseInt(e[0],16)));r>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e)};var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],h="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";a.encode64=function(e,t){for(var r,n,i,o="",s="",a=0;a>2),o+=f.charAt((3&r)<<4|n>>4),isNaN(n)?o+="==":(o+=f.charAt((15&n)<<2|i>>6),o+=isNaN(i)?"=":f.charAt(63&i)),t&&o.length>t&&(s+=o.substr(0,t)+"\r\n",o=o.substr(t));return s+=o},a.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var t,r,n,i,o="",s=0;s>4),64!==n&&(o+=String.fromCharCode((15&r)<<4|n>>2),64!==i&&(o+=String.fromCharCode((3&n)<<6|i)));return o},a.encodeUtf8=function(e){return unescape(encodeURIComponent(e))},a.decodeUtf8=function(e){return decodeURIComponent(escape(e))},a.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:s.encode,decode:s.decode}},a.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)},a.binary.raw.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(e.length));for(var i=r=r||0,o=0;o>2),o+=f.charAt((3&r)<<4|n>>4),isNaN(n)?o+="==":(o+=f.charAt((15&n)<<2|i>>6),o+=isNaN(i)?"=":f.charAt(63&i)),t&&o.length>t&&(s+=o.substr(0,t)+"\r\n",o=o.substr(t));return s+=o},a.binary.base64.decode=function(e,t,r){var n,i,o,s,a=t;a||(a=new Uint8Array(3*Math.ceil(e.length/4))),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var u=0,c=r=r||0;u>4,64!==o&&(a[c++]=(15&i)<<4|o>>2,64!==s&&(a[c++]=(3&o)<<6|s));return t?c-r:a.subarray(0,c)},a.binary.base58.encode=function(e,t){return a.binary.baseN.encode(e,h,t)},a.binary.base58.decode=function(e,t){return a.binary.baseN.decode(e,h,t)},a.text={utf8:{},utf16:{}},a.text.utf8.encode=function(e,t,r){e=a.encodeUtf8(e);var n=t;n||(n=new Uint8Array(e.length));for(var i=r=r||0,o=0;o0?(i=r[n].substring(0,s),o=r[n].substring(s+1)):(i=r[n],o=null),i in t||(t[i]=[]),i in Object.prototype||null===o||t[i].push(unescape(o))}return t};return void 0===e?(null===_&&(_="undefined"!=typeof window&&window.location&&window.location.search?r(window.location.search.substring(1)):{}),t=_):t=r(e),t},a.parseFragment=function(e){var t=e,r="",n=e.indexOf("?");n>0&&(t=e.substring(0,n),r=e.substring(n+1));var i=t.split("/");return i.length>0&&""===i[0]&&i.shift(),{pathString:t,queryString:r,path:i,query:""===r?{}:a.getQueryVariables(r)}},a.makeRequest=function(e){var t=a.parseFragment(e),r={path:t.pathString,query:t.queryString,getPath:function(e){return void 0===e?t.path:t.path[e]},getQuery:function(e,r){var n;return void 0===e?n=t.query:(n=t.query[e])&&void 0!==r&&(n=n[r]),n},getQueryLast:function(e,t){var n=r.getQuery(e);return n?n[n.length-1]:t}};return r},a.makeLink=function(e,t,r){e=jQuery.isArray(e)?e.join("/"):e;var n=jQuery.param(t||{});return r=r||"",e+(n.length>0?"?"+n:"")+(r.length>0?"#"+r:"")},a.setPath=function(e,t,r){if("object"==typeof e&&null!==e)for(var n=0,i=t.length;n0&&o.push(r),s=n.lastIndex;var a=t[0][1];switch(a){case"s":case"o":i");break;case"%":o.push("%");break;default:o.push("<%"+a+"?>")}}return o.push(e.substring(s)),o.join("")},a.formatNumber=function(e,t,r,n){var i=e,o=isNaN(t=Math.abs(t))?2:t,s=void 0===r?",":r,a=void 0===n?".":n,u=i<0?"-":"",c=parseInt(i=Math.abs(+i||0).toFixed(o),10)+"",f=c.length>3?c.length%3:0;return u+(f?c.substr(0,f)+a:"")+c.substr(f).replace(/(\d{3})(?=\d)/g,"$1"+a)+(o?s+Math.abs(i-c).toFixed(o).slice(2):"")},a.formatSize=function(e){return e=e>=1073741824?a.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?a.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?a.formatNumber(e/1024,0)+" KiB":a.formatNumber(e,0)+" bytes"},a.bytesFromIP=function(e){return-1!==e.indexOf(".")?a.bytesFromIPv4(e):-1!==e.indexOf(":")?a.bytesFromIPv6(e):null},a.bytesFromIPv4=function(e){if(4!==(e=e.split(".")).length)return null;for(var t=a.createBuffer(),r=0;rr[n].end-r[n].start&&(n=r.length-1)):r.push({start:u,end:u})}t.push(o)}if(r.length>0){var c=r[n];c.end-c.start>0&&(t.splice(c.start,c.end-c.start+1,""),0===c.start&&t.unshift(""),7===c.end&&t.push(""))}return t.join(":")},a.estimateCores=function(e,t){if("function"==typeof e&&(t=e,e={}),e=e||{},"cores"in a&&!e.update)return t(null,a.cores);if("undefined"!=typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return a.cores=navigator.hardwareConcurrency,t(null,a.cores);if("undefined"==typeof Worker)return a.cores=1,t(null,a.cores);if("undefined"==typeof Blob)return a.cores=2,t(null,a.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(e){for(var t=Date.now(),r=t+4;Date.now()a.st&&i.sti.st&&a.st=1&&"function"==typeof t[t.length-1]))return e.apply(r,arguments);var n=t.pop();e.apply(this,t).then(function(e){n.call(r,null,e)},function(e){n.call(r,e)})}}},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";(function(e){const n=r(27),i=r(330);t.names=i.names,t.codes=i.codes,t.defaultLengths=i.defaultLengths;const o=r(18);function s(e){t.decode(e)}t.toHexString=function(t){if(!e.isBuffer(t))throw new Error("must be passed a buffer");return t.toString("hex")},t.fromHexString=function(t){return e.from(t,"hex")},t.toB58String=function(t){if(!e.isBuffer(t))throw new Error("must be passed a buffer");return n.encode(t)},t.fromB58String=function(t){let r=t;return e.isBuffer(t)&&(r=t.toString()),e.from(n.decode(r))},t.decode=function(r){if(!e.isBuffer(r))throw new Error("multihash must be a Buffer");if(r.length<3)throw new Error("multihash too short. must be > 3 bytes.");let n=o.decode(r);if(!t.isValidCode(n))throw new Error(`multihash unknown function code: 0x${n.toString(16)}`);r=r.slice(o.decode.bytes);let s=o.decode(r);if(s<1)throw new Error(`multihash invalid length: 0x${s.toString(16)}`);if((r=r.slice(o.decode.bytes)).length!==s)throw new Error(`multihash length inconsistent: 0x${r.toString("hex")}`);return{code:n,name:i.codes[n],length:s,digest:r}},t.encode=function(r,n,i){if(!r||!n)throw new Error("multihash encode requires at least two args: digest, code");const s=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(o.encode(s)),e.from(o.encode(i)),r])},t.coerceCode=function(e){let r=e;if("string"==typeof e){if(!i.names[e])throw new Error(`Unrecognized hash function named: ${e}`);r=i.names[e]}if("number"!=typeof r)throw new Error(`Hash function code should be a number. Got: ${r}`);if(!i.codes[r]&&!t.isAppCode(r))throw new Error(`Unrecognized function code: ${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=s,t.prefix=function(e){return s(e),e.slice(0,2)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";var n,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var u=10;function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function f(e,t,r,n){var i,o,s,a;if("function"!=typeof r)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r);if(void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=c(e))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return e}function l(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=function(){for(var e=[],t=0;t0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)o(u,this,t);else{var c=u.length,f=d(u,c);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return h(this,e,!0)},a.prototype.rawListeners=function(e){return h(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,r){"use strict";e.exports=function e(t){var r=arguments.length;if("function"==typeof t&&1===t.length){for(var n=new Array(r),i=0;i!(!e||!e[n])),i},e.exports.proto=function(e,{className:t,symbolName:r,withoutNew:n}){const i=Symbol.for(r),o={[t]:function(...t){if(n&&!(this instanceof o))return new o(...t);const r=e.call(this,...t)||this;return r&&!r[i]&&Object.defineProperty(r,i,{value:!0}),r}}[t];return o.prototype=Object.create(e.prototype),o.prototype.constructor=o,Object.defineProperty(o.prototype,Symbol.toStringTag,{get:()=>t}),o[`is${t}`]=(e=>!(!e||!e[i])),o}},,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.preArrayOfCidFromJson=t.preArrayOfCidToJson=t.preCidToJson=t.preCidFromJson=t.isCidJson=t.isCid=t.cidToJson=t.cidFromJson=void 0;var n,i=r(72),o=(n=i)&&n.__esModule?n:{default:n},s=r(10),a=r(100);var u=t.cidFromJson=function(e){return new o.default(e.version,e.codec,(0,s.bufferFromJson)(e.hash))},c=t.cidToJson=function(e){return{__ipfsPostMsgProxyType:"CID",codec:e.codec,version:e.version,hash:(0,s.bufferToJson)(e.multihash)}},f=t.isCid=o.default.isCID,l=t.isCidJson=function(e){return e&&"CID"===e.__ipfsPostMsgProxyType};t.preCidFromJson=function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n * @license MIT */ -function n(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i=0;c--)if(f[c]!==l[c])return!1;for(c=f.length-1;c>=0;c--)if(u=f[c],!v(t[u],e[u],r,n))return!1;return!0}(t,e,r,s))}return r?t===e:t==e}function b(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function _(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function S(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&g(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!t&&i&&!r;if((!t&&o.isError(i)&&s&&_(i,r)||a)&&g(i,r,"Got unwanted exception"+n),t&&i&&r&&!_(i,r)||!t&&i)throw i}l.AssertionError=function(t){var e;this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=d(y((e=this).actual),128)+" "+e.operator+" "+d(y(e.expected),128),this.generatedMessage=!0);var r=t.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var i=n.stack,o=p(r),s=i.indexOf("\n"+o);if(s>=0){var a=i.indexOf("\n",s+1);i=i.substring(a+1)}this.stack=i}}},o.inherits(l.AssertionError,Error),l.fail=g,l.ok=m,l.equal=function(t,e,r){t!=e&&g(t,e,r,"==",l.equal)},l.notEqual=function(t,e,r){t==e&&g(t,e,r,"!=",l.notEqual)},l.deepEqual=function(t,e,r){v(t,e,!1)||g(t,e,r,"deepEqual",l.deepEqual)},l.deepStrictEqual=function(t,e,r){v(t,e,!0)||g(t,e,r,"deepStrictEqual",l.deepStrictEqual)},l.notDeepEqual=function(t,e,r){v(t,e,!1)&&g(t,e,r,"notDeepEqual",l.notDeepEqual)},l.notDeepStrictEqual=function t(e,r,n){v(e,r,!0)&&g(e,r,n,"notDeepStrictEqual",t)},l.strictEqual=function(t,e,r){t!==e&&g(t,e,r,"===",l.strictEqual)},l.notStrictEqual=function(t,e,r){t===e&&g(t,e,r,"!==",l.notStrictEqual)},l.throws=function(t,e,r){S(!0,t,e,r)},l.doesNotThrow=function(t,e,r){S(!1,t,e,r)},l.ifError=function(t){if(t)throw t};var w=Object.keys||function(t){var e=[];for(var r in t)s.call(t,r)&&e.push(r);return e}}).call(this,r(12))},function(t,e,r){"use strict";const n=e;n.bignum=r(71),n.define=r(495).define,n.base=r(111),n.constants=r(263),n.decoders=r(500),n.encoders=r(502)},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function i(t){return"object"==typeof t&&null!==t}function o(t){return void 0===t}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,r,s,a,u,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var f=new Error('Uncaught, unspecified "error" event. ('+e+")");throw f.context=e,f}if(o(r=this._events[t]))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),r.apply(this,a)}else if(i(r))for(a=Array.prototype.slice.call(arguments,1),s=(c=r.slice()).length,u=0;u0&&this._events[t].length>s&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){if(!n(e))throw TypeError("listener must be a function");var r=!1;function i(){this.removeListener(t,i),r||(r=!0,e.apply(this,arguments))}return i.listener=e,this.on(t,i),this},r.prototype.removeListener=function(t,e){var r,o,s,a;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(s=(r=this._events[t]).length,o=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(r)){for(a=s;a-- >0;)if(r[a]===e||r[a].listener&&r[a].listener===e){o=a;break}if(o<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n(r=this._events[t]))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){return this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,r){"use strict";(function(t){const n=r(9),i=r(314);e.names=i.names,e.codes=i.codes,e.defaultLengths=i.defaultLengths;const o=r(5);function s(t){e.decode(t)}e.toHexString=function(e){if(!t.isBuffer(e))throw new Error("must be passed a buffer");return e.toString("hex")},e.fromHexString=function(e){return t.from(e,"hex")},e.toB58String=function(e){if(!t.isBuffer(e))throw new Error("must be passed a buffer");return n.encode(e)},e.fromB58String=function(e){let r=e;return t.isBuffer(e)&&(r=e.toString()),t.from(n.decode(r))},e.decode=function(r){if(!t.isBuffer(r))throw new Error("multihash must be a Buffer");if(r.length<3)throw new Error("multihash too short. must be > 3 bytes.");let n=o.decode(r);if(!e.isValidCode(n))throw new Error(`multihash unknown function code: 0x${n.toString(16)}`);r=r.slice(o.decode.bytes);let s=o.decode(r);if(s<1)throw new Error(`multihash invalid length: 0x${s.toString(16)}`);if((r=r.slice(o.decode.bytes)).length!==s)throw new Error(`multihash length inconsistent: 0x${r.toString("hex")}`);return{code:n,name:i.codes[n],length:s,digest:r}},e.encode=function(r,n,i){if(!r||!n)throw new Error("multihash encode requires at least two args: digest, code");const s=e.coerceCode(n);if(!t.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 t.concat([t.from(o.encode(s)),t.from(o.encode(i)),r])},e.coerceCode=function(t){let r=t;if("string"==typeof t){if(!i.names[t])throw new Error(`Unrecognized hash function named: ${t}`);r=i.names[t]}if("number"!=typeof r)throw new Error(`Hash function code should be a number. Got: ${r}`);if(!i.codes[r]&&!e.isAppCode(r))throw new Error(`Unrecognized function code: ${r}`);return r},e.isAppCode=function(t){return t>0&&t<16},e.isValidCode=function(t){return!!e.isAppCode(t)||!!i.codes[t]},e.validate=s,e.prefix=function(t){return s(t),t.slice(0,2)}}).call(this,r(0).Buffer)},function(t,e,r){t.exports=r(8),r(81),r(481),r(59),r(170),r(256),r(138),r(483),r(109),r(484),r(258),r(485),r(255),r(172),r(93),r(251),r(253),r(486),r(245),r(252),r(249),r(174),r(43),r(250),r(487),r(488),r(244),r(13)},function(t,e,r){"use strict";t.exports=function(t,{className:e,symbolName:r}){const n=Symbol.for(r),i={[e]:class extends t{constructor(...t){super(...t),Object.defineProperty(this,n,{value:!0})}get[Symbol.toStringTag](){return e}}}[e];return i[`is${e}`]=(t=>!(!t||!t[n])),i},t.exports.proto=function(t,{className:e,symbolName:r,withoutNew:n}){const i=Symbol.for(r),o={[e]:function(...e){if(n&&!(this instanceof o))return new o(...e);const r=t.call(this,...e)||this;return r&&!r[i]&&Object.defineProperty(r,i,{value:!0}),r}}[e];return o.prototype=Object.create(t.prototype),o.prototype.constructor=o,Object.defineProperty(o.prototype,Symbol.toStringTag,{get:()=>e}),o[`is${e}`]=(t=>!(!t||!t[i])),o}},function(t,e,r){var n=r(0),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.preArrayOfCidFromJson=e.preArrayOfCidToJson=e.preCidToJson=e.preCidFromJson=e.isCidJson=e.isCid=e.cidToJson=e.cidFromJson=void 0;var n,i=r(16),o=(n=i)&&n.__esModule?n:{default:n},s=r(17),a=r(129);var u=e.cidFromJson=function(t){return new o.default(t.version,t.codec,(0,s.bufferFromJson)(t.hash))},c=e.cidToJson=function(t){return{__ipfsPostMsgProxyType:"CID",codec:t.codec,version:t.version,hash:(0,s.bufferToJson)(t.multihash)}},f=e.isCid=o.default.isCID,l=e.isCidJson=function(t){return t&&"CID"===t.__ipfsPostMsgProxyType};e.preCidFromJson=function(t){return function(){for(var e=arguments.length,r=Array(e),n=0;n=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},r(432),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,r(12))},,function(t,e,r){"use strict";t.exports=function t(e){var r=arguments.length;if("function"==typeof e&&1===e.length){for(var n=new Array(r),i=0;i-1},Ct.prototype.set=function(t,e){var r=this.__data__,n=Mt(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},At.prototype.clear=function(){this.__data__={hash:new kt,map:new(lt||Ct),string:new kt}},At.prototype.delete=function(t){return Jt(this,t).delete(t)},At.prototype.get=function(t){return Jt(this,t).get(t)},At.prototype.has=function(t){return Jt(this,t).has(t)},At.prototype.set=function(t,e){return Jt(this,t).set(t,e),this},Tt.prototype.add=Tt.prototype.push=function(t){return this.__data__.set(t,o),this},Tt.prototype.has=function(t){return this.__data__.has(t)},Bt.prototype.clear=function(){this.__data__=new Ct},Bt.prototype.delete=function(t){return this.__data__.delete(t)},Bt.prototype.get=function(t){return this.__data__.get(t)},Bt.prototype.has=function(t){return this.__data__.has(t)},Bt.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Ct){var i=r.__data__;if(!lt||i.lengthc))return!1;var l=o.get(t);if(l&&o.get(e))return l==e;var h=-1,p=!0,d=i&s?new Tt:void 0;for(o.set(t,e),o.set(e,t);++h-1&&t%1==0&&t-1&&t%1==0&&t<=c}function ae(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function ue(t){return!!t&&"object"==typeof t}function ce(t){return"symbol"==typeof t||ue(t)&&nt.call(t)==E}var fe=F?function(t){return function(e){return t(e)}}(F):function(t){return ue(t)&&se(t.length)&&!!N[nt.call(t)]};function le(t){return ie(t)?It(t):Ft(t)}function he(t){return t}r.exports=function(t,e){return(ne(t)?V:Pt)(t,jt(e))}}).call(this,r(12),r(39)(t))},function(t,e,r){"use strict";var n=e,i=r(0).Buffer,o=r(316);n.toBuffer=function(t,e,r){var n;if(r=~~r,this.isV4Format(t))n=e||new i(r+4),t.split(/\./g).map(function(t){n[r++]=255&parseInt(t,10)});else if(this.isV6Format(t)){var o,s=t.split(":",8);for(o=0;o0;o--)u.push("0");s.splice.apply(s,u)}for(n=e||new i(r+16),o=0;o>8&255,n[r++]=255&c}}if(!n)throw Error("Invalid ip address: "+t);return n},n.toString=function(t,e,r){e=~~e;var n=[];if(4===(r=r||t.length-e)){for(var i=0;i32?"ipv6":u(e))&&(r=16);for(var o=new i(r),s=0,a=o.length;s>c)}return n.toString(o)},n.mask=function(t,e){t=n.toBuffer(t),e=n.toBuffer(e);var r=new i(Math.max(t.length,e.length)),o=0;if(t.length===e.length)for(o=0;ot.length&&(i=e,o=t);var s=i.length-o.length;for(r=s;r>>0},n.fromLong=function(t){return(t>>>24)+"."+(t>>16&255)+"."+(t>>8&255)+"."+(255&t)}},function(t,e,r){"use strict";e.Address4=r(219),e.Address6=r(419),e.v6={helpers:r(224)}},function(t,e,r){e.source=r(180),e.through=r(596),e.sink=r(288),e.duplex=r(325)},,function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isAsync=void 0;var n,i=r(192),o=(n=i)&&n.__esModule?n:{default:n};var s="function"==typeof Symbol;function a(t){return s&&"AsyncFunction"===t[Symbol.toStringTag]}e.default=function(t){return a(t)?(0,o.default)(t):t},e.isAsync=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.functionToJson=function(t){return{__ipfsPostMsgProxyType:"Function",name:t}},e.isFunctionJson=function(t){return t&&"Function"===t.__ipfsPostMsgProxyType}},function(t,e,r){(function(e,n){var i=r(66);t.exports=s,t.exports.source=function(t){return s(null,t)},t.exports.sink=function(t){return s(t,null)};var o=void 0===e?n.nextTick:e;function s(t,e){t&&"object"==typeof t&&(e=t.source,t=t.sink);var r,n,s,a=[],u=[],c=new i;c.writable=c.readable=!0,c.write=function(t){return a.length?a.shift()(null,t):u.push(t),a.length||(n=!0),!!a.length},c.end=function(){e?u.length?d():e(r=!0,a.length?a.shift():function(){}):a.length&&a.shift()(!0)},c.source=function(t,e){u.length?(e(null,u.shift()),u.length||c.emit("drain")):((r=r||t)?e(r):a.push(e),n&&(n=!1,c.emit("drain")))},t&&(s=t(c.source)),s&&!e&&(e=s);var f=[],l=!1,h=!1;if(c.sink=function(t){e=t,o(d)},e){c.sink(e);var p=c.pipe.bind(c);c.pipe=function(t,e){var r=p(t,e);return c.paused&&c.resume(),r}}function d(){if(!1,e&&!h){for(;f.length&&!c.paused;)c.emit("data",f.shift());if(!c.paused){if(l)return c.emit("end");h=!0,e(null,function t(n,i){h=!1,c.paused?(!0===n?l=n:n?c.emit("error",n):f.push(i),!0):n&&!0!==(r=n)?c.emit("error",n):(r=r||n)?c.emit("end"):(c.emit("data",i),h=!0,e(null,t))})}}}return c.pause=function(){return c.paused=!0,c},c.resume=function(){return c.paused=!1,d(),c},c.destroy=function(){!r&&e&&e(r=!0,function(){}),r=!0,a.length&&a.shift()(!0),c.emit("close")},c}}).call(this,r(35).setImmediate,r(6))},function(t,e,r){"use strict";var n=r(27).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=f,this.end=l,e=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(t.lastNeed=i-1),i;if(--n=0)return i>0&&(t.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},,,function(t,e,r){(function(n,i){var o; +function n(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i=0;c--)if(f[c]!==l[c])return!1;for(c=f.length-1;c>=0;c--)if(u=f[c],!v(e[u],t[u],r,n))return!1;return!0}(e,t,r,s))}return r?e===t:e==t}function b(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function _(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&g(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!e&&i&&!r;if((!e&&o.isError(i)&&s&&_(i,r)||a)&&g(i,r,"Got unwanted exception"+n),e&&i&&r&&!_(i,r)||!e&&i)throw i}l.AssertionError=function(e){var t;this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=d(y((t=this).actual),128)+" "+t.operator+" "+d(y(t.expected),128),this.generatedMessage=!0);var r=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var i=n.stack,o=p(r),s=i.indexOf("\n"+o);if(s>=0){var a=i.indexOf("\n",s+1);i=i.substring(a+1)}this.stack=i}}},o.inherits(l.AssertionError,Error),l.fail=g,l.ok=m,l.equal=function(e,t,r){e!=t&&g(e,t,r,"==",l.equal)},l.notEqual=function(e,t,r){e==t&&g(e,t,r,"!=",l.notEqual)},l.deepEqual=function(e,t,r){v(e,t,!1)||g(e,t,r,"deepEqual",l.deepEqual)},l.deepStrictEqual=function(e,t,r){v(e,t,!0)||g(e,t,r,"deepStrictEqual",l.deepStrictEqual)},l.notDeepEqual=function(e,t,r){v(e,t,!1)&&g(e,t,r,"notDeepEqual",l.notDeepEqual)},l.notDeepStrictEqual=function e(t,r,n){v(t,r,!0)&&g(t,r,n,"notDeepStrictEqual",e)},l.strictEqual=function(e,t,r){e!==t&&g(e,t,r,"===",l.strictEqual)},l.notStrictEqual=function(e,t,r){e===t&&g(e,t,r,"!==",l.notStrictEqual)},l.throws=function(e,t,r){E(!0,e,t,r)},l.doesNotThrow=function(e,t,r){E(!1,e,t,r)},l.ifError=function(e){if(e)throw e};var S=Object.keys||function(e){var t=[];for(var r in e)s.call(e,r)&&t.push(r);return t}}).call(this,r(12))},,,function(e,t,r){"use strict";(function(t){var n=r(367),i=r(371);e.exports=function(e,r){if(r||(r={}),!e)throw new Error("Pass in a .proto string or a protobuf-schema parsed object");var o="object"!=typeof e||t.isBuffer(e)?n.parse(e):e,s=function(){var e=this;i(o,r.encodings||{}).forEach(function(t){e[t.name]=function(e){if(!e)return null;var t={};return Object.keys(e).forEach(function(r){t[r]=e[r].value}),t}(t.values)||t})};return s.prototype.toString=function(){return n.stringify(o)},s.prototype.toJSON=function(){return o},new s}}).call(this,r(0).Buffer)},function(e,t,r){t.source=r(496),t.sink=r(497)},function(e,t,r){var n=r(173);e.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},,function(e,t,r){"use strict";(function(t){const n=r(13),i=r(358);function o(e,t,r,i){if("function"==typeof r&&(i=r,r=void 0),!i)throw new Error("Missing callback");o.digest(e,t,r,(e,o)=>{if(e)return i(e);i(null,n.encode(o,t,r))})}e.exports=o,o.Buffer=t,o.multihash=n,o.digest=function(e,t,r,n){if("function"==typeof r&&(n=r,r=void 0),!n)throw new Error("Missing callback");let i,s=n;r&&(s=((e,t)=>{if(e)return n(e);n(null,t.slice(0,r))}));try{i=o.createHash(t)}catch(e){return s(e)}i(e,s)},o.createHash=function(e){if(e=n.coerceCode(e),!o.functions[e])throw new Error("multihash function "+e+" not yet supported");return o.functions[e]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";e.exports=r(313)},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},r(362),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(12))},function(e,t,r){var n=r(3);r(61),r(208),r(209),r(8),n.random&&n.random.getBytes?e.exports=n.random:function(t){var r={},i=new Array(4),o=n.util.createBuffer();function s(){var e=n.prng.create(r);return e.getBytes=function(t,r){return e.generate(t,r)},e.getBytesSync=function(t){return e.generate(t)},e}r.formatKey=function(e){var t=n.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),n.aes._expandKey(e,!1)},r.formatSeed=function(e){var t=n.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),e},r.cipher=function(e,t){return n.aes._updateBlock(e,t,i,!1),o.putInt32(i[0]),o.putInt32(i[1]),o.putInt32(i[2]),o.putInt32(i[3]),o.getBytes()},r.increment=function(e){return++e[3],e},r.md=n.md.sha256;var a=s(),u=null;if("undefined"!=typeof window){var c=window.crypto||window.msCrypto;c&&c.getRandomValues&&(u=function(e){return c.getRandomValues(e)})}if(n.options.usePureJavaScript||!n.util.isNodejs&&!u){if("undefined"==typeof window||window.document,a.collectInt(+new Date,32),"undefined"!=typeof navigator){var f="";for(var l in navigator)try{"string"==typeof navigator[l]&&(f+=navigator[l])}catch(e){}a.collect(f),f=null}t&&(t().mousemove(function(e){a.collectInt(e.clientX,16),a.collectInt(e.clientY,16)}),t().keypress(function(e){a.collectInt(e.charCode,8)}))}if(n.random)for(var l in a)n.random[l]=a[l];else n.random=a;n.random.createInstance=s,e.exports=n.random}("undefined"!=typeof jQuery?jQuery:null)},function(e,t,r){"use strict";var n=r(122);e.exports=function(e){return n(function(e,t){return e.push(t),e},[],e)}},,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAsync=void 0;var n,i=r(378),o=(n=i)&&n.__esModule?n:{default:n};var s="function"==typeof Symbol;function a(e){return s&&"AsyncFunction"===e[Symbol.toStringTag]}t.default=function(e){return a(e)?(0,o.default)(e):e},t.isAsync=a},function(e,t,r){"use strict";const n=t;n.bignum=r(423),n.define=r(425).define,n.base=r(90),n.constants=r(223),n.decoders=r(432),n.encoders=r(434)},function(e,t,r){"use strict";var n=r(243);e.exports=function(e,t){if(!e)return function(e,r){return e?n(r,e,t):r(!0)};Array.isArray(e)||(e=Object.keys(e).map(function(t){return e[t]}));var r=0;return function(i,o){if(i)return n(o,i,t);r>=e.length?o(!0):o(null,e[r++])}}},function(e,t,r){t.source=r(147),t.through=r(528),t.sink=r(247),t.duplex=r(268)},function(e,t,r){"use strict";(function(n){const i=r(334);(t=e.exports=s).encode=function(e,t){const r=a(e);return s(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(e){return!1}},t.names=Object.freeze(Object.keys(i.names)),t.codes=Object.freeze(Object.keys(i.codes));const o=new Error("Unsupported encoding");function s(e,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 o;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";Object.defineProperty(t,"__esModule",{value:!0});t.functionToJson=function(e){return{__ipfsPostMsgProxyType:"Function",name:e}},t.isFunctionJson=function(e){return e&&"Function"===e.__ipfsPostMsgProxyType}},function(e,t,r){(function(t,n){var i=r(80);e.exports=s,e.exports.source=function(e){return s(null,e)},e.exports.sink=function(e){return s(e,null)};var o=void 0===t?n.nextTick:t;function s(e,t){e&&"object"==typeof e&&(t=e.source,e=e.sink);var r,n,s,a=[],u=[],c=new i;c.writable=c.readable=!0,c.write=function(e){return a.length?a.shift()(null,e):u.push(e),a.length||(n=!0),!!a.length},c.end=function(){t?u.length?d():t(r=!0,a.length?a.shift():function(){}):a.length&&a.shift()(!0)},c.source=function(e,t){u.length?(t(null,u.shift()),u.length||c.emit("drain")):((r=r||e)?t(r):a.push(t),n&&(n=!1,c.emit("drain")))},e&&(s=e(c.source)),s&&!t&&(t=s);var f=[],l=!1,h=!1;if(c.sink=function(e){t=e,o(d)},t){c.sink(t);var p=c.pipe.bind(c);c.pipe=function(e,t){var r=p(e,t);return c.paused&&c.resume(),r}}function d(){if(!1,t&&!h){for(;f.length&&!c.paused;)c.emit("data",f.shift());if(!c.paused){if(l)return c.emit("end");h=!0,t(null,function e(n,i){h=!1,c.paused?(!0===n?l=n:n?c.emit("error",n):f.push(i),!0):n&&!0!==(r=n)?c.emit("error",n):(r=r||n)?c.emit("end"):(c.emit("data",i),h=!0,t(null,e))})}}}return c.pause=function(){return c.paused=!0,c},c.resume=function(){return c.paused=!1,d(),c},c.destroy=function(){!r&&t&&t(r=!0,function(){}),r=!0,a.length&&a.shift()(!0),c.emit("close")},c}}).call(this,r(31).setImmediate,r(4))},function(e,t,r){"use strict";(function(e){t.raw=e.from("55","hex"),t.cbor=e.from("51","hex"),t.protobuf=e.from("50","hex"),t.rlp=e.from("60","hex"),t.bencode=e.from("63","hex"),t.multicodec=e.from("30","hex"),t.multihash=e.from("31","hex"),t.multiaddr=e.from("32","hex"),t.multibase=e.from("33","hex"),t.identity=e.from("00","hex"),t.md4=e.from("d4","hex"),t.md5=e.from("d5","hex"),t.sha1=e.from("11","hex"),t["sha2-256"]=e.from("12","hex"),t["sha2-512"]=e.from("13","hex"),t["dbl-sha2-256"]=e.from("56","hex"),t["sha3-224"]=e.from("17","hex"),t["sha3-256"]=e.from("16","hex"),t["sha3-384"]=e.from("15","hex"),t["sha3-512"]=e.from("14","hex"),t["shake-128"]=e.from("18","hex"),t["shake-256"]=e.from("19","hex"),t["keccak-224"]=e.from("1a","hex"),t["keccak-256"]=e.from("1b","hex"),t["keccak-384"]=e.from("1c","hex"),t["keccak-512"]=e.from("1d","hex"),t["murmur3-128"]=e.from("22","hex"),t["murmur3-32"]=e.from("23","hex"),t.x11=e.from("1100","hex"),t["blake2b-8"]=e.from("b201","hex"),t["blake2b-16"]=e.from("b202","hex"),t["blake2b-24"]=e.from("b203","hex"),t["blake2b-32"]=e.from("b204","hex"),t["blake2b-40"]=e.from("b205","hex"),t["blake2b-48"]=e.from("b206","hex"),t["blake2b-56"]=e.from("b207","hex"),t["blake2b-64"]=e.from("b208","hex"),t["blake2b-72"]=e.from("b209","hex"),t["blake2b-80"]=e.from("b20a","hex"),t["blake2b-88"]=e.from("b20b","hex"),t["blake2b-96"]=e.from("b20c","hex"),t["blake2b-104"]=e.from("b20d","hex"),t["blake2b-112"]=e.from("b20e","hex"),t["blake2b-120"]=e.from("b20f","hex"),t["blake2b-128"]=e.from("b210","hex"),t["blake2b-136"]=e.from("b211","hex"),t["blake2b-144"]=e.from("b212","hex"),t["blake2b-152"]=e.from("b213","hex"),t["blake2b-160"]=e.from("b214","hex"),t["blake2b-168"]=e.from("b215","hex"),t["blake2b-176"]=e.from("b216","hex"),t["blake2b-184"]=e.from("b217","hex"),t["blake2b-192"]=e.from("b218","hex"),t["blake2b-200"]=e.from("b219","hex"),t["blake2b-208"]=e.from("b21a","hex"),t["blake2b-216"]=e.from("b21b","hex"),t["blake2b-224"]=e.from("b21c","hex"),t["blake2b-232"]=e.from("b21d","hex"),t["blake2b-240"]=e.from("b21e","hex"),t["blake2b-248"]=e.from("b21f","hex"),t["blake2b-256"]=e.from("b220","hex"),t["blake2b-264"]=e.from("b221","hex"),t["blake2b-272"]=e.from("b222","hex"),t["blake2b-280"]=e.from("b223","hex"),t["blake2b-288"]=e.from("b224","hex"),t["blake2b-296"]=e.from("b225","hex"),t["blake2b-304"]=e.from("b226","hex"),t["blake2b-312"]=e.from("b227","hex"),t["blake2b-320"]=e.from("b228","hex"),t["blake2b-328"]=e.from("b229","hex"),t["blake2b-336"]=e.from("b22a","hex"),t["blake2b-344"]=e.from("b22b","hex"),t["blake2b-352"]=e.from("b22c","hex"),t["blake2b-360"]=e.from("b22d","hex"),t["blake2b-368"]=e.from("b22e","hex"),t["blake2b-376"]=e.from("b22f","hex"),t["blake2b-384"]=e.from("b230","hex"),t["blake2b-392"]=e.from("b231","hex"),t["blake2b-400"]=e.from("b232","hex"),t["blake2b-408"]=e.from("b233","hex"),t["blake2b-416"]=e.from("b234","hex"),t["blake2b-424"]=e.from("b235","hex"),t["blake2b-432"]=e.from("b236","hex"),t["blake2b-440"]=e.from("b237","hex"),t["blake2b-448"]=e.from("b238","hex"),t["blake2b-456"]=e.from("b239","hex"),t["blake2b-464"]=e.from("b23a","hex"),t["blake2b-472"]=e.from("b23b","hex"),t["blake2b-480"]=e.from("b23c","hex"),t["blake2b-488"]=e.from("b23d","hex"),t["blake2b-496"]=e.from("b23e","hex"),t["blake2b-504"]=e.from("b23f","hex"),t["blake2b-512"]=e.from("b240","hex"),t["blake2s-8"]=e.from("b241","hex"),t["blake2s-16"]=e.from("b242","hex"),t["blake2s-24"]=e.from("b243","hex"),t["blake2s-32"]=e.from("b244","hex"),t["blake2s-40"]=e.from("b245","hex"),t["blake2s-48"]=e.from("b246","hex"),t["blake2s-56"]=e.from("b247","hex"),t["blake2s-64"]=e.from("b248","hex"),t["blake2s-72"]=e.from("b249","hex"),t["blake2s-80"]=e.from("b24a","hex"),t["blake2s-88"]=e.from("b24b","hex"),t["blake2s-96"]=e.from("b24c","hex"),t["blake2s-104"]=e.from("b24d","hex"),t["blake2s-112"]=e.from("b24e","hex"),t["blake2s-120"]=e.from("b24f","hex"),t["blake2s-128"]=e.from("b250","hex"),t["blake2s-136"]=e.from("b251","hex"),t["blake2s-144"]=e.from("b252","hex"),t["blake2s-152"]=e.from("b253","hex"),t["blake2s-160"]=e.from("b254","hex"),t["blake2s-168"]=e.from("b255","hex"),t["blake2s-176"]=e.from("b256","hex"),t["blake2s-184"]=e.from("b257","hex"),t["blake2s-192"]=e.from("b258","hex"),t["blake2s-200"]=e.from("b259","hex"),t["blake2s-208"]=e.from("b25a","hex"),t["blake2s-216"]=e.from("b25b","hex"),t["blake2s-224"]=e.from("b25c","hex"),t["blake2s-232"]=e.from("b25d","hex"),t["blake2s-240"]=e.from("b25e","hex"),t["blake2s-248"]=e.from("b25f","hex"),t["blake2s-256"]=e.from("b260","hex"),t["skein256-8"]=e.from("b301","hex"),t["skein256-16"]=e.from("b302","hex"),t["skein256-24"]=e.from("b303","hex"),t["skein256-32"]=e.from("b304","hex"),t["skein256-40"]=e.from("b305","hex"),t["skein256-48"]=e.from("b306","hex"),t["skein256-56"]=e.from("b307","hex"),t["skein256-64"]=e.from("b308","hex"),t["skein256-72"]=e.from("b309","hex"),t["skein256-80"]=e.from("b30a","hex"),t["skein256-88"]=e.from("b30b","hex"),t["skein256-96"]=e.from("b30c","hex"),t["skein256-104"]=e.from("b30d","hex"),t["skein256-112"]=e.from("b30e","hex"),t["skein256-120"]=e.from("b30f","hex"),t["skein256-128"]=e.from("b310","hex"),t["skein256-136"]=e.from("b311","hex"),t["skein256-144"]=e.from("b312","hex"),t["skein256-152"]=e.from("b313","hex"),t["skein256-160"]=e.from("b314","hex"),t["skein256-168"]=e.from("b315","hex"),t["skein256-176"]=e.from("b316","hex"),t["skein256-184"]=e.from("b317","hex"),t["skein256-192"]=e.from("b318","hex"),t["skein256-200"]=e.from("b319","hex"),t["skein256-208"]=e.from("b31a","hex"),t["skein256-216"]=e.from("b31b","hex"),t["skein256-224"]=e.from("b31c","hex"),t["skein256-232"]=e.from("b31d","hex"),t["skein256-240"]=e.from("b31e","hex"),t["skein256-248"]=e.from("b31f","hex"),t["skein256-256"]=e.from("b320","hex"),t["skein512-8"]=e.from("b321","hex"),t["skein512-16"]=e.from("b322","hex"),t["skein512-24"]=e.from("b323","hex"),t["skein512-32"]=e.from("b324","hex"),t["skein512-40"]=e.from("b325","hex"),t["skein512-48"]=e.from("b326","hex"),t["skein512-56"]=e.from("b327","hex"),t["skein512-64"]=e.from("b328","hex"),t["skein512-72"]=e.from("b329","hex"),t["skein512-80"]=e.from("b32a","hex"),t["skein512-88"]=e.from("b32b","hex"),t["skein512-96"]=e.from("b32c","hex"),t["skein512-104"]=e.from("b32d","hex"),t["skein512-112"]=e.from("b32e","hex"),t["skein512-120"]=e.from("b32f","hex"),t["skein512-128"]=e.from("b330","hex"),t["skein512-136"]=e.from("b331","hex"),t["skein512-144"]=e.from("b332","hex"),t["skein512-152"]=e.from("b333","hex"),t["skein512-160"]=e.from("b334","hex"),t["skein512-168"]=e.from("b335","hex"),t["skein512-176"]=e.from("b336","hex"),t["skein512-184"]=e.from("b337","hex"),t["skein512-192"]=e.from("b338","hex"),t["skein512-200"]=e.from("b339","hex"),t["skein512-208"]=e.from("b33a","hex"),t["skein512-216"]=e.from("b33b","hex"),t["skein512-224"]=e.from("b33c","hex"),t["skein512-232"]=e.from("b33d","hex"),t["skein512-240"]=e.from("b33e","hex"),t["skein512-248"]=e.from("b33f","hex"),t["skein512-256"]=e.from("b340","hex"),t["skein512-264"]=e.from("b341","hex"),t["skein512-272"]=e.from("b342","hex"),t["skein512-280"]=e.from("b343","hex"),t["skein512-288"]=e.from("b344","hex"),t["skein512-296"]=e.from("b345","hex"),t["skein512-304"]=e.from("b346","hex"),t["skein512-312"]=e.from("b347","hex"),t["skein512-320"]=e.from("b348","hex"),t["skein512-328"]=e.from("b349","hex"),t["skein512-336"]=e.from("b34a","hex"),t["skein512-344"]=e.from("b34b","hex"),t["skein512-352"]=e.from("b34c","hex"),t["skein512-360"]=e.from("b34d","hex"),t["skein512-368"]=e.from("b34e","hex"),t["skein512-376"]=e.from("b34f","hex"),t["skein512-384"]=e.from("b350","hex"),t["skein512-392"]=e.from("b351","hex"),t["skein512-400"]=e.from("b352","hex"),t["skein512-408"]=e.from("b353","hex"),t["skein512-416"]=e.from("b354","hex"),t["skein512-424"]=e.from("b355","hex"),t["skein512-432"]=e.from("b356","hex"),t["skein512-440"]=e.from("b357","hex"),t["skein512-448"]=e.from("b358","hex"),t["skein512-456"]=e.from("b359","hex"),t["skein512-464"]=e.from("b35a","hex"),t["skein512-472"]=e.from("b35b","hex"),t["skein512-480"]=e.from("b35c","hex"),t["skein512-488"]=e.from("b35d","hex"),t["skein512-496"]=e.from("b35e","hex"),t["skein512-504"]=e.from("b35f","hex"),t["skein512-512"]=e.from("b360","hex"),t["skein1024-8"]=e.from("b361","hex"),t["skein1024-16"]=e.from("b362","hex"),t["skein1024-24"]=e.from("b363","hex"),t["skein1024-32"]=e.from("b364","hex"),t["skein1024-40"]=e.from("b365","hex"),t["skein1024-48"]=e.from("b366","hex"),t["skein1024-56"]=e.from("b367","hex"),t["skein1024-64"]=e.from("b368","hex"),t["skein1024-72"]=e.from("b369","hex"),t["skein1024-80"]=e.from("b36a","hex"),t["skein1024-88"]=e.from("b36b","hex"),t["skein1024-96"]=e.from("b36c","hex"),t["skein1024-104"]=e.from("b36d","hex"),t["skein1024-112"]=e.from("b36e","hex"),t["skein1024-120"]=e.from("b36f","hex"),t["skein1024-128"]=e.from("b370","hex"),t["skein1024-136"]=e.from("b371","hex"),t["skein1024-144"]=e.from("b372","hex"),t["skein1024-152"]=e.from("b373","hex"),t["skein1024-160"]=e.from("b374","hex"),t["skein1024-168"]=e.from("b375","hex"),t["skein1024-176"]=e.from("b376","hex"),t["skein1024-184"]=e.from("b377","hex"),t["skein1024-192"]=e.from("b378","hex"),t["skein1024-200"]=e.from("b379","hex"),t["skein1024-208"]=e.from("b37a","hex"),t["skein1024-216"]=e.from("b37b","hex"),t["skein1024-224"]=e.from("b37c","hex"),t["skein1024-232"]=e.from("b37d","hex"),t["skein1024-240"]=e.from("b37e","hex"),t["skein1024-248"]=e.from("b37f","hex"),t["skein1024-256"]=e.from("b380","hex"),t["skein1024-264"]=e.from("b381","hex"),t["skein1024-272"]=e.from("b382","hex"),t["skein1024-280"]=e.from("b383","hex"),t["skein1024-288"]=e.from("b384","hex"),t["skein1024-296"]=e.from("b385","hex"),t["skein1024-304"]=e.from("b386","hex"),t["skein1024-312"]=e.from("b387","hex"),t["skein1024-320"]=e.from("b388","hex"),t["skein1024-328"]=e.from("b389","hex"),t["skein1024-336"]=e.from("b38a","hex"),t["skein1024-344"]=e.from("b38b","hex"),t["skein1024-352"]=e.from("b38c","hex"),t["skein1024-360"]=e.from("b38d","hex"),t["skein1024-368"]=e.from("b38e","hex"),t["skein1024-376"]=e.from("b38f","hex"),t["skein1024-384"]=e.from("b390","hex"),t["skein1024-392"]=e.from("b391","hex"),t["skein1024-400"]=e.from("b392","hex"),t["skein1024-408"]=e.from("b393","hex"),t["skein1024-416"]=e.from("b394","hex"),t["skein1024-424"]=e.from("b395","hex"),t["skein1024-432"]=e.from("b396","hex"),t["skein1024-440"]=e.from("b397","hex"),t["skein1024-448"]=e.from("b398","hex"),t["skein1024-456"]=e.from("b399","hex"),t["skein1024-464"]=e.from("b39a","hex"),t["skein1024-472"]=e.from("b39b","hex"),t["skein1024-480"]=e.from("b39c","hex"),t["skein1024-488"]=e.from("b39d","hex"),t["skein1024-496"]=e.from("b39e","hex"),t["skein1024-504"]=e.from("b39f","hex"),t["skein1024-512"]=e.from("b3a0","hex"),t["skein1024-520"]=e.from("b3a1","hex"),t["skein1024-528"]=e.from("b3a2","hex"),t["skein1024-536"]=e.from("b3a3","hex"),t["skein1024-544"]=e.from("b3a4","hex"),t["skein1024-552"]=e.from("b3a5","hex"),t["skein1024-560"]=e.from("b3a6","hex"),t["skein1024-568"]=e.from("b3a7","hex"),t["skein1024-576"]=e.from("b3a8","hex"),t["skein1024-584"]=e.from("b3a9","hex"),t["skein1024-592"]=e.from("b3aa","hex"),t["skein1024-600"]=e.from("b3ab","hex"),t["skein1024-608"]=e.from("b3ac","hex"),t["skein1024-616"]=e.from("b3ad","hex"),t["skein1024-624"]=e.from("b3ae","hex"),t["skein1024-632"]=e.from("b3af","hex"),t["skein1024-640"]=e.from("b3b0","hex"),t["skein1024-648"]=e.from("b3b1","hex"),t["skein1024-656"]=e.from("b3b2","hex"),t["skein1024-664"]=e.from("b3b3","hex"),t["skein1024-672"]=e.from("b3b4","hex"),t["skein1024-680"]=e.from("b3b5","hex"),t["skein1024-688"]=e.from("b3b6","hex"),t["skein1024-696"]=e.from("b3b7","hex"),t["skein1024-704"]=e.from("b3b8","hex"),t["skein1024-712"]=e.from("b3b9","hex"),t["skein1024-720"]=e.from("b3ba","hex"),t["skein1024-728"]=e.from("b3bb","hex"),t["skein1024-736"]=e.from("b3bc","hex"),t["skein1024-744"]=e.from("b3bd","hex"),t["skein1024-752"]=e.from("b3be","hex"),t["skein1024-760"]=e.from("b3bf","hex"),t["skein1024-768"]=e.from("b3c0","hex"),t["skein1024-776"]=e.from("b3c1","hex"),t["skein1024-784"]=e.from("b3c2","hex"),t["skein1024-792"]=e.from("b3c3","hex"),t["skein1024-800"]=e.from("b3c4","hex"),t["skein1024-808"]=e.from("b3c5","hex"),t["skein1024-816"]=e.from("b3c6","hex"),t["skein1024-824"]=e.from("b3c7","hex"),t["skein1024-832"]=e.from("b3c8","hex"),t["skein1024-840"]=e.from("b3c9","hex"),t["skein1024-848"]=e.from("b3ca","hex"),t["skein1024-856"]=e.from("b3cb","hex"),t["skein1024-864"]=e.from("b3cc","hex"),t["skein1024-872"]=e.from("b3cd","hex"),t["skein1024-880"]=e.from("b3ce","hex"),t["skein1024-888"]=e.from("b3cf","hex"),t["skein1024-896"]=e.from("b3d0","hex"),t["skein1024-904"]=e.from("b3d1","hex"),t["skein1024-912"]=e.from("b3d2","hex"),t["skein1024-920"]=e.from("b3d3","hex"),t["skein1024-928"]=e.from("b3d4","hex"),t["skein1024-936"]=e.from("b3d5","hex"),t["skein1024-944"]=e.from("b3d6","hex"),t["skein1024-952"]=e.from("b3d7","hex"),t["skein1024-960"]=e.from("b3d8","hex"),t["skein1024-968"]=e.from("b3d9","hex"),t["skein1024-976"]=e.from("b3da","hex"),t["skein1024-984"]=e.from("b3db","hex"),t["skein1024-992"]=e.from("b3dc","hex"),t["skein1024-1000"]=e.from("b3dd","hex"),t["skein1024-1008"]=e.from("b3de","hex"),t["skein1024-1016"]=e.from("b3df","hex"),t["skein1024-1024"]=e.from("b3e0","hex"),t.ip4=e.from("04","hex"),t.ip6=e.from("29","hex"),t.ip6zone=e.from("2a","hex"),t.tcp=e.from("06","hex"),t.udp=e.from("0111","hex"),t.dccp=e.from("21","hex"),t.sctp=e.from("84","hex"),t.udt=e.from("012d","hex"),t.utp=e.from("012e","hex"),t.p2p=e.from("01a5","hex"),t.ipfs=e.from("01a5","hex"),t.http=e.from("01e0","hex"),t.https=e.from("01bb","hex"),t.quic=e.from("01cc","hex"),t.ws=e.from("01dd","hex"),t.wss=e.from("01de","hex"),t.onion=e.from("01bc","hex"),t.onion3=e.from("01bd","hex"),t.garlic64=e.from("01be","hex"),t["p2p-circuit"]=e.from("0122","hex"),t.dns=e.from("35","hex"),t.dns4=e.from("36","hex"),t.dns6=e.from("37","hex"),t.dnsaddr=e.from("38","hex"),t["p2p-websocket-star"]=e.from("01df","hex"),t["p2p-stardust"]=e.from("0115","hex"),t["p2p-webrtc-star"]=e.from("0113","hex"),t["p2p-webrtc-direct"]=e.from("0114","hex"),t.unix=e.from("0190","hex"),t["dag-pb"]=e.from("70","hex"),t["dag-cbor"]=e.from("71","hex"),t["dag-json"]=e.from("0129","hex"),t["git-raw"]=e.from("78","hex"),t["eth-block"]=e.from("90","hex"),t["eth-block-list"]=e.from("91","hex"),t["eth-tx-trie"]=e.from("92","hex"),t["eth-tx"]=e.from("93","hex"),t["eth-tx-receipt-trie"]=e.from("94","hex"),t["eth-tx-receipt"]=e.from("95","hex"),t["eth-state-trie"]=e.from("96","hex"),t["eth-account-snapshot"]=e.from("97","hex"),t["eth-storage-trie"]=e.from("98","hex"),t["bitcoin-block"]=e.from("b0","hex"),t["bitcoin-tx"]=e.from("b1","hex"),t["zcash-block"]=e.from("c0","hex"),t["zcash-tx"]=e.from("c1","hex"),t["stellar-block"]=e.from("d0","hex"),t["stellar-tx"]=e.from("d1","hex"),t["decred-block"]=e.from("e0","hex"),t["decred-tx"]=e.from("e1","hex"),t["dash-block"]=e.from("f0","hex"),t["dash-tx"]=e.from("f1","hex"),t["leofcoin-block"]=e.from("81","hex"),t["leofcoin-tx"]=e.from("82","hex"),t["leofcoin-pr"]=e.from("83","hex"),t["torrent-info"]=e.from("7b","hex"),t["torrent-file"]=e.from("7c","hex"),t["ed25519-pub"]=e.from("ed","hex"),t["ipld-ns"]=e.from("e2","hex"),t["ipfs-ns"]=e.from("e3","hex"),t["swarm-ns"]=e.from("e4","hex")}).call(this,r(0).Buffer)},function(e,t,r){var n=r(3);r(8),r(62);var i=e.exports=n.asn1=n.asn1||{};function o(e,t,r){if(r>t){var n=new Error("Too few bytes to parse DER.");throw n.available=e.length(),n.remaining=t,n.requested=r,n}}i.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},i.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},i.create=function(e,t,r,o,s){if(n.util.isArray(o)){for(var a=[],u=0;ur){if(a.strict){var p=new Error("Too few bytes to read ASN.1 value.");throw p.available=t.length(),p.remaining=r,p.requested=h,p}h=r}var d;var y;var g=32==(32&c);if(g)if(d=[],void 0===h)for(;;){if(o(t,r,2),t.bytes(2)===String.fromCharCode(0,0)){t.getBytes(2),r-=2;break}u=t.length(),d.push(e(t,r,n+1,a)),r-=u-t.length()}else for(;h>0;)u=t.length(),d.push(e(t,h,n+1,a)),r-=u-t.length(),h-=u-t.length();void 0===d&&f===i.Class.UNIVERSAL&&l===i.Type.BITSTRING&&(y=t.bytes(h));if(void 0===d&&a.decodeBitStrings&&f===i.Class.UNIVERSAL&&l===i.Type.BITSTRING&&h>1){var m=t.read,v=r,b=0;if(l===i.Type.BITSTRING&&(o(t,r,1),b=t.getByte(),r--),0===b)try{u=t.length();var _={verbose:a.verbose,strict:!0,decodeBitStrings:!0},E=e(t,r,n+1,_),S=u-t.length();r-=S,l==i.Type.BITSTRING&&S++;var w=E.tagClass;S!==h||w!==i.Class.UNIVERSAL&&w!==i.Class.CONTEXT_SPECIFIC||(d=[E])}catch(e){}void 0===d&&(t.read=m,r=v)}if(void 0===d){if(void 0===h){if(a.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");h=r}if(l===i.Type.BMPSTRING)for(d="";h>0;h-=2)o(t,r,2),d+=String.fromCharCode(t.getInt16()),r-=2;else d=t.getBytes(h)}var k=void 0===y?null:{bitStringContents:y};return i.create(f,l,g,d,k)}(e,e.length(),0,t)},i.toDer=function(e){var t=n.util.createBuffer(),r=e.tagClass|e.type,o=n.util.createBuffer(),s=!1;if("bitStringContents"in e&&(s=!0,e.original&&(s=i.equals(e,e.original))),s)o.putBytes(e.bitStringContents);else if(e.composed){e.constructed?r|=32:o.putByte(0);for(var a=0;a1&&(0===e.value.charCodeAt(0)&&0==(128&e.value.charCodeAt(1))||255===e.value.charCodeAt(0)&&128==(128&e.value.charCodeAt(1)))?o.putBytes(e.value.substr(1)):o.putBytes(e.value);if(t.putByte(r),o.length()<=127)t.putByte(127&o.length());else{var u=o.length(),c="";do{c+=String.fromCharCode(255&u),u>>>=8}while(u>0);t.putByte(128|c.length);for(a=c.length-1;a>=0;--a)t.putByte(c.charCodeAt(a))}return t.putBuffer(o),t},i.oidToDer=function(e){var t,r,i,o,s=e.split("."),a=n.util.createBuffer();a.putByte(40*parseInt(s[0],10)+parseInt(s[1],10));for(var u=2;u>>=7,t||(o|=128),r.push(o),t=!1}while(i>0);for(var c=r.length-1;c>=0;--c)a.putByte(r[c])}return a},i.derToOid=function(e){var t;"string"==typeof e&&(e=n.util.createBuffer(e));var r=e.getByte();t=Math.floor(r/40)+"."+r%40;for(var i=0;e.length()>0;)i<<=7,128&(r=e.getByte())?i+=127&r:(t+="."+(i+r),i=0);return t},i.utcTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,2),10);r=r>=50?1900+r:2e3+r;var n=parseInt(e.substr(2,2),10)-1,i=parseInt(e.substr(4,2),10),o=parseInt(e.substr(6,2),10),s=parseInt(e.substr(8,2),10),a=0;if(e.length>11){var u=e.charAt(10),c=10;"+"!==u&&"-"!==u&&(a=parseInt(e.substr(10,2),10),c+=2)}if(t.setUTCFullYear(r,n,i),t.setUTCHours(o,s,a,0),c&&("+"===(u=e.charAt(c))||"-"===u)){var f=60*parseInt(e.substr(c+1,2),10)+parseInt(e.substr(c+4,2),10);f*=6e4,"+"===u?t.setTime(+t-f):t.setTime(+t+f)}return t},i.generalizedTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,4),10),n=parseInt(e.substr(4,2),10)-1,i=parseInt(e.substr(6,2),10),o=parseInt(e.substr(8,2),10),s=parseInt(e.substr(10,2),10),a=parseInt(e.substr(12,2),10),u=0,c=0,f=!1;"Z"===e.charAt(e.length-1)&&(f=!0);var l=e.length-5,h=e.charAt(l);"+"!==h&&"-"!==h||(c=60*parseInt(e.substr(l+1,2),10)+parseInt(e.substr(l+4,2),10),c*=6e4,"+"===h&&(c*=-1),f=!0);return"."===e.charAt(14)&&(u=1e3*parseFloat(e.substr(14),10)),f?(t.setUTCFullYear(r,n,i),t.setUTCHours(o,s,a,u),t.setTime(+t+c)):(t.setFullYear(r,n,i),t.setHours(o,s,a,u)),t},i.dateToUtcTime=function(e){if("string"==typeof e)return e;var t="",r=[];r.push((""+e.getUTCFullYear()).substr(2)),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(var n=0;n=-128&&e<128)return t.putSignedInt(e,8);if(e>=-32768&&e<32768)return t.putSignedInt(e,16);if(e>=-8388608&&e<8388608)return t.putSignedInt(e,24);if(e>=-2147483648&&e<2147483648)return t.putSignedInt(e,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=e,r},i.derToInteger=function(e){"string"==typeof e&&(e=n.util.createBuffer(e));var t=8*e.length();if(t>32)throw new Error("Integer too large; max is 32-bits.");return e.getSignedInt(t)},i.validate=function(e,t,r,o){var s=!1;if(e.tagClass!==t.tagClass&&void 0!==t.tagClass||e.type!==t.type&&void 0!==t.type)o&&(e.tagClass!==t.tagClass&&o.push("["+t.name+'] Expected tag class "'+t.tagClass+'", got "'+e.tagClass+'"'),e.type!==t.type&&o.push("["+t.name+'] Expected type "'+t.type+'", got "'+e.type+'"'));else if(e.constructed===t.constructed||void 0===t.constructed){if(s=!0,t.value&&n.util.isArray(t.value))for(var a=0,u=0;s&&u0&&(o+="\n");for(var s="",u=0;u1?o+="0x"+n.util.bytesToHex(e.value.slice(1)):o+="(none)",e.value.length>0){var h=e.value.charCodeAt(0);1==h?o+=" (1 unused bit shown)":h>1&&(o+=" ("+h+" unused bits shown)")}}else e.type===i.Type.OCTETSTRING?(a.test(e.value)||(o+="("+e.value+") "),o+="0x"+n.util.bytesToHex(e.value)):e.type===i.Type.UTF8?o+=n.util.decodeUtf8(e.value):e.type===i.Type.PRINTABLESTRING||e.type===i.Type.IA5String?o+=e.value:a.test(e.value)?o+="0x"+n.util.bytesToHex(e.value):0===e.value.length?o+="[null]":o+=e.value}return o}},,function(e,t,r){var n=r(3);e.exports=n.md=n.md||{},n.md.algorithms=n.md.algorithms||{}},,function(e,t,r){"use strict";(function(n){const i=r(18),o=r(339),s=r(260),a=r(174);(t=e.exports).addPrefix=((e,t)=>{let r;if(n.isBuffer(e))r=a.varintBufferEncode(e);else{if(!o[e])throw new Error("multicodec not recognized");r=o[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=s[t.toString("hex")];if(void 0===r)throw new Error("Code `0x"+t.toString("hex")+"` not found");return r}),t.getCode=(e=>i.decode(e)),t.getCodeVarint=(e=>{const t=o[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return t}),t.getVarint=(e=>i.encode(e));const u=r(340);Object.assign(t,u),t.print=r(341)}).call(this,r(0).Buffer)},,,function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){e.exports=function(){}},function(e,t,r){"use strict";var n=r(244);e.exports=function(e){return e=n(e),function(t){return function r(n,i){for(var o,s=!0;s;)s=!1,o=!0,t(n,function(t,n){if(!t&&!e(n))return o?s=!0:r(t,i);i(t,n)}),o=!1}}}},,,,function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){"use strict";const n=r(72),i=r(22),o=r(19);(t=e.exports=o(class{constructor(e,t,r){i(r,"A link requires a multihash to point to"),this._name=e||"",this._size=t,this._cid=new n(r)}toString(){return`DAGLink <${this._cid.toBaseEncodedString()} - name: "${this.name}", size: ${this.size}>`}toJSON(){return this._json||(this._json=Object.freeze({name:this.name,size:this.size,multihash:this._cid.toBaseEncodedString()})),Object.assign({},this._json)}get name(){return this._name}set name(e){throw new Error("Can't set property: 'name' is immutable")}get size(){return this._size}set size(e){throw new Error("Can't set property: 'size' is immutable")}get multihash(){return this._cid.buffer}set multihash(e){throw new Error("Can't set property: 'multihash' is immutable")}get cid(){return this._cid}set cid(e){throw new Error("Can't set property: 'cid' is immutable")}},{className:"DAGLink",symbolName:"@ipld/js-ipld-dag-pb/daglink"})).create=r(379),t.util=r(380)},function(e,t,r){var n=r(6).Buffer,i=r(80).Transform,o=r(60).StringDecoder;function s(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(7)(s,i),s.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},s.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},s.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},s.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=s},function(e,t,r){"use strict";var n=r(109),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var o=r(87);o.inherits=r(56);var s=r(197),a=r(137);o.inherits(l,s);for(var u=i(a.prototype),c=0;c>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function f(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,r){var n=r(3);function i(e,t){n.cipher.registerAlgorithm(e,function(){return new n.aes.Algorithm(e,t)})}r(140),r(204),r(8),e.exports=n.aes=n.aes||{},n.aes.startEncrypting=function(e,t,r,n){var i=y({key:e,output:r,decrypt:!1,mode:n});return i.start(t),i},n.aes.createEncryptionCipher=function(e,t){return y({key:e,output:null,decrypt:!1,mode:t})},n.aes.startDecrypting=function(e,t,r,n){var i=y({key:e,output:r,decrypt:!0,mode:n});return i.start(t),i},n.aes.createDecryptionCipher=function(e,t){return y({key:e,output:null,decrypt:!0,mode:t})},n.aes.Algorithm=function(e,t){f||h();var r=this;r.name=e,r.mode=new t({blockSize:16,cipher:{encrypt:function(e,t){return d(r._w,e,t,!1)},decrypt:function(e,t){return d(r._w,e,t,!0)}}}),r._init=!1},n.aes.Algorithm.prototype.initialize=function(e){if(!this._init){var t,r=e.key;if("string"!=typeof r||16!==r.length&&24!==r.length&&32!==r.length){if(n.util.isArray(r)&&(16===r.length||24===r.length||32===r.length)){t=r,r=n.util.createBuffer();for(var i=0;i>>=2;for(i=0;i>8^255&l^99,o[y]=l,s[l]=y,p=(h=e[l])<<24^l<<16^l<<8^l^h,d=((r=e[y])^(n=e[r])^(i=e[n]))<<24^(y^i)<<16^(y^n^i)<<8^y^r^i;for(var m=0;m<4;++m)u[m][y]=p,c[m][l]=d,p=p<<24|p>>>8,d=d<<24|d>>>8;0===y?y=g=1:(y=r^e[e[e[r^i]]],g^=e[e[g]])}}function p(e,t){for(var r,n=e.slice(0),i=1,s=n.length,u=l*(s+6+1),f=s;f>>16&255]<<24^o[r>>>8&255]<<16^o[255&r]<<8^o[r>>>24]^a[i]<<24,i++):s>6&&f%s==4&&(r=o[r>>>24]<<24^o[r>>>16&255]<<16^o[r>>>8&255]<<8^o[255&r]),n[f]=n[f-s]^r;if(t){for(var h,p=c[0],d=c[1],y=c[2],g=c[3],m=n.slice(0),v=(f=0,(u=n.length)-l);f>>24]]^d[o[h>>>16&255]]^y[o[h>>>8&255]]^g[o[255&h]];n=m}return n}function d(e,t,r,n){var i,a,f,l,h,p,d,y,g,m,v,b,_=e.length/4-1;n?(i=c[0],a=c[1],f=c[2],l=c[3],h=s):(i=u[0],a=u[1],f=u[2],l=u[3],h=o),p=t[0]^e[0],d=t[n?3:1]^e[1],y=t[2]^e[2],g=t[n?1:3]^e[3];for(var E=3,S=1;S<_;++S)m=i[p>>>24]^a[d>>>16&255]^f[y>>>8&255]^l[255&g]^e[++E],v=i[d>>>24]^a[y>>>16&255]^f[g>>>8&255]^l[255&p]^e[++E],b=i[y>>>24]^a[g>>>16&255]^f[p>>>8&255]^l[255&d]^e[++E],g=i[g>>>24]^a[p>>>16&255]^f[d>>>8&255]^l[255&y]^e[++E],p=m,d=v,y=b;r[0]=h[p>>>24]<<24^h[d>>>16&255]<<16^h[y>>>8&255]<<8^h[255&g]^e[++E],r[n?3:1]=h[d>>>24]<<24^h[y>>>16&255]<<16^h[g>>>8&255]<<8^h[255&p]^e[++E],r[2]=h[y>>>24]<<24^h[g>>>16&255]<<16^h[p>>>8&255]<<8^h[255&d]^e[++E],r[n?1:3]=h[g>>>24]<<24^h[p>>>16&255]<<16^h[d>>>8&255]<<8^h[255&y]^e[++E]}function y(e){var t,r="AES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start;return t.start=function(e,r){var o=null;r instanceof n.util.ByteBuffer&&(o=r,r={}),(r=r||{}).output=o,r.iv=e,i.call(t,r)},t}},function(e,t,r){var n=r(3);n.pki=n.pki||{};var i=e.exports=n.pki.oids=n.oids=n.oids||{};function o(e,t){i[e]=t,i[t]=e}function s(e,t){i[e]=t}o("1.2.840.113549.1.1.1","rsaEncryption"),o("1.2.840.113549.1.1.4","md5WithRSAEncryption"),o("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),o("1.2.840.113549.1.1.7","RSAES-OAEP"),o("1.2.840.113549.1.1.8","mgf1"),o("1.2.840.113549.1.1.9","pSpecified"),o("1.2.840.113549.1.1.10","RSASSA-PSS"),o("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),o("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),o("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),o("1.2.840.10040.4.3","dsa-with-sha1"),o("1.3.14.3.2.7","desCBC"),o("1.3.14.3.2.26","sha1"),o("2.16.840.1.101.3.4.2.1","sha256"),o("2.16.840.1.101.3.4.2.2","sha384"),o("2.16.840.1.101.3.4.2.3","sha512"),o("1.2.840.113549.2.5","md5"),o("1.2.840.113549.1.7.1","data"),o("1.2.840.113549.1.7.2","signedData"),o("1.2.840.113549.1.7.3","envelopedData"),o("1.2.840.113549.1.7.4","signedAndEnvelopedData"),o("1.2.840.113549.1.7.5","digestedData"),o("1.2.840.113549.1.7.6","encryptedData"),o("1.2.840.113549.1.9.1","emailAddress"),o("1.2.840.113549.1.9.2","unstructuredName"),o("1.2.840.113549.1.9.3","contentType"),o("1.2.840.113549.1.9.4","messageDigest"),o("1.2.840.113549.1.9.5","signingTime"),o("1.2.840.113549.1.9.6","counterSignature"),o("1.2.840.113549.1.9.7","challengePassword"),o("1.2.840.113549.1.9.8","unstructuredAddress"),o("1.2.840.113549.1.9.14","extensionRequest"),o("1.2.840.113549.1.9.20","friendlyName"),o("1.2.840.113549.1.9.21","localKeyId"),o("1.2.840.113549.1.9.22.1","x509Certificate"),o("1.2.840.113549.1.12.10.1.1","keyBag"),o("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),o("1.2.840.113549.1.12.10.1.3","certBag"),o("1.2.840.113549.1.12.10.1.4","crlBag"),o("1.2.840.113549.1.12.10.1.5","secretBag"),o("1.2.840.113549.1.12.10.1.6","safeContentsBag"),o("1.2.840.113549.1.5.13","pkcs5PBES2"),o("1.2.840.113549.1.5.12","pkcs5PBKDF2"),o("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),o("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),o("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),o("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),o("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),o("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),o("1.2.840.113549.2.7","hmacWithSHA1"),o("1.2.840.113549.2.8","hmacWithSHA224"),o("1.2.840.113549.2.9","hmacWithSHA256"),o("1.2.840.113549.2.10","hmacWithSHA384"),o("1.2.840.113549.2.11","hmacWithSHA512"),o("1.2.840.113549.3.7","des-EDE3-CBC"),o("2.16.840.1.101.3.4.1.2","aes128-CBC"),o("2.16.840.1.101.3.4.1.22","aes192-CBC"),o("2.16.840.1.101.3.4.1.42","aes256-CBC"),o("2.5.4.3","commonName"),o("2.5.4.5","serialName"),o("2.5.4.6","countryName"),o("2.5.4.7","localityName"),o("2.5.4.8","stateOrProvinceName"),o("2.5.4.10","organizationName"),o("2.5.4.11","organizationalUnitName"),o("2.16.840.1.113730.1.1","nsCertType"),s("2.5.29.1","authorityKeyIdentifier"),s("2.5.29.2","keyAttributes"),s("2.5.29.3","certificatePolicies"),s("2.5.29.4","keyUsageRestriction"),s("2.5.29.5","policyMapping"),s("2.5.29.6","subtreesConstraint"),s("2.5.29.7","subjectAltName"),s("2.5.29.8","issuerAltName"),s("2.5.29.9","subjectDirectoryAttributes"),s("2.5.29.10","basicConstraints"),s("2.5.29.11","nameConstraints"),s("2.5.29.12","policyConstraints"),s("2.5.29.13","basicConstraints"),o("2.5.29.14","subjectKeyIdentifier"),o("2.5.29.15","keyUsage"),s("2.5.29.16","privateKeyUsagePeriod"),o("2.5.29.17","subjectAltName"),o("2.5.29.18","issuerAltName"),o("2.5.29.19","basicConstraints"),s("2.5.29.20","cRLNumber"),s("2.5.29.21","cRLReason"),s("2.5.29.22","expirationDate"),s("2.5.29.23","instructionCode"),s("2.5.29.24","invalidityDate"),s("2.5.29.25","cRLDistributionPoints"),s("2.5.29.26","issuingDistributionPoint"),s("2.5.29.27","deltaCRLIndicator"),s("2.5.29.28","issuingDistributionPoint"),s("2.5.29.29","certificateIssuer"),s("2.5.29.30","nameConstraints"),o("2.5.29.31","cRLDistributionPoints"),o("2.5.29.32","certificatePolicies"),s("2.5.29.33","policyMappings"),s("2.5.29.34","policyConstraints"),o("2.5.29.35","authorityKeyIdentifier"),s("2.5.29.36","policyConstraints"),o("2.5.29.37","extKeyUsage"),s("2.5.29.46","freshestCRL"),s("2.5.29.54","inhibitAnyPolicy"),o("1.3.6.1.4.1.11129.2.4.2","timestampList"),o("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),o("1.3.6.1.5.5.7.3.1","serverAuth"),o("1.3.6.1.5.5.7.3.2","clientAuth"),o("1.3.6.1.5.5.7.3.3","codeSigning"),o("1.3.6.1.5.5.7.3.4","emailProtection"),o("1.3.6.1.5.5.7.3.8","timeStamping")},,,,function(e,t){e.exports=function(){for(var e={},t=0;t-1},Ae.prototype.set=function(e,t){var r=this.__data__,n=xe(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},Ce.prototype.clear=function(){this.__data__={hash:new ke,map:new(le||Ae),string:new ke}},Ce.prototype.delete=function(e){return Je(this,e).delete(e)},Ce.prototype.get=function(e){return Je(this,e).get(e)},Ce.prototype.has=function(e){return Je(this,e).has(e)},Ce.prototype.set=function(e,t){return Je(this,e).set(e,t),this},Be.prototype.add=Be.prototype.push=function(e){return this.__data__.set(e,o),this},Be.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.clear=function(){this.__data__=new Ae},Te.prototype.delete=function(e){return this.__data__.delete(e)},Te.prototype.get=function(e){return this.__data__.get(e)},Te.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Ae){var i=r.__data__;if(!le||i.lengthc))return!1;var l=o.get(e);if(l&&o.get(t))return l==t;var h=-1,p=!0,d=i&s?new Be:void 0;for(o.set(e,t),o.set(t,e);++h-1&&e%1==0&&e-1&&e%1==0&&e<=c}function at(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ut(e){return!!e&&"object"==typeof e}function ct(e){return"symbol"==typeof e||ut(e)&&ne.call(e)==w}var ft=F?function(e){return function(t){return e(t)}}(F):function(e){return ut(e)&&st(e.length)&&!!L[ne.call(e)]};function lt(e){return it(e)?Ie(e):je(e)}function ht(e){return e}r.exports=function(e,t){return(nt(e)?V:Fe)(e,Ue(t))}}).call(this,r(12),r(50)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){t|=0;for(var r=Math.max(e.length-t,0),n=Array(r),i=0;i65&&-1!==s){var a=t[s];","===a?(++s,t=t.substr(0,s)+"\r\n "+t.substr(s)):t=t.substr(0,s)+"\r\n"+a+t.substr(s+1),o=i-s-1,s=-1,++i}else" "!==t[i]&&"\t"!==t[i]&&","!==t[i]||(s=i);return t}function s(e){return e.replace(/^\s+/,"")}i.encode=function(e,t){t=t||{};var r,i="-----BEGIN "+e.type+"-----\r\n";if(e.procType&&(i+=o(r={name:"Proc-Type",values:[String(e.procType.version),e.procType.type]})),e.contentDomain&&(i+=o(r={name:"Content-Domain",values:[e.contentDomain]})),e.dekInfo&&(r={name:"DEK-Info",values:[e.dekInfo.algorithm]},e.dekInfo.parameters&&r.values.push(e.dekInfo.parameters),i+=o(r)),e.headers)for(var s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,r){"use strict";e.exports=function(e){return function(t,r){r(e)}}},,function(e,t,r){e.exports=i;var n=r(14).EventEmitter;function i(){n.call(this)}r(56)(i,n),i.Readable=r(136),i.Writable=r(403),i.Duplex=r(404),i.Transform=r(405),i.PassThrough=r(406),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(f(),0===n.listenerCount(this,"error"))throw e}function f(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return r.on("error",c),e.on("error",c),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e}},function(e,t,r){"use strict";function n(e){return e}var i=r(92);e.exports=function(e){if(!e)return n;e=i(e);var t,r,o=!1;return function(n){return function i(s,a){if(r)return a(r);s?(r=s,n(s,o?function(e){o?t=a:a(s)}:function(e){a(s)})):n(null,function(n,s){n?a(n):r?a(r):(o=!0,e(s,function(e,n){o=!1,r?(a(r),t&&t(r)):e?i(e,a):a(null,n)}))})}}}},,,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.preMultiaddrToJson=t.preMultiaddrFromJson=t.isMultiaddrJson=t.isMultiaddr=t.multiaddrToJson=t.multiaddrFromJson=void 0;var n,i=r(344),o=(n=i)&&n.__esModule?n:{default:n};var s=t.multiaddrFromJson=function(e){return new o.default(e.multiaddr)},a=t.multiaddrToJson=function(e){return{__ipfsPostMsgProxyType:"Multiaddr",multiaddr:e.toString()}},u=t.isMultiaddr=function(e){return e&&o.default.isMultiaddr(e)},c=t.isMultiaddrJson=function(e){return e&&"Multiaddr"===e.__ipfsPostMsgProxyType};t.preMultiaddrFromJson=function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n=0),a[8]){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,a[6]?parseInt(a[6]):0);break;case"e":r=a[7]?parseFloat(r).toExponential(a[7]):parseFloat(r).toExponential();break;case"f":r=a[7]?parseFloat(r).toFixed(a[7]):parseFloat(r);break;case"g":r=a[7]?String(Number(r.toPrecision(a[7]))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=a[7]?r.substring(0,a[7]):r;break;case"t":r=String(!!r),r=a[7]?r.substring(0,a[7]):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=a[7]?r.substring(0,a[7]):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=a[7]?r.substring(0,a[7]):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(a[8])?y+=r:(!i.number.test(a[8])||l&&!a[3]?h="":(h=l?"+":"-",r=r.toString().replace(i.sign,"")),c=a[4]?"0"===a[4]?"0":a[4].charAt(1):" ",f=a[6]-(h+r).length,u=a[6]&&f>0?c.repeat(f):"",y+=a[5]?h+r+u:"0"===c?h+u+r:u+h+r)}return y}(function(e){if(a[e])return a[e];var t,r=e,n=[],o=0;for(;r;){if(null!==(t=i.text.exec(r)))n.push(t[0]);else if(null!==(t=i.modulo.exec(r)))n.push("%");else{if(null===(t=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var s=[],u=t[2],c=[];if(null===(c=i.key.exec(u)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(u=u.substring(c[0].length));)if(null!==(c=i.key_access.exec(u)))s.push(c[1]);else{if(null===(c=i.index_access.exec(u)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}t[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push(t)}r=r.substring(t[0].length)}return a[e]=n}(e),arguments)}function s(e,t){return o.apply(null,[e].concat(t||[]))}var a=Object.create(null);t.sprintf=o,t.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(n=function(){return{sprintf:o,vsprintf:s}}.call(t,r,t,e))||(e.exports=n))}()},function(e,t,r){(function(t){e.exports=function(e,r){for(var n=Math.min(e.length,r.length),i=new t(n),o=0;ot.blockLength&&(t.start(),t.update(s.bytes()),s=t.digest()),r=n.util.createBuffer(),i=n.util.createBuffer(),c=s.length();for(u=0;u>>0,u>>>0];for(var c=i.fullMessageLength.length-1;c>=0;--c)i.fullMessageLength[c]+=u[1],u[1]=u[0]+(i.fullMessageLength[c]/4294967296>>>0),i.fullMessageLength[c]=i.fullMessageLength[c]>>>0,u[0]=u[1]/4294967296>>>0;return t.putBytes(o),a(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(t.bytes());var u,c=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(o.substr(0,i.blockLength-c));for(var f=8*i.fullMessageLength[0],l=0;l>>0,s.putInt32(f>>>0),f=u>>>0;s.putInt32(f);var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};a(h,r,s);var p=n.util.createBuffer();return p.putInt32(h.h0),p.putInt32(h.h1),p.putInt32(h.h2),p.putInt32(h.h3),p.putInt32(h.h4),p},i};var o=null,s=!1;function a(e,t,r){for(var n,i,o,s,a,u,c,f=r.length();f>=64;){for(i=e.h0,o=e.h1,s=e.h2,a=e.h3,u=e.h4,c=0;c<16;++c)n=r.getInt32(),t[c]=n,n=(i<<5|i>>>27)+(a^o&(s^a))+u+1518500249+n,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;c<20;++c)n=(n=t[c-3]^t[c-8]^t[c-14]^t[c-16])<<1|n>>>31,t[c]=n,n=(i<<5|i>>>27)+(a^o&(s^a))+u+1518500249+n,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;c<32;++c)n=(n=t[c-3]^t[c-8]^t[c-14]^t[c-16])<<1|n>>>31,t[c]=n,n=(i<<5|i>>>27)+(o^s^a)+u+1859775393+n,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;c<40;++c)n=(n=t[c-6]^t[c-16]^t[c-28]^t[c-32])<<2|n>>>30,t[c]=n,n=(i<<5|i>>>27)+(o^s^a)+u+1859775393+n,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;c<60;++c)n=(n=t[c-6]^t[c-16]^t[c-28]^t[c-32])<<2|n>>>30,t[c]=n,n=(i<<5|i>>>27)+(o&s|a&(o^s))+u+2400959708+n,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;c<80;++c)n=(n=t[c-6]^t[c-16]^t[c-28]^t[c-32])<<2|n>>>30,t[c]=n,n=(i<<5|i>>>27)+(o^s^a)+u+3395469782+n,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;e.h0=e.h0+i|0,e.h1=e.h1+o|0,e.h2=e.h2+s|0,e.h3=e.h3+a|0,e.h4=e.h4+u|0,f-=64}}},function(e,t,r){"use strict";const n=t;n.Reporter=r(428).Reporter,n.DecoderBuffer=r(222).DecoderBuffer,n.EncoderBuffer=r(222).EncoderBuffer,n.Node=r(429)},function(e,t,r){"use strict";e.exports=function(e,t){var r,n;function i(o){if(r=o,n)return i.abort();!function i(){for(var o=!0,s=!1;o;)if(s=!1,r(null,function(a,u){if(s=!0,a=a||n){if(o=!1,t)t(!0===a?null:a);else if(a&&!0!==a)throw a}else e&&!1===e(u)||n?(o=!1,r(n||!0,t||function(){})):o||i()}),!s)return void(o=!1)}()}return i.abort=function(e,t){if("function"==typeof e&&(t=e,e=!0),n=e||!0,r)return r(n,t||function(){})},i}},function(e,t){e.exports=function(e){return e&&("string"==typeof e?function(t){return t[e]}:"object"==typeof e&&"function"==typeof e.exec?function(t){var r=e.exec(t);return r&&r[0]}:e)}},,,function(e,t,r){var n=r(3);if(r(43),r(112),r(62),r(211),r(212),r(32),r(8),void 0===i)var i=n.jsbn.BigInteger;var o=n.asn1;n.pki=n.pki||{},e.exports=n.pki.rsa=n.rsa=n.rsa||{};var s=n.pki,a=[6,4,2,4,2,4,6,2],u={name:"PrivateKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},c={name:"RSAPrivateKey",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},f={name:"RSAPublicKey",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},l=n.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:o.Class.UNIVERSAL,type:o.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},h=function(e){var t;if(!(e.algorithm in s.oids)){var r=new Error("Unknown message digest algorithm.");throw r.algorithm=e.algorithm,r}t=s.oids[e.algorithm];var n=o.oidToDer(t).getBytes(),i=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[]),a=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[]);a.value.push(o.create(o.Class.UNIVERSAL,o.Type.OID,!1,n)),a.value.push(o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,""));var u=o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,e.digest().getBytes());return i.value.push(a),i.value.push(u),o.toDer(i).getBytes()},p=function(e,t,r){if(r)return e.modPow(t.e,t.n);if(!t.p||!t.q)return e.modPow(t.d,t.n);var o;t.dP||(t.dP=t.d.mod(t.p.subtract(i.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(i.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));do{o=new i(n.util.bytesToHex(n.random.getBytes(t.n.bitLength()/8)),16)}while(o.compareTo(t.n)>=0||!o.gcd(t.n).equals(i.ONE));for(var s=(e=e.multiply(o.modPow(t.e,t.n)).mod(t.n)).mod(t.p).modPow(t.dP,t.p),a=e.mod(t.q).modPow(t.dQ,t.q);s.compareTo(a)<0;)s=s.add(t.p);var u=s.subtract(a).multiply(t.qInv).mod(t.p).multiply(t.q).add(a);return u=u.multiply(o.modInverse(t.n)).mod(t.n)};function d(e,t,r){var i=n.util.createBuffer(),o=Math.ceil(t.n.bitLength()/8);if(e.length>o-11){var s=new Error("Message is too long for PKCS#1 v1.5 padding.");throw s.length=e.length,s.max=o-11,s}i.putByte(0),i.putByte(r);var a,u=o-3-e.length;if(0===r||1===r){a=0===r?0:255;for(var c=0;c0;){var f=0,l=n.random.getBytes(u);for(c=0;c1;){if(255!==s.getByte()){--s.read;break}++c}else if(2===u)for(c=0;s.length()>1;){if(0===s.getByte()){--s.read;break}++c}if(0!==s.getByte()||c!==o-3-s.length())throw new Error("Encryption block is invalid.");return s.getBytes()}function g(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var r=n.util.hexToBytes(t);return r.length>1&&(0===r.charCodeAt(0)&&0==(128&r.charCodeAt(1))||255===r.charCodeAt(0)&&128==(128&r.charCodeAt(1)))?r.substr(1):r}function m(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}function v(e){return"undefined"!=typeof window&&"object"==typeof window.crypto&&"object"==typeof window.crypto.subtle&&"function"==typeof window.crypto.subtle[e]}function b(e){return"undefined"!=typeof window&&"object"==typeof window.msCrypto&&"object"==typeof window.msCrypto.subtle&&"function"==typeof window.msCrypto.subtle[e]}function _(e){for(var t=n.util.hexToBytes(e.toString(16)),r=new Uint8Array(t.length),i=0;i0;)f.putByte(0),--l;return f.putBytes(n.util.hexToBytes(c)),f.getBytes()},s.rsa.decrypt=function(e,t,r,o){var s=Math.ceil(t.n.bitLength()/8);if(e.length!==s){var a=new Error("Encrypted message length is invalid.");throw a.length=e.length,a.expected=s,a}var u=new i(n.util.createBuffer(e).toHex(),16);if(u.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var c=p(u,t,r).toString(16),f=n.util.createBuffer(),l=s-Math.ceil(c.length/2);l>0;)f.putByte(0),--l;return f.putBytes(n.util.hexToBytes(c)),!1!==o?y(f.getBytes(),t,r):f.getBytes()},s.rsa.createKeyPairGenerationState=function(e,t,r){"string"==typeof e&&(e=parseInt(e,10)),e=e||2048;var o,s=(r=r||{}).prng||n.random,a={nextBytes:function(e){for(var t=s.getBytesSync(e.length),r=0;r>1,pBits:e-(e>>1),pqState:0,num:null,keys:null}).e.fromInt(o.eInt),o},s.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var r=new i(null);r.fromInt(30);for(var n,o=0,u=function(e,t){return e|t},c=+new Date,f=0;null===e.keys&&(t<=0||fl?e.pqState=0:e.num.isProbablePrime(m(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(a[o++%8],0):2===e.pqState?e.pqState=0===e.num.subtract(i.ONE).gcd(e.e).compareTo(i.ONE)?3:0:3===e.pqState&&(e.pqState=0,null===e.p?e.p=e.num:e.q=e.num,null!==e.p&&null!==e.q&&++e.state,e.num=null)}else if(1===e.state)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(2===e.state)e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(3===e.state)0===e.phi.gcd(e.e).compareTo(i.ONE)?++e.state:(e.p=null,e.q=null,e.state=0);else if(4===e.state)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(5===e.state){var p=e.e.modInverse(e.phi);e.keys={privateKey:s.rsa.setPrivateKey(e.n,e.e,p,e.p,e.q,p.mod(e.p1),p.mod(e.q1),e.q.modInverse(e.p)),publicKey:s.rsa.setPublicKey(e.n,e.e)}}f+=(n=+new Date)-c,c=n}return null!==e.keys},s.rsa.generateKeyPair=function(e,t,r,a){if(1===arguments.length?"object"==typeof e?(r=e,e=void 0):"function"==typeof e&&(a=e,e=void 0):2===arguments.length?"number"==typeof e?"function"==typeof t?(a=t,t=void 0):"number"!=typeof t&&(r=t,t=void 0):(r=e,a=t,e=void 0,t=void 0):3===arguments.length&&("number"==typeof t?"function"==typeof r&&(a=r,r=void 0):(a=r,r=t,t=void 0)),r=r||{},void 0===e&&(e=r.bits||2048),void 0===t&&(t=r.e||65537),!n.options.usePureJavaScript&&a&&e>=256&&e<=16384&&(65537===t||3===t)){if(v("generateKey")&&v("exportKey"))return window.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:_(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(e){return window.crypto.subtle.exportKey("pkcs8",e.privateKey)}).then(void 0,function(e){a(e)}).then(function(e){if(e){var t=s.privateKeyFromAsn1(o.fromDer(n.util.createBuffer(e)));a(null,{privateKey:t,publicKey:s.setRsaPublicKey(t.n,t.e)})}});if(b("generateKey")&&b("exportKey")){var u=window.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:_(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);return u.oncomplete=function(e){var t=e.target.result,r=window.msCrypto.subtle.exportKey("pkcs8",t.privateKey);r.oncomplete=function(e){var t=e.target.result,r=s.privateKeyFromAsn1(o.fromDer(n.util.createBuffer(t)));a(null,{privateKey:r,publicKey:s.setRsaPublicKey(r.n,r.e)})},r.onerror=function(e){a(e)}},void(u.onerror=function(e){a(e)})}}var c=s.rsa.createKeyPairGenerationState(e,t,r);if(!a)return s.rsa.stepKeyPairGenerationState(c,0),c.keys;!function(e,t,r){"function"==typeof t&&(r=t,t={});var o={algorithm:{name:(t=t||{}).algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};"prng"in t&&(o.prng=t.prng);function a(){u(e.pBits,function(t,n){return t?r(t):(e.p=n,null!==e.q?c(t,e.q):void u(e.qBits,c))})}function u(e,t){n.prime.generateProbablePrime(e,o,t)}function c(t,n){if(t)return r(t);if(e.q=n,e.p.compareTo(e.q)<0){var o=e.p;e.p=e.q,e.q=o}if(0!==e.p.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.p=null,void a();if(0!==e.q.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.q=null,void u(e.qBits,c);if(e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),0!==e.phi.gcd(e.e).compareTo(i.ONE))return e.p=e.q=null,void a();if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits)return e.q=null,void u(e.qBits,c);var f=e.e.modInverse(e.phi);e.keys={privateKey:s.rsa.setPrivateKey(e.n,e.e,f,e.p,e.q,f.mod(e.p1),f.mod(e.q1),e.q.modInverse(e.p)),publicKey:s.rsa.setPublicKey(e.n,e.e)},r(null,e.keys)}a()}(c,r,a)},s.setRsaPublicKey=s.rsa.setPublicKey=function(e,t){var r={n:e,e:t,encrypt:function(e,t,i){if("string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===t)t={encode:function(e,t,r){return d(e,t,2).getBytes()}};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={encode:function(e,t){return n.pkcs1.encode_rsa_oaep(t,e,i)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(t))t={encode:function(e){return e}};else if("string"==typeof t)throw new Error('Unsupported encryption scheme: "'+t+'".');var o=t.encode(e,r,!0);return s.rsa.encrypt(o,r,!0)},verify:function(e,t,n){"string"==typeof n?n=n.toUpperCase():void 0===n&&(n="RSASSA-PKCS1-V1_5"),"RSASSA-PKCS1-V1_5"===n?n={verify:function(e,t){return t=y(t,r,!0),e===o.fromDer(t).value[1].value}}:"NONE"!==n&&"NULL"!==n&&null!==n||(n={verify:function(e,t){return e===(t=y(t,r,!0))}});var i=s.rsa.decrypt(t,r,!0,!1);return n.verify(e,i,r.n.bitLength())}};return r},s.setRsaPrivateKey=s.rsa.setPrivateKey=function(e,t,r,i,o,a,u,c){var f={n:e,e:t,d:r,p:i,q:o,dP:a,dQ:u,qInv:c,decrypt:function(e,t,r){"string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5");var i=s.rsa.decrypt(e,f,!1,!1);if("RSAES-PKCS1-V1_5"===t)t={decode:y};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={decode:function(e,t){return n.pkcs1.decode_rsa_oaep(t,e,r)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(t))throw new Error('Unsupported encryption scheme: "'+t+'".');t={decode:function(e){return e}}}return t.decode(i,f,!1)},sign:function(e,t){var r=!1;"string"==typeof t&&(t=t.toUpperCase()),void 0===t||"RSASSA-PKCS1-V1_5"===t?(t={encode:h},r=1):"NONE"!==t&&"NULL"!==t&&null!==t||(t={encode:function(){return e}},r=1);var n=t.encode(e,f.n.bitLength());return s.rsa.encrypt(n,f,r)}};return f},s.wrapRsaPrivateKey=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(0).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(s.oids.rsaEncryption).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")]),o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,o.toDer(e).getBytes())])},s.privateKeyFromAsn1=function(e){var t,r,a,f,l,h,p,d,y={},g=[];if(o.validate(e,u,y,g)&&(e=o.fromDer(n.util.createBuffer(y.privateKey))),y={},g=[],!o.validate(e,c,y,g)){var m=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw m.errors=g,m}return t=n.util.createBuffer(y.privateKeyModulus).toHex(),r=n.util.createBuffer(y.privateKeyPublicExponent).toHex(),a=n.util.createBuffer(y.privateKeyPrivateExponent).toHex(),f=n.util.createBuffer(y.privateKeyPrime1).toHex(),l=n.util.createBuffer(y.privateKeyPrime2).toHex(),h=n.util.createBuffer(y.privateKeyExponent1).toHex(),p=n.util.createBuffer(y.privateKeyExponent2).toHex(),d=n.util.createBuffer(y.privateKeyCoefficient).toHex(),s.setRsaPrivateKey(new i(t,16),new i(r,16),new i(a,16),new i(f,16),new i(l,16),new i(h,16),new i(p,16),new i(d,16))},s.privateKeyToAsn1=s.privateKeyToRSAPrivateKey=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(0).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(e.n)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(e.e)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(e.d)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(e.p)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(e.q)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(e.dP)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(e.dQ)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(e.qInv))])},s.publicKeyFromAsn1=function(e){var t={},r=[];if(o.validate(e,l,t,r)){var a,u=o.derToOid(t.publicKeyOid);if(u!==s.oids.rsaEncryption)throw(a=new Error("Cannot read public key. Unknown OID.")).oid=u,a;e=t.rsaPublicKey}if(r=[],!o.validate(e,f,t,r))throw(a=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=r,a;var c=n.util.createBuffer(t.publicKeyModulus).toHex(),h=n.util.createBuffer(t.publicKeyExponent).toHex();return s.setRsaPublicKey(new i(c,16),new i(h,16))},s.publicKeyToAsn1=s.publicKeyToSubjectPublicKeyInfo=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(s.oids.rsaEncryption).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")]),o.create(o.Class.UNIVERSAL,o.Type.BITSTRING,!1,[s.publicKeyToRSAPublicKey(e)])])},s.publicKeyToRSAPublicKey=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(e.n)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(e.e))])}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){r=(0,o.default)(r||n.default);var a=(0,s.default)(t);if(!e())return r(null);var u=function(t){if(t)return r(t);if(e())return a(u);var n=(0,i.default)(arguments,1);r.apply(null,[null].concat(n))};a(u)};var n=a(r(51)),i=a(r(74)),o=a(r(105)),s=a(r(35));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,r){"use strict";e.exports=function(){return function(e,t){t(!0)}}},,function(e,t,r){"use strict";var n,i,o,s=r(314),a="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";function u(){o=!1}function c(e){if(e){if(e!==n){if(e.length!==a.length)throw new Error("Custom alphabet for shortid must be "+a.length+" unique characters. You submitted "+e.length+" characters: "+e);var t=e.split("").filter(function(e,t,r){return t!==r.lastIndexOf(e)});if(t.length)throw new Error("Custom alphabet for shortid must be "+a.length+" unique characters. These characters were not unique: "+t.join(", "));n=e,u()}}else n!==a&&(n=a,u())}function f(){return o||(o=function(){n||c(a);for(var e,t=n.split(""),r=[],i=s.nextValue();t.length>0;)i=s.nextValue(),e=Math.floor(i*t.length),r.push(t.splice(e,1)[0]);return r.join("")}())}e.exports={get:function(){return n||a},characters:function(e){return c(e),n},seed:function(e){s.seed(e),i!==e&&(u(),i=e)},lookup:function(e){return f()[e]},shuffled:f}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.preArrayOf=function(e,t,r){return function(){for(var n=arguments.length,i=Array(n),o=0;oe.toJSON()),multihash:this._cid.toBaseEncodedString(),size:this.size})),Object.assign({},this._json)}toString(){return`DAGNode <${this._cid.toBaseEncodedString()} - data: "${this.data.toString()}", links: ${this.links.length}, size: ${this.size}>`}get data(){return this._data}set data(e){throw new Error("Can't set property: 'data' is immutable")}get links(){return this._links}set links(e){throw new Error("Can't set property: 'links' is immutable")}get serialized(){return this._serialized}set serialized(e){throw new Error("Can't set property: 'serialized' is immutable")}get size(){return void 0===this._size&&(this._size=this.links.reduce((e,t)=>e+t.size,this.serialized.length)),this._size}set size(e){throw new Error("Can't set property: 'size' is immutable")}get multihash(){return this._cid.buffer}set multihash(e){throw new Error("Can't set property: 'multihash' is immutable")}get cid(){return this._cid}set cid(e){throw new Error("Can't set property: 'cid' is immutable")}},{className:"DAGNode",symbolName:"@ipld/js-ipld-dag-pb/dagnode"})).create=r(104),t.clone=r(381),t.addLink=r(382),t.rmLink=r(383)}).call(this,r(0).Buffer)},function(e,t,r){(function(e){var n=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),u=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&t._extend(n,r),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),f(n,e,n.depth)}function u(e,t){var r=a.styles[t];return r?"["+a.colors[r][0]+"m"+e+"["+a.colors[r][1]+"m":e}function c(e,t){return e}function f(e,r,n){if(e.customInspect&&r&&w(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return m(i)||(i=f(e,i,n)),i}var o=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(g(t))return e.stylize(""+t,"number");if(d(t))return e.stylize(""+t,"boolean");if(y(t))return e.stylize("null","null")}(e,r);if(o)return o;var s=Object.keys(r),a=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),S(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(w(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(b(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return e.stylize(Date.prototype.toString.call(r),"date");if(S(r))return l(r)}var c,_="",k=!1,A=["{","}"];(p(r)&&(k=!0,A=["[","]"]),w(r))&&(_=" [Function"+(r.name?": "+r.name:"")+"]");return b(r)&&(_=" "+RegExp.prototype.toString.call(r)),E(r)&&(_=" "+Date.prototype.toUTCString.call(r)),S(r)&&(_=" "+l(r)),0!==s.length||k&&0!=r.length?n<0?b(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=k?function(e,t,r,n,i){for(var o=[],s=0,a=t.length;s=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(c,_,A)):A[0]+_+A[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),B(n,i)||(s="["+i+"]"),a||(e.seen.indexOf(u.value)<0?(a=y(r)?f(e,u.value,null):f(e,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n")):a=e.stylize("[Circular]","special")),v(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function p(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function y(e){return null===e}function g(e){return"number"==typeof e}function m(e){return"string"==typeof e}function v(e){return void 0===e}function b(e){return _(e)&&"[object RegExp]"===k(e)}function _(e){return"object"==typeof e&&null!==e}function E(e){return _(e)&&"[object Date]"===k(e)}function S(e){return _(e)&&("[object Error]"===k(e)||e instanceof Error)}function w(e){return"function"==typeof e}function k(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(r){if(v(o)&&(o=e.env.NODE_DEBUG||""),r=r.toUpperCase(),!s[r])if(new RegExp("\\b"+r+"\\b","i").test(o)){var n=e.pid;s[r]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",r,n,e)}}else s[r]=function(){};return s[r]},t.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=d,t.isNull=y,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=m,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=v,t.isRegExp=b,t.isObject=_,t.isDate=E,t.isError=S,t.isFunction=w,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(357);var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function B(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(e=new Date,r=[A(e.getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":"),[e.getDate(),C[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(56),t._extend=function(e,t){if(!t||!_(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var T="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function I(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(T&&e[T]){var t;if("function"!=typeof(t=e[T]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,T,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise(function(e,n){t=e,r=n}),i=[],o=0;ou.isDAGLink(e)?e:u.util.createDagLinkFromB58EncodedHash(e)),h=i(l,s);o({data:e,links:h},(t,r)=>{if(t)return f(t);n(r,c,(t,n)=>{if(t)return f(t);const i=new a(e,h,r,n);f(null,i)})})}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){if(null===e)throw new Error("Callback was already called.");var t=e;e=null,t.apply(this,arguments)}},e.exports=t.default},function(e,t,r){"use strict";(function(n){const i=r(57);(t=e.exports).cloneData=function(e){let t;return e.data&&e.data.length>0?(t=n.alloc(e.data.length),e.data.copy(t)):t=n.alloc(0),t},t.cloneLinks=function(e){return e.links.slice()},t.linkSort=function(e,t){const r=n.from(e.name||""),i=n.from(t.name||"");return r.compare(i)},t.toDAGLink=function(e){return new i("",e.size,e.multihash)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prePeerIdToJson=t.prePeerIdFromJson=t.isPeerIdJson=t.isPeerId=t.peerIdToJson=t.peerIdFromJson=t.prePeerInfoToJson=t.prePeerInfoFromJson=t.isPeerInfoJson=t.isPeerInfo=t.peerInfoToJson=t.peerInfoFromJson=void 0;var n=s(r(385)),i=s(r(466)),o=r(84);function s(e){return e&&e.__esModule?e:{default:e}}var a=t.peerInfoFromJson=function(e){return l(e.id).then(function(t){var r=new n.default(t);return e.multiaddrs.forEach(function(e){r.multiaddrs.add((0,o.multiaddrFromJson)(e))}),e._connectedMultiaddr&&r.connect((0,o.multiaddrFromJson)(e._connectedMultiaddr)),r})},u=t.peerInfoToJson=function(e){return{__ipfsPostMsgProxyType:"PeerInfo",id:h(e.id),multiaddrs:e.multiaddrs.toArray().map(o.multiaddrToJson),_connectedMultiaddr:e._connectedMultiaddr?(0,o.multiaddrToJson)(e._connectedMultiaddr):null}},c=t.isPeerInfo=n.default.isPeerInfo,f=t.isPeerInfoJson=function(e){return e&&"PeerInfo"===e.__ipfsPostMsgProxyType},l=(t.prePeerInfoFromJson=function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n>>24]^f[d>>>16&255]^l[y>>>8&255]^h[255&g]^t[m++],s=c[d>>>24]^f[y>>>16&255]^l[g>>>8&255]^h[255&p]^t[m++],a=c[y>>>24]^f[g>>>16&255]^l[p>>>8&255]^h[255&d]^t[m++],u=c[g>>>24]^f[p>>>16&255]^l[d>>>8&255]^h[255&y]^t[m++],p=o,d=s,y=a,g=u;return o=(n[p>>>24]<<24|n[d>>>16&255]<<16|n[y>>>8&255]<<8|n[255&g])^t[m++],s=(n[d>>>24]<<24|n[y>>>16&255]<<16|n[g>>>8&255]<<8|n[255&p])^t[m++],a=(n[y>>>24]<<24|n[g>>>16&255]<<16|n[p>>>8&255]<<8|n[255&d])^t[m++],u=(n[g>>>24]<<24|n[p>>>16&255]<<16|n[d>>>8&255]<<8|n[255&y])^t[m++],[o>>>=0,s>>>=0,a>>>=0,u>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,u=0;u<256;++u){var c=a^a<<1^a<<2^a<<3^a<<4;c=c>>>8^255&c^99,r[s]=c,n[c]=s;var f=e[s],l=e[f],h=e[l],p=257*e[c]^16843008*c;i[0][s]=p<<24|p>>>8,i[1][s]=p<<16|p>>>16,i[2][s]=p<<8|p>>>24,i[3][s]=p,p=16843009*h^65537*l^257*f^16843008*s,o[0][c]=p<<24|p>>>8,o[1][c]=p<<16|p>>>16,o[2][c]=p<<8|p>>>24,o[3][c]=p,0===s?s=a=1:(s=f^e[e[e[h^f]]],a^=e[e[a]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function c(e){this._key=i(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o>>24,s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s],s^=a[o/t|0]<<24):t>6&&o%t==4&&(s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s]),i[o]=i[o-t]^s}for(var c=[],f=0;f>>24]]^u.INV_SUB_MIX[1][u.SBOX[h>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[h>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&h]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return s(e=i(e),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},c.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=s(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=c},function(e,t,r){"use strict";(function(t){!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,r,n,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,r)});case 3:return t.nextTick(function(){e.call(null,r,n)});case 4:return t.nextTick(function(){e.call(null,r,n,i)});default:for(o=new Array(a-1),s=0;s8?3:1,m=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],b=0,_=0;_>>4^S))<<4,E^=t=65535&((S^=t)>>>-16^E),E^=(t=858993459&(E>>>2^(S^=t<<-16)))<<2,E^=t=65535&((S^=t)>>>-16^E),E^=(t=1431655765&(E>>>1^(S^=t<<-16)))<<1,E^=t=16711935&((S^=t)>>>8^E),t=(E^=(t=1431655765&(E>>>1^(S^=t<<8)))<<1)<<8|(S^=t)>>>20&240,E=S<<24|S<<8&16711680|S>>>8&65280|S>>>24&240,S=t;for(var w=0;w>>26,S=S<<2|S>>>26):(E=E<<1|E>>>27,S=S<<1|S>>>27);var k=r[(E&=-15)>>>28]|n[E>>>24&15]|i[E>>>20&15]|o[E>>>16&15]|s[E>>>12&15]|a[E>>>8&15]|u[E>>>4&15],A=c[(S&=-15)>>>28]|f[S>>>24&15]|l[S>>>20&15]|h[S>>>16&15]|p[S>>>12&15]|d[S>>>8&15]|y[S>>>4&15];t=65535&(A>>>16^k),m[b++]=k^t,m[b++]=A^t<<16}}return m}(t),this._init=!0}},i("DES-ECB",n.cipher.modes.ecb),i("DES-CBC",n.cipher.modes.cbc),i("DES-CFB",n.cipher.modes.cfb),i("DES-OFB",n.cipher.modes.ofb),i("DES-CTR",n.cipher.modes.ctr),i("3DES-ECB",n.cipher.modes.ecb),i("3DES-CBC",n.cipher.modes.cbc),i("3DES-CFB",n.cipher.modes.cfb),i("3DES-OFB",n.cipher.modes.ofb),i("3DES-CTR",n.cipher.modes.ctr);var o=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],s=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],a=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],u=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],c=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],f=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],l=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],h=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function p(e,t,r,n){var i,p,d=32===e.length?3:9;i=3===d?n?[30,-2,-2]:[0,32,2]:n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var y=t[0],g=t[1];y^=(p=252645135&(y>>>4^g))<<4,y^=(p=65535&(y>>>16^(g^=p)))<<16,y^=p=858993459&((g^=p)>>>2^y),y^=p=16711935&((g^=p<<2)>>>8^y),y=(y^=(p=1431655765&(y>>>1^(g^=p<<8)))<<1)<<1|y>>>31,g=(g^=p)<<1|g>>>31;for(var m=0;m>>4|g<<28)^e[_+1];p=y,y=g,g=p^(s[E>>>24&63]|u[E>>>16&63]|f[E>>>8&63]|h[63&E]|o[S>>>24&63]|a[S>>>16&63]|c[S>>>8&63]|l[63&S])}p=y,y=g,g=p}g=g>>>1|g<<31,g^=p=1431655765&((y=y>>>1|y<<31)>>>1^g),g^=(p=16711935&(g>>>8^(y^=p<<1)))<<8,g^=(p=858993459&(g>>>2^(y^=p)))<<2,g^=p=65535&((y^=p)>>>16^g),g^=p=252645135&((y^=p<<16)>>>4^g),y^=p<<4,r[0]=y,r[1]=g}function d(e){var t,r="DES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start;return t.start=function(e,r){var o=null;r instanceof n.util.ByteBuffer&&(o=r,r={}),(r=r||{}).output=o,r.iv=e,i.call(t,r)},t}},function(e,t,r){var n,i=r(3);e.exports=i.jsbn=i.jsbn||{};function o(e,t,r){this.data=[],null!=e&&("number"==typeof e?this.fromNumber(e,t,r):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function s(){return new o(null)}function a(e,t,r,n,i,o){for(var s=16383&t,a=t>>14;--o>=0;){var u=16383&this.data[e],c=this.data[e++]>>14,f=a*u+c*s;i=((u=s*u+((16383&f)<<14)+r.data[n]+i)>>28)+(f>>14)+a*c,r.data[n++]=268435455&u}return i}i.jsbn.BigInteger=o,"undefined"==typeof navigator?(o.prototype.am=a,n=28):"Microsoft Internet Explorer"==navigator.appName?(o.prototype.am=function(e,t,r,n,i,o){for(var s=32767&t,a=t>>15;--o>=0;){var u=32767&this.data[e],c=this.data[e++]>>15,f=a*u+c*s;i=((u=s*u+((32767&f)<<15)+r.data[n]+(1073741823&i))>>>30)+(f>>>15)+a*c+(i>>>30),r.data[n++]=1073741823&u}return i},n=30):"Netscape"!=navigator.appName?(o.prototype.am=function(e,t,r,n,i,o){for(;--o>=0;){var s=t*this.data[e++]+r.data[n]+i;i=Math.floor(s/67108864),r.data[n++]=67108863&s}return i},n=26):(o.prototype.am=a,n=28),o.prototype.DB=n,o.prototype.DM=(1<>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function g(e){this.m=e}function m(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function w(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function k(){}function A(e){return e}function C(e){this.r2=s(),this.q3=s(),o.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}g.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},g.prototype.revert=function(e){return e},g.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},g.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},g.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},m.prototype.convert=function(e){var t=s();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(o.ZERO)>0&&this.m.subTo(t,t),t},m.prototype.revert=function(e){var t=s();return e.copyTo(t),this.reduce(t),t},m.prototype.reduce=function(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;t>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e.data[r]+=this.m.am(0,n,e,t,0,this.m.t);e.data[r]>=e.DV;)e.data[r]-=e.DV,e.data[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},m.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},m.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},o.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s},o.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0},o.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.fromRadix(e,t);r=2}this.t=0,this.s=0;for(var n=e.length,i=!1,s=0;--n>=0;){var a=8==r?255&e[n]:p(e,n);a<0?"-"==e.charAt(n)&&(i=!0):(i=!1,0==s?this.data[this.t++]=a:s+r>this.DB?(this.data[this.t-1]|=(a&(1<>this.DB-s):this.data[this.t-1]|=a<=this.DB&&(s-=this.DB))}8==r&&0!=(128&e[0])&&(this.s=-1,s>0&&(this.data[this.t-1]|=(1<0&&this.data[this.t-1]==e;)--this.t},o.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t.data[r+e]=this.data[r];for(r=e-1;r>=0;--r)t.data[r]=0;t.t=this.t+e,t.s=this.s},o.prototype.drShiftTo=function(e,t){for(var r=e;r=0;--r)t.data[r+s+1]=this.data[r]>>i|a,a=(this.data[r]&o)<=0;--r)t.data[r]=0;t.data[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()},o.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,o=(1<>n;for(var s=r+1;s>n;n>0&&(t.data[this.t-r-1]|=(this.s&o)<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t.data[r++]=this.DV+n:n>0&&(t.data[r++]=n),t.t=r,t.clamp()},o.prototype.multiplyTo=function(e,t){var r=this.abs(),n=e.abs(),i=r.t;for(t.t=i+n.t;--i>=0;)t.data[i]=0;for(i=0;i=0;)e.data[r]=0;for(r=0;r=t.DV&&(e.data[r+t.t]-=t.DV,e.data[r+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(r,t.data[r],e,2*r,0,1)),e.s=0,e.clamp()},o.prototype.divRemTo=function(e,t,r){var n=e.abs();if(!(n.t<=0)){var i=this.abs();if(i.t0?(n.lShiftTo(f,a),i.lShiftTo(f,r)):(n.copyTo(a),i.copyTo(r));var l=a.t,h=a.data[l-1];if(0!=h){var p=h*(1<1?a.data[l-2]>>this.F2:0),d=this.FV/p,g=(1<=0&&(r.data[r.t++]=1,r.subTo(_,r)),o.ONE.dlShiftTo(l,_),_.subTo(a,a);a.t=0;){var E=r.data[--v]==h?this.DM:Math.floor(r.data[v]*d+(r.data[v-1]+m)*g);if((r.data[v]+=a.am(0,E,r,b,0,l))0&&r.rShiftTo(f,r),u<0&&o.ZERO.subTo(r,r)}}},o.prototype.invDigit=function(){if(this.t<1)return 0;var e=this.data[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},o.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},o.prototype.exp=function(e,t){if(e>4294967295||e<1)return o.ONE;var r=s(),n=s(),i=t.convert(this),a=y(e)-1;for(i.copyTo(r);--a>=0;)if(t.sqrTo(r,n),(e&1<0)t.mulTo(n,i,r);else{var u=r;r=n,n=u}return t.revert(r)},o.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,n=(1<0)for(a>a)>0&&(i=!0,o=h(r));s>=0;)a>(a+=this.DB-t)):(r=this.data[s]>>(a-=t)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=h(r));return i?o:"0"},o.prototype.negate=function(){var e=s();return o.ZERO.subTo(this,e),e},o.prototype.abs=function(){return this.s<0?this.negate():this},o.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this.data[r]-e.data[r]))return t;return 0},o.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+y(this.data[this.t-1]^this.s&this.DM)},o.prototype.mod=function(e){var t=s();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(o.ZERO)>0&&e.subTo(t,t),t},o.prototype.modPowInt=function(e,t){var r;return r=e<256||t.isEven()?new g(t):new m(t),this.exp(e,r)},o.ZERO=d(0),o.ONE=d(1),k.prototype.convert=A,k.prototype.revert=A,k.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},k.prototype.sqrTo=function(e,t){e.squareTo(t)},C.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=s();return e.copyTo(t),this.reduce(t),t},C.prototype.revert=function(e){return e},C.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},C.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},C.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var B=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],T=(1<<26)/B[B.length-1];o.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},o.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),n=d(r),i=s(),o=s(),a="";for(this.divRemTo(n,i,o);i.signum()>0;)a=(r+o.intValue()).toString(e).substr(1)+a,i.divRemTo(n,i,o);return o.intValue().toString(e)+a},o.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var r=this.chunkSize(t),n=Math.pow(t,r),i=!1,s=0,a=0,u=0;u=r&&(this.dMultiply(n),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(t,s)),this.dAddOffset(a,0)),i&&o.ZERO.subTo(this,this)},o.prototype.fromNumber=function(e,t,r){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(o.ONE.shiftLeft(e-1),b,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(o.ONE.shiftLeft(e-1),this);else{var n=new Array,i=7&e;n.length=1+(e>>3),t.nextBytes(n),i>0?n[0]&=(1<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t.data[r++]=n:n<-1&&(t.data[r++]=this.DV+n),t.t=r,t.clamp()},o.prototype.dMultiply=function(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},o.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this.data[this.t++]=0;for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}},o.prototype.multiplyLowerTo=function(e,t,r){var n,i=Math.min(this.t+e.t,t);for(r.s=0,r.t=i;i>0;)r.data[--i]=0;for(n=r.t-this.t;i=0;)r.data[n]=0;for(n=Math.max(t-this.t,0);n0)if(0==t)r=this.data[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this.data[n])%e;return r},o.prototype.millerRabin=function(e){var t=this.subtract(o.ONE),r=t.getLowestSetBit();if(r<=0)return!1;for(var n,i=t.shiftRight(r),s={nextBytes:function(e){for(var t=0;t=0);var u=n.modPow(i,this);if(0!=u.compareTo(o.ONE)&&0!=u.compareTo(t)){for(var c=1;c++>24},o.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},o.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},o.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var r,n=this.DB-e*this.DB%8,i=0;if(e-- >0)for(n>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<=0;)n<8?(r=(this.data[e]&(1<>(n+=this.DB-8)):(r=this.data[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t},o.prototype.equals=function(e){return 0==this.compareTo(e)},o.prototype.min=function(e){return this.compareTo(e)<0?this:e},o.prototype.max=function(e){return this.compareTo(e)>0?this:e},o.prototype.and=function(e){var t=s();return this.bitwiseTo(e,v,t),t},o.prototype.or=function(e){var t=s();return this.bitwiseTo(e,b,t),t},o.prototype.xor=function(e){var t=s();return this.bitwiseTo(e,_,t),t},o.prototype.andNot=function(e){var t=s();return this.bitwiseTo(e,E,t),t},o.prototype.not=function(){for(var e=s(),t=0;t=this.t?0!=this.s:0!=(this.data[t]&1<1){var l=s();for(n.sqrTo(a[1],l);u<=f;)a[u]=s(),n.mulTo(l,a[u-2],a[u]),u+=2}var h,p,v=e.t-1,b=!0,_=s();for(i=y(e.data[v])-1;v>=0;){for(i>=c?h=e.data[v]>>i-c&f:(h=(e.data[v]&(1<0&&(h|=e.data[v-1]>>this.DB+i-c)),u=r;0==(1&h);)h>>=1,--u;if((i-=u)<0&&(i+=this.DB,--v),b)a[h].copyTo(o),b=!1;else{for(;u>1;)n.sqrTo(o,_),n.sqrTo(_,o),u-=2;u>0?n.sqrTo(o,_):(p=o,o=_,_=p),n.mulTo(_,a[h],o)}for(;v>=0&&0==(e.data[v]&1<=0?(r.subTo(n,r),t&&i.subTo(a,i),s.subTo(u,s)):(n.subTo(r,n),t&&a.subTo(i,a),u.subTo(s,u))}return 0!=n.compareTo(o.ONE)?o.ZERO:u.compareTo(e)>=0?u.subtract(e):u.signum()<0?(u.addTo(e,u),u.signum()<0?u.add(e):u):u},o.prototype.pow=function(e){return this.exp(e,new k)},o.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var i=t.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return t;for(i0&&(t.rShiftTo(o,t),r.rShiftTo(o,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},o.prototype.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r.data[0]<=B[B.length-1]){for(t=0;t>>2,t.words[2]=(63&e[22])<<20|e[23]<<12|e[24]<<4|e[25]>>>4,t.words[3]=(255&e[19])<<18|e[20]<<10|e[21]<<2|e[22]>>>6,t.words[4]=(3&e[15])<<24|e[16]<<16|e[17]<<8|e[18],t.words[5]=(15&e[12])<<22|e[13]<<14|e[14]<<6|e[15]>>>2,t.words[6]=(63&e[9])<<20|e[10]<<12|e[11]<<4|e[12]>>>4,t.words[7]=(255&e[6])<<18|e[7]<<10|e[8]<<2|e[9]>>>6,t.words[8]=(3&e[2])<<24|e[3]<<16|e[4]<<8|e[5],t.words[9]=e[0]<<14|e[1]<<6|e[2]>>>2,t.length=10,t.strip()},o.prototype.toBuffer=function(){for(var e=this.words,t=this.length;t<10;++t)e[t]=0;return n.from([e[9]>>>14&255,e[9]>>>6&255,(63&e[9])<<2|e[8]>>>24&3,e[8]>>>16&255,e[8]>>>8&255,255&e[8],e[7]>>>18&255,e[7]>>>10&255,e[7]>>>2&255,(3&e[7])<<6|e[6]>>>20&63,e[6]>>>12&255,e[6]>>>4&255,(15&e[6])<<4|e[5]>>>22&15,e[5]>>>14&255,e[5]>>>6&255,(63&e[5])<<2|e[4]>>>24&3,e[4]>>>16&255,e[4]>>>8&255,255&e[4],e[3]>>>18&255,e[3]>>>10&255,e[3]>>>2&255,(3&e[3])<<6|e[2]>>>20&63,e[2]>>>12&255,e[2]>>>4&255,(15&e[2])<<4|e[1]>>>22&15,e[1]>>>14&255,e[1]>>>6&255,(63&e[1])<<2|e[0]>>>24&3,e[0]>>>16&255,e[0]>>>8&255,255&e[0]])},o.prototype.clone=function(){var e=new o;e.words=new Array(this.length);for(var t=0;t1&&0==(0|this.words[this.length-1]);)this.length--;return this},o.prototype.normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.ucmp=function(e){if(this.length!==e.length)return this.length>e.length?1:-1;for(var t=this.length-1;t>=0;--t)if(this.words[t]!==e.words[t])return this.words[t]>e.words[t]?1:-1;return 0},o.prototype.gtOne=function(){return this.length>1||this.words[0]>1},o.prototype.isOverflow=function(){return this.ucmp(o.n)>=0},o.prototype.isHigh=function(){return 1===this.ucmp(o.nh)},o.prototype.bitLengthGT256=function(){return this.length>10||10===this.length&&this.words[9]>4194303},o.prototype.iuaddn=function(e){this.words[0]+=e;for(var t=0;this.words[t]>67108863&&te.length?(t=this,r=e):(t=e,r=this);for(var n=0,i=0;n>>26}for(;0!==i&&n>>26;if(this.length=t.length,0!==i)this.words[this.length++]=i;else if(t!==this)for(;n0?(t=this,r=e):(t=e,r=this);for(var i=0,o=0;i>26,this.words[i]=67108863&s}for(;0!==o&&i>26,this.words[i]=67108863&s;if(0===o&&i>>26,u=67108863&i,c=Math.max(0,o-e.length+1),f=Math.min(o,t.length-1);c<=f;c++){var l=o-c,h=e.words[l]*t.words[c]+u;a+=h/67108864|0,u=67108863&h}r.words[o]=u,i=a}return 0!==i&&(r.words[r.length++]=i),r.strip()},o.umulTo10x10=Math.imul?i.umulTo10x10:o.umulTo,o.umulnTo=function(e,t,r){if(0===t)return r.words=[0],r.length=1,r;for(var n=0,i=0;n0?(r.words[n]=i,r.length=e.length+1):r.length=e.length,r},o.prototype.umul=function(e){var t=new o;return t.words=new Array(this.length+e.length),10===this.length&&10===e.length?o.umulTo10x10(this,e,t):1===this.length?o.umulnTo(e,this.words[0],t):1===e.length?o.umulnTo(this,e.words[0],t):o.umulTo(this,e,t)},o.prototype.isplit=function(e){e.length=Math.min(this.length,9);for(var t=0;t>>22,r=n}return r>>>=22,this.words[t-10]=r,0===r&&this.length>10?this.length-=10:this.length-=9,this},o.prototype.fireduce=function(){return this.isOverflow()&&this.isub(o.n),this},o.prototype.ureduce=function(){var e=this.clone().isplit(o.tmp).umul(o.nc).iadd(o.tmp);return e.bitLengthGT256()&&(e=e.isplit(o.tmp).umul(o.nc).iadd(o.tmp)).bitLengthGT256()&&(e=e.isplit(o.tmp).umul(o.nc).iadd(o.tmp)),e.fireduce()},o.prototype.ishrn=function(e){for(var t=(1<=0;--n){var o=this.words[n];this.words[n]=i<>>e,i=o&t}return this.length>1&&0===this.words[this.length-1]&&(this.length-=1),this},o.prototype.uinvm=function(){for(var e=this.clone(),t=o.n.clone(),r=o.fromNumber(1),n=o.fromNumber(0),i=o.fromNumber(0),s=o.fromNumber(1);e.isEven()&&t.isEven();){for(var a=1,u=1;0==(e.words[0]&u)&&0==(t.words[0]&u)&&a<26;++a,u<<=1);e.ishrn(a),t.ishrn(a)}for(var c=t.clone(),f=e.clone();!e.isZero();){for(var l=0,h=1;0==(e.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(e.ishrn(l);l-- >0;)(r.isOdd()||n.isOdd())&&(r.iadd(c),n.isub(f)),r.ishrn(1),n.ishrn(1);for(var p=0,d=1;0==(t.words[0]&d)&&p<26;++p,d<<=1);if(p>0)for(t.ishrn(p);p-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(f)),i.ishrn(1),s.ishrn(1);e.ucmp(t)>=0?(e.isub(t),r.isub(i),n.isub(s)):(t.isub(e),i.isub(r),s.isub(n))}if(1===i.negative){i.negative=0;var y=i.ureduce();return y.negative^=1,y.normSign().iadd(o.n)}return i.ureduce()},o.prototype.imulK=function(){this.words[this.length]=0,this.words[this.length+1]=0,this.length+=2;for(var e=0,t=0;e0?this.isub(o.p):this.strip(),this},o.prototype.redNeg=function(){return this.isZero()?o.fromNumber(0):o.p.sub(this)},o.prototype.redAdd=function(e){return this.clone().redIAdd(e)},o.prototype.redIAdd=function(e){return this.iadd(e),this.ucmp(o.p)>=0&&this.isub(o.p),this},o.prototype.redIAdd7=function(){return this.iuaddn(7),this.ucmp(o.p)>=0&&this.isub(o.p),this},o.prototype.redSub=function(e){return this.clone().redISub(e)},o.prototype.redISub=function(e){return this.isub(e),0!==this.negative&&this.iadd(o.p),this},o.prototype.redMul=function(e){return this.umul(e).redIReduce()},o.prototype.redSqr=function(){return this.umul(this).redIReduce()},o.prototype.redSqrt=function(){if(this.isZero())return this.clone();for(var e=this.redSqr(),t=e.redSqr(),r=t.redSqr().redMul(t),n=r.redMul(e),i=n.redMul(this),o=i,s=0;s<54;++s)o=o.redSqr().redSqr().redSqr().redSqr().redMul(i);for(o=o.redSqr().redSqr().redSqr().redSqr().redMul(n),s=0;s<5;++s)o=o.redSqr().redSqr().redSqr().redSqr().redMul(i);return 0===(o=(o=o.redSqr().redSqr().redSqr().redSqr().redMul(r)).redSqr().redSqr().redSqr().redSqr().redSqr().redSqr().redMul(r)).redSqr().ucmp(this)?o:null},o.prototype.redInvm=function(){for(var e,t=this.clone(),r=o.p.clone(),n=o.fromNumber(1),i=o.fromNumber(0);t.gtOne()&&r.gtOne();){for(var s=0,a=1;0==(t.words[0]&a)&&s<26;++s,a<<=1);if(s>0)for(t.ishrn(s);s-- >0;)n.isOdd()&&n.iadd(o.p),n.ishrn(1);for(var u=0,c=1;0==(r.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(r.ishrn(u);u-- >0;)i.isOdd()&&i.iadd(o.p),i.ishrn(1);t.ucmp(r)>=0?(t.isub(r),n.isub(i)):(r.isub(t),i.isub(n))}return 0!==(e=1===t.length&&1===t.words[0]?n:i).negative&&e.iadd(o.p),0!==e.negative?(e.negative=0,e.redIReduce().redNeg()):e.redIReduce()},o.prototype.getNAF=function(e){for(var t=[],r=1<>1,o=this.clone();!o.isZero();){for(var s=0,a=1;0==(o.words[0]&a)&&s<26;++s,a<<=1)t.push(0);if(0!==s)o.ishrn(s);else{var u=o.words[0]&n;if(u>=i)t.push(i-u),o.iuaddn(u-i).ishrn(1);else if(t.push(u),o.words[0]-=u,!o.isZero()){for(s=e-1;s>0;--s)t.push(0);o.ishrn(e)}}}return t},o.prototype.inspect=function(){if(this.isZero())return"0";for(var e=this.toBuffer().toString("hex"),t=0;"0"===e[t];++t);return e.slice(t)},o.n=o.fromBuffer(n.from("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141","hex")),o.nh=o.n.clone().ishrn(1),o.nc=o.fromBuffer(n.from("000000000000000000000000000000014551231950B75FC4402DA1732FC9BEBF","hex")),o.p=o.fromBuffer(n.from("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F","hex")),o.psn=o.p.sub(o.n),o.tmp=new o,o.tmp.words=new Array(10),o.fromNumber(1).words[3]=0,e.exports=o},function(e,t,r){"use strict";var n=r(243);e.exports=function(e,t){return function(r,i){if(r)return n(i,r,t);if(null!=e){var o=e;e=null,i(null,o)}else i(!0)}}},,,,function(e,t){var r=Array.isArray;e.exports=r},function(e,t,r){var n=r(3);if(r(61),r(43),r(111),r(45),r(62),r(120),r(76),r(32),r(210),r(95),r(8),void 0===i)var i=n.jsbn.BigInteger;var o=n.asn1,s=n.pki=n.pki||{};e.exports=s.pbe=n.pbe=n.pbe||{};var a=s.oids,u={name:"EncryptedPrivateKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},c={name:"PBES2Algorithms",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},f={name:"pkcs-12PbeParams",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"iterations"}]};function l(e,t){return e.start().update(t).digest().getBytes()}function h(e){var t;if(e){if(!(t=s.oids[o.derToOid(e)])){var r=new Error("Unsupported PRF OID.");throw r.oid=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}}else t="hmacWithSHA1";return p(t)}function p(e){var t=n.md;switch(e){case"hmacWithSHA224":t=n.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":e=e.substr(8).toLowerCase();break;default:var r=new Error("Unsupported PRF algorithm.");throw r.algorithm=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}if(!(t&&e in t))throw new Error("Unknown hash algorithm: "+e);return t[e].create()}s.encryptPrivateKeyInfo=function(e,t,r){(r=r||{}).saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||"aes128",r.prfAlgorithm=r.prfAlgorithm||"sha1";var i,u,c,f=n.random.getBytesSync(r.saltSize),l=r.count,h=o.integerToDer(l);if(0===r.algorithm.indexOf("aes")||"des"===r.algorithm){var d,y,g;switch(r.algorithm){case"aes128":i=16,d=16,y=a["aes128-CBC"],g=n.aes.createEncryptionCipher;break;case"aes192":i=24,d=16,y=a["aes192-CBC"],g=n.aes.createEncryptionCipher;break;case"aes256":i=32,d=16,y=a["aes256-CBC"],g=n.aes.createEncryptionCipher;break;case"des":i=8,d=8,y=a.desCBC,g=n.des.createEncryptionCipher;break;default:throw(S=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,S}var m="hmacWith"+r.prfAlgorithm.toUpperCase(),v=p(m),b=n.pkcs5.pbkdf2(t,f,l,i,v),_=n.random.getBytesSync(d);(w=g(b)).start(_),w.update(o.toDer(e)),w.finish(),c=w.output.getBytes();var E=function(e,t,r,i){var a=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,e),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,t.getBytes())]);"hmacWithSHA1"!==i&&a.value.push(o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,n.util.hexToBytes(r.toString(16))),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(s.oids[i]).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")]));return a}(f,h,i,m);u=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(a.pkcs5PBES2).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(a.pkcs5PBKDF2).getBytes()),E]),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(y).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,_)])])])}else{var S;if("3des"!==r.algorithm)throw(S=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,S;i=24;var w,k=new n.util.ByteBuffer(f);b=s.pbe.generatePkcs12Key(t,k,1,l,i),_=s.pbe.generatePkcs12Key(t,k,2,l,i);(w=n.des.createEncryptionCipher(b)).start(_),w.update(o.toDer(e)),w.finish(),c=w.output.getBytes(),u=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(a["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,f),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,h.getBytes())])])}return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[u,o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,c)])},s.decryptPrivateKeyInfo=function(e,t){var r=null,i={},a=[];if(!o.validate(e,u,i,a)){var c=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw c.errors=a,c}var f=o.derToOid(i.encryptionOid),l=s.pbe.getCipher(f,i.encryptionParams,t),h=n.util.createBuffer(i.encryptedData);return l.update(h),l.finish()&&(r=o.fromDer(l.output)),r},s.encryptedPrivateKeyToPem=function(e,t){var r={type:"ENCRYPTED PRIVATE KEY",body:o.toDer(e).getBytes()};return n.pem.encode(r,{maxline:t})},s.encryptedPrivateKeyFromPem=function(e){var t=n.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==t.type){var r=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return o.fromDer(t.body)},s.encryptRsaPrivateKey=function(e,t,r){if(!(r=r||{}).legacy){var i=s.wrapRsaPrivateKey(s.privateKeyToAsn1(e));return i=s.encryptPrivateKeyInfo(i,t,r),s.encryptedPrivateKeyToPem(i)}var a,u,c,f;switch(r.algorithm){case"aes128":a="AES-128-CBC",c=16,u=n.random.getBytesSync(16),f=n.aes.createEncryptionCipher;break;case"aes192":a="AES-192-CBC",c=24,u=n.random.getBytesSync(16),f=n.aes.createEncryptionCipher;break;case"aes256":a="AES-256-CBC",c=32,u=n.random.getBytesSync(16),f=n.aes.createEncryptionCipher;break;case"3des":a="DES-EDE3-CBC",c=24,u=n.random.getBytesSync(8),f=n.des.createEncryptionCipher;break;case"des":a="DES-CBC",c=8,u=n.random.getBytesSync(8),f=n.des.createEncryptionCipher;break;default:var l=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+r.algorithm+'".');throw l.algorithm=r.algorithm,l}var h=f(n.pbe.opensslDeriveBytes(t,u.substr(0,8),c));h.start(u),h.update(o.toDer(s.privateKeyToAsn1(e))),h.finish();var p={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:a,parameters:n.util.bytesToHex(u).toUpperCase()},body:h.output.getBytes()};return n.pem.encode(p)},s.decryptRsaPrivateKey=function(e,t){var r=null,i=n.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==i.type&&"PRIVATE KEY"!==i.type&&"RSA PRIVATE KEY"!==i.type)throw(c=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".')).headerType=c,c;if(i.procType&&"ENCRYPTED"===i.procType.type){var a,u;switch(i.dekInfo.algorithm){case"DES-CBC":a=8,u=n.des.createDecryptionCipher;break;case"DES-EDE3-CBC":a=24,u=n.des.createDecryptionCipher;break;case"AES-128-CBC":a=16,u=n.aes.createDecryptionCipher;break;case"AES-192-CBC":a=24,u=n.aes.createDecryptionCipher;break;case"AES-256-CBC":a=32,u=n.aes.createDecryptionCipher;break;case"RC2-40-CBC":a=5,u=function(e){return n.rc2.createDecryptionCipher(e,40)};break;case"RC2-64-CBC":a=8,u=function(e){return n.rc2.createDecryptionCipher(e,64)};break;case"RC2-128-CBC":a=16,u=function(e){return n.rc2.createDecryptionCipher(e,128)};break;default:var c;throw(c=new Error('Could not decrypt private key; unsupported encryption algorithm "'+i.dekInfo.algorithm+'".')).algorithm=i.dekInfo.algorithm,c}var f=n.util.hexToBytes(i.dekInfo.parameters),l=u(n.pbe.opensslDeriveBytes(t,f.substr(0,8),a));if(l.start(f),l.update(n.util.createBuffer(i.body)),!l.finish())return r;r=l.output.getBytes()}else r=i.body;return null!==(r="ENCRYPTED PRIVATE KEY"===i.type?s.decryptPrivateKeyInfo(o.fromDer(r),t):o.fromDer(r))&&(r=s.privateKeyFromAsn1(r)),r},s.pbe.generatePkcs12Key=function(e,t,r,i,o,s){var a,u;if(null==s){if(!("sha1"in n.md))throw new Error('"sha1" hash algorithm unavailable.');s=n.md.sha1.create()}var c=s.digestLength,f=s.blockLength,l=new n.util.ByteBuffer,h=new n.util.ByteBuffer;if(null!=e){for(u=0;u=0;u--)I>>=8,I+=A.at(u)+T.at(u),T.setAt(u,255&I);B.putBuffer(T)}_=B,l.putBuffer(w)}return l.truncate(l.length()-o),l},s.pbe.getCipher=function(e,t,r){switch(e){case s.oids.pkcs5PBES2:return s.pbe.getCipherForPBES2(e,t,r);case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case s.oids["pbewithSHAAnd40BitRC2-CBC"]:return s.pbe.getCipherForPKCS12PBE(e,t,r);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=e,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}},s.pbe.getCipherForPBES2=function(e,t,r){var i,a={},u=[];if(!o.validate(t,c,a,u))throw(i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=u,i;if((e=o.derToOid(a.kdfOid))!==s.oids.pkcs5PBKDF2)throw(i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.")).oid=e,i.supportedOids=["pkcs5PBKDF2"],i;if((e=o.derToOid(a.encOid))!==s.oids["aes128-CBC"]&&e!==s.oids["aes192-CBC"]&&e!==s.oids["aes256-CBC"]&&e!==s.oids["des-EDE3-CBC"]&&e!==s.oids.desCBC)throw(i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.")).oid=e,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i;var f,l,p=a.kdfSalt,d=n.util.createBuffer(a.kdfIterationCount);switch(d=d.getInt(d.length()<<3),s.oids[e]){case"aes128-CBC":f=16,l=n.aes.createDecryptionCipher;break;case"aes192-CBC":f=24,l=n.aes.createDecryptionCipher;break;case"aes256-CBC":f=32,l=n.aes.createDecryptionCipher;break;case"des-EDE3-CBC":f=24,l=n.des.createDecryptionCipher;break;case"desCBC":f=8,l=n.des.createDecryptionCipher}var y=h(a.prfOid),g=n.pkcs5.pbkdf2(r,p,d,f,y),m=a.encIv,v=l(g);return v.start(m),v},s.pbe.getCipherForPKCS12PBE=function(e,t,r){var i={},a=[];if(!o.validate(t,f,i,a))throw(y=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=a,y;var u,c,l,p=n.util.createBuffer(i.salt),d=n.util.createBuffer(i.iterations);switch(d=d.getInt(d.length()<<3),e){case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:u=24,c=8,l=n.des.startDecrypting;break;case s.oids["pbewithSHAAnd40BitRC2-CBC"]:u=5,c=8,l=function(e,t){var r=n.rc2.createDecryptionCipher(e,40);return r.start(t,null),r};break;default:var y;throw(y=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.")).oid=e,y}var g=h(i.prfOid),m=s.pbe.generatePkcs12Key(r,p,1,d,u,g);return g.start(),l(m,s.pbe.generatePkcs12Key(r,p,2,d,c,g))},s.pbe.opensslDeriveBytes=function(e,t,r,i){if(null==i){if(!("md5"in n.md))throw new Error('"md5" hash algorithm unavailable.');i=n.md.md5.create()}null===t&&(t="");for(var o=[l(i,e+t)],s=16,a=1;s4||!a||"sha1"===a))return"string"!=typeof a&&(a="sha1"),e=new t(e,"binary"),r=new t(r,"binary"),u?4===i.pbkdf2Sync.length?i.pbkdf2(e,r,o,s,function(e,t){if(e)return u(e);u(null,t.toString("binary"))}):i.pbkdf2(e,r,o,s,a,function(e,t){if(e)return u(e);u(null,t.toString("binary"))}):4===i.pbkdf2Sync.length?i.pbkdf2Sync(e,r,o,s).toString("binary"):i.pbkdf2Sync(e,r,o,s,a).toString("binary");if(null==a&&(a="sha1"),"string"==typeof a){if(!(a in n.md.algorithms))throw new Error("Unknown hash algorithm: "+a);a=n.md[a].create()}var c=a.digestLength;if(s>4294967295*c){var f=new Error("Derived key is too long.");if(u)return u(f);throw f}var l=Math.ceil(s/c),h=s-(l-1)*c,p=n.hmac.create();p.start(a,e);var d,y,g,m="";if(!u){for(var v=1;v<=l;++v){p.start(null,null),p.update(r),p.update(n.util.int32ToBytes(v)),d=g=p.digest().getBytes();for(var b=2;b<=o;++b)p.start(null,null),p.update(g),y=p.digest().getBytes(),d=n.util.xorBytes(d,y,c),g=y;m+=vl)return u(null,m);p.start(null,null),p.update(r),p.update(n.util.int32ToBytes(v)),d=g=p.digest().getBytes(),b=2,E()}function E(){if(b<=o)return p.start(null,null),p.update(g),y=p.digest().getBytes(),d=n.util.xorBytes(d,y,c),g=y,++b,n.util.setImmediate(E);m+=v2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(l.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(u.validity.notBefore=l[0],u.validity.notAfter=l[1],u.tbsCertificate=r.tbsCertificate,t){var h;if(u.md=null,u.signatureOid in s)switch(s[u.signatureOid]){case"sha1WithRSAEncryption":u.md=n.md.sha1.create();break;case"md5WithRSAEncryption":u.md=n.md.md5.create();break;case"sha256WithRSAEncryption":u.md=n.md.sha256.create();break;case"sha384WithRSAEncryption":u.md=n.md.sha384.create();break;case"sha512WithRSAEncryption":u.md=n.md.sha512.create();break;case"RSASSA-PSS":u.md=n.md.sha256.create()}if(null===u.md)throw(h=new Error("Could not compute certificate digest. Unknown signature OID.")).signatureOid=u.signatureOid,h;var y=i.toDer(u.tbsCertificate);u.md.update(y.getBytes())}var m=n.md.sha1.create();u.issuer.getField=function(e){return p(u.issuer,e)},u.issuer.addField=function(e){g([e]),u.issuer.attributes.push(e)},u.issuer.attributes=o.RDNAttributesAsArray(r.certIssuer,m),r.certIssuerUniqueId&&(u.issuer.uniqueId=r.certIssuerUniqueId),u.issuer.hash=m.digest().toHex();var v=n.md.sha1.create();return u.subject.getField=function(e){return p(u.subject,e)},u.subject.addField=function(e){g([e]),u.subject.attributes.push(e)},u.subject.attributes=o.RDNAttributesAsArray(r.certSubject,v),r.certSubjectUniqueId&&(u.subject.uniqueId=r.certSubjectUniqueId),u.subject.hash=v.digest().toHex(),r.certExtensions?u.extensions=o.certificateExtensionsFromAsn1(r.certExtensions):u.extensions=[],u.publicKey=o.publicKeyFromAsn1(r.subjectPublicKeyInfo),u},o.certificateExtensionsFromAsn1=function(e){for(var t=[],r=0;r1&&(r=u.value.charCodeAt(1),o=u.value.length>2?u.value.charCodeAt(2):0),t.digitalSignature=128==(128&r),t.nonRepudiation=64==(64&r),t.keyEncipherment=32==(32&r),t.dataEncipherment=16==(16&r),t.keyAgreement=8==(8&r),t.keyCertSign=4==(4&r),t.cRLSign=2==(2&r),t.encipherOnly=1==(1&r),t.decipherOnly=128==(128&o)}else if("basicConstraints"===t.name){(u=i.fromDer(t.value)).value.length>0&&u.value[0].type===i.Type.BOOLEAN?t.cA=0!==u.value[0].value.charCodeAt(0):t.cA=!1;var a=null;u.value.length>0&&u.value[0].type===i.Type.INTEGER?a=u.value[0].value:u.value.length>1&&(a=u.value[1].value),null!==a&&(t.pathLenConstraint=i.derToInteger(a))}else if("extKeyUsage"===t.name)for(var u=i.fromDer(t.value),c=0;c1&&(r=u.value.charCodeAt(1)),t.client=128==(128&r),t.server=64==(64&r),t.email=32==(32&r),t.objsign=16==(16&r),t.reserved=8==(8&r),t.sslCA=4==(4&r),t.emailCA=2==(2&r),t.objCA=1==(1&r)}else if("subjectAltName"===t.name||"issuerAltName"===t.name){var l;t.altNames=[];u=i.fromDer(t.value);for(var h=0;h0&&t.value.push(o.certificateExtensionsToAsn1(e.extensions)),t},o.getCertificationRequestInfo=function(e){return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes()),y(e.subject),o.publicKeyToAsn1(e.publicKey),b(e)])},o.distinguishedNameToAsn1=function(e){return y(e)},o.certificateToAsn1=function(e){var t=e.tbsCertificate||o.getTBSCertificate(e);return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[t,i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.signatureOid).getBytes()),v(e.signatureOid,e.signatureParameters)]),i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},o.certificateExtensionsToAsn1=function(e){var t=i.create(i.Class.CONTEXT_SPECIFIC,3,!0,[]),r=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);t.value.push(r);for(var n=0;nf.validity.notAfter)&&(u={message:"Certificate is not valid yet or has expired.",error:o.certificateError.certificate_expired,notBefore:f.validity.notBefore,notAfter:f.validity.notAfter,now:s}),null===u){if(null===(l=t[0]||e.getIssuer(f))&&f.isIssuer(f)&&(h=!0,l=f),l){var p=l;n.util.isArray(p)||(p=[p]);for(var d=!1;!d&&p.length>0;){l=p.shift();try{d=l.verify(f)}catch(e){}}d||(u={message:"Certificate signature is invalid.",error:o.certificateError.bad_certificate})}null!==u||l&&!h||e.hasCertificate(f)||(u={message:"Certificate is not trusted.",error:o.certificateError.unknown_ca})}if(null===u&&l&&!f.isIssuer(l)&&(u={message:"Certificate issuer is invalid.",error:o.certificateError.bad_certificate}),null===u)for(var y={keyUsage:!0,basicConstraints:!0},g=0;null===u&&gv.pathLenConstraint&&(u={message:"Certificate basicConstraints pathLenConstraint violated.",error:o.certificateError.bad_certificate})}var _=null===u||u.error,E=r?r(_,c,i):_;if(!0!==E)throw!0===_&&(u={message:"The application rejected the certificate.",error:o.certificateError.bad_certificate}),(E||0===E)&&("object"!=typeof E||n.util.isArray(E)?"string"==typeof E&&(u.error=E):(E.message&&(u.message=E.message),E.error&&(u.error=E.error))),u;u=null,a=!1,++c}while(t.length>0);return!0}},function(e,t,r){"use strict";var n=r(91);e.exports=function(e,t,r){r||(r=t,t=null);var i=n(function(r){t=e(t,r)},function(e){r(e,t)});return 2===arguments.length?function(e){e(null,function(n,o){if(n)return r(!0===n?null:n);t=o,i(e)})}:i}},function(e,t,r){(function(n){r(15);var i=r(267);function o(e){e.destroy?e.destroy():console.error("warning, stream-to-pull-stream: \nthe wrapped node-stream does not implement `destroy`, \nthis may cause resource leaks.")}function s(e,t,r){var s,a,u=!1;function c(){a||(a=!0,r&&r(!0===s?null:s))}function f(){u||(u=!0,h(),s?c():e(s=!0,c))}function l(t){h(),s||e(s=t,c)}function h(){t.on("finish",f),t.removeListener("close",f),t.removeListener("error",l)}t.on("close",f),t.on("finish",f),t.on("error",l),n.nextTick(function(){i(function(r){e(null,function(e,n){if(s=s||e,!0===e)return t._isStdio?c():t.end();if(s=s||e)return o(t),c();t._isStdio?t.write(n,function(){r()}):!1===t.write(n)?t.once("drain",r):r()})})})}function a(e){var t,r=[],n=[],i=!1;function s(){for(;(r.length||t)&&n.length;)n.shift()(r.length?null:t,r.shift());!r.length&&i&&(i=!1,e.resume())}return e.on("data",function(t){r.push(t),s(),r.length&&e.pause&&(i=!0,e.pause())}),e.on("end",function(){t=!0,s()}),e.on("close",function(){t=!0,s()}),e.on("error",function(e){t=e,s()}),function(r,i){if(!i)throw new Error("*must* provide cb");if(r){function a(){for(;n.length;)n.shift()(r);i(r)}if(t)return a();e.once("close",a),o(e)}else n.push(i),s()}}var u=a,c=function(e,t){return function(r){return s(r,e,t)}},f=function(e){return a(e)};(t=e.exports=function(e,t){return e.writable&&e.write?e.readable?function(r){return s(r,e,t),a(e)}:c(e,t):f(e)}).sink=c,t.source=f,t.read=u,t.read1=a,t.read2=function(e){var t,r=!1,n=!1;function i(){var r=e.read();if(null!==r&&t){var n=t;t=null,n(null,r)}}return e.on("readable",function(){n=!0,t&&i()}).on("end",function(){r=!0,t&&t(r)}).on("error",function(e){r=e,t&&t(r)}),function(e,o){t=o,r?o(r):n&&i()}},t.duplex=function(e,t){return{source:f(e),sink:c(e,t)}},t.transform=function(e){return function(t){var r=f(e);return c(e)(t),r}}}).call(this,r(4))},,function(e,t){t.BITS=32,t.GROUPS=4,t.RE_ADDRESS=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g,t.RE_SUBNET_STRING=/\/\d{1,2}$/},function(e,t){t.BITS=128,t.GROUPS=8,t.SCOPES={0:"Reserved",1:"Interface local",2:"Link local",4:"Admin local",5:"Site local",8:"Organization local",14:"Global",15:"Reserved"},t.TYPES={"ff01::1/128":"Multicast (All nodes on this interface)","ff01::2/128":"Multicast (All routers on this interface)","ff02::1/128":"Multicast (All nodes on this link)","ff02::2/128":"Multicast (All routers on this link)","ff05::2/128":"Multicast (All routers in this site)","ff02::5/128":"Multicast (OSPFv3 AllSPF routers)","ff02::6/128":"Multicast (OSPFv3 AllDR routers)","ff02::9/128":"Multicast (RIP routers)","ff02::a/128":"Multicast (EIGRP routers)","ff02::d/128":"Multicast (PIM routers)","ff02::16/128":"Multicast (MLDv2 reports)","ff01::fb/128":"Multicast (mDNSv6)","ff02::fb/128":"Multicast (mDNSv6)","ff05::fb/128":"Multicast (mDNSv6)","ff02::1:2/128":"Multicast (All DHCP servers and relay agents on this link)","ff05::1:2/128":"Multicast (All DHCP servers and relay agents in this site)","ff02::1:3/128":"Multicast (All DHCP servers on this link)","ff05::1:3/128":"Multicast (All DHCP servers in this site)","::/128":"Unspecified","::1/128":"Loopback","ff00::/8":"Multicast","fe80::/10":"Link-local unicast"},t.RE_BAD_CHARACTERS=/([^0-9a-f:\/%])/gi,t.RE_BAD_ADDRESS=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi,t.RE_SUBNET_STRING=/\/\d{1,3}(?=%|$)/,t.RE_ZONE_STRING=/%.*$/,t.RE_URL=new RegExp(/^\[{0,1}([0-9a-f:]+)\]{0,1}/),t.RE_URL_WITH_PORT=new RegExp(/\[([0-9a-f:]+)\]:([0-9]{1,5})/)},function(e,t,r){"use strict";const n=r(73);function i(e){if("number"==typeof e){if(i.codes[e])return i.codes[e];throw new Error("no protocol with code: "+e)}if("string"==typeof e||e instanceof String){if(i.names[e])return i.names[e];throw new Error("no protocol with name: "+e)}throw new Error("invalid protocol id type: "+e)}function o(e,t,r,n){return{code:e,size:t,name:r,resolvable:Boolean(n)}}i.lengthPrefixedVarSize=-1,i.V=-1,i.table=[[4,32,"ip4"],[6,16,"tcp"],[17,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[54,-1,"dns4","resolvable"],[55,-1,"dns6","resolvable"],[56,-1,"dnsaddr","resolvable"],[132,16,"sctp"],[302,0,"utp"],[421,i.lengthPrefixedVarSize,"ipfs"],[480,0,"http"],[443,0,"https"],[460,0,"quic"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[290,0,"p2p-circuit"]],i.names={},i.codes={},n(i.table,function(e){const t=o.apply(null,e);i.codes[t.code]=t,i.names[t.name]=t}),i.object=o,e.exports=i},function(e,t,r){e.exports=r(360)},function(e,t,r){(function(t,n){var i,o=r(363),s=r(185);function a(e,t){return"function"!=typeof t?e:e.then(function(e){i(function(){t(null,e)})},function(e){i(function(){t(e)})})}function u(e){return a(this,e)}function c(e){if(e&&s(e)){e.nodeify=u;var t=e.then;return e.then=function(){return c(t.apply(this,arguments))},e}"function"==typeof e?e.prototype.nodeify=u:o.prototype.nodeify=u}function f(e){if(!(this instanceof f))return new f(e);o.call(this,e),c(this)}i="function"==typeof t?t:"object"==typeof n&&n&&n.nextTick?n.nextTick:function(e){setTimeout(e,0)},e.exports=a,a.extend=c,a.Promise=f,f.prototype=Object.create(o.prototype),f.prototype.constructor=f}).call(this,r(31).setImmediate,r(4))},function(e,t,r){var n=r(365),i=r(366);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";(function(n){const i=r(72),o=r(25)(r(377)),s=r(187),a=r(57),u=r(102),c=r(29),f=r(9);function l(e,t){let r;!u.isDAGNode(e)&&e.links&&(e.links=e.links.map(e=>a.isDAGLink(e)?e:a.util.createDagLinkFromB58EncodedHash(e)));try{r=o.PBNode.encode(function(e){const t={};e.data&&e.data.length>0?t.Data=e.data:t.Data=null;e.links&&e.links.length>0?t.Links=e.links.map(e=>({Hash:e.multihash,Name:e.name,Tsize:e.size})):t.Links=null;return t}(e))}catch(e){return t(e)}t(null,r)}(t=e.exports).serialize=l,t.deserialize=function(e,t){const r=o.PBNode.decode(e),i=r.Links.map(e=>new a(e.Name,e.Tsize,e.Hash)),s=null==r.Data?n.alloc(0):n.from(r.Data);u.create(s,i,t)},t.cid=function(e,t,r){"function"==typeof t&&(r=t,t={});const n=(t=t||{}).hashAlg||s.defaultHashAlg;let o=t.version;void 0===o&&(o="sha2-256"===n?0:1),f([t=>l(e,t),(e,t)=>c(e,n,t),(e,t)=>t(null,new i(o,s.multicodec,e))],r)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";t.defined=function(e){return null!=e&&("number"!=typeof e||!isNaN(e))}},function(e,t,r){"use strict";(function(e,n){Object.defineProperty(t,"__esModule",{value:!0}),t.hasNextTick=t.hasSetImmediate=void 0,t.fallback=f,t.wrap=l;var i,o=r(74),s=(i=o)&&i.__esModule?i:{default:i};var a,u=t.hasSetImmediate="function"==typeof e&&e,c=t.hasNextTick="object"==typeof n&&"function"==typeof n.nextTick;function f(e){setTimeout(e,0)}function l(e){return function(t){var r=(0,s.default)(arguments,1);e(function(){t.apply(null,r)})}}a=u?e:c?n.nextTick:f,t.default=l(a)}).call(this,r(31).setImmediate,r(4))},function(e,t,r){"use strict";e.exports=function(e,t){return e.then(e=>{t(null,e)},e=>{t(e)})}},function(e,t,r){"use strict";e.exports=(()=>{if("undefined"!=typeof self&&(r(191)(self),self.crypto))return self.crypto;throw new Error("Please use an environment with crypto support")})},function(e,t,r){(t=e.exports=r(197)).Stream=t,t.Readable=t,t.Writable=r(137),t.Duplex=r(59),t.Transform=r(200),t.PassThrough=r(402)},function(e,t,r){"use strict";(function(t,n,i){var o=r(109);function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=v;var a,u=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?n:o.nextTick;v.WritableState=m;var c=r(87);c.inherits=r(56);var f={deprecate:r(401)},l=r(198),h=r(110).Buffer,p=i.Uint8Array||function(){};var d,y=r(199);function g(){}function m(e,t){a=a||r(59),e=e||{};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,c=e.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(c||0===c)?c:f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(o.nextTick(i,n),o.nextTick(k,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),k(e,t))}(e,r,n,t,i);else{var s=S(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||E(e,r),n?u(_,e,r,s,i):_(e,r,s,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function v(e){if(a=a||r(59),!(d.call(v,this)||this instanceof a))return new v(e);this._writableState=new m(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function b(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function _(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),k(e,t)}function E(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,b(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,l=r.callback;if(b(e,t,!1,t.objectMode?1:c.length,c,f,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function w(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),k(e,t)})}function k(e,t){var r=S(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(w,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}c.inherits(v,l),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===v&&(e&&e._writableState instanceof m)}})):d=function(e){return e instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(e,t,r){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=e,h.isBuffer(n)||n instanceof p);return a&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=g),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),o.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),o.nextTick(n,s),i=!1),i}(this,i,e,r))&&(i.pendingcb++,s=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,r));return t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,k(e,t),r&&(t.finished?o.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),v.prototype.destroy=y.destroy,v.prototype._undestroy=y.undestroy,v.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(4),r(31).setImmediate,r(12))},function(e,t,r){"use strict";var n=r(7),i=r(203),o=r(6).Buffer,s=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(e,t){return e<>>32-t}function c(e,t,r,n,i,o,s){return u(e+(t&r|~t&n)+i+o|0,s)+t|0}function f(e,t,r,n,i,o,s){return u(e+(t&n|r&~n)+i+o|0,s)+t|0}function l(e,t,r,n,i,o,s){return u(e+(t^r^n)+i+o|0,s)+t|0}function h(e,t,r,n,i,o,s){return u(e+(r^(t|~n))+i+o|0,s)+t|0}n(a,i),a.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=c(r,n,i,o,e[0],3614090360,7),o=c(o,r,n,i,e[1],3905402710,12),i=c(i,o,r,n,e[2],606105819,17),n=c(n,i,o,r,e[3],3250441966,22),r=c(r,n,i,o,e[4],4118548399,7),o=c(o,r,n,i,e[5],1200080426,12),i=c(i,o,r,n,e[6],2821735955,17),n=c(n,i,o,r,e[7],4249261313,22),r=c(r,n,i,o,e[8],1770035416,7),o=c(o,r,n,i,e[9],2336552879,12),i=c(i,o,r,n,e[10],4294925233,17),n=c(n,i,o,r,e[11],2304563134,22),r=c(r,n,i,o,e[12],1804603682,7),o=c(o,r,n,i,e[13],4254626195,12),i=c(i,o,r,n,e[14],2792965006,17),r=f(r,n=c(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=f(o,r,n,i,e[6],3225465664,9),i=f(i,o,r,n,e[11],643717713,14),n=f(n,i,o,r,e[0],3921069994,20),r=f(r,n,i,o,e[5],3593408605,5),o=f(o,r,n,i,e[10],38016083,9),i=f(i,o,r,n,e[15],3634488961,14),n=f(n,i,o,r,e[4],3889429448,20),r=f(r,n,i,o,e[9],568446438,5),o=f(o,r,n,i,e[14],3275163606,9),i=f(i,o,r,n,e[3],4107603335,14),n=f(n,i,o,r,e[8],1163531501,20),r=f(r,n,i,o,e[13],2850285829,5),o=f(o,r,n,i,e[2],4243563512,9),i=f(i,o,r,n,e[7],1735328473,14),r=l(r,n=f(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=l(o,r,n,i,e[8],2272392833,11),i=l(i,o,r,n,e[11],1839030562,16),n=l(n,i,o,r,e[14],4259657740,23),r=l(r,n,i,o,e[1],2763975236,4),o=l(o,r,n,i,e[4],1272893353,11),i=l(i,o,r,n,e[7],4139469664,16),n=l(n,i,o,r,e[10],3200236656,23),r=l(r,n,i,o,e[13],681279174,4),o=l(o,r,n,i,e[0],3936430074,11),i=l(i,o,r,n,e[3],3572445317,16),n=l(n,i,o,r,e[6],76029189,23),r=l(r,n,i,o,e[9],3654602809,4),o=l(o,r,n,i,e[12],3873151461,11),i=l(i,o,r,n,e[15],530742520,16),r=h(r,n=l(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=h(o,r,n,i,e[7],1126891415,10),i=h(i,o,r,n,e[14],2878612391,15),n=h(n,i,o,r,e[5],4237533241,21),r=h(r,n,i,o,e[12],1700485571,6),o=h(o,r,n,i,e[3],2399980690,10),i=h(i,o,r,n,e[10],4293915773,15),n=h(n,i,o,r,e[1],2240044497,21),r=h(r,n,i,o,e[8],1873313359,6),o=h(o,r,n,i,e[15],4264355552,10),i=h(i,o,r,n,e[6],2734768916,15),n=h(n,i,o,r,e[13],1309151649,21),r=h(r,n,i,o,e[4],4149444226,6),o=h(o,r,n,i,e[11],3174756917,10),i=h(i,o,r,n,e[2],718787259,15),n=h(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=a},function(e,t,r){"use strict";e.exports="enum KeyType {\n RSA = 0;\n Ed25519 = 1;\n Secp256k1 = 2;\n}\nmessage PublicKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}\nmessage PrivateKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}"},function(e,t,r){var n=r(3);r(8),e.exports=n.cipher=n.cipher||{},n.cipher.algorithms=n.cipher.algorithms||{},n.cipher.createCipher=function(e,t){var r=e;if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e);return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!1})},n.cipher.createDecipher=function(e,t){var r=e;if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e);return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!0})},n.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),n.cipher.algorithms[e]=t},n.cipher.getAlgorithm=function(e){return(e=e.toUpperCase())in n.cipher.algorithms?n.cipher.algorithms[e]:null};var i=n.cipher.BlockCipher=function(e){this.algorithm=e.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=e.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=e.decrypt,this.algorithm.initialize(e)};i.prototype.start=function(e){e=e||{};var t={};for(var r in e)t[r]=e[r];t.decrypt=this._decrypt,this._finish=!1,this._input=n.util.createBuffer(),this.output=e.output||n.util.createBuffer(),this.mode.start(t)},i.prototype.update=function(e){for(e&&this._input.putBuffer(e);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},i.prototype.finish=function(e){!e||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(t){return e(this.blockSize,t,!1)},this.mode.unpad=function(t){return e(this.blockSize,t,!0)});var t={};return t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t))&&(this._finish=!0,this.update(),!(this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t))&&!(this.mode.afterFinish&&!this.mode.afterFinish(this.output,t)))}},function(e,t,r){var n=r(3);r(45),r(8);var i=e.exports=n.md5=n.md5||{};n.md.md5=n.md.algorithms.md5=i,i.create=function(){c||function(){o=String.fromCharCode(128),o+=n.util.fillString(String.fromCharCode(0),64),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],a=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],u=new Array(64);for(var e=0;e<64;++e)u[e]=Math.floor(4294967296*Math.abs(Math.sin(e+1)));c=!0}();var e=null,t=n.util.createBuffer(),r=new Array(16),i={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,o=0;o>>0,a>>>0];for(var u=i.fullMessageLength.length-1;u>=0;--u)i.fullMessageLength[u]+=a[1],a[1]=a[0]+(i.fullMessageLength[u]/4294967296>>>0),i.fullMessageLength[u]=i.fullMessageLength[u]>>>0,a[0]=a[1]/4294967296>>>0;return t.putBytes(o),f(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(t.bytes());var a=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(o.substr(0,i.blockLength-a));for(var u,c=0,l=i.fullMessageLength.length-1;l>=0;--l)c=(u=8*i.fullMessageLength[l]+c)/4294967296>>>0,s.putInt32Le(u>>>0);var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3};f(h,r,s);var p=n.util.createBuffer();return p.putInt32Le(h.h0),p.putInt32Le(h.h1),p.putInt32Le(h.h2),p.putInt32Le(h.h3),p},i};var o=null,s=null,a=null,u=null,c=!1;function f(e,t,r){for(var n,i,o,c,f,l,h,p=r.length();p>=64;){for(i=e.h0,o=e.h1,c=e.h2,f=e.h3,h=0;h<16;++h)t[h]=r.getInt32Le(),n=i+(f^o&(c^f))+u[h]+t[h],i=f,f=c,c=o,o+=n<<(l=a[h])|n>>>32-l;for(;h<32;++h)n=i+(c^f&(o^c))+u[h]+t[s[h]],i=f,f=c,c=o,o+=n<<(l=a[h])|n>>>32-l;for(;h<48;++h)n=i+(o^c^f)+u[h]+t[s[h]],i=f,f=c,c=o,o+=n<<(l=a[h])|n>>>32-l;for(;h<64;++h)n=i+(c^(o|~f))+u[h]+t[s[h]],i=f,f=c,c=o,o+=n<<(l=a[h])|n>>>32-l;e.h0=e.h0+i|0,e.h1=e.h1+o|0,e.h2=e.h2+c|0,e.h3=e.h3+f|0,p-=64}}},function(e,t,r){var n=r(3);r(32),r(8),(e.exports=n.pss=n.pss||{}).create=function(e){3===arguments.length&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var t,r=e.md,i=e.mgf,o=r.digestLength,s=e.salt||null;if("string"==typeof s&&(s=n.util.createBuffer(s)),"saltLength"in e)t=e.saltLength;else{if(null===s)throw new Error("Salt length not specified or specific salt not given.");t=s.length()}if(null!==s&&s.length()!==t)throw new Error("Given salt length does not match length of given salt.");var a=e.prng||n.random,u={encode:function(e,u){var c,f,l=u-1,h=Math.ceil(l/8),p=e.digest().getBytes();if(h>8*h-l&255;return(_=String.fromCharCode(_.charCodeAt(0)&~E)+_.substr(1))+y+String.fromCharCode(188)},verify:function(e,s,a){var u,c=a-1,f=Math.ceil(c/8);if(s=s.substr(-f),f>8*f-c&255;if(0!=(h.charCodeAt(0)&d))throw new Error("Bits beyond keysize not zero as expected.");var y=i.generate(p,l),g="";for(u=0;u{t(null,e)},e=>{t(e)})}},function(e,t,r){"use strict";e.exports=(()=>{if("undefined"!=typeof self&&(r(191)(self),self.crypto))return self.crypto;throw new Error("Please use an environment with crypto support")})},function(e,t,r){"use strict";e.exports="enum KeyType {\n RSA = 0;\n Ed25519 = 1;\n Secp256k1 = 2;\n}\nmessage PublicKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}\nmessage PrivateKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}"},function(e,t){e.exports=function(){var e,t,r,n,i=function(i,o){e?e(i,o):i?(n=i,r=o):t=o};return i.resolve=function(i){if(e)throw new Error("already resolved");if(!(e=i))throw new Error("no read cannot resolve!"+e);t&&i(null,t),r&&i(n,r)},i.abort=function(e){i.resolve(function(t,r){r(e||!0)})},i}},,,,,,function(e,t,r){"use strict";var n=t,i=r(0).Buffer,o=r(261);n.toBuffer=function(e,t,r){var n;if(r=~~r,this.isV4Format(e))n=t||new i(r+4),e.split(/\./g).map(function(e){n[r++]=255&parseInt(e,10)});else if(this.isV6Format(e)){var o,s=e.split(":",8);for(o=0;o0;o--)u.push("0");s.splice.apply(s,u)}for(n=t||new i(r+16),o=0;o>8&255,n[r++]=255&c}}if(!n)throw Error("Invalid ip address: "+e);return n},n.toString=function(e,t,r){t=~~t;var n=[];if(4===(r=r||e.length-t)){for(var i=0;i32?"ipv6":u(t))&&(r=16);for(var o=new i(r),s=0,a=o.length;s>c)}return n.toString(o)},n.mask=function(e,t){e=n.toBuffer(e),t=n.toBuffer(t);var r=new i(Math.max(e.length,t.length)),o=0;if(e.length===t.length)for(o=0;oe.length&&(i=t,o=e);var s=i.length-o.length;for(r=s;r>>0},n.fromLong=function(e){return(e>>>24)+"."+(e>>16&255)+"."+(e>>8&255)+"."+(255&e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){if(null!==e){var t=e;e=null,t.apply(this,arguments)}}},e.exports=t.default},function(e,t,r){var n=r(391),i=r(408),o=r(195);t.createCipher=t.Cipher=n.createCipher,t.createCipheriv=t.Cipheriv=n.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(o)}},function(e,t,r){var n=r(3);r(45),r(8);var i=e.exports=n.sha512=n.sha512||{};n.md.sha512=n.md.algorithms.sha512=i;var o=n.sha384=n.sha512.sha384=n.sha512.sha384||{};o.create=function(){return i.create("SHA-384")},n.md.sha384=n.md.algorithms.sha384=o,n.sha512.sha256=n.sha512.sha256||{create:function(){return i.create("SHA-512/256")}},n.md["sha512/256"]=n.md.algorithms["sha512/256"]=n.sha512.sha256,n.sha512.sha224=n.sha512.sha224||{create:function(){return i.create("SHA-512/224")}},n.md["sha512/224"]=n.md.algorithms["sha512/224"]=n.sha512.sha224,i.create=function(e){if(a||(s=String.fromCharCode(128),s+=n.util.fillString(String.fromCharCode(0),128),u=[[1116352408,3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],[1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],[3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],(c={})["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],c["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],c["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],c["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],a=!0),void 0===e&&(e="SHA-512"),!(e in c))throw new Error("Invalid SHA-512 algorithm: "+e);for(var t=c[e],r=null,i=n.util.createBuffer(),o=new Array(80),l=0;l<80;++l)o[l]=new Array(2);var h=64;switch(e){case"SHA-384":h=48;break;case"SHA-512/256":h=32;break;case"SHA-512/224":h=28}var p={algorithm:e.replace("-","").toLowerCase(),blockLength:128,digestLength:h,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){p.messageLength=0,p.fullMessageLength=p.messageLength128=[];for(var e=p.messageLengthSize/4,o=0;o>>0,s>>>0];for(var a=p.fullMessageLength.length-1;a>=0;--a)p.fullMessageLength[a]+=s[1],s[1]=s[0]+(p.fullMessageLength[a]/4294967296>>>0),p.fullMessageLength[a]=p.fullMessageLength[a]>>>0,s[0]=s[1]/4294967296>>>0;return i.putBytes(e),f(r,o,i),(i.read>2048||0===i.length())&&i.compact(),p},p.digest=function(){var t=n.util.createBuffer();t.putBytes(i.bytes());var a,u=p.fullMessageLength[p.fullMessageLength.length-1]+p.messageLengthSize&p.blockLength-1;t.putBytes(s.substr(0,p.blockLength-u));for(var c=8*p.fullMessageLength[0],l=0;l>>0,t.putInt32(c>>>0),c=a>>>0;t.putInt32(c);var h=new Array(r.length);for(l=0;l=128;){for(x=0;x<16;++x)t[x][0]=r.getInt32()>>>0,t[x][1]=r.getInt32()>>>0;for(;x<80;++x)n=(((M=(L=t[x-2])[0])>>>19|(N=L[1])<<13)^(N>>>29|M<<3)^M>>>6)>>>0,i=((M<<13|N>>>19)^(N<<3|M>>>29)^(M<<26|N>>>6))>>>0,o=(((M=(P=t[x-15])[0])>>>1|(N=P[1])<<31)^(M>>>8|N<<24)^M>>>7)>>>0,s=((M<<31|N>>>1)^(M<<24|N>>>8)^(M<<25|N>>>7))>>>0,R=t[x-7],K=t[x-16],N=i+R[1]+s+K[1],t[x][0]=n+R[0]+o+K[0]+(N/4294967296>>>0)>>>0,t[x][1]=N>>>0;for(d=e[0][0],y=e[0][1],g=e[1][0],m=e[1][1],v=e[2][0],b=e[2][1],_=e[3][0],E=e[3][1],S=e[4][0],w=e[4][1],k=e[5][0],A=e[5][1],C=e[6][0],B=e[6][1],T=e[7][0],I=e[7][1],x=0;x<80;++x)f=((S>>>14|w<<18)^(S>>>18|w<<14)^(w>>>9|S<<23))>>>0,l=(C^S&(k^C))>>>0,a=((d>>>28|y<<4)^(y>>>2|d<<30)^(y>>>7|d<<25))>>>0,c=((d<<4|y>>>28)^(y<<30|d>>>2)^(y<<25|d>>>7))>>>0,h=(d&g|v&(d^g))>>>0,p=(y&m|b&(y^m))>>>0,N=I+(((S<<18|w>>>14)^(S<<14|w>>>18)^(w<<23|S>>>9))>>>0)+((B^w&(A^B))>>>0)+u[x][1]+t[x][1],n=T+f+l+u[x][0]+t[x][0]+(N/4294967296>>>0)>>>0,i=N>>>0,o=a+h+((N=c+p)/4294967296>>>0)>>>0,s=N>>>0,T=C,I=B,C=k,B=A,k=S,A=w,S=_+n+((N=E+i)/4294967296>>>0)>>>0,w=N>>>0,_=v,E=b,v=g,b=m,g=d,m=y,d=n+o+((N=i+s)/4294967296>>>0)>>>0,y=N>>>0;N=e[0][1]+y,e[0][0]=e[0][0]+d+(N/4294967296>>>0)>>>0,e[0][1]=N>>>0,N=e[1][1]+m,e[1][0]=e[1][0]+g+(N/4294967296>>>0)>>>0,e[1][1]=N>>>0,N=e[2][1]+b,e[2][0]=e[2][0]+v+(N/4294967296>>>0)>>>0,e[2][1]=N>>>0,N=e[3][1]+E,e[3][0]=e[3][0]+_+(N/4294967296>>>0)>>>0,e[3][1]=N>>>0,N=e[4][1]+w,e[4][0]=e[4][0]+S+(N/4294967296>>>0)>>>0,e[4][1]=N>>>0,N=e[5][1]+A,e[5][0]=e[5][0]+k+(N/4294967296>>>0)>>>0,e[5][1]=N>>>0,N=e[6][1]+B,e[6][0]=e[6][0]+C+(N/4294967296>>>0)>>>0,e[6][1]=N>>>0,N=e[7][1]+I,e[7][0]=e[7][0]+T+(N/4294967296>>>0)>>>0,e[7][1]=N>>>0,O-=128}}},function(e,t,r){!function(e){"use strict";var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function y(e,t,r,n,i){var o,s=0;for(o=0;o>>8)-1}function g(e,t,r,n){return y(e,t,r,n,16)}function m(e,t,r,n){return y(e,t,r,n,32)}function v(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,f=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,g=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,m=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,v=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,_=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,E=o,S=s,w=a,k=u,A=c,C=f,B=l,T=h,I=p,x=d,M=y,N=g,L=m,R=v,P=b,K=_,O=0;O<20;O+=2)E^=(i=(L^=(i=(I^=(i=(A^=(i=E+L|0)<<7|i>>>25)+E|0)<<9|i>>>23)+A|0)<<13|i>>>19)+I|0)<<18|i>>>14,C^=(i=(S^=(i=(R^=(i=(x^=(i=C+S|0)<<7|i>>>25)+C|0)<<9|i>>>23)+x|0)<<13|i>>>19)+R|0)<<18|i>>>14,M^=(i=(B^=(i=(w^=(i=(P^=(i=M+B|0)<<7|i>>>25)+M|0)<<9|i>>>23)+P|0)<<13|i>>>19)+w|0)<<18|i>>>14,K^=(i=(N^=(i=(T^=(i=(k^=(i=K+N|0)<<7|i>>>25)+K|0)<<9|i>>>23)+k|0)<<13|i>>>19)+T|0)<<18|i>>>14,E^=(i=(k^=(i=(w^=(i=(S^=(i=E+k|0)<<7|i>>>25)+E|0)<<9|i>>>23)+S|0)<<13|i>>>19)+w|0)<<18|i>>>14,C^=(i=(A^=(i=(T^=(i=(B^=(i=C+A|0)<<7|i>>>25)+C|0)<<9|i>>>23)+B|0)<<13|i>>>19)+T|0)<<18|i>>>14,M^=(i=(x^=(i=(I^=(i=(N^=(i=M+x|0)<<7|i>>>25)+M|0)<<9|i>>>23)+N|0)<<13|i>>>19)+I|0)<<18|i>>>14,K^=(i=(P^=(i=(R^=(i=(L^=(i=K+P|0)<<7|i>>>25)+K|0)<<9|i>>>23)+L|0)<<13|i>>>19)+R|0)<<18|i>>>14;E=E+o|0,S=S+s|0,w=w+a|0,k=k+u|0,A=A+c|0,C=C+f|0,B=B+l|0,T=T+h|0,I=I+p|0,x=x+d|0,M=M+y|0,N=N+g|0,L=L+m|0,R=R+v|0,P=P+b|0,K=K+_|0,e[0]=E>>>0&255,e[1]=E>>>8&255,e[2]=E>>>16&255,e[3]=E>>>24&255,e[4]=S>>>0&255,e[5]=S>>>8&255,e[6]=S>>>16&255,e[7]=S>>>24&255,e[8]=w>>>0&255,e[9]=w>>>8&255,e[10]=w>>>16&255,e[11]=w>>>24&255,e[12]=k>>>0&255,e[13]=k>>>8&255,e[14]=k>>>16&255,e[15]=k>>>24&255,e[16]=A>>>0&255,e[17]=A>>>8&255,e[18]=A>>>16&255,e[19]=A>>>24&255,e[20]=C>>>0&255,e[21]=C>>>8&255,e[22]=C>>>16&255,e[23]=C>>>24&255,e[24]=B>>>0&255,e[25]=B>>>8&255,e[26]=B>>>16&255,e[27]=B>>>24&255,e[28]=T>>>0&255,e[29]=T>>>8&255,e[30]=T>>>16&255,e[31]=T>>>24&255,e[32]=I>>>0&255,e[33]=I>>>8&255,e[34]=I>>>16&255,e[35]=I>>>24&255,e[36]=x>>>0&255,e[37]=x>>>8&255,e[38]=x>>>16&255,e[39]=x>>>24&255,e[40]=M>>>0&255,e[41]=M>>>8&255,e[42]=M>>>16&255,e[43]=M>>>24&255,e[44]=N>>>0&255,e[45]=N>>>8&255,e[46]=N>>>16&255,e[47]=N>>>24&255,e[48]=L>>>0&255,e[49]=L>>>8&255,e[50]=L>>>16&255,e[51]=L>>>24&255,e[52]=R>>>0&255,e[53]=R>>>8&255,e[54]=R>>>16&255,e[55]=R>>>24&255,e[56]=P>>>0&255,e[57]=P>>>8&255,e[58]=P>>>16&255,e[59]=P>>>24&255,e[60]=K>>>0&255,e[61]=K>>>8&255,e[62]=K>>>16&255,e[63]=K>>>24&255}(e,t,r,n)}function b(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,f=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,g=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,m=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,v=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,_=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,E=0;E<20;E+=2)o^=(i=(m^=(i=(p^=(i=(c^=(i=o+m|0)<<7|i>>>25)+o|0)<<9|i>>>23)+c|0)<<13|i>>>19)+p|0)<<18|i>>>14,f^=(i=(s^=(i=(v^=(i=(d^=(i=f+s|0)<<7|i>>>25)+f|0)<<9|i>>>23)+d|0)<<13|i>>>19)+v|0)<<18|i>>>14,y^=(i=(l^=(i=(a^=(i=(b^=(i=y+l|0)<<7|i>>>25)+y|0)<<9|i>>>23)+b|0)<<13|i>>>19)+a|0)<<18|i>>>14,_^=(i=(g^=(i=(h^=(i=(u^=(i=_+g|0)<<7|i>>>25)+_|0)<<9|i>>>23)+u|0)<<13|i>>>19)+h|0)<<18|i>>>14,o^=(i=(u^=(i=(a^=(i=(s^=(i=o+u|0)<<7|i>>>25)+o|0)<<9|i>>>23)+s|0)<<13|i>>>19)+a|0)<<18|i>>>14,f^=(i=(c^=(i=(h^=(i=(l^=(i=f+c|0)<<7|i>>>25)+f|0)<<9|i>>>23)+l|0)<<13|i>>>19)+h|0)<<18|i>>>14,y^=(i=(d^=(i=(p^=(i=(g^=(i=y+d|0)<<7|i>>>25)+y|0)<<9|i>>>23)+g|0)<<13|i>>>19)+p|0)<<18|i>>>14,_^=(i=(b^=(i=(v^=(i=(m^=(i=_+b|0)<<7|i>>>25)+_|0)<<9|i>>>23)+m|0)<<13|i>>>19)+v|0)<<18|i>>>14;e[0]=o>>>0&255,e[1]=o>>>8&255,e[2]=o>>>16&255,e[3]=o>>>24&255,e[4]=f>>>0&255,e[5]=f>>>8&255,e[6]=f>>>16&255,e[7]=f>>>24&255,e[8]=y>>>0&255,e[9]=y>>>8&255,e[10]=y>>>16&255,e[11]=y>>>24&255,e[12]=_>>>0&255,e[13]=_>>>8&255,e[14]=_>>>16&255,e[15]=_>>>24&255,e[16]=l>>>0&255,e[17]=l>>>8&255,e[18]=l>>>16&255,e[19]=l>>>24&255,e[20]=h>>>0&255,e[21]=h>>>8&255,e[22]=h>>>16&255,e[23]=h>>>24&255,e[24]=p>>>0&255,e[25]=p>>>8&255,e[26]=p>>>16&255,e[27]=p>>>24&255,e[28]=d>>>0&255,e[29]=d>>>8&255,e[30]=d>>>16&255,e[31]=d>>>24&255}(e,t,r,n)}var _=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function E(e,t,r,n,i,o,s){var a,u,c=new Uint8Array(16),f=new Uint8Array(64);for(u=0;u<16;u++)c[u]=0;for(u=0;u<8;u++)c[u]=o[u];for(;i>=64;){for(v(f,c,s,_),u=0;u<64;u++)e[t+u]=r[n+u]^f[u];for(a=1,u=8;u<16;u++)a=a+(255&c[u])|0,c[u]=255&a,a>>>=8;i-=64,t+=64,n+=64}if(i>0)for(v(f,c,s,_),u=0;u=64;){for(v(u,a,i,_),s=0;s<64;s++)e[t+s]=u[s];for(o=1,s=8;s<16;s++)o=o+(255&a[s])|0,a[s]=255&o,o>>>=8;r-=64,t+=64}if(r>0)for(v(u,a,i,_),s=0;s>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|i<<9),o=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,s=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(o>>>14|s<<2),a=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(s>>>11|a<<5),u=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(a>>>8|u<<8),this.r[9]=u>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function C(e,t,r,n,i,o){var s=new A(o);return s.update(r,n,i),s.finish(e,t),0}function B(e,t,r,n,i,o){var s=new Uint8Array(16);return C(s,0,r,n,i,o),g(e,t,s,0)}function T(e,t,r,n,i){var o;if(r<32)return-1;for(k(e,0,t,0,r,n,i),C(e,16,e,32,r-32,e),o=0;o<16;o++)e[o]=0;return 0}function I(e,t,r,n,i){var o,s=new Uint8Array(32);if(r<32)return-1;if(w(s,0,32,n,i),0!==B(t,16,t,32,r-32,s))return-1;for(k(e,0,t,0,r,n,i),o=0;o<32;o++)e[o]=0;return 0}function x(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function M(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function N(e,t,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(e[o]^t[o]),e[o]^=n,t[o]^=n}function L(e,r){var n,i,o,s=t(),a=t();for(n=0;n<16;n++)a[n]=r[n];for(M(a),M(a),M(a),i=0;i<2;i++){for(s[0]=a[0]-65517,n=1;n<15;n++)s[n]=a[n]-65535-(s[n-1]>>16&1),s[n-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),o=s[15]>>16&1,s[14]&=65535,N(a,s,1-o)}for(n=0;n<16;n++)e[2*n]=255&a[n],e[2*n+1]=a[n]>>8}function R(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return L(r,e),L(n,t),m(r,0,n,0)}function P(e){var t=new Uint8Array(32);return L(t,e),1&t[0]}function K(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function O(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function D(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function U(e,t,r){var n,i,o=0,s=0,a=0,u=0,c=0,f=0,l=0,h=0,p=0,d=0,y=0,g=0,m=0,v=0,b=0,_=0,E=0,S=0,w=0,k=0,A=0,C=0,B=0,T=0,I=0,x=0,M=0,N=0,L=0,R=0,P=0,K=r[0],O=r[1],D=r[2],U=r[3],j=r[4],F=r[5],V=r[6],q=r[7],J=r[8],H=r[9],z=r[10],G=r[11],Y=r[12],W=r[13],$=r[14],Q=r[15];o+=(n=t[0])*K,s+=n*O,a+=n*D,u+=n*U,c+=n*j,f+=n*F,l+=n*V,h+=n*q,p+=n*J,d+=n*H,y+=n*z,g+=n*G,m+=n*Y,v+=n*W,b+=n*$,_+=n*Q,s+=(n=t[1])*K,a+=n*O,u+=n*D,c+=n*U,f+=n*j,l+=n*F,h+=n*V,p+=n*q,d+=n*J,y+=n*H,g+=n*z,m+=n*G,v+=n*Y,b+=n*W,_+=n*$,E+=n*Q,a+=(n=t[2])*K,u+=n*O,c+=n*D,f+=n*U,l+=n*j,h+=n*F,p+=n*V,d+=n*q,y+=n*J,g+=n*H,m+=n*z,v+=n*G,b+=n*Y,_+=n*W,E+=n*$,S+=n*Q,u+=(n=t[3])*K,c+=n*O,f+=n*D,l+=n*U,h+=n*j,p+=n*F,d+=n*V,y+=n*q,g+=n*J,m+=n*H,v+=n*z,b+=n*G,_+=n*Y,E+=n*W,S+=n*$,w+=n*Q,c+=(n=t[4])*K,f+=n*O,l+=n*D,h+=n*U,p+=n*j,d+=n*F,y+=n*V,g+=n*q,m+=n*J,v+=n*H,b+=n*z,_+=n*G,E+=n*Y,S+=n*W,w+=n*$,k+=n*Q,f+=(n=t[5])*K,l+=n*O,h+=n*D,p+=n*U,d+=n*j,y+=n*F,g+=n*V,m+=n*q,v+=n*J,b+=n*H,_+=n*z,E+=n*G,S+=n*Y,w+=n*W,k+=n*$,A+=n*Q,l+=(n=t[6])*K,h+=n*O,p+=n*D,d+=n*U,y+=n*j,g+=n*F,m+=n*V,v+=n*q,b+=n*J,_+=n*H,E+=n*z,S+=n*G,w+=n*Y,k+=n*W,A+=n*$,C+=n*Q,h+=(n=t[7])*K,p+=n*O,d+=n*D,y+=n*U,g+=n*j,m+=n*F,v+=n*V,b+=n*q,_+=n*J,E+=n*H,S+=n*z,w+=n*G,k+=n*Y,A+=n*W,C+=n*$,B+=n*Q,p+=(n=t[8])*K,d+=n*O,y+=n*D,g+=n*U,m+=n*j,v+=n*F,b+=n*V,_+=n*q,E+=n*J,S+=n*H,w+=n*z,k+=n*G,A+=n*Y,C+=n*W,B+=n*$,T+=n*Q,d+=(n=t[9])*K,y+=n*O,g+=n*D,m+=n*U,v+=n*j,b+=n*F,_+=n*V,E+=n*q,S+=n*J,w+=n*H,k+=n*z,A+=n*G,C+=n*Y,B+=n*W,T+=n*$,I+=n*Q,y+=(n=t[10])*K,g+=n*O,m+=n*D,v+=n*U,b+=n*j,_+=n*F,E+=n*V,S+=n*q,w+=n*J,k+=n*H,A+=n*z,C+=n*G,B+=n*Y,T+=n*W,I+=n*$,x+=n*Q,g+=(n=t[11])*K,m+=n*O,v+=n*D,b+=n*U,_+=n*j,E+=n*F,S+=n*V,w+=n*q,k+=n*J,A+=n*H,C+=n*z,B+=n*G,T+=n*Y,I+=n*W,x+=n*$,M+=n*Q,m+=(n=t[12])*K,v+=n*O,b+=n*D,_+=n*U,E+=n*j,S+=n*F,w+=n*V,k+=n*q,A+=n*J,C+=n*H,B+=n*z,T+=n*G,I+=n*Y,x+=n*W,M+=n*$,N+=n*Q,v+=(n=t[13])*K,b+=n*O,_+=n*D,E+=n*U,S+=n*j,w+=n*F,k+=n*V,A+=n*q,C+=n*J,B+=n*H,T+=n*z,I+=n*G,x+=n*Y,M+=n*W,N+=n*$,L+=n*Q,b+=(n=t[14])*K,_+=n*O,E+=n*D,S+=n*U,w+=n*j,k+=n*F,A+=n*V,C+=n*q,B+=n*J,T+=n*H,I+=n*z,x+=n*G,M+=n*Y,N+=n*W,L+=n*$,R+=n*Q,_+=(n=t[15])*K,s+=38*(S+=n*D),a+=38*(w+=n*U),u+=38*(k+=n*j),c+=38*(A+=n*F),f+=38*(C+=n*V),l+=38*(B+=n*q),h+=38*(T+=n*J),p+=38*(I+=n*H),d+=38*(x+=n*z),y+=38*(M+=n*G),g+=38*(N+=n*Y),m+=38*(L+=n*W),v+=38*(R+=n*$),b+=38*(P+=n*Q),o=(n=(o+=38*(E+=n*O))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),_=(n=_+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),_=(n=_+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),e[0]=o,e[1]=s,e[2]=a,e[3]=u,e[4]=c,e[5]=f,e[6]=l,e[7]=h,e[8]=p,e[9]=d,e[10]=y,e[11]=g,e[12]=m,e[13]=v,e[14]=b,e[15]=_}function j(e,t){U(e,t,t)}function F(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)j(i,i),2!==n&&4!==n&&U(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}function V(e,r,n){var i,o,s=new Uint8Array(32),a=new Float64Array(80),c=t(),f=t(),l=t(),h=t(),p=t(),d=t();for(o=0;o<31;o++)s[o]=r[o];for(s[31]=127&r[31]|64,s[0]&=248,K(a,n),o=0;o<16;o++)f[o]=a[o],h[o]=c[o]=l[o]=0;for(c[0]=h[0]=1,o=254;o>=0;--o)N(c,f,i=s[o>>>3]>>>(7&o)&1),N(l,h,i),O(p,c,l),D(c,c,l),O(l,f,h),D(f,f,h),j(h,p),j(d,c),U(c,l,c),U(l,f,p),O(p,c,l),D(c,c,l),j(f,c),D(l,h,d),U(c,l,u),O(c,c,h),U(l,l,c),U(c,h,d),U(h,f,a),j(f,p),N(c,f,i),N(l,h,i);for(o=0;o<16;o++)a[o+16]=c[o],a[o+32]=l[o],a[o+48]=f[o],a[o+64]=h[o];var y=a.subarray(32),g=a.subarray(16);return F(y,y),U(g,g,y),L(e,g),0}function q(e,t){return V(e,t,o)}function J(e,t){return n(t,32),q(e,t)}function H(e,t,r){var n=new Uint8Array(32);return V(n,r,t),b(e,i,n,_)}A.prototype.blocks=function(e,t,r){for(var n,i,o,s,a,u,c,f,l,h,p,d,y,g,m,v,b,_,E,S=this.fin?0:2048,w=this.h[0],k=this.h[1],A=this.h[2],C=this.h[3],B=this.h[4],T=this.h[5],I=this.h[6],x=this.h[7],M=this.h[8],N=this.h[9],L=this.r[0],R=this.r[1],P=this.r[2],K=this.r[3],O=this.r[4],D=this.r[5],U=this.r[6],j=this.r[7],F=this.r[8],V=this.r[9];r>=16;)h=l=0,h+=(w+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*L,h+=(k+=8191&(n>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*V),h+=(A+=8191&(i>>>10|(o=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*F),h+=(C+=8191&(o>>>7|(s=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*j),l=(h+=(B+=8191&(s>>>4|(a=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*U))>>>13,h&=8191,h+=(T+=a>>>1&8191)*(5*D),h+=(I+=8191&(a>>>14|(u=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*O),h+=(x+=8191&(u>>>11|(c=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*K),h+=(M+=8191&(c>>>8|(f=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*P),p=l+=(h+=(N+=f>>>5|S)*(5*R))>>>13,p+=w*R,p+=k*L,p+=A*(5*V),p+=C*(5*F),l=(p+=B*(5*j))>>>13,p&=8191,p+=T*(5*U),p+=I*(5*D),p+=x*(5*O),p+=M*(5*K),l+=(p+=N*(5*P))>>>13,p&=8191,d=l,d+=w*P,d+=k*R,d+=A*L,d+=C*(5*V),l=(d+=B*(5*F))>>>13,d&=8191,d+=T*(5*j),d+=I*(5*U),d+=x*(5*D),d+=M*(5*O),y=l+=(d+=N*(5*K))>>>13,y+=w*K,y+=k*P,y+=A*R,y+=C*L,l=(y+=B*(5*V))>>>13,y&=8191,y+=T*(5*F),y+=I*(5*j),y+=x*(5*U),y+=M*(5*D),g=l+=(y+=N*(5*O))>>>13,g+=w*O,g+=k*K,g+=A*P,g+=C*R,l=(g+=B*L)>>>13,g&=8191,g+=T*(5*V),g+=I*(5*F),g+=x*(5*j),g+=M*(5*U),m=l+=(g+=N*(5*D))>>>13,m+=w*D,m+=k*O,m+=A*K,m+=C*P,l=(m+=B*R)>>>13,m&=8191,m+=T*L,m+=I*(5*V),m+=x*(5*F),m+=M*(5*j),v=l+=(m+=N*(5*U))>>>13,v+=w*U,v+=k*D,v+=A*O,v+=C*K,l=(v+=B*P)>>>13,v&=8191,v+=T*R,v+=I*L,v+=x*(5*V),v+=M*(5*F),b=l+=(v+=N*(5*j))>>>13,b+=w*j,b+=k*U,b+=A*D,b+=C*O,l=(b+=B*K)>>>13,b&=8191,b+=T*P,b+=I*R,b+=x*L,b+=M*(5*V),_=l+=(b+=N*(5*F))>>>13,_+=w*F,_+=k*j,_+=A*U,_+=C*D,l=(_+=B*O)>>>13,_&=8191,_+=T*K,_+=I*P,_+=x*R,_+=M*L,E=l+=(_+=N*(5*V))>>>13,E+=w*V,E+=k*F,E+=A*j,E+=C*U,l=(E+=B*D)>>>13,E&=8191,E+=T*O,E+=I*K,E+=x*P,E+=M*R,w=h=8191&(l=(l=((l+=(E+=N*L)>>>13)<<2)+l|0)+(h&=8191)|0),k=p+=l>>>=13,A=d&=8191,C=y&=8191,B=g&=8191,T=m&=8191,I=v&=8191,x=b&=8191,M=_&=8191,N=E&=8191,t+=16,r-=16;this.h[0]=w,this.h[1]=k,this.h[2]=A,this.h[3]=C,this.h[4]=B,this.h[5]=T,this.h[6]=I,this.h[7]=x,this.h[8]=M,this.h[9]=N},A.prototype.finish=function(e,t){var r,n,i,o,s=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,s[0]=this.h[0]+5,r=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this.h[o]+r,r=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,n=(1^r)-1,o=0;o<10;o++)s[o]&=n;for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|s[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},A.prototype.update=function(e,t,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n=16&&(i=r-r%16,this.blocks(e,t,i),t+=i,r-=i),r){for(n=0;n=128;){for(S=0;S<16;S++)w=8*S+W,x[S]=r[w+0]<<24|r[w+1]<<16|r[w+2]<<8|r[w+3],M[S]=r[w+4]<<24|r[w+5]<<16|r[w+6]<<8|r[w+7];for(S=0;S<80;S++)if(i=N,o=L,s=R,a=P,u=K,c=O,f=D,U,h=j,p=F,d=V,y=q,g=J,m=H,v=z,G,C=65535&(A=G),B=A>>>16,T=65535&(k=U),I=k>>>16,C+=65535&(A=(J>>>14|K<<18)^(J>>>18|K<<14)^(K>>>9|J<<23)),B+=A>>>16,T+=65535&(k=(K>>>14|J<<18)^(K>>>18|J<<14)^(J>>>9|K<<23)),I+=k>>>16,C+=65535&(A=J&H^~J&z),B+=A>>>16,T+=65535&(k=K&O^~K&D),I+=k>>>16,k=Y[2*S],C+=65535&(A=Y[2*S+1]),B+=A>>>16,T+=65535&k,I+=k>>>16,k=x[S%16],B+=(A=M[S%16])>>>16,T+=65535&k,I+=k>>>16,T+=(B+=(C+=65535&A)>>>16)>>>16,C=65535&(A=E=65535&C|B<<16),B=A>>>16,T=65535&(k=_=65535&T|(I+=T>>>16)<<16),I=k>>>16,C+=65535&(A=(j>>>28|N<<4)^(N>>>2|j<<30)^(N>>>7|j<<25)),B+=A>>>16,T+=65535&(k=(N>>>28|j<<4)^(j>>>2|N<<30)^(j>>>7|N<<25)),I+=k>>>16,B+=(A=j&F^j&V^F&V)>>>16,T+=65535&(k=N&L^N&R^L&R),I+=k>>>16,l=65535&(T+=(B+=(C+=65535&A)>>>16)>>>16)|(I+=T>>>16)<<16,b=65535&C|B<<16,C=65535&(A=y),B=A>>>16,T=65535&(k=a),I=k>>>16,B+=(A=E)>>>16,T+=65535&(k=_),I+=k>>>16,L=i,R=o,P=s,K=a=65535&(T+=(B+=(C+=65535&A)>>>16)>>>16)|(I+=T>>>16)<<16,O=u,D=c,U=f,N=l,F=h,V=p,q=d,J=y=65535&C|B<<16,H=g,z=m,G=v,j=b,S%16==15)for(w=0;w<16;w++)k=x[w],C=65535&(A=M[w]),B=A>>>16,T=65535&k,I=k>>>16,k=x[(w+9)%16],C+=65535&(A=M[(w+9)%16]),B+=A>>>16,T+=65535&k,I+=k>>>16,_=x[(w+1)%16],C+=65535&(A=((E=M[(w+1)%16])>>>1|_<<31)^(E>>>8|_<<24)^(E>>>7|_<<25)),B+=A>>>16,T+=65535&(k=(_>>>1|E<<31)^(_>>>8|E<<24)^_>>>7),I+=k>>>16,_=x[(w+14)%16],B+=(A=((E=M[(w+14)%16])>>>19|_<<13)^(_>>>29|E<<3)^(E>>>6|_<<26))>>>16,T+=65535&(k=(_>>>19|E<<13)^(E>>>29|_<<3)^_>>>6),I+=k>>>16,I+=(T+=(B+=(C+=65535&A)>>>16)>>>16)>>>16,x[w]=65535&T|I<<16,M[w]=65535&C|B<<16;C=65535&(A=j),B=A>>>16,T=65535&(k=N),I=k>>>16,k=e[0],B+=(A=t[0])>>>16,T+=65535&k,I+=k>>>16,I+=(T+=(B+=(C+=65535&A)>>>16)>>>16)>>>16,e[0]=N=65535&T|I<<16,t[0]=j=65535&C|B<<16,C=65535&(A=F),B=A>>>16,T=65535&(k=L),I=k>>>16,k=e[1],B+=(A=t[1])>>>16,T+=65535&k,I+=k>>>16,I+=(T+=(B+=(C+=65535&A)>>>16)>>>16)>>>16,e[1]=L=65535&T|I<<16,t[1]=F=65535&C|B<<16,C=65535&(A=V),B=A>>>16,T=65535&(k=R),I=k>>>16,k=e[2],B+=(A=t[2])>>>16,T+=65535&k,I+=k>>>16,I+=(T+=(B+=(C+=65535&A)>>>16)>>>16)>>>16,e[2]=R=65535&T|I<<16,t[2]=V=65535&C|B<<16,C=65535&(A=q),B=A>>>16,T=65535&(k=P),I=k>>>16,k=e[3],B+=(A=t[3])>>>16,T+=65535&k,I+=k>>>16,I+=(T+=(B+=(C+=65535&A)>>>16)>>>16)>>>16,e[3]=P=65535&T|I<<16,t[3]=q=65535&C|B<<16,C=65535&(A=J),B=A>>>16,T=65535&(k=K),I=k>>>16,k=e[4],B+=(A=t[4])>>>16,T+=65535&k,I+=k>>>16,I+=(T+=(B+=(C+=65535&A)>>>16)>>>16)>>>16,e[4]=K=65535&T|I<<16,t[4]=J=65535&C|B<<16,C=65535&(A=H),B=A>>>16,T=65535&(k=O),I=k>>>16,k=e[5],B+=(A=t[5])>>>16,T+=65535&k,I+=k>>>16,I+=(T+=(B+=(C+=65535&A)>>>16)>>>16)>>>16,e[5]=O=65535&T|I<<16,t[5]=H=65535&C|B<<16,C=65535&(A=z),B=A>>>16,T=65535&(k=D),I=k>>>16,k=e[6],B+=(A=t[6])>>>16,T+=65535&k,I+=k>>>16,I+=(T+=(B+=(C+=65535&A)>>>16)>>>16)>>>16,e[6]=D=65535&T|I<<16,t[6]=z=65535&C|B<<16,C=65535&(A=G),B=A>>>16,T=65535&(k=U),I=k>>>16,k=e[7],B+=(A=t[7])>>>16,T+=65535&k,I+=k>>>16,I+=(T+=(B+=(C+=65535&A)>>>16)>>>16)>>>16,e[7]=U=65535&T|I<<16,t[7]=G=65535&C|B<<16,W+=128,n-=128}return n}function $(e,t,r){var n,i=new Int32Array(8),o=new Int32Array(8),s=new Uint8Array(256),a=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,W(i,o,t,r),r%=128,n=0;n=0;--i)Z(e,t,n=r[i/8|0]>>(7&i)&1),Q(t,e),Q(e,e),Z(e,t,n)}function te(e,r){var n=[t(),t(),t(),t()];x(n[0],l),x(n[1],h),x(n[2],a),U(n[3],l,h),ee(e,n,r)}function re(e,r,i){var o,s=new Uint8Array(64),a=[t(),t(),t(),t()];for(i||n(r,32),$(s,r,32),s[0]&=248,s[31]&=127,s[31]|=64,te(a,s),X(e,a),o=0;o<32;o++)r[o+32]=e[o];return 0}var ne=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ie(e,t){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i>8,t[i]-=256*r;t[i]+=r,t[n]=0}for(r=0,i=0;i<32;i++)t[i]+=r-(t[31]>>4)*ne[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*ne[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function oe(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;ie(e,r)}function se(e,r,n,i){var o,s,a=new Uint8Array(64),u=new Uint8Array(64),c=new Uint8Array(64),f=new Float64Array(64),l=[t(),t(),t(),t()];$(a,i,32),a[0]&=248,a[31]&=127,a[31]|=64;var h=n+64;for(o=0;o=0;n--)j(i,i),1!==n&&U(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}(n,n),U(n,n,o),U(n,n,u),U(n,n,u),U(e[0],n,u),j(i,e[0]),U(i,i,u),R(i,o)&&U(e[0],e[0],p),j(i,e[0]),U(i,i,u),R(i,o)?-1:(P(e[0])===r[31]>>7&&D(e[0],s,e[0]),U(e[3],e[0],e[1]),0)}function ue(e,r,n,i){var o,s=new Uint8Array(32),a=new Uint8Array(64),u=[t(),t(),t(),t()],c=[t(),t(),t(),t()];if(-1,n<64)return-1;if(ae(c,i))return-1;for(o=0;o=0},e.sign.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(64);return re(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(ye(e),64!==e.length)throw new Error("bad secret key size");for(var t=new Uint8Array(32),r=0;r>=8;for(;c>0;)o.push(255&c),c>>=8}for(var f=0;e[f]===i&&f0;)n.push(a%r),a=a/r|0}for(var u="",c=0;0===t[c]&&c=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){const n=r(18);function i(e){return parseInt(e.toString("hex"),16)}function o(e){let r=e.toString(16);return r.length%2==1&&(r="0"+r),t.from(r,"hex")}e.exports={numberToBuffer:o,bufferToNumber:i,varintBufferEncode:function(e){return t.from(n.encode(i(e)))},varintBufferDecode:function(e){return o(n.decode(e))}}}).call(this,r(0).Buffer)},function(e,t,r){(function(e,r){var n=200,i="Expected a function",o="__lodash_hash_undefined__",s=1,a=2,u=1/0,c=9007199254740991,f="[object Arguments]",l="[object Array]",h="[object Boolean]",p="[object Date]",d="[object Error]",y="[object Function]",g="[object GeneratorFunction]",m="[object Map]",v="[object Number]",b="[object Object]",_="[object RegExp]",E="[object Set]",S="[object String]",w="[object Symbol]",k="[object ArrayBuffer]",A="[object DataView]",C=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,B=/^\w*$/,T=/^\./,I=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,x=/\\(\\)?/g,M=/^\[object .+?Constructor\]$/,N=/^(?:0|[1-9]\d*)$/,L={};L["[object Float32Array]"]=L["[object Float64Array]"]=L["[object Int8Array]"]=L["[object Int16Array]"]=L["[object Int32Array]"]=L["[object Uint8Array]"]=L["[object Uint8ClampedArray]"]=L["[object Uint16Array]"]=L["[object Uint32Array]"]=!0,L[f]=L[l]=L[k]=L[h]=L[A]=L[p]=L[d]=L[y]=L[m]=L[v]=L[b]=L[_]=L[E]=L[S]=L["[object WeakMap]"]=!1;var R="object"==typeof e&&e&&e.Object===Object&&e,P="object"==typeof self&&self&&self.Object===Object&&self,K=R||P||Function("return this")(),O=t&&!t.nodeType&&t,D=O&&"object"==typeof r&&r&&!r.nodeType&&r,U=D&&D.exports===O&&R.process,j=function(){try{return U&&U.binding("util")}catch(e){}}(),F=j&&j.isTypedArray;function V(e,t){for(var r=-1,n=e?e.length:0,i=0,o=[];++r-1},Ae.prototype.set=function(e,t){var r=this.__data__,n=xe(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},Ce.prototype.clear=function(){this.__data__={hash:new ke,map:new(le||Ae),string:new ke}},Ce.prototype.delete=function(e){return Je(this,e).delete(e)},Ce.prototype.get=function(e){return Je(this,e).get(e)},Ce.prototype.has=function(e){return Je(this,e).has(e)},Ce.prototype.set=function(e,t){return Je(this,e).set(e,t),this},Be.prototype.add=Be.prototype.push=function(e){return this.__data__.set(e,o),this},Be.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.clear=function(){this.__data__=new Ae},Te.prototype.delete=function(e){return this.__data__.delete(e)},Te.prototype.get=function(e){return this.__data__.get(e)},Te.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Ae){var i=r.__data__;if(!le||i.lengthc))return!1;var l=o.get(e);if(l&&o.get(t))return l==t;var h=-1,p=!0,d=i&s?new Be:void 0;for(o.set(e,t),o.set(t,e);++h-1&&e%1==0&&e-1&&e%1==0&&e<=c}function at(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ut(e){return!!e&&"object"==typeof e}function ct(e){return"symbol"==typeof e||ut(e)&&ne.call(e)==w}var ft=F?function(e){return function(t){return e(t)}}(F):function(e){return ut(e)&&st(e.length)&&!!L[ne.call(e)]};function lt(e){return it(e)?Ie(e):Fe(e)}function ht(e){return e}r.exports=function(e,t){return(nt(e)?V:Re)(e,je(t))}}).call(this,r(12),r(50)(e))},function(e,t,r){"use strict";t.Address4=r(177),t.Address6=r(347),t.v6={helpers:r(182)}},function(e,t,r){"use strict";var n=r(178).BigInteger,i=r(179),o=r(180),s=r(181),a=r(85).sprintf,u=r(125);function c(e){this.valid=!1,this.address=e,this.groups=u.GROUPS,this.v4=!0,this.subnet="/32",this.subnetMask=32;var t=u.RE_SUBNET_STRING.exec(e);if(t){if(this.parsedSubnet=t[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet="/"+this.subnetMask,this.subnetMask<0||this.subnetMask>u.BITS)return this.valid=!1,void(this.error="Invalid subnet mask.");e=e.replace(u.RE_SUBNET_STRING,"")}this.addressMinusSuffix=e,this.parsedAddress=this.parse(e)}c.prototype.parse=function(e){var t=e.split(".");return e.match(u.RE_ADDRESS)?this.valid=!0:this.error="Invalid IPv4 address.",t},c.prototype.isValid=function(){return this.valid},c.prototype.correctForm=function(){return this.parsedAddress.map(function(e){return parseInt(e,10)}).join(".")},c.prototype.isCorrect=i.isCorrect(u.BITS),c.fromHex=function(e){var t,r=o(e.replace(/:/g,""),8,"0"),n=[];for(t=0;t<8;t+=2){var i=r.slice(t,t+2);n.push(parseInt(i,16))}return new c(n.join("."))},c.fromInteger=function(e){return c.fromHex(e.toString(16))},c.prototype.toHex=function(){return this.parsedAddress.map(function(e){return a("%02x",parseInt(e,10))}).join(":")},c.prototype.toArray=function(){return this.parsedAddress.map(function(e){return parseInt(e,10)})},c.prototype.toGroup6=function(){var e,t=[];for(e=0;e>15;--o>=0;){var u=32767&this[e],c=this[e++]>>15,f=a*u+c*s;i=((u=s*u+((32767&f)<<15)+r[n]+(1073741823&i))>>>30)+(f>>>15)+a*c+(i>>>30),r[n++]=1073741823&u}return i},t=30):i&&"Netscape"!=navigator.appName?(r.prototype.am=function(e,t,r,n,i,o){for(;--o>=0;){var s=t*this[e++]+r[n]+i;i=Math.floor(s/67108864),r[n++]=67108863&s}return i},t=26):(r.prototype.am=function(e,t,r,n,i,o){for(var s=16383&t,a=t>>14;--o>=0;){var u=16383&this[e],c=this[e++]>>14,f=a*u+c*s;i=((u=s*u+((16383&f)<<14)+r[n]+i)>>28)+(f>>14)+a*c,r[n++]=268435455&u}return i},t=28),r.prototype.DB=t,r.prototype.DM=(1<>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function p(e){this.m=e}function d(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function _(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function E(){}function S(e){return e}function w(e){this.r2=n(),this.q3=n(),r.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}p.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},p.prototype.revert=function(e){return e},p.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},p.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},p.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},d.prototype.convert=function(e){var t=n();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(r.ZERO)>0&&this.m.subTo(t,t),t},d.prototype.revert=function(e){var t=n();return e.copyTo(t),this.reduce(t),t},d.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t>15)*this.mpl&this.um)<<15)&e.DM;for(e[r=t+this.m.t]+=this.m.am(0,n,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},d.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},d.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},r.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},r.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},r.prototype.fromString=function(e,t){var n;if(16==t)n=4;else if(8==t)n=3;else if(256==t)n=8;else if(2==t)n=1;else if(32==t)n=5;else{if(4!=t)return void this.fromRadix(e,t);n=2}this.t=0,this.s=0;for(var i=e.length,o=!1,s=0;--i>=0;){var a=8==n?255&e[i]:f(e,i);a<0?"-"==e.charAt(i)&&(o=!0):(o=!1,0==s?this[this.t++]=a:s+n>this.DB?(this[this.t-1]|=(a&(1<>this.DB-s):this[this.t-1]|=a<=this.DB&&(s-=this.DB))}8==n&&0!=(128&e[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==e;)--this.t},r.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s},r.prototype.drShiftTo=function(e,t){for(var r=e;r=0;--r)t[r+s+1]=this[r]>>i|a,a=(this[r]&o)<=0;--r)t[r]=0;t[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()},r.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,o=(1<>n;for(var s=r+1;s>n;n>0&&(t[this.t-r-1]|=(this.s&o)<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[r++]=this.DV+n:n>0&&(t[r++]=n),t.t=r,t.clamp()},r.prototype.multiplyTo=function(e,t){var n=this.abs(),i=e.abs(),o=n.t;for(t.t=o+i.t;--o>=0;)t[o]=0;for(o=0;o=0;)e[r]=0;for(r=0;r=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()},r.prototype.divRemTo=function(e,t,i){var o=e.abs();if(!(o.t<=0)){var s=this.abs();if(s.t0?(o.lShiftTo(f,a),s.lShiftTo(f,i)):(o.copyTo(a),s.copyTo(i));var l=a.t,p=a[l-1];if(0!=p){var d=p*(1<1?a[l-2]>>this.F2:0),y=this.FV/d,g=(1<=0&&(i[i.t++]=1,i.subTo(_,i)),r.ONE.dlShiftTo(l,_),_.subTo(a,a);a.t=0;){var E=i[--v]==p?this.DM:Math.floor(i[v]*y+(i[v-1]+m)*g);if((i[v]+=a.am(0,E,i,b,0,l))0&&i.rShiftTo(f,i),u<0&&r.ZERO.subTo(i,i)}}},r.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},r.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},r.prototype.exp=function(e,t){if(e>4294967295||e<1)return r.ONE;var i=n(),o=n(),s=t.convert(this),a=h(e)-1;for(s.copyTo(i);--a>=0;)if(t.sqrTo(i,o),(e&1<0)t.mulTo(o,s,i);else{var u=i;i=o,o=u}return t.revert(i)},r.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,n=(1<0)for(a>a)>0&&(i=!0,o=c(r));s>=0;)a>(a+=this.DB-t)):(r=this[s]>>(a-=t)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=c(r));return i?o:"0"},r.prototype.negate=function(){var e=n();return r.ZERO.subTo(this,e),e},r.prototype.abs=function(){return this.s<0?this.negate():this},r.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this[r]-e[r]))return t;return 0},r.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+h(this[this.t-1]^this.s&this.DM)},r.prototype.mod=function(e){var t=n();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(r.ZERO)>0&&e.subTo(t,t),t},r.prototype.modPowInt=function(e,t){var r;return r=e<256||t.isEven()?new p(t):new d(t),this.exp(e,r)},r.ZERO=l(0),r.ONE=l(1),E.prototype.convert=S,E.prototype.revert=S,E.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},E.prototype.sqrTo=function(e,t){e.squareTo(t)},w.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=n();return e.copyTo(t),this.reduce(t),t},w.prototype.revert=function(e){return e},w.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},w.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},w.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var k,A,C,B=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],T=(1<<26)/B[B.length-1];function I(){var e;e=(new Date).getTime(),A[C++]^=255&e,A[C++]^=e>>8&255,A[C++]^=e>>16&255,A[C++]^=e>>24&255,C>=K&&(C-=K)}if(r.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},r.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),i=l(r),o=n(),s=n(),a="";for(this.divRemTo(i,o,s);o.signum()>0;)a=(r+s.intValue()).toString(e).substr(1)+a,o.divRemTo(i,o,s);return s.intValue().toString(e)+a},r.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var n=this.chunkSize(t),i=Math.pow(t,n),o=!1,s=0,a=0,u=0;u=n&&(this.dMultiply(i),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(t,s)),this.dAddOffset(a,0)),o&&r.ZERO.subTo(this,this)},r.prototype.fromNumber=function(e,t,n){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(r.ONE.shiftLeft(e-1),g,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(r.ONE.shiftLeft(e-1),this);else{var i=new Array,o=7&e;i.length=1+(e>>3),t.nextBytes(i),o>0?i[0]&=(1<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t[r++]=n:n<-1&&(t[r++]=this.DV+n),t.t=r,t.clamp()},r.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},r.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},r.prototype.multiplyLowerTo=function(e,t,r){var n,i=Math.min(this.t+e.t,t);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(n=r.t-this.t;i=0;)r[n]=0;for(n=Math.max(t-this.t,0);n0)if(0==t)r=this[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this[n])%e;return r},r.prototype.millerRabin=function(e){var t=this.subtract(r.ONE),i=t.getLowestSetBit();if(i<=0)return!1;var o=t.shiftRight(i);(e=e+1>>1)>B.length&&(e=B.length);for(var s=n(),a=0;a>24},r.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},r.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},r.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var r,n=this.DB-e*this.DB%8,i=0;if(e-- >0)for(n>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<=0;)n<8?(r=(this[e]&(1<>(n+=this.DB-8)):(r=this[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t},r.prototype.equals=function(e){return 0==this.compareTo(e)},r.prototype.min=function(e){return this.compareTo(e)<0?this:e},r.prototype.max=function(e){return this.compareTo(e)>0?this:e},r.prototype.and=function(e){var t=n();return this.bitwiseTo(e,y,t),t},r.prototype.or=function(e){var t=n();return this.bitwiseTo(e,g,t),t},r.prototype.xor=function(e){var t=n();return this.bitwiseTo(e,m,t),t},r.prototype.andNot=function(e){var t=n();return this.bitwiseTo(e,v,t),t},r.prototype.not=function(){for(var e=n(),t=0;t=this.t?0!=this.s:0!=(this[t]&1<1){var y=n();for(i.sqrTo(a[1],y);u<=f;)a[u]=n(),i.mulTo(y,a[u-2],a[u]),u+=2}var g,m,v=e.t-1,b=!0,_=n();for(o=h(e[v])-1;v>=0;){for(o>=c?g=e[v]>>o-c&f:(g=(e[v]&(1<0&&(g|=e[v-1]>>this.DB+o-c)),u=r;0==(1&g);)g>>=1,--u;if((o-=u)<0&&(o+=this.DB,--v),b)a[g].copyTo(s),b=!1;else{for(;u>1;)i.sqrTo(s,_),i.sqrTo(_,s),u-=2;u>0?i.sqrTo(s,_):(m=s,s=_,_=m),i.mulTo(_,a[g],s)}for(;v>=0&&0==(e[v]&1<=0?(n.subTo(i,n),t&&o.subTo(a,o),s.subTo(u,s)):(i.subTo(n,i),t&&a.subTo(o,a),u.subTo(s,u))}return 0!=i.compareTo(r.ONE)?r.ZERO:u.compareTo(e)>=0?u.subtract(e):u.signum()<0?(u.addTo(e,u),u.signum()<0?u.add(e):u):u},r.prototype.pow=function(e){return this.exp(e,new E)},r.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var i=t.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return t;for(i0&&(t.rShiftTo(o,t),r.rShiftTo(o,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},r.prototype.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r[0]<=B[B.length-1]){for(t=0;t>>8,A[C++]=255&x;C=0,I()}function L(){if(null==k){for(I(),(k=new P).init(A),C=0;Ci)return r;do{t%2&&(r+=e),(t=R(t/2))&&(e+=e)}while(t);return r}function D(e){if("string"==typeof e)return e;if(F(e))return K?K.call(e):"";var t=e+"";return"0"==t&&1/e==-n?"-0":t}function U(e,t,r){var n=e.length;return r=void 0===r?n:r,!t&&r>=n?e:function(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n-1&&e%1==0&&e<=n}(e.length)&&!function(e){var t=k(e)?v.call(e):"";return t==s||t==a}(e)}(r)&&function(e,t){return!!(t=null==t?n:t)&&("number"==typeof e||p.test(e))&&e>-1&&e%1==0&&en)return r;do{t%2&&(r+=e),(t=_(t/2))&&(e+=e)}while(t);return r}(B(e),t)}}).call(this,r(12))},function(e,t,r){"use strict";var n=r(85).sprintf,i=t.spanAllZeroes=function(e){return e.replace(/(0+)/g,'$1')};function o(e){return e.replace(/^(0+)/,'$1')}t.spanAll=function(e,t){return void 0===t&&(t=0),e.split("").map(function(e,r){return n('%s',e,r+t,i(e))}).join("")},t.spanLeadingZeroes=function(e){return e.split(":").map(function(e){return o(e)}).join(":")},t.simpleGroup=function(e,t){var r=e.split(":");return t||(t=0),r.map(function(e,r){return/group-v4/.test(e)?e:n('%s',r+t,o(e))}).join(":")}},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,r){"use strict";(function(e,r){t.toCallback=(t=>(function(r,n){let i;try{i=t(r)}catch(t){return void e.nextTick(n,t)}e.nextTick(n,null,i)})),t.toBuf=((e,t)=>n=>{let i=e(n,t);return r.from(i,"hex")}),t.fromString=((e,t)=>n=>{const i=r.isBuffer(n)?n.toString():n;return e(i,t)}),t.fromNumberTo32BitBuf=((e,t)=>n=>{let i=e(n,t);const o=new Array(4);for(let e=0;e<4;e++)o[e]=255&i,i>>=8;return r.from(o)})}).call(this,r(4),r(0).Buffer)},function(e,t){e.exports=function(e){return e&&"function"==typeof e.then}},function(e,t,r){(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+" = ",o=0;o{n([t=>o.deserialize(e,t),(e,n)=>{if(!t)return r(null,{value:e,remainderPath:""});const i=t.split("/");if("Links"===i[0]){let t="";if(!i[1])return n(null,{value:e.links.map(e=>e.toJSON()),remainderPath:""});const r={};e.links.forEach((e,t)=>{const n=e.toJSON();r[t]=r[n.name]={hash:n.multihash,name:n.name,size:n.size}});let o=r[i[1]];"Hash"===i[2]?o={"/":o.hash}:"Tsize"===i[2]?o=o.size:"Name"===i[2]&&(o=o.name),n(null,{value:o,remainderPath:t=i.slice(3).join("/")})}else if("Data"===i[0])n(null,{value:e.data,remainderPath:""});else{const t={};e.links.forEach((e,r)=>{const n=e.toJSON();t[n.name]={hash:n.multihash,name:n.name,size:n.size}});const r=t[i[0]];if(r)return n(null,{value:{"/":r.hash},remainderPath:i.slice(1).join("/")});n(new Error("path not available"))}}],r)}),t.tree=((e,t,r)=>{"function"==typeof t&&(r=t,t={}),t=t||{},o.deserialize(e,(e,t)=>{if(e)return r(e);const n=[];n.push("Links"),t.links.forEach((e,t)=>{n.push(`Links/${t}/Name`),n.push(`Links/${t}/Tsize`),n.push(`Links/${t}/Hash`)}),n.push("Data"),r(null,n)})}),t.isLink=((e,r,n)=>{t.resolve(e,r,(e,t)=>{if(e)return n(e);if(t.remainderPath.length>0)return n(new Error("path out of scope"));if("object"==typeof t.value&&t.value["/"]){let r;try{r=i.isCID(new i(t.value["/"]))}catch(e){r=!1}if(r)return n(null,t.value)}n(null,!1)})})},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,r,n){if(!function(e){var t=Object.prototype.toString.call(e);return"[object Object]"===t||"[object Array]"===t}(t))return t;if(Array.isArray(t))return t.map(function(t,i){return r(t)?n(t):e(t,r,n)});return Object.keys(t).reduce(function(i,o){return i[o]=r(t[o])?n(t[o]):e(t[o],r,n),i},{})}},function(e,t,r){"use strict";(function(e){const n=r(134),i=r(135)(),o=r(388),s={SHA1:"SHA-1",SHA256:"SHA-256",SHA512:"SHA-512"};t.create=function(t,r,a){const u=s[t];n(i.subtle.importKey("raw",r,{name:"HMAC",hash:{name:u}},!1,["sign"]).then(r=>({digest(t,o){((t,r,o)=>{n(i.subtle.sign({name:"HMAC"},t,r).then(t=>e.from(t)),o)})(r,t,o)},length:o[t]})),a)}}).call(this,r(0).Buffer)},function(e,t){ +/** + * @file Web Cryptography API shim + * @author Artem S Vybornov + * @license MIT + */ +e.exports=function(e){"use strict";if("function"!=typeof Promise)throw"Promise support required";var t=e.crypto||e.msCrypto;if(t){var r=t.subtle||t.webkitSubtle;if(r){var n=e.Crypto||t.constructor||Object,i=e.SubtleCrypto||r.constructor||Object,o=(e.CryptoKey||e.Key||Object,e.navigator.userAgent.indexOf("Edge/")>-1),s=!!e.msCrypto&&!o,a=!t.subtle&&!!t.webkitSubtle;if(s||a){var u={KoZIhvcNAQEB:"1.2.840.113549.1.1.1"},c={"1.2.840.113549.1.1.1":"KoZIhvcNAQEB"};if(["generateKey","importKey","unwrapKey"].forEach(function(e){var n=r[e];r[e]=function(i,o,u){var c,f,b,w,k,A=[].slice.call(arguments);switch(e){case"generateKey":c=y(i),f=o,b=u;break;case"importKey":c=y(u),f=A[3],b=A[4],"jwk"===i&&((o=m(o)).alg||(o.alg=g(c)),o.key_ops||(o.key_ops="oct"!==o.kty?"d"in o?b.filter(S):b.filter(E):b.slice()),A[1]=(w=m(o),s&&(w.extractable=w.ext,delete w.ext),p(unescape(encodeURIComponent(JSON.stringify(w)))).buffer));break;case"unwrapKey":c=A[4],f=A[5],b=A[6],A[2]=u._key}if("generateKey"===e&&"HMAC"===c.name&&c.hash)return c.length=c.length||{"SHA-1":512,"SHA-256":512,"SHA-384":1024,"SHA-512":1024}[c.hash.name],r.importKey("raw",t.getRandomValues(new Uint8Array(c.length+7>>3)),c,f,b);if(a&&"generateKey"===e&&"RSASSA-PKCS1-v1_5"===c.name&&(!c.modulusLength||c.modulusLength>=2048))return(i=y(i)).name="RSAES-PKCS1-v1_5",delete i.hash,r.generateKey(i,!0,["encrypt","decrypt"]).then(function(e){return Promise.all([r.exportKey("jwk",e.publicKey),r.exportKey("jwk",e.privateKey)])}).then(function(e){return e[0].alg=e[1].alg=g(c),e[0].key_ops=b.filter(E),e[1].key_ops=b.filter(S),Promise.all([r.importKey("jwk",e[0],c,!0,e[0].key_ops),r.importKey("jwk",e[1],c,f,e[1].key_ops)])}).then(function(e){return{publicKey:e[0],privateKey:e[1]}});if((a||s&&"SHA-1"===(c.hash||{}).name)&&"importKey"===e&&"jwk"===i&&"HMAC"===c.name&&"oct"===o.kty)return r.importKey("raw",p(h(o.k)),u,A[3],A[4]);if(a&&"importKey"===e&&("spki"===i||"pkcs8"===i))return r.importKey("jwk",function(e){var t=v(e),r=!1;t.length>2&&(r=!0,t.shift());var n={ext:!0};switch(t[0][0]){case"1.2.840.113549.1.1.1":var i=["n","e","d","p","q","dp","dq","qi"],o=v(t[1]);r&&o.shift();for(var s=0;s2&&(n=!0,o.unshift(new Uint8Array([0]))),r[0][0]="1.2.840.113549.1.1.1",t=o;break;default:throw new TypeError("Unsupported key type")}return r.push(new Uint8Array(b(t)).buffer),n?r.unshift(new Uint8Array([0])):r[1]={tag:3,value:r[1]},new Uint8Array(b(r)).buffer}(m(e))})),u}}),["encrypt","decrypt","sign","verify"].forEach(function(e){var t=r[e];r[e]=function(n,i,o,a){if(s&&(!o.byteLength||a&&!a.byteLength))throw new Error("Empy input is not allowed");var u,c=[].slice.call(arguments),f=y(n);if(s&&"decrypt"===e&&"AES-GCM"===f.name){var l=n.tagLength>>3;c[2]=(o.buffer||o).slice(0,o.byteLength-l),n.tag=(o.buffer||o).slice(o.byteLength-l)}c[1]=i._key;try{u=t.apply(r,c)}catch(e){return Promise.reject(e)}return s&&(u=new Promise(function(t,r){u.onabort=u.onerror=function(e){r(e)},u.oncomplete=function(r){r=r.target.result;if("encrypt"===e&&r instanceof AesGcmEncryptResult){var n=r.ciphertext,i=r.tag;(r=new Uint8Array(n.byteLength+i.byteLength)).set(new Uint8Array(n),0),r.set(new Uint8Array(i),n.byteLength),r=r.buffer}t(r)}})),u}}),s){var f=r.digest;r.digest=function(e,t){if(!t.byteLength)throw new Error("Empy input is not allowed");var n;try{n=f.call(r,e,t)}catch(e){return Promise.reject(e)}return n=new Promise(function(e,t){n.onabort=n.onerror=function(e){t(e)},n.oncomplete=function(t){e(t.target.result)}})},e.crypto=Object.create(t,{getRandomValues:{value:function(e){return t.getRandomValues(e)}},subtle:{value:r}}),e.CryptoKey=_}a&&(t.subtle=r,e.Crypto=n,e.SubtleCrypto=i,e.CryptoKey=_)}}}function l(e){return btoa(e).replace(/\=+$/,"").replace(/\+/g,"-").replace(/\//g,"_")}function h(e){return e=(e+="===").slice(0,-e.length%4),atob(e.replace(/-/g,"+").replace(/_/g,"/"))}function p(e){for(var t=new Uint8Array(e.length),r=0;re.length)throw new RangeError("Malformed DER");var r,n=e[t.pos++],i=e[t.pos++];if(i>=128){if(i&=127,t.end-t.pos=128){var a=n;n=4;for(t.splice(i,0,a>>24&255,a>>16&255,a>>8&255,255&a);n>1&&!(a>>24);)a<<=8,n--;n<4&&t.splice(i,4-n),n|=128}return t.splice(i-2,2,r,n),t}function _(e,t,r,n){Object.defineProperties(this,{_key:{value:e},type:{value:e.type,enumerable:!0},extractable:{value:void 0===r?e.extractable:r,enumerable:!0},algorithm:{value:void 0===t?e.algorithm:t,enumerable:!0},usages:{value:void 0===n?e.usages:n,enumerable:!0}})}function E(e){return"verify"===e||"encrypt"===e||"wrapKey"===e}function S(e){return"sign"===e||"decrypt"===e||"unwrapKey"===e}}},function(e,t,r){var n={ECB:r(392),CBC:r(393),CFB:r(394),CFB8:r(395),CFB1:r(396),OFB:r(397),CTR:r(193),GCM:r(193)},i=r(195);for(var o in i)i[o].module=n[i[o].mode];e.exports=i},function(e,t,r){var n=r(86),i=r(6).Buffer,o=r(194);function s(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}t.encrypt=function(e,t){var r=Math.ceil(t.length/16),o=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*r)]);for(var a=0;a0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):E(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?E(e,s,t,!1):C(e,s)):E(e,s,t,!1))):n||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function k(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(A,e):A(e))}function A(e){p("emit readable"),e.emit("readable"),x(e)}function C(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(B,e,t))}function B(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;eo.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0===(e-=s)){s===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=c.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,s),0===(e-=s)){s===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function N(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(L,t,e))}function L(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function R(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?N(this):k(this),null;if(0===(e=w(e,t))&&t.ended)return 0===t.length&&N(this),null;var n,i=t.needReadable;return p("need readable",i),(0===t.length||t.length-e0?M(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&N(this)),null!==n&&this.emit("data",n),n},b.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,t);var u=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?f:b;function c(t,n){p("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,p("cleanup"),e.removeListener("close",m),e.removeListener("finish",v),e.removeListener("drain",l),e.removeListener("error",g),e.removeListener("unpipe",c),r.removeListener("end",f),r.removeListener("end",b),r.removeListener("data",y),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function f(){p("onend"),e.end()}o.endEmitted?i.nextTick(u):r.once("end",u),e.on("unpipe",c);var l=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,x(e))}}(r);e.on("drain",l);var h=!1;var d=!1;function y(t){p("ondata"),d=!1,!1!==e.write(t)||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==R(o.pipes,e))&&!h&&(p("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function g(t){p("onerror",t),b(),e.removeListener("error",g),0===a(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",v),b()}function v(){p("onfinish"),e.removeListener("close",m),b()}function b(){p("unpipe"),r.unpipe(e)}return r.on("data",y),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",g),e.once("close",m),e.once("finish",v),e.emit("pipe",r),o.flowing||(p("pipe resume"),r.resume()),e},b.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0||o>0;){var f=new i;f.update(c),f.update(e),t&&f.update(t),c=f.digest();var l=0;if(s>0){var h=a.length-s;l=Math.min(s,c.length),c.copy(a,h,0,l),s-=l}if(l0){var p=u.length-o,d=Math.min(o,c.length-l);c.copy(u,p,l,l+d),o-=d}}return c.fill(0),{key:a,iv:u}}},function(e,t,r){"use strict";var n=r(6).Buffer,i=r(80).Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(7)(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},function(e,t,r){var n=r(3);r(8),n.cipher=n.cipher||{};var i=e.exports=n.cipher.modes=n.cipher.modes||{};function o(e){if("string"==typeof e&&(e=n.util.createBuffer(e)),n.util.isArray(e)&&e.length>4){var t=e;e=n.util.createBuffer();for(var r=0;r0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=e.length(),n=e.at(r-1);return!(n>this.blockSize<<2)&&(e.truncate(n),!0)},i.cbc=function(e){e=e||{},this.name="CBC",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.cbc.prototype.start=function(e){if(null===e.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv),this._prev=this._iv.slice(0)}},i.cbc.prototype.encrypt=function(e,t,r){if(e.length()0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=e.length(),n=e.at(r-1);return!(n>this.blockSize<<2)&&(e.truncate(n),!0)},i.cfb=function(e){e=e||{},this.name="CFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.cfb.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0)e.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.cfb.prototype.decrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0)e.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb=function(e){e=e||{},this.name="OFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ofb.prototype.encrypt=function(e,t,r){var n=e.length();if(0===e.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0)e.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb.prototype.decrypt=i.ofb.prototype.encrypt,i.ctr=function(e){e=e||{},this.name="CTR",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ctr.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0&&(e.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}s(this._inBlock)},i.ctr.prototype.decrypt=i.ctr.prototype.encrypt,i.gcm=function(e){e=e||{},this.name="GCM",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0,this._R=3774873600},i.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");var t,r=n.util.createBuffer(e.iv);if(this._cipherLength=0,t="additionalData"in e?n.util.createBuffer(e.additionalData):n.util.createBuffer(),this._tagLength="tagLength"in e?e.tagLength:128,this._tag=null,e.decrypt&&(this._tag=n.util.createBuffer(e.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var i=r.length();if(12===i)this._j0=[r.getInt32(),r.getInt32(),r.getInt32(),1];else{for(this._j0=[0,0,0,0];r.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(a(8*i)))}this._inBlock=this._j0.slice(0),s(this._inBlock),this._partialBytes=0,t=n.util.createBuffer(t),this._aDataLength=a(8*t.length());var o=t.length()%this.blockSize;for(o&&t.fillWithByte(0,this.blockSize-o),this._s=[0,0,0,0];t.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()])},i.gcm.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize){for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return e.read-=this.blockSize,t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),s(this._inBlock)},i.gcm.prototype.decrypt=function(e,t,r){var n=e.length();if(n0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),s(this._inBlock),this._hashBlock[0]=e.getInt32(),this._hashBlock[1]=e.getInt32(),this._hashBlock[2]=e.getInt32(),this._hashBlock[3]=e.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var i=0;i0;--n)t[n]=e[n]>>>1|(1&e[n-1])<<31;t[0]=e[0]>>>1,r&&(t[0]^=this._R)},i.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],r=0;r<32;++r){var n=e[r/8|0]>>>4*(7-r%8)&15,i=this._m[r][n];t[0]^=i[0],t[1]^=i[1],t[2]^=i[2],t[3]^=i[3]}return t},i.gcm.prototype.ghash=function(e,t,r){return t[0]^=r[0],t[1]^=r[1],t[2]^=r[2],t[3]^=r[3],this.tableMultiply(t)},i.gcm.prototype.generateHashTable=function(e,t){for(var r=8/t,n=4*r,i=16*r,o=new Array(i),s=0;s>>1,i=new Array(r);i[n]=e.slice(0);for(var o=n>>>1;o>0;)this.pow(i[2*o],i[o]=[]),o>>=1;for(o=2;o>1,a=s+(1&e.length),u=e.substr(0,a),c=e.substr(s,a),f=n.util.createBuffer(),l=n.hmac.create();r=t+r;var h=Math.ceil(i/16),p=Math.ceil(i/20);l.start("MD5",u);var d=n.util.createBuffer();f.putBytes(r);for(var y=0;y0&&(c.queue(e,c.createAlert(e,{level:c.Alert.Level.warning,description:c.Alert.Description.no_renegotiation})),c.flush(e)),e.process()},c.parseHelloMessage=function(e,t,r){var i=null,o=e.entity===c.ConnectionEnd.client;if(r<38)e.error(e,{message:o?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.illegal_parameter}});else{var s=t.fragment,u=s.length();if(i={version:{major:s.getByte(),minor:s.getByte()},random:n.util.createBuffer(s.getBytes(32)),session_id:a(s,1),extensions:[]},o?(i.cipher_suite=s.getBytes(2),i.compression_method=s.getByte()):(i.cipher_suites=a(s,2),i.compression_methods=a(s,1)),(u=r-(u-s.length()))>0){for(var f=a(s,2);f.length()>0;)i.extensions.push({type:[f.getByte(),f.getByte()],data:a(f,2)});if(!o)for(var l=0;l0;){if(0!==p.getByte())break;e.session.extensions.server_name.serverNameList.push(a(p,2).getBytes())}}}if(e.session.version&&(i.version.major!==e.session.version.major||i.version.minor!==e.session.version.minor))return e.error(e,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.protocol_version}});if(o)e.session.cipherSuite=c.getCipherSuite(i.cipher_suite);else for(var d=n.util.createBuffer(i.cipher_suites.bytes());d.length()>0&&(e.session.cipherSuite=c.getCipherSuite(d.getBytes(2)),null===e.session.cipherSuite););if(null===e.session.cipherSuite)return e.error(e,{message:"No cipher suites in common.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.handshake_failure},cipherSuite:n.util.bytesToHex(i.cipher_suite)});e.session.compressionMethod=o?i.compression_method:c.CompressionMethod.none}return i},c.createSecurityParameters=function(e,t){var r=e.entity===c.ConnectionEnd.client,n=t.random.bytes(),i=r?e.session.sp.client_random:n,o=r?n:c.createRandom().getBytes();e.session.sp={entity:e.entity,prf_algorithm:c.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:e.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:i,server_random:o}},c.handleServerHello=function(e,t,r){var n=c.parseHelloMessage(e,t,r);if(!e.fail){if(!(n.version.minor<=e.version.minor))return e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.protocol_version}});e.version.minor=n.version.minor,e.session.version=e.version;var i=n.session_id.bytes();i.length>0&&i===e.session.id?(e.expect=d,e.session.resuming=!0,e.session.sp.server_random=n.random.bytes()):(e.expect=f,e.session.resuming=!1,c.createSecurityParameters(e,n)),e.session.id=i,e.process()}},c.handleClientHello=function(e,t,r){var i=c.parseHelloMessage(e,t,r);if(!e.fail){var o=i.session_id.bytes(),s=null;if(e.sessionCache&&(null===(s=e.sessionCache.getSession(o))?o="":(s.version.major!==i.version.major||s.version.minor>i.version.minor)&&(s=null,o="")),0===o.length&&(o=n.random.getBytes(32)),e.session.id=o,e.session.clientHelloVersion=i.version,e.session.sp={},s)e.version=e.session.version=s.version,e.session.sp=s.sp;else{for(var a,u=1;u0;)i=a(u.certificate_list,3),o=n.asn1.fromDer(i),i=n.pki.certificateFromAsn1(o,!0),f.push(i)}catch(t){return e.error(e,{message:"Could not parse certificate list.",cause:t,send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.bad_certificate}})}var h=e.entity===c.ConnectionEnd.client;!h&&!0!==e.verifyClient||0!==f.length?0===f.length?e.expect=h?l:b:(h?e.session.serverCertificate=f[0]:e.session.clientCertificate=f[0],c.verifyCertificateChain(e,f)&&(e.expect=h?l:b)):e.error(e,{message:h?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.illegal_parameter}}),e.process()},c.handleServerKeyExchange=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.unsupported_certificate}});e.expect=h,e.process()},c.handleClientKeyExchange=function(e,t,r){if(r<48)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.unsupported_certificate}});var i=t.fragment,o={enc_pre_master_secret:a(i,2).getBytes()},s=null;if(e.getPrivateKey)try{s=e.getPrivateKey(e,e.session.serverCertificate),s=n.pki.privateKeyFromPem(s)}catch(t){e.error(e,{message:"Could not get private key.",cause:t,send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.internal_error}})}if(null===s)return e.error(e,{message:"No private key set.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.internal_error}});try{var u=e.session.sp;u.pre_master_secret=s.decrypt(o.enc_pre_master_secret);var f=e.session.clientHelloVersion;if(f.major!==u.pre_master_secret.charCodeAt(0)||f.minor!==u.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch(e){u.pre_master_secret=n.random.getBytes(48)}e.expect=E,null!==e.session.clientCertificate&&(e.expect=_),e.process()},c.handleCertificateRequest=function(e,t,r){if(r<3)return e.error(e,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.illegal_parameter}});var n=t.fragment,i={certificate_types:a(n,1),certificate_authorities:a(n,2)};e.session.certificateRequest=i,e.expect=p,e.process()},c.handleCertificateVerify=function(e,t,r){if(r<2)return e.error(e,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.illegal_parameter}});var i=t.fragment;i.read-=4;var o=i.bytes();i.read+=4;var s={signature:a(i,2).getBytes()},u=n.util.createBuffer();u.putBuffer(e.session.md5.digest()),u.putBuffer(e.session.sha1.digest()),u=u.getBytes();try{if(!e.session.clientCertificate.publicKey.verify(u,s.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");e.session.md5.update(o),e.session.sha1.update(o)}catch(t){return e.error(e,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.handshake_failure}})}e.expect=E,e.process()},c.handleServerHelloDone=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.record_overflow}});if(null===e.serverCertificate){var i={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.insufficient_security}},o=e.verify(e,i.alert.description,0,[]);if(!0!==o)return(o||0===o)&&("object"!=typeof o||n.util.isArray(o)?"number"==typeof o&&(i.alert.description=o):(o.message&&(i.message=o.message),o.alert&&(i.alert.description=o.alert))),e.error(e,i)}null!==e.session.certificateRequest&&(t=c.createRecord(e,{type:c.ContentType.handshake,data:c.createCertificate(e)}),c.queue(e,t)),t=c.createRecord(e,{type:c.ContentType.handshake,data:c.createClientKeyExchange(e)}),c.queue(e,t),e.expect=m;var s=function(e,t){null!==e.session.certificateRequest&&null!==e.session.clientCertificate&&c.queue(e,c.createRecord(e,{type:c.ContentType.handshake,data:c.createCertificateVerify(e,t)})),c.queue(e,c.createRecord(e,{type:c.ContentType.change_cipher_spec,data:c.createChangeCipherSpec()})),e.state.pending=c.createConnectionState(e),e.state.current.write=e.state.pending.write,c.queue(e,c.createRecord(e,{type:c.ContentType.handshake,data:c.createFinished(e)})),e.expect=d,c.flush(e),e.process()};if(null===e.session.certificateRequest||null===e.session.clientCertificate)return s(e,null);c.getClientSignature(e,s)},c.handleChangeCipherSpec=function(e,t){if(1!==t.fragment.getByte())return e.error(e,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.illegal_parameter}});var r=e.entity===c.ConnectionEnd.client;(e.session.resuming&&r||!e.session.resuming&&!r)&&(e.state.pending=c.createConnectionState(e)),e.state.current.read=e.state.pending.read,(!e.session.resuming&&r||e.session.resuming&&!r)&&(e.state.pending=null),e.expect=r?y:S,e.process()},c.handleFinished=function(e,t,r){var o=t.fragment;o.read-=4;var s=o.bytes();o.read+=4;var a=t.fragment.getBytes();(o=n.util.createBuffer()).putBuffer(e.session.md5.digest()),o.putBuffer(e.session.sha1.digest());var u=e.entity===c.ConnectionEnd.client,f=u?"server finished":"client finished",l=e.session.sp;if((o=i(l.master_secret,f,o.getBytes(),12)).getBytes()!==a)return e.error(e,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.decrypt_error}});e.session.md5.update(s),e.session.sha1.update(s),(e.session.resuming&&u||!e.session.resuming&&!u)&&(c.queue(e,c.createRecord(e,{type:c.ContentType.change_cipher_spec,data:c.createChangeCipherSpec()})),e.state.current.write=e.state.pending.write,e.state.pending=null,c.queue(e,c.createRecord(e,{type:c.ContentType.handshake,data:c.createFinished(e)}))),e.expect=u?g:w,e.handshaking=!1,++e.handshakes,e.peerCertificate=u?e.session.serverCertificate:e.session.clientCertificate,c.flush(e),e.isConnected=!0,e.connected(e),e.process()},c.handleAlert=function(e,t){var r,n=t.fragment,i={level:n.getByte(),description:n.getByte()};switch(i.description){case c.Alert.Description.close_notify:r="Connection closed.";break;case c.Alert.Description.unexpected_message:r="Unexpected message.";break;case c.Alert.Description.bad_record_mac:r="Bad record MAC.";break;case c.Alert.Description.decryption_failed:r="Decryption failed.";break;case c.Alert.Description.record_overflow:r="Record overflow.";break;case c.Alert.Description.decompression_failure:r="Decompression failed.";break;case c.Alert.Description.handshake_failure:r="Handshake failure.";break;case c.Alert.Description.bad_certificate:r="Bad certificate.";break;case c.Alert.Description.unsupported_certificate:r="Unsupported certificate.";break;case c.Alert.Description.certificate_revoked:r="Certificate revoked.";break;case c.Alert.Description.certificate_expired:r="Certificate expired.";break;case c.Alert.Description.certificate_unknown:r="Certificate unknown.";break;case c.Alert.Description.illegal_parameter:r="Illegal parameter.";break;case c.Alert.Description.unknown_ca:r="Unknown certificate authority.";break;case c.Alert.Description.access_denied:r="Access denied.";break;case c.Alert.Description.decode_error:r="Decode error.";break;case c.Alert.Description.decrypt_error:r="Decrypt error.";break;case c.Alert.Description.export_restriction:r="Export restriction.";break;case c.Alert.Description.protocol_version:r="Unsupported protocol version.";break;case c.Alert.Description.insufficient_security:r="Insufficient security.";break;case c.Alert.Description.internal_error:r="Internal error.";break;case c.Alert.Description.user_canceled:r="User canceled.";break;case c.Alert.Description.no_renegotiation:r="Renegotiation not supported.";break;default:r="Unknown error."}if(i.description===c.Alert.Description.close_notify)return e.close();e.error(e,{message:r,send:!1,origin:e.entity===c.ConnectionEnd.client?"server":"client",alert:i}),e.process()},c.handleHandshake=function(e,t){var r=t.fragment,i=r.getByte(),o=r.getInt24();if(o>r.length())return e.fragmented=t,t.fragment=n.util.createBuffer(),r.read-=4,e.process();e.fragmented=null,r.read-=4;var s=r.bytes(o+4);r.read+=4,i in D[e.entity][e.expect]?(e.entity!==c.ConnectionEnd.server||e.open||e.fail||(e.handshaking=!0,e.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:n.md.md5.create(),sha1:n.md.sha1.create()}),i!==c.HandshakeType.hello_request&&i!==c.HandshakeType.certificate_verify&&i!==c.HandshakeType.finished&&(e.session.md5.update(s),e.session.sha1.update(s)),D[e.entity][e.expect][i](e,t,o)):c.handleUnexpected(e,t)},c.handleApplicationData=function(e,t){e.data.putBuffer(t.fragment),e.dataReady(e),e.process()},c.handleHeartbeat=function(e,t){var r=t.fragment,i=r.getByte(),o=r.getInt16(),s=r.getBytes(o);if(i===c.HeartbeatMessageType.heartbeat_request){if(e.handshaking||o>s.length)return e.process();c.queue(e,c.createRecord(e,{type:c.ContentType.heartbeat,data:c.createHeartbeat(c.HeartbeatMessageType.heartbeat_response,s)})),c.flush(e)}else if(i===c.HeartbeatMessageType.heartbeat_response){if(s!==e.expectedHeartbeatPayload)return e.process();e.heartbeatReceived&&e.heartbeatReceived(e,n.util.createBuffer(s))}e.process()};var f=1,l=2,h=3,p=4,d=5,y=6,g=7,m=8,v=1,b=2,_=3,E=4,S=5,w=6,k=c.handleUnexpected,A=c.handleChangeCipherSpec,C=c.handleAlert,B=c.handleHandshake,T=c.handleApplicationData,I=c.handleHeartbeat,x=[];x[c.ConnectionEnd.client]=[[k,C,B,k,I],[k,C,B,k,I],[k,C,B,k,I],[k,C,B,k,I],[k,C,B,k,I],[A,C,k,k,I],[k,C,B,k,I],[k,C,B,T,I],[k,C,B,k,I]],x[c.ConnectionEnd.server]=[[k,C,B,k,I],[k,C,B,k,I],[k,C,B,k,I],[k,C,B,k,I],[A,C,k,k,I],[k,C,B,k,I],[k,C,B,T,I],[k,C,B,k,I]];var M=c.handleHelloRequest,N=c.handleServerHello,L=c.handleCertificate,R=c.handleServerKeyExchange,P=c.handleCertificateRequest,K=c.handleServerHelloDone,O=c.handleFinished,D=[];D[c.ConnectionEnd.client]=[[k,k,N,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k],[M,k,k,k,k,k,k,k,k,k,k,L,R,P,K,k,k,k,k,k,k],[M,k,k,k,k,k,k,k,k,k,k,k,R,P,K,k,k,k,k,k,k],[M,k,k,k,k,k,k,k,k,k,k,k,k,P,K,k,k,k,k,k,k],[M,k,k,k,k,k,k,k,k,k,k,k,k,k,K,k,k,k,k,k,k],[M,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k],[M,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,O],[M,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k],[M,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k]];var U=c.handleClientHello,j=c.handleClientKeyExchange,F=c.handleCertificateVerify;D[c.ConnectionEnd.server]=[[k,U,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k],[k,k,k,k,k,k,k,k,k,k,k,L,k,k,k,k,k,k,k,k,k],[k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,j,k,k,k,k],[k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,F,k,k,k,k,k],[k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k],[k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,O],[k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k],[k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k]],c.generateKeys=function(e,t){var r=i,n=t.client_random+t.server_random;e.session.resuming||(t.master_secret=r(t.pre_master_secret,"master secret",n,48).bytes(),t.pre_master_secret=null),n=t.server_random+t.client_random;var o=2*t.mac_key_length+2*t.enc_key_length,s=e.version.major===c.Versions.TLS_1_0.major&&e.version.minor===c.Versions.TLS_1_0.minor;s&&(o+=2*t.fixed_iv_length);var a=r(t.master_secret,"key expansion",n,o),u={client_write_MAC_key:a.getBytes(t.mac_key_length),server_write_MAC_key:a.getBytes(t.mac_key_length),client_write_key:a.getBytes(t.enc_key_length),server_write_key:a.getBytes(t.enc_key_length)};return s&&(u.client_write_IV=a.getBytes(t.fixed_iv_length),u.server_write_IV=a.getBytes(t.fixed_iv_length)),u},c.createConnectionState=function(e){var t=e.entity===c.ConnectionEnd.client,r=function(){var e={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(e){return!0},compressionState:null,compressFunction:function(e){return!0},updateSequenceNumber:function(){4294967295===e.sequenceNumber[1]?(e.sequenceNumber[1]=0,++e.sequenceNumber[0]):++e.sequenceNumber[1]}};return e},n={read:r(),write:r()};if(n.read.update=function(e,t){return n.read.cipherFunction(t,n.read)?n.read.compressFunction(e,t,n.read)||e.error(e,{message:"Could not decompress record.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.decompression_failure}}):e.error(e,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.bad_record_mac}}),!e.fail},n.write.update=function(e,t){return n.write.compressFunction(e,t,n.write)?n.write.cipherFunction(t,n.write)||e.error(e,{message:"Could not encrypt record.",send:!1,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.internal_error}}):e.error(e,{message:"Could not compress record.",send:!1,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.internal_error}}),!e.fail},e.session){var i=e.session.sp;switch(e.session.cipherSuite.initSecurityParameters(i),i.keys=c.generateKeys(e,i),n.read.macKey=t?i.keys.server_write_MAC_key:i.keys.client_write_MAC_key,n.write.macKey=t?i.keys.client_write_MAC_key:i.keys.server_write_MAC_key,e.session.cipherSuite.initConnectionState(n,e,i),i.compression_algorithm){case c.CompressionMethod.none:break;case c.CompressionMethod.deflate:n.read.compressFunction=s,n.write.compressFunction=o;break;default:throw new Error("Unsupported compression algorithm.")}}return n},c.createRandom=function(){var e=new Date,t=+e+6e4*e.getTimezoneOffset(),r=n.util.createBuffer();return r.putInt32(t),r.putBytes(n.random.getBytes(28)),r},c.createRecord=function(e,t){return t.data?{type:t.type,version:{major:e.version.major,minor:e.version.minor},length:t.data.length(),fragment:t.data}:null},c.createAlert=function(e,t){var r=n.util.createBuffer();return r.putByte(t.level),r.putByte(t.description),c.createRecord(e,{type:c.ContentType.alert,data:r})},c.createClientHello=function(e){e.session.clientHelloVersion={major:e.version.major,minor:e.version.minor};for(var t=n.util.createBuffer(),r=0;r0&&(d+=2);var y=e.session.id,g=y.length+1+2+4+28+2+o+1+a+d,m=n.util.createBuffer();return m.putByte(c.HandshakeType.client_hello),m.putInt24(g),m.putByte(e.version.major),m.putByte(e.version.minor),m.putBytes(e.session.sp.client_random),u(m,1,n.util.createBuffer(y)),u(m,2,t),u(m,1,s),d>0&&u(m,2,f),m},c.createServerHello=function(e){var t=e.session.id,r=t.length+1+2+4+28+2+1,i=n.util.createBuffer();return i.putByte(c.HandshakeType.server_hello),i.putInt24(r),i.putByte(e.version.major),i.putByte(e.version.minor),i.putBytes(e.session.sp.server_random),u(i,1,n.util.createBuffer(t)),i.putByte(e.session.cipherSuite.id[0]),i.putByte(e.session.cipherSuite.id[1]),i.putByte(e.session.compressionMethod),i},c.createCertificate=function(e){var t,r=e.entity===c.ConnectionEnd.client,i=null;e.getCertificate&&(t=r?e.session.certificateRequest:e.session.extensions.server_name.serverNameList,i=e.getCertificate(e,t));var o=n.util.createBuffer();if(null!==i)try{n.util.isArray(i)||(i=[i]);for(var s=null,a=0;ac.MaxFragment;)i.push(c.createRecord(e,{type:t.type,data:n.util.createBuffer(o.slice(0,c.MaxFragment))})),o=o.slice(c.MaxFragment);o.length>0&&i.push(c.createRecord(e,{type:t.type,data:n.util.createBuffer(o)}))}for(var s=0;s0&&(i=r.order[0]),null!==i&&i in r.cache)for(var o in t=r.cache[i],delete r.cache[i],r.order)if(r.order[o]===i){r.order.splice(o,1);break}return t},r.setSession=function(e,t){if(r.order.length===r.capacity){var i=r.order.shift();delete r.cache[i]}i=n.util.bytesToHex(e);r.order.push(i),r.cache[i]=t}}return r},c.createConnection=function(e){var t=null;t=e.caStore?n.util.isArray(e.caStore)?n.pki.createCaStore(e.caStore):e.caStore:n.pki.createCaStore();var r=e.cipherSuites||null;if(null===r)for(var i in r=[],c.CipherSuites)r.push(c.CipherSuites[i]);var o=e.server?c.ConnectionEnd.server:c.ConnectionEnd.client,s=e.sessionCache?c.createSessionCache(e.sessionCache):null,a={version:{major:c.Version.major,minor:c.Version.minor},entity:o,sessionId:e.sessionId,caStore:t,sessionCache:s,cipherSuites:r,connected:e.connected,virtualHost:e.virtualHost||null,verifyClient:e.verifyClient||!1,verify:e.verify||function(e,t,r,n){return t},getCertificate:e.getCertificate||null,getPrivateKey:e.getPrivateKey||null,getSignature:e.getSignature||null,input:n.util.createBuffer(),tlsData:n.util.createBuffer(),data:n.util.createBuffer(),tlsDataReady:e.tlsDataReady,dataReady:e.dataReady,heartbeatReceived:e.heartbeatReceived,closed:e.closed,error:function(t,r){r.origin=r.origin||(t.entity===c.ConnectionEnd.client?"client":"server"),r.send&&(c.queue(t,c.createAlert(t,r.alert)),c.flush(t));var n=!1!==r.fatal;n&&(t.fail=!0),e.error(t,r),n&&t.close(!1)},deflate:e.deflate||null,inflate:e.inflate||null,reset:function(e){a.version={major:c.Version.major,minor:c.Version.minor},a.record=null,a.session=null,a.peerCertificate=null,a.state={pending:null,current:null},a.expect=(a.entity,c.ConnectionEnd.client,0),a.fragmented=null,a.records=[],a.open=!1,a.handshakes=0,a.handshaking=!1,a.isConnected=!1,a.fail=!(e||void 0===e),a.input.clear(),a.tlsData.clear(),a.data.clear(),a.state.current=c.createConnectionState(a)}};a.reset();return a.handshake=function(e){if(a.entity!==c.ConnectionEnd.client)a.error(a,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(a.handshaking)a.error(a,{message:"Handshake already in progress.",fatal:!1});else{a.fail&&!a.open&&0===a.handshakes&&(a.fail=!1),a.handshaking=!0;var t=null;(e=e||"").length>0&&(a.sessionCache&&(t=a.sessionCache.getSession(e)),null===t&&(e="")),0===e.length&&a.sessionCache&&null!==(t=a.sessionCache.getSession())&&(e=t.id),a.session={id:e,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:n.md.md5.create(),sha1:n.md.sha1.create()},t&&(a.version=t.version,a.session.sp=t.sp),a.session.sp.client_random=c.createRandom().getBytes(),a.open=!0,c.queue(a,c.createRecord(a,{type:c.ContentType.handshake,data:c.createClientHello(a)})),c.flush(a)}},a.process=function(e){var t=0;return e&&a.input.putBytes(e),a.fail||(null!==a.record&&a.record.ready&&a.record.fragment.isEmpty()&&(a.record=null),null===a.record&&(t=function(e){var t=0,r=e.input,i=r.length();if(i<5)t=5-i;else{e.record={type:r.getByte(),version:{major:r.getByte(),minor:r.getByte()},length:r.getInt16(),fragment:n.util.createBuffer(),ready:!1};var o=e.record.version.major===e.version.major;o&&e.session&&e.session.version&&(o=e.record.version.minor===e.version.minor),o||e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.protocol_version}})}return t}(a)),a.fail||null===a.record||a.record.ready||(t=function(e){var t=0,r=e.input,n=r.length();n>>0,a>>>0];for(var c=i.fullMessageLength.length-1;c>=0;--c)i.fullMessageLength[c]+=a[1],a[1]=a[0]+(i.fullMessageLength[c]/4294967296>>>0),i.fullMessageLength[c]=i.fullMessageLength[c]>>>0,a[0]=a[1]/4294967296>>>0;return t.putBytes(o),u(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(t.bytes());var a,c=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(o.substr(0,i.blockLength-c));for(var f=8*i.fullMessageLength[0],l=0;l>>0,s.putInt32(f>>>0),f=a>>>0;s.putInt32(f);var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};u(h,r,s);var p=n.util.createBuffer();return p.putInt32(h.h0),p.putInt32(h.h1),p.putInt32(h.h2),p.putInt32(h.h3),p.putInt32(h.h4),p.putInt32(h.h5),p.putInt32(h.h6),p.putInt32(h.h7),p},i};var o=null,s=!1,a=null;function u(e,t,r){for(var n,i,o,s,u,c,f,l,h,p,d,y,g,m=r.length();m>=64;){for(u=0;u<16;++u)t[u]=r.getInt32();for(;u<64;++u)n=((n=t[u-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,i=((i=t[u-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,t[u]=n+t[u-7]+i+t[u-16]|0;for(c=e.h0,f=e.h1,l=e.h2,h=e.h3,p=e.h4,d=e.h5,y=e.h6,g=e.h7,u=0;u<64;++u)o=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),s=c&f|l&(c^f),n=g+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(y^p&(d^y))+a[u]+t[u],g=y,y=d,d=p,p=h+n>>>0,h=l,l=f,f=c,c=n+(i=o+s)>>>0;e.h0=e.h0+c|0,e.h1=e.h1+f|0,e.h2=e.h2+l|0,e.h3=e.h3+h|0,e.h4=e.h4+p|0,e.h5=e.h5+d|0,e.h6=e.h6+y|0,e.h7=e.h7+g|0,m-=64}}},function(e,t,r){(function(t){var n=r(3);r(8);var i=null;!n.util.isNodejs||n.options.usePureJavaScript||t.versions["node-webkit"]||(i=r(207)),(e.exports=n.prng=n.prng||{}).create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=e.md,o=new Array(32),s=0;s<32;++s)o[s]=r.create();function a(){if(t.pools[0].messageLength>=32)return u();var e=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(e)),u()}function u(){t.reseeds=4294967295===t.reseeds?0:t.reseeds+1;var e=t.plugin.md.create();e.update(t.keyBytes);for(var r=1,n=0;n<32;++n)t.reseeds%r==0&&(e.update(t.pools[n].digest().getBytes()),t.pools[n].start()),r<<=1;t.keyBytes=e.digest().getBytes(),e.start(),e.update(t.keyBytes);var i=e.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(i),t.generated=0}function c(e){var t=null;if("undefined"!=typeof window){var r=window.crypto||window.msCrypto;r&&r.getRandomValues&&(t=function(e){return r.getRandomValues(e)})}var i=n.util.createBuffer();if(t)for(;i.length()>16)))<<16,l=4294967295&(c=(2147483647&(c+=u>>15))+(c>>31));for(a=0;a<3;++a)f=l>>>(a<<3),f^=Math.floor(256*Math.random()),i.putByte(String.fromCharCode(255&f))}return i.getBytes(e)}return t.pools=o,t.pool=0,t.generate=function(e,r){if(!r)return t.generateSync(e);var i=t.plugin.cipher,o=t.plugin.increment,s=t.plugin.formatKey,a=t.plugin.formatSeed,c=n.util.createBuffer();t.key=null,function f(l){if(l)return r(l);if(c.length()>=e)return r(null,c.getBytes(e));t.generated>1048575&&(t.key=null);if(null===t.key)return n.util.nextTick(function(){!function(e){if(t.pools[0].messageLength>=32)return u(),e();var r=32-t.pools[0].messageLength<<5;t.seedFile(r,function(r,n){if(r)return e(r);t.collect(n),u(),e()})}(f)});var h=i(t.key,t.seed);t.generated+=h.length;c.putBytes(h);t.key=s(i(t.key,o(t.seed)));t.seed=a(i(t.key,t.seed));n.util.setImmediate(f)}()},t.generateSync=function(e){var r=t.plugin.cipher,i=t.plugin.increment,o=t.plugin.formatKey,s=t.plugin.formatSeed;t.key=null;for(var u=n.util.createBuffer();u.length()1048575&&(t.key=null),null===t.key&&a();var c=r(t.key,t.seed);t.generated+=c.length,u.putBytes(c),t.key=o(r(t.key,i(t.seed))),t.seed=s(r(t.key,t.seed))}return u.getBytes(e)},i?(t.seedFile=function(e,t){i.randomBytes(e,function(e,r){if(e)return t(e);t(null,r.toString())})},t.seedFileSync=function(e){return i.randomBytes(e).toString()}):(t.seedFile=function(e,t){try{t(null,c(e))}catch(e){t(e)}},t.seedFileSync=c),t.collect=function(e){for(var r=e.length,n=0;n>i&255);t.collect(n)},t.registerWorker=function(e){if(e===self)t.seedFile=function(e,t){self.addEventListener("message",function e(r){var n=r.data;n.forge&&n.forge.prng&&(self.removeEventListener("message",e),t(n.forge.prng.err,n.forge.prng.bytes))}),self.postMessage({forge:{prng:{needed:e}}})};else{e.addEventListener("message",function(r){var n=r.data;n.forge&&n.forge.prng&&t.seedFile(n.forge.prng.needed,function(t,r){e.postMessage({forge:{prng:{err:t,bytes:r}}})})})}},t}}).call(this,r(4))},function(e,t,r){var n=r(3);r(8);var i=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],o=[1,2,3,5];e.exports=n.rc2=n.rc2||{},n.rc2.expandKey=function(e,t){"string"==typeof e&&(e=n.util.createBuffer(e)),t=t||128;var r,o=e,s=e.length(),a=t,u=Math.ceil(a/8),c=255>>(7&a);for(r=s;r<128;r++)o.putByte(i[o.at(r-1)+o.at(r-s)&255]);for(o.setAt(128-u,i[o.at(128-u)&c]),r=127-u;r>=0;r--)o.setAt(r,i[o.at(r+1)^o.at(r+u)]);return o};var s=function(e,t,r){var i,s,a,u,c=!1,f=null,l=null,h=null,p=[];for(e=n.rc2.expandKey(e,t),a=0;a<64;a++)p.push(e.getInt16Le());r?(i=function(e){for(a=0;a<4;a++)e[a]+=p[u]+(e[(a+3)%4]&e[(a+2)%4])+(~e[(a+3)%4]&e[(a+1)%4]),e[a]=(t=e[a])<<(r=o[a])&65535|(65535&t)>>16-r,u++;var t,r},s=function(e){for(a=0;a<4;a++)e[a]+=p[63&e[(a+3)%4]]}):(i=function(e){for(a=3;a>=0;a--)e[a]=(65535&(t=e[a]))>>(r=o[a])|t<<16-r&65535,e[a]-=p[u]+(e[(a+3)%4]&e[(a+2)%4])+(~e[(a+3)%4]&e[(a+1)%4]),u--;var t,r},s=function(e){for(a=3;a>=0;a--)e[a]-=p[63&e[(a+3)%4]]});var d=function(e){var t=[];for(a=0;a<4;a++){var n=f.getInt16Le();null!==h&&(r?n^=h.getInt16Le():h.putInt16Le(n)),t.push(65535&n)}u=r?0:63;for(var i=0;i=8;)d([[5,i],[1,s],[6,i],[1,s],[5,i]])},finish:function(e){var t=!0;if(r)if(e)t=e(8,f,!r);else{var n=8===f.length()?8:8-f.length();f.fillWithByte(n,n)}if(t&&(c=!0,y.update()),!r&&(t=0===f.length()))if(e)t=e(8,l,!r);else{var i=l.length(),o=l.at(i-1);o>i?t=!1:l.truncate(o)}return t}}};n.rc2.startEncrypting=function(e,t,r){var i=n.rc2.createEncryptionCipher(e,128);return i.start(t,r),i},n.rc2.createEncryptionCipher=function(e,t){return s(e,t,!0)},n.rc2.startDecrypting=function(e,t,r){var i=n.rc2.createDecryptionCipher(e,128);return i.start(t,r),i},n.rc2.createDecryptionCipher=function(e,t){return s(e,t,!1)}},function(e,t,r){var n=r(3);r(8),r(32),r(89);var i=e.exports=n.pkcs1=n.pkcs1||{};function o(e,t,r){r||(r=n.md.sha1.create());for(var i="",o=Math.ceil(t/r.digestLength),s=0;s>24&255,s>>16&255,s>>8&255,255&s);r.start(),r.update(e+a),i+=r.digest().getBytes()}return i.substring(0,t)}i.encode_rsa_oaep=function(e,t,r){var i,s,a,u;"string"==typeof r?(i=r,s=arguments[3]||void 0,a=arguments[4]||void 0):r&&(i=r.label||void 0,s=r.seed||void 0,a=r.md||void 0,r.mgf1&&r.mgf1.md&&(u=r.mgf1.md)),a?a.start():a=n.md.sha1.create(),u||(u=a);var c=Math.ceil(e.n.bitLength()/8),f=c-2*a.digestLength-2;if(t.length>f)throw(g=new Error("RSAES-OAEP input message length is too long.")).length=t.length,g.maxLength=f,g;i||(i=""),a.update(i,"raw");for(var l=a.digest(),h="",p=f-t.length,d=0;de&&(s=u(e,t));var p=s.toString(16);i.target.postMessage({hex:p,workLoad:f}),s.dAddOffset(l,0)}}}p()}(e,t,i,o);return a(e,t,i,o)}(e,c,o.options,i);throw new Error("Invalid prime generation algorithm: "+o.name)}}function a(e,t,r,o){var s=u(e,t),a=function(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}(s.bitLength());"millerRabinTests"in r&&(a=r.millerRabinTests);var c=10;"maxBlockTime"in r&&(c=r.maxBlockTime),function e(t,r,o,s,a,c,f){var l=+new Date;do{if(t.bitLength()>r&&(t=u(r,o)),t.isProbablePrime(a))return f(null,t);t.dAddOffset(i[s++%8],0)}while(c<0||+new Date-l=0&&i.push(a):i.push(a))}return i}function p(e){if(e.composed||e.constructed){for(var t=n.util.createBuffer(),r=0;r0&&(u=i.create(i.Class.UNIVERSAL,i.Type.SET,!0,l));var h=[],p=[];null!==t&&(p=n.util.isArray(t)?t:[t]);for(var d=[],y=0;y0){var b=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,d),_=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(b).getBytes())])]);h.push(_)}var E=null;if(null!==e){var S=o.wrapRsaPrivateKey(o.privateKeyToAsn1(e));E=null===r?i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.keyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[S]),u]):i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.pkcs8ShroudedKeyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[o.encryptPrivateKeyInfo(S,r,a)]),u]);var w=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[E]),k=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(w).getBytes())])]);h.push(k)}var A,C=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,h);if(a.useMac){var B=n.md.sha1.create(),T=new n.util.ByteBuffer(n.random.getBytes(a.saltSize)),I=a.count,x=(e=s.generateKey(r,T,3,I,20),n.hmac.create());x.start(B,e),x.update(i.toDer(C).getBytes());var M=x.getMac();A=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.sha1).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,M.getBytes())]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,T.getBytes()),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(I).getBytes())])}return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(3).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(C).getBytes())])]),A])},s.generateKey=n.pbe.generatePkcs12Key},function(e,t,r){var n=r(3);r(43),r(8);var i=n.asn1,o=e.exports=n.pkcs7asn1=n.pkcs7asn1||{};n.pkcs7=n.pkcs7||{},n.pkcs7.asn1=o;var s={name:"ContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};o.contentInfoValidator=s;var a={name:"EncryptedContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};o.envelopedDataValidator={name:"EnvelopedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(a)},o.encryptedDataValidator={name:"EncryptedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"}].concat(a)};var u={name:"SignerInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};o.signedDataValidator={name:"SignedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},s,{name:"SignedData.Certificates",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,capture:"signerInfos",optional:!0,value:[u]}]},o.recipientInfoValidator={name:"RecipientInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}},function(e,t,r){var n=r(3);r(8),n.mgf=n.mgf||{},(e.exports=n.mgf.mgf1=n.mgf1=n.mgf1||{}).create=function(e){return{generate:function(t,r){for(var i=new n.util.ByteBuffer,o=Math.ceil(r/e.digestLength),s=0;s{if(e)return i(e);i(null,n.encode(o,t,r))})}e.exports=o,o.Buffer=t,o.multihash=n,o.digest=function(e,t,r,n){if("function"==typeof r&&(n=r,r=void 0),!n)throw new Error("Missing callback");let i,s=n;r&&(s=((e,t)=>{if(e)return n(e);n(null,t.slice(0,r))}));try{i=o.createHash(t)}catch(e){return s(e)}i(e,s)},o.createHash=function(e){if(e=n.coerceCode(e),!o.functions[e])throw new Error("multihash function "+e+" not yet supported");return o.functions[e]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,r(0).Buffer)},function(e,t,r){(function(n,i){var o; /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * @@ -29,13 +35,24 @@ function n(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r * @copyright Chen, Yi-Cyuan 2015-2017 * @license MIT */ -!function(){"use strict";var s="input is invalid type",a="object"==typeof window,u=a?window:{};u.JS_SHA3_NO_WINDOW&&(a=!1);var c=!a&&"object"==typeof self;!u.JS_SHA3_NO_NODE_JS&&"object"==typeof n&&n.versions&&n.versions.node?u=i:c&&(u=self);var f=!u.JS_SHA3_NO_COMMON_JS&&"object"==typeof t&&t.exports,l=r(430),h=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,p="0123456789abcdef".split(""),d=[4,1024,262144,67108864],y=[0,8,16,24],g=[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],v=[128,256],b=["hex","buffer","arrayBuffer","array","digest"],_={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!h||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});for(var S=function(t,e,r){return function(n){return new D(t,e,t).update(n)[r]()}},w=function(t,e,r){return function(n,i){return new D(t,e,i).update(n)[r]()}},E=function(t,e,r){return function(e,n,i,o){return B["cshake"+t].update(e,n,i,o)[r]()}},k=function(t,e,r){return function(e,n,i,o){return B["kmac"+t].update(e,n,i,o)[r]()}},C=function(t,e,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 O(t,e,r){D.call(this,t,e,r)}D.prototype.update=function(t){if(!this.finalized){var e,r=typeof t;if("string"!==r){if("object"!==r)throw s;if(null===t)throw s;if(h&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||h&&ArrayBuffer.isView(t)))throw s;e=!0}for(var n,i,o=this.blocks,a=this.byteCount,u=t.length,c=this.blockCount,f=0,l=this.s;f>2]|=t[f]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(o[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=o[c],n=0;n>=8);r>0;)i.unshift(r),r=255&(t>>=8),++n;return e?i.push(n):i.unshift(n),this.update(i),i.length},D.prototype.encodeString=function(t){var e,r=typeof t;if("string"!==r){if("object"!==r)throw s;if(null===t)throw s;if(h&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||h&&ArrayBuffer.isView(t)))throw s;e=!0}var n=0,i=t.length;if(e)n=i;else for(var o=0;o=57344?n+=3:(a=65536+((1023&a)<<10|1023&t.charCodeAt(++o)),n+=4)}return n+=this.encode(8*n),this.update(t),n},D.prototype.bytepad=function(t,e){for(var r=this.encode(e),n=0;n>2]|=this.padding[3&e],this.lastByteIndex===this.byteCount)for(t[0]=t[r],e=1;e>4&15]+p[15&t]+p[t>>12&15]+p[t>>8&15]+p[t>>20&15]+p[t>>16&15]+p[t>>28&15]+p[t>>24&15];s%e==0&&(U(r),o=0)}return i&&(t=r[o],a+=p[t>>4&15]+p[15&t],i>1&&(a+=p[t>>12&15]+p[t>>8&15]),i>2&&(a+=p[t>>20&15]+p[t>>16&15])),a},D.prototype.arrayBuffer=function(){this.finalize();var t,e=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,s=0,a=this.outputBits>>3;t=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(a);for(var u=new Uint32Array(t);s>8&255,u[t+2]=e>>16&255,u[t+3]=e>>24&255;a%r==0&&U(n)}return o&&(t=a<<2,e=n[s],u[t]=255&e,o>1&&(u[t+1]=e>>8&255),o>2&&(u[t+2]=e>>16&255)),u},O.prototype=new D,O.prototype.finalize=function(){return this.encode(this.outputBits,!0),D.prototype.finalize.call(this)};var U=function(t){var e,r,n,i,o,s,a,u,c,f,l,h,p,d,y,m,v,b,_,S,w,E,k,C,A,T,B,I,M,x,R,N,P,L,D,O,U,K,j,F,V,q,J,H,z,G,Y,W,$,Q,Z,X,tt,et,rt,nt,it,ot,st,at,ut,ct,ft;for(n=0;n<48;n+=2)i=t[0]^t[10]^t[20]^t[30]^t[40],o=t[1]^t[11]^t[21]^t[31]^t[41],s=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],u=t[4]^t[14]^t[24]^t[34]^t[44],c=t[5]^t[15]^t[25]^t[35]^t[45],f=t[6]^t[16]^t[26]^t[36]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],e=(h=t[8]^t[18]^t[28]^t[38]^t[48])^(s<<1|a>>>31),r=(p=t[9]^t[19]^t[29]^t[39]^t[49])^(a<<1|s>>>31),t[0]^=e,t[1]^=r,t[10]^=e,t[11]^=r,t[20]^=e,t[21]^=r,t[30]^=e,t[31]^=r,t[40]^=e,t[41]^=r,e=i^(u<<1|c>>>31),r=o^(c<<1|u>>>31),t[2]^=e,t[3]^=r,t[12]^=e,t[13]^=r,t[22]^=e,t[23]^=r,t[32]^=e,t[33]^=r,t[42]^=e,t[43]^=r,e=s^(f<<1|l>>>31),r=a^(l<<1|f>>>31),t[4]^=e,t[5]^=r,t[14]^=e,t[15]^=r,t[24]^=e,t[25]^=r,t[34]^=e,t[35]^=r,t[44]^=e,t[45]^=r,e=u^(h<<1|p>>>31),r=c^(p<<1|h>>>31),t[6]^=e,t[7]^=r,t[16]^=e,t[17]^=r,t[26]^=e,t[27]^=r,t[36]^=e,t[37]^=r,t[46]^=e,t[47]^=r,e=f^(i<<1|o>>>31),r=l^(o<<1|i>>>31),t[8]^=e,t[9]^=r,t[18]^=e,t[19]^=r,t[28]^=e,t[29]^=r,t[38]^=e,t[39]^=r,t[48]^=e,t[49]^=r,d=t[0],y=t[1],G=t[11]<<4|t[10]>>>28,Y=t[10]<<4|t[11]>>>28,I=t[20]<<3|t[21]>>>29,M=t[21]<<3|t[20]>>>29,at=t[31]<<9|t[30]>>>23,ut=t[30]<<9|t[31]>>>23,q=t[40]<<18|t[41]>>>14,J=t[41]<<18|t[40]>>>14,L=t[2]<<1|t[3]>>>31,D=t[3]<<1|t[2]>>>31,m=t[13]<<12|t[12]>>>20,v=t[12]<<12|t[13]>>>20,W=t[22]<<10|t[23]>>>22,$=t[23]<<10|t[22]>>>22,x=t[33]<<13|t[32]>>>19,R=t[32]<<13|t[33]>>>19,ct=t[42]<<2|t[43]>>>30,ft=t[43]<<2|t[42]>>>30,et=t[5]<<30|t[4]>>>2,rt=t[4]<<30|t[5]>>>2,O=t[14]<<6|t[15]>>>26,U=t[15]<<6|t[14]>>>26,b=t[25]<<11|t[24]>>>21,_=t[24]<<11|t[25]>>>21,Q=t[34]<<15|t[35]>>>17,Z=t[35]<<15|t[34]>>>17,N=t[45]<<29|t[44]>>>3,P=t[44]<<29|t[45]>>>3,C=t[6]<<28|t[7]>>>4,A=t[7]<<28|t[6]>>>4,nt=t[17]<<23|t[16]>>>9,it=t[16]<<23|t[17]>>>9,K=t[26]<<25|t[27]>>>7,j=t[27]<<25|t[26]>>>7,S=t[36]<<21|t[37]>>>11,w=t[37]<<21|t[36]>>>11,X=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,H=t[8]<<27|t[9]>>>5,z=t[9]<<27|t[8]>>>5,T=t[18]<<20|t[19]>>>12,B=t[19]<<20|t[18]>>>12,ot=t[29]<<7|t[28]>>>25,st=t[28]<<7|t[29]>>>25,F=t[38]<<8|t[39]>>>24,V=t[39]<<8|t[38]>>>24,E=t[48]<<14|t[49]>>>18,k=t[49]<<14|t[48]>>>18,t[0]=d^~m&b,t[1]=y^~v&_,t[10]=C^~T&I,t[11]=A^~B&M,t[20]=L^~O&K,t[21]=D^~U&j,t[30]=H^~G&W,t[31]=z^~Y&$,t[40]=et^~nt&ot,t[41]=rt^~it&st,t[2]=m^~b&S,t[3]=v^~_&w,t[12]=T^~I&x,t[13]=B^~M&R,t[22]=O^~K&F,t[23]=U^~j&V,t[32]=G^~W&Q,t[33]=Y^~$&Z,t[42]=nt^~ot&at,t[43]=it^~st&ut,t[4]=b^~S&E,t[5]=_^~w&k,t[14]=I^~x&N,t[15]=M^~R&P,t[24]=K^~F&q,t[25]=j^~V&J,t[34]=W^~Q&X,t[35]=$^~Z&tt,t[44]=ot^~at&ct,t[45]=st^~ut&ft,t[6]=S^~E&d,t[7]=w^~k&y,t[16]=x^~N&C,t[17]=R^~P&A,t[26]=F^~q&L,t[27]=V^~J&D,t[36]=Q^~X&H,t[37]=Z^~tt&z,t[46]=at^~ct&et,t[47]=ut^~ft&rt,t[8]=E^~d&m,t[9]=k^~y&v,t[18]=N^~C&T,t[19]=P^~A&B,t[28]=q^~L&O,t[29]=J^~D&U,t[38]=X^~H&G,t[39]=tt^~z&Y,t[48]=ct^~et&nt,t[49]=ft^~rt&it,t[0]^=g[n],t[1]^=g[n+1]};if(f)t.exports=B;else{for(M=0;Me){var n=new Error("Too few bytes to parse DER.");throw n.available=t.length(),n.remaining=e,n.requested=r,n}}i.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},i.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},i.create=function(t,e,r,o,s){if(n.util.isArray(o)){for(var a=[],u=0;ur){if(a.strict){var p=new Error("Too few bytes to read ASN.1 value.");throw p.available=e.length(),p.remaining=r,p.requested=h,p}h=r}var d;var y;var g=32==(32&c);if(g)if(d=[],void 0===h)for(;;){if(o(e,r,2),e.bytes(2)===String.fromCharCode(0,0)){e.getBytes(2),r-=2;break}u=e.length(),d.push(t(e,r,n+1,a)),r-=u-e.length()}else for(;h>0;)u=e.length(),d.push(t(e,h,n+1,a)),r-=u-e.length(),h-=u-e.length();void 0===d&&f===i.Class.UNIVERSAL&&l===i.Type.BITSTRING&&(y=e.bytes(h));if(void 0===d&&a.decodeBitStrings&&f===i.Class.UNIVERSAL&&l===i.Type.BITSTRING&&h>1){var m=e.read,v=r,b=0;if(l===i.Type.BITSTRING&&(o(e,r,1),b=e.getByte(),r--),0===b)try{u=e.length();var _={verbose:a.verbose,strict:!0,decodeBitStrings:!0},S=t(e,r,n+1,_),w=u-e.length();r-=w,l==i.Type.BITSTRING&&w++;var E=S.tagClass;w!==h||E!==i.Class.UNIVERSAL&&E!==i.Class.CONTEXT_SPECIFIC||(d=[S])}catch(t){}void 0===d&&(e.read=m,r=v)}if(void 0===d){if(void 0===h){if(a.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");h=r}if(l===i.Type.BMPSTRING)for(d="";h>0;h-=2)o(e,r,2),d+=String.fromCharCode(e.getInt16()),r-=2;else d=e.getBytes(h)}var k=void 0===y?null:{bitStringContents:y};return i.create(f,l,g,d,k)}(t,t.length(),0,e)},i.toDer=function(t){var e=n.util.createBuffer(),r=t.tagClass|t.type,o=n.util.createBuffer(),s=!1;if("bitStringContents"in t&&(s=!0,t.original&&(s=i.equals(t,t.original))),s)o.putBytes(t.bitStringContents);else if(t.composed){t.constructed?r|=32:o.putByte(0);for(var a=0;a1&&(0===t.value.charCodeAt(0)&&0==(128&t.value.charCodeAt(1))||255===t.value.charCodeAt(0)&&128==(128&t.value.charCodeAt(1)))?o.putBytes(t.value.substr(1)):o.putBytes(t.value);if(e.putByte(r),o.length()<=127)e.putByte(127&o.length());else{var u=o.length(),c="";do{c+=String.fromCharCode(255&u),u>>>=8}while(u>0);e.putByte(128|c.length);for(a=c.length-1;a>=0;--a)e.putByte(c.charCodeAt(a))}return e.putBuffer(o),e},i.oidToDer=function(t){var e,r,i,o,s=t.split("."),a=n.util.createBuffer();a.putByte(40*parseInt(s[0],10)+parseInt(s[1],10));for(var u=2;u>>=7,e||(o|=128),r.push(o),e=!1}while(i>0);for(var c=r.length-1;c>=0;--c)a.putByte(r[c])}return a},i.derToOid=function(t){var e;"string"==typeof t&&(t=n.util.createBuffer(t));var r=t.getByte();e=Math.floor(r/40)+"."+r%40;for(var i=0;t.length()>0;)i<<=7,128&(r=t.getByte())?i+=127&r:(e+="."+(i+r),i=0);return e},i.utcTimeToDate=function(t){var e=new Date,r=parseInt(t.substr(0,2),10);r=r>=50?1900+r:2e3+r;var n=parseInt(t.substr(2,2),10)-1,i=parseInt(t.substr(4,2),10),o=parseInt(t.substr(6,2),10),s=parseInt(t.substr(8,2),10),a=0;if(t.length>11){var u=t.charAt(10),c=10;"+"!==u&&"-"!==u&&(a=parseInt(t.substr(10,2),10),c+=2)}if(e.setUTCFullYear(r,n,i),e.setUTCHours(o,s,a,0),c&&("+"===(u=t.charAt(c))||"-"===u)){var f=60*parseInt(t.substr(c+1,2),10)+parseInt(t.substr(c+4,2),10);f*=6e4,"+"===u?e.setTime(+e-f):e.setTime(+e+f)}return e},i.generalizedTimeToDate=function(t){var e=new Date,r=parseInt(t.substr(0,4),10),n=parseInt(t.substr(4,2),10)-1,i=parseInt(t.substr(6,2),10),o=parseInt(t.substr(8,2),10),s=parseInt(t.substr(10,2),10),a=parseInt(t.substr(12,2),10),u=0,c=0,f=!1;"Z"===t.charAt(t.length-1)&&(f=!0);var l=t.length-5,h=t.charAt(l);"+"!==h&&"-"!==h||(c=60*parseInt(t.substr(l+1,2),10)+parseInt(t.substr(l+4,2),10),c*=6e4,"+"===h&&(c*=-1),f=!0);return"."===t.charAt(14)&&(u=1e3*parseFloat(t.substr(14),10)),f?(e.setUTCFullYear(r,n,i),e.setUTCHours(o,s,a,u),e.setTime(+e+c)):(e.setFullYear(r,n,i),e.setHours(o,s,a,u)),e},i.dateToUtcTime=function(t){if("string"==typeof t)return t;var e="",r=[];r.push((""+t.getUTCFullYear()).substr(2)),r.push(""+(t.getUTCMonth()+1)),r.push(""+t.getUTCDate()),r.push(""+t.getUTCHours()),r.push(""+t.getUTCMinutes()),r.push(""+t.getUTCSeconds());for(var n=0;n=-128&&t<128)return e.putSignedInt(t,8);if(t>=-32768&&t<32768)return e.putSignedInt(t,16);if(t>=-8388608&&t<8388608)return e.putSignedInt(t,24);if(t>=-2147483648&&t<2147483648)return e.putSignedInt(t,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=t,r},i.derToInteger=function(t){"string"==typeof t&&(t=n.util.createBuffer(t));var e=8*t.length();if(e>32)throw new Error("Integer too large; max is 32-bits.");return t.getSignedInt(e)},i.validate=function(t,e,r,o){var s=!1;if(t.tagClass!==e.tagClass&&void 0!==e.tagClass||t.type!==e.type&&void 0!==e.type)o&&(t.tagClass!==e.tagClass&&o.push("["+e.name+'] Expected tag class "'+e.tagClass+'", got "'+t.tagClass+'"'),t.type!==e.type&&o.push("["+e.name+'] Expected type "'+e.type+'", got "'+t.type+'"'));else if(t.constructed===e.constructed||void 0===e.constructed){if(s=!0,e.value&&n.util.isArray(e.value))for(var a=0,u=0;s&&u0&&(o+="\n");for(var s="",u=0;u1?o+="0x"+n.util.bytesToHex(t.value.slice(1)):o+="(none)",t.value.length>0){var h=t.value.charCodeAt(0);1==h?o+=" (1 unused bit shown)":h>1&&(o+=" ("+h+" unused bits shown)")}}else t.type===i.Type.OCTETSTRING?(a.test(t.value)||(o+="("+t.value+") "),o+="0x"+n.util.bytesToHex(t.value)):t.type===i.Type.UTF8?o+=n.util.decodeUtf8(t.value):t.type===i.Type.PRINTABLESTRING||t.type===i.Type.IA5String?o+=t.value:a.test(t.value)?o+="0x"+n.util.bytesToHex(t.value):0===t.value.length?o+="[null]":o+=t.value}return o}},function(t,e,r){var n=r(8);t.exports=n.md=n.md||{},n.md.algorithms=n.md.algorithms||{}},,,function(t,e,r){"use strict";(function(e){const n=r(24),i=r(429);function o(t,e,r,i){if("function"==typeof r&&(i=r,r=void 0),!i)throw new Error("Missing callback");o.digest(t,e,r,(t,o)=>{if(t)return i(t);i(null,n.encode(o,e,r))})}t.exports=o,o.Buffer=e,o.multihash=n,o.digest=function(t,e,r,n){if("function"==typeof r&&(n=r,r=void 0),!n)throw new Error("Missing callback");let i,s=n;r&&(s=((t,e)=>{if(t)return n(t);n(null,e.slice(0,r))}));try{i=o.createHash(e)}catch(t){return s(t)}i(t,s)},o.createHash=function(t){if(t=n.coerceCode(t),!o.functions[t])throw new Error("multihash function "+t+" not yet supported");return o.functions[t]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,r(0).Buffer)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){r=(0,o.default)(r||n.default);var a=(0,s.default)(e);if(!t())return r(null);var u=function(e){if(e)return r(e);if(t())return a(u);var n=(0,i.default)(arguments,1);r.apply(null,[null].concat(n))};a(u)};var n=a(r(70)),i=a(r(92)),o=a(r(133)),s=a(r(49));function a(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},,function(t,e,r){t.exports=i;var n=r(23).EventEmitter;function i(){n.call(this)}r(22)(i,n),i.Readable=r(166),i.Writable=r(473),i.Duplex=r(474),i.Transform=r(475),i.PassThrough=r(476),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function c(t){if(f(),0===n.listenerCount(this,"error"))throw t}function f(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",c),t.removeListener("error",c),r.removeListener("end",f),r.removeListener("close",f),t.removeListener("close",f)}return r.on("error",c),t.on("error",c),r.on("end",f),r.on("close",f),t.on("close",f),t.emit("pipe",r),t}},function(t,e,r){"use strict";var n=r(285);t.exports=function(t,e){if(!t)return function(t,r){return t?n(r,t,e):r(!0)};Array.isArray(t)||(t=Object.keys(t).map(function(e){return t[e]}));var r=0;return function(i,o){if(i)return n(o,i,e);r>=t.length?o(!0):o(null,t[r++])}}},,,function(t,e){t.exports=function(){}},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=r(494).Buffer}catch(t){}function a(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=a(t,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=a(t,e,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,c=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c>>26,l=67108863&u,h=Math.min(c,e.length-1),p=Math.max(0,c-t.length+1);p<=h;p++){var d=c-p|0;f+=(s=(i=0|t.words[d])*(o=0|e.words[p])+l)/67108864|0,l=67108863&s}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=f[t],p=l[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var y=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?y+r:c[h-y.length]+y+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,c=new t(o),f=this.clone();if(u){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),c[a]=s;for(;a=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,p=0|s[1],d=8191&p,y=p>>>13,g=0|s[2],m=8191&g,v=g>>>13,b=0|s[3],_=8191&b,S=b>>>13,w=0|s[4],E=8191&w,k=w>>>13,C=0|s[5],A=8191&C,T=C>>>13,B=0|s[6],I=8191&B,M=B>>>13,x=0|s[7],R=8191&x,N=x>>>13,P=0|s[8],L=8191&P,D=P>>>13,O=0|s[9],U=8191&O,K=O>>>13,j=0|a[0],F=8191&j,V=j>>>13,q=0|a[1],J=8191&q,H=q>>>13,z=0|a[2],G=8191&z,Y=z>>>13,W=0|a[3],$=8191&W,Q=W>>>13,Z=0|a[4],X=8191&Z,tt=Z>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ct=at>>>13,ft=0|a[8],lt=8191&ft,ht=ft>>>13,pt=0|a[9],dt=8191&pt,yt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(c+(n=Math.imul(l,F))|0)+((8191&(i=(i=Math.imul(l,V))+Math.imul(h,F)|0))<<13)|0;c=((o=Math.imul(h,V))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(d,F),i=(i=Math.imul(d,V))+Math.imul(y,F)|0,o=Math.imul(y,V);var mt=(c+(n=n+Math.imul(l,J)|0)|0)+((8191&(i=(i=i+Math.imul(l,H)|0)+Math.imul(h,J)|0))<<13)|0;c=((o=o+Math.imul(h,H)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,F),i=(i=Math.imul(m,V))+Math.imul(v,F)|0,o=Math.imul(v,V),n=n+Math.imul(d,J)|0,i=(i=i+Math.imul(d,H)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,H)|0;var vt=(c+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(h,G)|0))<<13)|0;c=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(_,F),i=(i=Math.imul(_,V))+Math.imul(S,F)|0,o=Math.imul(S,V),n=n+Math.imul(m,J)|0,i=(i=i+Math.imul(m,H)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,H)|0,n=n+Math.imul(d,G)|0,i=(i=i+Math.imul(d,Y)|0)+Math.imul(y,G)|0,o=o+Math.imul(y,Y)|0;var bt=(c+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,Q)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,Q)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(E,F),i=(i=Math.imul(E,V))+Math.imul(k,F)|0,o=Math.imul(k,V),n=n+Math.imul(_,J)|0,i=(i=i+Math.imul(_,H)|0)+Math.imul(S,J)|0,o=o+Math.imul(S,H)|0,n=n+Math.imul(m,G)|0,i=(i=i+Math.imul(m,Y)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,Y)|0,n=n+Math.imul(d,$)|0,i=(i=i+Math.imul(d,Q)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,Q)|0;var _t=(c+(n=n+Math.imul(l,X)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(h,X)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(A,F),i=(i=Math.imul(A,V))+Math.imul(T,F)|0,o=Math.imul(T,V),n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,H)|0,n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,Y)|0,n=n+Math.imul(m,$)|0,i=(i=i+Math.imul(m,Q)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,Q)|0,n=n+Math.imul(d,X)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,tt)|0;var St=(c+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(I,F),i=(i=Math.imul(I,V))+Math.imul(M,F)|0,o=Math.imul(M,V),n=n+Math.imul(A,J)|0,i=(i=i+Math.imul(A,H)|0)+Math.imul(T,J)|0,o=o+Math.imul(T,H)|0,n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,Q)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,Q)|0,n=n+Math.imul(m,X)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(y,rt)|0,o=o+Math.imul(y,nt)|0;var wt=(c+(n=n+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,st)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,st)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(R,F),i=(i=Math.imul(R,V))+Math.imul(N,F)|0,o=Math.imul(N,V),n=n+Math.imul(I,J)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(M,J)|0,o=o+Math.imul(M,H)|0,n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,Y)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,Q)|0,n=n+Math.imul(_,X)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(S,X)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(m,rt)|0,i=(i=i+Math.imul(m,nt)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,st)|0;var Et=(c+(n=n+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,F),i=(i=Math.imul(L,V))+Math.imul(D,F)|0,o=Math.imul(D,V),n=n+Math.imul(R,J)|0,i=(i=i+Math.imul(R,H)|0)+Math.imul(N,J)|0,o=o+Math.imul(N,H)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(M,G)|0,o=o+Math.imul(M,Y)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,Q)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,Q)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(m,ot)|0,i=(i=i+Math.imul(m,st)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ct)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,ct)|0;var kt=(c+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(h,lt)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(U,F),i=(i=Math.imul(U,V))+Math.imul(K,F)|0,o=Math.imul(K,V),n=n+Math.imul(L,J)|0,i=(i=i+Math.imul(L,H)|0)+Math.imul(D,J)|0,o=o+Math.imul(D,H)|0,n=n+Math.imul(R,G)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,Y)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,Q)|0,n=n+Math.imul(A,X)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(m,ut)|0,i=(i=i+Math.imul(m,ct)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ct)|0,n=n+Math.imul(d,lt)|0,i=(i=i+Math.imul(d,ht)|0)+Math.imul(y,lt)|0,o=o+Math.imul(y,ht)|0;var Ct=(c+(n=n+Math.imul(l,dt)|0)|0)+((8191&(i=(i=i+Math.imul(l,yt)|0)+Math.imul(h,dt)|0))<<13)|0;c=((o=o+Math.imul(h,yt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(U,J),i=(i=Math.imul(U,H))+Math.imul(K,J)|0,o=Math.imul(K,H),n=n+Math.imul(L,G)|0,i=(i=i+Math.imul(L,Y)|0)+Math.imul(D,G)|0,o=o+Math.imul(D,Y)|0,n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,Q)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,Q)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ct)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ct)|0,n=n+Math.imul(m,lt)|0,i=(i=i+Math.imul(m,ht)|0)+Math.imul(v,lt)|0,o=o+Math.imul(v,ht)|0;var At=(c+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,yt)|0)+Math.imul(y,dt)|0))<<13)|0;c=((o=o+Math.imul(y,yt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(U,G),i=(i=Math.imul(U,Y))+Math.imul(K,G)|0,o=Math.imul(K,Y),n=n+Math.imul(L,$)|0,i=(i=i+Math.imul(L,Q)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,Q)|0,n=n+Math.imul(R,X)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(M,rt)|0,o=o+Math.imul(M,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,n=n+Math.imul(_,lt)|0,i=(i=i+Math.imul(_,ht)|0)+Math.imul(S,lt)|0,o=o+Math.imul(S,ht)|0;var Tt=(c+(n=n+Math.imul(m,dt)|0)|0)+((8191&(i=(i=i+Math.imul(m,yt)|0)+Math.imul(v,dt)|0))<<13)|0;c=((o=o+Math.imul(v,yt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(U,$),i=(i=Math.imul(U,Q))+Math.imul(K,$)|0,o=Math.imul(K,Q),n=n+Math.imul(L,X)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(N,rt)|0,o=o+Math.imul(N,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ct)|0,n=n+Math.imul(E,lt)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(k,lt)|0,o=o+Math.imul(k,ht)|0;var Bt=(c+(n=n+Math.imul(_,dt)|0)|0)+((8191&(i=(i=i+Math.imul(_,yt)|0)+Math.imul(S,dt)|0))<<13)|0;c=((o=o+Math.imul(S,yt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(U,X),i=(i=Math.imul(U,tt))+Math.imul(K,X)|0,o=Math.imul(K,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(D,rt)|0,o=o+Math.imul(D,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ct)|0)+Math.imul(M,ut)|0,o=o+Math.imul(M,ct)|0,n=n+Math.imul(A,lt)|0,i=(i=i+Math.imul(A,ht)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,ht)|0;var It=(c+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,yt)|0)+Math.imul(k,dt)|0))<<13)|0;c=((o=o+Math.imul(k,yt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(U,rt),i=(i=Math.imul(U,nt))+Math.imul(K,rt)|0,o=Math.imul(K,nt),n=n+Math.imul(L,ot)|0,i=(i=i+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,n=n+Math.imul(R,ut)|0,i=(i=i+Math.imul(R,ct)|0)+Math.imul(N,ut)|0,o=o+Math.imul(N,ct)|0,n=n+Math.imul(I,lt)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,ht)|0;var Mt=(c+(n=n+Math.imul(A,dt)|0)|0)+((8191&(i=(i=i+Math.imul(A,yt)|0)+Math.imul(T,dt)|0))<<13)|0;c=((o=o+Math.imul(T,yt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(U,ot),i=(i=Math.imul(U,st))+Math.imul(K,ot)|0,o=Math.imul(K,st),n=n+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ct)|0)+Math.imul(D,ut)|0,o=o+Math.imul(D,ct)|0,n=n+Math.imul(R,lt)|0,i=(i=i+Math.imul(R,ht)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,ht)|0;var xt=(c+(n=n+Math.imul(I,dt)|0)|0)+((8191&(i=(i=i+Math.imul(I,yt)|0)+Math.imul(M,dt)|0))<<13)|0;c=((o=o+Math.imul(M,yt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(U,ut),i=(i=Math.imul(U,ct))+Math.imul(K,ut)|0,o=Math.imul(K,ct),n=n+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,ht)|0;var Rt=(c+(n=n+Math.imul(R,dt)|0)|0)+((8191&(i=(i=i+Math.imul(R,yt)|0)+Math.imul(N,dt)|0))<<13)|0;c=((o=o+Math.imul(N,yt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(U,lt),i=(i=Math.imul(U,ht))+Math.imul(K,lt)|0,o=Math.imul(K,ht);var Nt=(c+(n=n+Math.imul(L,dt)|0)|0)+((8191&(i=(i=i+Math.imul(L,yt)|0)+Math.imul(D,dt)|0))<<13)|0;c=((o=o+Math.imul(D,yt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var Pt=(c+(n=Math.imul(U,dt))|0)+((8191&(i=(i=Math.imul(U,yt))+Math.imul(K,dt)|0))<<13)|0;return c=((o=Math.imul(K,yt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=gt,u[1]=mt,u[2]=vt,u[3]=bt,u[4]=_t,u[5]=St,u[6]=wt,u[7]=Et,u[8]=kt,u[9]=Ct,u[10]=At,u[11]=Tt,u[12]=Bt,u[13]=It,u[14]=Mt,u[15]=xt,u[16]=Rt,u[17]=Nt,u[18]=Pt,0!==c&&(u[19]=c,r.length++),r};function d(t,e,r){return(new y).mulp(t,e,r)}function y(t,e){this.x=t,this.y=e}Math.imul||(p=h),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):r<63?h(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):d(this,t,e)},y.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},y.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,c=0;c=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&a}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/s|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);a&&(a.words[l]=h)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var h=0,p=1;0==(e.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(f),s.isub(l)),i.iushrn(1),s.iushrn(1);for(var d=0,y=1;0==(r.words[0]&y)&&d<26;++d,y<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(f),u.isub(l)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,h=1;0==(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new w(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function m(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function w(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){w.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},m.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):r.strip(),r},m.prototype.split=function(t,e){t.iushrn(this.n,0,e)},m.prototype.imulK=function(t){return t.imul(this.k)},i(v,m),v.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new b;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return g[t]=e,e},w.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},w.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},w.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},w.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},w.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},w.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},w.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},w.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},w.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},w.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},w.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},w.prototype.isqr=function(t){return this.imul(t,t.clone())},w.prototype.sqr=function(t){return this.mul(t,t)},w.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,i),h=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(a);){for(var y=p,g=0;0!==y.cmp(a);g++)y=y.redSqr();n(g=0;n--){for(var c=e.words[n],f=u-1;f>=0;f--){var l=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4===++a||0===n&&0===f)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},w.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},w.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new E(t)},i(E,w),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(39)(t))},function(t,e,r){"use strict";var n=r(179);t.exports=function(t){return n(function(t,e){return t.push(e),t},[],t)}},function(t,e,r){"use strict";var n=r(286);t.exports=function(t){return t=n(t),function(e){return function r(n,i){for(var o,s=!0;s;)s=!1,o=!0,e(n,function(e,n){if(!e&&!t(n))return o?s=!0:r(e,i);i(e,n)}),o=!1}}}},,,function(t,e,r){"use strict";const n=r(16),i=r(20),o=r(26);(e=t.exports=o(class{constructor(t,e,r){i(r,"A link requires a multihash to point to"),this._name=t||"",this._size=e,this._cid=new n(r)}toString(){return`DAGLink <${this._cid.toBaseEncodedString()} - name: "${this.name}", size: ${this.size}>`}toJSON(){return this._json||(this._json=Object.freeze({name:this.name,size:this.size,multihash:this._cid.toBaseEncodedString()})),Object.assign({},this._json)}get name(){return this._name}set name(t){throw new Error("Can't set property: 'name' is immutable")}get size(){return this._size}set size(t){throw new Error("Can't set property: 'size' is immutable")}get multihash(){return this._cid.buffer}set multihash(t){throw new Error("Can't set property: 'multihash' is immutable")}get cid(){return this._cid}set cid(t){throw new Error("Can't set property: 'cid' is immutable")}},{className:"DAGLink",symbolName:"@ipld/js-ipld-dag-pb/daglink"})).create=r(449),e.util=r(450)},function(t,e){ +!function(){"use strict";var s="input is invalid type",a="object"==typeof window,u=a?window:{};u.JS_SHA3_NO_WINDOW&&(a=!1);var c=!a&&"object"==typeof self;!u.JS_SHA3_NO_NODE_JS&&"object"==typeof n&&n.versions&&n.versions.node?u=i:c&&(u=self);var f=!u.JS_SHA3_NO_COMMON_JS&&"object"==typeof e&&e.exports,l=r(183),h=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,p="0123456789abcdef".split(""),d=[4,1024,262144,67108864],y=[0,8,16,24],g=[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],v=[128,256],b=["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)}),!h||!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 K(e,t,e).update(n)[r]()}},S=function(e,t,r){return function(n,i){return new K(e,t,i).update(n)[r]()}},w=function(e,t,r){return function(t,n,i,o){return T["cshake"+e].update(t,n,i,o)[r]()}},k=function(e,t,r){return function(t,n,i,o){return T["kmac"+e].update(t,n,i,o)[r]()}},A=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 O(e,t,r){K.call(this,e,t,r)}K.prototype.update=function(e){if(!this.finalized){var t,r=typeof e;if("string"!==r){if("object"!==r)throw s;if(null===e)throw s;if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw s;t=!0}for(var n,i,o=this.blocks,a=this.byteCount,u=e.length,c=this.blockCount,f=0,l=this.s;f>2]|=e[f]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(o[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=o[c],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},K.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw s;if(null===e)throw s;if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw s;t=!0}var n=0,i=e.length;if(t)n=i;else for(var o=0;o=57344?n+=3:(a=65536+((1023&a)<<10|1023&e.charCodeAt(++o)),n+=4)}return n+=this.encode(8*n),this.update(e),n},K.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]+p[15&e]+p[e>>12&15]+p[e>>8&15]+p[e>>20&15]+p[e>>16&15]+p[e>>28&15]+p[e>>24&15];s%t==0&&(D(r),o=0)}return i&&(e=r[o],a+=p[e>>4&15]+p[15&e],i>1&&(a+=p[e>>12&15]+p[e>>8&15]),i>2&&(a+=p[e>>20&15]+p[e>>16&15])),a},K.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,s=0,a=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(a);for(var u=new Uint32Array(e);s>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;a%r==0&&D(n)}return o&&(e=a<<2,t=n[s],u[e]=255&t,o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u},O.prototype=new K,O.prototype.finalize=function(){return this.encode(this.outputBits,!0),K.prototype.finalize.call(this)};var D=function(e){var t,r,n,i,o,s,a,u,c,f,l,h,p,d,y,m,v,b,_,E,S,w,k,A,C,B,T,I,x,M,N,L,R,P,K,O,D,U,j,F,V,q,J,H,z,G,Y,W,$,Q,Z,X,ee,te,re,ne,ie,oe,se,ae,ue,ce,fe;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],s=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],c=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|a>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(a<<1|s>>>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|c>>>31),r=o^(c<<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=s^(f<<1|l>>>31),r=a^(l<<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^(h<<1|p>>>31),r=c^(p<<1|h>>>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|o>>>31),r=l^(o<<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,d=e[0],y=e[1],G=e[11]<<4|e[10]>>>28,Y=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,x=e[21]<<3|e[20]>>>29,ae=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,J=e[41]<<18|e[40]>>>14,P=e[2]<<1|e[3]>>>31,K=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,W=e[22]<<10|e[23]>>>22,$=e[23]<<10|e[22]>>>22,M=e[33]<<13|e[32]>>>19,N=e[32]<<13|e[33]>>>19,ce=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,O=e[14]<<6|e[15]>>>26,D=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,_=e[24]<<11|e[25]>>>21,Q=e[34]<<15|e[35]>>>17,Z=e[35]<<15|e[34]>>>17,L=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,A=e[6]<<28|e[7]>>>4,C=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,U=e[26]<<25|e[27]>>>7,j=e[27]<<25|e[26]>>>7,E=e[36]<<21|e[37]>>>11,S=e[37]<<21|e[36]>>>11,X=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,H=e[8]<<27|e[9]>>>5,z=e[9]<<27|e[8]>>>5,B=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,F=e[38]<<8|e[39]>>>24,V=e[39]<<8|e[38]>>>24,w=e[48]<<14|e[49]>>>18,k=e[49]<<14|e[48]>>>18,e[0]=d^~m&b,e[1]=y^~v&_,e[10]=A^~B&I,e[11]=C^~T&x,e[20]=P^~O&U,e[21]=K^~D&j,e[30]=H^~G&W,e[31]=z^~Y&$,e[40]=te^~ne&oe,e[41]=re^~ie&se,e[2]=m^~b&E,e[3]=v^~_&S,e[12]=B^~I&M,e[13]=T^~x&N,e[22]=O^~U&F,e[23]=D^~j&V,e[32]=G^~W&Q,e[33]=Y^~$&Z,e[42]=ne^~oe&ae,e[43]=ie^~se&ue,e[4]=b^~E&w,e[5]=_^~S&k,e[14]=I^~M&L,e[15]=x^~N&R,e[24]=U^~F&q,e[25]=j^~V&J,e[34]=W^~Q&X,e[35]=$^~Z&ee,e[44]=oe^~ae&ce,e[45]=se^~ue&fe,e[6]=E^~w&d,e[7]=S^~k&y,e[16]=M^~L&A,e[17]=N^~R&C,e[26]=F^~q&P,e[27]=V^~J&K,e[36]=Q^~X&H,e[37]=Z^~ee&z,e[46]=ae^~ce&te,e[47]=ue^~fe&re,e[8]=w^~d&m,e[9]=k^~y&v,e[18]=L^~A&B,e[19]=R^~C&T,e[28]=q^~P&O,e[29]=J^~K&D,e[38]=X^~H&G,e[39]=ee^~z&Y,e[48]=ce^~te&ne,e[49]=fe^~re&ie,e[0]^=g[n],e[1]^=g[n+1]};if(f)e.exports=T;else{for(x=0;x(function(t,r){const i=(e,t)=>n(()=>{r(e,t)});let o;try{o=e(t)}catch(e){return void i(e)}i(null,o)})),t.toBuf=((t,r)=>n=>{let i=t(n,r);return e.from(i,"hex")}),t.fromString=((t,r)=>n=>{const i=e.isBuffer(n)?n.toString():n;return t(i,r)}),t.fromNumberTo32BitBuf=((t,r)=>n=>{let i=t(n,r);const o=new Array(4);for(let e=0;e<4;e++)o[e]=255&i,i>>=8;return e.from(o)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(134),i=r(135)();function o(e){return Promise.all([i.subtle.exportKey("jwk",e.privateKey),i.subtle.exportKey("jwk",e.publicKey)])}t.utils=r(422),t.generateKey=function(e,t){n(i.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(o).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.unmarshalPrivateKey=function(e,t){const r=i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);var s;n(Promise.all([r,(s=e,i.subtle.importKey("jwk",{kty:s.kty,n:s.n,e:s.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]))]).then(e=>o({privateKey:e[0],publicKey:e[1]})).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.getRandomValues=function(t){return e.from(i.getRandomValues(t))},t.hashAndSign=function(t,r,o){n(i.subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]).then(e=>i.subtle.sign({name:"RSASSA-PKCS1-v1_5"},e,Uint8Array.from(r))).then(t=>e.from(t)),o)},t.hashAndVerify=function(e,t,r,o){n(i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]).then(e=>i.subtle.verify({name:"RSASSA-PKCS1-v1_5"},e,t,r)),o)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(7),i=r(90).Reporter,o=r(0).Buffer;function s(e,t){i.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function a(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof a||(e=new a(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(s,i),t.DecoderBuffer=s,s.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},s.prototype.restore=function(e){const t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.EncoderBuffer=a,a.prototype.join=function(e,t){return e||(e=new o(this.length)),t||(t=0),0===this.length?e:(Array.isArray(this.value)?this.value.forEach(function(r){r.join(e,t),t+=r.length}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length),e)}},function(e,t,r){"use strict";const n=t;n._reverse=function(e){const t={};return Object.keys(e).forEach(function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r}),t},n.der=r(431)},function(e,t,r){"use strict";const n=r(7),i=r(36),o=i.base,s=i.bignum,a=i.constants.der;function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){o.Node.call(this,"der",e)}function f(e,t){let r=e.readUInt8(t);if(e.isError(r))return r;const n=a.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){let n=r;for(r=0;128==(128&n);){if(n=e.readUInt8(t),e.isError(n))return n;r<<=7,r|=127&n}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:a.tag[r]}}function l(e,t,r){let n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;const i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(let t=0;t=31)return n.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=a.tagClassByName[r||"universal"]<<6}(e,t,r,this.reporter);if(n.length<128){const e=new i(2);return e[0]=o,e[1]=n.length,this._createEncoderBuffer([e,n])}let s=1;for(let e=n.length;e>=256;e>>=8)s++;const u=new i(2+s);u[0]=o,u[1]=128|s;for(let e=1+s,t=n.length;t>0;e--,t>>=8)u[e]=255&t;return this._createEncoderBuffer([u,n])},c.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=new i(2*e.length);for(let r=0;r=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let n=0;for(let t=0;t=128;r>>=7)n++}const o=new i(n);let s=o.length-1;for(let t=e.length-1;t>=0;t--){let r=e[t];for(o[s--]=127&r;(r>>=7)>0;)o[s--]=128|127&r}return this._createEncoderBuffer(o)},c.prototype._encodeTime=function(e,t){let r;const n=new Date(e);return"gentime"===t?r=[f(n.getUTCFullYear()),f(n.getUTCMonth()+1),f(n.getUTCDate()),f(n.getUTCHours()),f(n.getUTCMinutes()),f(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[f(n.getUTCFullYear()%100),f(n.getUTCMonth()+1),f(n.getUTCDate()),f(n.getUTCHours()),f(n.getUTCMinutes()),f(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=new i(t)}if(i.isBuffer(e)){let t=e.length;0===e.length&&t++;const r=new i(t);return e.copy(r),0===e.length&&(r[0]=0),this._createEncoderBuffer(r)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let r=1;for(let t=e;t>=256;t>>=8)r++;const n=new Array(r);for(let t=n.length-1;t>=0;t--)n[t]=255&e,e>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(new i(n))},c.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},c.prototype._skipDefault=function(e,t,r){const n=this._baseState;let i;if(null===n.default)return!1;const o=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,r).join()),o.length!==n.defaultBuffer.length)return!1;for(i=0;i{i=i||r(439)(t);class o{constructor(e){i.validatePublicKey(e),this._key=e}verify(e,t,r){a(r),i.hashAndVerify(this._key,t,e,r)}marshal(){return i.compressPublicKey(this._key)}get bytes(){return e.PublicKey.encode({Type:e.KeyType.Secp256k1,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){a(e),n(this.bytes,"sha2-256",e)}}class s{constructor(e,t){this._key=e,this._publicKey=t||i.computePublicKey(e),i.validatePrivateKey(this._key),i.validatePublicKey(this._publicKey)}sign(e,t){a(t),i.hashAndSign(this._key,e,t)}get public(){return new o(this._publicKey)}marshal(){return this._key}get bytes(){return e.PrivateKey.encode({Type:e.KeyType.Secp256k1,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){a(e),n(this.bytes,"sha2-256",e)}}function a(e){if("function"!=typeof e)throw new Error("callback is required")}return{Secp256k1PublicKey:o,Secp256k1PrivateKey:s,unmarshalSecp256k1PrivateKey:function(e,t){t(null,new s(e),null)},unmarshalSecp256k1PublicKey:function(e){return new o(e)},generateKeyPair:function(e,t){void 0===t&&"function"==typeof e&&(t=e),a(t),i.generateKey((e,r)=>{if(e)return t(e);let n;try{n=new s(r)}catch(e){return t(e)}t(null,n)})}}})},function(e){e.exports={COMPRESSED_TYPE_INVALID:"compressed should be a boolean",EC_PRIVATE_KEY_TYPE_INVALID:"private key should be a Buffer",EC_PRIVATE_KEY_LENGTH_INVALID:"private key length is invalid",EC_PRIVATE_KEY_RANGE_INVALID:"private key range is invalid",EC_PRIVATE_KEY_TWEAK_ADD_FAIL:"tweak out of range or resulting private key is invalid",EC_PRIVATE_KEY_TWEAK_MUL_FAIL:"tweak out of range",EC_PRIVATE_KEY_EXPORT_DER_FAIL:"couldn't export to DER format",EC_PRIVATE_KEY_IMPORT_DER_FAIL:"couldn't import from DER format",EC_PUBLIC_KEYS_TYPE_INVALID:"public keys should be an Array",EC_PUBLIC_KEYS_LENGTH_INVALID:"public keys Array should have at least 1 element",EC_PUBLIC_KEY_TYPE_INVALID:"public key should be a Buffer",EC_PUBLIC_KEY_LENGTH_INVALID:"public key length is invalid",EC_PUBLIC_KEY_PARSE_FAIL:"the public key could not be parsed or is invalid",EC_PUBLIC_KEY_CREATE_FAIL:"private was invalid, try again",EC_PUBLIC_KEY_TWEAK_ADD_FAIL:"tweak out of range or resulting public key is invalid",EC_PUBLIC_KEY_TWEAK_MUL_FAIL:"tweak out of range",EC_PUBLIC_KEY_COMBINE_FAIL:"the sum of the public keys is not valid",ECDH_FAIL:"scalar was invalid (zero or overflow)",ECDSA_SIGNATURE_TYPE_INVALID:"signature should be a Buffer",ECDSA_SIGNATURE_LENGTH_INVALID:"signature length is invalid",ECDSA_SIGNATURE_PARSE_FAIL:"couldn't parse signature",ECDSA_SIGNATURE_PARSE_DER_FAIL:"couldn't parse DER signature",ECDSA_SIGNATURE_SERIALIZE_DER_FAIL:"couldn't serialize signature to DER format",ECDSA_SIGN_FAIL:"nonce generation function failed or private key is invalid",ECDSA_RECOVER_FAIL:"couldn't recover public key from signature",MSG32_TYPE_INVALID:"message should be a Buffer",MSG32_LENGTH_INVALID:"message length is invalid",OPTIONS_TYPE_INVALID:"options should be an Object",OPTIONS_DATA_TYPE_INVALID:"options.data should be a Buffer",OPTIONS_DATA_LENGTH_INVALID:"options.data length is invalid",OPTIONS_NONCEFN_TYPE_INVALID:"options.noncefn should be a Function",RECOVERY_ID_TYPE_INVALID:"recovery should be a Number",RECOVERY_ID_VALUE_INVALID:"recovery should have value between -1 and 4",TWEAK_TYPE_INVALID:"tweak should be a Buffer",TWEAK_LENGTH_INVALID:"tweak length is invalid"}},function(e,t,r){"use strict";var n=r(0).Buffer,i=r(7),o=r(203),s=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],l=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function p(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function d(e,t){return e<>>32-t}function y(e,t,r,n,i,o,s,a){return d(e+(t^r^n)+o+s|0,a)+i|0}function g(e,t,r,n,i,o,s,a){return d(e+(t&r|~t&n)+o+s|0,a)+i|0}function m(e,t,r,n,i,o,s,a){return d(e+((t|~r)^n)+o+s|0,a)+i|0}function v(e,t,r,n,i,o,s,a){return d(e+(t&n|r&~n)+o+s|0,a)+i|0}function b(e,t,r,n,i,o,s,a){return d(e+(t^(r|~n))+o+s|0,a)+i|0}i(p,o),p.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,p=0|this._e,_=0|this._a,E=0|this._b,S=0|this._c,w=0|this._d,k=0|this._e,A=0;A<80;A+=1){var C,B;A<16?(C=y(r,n,i,o,p,e[a[A]],l[0],c[A]),B=b(_,E,S,w,k,e[u[A]],h[0],f[A])):A<32?(C=g(r,n,i,o,p,e[a[A]],l[1],c[A]),B=v(_,E,S,w,k,e[u[A]],h[1],f[A])):A<48?(C=m(r,n,i,o,p,e[a[A]],l[2],c[A]),B=m(_,E,S,w,k,e[u[A]],h[2],f[A])):A<64?(C=v(r,n,i,o,p,e[a[A]],l[3],c[A]),B=g(_,E,S,w,k,e[u[A]],h[3],f[A])):(C=b(r,n,i,o,p,e[a[A]],l[4],c[A]),B=y(_,E,S,w,k,e[u[A]],h[4],f[A])),r=p,p=o,o=d(i,10),i=n,n=C,_=k,k=w,w=d(S,10),S=E,E=B}var T=this._b+i+w|0;this._b=this._c+o+k|0,this._c=this._d+p+_|0,this._d=this._e+r+E|0,this._e=this._a+n+S|0,this._a=T},p.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=p},function(e,t,r){(t=e.exports=function(e){e=e.toLowerCase();var r=t[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r}).sha=r(446),t.sha1=r(447),t.sha224=r(448),t.sha256=r(231),t.sha384=r(449),t.sha512=r(232)},function(e,t,r){var n=r(7),i=r(77),o=r(6).Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function l(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function h(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function p(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,d=0|this._f,y=0|this._g,g=0|this._h,m=0;m<16;++m)r[m]=e.readInt32BE(4*m);for(;m<64;++m)r[m]=0|(((t=r[m-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[m-7]+p(r[m-15])+r[m-16];for(var v=0;v<64;++v){var b=g+h(u)+c(u,d,y)+s[v]+r[v]|0,_=l(n)+f(n,i,o)|0;g=y,y=d,d=u,u=a+b|0,a=o,o=i,i=n,n=b+_|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0,this._f=d+this._f|0,this._g=y+this._g|0,this._h=g+this._h|0},u.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},function(e,t,r){var n=r(7),i=r(77),o=r(6).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function u(){this.init(),this._w=a,i.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function l(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function h(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function y(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function m(e,t){return e>>>0>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,u=0|this._fh,v=0|this._gh,b=0|this._hh,_=0|this._al,E=0|this._bl,S=0|this._cl,w=0|this._dl,k=0|this._el,A=0|this._fl,C=0|this._gl,B=0|this._hl,T=0;T<32;T+=2)t[T]=e.readInt32BE(4*T),t[T+1]=e.readInt32BE(4*T+4);for(;T<160;T+=2){var I=t[T-30],x=t[T-30+1],M=p(I,x),N=d(x,I),L=y(I=t[T-4],x=t[T-4+1]),R=g(x,I),P=t[T-14],K=t[T-14+1],O=t[T-32],D=t[T-32+1],U=N+K|0,j=M+P+m(U,N)|0;j=(j=j+L+m(U=U+R|0,R)|0)+O+m(U=U+D|0,D)|0,t[T]=j,t[T+1]=U}for(var F=0;F<160;F+=2){j=t[F],U=t[F+1];var V=f(r,n,i),q=f(_,E,S),J=l(r,_),H=l(_,r),z=h(a,k),G=h(k,a),Y=s[F],W=s[F+1],$=c(a,u,v),Q=c(k,A,C),Z=B+G|0,X=b+z+m(Z,B)|0;X=(X=(X=X+$+m(Z=Z+Q|0,Q)|0)+Y+m(Z=Z+W|0,W)|0)+j+m(Z=Z+U|0,U)|0;var ee=H+q|0,te=J+V+m(ee,H)|0;b=v,B=C,v=u,C=A,u=a,A=k,a=o+X+m(k=w+Z|0,w)|0,o=i,w=S,i=n,S=E,n=r,E=_,r=X+te+m(_=Z+ee|0,Z)|0}this._al=this._al+_|0,this._bl=this._bl+E|0,this._cl=this._cl+S|0,this._dl=this._dl+w|0,this._el=this._el+k|0,this._fl=this._fl+A|0,this._gl=this._gl+C|0,this._hl=this._hl+B|0,this._ah=this._ah+r+m(this._al,_)|0,this._bh=this._bh+n+m(this._bl,E)|0,this._ch=this._ch+i+m(this._cl,S)|0,this._dh=this._dh+o+m(this._dl,w)|0,this._eh=this._eh+a+m(this._el,k)|0,this._fh=this._fh+u+m(this._fl,A)|0,this._gh=this._gh+v+m(this._gl,C)|0,this._hh=this._hh+b+m(this._hl,B)|0},u.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},function(e,t,r){"use strict";var n=r(6).Buffer,i=r(113),o=r(234);function s(e,t){null===e&&null===t?(this.x=this.y=null,this.inf=!0):(this.x=e,this.y=t,this.inf=!1)}s.fromPublicKey=function(e){var t,r,n=e[0];return 33!==e.length||2!==n&&3!==n?65!==e.length||4!==n&&6!==n&&7!==n?null:(t=i.fromBuffer(e.slice(1,33)),r=i.fromBuffer(e.slice(33,65)),t.ucmp(i.p)>=0||r.ucmp(i.p)>=0?null:6!==n&&7!==n||r.isOdd()===(7===n)?0!==t.redSqr().redMul(t).redIAdd7().ucmp(r.redSqr())?null:new s(t,r):null):(t=i.fromBuffer(e.slice(1,33))).ucmp(i.p)>=0?null:null===(r=t.redSqr().redMul(t).redIAdd7().redSqrt())?null:(3===n!==r.isOdd()&&(r=r.redNeg()),new s(t,r))},s.prototype.toPublicKey=function(e){var t,r=this.x,i=this.y;return e?((t=n.alloc(33))[0]=i.isOdd()?3:2,r.toBuffer().copy(t,1)):((t=n.alloc(65))[0]=4,r.toBuffer().copy(t,1),i.toBuffer().copy(t,33)),t},s.fromECJPoint=function(e){if(e.inf)return new s(null,null);var t=e.z.redInvm(),r=t.redSqr();return new s(e.x.redMul(r),e.y.redMul(r).redMul(t))},s.prototype.toECJPoint=function(){return this.inf?new o(null,null,null):new o(this.x,this.y,o.one)},s.prototype.neg=function(){return this.inf?this:new s(this.x,this.y.redNeg())},s.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(0===this.x.ucmp(e.x))return 0===this.y.ucmp(e.y)?this.dbl():new s(null,null);var t=this.y.redSub(e.y);t.isZero()||(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x);return new s(r,t.redMul(this.x.redSub(r)).redISub(this.y))},s.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.isZero())return new s(null,null);var t=this.x.redSqr(),r=t.redAdd(t).redIAdd(t).redMul(e.redInvm()),n=r.redSqr().redISub(this.x.redAdd(this.x));return new s(n,r.redMul(this.x.redSub(n)).redISub(this.y))},s.prototype.mul=function(e){for(var t=this._getNAFPoints(4),r=t.points,n=e.getNAF(t.wnd),i=new o(null,null,null),a=n.length-1;a>=0;a--){for(var u=0;a>=0&&0===n[a];a--,++u);if(a>=0&&(u+=1),i=i.dblp(u),a<0)break;var c=n[a];i=c>0?i.mixedAdd(r[c-1>>1]):i.mixedAdd(r[-c-1>>1].neg())}return s.fromECJPoint(i)},s.prototype._getNAFPoints1=function(){return{wnd:1,points:[this]}},s.prototype._getNAFPoints=function(e){var t=new Array((1<({digest(t,o){((t,r,o)=>{n(i.subtle.sign({name:"HMAC"},t,r).then(t=>e.from(t)),o)})(r,t,o)},length:o[t]})),a)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(13),i=r(473);function o(e,t,r,i){if("function"==typeof r&&(i=r,r=void 0),!i)throw new Error("Missing callback");o.digest(e,t,r,(e,o)=>{if(e)return i(e);i(null,n.encode(o,t,r))})}e.exports=o,o.Buffer=t,o.multihash=n,o.digest=function(e,t,r,n){if("function"==typeof r&&(n=r,r=void 0),!n)throw new Error("Missing callback");let i,s=n;r&&(s=((e,t)=>{if(e)return n(e);n(null,t.slice(0,r))}));try{i=o.createHash(t)}catch(e){return s(e)}i(e,s)},o.createHash=function(e){if(e=n.coerceCode(e),!o.functions[e])throw new Error("multihash function "+e+" not yet supported");return o.functions[e]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(17);t.toCallback=(e=>(function(t,r){const i=(e,t)=>n(()=>{r(e,t)});let o;try{o=e(t)}catch(e){return void i(e)}i(null,o)})),t.toBuf=((t,r)=>n=>{let i=t(n,r);return e.from(i,"hex")}),t.fromString=((t,r)=>n=>{const i=e.isBuffer(n)?n.toString():n;return t(i,r)}),t.fromNumberTo32BitBuf=((t,r)=>n=>{let i=t(n,r);const o=new Array(4);for(let e=0;e<4;e++)o[e]=255&i,i>>=8;return e.from(o)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(144),i=r(145)();function o(e){return Promise.all([i.subtle.exportKey("jwk",e.privateKey),i.subtle.exportKey("jwk",e.publicKey)])}t.utils=r(476),t.generateKey=function(e,t){n(i.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(o).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.unmarshalPrivateKey=function(e,t){const r=i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);var s;n(Promise.all([r,(s=e,i.subtle.importKey("jwk",{kty:s.kty,n:s.n,e:s.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]))]).then(e=>o({privateKey:e[0],publicKey:e[1]})).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.getRandomValues=function(t){return e.from(i.getRandomValues(t))},t.hashAndSign=function(t,r,o){n(i.subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]).then(e=>i.subtle.sign({name:"RSASSA-PKCS1-v1_5"},e,Uint8Array.from(r))).then(t=>e.from(t)),o)},t.hashAndVerify=function(e,t,r,o){n(i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]).then(e=>i.subtle.verify({name:"RSASSA-PKCS1-v1_5"},e,t,r)),o)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(36).bignum;t.toBase64=function(t,r){return t.toArrayLike(e,"be",r).toString("base64").replace(/(=*)$/,"").replace(/\+/g,"-").replace(/\//g,"_")},t.toBn=function(t){return new n(e.from(t,"base64"))}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(240);e.exports=function(e){if(!e||"number"!=typeof e)throw new Error("first argument must be a Number bigger than 0");return n.getRandomValues(new Uint8Array(e))}},function(e,t){e.exports=function(e,t,r){e(t),r&&r(!0===t?null:t)}},function(e,t,r){var n=r(92);function i(e){return e}e.exports=function(e){return"object"==typeof e&&"function"==typeof e.test?function(t){return e.test(t)}:n(e)||i}},function(e,t,r){"use strict";e.exports=function(e,t){var r=(t=t||{}).last||!1,n=!1;if("number"==typeof e){r=!0;var i=e;e=function(){return--i}}return function(t){function i(e){t(!0,function(t){r=!1,e(t||!0)})}return function(o,s){n&&!o?r?i(s):s(n):(n=o)?t(n,s):t(null,function(t,o){(n=n||t)?s(n):e(o)?s(null,o):(n=!0,r?s(null,o):i(s))})}}}},function(e,t,r){"use strict";function n(e){return e}var i=r(92),o=r(52);e.exports=function(e,t){e=i(e)||n;var r={};return o(function(n){var i=e(n);return r[i]?!!t:(r[i]=!0,!t)})}},function(e,t){e.exports=function(e){var t,r=!1;function n(n){if(!n)throw new Error("must be passed a readable");t=n,r&&e(t)}return n.resolve=n.ready=n.start=function(i){return r=!0,e=i||e,t&&e(t),n},n}},,,,,,,,,,,,,function(e,t,r){"use strict";const n=r(42),i={};e.exports=i;for(let e in n){i[n[e].toString("hex")]=e}},function(e,t){t.endianness=function(){return"LE"},t.hostname=function(){return"undefined"!=typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"}},function(e,t,r){ +//! stable.js 0.1.8, https://github.com/Two-Screen/stable +//! © 2018 Angry Bytes and contributors. MIT licensed. +e.exports=function(){"use strict";var e=function(e,r){return t(e.slice(),r)};function t(e,t){"function"!=typeof t&&(t=function(e,t){return String(e).localeCompare(t)});var n=e.length;if(n<=1)return e;for(var i=new Array(n),o=1;oc&&(o=c),s>c&&(s=c),a=i,u=o;;)if(a0){for(var r=i.create(i.Class.CONTEXT_SPECIFIC,1,!0,[]),o=0;o=r&&s0&&s.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,t)),o.length>0&&s.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,o)),s.value[0].value.push(i.create(i.Class.UNIVERSAL,i.Type.SET,!0,e.signerInfos)),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.type).getBytes()),s])},addSigner:function(t){var r=t.issuer,i=t.serialNumber;if(t.certificate){var o=t.certificate;"string"==typeof o&&(o=n.pki.certificateFromPem(o)),r=o.issuer.attributes,i=o.serialNumber}var s=t.key;if(!s)throw new Error("Could not add PKCS#7 signer; no private key specified.");"string"==typeof s&&(s=n.pki.privateKeyFromPem(s));var a=t.digestAlgorithm||n.pki.oids.sha1;switch(a){case n.pki.oids.sha1:case n.pki.oids.sha256:case n.pki.oids.sha384:case n.pki.oids.sha512:case n.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+a)}var u=t.authenticatedAttributes||[];if(u.length>0){for(var c=!1,f=!1,l=0;l0&&(t+=o(n)),t+=o(r)}},function(e,t,r){"use strict";var n=r(99),i=r(317),o=r(318);e.exports=function(e){for(var t,r=0,s="";!t;)s+=o(i,n.get(),1),t=e2&&(o=[o[0],e.apply(void 0,n(o.slice(1)))]);var a=o[0]||i;if("function"!=typeof a)throw new TypeError("Pre function must be a function");var u=o[1];if("function"!=typeof u)throw new TypeError("Function to call must be a function");return function(){for(var e=arguments.length,t=Array(e),r=0;r2&&(o=[e.apply(void 0,n(o.slice(0,-1))),o[o.length-1]]);var a=o[0];if("function"!=typeof a)throw new TypeError("Function to call must be a function");var u=o[1]||i;if("function"!=typeof u)throw new TypeError("Post function must be a function");return function(){var e=a.apply(void 0,arguments);return e&&"function"==typeof e.then?e.then(u):u(e)}};var i=function(e){return e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{ledger:(0,n.expose)("ipfs.bitswap.ledger",function(){var t;return(t=e().bitswap).ledger.apply(t,arguments)},t),reprovide:(0,n.expose)("ipfs.bitswap.reprovide",function(){var t;return(t=e().bitswap).reprovide.apply(t,arguments)},t),stat:(0,n.expose)("ipfs.bitswap.stat",(0,i.post)(function(){var t;return(t=e().bitswap).stat.apply(t,arguments)},function(e){return e&&((0,o.isBig)(e.blocksReceived)&&(e.blocksReceived=(0,o.bigToJson)(e.blocksReceived)),(0,o.isBig)(e.dataReceived)&&(e.dataReceived=(0,o.bigToJson)(e.dataReceived)),(0,o.isBig)(e.blocksSent)&&(e.blocksSent=(0,o.bigToJson)(e.blocksSent)),(0,o.isBig)(e.dataSent)&&(e.dataSent=(0,o.bigToJson)(e.dataSent)),(0,o.isBig)(e.dupBlksReceived)&&(e.dupBlksReceived=(0,o.bigToJson)(e.dupBlksReceived)),(0,o.isBig)(e.dupDataReceived)&&(e.dupDataReceived=(0,o.bigToJson)(e.dupDataReceived))),e}),t),unwant:(0,n.expose)("ipfs.bitswap.unwant",function(){var t;return(t=e().bitswap).unwant.apply(t,arguments)},t),wantlist:(0,n.expose)("ipfs.bitswap.wantlist",function(){var t;return(t=e().bitswap).wantlist.apply(t,arguments)},t)}};var n=r(1),i=r(2),o=r(71)},function(e,t,r){var n;!function(i){"use strict";var o,s=20,a=1,u=1e6,c=-7,f=21,l="[big.js] ",h=l+"Invalid ",p=h+"decimal places",d=h+"rounding mode",y={},g=void 0,m=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function v(e,t,r,n){var i=e.c,o=e.e+t+1;if(o=5;else if(2===r)n=i[o]>5||5==i[o]&&(n||o<0||i[o+1]!==g||1&i[o-1]);else if(3===r)n=n||!!i[0];else if(n=!1,0!==r)throw Error(d);if(o<1)i.length=1,n?(e.e=-t,i[0]=1):i[0]=e.e=0;else{if(i.length=o--,n)for(;++i[o]>9;)i[o]=0,o--||(++e.e,i.unshift(1));for(o=i.length;!i[--o];)i.pop()}}else if(r<0||r>3||r!==~~r)throw Error(d);return e}function b(e,t,r,n){var i,o,s=e.constructor,a=!e.c[0];if(r!==g){if(r!==~~r||r<(3==t)||r>u)throw Error(3==t?h+"precision":p);for(r=n-(e=new s(e)).e,e.c.length>++n&&v(e,r,s.RM),2==t&&(n=e.e+r+1);e.c.length=s.PE))o=o.charAt(0)+(r>1?"."+o.slice(1):"")+(i<0?"e":"e+")+i;else if(i<0){for(;++i;)o="0"+o;o="0."+o}else if(i>0)if(++i>r)for(i-=r;i--;)o+="0";else i1&&(o=o.charAt(0)+"."+o.slice(1));return e.s<0&&(!a||4==t)?"-"+o:o}y.abs=function(){var e=new this.constructor(this);return e.s=1,e},y.cmp=function(e){var t,r=this,n=r.c,i=(e=new r.constructor(e)).c,o=r.s,s=e.s,a=r.e,u=e.e;if(!n[0]||!i[0])return n[0]?o:i[0]?-s:0;if(o!=s)return o;if(t=o<0,a!=u)return a>u^t?1:-1;for(s=(a=n.length)<(u=i.length)?a:u,o=-1;++oi[o]^t?1:-1;return a==u?0:a>u^t?1:-1},y.div=function(e){var t=this,r=t.constructor,n=t.c,i=(e=new r(e)).c,o=t.s==e.s?1:-1,s=r.DP;if(s!==~~s||s<0||s>u)throw Error(p);if(!i[0])throw Error("[big.js] Division by zero");if(!n[0])return new r(0*o);var a,c,f,l,h,d=i.slice(),y=a=i.length,m=n.length,b=n.slice(0,a),_=b.length,E=e,S=E.c=[],w=0,k=s+(E.e=t.e-e.e)+1;for(E.s=o,o=k<0?0:k,d.unshift(0);_++_?1:-1;else for(h=-1,l=0;++hb[h]?1:-1;break}if(!(l<0))break;for(c=_==a?i:d;_;){if(b[--_]k&&v(E,s,r.RM,b[0]!==g),E},y.eq=function(e){return!this.cmp(e)},y.gt=function(e){return this.cmp(e)>0},y.gte=function(e){return this.cmp(e)>-1},y.lt=function(e){return this.cmp(e)<0},y.lte=function(e){return this.cmp(e)<1},y.minus=y.sub=function(e){var t,r,n,i,o=this,s=o.constructor,a=o.s,u=(e=new s(e)).s;if(a!=u)return e.s=-u,o.plus(e);var c=o.c.slice(),f=o.e,l=e.c,h=e.e;if(!c[0]||!l[0])return l[0]?(e.s=-u,e):new s(c[0]?o:0);if(a=f-h){for((i=a<0)?(a=-a,n=c):(h=f,n=l),n.reverse(),u=a;u--;)n.push(0);n.reverse()}else for(r=((i=c.length0)for(;u--;)c[t++]=0;for(u=t;r>a;){if(c[--r]0?(u=s,t=c):(i=-i,t=a),t.reverse();i--;)t.push(0);t.reverse()}for(a.length-c.length<0&&(t=c,c=a,a=t),i=c.length,o=0;i;a[i]%=10)o=(a[--i]=a[i]+c[i]+o)/10|0;for(o&&(a.unshift(o),++u),i=a.length;0===a[--i];)a.pop();return e.c=a,e.e=u,e},y.pow=function(e){var t=this,r=new t.constructor(1),n=r,i=e<0;if(e!==~~e||e<-1e6||e>1e6)throw Error(h+"exponent");for(i&&(e=-e);1&e&&(n=n.times(t)),e>>=1;)t=t.times(t);return i?r.div(n):n},y.round=function(e,t){var r=this.constructor;if(e===g)e=0;else if(e!==~~e||e<-u||e>u)throw Error(p);return v(new r(this),e,t===g?r.RM:t)},y.sqrt=function(){var e,t,r,n=this,i=n.constructor,o=n.s,s=n.e,a=new i(.5);if(!n.c[0])return new i(n);if(o<0)throw Error(l+"No square root");0===(o=Math.sqrt(n+""))||o===1/0?((t=n.c.join("")).length+s&1||(t+="0"),s=((s+1)/2|0)-(s<0||1&s),e=new i(((o=Math.sqrt(t))==1/0?"1e":(o=o.toExponential()).slice(0,o.indexOf("e")+1))+s)):e=new i(o),s=e.e+(i.DP+=4);do{r=e,e=a.times(r.plus(n.div(r)))}while(r.c.slice(0,s).join("")!==e.c.slice(0,s).join(""));return v(e,i.DP-=4,i.RM)},y.times=y.mul=function(e){var t,r=this,n=r.constructor,i=r.c,o=(e=new n(e)).c,s=i.length,a=o.length,u=r.e,c=e.e;if(e.s=r.s==e.s?1:-1,!i[0]||!o[0])return new n(0*e.s);for(e.e=u+c,su;)a=t[c]+o[u]*i[c-u-1]+a,t[c--]=a%10,a=a/10|0;t[c]=(t[c]+a)%10}for(a?++e.e:t.shift(),u=t.length;!t[--u];)t.pop();return e.c=t,e},y.toExponential=function(e){return b(this,1,e,e)},y.toFixed=function(e){return b(this,2,e,this.e+e)},y.toPrecision=function(e){return b(this,3,e,e-1)},y.toString=function(){return b(this)},y.valueOf=y.toJSON=function(){return b(this,4)},(o=function e(){function t(r){var n=this;if(!(n instanceof t))return r===g?e():new t(r);r instanceof t?(n.s=r.s,n.e=r.e,n.c=r.c.slice()):function(e,t){var r,n,i;if(0===t&&1/t<0)t="-0";else if(!m.test(t+=""))throw Error(h+"number");for(e.s="-"==t.charAt(0)?(t=t.slice(1),-1):1,(r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),i=t.length,n=0;n0&&"0"==t.charAt(--i););for(e.e=r-n-1,e.c=[],r=0;n<=i;)e.c[r++]=+t.charAt(n++)}}(n,r),n.constructor=t}return t.prototype=y,t.DP=s,t.RM=a,t.NE=c,t.PE=f,t.version="5.2.2",t}()).default=o.Big=o,void 0===(n=function(){return o}.call(t,r,t,e))||(e.exports=n)}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{put:(0,n.expose)("ipfs.block.put",(0,i.pre)((0,a.preBufferFromJson)(0),(0,o.preBlockFromJson)(0),function(){for(var e=arguments.length,t=Array(e),r=0;r0?n-4:n,l=0;l>16&255,a[u++]=t>>8&255,a[u++]=255&t;2===s&&(t=i[e.charCodeAt(l)]<<2|i[e.charCodeAt(l+1)]>>4,a[u++]=255&t);1===s&&(t=i[e.charCodeAt(l)]<<10|i[e.charCodeAt(l+1)]<<4|i[e.charCodeAt(l+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,o=[],s=0,a=r-i;sa?a:s+16383));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.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,o,s=[],a=t;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,f=-7,l=r?i-1:0,h=r?-1:1,p=e[t+l];for(l+=h,o=p&(1<<-f)-1,p>>=-f,f+=a;f>0;o=256*o+e[t+l],l+=h,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+e[t+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,f=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(s++,u/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(t*u-1)*Math.pow(2,i),s+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;e[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;e[r+p]=255&s,p+=d,s/=256,c-=8);e[r+p-d]|=128*y}},function(e,t,r){"use strict";t.names=Object.freeze({id: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({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",46000:"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,46000: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){e.exports=function e(t,o,s){o=o||[];s=s||0;var a=s;for(;t>=i;)o[s++]=255&t|r,t/=128;for(;t&n;)o[s++]=255&t|r,t>>>=7;o[s]=0|t;e.bytes=s-a+1;return o};var r=128,n=-128,i=Math.pow(2,31)},function(e,t){e.exports=function e(t,i){var o,s=0,i=i||0,a=0,u=i,c=t.length;do{if(u>=c)throw e.bytes=0,new RangeError("Could not decode varint");o=t[u++],s+=a<28?(o&n)<=r);e.bytes=u-i;return s};var r=128,n=127},function(e,t){var r=Math.pow(2,7),n=Math.pow(2,14),i=Math.pow(2,21),o=Math.pow(2,28),s=Math.pow(2,35),a=Math.pow(2,42),u=Math.pow(2,49),c=Math.pow(2,56),f=Math.pow(2,63);e.exports=function(e){return e(e[t[0]]=new n(t[0],t[1],t[2],t[3]),e),{}),f=u.reduce((e,t)=>(e[t[1]]=c[t[0]],e),{});e.exports={names:c,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 o=0,s=0,a="";for(let e=0;e=5;)a+=t[s>>>o-5&31],o-=5;if(o>0&&(a+=t[s<<5-o&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,o=0,s=new Uint8Array(5*r/8|0);for(let a=0;a=8&&(s[o++]=i>>>n-8&255,n-=8);return s.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 o=i.indexOf("=");return o>0&&!r&&(i=i.substring(0,o)),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";const n=r(42),i=r(174).varintBufferEncode,o={};e.exports=o;for(let e in n){let t=n[e];o[e]=i(t)}},function(e,t,r){"use strict";e.exports=Object.freeze({RAW:85,CBOR:81,PROTOBUF:80,RLP:96,BENCODE:99,MULTICODEC:48,MULTIHASH:49,MULTIADDR:50,MULTIBASE:51,IDENTITY:0,MD4:212,MD5:213,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,X11:4352,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,IP4:4,IP6:41,IP6ZONE:42,TCP:6,UDP:273,DCCP:33,SCTP:132,UDT:301,UTP:302,P2P:421,IPFS:421,HTTP:480,HTTPS:443,QUIC:460,WS:477,WSS:478,ONION:444,ONION3:445,GARLIC64:446,P2P_CIRCUIT:290,DNS:53,DNS4:54,DNS6:55,DNSADDR:56,P2P_WEBSOCKET_STAR:479,P2P_STARDUST:277,P2P_WEBRTC_STAR:275,P2P_WEBRTC_DIRECT:276,UNIX:400,DAG_PB:112,DAG_CBOR:113,DAG_JSON:297,GIT_RAW:120,ETH_BLOCK:144,ETH_BLOCK_LIST:145,ETH_TX_TRIE:146,ETH_TX:147,ETH_TX_RECEIPT_TRIE:148,ETH_TX_RECEIPT:149,ETH_STATE_TRIE:150,ETH_ACCOUNT_SNAPSHOT:151,ETH_STORAGE_TRIE:152,BITCOIN_BLOCK:176,BITCOIN_TX:177,ZCASH_BLOCK:192,ZCASH_TX:193,STELLAR_BLOCK:208,STELLAR_TX:209,DECRED_BLOCK:224,DECRED_TX:225,DASH_BLOCK:240,DASH_TX:241,LEOFCOIN_BLOCK:129,LEOFCOIN_TX:130,LEOFCOIN_PR:131,TORRENT_INFO:123,TORRENT_FILE:124,ED25519_PUB:237,IPLD_NS:226,IPFS_NS:227,SWARM_NS:228})},function(e,t,r){"use strict";e.exports=Object.freeze({85:"raw",81:"cbor",80:"protobuf",96:"rlp",99:"bencode",48:"multicodec",49:"multihash",50:"multiaddr",51:"multibase",0:"identity",212:"md4",213:"md5",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",4352:"x11",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",46000:"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",4:"ip4",41:"ip6",42:"ip6zone",6:"tcp",273:"udp",33:"dccp",132:"sctp",301:"udt",302:"utp",421:"p2p",480:"http",443:"https",460:"quic",477:"ws",478:"wss",444:"onion",445:"onion3",446:"garlic64",290:"p2p-circuit",53:"dns",54:"dns4",55:"dns6",56:"dnsaddr",479:"p2p-websocket-star",277:"p2p-stardust",275:"p2p-webrtc-star",276:"p2p-webrtc-direct",400:"unix",112:"dag-pb",113:"dag-cbor",297:"dag-json",120:"git-raw",144:"eth-block",145:"eth-block-list",146:"eth-tx-trie",147:"eth-tx",148:"eth-tx-receipt-trie",149:"eth-tx-receipt",150:"eth-state-trie",151:"eth-account-snapshot",152:"eth-storage-trie",176:"bitcoin-block",177:"bitcoin-tx",192:"zcash-block",193:"zcash-tx",208:"stellar-block",209:"stellar-tx",224:"decred-block",225:"decred-tx",240:"dash-block",241:"dash-tx",129:"leofcoin-block",130:"leofcoin-tx",131:"leofcoin-pr",123:"torrent-info",124:"torrent-file",237:"ed25519-pub",226:"ipld-ns",227:"ipfs-ns",228:"swarm-ns"})},function(e,t,r){"use strict";(function(t){const n=r(13);var i={checkCIDComponents:function(e){if(null==e)return"null values are not valid CIDs";if(0!==e.version&&1!==e.version)return"Invalid version, must be a number equal to 1 or 0";if("string"!=typeof e.codec)return"codec must be string";if(!t.isBuffer(e.multihash))return"multihash must be a Buffer";try{n.validate(e.multihash)}catch(e){let t=e.message;return t||(t="Multihash validation failed"),t}}};e.exports=i}).call(this,r(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{add:(0,n.expose)("ipfs.bootstrap.add",(0,i.pre)(t.pre("bootstrap.add"),(0,i.post)(function(){var t;return(t=e().bootstrap).add.apply(t,arguments)},(0,o.postArrayOf)("Peers",s.isMultiaddr,s.multiaddrToJson))),t),list:(0,n.expose)("ipfs.bootstrap.list",(0,i.pre)(t.pre("bootstrap.list"),(0,i.post)(function(){var t;return(t=e().bootstrap).list.apply(t,arguments)},(0,o.postArrayOf)("Peers",s.isMultiaddr,s.multiaddrToJson))),t),rm:(0,n.expose)("ipfs.bootstrap.rm",(0,i.pre)(t.pre("bootstrap.rm"),(0,i.post)(function(){var t;return(t=e().bootstrap).rm.apply(t,arguments)},(0,o.postArrayOf)("Peers",s.isMultiaddr,s.multiaddrToJson))),t)}};var n=r(1),i=r(2),o=r(100),s=r(84)},function(e,t,r){"use strict";(function(t){const n=r(73),i=r(66),o=r(345),s=r(127),a=r(18),u=r(27),c=r(19),f=new Error("Sorry, Not Implemented Yet."),l=c.proto(function(e){if(!(this instanceof l))return new l(e);if(null==e&&(e=""),e instanceof t)this.buffer=o.fromBuffer(e);else if("string"==typeof e||e instanceof String){if(e.length>0&&"/"!==e.charAt(0))throw new Error(`multiaddr "${e}" must start with a "/"`);this.buffer=o.fromString(e)}else{if(!(e.buffer&&e.protos&&e.protoCodes))throw new Error("addr must be a string, Buffer, or another Multiaddr");this.buffer=o.fromBuffer(e.buffer)}},{className:"Multiaddr",symbolName:"@multiformats/js-multiaddr/multiaddr"});l.prototype.toString=function(){return o.bufferToString(this.buffer)},l.prototype.toOptions=function(){const e={},t=this.toString().split("/");return e.family="ip4"===t[1]?"ipv4":"ipv6",e.host=t[2],e.transport=t[3],e.port=t[4],e},l.prototype.inspect=function(){return""},l.prototype.protos=function(){return n(this.protoCodes(),function(e){return i(s(e))})},l.prototype.protoCodes=function(){const e=[],t=this.buffer;let r=0;for(;r{if(e[0]===s.names.ipfs.code)return!0})[0][1],u.decode(e)}catch(t){e=null}return e},l.prototype.equals=function(e){return this.buffer.equals(e.buffer)},l.prototype.nodeAddress=function(){const e=this.protoCodes(),t=this.protoNames(),r=this.toString().split("/").slice(1);if(r.length<4)throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6}/{address}/{tcp, udp}/{port}".');if(4!==e[0]&&41!==e[0]&&54!==e[0]&&55!==e[0])throw new Error(`no protocol with name: "'${t[0]}'". Must have a valid family name: "{ip4, ip6, dns4, dns6}".`);if("tcp"!==r[2]&&"udp"!==r[2])throw new Error(`no protocol with name: "'${t[1]}'". Must have a valid transport protocol: "{tcp, udp}".`);return{family:41===e[0]||55===e[0]?6:4,address:r[1],port:r[3]}},l.fromNodeAddress=function(e,t){if(!e)throw new Error("requires node address object");if(!t)throw new Error("requires transport protocol");const r="IPv6"===e.family?"ip6":"ip4";return l("/"+[r,e.address,t,e.port].join("/"))},l.prototype.isThinWaistAddress=function(e){const t=(e||this).protos();return 2===t.length&&((4===t[0].code||41===t[0].code)&&(6===t[1].code||17===t[1].code))},l.prototype.fromStupidString=function(e){throw f},l.protocols=s,l.isName=function(e){return!!l.isMultiaddr(e)&&e.protos().some(e=>e.resolvable)},l.resolve=function(e,t){return l.isMultiaddr(e)&&l.isName(e)?t(new Error("not implemented yet")):t(new Error("not a valid name"))},e.exports=l}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(73),i=r(175),o=r(346),s=r(127),a=r(18);function u(e){const t=[],r=e.split("/").slice(1);if(1===r.length&&""===r[0])return[];for(let n=0;n=r.length)throw b("invalid address: "+e);t.push([i,r[n]])}else t.push([i])}return t}function c(e){const t=[];return n(e,function(e){const r=_(e);t.push(r.name),e.length>1&&t.push(e[1])}),"/"+t.join("/")}function f(e){return n(e,function(e){Array.isArray(e)||(e=[e]);const t=_(e);return e.length>1?[t.code,o.toBuffer(t.code,e[1])]:[t.code]})}function l(e){return n(e,function(e){const t=_(e);return e.length>1?[t.code,o.toString(t.code,e[1])]:[t.code]})}function h(e){return g(t.concat(n(e,function(e){const r=_(e);let n=t.from(a.encode(r.code));return e.length>1&&(n=t.concat([n,e[1]])),n})))}function p(e,t){if(e.size>0)return e.size/8;if(0===e.size)return 0;return a.decode(t)+a.decode.bytes}function d(e){const t=[];let r=0;for(;re.length)throw b("Invalid address buffer: "+e.toString("hex"));t.push([n,u])}return t}function y(e){return h(f(u(e=v(e))))}function g(e){const r=m(e);if(r)throw r;return t.from(e)}function m(e){try{d(e)}catch(e){return e}}function v(e){return"/"+i(e.trim().split("/")).join("/")}function b(e){return new Error("Error parsing address: "+e)}function _(e){return s(e[0])}e.exports={stringToStringTuples:u,stringTuplesToString:c,tuplesToStringTuples:l,stringTuplesToTuples:f,bufferToTuples:d,tuplesToBuffer:h,bufferToString:function(e){return c(l(d(e)))},stringToBuffer:y,fromString:function(e){return y(e)},fromBuffer:g,validateBuffer:m,isValidBuffer:function(e){return void 0===m(e)},cleanPath:v,ParseError:b,protoFromTuple:_,sizeForAddr:p}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(153),i=r(176),o=r(127),s=r(27),a=r(18);function u(e,r){return r instanceof t?u.toString(e,r):u.toBuffer(e,r)}function c(e){if(!e.isValid())throw new Error("invalid ip address");return n.toBuffer(e.address)}e.exports=u,u.toString=function(e,t){switch((e=o(e)).code){case 4:case 41:return n.toString(t);case 6:case 17:case 33:case 132:return function(e){return e.readUInt16BE(0)}(t);case 54:case 55:case 56:return function(e){const t=a.decode(e);if((e=e.slice(a.decode.bytes)).length!==t)throw new Error("inconsistent lengths");return e.toString()}(t);case 421:return function(e){const t=a.decode(e),r=e.slice(a.decode.bytes);if(r.length!==t)throw new Error("inconsistent lengths");return s.encode(r)}(t);default:return t.toString("hex")}},u.toBuffer=function(e,r){switch((e=o(e)).code){case 4:return c(new i.Address4(r));case 41:return c(new i.Address6(r));case 6:case 17:case 33:case 132:return function(e){const r=t.alloc(2);return r.writeUInt16BE(e,0),r}(parseInt(r,10));case 54:case 55:case 56:return function(e){const r=t.from(e),n=t.from(a.encode(r.length));return t.concat([n,r])}(r);case 421:return function(e){const r=t.from(s.decode(e)),n=t.from(a.encode(r.length));return t.concat([n,r])}(r);default:return t.from(r,"hex")}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";var n=r(178).BigInteger,i=r(348),o=r(349),s=r(350),a=r(180),u=r(181),c=r(85).sprintf,f=r(125),l=r(126),h=r(177);function p(e){return e=(e=e.replace(/^(0{1,})([1-9]+)$/,'$1$2')).replace(/^(0{1,})(0)$/,'$1$2')}function d(e,t){this.groups=void 0===t?l.GROUPS:t,this.v4=!1,this.subnet="/128",this.subnetMask=128,this.zone="",this.address=e;var r=l.RE_SUBNET_STRING.exec(e);if(r){if(this.parsedSubnet=r[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet="/"+this.subnetMask,isNaN(this.subnetMask)||this.subnetMask<0||this.subnetMask>l.BITS)return this.valid=!1,void(this.error="Invalid subnet mask.");e=e.replace(l.RE_SUBNET_STRING,"")}else if(/\//.test(e))return this.valid=!1,void(this.error="Invalid subnet mask.");var n=l.RE_ZONE_STRING.exec(e);n&&(this.zone=n[0],e=e.replace(l.RE_ZONE_STRING,"")),this.addressMinusSuffix=e,this.parsedAddress=this.parse(this.addressMinusSuffix)}function y(e){return c("%04x",parseInt(e,16))}function g(e){return 255&e}s(d.prototype,r(351)),s(d.prototype,r(352)),s(d.prototype,r(353)),d.fromBigInteger=function(e){var t,r=a(e.toString(16),32,"0"),n=[];for(t=0;t65536)&&(r=null):r=null,{address:new d(t),port:r}},d.fromAddress4=function(e){e=new h(e);var t=l.BITS-(f.BITS-e.subnetMask);return new d("::ffff:"+e.correctForm()+"/"+t)},d.fromArpa=function(e){var t=e.replace(/(\.ip6\.arpa)?\.$/,"");if(63!==t.length)return t={error:"Not Valid 'ip6.arpa' form",address:null};t=t.split(".").reverse();for(var r=7;r>0;r--){var n=4*r;t.splice(n,0,":")}return new d(t=t.join(""))},d.prototype.microsoftTranscription=function(){return c("%s.ipv6-literal.net",this.correctForm().replace(/:/g,"-"))},d.prototype.mask=function(e){return void 0===e&&(e=this.subnetMask),this.getBitsBase2(0,e)},d.prototype.possibleSubnets=function(e){void 0===e&&(e=128);var t=l.BITS-this.subnetMask-Math.abs(e-l.BITS);return t<0?"0":function(e){for(var t=/(\d+)(\d{3})/;t.test(e);)e=e.replace(t,"$1,$2");return e}(new n("2",10).pow(t).toString(10))},d.prototype._startAddress=function(){return new n(this.mask()+u(0,l.BITS-this.subnetMask),2)},d.prototype.startAddress=function(){return d.fromBigInteger(this._startAddress())},d.prototype.startAddressExclusive=function(){var e=new n("1");return d.fromBigInteger(this._startAddress().add(e))},d.prototype._endAddress=function(){return new n(this.mask()+u(1,l.BITS-this.subnetMask),2)},d.prototype.endAddress=function(){return d.fromBigInteger(this._endAddress())},d.prototype.endAddressExclusive=function(){var e=new n("1");return d.fromBigInteger(this._endAddress().subtract(e))},d.prototype.getScope=function(){var e=l.SCOPES[this.getBits(12,16)];return"Global unicast"===this.getType()&&"Link local"!==e&&(e="Global"),e},d.prototype.getType=function(){var e=this;return i(l.TYPES,function(t,r){return e.isInSubnet(new d(r))})||"Global unicast"},d.prototype.getBits=function(e,t){return new n(this.getBitsBase2(e,t),2)},d.prototype.getBitsBase2=function(e,t){return this.binaryZeroPad().slice(e,t)},d.prototype.getBitsBase16=function(e,t){var r=t-e;return r%4!=0?null:a(this.getBits(e,t).toString(16),r/4,"0")},d.prototype.getBitsPastSubnet=function(){return this.getBitsBase2(this.subnetMask,l.BITS)},d.prototype.reverseForm=function(e){e||(e={});var t=Math.floor(this.subnetMask/4),r=this.canonicalForm().replace(/:/g,"").split("").slice(0,t).reverse().join(".");return t>0?e.omitSuffix?r:c("%s.ip6.arpa.",r):e.omitSuffix?"":"ip6.arpa."},d.prototype.correctForm=function(){if(!this.parsedAddress)return null;var e,t=[],r=0,n=[];for(e=0;e0&&(r>1&&n.push([e-r,e-1]),r=0)}r>1&&n.push([this.parsedAddress.length-r,this.parsedAddress.length-1]);var s=n.map(function(e){return e[1]-e[0]+1});if(n.length>0){var a=s.indexOf(o(s));t=function(e,t){var r,n=[],i=[];for(r=0;rt[1]&&i.push(e[r]);return n.concat(["compact"]).concat(i)}(this.parsedAddress,n[a])}else t=this.parsedAddress;for(e=0;e1?"s":"",t.join("")),this.parseError=e.replace(l.RE_BAD_CHARACTERS,'$1'),null;var r=e.match(l.RE_BAD_ADDRESS);if(r)return this.valid=!1,this.error=c("Address failed regex: %s",r.join("")),this.parseError=e.replace(l.RE_BAD_ADDRESS,'$1'),null;var n=[],i=e.split("::");if(2===i.length){var o=i[0].split(":"),s=i[1].split(":");1===o.length&&""===o[0]&&(o=[]),1===s.length&&""===s[0]&&(s=[]);var a=this.groups-(o.length+s.length);if(!a)return this.valid=!1,this.error="Error parsing groups",null;this.elidedGroups=a,this.elisionBegin=o.length,this.elisionEnd=o.length+this.elidedGroups,o.forEach(function(e){n.push(e)});for(var u=0;u=0;o--)r=r.add(i.multiply(new n(e[o].toString(10),10))),i=i.multiply(t);return d.fromBigInteger(r)},e.exports=d},function(e,t,r){(function(e,r){var n=200,i="Expected a function",o="__lodash_hash_undefined__",s=1,a=2,u=1/0,c=9007199254740991,f=1.7976931348623157e308,l=NaN,h="[object Arguments]",p="[object Array]",d="[object Boolean]",y="[object Date]",g="[object Error]",m="[object Function]",v="[object GeneratorFunction]",b="[object Map]",_="[object Number]",E="[object Object]",S="[object RegExp]",w="[object Set]",k="[object String]",A="[object Symbol]",C="[object ArrayBuffer]",B="[object DataView]",T=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,I=/^\w*$/,x=/^\./,M=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,N=/^\s+|\s+$/g,L=/\\(\\)?/g,R=/^[-+]0x[0-9a-f]+$/i,P=/^0b[01]+$/i,K=/^\[object .+?Constructor\]$/,O=/^0o[0-7]+$/i,D=/^(?:0|[1-9]\d*)$/,U={};U["[object Float32Array]"]=U["[object Float64Array]"]=U["[object Int8Array]"]=U["[object Int16Array]"]=U["[object Int32Array]"]=U["[object Uint8Array]"]=U["[object Uint8ClampedArray]"]=U["[object Uint16Array]"]=U["[object Uint32Array]"]=!0,U[h]=U[p]=U[C]=U[d]=U[B]=U[y]=U[g]=U[m]=U[b]=U[_]=U[E]=U[S]=U[w]=U[k]=U["[object WeakMap]"]=!1;var j=parseInt,F="object"==typeof e&&e&&e.Object===Object&&e,V="object"==typeof self&&self&&self.Object===Object&&self,q=F||V||Function("return this")(),J=t&&!t.nodeType&&t,H=J&&"object"==typeof r&&r&&!r.nodeType&&r,z=H&&H.exports===J&&F.process,G=function(){try{return z&&z.binding("util")}catch(e){}}(),Y=G&&G.isTypedArray;function W(e,t){for(var r=-1,n=e?e.length:0;++rc))return!1;var l=o.get(e);if(l&&o.get(t))return l==t;var h=-1,p=!0,d=i&s?new Re:void 0;for(o.set(e,t),o.set(t,e);++h-1},Ne.prototype.set=function(e,t){var r=this.__data__,n=Oe(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},Le.prototype.clear=function(){this.__data__={hash:new Me,map:new(ve||Ne),string:new Me}},Le.prototype.delete=function(e){return ze(this,e).delete(e)},Le.prototype.get=function(e){return ze(this,e).get(e)},Le.prototype.has=function(e){return ze(this,e).has(e)},Le.prototype.set=function(e,t){return ze(this,e).set(e,t),this},Re.prototype.add=Re.prototype.push=function(e){return this.__data__.set(e,o),this},Re.prototype.has=function(e){return this.__data__.has(e)},Pe.prototype.clear=function(){this.__data__=new Ne},Pe.prototype.delete=function(e){return this.__data__.delete(e)},Pe.prototype.get=function(e){return this.__data__.get(e)},Pe.prototype.has=function(e){return this.__data__.has(e)},Pe.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Ne){var i=r.__data__;if(!ve||i.length-1&&e%1==0&&e-1?n[i?e[o]:o]:void 0});function it(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(i);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s),s};return r.cache=new(it.Cache||Le),r}function ot(e,t){return e===t||e!=e&&t!=t}function st(e){return function(e){return ht(e)&&ut(e)}(e)&&ue.call(e,"callee")&&(!pe.call(e,"callee")||ce.call(e)==h)}it.Cache=Le;var at=Array.isArray;function ut(e){return null!=e&&ft(e.length)&&!ct(e)}function ct(e){var t=lt(e)?ce.call(e):"";return t==m||t==v}function ft(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=c}function lt(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ht(e){return!!e&&"object"==typeof e}function pt(e){return"symbol"==typeof e||ht(e)&&ce.call(e)==A}var dt=Y?function(e){return function(t){return e(t)}}(Y):function(e){return ht(e)&&ft(e.length)&&!!U[ce.call(e)]};function yt(e){return ut(e)?Ke(e):qe(e)}function gt(e){return e}r.exports=nt}).call(this,r(12),r(50)(e))},function(e,t){var r="[object Symbol]",n=Object.prototype.toString;function i(e,t){return e>t}function o(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&n.call(e)==r}function s(e){return e}e.exports=function(e){return e&&e.length?function(e,t,r){for(var n=-1,i=e.length;++n-1},oe.prototype.set=function(e,t){var r=this.__data__,n=le(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},se.prototype.clear=function(){this.size=0,this.__data__={hash:new ie,map:new(te||oe),string:new ie}},se.prototype.delete=function(e){var t=Ee(this,e).delete(e);return this.size-=t?1:0,t},se.prototype.get=function(e){return Ee(this,e).get(e)},se.prototype.has=function(e){return Ee(this,e).has(e)},se.prototype.set=function(e,t){var r=Ee(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},ae.prototype.clear=function(){this.__data__=new oe,this.size=0},ae.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},ae.prototype.get=function(e){return this.__data__.get(e)},ae.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.set=function(e,t){var r=this.__data__;if(r instanceof oe){var i=r.__data__;if(!te||i.length-1&&e%1==0&&e0){if(++t>=o)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Q?function(e,t){return Q(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:Ue);function Ce(e,t){return e===t||e!=e&&t!=t}var Be=ge(function(){return arguments}())?ge:function(e){return Re(e)&&O.call(e,"callee")&&!Y.call(e,"callee")},Te=Array.isArray;function Ie(e){return null!=e&&Ne(e.length)&&!Me(e)}var xe=Z||function(){return!1};function Me(e){if(!Le(e))return!1;var t=ye(e);return t==f||t==l||t==c||t==d}function Ne(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Le(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Re(e){return null!=e&&"object"==typeof e}var Pe=B?function(e){return function(t){return e(t)}}(B):function(e){return Re(e)&&Ne(e.length)&&!!v[ye(e)]};function Ke(e){return Ie(e)?ue(e,!0):ve(e)}var Oe,De=(Oe=function(e,t,r){be(e,t,r)},_e(function(e,t){var r=-1,n=t.length,i=n>1?t[n-1]:void 0,o=n>2?t[2]:void 0;for(i=Oe.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(e,t,r){if(!Le(r))return!1;var n=typeof t;return!!("number"==n?Ie(r)&&we(t,r.length):"string"==n&&t in r)&&Ce(r[t],e)}(t[0],t[1],o)&&(i=n<3?void 0:i,n=1),e=Object(e);++r%2$s',e.prefix,t.call(this),e.className):o('%2$s',e.prefix,t.call(this))},t.group=function(){var e,t=this.address.match(n.RE_ADDRESS);if(t){var r=t[0].split(".");this.address=this.address.replace(n.RE_ADDRESS,o('%s.%s',r.slice(0,2).join("."),r.slice(2,4).join(".")))}if(0===this.elidedGroups)return i.simpleGroup(this.address);var s=[],a=this.address.split("::");a[0].length?s.push(i.simpleGroup(a[0])):s.push("");var u=["hover-group"];for(e=this.elisionBegin;e',u.join(" "))),a[1].length?s.push(i.simpleGroup(a[1],this.elisionEnd)):s.push(""),s.join(":")}},function(e,t,r){"use strict";var n=r(85).sprintf,i=r(126);function o(e){return n("(%s)",e.join("|"))}function s(e){return e.length<4?n("0{0,%d}%s",4-e.length,e):e}function a(e){var t=[];e.forEach(function(e,r){0===parseInt(e,16)&&t.push(r)});var r=t.map(function(t){return e.map(function(e,r){if(r===t){var n=0===r||r===i.GROUPS-1?":":"";return o([s(e),n])}return s(e)}).join(":")});return r.push(e.map(s).join(":")),o(r)}function u(e,t,r){var i=t?"":":",s=r?"":":",a=[];t||r||a.push("::"),t&&r&&a.push(""),(r&&!t||!r&&t)&&a.push(":"),a.push(n("%s(:0{1,4}){1,%d}",i,e-1)),a.push(n("(0{1,4}:){1,%d}%s",e-1,s)),a.push(n("(0{1,4}:){%d}0{1,4}",e-1));for(var u=1;u{s.sha2256(e,(e,n)=>{e&&r(e),s.sha2256(t.from(n),r)})}}}).call(this,r(0).Buffer)},function(e,t,r){(function(n,i){var o; /** - * @file Web Cryptography API shim - * @author Artem S Vybornov + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.8.0 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2018 * @license MIT */ -t.exports=function(t){"use strict";if("function"!=typeof Promise)throw"Promise support required";var e=t.crypto||t.msCrypto;if(e){var r=e.subtle||e.webkitSubtle;if(r){var n=t.Crypto||e.constructor||Object,i=t.SubtleCrypto||r.constructor||Object,o=(t.CryptoKey||t.Key||Object,t.navigator.userAgent.indexOf("Edge/")>-1),s=!!t.msCrypto&&!o,a=!e.subtle&&!!e.webkitSubtle;if(s||a){var u={KoZIhvcNAQEB:"1.2.840.113549.1.1.1"},c={"1.2.840.113549.1.1.1":"KoZIhvcNAQEB"};if(["generateKey","importKey","unwrapKey"].forEach(function(t){var n=r[t];r[t]=function(i,o,u){var c,f,b,E,k,C=[].slice.call(arguments);switch(t){case"generateKey":c=y(i),f=o,b=u;break;case"importKey":c=y(u),f=C[3],b=C[4],"jwk"===i&&((o=m(o)).alg||(o.alg=g(c)),o.key_ops||(o.key_ops="oct"!==o.kty?"d"in o?b.filter(w):b.filter(S):b.slice()),C[1]=(E=m(o),s&&(E.extractable=E.ext,delete E.ext),p(unescape(encodeURIComponent(JSON.stringify(E)))).buffer));break;case"unwrapKey":c=C[4],f=C[5],b=C[6],C[2]=u._key}if("generateKey"===t&&"HMAC"===c.name&&c.hash)return c.length=c.length||{"SHA-1":512,"SHA-256":512,"SHA-384":1024,"SHA-512":1024}[c.hash.name],r.importKey("raw",e.getRandomValues(new Uint8Array(c.length+7>>3)),c,f,b);if(a&&"generateKey"===t&&"RSASSA-PKCS1-v1_5"===c.name&&(!c.modulusLength||c.modulusLength>=2048))return(i=y(i)).name="RSAES-PKCS1-v1_5",delete i.hash,r.generateKey(i,!0,["encrypt","decrypt"]).then(function(t){return Promise.all([r.exportKey("jwk",t.publicKey),r.exportKey("jwk",t.privateKey)])}).then(function(t){return t[0].alg=t[1].alg=g(c),t[0].key_ops=b.filter(S),t[1].key_ops=b.filter(w),Promise.all([r.importKey("jwk",t[0],c,!0,t[0].key_ops),r.importKey("jwk",t[1],c,f,t[1].key_ops)])}).then(function(t){return{publicKey:t[0],privateKey:t[1]}});if((a||s&&"SHA-1"===(c.hash||{}).name)&&"importKey"===t&&"jwk"===i&&"HMAC"===c.name&&"oct"===o.kty)return r.importKey("raw",p(h(o.k)),u,C[3],C[4]);if(a&&"importKey"===t&&("spki"===i||"pkcs8"===i))return r.importKey("jwk",function(t){var e=v(t),r=!1;e.length>2&&(r=!0,e.shift());var n={ext:!0};switch(e[0][0]){case"1.2.840.113549.1.1.1":var i=["n","e","d","p","q","dp","dq","qi"],o=v(e[1]);r&&o.shift();for(var s=0;s2&&(n=!0,o.unshift(new Uint8Array([0]))),r[0][0]="1.2.840.113549.1.1.1",e=o;break;default:throw new TypeError("Unsupported key type")}return r.push(new Uint8Array(b(e)).buffer),n?r.unshift(new Uint8Array([0])):r[1]={tag:3,value:r[1]},new Uint8Array(b(r)).buffer}(m(t))})),u}}),["encrypt","decrypt","sign","verify"].forEach(function(t){var e=r[t];r[t]=function(n,i,o,a){if(s&&(!o.byteLength||a&&!a.byteLength))throw new Error("Empy input is not allowed");var u,c=[].slice.call(arguments),f=y(n);if(s&&"decrypt"===t&&"AES-GCM"===f.name){var l=n.tagLength>>3;c[2]=(o.buffer||o).slice(0,o.byteLength-l),n.tag=(o.buffer||o).slice(o.byteLength-l)}c[1]=i._key;try{u=e.apply(r,c)}catch(t){return Promise.reject(t)}return s&&(u=new Promise(function(e,r){u.onabort=u.onerror=function(t){r(t)},u.oncomplete=function(r){r=r.target.result;if("encrypt"===t&&r instanceof AesGcmEncryptResult){var n=r.ciphertext,i=r.tag;(r=new Uint8Array(n.byteLength+i.byteLength)).set(new Uint8Array(n),0),r.set(new Uint8Array(i),n.byteLength),r=r.buffer}e(r)}})),u}}),s){var f=r.digest;r.digest=function(t,e){if(!e.byteLength)throw new Error("Empy input is not allowed");var n;try{n=f.call(r,t,e)}catch(t){return Promise.reject(t)}return n=new Promise(function(t,e){n.onabort=n.onerror=function(t){e(t)},n.oncomplete=function(e){t(e.target.result)}})},t.crypto=Object.create(e,{getRandomValues:{value:function(t){return e.getRandomValues(t)}},subtle:{value:r}}),t.CryptoKey=_}a&&(e.subtle=r,t.Crypto=n,t.SubtleCrypto=i,t.CryptoKey=_)}}}function l(t){return btoa(t).replace(/\=+$/,"").replace(/\+/g,"-").replace(/\//g,"_")}function h(t){return t=(t+="===").slice(0,-t.length%4),atob(t.replace(/-/g,"+").replace(/_/g,"/"))}function p(t){for(var e=new Uint8Array(t.length),r=0;rt.length)throw new RangeError("Malformed DER");var r,n=t[e.pos++],i=t[e.pos++];if(i>=128){if(i&=127,e.end-e.pos=128){var a=n;n=4;for(e.splice(i,0,a>>24&255,a>>16&255,a>>8&255,255&a);n>1&&!(a>>24);)a<<=8,n--;n<4&&e.splice(i,4-n),n|=128}return e.splice(i-2,2,r,n),e}function _(t,e,r,n){Object.defineProperties(this,{_key:{value:t},type:{value:t.type,enumerable:!0},extractable:{value:void 0===r?t.extractable:r,enumerable:!0},algorithm:{value:void 0===e?t.algorithm:e,enumerable:!0},usages:{value:void 0===n?t.usages:n,enumerable:!0}})}function S(t){return"verify"===t||"encrypt"===t||"wrapKey"===t}function w(t){return"sign"===t||"decrypt"===t||"unwrapKey"===t}}},function(t,e,r){var n=r(461),i=r(478),o=r(234);e.createCipher=e.Cipher=n.createCipher,e.createCipheriv=e.Cipheriv=n.createCipheriv,e.createDecipher=e.Decipher=i.createDecipher,e.createDecipheriv=e.Decipheriv=i.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(o)}},function(t,e,r){var n=r(3).Buffer,i=r(66).Transform,o=r(52).StringDecoder;function s(t){i.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(4)(s,i),s.prototype.update=function(t,e,r){"string"==typeof t&&(t=n.from(t,e));var i=this._update(t);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){n=t}finally{r(n)}},s.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},s.prototype._finalOrDigest=function(t){var e=this.__final()||n.alloc(0);return t&&(e=this._toString(e,t,!0)),e},s.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n},t.exports=s},function(t,e,r){"use strict";var n=r(137),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=l;var o=r(108);o.inherits=r(22);var s=r(236),a=r(167);o.inherits(l,s);for(var u=i(a.prototype),c=0;c>>=2;for(i=0;i>8^255&l^99,o[y]=l,s[l]=y,p=(h=t[l])<<24^l<<16^l<<8^l^h,d=((r=t[y])^(n=t[r])^(i=t[n]))<<24^(y^i)<<16^(y^n^i)<<8^y^r^i;for(var m=0;m<4;++m)u[m][y]=p,c[m][l]=d,p=p<<24|p>>>8,d=d<<24|d>>>8;0===y?y=g=1:(y=r^t[t[t[r^i]]],g^=t[t[g]])}}function p(t,e){for(var r,n=t.slice(0),i=1,s=n.length,u=l*(s+6+1),f=s;f>>16&255]<<24^o[r>>>8&255]<<16^o[255&r]<<8^o[r>>>24]^a[i]<<24,i++):s>6&&f%s==4&&(r=o[r>>>24]<<24^o[r>>>16&255]<<16^o[r>>>8&255]<<8^o[255&r]),n[f]=n[f-s]^r;if(e){for(var h,p=c[0],d=c[1],y=c[2],g=c[3],m=n.slice(0),v=(f=0,(u=n.length)-l);f>>24]]^d[o[h>>>16&255]]^y[o[h>>>8&255]]^g[o[255&h]];n=m}return n}function d(t,e,r,n){var i,a,f,l,h,p,d,y,g,m,v,b,_=t.length/4-1;n?(i=c[0],a=c[1],f=c[2],l=c[3],h=s):(i=u[0],a=u[1],f=u[2],l=u[3],h=o),p=e[0]^t[0],d=e[n?3:1]^t[1],y=e[2]^t[2],g=e[n?1:3]^t[3];for(var S=3,w=1;w<_;++w)m=i[p>>>24]^a[d>>>16&255]^f[y>>>8&255]^l[255&g]^t[++S],v=i[d>>>24]^a[y>>>16&255]^f[g>>>8&255]^l[255&p]^t[++S],b=i[y>>>24]^a[g>>>16&255]^f[p>>>8&255]^l[255&d]^t[++S],g=i[g>>>24]^a[p>>>16&255]^f[d>>>8&255]^l[255&y]^t[++S],p=m,d=v,y=b;r[0]=h[p>>>24]<<24^h[d>>>16&255]<<16^h[y>>>8&255]<<8^h[255&g]^t[++S],r[n?3:1]=h[d>>>24]<<24^h[y>>>16&255]<<16^h[g>>>8&255]<<8^h[255&p]^t[++S],r[2]=h[y>>>24]<<24^h[g>>>16&255]<<16^h[p>>>8&255]<<8^h[255&d]^t[++S],r[n?1:3]=h[g>>>24]<<24^h[p>>>16&255]<<16^h[d>>>8&255]<<8^h[255&y]^t[++S]}function y(t){var e,r="AES-"+((t=t||{}).mode||"CBC").toUpperCase(),i=(e=t.decrypt?n.cipher.createDecipher(r,t.key):n.cipher.createCipher(r,t.key)).start;return e.start=function(t,r){var o=null;r instanceof n.util.ByteBuffer&&(o=r,r={}),(r=r||{}).output=o,r.iv=t,i.call(e,r)},e}},function(t,e,r){var n=r(8);n.pki=n.pki||{};var i=t.exports=n.pki.oids=n.oids=n.oids||{};function o(t,e){i[t]=e,i[e]=t}function s(t,e){i[t]=e}o("1.2.840.113549.1.1.1","rsaEncryption"),o("1.2.840.113549.1.1.4","md5WithRSAEncryption"),o("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),o("1.2.840.113549.1.1.7","RSAES-OAEP"),o("1.2.840.113549.1.1.8","mgf1"),o("1.2.840.113549.1.1.9","pSpecified"),o("1.2.840.113549.1.1.10","RSASSA-PSS"),o("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),o("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),o("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),o("1.2.840.10040.4.3","dsa-with-sha1"),o("1.3.14.3.2.7","desCBC"),o("1.3.14.3.2.26","sha1"),o("2.16.840.1.101.3.4.2.1","sha256"),o("2.16.840.1.101.3.4.2.2","sha384"),o("2.16.840.1.101.3.4.2.3","sha512"),o("1.2.840.113549.2.5","md5"),o("1.2.840.113549.1.7.1","data"),o("1.2.840.113549.1.7.2","signedData"),o("1.2.840.113549.1.7.3","envelopedData"),o("1.2.840.113549.1.7.4","signedAndEnvelopedData"),o("1.2.840.113549.1.7.5","digestedData"),o("1.2.840.113549.1.7.6","encryptedData"),o("1.2.840.113549.1.9.1","emailAddress"),o("1.2.840.113549.1.9.2","unstructuredName"),o("1.2.840.113549.1.9.3","contentType"),o("1.2.840.113549.1.9.4","messageDigest"),o("1.2.840.113549.1.9.5","signingTime"),o("1.2.840.113549.1.9.6","counterSignature"),o("1.2.840.113549.1.9.7","challengePassword"),o("1.2.840.113549.1.9.8","unstructuredAddress"),o("1.2.840.113549.1.9.14","extensionRequest"),o("1.2.840.113549.1.9.20","friendlyName"),o("1.2.840.113549.1.9.21","localKeyId"),o("1.2.840.113549.1.9.22.1","x509Certificate"),o("1.2.840.113549.1.12.10.1.1","keyBag"),o("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),o("1.2.840.113549.1.12.10.1.3","certBag"),o("1.2.840.113549.1.12.10.1.4","crlBag"),o("1.2.840.113549.1.12.10.1.5","secretBag"),o("1.2.840.113549.1.12.10.1.6","safeContentsBag"),o("1.2.840.113549.1.5.13","pkcs5PBES2"),o("1.2.840.113549.1.5.12","pkcs5PBKDF2"),o("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),o("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),o("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),o("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),o("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),o("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),o("1.2.840.113549.2.7","hmacWithSHA1"),o("1.2.840.113549.2.8","hmacWithSHA224"),o("1.2.840.113549.2.9","hmacWithSHA256"),o("1.2.840.113549.2.10","hmacWithSHA384"),o("1.2.840.113549.2.11","hmacWithSHA512"),o("1.2.840.113549.3.7","des-EDE3-CBC"),o("2.16.840.1.101.3.4.1.2","aes128-CBC"),o("2.16.840.1.101.3.4.1.22","aes192-CBC"),o("2.16.840.1.101.3.4.1.42","aes256-CBC"),o("2.5.4.3","commonName"),o("2.5.4.5","serialName"),o("2.5.4.6","countryName"),o("2.5.4.7","localityName"),o("2.5.4.8","stateOrProvinceName"),o("2.5.4.10","organizationName"),o("2.5.4.11","organizationalUnitName"),o("2.16.840.1.113730.1.1","nsCertType"),s("2.5.29.1","authorityKeyIdentifier"),s("2.5.29.2","keyAttributes"),s("2.5.29.3","certificatePolicies"),s("2.5.29.4","keyUsageRestriction"),s("2.5.29.5","policyMapping"),s("2.5.29.6","subtreesConstraint"),s("2.5.29.7","subjectAltName"),s("2.5.29.8","issuerAltName"),s("2.5.29.9","subjectDirectoryAttributes"),s("2.5.29.10","basicConstraints"),s("2.5.29.11","nameConstraints"),s("2.5.29.12","policyConstraints"),s("2.5.29.13","basicConstraints"),o("2.5.29.14","subjectKeyIdentifier"),o("2.5.29.15","keyUsage"),s("2.5.29.16","privateKeyUsagePeriod"),o("2.5.29.17","subjectAltName"),o("2.5.29.18","issuerAltName"),o("2.5.29.19","basicConstraints"),s("2.5.29.20","cRLNumber"),s("2.5.29.21","cRLReason"),s("2.5.29.22","expirationDate"),s("2.5.29.23","instructionCode"),s("2.5.29.24","invalidityDate"),s("2.5.29.25","cRLDistributionPoints"),s("2.5.29.26","issuingDistributionPoint"),s("2.5.29.27","deltaCRLIndicator"),s("2.5.29.28","issuingDistributionPoint"),s("2.5.29.29","certificateIssuer"),s("2.5.29.30","nameConstraints"),o("2.5.29.31","cRLDistributionPoints"),o("2.5.29.32","certificatePolicies"),s("2.5.29.33","policyMappings"),s("2.5.29.34","policyConstraints"),o("2.5.29.35","authorityKeyIdentifier"),s("2.5.29.36","policyConstraints"),o("2.5.29.37","extKeyUsage"),s("2.5.29.46","freshestCRL"),s("2.5.29.54","inhibitAnyPolicy"),o("1.3.6.1.4.1.11129.2.4.2","timestampList"),o("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),o("1.3.6.1.5.5.7.3.1","serverAuth"),o("1.3.6.1.5.5.7.3.2","clientAuth"),o("1.3.6.1.5.5.7.3.3","codeSigning"),o("1.3.6.1.5.5.7.3.4","emailProtection"),o("1.3.6.1.5.5.7.3.8","timeStamping")},function(t,e,r){!function(t){"use strict";var e=function(t){var e,r=new Float64Array(16);if(t)for(e=0;e>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r,t[e+4]=n>>24&255,t[e+5]=n>>16&255,t[e+6]=n>>8&255,t[e+7]=255&n}function y(t,e,r,n,i){var o,s=0;for(o=0;o>>8)-1}function g(t,e,r,n){return y(t,e,r,n,16)}function m(t,e,r,n){return y(t,e,r,n,32)}function v(t,e,r,n){!function(t,e,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,f=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,d=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,g=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,m=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,v=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,_=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,S=o,w=s,E=a,k=u,C=c,A=f,T=l,B=h,I=p,M=d,x=y,R=g,N=m,P=v,L=b,D=_,O=0;O<20;O+=2)S^=(i=(N^=(i=(I^=(i=(C^=(i=S+N|0)<<7|i>>>25)+S|0)<<9|i>>>23)+C|0)<<13|i>>>19)+I|0)<<18|i>>>14,A^=(i=(w^=(i=(P^=(i=(M^=(i=A+w|0)<<7|i>>>25)+A|0)<<9|i>>>23)+M|0)<<13|i>>>19)+P|0)<<18|i>>>14,x^=(i=(T^=(i=(E^=(i=(L^=(i=x+T|0)<<7|i>>>25)+x|0)<<9|i>>>23)+L|0)<<13|i>>>19)+E|0)<<18|i>>>14,D^=(i=(R^=(i=(B^=(i=(k^=(i=D+R|0)<<7|i>>>25)+D|0)<<9|i>>>23)+k|0)<<13|i>>>19)+B|0)<<18|i>>>14,S^=(i=(k^=(i=(E^=(i=(w^=(i=S+k|0)<<7|i>>>25)+S|0)<<9|i>>>23)+w|0)<<13|i>>>19)+E|0)<<18|i>>>14,A^=(i=(C^=(i=(B^=(i=(T^=(i=A+C|0)<<7|i>>>25)+A|0)<<9|i>>>23)+T|0)<<13|i>>>19)+B|0)<<18|i>>>14,x^=(i=(M^=(i=(I^=(i=(R^=(i=x+M|0)<<7|i>>>25)+x|0)<<9|i>>>23)+R|0)<<13|i>>>19)+I|0)<<18|i>>>14,D^=(i=(L^=(i=(P^=(i=(N^=(i=D+L|0)<<7|i>>>25)+D|0)<<9|i>>>23)+N|0)<<13|i>>>19)+P|0)<<18|i>>>14;S=S+o|0,w=w+s|0,E=E+a|0,k=k+u|0,C=C+c|0,A=A+f|0,T=T+l|0,B=B+h|0,I=I+p|0,M=M+d|0,x=x+y|0,R=R+g|0,N=N+m|0,P=P+v|0,L=L+b|0,D=D+_|0,t[0]=S>>>0&255,t[1]=S>>>8&255,t[2]=S>>>16&255,t[3]=S>>>24&255,t[4]=w>>>0&255,t[5]=w>>>8&255,t[6]=w>>>16&255,t[7]=w>>>24&255,t[8]=E>>>0&255,t[9]=E>>>8&255,t[10]=E>>>16&255,t[11]=E>>>24&255,t[12]=k>>>0&255,t[13]=k>>>8&255,t[14]=k>>>16&255,t[15]=k>>>24&255,t[16]=C>>>0&255,t[17]=C>>>8&255,t[18]=C>>>16&255,t[19]=C>>>24&255,t[20]=A>>>0&255,t[21]=A>>>8&255,t[22]=A>>>16&255,t[23]=A>>>24&255,t[24]=T>>>0&255,t[25]=T>>>8&255,t[26]=T>>>16&255,t[27]=T>>>24&255,t[28]=B>>>0&255,t[29]=B>>>8&255,t[30]=B>>>16&255,t[31]=B>>>24&255,t[32]=I>>>0&255,t[33]=I>>>8&255,t[34]=I>>>16&255,t[35]=I>>>24&255,t[36]=M>>>0&255,t[37]=M>>>8&255,t[38]=M>>>16&255,t[39]=M>>>24&255,t[40]=x>>>0&255,t[41]=x>>>8&255,t[42]=x>>>16&255,t[43]=x>>>24&255,t[44]=R>>>0&255,t[45]=R>>>8&255,t[46]=R>>>16&255,t[47]=R>>>24&255,t[48]=N>>>0&255,t[49]=N>>>8&255,t[50]=N>>>16&255,t[51]=N>>>24&255,t[52]=P>>>0&255,t[53]=P>>>8&255,t[54]=P>>>16&255,t[55]=P>>>24&255,t[56]=L>>>0&255,t[57]=L>>>8&255,t[58]=L>>>16&255,t[59]=L>>>24&255,t[60]=D>>>0&255,t[61]=D>>>8&255,t[62]=D>>>16&255,t[63]=D>>>24&255}(t,e,r,n)}function b(t,e,r,n){!function(t,e,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,f=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,d=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,g=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,m=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,v=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,_=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,S=0;S<20;S+=2)o^=(i=(m^=(i=(p^=(i=(c^=(i=o+m|0)<<7|i>>>25)+o|0)<<9|i>>>23)+c|0)<<13|i>>>19)+p|0)<<18|i>>>14,f^=(i=(s^=(i=(v^=(i=(d^=(i=f+s|0)<<7|i>>>25)+f|0)<<9|i>>>23)+d|0)<<13|i>>>19)+v|0)<<18|i>>>14,y^=(i=(l^=(i=(a^=(i=(b^=(i=y+l|0)<<7|i>>>25)+y|0)<<9|i>>>23)+b|0)<<13|i>>>19)+a|0)<<18|i>>>14,_^=(i=(g^=(i=(h^=(i=(u^=(i=_+g|0)<<7|i>>>25)+_|0)<<9|i>>>23)+u|0)<<13|i>>>19)+h|0)<<18|i>>>14,o^=(i=(u^=(i=(a^=(i=(s^=(i=o+u|0)<<7|i>>>25)+o|0)<<9|i>>>23)+s|0)<<13|i>>>19)+a|0)<<18|i>>>14,f^=(i=(c^=(i=(h^=(i=(l^=(i=f+c|0)<<7|i>>>25)+f|0)<<9|i>>>23)+l|0)<<13|i>>>19)+h|0)<<18|i>>>14,y^=(i=(d^=(i=(p^=(i=(g^=(i=y+d|0)<<7|i>>>25)+y|0)<<9|i>>>23)+g|0)<<13|i>>>19)+p|0)<<18|i>>>14,_^=(i=(b^=(i=(v^=(i=(m^=(i=_+b|0)<<7|i>>>25)+_|0)<<9|i>>>23)+m|0)<<13|i>>>19)+v|0)<<18|i>>>14;t[0]=o>>>0&255,t[1]=o>>>8&255,t[2]=o>>>16&255,t[3]=o>>>24&255,t[4]=f>>>0&255,t[5]=f>>>8&255,t[6]=f>>>16&255,t[7]=f>>>24&255,t[8]=y>>>0&255,t[9]=y>>>8&255,t[10]=y>>>16&255,t[11]=y>>>24&255,t[12]=_>>>0&255,t[13]=_>>>8&255,t[14]=_>>>16&255,t[15]=_>>>24&255,t[16]=l>>>0&255,t[17]=l>>>8&255,t[18]=l>>>16&255,t[19]=l>>>24&255,t[20]=h>>>0&255,t[21]=h>>>8&255,t[22]=h>>>16&255,t[23]=h>>>24&255,t[24]=p>>>0&255,t[25]=p>>>8&255,t[26]=p>>>16&255,t[27]=p>>>24&255,t[28]=d>>>0&255,t[29]=d>>>8&255,t[30]=d>>>16&255,t[31]=d>>>24&255}(t,e,r,n)}var _=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function S(t,e,r,n,i,o,s){var a,u,c=new Uint8Array(16),f=new Uint8Array(64);for(u=0;u<16;u++)c[u]=0;for(u=0;u<8;u++)c[u]=o[u];for(;i>=64;){for(v(f,c,s,_),u=0;u<64;u++)t[e+u]=r[n+u]^f[u];for(a=1,u=8;u<16;u++)a=a+(255&c[u])|0,c[u]=255&a,a>>>=8;i-=64,e+=64,n+=64}if(i>0)for(v(f,c,s,_),u=0;u=64;){for(v(u,a,i,_),s=0;s<64;s++)t[e+s]=u[s];for(o=1,s=8;s<16;s++)o=o+(255&a[s])|0,a[s]=255&o,o>>>=8;r-=64,e+=64}if(r>0)for(v(u,a,i,_),s=0;s>>13|r<<3),n=255&t[4]|(255&t[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&t[6]|(255&t[7])<<8,this.r[3]=8191&(n>>>7|i<<9),o=255&t[8]|(255&t[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,s=255&t[10]|(255&t[11])<<8,this.r[6]=8191&(o>>>14|s<<2),a=255&t[12]|(255&t[13])<<8,this.r[7]=8065&(s>>>11|a<<5),u=255&t[14]|(255&t[15])<<8,this.r[8]=8191&(a>>>8|u<<8),this.r[9]=u>>>5&127,this.pad[0]=255&t[16]|(255&t[17])<<8,this.pad[1]=255&t[18]|(255&t[19])<<8,this.pad[2]=255&t[20]|(255&t[21])<<8,this.pad[3]=255&t[22]|(255&t[23])<<8,this.pad[4]=255&t[24]|(255&t[25])<<8,this.pad[5]=255&t[26]|(255&t[27])<<8,this.pad[6]=255&t[28]|(255&t[29])<<8,this.pad[7]=255&t[30]|(255&t[31])<<8};function A(t,e,r,n,i,o){var s=new C(o);return s.update(r,n,i),s.finish(t,e),0}function T(t,e,r,n,i,o){var s=new Uint8Array(16);return A(s,0,r,n,i,o),g(t,e,s,0)}function B(t,e,r,n,i){var o;if(r<32)return-1;for(k(t,0,e,0,r,n,i),A(t,16,t,32,r-32,t),o=0;o<16;o++)t[o]=0;return 0}function I(t,e,r,n,i){var o,s=new Uint8Array(32);if(r<32)return-1;if(E(s,0,32,n,i),0!==T(e,16,e,32,r-32,s))return-1;for(k(t,0,e,0,r,n,i),o=0;o<32;o++)t[o]=0;return 0}function M(t,e){var r;for(r=0;r<16;r++)t[r]=0|e[r]}function x(t){var e,r,n=1;for(e=0;e<16;e++)r=t[e]+n+65535,n=Math.floor(r/65536),t[e]=r-65536*n;t[0]+=n-1+37*(n-1)}function R(t,e,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(t[o]^e[o]),t[o]^=n,e[o]^=n}function N(t,r){var n,i,o,s=e(),a=e();for(n=0;n<16;n++)a[n]=r[n];for(x(a),x(a),x(a),i=0;i<2;i++){for(s[0]=a[0]-65517,n=1;n<15;n++)s[n]=a[n]-65535-(s[n-1]>>16&1),s[n-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),o=s[15]>>16&1,s[14]&=65535,R(a,s,1-o)}for(n=0;n<16;n++)t[2*n]=255&a[n],t[2*n+1]=a[n]>>8}function P(t,e){var r=new Uint8Array(32),n=new Uint8Array(32);return N(r,t),N(n,e),m(r,0,n,0)}function L(t){var e=new Uint8Array(32);return N(e,t),1&e[0]}function D(t,e){var r;for(r=0;r<16;r++)t[r]=e[2*r]+(e[2*r+1]<<8);t[15]&=32767}function O(t,e,r){for(var n=0;n<16;n++)t[n]=e[n]+r[n]}function U(t,e,r){for(var n=0;n<16;n++)t[n]=e[n]-r[n]}function K(t,e,r){var n,i,o=0,s=0,a=0,u=0,c=0,f=0,l=0,h=0,p=0,d=0,y=0,g=0,m=0,v=0,b=0,_=0,S=0,w=0,E=0,k=0,C=0,A=0,T=0,B=0,I=0,M=0,x=0,R=0,N=0,P=0,L=0,D=r[0],O=r[1],U=r[2],K=r[3],j=r[4],F=r[5],V=r[6],q=r[7],J=r[8],H=r[9],z=r[10],G=r[11],Y=r[12],W=r[13],$=r[14],Q=r[15];o+=(n=e[0])*D,s+=n*O,a+=n*U,u+=n*K,c+=n*j,f+=n*F,l+=n*V,h+=n*q,p+=n*J,d+=n*H,y+=n*z,g+=n*G,m+=n*Y,v+=n*W,b+=n*$,_+=n*Q,s+=(n=e[1])*D,a+=n*O,u+=n*U,c+=n*K,f+=n*j,l+=n*F,h+=n*V,p+=n*q,d+=n*J,y+=n*H,g+=n*z,m+=n*G,v+=n*Y,b+=n*W,_+=n*$,S+=n*Q,a+=(n=e[2])*D,u+=n*O,c+=n*U,f+=n*K,l+=n*j,h+=n*F,p+=n*V,d+=n*q,y+=n*J,g+=n*H,m+=n*z,v+=n*G,b+=n*Y,_+=n*W,S+=n*$,w+=n*Q,u+=(n=e[3])*D,c+=n*O,f+=n*U,l+=n*K,h+=n*j,p+=n*F,d+=n*V,y+=n*q,g+=n*J,m+=n*H,v+=n*z,b+=n*G,_+=n*Y,S+=n*W,w+=n*$,E+=n*Q,c+=(n=e[4])*D,f+=n*O,l+=n*U,h+=n*K,p+=n*j,d+=n*F,y+=n*V,g+=n*q,m+=n*J,v+=n*H,b+=n*z,_+=n*G,S+=n*Y,w+=n*W,E+=n*$,k+=n*Q,f+=(n=e[5])*D,l+=n*O,h+=n*U,p+=n*K,d+=n*j,y+=n*F,g+=n*V,m+=n*q,v+=n*J,b+=n*H,_+=n*z,S+=n*G,w+=n*Y,E+=n*W,k+=n*$,C+=n*Q,l+=(n=e[6])*D,h+=n*O,p+=n*U,d+=n*K,y+=n*j,g+=n*F,m+=n*V,v+=n*q,b+=n*J,_+=n*H,S+=n*z,w+=n*G,E+=n*Y,k+=n*W,C+=n*$,A+=n*Q,h+=(n=e[7])*D,p+=n*O,d+=n*U,y+=n*K,g+=n*j,m+=n*F,v+=n*V,b+=n*q,_+=n*J,S+=n*H,w+=n*z,E+=n*G,k+=n*Y,C+=n*W,A+=n*$,T+=n*Q,p+=(n=e[8])*D,d+=n*O,y+=n*U,g+=n*K,m+=n*j,v+=n*F,b+=n*V,_+=n*q,S+=n*J,w+=n*H,E+=n*z,k+=n*G,C+=n*Y,A+=n*W,T+=n*$,B+=n*Q,d+=(n=e[9])*D,y+=n*O,g+=n*U,m+=n*K,v+=n*j,b+=n*F,_+=n*V,S+=n*q,w+=n*J,E+=n*H,k+=n*z,C+=n*G,A+=n*Y,T+=n*W,B+=n*$,I+=n*Q,y+=(n=e[10])*D,g+=n*O,m+=n*U,v+=n*K,b+=n*j,_+=n*F,S+=n*V,w+=n*q,E+=n*J,k+=n*H,C+=n*z,A+=n*G,T+=n*Y,B+=n*W,I+=n*$,M+=n*Q,g+=(n=e[11])*D,m+=n*O,v+=n*U,b+=n*K,_+=n*j,S+=n*F,w+=n*V,E+=n*q,k+=n*J,C+=n*H,A+=n*z,T+=n*G,B+=n*Y,I+=n*W,M+=n*$,x+=n*Q,m+=(n=e[12])*D,v+=n*O,b+=n*U,_+=n*K,S+=n*j,w+=n*F,E+=n*V,k+=n*q,C+=n*J,A+=n*H,T+=n*z,B+=n*G,I+=n*Y,M+=n*W,x+=n*$,R+=n*Q,v+=(n=e[13])*D,b+=n*O,_+=n*U,S+=n*K,w+=n*j,E+=n*F,k+=n*V,C+=n*q,A+=n*J,T+=n*H,B+=n*z,I+=n*G,M+=n*Y,x+=n*W,R+=n*$,N+=n*Q,b+=(n=e[14])*D,_+=n*O,S+=n*U,w+=n*K,E+=n*j,k+=n*F,C+=n*V,A+=n*q,T+=n*J,B+=n*H,I+=n*z,M+=n*G,x+=n*Y,R+=n*W,N+=n*$,P+=n*Q,_+=(n=e[15])*D,s+=38*(w+=n*U),a+=38*(E+=n*K),u+=38*(k+=n*j),c+=38*(C+=n*F),f+=38*(A+=n*V),l+=38*(T+=n*q),h+=38*(B+=n*J),p+=38*(I+=n*H),d+=38*(M+=n*z),y+=38*(x+=n*G),g+=38*(R+=n*Y),m+=38*(N+=n*W),v+=38*(P+=n*$),b+=38*(L+=n*Q),o=(n=(o+=38*(S+=n*O))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),_=(n=_+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),_=(n=_+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),t[0]=o,t[1]=s,t[2]=a,t[3]=u,t[4]=c,t[5]=f,t[6]=l,t[7]=h,t[8]=p,t[9]=d,t[10]=y,t[11]=g,t[12]=m,t[13]=v,t[14]=b,t[15]=_}function j(t,e){K(t,e,e)}function F(t,r){var n,i=e();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)j(i,i),2!==n&&4!==n&&K(i,i,r);for(n=0;n<16;n++)t[n]=i[n]}function V(t,r,n){var i,o,s=new Uint8Array(32),a=new Float64Array(80),c=e(),f=e(),l=e(),h=e(),p=e(),d=e();for(o=0;o<31;o++)s[o]=r[o];for(s[31]=127&r[31]|64,s[0]&=248,D(a,n),o=0;o<16;o++)f[o]=a[o],h[o]=c[o]=l[o]=0;for(c[0]=h[0]=1,o=254;o>=0;--o)R(c,f,i=s[o>>>3]>>>(7&o)&1),R(l,h,i),O(p,c,l),U(c,c,l),O(l,f,h),U(f,f,h),j(h,p),j(d,c),K(c,l,c),K(l,f,p),O(p,c,l),U(c,c,l),j(f,c),U(l,h,d),K(c,l,u),O(c,c,h),K(l,l,c),K(c,h,d),K(h,f,a),j(f,p),R(c,f,i),R(l,h,i);for(o=0;o<16;o++)a[o+16]=c[o],a[o+32]=l[o],a[o+48]=f[o],a[o+64]=h[o];var y=a.subarray(32),g=a.subarray(16);return F(y,y),K(g,g,y),N(t,g),0}function q(t,e){return V(t,e,o)}function J(t,e){return n(e,32),q(t,e)}function H(t,e,r){var n=new Uint8Array(32);return V(n,r,e),b(t,i,n,_)}C.prototype.blocks=function(t,e,r){for(var n,i,o,s,a,u,c,f,l,h,p,d,y,g,m,v,b,_,S,w=this.fin?0:2048,E=this.h[0],k=this.h[1],C=this.h[2],A=this.h[3],T=this.h[4],B=this.h[5],I=this.h[6],M=this.h[7],x=this.h[8],R=this.h[9],N=this.r[0],P=this.r[1],L=this.r[2],D=this.r[3],O=this.r[4],U=this.r[5],K=this.r[6],j=this.r[7],F=this.r[8],V=this.r[9];r>=16;)h=l=0,h+=(E+=8191&(n=255&t[e+0]|(255&t[e+1])<<8))*N,h+=(k+=8191&(n>>>13|(i=255&t[e+2]|(255&t[e+3])<<8)<<3))*(5*V),h+=(C+=8191&(i>>>10|(o=255&t[e+4]|(255&t[e+5])<<8)<<6))*(5*F),h+=(A+=8191&(o>>>7|(s=255&t[e+6]|(255&t[e+7])<<8)<<9))*(5*j),l=(h+=(T+=8191&(s>>>4|(a=255&t[e+8]|(255&t[e+9])<<8)<<12))*(5*K))>>>13,h&=8191,h+=(B+=a>>>1&8191)*(5*U),h+=(I+=8191&(a>>>14|(u=255&t[e+10]|(255&t[e+11])<<8)<<2))*(5*O),h+=(M+=8191&(u>>>11|(c=255&t[e+12]|(255&t[e+13])<<8)<<5))*(5*D),h+=(x+=8191&(c>>>8|(f=255&t[e+14]|(255&t[e+15])<<8)<<8))*(5*L),p=l+=(h+=(R+=f>>>5|w)*(5*P))>>>13,p+=E*P,p+=k*N,p+=C*(5*V),p+=A*(5*F),l=(p+=T*(5*j))>>>13,p&=8191,p+=B*(5*K),p+=I*(5*U),p+=M*(5*O),p+=x*(5*D),l+=(p+=R*(5*L))>>>13,p&=8191,d=l,d+=E*L,d+=k*P,d+=C*N,d+=A*(5*V),l=(d+=T*(5*F))>>>13,d&=8191,d+=B*(5*j),d+=I*(5*K),d+=M*(5*U),d+=x*(5*O),y=l+=(d+=R*(5*D))>>>13,y+=E*D,y+=k*L,y+=C*P,y+=A*N,l=(y+=T*(5*V))>>>13,y&=8191,y+=B*(5*F),y+=I*(5*j),y+=M*(5*K),y+=x*(5*U),g=l+=(y+=R*(5*O))>>>13,g+=E*O,g+=k*D,g+=C*L,g+=A*P,l=(g+=T*N)>>>13,g&=8191,g+=B*(5*V),g+=I*(5*F),g+=M*(5*j),g+=x*(5*K),m=l+=(g+=R*(5*U))>>>13,m+=E*U,m+=k*O,m+=C*D,m+=A*L,l=(m+=T*P)>>>13,m&=8191,m+=B*N,m+=I*(5*V),m+=M*(5*F),m+=x*(5*j),v=l+=(m+=R*(5*K))>>>13,v+=E*K,v+=k*U,v+=C*O,v+=A*D,l=(v+=T*L)>>>13,v&=8191,v+=B*P,v+=I*N,v+=M*(5*V),v+=x*(5*F),b=l+=(v+=R*(5*j))>>>13,b+=E*j,b+=k*K,b+=C*U,b+=A*O,l=(b+=T*D)>>>13,b&=8191,b+=B*L,b+=I*P,b+=M*N,b+=x*(5*V),_=l+=(b+=R*(5*F))>>>13,_+=E*F,_+=k*j,_+=C*K,_+=A*U,l=(_+=T*O)>>>13,_&=8191,_+=B*D,_+=I*L,_+=M*P,_+=x*N,S=l+=(_+=R*(5*V))>>>13,S+=E*V,S+=k*F,S+=C*j,S+=A*K,l=(S+=T*U)>>>13,S&=8191,S+=B*O,S+=I*D,S+=M*L,S+=x*P,E=h=8191&(l=(l=((l+=(S+=R*N)>>>13)<<2)+l|0)+(h&=8191)|0),k=p+=l>>>=13,C=d&=8191,A=y&=8191,T=g&=8191,B=m&=8191,I=v&=8191,M=b&=8191,x=_&=8191,R=S&=8191,e+=16,r-=16;this.h[0]=E,this.h[1]=k,this.h[2]=C,this.h[3]=A,this.h[4]=T,this.h[5]=B,this.h[6]=I,this.h[7]=M,this.h[8]=x,this.h[9]=R},C.prototype.finish=function(t,e){var r,n,i,o,s=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,s[0]=this.h[0]+5,r=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this.h[o]+r,r=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,n=(1^r)-1,o=0;o<10;o++)s[o]&=n;for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|s[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;t[e+0]=this.h[0]>>>0&255,t[e+1]=this.h[0]>>>8&255,t[e+2]=this.h[1]>>>0&255,t[e+3]=this.h[1]>>>8&255,t[e+4]=this.h[2]>>>0&255,t[e+5]=this.h[2]>>>8&255,t[e+6]=this.h[3]>>>0&255,t[e+7]=this.h[3]>>>8&255,t[e+8]=this.h[4]>>>0&255,t[e+9]=this.h[4]>>>8&255,t[e+10]=this.h[5]>>>0&255,t[e+11]=this.h[5]>>>8&255,t[e+12]=this.h[6]>>>0&255,t[e+13]=this.h[6]>>>8&255,t[e+14]=this.h[7]>>>0&255,t[e+15]=this.h[7]>>>8&255},C.prototype.update=function(t,e,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n=16&&(i=r-r%16,this.blocks(t,e,i),e+=i,r-=i),r){for(n=0;n=128;){for(w=0;w<16;w++)E=8*w+W,M[w]=r[E+0]<<24|r[E+1]<<16|r[E+2]<<8|r[E+3],x[w]=r[E+4]<<24|r[E+5]<<16|r[E+6]<<8|r[E+7];for(w=0;w<80;w++)if(i=R,o=N,s=P,a=L,u=D,c=O,f=U,K,h=j,p=F,d=V,y=q,g=J,m=H,v=z,G,A=65535&(C=G),T=C>>>16,B=65535&(k=K),I=k>>>16,A+=65535&(C=(J>>>14|D<<18)^(J>>>18|D<<14)^(D>>>9|J<<23)),T+=C>>>16,B+=65535&(k=(D>>>14|J<<18)^(D>>>18|J<<14)^(J>>>9|D<<23)),I+=k>>>16,A+=65535&(C=J&H^~J&z),T+=C>>>16,B+=65535&(k=D&O^~D&U),I+=k>>>16,k=Y[2*w],A+=65535&(C=Y[2*w+1]),T+=C>>>16,B+=65535&k,I+=k>>>16,k=M[w%16],T+=(C=x[w%16])>>>16,B+=65535&k,I+=k>>>16,B+=(T+=(A+=65535&C)>>>16)>>>16,A=65535&(C=S=65535&A|T<<16),T=C>>>16,B=65535&(k=_=65535&B|(I+=B>>>16)<<16),I=k>>>16,A+=65535&(C=(j>>>28|R<<4)^(R>>>2|j<<30)^(R>>>7|j<<25)),T+=C>>>16,B+=65535&(k=(R>>>28|j<<4)^(j>>>2|R<<30)^(j>>>7|R<<25)),I+=k>>>16,T+=(C=j&F^j&V^F&V)>>>16,B+=65535&(k=R&N^R&P^N&P),I+=k>>>16,l=65535&(B+=(T+=(A+=65535&C)>>>16)>>>16)|(I+=B>>>16)<<16,b=65535&A|T<<16,A=65535&(C=y),T=C>>>16,B=65535&(k=a),I=k>>>16,T+=(C=S)>>>16,B+=65535&(k=_),I+=k>>>16,N=i,P=o,L=s,D=a=65535&(B+=(T+=(A+=65535&C)>>>16)>>>16)|(I+=B>>>16)<<16,O=u,U=c,K=f,R=l,F=h,V=p,q=d,J=y=65535&A|T<<16,H=g,z=m,G=v,j=b,w%16==15)for(E=0;E<16;E++)k=M[E],A=65535&(C=x[E]),T=C>>>16,B=65535&k,I=k>>>16,k=M[(E+9)%16],A+=65535&(C=x[(E+9)%16]),T+=C>>>16,B+=65535&k,I+=k>>>16,_=M[(E+1)%16],A+=65535&(C=((S=x[(E+1)%16])>>>1|_<<31)^(S>>>8|_<<24)^(S>>>7|_<<25)),T+=C>>>16,B+=65535&(k=(_>>>1|S<<31)^(_>>>8|S<<24)^_>>>7),I+=k>>>16,_=M[(E+14)%16],T+=(C=((S=x[(E+14)%16])>>>19|_<<13)^(_>>>29|S<<3)^(S>>>6|_<<26))>>>16,B+=65535&(k=(_>>>19|S<<13)^(S>>>29|_<<3)^_>>>6),I+=k>>>16,I+=(B+=(T+=(A+=65535&C)>>>16)>>>16)>>>16,M[E]=65535&B|I<<16,x[E]=65535&A|T<<16;A=65535&(C=j),T=C>>>16,B=65535&(k=R),I=k>>>16,k=t[0],T+=(C=e[0])>>>16,B+=65535&k,I+=k>>>16,I+=(B+=(T+=(A+=65535&C)>>>16)>>>16)>>>16,t[0]=R=65535&B|I<<16,e[0]=j=65535&A|T<<16,A=65535&(C=F),T=C>>>16,B=65535&(k=N),I=k>>>16,k=t[1],T+=(C=e[1])>>>16,B+=65535&k,I+=k>>>16,I+=(B+=(T+=(A+=65535&C)>>>16)>>>16)>>>16,t[1]=N=65535&B|I<<16,e[1]=F=65535&A|T<<16,A=65535&(C=V),T=C>>>16,B=65535&(k=P),I=k>>>16,k=t[2],T+=(C=e[2])>>>16,B+=65535&k,I+=k>>>16,I+=(B+=(T+=(A+=65535&C)>>>16)>>>16)>>>16,t[2]=P=65535&B|I<<16,e[2]=V=65535&A|T<<16,A=65535&(C=q),T=C>>>16,B=65535&(k=L),I=k>>>16,k=t[3],T+=(C=e[3])>>>16,B+=65535&k,I+=k>>>16,I+=(B+=(T+=(A+=65535&C)>>>16)>>>16)>>>16,t[3]=L=65535&B|I<<16,e[3]=q=65535&A|T<<16,A=65535&(C=J),T=C>>>16,B=65535&(k=D),I=k>>>16,k=t[4],T+=(C=e[4])>>>16,B+=65535&k,I+=k>>>16,I+=(B+=(T+=(A+=65535&C)>>>16)>>>16)>>>16,t[4]=D=65535&B|I<<16,e[4]=J=65535&A|T<<16,A=65535&(C=H),T=C>>>16,B=65535&(k=O),I=k>>>16,k=t[5],T+=(C=e[5])>>>16,B+=65535&k,I+=k>>>16,I+=(B+=(T+=(A+=65535&C)>>>16)>>>16)>>>16,t[5]=O=65535&B|I<<16,e[5]=H=65535&A|T<<16,A=65535&(C=z),T=C>>>16,B=65535&(k=U),I=k>>>16,k=t[6],T+=(C=e[6])>>>16,B+=65535&k,I+=k>>>16,I+=(B+=(T+=(A+=65535&C)>>>16)>>>16)>>>16,t[6]=U=65535&B|I<<16,e[6]=z=65535&A|T<<16,A=65535&(C=G),T=C>>>16,B=65535&(k=K),I=k>>>16,k=t[7],T+=(C=e[7])>>>16,B+=65535&k,I+=k>>>16,I+=(B+=(T+=(A+=65535&C)>>>16)>>>16)>>>16,t[7]=K=65535&B|I<<16,e[7]=G=65535&A|T<<16,W+=128,n-=128}return n}function $(t,e,r){var n,i=new Int32Array(8),o=new Int32Array(8),s=new Uint8Array(256),a=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,W(i,o,e,r),r%=128,n=0;n=0;--i)Z(t,e,n=r[i/8|0]>>(7&i)&1),Q(e,t),Q(t,t),Z(t,e,n)}function et(t,r){var n=[e(),e(),e(),e()];M(n[0],l),M(n[1],h),M(n[2],a),K(n[3],l,h),tt(t,n,r)}function rt(t,r,i){var o,s=new Uint8Array(64),a=[e(),e(),e(),e()];for(i||n(r,32),$(s,r,32),s[0]&=248,s[31]&=127,s[31]|=64,et(a,s),X(t,a),o=0;o<32;o++)r[o+32]=t[o];return 0}var nt=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function it(t,e){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i>8,e[i]-=256*r;e[i]+=r,e[n]=0}for(r=0,i=0;i<32;i++)e[i]+=r-(e[31]>>4)*nt[i],r=e[i]>>8,e[i]&=255;for(i=0;i<32;i++)e[i]-=r*nt[i];for(n=0;n<32;n++)e[n+1]+=e[n]>>8,t[n]=255&e[n]}function ot(t){var e,r=new Float64Array(64);for(e=0;e<64;e++)r[e]=t[e];for(e=0;e<64;e++)t[e]=0;it(t,r)}function st(t,r,n,i){var o,s,a=new Uint8Array(64),u=new Uint8Array(64),c=new Uint8Array(64),f=new Float64Array(64),l=[e(),e(),e(),e()];$(a,i,32),a[0]&=248,a[31]&=127,a[31]|=64;var h=n+64;for(o=0;o=0;n--)j(i,i),1!==n&&K(i,i,r);for(n=0;n<16;n++)t[n]=i[n]}(n,n),K(n,n,o),K(n,n,u),K(n,n,u),K(t[0],n,u),j(i,t[0]),K(i,i,u),P(i,o)&&K(t[0],t[0],p),j(i,t[0]),K(i,i,u),P(i,o)?-1:(L(t[0])===r[31]>>7&&U(t[0],s,t[0]),K(t[3],t[0],t[1]),0)}function ut(t,r,n,i){var o,s=new Uint8Array(32),a=new Uint8Array(64),u=[e(),e(),e(),e()],c=[e(),e(),e(),e()];if(-1,n<64)return-1;if(at(c,i))return-1;for(o=0;o=0},t.sign.keyPair=function(){var t=new Uint8Array(32),e=new Uint8Array(64);return rt(t,e),{publicKey:t,secretKey:e}},t.sign.keyPair.fromSecretKey=function(t){if(yt(t),64!==t.length)throw new Error("bad secret key size");for(var e=new Uint8Array(32),r=0;r{i=i||r(510)(e);class o{constructor(t){i.validatePublicKey(t),this._key=t}verify(t,e,r){a(r),i.hashAndVerify(this._key,e,t,r)}marshal(){return i.compressPublicKey(this._key)}get bytes(){return t.PublicKey.encode({Type:t.KeyType.Secp256k1,Data:this.marshal()})}equals(t){return this.bytes.equals(t.bytes)}hash(t){a(t),n(this.bytes,"sha2-256",t)}}class s{constructor(t,e){this._key=t,this._publicKey=e||i.computePublicKey(t),i.validatePrivateKey(this._key),i.validatePublicKey(this._publicKey)}sign(t,e){a(e),i.hashAndSign(this._key,t,e)}get public(){return new o(this._publicKey)}marshal(){return this._key}get bytes(){return t.PrivateKey.encode({Type:t.KeyType.Secp256k1,Data:this.marshal()})}equals(t){return this.bytes.equals(t.bytes)}hash(t){a(t),n(this.bytes,"sha2-256",t)}}function a(t){if("function"!=typeof t)throw new Error("callback is required")}return{Secp256k1PublicKey:o,Secp256k1PrivateKey:s,unmarshalSecp256k1PrivateKey:function(t,e){e(null,new s(t),null)},unmarshalSecp256k1PublicKey:function(t){return new o(t)},generateKeyPair:function(t,e){void 0===e&&"function"==typeof t&&(e=t),a(e),i.generateKey((t,r)=>{if(t)return e(t);let n;try{n=new s(r)}catch(t){return e(t)}e(null,n)})}}})},,,,,,,function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isBigJson=e.isBig=e.bigToJson=e.bigFromJson=void 0;var n,i=r(121),o=(n=i)&&n.__esModule?n:{default:n};e.bigFromJson=function(t){return(0,o.default)(t.value)},e.bigToJson=function(t){return{__ipfsPostMsgProxyType:"Big",value:t.toJSON()}},e.isBig=function(t){return t&&t.constructor&&null!=t.constructor.DP},e.isBigJson=function(t){return t&&"Big"===t.__ipfsPostMsgProxyType}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){e|=0;for(var r=Math.max(t.length-e,0),n=Array(r),i=0;i65&&-1!==s){var a=e[s];","===a?(++s,e=e.substr(0,s)+"\r\n "+e.substr(s)):e=e.substr(0,s)+"\r\n"+a+e.substr(s+1),o=i-s-1,s=-1,++i}else" "!==e[i]&&"\t"!==e[i]&&","!==e[i]||(s=i);return e}function s(t){return t.replace(/^\s+/,"")}i.encode=function(t,e){e=e||{};var r,i="-----BEGIN "+t.type+"-----\r\n";if(t.procType&&(i+=o(r={name:"Proc-Type",values:[String(t.procType.version),t.procType.type]})),t.contentDomain&&(i+=o(r={name:"Content-Domain",values:[t.contentDomain]})),t.dekInfo&&(r={name:"DEK-Info",values:[t.dekInfo.algorithm]},t.dekInfo.parameters&&r.values.push(t.dekInfo.parameters),i+=o(r)),t.headers)for(var s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},,,function(t,e,r){"use strict";t.exports=function(t){return function(e,r){r(t)}}},function(t,e,r){"use strict";function n(t){return t}var i=r(114);t.exports=function(t){return t?(t=i(t),function(e){return function(r,n){e(r,function(r,i){try{i=r?null:t(i)}catch(t){return e(t,function(){return n(t)})}n(r,i)})}}):n}},function(t,e,r){"use strict";function n(t){return t}var i=r(114);t.exports=function(t){if(!t)return n;t=i(t);var e,r,o=!1;return function(n){return function i(s,a){if(r)return a(r);s?(r=s,n(s,o?function(t){o?e=a:a(s)}:function(t){a(s)})):n(null,function(n,s){n?a(n):r?a(r):(o=!0,t(s,function(t,n){o=!1,r?(a(r),e&&e(r)):t?i(t,a):a(null,n)}))})}}}},,,,function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.preMultiaddrToJson=e.preMultiaddrFromJson=e.isMultiaddrJson=e.isMultiaddr=e.multiaddrToJson=e.multiaddrFromJson=void 0;var n,i=r(416),o=(n=i)&&n.__esModule?n:{default:n};var s=e.multiaddrFromJson=function(t){return new o.default(t.multiaddr)},a=e.multiaddrToJson=function(t){return{__ipfsPostMsgProxyType:"Multiaddr",multiaddr:t.toString()}},u=e.isMultiaddr=function(t){return t&&o.default.isMultiaddr(t)},c=e.isMultiaddrJson=function(t){return t&&"Multiaddr"===t.__ipfsPostMsgProxyType};e.preMultiaddrFromJson=function(t){return function(){for(var e=arguments.length,r=Array(e),n=0;n=0),a[8]){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,a[6]?parseInt(a[6]):0);break;case"e":r=a[7]?parseFloat(r).toExponential(a[7]):parseFloat(r).toExponential();break;case"f":r=a[7]?parseFloat(r).toFixed(a[7]):parseFloat(r);break;case"g":r=a[7]?parseFloat(r).toPrecision(a[7]):parseFloat(r);break;case"o":r=r.toString(8);break;case"s":r=String(r),r=a[7]?r.substring(0,a[7]):r;break;case"t":r=String(!!r),r=a[7]?r.substring(0,a[7]):r;break;case"T":r=u(r),r=a[7]?r.substring(0,a[7]):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=a[7]?r.substring(0,a[7]):r;break;case"x":r=parseInt(r,10).toString(16);break;case"X":r=parseInt(r,10).toString(16).toUpperCase()}o.json.test(a[8])?g[g.length]=r:(!o.number.test(a[8])||m&&!a[3]?v="":(v=m?"+":"-",r=r.toString().replace(o.sign,"")),l=a[4]?"0"===a[4]?"0":a[4].charAt(1):" ",h=a[6]-(v+r).length,c=a[6]&&h>0?f(l,h):"",g[g.length]=a[5]?v+r+c:"0"===l?v+c+r:c+v+r)}return g.join("")},s.cache=Object.create(null),s.parse=function(t){for(var e=t,r=[],n=[],i=0;e;){if(null!==(r=o.text.exec(e)))n[n.length]=r[0];else if(null!==(r=o.modulo.exec(e)))n[n.length]="%";else{if(null===(r=o.placeholder.exec(e)))throw new SyntaxError("[sprintf] unexpected placeholder");if(r[2]){i|=1;var s=[],a=r[2],u=[];if(null===(u=o.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s[s.length]=u[1];""!==(a=a.substring(u[0].length));)if(null!==(u=o.key_access.exec(a)))s[s.length]=u[1];else{if(null===(u=o.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s[s.length]=u[1]}r[2]=s}else i|=2;if(3===i)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n[n.length]=r}e=e.substring(r[0].length)}return n};var a=function(t,e,r){return(r=(e||[]).slice(0)).splice(0,0,t),s.apply(null,r)};function u(t){return"number"==typeof t?"number":"string"==typeof t?"string":Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}var c={0:["","0","00","000","0000","00000","000000","0000000"]," ":[""," "," "," "," "," "," "," "],_:["","_","__","___","____","_____","______","_______"]};function f(t,e){return e>=0&&e<=7&&c[t]?c[t][e]:Array(e+1).join(t)}e.sprintf=s,e.vsprintf=a,void 0!==i&&(i.sprintf=s,i.vsprintf=a,void 0===(n=function(){return{sprintf:s,vsprintf:a}}.call(e,r,e,t))||(t.exports=n))}("undefined"==typeof window?this:window)},function(t,e){var r=Array.isArray;t.exports=r},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,r){(function(e){t.exports=function(t,r){for(var n=Math.min(t.length,r.length),i=new e(n),o=0;oe.blockLength&&(e.start(),e.update(s.bytes()),s=e.digest()),r=n.util.createBuffer(),i=n.util.createBuffer(),c=s.length();for(u=0;u>>0,u>>>0];for(var c=i.fullMessageLength.length-1;c>=0;--c)i.fullMessageLength[c]+=u[1],u[1]=u[0]+(i.fullMessageLength[c]/4294967296>>>0),i.fullMessageLength[c]=i.fullMessageLength[c]>>>0,u[0]=u[1]/4294967296>>>0;return e.putBytes(o),a(t,r,e),(e.read>2048||0===e.length())&&e.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(e.bytes());var u,c=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(o.substr(0,i.blockLength-c));for(var f=8*i.fullMessageLength[0],l=0;l>>0,s.putInt32(f>>>0),f=u>>>0;s.putInt32(f);var h={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4};a(h,r,s);var p=n.util.createBuffer();return p.putInt32(h.h0),p.putInt32(h.h1),p.putInt32(h.h2),p.putInt32(h.h3),p.putInt32(h.h4),p},i};var o=null,s=!1;function a(t,e,r){for(var n,i,o,s,a,u,c,f=r.length();f>=64;){for(i=t.h0,o=t.h1,s=t.h2,a=t.h3,u=t.h4,c=0;c<16;++c)n=r.getInt32(),e[c]=n,n=(i<<5|i>>>27)+(a^o&(s^a))+u+1518500249+n,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;c<20;++c)n=(n=e[c-3]^e[c-8]^e[c-14]^e[c-16])<<1|n>>>31,e[c]=n,n=(i<<5|i>>>27)+(a^o&(s^a))+u+1518500249+n,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;c<32;++c)n=(n=e[c-3]^e[c-8]^e[c-14]^e[c-16])<<1|n>>>31,e[c]=n,n=(i<<5|i>>>27)+(o^s^a)+u+1859775393+n,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;c<40;++c)n=(n=e[c-6]^e[c-16]^e[c-28]^e[c-32])<<2|n>>>30,e[c]=n,n=(i<<5|i>>>27)+(o^s^a)+u+1859775393+n,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;c<60;++c)n=(n=e[c-6]^e[c-16]^e[c-28]^e[c-32])<<2|n>>>30,e[c]=n,n=(i<<5|i>>>27)+(o&s|a&(o^s))+u+2400959708+n,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;c<80;++c)n=(n=e[c-6]^e[c-16]^e[c-28]^e[c-32])<<2|n>>>30,e[c]=n,n=(i<<5|i>>>27)+(o^s^a)+u+3395469782+n,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;t.h0=t.h0+i|0,t.h1=t.h1+o|0,t.h2=t.h2+s|0,t.h3=t.h3+a|0,t.h4=t.h4+u|0,f-=64}}},function(t,e,r){"use strict";const n=e;n.Reporter=r(497).Reporter,n.DecoderBuffer=r(262).DecoderBuffer,n.EncoderBuffer=r(262).EncoderBuffer,n.Node=r(498)},function(t,e,r){(function(t,r){var n=200,i="Expected a function",o="__lodash_hash_undefined__",s=1,a=2,u=1/0,c=9007199254740991,f="[object Arguments]",l="[object Array]",h="[object Boolean]",p="[object Date]",d="[object Error]",y="[object Function]",g="[object GeneratorFunction]",m="[object Map]",v="[object Number]",b="[object Object]",_="[object RegExp]",S="[object Set]",w="[object String]",E="[object Symbol]",k="[object ArrayBuffer]",C="[object DataView]",A=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,T=/^\w*$/,B=/^\./,I=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,M=/\\(\\)?/g,x=/^\[object .+?Constructor\]$/,R=/^(?:0|[1-9]\d*)$/,N={};N["[object Float32Array]"]=N["[object Float64Array]"]=N["[object Int8Array]"]=N["[object Int16Array]"]=N["[object Int32Array]"]=N["[object Uint8Array]"]=N["[object Uint8ClampedArray]"]=N["[object Uint16Array]"]=N["[object Uint32Array]"]=!0,N[f]=N[l]=N[k]=N[h]=N[C]=N[p]=N[d]=N[y]=N[m]=N[v]=N[b]=N[_]=N[S]=N[w]=N["[object WeakMap]"]=!1;var P="object"==typeof t&&t&&t.Object===Object&&t,L="object"==typeof self&&self&&self.Object===Object&&self,D=P||L||Function("return this")(),O=e&&!e.nodeType&&e,U=O&&"object"==typeof r&&r&&!r.nodeType&&r,K=U&&U.exports===O&&P.process,j=function(){try{return K&&K.binding("util")}catch(t){}}(),F=j&&j.isTypedArray;function V(t,e){return!!(t?t.length:0)&&function(t,e,r){if(e!=e)return function(t,e,r,n){var i=t.length,o=r+(n?1:-1);for(;n?o--:++o-1}function q(t,e,r){for(var n=-1,i=t?t.length:0;++n-1},Bt.prototype.set=function(t,e){var r=this.__data__,n=Nt(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},It.prototype.clear=function(){this.__data__={hash:new Tt,map:new(dt||Bt),string:new Tt}},It.prototype.delete=function(t){return qt(this,t).delete(t)},It.prototype.get=function(t){return qt(this,t).get(t)},It.prototype.has=function(t){return qt(this,t).has(t)},It.prototype.set=function(t,e){return qt(this,t).set(t,e),this},Mt.prototype.add=Mt.prototype.push=function(t){return this.__data__.set(t,o),this},Mt.prototype.has=function(t){return this.__data__.has(t)},xt.prototype.clear=function(){this.__data__=new Bt},xt.prototype.delete=function(t){return this.__data__.delete(t)},xt.prototype.get=function(t){return this.__data__.get(t)},xt.prototype.has=function(t){return this.__data__.has(t)},xt.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Bt){var i=r.__data__;if(!dt||i.lengthc))return!1;var l=o.get(t);if(l&&o.get(e))return l==e;var h=-1,p=!0,d=i&s?new Mt:void 0;for(o.set(t,e),o.set(e,t);++h-1&&t%1==0&&t-1&&t%1==0&&t<=c}function se(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function ae(t){return!!t&&"object"==typeof t}function ue(t){return"symbol"==typeof t||ae(t)&&st.call(t)==E}var ce=F?function(t){return function(e){return t(e)}}(F):function(t){return ae(t)&&oe(t.length)&&!!N[st.call(t)]};function fe(t){return ne(t)?Rt(t):Kt(t)}function le(t){return t}r.exports=function(t,e){return t&&t.length?function(t,e,r){var i=-1,o=V,s=t.length,a=!0,u=[],c=u;if(r)a=!1,o=q;else if(s>=n){var f=e?null:Ft(t);if(f)return W(f);a=!1,o=z,c=new Mt}else c=e?[]:u;t:for(;++i=5;else if(2===r)n=i[o]>5||5==i[o]&&(n||o<0||i[o+1]!==g||1&i[o-1]);else if(3===r)n=n||!!i[0];else if(n=!1,0!==r)throw Error(d);if(o<1)i.length=1,n?(t.e=-e,i[0]=1):i[0]=t.e=0;else{if(i.length=o--,n)for(;++i[o]>9;)i[o]=0,o--||(++t.e,i.unshift(1));for(o=i.length;!i[--o];)i.pop()}}else if(r<0||r>3||r!==~~r)throw Error(d);return t}function b(t,e,r,n){var i,o,s=t.constructor,a=!t.c[0];if(r!==g){if(r!==~~r||r<(3==e)||r>u)throw Error(3==e?h+"precision":p);for(r=n-(t=new s(t)).e,t.c.length>++n&&v(t,r,s.RM),2==e&&(n=t.e+r+1);t.c.length=s.PE))o=o.charAt(0)+(r>1?"."+o.slice(1):"")+(i<0?"e":"e+")+i;else if(i<0){for(;++i;)o="0"+o;o="0."+o}else if(i>0)if(++i>r)for(i-=r;i--;)o+="0";else i1&&(o=o.charAt(0)+"."+o.slice(1));return t.s<0&&(!a||4==e)?"-"+o:o}y.abs=function(){var t=new this.constructor(this);return t.s=1,t},y.cmp=function(t){var e,r=this,n=r.c,i=(t=new r.constructor(t)).c,o=r.s,s=t.s,a=r.e,u=t.e;if(!n[0]||!i[0])return n[0]?o:i[0]?-s:0;if(o!=s)return o;if(e=o<0,a!=u)return a>u^e?1:-1;for(s=(a=n.length)<(u=i.length)?a:u,o=-1;++oi[o]^e?1:-1;return a==u?0:a>u^e?1:-1},y.div=function(t){var e=this,r=e.constructor,n=e.c,i=(t=new r(t)).c,o=e.s==t.s?1:-1,s=r.DP;if(s!==~~s||s<0||s>u)throw Error(p);if(!i[0])throw Error("[big.js] Division by zero");if(!n[0])return new r(0*o);var a,c,f,l,h,d=i.slice(),y=a=i.length,m=n.length,b=n.slice(0,a),_=b.length,S=t,w=S.c=[],E=0,k=s+(S.e=e.e-t.e)+1;for(S.s=o,o=k<0?0:k,d.unshift(0);_++_?1:-1;else for(h=-1,l=0;++hb[h]?1:-1;break}if(!(l<0))break;for(c=_==a?i:d;_;){if(b[--_]k&&v(S,s,r.RM,b[0]!==g),S},y.eq=function(t){return!this.cmp(t)},y.gt=function(t){return this.cmp(t)>0},y.gte=function(t){return this.cmp(t)>-1},y.lt=function(t){return this.cmp(t)<0},y.lte=function(t){return this.cmp(t)<1},y.minus=y.sub=function(t){var e,r,n,i,o=this,s=o.constructor,a=o.s,u=(t=new s(t)).s;if(a!=u)return t.s=-u,o.plus(t);var c=o.c.slice(),f=o.e,l=t.c,h=t.e;if(!c[0]||!l[0])return l[0]?(t.s=-u,t):new s(c[0]?o:0);if(a=f-h){for((i=a<0)?(a=-a,n=c):(h=f,n=l),n.reverse(),u=a;u--;)n.push(0);n.reverse()}else for(r=((i=c.length0)for(;u--;)c[e++]=0;for(u=e;r>a;){if(c[--r]0?(u=s,e=c):(i=-i,e=a),e.reverse();i--;)e.push(0);e.reverse()}for(a.length-c.length<0&&(e=c,c=a,a=e),i=c.length,o=0;i;a[i]%=10)o=(a[--i]=a[i]+c[i]+o)/10|0;for(o&&(a.unshift(o),++u),i=a.length;0===a[--i];)a.pop();return t.c=a,t.e=u,t},y.pow=function(t){var e=this,r=new e.constructor(1),n=r,i=t<0;if(t!==~~t||t<-1e6||t>1e6)throw Error(h+"exponent");for(i&&(t=-t);1&t&&(n=n.times(e)),t>>=1;)e=e.times(e);return i?r.div(n):n},y.round=function(t,e){var r=this.constructor;if(t===g)t=0;else if(t!==~~t||t<-u||t>u)throw Error(p);return v(new r(this),t,e===g?r.RM:e)},y.sqrt=function(){var t,e,r,n=this,i=n.constructor,o=n.s,s=n.e,a=new i(.5);if(!n.c[0])return new i(n);if(o<0)throw Error(l+"No square root");0===(o=Math.sqrt(n+""))||o===1/0?((e=n.c.join("")).length+s&1||(e+="0"),s=((s+1)/2|0)-(s<0||1&s),t=new i(((o=Math.sqrt(e))==1/0?"1e":(o=o.toExponential()).slice(0,o.indexOf("e")+1))+s)):t=new i(o),s=t.e+(i.DP+=4);do{r=t,t=a.times(r.plus(n.div(r)))}while(r.c.slice(0,s).join("")!==t.c.slice(0,s).join(""));return v(t,i.DP-=4,i.RM)},y.times=y.mul=function(t){var e,r=this,n=r.constructor,i=r.c,o=(t=new n(t)).c,s=i.length,a=o.length,u=r.e,c=t.e;if(t.s=r.s==t.s?1:-1,!i[0]||!o[0])return new n(0*t.s);for(t.e=u+c,su;)a=e[c]+o[u]*i[c-u-1]+a,e[c--]=a%10,a=a/10|0;e[c]=(e[c]+a)%10}for(a?++t.e:e.shift(),u=e.length;!e[--u];)e.pop();return t.c=e,t},y.toExponential=function(t){return b(this,1,t,t)},y.toFixed=function(t){return b(this,2,t,this.e+t)},y.toPrecision=function(t){return b(this,3,t,t-1)},y.toString=function(){return b(this)},y.valueOf=y.toJSON=function(){return b(this,4)},(o=function t(){function e(r){var n=this;if(!(n instanceof e))return r===g?t():new e(r);r instanceof e?(n.s=r.s,n.e=r.e,n.c=r.c.slice()):function(t,e){var r,n,i;if(0===e&&1/e<0)e="-0";else if(!m.test(e+=""))throw Error(h+"number");for(t.s="-"==e.charAt(0)?(e=e.slice(1),-1):1,(r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),i=e.length,n=0;n0&&"0"==e.charAt(--i););for(t.e=r-n-1,t.c=[],r=0;n<=i;)t.c[r++]=+e.charAt(n++)}}(n,r),n.constructor=e}return e.prototype=y,e.DP=s,e.RM=a,e.NE=c,e.PE=f,e.version="5.2.2",e}()).default=o.Big=o,void 0===(n=function(){return o}.call(e,r,e,t))||(t.exports=n)}()},function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=r,r.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},,,,,,function(t,e,r){"use strict";var n,i,o,s=r(389),a="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";function u(){o=!1}function c(t){if(t){if(t!==n){if(t.length!==a.length)throw new Error("Custom alphabet for shortid must be "+a.length+" unique characters. You submitted "+t.length+" characters: "+t);var e=t.split("").filter(function(t,e,r){return e!==r.lastIndexOf(t)});if(e.length)throw new Error("Custom alphabet for shortid must be "+a.length+" unique characters. These characters were not unique: "+e.join(", "));n=t,u()}}else n!==a&&(n=a,u())}function f(){return o||(o=function(){n||c(a);for(var t,e=n.split(""),r=[],i=s.nextValue();e.length>0;)i=s.nextValue(),t=Math.floor(i*e.length),r.push(e.splice(t,1)[0]);return r.join("")}())}t.exports={get:function(){return n||a},characters:function(t){return c(t),n},seed:function(t){s.seed(t),i!==t&&(u(),i=t)},lookup:function(t){return f()[t]},shuffled:f}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.preArrayOf=function(t,e,r){return function(){for(var n=arguments.length,i=Array(n),o=0;ot.toJSON()),multihash:this._cid.toBaseEncodedString(),size:this.size})),Object.assign({},this._json)}toString(){return`DAGNode <${this._cid.toBaseEncodedString()} - data: "${this.data.toString()}", links: ${this.links.length}, size: ${this.size}>`}get data(){return this._data}set data(t){throw new Error("Can't set property: 'data' is immutable")}get links(){return this._links}set links(t){throw new Error("Can't set property: 'links' is immutable")}get serialized(){return this._serialized}set serialized(t){throw new Error("Can't set property: 'serialized' is immutable")}get size(){return void 0===this._size&&(this._size=this.links.reduce((t,e)=>t+e.size,this.serialized.length)),this._size}set size(t){throw new Error("Can't set property: 'size' is immutable")}get multihash(){return this._cid.buffer}set multihash(t){throw new Error("Can't set property: 'multihash' is immutable")}get cid(){return this._cid}set cid(t){throw new Error("Can't set property: 'cid' is immutable")}},{className:"DAGNode",symbolName:"@ipld/js-ipld-dag-pb/dagnode"})).create=r(132),e.clone=r(451),e.addLink=r(452),e.rmLink=r(453)}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e){const n=r(63),i=r(318),o=r(162).serialize,s=r(134).linkSort,a=r(131),u=r(76);t.exports=function(t,r,c,f){if("function"==typeof t?(f=t,t=void 0):"string"==typeof t&&(t=e.from(t)),"function"==typeof r&&(f=r,r=[]),"function"==typeof c&&(f=c,c=void 0),!e.isBuffer(t))return f(new Error("Passed 'data' is not a buffer or a string!"));c||(c="sha2-256");const l=r.map(t=>u.isDAGLink(t)?t:u.util.createDagLinkFromB58EncodedHash(t)),h=i(l,s);o({data:t,links:h},(e,r)=>{if(e)return f(e);n(r,c,(e,n)=>{if(e)return f(e);const i=new a(t,h,r,n);f(null,i)})})}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(){if(null===t)throw new Error("Callback was already called.");var e=t;t=null,e.apply(this,arguments)}},t.exports=e.default},function(t,e,r){"use strict";(function(n){const i=r(76);(e=t.exports).cloneData=function(t){let e;return t.data&&t.data.length>0?(e=n.alloc(t.data.length),t.data.copy(e)):e=n.alloc(0),e},e.cloneLinks=function(t){return t.links.slice()},e.linkSort=function(t,e){const r=n.from(t.name||""),i=n.from(e.name||"");return r.compare(i)},e.toDAGLink=function(t){return new i("",t.size,t.multihash)}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.prePeerIdToJson=e.prePeerIdFromJson=e.isPeerIdJson=e.isPeerId=e.peerIdToJson=e.peerIdFromJson=e.prePeerInfoToJson=e.prePeerInfoFromJson=e.isPeerInfoJson=e.isPeerInfo=e.peerInfoToJson=e.peerInfoFromJson=void 0;var n=s(r(455)),i=s(r(533)),o=r(103);function s(t){return t&&t.__esModule?t:{default:t}}var a=e.peerInfoFromJson=function(t){return l(t.id).then(function(e){var r=new n.default(e);return t.multiaddrs.forEach(function(t){r.multiaddrs.add((0,o.multiaddrFromJson)(t))}),t._connectedMultiaddr&&r.connect((0,o.multiaddrFromJson)(t._connectedMultiaddr)),r})},u=e.peerInfoToJson=function(t){return{__ipfsPostMsgProxyType:"PeerInfo",id:h(t.id),multiaddrs:t.multiaddrs.toArray().map(o.multiaddrToJson),_connectedMultiaddr:t._connectedMultiaddr?(0,o.multiaddrToJson)(t._connectedMultiaddr):null}},c=e.isPeerInfo=n.default.isPeerInfo,f=e.isPeerInfoJson=function(t){return t&&"PeerInfo"===t.__ipfsPostMsgProxyType},l=(e.prePeerInfoFromJson=function(t){return function(){for(var e=arguments.length,r=Array(e),n=0;n>>24]^f[d>>>16&255]^l[y>>>8&255]^h[255&g]^e[m++],s=c[d>>>24]^f[y>>>16&255]^l[g>>>8&255]^h[255&p]^e[m++],a=c[y>>>24]^f[g>>>16&255]^l[p>>>8&255]^h[255&d]^e[m++],u=c[g>>>24]^f[p>>>16&255]^l[d>>>8&255]^h[255&y]^e[m++],p=o,d=s,y=a,g=u;return o=(n[p>>>24]<<24|n[d>>>16&255]<<16|n[y>>>8&255]<<8|n[255&g])^e[m++],s=(n[d>>>24]<<24|n[y>>>16&255]<<16|n[g>>>8&255]<<8|n[255&p])^e[m++],a=(n[y>>>24]<<24|n[g>>>16&255]<<16|n[p>>>8&255]<<8|n[255&d])^e[m++],u=(n[g>>>24]<<24|n[p>>>16&255]<<16|n[d>>>8&255]<<8|n[255&y])^e[m++],[o>>>=0,s>>>=0,a>>>=0,u>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,u=0;u<256;++u){var c=a^a<<1^a<<2^a<<3^a<<4;c=c>>>8^255&c^99,r[s]=c,n[c]=s;var f=t[s],l=t[f],h=t[l],p=257*t[c]^16843008*c;i[0][s]=p<<24|p>>>8,i[1][s]=p<<16|p>>>16,i[2][s]=p<<8|p>>>24,i[3][s]=p,p=16843009*h^65537*l^257*f^16843008*s,o[0][c]=p<<24|p>>>8,o[1][c]=p<<16|p>>>16,o[2][c]=p<<8|p>>>24,o[3][c]=p,0===s?s=a=1:(s=f^t[t[t[h^f]]],a^=t[t[a]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function c(t){this._key=i(t),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=4*(r+1),i=[],o=0;o>>24,s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s],s^=a[o/e|0]<<24):e>6&&o%e==4&&(s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s]),i[o]=i[o-e]^s}for(var c=[],f=0;f>>24]]^u.INV_SUB_MIX[1][u.SBOX[h>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[h>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&h]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(t){return s(t=i(t),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=n.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},c.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var r=s(t,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=c},function(t,e,r){"use strict";(function(e){!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,n)});case 4:return e.nextTick(function(){t.call(null,r,n,i)});default:for(o=new Array(a-1),s=0;s8?3:1,m=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],b=0,_=0;_>>4^w))<<4,S^=e=65535&((w^=e)>>>-16^S),S^=(e=858993459&(S>>>2^(w^=e<<-16)))<<2,S^=e=65535&((w^=e)>>>-16^S),S^=(e=1431655765&(S>>>1^(w^=e<<-16)))<<1,S^=e=16711935&((w^=e)>>>8^S),e=(S^=(e=1431655765&(S>>>1^(w^=e<<8)))<<1)<<8|(w^=e)>>>20&240,S=w<<24|w<<8&16711680|w>>>8&65280|w>>>24&240,w=e;for(var E=0;E>>26,w=w<<2|w>>>26):(S=S<<1|S>>>27,w=w<<1|w>>>27);var k=r[(S&=-15)>>>28]|n[S>>>24&15]|i[S>>>20&15]|o[S>>>16&15]|s[S>>>12&15]|a[S>>>8&15]|u[S>>>4&15],C=c[(w&=-15)>>>28]|f[w>>>24&15]|l[w>>>20&15]|h[w>>>16&15]|p[w>>>12&15]|d[w>>>8&15]|y[w>>>4&15];e=65535&(C>>>16^k),m[b++]=k^e,m[b++]=C^e<<16}}return m}(e),this._init=!0}},i("DES-ECB",n.cipher.modes.ecb),i("DES-CBC",n.cipher.modes.cbc),i("DES-CFB",n.cipher.modes.cfb),i("DES-OFB",n.cipher.modes.ofb),i("DES-CTR",n.cipher.modes.ctr),i("3DES-ECB",n.cipher.modes.ecb),i("3DES-CBC",n.cipher.modes.cbc),i("3DES-CFB",n.cipher.modes.cfb),i("3DES-OFB",n.cipher.modes.ofb),i("3DES-CTR",n.cipher.modes.ctr);var o=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],s=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],a=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],u=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],c=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],f=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],l=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],h=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function p(t,e,r,n){var i,p,d=32===t.length?3:9;i=3===d?n?[30,-2,-2]:[0,32,2]:n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var y=e[0],g=e[1];y^=(p=252645135&(y>>>4^g))<<4,y^=(p=65535&(y>>>16^(g^=p)))<<16,y^=p=858993459&((g^=p)>>>2^y),y^=p=16711935&((g^=p<<2)>>>8^y),y=(y^=(p=1431655765&(y>>>1^(g^=p<<8)))<<1)<<1|y>>>31,g=(g^=p)<<1|g>>>31;for(var m=0;m>>4|g<<28)^t[_+1];p=y,y=g,g=p^(s[S>>>24&63]|u[S>>>16&63]|f[S>>>8&63]|h[63&S]|o[w>>>24&63]|a[w>>>16&63]|c[w>>>8&63]|l[63&w])}p=y,y=g,g=p}g=g>>>1|g<<31,g^=p=1431655765&((y=y>>>1|y<<31)>>>1^g),g^=(p=16711935&(g>>>8^(y^=p<<1)))<<8,g^=(p=858993459&(g>>>2^(y^=p)))<<2,g^=p=65535&((y^=p)>>>16^g),g^=p=252645135&((y^=p<<16)>>>4^g),y^=p<<4,r[0]=y,r[1]=g}function d(t){var e,r="DES-"+((t=t||{}).mode||"CBC").toUpperCase(),i=(e=t.decrypt?n.cipher.createDecipher(r,t.key):n.cipher.createCipher(r,t.key)).start;return e.start=function(t,r){var o=null;r instanceof n.util.ByteBuffer&&(o=r,r={}),(r=r||{}).output=o,r.iv=t,i.call(e,r)},e}},function(t,e,r){var n=r(8);if(r(59),r(140),r(82),r(251),r(252),r(43),r(13),void 0===i)var i=n.jsbn.BigInteger;var o=n.asn1;n.pki=n.pki||{},t.exports=n.pki.rsa=n.rsa=n.rsa||{};var s=n.pki,a=[6,4,2,4,2,4,6,2],u={name:"PrivateKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},c={name:"RSAPrivateKey",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},f={name:"RSAPublicKey",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},l=n.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:o.Class.UNIVERSAL,type:o.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},h=function(t){var e;if(!(t.algorithm in s.oids)){var r=new Error("Unknown message digest algorithm.");throw r.algorithm=t.algorithm,r}e=s.oids[t.algorithm];var n=o.oidToDer(e).getBytes(),i=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[]),a=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[]);a.value.push(o.create(o.Class.UNIVERSAL,o.Type.OID,!1,n)),a.value.push(o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,""));var u=o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,t.digest().getBytes());return i.value.push(a),i.value.push(u),o.toDer(i).getBytes()},p=function(t,e,r){if(r)return t.modPow(e.e,e.n);if(!e.p||!e.q)return t.modPow(e.d,e.n);var o;e.dP||(e.dP=e.d.mod(e.p.subtract(i.ONE))),e.dQ||(e.dQ=e.d.mod(e.q.subtract(i.ONE))),e.qInv||(e.qInv=e.q.modInverse(e.p));do{o=new i(n.util.bytesToHex(n.random.getBytes(e.n.bitLength()/8)),16)}while(o.compareTo(e.n)>=0||!o.gcd(e.n).equals(i.ONE));for(var s=(t=t.multiply(o.modPow(e.e,e.n)).mod(e.n)).mod(e.p).modPow(e.dP,e.p),a=t.mod(e.q).modPow(e.dQ,e.q);s.compareTo(a)<0;)s=s.add(e.p);var u=s.subtract(a).multiply(e.qInv).mod(e.p).multiply(e.q).add(a);return u=u.multiply(o.modInverse(e.n)).mod(e.n)};function d(t,e,r){var i=n.util.createBuffer(),o=Math.ceil(e.n.bitLength()/8);if(t.length>o-11){var s=new Error("Message is too long for PKCS#1 v1.5 padding.");throw s.length=t.length,s.max=o-11,s}i.putByte(0),i.putByte(r);var a,u=o-3-t.length;if(0===r||1===r){a=0===r?0:255;for(var c=0;c0;){var f=0,l=n.random.getBytes(u);for(c=0;c1;){if(255!==s.getByte()){--s.read;break}++c}else if(2===u)for(c=0;s.length()>1;){if(0===s.getByte()){--s.read;break}++c}if(0!==s.getByte()||c!==o-3-s.length())throw new Error("Encryption block is invalid.");return s.getBytes()}function g(t){var e=t.toString(16);e[0]>="8"&&(e="00"+e);var r=n.util.hexToBytes(e);return r.length>1&&(0===r.charCodeAt(0)&&0==(128&r.charCodeAt(1))||255===r.charCodeAt(0)&&128==(128&r.charCodeAt(1)))?r.substr(1):r}function m(t){return t<=100?27:t<=150?18:t<=200?15:t<=250?12:t<=300?9:t<=350?8:t<=400?7:t<=500?6:t<=600?5:t<=800?4:t<=1250?3:2}function v(t){return"undefined"!=typeof window&&"object"==typeof window.crypto&&"object"==typeof window.crypto.subtle&&"function"==typeof window.crypto.subtle[t]}function b(t){return"undefined"!=typeof window&&"object"==typeof window.msCrypto&&"object"==typeof window.msCrypto.subtle&&"function"==typeof window.msCrypto.subtle[t]}function _(t){for(var e=n.util.hexToBytes(t.toString(16)),r=new Uint8Array(e.length),i=0;i0;)f.putByte(0),--l;return f.putBytes(n.util.hexToBytes(c)),f.getBytes()},s.rsa.decrypt=function(t,e,r,o){var s=Math.ceil(e.n.bitLength()/8);if(t.length!==s){var a=new Error("Encrypted message length is invalid.");throw a.length=t.length,a.expected=s,a}var u=new i(n.util.createBuffer(t).toHex(),16);if(u.compareTo(e.n)>=0)throw new Error("Encrypted message is invalid.");for(var c=p(u,e,r).toString(16),f=n.util.createBuffer(),l=s-Math.ceil(c.length/2);l>0;)f.putByte(0),--l;return f.putBytes(n.util.hexToBytes(c)),!1!==o?y(f.getBytes(),e,r):f.getBytes()},s.rsa.createKeyPairGenerationState=function(t,e,r){"string"==typeof t&&(t=parseInt(t,10)),t=t||2048;var o,s=(r=r||{}).prng||n.random,a={nextBytes:function(t){for(var e=s.getBytesSync(t.length),r=0;r>1,pBits:t-(t>>1),pqState:0,num:null,keys:null}).e.fromInt(o.eInt),o},s.rsa.stepKeyPairGenerationState=function(t,e){"algorithm"in t||(t.algorithm="PRIMEINC");var r=new i(null);r.fromInt(30);for(var n,o=0,u=function(t,e){return t|e},c=+new Date,f=0;null===t.keys&&(e<=0||fl?t.pqState=0:t.num.isProbablePrime(m(t.num.bitLength()))?++t.pqState:t.num.dAddOffset(a[o++%8],0):2===t.pqState?t.pqState=0===t.num.subtract(i.ONE).gcd(t.e).compareTo(i.ONE)?3:0:3===t.pqState&&(t.pqState=0,null===t.p?t.p=t.num:t.q=t.num,null!==t.p&&null!==t.q&&++t.state,t.num=null)}else if(1===t.state)t.p.compareTo(t.q)<0&&(t.num=t.p,t.p=t.q,t.q=t.num),++t.state;else if(2===t.state)t.p1=t.p.subtract(i.ONE),t.q1=t.q.subtract(i.ONE),t.phi=t.p1.multiply(t.q1),++t.state;else if(3===t.state)0===t.phi.gcd(t.e).compareTo(i.ONE)?++t.state:(t.p=null,t.q=null,t.state=0);else if(4===t.state)t.n=t.p.multiply(t.q),t.n.bitLength()===t.bits?++t.state:(t.q=null,t.state=0);else if(5===t.state){var p=t.e.modInverse(t.phi);t.keys={privateKey:s.rsa.setPrivateKey(t.n,t.e,p,t.p,t.q,p.mod(t.p1),p.mod(t.q1),t.q.modInverse(t.p)),publicKey:s.rsa.setPublicKey(t.n,t.e)}}f+=(n=+new Date)-c,c=n}return null!==t.keys},s.rsa.generateKeyPair=function(t,e,r,a){if(1===arguments.length?"object"==typeof t?(r=t,t=void 0):"function"==typeof t&&(a=t,t=void 0):2===arguments.length?"number"==typeof t?"function"==typeof e?(a=e,e=void 0):"number"!=typeof e&&(r=e,e=void 0):(r=t,a=e,t=void 0,e=void 0):3===arguments.length&&("number"==typeof e?"function"==typeof r&&(a=r,r=void 0):(a=r,r=e,e=void 0)),r=r||{},void 0===t&&(t=r.bits||2048),void 0===e&&(e=r.e||65537),!n.options.usePureJavaScript&&a&&t>=256&&t<=16384&&(65537===e||3===e)){if(v("generateKey")&&v("exportKey"))return window.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:_(e),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(t){return window.crypto.subtle.exportKey("pkcs8",t.privateKey)}).then(void 0,function(t){a(t)}).then(function(t){if(t){var e=s.privateKeyFromAsn1(o.fromDer(n.util.createBuffer(t)));a(null,{privateKey:e,publicKey:s.setRsaPublicKey(e.n,e.e)})}});if(b("generateKey")&&b("exportKey")){var u=window.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:_(e),hash:{name:"SHA-256"}},!0,["sign","verify"]);return u.oncomplete=function(t){var e=t.target.result,r=window.msCrypto.subtle.exportKey("pkcs8",e.privateKey);r.oncomplete=function(t){var e=t.target.result,r=s.privateKeyFromAsn1(o.fromDer(n.util.createBuffer(e)));a(null,{privateKey:r,publicKey:s.setRsaPublicKey(r.n,r.e)})},r.onerror=function(t){a(t)}},void(u.onerror=function(t){a(t)})}}var c=s.rsa.createKeyPairGenerationState(t,e,r);if(!a)return s.rsa.stepKeyPairGenerationState(c,0),c.keys;!function(t,e,r){"function"==typeof e&&(r=e,e={});var o={algorithm:{name:(e=e||{}).algorithm||"PRIMEINC",options:{workers:e.workers||2,workLoad:e.workLoad||100,workerScript:e.workerScript}}};"prng"in e&&(o.prng=e.prng);function a(){u(t.pBits,function(e,n){return e?r(e):(t.p=n,null!==t.q?c(e,t.q):void u(t.qBits,c))})}function u(t,e){n.prime.generateProbablePrime(t,o,e)}function c(e,n){if(e)return r(e);if(t.q=n,t.p.compareTo(t.q)<0){var o=t.p;t.p=t.q,t.q=o}if(0!==t.p.subtract(i.ONE).gcd(t.e).compareTo(i.ONE))return t.p=null,void a();if(0!==t.q.subtract(i.ONE).gcd(t.e).compareTo(i.ONE))return t.q=null,void u(t.qBits,c);if(t.p1=t.p.subtract(i.ONE),t.q1=t.q.subtract(i.ONE),t.phi=t.p1.multiply(t.q1),0!==t.phi.gcd(t.e).compareTo(i.ONE))return t.p=t.q=null,void a();if(t.n=t.p.multiply(t.q),t.n.bitLength()!==t.bits)return t.q=null,void u(t.qBits,c);var f=t.e.modInverse(t.phi);t.keys={privateKey:s.rsa.setPrivateKey(t.n,t.e,f,t.p,t.q,f.mod(t.p1),f.mod(t.q1),t.q.modInverse(t.p)),publicKey:s.rsa.setPublicKey(t.n,t.e)},r(null,t.keys)}a()}(c,r,a)},s.setRsaPublicKey=s.rsa.setPublicKey=function(t,e){var r={n:t,e:e,encrypt:function(t,e,i){if("string"==typeof e?e=e.toUpperCase():void 0===e&&(e="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===e)e={encode:function(t,e,r){return d(t,e,2).getBytes()}};else if("RSA-OAEP"===e||"RSAES-OAEP"===e)e={encode:function(t,e){return n.pkcs1.encode_rsa_oaep(e,t,i)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(e))e={encode:function(t){return t}};else if("string"==typeof e)throw new Error('Unsupported encryption scheme: "'+e+'".');var o=e.encode(t,r,!0);return s.rsa.encrypt(o,r,!0)},verify:function(t,e,n){"string"==typeof n?n=n.toUpperCase():void 0===n&&(n="RSASSA-PKCS1-V1_5"),"RSASSA-PKCS1-V1_5"===n?n={verify:function(t,e){return e=y(e,r,!0),t===o.fromDer(e).value[1].value}}:"NONE"!==n&&"NULL"!==n&&null!==n||(n={verify:function(t,e){return t===(e=y(e,r,!0))}});var i=s.rsa.decrypt(e,r,!0,!1);return n.verify(t,i,r.n.bitLength())}};return r},s.setRsaPrivateKey=s.rsa.setPrivateKey=function(t,e,r,i,o,a,u,c){var f={n:t,e:e,d:r,p:i,q:o,dP:a,dQ:u,qInv:c,decrypt:function(t,e,r){"string"==typeof e?e=e.toUpperCase():void 0===e&&(e="RSAES-PKCS1-V1_5");var i=s.rsa.decrypt(t,f,!1,!1);if("RSAES-PKCS1-V1_5"===e)e={decode:y};else if("RSA-OAEP"===e||"RSAES-OAEP"===e)e={decode:function(t,e){return n.pkcs1.decode_rsa_oaep(e,t,r)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(e))throw new Error('Unsupported encryption scheme: "'+e+'".');e={decode:function(t){return t}}}return e.decode(i,f,!1)},sign:function(t,e){var r=!1;"string"==typeof e&&(e=e.toUpperCase()),void 0===e||"RSASSA-PKCS1-V1_5"===e?(e={encode:h},r=1):"NONE"!==e&&"NULL"!==e&&null!==e||(e={encode:function(){return t}},r=1);var n=e.encode(t,f.n.bitLength());return s.rsa.encrypt(n,f,r)}};return f},s.wrapRsaPrivateKey=function(t){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(0).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(s.oids.rsaEncryption).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")]),o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,o.toDer(t).getBytes())])},s.privateKeyFromAsn1=function(t){var e,r,a,f,l,h,p,d,y={},g=[];if(o.validate(t,u,y,g)&&(t=o.fromDer(n.util.createBuffer(y.privateKey))),y={},g=[],!o.validate(t,c,y,g)){var m=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw m.errors=g,m}return e=n.util.createBuffer(y.privateKeyModulus).toHex(),r=n.util.createBuffer(y.privateKeyPublicExponent).toHex(),a=n.util.createBuffer(y.privateKeyPrivateExponent).toHex(),f=n.util.createBuffer(y.privateKeyPrime1).toHex(),l=n.util.createBuffer(y.privateKeyPrime2).toHex(),h=n.util.createBuffer(y.privateKeyExponent1).toHex(),p=n.util.createBuffer(y.privateKeyExponent2).toHex(),d=n.util.createBuffer(y.privateKeyCoefficient).toHex(),s.setRsaPrivateKey(new i(e,16),new i(r,16),new i(a,16),new i(f,16),new i(l,16),new i(h,16),new i(p,16),new i(d,16))},s.privateKeyToAsn1=s.privateKeyToRSAPrivateKey=function(t){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(0).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(t.n)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(t.e)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(t.d)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(t.p)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(t.q)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(t.dP)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(t.dQ)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(t.qInv))])},s.publicKeyFromAsn1=function(t){var e={},r=[];if(o.validate(t,l,e,r)){var a,u=o.derToOid(e.publicKeyOid);if(u!==s.oids.rsaEncryption)throw(a=new Error("Cannot read public key. Unknown OID.")).oid=u,a;t=e.rsaPublicKey}if(r=[],!o.validate(t,f,e,r))throw(a=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=r,a;var c=n.util.createBuffer(e.publicKeyModulus).toHex(),h=n.util.createBuffer(e.publicKeyExponent).toHex();return s.setRsaPublicKey(new i(c,16),new i(h,16))},s.publicKeyToAsn1=s.publicKeyToSubjectPublicKeyInfo=function(t){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(s.oids.rsaEncryption).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")]),o.create(o.Class.UNIVERSAL,o.Type.BITSTRING,!1,[s.publicKeyToRSAPublicKey(t)])])},s.publicKeyToRSAPublicKey=function(t){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(t.n)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(t.e))])}},function(t,e,r){var n,i=r(8);t.exports=i.jsbn=i.jsbn||{};function o(t,e,r){this.data=[],null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}function s(){return new o(null)}function a(t,e,r,n,i,o){for(var s=16383&e,a=e>>14;--o>=0;){var u=16383&this.data[t],c=this.data[t++]>>14,f=a*u+c*s;i=((u=s*u+((16383&f)<<14)+r.data[n]+i)>>28)+(f>>14)+a*c,r.data[n++]=268435455&u}return i}i.jsbn.BigInteger=o,"undefined"==typeof navigator?(o.prototype.am=a,n=28):"Microsoft Internet Explorer"==navigator.appName?(o.prototype.am=function(t,e,r,n,i,o){for(var s=32767&e,a=e>>15;--o>=0;){var u=32767&this.data[t],c=this.data[t++]>>15,f=a*u+c*s;i=((u=s*u+((32767&f)<<15)+r.data[n]+(1073741823&i))>>>30)+(f>>>15)+a*c+(i>>>30),r.data[n++]=1073741823&u}return i},n=30):"Netscape"!=navigator.appName?(o.prototype.am=function(t,e,r,n,i,o){for(;--o>=0;){var s=e*this.data[t++]+r.data[n]+i;i=Math.floor(s/67108864),r.data[n++]=67108863&s}return i},n=26):(o.prototype.am=a,n=28),o.prototype.DB=n,o.prototype.DM=(1<>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function g(t){this.m=t}function m(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function E(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function k(){}function C(t){return t}function A(t){this.r2=s(),this.q3=s(),o.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}g.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},g.prototype.revert=function(t){return t},g.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},g.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},g.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},m.prototype.convert=function(t){var e=s();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(o.ZERO)>0&&this.m.subTo(e,e),e},m.prototype.revert=function(t){var e=s();return t.copyTo(e),this.reduce(e),e},m.prototype.reduce=function(t){for(;t.t<=this.mt2;)t.data[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(r=e+this.m.t,t.data[r]+=this.m.am(0,n,t,e,0,this.m.t);t.data[r]>=t.DV;)t.data[r]-=t.DV,t.data[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},m.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},m.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},o.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t.data[e]=this.data[e];t.t=this.t,t.s=this.s},o.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this.data[0]=t:t<-1?this.data[0]=t+this.DV:this.t=0},o.prototype.fromString=function(t,e){var r;if(16==e)r=4;else if(8==e)r=3;else if(256==e)r=8;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)return void this.fromRadix(t,e);r=2}this.t=0,this.s=0;for(var n=t.length,i=!1,s=0;--n>=0;){var a=8==r?255&t[n]:p(t,n);a<0?"-"==t.charAt(n)&&(i=!0):(i=!1,0==s?this.data[this.t++]=a:s+r>this.DB?(this.data[this.t-1]|=(a&(1<>this.DB-s):this.data[this.t-1]|=a<=this.DB&&(s-=this.DB))}8==r&&0!=(128&t[0])&&(this.s=-1,s>0&&(this.data[this.t-1]|=(1<0&&this.data[this.t-1]==t;)--this.t},o.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e.data[r+t]=this.data[r];for(r=t-1;r>=0;--r)e.data[r]=0;e.t=this.t+t,e.s=this.s},o.prototype.drShiftTo=function(t,e){for(var r=t;r=0;--r)e.data[r+s+1]=this.data[r]>>i|a,a=(this.data[r]&o)<=0;--r)e.data[r]=0;e.data[s]=a,e.t=this.t+s+1,e.s=this.s,e.clamp()},o.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var n=t%this.DB,i=this.DB-n,o=(1<>n;for(var s=r+1;s>n;n>0&&(e.data[this.t-r-1]|=(this.s&o)<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e.data[r++]=this.DV+n:n>0&&(e.data[r++]=n),e.t=r,e.clamp()},o.prototype.multiplyTo=function(t,e){var r=this.abs(),n=t.abs(),i=r.t;for(e.t=i+n.t;--i>=0;)e.data[i]=0;for(i=0;i=0;)t.data[r]=0;for(r=0;r=e.DV&&(t.data[r+e.t]-=e.DV,t.data[r+e.t+1]=1)}t.t>0&&(t.data[t.t-1]+=e.am(r,e.data[r],t,2*r,0,1)),t.s=0,t.clamp()},o.prototype.divRemTo=function(t,e,r){var n=t.abs();if(!(n.t<=0)){var i=this.abs();if(i.t0?(n.lShiftTo(f,a),i.lShiftTo(f,r)):(n.copyTo(a),i.copyTo(r));var l=a.t,h=a.data[l-1];if(0!=h){var p=h*(1<1?a.data[l-2]>>this.F2:0),d=this.FV/p,g=(1<=0&&(r.data[r.t++]=1,r.subTo(_,r)),o.ONE.dlShiftTo(l,_),_.subTo(a,a);a.t=0;){var S=r.data[--v]==h?this.DM:Math.floor(r.data[v]*d+(r.data[v-1]+m)*g);if((r.data[v]+=a.am(0,S,r,b,0,l))0&&r.rShiftTo(f,r),u<0&&o.ZERO.subTo(r,r)}}},o.prototype.invDigit=function(){if(this.t<1)return 0;var t=this.data[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},o.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},o.prototype.exp=function(t,e){if(t>4294967295||t<1)return o.ONE;var r=s(),n=s(),i=e.convert(this),a=y(t)-1;for(i.copyTo(r);--a>=0;)if(e.sqrTo(r,n),(t&1<0)e.mulTo(n,i,r);else{var u=r;r=n,n=u}return e.revert(r)},o.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,n=(1<0)for(a>a)>0&&(i=!0,o=h(r));s>=0;)a>(a+=this.DB-e)):(r=this.data[s]>>(a-=e)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=h(r));return i?o:"0"},o.prototype.negate=function(){var t=s();return o.ZERO.subTo(this,t),t},o.prototype.abs=function(){return this.s<0?this.negate():this},o.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this.data[r]-t.data[r]))return e;return 0},o.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+y(this.data[this.t-1]^this.s&this.DM)},o.prototype.mod=function(t){var e=s();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(o.ZERO)>0&&t.subTo(e,e),e},o.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new g(e):new m(e),this.exp(t,r)},o.ZERO=d(0),o.ONE=d(1),k.prototype.convert=C,k.prototype.revert=C,k.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},k.prototype.sqrTo=function(t,e){t.squareTo(e)},A.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=s();return t.copyTo(e),this.reduce(e),e},A.prototype.revert=function(t){return t},A.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},A.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},A.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var T=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],B=(1<<26)/T[T.length-1];o.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},o.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),n=d(r),i=s(),o=s(),a="";for(this.divRemTo(n,i,o);i.signum()>0;)a=(r+o.intValue()).toString(t).substr(1)+a,i.divRemTo(n,i,o);return o.intValue().toString(t)+a},o.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var r=this.chunkSize(e),n=Math.pow(e,r),i=!1,s=0,a=0,u=0;u=r&&(this.dMultiply(n),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(a,0)),i&&o.ZERO.subTo(this,this)},o.prototype.fromNumber=function(t,e,r){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(o.ONE.shiftLeft(t-1),b,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(o.ONE.shiftLeft(t-1),this);else{var n=new Array,i=7&t;n.length=1+(t>>3),e.nextBytes(n),i>0?n[0]&=(1<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e.data[r++]=n:n<-1&&(e.data[r++]=this.DV+n),e.t=r,e.clamp()},o.prototype.dMultiply=function(t){this.data[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},o.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this.data[this.t++]=0;for(this.data[e]+=t;this.data[e]>=this.DV;)this.data[e]-=this.DV,++e>=this.t&&(this.data[this.t++]=0),++this.data[e]}},o.prototype.multiplyLowerTo=function(t,e,r){var n,i=Math.min(this.t+t.t,e);for(r.s=0,r.t=i;i>0;)r.data[--i]=0;for(n=r.t-this.t;i=0;)r.data[n]=0;for(n=Math.max(e-this.t,0);n0)if(0==e)r=this.data[0]%t;else for(var n=this.t-1;n>=0;--n)r=(e*r+this.data[n])%t;return r},o.prototype.millerRabin=function(t){var e=this.subtract(o.ONE),r=e.getLowestSetBit();if(r<=0)return!1;for(var n,i=e.shiftRight(r),s={nextBytes:function(t){for(var e=0;e=0);var u=n.modPow(i,this);if(0!=u.compareTo(o.ONE)&&0!=u.compareTo(e)){for(var c=1;c++>24},o.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},o.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},o.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var r,n=this.DB-t*this.DB%8,i=0;if(t-- >0)for(n>n)!=(this.s&this.DM)>>n&&(e[i++]=r|this.s<=0;)n<8?(r=(this.data[t]&(1<>(n+=this.DB-8)):(r=this.data[t]>>(n-=8)&255,n<=0&&(n+=this.DB,--t)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(e[i++]=r);return e},o.prototype.equals=function(t){return 0==this.compareTo(t)},o.prototype.min=function(t){return this.compareTo(t)<0?this:t},o.prototype.max=function(t){return this.compareTo(t)>0?this:t},o.prototype.and=function(t){var e=s();return this.bitwiseTo(t,v,e),e},o.prototype.or=function(t){var e=s();return this.bitwiseTo(t,b,e),e},o.prototype.xor=function(t){var e=s();return this.bitwiseTo(t,_,e),e},o.prototype.andNot=function(t){var e=s();return this.bitwiseTo(t,S,e),e},o.prototype.not=function(){for(var t=s(),e=0;e=this.t?0!=this.s:0!=(this.data[e]&1<1){var l=s();for(n.sqrTo(a[1],l);u<=f;)a[u]=s(),n.mulTo(l,a[u-2],a[u]),u+=2}var h,p,v=t.t-1,b=!0,_=s();for(i=y(t.data[v])-1;v>=0;){for(i>=c?h=t.data[v]>>i-c&f:(h=(t.data[v]&(1<0&&(h|=t.data[v-1]>>this.DB+i-c)),u=r;0==(1&h);)h>>=1,--u;if((i-=u)<0&&(i+=this.DB,--v),b)a[h].copyTo(o),b=!1;else{for(;u>1;)n.sqrTo(o,_),n.sqrTo(_,o),u-=2;u>0?n.sqrTo(o,_):(p=o,o=_,_=p),n.mulTo(_,a[h],o)}for(;v>=0&&0==(t.data[v]&1<=0?(r.subTo(n,r),e&&i.subTo(a,i),s.subTo(u,s)):(n.subTo(r,n),e&&a.subTo(i,a),u.subTo(s,u))}return 0!=n.compareTo(o.ONE)?o.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u},o.prototype.pow=function(t){return this.exp(t,new k)},o.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var n=e;e=r,r=n}var i=e.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return e;for(i0&&(e.rShiftTo(o,e),r.rShiftTo(o,r));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},o.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r.data[0]<=T[T.length-1]){for(e=0;e>>2,e.words[2]=(63&t[22])<<20|t[23]<<12|t[24]<<4|t[25]>>>4,e.words[3]=(255&t[19])<<18|t[20]<<10|t[21]<<2|t[22]>>>6,e.words[4]=(3&t[15])<<24|t[16]<<16|t[17]<<8|t[18],e.words[5]=(15&t[12])<<22|t[13]<<14|t[14]<<6|t[15]>>>2,e.words[6]=(63&t[9])<<20|t[10]<<12|t[11]<<4|t[12]>>>4,e.words[7]=(255&t[6])<<18|t[7]<<10|t[8]<<2|t[9]>>>6,e.words[8]=(3&t[2])<<24|t[3]<<16|t[4]<<8|t[5],e.words[9]=t[0]<<14|t[1]<<6|t[2]>>>2,e.length=10,e.strip()},o.prototype.toBuffer=function(){for(var t=this.words,e=this.length;e<10;++e)t[e]=0;return n.from([t[9]>>>14&255,t[9]>>>6&255,(63&t[9])<<2|t[8]>>>24&3,t[8]>>>16&255,t[8]>>>8&255,255&t[8],t[7]>>>18&255,t[7]>>>10&255,t[7]>>>2&255,(3&t[7])<<6|t[6]>>>20&63,t[6]>>>12&255,t[6]>>>4&255,(15&t[6])<<4|t[5]>>>22&15,t[5]>>>14&255,t[5]>>>6&255,(63&t[5])<<2|t[4]>>>24&3,t[4]>>>16&255,t[4]>>>8&255,255&t[4],t[3]>>>18&255,t[3]>>>10&255,t[3]>>>2&255,(3&t[3])<<6|t[2]>>>20&63,t[2]>>>12&255,t[2]>>>4&255,(15&t[2])<<4|t[1]>>>22&15,t[1]>>>14&255,t[1]>>>6&255,(63&t[1])<<2|t[0]>>>24&3,t[0]>>>16&255,t[0]>>>8&255,255&t[0]])},o.prototype.clone=function(){var t=new o;t.words=new Array(this.length);for(var e=0;e1&&0==(0|this.words[this.length-1]);)this.length--;return this},o.prototype.normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.ucmp=function(t){if(this.length!==t.length)return this.length>t.length?1:-1;for(var e=this.length-1;e>=0;--e)if(this.words[e]!==t.words[e])return this.words[e]>t.words[e]?1:-1;return 0},o.prototype.gtOne=function(){return this.length>1||this.words[0]>1},o.prototype.isOverflow=function(){return this.ucmp(o.n)>=0},o.prototype.isHigh=function(){return 1===this.ucmp(o.nh)},o.prototype.bitLengthGT256=function(){return this.length>10||10===this.length&&this.words[9]>4194303},o.prototype.iuaddn=function(t){this.words[0]+=t;for(var e=0;this.words[e]>67108863&&et.length?(e=this,r=t):(e=t,r=this);for(var n=0,i=0;n>>26}for(;0!==i&&n>>26;if(this.length=e.length,0!==i)this.words[this.length++]=i;else if(e!==this)for(;n0?(e=this,r=t):(e=t,r=this);for(var i=0,o=0;i>26,this.words[i]=67108863&s}for(;0!==o&&i>26,this.words[i]=67108863&s;if(0===o&&i>>26,u=67108863&i,c=Math.max(0,o-t.length+1),f=Math.min(o,e.length-1);c<=f;c++){var l=o-c,h=t.words[l]*e.words[c]+u;a+=h/67108864|0,u=67108863&h}r.words[o]=u,i=a}return 0!==i&&(r.words[r.length++]=i),r.strip()},o.umulTo10x10=Math.imul?i.umulTo10x10:o.umulTo,o.umulnTo=function(t,e,r){if(0===e)return r.words=[0],r.length=1,r;for(var n=0,i=0;n0?(r.words[n]=i,r.length=t.length+1):r.length=t.length,r},o.prototype.umul=function(t){var e=new o;return e.words=new Array(this.length+t.length),10===this.length&&10===t.length?o.umulTo10x10(this,t,e):1===this.length?o.umulnTo(t,this.words[0],e):1===t.length?o.umulnTo(this,t.words[0],e):o.umulTo(this,t,e)},o.prototype.isplit=function(t){t.length=Math.min(this.length,9);for(var e=0;e>>22,r=n}return r>>>=22,this.words[e-10]=r,0===r&&this.length>10?this.length-=10:this.length-=9,this},o.prototype.fireduce=function(){return this.isOverflow()&&this.isub(o.n),this},o.prototype.ureduce=function(){var t=this.clone().isplit(o.tmp).umul(o.nc).iadd(o.tmp);return t.bitLengthGT256()&&(t=t.isplit(o.tmp).umul(o.nc).iadd(o.tmp)).bitLengthGT256()&&(t=t.isplit(o.tmp).umul(o.nc).iadd(o.tmp)),t.fireduce()},o.prototype.ishrn=function(t){for(var e=(1<=0;--n){var o=this.words[n];this.words[n]=i<>>t,i=o&e}return this.length>1&&0===this.words[this.length-1]&&(this.length-=1),this},o.prototype.uinvm=function(){for(var t=this.clone(),e=o.n.clone(),r=o.fromNumber(1),n=o.fromNumber(0),i=o.fromNumber(0),s=o.fromNumber(1);t.isEven()&&e.isEven();){for(var a=1,u=1;0==(t.words[0]&u)&&0==(e.words[0]&u)&&a<26;++a,u<<=1);t.ishrn(a),e.ishrn(a)}for(var c=e.clone(),f=t.clone();!t.isZero();){for(var l=0,h=1;0==(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.ishrn(l);l-- >0;)(r.isOdd()||n.isOdd())&&(r.iadd(c),n.isub(f)),r.ishrn(1),n.ishrn(1);for(var p=0,d=1;0==(e.words[0]&d)&&p<26;++p,d<<=1);if(p>0)for(e.ishrn(p);p-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(f)),i.ishrn(1),s.ishrn(1);t.ucmp(e)>=0?(t.isub(e),r.isub(i),n.isub(s)):(e.isub(t),i.isub(r),s.isub(n))}if(1===i.negative){i.negative=0;var y=i.ureduce();return y.negative^=1,y.normSign().iadd(o.n)}return i.ureduce()},o.prototype.imulK=function(){this.words[this.length]=0,this.words[this.length+1]=0,this.length+=2;for(var t=0,e=0;t0?this.isub(o.p):this.strip(),this},o.prototype.redNeg=function(){return this.isZero()?o.fromNumber(0):o.p.sub(this)},o.prototype.redAdd=function(t){return this.clone().redIAdd(t)},o.prototype.redIAdd=function(t){return this.iadd(t),this.ucmp(o.p)>=0&&this.isub(o.p),this},o.prototype.redIAdd7=function(){return this.iuaddn(7),this.ucmp(o.p)>=0&&this.isub(o.p),this},o.prototype.redSub=function(t){return this.clone().redISub(t)},o.prototype.redISub=function(t){return this.isub(t),0!==this.negative&&this.iadd(o.p),this},o.prototype.redMul=function(t){return this.umul(t).redIReduce()},o.prototype.redSqr=function(){return this.umul(this).redIReduce()},o.prototype.redSqrt=function(){if(this.isZero())return this.clone();for(var t=this.redSqr(),e=t.redSqr(),r=e.redSqr().redMul(e),n=r.redMul(t),i=n.redMul(this),o=i,s=0;s<54;++s)o=o.redSqr().redSqr().redSqr().redSqr().redMul(i);for(o=o.redSqr().redSqr().redSqr().redSqr().redMul(n),s=0;s<5;++s)o=o.redSqr().redSqr().redSqr().redSqr().redMul(i);return 0===(o=(o=o.redSqr().redSqr().redSqr().redSqr().redMul(r)).redSqr().redSqr().redSqr().redSqr().redSqr().redSqr().redMul(r)).redSqr().ucmp(this)?o:null},o.prototype.redInvm=function(){for(var t,e=this.clone(),r=o.p.clone(),n=o.fromNumber(1),i=o.fromNumber(0);e.gtOne()&&r.gtOne();){for(var s=0,a=1;0==(e.words[0]&a)&&s<26;++s,a<<=1);if(s>0)for(e.ishrn(s);s-- >0;)n.isOdd()&&n.iadd(o.p),n.ishrn(1);for(var u=0,c=1;0==(r.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(r.ishrn(u);u-- >0;)i.isOdd()&&i.iadd(o.p),i.ishrn(1);e.ucmp(r)>=0?(e.isub(r),n.isub(i)):(r.isub(e),i.isub(n))}return 0!==(t=1===e.length&&1===e.words[0]?n:i).negative&&t.iadd(o.p),0!==t.negative?(t.negative=0,t.redIReduce().redNeg()):t.redIReduce()},o.prototype.getNAF=function(t){for(var e=[],r=1<>1,o=this.clone();!o.isZero();){for(var s=0,a=1;0==(o.words[0]&a)&&s<26;++s,a<<=1)e.push(0);if(0!==s)o.ishrn(s);else{var u=o.words[0]&n;if(u>=i)e.push(i-u),o.iuaddn(u-i).ishrn(1);else if(e.push(u),o.words[0]-=u,!o.isZero()){for(s=t-1;s>0;--s)e.push(0);o.ishrn(t)}}}return e},o.prototype.inspect=function(){if(this.isZero())return"0";for(var t=this.toBuffer().toString("hex"),e=0;"0"===t[e];++e);return t.slice(e)},o.n=o.fromBuffer(n.from("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141","hex")),o.nh=o.n.clone().ishrn(1),o.nc=o.fromBuffer(n.from("000000000000000000000000000000014551231950B75FC4402DA1732FC9BEBF","hex")),o.p=o.fromBuffer(n.from("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F","hex")),o.psn=o.p.sub(o.n),o.tmp=new o,o.tmp.words=new Array(10),o.fromNumber(1).words[3]=0,t.exports=o},function(t,e,r){"use strict";var n=r(285);t.exports=function(t,e){return function(r,i){if(r)return n(i,r,e);if(null!=t){var o=t;t=null,i(null,o)}else i(!0)}}},,,,,function(t,e,r){"use strict";(function(n){const i=r(407);(e=t.exports=s).encode=function(t,e){const r=a(t);return s(r.name,n.from(r.encode(e)))},e.decode=function(t){n.isBuffer(t)&&(t=t.toString());const e=t.substring(0,1);"string"==typeof(t=t.substring(1,t.length))&&(t=n.from(t));const r=a(e);return n.from(r.decode(t.toString()))},e.isEncoded=function(t){n.isBuffer(t)&&(t=t.toString());if("[object String]"!==Object.prototype.toString.call(t))return!1;const e=t.substring(0,1);try{const t=a(e);return t.name}catch(t){return!1}},e.names=Object.freeze(Object.keys(i.names)),e.codes=Object.freeze(Object.keys(i.codes));const o=new Error("Unsupported encoding");function s(t,e){if(!e)throw new Error("requires an encoded buffer");const r=a(t),i=n.from(r.code);return function(t,e){a(t).decode(e.toString())}(r.name,e),n.concat([i,e])}function a(t){let e;if(i.names[t])e=i.names[t];else{if(!i.codes[t])throw o;e=i.codes[t]}if(!e.isImplemented())throw new Error("Base "+t+" is not implemented yet");return e}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(r){(e=t.exports).raw=r.from("55","hex"),e.base1=r.from("01","hex"),e.base2=r.from("00","hex"),e.base8=r.from("07","hex"),e.base10=r.from("09","hex"),e.cbor=r.from("51","hex"),e.protobuf=r.from("50","hex"),e.rlp=r.from("60","hex"),e.bencode=r.from("63","hex"),e.multicodec=r.from("30","hex"),e.multihash=r.from("31","hex"),e.multiaddr=r.from("32","hex"),e.multibase=r.from("33","hex"),e.md4=r.from("d4","hex"),e.md5=r.from("d5","hex"),e.sha1=r.from("11","hex"),e["sha2-256"]=r.from("12","hex"),e["sha2-512"]=r.from("13","hex"),e["dbl-sha2-256"]=r.from("56","hex"),e["sha3-224"]=r.from("17","hex"),e["sha3-256"]=r.from("16","hex"),e["sha3-384"]=r.from("15","hex"),e["sha3-512"]=r.from("14","hex"),e["shake-128"]=r.from("18","hex"),e["shake-256"]=r.from("19","hex"),e["keccak-224"]=r.from("1a","hex"),e["keccak-256"]=r.from("1b","hex"),e["keccak-384"]=r.from("1c","hex"),e["keccak-512"]=r.from("1d","hex"),e.murmur3=r.from("22","hex"),e["blake2b-8"]=r.from("b201","hex"),e["blake2b-16"]=r.from("b202","hex"),e["blake2b-24"]=r.from("b203","hex"),e["blake2b-32"]=r.from("b204","hex"),e["blake2b-40"]=r.from("b205","hex"),e["blake2b-48"]=r.from("b206","hex"),e["blake2b-56"]=r.from("b207","hex"),e["blake2b-64"]=r.from("b208","hex"),e["blake2b-72"]=r.from("b209","hex"),e["blake2b-80"]=r.from("b20a","hex"),e["blake2b-88"]=r.from("b20b","hex"),e["blake2b-96"]=r.from("b20c","hex"),e["blake2b-104"]=r.from("b20d","hex"),e["blake2b-112"]=r.from("b20e","hex"),e["blake2b-120"]=r.from("b20f","hex"),e["blake2b-128"]=r.from("b210","hex"),e["blake2b-136"]=r.from("b211","hex"),e["blake2b-144"]=r.from("b212","hex"),e["blake2b-152"]=r.from("b213","hex"),e["blake2b-160"]=r.from("b214","hex"),e["blake2b-168"]=r.from("b215","hex"),e["blake2b-176"]=r.from("b216","hex"),e["blake2b-184"]=r.from("b217","hex"),e["blake2b-192"]=r.from("b218","hex"),e["blake2b-200"]=r.from("b219","hex"),e["blake2b-208"]=r.from("b21a","hex"),e["blake2b-216"]=r.from("b21b","hex"),e["blake2b-224"]=r.from("b21c","hex"),e["blake2b-232"]=r.from("b21d","hex"),e["blake2b-240"]=r.from("b21e","hex"),e["blake2b-248"]=r.from("b21f","hex"),e["blake2b-256"]=r.from("b220","hex"),e["blake2b-264"]=r.from("b221","hex"),e["blake2b-272"]=r.from("b222","hex"),e["blake2b-280"]=r.from("b223","hex"),e["blake2b-288"]=r.from("b224","hex"),e["blake2b-296"]=r.from("b225","hex"),e["blake2b-304"]=r.from("b226","hex"),e["blake2b-312"]=r.from("b227","hex"),e["blake2b-320"]=r.from("b228","hex"),e["blake2b-328"]=r.from("b229","hex"),e["blake2b-336"]=r.from("b22a","hex"),e["blake2b-344"]=r.from("b22b","hex"),e["blake2b-352"]=r.from("b22c","hex"),e["blake2b-360"]=r.from("b22d","hex"),e["blake2b-368"]=r.from("b22e","hex"),e["blake2b-376"]=r.from("b22f","hex"),e["blake2b-384"]=r.from("b230","hex"),e["blake2b-392"]=r.from("b231","hex"),e["blake2b-400"]=r.from("b232","hex"),e["blake2b-408"]=r.from("b233","hex"),e["blake2b-416"]=r.from("b234","hex"),e["blake2b-424"]=r.from("b235","hex"),e["blake2b-432"]=r.from("b236","hex"),e["blake2b-440"]=r.from("b237","hex"),e["blake2b-448"]=r.from("b238","hex"),e["blake2b-456"]=r.from("b239","hex"),e["blake2b-464"]=r.from("b23a","hex"),e["blake2b-472"]=r.from("b23b","hex"),e["blake2b-480"]=r.from("b23c","hex"),e["blake2b-488"]=r.from("b23d","hex"),e["blake2b-496"]=r.from("b23e","hex"),e["blake2b-504"]=r.from("b23f","hex"),e["blake2b-512"]=r.from("b240","hex"),e["blake2s-8"]=r.from("b241","hex"),e["blake2s-16"]=r.from("b242","hex"),e["blake2s-24"]=r.from("b243","hex"),e["blake2s-32"]=r.from("b244","hex"),e["blake2s-40"]=r.from("b245","hex"),e["blake2s-48"]=r.from("b246","hex"),e["blake2s-56"]=r.from("b247","hex"),e["blake2s-64"]=r.from("b248","hex"),e["blake2s-72"]=r.from("b249","hex"),e["blake2s-80"]=r.from("b24a","hex"),e["blake2s-88"]=r.from("b24b","hex"),e["blake2s-96"]=r.from("b24c","hex"),e["blake2s-104"]=r.from("b24d","hex"),e["blake2s-112"]=r.from("b24e","hex"),e["blake2s-120"]=r.from("b24f","hex"),e["blake2s-128"]=r.from("b250","hex"),e["blake2s-136"]=r.from("b251","hex"),e["blake2s-144"]=r.from("b252","hex"),e["blake2s-152"]=r.from("b253","hex"),e["blake2s-160"]=r.from("b254","hex"),e["blake2s-168"]=r.from("b255","hex"),e["blake2s-176"]=r.from("b256","hex"),e["blake2s-184"]=r.from("b257","hex"),e["blake2s-192"]=r.from("b258","hex"),e["blake2s-200"]=r.from("b259","hex"),e["blake2s-208"]=r.from("b25a","hex"),e["blake2s-216"]=r.from("b25b","hex"),e["blake2s-224"]=r.from("b25c","hex"),e["blake2s-232"]=r.from("b25d","hex"),e["blake2s-240"]=r.from("b25e","hex"),e["blake2s-248"]=r.from("b25f","hex"),e["blake2s-256"]=r.from("b260","hex"),e["skein256-8"]=r.from("b301","hex"),e["skein256-16"]=r.from("b302","hex"),e["skein256-24"]=r.from("b303","hex"),e["skein256-32"]=r.from("b304","hex"),e["skein256-40"]=r.from("b305","hex"),e["skein256-48"]=r.from("b306","hex"),e["skein256-56"]=r.from("b307","hex"),e["skein256-64"]=r.from("b308","hex"),e["skein256-72"]=r.from("b309","hex"),e["skein256-80"]=r.from("b30a","hex"),e["skein256-88"]=r.from("b30b","hex"),e["skein256-96"]=r.from("b30c","hex"),e["skein256-104"]=r.from("b30d","hex"),e["skein256-112"]=r.from("b30e","hex"),e["skein256-120"]=r.from("b30f","hex"),e["skein256-128"]=r.from("b310","hex"),e["skein256-136"]=r.from("b311","hex"),e["skein256-144"]=r.from("b312","hex"),e["skein256-152"]=r.from("b313","hex"),e["skein256-160"]=r.from("b314","hex"),e["skein256-168"]=r.from("b315","hex"),e["skein256-176"]=r.from("b316","hex"),e["skein256-184"]=r.from("b317","hex"),e["skein256-192"]=r.from("b318","hex"),e["skein256-200"]=r.from("b319","hex"),e["skein256-208"]=r.from("b31a","hex"),e["skein256-216"]=r.from("b31b","hex"),e["skein256-224"]=r.from("b31c","hex"),e["skein256-232"]=r.from("b31d","hex"),e["skein256-240"]=r.from("b31e","hex"),e["skein256-248"]=r.from("b31f","hex"),e["skein256-256"]=r.from("b320","hex"),e["skein512-8"]=r.from("b321","hex"),e["skein512-16"]=r.from("b322","hex"),e["skein512-24"]=r.from("b323","hex"),e["skein512-32"]=r.from("b324","hex"),e["skein512-40"]=r.from("b325","hex"),e["skein512-48"]=r.from("b326","hex"),e["skein512-56"]=r.from("b327","hex"),e["skein512-64"]=r.from("b328","hex"),e["skein512-72"]=r.from("b329","hex"),e["skein512-80"]=r.from("b32a","hex"),e["skein512-88"]=r.from("b32b","hex"),e["skein512-96"]=r.from("b32c","hex"),e["skein512-104"]=r.from("b32d","hex"),e["skein512-112"]=r.from("b32e","hex"),e["skein512-120"]=r.from("b32f","hex"),e["skein512-128"]=r.from("b330","hex"),e["skein512-136"]=r.from("b331","hex"),e["skein512-144"]=r.from("b332","hex"),e["skein512-152"]=r.from("b333","hex"),e["skein512-160"]=r.from("b334","hex"),e["skein512-168"]=r.from("b335","hex"),e["skein512-176"]=r.from("b336","hex"),e["skein512-184"]=r.from("b337","hex"),e["skein512-192"]=r.from("b338","hex"),e["skein512-200"]=r.from("b339","hex"),e["skein512-208"]=r.from("b33a","hex"),e["skein512-216"]=r.from("b33b","hex"),e["skein512-224"]=r.from("b33c","hex"),e["skein512-232"]=r.from("b33d","hex"),e["skein512-240"]=r.from("b33e","hex"),e["skein512-248"]=r.from("b33f","hex"),e["skein512-256"]=r.from("b340","hex"),e["skein512-264"]=r.from("b341","hex"),e["skein512-272"]=r.from("b342","hex"),e["skein512-280"]=r.from("b343","hex"),e["skein512-288"]=r.from("b344","hex"),e["skein512-296"]=r.from("b345","hex"),e["skein512-304"]=r.from("b346","hex"),e["skein512-312"]=r.from("b347","hex"),e["skein512-320"]=r.from("b348","hex"),e["skein512-328"]=r.from("b349","hex"),e["skein512-336"]=r.from("b34a","hex"),e["skein512-344"]=r.from("b34b","hex"),e["skein512-352"]=r.from("b34c","hex"),e["skein512-360"]=r.from("b34d","hex"),e["skein512-368"]=r.from("b34e","hex"),e["skein512-376"]=r.from("b34f","hex"),e["skein512-384"]=r.from("b350","hex"),e["skein512-392"]=r.from("b351","hex"),e["skein512-400"]=r.from("b352","hex"),e["skein512-408"]=r.from("b353","hex"),e["skein512-416"]=r.from("b354","hex"),e["skein512-424"]=r.from("b355","hex"),e["skein512-432"]=r.from("b356","hex"),e["skein512-440"]=r.from("b357","hex"),e["skein512-448"]=r.from("b358","hex"),e["skein512-456"]=r.from("b359","hex"),e["skein512-464"]=r.from("b35a","hex"),e["skein512-472"]=r.from("b35b","hex"),e["skein512-480"]=r.from("b35c","hex"),e["skein512-488"]=r.from("b35d","hex"),e["skein512-496"]=r.from("b35e","hex"),e["skein512-504"]=r.from("b35f","hex"),e["skein512-512"]=r.from("b360","hex"),e["skein1024-8"]=r.from("b361","hex"),e["skein1024-16"]=r.from("b362","hex"),e["skein1024-24"]=r.from("b363","hex"),e["skein1024-32"]=r.from("b364","hex"),e["skein1024-40"]=r.from("b365","hex"),e["skein1024-48"]=r.from("b366","hex"),e["skein1024-56"]=r.from("b367","hex"),e["skein1024-64"]=r.from("b368","hex"),e["skein1024-72"]=r.from("b369","hex"),e["skein1024-80"]=r.from("b36a","hex"),e["skein1024-88"]=r.from("b36b","hex"),e["skein1024-96"]=r.from("b36c","hex"),e["skein1024-104"]=r.from("b36d","hex"),e["skein1024-112"]=r.from("b36e","hex"),e["skein1024-120"]=r.from("b36f","hex"),e["skein1024-128"]=r.from("b370","hex"),e["skein1024-136"]=r.from("b371","hex"),e["skein1024-144"]=r.from("b372","hex"),e["skein1024-152"]=r.from("b373","hex"),e["skein1024-160"]=r.from("b374","hex"),e["skein1024-168"]=r.from("b375","hex"),e["skein1024-176"]=r.from("b376","hex"),e["skein1024-184"]=r.from("b377","hex"),e["skein1024-192"]=r.from("b378","hex"),e["skein1024-200"]=r.from("b379","hex"),e["skein1024-208"]=r.from("b37a","hex"),e["skein1024-216"]=r.from("b37b","hex"),e["skein1024-224"]=r.from("b37c","hex"),e["skein1024-232"]=r.from("b37d","hex"),e["skein1024-240"]=r.from("b37e","hex"),e["skein1024-248"]=r.from("b37f","hex"),e["skein1024-256"]=r.from("b380","hex"),e["skein1024-264"]=r.from("b381","hex"),e["skein1024-272"]=r.from("b382","hex"),e["skein1024-280"]=r.from("b383","hex"),e["skein1024-288"]=r.from("b384","hex"),e["skein1024-296"]=r.from("b385","hex"),e["skein1024-304"]=r.from("b386","hex"),e["skein1024-312"]=r.from("b387","hex"),e["skein1024-320"]=r.from("b388","hex"),e["skein1024-328"]=r.from("b389","hex"),e["skein1024-336"]=r.from("b38a","hex"),e["skein1024-344"]=r.from("b38b","hex"),e["skein1024-352"]=r.from("b38c","hex"),e["skein1024-360"]=r.from("b38d","hex"),e["skein1024-368"]=r.from("b38e","hex"),e["skein1024-376"]=r.from("b38f","hex"),e["skein1024-384"]=r.from("b390","hex"),e["skein1024-392"]=r.from("b391","hex"),e["skein1024-400"]=r.from("b392","hex"),e["skein1024-408"]=r.from("b393","hex"),e["skein1024-416"]=r.from("b394","hex"),e["skein1024-424"]=r.from("b395","hex"),e["skein1024-432"]=r.from("b396","hex"),e["skein1024-440"]=r.from("b397","hex"),e["skein1024-448"]=r.from("b398","hex"),e["skein1024-456"]=r.from("b399","hex"),e["skein1024-464"]=r.from("b39a","hex"),e["skein1024-472"]=r.from("b39b","hex"),e["skein1024-480"]=r.from("b39c","hex"),e["skein1024-488"]=r.from("b39d","hex"),e["skein1024-496"]=r.from("b39e","hex"),e["skein1024-504"]=r.from("b39f","hex"),e["skein1024-512"]=r.from("b3a0","hex"),e["skein1024-520"]=r.from("b3a1","hex"),e["skein1024-528"]=r.from("b3a2","hex"),e["skein1024-536"]=r.from("b3a3","hex"),e["skein1024-544"]=r.from("b3a4","hex"),e["skein1024-552"]=r.from("b3a5","hex"),e["skein1024-560"]=r.from("b3a6","hex"),e["skein1024-568"]=r.from("b3a7","hex"),e["skein1024-576"]=r.from("b3a8","hex"),e["skein1024-584"]=r.from("b3a9","hex"),e["skein1024-592"]=r.from("b3aa","hex"),e["skein1024-600"]=r.from("b3ab","hex"),e["skein1024-608"]=r.from("b3ac","hex"),e["skein1024-616"]=r.from("b3ad","hex"),e["skein1024-624"]=r.from("b3ae","hex"),e["skein1024-632"]=r.from("b3af","hex"),e["skein1024-640"]=r.from("b3b0","hex"),e["skein1024-648"]=r.from("b3b1","hex"),e["skein1024-656"]=r.from("b3b2","hex"),e["skein1024-664"]=r.from("b3b3","hex"),e["skein1024-672"]=r.from("b3b4","hex"),e["skein1024-680"]=r.from("b3b5","hex"),e["skein1024-688"]=r.from("b3b6","hex"),e["skein1024-696"]=r.from("b3b7","hex"),e["skein1024-704"]=r.from("b3b8","hex"),e["skein1024-712"]=r.from("b3b9","hex"),e["skein1024-720"]=r.from("b3ba","hex"),e["skein1024-728"]=r.from("b3bb","hex"),e["skein1024-736"]=r.from("b3bc","hex"),e["skein1024-744"]=r.from("b3bd","hex"),e["skein1024-752"]=r.from("b3be","hex"),e["skein1024-760"]=r.from("b3bf","hex"),e["skein1024-768"]=r.from("b3c0","hex"),e["skein1024-776"]=r.from("b3c1","hex"),e["skein1024-784"]=r.from("b3c2","hex"),e["skein1024-792"]=r.from("b3c3","hex"),e["skein1024-800"]=r.from("b3c4","hex"),e["skein1024-808"]=r.from("b3c5","hex"),e["skein1024-816"]=r.from("b3c6","hex"),e["skein1024-824"]=r.from("b3c7","hex"),e["skein1024-832"]=r.from("b3c8","hex"),e["skein1024-840"]=r.from("b3c9","hex"),e["skein1024-848"]=r.from("b3ca","hex"),e["skein1024-856"]=r.from("b3cb","hex"),e["skein1024-864"]=r.from("b3cc","hex"),e["skein1024-872"]=r.from("b3cd","hex"),e["skein1024-880"]=r.from("b3ce","hex"),e["skein1024-888"]=r.from("b3cf","hex"),e["skein1024-896"]=r.from("b3d0","hex"),e["skein1024-904"]=r.from("b3d1","hex"),e["skein1024-912"]=r.from("b3d2","hex"),e["skein1024-920"]=r.from("b3d3","hex"),e["skein1024-928"]=r.from("b3d4","hex"),e["skein1024-936"]=r.from("b3d5","hex"),e["skein1024-944"]=r.from("b3d6","hex"),e["skein1024-952"]=r.from("b3d7","hex"),e["skein1024-960"]=r.from("b3d8","hex"),e["skein1024-968"]=r.from("b3d9","hex"),e["skein1024-976"]=r.from("b3da","hex"),e["skein1024-984"]=r.from("b3db","hex"),e["skein1024-992"]=r.from("b3dc","hex"),e["skein1024-1000"]=r.from("b3dd","hex"),e["skein1024-1008"]=r.from("b3de","hex"),e["skein1024-1016"]=r.from("b3df","hex"),e["skein1024-1024"]=r.from("b3e0","hex"),e.ip4=r.from("04","hex"),e.ip6=r.from("29","hex"),e.tcp=r.from("06","hex"),e.udp=r.from("0111","hex"),e.dccp=r.from("21","hex"),e.sctp=r.from("84","hex"),e.udt=r.from("012d","hex"),e.utp=r.from("012e","hex"),e.ipfs=r.from("01a5","hex"),e.http=r.from("01e0","hex"),e.https=r.from("01bb","hex"),e.quic=r.from("01cc","hex"),e.ws=r.from("01dd","hex"),e.onion=r.from("01bc","hex"),e["p2p-circuit"]=r.from("0122","hex"),e["git-raw"]=r.from("78","hex"),e["dag-pb"]=r.from("70","hex"),e["dag-cbor"]=r.from("71","hex"),e["git-raw"]=r.from("78","hex"),e["eth-block"]=r.from("90","hex"),e["eth-block-list"]=r.from("91","hex"),e["eth-tx-trie"]=r.from("92","hex"),e["eth-tx"]=r.from("93","hex"),e["eth-tx-receipt-trie"]=r.from("94","hex"),e["eth-tx-receipt"]=r.from("95","hex"),e["eth-state-trie"]=r.from("96","hex"),e["eth-account-snapshot"]=r.from("97","hex"),e["eth-storage-trie"]=r.from("98","hex"),e["bitcoin-block"]=r.from("b0","hex"),e["bitcoin-tx"]=r.from("b1","hex"),e["zcash-block"]=r.from("c0","hex"),e["zcash-tx"]=r.from("c1","hex"),e["stellar-block"]=r.from("d0","hex"),e["stellar-tx"]=r.from("d1","hex"),e["torrent-info"]=r.from("7b","hex"),e["torrent-file"]=r.from("7c","hex"),e["ed25519-pub"]=r.from("ed","hex")}).call(this,r(0).Buffer)},function(t,e,r){(function(t,n){var i=/%[sdj%]/g;e.format=function(t){if(!m(t)){for(var e=[],r=0;r=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),u=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&e._extend(n,r),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),f(n,t,n.depth)}function u(t,e){var r=a.styles[e];return r?"["+a.colors[r][0]+"m"+t+"["+a.colors[r][1]+"m":t}function c(t,e){return t}function f(t,r,n){if(t.customInspect&&r&&E(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return m(i)||(i=f(t,i,n)),i}var o=function(t,e){if(v(e))return t.stylize("undefined","undefined");if(m(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(g(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(y(e))return t.stylize("null","null")}(t,r);if(o)return o;var s=Object.keys(r),a=function(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),w(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(E(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(b(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(S(r))return t.stylize(Date.prototype.toString.call(r),"date");if(w(r))return l(r)}var c,_="",k=!1,C=["{","}"];(p(r)&&(k=!0,C=["[","]"]),E(r))&&(_=" [Function"+(r.name?": "+r.name:"")+"]");return b(r)&&(_=" "+RegExp.prototype.toString.call(r)),S(r)&&(_=" "+Date.prototype.toUTCString.call(r)),w(r)&&(_=" "+l(r)),0!==s.length||k&&0!=r.length?n<0?b(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=k?function(t,e,r,n,i){for(var o=[],s=0,a=e.length;s=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(c,_,C)):C[0]+_+C[1]}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),T(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=y(r)?f(t,u.value,null):f(t,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n")):a=t.stylize("[Circular]","special")),v(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function y(t){return null===t}function g(t){return"number"==typeof t}function m(t){return"string"==typeof t}function v(t){return void 0===t}function b(t){return _(t)&&"[object RegExp]"===k(t)}function _(t){return"object"==typeof t&&null!==t}function S(t){return _(t)&&"[object Date]"===k(t)}function w(t){return _(t)&&("[object Error]"===k(t)||t instanceof Error)}function E(t){return"function"==typeof t}function k(t){return Object.prototype.toString.call(t)}function C(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(v(o)&&(o=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!s[t])if(new RegExp("\\b"+t+"\\b","i").test(o)){var r=n.pid;s[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else s[t]=function(){};return s[t]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=p,e.isBoolean=d,e.isNull=y,e.isNullOrUndefined=function(t){return null==t},e.isNumber=g,e.isString=m,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=v,e.isRegExp=b,e.isObject=_,e.isDate=S,e.isError=w,e.isFunction=E,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(428);var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,r;console.log("%s - %s",(t=new Date,r=[C(t.getHours()),C(t.getMinutes()),C(t.getSeconds())].join(":"),[t.getDate(),A[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=r(22),e._extend=function(t,e){if(!e||!_(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this,r(12),r(6))},function(t,e,r){"use strict";var n=r(4),i=r(168),o=r(270),s=r(271),a=r(79);function u(t){a.call(this,"digest"),this._hash=t}n(u,a),u.prototype._update=function(t){this._hash.update(t)},u.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new i:"rmd160"===t||"ripemd160"===t?new o:new u(s(t))}},function(t,e,r){(function(n){r(37);var i=r(324);function o(t,e){function r(){i(),e()}function n(t){i(),e(t)}function i(){t.removeListener("close",r),t.removeListener("error",n)}t.on("close",r),t.on("error",n)}function o(t){t.destroy?t.destroy():console.error("warning, stream-to-pull-stream: \nthe wrapped node-stream does not implement `destroy`, \nthis may cause resource leaks.")}function s(t,e,r){var s,a,u=!1;function c(){a||(a=!0,r&&r(!0===s?null:s))}function f(){u||(u=!0,h(),s?c():t(s=!0,c))}function l(e){h(),s||t(s=e,c)}function h(){e.on("finish",f),e.removeListener("close",f),e.removeListener("error",l)}e.on("close",f),e.on("finish",f),e.on("error",l),n.nextTick(function(){i(function(r){t(null,function(t,n){if(s=s||t,!0===t)return e._isStdio?c():e.end();if(s=s||t)return o(e),c();e._isStdio?e.write(n,function(){r()}):!1===e.write(n)?e.once("drain",r):r()})})})}function a(t){var e,r=[],n=[],i=!1;function s(){for(;(r.length||e)&&n.length;)n.shift()(r.length?null:e,r.shift());!r.length&&i&&(i=!1,t.resume())}return t.on("data",function(e){r.push(e),s(),r.length&&t.pause&&(i=!0,t.pause())}),t.on("end",function(){e=!0,s()}),t.on("close",function(){e=!0,s()}),t.on("error",function(t){e=t,s()}),function(r,i){if(!i)throw new Error("*must* provide cb");if(r){function a(){for(;n.length;)n.shift()(r);i(r)}if(e)return a();t.once("close",a),o(t)}else n.push(i),s()}}var u=a,c=function(t,e){return function(r){return s(r,t,e)}},f=function(t){return a(t)};(e=t.exports=function(t,e){return t.writable&&t.write?t.readable?function(r){return s(r,t,e),a(t)}:c(t,e):f(t)}).sink=c,e.source=f,e.read=u,e.read1=a,e.read2=function(t){var e,r=!1,n=!1;function i(){var r=t.read();if(null!==r&&e){var n=e;e=null,n(null,r)}}return t.on("readable",function(){n=!0,e&&i()}).on("end",function(){r=!0,e&&e(r)}).on("error",function(t){r=t,e&&e(r)}),function(t,o){e=o,r?o(r):n&&i()}},e.duplex=function(t,e){return{source:f(t),sink:c(t,e)}},e.transform=function(t){return function(e){var r=f(t);return c(t)(e),r}}}).call(this,r(6))},,,,,,,,function(t,e){e.BITS=32,e.GROUPS=4,e.RE_ADDRESS=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g,e.RE_SUBNET_STRING=/\/\d{1,2}$/},function(t,e){e.BITS=128,e.GROUPS=8,e.SCOPES={0:"Reserved",1:"Interface local",2:"Link local",4:"Admin local",5:"Site local",8:"Organization local",14:"Global",15:"Reserved"},e.TYPES={"ff01::1/128":"Multicast (All nodes on this interface)","ff01::2/128":"Multicast (All routers on this interface)","ff02::1/128":"Multicast (All nodes on this link)","ff02::2/128":"Multicast (All routers on this link)","ff05::2/128":"Multicast (All routers in this site)","ff02::5/128":"Multicast (OSPFv3 AllSPF routers)","ff02::6/128":"Multicast (OSPFv3 AllDR routers)","ff02::9/128":"Multicast (RIP routers)","ff02::a/128":"Multicast (EIGRP routers)","ff02::d/128":"Multicast (PIM routers)","ff02::16/128":"Multicast (MLDv2 reports)","ff01::fb/128":"Multicast (mDNSv6)","ff02::fb/128":"Multicast (mDNSv6)","ff05::fb/128":"Multicast (mDNSv6)","ff02::1:2/128":"Multicast (All DHCP servers and relay agents on this link)","ff05::1:2/128":"Multicast (All DHCP servers and relay agents in this site)","ff02::1:3/128":"Multicast (All DHCP servers on this link)","ff05::1:3/128":"Multicast (All DHCP servers in this site)","::/128":"Unspecified","::1/128":"Loopback","ff00::/8":"Multicast","fe80::/10":"Link-local unicast"},e.RE_BAD_CHARACTERS=/([^0-9a-f:\/%])/gi,e.RE_BAD_ADDRESS=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi,e.RE_SUBNET_STRING=/\/\d{1,3}(?=%|$)/,e.RE_ZONE_STRING=/%.*$/,e.RE_URL=new RegExp(/^\[{0,1}([0-9a-f:]+)\]{0,1}/),e.RE_URL_WITH_PORT=new RegExp(/\[([0-9a-f:]+)\]:([0-9]{1,5})/)},function(t,e,r){"use strict";const n=r(15);function i(t){if("number"==typeof t){if(i.codes[t])return i.codes[t];throw new Error("no protocol with code: "+t)}if("string"==typeof t||t instanceof String){if(i.names[t])return i.names[t];throw new Error("no protocol with name: "+t)}throw new Error("invalid protocol id type: "+t)}function o(t,e,r,n){return{code:t,size:e,name:r,resolvable:Boolean(n)}}i.lengthPrefixedVarSize=-1,i.V=-1,i.table=[[4,32,"ip4"],[6,16,"tcp"],[17,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[54,-1,"dns4","resolvable"],[55,-1,"dns6","resolvable"],[56,-1,"dnsaddr","resolvable"],[132,16,"sctp"],[302,0,"utp"],[421,i.lengthPrefixedVarSize,"ipfs"],[480,0,"http"],[443,0,"https"],[460,0,"quic"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[290,0,"p2p-circuit"]],i.names={},i.codes={},n(i.table,function(t){const e=o.apply(null,t);i.codes[e.code]=e,i.names[e.name]=e}),i.object=o,t.exports=i},function(t,e,r){"use strict";(function(n){const i=r(16),o=r(19)(r(448)),s=r(228),a=r(76),u=r(131),c=r(63),f=r(10);function l(t,e){let r;!u.isDAGNode(t)&&t.links&&(t.links=t.links.map(t=>a.isDAGLink(t)?t:a.util.createDagLinkFromB58EncodedHash(t)));try{r=o.PBNode.encode(function(t){const e={};t.data&&t.data.length>0?e.Data=t.data:e.Data=null;t.links&&t.links.length>0?e.Links=t.links.map(t=>({Hash:t.multihash,Name:t.name,Tsize:t.size})):e.Links=null;return e}(t))}catch(t){return e(t)}e(null,r)}(e=t.exports).serialize=l,e.deserialize=function(t,e){const r=o.PBNode.decode(t),i=r.Links.map(t=>new a(t.Name,t.Tsize,t.Hash)),s=null==r.Data?n.alloc(0):n.from(r.Data);u.create(s,i,e)},e.cid=function(t,e,r){"function"==typeof e&&(r=e,e={});const n=(e=e||{}).hashAlg||s.defaultHashAlg;let o=e.version;void 0===o&&(o="sha2-256"===n?0:1),f([e=>l(t,e),(t,e)=>c(t,n,e),(t,e)=>e(null,new i(o,s.multicodec,t))],r)}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";e.defined=function(t){return null!=t&&("number"!=typeof t||!isNaN(t))}},function(t,e,r){"use strict";t.exports=function(t,e){return t.then(t=>{e(null,t)},t=>{e(t)})}},function(t,e,r){"use strict";t.exports=(()=>{if("undefined"!=typeof self&&(r(77)(self),self.crypto))return self.crypto;throw new Error("Please use an environment with crypto support")})},function(t,e,r){(e=t.exports=r(236)).Stream=e,e.Readable=e,e.Writable=r(167),e.Duplex=r(80),e.Transform=r(239),e.PassThrough=r(472)},function(t,e,r){"use strict";(function(e,n,i){var o=r(137);function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=v;var a,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?n:o.nextTick;v.WritableState=m;var c=r(108);c.inherits=r(22);var f={deprecate:r(471)},l=r(237),h=r(27).Buffer,p=i.Uint8Array||function(){};var d,y=r(238);function g(){}function m(t,e){a=a||r(80),t=t||{};var n=e instanceof a;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(c||0===c)?c:f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===t.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(o.nextTick(i,n),o.nextTick(k,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),k(t,e))}(t,r,n,e,i);else{var s=w(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||S(t,r),n?u(_,t,r,s,i):_(t,r,s,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function v(t){if(a=a||r(80),!(d.call(v,this)||this instanceof a))return new v(t);this._writableState=new m(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),l.call(this)}function b(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function _(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),k(t,e)}function S(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,b(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,l=r.callback;if(b(t,e,!1,e.objectMode?1:c.length,c,f,l),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function w(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function E(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),k(t,e)})}function k(t,e){var r=w(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(E,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}c.inherits(v,l),m.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(m.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(t){return!!d.call(this,t)||this===v&&(t&&t._writableState instanceof m)}})):d=function(t){return t instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(t,e,r){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=t,h.isBuffer(n)||n instanceof p);return a&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof r&&(r=g),i.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),o.nextTick(e,r)}(this,r):(a||function(t,e,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),o.nextTick(n,s),i=!1),i}(this,i,t,r))&&(i.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=h.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(t,e,r){e.ending=!0,k(t,e),r&&(e.finished?o.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),v.prototype.destroy=y.destroy,v.prototype._undestroy=y.undestroy,v.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(6),r(35).setImmediate,r(12))},function(t,e,r){"use strict";var n=r(4),i=r(242),o=r(3).Buffer,s=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(t,e){return t<>>32-e}function c(t,e,r,n,i,o,s){return u(t+(e&r|~e&n)+i+o|0,s)+e|0}function f(t,e,r,n,i,o,s){return u(t+(e&n|r&~n)+i+o|0,s)+e|0}function l(t,e,r,n,i,o,s){return u(t+(e^r^n)+i+o|0,s)+e|0}function h(t,e,r,n,i,o,s){return u(t+(r^(e|~n))+i+o|0,s)+e|0}n(a,i),a.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,o=this._d;r=c(r,n,i,o,t[0],3614090360,7),o=c(o,r,n,i,t[1],3905402710,12),i=c(i,o,r,n,t[2],606105819,17),n=c(n,i,o,r,t[3],3250441966,22),r=c(r,n,i,o,t[4],4118548399,7),o=c(o,r,n,i,t[5],1200080426,12),i=c(i,o,r,n,t[6],2821735955,17),n=c(n,i,o,r,t[7],4249261313,22),r=c(r,n,i,o,t[8],1770035416,7),o=c(o,r,n,i,t[9],2336552879,12),i=c(i,o,r,n,t[10],4294925233,17),n=c(n,i,o,r,t[11],2304563134,22),r=c(r,n,i,o,t[12],1804603682,7),o=c(o,r,n,i,t[13],4254626195,12),i=c(i,o,r,n,t[14],2792965006,17),r=f(r,n=c(n,i,o,r,t[15],1236535329,22),i,o,t[1],4129170786,5),o=f(o,r,n,i,t[6],3225465664,9),i=f(i,o,r,n,t[11],643717713,14),n=f(n,i,o,r,t[0],3921069994,20),r=f(r,n,i,o,t[5],3593408605,5),o=f(o,r,n,i,t[10],38016083,9),i=f(i,o,r,n,t[15],3634488961,14),n=f(n,i,o,r,t[4],3889429448,20),r=f(r,n,i,o,t[9],568446438,5),o=f(o,r,n,i,t[14],3275163606,9),i=f(i,o,r,n,t[3],4107603335,14),n=f(n,i,o,r,t[8],1163531501,20),r=f(r,n,i,o,t[13],2850285829,5),o=f(o,r,n,i,t[2],4243563512,9),i=f(i,o,r,n,t[7],1735328473,14),r=l(r,n=f(n,i,o,r,t[12],2368359562,20),i,o,t[5],4294588738,4),o=l(o,r,n,i,t[8],2272392833,11),i=l(i,o,r,n,t[11],1839030562,16),n=l(n,i,o,r,t[14],4259657740,23),r=l(r,n,i,o,t[1],2763975236,4),o=l(o,r,n,i,t[4],1272893353,11),i=l(i,o,r,n,t[7],4139469664,16),n=l(n,i,o,r,t[10],3200236656,23),r=l(r,n,i,o,t[13],681279174,4),o=l(o,r,n,i,t[0],3936430074,11),i=l(i,o,r,n,t[3],3572445317,16),n=l(n,i,o,r,t[6],76029189,23),r=l(r,n,i,o,t[9],3654602809,4),o=l(o,r,n,i,t[12],3873151461,11),i=l(i,o,r,n,t[15],530742520,16),r=h(r,n=l(n,i,o,r,t[2],3299628645,23),i,o,t[0],4096336452,6),o=h(o,r,n,i,t[7],1126891415,10),i=h(i,o,r,n,t[14],2878612391,15),n=h(n,i,o,r,t[5],4237533241,21),r=h(r,n,i,o,t[12],1700485571,6),o=h(o,r,n,i,t[3],2399980690,10),i=h(i,o,r,n,t[10],4293915773,15),n=h(n,i,o,r,t[1],2240044497,21),r=h(r,n,i,o,t[8],1873313359,6),o=h(o,r,n,i,t[15],4264355552,10),i=h(i,o,r,n,t[6],2734768916,15),n=h(n,i,o,r,t[13],1309151649,21),r=h(r,n,i,o,t[4],4149444226,6),o=h(o,r,n,i,t[11],3174756917,10),i=h(i,o,r,n,t[2],718787259,15),n=h(n,i,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=a},function(t,e,r){"use strict";t.exports="enum KeyType {\n RSA = 0;\n Ed25519 = 1;\n Secp256k1 = 2;\n}\nmessage PublicKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}\nmessage PrivateKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}"},function(t,e,r){var n=r(8);r(13),t.exports=n.cipher=n.cipher||{},n.cipher.algorithms=n.cipher.algorithms||{},n.cipher.createCipher=function(t,e){var r=t;if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+t);return new n.cipher.BlockCipher({algorithm:r,key:e,decrypt:!1})},n.cipher.createDecipher=function(t,e){var r=t;if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+t);return new n.cipher.BlockCipher({algorithm:r,key:e,decrypt:!0})},n.cipher.registerAlgorithm=function(t,e){t=t.toUpperCase(),n.cipher.algorithms[t]=e},n.cipher.getAlgorithm=function(t){return(t=t.toUpperCase())in n.cipher.algorithms?n.cipher.algorithms[t]:null};var i=n.cipher.BlockCipher=function(t){this.algorithm=t.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=t.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=t.decrypt,this.algorithm.initialize(t)};i.prototype.start=function(t){t=t||{};var e={};for(var r in t)e[r]=t[r];e.decrypt=this._decrypt,this._finish=!1,this._input=n.util.createBuffer(),this.output=t.output||n.util.createBuffer(),this.mode.start(e)},i.prototype.update=function(t){for(t&&this._input.putBuffer(t);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},i.prototype.finish=function(t){!t||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(e){return t(this.blockSize,e,!1)},this.mode.unpad=function(e){return t(this.blockSize,e,!0)});var e={};return e.decrypt=this._decrypt,e.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,e))&&(this._finish=!0,this.update(),!(this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,e))&&!(this.mode.afterFinish&&!this.mode.afterFinish(this.output,e)))}},function(t,e,r){var n=r(8);r(60),r(13);var i=t.exports=n.md5=n.md5||{};n.md.md5=n.md.algorithms.md5=i,i.create=function(){c||function(){o=String.fromCharCode(128),o+=n.util.fillString(String.fromCharCode(0),64),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],a=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],u=new Array(64);for(var t=0;t<64;++t)u[t]=Math.floor(4294967296*Math.abs(Math.sin(t+1)));c=!0}();var t=null,e=n.util.createBuffer(),r=new Array(16),i={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,o=0;o>>0,a>>>0];for(var u=i.fullMessageLength.length-1;u>=0;--u)i.fullMessageLength[u]+=a[1],a[1]=a[0]+(i.fullMessageLength[u]/4294967296>>>0),i.fullMessageLength[u]=i.fullMessageLength[u]>>>0,a[0]=a[1]/4294967296>>>0;return e.putBytes(o),f(t,r,e),(e.read>2048||0===e.length())&&e.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(e.bytes());var a=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(o.substr(0,i.blockLength-a));for(var u,c=0,l=i.fullMessageLength.length-1;l>=0;--l)c=(u=8*i.fullMessageLength[l]+c)/4294967296>>>0,s.putInt32Le(u>>>0);var h={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3};f(h,r,s);var p=n.util.createBuffer();return p.putInt32Le(h.h0),p.putInt32Le(h.h1),p.putInt32Le(h.h2),p.putInt32Le(h.h3),p},i};var o=null,s=null,a=null,u=null,c=!1;function f(t,e,r){for(var n,i,o,c,f,l,h,p=r.length();p>=64;){for(i=t.h0,o=t.h1,c=t.h2,f=t.h3,h=0;h<16;++h)e[h]=r.getInt32Le(),n=i+(f^o&(c^f))+u[h]+e[h],i=f,f=c,c=o,o+=n<<(l=a[h])|n>>>32-l;for(;h<32;++h)n=i+(c^f&(o^c))+u[h]+e[s[h]],i=f,f=c,c=o,o+=n<<(l=a[h])|n>>>32-l;for(;h<48;++h)n=i+(o^c^f)+u[h]+e[s[h]],i=f,f=c,c=o,o+=n<<(l=a[h])|n>>>32-l;for(;h<64;++h)n=i+(c^(o|~f))+u[h]+e[s[h]],i=f,f=c,c=o,o+=n<<(l=a[h])|n>>>32-l;t.h0=t.h0+i|0,t.h1=t.h1+o|0,t.h2=t.h2+c|0,t.h3=t.h3+f|0,p-=64}}},function(t,e,r){(function(e){var n=r(8);r(109),r(60),r(13);var i,o=n.pkcs5=n.pkcs5||{};n.util.isNodejs&&!n.options.usePureJavaScript&&(i=r(247)),t.exports=n.pbkdf2=o.pbkdf2=function(t,r,o,s,a,u){if("function"==typeof a&&(u=a,a=null),n.util.isNodejs&&!n.options.usePureJavaScript&&i.pbkdf2&&(null===a||"object"!=typeof a)&&(i.pbkdf2Sync.length>4||!a||"sha1"===a))return"string"!=typeof a&&(a="sha1"),t=new e(t,"binary"),r=new e(r,"binary"),u?4===i.pbkdf2Sync.length?i.pbkdf2(t,r,o,s,function(t,e){if(t)return u(t);u(null,e.toString("binary"))}):i.pbkdf2(t,r,o,s,a,function(t,e){if(t)return u(t);u(null,e.toString("binary"))}):4===i.pbkdf2Sync.length?i.pbkdf2Sync(t,r,o,s).toString("binary"):i.pbkdf2Sync(t,r,o,s,a).toString("binary");if(null==a&&(a="sha1"),"string"==typeof a){if(!(a in n.md.algorithms))throw new Error("Unknown hash algorithm: "+a);a=n.md[a].create()}var c=a.digestLength;if(s>4294967295*c){var f=new Error("Derived key is too long.");if(u)return u(f);throw f}var l=Math.ceil(s/c),h=s-(l-1)*c,p=n.hmac.create();p.start(a,t);var d,y,g,m="";if(!u){for(var v=1;v<=l;++v){p.start(null,null),p.update(r),p.update(n.util.int32ToBytes(v)),d=g=p.digest().getBytes();for(var b=2;b<=o;++b)p.start(null,null),p.update(g),y=p.digest().getBytes(),d=n.util.xorBytes(d,y,c),g=y;m+=vl)return u(null,m);p.start(null,null),p.update(r),p.update(n.util.int32ToBytes(v)),d=g=p.digest().getBytes(),b=2,S()}function S(){if(b<=o)return p.start(null,null),p.update(g),y=p.digest().getBytes(),d=n.util.xorBytes(d,y,c),g=y,++b,n.util.setImmediate(S);m+=v2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(l.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(u.validity.notBefore=l[0],u.validity.notAfter=l[1],u.tbsCertificate=r.tbsCertificate,e){var h;if(u.md=null,u.signatureOid in s)switch(s[u.signatureOid]){case"sha1WithRSAEncryption":u.md=n.md.sha1.create();break;case"md5WithRSAEncryption":u.md=n.md.md5.create();break;case"sha256WithRSAEncryption":u.md=n.md.sha256.create();break;case"sha384WithRSAEncryption":u.md=n.md.sha384.create();break;case"sha512WithRSAEncryption":u.md=n.md.sha512.create();break;case"RSASSA-PSS":u.md=n.md.sha256.create()}if(null===u.md)throw(h=new Error("Could not compute certificate digest. Unknown signature OID.")).signatureOid=u.signatureOid,h;var y=i.toDer(u.tbsCertificate);u.md.update(y.getBytes())}var m=n.md.sha1.create();u.issuer.getField=function(t){return p(u.issuer,t)},u.issuer.addField=function(t){g([t]),u.issuer.attributes.push(t)},u.issuer.attributes=o.RDNAttributesAsArray(r.certIssuer,m),r.certIssuerUniqueId&&(u.issuer.uniqueId=r.certIssuerUniqueId),u.issuer.hash=m.digest().toHex();var v=n.md.sha1.create();return u.subject.getField=function(t){return p(u.subject,t)},u.subject.addField=function(t){g([t]),u.subject.attributes.push(t)},u.subject.attributes=o.RDNAttributesAsArray(r.certSubject,v),r.certSubjectUniqueId&&(u.subject.uniqueId=r.certSubjectUniqueId),u.subject.hash=v.digest().toHex(),r.certExtensions?u.extensions=o.certificateExtensionsFromAsn1(r.certExtensions):u.extensions=[],u.publicKey=o.publicKeyFromAsn1(r.subjectPublicKeyInfo),u},o.certificateExtensionsFromAsn1=function(t){for(var e=[],r=0;r1&&(r=u.value.charCodeAt(1),o=u.value.length>2?u.value.charCodeAt(2):0),e.digitalSignature=128==(128&r),e.nonRepudiation=64==(64&r),e.keyEncipherment=32==(32&r),e.dataEncipherment=16==(16&r),e.keyAgreement=8==(8&r),e.keyCertSign=4==(4&r),e.cRLSign=2==(2&r),e.encipherOnly=1==(1&r),e.decipherOnly=128==(128&o)}else if("basicConstraints"===e.name){(u=i.fromDer(e.value)).value.length>0&&u.value[0].type===i.Type.BOOLEAN?e.cA=0!==u.value[0].value.charCodeAt(0):e.cA=!1;var a=null;u.value.length>0&&u.value[0].type===i.Type.INTEGER?a=u.value[0].value:u.value.length>1&&(a=u.value[1].value),null!==a&&(e.pathLenConstraint=i.derToInteger(a))}else if("extKeyUsage"===e.name)for(var u=i.fromDer(e.value),c=0;c1&&(r=u.value.charCodeAt(1)),e.client=128==(128&r),e.server=64==(64&r),e.email=32==(32&r),e.objsign=16==(16&r),e.reserved=8==(8&r),e.sslCA=4==(4&r),e.emailCA=2==(2&r),e.objCA=1==(1&r)}else if("subjectAltName"===e.name||"issuerAltName"===e.name){var l;e.altNames=[];u=i.fromDer(e.value);for(var h=0;h0&&e.value.push(o.certificateExtensionsToAsn1(t.extensions)),e},o.getCertificationRequestInfo=function(t){return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(t.version).getBytes()),y(t.subject),o.publicKeyToAsn1(t.publicKey),b(t)])},o.distinguishedNameToAsn1=function(t){return y(t)},o.certificateToAsn1=function(t){var e=t.tbsCertificate||o.getTBSCertificate(t);return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[e,i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.signatureOid).getBytes()),v(t.signatureOid,t.signatureParameters)]),i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+t.signature)])},o.certificateExtensionsToAsn1=function(t){var e=i.create(i.Class.CONTEXT_SPECIFIC,3,!0,[]),r=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);e.value.push(r);for(var n=0;nf.validity.notAfter)&&(u={message:"Certificate is not valid yet or has expired.",error:o.certificateError.certificate_expired,notBefore:f.validity.notBefore,notAfter:f.validity.notAfter,now:s}),null===u){if(null===(l=e[0]||t.getIssuer(f))&&f.isIssuer(f)&&(h=!0,l=f),l){var p=l;n.util.isArray(p)||(p=[p]);for(var d=!1;!d&&p.length>0;){l=p.shift();try{d=l.verify(f)}catch(t){}}d||(u={message:"Certificate signature is invalid.",error:o.certificateError.bad_certificate})}null!==u||l&&!h||t.hasCertificate(f)||(u={message:"Certificate is not trusted.",error:o.certificateError.unknown_ca})}if(null===u&&l&&!f.isIssuer(l)&&(u={message:"Certificate issuer is invalid.",error:o.certificateError.bad_certificate}),null===u)for(var y={keyUsage:!0,basicConstraints:!0},g=0;null===u&&gv.pathLenConstraint&&(u={message:"Certificate basicConstraints pathLenConstraint violated.",error:o.certificateError.bad_certificate})}var _=null===u||u.error,S=r?r(_,c,i):_;if(!0!==S)throw!0===_&&(u={message:"The application rejected the certificate.",error:o.certificateError.bad_certificate}),(S||0===S)&&("object"!=typeof S||n.util.isArray(S)?"string"==typeof S&&(u.error=S):(S.message&&(u.message=S.message),S.error&&(u.error=S.error))),u;u=null,a=!1,++c}while(e.length>0);return!0}},function(t,e,r){var n=r(8);r(43),r(13),(t.exports=n.pss=n.pss||{}).create=function(t){3===arguments.length&&(t={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var e,r=t.md,i=t.mgf,o=r.digestLength,s=t.salt||null;if("string"==typeof s&&(s=n.util.createBuffer(s)),"saltLength"in t)e=t.saltLength;else{if(null===s)throw new Error("Salt length not specified or specific salt not given.");e=s.length()}if(null!==s&&s.length()!==e)throw new Error("Given salt length does not match length of given salt.");var a=t.prng||n.random,u={encode:function(t,u){var c,f,l=u-1,h=Math.ceil(l/8),p=t.digest().getBytes();if(h>8*h-l&255;return(_=String.fromCharCode(_.charCodeAt(0)&~S)+_.substr(1))+y+String.fromCharCode(188)},verify:function(t,s,a){var u,c=a-1,f=Math.ceil(c/8);if(s=s.substr(-f),f>8*f-c&255;if(0!=(h.charCodeAt(0)&d))throw new Error("Bits beyond keysize not zero as expected.");var y=i.generate(p,l),g="";for(u=0;u{e(null,t)},t=>{e(t)})}},function(t,e,r){"use strict";t.exports=(()=>{if("undefined"!=typeof self&&(r(77)(self),self.crypto))return self.crypto;throw new Error("Please use an environment with crypto support")})},function(t,e,r){"use strict";t.exports="enum KeyType {\n RSA = 0;\n Ed25519 = 1;\n Secp256k1 = 2;\n}\nmessage PublicKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}\nmessage PrivateKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}"},function(t,e,r){"use strict";var n=r(113);t.exports=function(t,e,r){r||(r=e,e=null);var i=n(function(r){e=t(e,r)},function(t){r(t,e)});return 2===arguments.length?function(t){t(null,function(n,o){if(n)return r(!0===n?null:n);e=o,i(t)})}:i}},function(t,e){t.exports=function(){var t,e,r,n,i=function(i,o){t?t(i,o):i?(n=i,r=o):e=o};return i.resolve=function(i){if(t)throw new Error("already resolved");if(!(t=i))throw new Error("no read cannot resolve!"+t);e&&i(null,e),r&&i(n,r)},i.abort=function(t){i.resolve(function(e,r){r(t||!0)})},i}},,,,,,,,,,function(t,e,r){"use strict";(function(t,n){Object.defineProperty(e,"__esModule",{value:!0}),e.hasNextTick=e.hasSetImmediate=void 0,e.fallback=f,e.wrap=l;var i,o=r(92),s=(i=o)&&i.__esModule?i:{default:i};var a,u=e.hasSetImmediate="function"==typeof t&&t,c=e.hasNextTick="object"==typeof n&&"function"==typeof n.nextTick;function f(t){setTimeout(t,0)}function l(t){return function(e){var r=(0,s.default)(arguments,1);t(function(){e.apply(null,r)})}}a=u?t:c?n.nextTick:f,e.default=l(a)}).call(this,r(35).setImmediate,r(6))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(){if(null!==t){var e=t;t=null,e.apply(this,arguments)}}},t.exports=e.default},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return(0,i.default)(function(e,r){var i;try{i=t.apply(this,e)}catch(t){return r(t)}(0,n.default)(i)&&"function"==typeof i.then?i.then(function(t){a(r,null,t)},function(t){a(r,t.message?t:new Error(t))}):r(null,i)})};var n=s(r(106)),i=s(r(319)),o=s(r(190));function s(t){return t&&t.__esModule?t:{default:t}}function a(t,e,r){try{t(e,r)}catch(t){(0,o.default)(u,t)}}function u(t){throw t}t.exports=e.default},function(t){t.exports={COMPRESSED_TYPE_INVALID:"compressed should be a boolean",EC_PRIVATE_KEY_TYPE_INVALID:"private key should be a Buffer",EC_PRIVATE_KEY_LENGTH_INVALID:"private key length is invalid",EC_PRIVATE_KEY_RANGE_INVALID:"private key range is invalid",EC_PRIVATE_KEY_TWEAK_ADD_FAIL:"tweak out of range or resulting private key is invalid",EC_PRIVATE_KEY_TWEAK_MUL_FAIL:"tweak out of range",EC_PRIVATE_KEY_EXPORT_DER_FAIL:"couldn't export to DER format",EC_PRIVATE_KEY_IMPORT_DER_FAIL:"couldn't import from DER format",EC_PUBLIC_KEYS_TYPE_INVALID:"public keys should be an Array",EC_PUBLIC_KEYS_LENGTH_INVALID:"public keys Array should have at least 1 element",EC_PUBLIC_KEY_TYPE_INVALID:"public key should be a Buffer",EC_PUBLIC_KEY_LENGTH_INVALID:"public key length is invalid",EC_PUBLIC_KEY_PARSE_FAIL:"the public key could not be parsed or is invalid",EC_PUBLIC_KEY_CREATE_FAIL:"private was invalid, try again",EC_PUBLIC_KEY_TWEAK_ADD_FAIL:"tweak out of range or resulting public key is invalid",EC_PUBLIC_KEY_TWEAK_MUL_FAIL:"tweak out of range",EC_PUBLIC_KEY_COMBINE_FAIL:"the sum of the public keys is not valid",ECDH_FAIL:"scalar was invalid (zero or overflow)",ECDSA_SIGNATURE_TYPE_INVALID:"signature should be a Buffer",ECDSA_SIGNATURE_LENGTH_INVALID:"signature length is invalid",ECDSA_SIGNATURE_PARSE_FAIL:"couldn't parse signature",ECDSA_SIGNATURE_PARSE_DER_FAIL:"couldn't parse DER signature",ECDSA_SIGNATURE_SERIALIZE_DER_FAIL:"couldn't serialize signature to DER format",ECDSA_SIGN_FAIL:"nonce generation function failed or private key is invalid",ECDSA_RECOVER_FAIL:"couldn't recover public key from signature",MSG32_TYPE_INVALID:"message should be a Buffer",MSG32_LENGTH_INVALID:"message length is invalid",OPTIONS_TYPE_INVALID:"options should be an Object",OPTIONS_DATA_TYPE_INVALID:"options.data should be a Buffer",OPTIONS_DATA_LENGTH_INVALID:"options.data length is invalid",OPTIONS_NONCEFN_TYPE_INVALID:"options.noncefn should be a Function",RECOVERY_ID_TYPE_INVALID:"recovery should be a Number",RECOVERY_ID_VALUE_INVALID:"recovery should have value between -1 and 4",TWEAK_TYPE_INVALID:"tweak should be a Buffer",TWEAK_LENGTH_INVALID:"tweak length is invalid"}},function(t,e,r){"use strict";t.exports=function(){return function(t,e){e(!0)}}},function(t,e,r){"use strict";var n=r(67),i=r(142);t.exports=function(){return function(t){var e;return function(r,o){function s(){e(null,function(e,r){!0===e?a():e?t(!0,function(t){o(e)}):o(null,r)})}function a(){e=null,t(null,function(t,r){if(t)return o(t);Array.isArray(r)||r&&"object"==typeof r?r=n(r):"function"!=typeof r&&(r=i(r)),e=r,s()})}r?e?e(r,function(e){t(e||r,o)}):t(r,o):e?s():a()}}}},function(t,e,r){"use strict";var n=t.exports=function(t){return null!==t&&"object"==typeof t&&"function"==typeof t.pipe};n.writable=function(t){return n(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState},n.readable=function(t){return n(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState},n.duplex=function(t){return n.writable(t)&&n.readable(t)},n.transform=function(t){return n.duplex(t)&&"function"==typeof t._transform&&"object"==typeof t._transformState}},function(t,e){function r(t){return"function"==typeof t}function n(t){return r(t)&&2===t.length}function i(t){return r(t)&&1===t.length}e.isDuplex=function(t){return"object"==typeof t&&n(t.source)&&i(t.sink)},e.isSource=n,e.isSink=i},,,,,,,,,,,,,,,,,,function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.preBlockToJson=e.preBlockFromJson=e.isBlockJson=e.isBlock=e.blockFromJson=e.blockToJson=void 0;var n,i=r(401),o=(n=i)&&n.__esModule?n:{default:n},s=r(28),a=r(17);var u=e.blockToJson=function(t){return{__ipfsPostMsgProxyType:"Block",cid:(0,s.cidToJson)(t.cid),data:(0,a.bufferToJson)(t.data)}},c=e.blockFromJson=function(t){var e=(0,s.cidFromJson)(t.cid),r=(0,a.bufferFromJson)(t.data);return new o.default(r,e)},f=e.isBlock=function(t){return t&&o.default.isBlock(t)},l=e.isBlockJson=function(t){return t&&"Block"===t.__ipfsPostMsgProxyType};e.preBlockFromJson=function(t){return function(){for(var e=arguments.length,r=Array(e),n=0;n>=8;for(;c>0;)o.push(255&c),c>>=8}for(var f=0;t[f]===i&&f0;)n.push(a%r),a=a/r|0}for(var u="",c=0;0===e[c]&&c=0;--f)u+=t[n[f]];return u},decodeUnsafe:a,decode:function(t){var e=a(t);if(e)return e;throw new Error("Non-base"+r+" character")}}}},function(t,e,r){"use strict";(function(e){const n=r(5);function i(t){return parseInt(t.toString("hex"),16)}function o(t){let r=t.toString(16);return r.length%2==1&&(r="0"+r),e.from(r,"hex")}t.exports={numberToBuffer:o,bufferToNumber:i,varintBufferEncode:function(t){return e.from(n.encode(i(t)))},varintBufferDecode:function(t){return o(n.decode(t))}}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";var n=r(220).BigInteger,i=r(221),o=r(222),s=r(223),a=r(104).sprintf,u=r(159);function c(t){this.valid=!1,this.address=t,this.groups=u.GROUPS,this.v4=!0,this.subnet="/32",this.subnetMask=32;var e=u.RE_SUBNET_STRING.exec(t);if(e){if(this.parsedSubnet=e[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet="/"+this.subnetMask,this.subnetMask<0||this.subnetMask>u.BITS)return this.valid=!1,void(this.error="Invalid subnet mask.");t=t.replace(u.RE_SUBNET_STRING,"")}this.addressMinusSuffix=t,this.parsedAddress=this.parse(t)}c.prototype.parse=function(t){var e=t.split(".");return t.match(u.RE_ADDRESS)?this.valid=!0:this.error="Invalid IPv4 address.",e},c.prototype.isValid=function(){return this.valid},c.prototype.correctForm=function(){return this.parsedAddress.map(function(t){return parseInt(t,10)}).join(".")},c.prototype.isCorrect=i.isCorrect(u.BITS),c.fromHex=function(t){var e,r=o(t.replace(/:/g,""),8,"0"),n=[];for(e=0;e<8;e+=2){var i=r.slice(e,e+2);n.push(parseInt(i,16))}return new c(n.join("."))},c.fromInteger=function(t){return c.fromHex(t.toString(16))},c.prototype.toHex=function(){return this.parsedAddress.map(function(t){return a("%02x",parseInt(t,10))}).join(":")},c.prototype.toArray=function(){return this.parsedAddress.map(function(t){return parseInt(t,10)})},c.prototype.toGroup6=function(){var t,e=[];for(t=0;t>15;--o>=0;){var u=32767&this[t],c=this[t++]>>15,f=a*u+c*s;i=((u=s*u+((32767&f)<<15)+r[n]+(1073741823&i))>>>30)+(f>>>15)+a*c+(i>>>30),r[n++]=1073741823&u}return i},e=30):i&&"Netscape"!=navigator.appName?(r.prototype.am=function(t,e,r,n,i,o){for(;--o>=0;){var s=e*this[t++]+r[n]+i;i=Math.floor(s/67108864),r[n++]=67108863&s}return i},e=26):(r.prototype.am=function(t,e,r,n,i,o){for(var s=16383&e,a=e>>14;--o>=0;){var u=16383&this[t],c=this[t++]>>14,f=a*u+c*s;i=((u=s*u+((16383&f)<<14)+r[n]+i)>>28)+(f>>14)+a*c,r[n++]=268435455&u}return i},e=28),r.prototype.DB=e,r.prototype.DM=(1<>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function p(t){this.m=t}function d(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function _(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function S(){}function w(t){return t}function E(t){this.r2=n(),this.q3=n(),r.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}p.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},p.prototype.revert=function(t){return t},p.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},p.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},p.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},d.prototype.convert=function(t){var e=n();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(r.ZERO)>0&&this.m.subTo(e,e),e},d.prototype.revert=function(t){var e=n();return t.copyTo(e),this.reduce(e),e},d.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=this.m.am(0,n,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},d.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},d.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},r.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},r.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},r.prototype.fromString=function(t,e){var n;if(16==e)n=4;else if(8==e)n=3;else if(256==e)n=8;else if(2==e)n=1;else if(32==e)n=5;else{if(4!=e)return void this.fromRadix(t,e);n=2}this.t=0,this.s=0;for(var i=t.length,o=!1,s=0;--i>=0;){var a=8==n?255&t[i]:f(t,i);a<0?"-"==t.charAt(i)&&(o=!0):(o=!1,0==s?this[this.t++]=a:s+n>this.DB?(this[this.t-1]|=(a&(1<>this.DB-s):this[this.t-1]|=a<=this.DB&&(s-=this.DB))}8==n&&0!=(128&t[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==t;)--this.t},r.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s},r.prototype.drShiftTo=function(t,e){for(var r=t;r=0;--r)e[r+s+1]=this[r]>>i|a,a=(this[r]&o)<=0;--r)e[r]=0;e[s]=a,e.t=this.t+s+1,e.s=this.s,e.clamp()},r.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var n=t%this.DB,i=this.DB-n,o=(1<>n;for(var s=r+1;s>n;n>0&&(e[this.t-r-1]|=(this.s&o)<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[r++]=this.DV+n:n>0&&(e[r++]=n),e.t=r,e.clamp()},r.prototype.multiplyTo=function(t,e){var n=this.abs(),i=t.abs(),o=n.t;for(e.t=o+i.t;--o>=0;)e[o]=0;for(o=0;o=0;)t[r]=0;for(r=0;r=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()},r.prototype.divRemTo=function(t,e,i){var o=t.abs();if(!(o.t<=0)){var s=this.abs();if(s.t0?(o.lShiftTo(f,a),s.lShiftTo(f,i)):(o.copyTo(a),s.copyTo(i));var l=a.t,p=a[l-1];if(0!=p){var d=p*(1<1?a[l-2]>>this.F2:0),y=this.FV/d,g=(1<=0&&(i[i.t++]=1,i.subTo(_,i)),r.ONE.dlShiftTo(l,_),_.subTo(a,a);a.t=0;){var S=i[--v]==p?this.DM:Math.floor(i[v]*y+(i[v-1]+m)*g);if((i[v]+=a.am(0,S,i,b,0,l))0&&i.rShiftTo(f,i),u<0&&r.ZERO.subTo(i,i)}}},r.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},r.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},r.prototype.exp=function(t,e){if(t>4294967295||t<1)return r.ONE;var i=n(),o=n(),s=e.convert(this),a=h(t)-1;for(s.copyTo(i);--a>=0;)if(e.sqrTo(i,o),(t&1<0)e.mulTo(o,s,i);else{var u=i;i=o,o=u}return e.revert(i)},r.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,n=(1<0)for(a>a)>0&&(i=!0,o=c(r));s>=0;)a>(a+=this.DB-e)):(r=this[s]>>(a-=e)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=c(r));return i?o:"0"},r.prototype.negate=function(){var t=n();return r.ZERO.subTo(this,t),t},r.prototype.abs=function(){return this.s<0?this.negate():this},r.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0},r.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+h(this[this.t-1]^this.s&this.DM)},r.prototype.mod=function(t){var e=n();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(r.ZERO)>0&&t.subTo(e,e),e},r.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new p(e):new d(e),this.exp(t,r)},r.ZERO=l(0),r.ONE=l(1),S.prototype.convert=w,S.prototype.revert=w,S.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},S.prototype.sqrTo=function(t,e){t.squareTo(e)},E.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=n();return t.copyTo(e),this.reduce(e),e},E.prototype.revert=function(t){return t},E.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},E.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},E.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var k,C,A,T=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],B=(1<<26)/T[T.length-1];function I(){var t;t=(new Date).getTime(),C[A++]^=255&t,C[A++]^=t>>8&255,C[A++]^=t>>16&255,C[A++]^=t>>24&255,A>=D&&(A-=D)}if(r.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},r.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),i=l(r),o=n(),s=n(),a="";for(this.divRemTo(i,o,s);o.signum()>0;)a=(r+s.intValue()).toString(t).substr(1)+a,o.divRemTo(i,o,s);return s.intValue().toString(t)+a},r.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var n=this.chunkSize(e),i=Math.pow(e,n),o=!1,s=0,a=0,u=0;u=n&&(this.dMultiply(i),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(a,0)),o&&r.ZERO.subTo(this,this)},r.prototype.fromNumber=function(t,e,n){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(r.ONE.shiftLeft(t-1),g,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(r.ONE.shiftLeft(t-1),this);else{var i=new Array,o=7&t;i.length=1+(t>>3),e.nextBytes(i),o>0?i[0]&=(1<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e[r++]=n:n<-1&&(e[r++]=this.DV+n),e.t=r,e.clamp()},r.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},r.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},r.prototype.multiplyLowerTo=function(t,e,r){var n,i=Math.min(this.t+t.t,e);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(n=r.t-this.t;i=0;)r[n]=0;for(n=Math.max(e-this.t,0);n0)if(0==e)r=this[0]%t;else for(var n=this.t-1;n>=0;--n)r=(e*r+this[n])%t;return r},r.prototype.millerRabin=function(t){var e=this.subtract(r.ONE),i=e.getLowestSetBit();if(i<=0)return!1;var o=e.shiftRight(i);(t=t+1>>1)>T.length&&(t=T.length);for(var s=n(),a=0;a>24},r.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},r.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},r.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var r,n=this.DB-t*this.DB%8,i=0;if(t-- >0)for(n>n)!=(this.s&this.DM)>>n&&(e[i++]=r|this.s<=0;)n<8?(r=(this[t]&(1<>(n+=this.DB-8)):(r=this[t]>>(n-=8)&255,n<=0&&(n+=this.DB,--t)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(e[i++]=r);return e},r.prototype.equals=function(t){return 0==this.compareTo(t)},r.prototype.min=function(t){return this.compareTo(t)<0?this:t},r.prototype.max=function(t){return this.compareTo(t)>0?this:t},r.prototype.and=function(t){var e=n();return this.bitwiseTo(t,y,e),e},r.prototype.or=function(t){var e=n();return this.bitwiseTo(t,g,e),e},r.prototype.xor=function(t){var e=n();return this.bitwiseTo(t,m,e),e},r.prototype.andNot=function(t){var e=n();return this.bitwiseTo(t,v,e),e},r.prototype.not=function(){for(var t=n(),e=0;e=this.t?0!=this.s:0!=(this[e]&1<1){var y=n();for(i.sqrTo(a[1],y);u<=f;)a[u]=n(),i.mulTo(y,a[u-2],a[u]),u+=2}var g,m,v=t.t-1,b=!0,_=n();for(o=h(t[v])-1;v>=0;){for(o>=c?g=t[v]>>o-c&f:(g=(t[v]&(1<0&&(g|=t[v-1]>>this.DB+o-c)),u=r;0==(1&g);)g>>=1,--u;if((o-=u)<0&&(o+=this.DB,--v),b)a[g].copyTo(s),b=!1;else{for(;u>1;)i.sqrTo(s,_),i.sqrTo(_,s),u-=2;u>0?i.sqrTo(s,_):(m=s,s=_,_=m),i.mulTo(_,a[g],s)}for(;v>=0&&0==(t[v]&1<=0?(n.subTo(i,n),e&&o.subTo(a,o),s.subTo(u,s)):(i.subTo(n,i),e&&a.subTo(o,a),u.subTo(s,u))}return 0!=i.compareTo(r.ONE)?r.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u},r.prototype.pow=function(t){return this.exp(t,new S)},r.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var n=e;e=r,r=n}var i=e.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return e;for(i0&&(e.rShiftTo(o,e),r.rShiftTo(o,r));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},r.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r[0]<=T[T.length-1]){for(e=0;e>>8,C[A++]=255&M;A=0,I()}function N(){if(null==k){for(I(),(k=new L).init(C),A=0;Ai)return r;do{e%2&&(r+=t),(e=P(e/2))&&(t+=t)}while(e);return r}function U(t){if("string"==typeof t)return t;if(F(t))return D?D.call(t):"";var e=t+"";return"0"==e&&1/t==-n?"-0":e}function K(t,e,r){var n=t.length;return r=void 0===r?n:r,!e&&r>=n?t:function(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(r=r>i?i:r)<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=Array(i);++n-1&&t%1==0&&t<=n}(t.length)&&!function(t){var e=k(t)?v.call(t):"";return e==s||e==a}(t)}(r)&&function(t,e){return!!(e=null==e?n:e)&&("number"==typeof t||p.test(t))&&t>-1&&t%1==0&&tn)return r;do{e%2&&(r+=t),(e=_(e/2))&&(t+=t)}while(e);return r}(T(t),e)}}).call(this,r(12))},function(t,e,r){"use strict";var n=r(104).sprintf,i=e.spanAllZeroes=function(t){return t.replace(/(0+)/g,'$1')};function o(t){return t.replace(/^(0+)/,'$1')}e.spanAll=function(t,e){return void 0===e&&(e=0),t.split("").map(function(t,r){return n('%s',t,r+e,i(t))}).join("")},e.spanLeadingZeroes=function(t){return t.split(":").map(function(t){return o(t)}).join(":")},e.simpleGroup=function(t,e){var r=t.split(":");return e||(e=0),r.map(function(t,r){return/group-v4/.test(t)?t:n('%s',r+e,o(t))}).join(":")}},function(t,e,r){"use strict";(function(t){const n=r(7);e.toCallback=(t=>(function(e,r){const i=(t,e)=>n(()=>{r(t,e)});let o;try{o=t(e)}catch(t){return void i(t)}i(null,o)})),e.toBuf=((e,r)=>n=>{let i=e(n,r);return t.from(i,"hex")}),e.fromString=((e,r)=>n=>{const i=t.isBuffer(n)?n.toString():n;return e(i,r)}),e.fromNumberTo32BitBuf=((e,r)=>n=>{let i=e(n,r);const o=new Array(4);for(let t=0;t<4;t++)o[t]=255&i,i>>=8;return t.from(o)})}).call(this,r(0).Buffer)},function(t,e){t.exports=function(t){return t&&"function"==typeof t.then}},function(t,e,r){(function(e){var r="Input must be an string, Buffer or Uint8Array";function n(t){return(4294967296+t).toString(16).substring(1)}t.exports={normalizeInput:function(t){var n;if(t instanceof Uint8Array)n=t;else if(t instanceof e)n=new Uint8Array(t);else{if("string"!=typeof t)throw new Error(r);n=new Uint8Array(e.from(t,"utf8"))}return n},toHex:function(t){return Array.prototype.map.call(t,function(t){return(t<16?"0":"")+t.toString(16)}).join("")},debugPrint:function(t,e,r){for(var i="\n"+t+" = ",o=0;o{n([e=>o.deserialize(t,e),(t,n)=>{if(!e)return r(null,{value:t,remainderPath:""});const i=e.split("/");if("Links"===i[0]){let e="";if(!i[1])return n(null,{value:t.links.map(t=>t.toJSON()),remainderPath:""});const r={};t.links.forEach((t,e)=>{const n=t.toJSON();r[e]=r[n.name]={hash:n.multihash,name:n.name,size:n.size}});let o=r[i[1]];"Hash"===i[2]?o={"/":o.hash}:"Tsize"===i[2]?o=o.size:"Name"===i[2]&&(o=o.name),n(null,{value:o,remainderPath:e=i.slice(3).join("/")})}else if("Data"===i[0])n(null,{value:t.data,remainderPath:""});else{const e={};t.links.forEach((t,r)=>{const n=t.toJSON();e[n.name]={hash:n.multihash,name:n.name,size:n.size}});const r=e[i[0]];if(r)return n(null,{value:{"/":r.hash},remainderPath:i.slice(1).join("/")});n(new Error("path not available"))}}],r)}),e.tree=((t,e,r)=>{"function"==typeof e&&(r=e,e={}),e=e||{},o.deserialize(t,(t,e)=>{if(t)return r(t);const n=[];n.push("Links"),e.links.forEach((t,e)=>{n.push(`Links/${e}/Name`),n.push(`Links/${e}/Tsize`),n.push(`Links/${e}/Hash`)}),n.push("Data"),r(null,n)})}),e.isLink=((t,r,n)=>{e.resolve(t,r,(t,e)=>{if(t)return n(t);if(e.remainderPath.length>0)return n(new Error("path out of scope"));if("object"==typeof e.value&&e.value["/"]){let r;try{r=i.isCID(new i(e.value["/"]))}catch(t){r=!1}if(r)return n(null,e.value)}n(null,!1)})})},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(e,r,n){if(!function(t){var e=Object.prototype.toString.call(t);return"[object Object]"===e||"[object Array]"===e}(e))return e;if(Array.isArray(e))return e.map(function(e,i){return r(e)?n(e):t(e,r,n)});return Object.keys(e).reduce(function(i,o){return i[o]=r(e[o])?n(e[o]):t(e[o],r,n),i},{})}},function(t,e,r){"use strict";(function(t){const n=r(164),i=r(165)(),o=r(458),s={SHA1:"SHA-1",SHA256:"SHA-256",SHA512:"SHA-512"};e.create=function(e,r,a){const u=s[e];n(i.subtle.importKey("raw",r,{name:"HMAC",hash:{name:u}},!1,["sign"]).then(r=>({digest(e,o){((e,r,o)=>{n(i.subtle.sign({name:"HMAC"},e,r).then(e=>t.from(e)),o)})(r,e,o)},length:o[e]})),a)}}).call(this,r(0).Buffer)},function(t,e,r){var n={ECB:r(462),CBC:r(463),CFB:r(464),CFB8:r(465),CFB1:r(466),OFB:r(467),CTR:r(232),GCM:r(232)},i=r(234);for(var o in i)i[o].module=n[i[o].mode];t.exports=i},function(t,e,r){var n=r(107),i=r(3).Buffer,o=r(233);function s(t){var e=t._cipher.encryptBlockRaw(t._prev);return o(t._prev),e}e.encrypt=function(t,e){var r=Math.ceil(e.length/16),o=t._cache.length;t._cache=i.concat([t._cache,i.allocUnsafe(16*r)]);for(var a=0;a0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),n?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):S(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?S(t,s,e,!1):A(t,s)):S(t,s,e,!1))):n||(s.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=w?t=w:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function k(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(p("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(C,t):C(t))}function C(t){p("emit readable"),t.emit("readable"),M(t)}function A(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(T,t,e))}function T(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;to.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0===(t-=s)){s===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=c.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),0===(t-=s)){s===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function R(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(N,e,t))}function N(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function P(t,e){for(var r=0,n=t.length;r=e.highWaterMark||e.ended))return p("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?R(this):k(this),null;if(0===(t=E(t,e))&&e.ended)return 0===e.length&&R(this),null;var n,i=e.needReadable;return p("need readable",i),(0===e.length||e.length-t0?x(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&R(this)),null!==n&&this.emit("data",n),n},b.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?f:b;function c(e,n){p("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,p("cleanup"),t.removeListener("close",m),t.removeListener("finish",v),t.removeListener("drain",l),t.removeListener("error",g),t.removeListener("unpipe",c),r.removeListener("end",f),r.removeListener("end",b),r.removeListener("data",y),h=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function f(){p("onend"),t.end()}o.endEmitted?i.nextTick(u):r.once("end",u),t.on("unpipe",c);var l=function(t){return function(){var e=t._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,M(t))}}(r);t.on("drain",l);var h=!1;var d=!1;function y(e){p("ondata"),d=!1,!1!==t.write(e)||d||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==P(o.pipes,t))&&!h&&(p("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function g(e){p("onerror",e),b(),t.removeListener("error",g),0===a(t,"error")&&t.emit("error",e)}function m(){t.removeListener("finish",v),b()}function v(){p("onfinish"),t.removeListener("close",m),b()}function b(){p("unpipe"),r.unpipe(t)}return r.on("data",y),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",g),t.once("close",m),t.once("finish",v),t.emit("pipe",r),o.flowing||(p("pipe resume"),r.resume()),t},b.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0||o>0;){var f=new i;f.update(c),f.update(t),e&&f.update(e),c=f.digest();var l=0;if(s>0){var h=a.length-s;l=Math.min(s,c.length),c.copy(a,h,0,l),s-=l}if(l0){var p=u.length-o,d=Math.min(o,c.length-l);c.copy(u,p,l,l+d),o-=d}}return c.fill(0),{key:a,iv:u}}},function(t,e,r){"use strict";var n=r(3).Buffer,i=r(66).Transform;function o(t){i.call(this),this._block=n.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(4)(o,i),o.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(t)||(t=n.from(t,e));for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},function(t,e,r){var n=r(8);r(13),n.cipher=n.cipher||{};var i=t.exports=n.cipher.modes=n.cipher.modes||{};function o(t){if("string"==typeof t&&(t=n.util.createBuffer(t)),n.util.isArray(t)&&t.length>4){var e=t;t=n.util.createBuffer();for(var r=0;r0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=t.length(),n=t.at(r-1);return!(n>this.blockSize<<2)&&(t.truncate(n),!0)},i.cbc=function(t){t=t||{},this.name="CBC",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.cbc.prototype.start=function(t){if(null===t.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=o(t.iv),this._prev=this._iv.slice(0)}},i.cbc.prototype.encrypt=function(t,e,r){if(t.length()0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=t.length(),n=t.at(r-1);return!(n>this.blockSize<<2)&&(t.truncate(n),!0)},i.cfb=function(t){t=t||{},this.name="CFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.cfb.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=o(t.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.cfb.prototype.encrypt=function(t,e,r){var n=t.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0)t.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return e.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.cfb.prototype.decrypt=function(t,e,r){var n=t.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0)t.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return e.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb=function(t){t=t||{},this.name="OFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ofb.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=o(t.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ofb.prototype.encrypt=function(t,e,r){var n=t.length();if(0===t.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0)t.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return e.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb.prototype.decrypt=i.ofb.prototype.encrypt,i.ctr=function(t){t=t||{},this.name="CTR",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ctr.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=o(t.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ctr.prototype.encrypt=function(t,e,r){var n=t.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0&&(t.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return e.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}s(this._inBlock)},i.ctr.prototype.decrypt=i.ctr.prototype.encrypt,i.gcm=function(t){t=t||{},this.name="GCM",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0,this._R=3774873600},i.gcm.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");var e,r=n.util.createBuffer(t.iv);if(this._cipherLength=0,e="additionalData"in t?n.util.createBuffer(t.additionalData):n.util.createBuffer(),this._tagLength="tagLength"in t?t.tagLength:128,this._tag=null,t.decrypt&&(this._tag=n.util.createBuffer(t.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var i=r.length();if(12===i)this._j0=[r.getInt32(),r.getInt32(),r.getInt32(),1];else{for(this._j0=[0,0,0,0];r.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(a(8*i)))}this._inBlock=this._j0.slice(0),s(this._inBlock),this._partialBytes=0,e=n.util.createBuffer(e),this._aDataLength=a(8*e.length());var o=e.length()%this.blockSize;for(o&&e.fillWithByte(0,this.blockSize-o),this._s=[0,0,0,0];e.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[e.getInt32(),e.getInt32(),e.getInt32(),e.getInt32()])},i.gcm.prototype.encrypt=function(t,e,r){var n=t.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize){for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.read-=this.blockSize,e.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),s(this._inBlock)},i.gcm.prototype.decrypt=function(t,e,r){var n=t.length();if(n0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),s(this._inBlock),this._hashBlock[0]=t.getInt32(),this._hashBlock[1]=t.getInt32(),this._hashBlock[2]=t.getInt32(),this._hashBlock[3]=t.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var i=0;i0;--n)e[n]=t[n]>>>1|(1&t[n-1])<<31;e[0]=t[0]>>>1,r&&(e[0]^=this._R)},i.gcm.prototype.tableMultiply=function(t){for(var e=[0,0,0,0],r=0;r<32;++r){var n=t[r/8|0]>>>4*(7-r%8)&15,i=this._m[r][n];e[0]^=i[0],e[1]^=i[1],e[2]^=i[2],e[3]^=i[3]}return e},i.gcm.prototype.ghash=function(t,e,r){return e[0]^=r[0],e[1]^=r[1],e[2]^=r[2],e[3]^=r[3],this.tableMultiply(e)},i.gcm.prototype.generateHashTable=function(t,e){for(var r=8/e,n=4*r,i=16*r,o=new Array(i),s=0;s>>1,i=new Array(r);i[n]=t.slice(0);for(var o=n>>>1;o>0;)this.pow(i[2*o],i[o]=[]),o>>=1;for(o=2;o>1,a=s+(1&t.length),u=t.substr(0,a),c=t.substr(s,a),f=n.util.createBuffer(),l=n.hmac.create();r=e+r;var h=Math.ceil(i/16),p=Math.ceil(i/20);l.start("MD5",u);var d=n.util.createBuffer();f.putBytes(r);for(var y=0;y0&&(c.queue(t,c.createAlert(t,{level:c.Alert.Level.warning,description:c.Alert.Description.no_renegotiation})),c.flush(t)),t.process()},c.parseHelloMessage=function(t,e,r){var i=null,o=t.entity===c.ConnectionEnd.client;if(r<38)t.error(t,{message:o?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.illegal_parameter}});else{var s=e.fragment,u=s.length();if(i={version:{major:s.getByte(),minor:s.getByte()},random:n.util.createBuffer(s.getBytes(32)),session_id:a(s,1),extensions:[]},o?(i.cipher_suite=s.getBytes(2),i.compression_method=s.getByte()):(i.cipher_suites=a(s,2),i.compression_methods=a(s,1)),(u=r-(u-s.length()))>0){for(var f=a(s,2);f.length()>0;)i.extensions.push({type:[f.getByte(),f.getByte()],data:a(f,2)});if(!o)for(var l=0;l0;){if(0!==p.getByte())break;t.session.extensions.server_name.serverNameList.push(a(p,2).getBytes())}}}if(t.session.version&&(i.version.major!==t.session.version.major||i.version.minor!==t.session.version.minor))return t.error(t,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.protocol_version}});if(o)t.session.cipherSuite=c.getCipherSuite(i.cipher_suite);else for(var d=n.util.createBuffer(i.cipher_suites.bytes());d.length()>0&&(t.session.cipherSuite=c.getCipherSuite(d.getBytes(2)),null===t.session.cipherSuite););if(null===t.session.cipherSuite)return t.error(t,{message:"No cipher suites in common.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.handshake_failure},cipherSuite:n.util.bytesToHex(i.cipher_suite)});t.session.compressionMethod=o?i.compression_method:c.CompressionMethod.none}return i},c.createSecurityParameters=function(t,e){var r=t.entity===c.ConnectionEnd.client,n=e.random.bytes(),i=r?t.session.sp.client_random:n,o=r?n:c.createRandom().getBytes();t.session.sp={entity:t.entity,prf_algorithm:c.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:t.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:i,server_random:o}},c.handleServerHello=function(t,e,r){var n=c.parseHelloMessage(t,e,r);if(!t.fail){if(!(n.version.minor<=t.version.minor))return t.error(t,{message:"Incompatible TLS version.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.protocol_version}});t.version.minor=n.version.minor,t.session.version=t.version;var i=n.session_id.bytes();i.length>0&&i===t.session.id?(t.expect=d,t.session.resuming=!0,t.session.sp.server_random=n.random.bytes()):(t.expect=f,t.session.resuming=!1,c.createSecurityParameters(t,n)),t.session.id=i,t.process()}},c.handleClientHello=function(t,e,r){var i=c.parseHelloMessage(t,e,r);if(!t.fail){var o=i.session_id.bytes(),s=null;if(t.sessionCache&&(null===(s=t.sessionCache.getSession(o))?o="":(s.version.major!==i.version.major||s.version.minor>i.version.minor)&&(s=null,o="")),0===o.length&&(o=n.random.getBytes(32)),t.session.id=o,t.session.clientHelloVersion=i.version,t.session.sp={},s)t.version=t.session.version=s.version,t.session.sp=s.sp;else{for(var a,u=1;u0;)i=a(u.certificate_list,3),o=n.asn1.fromDer(i),i=n.pki.certificateFromAsn1(o,!0),f.push(i)}catch(e){return t.error(t,{message:"Could not parse certificate list.",cause:e,send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.bad_certificate}})}var h=t.entity===c.ConnectionEnd.client;!h&&!0!==t.verifyClient||0!==f.length?0===f.length?t.expect=h?l:b:(h?t.session.serverCertificate=f[0]:t.session.clientCertificate=f[0],c.verifyCertificateChain(t,f)&&(t.expect=h?l:b)):t.error(t,{message:h?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.illegal_parameter}}),t.process()},c.handleServerKeyExchange=function(t,e,r){if(r>0)return t.error(t,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.unsupported_certificate}});t.expect=h,t.process()},c.handleClientKeyExchange=function(t,e,r){if(r<48)return t.error(t,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.unsupported_certificate}});var i=e.fragment,o={enc_pre_master_secret:a(i,2).getBytes()},s=null;if(t.getPrivateKey)try{s=t.getPrivateKey(t,t.session.serverCertificate),s=n.pki.privateKeyFromPem(s)}catch(e){t.error(t,{message:"Could not get private key.",cause:e,send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.internal_error}})}if(null===s)return t.error(t,{message:"No private key set.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.internal_error}});try{var u=t.session.sp;u.pre_master_secret=s.decrypt(o.enc_pre_master_secret);var f=t.session.clientHelloVersion;if(f.major!==u.pre_master_secret.charCodeAt(0)||f.minor!==u.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch(t){u.pre_master_secret=n.random.getBytes(48)}t.expect=S,null!==t.session.clientCertificate&&(t.expect=_),t.process()},c.handleCertificateRequest=function(t,e,r){if(r<3)return t.error(t,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.illegal_parameter}});var n=e.fragment,i={certificate_types:a(n,1),certificate_authorities:a(n,2)};t.session.certificateRequest=i,t.expect=p,t.process()},c.handleCertificateVerify=function(t,e,r){if(r<2)return t.error(t,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.illegal_parameter}});var i=e.fragment;i.read-=4;var o=i.bytes();i.read+=4;var s={signature:a(i,2).getBytes()},u=n.util.createBuffer();u.putBuffer(t.session.md5.digest()),u.putBuffer(t.session.sha1.digest()),u=u.getBytes();try{if(!t.session.clientCertificate.publicKey.verify(u,s.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");t.session.md5.update(o),t.session.sha1.update(o)}catch(e){return t.error(t,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.handshake_failure}})}t.expect=S,t.process()},c.handleServerHelloDone=function(t,e,r){if(r>0)return t.error(t,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.record_overflow}});if(null===t.serverCertificate){var i={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.insufficient_security}},o=t.verify(t,i.alert.description,0,[]);if(!0!==o)return(o||0===o)&&("object"!=typeof o||n.util.isArray(o)?"number"==typeof o&&(i.alert.description=o):(o.message&&(i.message=o.message),o.alert&&(i.alert.description=o.alert))),t.error(t,i)}null!==t.session.certificateRequest&&(e=c.createRecord(t,{type:c.ContentType.handshake,data:c.createCertificate(t)}),c.queue(t,e)),e=c.createRecord(t,{type:c.ContentType.handshake,data:c.createClientKeyExchange(t)}),c.queue(t,e),t.expect=m;var s=function(t,e){null!==t.session.certificateRequest&&null!==t.session.clientCertificate&&c.queue(t,c.createRecord(t,{type:c.ContentType.handshake,data:c.createCertificateVerify(t,e)})),c.queue(t,c.createRecord(t,{type:c.ContentType.change_cipher_spec,data:c.createChangeCipherSpec()})),t.state.pending=c.createConnectionState(t),t.state.current.write=t.state.pending.write,c.queue(t,c.createRecord(t,{type:c.ContentType.handshake,data:c.createFinished(t)})),t.expect=d,c.flush(t),t.process()};if(null===t.session.certificateRequest||null===t.session.clientCertificate)return s(t,null);c.getClientSignature(t,s)},c.handleChangeCipherSpec=function(t,e){if(1!==e.fragment.getByte())return t.error(t,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.illegal_parameter}});var r=t.entity===c.ConnectionEnd.client;(t.session.resuming&&r||!t.session.resuming&&!r)&&(t.state.pending=c.createConnectionState(t)),t.state.current.read=t.state.pending.read,(!t.session.resuming&&r||t.session.resuming&&!r)&&(t.state.pending=null),t.expect=r?y:w,t.process()},c.handleFinished=function(t,e,r){var o=e.fragment;o.read-=4;var s=o.bytes();o.read+=4;var a=e.fragment.getBytes();(o=n.util.createBuffer()).putBuffer(t.session.md5.digest()),o.putBuffer(t.session.sha1.digest());var u=t.entity===c.ConnectionEnd.client,f=u?"server finished":"client finished",l=t.session.sp;if((o=i(l.master_secret,f,o.getBytes(),12)).getBytes()!==a)return t.error(t,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.decrypt_error}});t.session.md5.update(s),t.session.sha1.update(s),(t.session.resuming&&u||!t.session.resuming&&!u)&&(c.queue(t,c.createRecord(t,{type:c.ContentType.change_cipher_spec,data:c.createChangeCipherSpec()})),t.state.current.write=t.state.pending.write,t.state.pending=null,c.queue(t,c.createRecord(t,{type:c.ContentType.handshake,data:c.createFinished(t)}))),t.expect=u?g:E,t.handshaking=!1,++t.handshakes,t.peerCertificate=u?t.session.serverCertificate:t.session.clientCertificate,c.flush(t),t.isConnected=!0,t.connected(t),t.process()},c.handleAlert=function(t,e){var r,n=e.fragment,i={level:n.getByte(),description:n.getByte()};switch(i.description){case c.Alert.Description.close_notify:r="Connection closed.";break;case c.Alert.Description.unexpected_message:r="Unexpected message.";break;case c.Alert.Description.bad_record_mac:r="Bad record MAC.";break;case c.Alert.Description.decryption_failed:r="Decryption failed.";break;case c.Alert.Description.record_overflow:r="Record overflow.";break;case c.Alert.Description.decompression_failure:r="Decompression failed.";break;case c.Alert.Description.handshake_failure:r="Handshake failure.";break;case c.Alert.Description.bad_certificate:r="Bad certificate.";break;case c.Alert.Description.unsupported_certificate:r="Unsupported certificate.";break;case c.Alert.Description.certificate_revoked:r="Certificate revoked.";break;case c.Alert.Description.certificate_expired:r="Certificate expired.";break;case c.Alert.Description.certificate_unknown:r="Certificate unknown.";break;case c.Alert.Description.illegal_parameter:r="Illegal parameter.";break;case c.Alert.Description.unknown_ca:r="Unknown certificate authority.";break;case c.Alert.Description.access_denied:r="Access denied.";break;case c.Alert.Description.decode_error:r="Decode error.";break;case c.Alert.Description.decrypt_error:r="Decrypt error.";break;case c.Alert.Description.export_restriction:r="Export restriction.";break;case c.Alert.Description.protocol_version:r="Unsupported protocol version.";break;case c.Alert.Description.insufficient_security:r="Insufficient security.";break;case c.Alert.Description.internal_error:r="Internal error.";break;case c.Alert.Description.user_canceled:r="User canceled.";break;case c.Alert.Description.no_renegotiation:r="Renegotiation not supported.";break;default:r="Unknown error."}if(i.description===c.Alert.Description.close_notify)return t.close();t.error(t,{message:r,send:!1,origin:t.entity===c.ConnectionEnd.client?"server":"client",alert:i}),t.process()},c.handleHandshake=function(t,e){var r=e.fragment,i=r.getByte(),o=r.getInt24();if(o>r.length())return t.fragmented=e,e.fragment=n.util.createBuffer(),r.read-=4,t.process();t.fragmented=null,r.read-=4;var s=r.bytes(o+4);r.read+=4,i in U[t.entity][t.expect]?(t.entity!==c.ConnectionEnd.server||t.open||t.fail||(t.handshaking=!0,t.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:n.md.md5.create(),sha1:n.md.sha1.create()}),i!==c.HandshakeType.hello_request&&i!==c.HandshakeType.certificate_verify&&i!==c.HandshakeType.finished&&(t.session.md5.update(s),t.session.sha1.update(s)),U[t.entity][t.expect][i](t,e,o)):c.handleUnexpected(t,e)},c.handleApplicationData=function(t,e){t.data.putBuffer(e.fragment),t.dataReady(t),t.process()},c.handleHeartbeat=function(t,e){var r=e.fragment,i=r.getByte(),o=r.getInt16(),s=r.getBytes(o);if(i===c.HeartbeatMessageType.heartbeat_request){if(t.handshaking||o>s.length)return t.process();c.queue(t,c.createRecord(t,{type:c.ContentType.heartbeat,data:c.createHeartbeat(c.HeartbeatMessageType.heartbeat_response,s)})),c.flush(t)}else if(i===c.HeartbeatMessageType.heartbeat_response){if(s!==t.expectedHeartbeatPayload)return t.process();t.heartbeatReceived&&t.heartbeatReceived(t,n.util.createBuffer(s))}t.process()};var f=1,l=2,h=3,p=4,d=5,y=6,g=7,m=8,v=1,b=2,_=3,S=4,w=5,E=6,k=c.handleUnexpected,C=c.handleChangeCipherSpec,A=c.handleAlert,T=c.handleHandshake,B=c.handleApplicationData,I=c.handleHeartbeat,M=[];M[c.ConnectionEnd.client]=[[k,A,T,k,I],[k,A,T,k,I],[k,A,T,k,I],[k,A,T,k,I],[k,A,T,k,I],[C,A,k,k,I],[k,A,T,k,I],[k,A,T,B,I],[k,A,T,k,I]],M[c.ConnectionEnd.server]=[[k,A,T,k,I],[k,A,T,k,I],[k,A,T,k,I],[k,A,T,k,I],[C,A,k,k,I],[k,A,T,k,I],[k,A,T,B,I],[k,A,T,k,I]];var x=c.handleHelloRequest,R=c.handleServerHello,N=c.handleCertificate,P=c.handleServerKeyExchange,L=c.handleCertificateRequest,D=c.handleServerHelloDone,O=c.handleFinished,U=[];U[c.ConnectionEnd.client]=[[k,k,R,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k],[x,k,k,k,k,k,k,k,k,k,k,N,P,L,D,k,k,k,k,k,k],[x,k,k,k,k,k,k,k,k,k,k,k,P,L,D,k,k,k,k,k,k],[x,k,k,k,k,k,k,k,k,k,k,k,k,L,D,k,k,k,k,k,k],[x,k,k,k,k,k,k,k,k,k,k,k,k,k,D,k,k,k,k,k,k],[x,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k],[x,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,O],[x,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k],[x,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k]];var K=c.handleClientHello,j=c.handleClientKeyExchange,F=c.handleCertificateVerify;U[c.ConnectionEnd.server]=[[k,K,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k],[k,k,k,k,k,k,k,k,k,k,k,N,k,k,k,k,k,k,k,k,k],[k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,j,k,k,k,k],[k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,F,k,k,k,k,k],[k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k],[k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,O],[k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k],[k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k]],c.generateKeys=function(t,e){var r=i,n=e.client_random+e.server_random;t.session.resuming||(e.master_secret=r(e.pre_master_secret,"master secret",n,48).bytes(),e.pre_master_secret=null),n=e.server_random+e.client_random;var o=2*e.mac_key_length+2*e.enc_key_length,s=t.version.major===c.Versions.TLS_1_0.major&&t.version.minor===c.Versions.TLS_1_0.minor;s&&(o+=2*e.fixed_iv_length);var a=r(e.master_secret,"key expansion",n,o),u={client_write_MAC_key:a.getBytes(e.mac_key_length),server_write_MAC_key:a.getBytes(e.mac_key_length),client_write_key:a.getBytes(e.enc_key_length),server_write_key:a.getBytes(e.enc_key_length)};return s&&(u.client_write_IV=a.getBytes(e.fixed_iv_length),u.server_write_IV=a.getBytes(e.fixed_iv_length)),u},c.createConnectionState=function(t){var e=t.entity===c.ConnectionEnd.client,r=function(){var t={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(t){return!0},compressionState:null,compressFunction:function(t){return!0},updateSequenceNumber:function(){4294967295===t.sequenceNumber[1]?(t.sequenceNumber[1]=0,++t.sequenceNumber[0]):++t.sequenceNumber[1]}};return t},n={read:r(),write:r()};if(n.read.update=function(t,e){return n.read.cipherFunction(e,n.read)?n.read.compressFunction(t,e,n.read)||t.error(t,{message:"Could not decompress record.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.decompression_failure}}):t.error(t,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.bad_record_mac}}),!t.fail},n.write.update=function(t,e){return n.write.compressFunction(t,e,n.write)?n.write.cipherFunction(e,n.write)||t.error(t,{message:"Could not encrypt record.",send:!1,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.internal_error}}):t.error(t,{message:"Could not compress record.",send:!1,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.internal_error}}),!t.fail},t.session){var i=t.session.sp;switch(t.session.cipherSuite.initSecurityParameters(i),i.keys=c.generateKeys(t,i),n.read.macKey=e?i.keys.server_write_MAC_key:i.keys.client_write_MAC_key,n.write.macKey=e?i.keys.client_write_MAC_key:i.keys.server_write_MAC_key,t.session.cipherSuite.initConnectionState(n,t,i),i.compression_algorithm){case c.CompressionMethod.none:break;case c.CompressionMethod.deflate:n.read.compressFunction=s,n.write.compressFunction=o;break;default:throw new Error("Unsupported compression algorithm.")}}return n},c.createRandom=function(){var t=new Date,e=+t+6e4*t.getTimezoneOffset(),r=n.util.createBuffer();return r.putInt32(e),r.putBytes(n.random.getBytes(28)),r},c.createRecord=function(t,e){return e.data?{type:e.type,version:{major:t.version.major,minor:t.version.minor},length:e.data.length(),fragment:e.data}:null},c.createAlert=function(t,e){var r=n.util.createBuffer();return r.putByte(e.level),r.putByte(e.description),c.createRecord(t,{type:c.ContentType.alert,data:r})},c.createClientHello=function(t){t.session.clientHelloVersion={major:t.version.major,minor:t.version.minor};for(var e=n.util.createBuffer(),r=0;r0&&(d+=2);var y=t.session.id,g=y.length+1+2+4+28+2+o+1+a+d,m=n.util.createBuffer();return m.putByte(c.HandshakeType.client_hello),m.putInt24(g),m.putByte(t.version.major),m.putByte(t.version.minor),m.putBytes(t.session.sp.client_random),u(m,1,n.util.createBuffer(y)),u(m,2,e),u(m,1,s),d>0&&u(m,2,f),m},c.createServerHello=function(t){var e=t.session.id,r=e.length+1+2+4+28+2+1,i=n.util.createBuffer();return i.putByte(c.HandshakeType.server_hello),i.putInt24(r),i.putByte(t.version.major),i.putByte(t.version.minor),i.putBytes(t.session.sp.server_random),u(i,1,n.util.createBuffer(e)),i.putByte(t.session.cipherSuite.id[0]),i.putByte(t.session.cipherSuite.id[1]),i.putByte(t.session.compressionMethod),i},c.createCertificate=function(t){var e,r=t.entity===c.ConnectionEnd.client,i=null;t.getCertificate&&(e=r?t.session.certificateRequest:t.session.extensions.server_name.serverNameList,i=t.getCertificate(t,e));var o=n.util.createBuffer();if(null!==i)try{n.util.isArray(i)||(i=[i]);for(var s=null,a=0;ac.MaxFragment;)i.push(c.createRecord(t,{type:e.type,data:n.util.createBuffer(o.slice(0,c.MaxFragment))})),o=o.slice(c.MaxFragment);o.length>0&&i.push(c.createRecord(t,{type:e.type,data:n.util.createBuffer(o)}))}for(var s=0;s0&&(i=r.order[0]),null!==i&&i in r.cache)for(var o in e=r.cache[i],delete r.cache[i],r.order)if(r.order[o]===i){r.order.splice(o,1);break}return e},r.setSession=function(t,e){if(r.order.length===r.capacity){var i=r.order.shift();delete r.cache[i]}i=n.util.bytesToHex(t);r.order.push(i),r.cache[i]=e}}return r},c.createConnection=function(t){var e=null;e=t.caStore?n.util.isArray(t.caStore)?n.pki.createCaStore(t.caStore):t.caStore:n.pki.createCaStore();var r=t.cipherSuites||null;if(null===r)for(var i in r=[],c.CipherSuites)r.push(c.CipherSuites[i]);var o=t.server?c.ConnectionEnd.server:c.ConnectionEnd.client,s=t.sessionCache?c.createSessionCache(t.sessionCache):null,a={version:{major:c.Version.major,minor:c.Version.minor},entity:o,sessionId:t.sessionId,caStore:e,sessionCache:s,cipherSuites:r,connected:t.connected,virtualHost:t.virtualHost||null,verifyClient:t.verifyClient||!1,verify:t.verify||function(t,e,r,n){return e},getCertificate:t.getCertificate||null,getPrivateKey:t.getPrivateKey||null,getSignature:t.getSignature||null,input:n.util.createBuffer(),tlsData:n.util.createBuffer(),data:n.util.createBuffer(),tlsDataReady:t.tlsDataReady,dataReady:t.dataReady,heartbeatReceived:t.heartbeatReceived,closed:t.closed,error:function(e,r){r.origin=r.origin||(e.entity===c.ConnectionEnd.client?"client":"server"),r.send&&(c.queue(e,c.createAlert(e,r.alert)),c.flush(e));var n=!1!==r.fatal;n&&(e.fail=!0),t.error(e,r),n&&e.close(!1)},deflate:t.deflate||null,inflate:t.inflate||null,reset:function(t){a.version={major:c.Version.major,minor:c.Version.minor},a.record=null,a.session=null,a.peerCertificate=null,a.state={pending:null,current:null},a.expect=(a.entity,c.ConnectionEnd.client,0),a.fragmented=null,a.records=[],a.open=!1,a.handshakes=0,a.handshaking=!1,a.isConnected=!1,a.fail=!(t||void 0===t),a.input.clear(),a.tlsData.clear(),a.data.clear(),a.state.current=c.createConnectionState(a)}};a.reset();return a.handshake=function(t){if(a.entity!==c.ConnectionEnd.client)a.error(a,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(a.handshaking)a.error(a,{message:"Handshake already in progress.",fatal:!1});else{a.fail&&!a.open&&0===a.handshakes&&(a.fail=!1),a.handshaking=!0;var e=null;(t=t||"").length>0&&(a.sessionCache&&(e=a.sessionCache.getSession(t)),null===e&&(t="")),0===t.length&&a.sessionCache&&null!==(e=a.sessionCache.getSession())&&(t=e.id),a.session={id:t,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:n.md.md5.create(),sha1:n.md.sha1.create()},e&&(a.version=e.version,a.session.sp=e.sp),a.session.sp.client_random=c.createRandom().getBytes(),a.open=!0,c.queue(a,c.createRecord(a,{type:c.ContentType.handshake,data:c.createClientHello(a)})),c.flush(a)}},a.process=function(t){var e=0;return t&&a.input.putBytes(t),a.fail||(null!==a.record&&a.record.ready&&a.record.fragment.isEmpty()&&(a.record=null),null===a.record&&(e=function(t){var e=0,r=t.input,i=r.length();if(i<5)e=5-i;else{t.record={type:r.getByte(),version:{major:r.getByte(),minor:r.getByte()},length:r.getInt16(),fragment:n.util.createBuffer(),ready:!1};var o=t.record.version.major===t.version.major;o&&t.session&&t.session.version&&(o=t.record.version.minor===t.version.minor),o||t.error(t,{message:"Incompatible TLS version.",send:!0,alert:{level:c.Alert.Level.fatal,description:c.Alert.Description.protocol_version}})}return e}(a)),a.fail||null===a.record||a.record.ready||(e=function(t){var e=0,r=t.input,n=r.length();n=0;u--)I>>=8,I+=C.at(u)+B.at(u),B.setAt(u,255&I);T.putBuffer(B)}_=T,l.putBuffer(E)}return l.truncate(l.length()-o),l},s.pbe.getCipher=function(t,e,r){switch(t){case s.oids.pkcs5PBES2:return s.pbe.getCipherForPBES2(t,e,r);case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case s.oids["pbewithSHAAnd40BitRC2-CBC"]:return s.pbe.getCipherForPKCS12PBE(t,e,r);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=t,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}},s.pbe.getCipherForPBES2=function(t,e,r){var i,a={},u=[];if(!o.validate(e,c,a,u))throw(i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=u,i;if((t=o.derToOid(a.kdfOid))!==s.oids.pkcs5PBKDF2)throw(i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.")).oid=t,i.supportedOids=["pkcs5PBKDF2"],i;if((t=o.derToOid(a.encOid))!==s.oids["aes128-CBC"]&&t!==s.oids["aes192-CBC"]&&t!==s.oids["aes256-CBC"]&&t!==s.oids["des-EDE3-CBC"]&&t!==s.oids.desCBC)throw(i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.")).oid=t,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i;var f,l,p=a.kdfSalt,d=n.util.createBuffer(a.kdfIterationCount);switch(d=d.getInt(d.length()<<3),s.oids[t]){case"aes128-CBC":f=16,l=n.aes.createDecryptionCipher;break;case"aes192-CBC":f=24,l=n.aes.createDecryptionCipher;break;case"aes256-CBC":f=32,l=n.aes.createDecryptionCipher;break;case"des-EDE3-CBC":f=24,l=n.des.createDecryptionCipher;break;case"desCBC":f=8,l=n.des.createDecryptionCipher}var y=h(a.prfOid),g=n.pkcs5.pbkdf2(r,p,d,f,y),m=a.encIv,v=l(g);return v.start(m),v},s.pbe.getCipherForPKCS12PBE=function(t,e,r){var i={},a=[];if(!o.validate(e,f,i,a))throw(y=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=a,y;var u,c,l,p=n.util.createBuffer(i.salt),d=n.util.createBuffer(i.iterations);switch(d=d.getInt(d.length()<<3),t){case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:u=24,c=8,l=n.des.startDecrypting;break;case s.oids["pbewithSHAAnd40BitRC2-CBC"]:u=5,c=8,l=function(t,e){var r=n.rc2.createDecryptionCipher(t,40);return r.start(e,null),r};break;default:var y;throw(y=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.")).oid=t,y}var g=h(i.prfOid),m=s.pbe.generatePkcs12Key(r,p,1,d,u,g);return g.start(),l(m,s.pbe.generatePkcs12Key(r,p,2,d,c,g))},s.pbe.opensslDeriveBytes=function(t,e,r,i){if(null==i){if(!("md5"in n.md))throw new Error('"md5" hash algorithm unavailable.');i=n.md.md5.create()}null===e&&(e="");for(var o=[l(i,t+e)],s=16,a=1;s>>0,a>>>0];for(var c=i.fullMessageLength.length-1;c>=0;--c)i.fullMessageLength[c]+=a[1],a[1]=a[0]+(i.fullMessageLength[c]/4294967296>>>0),i.fullMessageLength[c]=i.fullMessageLength[c]>>>0,a[0]=a[1]/4294967296>>>0;return e.putBytes(o),u(t,r,e),(e.read>2048||0===e.length())&&e.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(e.bytes());var a,c=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(o.substr(0,i.blockLength-c));for(var f=8*i.fullMessageLength[0],l=0;l>>0,s.putInt32(f>>>0),f=a>>>0;s.putInt32(f);var h={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4,h5:t.h5,h6:t.h6,h7:t.h7};u(h,r,s);var p=n.util.createBuffer();return p.putInt32(h.h0),p.putInt32(h.h1),p.putInt32(h.h2),p.putInt32(h.h3),p.putInt32(h.h4),p.putInt32(h.h5),p.putInt32(h.h6),p.putInt32(h.h7),p},i};var o=null,s=!1,a=null;function u(t,e,r){for(var n,i,o,s,u,c,f,l,h,p,d,y,g,m=r.length();m>=64;){for(u=0;u<16;++u)e[u]=r.getInt32();for(;u<64;++u)n=((n=e[u-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,i=((i=e[u-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,e[u]=n+e[u-7]+i+e[u-16]|0;for(c=t.h0,f=t.h1,l=t.h2,h=t.h3,p=t.h4,d=t.h5,y=t.h6,g=t.h7,u=0;u<64;++u)o=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),s=c&f|l&(c^f),n=g+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(y^p&(d^y))+a[u]+e[u],g=y,y=d,d=p,p=h+n>>>0,h=l,l=f,f=c,c=n+(i=o+s)>>>0;t.h0=t.h0+c|0,t.h1=t.h1+f|0,t.h2=t.h2+l|0,t.h3=t.h3+h|0,t.h4=t.h4+p|0,t.h5=t.h5+d|0,t.h6=t.h6+y|0,t.h7=t.h7+g|0,m-=64}}},function(t,e,r){(function(e){var n=r(8);r(13);var i=null;!n.util.isNodejs||n.options.usePureJavaScript||e.versions["node-webkit"]||(i=r(247)),(t.exports=n.prng=n.prng||{}).create=function(t){for(var e={plugin:t,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=t.md,o=new Array(32),s=0;s<32;++s)o[s]=r.create();function a(){if(e.pools[0].messageLength>=32)return u();var t=32-e.pools[0].messageLength<<5;e.collect(e.seedFileSync(t)),u()}function u(){e.reseeds=4294967295===e.reseeds?0:e.reseeds+1;var t=e.plugin.md.create();t.update(e.keyBytes);for(var r=1,n=0;n<32;++n)e.reseeds%r==0&&(t.update(e.pools[n].digest().getBytes()),e.pools[n].start()),r<<=1;e.keyBytes=t.digest().getBytes(),t.start(),t.update(e.keyBytes);var i=t.digest().getBytes();e.key=e.plugin.formatKey(e.keyBytes),e.seed=e.plugin.formatSeed(i),e.generated=0}function c(t){var e=null;if("undefined"!=typeof window){var r=window.crypto||window.msCrypto;r&&r.getRandomValues&&(e=function(t){return r.getRandomValues(t)})}var i=n.util.createBuffer();if(e)for(;i.length()>16)))<<16,l=4294967295&(c=(2147483647&(c+=u>>15))+(c>>31));for(a=0;a<3;++a)f=l>>>(a<<3),f^=Math.floor(256*Math.random()),i.putByte(String.fromCharCode(255&f))}return i.getBytes(t)}return e.pools=o,e.pool=0,e.generate=function(t,r){if(!r)return e.generateSync(t);var i=e.plugin.cipher,o=e.plugin.increment,s=e.plugin.formatKey,a=e.plugin.formatSeed,c=n.util.createBuffer();e.key=null,function f(l){if(l)return r(l);if(c.length()>=t)return r(null,c.getBytes(t));e.generated>1048575&&(e.key=null);if(null===e.key)return n.util.nextTick(function(){!function(t){if(e.pools[0].messageLength>=32)return u(),t();var r=32-e.pools[0].messageLength<<5;e.seedFile(r,function(r,n){if(r)return t(r);e.collect(n),u(),t()})}(f)});var h=i(e.key,e.seed);e.generated+=h.length;c.putBytes(h);e.key=s(i(e.key,o(e.seed)));e.seed=a(i(e.key,e.seed));n.util.setImmediate(f)}()},e.generateSync=function(t){var r=e.plugin.cipher,i=e.plugin.increment,o=e.plugin.formatKey,s=e.plugin.formatSeed;e.key=null;for(var u=n.util.createBuffer();u.length()1048575&&(e.key=null),null===e.key&&a();var c=r(e.key,e.seed);e.generated+=c.length,u.putBytes(c),e.key=o(r(e.key,i(e.seed))),e.seed=s(r(e.key,e.seed))}return u.getBytes(t)},i?(e.seedFile=function(t,e){i.randomBytes(t,function(t,r){if(t)return e(t);e(null,r.toString())})},e.seedFileSync=function(t){return i.randomBytes(t).toString()}):(e.seedFile=function(t,e){try{e(null,c(t))}catch(t){e(t)}},e.seedFileSync=c),e.collect=function(t){for(var r=t.length,n=0;n>i&255);e.collect(n)},e.registerWorker=function(t){if(t===self)e.seedFile=function(t,e){self.addEventListener("message",function t(r){var n=r.data;n.forge&&n.forge.prng&&(self.removeEventListener("message",t),e(n.forge.prng.err,n.forge.prng.bytes))}),self.postMessage({forge:{prng:{needed:t}}})};else{t.addEventListener("message",function(r){var n=r.data;n.forge&&n.forge.prng&&e.seedFile(n.forge.prng.needed,function(e,r){t.postMessage({forge:{prng:{err:e,bytes:r}}})})})}},e}}).call(this,r(6))},function(t,e,r){var n=r(8);r(13);var i=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],o=[1,2,3,5];t.exports=n.rc2=n.rc2||{},n.rc2.expandKey=function(t,e){"string"==typeof t&&(t=n.util.createBuffer(t)),e=e||128;var r,o=t,s=t.length(),a=e,u=Math.ceil(a/8),c=255>>(7&a);for(r=s;r<128;r++)o.putByte(i[o.at(r-1)+o.at(r-s)&255]);for(o.setAt(128-u,i[o.at(128-u)&c]),r=127-u;r>=0;r--)o.setAt(r,i[o.at(r+1)^o.at(r+u)]);return o};var s=function(t,e,r){var i,s,a,u,c=!1,f=null,l=null,h=null,p=[];for(t=n.rc2.expandKey(t,e),a=0;a<64;a++)p.push(t.getInt16Le());r?(i=function(t){for(a=0;a<4;a++)t[a]+=p[u]+(t[(a+3)%4]&t[(a+2)%4])+(~t[(a+3)%4]&t[(a+1)%4]),t[a]=(e=t[a])<<(r=o[a])&65535|(65535&e)>>16-r,u++;var e,r},s=function(t){for(a=0;a<4;a++)t[a]+=p[63&t[(a+3)%4]]}):(i=function(t){for(a=3;a>=0;a--)t[a]=(65535&(e=t[a]))>>(r=o[a])|e<<16-r&65535,t[a]-=p[u]+(t[(a+3)%4]&t[(a+2)%4])+(~t[(a+3)%4]&t[(a+1)%4]),u--;var e,r},s=function(t){for(a=3;a>=0;a--)t[a]-=p[63&t[(a+3)%4]]});var d=function(t){var e=[];for(a=0;a<4;a++){var n=f.getInt16Le();null!==h&&(r?n^=h.getInt16Le():h.putInt16Le(n)),e.push(65535&n)}u=r?0:63;for(var i=0;i=8;)d([[5,i],[1,s],[6,i],[1,s],[5,i]])},finish:function(t){var e=!0;if(r)if(t)e=t(8,f,!r);else{var n=8===f.length()?8:8-f.length();f.fillWithByte(n,n)}if(e&&(c=!0,y.update()),!r&&(e=0===f.length()))if(t)e=t(8,l,!r);else{var i=l.length(),o=l.at(i-1);o>i?e=!1:l.truncate(o)}return e}}};n.rc2.startEncrypting=function(t,e,r){var i=n.rc2.createEncryptionCipher(t,128);return i.start(e,r),i},n.rc2.createEncryptionCipher=function(t,e){return s(t,e,!0)},n.rc2.startDecrypting=function(t,e,r){var i=n.rc2.createDecryptionCipher(t,128);return i.start(e,r),i},n.rc2.createDecryptionCipher=function(t,e){return s(t,e,!1)}},function(t,e,r){var n=r(8);r(13),r(43),r(110);var i=t.exports=n.pkcs1=n.pkcs1||{};function o(t,e,r){r||(r=n.md.sha1.create());for(var i="",o=Math.ceil(e/r.digestLength),s=0;s>24&255,s>>16&255,s>>8&255,255&s);r.start(),r.update(t+a),i+=r.digest().getBytes()}return i.substring(0,e)}i.encode_rsa_oaep=function(t,e,r){var i,s,a,u;"string"==typeof r?(i=r,s=arguments[3]||void 0,a=arguments[4]||void 0):r&&(i=r.label||void 0,s=r.seed||void 0,a=r.md||void 0,r.mgf1&&r.mgf1.md&&(u=r.mgf1.md)),a?a.start():a=n.md.sha1.create(),u||(u=a);var c=Math.ceil(t.n.bitLength()/8),f=c-2*a.digestLength-2;if(e.length>f)throw(g=new Error("RSAES-OAEP input message length is too long.")).length=e.length,g.maxLength=f,g;i||(i=""),a.update(i,"raw");for(var l=a.digest(),h="",p=f-e.length,d=0;dt&&(s=u(t,e));var p=s.toString(16);i.target.postMessage({hex:p,workLoad:f}),s.dAddOffset(l,0)}}}p()}(t,e,i,o);return a(t,e,i,o)}(t,c,o.options,i);throw new Error("Invalid prime generation algorithm: "+o.name)}}function a(t,e,r,o){var s=u(t,e),a=function(t){return t<=100?27:t<=150?18:t<=200?15:t<=250?12:t<=300?9:t<=350?8:t<=400?7:t<=500?6:t<=600?5:t<=800?4:t<=1250?3:2}(s.bitLength());"millerRabinTests"in r&&(a=r.millerRabinTests);var c=10;"maxBlockTime"in r&&(c=r.maxBlockTime),function t(e,r,o,s,a,c,f){var l=+new Date;do{if(e.bitLength()>r&&(e=u(r,o)),e.isProbablePrime(a))return f(null,e);e.dAddOffset(i[s++%8],0)}while(c<0||+new Date-l=0&&i.push(a):i.push(a))}return i}function p(t){if(t.composed||t.constructed){for(var e=n.util.createBuffer(),r=0;r0&&(u=i.create(i.Class.UNIVERSAL,i.Type.SET,!0,l));var h=[],p=[];null!==e&&(p=n.util.isArray(e)?e:[e]);for(var d=[],y=0;y0){var b=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,d),_=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(b).getBytes())])]);h.push(_)}var S=null;if(null!==t){var w=o.wrapRsaPrivateKey(o.privateKeyToAsn1(t));S=null===r?i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.keyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[w]),u]):i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.pkcs8ShroudedKeyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[o.encryptPrivateKeyInfo(w,r,a)]),u]);var E=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[S]),k=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(E).getBytes())])]);h.push(k)}var C,A=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,h);if(a.useMac){var T=n.md.sha1.create(),B=new n.util.ByteBuffer(n.random.getBytes(a.saltSize)),I=a.count,M=(t=s.generateKey(r,B,3,I,20),n.hmac.create());M.start(T,t),M.update(i.toDer(A).getBytes());var x=M.getMac();C=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.sha1).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,x.getBytes())]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,B.getBytes()),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(I).getBytes())])}return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(3).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(A).getBytes())])]),C])},s.generateKey=n.pbe.generatePkcs12Key},function(t,e,r){var n=r(8);r(59),r(13);var i=n.asn1,o=t.exports=n.pkcs7asn1=n.pkcs7asn1||{};n.pkcs7=n.pkcs7||{},n.pkcs7.asn1=o;var s={name:"ContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};o.contentInfoValidator=s;var a={name:"EncryptedContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};o.envelopedDataValidator={name:"EnvelopedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(a)},o.encryptedDataValidator={name:"EncryptedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"}].concat(a)};var u={name:"SignerInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};o.signedDataValidator={name:"SignedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},s,{name:"SignedData.Certificates",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,capture:"signerInfos",optional:!0,value:[u]}]},o.recipientInfoValidator={name:"RecipientInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}},function(t,e,r){var n=r(8);r(13),n.mgf=n.mgf||{},(t.exports=n.mgf.mgf1=n.mgf1=n.mgf1||{}).create=function(t){return{generate:function(e,r){for(var i=new n.util.ByteBuffer,o=Math.ceil(r/t.digestLength),s=0;s>>0,s>>>0];for(var a=p.fullMessageLength.length-1;a>=0;--a)p.fullMessageLength[a]+=s[1],s[1]=s[0]+(p.fullMessageLength[a]/4294967296>>>0),p.fullMessageLength[a]=p.fullMessageLength[a]>>>0,s[0]=s[1]/4294967296>>>0;return i.putBytes(t),f(r,o,i),(i.read>2048||0===i.length())&&i.compact(),p},p.digest=function(){var e=n.util.createBuffer();e.putBytes(i.bytes());var a,u=p.fullMessageLength[p.fullMessageLength.length-1]+p.messageLengthSize&p.blockLength-1;e.putBytes(s.substr(0,p.blockLength-u));for(var c=8*p.fullMessageLength[0],l=0;l>>0,e.putInt32(c>>>0),c=a>>>0;e.putInt32(c);var h=new Array(r.length);for(l=0;l=128;){for(M=0;M<16;++M)e[M][0]=r.getInt32()>>>0,e[M][1]=r.getInt32()>>>0;for(;M<80;++M)n=(((x=(N=e[M-2])[0])>>>19|(R=N[1])<<13)^(R>>>29|x<<3)^x>>>6)>>>0,i=((x<<13|R>>>19)^(R<<3|x>>>29)^(x<<26|R>>>6))>>>0,o=(((x=(L=e[M-15])[0])>>>1|(R=L[1])<<31)^(x>>>8|R<<24)^x>>>7)>>>0,s=((x<<31|R>>>1)^(x<<24|R>>>8)^(x<<25|R>>>7))>>>0,P=e[M-7],D=e[M-16],R=i+P[1]+s+D[1],e[M][0]=n+P[0]+o+D[0]+(R/4294967296>>>0)>>>0,e[M][1]=R>>>0;for(d=t[0][0],y=t[0][1],g=t[1][0],m=t[1][1],v=t[2][0],b=t[2][1],_=t[3][0],S=t[3][1],w=t[4][0],E=t[4][1],k=t[5][0],C=t[5][1],A=t[6][0],T=t[6][1],B=t[7][0],I=t[7][1],M=0;M<80;++M)f=((w>>>14|E<<18)^(w>>>18|E<<14)^(E>>>9|w<<23))>>>0,l=(A^w&(k^A))>>>0,a=((d>>>28|y<<4)^(y>>>2|d<<30)^(y>>>7|d<<25))>>>0,c=((d<<4|y>>>28)^(y<<30|d>>>2)^(y<<25|d>>>7))>>>0,h=(d&g|v&(d^g))>>>0,p=(y&m|b&(y^m))>>>0,R=I+(((w<<18|E>>>14)^(w<<14|E>>>18)^(E<<23|w>>>9))>>>0)+((T^E&(C^T))>>>0)+u[M][1]+e[M][1],n=B+f+l+u[M][0]+e[M][0]+(R/4294967296>>>0)>>>0,i=R>>>0,o=a+h+((R=c+p)/4294967296>>>0)>>>0,s=R>>>0,B=A,I=T,A=k,T=C,k=w,C=E,w=_+n+((R=S+i)/4294967296>>>0)>>>0,E=R>>>0,_=v,S=b,v=g,b=m,g=d,m=y,d=n+o+((R=i+s)/4294967296>>>0)>>>0,y=R>>>0;R=t[0][1]+y,t[0][0]=t[0][0]+d+(R/4294967296>>>0)>>>0,t[0][1]=R>>>0,R=t[1][1]+m,t[1][0]=t[1][0]+g+(R/4294967296>>>0)>>>0,t[1][1]=R>>>0,R=t[2][1]+b,t[2][0]=t[2][0]+v+(R/4294967296>>>0)>>>0,t[2][1]=R>>>0,R=t[3][1]+S,t[3][0]=t[3][0]+_+(R/4294967296>>>0)>>>0,t[3][1]=R>>>0,R=t[4][1]+E,t[4][0]=t[4][0]+w+(R/4294967296>>>0)>>>0,t[4][1]=R>>>0,R=t[5][1]+C,t[5][0]=t[5][0]+k+(R/4294967296>>>0)>>>0,t[5][1]=R>>>0,R=t[6][1]+T,t[6][0]=t[6][0]+A+(R/4294967296>>>0)>>>0,t[6][1]=R>>>0,R=t[7][1]+I,t[7][0]=t[7][0]+B+(R/4294967296>>>0)>>>0,t[7][1]=R>>>0,O-=128}}},function(t,e,r){var n=r(8);r(13),t.exports=n.log=n.log||{},n.log.levels=["none","error","warning","info","debug","verbose","max"];var i={},o=[],s=null;n.log.LEVEL_LOCKED=2,n.log.NO_LEVEL_CHECK=4,n.log.INTERPOLATE=8;for(var a=0;a{if(t)return i(t);i(null,n.encode(o,e,r))})}t.exports=o,o.Buffer=e,o.multihash=n,o.digest=function(t,e,r,n){if("function"==typeof r&&(n=r,r=void 0),!n)throw new Error("Missing callback");let i,s=n;r&&(s=((t,e)=>{if(t)return n(t);n(null,e.slice(0,r))}));try{i=o.createHash(e)}catch(t){return s(t)}i(t,s)},o.createHash=function(t){if(t=n.coerceCode(t),!o.functions[t])throw new Error("multihash function "+t+" not yet supported");return o.functions[t]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){const n=r(7);e.toCallback=(t=>(function(e,r){const i=(t,e)=>n(()=>{r(t,e)});let o;try{o=t(e)}catch(t){return void i(t)}i(null,o)})),e.toBuf=((e,r)=>n=>{let i=e(n,r);return t.from(i,"hex")}),e.fromString=((e,r)=>n=>{const i=t.isBuffer(n)?n.toString():n;return e(i,r)}),e.fromNumberTo32BitBuf=((e,r)=>n=>{let i=e(n,r);const o=new Array(4);for(let t=0;t<4;t++)o[t]=255&i,i>>=8;return t.from(o)})}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){const n=r(164),i=r(165)();function o(t){return Promise.all([i.subtle.exportKey("jwk",t.privateKey),i.subtle.exportKey("jwk",t.publicKey)])}e.utils=r(493),e.generateKey=function(t,e){n(i.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(o).then(t=>({privateKey:t[0],publicKey:t[1]})),e)},e.unmarshalPrivateKey=function(t,e){const r=i.subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);var s;n(Promise.all([r,(s=t,i.subtle.importKey("jwk",{kty:s.kty,n:s.n,e:s.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]))]).then(t=>o({privateKey:t[0],publicKey:t[1]})).then(t=>({privateKey:t[0],publicKey:t[1]})),e)},e.getRandomValues=function(e){return t.from(i.getRandomValues(e))},e.hashAndSign=function(e,r,o){n(i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]).then(t=>i.subtle.sign({name:"RSASSA-PKCS1-v1_5"},t,Uint8Array.from(r))).then(e=>t.from(e)),o)},e.hashAndVerify=function(t,e,r,o){n(i.subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]).then(t=>i.subtle.verify({name:"RSASSA-PKCS1-v1_5"},t,e,r)),o)}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";const n=r(4),i=r(111).Reporter,o=r(0).Buffer;function s(t,e){i.call(this,e),o.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function a(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(function(t){return t instanceof a||(t=new a(t,e)),this.length+=t.length,t},this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=o.byteLength(t);else{if(!o.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}n(s,i),e.DecoderBuffer=s,s.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},s.prototype.restore=function(t){const e=new s(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,i.prototype.restore.call(this,t.reporter),e},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},s.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");const r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+t,this.offset+=t,r},s.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},e.EncoderBuffer=a,a.prototype.join=function(t,e){return t||(t=new o(this.length)),e||(e=0),0===this.length?t:(Array.isArray(this.value)?this.value.forEach(function(r){r.join(t,e),e+=r.length}):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):o.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length),t)}},function(t,e,r){"use strict";const n=e;n._reverse=function(t){const e={};return Object.keys(t).forEach(function(r){(0|r)==r&&(r|=0);const n=t[r];e[n]=r}),e},n.der=r(499)},function(t,e,r){"use strict";const n=r(4),i=r(21),o=i.base,s=i.bignum,a=i.constants.der;function u(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new c,this.tree._init(t.body)}function c(t){o.Node.call(this,"der",t)}function f(t,e){let r=t.readUInt8(e);if(t.isError(r))return r;const n=a.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){let n=r;for(r=0;128==(128&n);){if(n=t.readUInt8(e),t.isError(n))return n;r<<=7,r|=127&n}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:a.tag[r]}}function l(t,e,r){let n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&128===n)return null;if(0==(128&n))return n;const i=127&n;if(i>4)return t.error("length octect is too long");n=0;for(let e=0;e=31)return n.error("Multi-octet tag encoding unsupported");e||(i|=32);return i|=a.tagClassByName[r||"universal"]<<6}(t,e,r,this.reporter);if(n.length<128){const t=new i(2);return t[0]=o,t[1]=n.length,this._createEncoderBuffer([t,n])}let s=1;for(let t=n.length;t>=256;t>>=8)s++;const u=new i(2+s);u[0]=o,u[1]=128|s;for(let t=1+s,e=n.length;e>0;t--,e>>=8)u[t]=255&e;return this._createEncoderBuffer([u,n])},c.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){const e=new i(2*t.length);for(let r=0;r=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}let n=0;for(let e=0;e=128;r>>=7)n++}const o=new i(n);let s=o.length-1;for(let e=t.length-1;e>=0;e--){let r=t[e];for(o[s--]=127&r;(r>>=7)>0;)o[s--]=128|127&r}return this._createEncoderBuffer(o)},c.prototype._encodeTime=function(t,e){let r;const n=new Date(t);return"gentime"===e?r=[f(n.getUTCFullYear()),f(n.getUTCMonth()+1),f(n.getUTCDate()),f(n.getUTCHours()),f(n.getUTCMinutes()),f(n.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[f(n.getUTCFullYear()%100),f(n.getUTCMonth()+1),f(n.getUTCDate()),f(n.getUTCHours()),f(n.getUTCMinutes()),f(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!i.isBuffer(t)){const e=t.toArray();!t.sign&&128&e[0]&&e.unshift(0),t=new i(e)}if(i.isBuffer(t)){let e=t.length;0===t.length&&e++;const r=new i(e);return t.copy(r),0===t.length&&(r[0]=0),this._createEncoderBuffer(r)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);let r=1;for(let e=t;e>=256;e>>=8)r++;const n=new Array(r);for(let e=n.length-1;e>=0;e--)n[e]=255&t,t>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(new i(n))},c.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},c.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},c.prototype._skipDefault=function(t,e,r){const n=this._baseState;let i;if(null===n.default)return!1;const o=t.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,e,r).join()),o.length!==n.defaultBuffer.length)return!1;for(i=0;i{if(t)return i(t);i(null,n.encode(o,e,r))})}t.exports=o,o.Buffer=e,o.multihash=n,o.digest=function(t,e,r,n){if("function"==typeof r&&(n=r,r=void 0),!n)throw new Error("Missing callback");let i,s=n;r&&(s=((t,e)=>{if(t)return n(t);n(null,e.slice(0,r))}));try{i=o.createHash(e)}catch(t){return s(t)}i(t,s)},o.createHash=function(t){if(t=n.coerceCode(t),!o.functions[t])throw new Error("multihash function "+t+" not yet supported");return o.functions[t]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){const n=r(7);e.toCallback=(t=>(function(e,r){const i=(t,e)=>n(()=>{r(t,e)});let o;try{o=t(e)}catch(t){return void i(t)}i(null,o)})),e.toBuf=((e,r)=>n=>{let i=e(n,r);return t.from(i,"hex")}),e.fromString=((e,r)=>n=>{const i=t.isBuffer(n)?n.toString():n;return e(i,r)}),e.fromNumberTo32BitBuf=((e,r)=>n=>{let i=e(n,r);const o=new Array(4);for(let t=0;t<4;t++)o[t]=255&i,i>>=8;return t.from(o)})}).call(this,r(0).Buffer)},function(t,e,r){var n=r(3).Buffer;t.exports={check:function(t){if(t.length<8)return!1;if(t.length>72)return!1;if(48!==t[0])return!1;if(t[1]!==t.length-2)return!1;if(2!==t[2])return!1;var e=t[3];if(0===e)return!1;if(5+e>=t.length)return!1;if(2!==t[4+e])return!1;var r=t[5+e];return!(0===r||6+e+r!==t.length||128&t[4]||e>1&&0===t[4]&&!(128&t[5])||128&t[e+6]||r>1&&0===t[e+6]&&!(128&t[e+7]))},decode:function(t){if(t.length<8)throw new Error("DER sequence length is too short");if(t.length>72)throw new Error("DER sequence length is too long");if(48!==t[0])throw new Error("Expected DER sequence");if(t[1]!==t.length-2)throw new Error("DER sequence length is invalid");if(2!==t[2])throw new Error("Expected DER integer");var e=t[3];if(0===e)throw new Error("R length is zero");if(5+e>=t.length)throw new Error("R length is too long");if(2!==t[4+e])throw new Error("Expected DER integer (2)");var r=t[5+e];if(0===r)throw new Error("S length is zero");if(6+e+r!==t.length)throw new Error("S length is invalid");if(128&t[4])throw new Error("R value is negative");if(e>1&&0===t[4]&&!(128&t[5]))throw new Error("R value excessively padded");if(128&t[e+6])throw new Error("S value is negative");if(r>1&&0===t[e+6]&&!(128&t[e+7]))throw new Error("S value excessively padded");return{r:t.slice(4,4+e),s:t.slice(6+e)}},encode:function(t,e){var r=t.length,i=e.length;if(0===r)throw new Error("R length is zero");if(0===i)throw new Error("S length is zero");if(r>33)throw new Error("R length is too long");if(i>33)throw new Error("S length is too long");if(128&t[0])throw new Error("R value is negative");if(128&e[0])throw new Error("S value is negative");if(r>1&&0===t[0]&&!(128&t[1]))throw new Error("R value excessively padded");if(i>1&&0===e[0]&&!(128&e[1]))throw new Error("S value excessively padded");var o=n.allocUnsafe(6+r+i);return o[0]=48,o[1]=o.length-2,o[2]=2,o[3]=t.length,t.copy(o,4),o[4+r]=2,o[5+r]=e.length,e.copy(o,6+r),o}}},function(t,e,r){"use strict";var n=r(0).Buffer,i=r(4),o=r(242),s=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],l=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function p(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function d(t,e){return t<>>32-e}function y(t,e,r,n,i,o,s,a){return d(t+(e^r^n)+o+s|0,a)+i|0}function g(t,e,r,n,i,o,s,a){return d(t+(e&r|~e&n)+o+s|0,a)+i|0}function m(t,e,r,n,i,o,s,a){return d(t+((e|~r)^n)+o+s|0,a)+i|0}function v(t,e,r,n,i,o,s,a){return d(t+(e&n|r&~n)+o+s|0,a)+i|0}function b(t,e,r,n,i,o,s,a){return d(t+(e^(r|~n))+o+s|0,a)+i|0}i(p,o),p.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,p=0|this._e,_=0|this._a,S=0|this._b,w=0|this._c,E=0|this._d,k=0|this._e,C=0;C<80;C+=1){var A,T;C<16?(A=y(r,n,i,o,p,t[a[C]],l[0],c[C]),T=b(_,S,w,E,k,t[u[C]],h[0],f[C])):C<32?(A=g(r,n,i,o,p,t[a[C]],l[1],c[C]),T=v(_,S,w,E,k,t[u[C]],h[1],f[C])):C<48?(A=m(r,n,i,o,p,t[a[C]],l[2],c[C]),T=m(_,S,w,E,k,t[u[C]],h[2],f[C])):C<64?(A=v(r,n,i,o,p,t[a[C]],l[3],c[C]),T=g(_,S,w,E,k,t[u[C]],h[3],f[C])):(A=b(r,n,i,o,p,t[a[C]],l[4],c[C]),T=y(_,S,w,E,k,t[u[C]],h[4],f[C])),r=p,p=o,o=d(i,10),i=n,n=A,_=k,k=E,E=d(w,10),w=S,S=T}var B=this._b+i+E|0;this._b=this._c+o+k|0,this._c=this._d+p+_|0,this._d=this._e+r+S|0,this._e=this._a+n+w|0,this._a=B},p.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=n.alloc?n.alloc(20):new n(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=p},function(t,e,r){(e=t.exports=function(t){t=t.toLowerCase();var r=e[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r}).sha=r(515),e.sha1=r(516),e.sha224=r(517),e.sha256=r(272),e.sha384=r(518),e.sha512=r(273)},function(t,e,r){var n=r(4),i=r(94),o=r(3).Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function l(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function h(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function p(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,d=0|this._f,y=0|this._g,g=0|this._h,m=0;m<16;++m)r[m]=t.readInt32BE(4*m);for(;m<64;++m)r[m]=0|(((e=r[m-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[m-7]+p(r[m-15])+r[m-16];for(var v=0;v<64;++v){var b=g+h(u)+c(u,d,y)+s[v]+r[v]|0,_=l(n)+f(n,i,o)|0;g=y,y=d,d=u,u=a+b|0,a=o,o=i,i=n,n=b+_|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0,this._f=d+this._f|0,this._g=y+this._g|0,this._h=g+this._h|0},u.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},function(t,e,r){var n=r(4),i=r(94),o=r(3).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function u(){this.init(),this._w=a,i.call(this,128,112)}function c(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function l(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function h(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function y(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function m(t,e){return t>>>0>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,u=0|this._fh,v=0|this._gh,b=0|this._hh,_=0|this._al,S=0|this._bl,w=0|this._cl,E=0|this._dl,k=0|this._el,C=0|this._fl,A=0|this._gl,T=0|this._hl,B=0;B<32;B+=2)e[B]=t.readInt32BE(4*B),e[B+1]=t.readInt32BE(4*B+4);for(;B<160;B+=2){var I=e[B-30],M=e[B-30+1],x=p(I,M),R=d(M,I),N=y(I=e[B-4],M=e[B-4+1]),P=g(M,I),L=e[B-14],D=e[B-14+1],O=e[B-32],U=e[B-32+1],K=R+D|0,j=x+L+m(K,R)|0;j=(j=j+N+m(K=K+P|0,P)|0)+O+m(K=K+U|0,U)|0,e[B]=j,e[B+1]=K}for(var F=0;F<160;F+=2){j=e[F],K=e[F+1];var V=f(r,n,i),q=f(_,S,w),J=l(r,_),H=l(_,r),z=h(a,k),G=h(k,a),Y=s[F],W=s[F+1],$=c(a,u,v),Q=c(k,C,A),Z=T+G|0,X=b+z+m(Z,T)|0;X=(X=(X=X+$+m(Z=Z+Q|0,Q)|0)+Y+m(Z=Z+W|0,W)|0)+j+m(Z=Z+K|0,K)|0;var tt=H+q|0,et=J+V+m(tt,H)|0;b=v,T=A,v=u,A=C,u=a,C=k,a=o+X+m(k=E+Z|0,E)|0,o=i,E=w,i=n,w=S,n=r,S=_,r=X+et+m(_=Z+tt|0,Z)|0}this._al=this._al+_|0,this._bl=this._bl+S|0,this._cl=this._cl+w|0,this._dl=this._dl+E|0,this._el=this._el+k|0,this._fl=this._fl+C|0,this._gl=this._gl+A|0,this._hl=this._hl+T|0,this._ah=this._ah+r+m(this._al,_)|0,this._bh=this._bh+n+m(this._bl,S)|0,this._ch=this._ch+i+m(this._cl,w)|0,this._dh=this._dh+o+m(this._dl,E)|0,this._eh=this._eh+a+m(this._el,k)|0,this._fh=this._fh+u+m(this._fl,C)|0,this._gh=this._gh+v+m(this._gl,A)|0,this._hh=this._hh+b+m(this._hl,T)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},function(t,e,r){"use strict";var n=r(4),i=r(520),o=r(79),s=r(3).Buffer,a=r(521),u=r(270),c=r(271),f=s.alloc(128);function l(t,e){o.call(this,"digest"),"string"==typeof e&&(e=s.from(e));var r="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>r)?e=("rmd160"===t?new u:c(t)).update(e).digest():e.length=0||r.ucmp(i.p)>=0?null:6!==n&&7!==n||r.isOdd()===(7===n)?0!==e.redSqr().redMul(e).redIAdd7().ucmp(r.redSqr())?null:new s(e,r):null):(e=i.fromBuffer(t.slice(1,33))).ucmp(i.p)>=0?null:null===(r=e.redSqr().redMul(e).redIAdd7().redSqrt())?null:(3===n!==r.isOdd()&&(r=r.redNeg()),new s(e,r))},s.prototype.toPublicKey=function(t){var e,r=this.x,i=this.y;return t?((e=n.alloc(33))[0]=i.isOdd()?3:2,r.toBuffer().copy(e,1)):((e=n.alloc(65))[0]=4,r.toBuffer().copy(e,1),i.toBuffer().copy(e,33)),e},s.fromECJPoint=function(t){if(t.inf)return new s(null,null);var e=t.z.redInvm(),r=e.redSqr();return new s(t.x.redMul(r),t.y.redMul(r).redMul(e))},s.prototype.toECJPoint=function(){return this.inf?new o(null,null,null):new o(this.x,this.y,o.one)},s.prototype.neg=function(){return this.inf?this:new s(this.x,this.y.redNeg())},s.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(0===this.x.ucmp(t.x))return 0===this.y.ucmp(t.y)?this.dbl():new s(null,null);var e=this.y.redSub(t.y);e.isZero()||(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x);return new s(r,e.redMul(this.x.redSub(r)).redISub(this.y))},s.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(t.isZero())return new s(null,null);var e=this.x.redSqr(),r=e.redAdd(e).redIAdd(e).redMul(t.redInvm()),n=r.redSqr().redISub(this.x.redAdd(this.x));return new s(n,r.redMul(this.x.redSub(n)).redISub(this.y))},s.prototype.mul=function(t){for(var e=this._getNAFPoints(4),r=e.points,n=t.getNAF(e.wnd),i=new o(null,null,null),a=n.length-1;a>=0;a--){for(var u=0;a>=0&&0===n[a];a--,++u);if(a>=0&&(u+=1),i=i.dblp(u),a<0)break;var c=n[a];i=c>0?i.mixedAdd(r[c-1>>1]):i.mixedAdd(r[-c-1>>1].neg())}return s.fromECJPoint(i)},s.prototype._getNAFPoints1=function(){return{wnd:1,points:[this]}},s.prototype._getNAFPoints=function(t){var e=new Array((1<({digest(e,o){((e,r,o)=>{n(i.subtle.sign({name:"HMAC"},e,r).then(e=>t.from(e)),o)})(r,e,o)},length:o[e]})),a)}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e){const n=r(24),i=r(540);function o(t,e,r,i){if("function"==typeof r&&(i=r,r=void 0),!i)throw new Error("Missing callback");o.digest(t,e,r,(t,o)=>{if(t)return i(t);i(null,n.encode(o,e,r))})}t.exports=o,o.Buffer=e,o.multihash=n,o.digest=function(t,e,r,n){if("function"==typeof r&&(n=r,r=void 0),!n)throw new Error("Missing callback");let i,s=n;r&&(s=((t,e)=>{if(t)return n(t);n(null,e.slice(0,r))}));try{i=o.createHash(e)}catch(t){return s(t)}i(t,s)},o.createHash=function(t){if(t=n.coerceCode(t),!o.functions[t])throw new Error("multihash function "+t+" not yet supported");return o.functions[t]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){const n=r(7);e.toCallback=(t=>(function(e,r){const i=(t,e)=>n(()=>{r(t,e)});let o;try{o=t(e)}catch(t){return void i(t)}i(null,o)})),e.toBuf=((e,r)=>n=>{let i=e(n,r);return t.from(i,"hex")}),e.fromString=((e,r)=>n=>{const i=t.isBuffer(n)?n.toString():n;return e(i,r)}),e.fromNumberTo32BitBuf=((e,r)=>n=>{let i=e(n,r);const o=new Array(4);for(let t=0;t<4;t++)o[t]=255&i,i>>=8;return t.from(o)})}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){const n=r(176),i=r(177)();function o(t){return Promise.all([i.subtle.exportKey("jwk",t.privateKey),i.subtle.exportKey("jwk",t.publicKey)])}e.utils=r(543),e.generateKey=function(t,e){n(i.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(o).then(t=>({privateKey:t[0],publicKey:t[1]})),e)},e.unmarshalPrivateKey=function(t,e){const r=i.subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);var s;n(Promise.all([r,(s=t,i.subtle.importKey("jwk",{kty:s.kty,n:s.n,e:s.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]))]).then(t=>o({privateKey:t[0],publicKey:t[1]})).then(t=>({privateKey:t[0],publicKey:t[1]})),e)},e.getRandomValues=function(e){return t.from(i.getRandomValues(e))},e.hashAndSign=function(e,r,o){n(i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]).then(t=>i.subtle.sign({name:"RSASSA-PKCS1-v1_5"},t,Uint8Array.from(r))).then(e=>t.from(e)),o)},e.hashAndVerify=function(t,e,r,o){n(i.subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]).then(t=>i.subtle.verify({name:"RSASSA-PKCS1-v1_5"},t,e,r)),o)}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){const n=r(21).bignum;e.toBase64=function(e,r){return e.toArrayLike(t,"be",r).toString("base64").replace(/(=*)$/,"").replace(/\+/g,"-").replace(/\//g,"_")},e.toBn=function(e){return new n(t.from(e,"base64"))}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";const n=r(282);t.exports=function(t){if(!t||"number"!=typeof t)throw new Error("first argument must be a Number bigger than 0");return n.getRandomValues(new Uint8Array(t))}},function(t,e){t.exports=function(t,e,r){t(e),r&&r(!0===e?null:e)}},function(t,e,r){var n=r(114);function i(t){return t}t.exports=function(t){return"object"==typeof t&&"function"==typeof t.test?function(e){return t.test(e)}:n(t)||i}},function(t,e,r){"use strict";function n(t){return t}var i=r(114),o=r(73);t.exports=function(t,e){t=i(t)||n;var r={};return o(function(n){var i=t(n);return r[i]?!!e:(r[i]=!0,!e)})}},function(t,e){t.exports=function(t){var e,r=!1;function n(n){if(!n)throw new Error("must be passed a readable");e=n,r&&t(e)}return n.resolve=n.ready=n.start=function(i){return r=!0,t=i||t,e&&t(e),n},n}},,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,r){"use strict";e.names=Object.freeze({id: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}),e.codes=Object.freeze({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",46000:"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"}),e.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,46000: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(t,e,r){"use strict";const n=r(148),i={};t.exports=i;for(let t in n){i[n[t].toString("hex")]=t}},function(t,e){e.endianness=function(){return"LE"},e.hostname=function(){return"undefined"!=typeof location?location.hostname:""},e.loadavg=function(){return[]},e.uptime=function(){return 0},e.freemem=function(){return Number.MAX_VALUE},e.totalmem=function(){return Number.MAX_VALUE},e.cpus=function(){return[]},e.type=function(){return"Browser"},e.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},e.networkInterfaces=e.getNetworkInterfaces=function(){return{}},e.arch=function(){return"javascript"},e.platform=function(){return"browser"},e.tmpdir=e.tmpDir=function(){return"/tmp"},e.EOL="\n",e.homedir=function(){return"/"}},function(t,e,r){(function(t,r){var n=200,i="Expected a function",o="__lodash_hash_undefined__",s=1,a=2,u=1/0,c=9007199254740991,f=1.7976931348623157e308,l=NaN,h="[object Arguments]",p="[object Array]",d="[object Boolean]",y="[object Date]",g="[object Error]",m="[object Function]",v="[object GeneratorFunction]",b="[object Map]",_="[object Number]",S="[object Object]",w="[object RegExp]",E="[object Set]",k="[object String]",C="[object Symbol]",A="[object ArrayBuffer]",T="[object DataView]",B=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,I=/^\w*$/,M=/^\./,x=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,R=/^\s+|\s+$/g,N=/\\(\\)?/g,P=/^[-+]0x[0-9a-f]+$/i,L=/^0b[01]+$/i,D=/^\[object .+?Constructor\]$/,O=/^0o[0-7]+$/i,U=/^(?:0|[1-9]\d*)$/,K={};K["[object Float32Array]"]=K["[object Float64Array]"]=K["[object Int8Array]"]=K["[object Int16Array]"]=K["[object Int32Array]"]=K["[object Uint8Array]"]=K["[object Uint8ClampedArray]"]=K["[object Uint16Array]"]=K["[object Uint32Array]"]=!0,K[h]=K[p]=K[A]=K[d]=K[T]=K[y]=K[g]=K[m]=K[b]=K[_]=K[S]=K[w]=K[E]=K[k]=K["[object WeakMap]"]=!1;var j=parseInt,F="object"==typeof t&&t&&t.Object===Object&&t,V="object"==typeof self&&self&&self.Object===Object&&self,q=F||V||Function("return this")(),J=e&&!e.nodeType&&e,H=J&&"object"==typeof r&&r&&!r.nodeType&&r,z=H&&H.exports===J&&F.process,G=function(){try{return z&&z.binding("util")}catch(t){}}(),Y=G&&G.isTypedArray;function W(t,e){for(var r=-1,n=t?t.length:0;++rc))return!1;var l=o.get(t);if(l&&o.get(e))return l==e;var h=-1,p=!0,d=i&s?new Pt:void 0;for(o.set(t,e),o.set(e,t);++h-1},Rt.prototype.set=function(t,e){var r=this.__data__,n=Ot(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},Nt.prototype.clear=function(){this.__data__={hash:new xt,map:new(vt||Rt),string:new xt}},Nt.prototype.delete=function(t){return zt(this,t).delete(t)},Nt.prototype.get=function(t){return zt(this,t).get(t)},Nt.prototype.has=function(t){return zt(this,t).has(t)},Nt.prototype.set=function(t,e){return zt(this,t).set(t,e),this},Pt.prototype.add=Pt.prototype.push=function(t){return this.__data__.set(t,o),this},Pt.prototype.has=function(t){return this.__data__.has(t)},Lt.prototype.clear=function(){this.__data__=new Rt},Lt.prototype.delete=function(t){return this.__data__.delete(t)},Lt.prototype.get=function(t){return this.__data__.get(t)},Lt.prototype.has=function(t){return this.__data__.has(t)},Lt.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Rt){var i=r.__data__;if(!vt||i.length-1&&t%1==0&&t-1?n[i?t[o]:o]:void 0});function ie(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(i);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s),s};return r.cache=new(ie.Cache||Nt),r}function oe(t,e){return t===e||t!=t&&e!=e}function se(t){return function(t){return he(t)&&ue(t)}(t)&&ut.call(t,"callee")&&(!pt.call(t,"callee")||ct.call(t)==h)}ie.Cache=Nt;var ae=Array.isArray;function ue(t){return null!=t&&fe(t.length)&&!ce(t)}function ce(t){var e=le(t)?ct.call(t):"";return e==m||e==v}function fe(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=c}function le(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function he(t){return!!t&&"object"==typeof t}function pe(t){return"symbol"==typeof t||he(t)&&ct.call(t)==C}var de=Y?function(t){return function(e){return t(e)}}(Y):function(t){return he(t)&&fe(t.length)&&!!K[ct.call(t)]};function ye(t){return ue(t)?Dt(t):qt(t)}function ge(t){return t}r.exports=ne}).call(this,r(12),r(39)(t))},function(t,e,r){ -//! stable.js 0.1.8, https://github.com/Two-Screen/stable -//! © 2018 Angry Bytes and contributors. MIT licensed. -t.exports=function(){"use strict";var t=function(t,r){return e(t.slice(),r)};function e(t,e){"function"!=typeof e&&(e=function(t,e){return String(t).localeCompare(e)});var n=t.length;if(n<=1)return t;for(var i=new Array(n),o=1;oc&&(o=c),s>c&&(s=c),a=i,u=o;;)if(a0&&(e+=o(n)),e+=o(r)}},function(t,e,r){"use strict";var n=r(128),i=r(392),o=r(393);t.exports=function(t){for(var e,r=0,s="";!e;)s+=o(i,n.get(),1),e=t2&&(o=[o[0],t.apply(void 0,n(o.slice(1)))]);var a=o[0]||i;if("function"!=typeof a)throw new TypeError("Pre function must be a function");var u=o[1];if("function"!=typeof u)throw new TypeError("Function to call must be a function");return function(){for(var t=arguments.length,e=Array(t),r=0;r2&&(o=[t.apply(void 0,n(o.slice(0,-1))),o[o.length-1]]);var a=o[0];if("function"!=typeof a)throw new TypeError("Function to call must be a function");var u=o[1]||i;if("function"!=typeof u)throw new TypeError("Post function must be a function");return function(){var t=a.apply(void 0,arguments);return t&&"function"==typeof t.then?t.then(u):u(t)}};var i=function(t){return t}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return{ledger:(0,n.expose)("ipfs.bitswap.ledger",function(){var e;return(e=t().bitswap).ledger.apply(e,arguments)},e),reprovide:(0,n.expose)("ipfs.bitswap.reprovide",function(){var e;return(e=t().bitswap).reprovide.apply(e,arguments)},e),stat:(0,n.expose)("ipfs.bitswap.stat",(0,i.post)(function(){var e;return(e=t().bitswap).stat.apply(e,arguments)},function(t){return t&&((0,o.isBig)(t.blocksReceived)&&(t.blocksReceived=(0,o.bigToJson)(t.blocksReceived)),(0,o.isBig)(t.dataReceived)&&(t.dataReceived=(0,o.bigToJson)(t.dataReceived)),(0,o.isBig)(t.blocksSent)&&(t.blocksSent=(0,o.bigToJson)(t.blocksSent)),(0,o.isBig)(t.dataSent)&&(t.dataSent=(0,o.bigToJson)(t.dataSent)),(0,o.isBig)(t.dupBlksReceived)&&(t.dupBlksReceived=(0,o.bigToJson)(t.dupBlksReceived)),(0,o.isBig)(t.dupDataReceived)&&(t.dupDataReceived=(0,o.bigToJson)(t.dupDataReceived))),t}),e),unwant:(0,n.expose)("ipfs.bitswap.unwant",function(){var e;return(e=t().bitswap).unwant.apply(e,arguments)},e),wantlist:(0,n.expose)("ipfs.bitswap.wantlist",function(){var e;return(e=t().bitswap).wantlist.apply(e,arguments)},e)}};var n=r(1),i=r(2),o=r(91)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return{put:(0,n.expose)("ipfs.block.put",(0,i.pre)((0,a.preBufferFromJson)(0),(0,o.preBlockFromJson)(0),function(){for(var t=arguments.length,e=Array(t),r=0;r0?n-4:n,l=0;l>16&255,a[u++]=e>>8&255,a[u++]=255&e;2===s&&(e=i[t.charCodeAt(l)]<<2|i[t.charCodeAt(l+1)]>>4,a[u++]=255&e);1===s&&(e=i[t.charCodeAt(l)]<<10|i[t.charCodeAt(l+1)]<<4|i[t.charCodeAt(l+2)]>>2,a[u++]=e>>8&255,a[u++]=255&e);return a},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=0,a=r-i;sa?a:s+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function f(t,e,r){for(var i,o,s=[],a=e;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,f=-7,l=r?i-1:0,h=r?-1:1,p=t[e+l];for(l+=h,o=p&(1<<-f)-1,p>>=-f,f+=a;f>0;o=256*o+t[e+l],l+=h,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+t[e+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,f=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(s++,u/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(e*u-1)*Math.pow(2,i),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;t[r+p]=255&s,p+=d,s/=256,c-=8);t[r+p-d]|=128*y}},function(t,e){t.exports=function t(e,o,s){o=o||[];s=s||0;var a=s;for(;e>=i;)o[s++]=255&e|r,e/=128;for(;e&n;)o[s++]=255&e|r,e>>>=7;o[s]=0|e;t.bytes=s-a+1;return o};var r=128,n=-128,i=Math.pow(2,31)},function(t,e){t.exports=function t(e,i){var o,s=0,i=i||0,a=0,u=i,c=e.length;do{if(u>=c)throw t.bytes=0,new RangeError("Could not decode varint");o=e[u++],s+=a<28?(o&n)<=r);t.bytes=u-i;return s};var r=128,n=127},function(t,e){var r=Math.pow(2,7),n=Math.pow(2,14),i=Math.pow(2,21),o=Math.pow(2,28),s=Math.pow(2,35),a=Math.pow(2,42),u=Math.pow(2,49),c=Math.pow(2,56),f=Math.pow(2,63);t.exports=function(t){return t(t[e[0]]=new n(e[0],e[1],e[2],e[3]),t),{}),f=u.reduce((t,e)=>(t[e[1]]=c[e[0]],t),{});t.exports={names:c,codes:f}},function(t,e,r){"use strict";t.exports=class{constructor(t,e,r,n){this.name=t,this.code=e,this.alphabet=n,r&&n&&(this.engine=r(n))}encode(t){return this.engine.encode(t)}decode(t){return this.engine.decode(t)}isImplemented(){return this.engine}}},function(t,e,r){"use strict";(function(e){t.exports=function(t){return{encode:t=>"string"==typeof t?e.from(t).toString("hex"):t.toString("hex"),decode(r){for(let e of r)if(t.indexOf(e)<0)throw new Error("invalid base16 character");return e.from(r,"hex")}}}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e){function r(t,e){let r=t.byteLength,n=new Uint8Array(t),i=e.indexOf("=")===e.length-1;i&&(e=e.substring(0,e.length-2));let o=0,s=0,a="";for(let t=0;t=5;)a+=e[s>>>o-5&31],o-=5;if(o>0&&(a+=e[s<<5-o&31]),i)for(;a.length%8!=0;)a+="=";return a}t.exports=function(t){return{encode:n=>r("string"==typeof n?e.from(n):n,t),decode(e){for(let r of e)if(t.indexOf(r)<0)throw new Error("invalid base32 character");return function(t,e){let r=(t=t.replace(new RegExp("=","g"),"")).length,n=0,i=0,o=0,s=new Uint8Array(5*r/8|0);for(let a=0;a=8&&(s[o++]=i>>>n-8&255,n-=8);return s.buffer}(e,t)}}}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e){t.exports=function(t){const r=t.indexOf("=")>-1,n=t.indexOf("-")>-1&&t.indexOf("_")>-1;return{encode(t){let i="";i="string"==typeof t?e.from(t).toString("base64"):t.toString("base64"),n&&(i=i.replace(/\+/g,"-").replace(/\//g,"_"));const o=i.indexOf("=");return o>0&&!r&&(i=i.substring(0,o)),i},decode(r){for(let e of r)if(t.indexOf(e)<0)throw new Error("invalid base64 character");return e.from(r,"base64")}}}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(n){const i=r(5),o=r(413),s=r(315),a=r(218);(e=t.exports).addPrefix=((t,e)=>{let r;if(n.isBuffer(t))r=a.varintBufferEncode(t);else{if(!o[t])throw new Error("multicodec not recognized");r=o[t]}return n.concat([r,e])}),e.rmPrefix=(t=>(i.decode(t),t.slice(i.decode.bytes))),e.getCodec=(t=>{const e=a.varintBufferDecode(t),r=s[e.toString("hex")];if(void 0===r)throw new Error("Code `0x"+e.toString("hex")+"` not found");return r}),e.getCodeVarint=(t=>{const e=o[t];if(void 0===e)throw new Error("Codec `"+t+"` not found");return e}),e.addCodec=((t,e)=>{o[t]=a.varintBufferEncode(e),s[e.toString("hex")]=t})}).call(this,r(0).Buffer)},function(t,e,r){"use strict";const n=r(148),i=r(218).varintBufferEncode,o={};t.exports=o;for(let t in n){let e=n[t];o[t]=i(e)}},function(t,e,r){"use strict";(function(e){const n=r(24);var i={checkCIDComponents:function(t){if(null==t)return"null values are not valid CIDs";if(0!==t.version&&1!==t.version)return"Invalid version, must be a number equal to 1 or 0";if("string"!=typeof t.codec)return"codec must be string";if(!e.isBuffer(t.multihash))return"multihash must be a Buffer";try{n.validate(t.multihash)}catch(t){let e=t.message;return e||(e="Multihash validation failed"),e}}};t.exports=i}).call(this,r(0).Buffer)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return{add:(0,n.expose)("ipfs.bootstrap.add",(0,i.pre)(e.pre("bootstrap.add"),(0,i.post)(function(){var e;return(e=t().bootstrap).add.apply(e,arguments)},(0,o.postArrayOf)("Peers",s.isMultiaddr,s.multiaddrToJson))),e),list:(0,n.expose)("ipfs.bootstrap.list",(0,i.pre)(e.pre("bootstrap.list"),(0,i.post)(function(){var e;return(e=t().bootstrap).list.apply(e,arguments)},(0,o.postArrayOf)("Peers",s.isMultiaddr,s.multiaddrToJson))),e),rm:(0,n.expose)("ipfs.bootstrap.rm",(0,i.pre)(e.pre("bootstrap.rm"),(0,i.post)(function(){var e;return(e=t().bootstrap).rm.apply(e,arguments)},(0,o.postArrayOf)("Peers",s.isMultiaddr,s.multiaddrToJson))),e)}};var n=r(1),i=r(2),o=r(129),s=r(103)},function(t,e,r){"use strict";(function(e){const n=r(15),i=r(31),o=r(417),s=r(161),a=r(5),u=r(9),c=r(26),f=new Error("Sorry, Not Implemented Yet."),l=c.proto(function(t){if(!(this instanceof l))return new l(t);if(null==t&&(t=""),t instanceof e)this.buffer=o.fromBuffer(t);else if("string"==typeof t||t instanceof String){if(t.length>0&&"/"!==t.charAt(0))throw new Error(`multiaddr "${t}" must start with a "/"`);this.buffer=o.fromString(t)}else{if(!(t.buffer&&t.protos&&t.protoCodes))throw new Error("addr must be a string, Buffer, or another Multiaddr");this.buffer=o.fromBuffer(t.buffer)}},{className:"Multiaddr",symbolName:"@multiformats/js-multiaddr/multiaddr"});l.prototype.toString=function(){return o.bufferToString(this.buffer)},l.prototype.toOptions=function(){const t={},e=this.toString().split("/");return t.family="ip4"===e[1]?"ipv4":"ipv6",t.host=e[2],t.transport=e[3],t.port=e[4],t},l.prototype.inspect=function(){return""},l.prototype.protos=function(){return n(this.protoCodes(),function(t){return i(s(t))})},l.prototype.protoCodes=function(){const t=[],e=this.buffer;let r=0;for(;r{if(t[0]===s.names.ipfs.code)return!0})[0][1],u.decode(t)}catch(e){t=null}return t},l.prototype.equals=function(t){return this.buffer.equals(t.buffer)},l.prototype.nodeAddress=function(){const t=this.protoCodes(),e=this.protoNames(),r=this.toString().split("/").slice(1);if(r.length<4)throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6}/{address}/{tcp, udp}/{port}".');if(4!==t[0]&&41!==t[0]&&54!==t[0]&&55!==t[0])throw new Error(`no protocol with name: "'${e[0]}'". Must have a valid family name: "{ip4, ip6, dns4, dns6}".`);if("tcp"!==r[2]&&"udp"!==r[2])throw new Error(`no protocol with name: "'${e[1]}'". Must have a valid transport protocol: "{tcp, udp}".`);return{family:41===t[0]||55===t[0]?6:4,address:r[1],port:r[3]}},l.fromNodeAddress=function(t,e){if(!t)throw new Error("requires node address object");if(!e)throw new Error("requires transport protocol");const r="IPv6"===t.family?"ip6":"ip4";return l("/"+[r,t.address,e,t.port].join("/"))},l.prototype.isThinWaistAddress=function(t){const e=(t||this).protos();return 2===e.length&&((4===e[0].code||41===e[0].code)&&(6===e[1].code||17===e[1].code))},l.prototype.fromStupidString=function(t){throw f},l.protocols=s,l.isName=function(t){return!!l.isMultiaddr(t)&&t.protos().some(t=>t.resolvable)},l.resolve=function(t,e){return l.isMultiaddr(t)&&l.isName(t)?e(new Error("not implemented yet")):e(new Error("not a valid name"))},t.exports=l}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e){const n=r(15),i=r(44),o=r(418),s=r(161),a=r(5);function u(t){const e=[],r=t.split("/").slice(1);if(1===r.length&&""===r[0])return[];for(let n=0;n=r.length)throw b("invalid address: "+t);e.push([i,r[n]])}else e.push([i])}return e}function c(t){const e=[];return n(t,function(t){const r=_(t);e.push(r.name),t.length>1&&e.push(t[1])}),"/"+e.join("/")}function f(t){return n(t,function(t){Array.isArray(t)||(t=[t]);const e=_(t);return t.length>1?[e.code,o.toBuffer(e.code,t[1])]:[e.code]})}function l(t){return n(t,function(t){const e=_(t);return t.length>1?[e.code,o.toString(e.code,t[1])]:[e.code]})}function h(t){return g(e.concat(n(t,function(t){const r=_(t);let n=e.from(a.encode(r.code));return t.length>1&&(n=e.concat([n,t[1]])),n})))}function p(t,e){if(t.size>0)return t.size/8;if(0===t.size)return 0;return a.decode(e)+a.decode.bytes}function d(t){const e=[];let r=0;for(;rt.length)throw b("Invalid address buffer: "+t.toString("hex"));e.push([n,u])}return e}function y(t){return h(f(u(t=v(t))))}function g(t){const r=m(t);if(r)throw r;return e.from(t)}function m(t){try{d(t)}catch(t){return t}}function v(t){return"/"+i(t.trim().split("/")).join("/")}function b(t){return new Error("Error parsing address: "+t)}function _(t){return s(t[0])}t.exports={stringToStringTuples:u,stringTuplesToString:c,tuplesToStringTuples:l,stringTuplesToTuples:f,bufferToTuples:d,tuplesToBuffer:h,bufferToString:function(t){return c(l(d(t)))},stringToBuffer:y,fromString:function(t){return y(t)},fromBuffer:g,validateBuffer:m,isValidBuffer:function(t){return void 0===m(t)},cleanPath:v,ParseError:b,protoFromTuple:_,sizeForAddr:p}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e){const n=r(45),i=r(46),o=r(161),s=r(9),a=r(5);function u(t,r){return r instanceof e?u.toString(t,r):u.toBuffer(t,r)}function c(t){if(!t.isValid())throw new Error("invalid ip address");return n.toBuffer(t.address)}t.exports=u,u.toString=function(t,e){switch((t=o(t)).code){case 4:case 41:return n.toString(e);case 6:case 17:case 33:case 132:return function(t){return t.readUInt16BE(0)}(e);case 54:case 55:case 56:return function(t){const e=a.decode(t);if((t=t.slice(a.decode.bytes)).length!==e)throw new Error("inconsistent lengths");return t.toString()}(e);case 421:return function(t){const e=a.decode(t),r=t.slice(a.decode.bytes);if(r.length!==e)throw new Error("inconsistent lengths");return s.encode(r)}(e);default:return e.toString("hex")}},u.toBuffer=function(t,r){switch((t=o(t)).code){case 4:return c(new i.Address4(r));case 41:return c(new i.Address6(r));case 6:case 17:case 33:case 132:return function(t){const r=e.alloc(2);return r.writeUInt16BE(t,0),r}(parseInt(r,10));case 54:case 55:case 56:return function(t){const r=e.from(t),n=e.from(a.encode(r.length));return e.concat([n,r])}(r);case 421:return function(t){const r=e.from(s.decode(t)),n=e.from(a.encode(r.length));return e.concat([n,r])}(r);default:return e.from(r,"hex")}}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";var n=r(220).BigInteger,i=r(317),o=r(420),s=r(421),a=r(222),u=r(223),c=r(104).sprintf,f=r(159),l=r(160),h=r(219);function p(t){return t=(t=t.replace(/^(0{1,})([1-9]+)$/,'$1$2')).replace(/^(0{1,})(0)$/,'$1$2')}function d(t,e){this.groups=void 0===e?l.GROUPS:e,this.v4=!1,this.subnet="/128",this.subnetMask=128,this.zone="",this.address=t;var r=l.RE_SUBNET_STRING.exec(t);if(r){if(this.parsedSubnet=r[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet="/"+this.subnetMask,isNaN(this.subnetMask)||this.subnetMask<0||this.subnetMask>l.BITS)return this.valid=!1,void(this.error="Invalid subnet mask.");t=t.replace(l.RE_SUBNET_STRING,"")}else if(/\//.test(t))return this.valid=!1,void(this.error="Invalid subnet mask.");var n=l.RE_ZONE_STRING.exec(t);n&&(this.zone=n[0],t=t.replace(l.RE_ZONE_STRING,"")),this.addressMinusSuffix=t,this.parsedAddress=this.parse(this.addressMinusSuffix)}function y(t){return c("%04x",parseInt(t,16))}function g(t){return 255&t}s(d.prototype,r(422)),s(d.prototype,r(423)),s(d.prototype,r(424)),d.fromBigInteger=function(t){var e,r=a(t.toString(16),32,"0"),n=[];for(e=0;e65536)&&(r=null):r=null,{address:new d(e),port:r}},d.fromAddress4=function(t){t=new h(t);var e=l.BITS-(f.BITS-t.subnetMask);return new d("::ffff:"+t.correctForm()+"/"+e)},d.fromArpa=function(t){var e=t.replace(/(\.ip6\.arpa)?\.$/,"");if(63!==e.length)return e={error:"Not Valid 'ip6.arpa' form",address:null};e=e.split(".").reverse();for(var r=7;r>0;r--){var n=4*r;e.splice(n,0,":")}return new d(e=e.join(""))},d.prototype.microsoftTranscription=function(){return c("%s.ipv6-literal.net",this.correctForm().replace(/:/g,"-"))},d.prototype.mask=function(t){return void 0===t&&(t=this.subnetMask),this.getBitsBase2(0,t)},d.prototype.possibleSubnets=function(t){void 0===t&&(t=128);var e=l.BITS-this.subnetMask-Math.abs(t-l.BITS);return e<0?"0":function(t){for(var e=/(\d+)(\d{3})/;e.test(t);)t=t.replace(e,"$1,$2");return t}(new n("2",10).pow(e).toString(10))},d.prototype.startAddress=function(){var t=new n(this.mask()+u(0,l.BITS-this.subnetMask),2);return d.fromBigInteger(t)},d.prototype.endAddress=function(){var t=new n(this.mask()+u(1,l.BITS-this.subnetMask),2);return d.fromBigInteger(t)},d.prototype.getScope=function(){var t=l.SCOPES[this.getBits(12,16)];return"Global unicast"===this.getType()&&"Link local"!==t&&(t="Global"),t},d.prototype.getType=function(){var t=this;return i(l.TYPES,function(e,r){return t.isInSubnet(new d(r))})||"Global unicast"},d.prototype.getBits=function(t,e){return new n(this.getBitsBase2(t,e),2)},d.prototype.getBitsBase2=function(t,e){return this.binaryZeroPad().slice(t,e)},d.prototype.getBitsBase16=function(t,e){var r=e-t;return r%4!=0?null:a(this.getBits(t,e).toString(16),r/4,"0")},d.prototype.getBitsPastSubnet=function(){return this.getBitsBase2(this.subnetMask,l.BITS)},d.prototype.reverseForm=function(t){t||(t={});var e=Math.floor(this.subnetMask/4),r=this.canonicalForm().replace(/:/g,"").split("").slice(0,e).reverse().join(".");return e>0?t.omitSuffix?r:c("%s.ip6.arpa.",r):t.omitSuffix?"":"ip6.arpa."},d.prototype.correctForm=function(){if(!this.parsedAddress)return null;var t,e=[],r=0,n=[];for(t=0;t0&&(r>1&&n.push([t-r,t-1]),r=0)}r>1&&n.push([this.parsedAddress.length-r,this.parsedAddress.length-1]);var s=n.map(function(t){return t[1]-t[0]+1});if(n.length>0){var a=s.indexOf(o(s));e=function(t,e){var r,n=[],i=[];for(r=0;re[1]&&i.push(t[r]);return n.concat(["compact"]).concat(i)}(this.parsedAddress,n[a])}else e=this.parsedAddress;for(t=0;t1?"s":"",e.join("")),this.parseError=t.replace(l.RE_BAD_CHARACTERS,'$1'),null;var r=t.match(l.RE_BAD_ADDRESS);if(r)return this.valid=!1,this.error=c("Address failed regex: %s",r.join("")),this.parseError=t.replace(l.RE_BAD_ADDRESS,'$1'),null;var n=[],i=t.split("::");if(2===i.length){var o=i[0].split(":"),s=i[1].split(":");1===o.length&&""===o[0]&&(o=[]),1===s.length&&""===s[0]&&(s=[]);var a=this.groups-(o.length+s.length);if(!a)return this.valid=!1,this.error="Error parsing groups",null;this.elidedGroups=a,this.elisionBegin=o.length,this.elisionEnd=o.length+this.elidedGroups,o.forEach(function(t){n.push(t)});for(var u=0;u=0;o--)r=r.add(i.multiply(new n(t[o].toString(10),10))),i=i.multiply(e);return d.fromBigInteger(r)},t.exports=d},function(t,e){var r="[object Symbol]",n=Object.prototype.toString;function i(t,e){return t>e}function o(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&n.call(t)==r}function s(t){return t}t.exports=function(t){return t&&t.length?function(t,e,r){for(var n=-1,i=t.length;++n-1},ot.prototype.set=function(t,e){var r=this.__data__,n=lt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},st.prototype.clear=function(){this.size=0,this.__data__={hash:new it,map:new(et||ot),string:new it}},st.prototype.delete=function(t){var e=St(this,t).delete(t);return this.size-=e?1:0,e},st.prototype.get=function(t){return St(this,t).get(t)},st.prototype.has=function(t){return St(this,t).has(t)},st.prototype.set=function(t,e){var r=St(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},at.prototype.clear=function(){this.__data__=new ot,this.size=0},at.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},at.prototype.get=function(t){return this.__data__.get(t)},at.prototype.has=function(t){return this.__data__.has(t)},at.prototype.set=function(t,e){var r=this.__data__;if(r instanceof ot){var i=r.__data__;if(!et||i.length-1&&t%1==0&&t0){if(++e>=o)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Q?function(t,e){return Q(t,"toString",{configurable:!0,enumerable:!1,value:(r=e,function(){return r}),writable:!0});var r}:Kt);function At(t,e){return t===e||t!=t&&e!=e}var Tt=gt(function(){return arguments}())?gt:function(t){return Pt(t)&&O.call(t,"callee")&&!Y.call(t,"callee")},Bt=Array.isArray;function It(t){return null!=t&&Rt(t.length)&&!xt(t)}var Mt=Z||function(){return!1};function xt(t){if(!Nt(t))return!1;var e=yt(t);return e==f||e==l||e==c||e==d}function Rt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=a}function Nt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Pt(t){return null!=t&&"object"==typeof t}var Lt=T?function(t){return function(e){return t(e)}}(T):function(t){return Pt(t)&&Rt(t.length)&&!!v[yt(t)]};function Dt(t){return It(t)?ut(t,!0):vt(t)}var Ot,Ut=(Ot=function(t,e,r){bt(t,e,r)},_t(function(t,e){var r=-1,n=e.length,i=n>1?e[n-1]:void 0,o=n>2?e[2]:void 0;for(i=Ot.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(t,e,r){if(!Nt(r))return!1;var n=typeof e;return!!("number"==n?It(r)&&Et(e,r.length):"string"==n&&e in r)&&At(r[e],t)}(e[0],e[1],o)&&(i=n<3?void 0:i,n=1),t=Object(t);++r%2$s',t.prefix,e.call(this),t.className):o('%2$s',t.prefix,e.call(this))},e.group=function(){var t,e=this.address.match(n.RE_ADDRESS);if(e){var r=e[0].split(".");this.address=this.address.replace(n.RE_ADDRESS,o('%s.%s',r.slice(0,2).join("."),r.slice(2,4).join(".")))}if(0===this.elidedGroups)return i.simpleGroup(this.address);var s=[],a=this.address.split("::");a[0].length?s.push(i.simpleGroup(a[0])):s.push("");var u=["hover-group"];for(t=this.elisionBegin;t',u.join(" "))),a[1].length?s.push(i.simpleGroup(a[1],this.elisionEnd)):s.push(""),s.join(":")}},function(t,e,r){"use strict";var n=r(104).sprintf,i=r(160);function o(t){return n("(%s)",t.join("|"))}function s(t){return t.length<4?n("0{0,%d}%s",4-t.length,t):t}function a(t){var e=[];t.forEach(function(t,r){0===parseInt(t,16)&&e.push(r)});var r=e.map(function(e){return t.map(function(t,r){if(r===e){var n=0===r||r===i.GROUPS-1?":":"";return o([s(t),n])}return s(t)}).join(":")});return r.push(t.map(s).join(":")),o(r)}function u(t,e,r){var i=e?"":":",s=r?"":":",a=[];e||r||a.push("::"),e&&r&&a.push(""),(r&&!e||!r&&e)&&a.push(":"),a.push(n("%s(:0{1,4}){1,%d}",i,t-1)),a.push(n("(0{1,4}:){1,%d}%s",t-1,s)),a.push(n("(0{1,4}:){%d}0{1,4}",t-1));for(var u=1;u{s.sha2256(t,(t,n)=>{t&&r(t),s.sha2256(e.from(n),r)})}}}).call(this,r(0).Buffer)},function(t,e){(function(e){t.exports=e}).call(this,{})},function(t,e,r){!function(r,n){"use strict";var i={version:"3.0.1",x86:{},x64:{}};function o(t,e){return(65535&t)*e+(((t>>>16)*e&65535)<<16)}function s(t,e){return t<>>32-e}function a(t){return t=o(t^=t>>>16,2246822507),t=o(t^=t>>>13,3266489909),t^=t>>>16}function u(t,e){t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]],e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]];var r=[0,0,0,0];return r[3]+=t[3]+e[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=t[2]+e[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=t[1]+e[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=t[0]+e[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function c(t,e){t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]],e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]];var r=[0,0,0,0];return r[3]+=t[3]*e[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=t[2]*e[3],r[1]+=r[2]>>>16,r[2]&=65535,r[2]+=t[3]*e[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=t[1]*e[3],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=t[2]*e[2],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=t[3]*e[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=t[0]*e[3]+t[1]*e[2]+t[2]*e[1]+t[3]*e[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function f(t,e){return 32===(e%=64)?[t[1],t[0]]:e<32?[t[0]<>>32-e,t[1]<>>32-e]:(e-=32,[t[1]<>>32-e,t[0]<>>32-e])}function l(t,e){return 0===(e%=64)?t:e<32?[t[0]<>>32-e,t[1]<>>1]),t=h(t=c(t,[4283543511,3981806797]),[0,t[0]>>>1]),t=h(t=c(t,[3301882366,444984403]),[0,t[0]>>>1])}i.x86.hash32=function(t,e){e=e||0;for(var r=(t=t||"").length%4,n=t.length-r,i=e,u=0,c=3432918353,f=461845907,l=0;l>>0},i.x86.hash128=function(t,e){e=e||0;for(var r=(t=t||"").length%16,n=t.length-r,i=e,u=e,c=e,f=e,l=0,h=0,p=0,d=0,y=597399067,g=2869860233,m=951274213,v=2716044179,b=0;b>>0).toString(16)).slice(-8)+("00000000"+(u>>>0).toString(16)).slice(-8)+("00000000"+(c>>>0).toString(16)).slice(-8)+("00000000"+(f>>>0).toString(16)).slice(-8)},i.x64.hash128=function(t,e){e=e||0;for(var r=(t=t||"").length%16,n=t.length-r,i=[0,e],o=[0,e],s=[0,0],a=[0,0],d=[2277735313,289559509],y=[1291169091,658871167],g=0;g>>0).toString(16)).slice(-8)+("00000000"+(i[1]>>>0).toString(16)).slice(-8)+("00000000"+(o[0]>>>0).toString(16)).slice(-8)+("00000000"+(o[1]>>>0).toString(16)).slice(-8)},t.exports&&(e=t.exports=i),e.murmurHash3=i}()},function(t,e,r){(function(t,e){!function(t,r){"use strict";if(!t.setImmediate){var n,i,o,s,a,u=1,c={},f=!1,l=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?n=function(t){e.nextTick(function(){d(t)})}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){d(t.data)},n=function(t){o.port2.postMessage(t)}):l&&"onreadystatechange"in l.createElement("script")?(i=l.documentElement,n=function(t){var e=l.createElement("script");e.onreadystatechange=function(){d(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):n=function(t){setTimeout(d,0,t)}:(s="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(s)&&d(+e.data.slice(s.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),n=function(e){t.postMessage(s+e,"*")}),h.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r{const s=i.digest({name:t},r);if("function"!=typeof s.then)return s.onerror=(()=>{o(new Error(`hashing data using ${t}`))}),void(s.oncomplete=(t=>{o(null,t.target.result)}));n(s.then(t=>e.from(new Uint8Array(t))),o)}}t.exports={sha1:function(t,e){o("SHA-1")(t,e)},sha2256:function(t,e){o("SHA-256")(t,e)},sha2512:function(t,e){o("SHA-512")(t,e)}}}).call(this,r(0).Buffer)},function(t,e,r){(function(e){var n,i=r(226);n="function"==typeof setImediate?setImediate:"object"==typeof e&&e&&e.nextTick?e.nextTick:function(t){setTimeout(t,0)};var o=[];function s(t){if(!(this instanceof s))return"function"==typeof t?new s(t):(r=new s(function(t){e=t}),{resolver:e,promise:r});var e,r,a,u=!1,c=!1,f=[],l=!1;function h(t){f.length?(l=!0,f.shift()(t||!1)):l=!1}this.then=function(t,e){return new s(function(r){f.push(function(i){var o=c?t:e;if("function"==typeof o){function s(){var t;try{t=o(a)}catch(t){return r.reject(t),h()}r.fulfill(t),h(!0)}i?s():n(s)}else c?(r.fulfill(a),h(i)):(r.reject(a),h(i))}),u&&!l&&h()})},function(){function e(t){u||(u=!0,c=!1,a=t,h())}for(var r={fulfill:function t(r){u||(i(r)?r.then(t,e):(u=c=!0,a=r,h()))},reject:e},n=0;ni(n=>{const i=r.init(t,null);return r.update(i,n),e.from(r.digest(i))});t.exports=(t=>{for(let e=0;e<64;e++)t[45569+e]=a(e+1,o);for(let e=0;e<32;e++)t[45633+e]=a(e+1,s)})}).call(this,r(0).Buffer)},function(t,e,r){var n=r(227);function i(t,e,r){var n=t[e]+t[r],i=t[e+1]+t[r+1];n>=4294967296&&i++,t[e]=n,t[e+1]=i}function o(t,e,r,n){var i=t[e]+r;r<0&&(i+=4294967296);var o=t[e+1]+n;i>=4294967296&&o++,t[e]=i,t[e+1]=o}function s(t,e){return t[e]^t[e+1]<<8^t[e+2]<<16^t[e+3]<<24}function a(t,e,r,n,s,a){var u=l[s],c=l[s+1],h=l[a],p=l[a+1];i(f,t,e),o(f,t,u,c);var d=f[n]^f[t],y=f[n+1]^f[t+1];f[n]=y,f[n+1]=d,i(f,r,n),d=f[e]^f[r],y=f[e+1]^f[r+1],f[e]=d>>>24^y<<8,f[e+1]=y>>>24^d<<8,i(f,t,e),o(f,t,h,p),d=f[n]^f[t],y=f[n+1]^f[t+1],f[n]=d>>>16^y<<16,f[n+1]=y>>>16^d<<16,i(f,r,n),d=f[e]^f[r],y=f[e+1]^f[r+1],f[e]=y>>>31^d<<1,f[e+1]=d>>>31^y<<1}var u=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),c=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(t){return 2*t})),f=new Uint32Array(32),l=new Uint32Array(32);function h(t,e){var r=0;for(r=0;r<16;r++)f[r]=t.h[r],f[r+16]=u[r];for(f[24]=f[24]^t.t,f[25]=f[25]^t.t/4294967296,e&&(f[28]=~f[28],f[29]=~f[29]),r=0;r<32;r++)l[r]=s(t.b,4*r);for(r=0;r<12;r++)a(0,8,16,24,c[16*r+0],c[16*r+1]),a(2,10,18,26,c[16*r+2],c[16*r+3]),a(4,12,20,28,c[16*r+4],c[16*r+5]),a(6,14,22,30,c[16*r+6],c[16*r+7]),a(0,10,20,30,c[16*r+8],c[16*r+9]),a(2,12,22,24,c[16*r+10],c[16*r+11]),a(4,14,16,26,c[16*r+12],c[16*r+13]),a(6,8,18,28,c[16*r+14],c[16*r+15]);for(r=0;r<16;r++)t.h[r]=t.h[r]^f[r]^f[r+16]}function p(t,e){if(0===t||t>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(e&&e.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:t},n=0;n<16;n++)r.h[n]=u[n];var i=e?e.length:0;return r.h[0]^=16842752^i<<8^t,e&&(d(r,e),r.c=128),r}function d(t,e){for(var r=0;r>2]>>8*(3&r);return e}function g(t,e,r){r=r||64,t=n.normalizeInput(t);var i=p(r,e);return d(i,t),y(i)}t.exports={blake2b:g,blake2bHex:function(t,e,r){var i=g(t,e,r);return n.toHex(i)},blake2bInit:p,blake2bUpdate:d,blake2bFinal:y}},function(t,e,r){var n=r(227);function i(t,e){return t[e]^t[e+1]<<8^t[e+2]<<16^t[e+3]<<24}function o(t,e,r,n,i,o){c[t]=c[t]+c[e]+i,c[n]=s(c[n]^c[t],16),c[r]=c[r]+c[n],c[e]=s(c[e]^c[r],12),c[t]=c[t]+c[e]+o,c[n]=s(c[n]^c[t],8),c[r]=c[r]+c[n],c[e]=s(c[e]^c[r],7)}function s(t,e){return t>>>e^t<<32-e}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]),c=new Uint32Array(16),f=new Uint32Array(16);function l(t,e){var r=0;for(r=0;r<8;r++)c[r]=t.h[r],c[r+8]=a[r];for(c[12]^=t.t,c[13]^=t.t/4294967296,e&&(c[14]=~c[14]),r=0;r<16;r++)f[r]=i(t.b,4*r);for(r=0;r<10;r++)o(0,4,8,12,f[u[16*r+0]],f[u[16*r+1]]),o(1,5,9,13,f[u[16*r+2]],f[u[16*r+3]]),o(2,6,10,14,f[u[16*r+4]],f[u[16*r+5]]),o(3,7,11,15,f[u[16*r+6]],f[u[16*r+7]]),o(0,5,10,15,f[u[16*r+8]],f[u[16*r+9]]),o(1,6,11,12,f[u[16*r+10]],f[u[16*r+11]]),o(2,7,8,13,f[u[16*r+12]],f[u[16*r+13]]),o(3,4,9,14,f[u[16*r+14]],f[u[16*r+15]]);for(r=0;r<8;r++)t.h[r]^=c[r]^c[r+8]}function h(t,e){if(!(t>0&&t<=32))throw new Error("Incorrect output length, should be in [1, 32]");var r=e?e.length:0;if(e&&!(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:t};return n.h[0]^=16842752^r<<8^t,r>0&&(p(n,e),n.c=64),n}function p(t,e){for(var r=0;r>2]>>8*(3&r)&255;return e}function y(t,e,r){r=r||32,t=n.normalizeInput(t);var i=h(r,e);return p(i,t),d(i)}t.exports={blake2s:y,blake2sHex:function(t,e,r){var i=y(t,e,r);return n.toHex(i)},blake2sInit:h,blake2sUpdate:p,blake2sFinal:d}},function(t,e,r){var n=r(439),i=r(441);t.exports=n,t.exports.parse=n,t.exports.stringify=i},function(t,e,r){var n=r(440),i=["int32","int64","uint32","uint64","sint32","sint64","bool","fixed64","sfixed64","double","fixed32","sfixed32","float"],o=function(t){for(var e={};t.length;)switch(t[0]){case"[":case",":t.shift();var r=t.shift();if("("===r&&(r=t.shift(),t.shift()),"="!==t[0])throw new Error("Unexpected token in field options: "+t[0]);if(t.shift(),"]"===t[0])throw new Error("Unexpected ] in field option");e[r]=t.shift();break;case"]":return t.shift(),e;default:throw new Error("Unexpected token in field options: "+t[0])}throw new Error("No closing tag for field options")},s=function(t){for(var e={name:null,type:null,tag:-1,map:null,oneof:null,required:!1,repeated:!1,options:{}};t.length;)switch(t[0]){case"=":t.shift(),e.tag=Number(t.shift());break;case"map":if(e.type="map",e.map={from:null,to:null},t.shift(),"<"!==t[0])throw new Error("Unexpected token in map type: "+t[0]);if(t.shift(),e.map.from=t.shift(),","!==t[0])throw new Error("Unexpected token in map type: "+t[0]);if(t.shift(),e.map.to=t.shift(),">"!==t[0])throw new Error("Unexpected token in map type: "+t[0]);t.shift(),e.name=t.shift();break;case"repeated":case"required":case"optional":var r=t.shift();e.required="required"===r,e.repeated="repeated"===r,e.type=t.shift(),e.name=t.shift();break;case"[":e.options=o(t);break;case";":if(null===e.name)throw new Error("Missing field name");if(null===e.type)throw new Error("Missing type in message field: "+e.name);if(-1===e.tag)throw new Error("Missing tag number in message field: "+e.name);return t.shift(),e;default:throw new Error("Unexpected token in message field: "+t[0])}throw new Error("No ; found for message field")},a=function(t){for(var e={enums:[],messages:[],fields:[],extends:[],extensions:null};t.length;)switch(t[0]){case"map":case"repeated":case"optional":case"required":e.fields.push(s(t));break;case"enum":e.enums.push(d(t));break;case"message":e.messages.push(f(t));break;case"extensions":e.extensions=c(t);break;case"oneof":t.shift();var r=t.shift();if("{"!==t[0])throw new Error("Unexpected token in oneof: "+t[0]);for(t.shift();"}"!==t[0];){t.unshift("optional");var n=s(t);n.oneof=r,e.fields.push(n)}t.shift();break;case"extend":e.extends.push(u(t));break;case";":t.shift();break;case"reserved":case"option":for(t.shift();";"!==t[0];)t.shift();break;default:t.unshift("optional"),e.fields.push(s(t))}return e},u=function(t){return{name:t[1],message:f(t)}},c=function(t){t.shift();var e=Number(t.shift());if(isNaN(e))throw new Error("Invalid from in extensions definition");if("to"!==t.shift())throw new Error("Expected keyword 'to' in extensions definition");var r=t.shift();if("max"===r&&(r=536870911),r=Number(r),isNaN(r))throw new Error("Invalid to in extensions definition");if(";"!==t.shift())throw new Error("Missing ; in extensions definition");return{from:e,to:r}},f=function(t){t.shift();var e=1,r=[],n={name:t.shift(),enums:[],extends:[],messages:[],fields:[]};if("{"!==t[0])throw new Error("Expected { but found "+t[0]);for(t.shift();t.length;){if("{"===t[0]?e++:"}"===t[0]&&e--,!e)return t.shift(),r=a(r),n.enums=r.enums,n.messages=r.messages,n.fields=r.fields,n.extends=r.extends,n.extensions=r.extensions,n;r.push(t.shift())}if(e)throw new Error("No closing tag for message")},l=function(t){t.shift();var e=t.shift();if(";"!==t[0])throw new Error("Expected ; but found "+t[0]);return t.shift(),e},h=function(t){if(t.shift(),"="!==t[0])throw new Error("Expected = but found "+t[0]);t.shift();var e=t.shift();switch(e){case'"proto2"':e=2;break;case'"proto3"':e=3;break;default:throw new Error("Expected protobuf syntax version but found "+e)}if(";"!==t[0])throw new Error("Expected ; but found "+t[0]);return t.shift(),e},p=function(t){if(t.length<4)throw new Error("Invalid enum value: "+t.slice(0,3).join(" "));if("="!==t[1])throw new Error("Expected = but found "+t[1]);if(";"!==t[3]&&"["!==t[3])throw new Error("Expected ; or [ but found "+t[1]);var e=t.shift();t.shift();var r={value:null,options:{}};return r.value=Number(t.shift()),"["===t[0]&&(r.options=o(t)),t.shift(),{name:e,val:r}},d=function(t){t.shift();var e={},r={name:t.shift(),values:{},options:{}};if("{"!==t[0])throw new Error("Expected { but found "+t[0]);for(t.shift();t.length;){if("}"===t[0])return t.shift(),";"===t[0]&&t.shift(),r;if("option"!==t[0]){var n=p(t);r.values[n.name]=n.val}else e=y(t),r.options[e.name]=e.value}throw new Error("No closing tag for enum")},y=function(t){for(var e=null,r=null,n=function(t){return"true"===t||"false"!==t&&t.replace(/^"+|"+$/gm,"")};t.length;){if(";"===t[0])return t.shift(),{name:e,value:r};switch(t[0]){case"option":t.shift();var i="("===t[0];if(i&&t.shift(),e=t.shift(),i){if(")"!==t[0])throw new Error("Expected ) but found "+t[0]);t.shift()}"."===t[0][0]&&(e+=t.shift());break;case"=":if(t.shift(),null===e)throw new Error("Expected key for option with value: "+t[0]);if(r=n(t.shift()),"optimize_for"===e&&!/^(SPEED|CODE_SIZE|LITE_RUNTIME)$/.test(r))throw new Error("Unexpected value for option optimize_for: "+r);"{"===r&&(r=g(t));break;default:throw new Error("Unexpected token in option: "+t[0])}}},g=function(t){for(var e=function(t){return"true"===t||"false"!==t&&t.replace(/^"+|"+$/gm,"")},r={};t.length;){if("}"===t[0])return t.shift(),r;var n="("===t[0];n&&t.shift();var i=t.shift();if(n){if(")"!==t[0])throw new Error("Expected ) but found "+t[0]);t.shift()}var o=null;switch(t[0]){case":":if(void 0!==r[i])throw new Error("Duplicate option map key "+i);t.shift(),"{"===(o=e(t.shift()))&&(o=g(t)),r[i]=o,";"===t[0]&&t.shift();break;case"{":if(t.shift(),o=g(t),void 0===r[i]&&(r[i]=[]),!Array.isArray(r[i]))throw new Error("Duplicate option map key "+i);r[i].push(o);break;default:throw new Error("Unexpected token in option map: "+t[0])}}throw new Error("No closing tag for option map")},m=function(t){t.shift();var e=t.shift().replace(/^"+|"+$/gm,"");if(";"!==t[0])throw new Error("Unexpected token: "+t[0]+'. Expected ";"');return t.shift(),e},v=function(t){t.shift();var e={name:t.shift(),methods:[],options:{}};if("{"!==t[0])throw new Error("Expected { but found "+t[0]);for(t.shift();t.length;){if("}"===t[0])return t.shift(),";"===t[0]&&t.shift(),e;switch(t[0]){case"option":var r=y(t);if(void 0!==e.options[r.name])throw new Error("Duplicate option "+r.name);e.options[r.name]=r.value;break;case"rpc":e.methods.push(b(t));break;default:throw new Error("Unexpected token in service: "+t[0])}}throw new Error("No closing tag for service")},b=function(t){t.shift();var e={name:t.shift(),input_type:null,output_type:null,client_streaming:!1,server_streaming:!1,options:{}};if("("!==t[0])throw new Error("Expected ( but found "+t[0]);if(t.shift(),"stream"===t[0]&&(t.shift(),e.client_streaming=!0),e.input_type=t.shift(),")"!==t[0])throw new Error("Expected ) but found "+t[0]);if(t.shift(),"returns"!==t[0])throw new Error("Expected returns but found "+t[0]);if(t.shift(),"("!==t[0])throw new Error("Expected ( but found "+t[0]);if(t.shift(),"stream"===t[0]&&(t.shift(),e.server_streaming=!0),e.output_type=t.shift(),")"!==t[0])throw new Error("Expected ) but found "+t[0]);if(t.shift(),";"===t[0])return t.shift(),e;if("{"!==t[0])throw new Error("Expected { but found "+t[0]);for(t.shift();t.length;){if("}"===t[0])return t.shift(),";"===t[0]&&t.shift(),e;if("option"!==t[0])throw new Error("Unexpected token in rpc options: "+t[0]);var r=y(t);if(void 0!==e.options[r.name])throw new Error("Duplicate option "+r.name);e.options[r.name]=r.value}throw new Error("No closing tag for rpc")};t.exports=function(t){for(var e=n(t.toString()),r=0;re.extensions.to)throw new Error(e.name+" does not declare "+t.tag+" as an extension number");e.fields.push(t)})})}),s.messages.forEach(function(t){t.fields.forEach(function(e){var r,n,o,a;if(e.options&&"true"===e.options.packed&&-1===i.indexOf(e.type)){if(-1===e.type.indexOf(".")){if(t.enums&&t.enums.some(function(t){return t.name===e.type}))return}else{if((r=e.type.split(".")).length>2)throw new Error("what is this?");if(n=r[0],o=r[1],s.messages.some(function(t){if(t.name===n)return a=t,t}),a&&a.enums&&a.enums.some(function(t){return t.name===o}))return}throw new Error("Fields of type "+e.type+' cannot be declared [packed=true]. Only repeated fields of primitive numeric types (types which use the varint, 32-bit, or 64-bit wire types) can be declared "packed". See https://developers.google.com/protocol-buffers/docs/encoding#optional')}})}),s}},function(t,e){t.exports=function(t){var e,r=function(t){return t.trim()};return t.replace(/([;,{}()=:[\]<>]|\/\*|\*\/)/g," $1 ").split(/\n/).map(r).filter(Boolean).map(function(t){var e=t.indexOf("//");return e>-1?t.slice(0,e):t}).map(r).filter(Boolean).join("\n").split(/\s+|\n+/gm).filter((e=!1,function(t){return"/*"===t?(e=!0,!1):"*/"===t?(e=!1,!1):!e}))}},function(t,e){var r=function(t,e){var r=t.repeated?"repeated":t.required?"required":"optional";"map"===t.type&&(r="map<"+t.map.from+","+t.map.to+">"),t.oneof&&(r="");var n=Object.keys(t.options||{}).map(function(e){return e+" = "+t.options[e]}).join(",");return n&&(n=" ["+n+"]"),e.push((r?r+" ":"")+("map"===t.map?"":t.type+" ")+t.name+" = "+t.tag+n+";"),e},n=function(t,e){e.push("message "+t.name+" {"),t.enums||(t.enums=[]),t.enums.forEach(function(t){e.push(i(t,[]))}),t.messages||(t.messages=[]),t.messages.forEach(function(t){e.push(n(t,[]))});var o={};return t.fields||(t.fields=[]),t.fields.forEach(function(t){t.oneof?(o[t.oneof]||(o[t.oneof]=[]),o[t.oneof].push(r(t,[]))):e.push(r(t,[]))}),Object.keys(o).forEach(function(t){o[t].unshift("oneof "+t+" {"),o[t].push("}"),e.push(o[t])}),e.push("}",""),e},i=function(t,e){e.push("enum "+t.name+" {"),t.options||(t.options={});var r=s(t.options,[]);return r.length>1&&e.push(r.slice(0,-1)),Object.keys(t.values).map(function(r){var n=o(t.values[r]);e.push([r+" = "+n+";"])}),e.push("}",""),e},o=function(t,e){var r=Object.keys(t.options||{}).map(function(e){return e+" = "+t.options[e]}).join(",");return r&&(r=" ["+r+"]"),t.value+r},s=function(t,e){var r=Object.keys(t);return r.forEach(function(r){var n=t[r];~r.indexOf(".")&&(r="("+r+")");var i=typeof n;"object"===i?(n=a(n,[])).length&&e.push("option "+r+" = {",n,"};"):("string"===i&&"optimize_for"!==r&&(n='"'+n+'"'),e.push("option "+r+" = "+n+";"))}),r.length>0&&e.push(""),e},a=function(t,e){return Object.keys(t).forEach(function(r){var n=t[r],i=typeof n;"object"===i?Array.isArray(n)?n.forEach(function(t){(t=a(t,[])).length&&e.push(r+" {",t,"}")}):(n=a(n,[])).length&&e.push(r+" {",n,"}"):("string"===i&&(n='"'+n+'"'),e.push(r+": "+n))}),e},u=function(t,e){var r="rpc "+t.name+"(";t.client_streaming&&(r+="stream "),r+=t.input_type+") returns (",t.server_streaming&&(r+="stream "),r+=t.output_type+")",t.options||(t.options={});var n=s(t.options,[]);return n.length>1?e.push(r+" {",n.slice(0,-1),"}"):e.push(r+";"),e},c=function(t){return function(e){return Array.isArray(e)?e.map(c(t+" ")).join("\n"):t+e}};t.exports=function(t){var e=[];return e.push('syntax = "proto'+t.syntax+'";',""),t.package&&e.push("package "+t.package+";",""),t.options||(t.options={}),s(t.options,e),t.enums||(t.enums=[]),t.enums.forEach(function(t){i(t,e)}),t.messages||(t.messages=[]),t.messages.forEach(function(t){n(t,e)}),t.services&&t.services.forEach(function(t){!function(t,e){e.push("service "+t.name+" {"),t.options||(t.options={}),s(t.options,e),t.methods||(t.methods=[]),t.methods.forEach(function(t){e.push(u(t,[]))}),e.push("}","")}(t,e)}),e.map(c("")).join("\n")}},function(t,e,r){"use strict";var n=r(443),i=r(445),o=r(446),s=r(447),a=r(5);t.exports=function(t,e){var r={},u={},c={},f=function(t,e){t.enums&&t.enums.forEach(function(t){t.id=e+(e?".":"")+t.name,u[t.id]=t,f(t,t.id)}),t.messages&&t.messages.forEach(function(n){n.id=e+(e?".":"")+n.name,r[n.id]=n,n.fields.forEach(function(n){if(n.map){var i="Map_"+n.map.from+"_"+n.map.to,o={name:i,enums:[],messages:[],fields:[{name:"key",type:n.map.from,tag:1,repeated:!1,required:!0},{name:"value",type:n.map.to,tag:2,repeated:!1,required:!1}],extensions:null,id:e+(e?".":"")+i};r[o.id]||(r[o.id]=o,t.messages.push(o)),n.type=i,n.repeated=!0}}),f(n,n.id)})};f(t,"");var l=function(t,e){t.messages.forEach(function(r){e[r.name]=h(r.name,t.id)}),t.enums.forEach(function(t){e[t.name]=function(t){if(!t)return null;var e={};return Object.keys(t).forEach(function(r){e[r]=t[r].value}),e}(t.values)}),e.type=2,e.message=!0,e.name=t.name;var r={};t.fields.forEach(function(t){t.oneof&&(r[t.oneof]||(r[t.oneof]=[]),r[t.oneof].push(t.name))});var n=t.fields.map(function(e){return h(e.type,t.id)}),a=s(t,n,r),u=o(t,h,n,r,a),c=i(t,h,n);return u.bytes=c.bytes=0,e.buffer=!0,e.encode=u,e.decode=c,e.encodingLength=a,e},h=function(t,i,o){if(e&&e[t])return e[t];if(n[t])return n[t];var s,f,h=(i?i+"."+t:t).split(".").map(function(e,r,n){return n.slice(0,r).concat(t).join(".")}).reverse().reduce(function(t,e){return t||r[e]||u[e]},null);if(!1===o)return h;if(!h)throw new Error("Could not resolve "+t);return h.values?(s=h,f=Object.keys(s.values||[]).map(function(t){return parseInt(s.values[t].value,10)}),n.make(0,function t(e,r,n){if(!f.length||-1===f.indexOf(e))throw new Error("Invalid enum value: "+e);return a.encode(e,r,n),t.bytes=a.encode.bytes,r},function t(e,r){var n=a.decode(e,r);if(!f.length||-1===f.indexOf(n))throw new Error("Invalid enum value: "+n);return t.bytes=a.decode.bytes,n},a.encodingLength)):c[h.id]||l(h,c[h.id]={})};return(t.enums||[]).concat((t.messages||[]).map(function(t){return h(t.id)}))}},function(t,e,r){"use strict";var n,i,o,s=r(5),a=r(444),u=r(3).Buffer,c=function(t,e,r,n){return e.bytes=r.bytes=0,{type:t,encode:e,decode:r,encodingLength:n}};e.make=c,e.bytes=(n=function(t){return u.isBuffer(t)?t.length:u.byteLength(t)},c(2,i=function(t,e,r){var o=r,a=n(t);return s.encode(a,e,r),r+=s.encode.bytes,u.isBuffer(t)?t.copy(e,r):e.write(t,r,a),r+=a,i.bytes=r-o,e},o=function(t,e){var r=e,n=s.decode(t,e);e+=s.decode.bytes;var i=t.slice(e,e+n);return e+=i.length,o.bytes=e-r,i},function(t){var e=n(t);return s.encodingLength(e)+e})),e.string=function(){var t=function(e,r,n){var i=n,o=u.byteLength(e);return s.encode(o,r,n,"utf-8"),n+=s.encode.bytes,r.write(e,n,o),n+=o,t.bytes=n-i,r},e=function(t,r){var n=r,i=s.decode(t,r);r+=s.decode.bytes;var o=t.toString("utf-8",r,r+i);return r+=i,e.bytes=r-n,o};return c(2,t,e,function(t){var e=u.byteLength(t);return s.encodingLength(e)+e})}(),e.bool=function(){var t=function(e,r,n){return r[n]=e?1:0,t.bytes=1,r},e=function(t,r){var n=t[r]>0;return e.bytes=1,n};return c(0,t,e,function(t){return 1})}(),e.int32=function(){var t=function(e,r){var n=s.decode(e,r);return t.bytes=s.decode.bytes,n>2147483647?n-4294967296:n};return c(0,s.encode,t,function(t){return s.encodingLength(t<0?t+4294967296:t)})}(),e.int64=function(){var t=function(e,r){var n=s.decode(e,r);if(n>=Math.pow(2,63)){for(var i=9;255===e[r+i-1];)i--;i=i||9;var o=u.allocUnsafe(i);e.copy(o,0,r,r+i),o[i-1]=127&o[i-1],n=-1*s.decode(o,0),t.bytes=10}else t.bytes=s.decode.bytes;return n},e=function(t,r,n){if(t<0){var i=n+9;for(s.encode(-1*t,r,n),r[n+=s.encode.bytes-1]=128|r[n];n=0?2*e:-2*e-1;var o=n.encode(e,r,i);return t.bytes=n.encode.bytes,o},e.decode=function t(e,r){var i=n.decode(e,r);return t.bytes=n.decode.bytes,1&i?(i+1)/-2:i/2},e.encodingLength=function(t){return n.encodingLength(t>=0?2*t:-2*t-1)}},function(t,e,r){"use strict";var n=r(5),i=r(163).defined;var o=function(t,e,r){switch(t){case 0:return n.decode(e,r),r+n.decode.bytes;case 1:return r+8;case 2:var i=n.decode(e,r);return r+n.decode.bytes+i;case 3:case 4:throw new Error("Groups are not supported");case 5:return r+4;default:throw new Error("Unknown wire type: "+t)}},s=function(t,e){if(t.map)return{};if(t.repeated)return[];switch(t.type){case"string":return null!=e?e:"";case"bool":return"true"===e;case"float":case"double":case"sfixed32":case"fixed32":case"varint":case"enum":case"uint64":case"uint32":case"int64":case"int32":case"sint64":case"sint32":return parseInt(e||0,10);default:return null}};t.exports=function(t,e,r){for(var a=[],u={},c=[],f=[],l=0;l-1&&delete r[u[f]];if(t.message){var l=n.decode(i,o);o+=n.decode.bytes;var h=t.decode(i,o,o+l);e.map?(r[a]=r[a]||{},r[a][h.key]=h.value):e.repeated?(r[a]=r[a]||[],r[a].push(h)):r[a]=h}else e.repeated?(r[a]=r[a]||[],r[a].push(t.decode(i,o))):r[a]=t.decode(i,o);return o+=t.decode.bytes}return function e(l,h,p){if(null==h&&(h=0),null==p&&(p=l.length),!(p<=l.length&&h<=l.length))throw new Error("Decoded message is not valid");for(var d,g=h,m={};;){if(p<=h){var v,b,_="",S=0;for(S=0;S-1){w=!0;break}w||(v?d.repeated?m[_]=[]:(b=b&&v[b]?v[b].value:v[Object.keys(v)[0]].value,m[_]=parseInt(b||0,10)):m[_]=s(d,b))}return e.bytes=h-g,m}var C=n.decode(l,h);h+=n.decode.bytes;var A=u[C>>3];if(null!=A){var T=r[A];if((d=t.fields[A]).packed){var B=n.decode(l,h);for(B+=h+=n.decode.bytes;h-1){if(v)throw new Error("only one of the properties defined in oneof "+b+" can be set");v=!0}}for(m=0;mt.name!==r);else{if(!e.isBuffer(r))return n(new Error("second arg needs to be a name or multihash"),null);u=u.filter(t=>!t.multihash.equals(r))}s(a,u,n)}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return{put:(0,n.expose)("ipfs.dht.put",(0,i.pre)(e.pre("dht.put"),function(){var e;return(e=t().dht).put.apply(e,arguments)}),e),get:(0,n.expose)("ipfs.dht.get",(0,i.pre)(e.pre("dht.get"),function(){var e;return(e=t().dht).get.apply(e,arguments)}),e),findprovs:(0,n.expose)("ipfs.dht.findprovs",(0,i.pre)((0,a.preBufferFromJson)(0),e.pre("dht.findprovs"),(0,i.post)(function(){var e;return(e=t().dht).findprovs.apply(e,arguments)},function(t){return t.map(function(t){return(0,s.isPeerInfo)(t)?(0,s.peerInfoToJson)(t):t})})),e),findpeer:(0,n.expose)("ipfs.dht.findpeer",(0,i.pre)((0,s.prePeerIdFromJson)(0),e.pre("dht.findpeer"),(0,i.post)(function(){var e;return(e=t().dht).findpeer.apply(e,arguments)},function(t){return(0,s.isPeerInfo)(t)?(0,s.peerInfoToJson)(t):t})),e),provide:(0,n.expose)("ipfs.dht.provide",(0,i.pre)((0,a.preBufferFromJson)(0),(0,a.preArrayOfBufferFromJson)(0),(0,o.preCidFromJson)(0),(0,o.preArrayOfCidFromJson)(0),e.pre("dht.provide"),(0,i.post)(function(){var e;return(e=t().dht).provide.apply(e,arguments)},function(){return null})),e),query:(0,n.expose)("ipfs.dht.query",(0,i.pre)((0,s.prePeerIdFromJson)(0),e.pre("dht.query"),(0,i.post)(function(){var e;return(e=t().dht).query.apply(e,arguments)},function(t){return t.map(function(t){return(0,s.isPeerInfo)(t)?(0,s.peerInfoToJson)(t):t})})),e)}};var n=r(1),i=r(2),o=r(28),s=r(135),a=r(17)},function(t,e,r){"use strict";const n=r(456),i=r(278).ensureMultiaddr,o=r(532),s=r(20);class a{constructor(t){s(t,"Missing peerId. Use Peer.create(cb) to create one"),this.id=t,this.multiaddrs=new o,this.protocols=new Set,this._connectedMultiaddr=void 0}connect(t){if(t=i(t),!this.multiaddrs.has(t)&&t.toString()!==`/ipfs/${this.id.toB58String()}`)throw new Error("can't be connected to missing multiaddr from set");this._connectedMultiaddr=t}disconnect(){this._connectedMultiaddr=void 0}isConnected(){return this._connectedMultiaddr}}a.create=((t,e)=>{if("function"==typeof t)return e=t,t=null,void n.create((t,r)=>{if(t)return e(t);e(null,new a(r))});"function"==typeof t.toJSON?e(null,new a(t)):n.createFromJSON(t,(t,r)=>e(t,new a(r)))}),a.isPeerInfo=(t=>Boolean("object"==typeof t&&t.id&&t.multiaddrs)),t.exports=a},function(t,e,r){"use strict";(function(n){const i=r(24),o=r(457),s=r(20),a=r(10);class u{constructor(t,e,r){s(n.isBuffer(t),"invalid id provided"),e&&r&&s(e.public.bytes.equals(r.bytes),"inconsistent arguments"),this._id=t,this._idB58String=i.toB58String(this.id),this._privKey=e,this._pubKey=r}get id(){return this._id}set id(t){throw new Error("Id is immutable")}get privKey(){return this._privKey}set privKey(t){this._privKey=t}get pubKey(){return this._pubKey?this._pubKey:this._privKey?this._privKey.public:void 0}set pubKey(t){this._pubKey=t}marshalPubKey(){if(this.pubKey)return o.keys.marshalPublicKey(this.pubKey)}marshalPrivKey(){if(this.privKey)return o.keys.marshalPrivateKey(this.privKey)}toPrint(){return this.toJSON()}toJSON(){return{id:this.toB58String(),privKey:c(this.marshalPrivKey()),pubKey:c(this.marshalPubKey())}}toHexString(){return i.toHexString(this.id)}toBytes(){return this.id}toB58String(){return this._idB58String}isEqual(t){if(n.isBuffer(t))return this.id.equals(t);if(t.id)return this.id.equals(t.id);throw new Error("not valid Id")}isValid(t){this.privKey&&this.privKey.public&&this.privKey.public.bytes&&n.isBuffer(this.pubKey.bytes)&&this.privKey.public.bytes.equals(this.pubKey.bytes)?t():t(new Error("Keys not match"))}}function c(t){if(t)return t.toString("base64")}(e=t.exports=u).create=function(t,e){"function"==typeof t&&(e=t,t={}),(t=t||{}).bits=t.bits||2048,a([e=>o.keys.generateKeyPair("RSA",t.bits,e),(t,e)=>t.public.hash((r,n)=>{e(r,n,t)})],(t,r,n)=>{if(t)return e(t);e(null,new u(r,n))})},e.createFromHexString=function(t){return new u(i.fromHexString(t))},e.createFromBytes=function(t){return new u(t)},e.createFromB58String=function(t){return new u(i.fromB58String(t))},e.createFromPubKey=function(t,e){if("function"!=typeof e)throw new Error("callback is required");let r;try{let i=t;if("string"==typeof i&&(i=n.from(t,"base64")),!n.isBuffer(i))throw new Error("Supplied key is neither a base64 string nor a buffer");r=o.keys.unmarshalPublicKey(i)}catch(t){return e(t)}r.hash((t,n)=>{if(t)return e(t);e(null,new u(n,null,r))})},e.createFromPrivKey=function(t,e){if("function"!=typeof e)throw new Error("callback is required");let r=t;try{if("string"==typeof r&&(r=n.from(t,"base64")),!n.isBuffer(r))throw new Error("Supplied key is neither a base64 string nor a buffer")}catch(t){return e(t)}a([t=>o.keys.unmarshalPrivateKey(r,t),(t,e)=>t.public.hash((r,n)=>{e(r,n,t)})],(t,r,n)=>{if(t)return e(t);e(null,new u(r,n,n.public))})},e.createFromJSON=function(t,e){if("function"!=typeof e)throw new Error("callback is required");let r,s,c,f;try{r=i.fromB58String(t.id),s=t.privKey&&n.from(t.privKey,"base64"),c=t.pubKey&&n.from(t.pubKey,"base64"),f=c&&o.keys.unmarshalPublicKey(c)}catch(t){return e(t)}s?a([t=>o.keys.unmarshalPrivateKey(s,t),(t,e)=>t.public.hash((r,n)=>{e(r,n,t)}),(t,e,r)=>{f?f.hash((n,i)=>{r(n,t,e,i)}):r(null,t,e)}],(t,n,i,o)=>t?e(t):f&&!n.equals(o)?e(new Error("Public and private key do not match")):r&&!n.equals(r)?e(new Error("Id and private key do not match")):void e(null,new u(r,i,f))):e(null,new u(r,null,f))},e.isPeerId=function(t){return Boolean("object"==typeof t&&t._id&&t._idB58String)}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";const n=r(230),i=r(459),o=r(479);(e=t.exports).aes=i,e.hmac=n,e.keys=o,e.randomBytes=r(277),e.pbkdf2=r(528)},function(t,e,r){"use strict";t.exports={SHA1:20,SHA256:32,SHA512:64}},function(t,e,r){"use strict";const n=r(460),i={16:"aes-128-ctr",32:"aes-256-ctr"};e.create=function(t,e,r){const o=i[t.length];if(!o)return r(new Error("Invalid key length"));const s=n.createCipheriv(o,t,e),a=n.createDecipheriv(o,t,e);r(null,{encrypt(t,e){e(null,s.update(t))},decrypt(t,e){e(null,a.update(t))}})}},function(t,e,r){"use strict";const n=r(78);t.exports={createCipheriv:n.createCipheriv,createDecipheriv:n.createDecipheriv}},function(t,e,r){var n=r(231),i=r(235),o=r(3).Buffer,s=r(240),a=r(79),u=r(136),c=r(241);function f(t,e,r){a.call(this),this._cache=new h,this._cipher=new u.AES(e),this._prev=o.from(r),this._mode=t,this._autopadding=!0}r(4)(f,a),f.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return o.concat(n)};var l=o.alloc(16,16);function h(){this.cache=o.allocUnsafe(0)}function p(t,e,r){var a=n[t.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=o.from(e)),e.length!==a.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===a.type?new s(a.module,e,r):"auth"===a.type?new i(a.module,e,r):new f(a.module,e,r)}f.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(l))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},h.prototype.add=function(t){this.cache=o.concat([this.cache,t])},h.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},h.prototype.flush=function(){for(var t=16-this.cache.length,e=o.allocUnsafe(t),r=-1;++r>s%8,t._prev=o(t._prev,r?n:i);return a}function o(t,e){var r=t.length,i=-1,o=n.allocUnsafe(t.length);for(t=n.concat([t,n.from([e])]);++i>7;return o}e.encrypt=function(t,e,r){for(var o=e.length,s=n.allocUnsafe(o),a=-1;++a0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var e,r,i,o=n.allocUnsafe(t>>>0),s=this.head,a=0;s;)e=s.data,r=o,i=a,e.copy(r,i),a+=s.data.length,s=s.next;return o},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,r){(function(e){function r(t){try{if(!e.localStorage)return!1}catch(t){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(t,e){if(r("noDeprecation"))return t;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}}).call(this,r(12))},function(t,e,r){"use strict";t.exports=o;var n=r(239),i=r(108);function o(t){if(!(this instanceof o))return new o(t);n.call(this,t)}i.inherits=r(22),i.inherits(o,n),o.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(167)},function(t,e,r){t.exports=r(80)},function(t,e,r){t.exports=r(166).Transform},function(t,e,r){t.exports=r(166).PassThrough},function(t,e,r){var n=r(3).Buffer,i=n.alloc(16,0);function o(t){var e=n.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function s(t){this.h=t,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}s.prototype.ghash=function(t){for(var e=-1;++e0;e--)n[e]=n[e]>>>1|(1&n[e-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},s.prototype.update=function(t){var e;for(this.cache=n.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},s.prototype.final=function(t,e){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,t,0,e])),this.state},t.exports=s},function(t,e,r){var n=r(235),i=r(3).Buffer,o=r(231),s=r(240),a=r(79),u=r(136),c=r(241);function f(t,e,r){a.call(this),this._cache=new l,this._last=void 0,this._cipher=new u.AES(e),this._prev=i.from(r),this._mode=t,this._autopadding=!0}function l(){this.cache=i.allocUnsafe(0)}function h(t,e,r){var a=o[t.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof e&&(e=i.from(e)),e.length!==a.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===a.type?new s(a.module,e,r,!0):"auth"===a.type?new n(a.module,e,r,!0):new f(a.module,e,r)}r(4)(f,a),f.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),n.push(r);return i.concat(n)},f.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");var r=-1;for(;++r16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},l.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var r=o[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=c(e,!1,r.key,r.iv);return h(t,n.key,n.iv)},e.createDecipheriv=h},function(t,e,r){"use strict";(function(n){const i=r(19)(r(169)),o=r(25);e=t.exports;const s={rsa:r(489),ed25519:r(504),secp256k1:r(84)(i,r(277))};function a(t){return void 0!==s[t.toLowerCase()]}e.supportedKeys=s,e.keysPBM=i,e.keyStretcher=r(525),e.generateEphemeralKeyPair=r(526),e.generateKeyPair=((t,e,r)=>{let n=s[t.toLowerCase()];if(!n)return r(new Error("invalid or unsupported key type"));n.generateKeyPair(e,r)}),e.generateKeyPairFromSeed=((t,e,r,n)=>{let i=s[t.toLowerCase()];return i?"ed25519"!==t.toLowerCase()?n(new Error("Seed key derivation is unimplemented for RSA or secp256k1")):void i.generateKeyPairFromSeed(e,r,n):n(new Error("invalid or unsupported key type"))}),e.unmarshalPublicKey=(t=>{const e=i.PublicKey.decode(t),r=e.Data;switch(e.Type){case i.KeyType.RSA:return s.rsa.unmarshalRsaPublicKey(r);case i.KeyType.Ed25519:return s.ed25519.unmarshalEd25519PublicKey(r);case i.KeyType.Secp256k1:if(s.secp256k1)return s.secp256k1.unmarshalSecp256k1PublicKey(r);throw new Error("secp256k1 support requires libp2p-crypto-secp256k1 package");default:throw new Error("invalid or unsupported key type")}}),e.marshalPublicKey=((t,e)=>{if(!a(e=(e||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type");return t.bytes}),e.unmarshalPrivateKey=((t,e)=>{let r;try{r=i.PrivateKey.decode(t)}catch(t){return e(t)}const n=r.Data;switch(r.Type){case i.KeyType.RSA:return s.rsa.unmarshalRsaPrivateKey(n,e);case i.KeyType.Ed25519:return s.ed25519.unmarshalEd25519PrivateKey(n,e);case i.KeyType.Secp256k1:return s.secp256k1?s.secp256k1.unmarshalSecp256k1PrivateKey(n,e):e(new Error("secp256k1 support requires libp2p-crypto-secp256k1 package"));default:e(new Error("invalid or unsupported key type"))}}),e.marshalPrivateKey=((t,e)=>{if(!a(e=(e||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type");return t.bytes}),e.import=((t,e,r)=>{try{const i=o.pki.decryptRsaPrivateKey(t,e);if(null===i)throw new Error("Cannot read the key, most likely the password is wrong or not a RSA key");let a=o.asn1.toDer(o.pki.privateKeyToAsn1(i));return a=n.from(a.getBytes(),"binary"),s.rsa.unmarshalRsaPrivateKey(a,r)}catch(t){r(t)}})}).call(this,r(0).Buffer)},function(t,e,r){(function(e){var r={};t.exports=r;var n={};r.encode=function(t,e,r){if("string"!=typeof e)throw new TypeError('"alphabet" must be a string.');if(void 0!==r&&"number"!=typeof r)throw new TypeError('"maxline" must be a number.');var n="";if(t instanceof Uint8Array){var i=0,o=e.length,s=e.charAt(0),a=[0];for(i=0;i0;)a.push(c%o),c=c/o|0}for(i=0;0===t[i]&&i=0;--i)n+=e[a[i]]}else n=function(t,e){var r=0,n=e.length,i=e.charAt(0),o=[0];for(r=0;r0;)o.push(a%n),a=a/n|0}var u="";for(r=0;0===t.at(r)&&r=0;--r)u+=e[o[r]];return u}(t,e);if(r){var f=new RegExp(".{1,"+r+"}","g");n=n.match(f).join("\r\n")}return n},r.decode=function(t,r){if("string"!=typeof t)throw new TypeError('"input" must be a string.');if("string"!=typeof r)throw new TypeError('"alphabet" must be a string.');var i=n[r];if(!i){i=n[r]=[];for(var o=0;o>=8;for(;l>0;)u.push(255&l),l>>=8}for(var h=0;t[h]===a&&h=i.Versions.TLS_1_1.minor&&u.output.putBytes(r),u.update(t.fragment),u.finish(a)&&(t.fragment=u.output,t.length=t.fragment.length(),o=!0),o}function a(t,e,r){if(!r){var n=t-e.length()%t;e.fillWithByte(n-1,n)}return!0}function u(t,e,r){var n=!0;if(r){for(var i=e.length(),o=e.last(),s=i-1-o;s=a?(t.fragment=s.output.getBytes(f-a),c=s.output.getBytes(a)):t.fragment=s.output.getBytes(),t.fragment=n.util.createBuffer(t.fragment),t.length=t.fragment.length();var l=e.macFunction(e.macKey,e.sequenceNumber,t);return e.updateSequenceNumber(),o=function(t,e,r){var i=n.hmac.create();return i.start("SHA1",t),i.update(e),e=i.digest().getBytes(),i.start(null,null),i.update(r),r=i.digest().getBytes(),e===r}(e.macKey,c,l)&&o}},function(t,e,r){var n=r(8);r(255),t.exports=n.mgf=n.mgf||{},n.mgf.mgf1=n.mgf1},function(t,e,r){(function(e){var n=r(8);if(r(140),r(43),r(257),r(13),void 0===i)var i=n.jsbn.BigInteger;var o=n.util.ByteBuffer,s=void 0===e?Uint8Array:e;n.pki=n.pki||{},t.exports=n.pki.ed25519=n.ed25519=n.ed25519||{};var a=n.ed25519;function u(t){var r=t.message;if(r instanceof Uint8Array)return r;var n=t.encoding;if(void 0===r){if(!t.md)throw new TypeError('"options.message" or "options.md" not specified.');r=t.md.digest().getBytes(),n="binary"}if("string"==typeof r&&!n)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if("string"==typeof r){if(void 0!==e)return new e(r,n);r=new o(r,n)}else if(!(r instanceof o))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var i=new s(r.length()),a=0;a=0;--r)L(n,n),1!==r&&D(n,n,e);for(r=0;r<16;++r)t[r]=n[r]}(r,r),D(r,r,i),D(r,r,o),D(r,r,o),D(t[0],r,o),L(n,t[0]),D(n,n,o),k(n,i)&&D(t[0],t[0],g);if(L(n,t[0]),D(n,n,o),k(n,i))return-1;A(t[0])===e[31]>>7&&P(t[0],c,t[0]);return D(t[3],t[0],t[1]),0}(u,n))return-1;for(i=0;i=0};var c=R(),f=R([1]),l=R([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),h=R([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),p=R([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),d=R([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),y=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),g=R([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function m(t,r){var i=n.md.sha512.create(),u=new o(t);i.update(u.getBytes(r),"binary");var c=i.digest().getBytes();if(void 0!==e)return new e(c,"binary");for(var f=new s(a.constants.HASH_BYTE_LENGTH),l=0;l<64;++l)f[l]=c.charCodeAt(l);return f}function v(t,e){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i>8,e[i]-=256*r;e[i]+=r,e[n]=0}for(r=0,i=0;i<32;++i)e[i]+=r-(e[31]>>4)*y[i],r=e[i]>>8,e[i]&=255;for(i=0;i<32;++i)e[i]-=r*y[i];for(n=0;n<32;++n)e[n+1]+=e[n]>>8,t[n]=255&e[n]}function b(t){for(var e=new Float64Array(64),r=0;r<64;++r)e[r]=t[r],t[r]=0;v(t,e)}function _(t,e){var r=R(),n=R(),i=R(),o=R(),s=R(),a=R(),u=R(),c=R(),f=R();P(r,t[1],t[0]),P(f,e[1],e[0]),D(r,r,f),N(n,t[0],t[1]),N(f,e[0],e[1]),D(n,n,f),D(i,t[3],e[3]),D(i,i,h),D(o,t[2],e[2]),N(o,o,o),P(s,n,r),P(a,o,i),N(u,o,i),N(c,n,r),D(t[0],s,a),D(t[1],c,u),D(t[2],u,a),D(t[3],s,c)}function S(t,e,r){for(var n=0;n<4;++n)x(t[n],e[n],r)}function w(t,e){var r=R(),n=R(),i=R();!function(t,e){var r,n=R();for(r=0;r<16;++r)n[r]=e[r];for(r=253;r>=0;--r)L(n,n),2!==r&&4!==r&&D(n,n,e);for(r=0;r<16;++r)t[r]=n[r]}(i,e[2]),D(r,e[0],i),D(n,e[1],i),E(t,n),t[31]^=A(r)<<7}function E(t,e){var r,n,i,o=R(),s=R();for(r=0;r<16;++r)s[r]=e[r];for(M(s),M(s),M(s),n=0;n<2;++n){for(o[0]=s[0]-65517,r=1;r<15;++r)o[r]=s[r]-65535-(o[r-1]>>16&1),o[r-1]&=65535;o[15]=s[15]-32767-(o[14]>>16&1),i=o[15]>>16&1,o[14]&=65535,x(s,o,1-i)}for(r=0;r<16;r++)t[2*r]=255&s[r],t[2*r+1]=s[r]>>8}function k(t,e){var r=new s(32),n=new s(32);return E(r,t),E(n,e),C(r,0,n,0)}function C(t,e,r,n){return function(t,e,r,n,i){var o,s=0;for(o=0;o>>8)-1}(t,e,r,n,32)}function A(t){var e=new s(32);return E(e,t),1&e[0]}function T(t,e,r){var n,i;for(I(t[0],c),I(t[1],f),I(t[2],f),I(t[3],c),i=255;i>=0;--i)S(t,e,n=r[i/8|0]>>(7&i)&1),_(e,t),_(t,t),S(t,e,n)}function B(t,e){var r=[R(),R(),R(),R()];I(r[0],p),I(r[1],d),I(r[2],f),D(r[3],p,d),T(t,r,e)}function I(t,e){var r;for(r=0;r<16;r++)t[r]=0|e[r]}function M(t){var e,r,n=1;for(e=0;e<16;++e)r=t[e]+n+65535,n=Math.floor(r/65536),t[e]=r-65536*n;t[0]+=n-1+37*(n-1)}function x(t,e,r){for(var n,i=~(r-1),o=0;o<16;++o)n=i&(t[o]^e[o]),t[o]^=n,e[o]^=n}function R(t){var e,r=new Float64Array(16);if(t)for(e=0;e0&&(s=n.util.fillString(String.fromCharCode(0),u)+s),{encapsulation:e.encrypt(s,"NONE"),key:t.generate(s,o)}},decrypt:function(e,r,n){var i=e.decrypt(r,"NONE");return t.generate(i,n)}};return o},n.kem.kdf1=function(t,e){o(this,t,0,e||t.digestLength)},n.kem.kdf2=function(t,e){o(this,t,1,e||t.digestLength)}},function(t,e,r){t.exports=r(60),r(171),r(110),r(248),r(257)},function(t,e,r){var n=r(8);r(81),r(59),r(138),r(82),r(93),r(254),r(43),r(13),r(173);var i=n.asn1,o=t.exports=n.pkcs7=n.pkcs7||{};function s(t){var e={},r=[];if(!i.validate(t,o.asn1.recipientInfoValidator,e,r)){var s=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw s.errors=r,s}return{version:e.version.charCodeAt(0),issuer:n.pki.RDNAttributesAsArray(e.issuer),serialNumber:n.util.createBuffer(e.serial).toHex(),encryptedContent:{algorithm:i.derToOid(e.encAlgorithm),parameter:e.encParameter.value,content:e.encKey}}}function a(t){for(var e,r=[],o=0;o0){for(var r=i.create(i.Class.CONTEXT_SPECIFIC,1,!0,[]),o=0;o=r&&s0&&s.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,e)),o.length>0&&s.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,o)),s.value[0].value.push(i.create(i.Class.UNIVERSAL,i.Type.SET,!0,t.signerInfos)),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.type).getBytes()),s])},addSigner:function(e){var r=e.issuer,i=e.serialNumber;if(e.certificate){var o=e.certificate;"string"==typeof o&&(o=n.pki.certificateFromPem(o)),r=o.issuer.attributes,i=o.serialNumber}var s=e.key;if(!s)throw new Error("Could not add PKCS#7 signer; no private key specified.");"string"==typeof s&&(s=n.pki.privateKeyFromPem(s));var a=e.digestAlgorithm||n.pki.oids.sha1;switch(a){case n.pki.oids.sha1:case n.pki.oids.sha256:case n.pki.oids.sha384:case n.pki.oids.sha512:case n.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+a)}var u=e.authenticatedAttributes||[];if(u.length>0){for(var c=!1,f=!1,l=0;l="8"&&(r="00"+r);var i=n.util.hexToBytes(r);t.putInt32(i.length),t.putBytes(i)}function s(t,e){t.putInt32(e.length),t.putString(e)}function a(){for(var t=n.md.sha1.create(),e=arguments.length,r=0;r0&&(this.state=d[this.state].block)},y.prototype.unblock=function(t){return t=void 0===t?1:t,this.blocks-=t,0===this.blocks&&this.state!==h&&(this.state=c,g(this,0)),this.blocks},y.prototype.sleep=function(t){t=void 0===t?0:t,this.state=d[this.state].sleep;var e=this;this.timeoutId=setTimeout(function(){e.timeoutId=null,e.state=c,g(e,0)},t)},y.prototype.wait=function(t){t.wait(this)},y.prototype.wakeup=function(){this.state===l&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state=c,g(this,0))},y.prototype.cancel=function(){this.state=d[this.state].cancel,this.permitsNeeded=0,null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null),this.subtasks=[]},y.prototype.fail=function(t){if(this.error=!0,m(this,!0),t)t.error=this.error,t.swapTime=this.swapTime,t.userData=this.userData,g(t,0);else{if(null!==this.parent){for(var e=this.parent;null!==e.parent;)e.error=this.error,e.swapTime=this.swapTime,e.userData=this.userData,e=e.parent;m(e,!0)}this.failureCallback&&this.failureCallback(this)}};var g=function(t,e){var r=e>30||+new Date-t.swapTime>20,n=function(e){if(e++,t.state===c)if(r&&(t.swapTime=+new Date),t.subtasks.length>0){var n=t.subtasks.shift();n.error=t.error,n.swapTime=t.swapTime,n.userData=t.userData,n.run(n),n.error||g(n,e)}else m(t),t.error||null!==t.parent&&(t.parent.error=t.error,t.parent.swapTime=t.swapTime,t.parent.userData=t.userData,g(t.parent,e))};r?setTimeout(n,0):n(e)},m=function(t,e){t.state=h,delete o[t.id],null===t.parent&&(t.type in a?0===a[t.type].length?n.log.error(i,"[%s][%s] task queue empty [%s]",t.id,t.name,t.type):a[t.type][0]!==t?n.log.error(i,"[%s][%s] task not first in queue [%s]",t.id,t.name,t.type):(a[t.type].shift(),0===a[t.type].length?delete a[t.type]:a[t.type][0].start()):n.log.error(i,"[%s][%s] task queue missing [%s]",t.id,t.name,t.type),e||(t.error&&t.failureCallback?t.failureCallback(t):!t.error&&t.successCallback&&t.successCallback(t)))};t.exports=n.task=n.task||{},n.task.start=function(t){var e=new y({run:t.run,name:t.name||"?"});e.type=t.type,e.successCallback=t.success||null,e.failureCallback=t.failure||null,e.type in a?a[t.type].push(e):(a[e.type]=[e],function(t){t.error=!1,t.state=d[t.state].start,setTimeout(function(){t.state===c&&(t.swapTime=+new Date,t.run(t),g(t,0))},0)}(e))},n.task.cancel=function(t){t in a&&(a[t]=[a[t][0]])},n.task.createCondition=function(){var t={tasks:{},wait:function(e){e.id in t.tasks||(e.block(),t.tasks[e.id]=e)},notify:function(){var e=t.tasks;for(var r in t.tasks={},e)e[r].unblock()}};return t}},function(t,e,r){"use strict";const n=r(259),i=r(19),o=r(9),s=r(261),a=i(r(169)),u=r(25),c=r(7);class f{constructor(t){this._key=t}verify(t,e,r){h(r),s.hashAndVerify(this._key,e,t,r)}marshal(){return s.utils.jwkToPkix(this._key)}get bytes(){return a.PublicKey.encode({Type:a.KeyType.RSA,Data:this.marshal()})}encrypt(t){return this._key.encrypt(t,"RSAES-PKCS1-V1_5")}equals(t){return this.bytes.equals(t.bytes)}hash(t){h(t),n(this.bytes,"sha2-256",t)}}class l{constructor(t,e){this._key=t,this._publicKey=e}genSecret(){return s.getRandomValues(new Uint8Array(16))}sign(t,e){h(e),s.hashAndSign(this._key,t,e)}get public(){if(!this._publicKey)throw new Error("public key not provided");return new f(this._publicKey)}decrypt(t,e){s.decrypt(this._key,t,e)}marshal(){return s.utils.jwkToPkcs1(this._key)}get bytes(){return a.PrivateKey.encode({Type:a.KeyType.RSA,Data:this.marshal()})}equals(t){return this.bytes.equals(t.bytes)}hash(t){h(t),n(this.bytes,"sha2-256",t)}id(t){this.public.hash((e,r)=>{if(e)return t(e);t(null,o.encode(r))})}export(t,e,r){"function"==typeof e&&(r=e,e=t,t="pkcs-8"),h(r),c(()=>{let n=null,i=null;try{const r=new u.util.ByteBuffer(this.marshal()),o=u.asn1.fromDer(r),s=u.pki.privateKeyFromAsn1(o);if("pkcs-8"===t){const t={algorithm:"aes256",count:1e4,saltSize:16,prfAlgorithm:"sha512"};i=u.pki.encryptRsaPrivateKey(s,e,t)}else n=new Error(`Unknown export format '${t}'`)}catch(t){n=t}r(n,i)})}}function h(t){if("function"!=typeof t)throw new Error("callback is required")}t.exports={RsaPublicKey:f,RsaPrivateKey:l,unmarshalRsaPublicKey:function(t){const e=s.utils.pkixToJwk(t);return new f(e)},unmarshalRsaPrivateKey:function(t,e){const r=s.utils.pkcs1ToJwk(t);s.unmarshalPrivateKey(r,(t,r)=>{if(t)return e(t);e(null,new l(r.privateKey,r.publicKey))})},generateKeyPair:function(t,e){s.generateKey(t,(t,r)=>{if(t)return e(t);e(null,new l(r.privateKey,r.publicKey))})},fromJwk:function(t,e){s.unmarshalPrivateKey(t,(t,r)=>{if(t)return e(t);e(null,new l(r.privateKey,r.publicKey))})}}},function(t,e,r){"use strict";(function(e){const n=r(55),i=r(56),o=r(260),s=r(491),a=o.toCallback,u=o.toBuf,c=o.fromString,f=o.fromNumberTo32BitBuf;t.exports={sha1:s.sha1,sha2256:s.sha2256,sha2512:s.sha2512,sha3512:a(u(n.sha3_512)),sha3384:a(u(n.sha3_384)),sha3256:a(u(n.sha3_256)),sha3224:a(u(n.sha3_224)),shake128:a(u(n.shake_128,256)),shake256:a(u(n.shake_256,512)),keccak224:a(u(n.keccak_224)),keccak256:a(u(n.keccak_256)),keccak384:a(u(n.keccak_384)),keccak512:a(u(n.keccak_512)),murmur3128:a(u(c(i.x64.hash128))),murmur332:a(f(c(i.x86.hash32))),addBlake:r(492),dblSha2256:(t,r)=>{s.sha2256(t,(t,n)=>{t&&r(t),s.sha2256(e.from(n),r)})}}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e){const n=r(57),i=function(){if(self.crypto)return self.crypto.subtle||self.crypto.webkitSubtle;if(self.msCrypto)return self.msCrypto.subtle}();function o(t){if(!i)throw new Error("Please use a browser with webcrypto support");return(r,o)=>{const s=i.digest({name:t},r);if("function"!=typeof s.then)return s.onerror=(()=>{o(new Error(`hashing data using ${t}`))}),void(s.oncomplete=(t=>{o(null,t.target.result)}));n(s.then(t=>e.from(new Uint8Array(t))),o)}}t.exports={sha1:function(t,e){o("SHA-1")(t,e)},sha2256:function(t,e){o("SHA-256")(t,e)},sha2512:function(t,e){o("SHA-512")(t,e)}}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e){const n=r(58),i=r(260).toCallback,o={init:n.blake2bInit,update:n.blake2bUpdate,digest:n.blake2bFinal},s={init:n.blake2sInit,update:n.blake2sUpdate,digest:n.blake2sFinal},a=(t,r)=>i(n=>{const i=r.init(t,null);return r.update(i,n),e.from(r.digest(i))});t.exports=(t=>{for(let e=0;e<64;e++)t[45569+e]=a(e+1,o);for(let e=0;e<32;e++)t[45633+e]=a(e+1,s)})}).call(this,r(0).Buffer)},function(t,e,r){"use strict";const n=r(21),i=r(266),o=i.toBase64,s=i.toBn,a=n.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}),u=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid({"1.2.840.113549.1.1.1":"rsa"}),this.key("none").optional().null_(),this.key("curve").optional().objid(),this.key("params").optional().seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()))}),c=n.define("RSAPublicKey",function(){this.seq().obj(this.key("algorithm").use(u),this.key("subjectPublicKey").bitstr())}),f=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});e.pkcs1ToJwk=function(t){const e=a.decode(t,"der");return{kty:"RSA",n:o(e.modulus),e:o(e.publicExponent),d:o(e.privateExponent),p:o(e.prime1),q:o(e.prime2),dp:o(e.exponent1),dq:o(e.exponent2),qi:o(e.coefficient),alg:"RS256",kid:"2011-04-29"}},e.jwkToPkcs1=function(t){return a.encode({version:0,modulus:s(t.n),publicExponent:s(t.e),privateExponent:s(t.d),prime1:s(t.p),prime2:s(t.q),exponent1:s(t.dp),exponent2:s(t.dq),coefficient:s(t.qi)},"der")},e.pkixToJwk=function(t){const e=c.decode(t,"der"),r=f.decode(e.subjectPublicKey.data,"der");return{kty:"RSA",n:o(r.modulus),e:o(r.publicExponent),alg:"RS256",kid:"2011-04-29"}},e.jwkToPkix=function(t){return c.encode({algorithm:{algorithm:"rsa",none:null},subjectPublicKey:{data:f.encode({modulus:s(t.n),publicExponent:s(t.e)},"der")}},"der")}},function(t,e){},function(t,e,r){"use strict";const n=r(21),i=r(4);function o(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}e.define=function(t,e){return new o(t,e)},o.prototype._createNamed=function(t){let e;try{e=r(320).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(t){e=function(t){this._initNamed(t)}}return i(e,t),e.prototype._initNamed=function(e){t.call(this,e)},new e(this)},o.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(n.decoders[t])),this.decoders[t]},o.prototype.decode=function(t,e,r){return this._getDecoder(e).decode(t,r)},o.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(n.encoders[t])),this.encoders[t]},o.prototype.encode=function(t,e,r){return this._getEncoder(e).encode(t,r)}},function(t,e){var r=[].indexOf;t.exports=function(t,e){if(r)return t.indexOf(e);for(var n=0;n{if(e)return t(e);t(null,o.encode(r))})}}function f(t){if("function"!=typeof t)throw new Error("callback is required")}function l(t,r){if(e.isBuffer(t)&&(t=new Uint8Array(t)),!(t instanceof Uint8Array)||t.length!==r)throw new Error("Key must be a Uint8Array or Buffer of length "+r);return t}t.exports={Ed25519PublicKey:u,Ed25519PrivateKey:c,unmarshalEd25519PrivateKey:function(t,e){try{t=l(t,s.privateKeyLength+s.publicKeyLength)}catch(t){return e(t)}const r=t.slice(0,s.privateKeyLength),n=t.slice(s.privateKeyLength,t.length);e(null,new c(r,n))},unmarshalEd25519PublicKey:function(t){return t=l(t,s.publicKeyLength),new u(t)},generateKeyPair:function(t,e){void 0===e&&"function"==typeof t&&(e=t),s.generateKey((t,r)=>{if(t)return e(t);let n;try{n=new c(r.secretKey,r.publicKey)}catch(t){return void e(t)}e(null,n)})},generateKeyPairFromSeed:function(t,e,r){void 0===r&&"function"==typeof e&&(r=e),s.generateKeyFromSeed(t,(t,e)=>{if(t)return r(t);let n;try{n=new c(e.secretKey,e.publicKey)}catch(t){return void r(t)}r(null,n)})}}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){const n=r(83),i=r(7);e.publicKeyLength=n.sign.publicKeyLength,e.privateKeyLength=n.sign.secretKeyLength,e.generateKey=function(t){i(()=>{let e;try{e=n.sign.keyPair()}catch(e){return t(e)}t(null,e)})},e.generateKeyFromSeed=function(t,e){i(()=>{let r;try{r=n.sign.keyPair.fromSeed(t)}catch(t){return e(t)}e(null,r)})},e.hashAndSign=function(e,r,o){i(()=>{o(null,t.from(n.sign.detached(r,e)))})},e.hashAndVerify=function(t,e,r,o){i(()=>{let i;try{i=n.sign.detached.verify(r,e,t)}catch(t){return o(t)}o(null,i)})}}).call(this,r(0).Buffer)},function(t,e){},function(t,e,r){"use strict";(function(e){const n=r(55),i=r(56),o=r(268),s=r(508),a=o.toCallback,u=o.toBuf,c=o.fromString,f=o.fromNumberTo32BitBuf;t.exports={sha1:s.sha1,sha2256:s.sha2256,sha2512:s.sha2512,sha3512:a(u(n.sha3_512)),sha3384:a(u(n.sha3_384)),sha3256:a(u(n.sha3_256)),sha3224:a(u(n.sha3_224)),shake128:a(u(n.shake_128,256)),shake256:a(u(n.shake_256,512)),keccak224:a(u(n.keccak_224)),keccak256:a(u(n.keccak_256)),keccak384:a(u(n.keccak_384)),keccak512:a(u(n.keccak_512)),murmur3128:a(u(c(i.x64.hash128))),murmur332:a(f(c(i.x86.hash32))),addBlake:r(509),dblSha2256:(t,r)=>{s.sha2256(t,(t,n)=>{t&&r(t),s.sha2256(e.from(n),r)})}}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e){const n=r(57),i=function(){if(self.crypto)return self.crypto.subtle||self.crypto.webkitSubtle;if(self.msCrypto)return self.msCrypto.subtle}();function o(t){if(!i)throw new Error("Please use a browser with webcrypto support");return(r,o)=>{const s=i.digest({name:t},r);if("function"!=typeof s.then)return s.onerror=(()=>{o(new Error(`hashing data using ${t}`))}),void(s.oncomplete=(t=>{o(null,t.target.result)}));n(s.then(t=>e.from(new Uint8Array(t))),o)}}t.exports={sha1:function(t,e){o("SHA-1")(t,e)},sha2256:function(t,e){o("SHA-256")(t,e)},sha2512:function(t,e){o("SHA-512")(t,e)}}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e){const n=r(58),i=r(268).toCallback,o={init:n.blake2bInit,update:n.blake2bUpdate,digest:n.blake2bFinal},s={init:n.blake2sInit,update:n.blake2sUpdate,digest:n.blake2sFinal},a=(t,r)=>i(n=>{const i=r.init(t,null);return r.update(i,n),e.from(r.digest(i))});t.exports=(t=>{for(let e=0;e<64;e++)t[45569+e]=a(e+1,o);for(let e=0;e<32;e++)t[45633+e]=a(e+1,s)})}).call(this,r(0).Buffer)},function(t,e,r){"use strict";const n=r(511),i=r(267),o=r(7),s="sha2-256";t.exports=(t=>{function e(t){if(!n.privateKeyVerify(t))throw new Error("Invalid private key")}return{generateKey:function(e){let r;do{r=t(32)}while(!n.privateKeyVerify(r));((t,r)=>o(()=>e(t,r)))(null,r)},privateKeyLength:32,hashAndSign:function(t,e,r){const a=(t,e)=>o(()=>r(t,e));i.digest(e,s,(e,r)=>{if(e)return a(e);try{const i=n.sign(r,t),o=n.signatureExport(i.signature);return a(null,o)}catch(e){a(e)}})},hashAndVerify:function(t,e,r,a){const u=(t,e)=>o(()=>a(t,e));i.digest(r,s,(r,i)=>{if(r)return u(r);try{e=n.signatureImport(e);const o=n.verify(i,e,t);return u(null,o)}catch(r){u(r)}})},compressPublicKey:function(t){if(!n.publicKeyVerify(t))throw new Error("Invalid public key");return n.publicKeyConvert(t,!0)},decompressPublicKey:function(t){return n.publicKeyConvert(t,!1)},validatePrivateKey:e,validatePublicKey:function(t){if(!n.publicKeyVerify(t))throw new Error("Invalid public key")},computePublicKey:function(t){return e(t),n.publicKeyCreate(t)}}})},function(t,e,r){"use strict";t.exports=r(321)(r(514))},function(t,e,r){"use strict";(function(t){var r=Object.prototype.toString;e.isArray=function(t,e){if(!Array.isArray(t))throw TypeError(e)},e.isBoolean=function(t,e){if("[object Boolean]"!==r.call(t))throw TypeError(e)},e.isBuffer=function(e,r){if(!t.isBuffer(e))throw TypeError(r)},e.isFunction=function(t,e){if("[object Function]"!==r.call(t))throw TypeError(e)},e.isNumber=function(t,e){if("[object Number]"!==r.call(t))throw TypeError(e)},e.isObject=function(t,e){if("[object Object]"!==r.call(t))throw TypeError(e)},e.isBufferLength=function(t,e,r){if(t.length!==e)throw RangeError(r)},e.isBufferLength2=function(t,e,r,n){if(t.length!==e&&t.length!==r)throw RangeError(n)},e.isLengthGTZero=function(t,e){if(0===t.length)throw RangeError(e)},e.isNumberInInterval=function(t,e,r,n){if(t<=e||t>=r)throw RangeError(n)}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";var n=r(3).Buffer,i=r(269),o=n.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),s=n.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);e.privateKeyExport=function(t,e,r){var i=n.from(r?o:s);return t.copy(i,r?8:9),e.copy(i,r?181:214),i},e.privateKeyImport=function(t){var e=t.length,r=0;if(!(e2||e1?t[r+n-2]<<8:0);if(!(e<(r+=n)+i||e32||e1&&0===e[o]&&!(128&e[o+1]);--r,++o);for(var s=n.concat([n.from([0]),t.s]),a=33,u=0;a>1&&0===s[u]&&!(128&s[u+1]);--a,++u);return i.encode(e.slice(o),s.slice(u))},e.signatureImport=function(t){var e=n.alloc(32,0),r=n.alloc(32,0);try{var o=i.decode(t);if(33===o.r.length&&0===o.r[0]&&(o.r=o.r.slice(1)),o.r.length>32)throw new Error("R length is too long");if(33===o.s.length&&0===o.s[0]&&(o.s=o.s.slice(1)),o.s.length>32)throw new Error("S length is too long")}catch(t){return}return o.r.copy(e,32-o.r.length),o.s.copy(r,32-o.s.length),{r:e,s:r}},e.signatureImportLax=function(t){var e=n.alloc(32,0),r=n.alloc(32,0),i=t.length,o=0;if(48===t[o++]){var s=t[o++];if(!(128&s&&(o+=s-128)>i)&&2===t[o++]){var a=t[o++];if(128&a){if(o+(s=a-128)>i)return;for(;s>0&&0===t[o];o+=1,s-=1);for(a=0;s>0;o+=1,s-=1)a=(a<<8)+t[o]}if(!(a>i-o)){var u=o;if(o+=a,2===t[o++]){var c=t[o++];if(128&c){if(o+(s=c-128)>i)return;for(;s>0&&0===t[o];o+=1,s-=1);for(c=0;s>0;o+=1,s-=1)c=(c<<8)+t[o]}if(!(c>i-o)){var f=o;for(o+=c;a>0&&0===t[u];a-=1,u+=1);if(!(a>32)){var l=t.slice(u,u+a);for(l.copy(e,32-l.length);c>0&&0===t[f];c-=1,f+=1);if(!(c>32)){var h=t.slice(f,f+c);return h.copy(r,32-h.length),{r:e,s:r}}}}}}}}}},function(t,e,r){"use strict";var n=r(3).Buffer,i=r(150),o=r(519),s=r(193),a=r(141),u=r(275),c=r(524);e.privateKeyVerify=function(t){var e=a.fromBuffer(t);return!(e.isOverflow()||e.isZero())},e.privateKeyExport=function(t,e){var r=a.fromBuffer(t);if(r.isOverflow()||r.isZero())throw new Error(s.EC_PRIVATE_KEY_EXPORT_DER_FAIL);return c.mul(r).toPublicKey(e)},e.privateKeyNegate=function(t){var e=a.fromBuffer(t);return e.isZero()?n.alloc(32):(e.ucmp(a.n)>0&&e.isub(a.n),a.n.sub(e).toBuffer())},e.privateKeyModInverse=function(t){var e=a.fromBuffer(t);if(e.isOverflow()||e.isZero())throw new Error(s.EC_PRIVATE_KEY_RANGE_INVALID);return e.uinvm().toBuffer()},e.privateKeyTweakAdd=function(t,e){var r=a.fromBuffer(e);if(r.isOverflow())throw new Error(s.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);if(r.iadd(a.fromBuffer(t)),r.isOverflow()&&r.isub(a.n),r.isZero())throw new Error(s.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);return r.toBuffer()},e.privateKeyTweakMul=function(t,e){var r=a.fromBuffer(e);if(r.isOverflow()||r.isZero())throw new Error(s.EC_PRIVATE_KEY_TWEAK_MUL_FAIL);var n=a.fromBuffer(t);return r.umul(n).ureduce().toBuffer()},e.publicKeyCreate=function(t,e){var r=a.fromBuffer(t);if(r.isOverflow()||r.isZero())throw new Error(s.EC_PUBLIC_KEY_CREATE_FAIL);return c.mul(r).toPublicKey(e)},e.publicKeyConvert=function(t,e){var r=u.fromPublicKey(t);if(null===r)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);return r.toPublicKey(e)},e.publicKeyVerify=function(t){return null!==u.fromPublicKey(t)},e.publicKeyTweakAdd=function(t,e,r){var n=u.fromPublicKey(t);if(null===n)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);if((e=a.fromBuffer(e)).isOverflow())throw new Error(s.EC_PUBLIC_KEY_TWEAK_ADD_FAIL);return c.mul(e).add(n).toPublicKey(r)},e.publicKeyTweakMul=function(t,e,r){var n=u.fromPublicKey(t);if(null===n)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);if((e=a.fromBuffer(e)).isOverflow()||e.isZero())throw new Error(s.EC_PUBLIC_KEY_TWEAK_MUL_FAIL);return n.mul(e).toPublicKey(r)},e.publicKeyCombine=function(t,e){for(var r=new Array(t.length),n=0;n=0)&&0===n.iadd(a.psn).redMul(d).ucmp(p.x)},e.recover=function(t,e,r,i){var o=a.fromBuffer(e.slice(0,32)),f=a.fromBuffer(e.slice(32,64));if(o.isOverflow()||f.isOverflow())throw new Error(s.ECDSA_SIGNATURE_PARSE_FAIL);do{if(o.isZero()||f.isZero())break;var l=o;if(r>>1){if(l.ucmp(a.psn)>=0)break;l=o.add(a.n)}var h=n.concat([n.from([2+(1&r)]),l.toBuffer()]),p=u.fromPublicKey(h);if(null===p)break;var d=o.uinvm(),y=a.n.sub(a.fromBuffer(t)).umul(d).ureduce(),g=f.umul(d).ureduce();return u.fromECJPoint(c.mulAdd(y,p,g)).toPublicKey(i)}while(0);throw new Error(s.ECDSA_RECOVER_FAIL)},e.ecdh=function(t,r){var n=e.ecdhUnsafe(t,r,!0);return i("sha256").update(n).digest()},e.ecdhUnsafe=function(t,e,r){var n=u.fromPublicKey(t);if(null===n)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);var i=a.fromBuffer(e);if(i.isOverflow()||i.isZero())throw new Error(s.ECDH_FAIL);return n.mul(i).toPublicKey(r)}},function(t,e,r){var n=r(4),i=r(94),o=r(3).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(t){return t<<30|t>>>2}function f(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,l=0;l<16;++l)r[l]=t.readInt32BE(4*l);for(;l<80;++l)r[l]=r[l-3]^r[l-8]^r[l-14]^r[l-16];for(var h=0;h<80;++h){var p=~~(h/20),d=0|((e=n)<<5|e>>>27)+f(p,i,o,a)+u+r[h]+s[p];u=a,a=o,o=c(i),i=n,n=d}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,r){var n=r(4),i=r(94),o=r(3).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(t){return t<<5|t>>>27}function f(t){return t<<30|t>>>2}function l(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,h=0;h<16;++h)r[h]=t.readInt32BE(4*h);for(;h<80;++h)r[h]=(e=r[h-3]^r[h-8]^r[h-14]^r[h-16])<<1|e>>>31;for(var p=0;p<80;++p){var d=~~(p/20),y=c(n)+l(d,i,o,a)+u+r[p]+s[d]|0;u=a,a=o,o=f(i),i=n,n=y}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,r){var n=r(4),i=r(272),o=r(94),s=r(3).Buffer,a=new Array(64);function u(){this.init(),this._w=a,o.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var t=s.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},function(t,e,r){var n=r(4),i=r(273),o=r(94),s=r(3).Buffer,a=new Array(160);function u(){this.init(),this._w=a,o.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var t=s.allocUnsafe(48);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=u},function(t,e,r){"use strict";(function(e){var n=r(274),i=r(522),o=new e(0),s=new e([0]),a=new e([1]);function u(t,e,r,n){var o=i[t];if(void 0===o)throw new Error("hash "+t+" is not supported");this._algo=t,this._securityStrength=o.securityStrength/8,this._outlen=o.outlen/8,this._reseedInterval=281474976710656,this._init(e,r,n)}u.prototype._update=function(t){var e=n(this._algo,this._K).update(this._V).update(s);t&&e.update(t),this._K=e.digest(),this._V=n(this._algo,this._K).update(this._V).digest(),t&&(this._K=n(this._algo,this._K).update(this._V).update(a).update(t).digest(),this._V=n(this._algo,this._K).update(this._V).digest())},u.prototype._init=function(t,r,n){if(t.lengththis._reseedInterval)throw new Error("Reseed is required");r&&0===r.length&&(r=void 0),r&&this._update(r);for(var i=new e(0);i.lengtha?e=t(e):e.length>>13,p=0|s[1],d=8191&p,y=p>>>13,g=0|s[2],m=8191&g,v=g>>>13,b=0|s[3],_=8191&b,S=b>>>13,w=0|s[4],E=8191&w,k=w>>>13,C=0|s[5],A=8191&C,T=C>>>13,B=0|s[6],I=8191&B,M=B>>>13,x=0|s[7],R=8191&x,N=x>>>13,P=0|s[8],L=8191&P,D=P>>>13,O=0|s[9],U=8191&O,K=O>>>13,j=0|a[0],F=8191&j,V=j>>>13,q=0|a[1],J=8191&q,H=q>>>13,z=0|a[2],G=8191&z,Y=z>>>13,W=0|a[3],$=8191&W,Q=W>>>13,Z=0|a[4],X=8191&Z,tt=Z>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ct=at>>>13,ft=0|a[8],lt=8191&ft,ht=ft>>>13,pt=0|a[9],dt=8191&pt,yt=pt>>>13;r.length=19,n=Math.imul(l,F),i=Math.imul(l,V);var gt=c+n+((8191&(i+=Math.imul(h,F)))<<13);c=(o=Math.imul(h,V))+(i>>>13)+(gt>>>26),gt&=67108863,n=Math.imul(d,F),i=Math.imul(d,V),i+=Math.imul(y,F),o=Math.imul(y,V),n+=Math.imul(l,J),i+=Math.imul(l,H);var mt=c+n+((8191&(i+=Math.imul(h,J)))<<13);c=(o+=Math.imul(h,H))+(i>>>13)+(mt>>>26),mt&=67108863,n=Math.imul(m,F),i=Math.imul(m,V),i+=Math.imul(v,F),o=Math.imul(v,V),n+=Math.imul(d,J),i+=Math.imul(d,H),i+=Math.imul(y,J),o+=Math.imul(y,H),n+=Math.imul(l,G),i+=Math.imul(l,Y);var vt=c+n+((8191&(i+=Math.imul(h,G)))<<13);c=(o+=Math.imul(h,Y))+(i>>>13)+(vt>>>26),vt&=67108863,n=Math.imul(_,F),i=Math.imul(_,V),i+=Math.imul(S,F),o=Math.imul(S,V),n+=Math.imul(m,J),i+=Math.imul(m,H),i+=Math.imul(v,J),o+=Math.imul(v,H),n+=Math.imul(d,G),i+=Math.imul(d,Y),i+=Math.imul(y,G),o+=Math.imul(y,Y),n+=Math.imul(l,$),i+=Math.imul(l,Q);var bt=c+n+((8191&(i+=Math.imul(h,$)))<<13);c=(o+=Math.imul(h,Q))+(i>>>13)+(bt>>>26),bt&=67108863,n=Math.imul(E,F),i=Math.imul(E,V),i+=Math.imul(k,F),o=Math.imul(k,V),n+=Math.imul(_,J),i+=Math.imul(_,H),i+=Math.imul(S,J),o+=Math.imul(S,H),n+=Math.imul(m,G),i+=Math.imul(m,Y),i+=Math.imul(v,G),o+=Math.imul(v,Y),n+=Math.imul(d,$),i+=Math.imul(d,Q),i+=Math.imul(y,$),o+=Math.imul(y,Q),n+=Math.imul(l,X),i+=Math.imul(l,tt);var _t=c+n+((8191&(i+=Math.imul(h,X)))<<13);c=(o+=Math.imul(h,tt))+(i>>>13)+(_t>>>26),_t&=67108863,n=Math.imul(A,F),i=Math.imul(A,V),i+=Math.imul(T,F),o=Math.imul(T,V),n+=Math.imul(E,J),i+=Math.imul(E,H),i+=Math.imul(k,J),o+=Math.imul(k,H),n+=Math.imul(_,G),i+=Math.imul(_,Y),i+=Math.imul(S,G),o+=Math.imul(S,Y),n+=Math.imul(m,$),i+=Math.imul(m,Q),i+=Math.imul(v,$),o+=Math.imul(v,Q),n+=Math.imul(d,X),i+=Math.imul(d,tt),i+=Math.imul(y,X),o+=Math.imul(y,tt),n+=Math.imul(l,rt),i+=Math.imul(l,nt);var St=c+n+((8191&(i+=Math.imul(h,rt)))<<13);c=(o+=Math.imul(h,nt))+(i>>>13)+(St>>>26),St&=67108863,n=Math.imul(I,F),i=Math.imul(I,V),i+=Math.imul(M,F),o=Math.imul(M,V),n+=Math.imul(A,J),i+=Math.imul(A,H),i+=Math.imul(T,J),o+=Math.imul(T,H),n+=Math.imul(E,G),i+=Math.imul(E,Y),i+=Math.imul(k,G),o+=Math.imul(k,Y),n+=Math.imul(_,$),i+=Math.imul(_,Q),i+=Math.imul(S,$),o+=Math.imul(S,Q),n+=Math.imul(m,X),i+=Math.imul(m,tt),i+=Math.imul(v,X),o+=Math.imul(v,tt),n+=Math.imul(d,rt),i+=Math.imul(d,nt),i+=Math.imul(y,rt),o+=Math.imul(y,nt),n+=Math.imul(l,ot),i+=Math.imul(l,st);var wt=c+n+((8191&(i+=Math.imul(h,ot)))<<13);c=(o+=Math.imul(h,st))+(i>>>13)+(wt>>>26),wt&=67108863,n=Math.imul(R,F),i=Math.imul(R,V),i+=Math.imul(N,F),o=Math.imul(N,V),n+=Math.imul(I,J),i+=Math.imul(I,H),i+=Math.imul(M,J),o+=Math.imul(M,H),n+=Math.imul(A,G),i+=Math.imul(A,Y),i+=Math.imul(T,G),o+=Math.imul(T,Y),n+=Math.imul(E,$),i+=Math.imul(E,Q),i+=Math.imul(k,$),o+=Math.imul(k,Q),n+=Math.imul(_,X),i+=Math.imul(_,tt),i+=Math.imul(S,X),o+=Math.imul(S,tt),n+=Math.imul(m,rt),i+=Math.imul(m,nt),i+=Math.imul(v,rt),o+=Math.imul(v,nt),n+=Math.imul(d,ot),i+=Math.imul(d,st),i+=Math.imul(y,ot),o+=Math.imul(y,st),n+=Math.imul(l,ut),i+=Math.imul(l,ct);var Et=c+n+((8191&(i+=Math.imul(h,ut)))<<13);c=(o+=Math.imul(h,ct))+(i>>>13)+(Et>>>26),Et&=67108863,n=Math.imul(L,F),i=Math.imul(L,V),i+=Math.imul(D,F),o=Math.imul(D,V),n+=Math.imul(R,J),i+=Math.imul(R,H),i+=Math.imul(N,J),o+=Math.imul(N,H),n+=Math.imul(I,G),i+=Math.imul(I,Y),i+=Math.imul(M,G),o+=Math.imul(M,Y),n+=Math.imul(A,$),i+=Math.imul(A,Q),i+=Math.imul(T,$),o+=Math.imul(T,Q),n+=Math.imul(E,X),i+=Math.imul(E,tt),i+=Math.imul(k,X),o+=Math.imul(k,tt),n+=Math.imul(_,rt),i+=Math.imul(_,nt),i+=Math.imul(S,rt),o+=Math.imul(S,nt),n+=Math.imul(m,ot),i+=Math.imul(m,st),i+=Math.imul(v,ot),o+=Math.imul(v,st),n+=Math.imul(d,ut),i+=Math.imul(d,ct),i+=Math.imul(y,ut),o+=Math.imul(y,ct),n+=Math.imul(l,lt),i+=Math.imul(l,ht);var kt=c+n+((8191&(i+=Math.imul(h,lt)))<<13);c=(o+=Math.imul(h,ht))+(i>>>13)+(kt>>>26),kt&=67108863,n=Math.imul(U,F),i=Math.imul(U,V),i+=Math.imul(K,F),o=Math.imul(K,V),n+=Math.imul(L,J),i+=Math.imul(L,H),i+=Math.imul(D,J),o+=Math.imul(D,H),n+=Math.imul(R,G),i+=Math.imul(R,Y),i+=Math.imul(N,G),o+=Math.imul(N,Y),n+=Math.imul(I,$),i+=Math.imul(I,Q),i+=Math.imul(M,$),o+=Math.imul(M,Q),n+=Math.imul(A,X),i+=Math.imul(A,tt),i+=Math.imul(T,X),o+=Math.imul(T,tt),n+=Math.imul(E,rt),i+=Math.imul(E,nt),i+=Math.imul(k,rt),o+=Math.imul(k,nt),n+=Math.imul(_,ot),i+=Math.imul(_,st),i+=Math.imul(S,ot),o+=Math.imul(S,st),n+=Math.imul(m,ut),i+=Math.imul(m,ct),i+=Math.imul(v,ut),o+=Math.imul(v,ct),n+=Math.imul(d,lt),i+=Math.imul(d,ht),i+=Math.imul(y,lt),o+=Math.imul(y,ht),n+=Math.imul(l,dt),i+=Math.imul(l,yt);var Ct=c+n+((8191&(i+=Math.imul(h,dt)))<<13);c=(o+=Math.imul(h,yt))+(i>>>13)+(Ct>>>26),Ct&=67108863,n=Math.imul(U,J),i=Math.imul(U,H),i+=Math.imul(K,J),o=Math.imul(K,H),n+=Math.imul(L,G),i+=Math.imul(L,Y),i+=Math.imul(D,G),o+=Math.imul(D,Y),n+=Math.imul(R,$),i+=Math.imul(R,Q),i+=Math.imul(N,$),o+=Math.imul(N,Q),n+=Math.imul(I,X),i+=Math.imul(I,tt),i+=Math.imul(M,X),o+=Math.imul(M,tt),n+=Math.imul(A,rt),i+=Math.imul(A,nt),i+=Math.imul(T,rt),o+=Math.imul(T,nt),n+=Math.imul(E,ot),i+=Math.imul(E,st),i+=Math.imul(k,ot),o+=Math.imul(k,st),n+=Math.imul(_,ut),i+=Math.imul(_,ct),i+=Math.imul(S,ut),o+=Math.imul(S,ct),n+=Math.imul(m,lt),i+=Math.imul(m,ht),i+=Math.imul(v,lt),o+=Math.imul(v,ht),n+=Math.imul(d,dt),i+=Math.imul(d,yt);var At=c+n+((8191&(i+=Math.imul(y,dt)))<<13);c=(o+=Math.imul(y,yt))+(i>>>13)+(At>>>26),At&=67108863,n=Math.imul(U,G),i=Math.imul(U,Y),i+=Math.imul(K,G),o=Math.imul(K,Y),n+=Math.imul(L,$),i+=Math.imul(L,Q),i+=Math.imul(D,$),o+=Math.imul(D,Q),n+=Math.imul(R,X),i+=Math.imul(R,tt),i+=Math.imul(N,X),o+=Math.imul(N,tt),n+=Math.imul(I,rt),i+=Math.imul(I,nt),i+=Math.imul(M,rt),o+=Math.imul(M,nt),n+=Math.imul(A,ot),i+=Math.imul(A,st),i+=Math.imul(T,ot),o+=Math.imul(T,st),n+=Math.imul(E,ut),i+=Math.imul(E,ct),i+=Math.imul(k,ut),o+=Math.imul(k,ct),n+=Math.imul(_,lt),i+=Math.imul(_,ht),i+=Math.imul(S,lt),o+=Math.imul(S,ht),n+=Math.imul(m,dt),i+=Math.imul(m,yt);var Tt=c+n+((8191&(i+=Math.imul(v,dt)))<<13);c=(o+=Math.imul(v,yt))+(i>>>13)+(Tt>>>26),Tt&=67108863,n=Math.imul(U,$),i=Math.imul(U,Q),i+=Math.imul(K,$),o=Math.imul(K,Q),n+=Math.imul(L,X),i+=Math.imul(L,tt),i+=Math.imul(D,X),o+=Math.imul(D,tt),n+=Math.imul(R,rt),i+=Math.imul(R,nt),i+=Math.imul(N,rt),o+=Math.imul(N,nt),n+=Math.imul(I,ot),i+=Math.imul(I,st),i+=Math.imul(M,ot),o+=Math.imul(M,st),n+=Math.imul(A,ut),i+=Math.imul(A,ct),i+=Math.imul(T,ut),o+=Math.imul(T,ct),n+=Math.imul(E,lt),i+=Math.imul(E,ht),i+=Math.imul(k,lt),o+=Math.imul(k,ht),n+=Math.imul(_,dt),i+=Math.imul(_,yt);var Bt=c+n+((8191&(i+=Math.imul(S,dt)))<<13);c=(o+=Math.imul(S,yt))+(i>>>13)+(Bt>>>26),Bt&=67108863,n=Math.imul(U,X),i=Math.imul(U,tt),i+=Math.imul(K,X),o=Math.imul(K,tt),n+=Math.imul(L,rt),i+=Math.imul(L,nt),i+=Math.imul(D,rt),o+=Math.imul(D,nt),n+=Math.imul(R,ot),i+=Math.imul(R,st),i+=Math.imul(N,ot),o+=Math.imul(N,st),n+=Math.imul(I,ut),i+=Math.imul(I,ct),i+=Math.imul(M,ut),o+=Math.imul(M,ct),n+=Math.imul(A,lt),i+=Math.imul(A,ht),i+=Math.imul(T,lt),o+=Math.imul(T,ht),n+=Math.imul(E,dt),i+=Math.imul(E,yt);var It=c+n+((8191&(i+=Math.imul(k,dt)))<<13);c=(o+=Math.imul(k,yt))+(i>>>13)+(It>>>26),It&=67108863,n=Math.imul(U,rt),i=Math.imul(U,nt),i+=Math.imul(K,rt),o=Math.imul(K,nt),n+=Math.imul(L,ot),i+=Math.imul(L,st),i+=Math.imul(D,ot),o+=Math.imul(D,st),n+=Math.imul(R,ut),i+=Math.imul(R,ct),i+=Math.imul(N,ut),o+=Math.imul(N,ct),n+=Math.imul(I,lt),i+=Math.imul(I,ht),i+=Math.imul(M,lt),o+=Math.imul(M,ht),n+=Math.imul(A,dt),i+=Math.imul(A,yt);var Mt=c+n+((8191&(i+=Math.imul(T,dt)))<<13);c=(o+=Math.imul(T,yt))+(i>>>13)+(Mt>>>26),Mt&=67108863,n=Math.imul(U,ot),i=Math.imul(U,st),i+=Math.imul(K,ot),o=Math.imul(K,st),n+=Math.imul(L,ut),i+=Math.imul(L,ct),i+=Math.imul(D,ut),o+=Math.imul(D,ct),n+=Math.imul(R,lt),i+=Math.imul(R,ht),i+=Math.imul(N,lt),o+=Math.imul(N,ht),n+=Math.imul(I,dt),i+=Math.imul(I,yt);var xt=c+n+((8191&(i+=Math.imul(M,dt)))<<13);c=(o+=Math.imul(M,yt))+(i>>>13)+(xt>>>26),xt&=67108863,n=Math.imul(U,ut),i=Math.imul(U,ct),i+=Math.imul(K,ut),o=Math.imul(K,ct),n+=Math.imul(L,lt),i+=Math.imul(L,ht),i+=Math.imul(D,lt),o+=Math.imul(D,ht),n+=Math.imul(R,dt),i+=Math.imul(R,yt);var Rt=c+n+((8191&(i+=Math.imul(N,dt)))<<13);c=(o+=Math.imul(N,yt))+(i>>>13)+(Rt>>>26),Rt&=67108863,n=Math.imul(U,lt),i=Math.imul(U,ht),i+=Math.imul(K,lt),o=Math.imul(K,ht),n+=Math.imul(L,dt),i+=Math.imul(L,yt);var Nt=c+n+((8191&(i+=Math.imul(D,dt)))<<13);c=(o+=Math.imul(D,yt))+(i>>>13)+(Nt>>>26),Nt&=67108863,n=Math.imul(U,dt),i=Math.imul(U,yt);var Pt=c+n+((8191&(i+=Math.imul(K,dt)))<<13);return c=(o=Math.imul(K,yt))+(i>>>13)+(Pt>>>26),Pt&=67108863,u[0]=gt,u[1]=mt,u[2]=vt,u[3]=bt,u[4]=_t,u[5]=St,u[6]=wt,u[7]=Et,u[8]=kt,u[9]=Ct,u[10]=At,u[11]=Tt,u[12]=Bt,u[13]=It,u[14]=Mt,u[15]=xt,u[16]=Rt,u[17]=Nt,u[18]=Pt,0!==c&&(u[19]=c,r.length++),r}},function(t,e,r){"use strict";var n=r(3).Buffer,i=r(141),o=r(275),s=r(276);function a(){this.x=i.fromBuffer(n.from("79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798","hex")),this.y=i.fromBuffer(n.from("483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8","hex")),this.inf=!1,this._precompute()}a.prototype._precompute=function(){for(var t=new o(this.x,this.y),e=new Array(1+Math.ceil(64.25)),r=e[0]=t,n=1;n=c;l--)f=(f<<1)+i[l];u.push(f)}for(var h=new s(null,null,null),p=new s(null,null,null),d=a;d>0;d--){for(var y=0;y=0;f--){for(var l=0;f>=0&&(c[0]=0|a[0][f],c[1]=0|a[1][f],0===c[0]&&0===c[1]);++l,--f);if(f>=0&&(l+=1),u=u.dblp(l),f<0)break;for(var h=0;h<2;h++){var p,d=c[h];0!==d&&(d>0?p=o[h][d>>1]:d<0&&(p=o[h][-d>>1].neg()),u=void 0===p.z?u.mixedAdd(p):u.add(p))}}return u},t.exports=new a},function(t,e,r){"use strict";(function(e){const n=r(64),i=r(230),o={"AES-128":{ivSize:16,keySize:16},"AES-256":{ivSize:16,keySize:32},Blowfish:{ivSize:8,cipherKeySize:32}};t.exports=((t,r,s,a)=>{const u=o[t];if(!u)return a(new Error("unkown cipherType passed"));if(!r)return a(new Error("unkown hashType passed"));const c=u.keySize,f=u.ivSize,l=e.from("key expansion"),h=2*(f+c+20);i.create(r,s,(t,r)=>{if(t)return a(t);r.digest(l,(t,i)=>{if(t)return a(t);let o=[],s=0;n(()=>s{if(e)return t(e);let a=n.length;s+a>h&&(a=h-s),o.push(n),s+=a,r.digest(i,(e,r)=>{if(e)return t(e);i=r,t()})})},function(t){if(t)return a(t);const r=h/2,n=e.concat(o),i=n.slice(0,r),s=n.slice(r,h),u=t=>({iv:t.slice(0,f),cipherKey:t.slice(f,f+c),macKey:t.slice(f+c)});a(null,{k1:u(i),k2:u(s)})})})})})}).call(this,r(0).Buffer)},function(t,e,r){"use strict";const n=r(527);t.exports=((t,e)=>{n.generateEphmeralKeyPair(t,e)})},function(t,e,r){"use strict";(function(t){const n=r(165)(),i=r(164),o=r(21).bignum,s=r(266),a=s.toBase64,u=s.toBn,c={"P-256":256,"P-384":384,"P-521":521};e.generateEphmeralKeyPair=function(e,r){i(n.subtle.generateKey({name:"ECDH",namedCurve:e},!0,["deriveBits"]).then(r=>{const s=(s,u,f)=>{let l;"function"==typeof u&&(f=u,u=void 0),l=u?n.subtle.importKey("jwk",function(t,e){const r=h(t,e.public);return r.d=a(new o(e.private)),r}(e,u),{name:"ECDH",namedCurve:e},!1,["deriveBits"]):Promise.resolve(r.privateKey);const p=Promise.all([n.subtle.importKey("jwk",h(e,s),{name:"ECDH",namedCurve:e},!1,[]),l]);i(p.then(t=>n.subtle.deriveBits({name:"ECDH",namedCurve:e,public:t[0]},t[1],c[e])).then(e=>t.from(e)),f)};return n.subtle.exportKey("jwk",r.publicKey).then(t=>({key:l(t),genSharedKey:s}))}),r)};const f={"P-256":32,"P-384":48,"P-521":66};function l(e){const r=f[e.crv];return t.concat([t.from([4]),u(e.x).toArrayLike(t,"be",r),u(e.y).toArrayLike(t,"be",r)],1+2*r)}function h(e,r){const n=f[e];if(!r.slice(0,1).equals(t.from([4])))throw new Error("Invalid key format");const i=new o(r.slice(1,n+1)),s=new o(r.slice(1+n));return{kty:"EC",crv:e,x:a(i,n),y:a(s,n),ext:!0}}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";const n=r(25),i={sha1:"sha1","sha2-256":"sha256","sha2-512":"sha512"};t.exports=function(t,e,r,o,s){const a=i[s];if(!a)throw new Error(`Hash '${s}' is unknown or not supported`);const u=n.pkcs5.pbkdf2(t,e,r,o,a);return n.util.encode64(u)}},function(t,e,r){"use strict";(function(e){const n=r(15),i=r(31),o=r(530),s=r(175),a=r(5),u=r(9),c=r(26),f=new Error("Sorry, Not Implemented Yet."),l=c.proto(function(t){if(!(this instanceof l))return new l(t);if(null==t&&(t=""),t instanceof e)this.buffer=o.fromBuffer(t);else if("string"==typeof t||t instanceof String)this.buffer=o.fromString(t);else{if(!(t.buffer&&t.protos&&t.protoCodes))throw new Error("addr must be a string, Buffer, or another Multiaddr");this.buffer=o.fromBuffer(t.buffer)}},{className:"Multiaddr",symbolName:"@multiformats/js-multiaddr/multiaddr"});l.prototype.toString=function(){return o.bufferToString(this.buffer)},l.prototype.toOptions=function(){const t={},e=this.toString().split("/");return t.family="ip4"===e[1]?"ipv4":"ipv6",t.host=e[2],t.transport=e[3],t.port=e[4],t},l.prototype.inspect=function(){return""},l.prototype.protos=function(){return n(this.protoCodes(),function(t){return i(s(t))})},l.prototype.protoCodes=function(){const t=[],e=this.buffer;let r=0;for(;r{if(t[0]===s.names.ipfs.code)return!0})[0][1],u.decode(t)}catch(e){t=null}return t},l.prototype.equals=function(t){return this.buffer.equals(t.buffer)},l.prototype.nodeAddress=function(){if(!this.isThinWaistAddress())throw new Error('Multiaddr must be "thin waist" address for nodeAddress.');const t=this.protoCodes(),e=this.toString().split("/").slice(1);return{family:41===t[0]?"IPv6":"IPv4",address:e[1],port:e[3]}},l.fromNodeAddress=function(t,e){if(!t)throw new Error("requires node address object");if(!e)throw new Error("requires transport protocol");const r="IPv6"===t.family?"ip6":"ip4";return l("/"+[r,t.address,e,t.port].join("/"))},l.prototype.isThinWaistAddress=function(t){const e=(t||this).protos();return 2===e.length&&((4===e[0].code||41===e[0].code)&&(6===e[1].code||17===e[1].code))},l.prototype.fromStupidString=function(t){throw f},l.protocols=s,l.isName=function(t){return!!l.isMultiaddr(t)&&t.protos().some(t=>t.resolvable)},l.resolve=function(t,e){return l.isMultiaddr(t)&&l.isName(t)?e(new Error("not implemented yet")):e(new Error("not a valid name"))},t.exports=l}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e){const n=r(15),i=r(44),o=r(531),s=r(175),a=r(5);function u(t){const e=[],r=t.split("/").slice(1);if(1===r.length&&""===r[0])return[];for(let n=0;n=r.length)throw b("invalid address: "+t);e.push([i,r[n]])}else e.push([i])}return e}function c(t){const e=[];return n(t,function(t){const r=_(t);e.push(r.name),t.length>1&&e.push(t[1])}),"/"+e.join("/")}function f(t){return n(t,function(t){Array.isArray(t)||(t=[t]);const e=_(t);return t.length>1?[e.code,o.toBuffer(e.code,t[1])]:[e.code]})}function l(t){return n(t,function(t){const e=_(t);return t.length>1?[e.code,o.toString(e.code,t[1])]:[e.code]})}function h(t){return g(e.concat(n(t,function(t){const r=_(t);let n=e.from(a.encode(r.code));return t.length>1&&(n=e.concat([n,t[1]])),n})))}function p(t,e){if(t.size>0)return t.size/8;if(0===t.size)return 0;return a.decode(e)+a.decode.bytes}function d(t){const e=[];let r=0;for(;rt.length)throw b("Invalid address buffer: "+t.toString("hex"));e.push([n,u])}return e}function y(t){return h(f(u(t=v(t))))}function g(t){const r=m(t);if(r)throw r;return e.from(t)}function m(t){try{d(t)}catch(t){return t}}function v(t){return"/"+i(t.trim().split("/")).join("/")}function b(t){return new Error("Error parsing address: "+t)}function _(t){return s(t[0])}t.exports={stringToStringTuples:u,stringTuplesToString:c,tuplesToStringTuples:l,stringTuplesToTuples:f,bufferToTuples:d,tuplesToBuffer:h,bufferToString:function(t){return c(l(d(t)))},stringToBuffer:y,fromString:function(t){return y(t)},fromBuffer:g,validateBuffer:m,isValidBuffer:function(t){return void 0===m(t)},cleanPath:v,ParseError:b,protoFromTuple:_,sizeForAddr:p}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e){const n=r(45),i=r(46),o=r(175),s=r(9),a=r(5);function u(t,r){return r instanceof e?u.toString(t,r):u.toBuffer(t,r)}function c(t){if(!t.isValid())throw new Error("invalid ip address");return n.toBuffer(t.address)}t.exports=u,u.toString=function(t,e){switch((t=o(t)).code){case 4:case 41:return n.toString(e);case 6:case 17:case 33:case 132:return function(t){return t.readUInt16BE(0)}(e);case 54:case 55:case 56:return function(t){const e=a.decode(t);if((t=t.slice(a.decode.bytes)).length!==e)throw new Error("inconsistent lengths");return t.toString()}(e);case 421:return function(t){const e=a.decode(t),r=t.slice(a.decode.bytes);if(r.length!==e)throw new Error("inconsistent lengths");return s.encode(r)}(e);default:return e.toString("hex")}},u.toBuffer=function(t,r){switch((t=o(t)).code){case 4:return c(new i.Address4(r));case 41:return c(new i.Address6(r));case 6:case 17:case 33:case 132:return function(t){const r=e.alloc(2);return r.writeUInt16BE(t,0),r}(parseInt(r,10));case 54:case 55:case 56:return function(t){const r=e.from(t),n=e.from(a.encode(r.length));return e.concat([n,r])}(r);case 421:return function(t){const r=e.from(s.decode(t)),n=e.from(a.encode(r.length));return e.concat([n,r])}(r);default:return e.from(r,"hex")}}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";const n=r(278).ensureMultiaddr,i=r(112);t.exports=class{constructor(t){this._multiaddrs=t||[],this._observedMultiaddrs=[]}add(t){t=n(t),this.has(t)||this._multiaddrs.push(t)}addSafe(t){t=n(t),this._observedMultiaddrs.some((e,r)=>{if(e.equals(t))return this.add(t),this._observedMultiaddrs.splice(r,1),!0})||this._observedMultiaddrs.push(t)}toArray(){return this._multiaddrs.slice()}get size(){return this._multiaddrs.length}forEach(t){return this._multiaddrs.forEach(t)}filterBy(t){return"object"!=typeof t||"function"!=typeof t.matches||"function"!=typeof t.partialMatch||"function"!=typeof t.toString?[]:this._multiaddrs.filter(e=>t.matches(e))}has(t){return t=n(t),this._multiaddrs.some(e=>e.equals(t))}delete(t){t=n(t),this._multiaddrs.some((e,r)=>{if(e.equals(t))return this._multiaddrs.splice(r,1),!0})}replace(t,e){Array.isArray(t)||(t=[t]),Array.isArray(e)||(e=[e]),t.forEach(t=>this.delete(t)),e.forEach(t=>this.add(t))}clear(){this._multiaddrs=[]}distinct(){return i(this._multiaddrs,t=>[t.toOptions().port,t.toOptions().transport].join())}}},function(t,e,r){"use strict";(function(n){const i=r(24),o=r(534),s=r(20),a=r(10);class u{constructor(t,e,r){s(n.isBuffer(t),"invalid id provided"),e&&r&&s(e.public.bytes.equals(r.bytes),"inconsistent arguments"),this._id=t,this._idB58String=i.toB58String(this.id),this._privKey=e,this._pubKey=r}get id(){return this._id}set id(t){throw new Error("Id is immutable")}get privKey(){return this._privKey}set privKey(t){this._privKey=t}get pubKey(){return this._pubKey?this._pubKey:this._privKey?this._privKey.public:void 0}set pubKey(t){this._pubKey=t}marshalPubKey(){if(this.pubKey)return o.keys.marshalPublicKey(this.pubKey)}marshalPrivKey(){if(this.privKey)return o.keys.marshalPrivateKey(this.privKey)}toPrint(){let t=this.toB58String();t.startsWith("Qm")&&(t=t.slice(2));let e=6;return t.length"}toJSON(){return{id:this.toB58String(),privKey:c(this.marshalPrivKey()),pubKey:c(this.marshalPubKey())}}toHexString(){return i.toHexString(this.id)}toBytes(){return this.id}toB58String(){return this._idB58String}isEqual(t){if(n.isBuffer(t))return this.id.equals(t);if(t.id)return this.id.equals(t.id);throw new Error("not valid Id")}isValid(t){this.privKey&&this.privKey.public&&this.privKey.public.bytes&&n.isBuffer(this.pubKey.bytes)&&this.privKey.public.bytes.equals(this.pubKey.bytes)?t():t(new Error("Keys not match"))}}function c(t){if(t)return t.toString("base64")}(e=t.exports=u).create=function(t,e){"function"==typeof t&&(e=t,t={}),(t=t||{}).bits=t.bits||2048,a([e=>o.keys.generateKeyPair("RSA",t.bits,e),(t,e)=>t.public.hash((r,n)=>{e(r,n,t)})],(t,r,n)=>{if(t)return e(t);e(null,new u(r,n))})},e.createFromHexString=function(t){return new u(i.fromHexString(t))},e.createFromBytes=function(t){return new u(t)},e.createFromB58String=function(t){return new u(i.fromB58String(t))},e.createFromPubKey=function(t,e){if("function"!=typeof e)throw new Error("callback is required");let r;try{let i=t;if("string"==typeof i&&(i=n.from(t,"base64")),!n.isBuffer(i))throw new Error("Supplied key is neither a base64 string nor a buffer");r=o.keys.unmarshalPublicKey(i)}catch(t){return e(t)}r.hash((t,n)=>{if(t)return e(t);e(null,new u(n,null,r))})},e.createFromPrivKey=function(t,e){if("function"!=typeof e)throw new Error("callback is required");let r=t;try{if("string"==typeof r&&(r=n.from(t,"base64")),!n.isBuffer(r))throw new Error("Supplied key is neither a base64 string nor a buffer")}catch(t){return e(t)}a([t=>o.keys.unmarshalPrivateKey(r,t),(t,e)=>t.public.hash((r,n)=>{e(r,n,t)})],(t,r,n)=>{if(t)return e(t);e(null,new u(r,n,n.public))})},e.createFromJSON=function(t,e){if("function"!=typeof e)throw new Error("callback is required");let r,s,c,f;try{r=i.fromB58String(t.id),s=t.privKey&&n.from(t.privKey,"base64"),c=t.pubKey&&n.from(t.pubKey,"base64"),f=c&&o.keys.unmarshalPublicKey(c)}catch(t){return e(t)}s?a([t=>o.keys.unmarshalPrivateKey(s,t),(t,e)=>t.public.hash((r,n)=>{e(r,n,t)}),(t,e,r)=>{f?f.hash((n,i)=>{r(n,t,e,i)}):r(null,t,e)}],(t,n,i,o)=>t?e(t):f&&!n.equals(o)?e(new Error("Public and private key do not match")):r&&!n.equals(r)?e(new Error("Id and private key do not match")):void e(null,new u(r,i,f))):e(null,new u(r,null,f))},e.isPeerId=function(t){return Boolean("object"==typeof t&&t._id&&t._idB58String)}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";const n=r(279),i=r(536),o=r(538);(e=t.exports).aes=i,e.hmac=n,e.keys=o,e.randomBytes=r(284),e.pbkdf2=r(549)},function(t,e,r){"use strict";t.exports={SHA1:20,SHA256:32,SHA512:64}},function(t,e,r){"use strict";const n=r(537),i={16:"aes-128-ctr",32:"aes-256-ctr"};e.create=function(t,e,r){const o=i[t.length];if(!o)return r(new Error("Invalid key length"));const s=n.createCipheriv(o,t,e),a=n.createDecipheriv(o,t,e);r(null,{encrypt(t,e){e(null,s.update(t))},decrypt(t,e){e(null,a.update(t))}})}},function(t,e,r){"use strict";const n=r(78);t.exports={createCipheriv:n.createCipheriv,createDecipheriv:n.createDecipheriv}},function(t,e,r){"use strict";(function(n){const i=r(19)(r(178)),o=r(25);e=t.exports;const s={rsa:r(539),ed25519:r(544),secp256k1:r(84)(i,r(284))};function a(t){return void 0!==s[t.toLowerCase()]}e.supportedKeys=s,e.keysPBM=i,e.keyStretcher=r(546),e.generateEphemeralKeyPair=r(547),e.generateKeyPair=((t,e,r)=>{let n=s[t.toLowerCase()];if(!n)return r(new Error("invalid or unsupported key type"));n.generateKeyPair(e,r)}),e.generateKeyPairFromSeed=((t,e,r,n)=>{let i=s[t.toLowerCase()];return i?"ed25519"!==t.toLowerCase()?n(new Error("Seed key derivation is unimplemented for RSA or secp256k1")):void i.generateKeyPairFromSeed(e,r,n):n(new Error("invalid or unsupported key type"))}),e.unmarshalPublicKey=(t=>{const e=i.PublicKey.decode(t),r=e.Data;switch(e.Type){case i.KeyType.RSA:return s.rsa.unmarshalRsaPublicKey(r);case i.KeyType.Ed25519:return s.ed25519.unmarshalEd25519PublicKey(r);case i.KeyType.Secp256k1:if(s.secp256k1)return s.secp256k1.unmarshalSecp256k1PublicKey(r);throw new Error("secp256k1 support requires libp2p-crypto-secp256k1 package");default:throw new Error("invalid or unsupported key type")}}),e.marshalPublicKey=((t,e)=>{if(!a(e=(e||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type");return t.bytes}),e.unmarshalPrivateKey=((t,e)=>{let r;try{r=i.PrivateKey.decode(t)}catch(t){return e(t)}const n=r.Data;switch(r.Type){case i.KeyType.RSA:return s.rsa.unmarshalRsaPrivateKey(n,e);case i.KeyType.Ed25519:return s.ed25519.unmarshalEd25519PrivateKey(n,e);case i.KeyType.Secp256k1:return s.secp256k1?s.secp256k1.unmarshalSecp256k1PrivateKey(n,e):e(new Error("secp256k1 support requires libp2p-crypto-secp256k1 package"));default:e(new Error("invalid or unsupported key type"))}}),e.marshalPrivateKey=((t,e)=>{if(!a(e=(e||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type");return t.bytes}),e.import=((t,e,r)=>{try{const i=o.pki.decryptRsaPrivateKey(t,e);if(null===i)throw new Error("Cannot read the key, most likely the password is wrong or not a RSA key");let a=o.asn1.toDer(o.pki.privateKeyToAsn1(i));return a=n.from(a.getBytes(),"binary"),s.rsa.unmarshalRsaPrivateKey(a,r)}catch(t){r(t)}})}).call(this,r(0).Buffer)},function(t,e,r){"use strict";const n=r(280),i=r(19),o=r(9),s=r(282),a=i(r(178)),u=r(25),c=r(7);class f{constructor(t){this._key=t}verify(t,e,r){h(r),s.hashAndVerify(this._key,e,t,r)}marshal(){return s.utils.jwkToPkix(this._key)}get bytes(){return a.PublicKey.encode({Type:a.KeyType.RSA,Data:this.marshal()})}encrypt(t){return this._key.encrypt(t,"RSAES-PKCS1-V1_5")}equals(t){return this.bytes.equals(t.bytes)}hash(t){h(t),n(this.bytes,"sha2-256",t)}}class l{constructor(t,e){this._key=t,this._publicKey=e}genSecret(){return s.getRandomValues(new Uint8Array(16))}sign(t,e){h(e),s.hashAndSign(this._key,t,e)}get public(){if(!this._publicKey)throw new Error("public key not provided");return new f(this._publicKey)}decrypt(t,e){s.decrypt(this._key,t,e)}marshal(){return s.utils.jwkToPkcs1(this._key)}get bytes(){return a.PrivateKey.encode({Type:a.KeyType.RSA,Data:this.marshal()})}equals(t){return this.bytes.equals(t.bytes)}hash(t){h(t),n(this.bytes,"sha2-256",t)}id(t){this.public.hash((e,r)=>{if(e)return t(e);t(null,o.encode(r))})}export(t,e,r){"function"==typeof e&&(r=e,e=t,t="pkcs-8"),h(r),c(()=>{let n=null,i=null;try{const r=new u.util.ByteBuffer(this.marshal()),o=u.asn1.fromDer(r),s=u.pki.privateKeyFromAsn1(o);if("pkcs-8"===t){const t={algorithm:"aes256",count:1e4,saltSize:16,prfAlgorithm:"sha512"};i=u.pki.encryptRsaPrivateKey(s,e,t)}else n=new Error(`Unknown export format '${t}'`)}catch(t){n=t}r(n,i)})}}function h(t){if("function"!=typeof t)throw new Error("callback is required")}t.exports={RsaPublicKey:f,RsaPrivateKey:l,unmarshalRsaPublicKey:function(t){const e=s.utils.pkixToJwk(t);return new f(e)},unmarshalRsaPrivateKey:function(t,e){const r=s.utils.pkcs1ToJwk(t);s.unmarshalPrivateKey(r,(t,r)=>{if(t)return e(t);e(null,new l(r.privateKey,r.publicKey))})},generateKeyPair:function(t,e){s.generateKey(t,(t,r)=>{if(t)return e(t);e(null,new l(r.privateKey,r.publicKey))})},fromJwk:function(t,e){s.unmarshalPrivateKey(t,(t,r)=>{if(t)return e(t);e(null,new l(r.privateKey,r.publicKey))})}}},function(t,e,r){"use strict";(function(e){const n=r(55),i=r(56),o=r(281),s=r(541),a=o.toCallback,u=o.toBuf,c=o.fromString,f=o.fromNumberTo32BitBuf;t.exports={sha1:s.sha1,sha2256:s.sha2256,sha2512:s.sha2512,sha3512:a(u(n.sha3_512)),sha3384:a(u(n.sha3_384)),sha3256:a(u(n.sha3_256)),sha3224:a(u(n.sha3_224)),shake128:a(u(n.shake_128,256)),shake256:a(u(n.shake_256,512)),keccak224:a(u(n.keccak_224)),keccak256:a(u(n.keccak_256)),keccak384:a(u(n.keccak_384)),keccak512:a(u(n.keccak_512)),murmur3128:a(u(c(i.x64.hash128))),murmur332:a(f(c(i.x86.hash32))),addBlake:r(542),dblSha2256:(t,r)=>{s.sha2256(t,(t,n)=>{t&&r(t),s.sha2256(e.from(n),r)})}}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e){const n=r(57),i=function(){if(self.crypto)return self.crypto.subtle||self.crypto.webkitSubtle;if(self.msCrypto)return self.msCrypto.subtle}();function o(t){if(!i)throw new Error("Please use a browser with webcrypto support");return(r,o)=>{const s=i.digest({name:t},r);if("function"!=typeof s.then)return s.onerror=(()=>{o(new Error(`hashing data using ${t}`))}),void(s.oncomplete=(t=>{o(null,t.target.result)}));n(s.then(t=>e.from(new Uint8Array(t))),o)}}t.exports={sha1:function(t,e){o("SHA-1")(t,e)},sha2256:function(t,e){o("SHA-256")(t,e)},sha2512:function(t,e){o("SHA-512")(t,e)}}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e){const n=r(58),i=r(281).toCallback,o={init:n.blake2bInit,update:n.blake2bUpdate,digest:n.blake2bFinal},s={init:n.blake2sInit,update:n.blake2sUpdate,digest:n.blake2sFinal},a=(t,r)=>i(n=>{const i=r.init(t,null);return r.update(i,n),e.from(r.digest(i))});t.exports=(t=>{for(let e=0;e<64;e++)t[45569+e]=a(e+1,o);for(let e=0;e<32;e++)t[45633+e]=a(e+1,s)})}).call(this,r(0).Buffer)},function(t,e,r){"use strict";const n=r(21),i=r(283),o=i.toBase64,s=i.toBn,a=n.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}),u=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid({"1.2.840.113549.1.1.1":"rsa"}),this.key("none").optional().null_(),this.key("curve").optional().objid(),this.key("params").optional().seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()))}),c=n.define("RSAPublicKey",function(){this.seq().obj(this.key("algorithm").use(u),this.key("subjectPublicKey").bitstr())}),f=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});e.pkcs1ToJwk=function(t){const e=a.decode(t,"der");return{kty:"RSA",n:o(e.modulus),e:o(e.publicExponent),d:o(e.privateExponent),p:o(e.prime1),q:o(e.prime2),dp:o(e.exponent1),dq:o(e.exponent2),qi:o(e.coefficient),alg:"RS256",kid:"2011-04-29"}},e.jwkToPkcs1=function(t){return a.encode({version:0,modulus:s(t.n),publicExponent:s(t.e),privateExponent:s(t.d),prime1:s(t.p),prime2:s(t.q),exponent1:s(t.dp),exponent2:s(t.dq),coefficient:s(t.qi)},"der")},e.pkixToJwk=function(t){const e=c.decode(t,"der"),r=f.decode(e.subjectPublicKey.data,"der");return{kty:"RSA",n:o(r.modulus),e:o(r.publicExponent),alg:"RS256",kid:"2011-04-29"}},e.jwkToPkix=function(t){return c.encode({algorithm:{algorithm:"rsa",none:null},subjectPublicKey:{data:f.encode({modulus:s(t.n),publicExponent:s(t.e)},"der")}},"der")}},function(t,e,r){"use strict";(function(e){const n=r(280),i=r(19),o=r(9),s=r(545),a=i(r(178));class u{constructor(t){this._key=l(t,s.publicKeyLength)}verify(t,e,r){f(r),s.hashAndVerify(this._key,e,t,r)}marshal(){return e.from(this._key)}get bytes(){return a.PublicKey.encode({Type:a.KeyType.Ed25519,Data:this.marshal()})}equals(t){return this.bytes.equals(t.bytes)}hash(t){f(t),n(this.bytes,"sha2-256",t)}}class c{constructor(t,e){this._key=l(t,s.privateKeyLength),this._publicKey=l(e,s.publicKeyLength)}sign(t,e){f(e),s.hashAndSign(this._key,t,e)}get public(){if(!this._publicKey)throw new Error("public key not provided");return new u(this._publicKey)}marshal(){return e.concat([e.from(this._key),e.from(this._publicKey)])}get bytes(){return a.PrivateKey.encode({Type:a.KeyType.Ed25519,Data:this.marshal()})}equals(t){return this.bytes.equals(t.bytes)}hash(t){f(t),n(this.bytes,"sha2-256",t)}id(t){this.public.hash((e,r)=>{if(e)return t(e);t(null,o.encode(r))})}}function f(t){if("function"!=typeof t)throw new Error("callback is required")}function l(t,r){if(e.isBuffer(t)&&(t=new Uint8Array(t)),!(t instanceof Uint8Array)||t.length!==r)throw new Error("Key must be a Uint8Array or Buffer of length "+r);return t}t.exports={Ed25519PublicKey:u,Ed25519PrivateKey:c,unmarshalEd25519PrivateKey:function(t,e){try{t=l(t,s.privateKeyLength+s.publicKeyLength)}catch(t){return e(t)}const r=t.slice(0,s.privateKeyLength),n=t.slice(s.privateKeyLength,t.length);e(null,new c(r,n))},unmarshalEd25519PublicKey:function(t){return t=l(t,s.publicKeyLength),new u(t)},generateKeyPair:function(t,e){void 0===e&&"function"==typeof t&&(e=t),s.generateKey((t,r)=>{if(t)return e(t);let n;try{n=new c(r.secretKey,r.publicKey)}catch(t){return void e(t)}e(null,n)})},generateKeyPairFromSeed:function(t,e,r){void 0===r&&"function"==typeof e&&(r=e),s.generateKeyFromSeed(t,(t,e)=>{if(t)return r(t);let n;try{n=new c(e.secretKey,e.publicKey)}catch(t){return void r(t)}r(null,n)})}}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){const n=r(83),i=r(7);e.publicKeyLength=n.sign.publicKeyLength,e.privateKeyLength=n.sign.secretKeyLength,e.generateKey=function(t){i(()=>{let e;try{e=n.sign.keyPair()}catch(e){return t(e)}t(null,e)})},e.generateKeyFromSeed=function(t,e){i(()=>{let r;try{r=n.sign.keyPair.fromSeed(t)}catch(t){return e(t)}e(null,r)})},e.hashAndSign=function(e,r,o){i(()=>{o(null,t.from(n.sign.detached(r,e)))})},e.hashAndVerify=function(t,e,r,o){i(()=>{let i;try{i=n.sign.detached.verify(r,e,t)}catch(t){return o(t)}o(null,i)})}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e){const n=r(64),i=r(279),o={"AES-128":{ivSize:16,keySize:16},"AES-256":{ivSize:16,keySize:32},Blowfish:{ivSize:8,cipherKeySize:32}};t.exports=((t,r,s,a)=>{const u=o[t];if(!u)return a(new Error("unkown cipherType passed"));if(!r)return a(new Error("unkown hashType passed"));const c=u.keySize,f=u.ivSize,l=e.from("key expansion"),h=2*(f+c+20);i.create(r,s,(t,r)=>{if(t)return a(t);r.digest(l,(t,i)=>{if(t)return a(t);let o=[],s=0;n(()=>s{if(e)return t(e);let a=n.length;s+a>h&&(a=h-s),o.push(n),s+=a,r.digest(i,(e,r)=>{if(e)return t(e);i=r,t()})})},function(t){if(t)return a(t);const r=h/2,n=e.concat(o),i=n.slice(0,r),s=n.slice(r,h),u=t=>({iv:t.slice(0,f),cipherKey:t.slice(f,f+c),macKey:t.slice(f+c)});a(null,{k1:u(i),k2:u(s)})})})})})}).call(this,r(0).Buffer)},function(t,e,r){"use strict";const n=r(548);t.exports=((t,e)=>{n.generateEphmeralKeyPair(t,e)})},function(t,e,r){"use strict";(function(t){const n=r(177)(),i=r(176),o=r(21).bignum,s=r(283),a=s.toBase64,u=s.toBn,c={"P-256":256,"P-384":384,"P-521":521};e.generateEphmeralKeyPair=function(e,r){i(n.subtle.generateKey({name:"ECDH",namedCurve:e},!0,["deriveBits"]).then(r=>{const s=(s,u,f)=>{let l;"function"==typeof u&&(f=u,u=void 0),l=u?n.subtle.importKey("jwk",function(t,e){const r=h(t,e.public);return r.d=a(new o(e.private)),r}(e,u),{name:"ECDH",namedCurve:e},!1,["deriveBits"]):Promise.resolve(r.privateKey);const p=Promise.all([n.subtle.importKey("jwk",h(e,s),{name:"ECDH",namedCurve:e},!1,[]),l]);i(p.then(t=>n.subtle.deriveBits({name:"ECDH",namedCurve:e,public:t[0]},t[1],c[e])).then(e=>t.from(e)),f)};return n.subtle.exportKey("jwk",r.publicKey).then(t=>({key:l(t),genSharedKey:s}))}),r)};const f={"P-256":32,"P-384":48,"P-521":66};function l(e){const r=f[e.crv];return t.concat([t.from([4]),u(e.x).toArrayLike(t,"be",r),u(e.y).toArrayLike(t,"be",r)],1+2*r)}function h(e,r){const n=f[e];if(!r.slice(0,1).equals(t.from([4])))throw new Error("Invalid key format");const i=new o(r.slice(1,n+1)),s=new o(r.slice(1+n));return{kty:"EC",crv:e,x:a(i,n),y:a(s,n),ext:!0}}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";const n=r(25),i={sha1:"sha1","sha2-256":"sha256","sha2-512":"sha512"};t.exports=function(t,e,r,o,s){const a=i[s];if(!a)throw new Error(`Hash '${s}' is unknown or not supported`);const u=n.pkcs5.pbkdf2(t,e,r,o,a);return n.util.encode64(u)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return Object.assign((0,n.default)(t,e),(0,i.default)(t,e),(0,o.default)(t,e),(0,s.default)(t,e),(0,a.default)(t,e),(0,u.default)(t,e),(0,c.default)(t,e),(0,f.default)(t,e),(0,l.default)(t,e),(0,h.default)(t,e),(0,p.default)(t,e),(0,d.default)(t,e))};var n=y(r(551)),i=y(r(566)),o=y(r(567)),s=y(r(568)),a=y(r(569)),u=y(r(570)),c=y(r(571)),f=y(r(572)),l=y(r(573)),h=y(r(574)),p=y(r(575)),d=y(r(576));function y(t){return t&&t.__esModule?t:{default:t}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return{add:(0,n.expose)("ipfs.files.add",(0,i.pre)(function(){for(var t=arguments.length,r=Array(t),n=0;nt?n(!0):void n(null,e++)}}},function(t,e,r){"use strict";t.exports=function(t){return t=t||Math.random,function(e,r){return e?r&&r(e):r(null,t())}}},function(t,e,r){"use strict";t.exports={drain:r(113),onEnd:r(322),log:r(557),find:r(558),reduce:r(179),collect:r(72),concat:r(559)}},function(t,e,r){"use strict";var n=r(113);t.exports=function(t){return n(function(t){console.log(t)},t)}},function(t,e,r){"use strict";function n(t){return t}var i=r(114),o=r(113);t.exports=function(t,e){var r=!1;return e?t=i(t)||n:(e=t,t=n),o(function(n){if(t(n))return r=!0,e(null,n),!1},function(t){r||e(!0===t?null:t,null)})}},function(t,e,r){"use strict";var n=r(179);t.exports=function(t){return n(function(t,e){return t+e},"",t)}},function(t,e,r){"use strict";t.exports={map:r(98),asyncMap:r(99),filter:r(73),filterNot:r(561),through:r(323),take:r(562),unique:r(287),nonUnique:r(563),flatten:r(195)}},function(t,e,r){"use strict";var n=r(286),i=r(73);t.exports=function(t){return t=n(t),i(function(e){return!t(e)})}},function(t,e,r){"use strict";t.exports=function(t,e){var r=(e=e||{}).last||!1,n=!1;if("number"==typeof t){r=!0;var i=t;t=function(){return--i}}return function(e){function i(t){e(!0,function(e){r=!1,t(e||!0)})}return function(o,s){n&&!o?r?i(s):s(n):(n=o)?e(n,s):e(null,function(e,o){(n=n||e)?s(n):t(o)?s(null,o):(n=!0,r?s(null,o):i(s))})}}}},function(t,e,r){"use strict";var n=r(287);t.exports=function(t){return n(t,!0)}},function(t,e,r){const{caller:n}=r(1),{post:i}=r(2);t.exports=function(t,e){const r=i(n(t,e),e&&e.post);return(t,e)=>{t&&!0!==t&&(t=Object.assign({message:t.message,stack:void 0},t.output&&t.output.payload)),r(t).then(t=>e(t.end,t.data)).catch(e)}}},function(t,e,r){const{expose:n}=r(1),{post:i}=r(2);t.exports=function(t,e){return function(r){const o=n(t,i(t=>new Promise((e,n)=>{t&&!0!==t&&(t=Object.assign(new Error,t)),r(t,(t,r)=>{if(t)return!0===t?e({end:t}):n(t),o.close();e({end:t,data:r})})}),e&&e.post),e)}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return{cat:(0,n.expose)("ipfs.files.cat",(0,i.pre)((0,c.preBufferFromJson)(0),(0,u.preCidFromJson)(0),e.pre("files.cat"),(0,i.post)(function(){var e;return(e=t().files).cat.apply(e,arguments)},c.bufferToJson)),e),catPullStream:(0,n.expose)("ipfs.files.catPullStream",(0,i.pre)((0,c.preBufferFromJson)(0),(0,u.preCidFromJson)(0),e.pre("files.catPullStream"),(0,i.post)(function(){var e;return(e=t().files).catPullStream.apply(e,arguments)},function(t){return new Promise(function(r){var n=(0,a.default)();(0,o.default)(t,s.default.sink(n,Object.assign({},e,{post:function(t){return(0,c.isBuffer)(t.data)&&(t.data=(0,c.bufferToJson)(t.data)),t}}))),r((0,f.functionToJson)(n))})})),e)}};var n=r(1),i=r(2),o=l(r(14)),s=l(r(33)),a=l(r(42)),u=r(28),c=r(17),f=r(50);function l(t){return t&&t.__esModule?t:{default:t}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return{cp:(0,n.expose)("ipfs.files.cp",(0,i.pre)(e.pre("files.cp"),(0,i.post)(function(){var e;return(e=t().files).cp.apply(e,arguments)},function(){return null})),e)}};var n=r(1),i=r(2)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return{flush:(0,n.expose)("ipfs.files.flush",(0,i.pre)(e.pre("files.flush"),(0,i.post)(function(){var e;return(e=t().files).flush.apply(e,arguments)},function(){return null})),e)}};var n=r(1),i=r(2)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return{get:(0,n.expose)("ipfs.files.get",(0,i.pre)((0,c.preBufferFromJson)(0),(0,u.preCidFromJson)(0),e.pre("files.get"),(0,i.post)(function(){var e;return(e=t().files).get.apply(e,arguments)},function(t){return t.map(function(t){return t.content&&(t.content=(0,c.bufferToJson)(t.content)),t})})),e),getPullStream:(0,n.expose)("ipfs.files.getPullStream",(0,i.pre)((0,c.preBufferFromJson)(0),(0,u.preCidFromJson)(0),e.pre("files.getPullStream"),(0,i.post)(function(){var e;return(e=t().files).getPullStream.apply(e,arguments)},function(t){return new Promise(function(r){var n=(0,a.default)();(0,o.default)(t,o.default.map(function(t){if(t.content){var r=(0,a.default)();(0,o.default)(t.content,s.default.sink(r,Object.assign({},e,{post:function(t){return(0,c.isBuffer)(t.data)&&(t.data=(0,c.bufferToJson)(t.data)),t}}))),t.content=(0,f.functionToJson)(r)}return t}),s.default.sink(n,e)),r((0,f.functionToJson)(n))})})),e)}};var n=r(1),i=r(2),o=l(r(14)),s=l(r(33)),a=l(r(42)),u=r(28),c=r(17),f=r(50);function l(t){return t&&t.__esModule?t:{default:t}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return{ls:(0,n.expose)("ipfs.files.ls",(0,i.pre)(e.pre("files.ls"),function(){var e;return(e=t().files).ls.apply(e,arguments)}),e)}};var n=r(1),i=r(2)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return{mkdir:(0,n.expose)("ipfs.files.mkdir",(0,i.pre)(e.pre("files.mkdir"),(0,i.post)(function(){var e;return(e=t().files).mkdir.apply(e,arguments)},function(){return null})),e)}};var n=r(1),i=r(2)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return{mv:(0,n.expose)("ipfs.files.mv",(0,i.pre)(e.pre("files.mv"),(0,i.post)(function(){var e;return(e=t().files).mv.apply(e,arguments)},function(){return null})),e)}};var n=r(1),i=r(2)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return{read:(0,n.expose)("ipfs.files.read",(0,i.pre)(e.pre("files.read"),(0,i.post)(function(){var e;return(e=t().files).read.apply(e,arguments)},u.bufferToJson)),e),readPullStream:(0,n.expose)("ipfs.files.readPullStream",(0,i.pre)(e.pre("files.readPullStream"),(0,i.post)(function(){var e;return(e=t().files).readPullStream.apply(e,arguments)},function(t){return new Promise(function(r){var n=(0,o.default)();(0,s.default)(t,a.default.sink(n,Object.assign({},e,{post:function(t){return(0,u.isBuffer)(t.data)&&(t.data=(0,u.bufferToJson)(t.data)),t}}))),r((0,c.functionToJson)(n))})})),e)}};var n=r(1),i=r(2),o=f(r(42)),s=f(r(14)),a=f(r(33)),u=r(17),c=r(50);function f(t){return t&&t.__esModule?t:{default:t}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return{rm:(0,n.expose)("ipfs.files.rm",(0,i.pre)(e.pre("files.rm"),(0,i.post)(function(){var e;return(e=t().files).rm.apply(e,arguments)},function(){return null})),e)}};var n=r(1),i=r(2)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return{stat:(0,n.expose)("ipfs.files.stat",(0,i.pre)(e.pre("files.stat"),function(){var e;return(e=t().files).stat.apply(e,arguments)}),e)}};var n=r(1),i=r(2)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return{write:(0,n.expose)("ipfs.files.write",(0,i.pre)((0,o.preBufferFromJson)(1),e.pre("files.write"),function(){var e;return(e=t().files).write.apply(e,arguments)}),e)}};var n=r(1),i=r(2),o=r(17)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return{export:(0,n.expose)("ipfs.key.export",(0,i.pre)(e.pre("key.export"),function(){var e;return(e=t().key).export.apply(e,arguments)}),e),gen:(0,n.expose)("ipfs.key.gen",(0,i.pre)(e.pre("key.gen"),function(){var e;return(e=t().key).gen.apply(e,arguments)}),e),import:(0,n.expose)("ipfs.key.import",(0,i.pre)(e.pre("key.import"),function(){var e;return(e=t().key).import.apply(e,arguments)}),e),list:(0,n.expose)("ipfs.key.list",(0,i.pre)(e.pre("key.list"),function(){return t().key.list()}),e),rename:(0,n.expose)("ipfs.key.rename",(0,i.pre)(e.pre("key.rename"),function(){var e;return(e=t().key).rename.apply(e,arguments)}),e),rm:(0,n.expose)("ipfs.key.rm",(0,i.pre)(e.pre("key.rm"),function(){var e;return(e=t().key).rm.apply(e,arguments)}),e)}};var n=r(1),i=r(2)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return{ls:(0,n.expose)("ipfs.ls",(0,i.pre)((0,c.preBufferFromJson)(0),(0,u.preCidFromJson)(0),e.pre("ls"),function(){var e;return(e=t()).ls.apply(e,arguments)}),e),lsPullStream:(0,n.expose)("ipfs.lsPullStream",(0,i.pre)((0,c.preBufferFromJson)(0),(0,u.preCidFromJson)(0),e.pre("lsPullStream"),(0,i.post)(function(){var e;return(e=t()).lsPullStream.apply(e,arguments)},function(t){return new Promise(function(r){var n=(0,a.default)();(0,o.default)(t,s.default.sink(n,e)),r((0,f.functionToJson)(n))})})),e)}};var n=r(1),i=r(2),o=l(r(14)),s=l(r(33)),a=l(r(42)),u=r(28),c=r(17),f=r(50);function l(t){return t&&t.__esModule?t:{default:t}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return{publish:(0,n.expose)("ipfs.name.publish",(0,i.pre)(e.pre("name.publish"),function(){var e;return(e=t().name).publish.apply(e,arguments)}),e),resolve:(0,n.expose)("ipfs.name.resolve",(0,i.pre)(e.pre("name.resolve"),function(){var e;return(e=t().name).resolve.apply(e,arguments)}),e)}};var n=r(1),i=r(2)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return{new:(0,n.expose)("ipfs.object.new",(0,i.pre)(e.pre("object.new"),(0,i.post)(function(){var e;return(e=t().object).new.apply(e,arguments)},o.dagNodeToJson)),e),put:(0,n.expose)("ipfs.object.put",(0,i.pre)((0,o.preDagNodeFromJson)(0),(0,a.preBufferFromJson)(0),function(){for(var t=arguments.length,e=Array(t),r=0;r{for(var e of t)e.unregister()}),document.querySelector("#id").addEventListener("click",async()=>{if(!i)return alert("Service worker not registered");const{agentVersion:t,id:e}=await i.id();alert(`${t} ${e}`)}),document.querySelector("#show").addEventListener("click",()=>{const t=document.querySelector("#input").value;i?!i||!t||t.length<4?alert(`invalid multihash received: ${t}`):window.location.href=`/ipfs/${t}`:alert("Service worker not registered")}),document.querySelector("#serviceWorkerStart").addEventListener("click",()=>{i||(o(),document.querySelector("#serviceWorkerStart").classList.add("disable-button"),document.querySelector("#serviceWorkerStop").classList.remove("disable-button"))}),document.querySelector("#serviceWorkerStop").addEventListener("click",()=>{i&&(s(),document.querySelector("#serviceWorkerStart").classList.remove("disable-button"),document.querySelector("#serviceWorkerStop").classList.add("disable-button"))});const o=()=>{"serviceWorker"in navigator&&navigator.serviceWorker.register("service-worker-bundle.js").then(t=>{i=n({addListener:navigator.serviceWorker.addEventListener.bind(navigator.serviceWorker),postMessage:t=>navigator.serviceWorker.controller.postMessage(t)})}).catch(t=>{console.log("-> Failed to register:",t)})},s=()=>{"serviceWorker"in navigator&&navigator.serviceWorker.ready.then(t=>{t.unregister(),i=null})}}]); \ No newline at end of file +/** + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.8.0 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2018 + * @license MIT + */ +!function(){"use strict";var s="input is invalid type",a="object"==typeof window,u=a?window:{};u.JS_SHA3_NO_WINDOW&&(a=!1);var c=!a&&"object"==typeof self;!u.JS_SHA3_NO_NODE_JS&&"object"==typeof n&&n.versions&&n.versions.node?u=i:c&&(u=self);var f=!u.JS_SHA3_NO_COMMON_JS&&"object"==typeof e&&e.exports,l=r(183),h=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,p="0123456789abcdef".split(""),d=[4,1024,262144,67108864],y=[0,8,16,24],g=[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],v=[128,256],b=["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)}),!h||!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 K(e,t,e).update(n)[r]()}},S=function(e,t,r){return function(n,i){return new K(e,t,i).update(n)[r]()}},w=function(e,t,r){return function(t,n,i,o){return T["cshake"+e].update(t,n,i,o)[r]()}},k=function(e,t,r){return function(t,n,i,o){return T["kmac"+e].update(t,n,i,o)[r]()}},A=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 O(e,t,r){K.call(this,e,t,r)}K.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(s);if(null===e)throw new Error(s);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(s);t=!0}for(var n,i,o=this.blocks,a=this.byteCount,u=e.length,c=this.blockCount,f=0,l=this.s;f>2]|=e[f]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(o[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=o[c],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},K.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(s);if(null===e)throw new Error(s);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(s);t=!0}var n=0,i=e.length;if(t)n=i;else for(var o=0;o=57344?n+=3:(a=65536+((1023&a)<<10|1023&e.charCodeAt(++o)),n+=4)}return n+=this.encode(8*n),this.update(e),n},K.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]+p[15&e]+p[e>>12&15]+p[e>>8&15]+p[e>>20&15]+p[e>>16&15]+p[e>>28&15]+p[e>>24&15];s%t==0&&(D(r),o=0)}return i&&(e=r[o],a+=p[e>>4&15]+p[15&e],i>1&&(a+=p[e>>12&15]+p[e>>8&15]),i>2&&(a+=p[e>>20&15]+p[e>>16&15])),a},K.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,s=0,a=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(a);for(var u=new Uint32Array(e);s>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;a%r==0&&D(n)}return o&&(e=a<<2,t=n[s],u[e]=255&t,o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u},O.prototype=new K,O.prototype.finalize=function(){return this.encode(this.outputBits,!0),K.prototype.finalize.call(this)};var D=function(e){var t,r,n,i,o,s,a,u,c,f,l,h,p,d,y,m,v,b,_,E,S,w,k,A,C,B,T,I,x,M,N,L,R,P,K,O,D,U,j,F,V,q,J,H,z,G,Y,W,$,Q,Z,X,ee,te,re,ne,ie,oe,se,ae,ue,ce,fe;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],s=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],c=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|a>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(a<<1|s>>>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|c>>>31),r=o^(c<<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=s^(f<<1|l>>>31),r=a^(l<<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^(h<<1|p>>>31),r=c^(p<<1|h>>>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|o>>>31),r=l^(o<<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,d=e[0],y=e[1],G=e[11]<<4|e[10]>>>28,Y=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,x=e[21]<<3|e[20]>>>29,ae=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,J=e[41]<<18|e[40]>>>14,P=e[2]<<1|e[3]>>>31,K=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,W=e[22]<<10|e[23]>>>22,$=e[23]<<10|e[22]>>>22,M=e[33]<<13|e[32]>>>19,N=e[32]<<13|e[33]>>>19,ce=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,O=e[14]<<6|e[15]>>>26,D=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,_=e[24]<<11|e[25]>>>21,Q=e[34]<<15|e[35]>>>17,Z=e[35]<<15|e[34]>>>17,L=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,A=e[6]<<28|e[7]>>>4,C=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,U=e[26]<<25|e[27]>>>7,j=e[27]<<25|e[26]>>>7,E=e[36]<<21|e[37]>>>11,S=e[37]<<21|e[36]>>>11,X=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,H=e[8]<<27|e[9]>>>5,z=e[9]<<27|e[8]>>>5,B=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,F=e[38]<<8|e[39]>>>24,V=e[39]<<8|e[38]>>>24,w=e[48]<<14|e[49]>>>18,k=e[49]<<14|e[48]>>>18,e[0]=d^~m&b,e[1]=y^~v&_,e[10]=A^~B&I,e[11]=C^~T&x,e[20]=P^~O&U,e[21]=K^~D&j,e[30]=H^~G&W,e[31]=z^~Y&$,e[40]=te^~ne&oe,e[41]=re^~ie&se,e[2]=m^~b&E,e[3]=v^~_&S,e[12]=B^~I&M,e[13]=T^~x&N,e[22]=O^~U&F,e[23]=D^~j&V,e[32]=G^~W&Q,e[33]=Y^~$&Z,e[42]=ne^~oe&ae,e[43]=ie^~se&ue,e[4]=b^~E&w,e[5]=_^~S&k,e[14]=I^~M&L,e[15]=x^~N&R,e[24]=U^~F&q,e[25]=j^~V&J,e[34]=W^~Q&X,e[35]=$^~Z&ee,e[44]=oe^~ae&ce,e[45]=se^~ue&fe,e[6]=E^~w&d,e[7]=S^~k&y,e[16]=M^~L&A,e[17]=N^~R&C,e[26]=F^~q&P,e[27]=V^~J&K,e[36]=Q^~X&H,e[37]=Z^~ee&z,e[46]=ae^~ce&te,e[47]=ue^~fe&re,e[8]=w^~d&m,e[9]=k^~y&v,e[18]=L^~A&B,e[19]=R^~C&T,e[28]=q^~P&O,e[29]=J^~K&D,e[38]=X^~H&G,e[39]=ee^~z&Y,e[48]=ce^~te&ne,e[49]=fe^~re&ie,e[0]^=g[n],e[1]^=g[n+1]};if(f)e.exports=T;else{for(x=0;x>>16)*t&65535)<<16)}function s(e,t){return e<>>32-t}function a(e){return e=o(e^=e>>>16,2246822507),e=o(e^=e>>>13,3266489909),e^=e>>>16}function u(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 c(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 f(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=h(e=c(e,[4283543511,3981806797]),[0,e[0]>>>1]),e=h(e=c(e,[3301882366,444984403]),[0,e[0]>>>1])}i.x86.hash32=function(e,t){t=t||0;for(var r=(e=e||"").length%4,n=e.length-r,i=t,u=0,c=3432918353,f=461845907,l=0;l>>0},i.x86.hash128=function(e,t){t=t||0;for(var r=(e=e||"").length%16,n=e.length-r,i=t,u=t,c=t,f=t,l=0,h=0,p=0,d=0,y=597399067,g=2869860233,m=951274213,v=2716044179,b=0;b>>0).toString(16)).slice(-8)+("00000000"+(u>>>0).toString(16)).slice(-8)+("00000000"+(c>>>0).toString(16)).slice(-8)+("00000000"+(f>>>0).toString(16)).slice(-8)},i.x64.hash128=function(e,t){t=t||0;for(var r=(e=e||"").length%16,n=e.length-r,i=[0,t],o=[0,t],s=[0,0],a=[0,0],d=[2277735313,289559509],y=[1291169091,658871167],g=0;g>>0).toString(16)).slice(-8)+("00000000"+(i[1]>>>0).toString(16)).slice(-8)+("00000000"+(o[0]>>>0).toString(16)).slice(-8)+("00000000"+(o[1]>>>0).toString(16)).slice(-8)},e.exports&&(t=e.exports=i),t.murmurHash3=i}()},function(e,t,r){"use strict";(function(t){const n=r(129),i=function(){if(self.crypto)return self.crypto.subtle||self.crypto.webkitSubtle;if(self.msCrypto)return self.msCrypto.subtle}();function o(e){if(!i)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(r,o)=>{const s=i.digest({name:e},r);if("function"!=typeof s.then)return s.onerror=(()=>{o(new Error(`hashing data using ${e}`))}),void(s.oncomplete=(e=>{o(null,e.target.result)}));n(s.then(e=>t.from(new Uint8Array(e))),o)}}e.exports={sha1:function(e,t){o("SHA-1")(e,t)},sha2256:function(e,t){o("SHA-256")(e,t)},sha2512:function(e,t){o("SHA-512")(e,t)}}}).call(this,r(0).Buffer)},function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var n,i,o,s,a,u=1,c={},f=!1,l=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick(function(){d(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){d(e.data)},n=function(e){o.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(i=l.documentElement,n=function(e){var t=l.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):n=function(e){setTimeout(d,0,e)}:(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&d(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),n=function(t){e.postMessage(s+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;ri(n=>{const i=r.init(e,null);return r.update(i,n),t.from(r.digest(i))});e.exports=(e=>{for(let t=0;t<64;t++)e[45569+t]=a(t+1,o);for(let t=0;t<32;t++)e[45633+t]=a(t+1,s)})}).call(this,r(0).Buffer)},function(e,t,r){var n=r(186);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 o(e,t,r,n){var i=e[t]+r;r<0&&(i+=4294967296);var o=e[t+1]+n;i>=4294967296&&o++,e[t]=i,e[t+1]=o}function s(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function a(e,t,r,n,s,a){var u=l[s],c=l[s+1],h=l[a],p=l[a+1];i(f,e,t),o(f,e,u,c);var d=f[n]^f[e],y=f[n+1]^f[e+1];f[n]=y,f[n+1]=d,i(f,r,n),d=f[t]^f[r],y=f[t+1]^f[r+1],f[t]=d>>>24^y<<8,f[t+1]=y>>>24^d<<8,i(f,e,t),o(f,e,h,p),d=f[n]^f[e],y=f[n+1]^f[e+1],f[n]=d>>>16^y<<16,f[n+1]=y>>>16^d<<16,i(f,r,n),d=f[t]^f[r],y=f[t+1]^f[r+1],f[t]=y>>>31^d<<1,f[t+1]=d>>>31^y<<1}var u=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),c=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),l=new Uint32Array(32);function h(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++)l[r]=s(e.b,4*r);for(r=0;r<12;r++)a(0,8,16,24,c[16*r+0],c[16*r+1]),a(2,10,18,26,c[16*r+2],c[16*r+3]),a(4,12,20,28,c[16*r+4],c[16*r+5]),a(6,14,22,30,c[16*r+6],c[16*r+7]),a(0,10,20,30,c[16*r+8],c[16*r+9]),a(2,12,22,24,c[16*r+10],c[16*r+11]),a(4,14,16,26,c[16*r+12],c[16*r+13]),a(6,8,18,28,c[16*r+14],c[16*r+15]);for(r=0;r<16;r++)e.h[r]=e.h[r]^f[r]^f[r+16]}function p(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&&(d(r,t),r.c=128),r}function d(e,t){for(var r=0;r>2]>>8*(3&r);return t}function g(e,t,r){r=r||64,e=n.normalizeInput(e);var i=p(r,t);return d(i,e),y(i)}e.exports={blake2b:g,blake2bHex:function(e,t,r){var i=g(e,t,r);return n.toHex(i)},blake2bInit:p,blake2bUpdate:d,blake2bFinal:y}},function(e,t,r){var n=r(186);function i(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function o(e,t,r,n,i,o){c[e]=c[e]+c[t]+i,c[n]=s(c[n]^c[e],16),c[r]=c[r]+c[n],c[t]=s(c[t]^c[r],12),c[e]=c[e]+c[t]+o,c[n]=s(c[n]^c[e],8),c[r]=c[r]+c[n],c[t]=s(c[t]^c[r],7)}function s(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]),c=new Uint32Array(16),f=new Uint32Array(16);function l(e,t){var r=0;for(r=0;r<8;r++)c[r]=e.h[r],c[r+8]=a[r];for(c[12]^=e.t,c[13]^=e.t/4294967296,t&&(c[14]=~c[14]),r=0;r<16;r++)f[r]=i(e.b,4*r);for(r=0;r<10;r++)o(0,4,8,12,f[u[16*r+0]],f[u[16*r+1]]),o(1,5,9,13,f[u[16*r+2]],f[u[16*r+3]]),o(2,6,10,14,f[u[16*r+4]],f[u[16*r+5]]),o(3,7,11,15,f[u[16*r+6]],f[u[16*r+7]]),o(0,5,10,15,f[u[16*r+8]],f[u[16*r+9]]),o(1,6,11,12,f[u[16*r+10]],f[u[16*r+11]]),o(2,7,8,13,f[u[16*r+12]],f[u[16*r+13]]),o(3,4,9,14,f[u[16*r+14]],f[u[16*r+15]]);for(r=0;r<8;r++)e.h[r]^=c[r]^c[r+8]}function h(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&&(p(n,t),n.c=64),n}function p(e,t){for(var r=0;r>2]>>8*(3&r)&255;return t}function y(e,t,r){r=r||32,e=n.normalizeInput(e);var i=h(r,t);return p(i,e),d(i)}e.exports={blake2s:y,blake2sHex:function(e,t,r){var i=y(e,t,r);return n.toHex(i)},blake2sInit:h,blake2sUpdate:p,blake2sFinal:d}},function(e,t,r){var n=r(368),i=r(370);e.exports=n,e.exports.parse=n,e.exports.stringify=i},function(e,t,r){var n=r(369),i=["int32","int64","uint32","uint64","sint32","sint64","bool","fixed64","sfixed64","double","fixed32","sfixed32","float"],o=function(e){for(var t={};e.length;)switch(e[0]){case"[":case",":e.shift();var r=e.shift();if("("===r&&(r=e.shift(),e.shift()),"="!==e[0])throw new Error("Unexpected token in field options: "+e[0]);if(e.shift(),"]"===e[0])throw new Error("Unexpected ] in field option");t[r]=e.shift();break;case"]":return e.shift(),t;default:throw new Error("Unexpected token in field options: "+e[0])}throw new Error("No closing tag for field options")},s=function(e){for(var t={name:null,type:null,tag:-1,map:null,oneof:null,required:!1,repeated:!1,options:{}};e.length;)switch(e[0]){case"=":e.shift(),t.tag=Number(e.shift());break;case"map":if(t.type="map",t.map={from:null,to:null},e.shift(),"<"!==e[0])throw new Error("Unexpected token in map type: "+e[0]);if(e.shift(),t.map.from=e.shift(),","!==e[0])throw new Error("Unexpected token in map type: "+e[0]);if(e.shift(),t.map.to=e.shift(),">"!==e[0])throw new Error("Unexpected token in map type: "+e[0]);e.shift(),t.name=e.shift();break;case"repeated":case"required":case"optional":var r=e.shift();t.required="required"===r,t.repeated="repeated"===r,t.type=e.shift(),t.name=e.shift();break;case"[":t.options=o(e);break;case";":if(null===t.name)throw new Error("Missing field name");if(null===t.type)throw new Error("Missing type in message field: "+t.name);if(-1===t.tag)throw new Error("Missing tag number in message field: "+t.name);return e.shift(),t;default:throw new Error("Unexpected token in message field: "+e[0])}throw new Error("No ; found for message field")},a=function(e){for(var t={enums:[],messages:[],fields:[],extends:[],extensions:null};e.length;)switch(e[0]){case"map":case"repeated":case"optional":case"required":t.fields.push(s(e));break;case"enum":t.enums.push(d(e));break;case"message":t.messages.push(f(e));break;case"extensions":t.extensions=c(e);break;case"oneof":e.shift();var r=e.shift();if("{"!==e[0])throw new Error("Unexpected token in oneof: "+e[0]);for(e.shift();"}"!==e[0];){e.unshift("optional");var n=s(e);n.oneof=r,t.fields.push(n)}e.shift();break;case"extend":t.extends.push(u(e));break;case";":e.shift();break;case"reserved":case"option":for(e.shift();";"!==e[0];)e.shift();break;default:e.unshift("optional"),t.fields.push(s(e))}return t},u=function(e){return{name:e[1],message:f(e)}},c=function(e){e.shift();var t=Number(e.shift());if(isNaN(t))throw new Error("Invalid from in extensions definition");if("to"!==e.shift())throw new Error("Expected keyword 'to' in extensions definition");var r=e.shift();if("max"===r&&(r=536870911),r=Number(r),isNaN(r))throw new Error("Invalid to in extensions definition");if(";"!==e.shift())throw new Error("Missing ; in extensions definition");return{from:t,to:r}},f=function(e){e.shift();var t=1,r=[],n={name:e.shift(),enums:[],extends:[],messages:[],fields:[]};if("{"!==e[0])throw new Error("Expected { but found "+e[0]);for(e.shift();e.length;){if("{"===e[0]?t++:"}"===e[0]&&t--,!t)return e.shift(),r=a(r),n.enums=r.enums,n.messages=r.messages,n.fields=r.fields,n.extends=r.extends,n.extensions=r.extensions,n;r.push(e.shift())}if(t)throw new Error("No closing tag for message")},l=function(e){e.shift();var t=e.shift();if(";"!==e[0])throw new Error("Expected ; but found "+e[0]);return e.shift(),t},h=function(e){if(e.shift(),"="!==e[0])throw new Error("Expected = but found "+e[0]);e.shift();var t=e.shift();switch(t){case'"proto2"':t=2;break;case'"proto3"':t=3;break;default:throw new Error("Expected protobuf syntax version but found "+t)}if(";"!==e[0])throw new Error("Expected ; but found "+e[0]);return e.shift(),t},p=function(e){if(e.length<4)throw new Error("Invalid enum value: "+e.slice(0,3).join(" "));if("="!==e[1])throw new Error("Expected = but found "+e[1]);if(";"!==e[3]&&"["!==e[3])throw new Error("Expected ; or [ but found "+e[1]);var t=e.shift();e.shift();var r={value:null,options:{}};return r.value=Number(e.shift()),"["===e[0]&&(r.options=o(e)),e.shift(),{name:t,val:r}},d=function(e){e.shift();var t={},r={name:e.shift(),values:{},options:{}};if("{"!==e[0])throw new Error("Expected { but found "+e[0]);for(e.shift();e.length;){if("}"===e[0])return e.shift(),";"===e[0]&&e.shift(),r;if("option"!==e[0]){var n=p(e);r.values[n.name]=n.val}else t=y(e),r.options[t.name]=t.value}throw new Error("No closing tag for enum")},y=function(e){for(var t=null,r=null,n=function(e){return"true"===e||"false"!==e&&e.replace(/^"+|"+$/gm,"")};e.length;){if(";"===e[0])return e.shift(),{name:t,value:r};switch(e[0]){case"option":e.shift();var i="("===e[0];if(i&&e.shift(),t=e.shift(),i){if(")"!==e[0])throw new Error("Expected ) but found "+e[0]);e.shift()}"."===e[0][0]&&(t+=e.shift());break;case"=":if(e.shift(),null===t)throw new Error("Expected key for option with value: "+e[0]);if(r=n(e.shift()),"optimize_for"===t&&!/^(SPEED|CODE_SIZE|LITE_RUNTIME)$/.test(r))throw new Error("Unexpected value for option optimize_for: "+r);"{"===r&&(r=g(e));break;default:throw new Error("Unexpected token in option: "+e[0])}}},g=function(e){for(var t=function(e){return"true"===e||"false"!==e&&e.replace(/^"+|"+$/gm,"")},r={};e.length;){if("}"===e[0])return e.shift(),r;var n="("===e[0];n&&e.shift();var i=e.shift();if(n){if(")"!==e[0])throw new Error("Expected ) but found "+e[0]);e.shift()}var o=null;switch(e[0]){case":":if(void 0!==r[i])throw new Error("Duplicate option map key "+i);e.shift(),"{"===(o=t(e.shift()))&&(o=g(e)),r[i]=o,";"===e[0]&&e.shift();break;case"{":if(e.shift(),o=g(e),void 0===r[i]&&(r[i]=[]),!Array.isArray(r[i]))throw new Error("Duplicate option map key "+i);r[i].push(o);break;default:throw new Error("Unexpected token in option map: "+e[0])}}throw new Error("No closing tag for option map")},m=function(e){e.shift();var t=e.shift().replace(/^"+|"+$/gm,"");if(";"!==e[0])throw new Error("Unexpected token: "+e[0]+'. Expected ";"');return e.shift(),t},v=function(e){e.shift();var t={name:e.shift(),methods:[],options:{}};if("{"!==e[0])throw new Error("Expected { but found "+e[0]);for(e.shift();e.length;){if("}"===e[0])return e.shift(),";"===e[0]&&e.shift(),t;switch(e[0]){case"option":var r=y(e);if(void 0!==t.options[r.name])throw new Error("Duplicate option "+r.name);t.options[r.name]=r.value;break;case"rpc":t.methods.push(b(e));break;default:throw new Error("Unexpected token in service: "+e[0])}}throw new Error("No closing tag for service")},b=function(e){e.shift();var t={name:e.shift(),input_type:null,output_type:null,client_streaming:!1,server_streaming:!1,options:{}};if("("!==e[0])throw new Error("Expected ( but found "+e[0]);if(e.shift(),"stream"===e[0]&&(e.shift(),t.client_streaming=!0),t.input_type=e.shift(),")"!==e[0])throw new Error("Expected ) but found "+e[0]);if(e.shift(),"returns"!==e[0])throw new Error("Expected returns but found "+e[0]);if(e.shift(),"("!==e[0])throw new Error("Expected ( but found "+e[0]);if(e.shift(),"stream"===e[0]&&(e.shift(),t.server_streaming=!0),t.output_type=e.shift(),")"!==e[0])throw new Error("Expected ) but found "+e[0]);if(e.shift(),";"===e[0])return e.shift(),t;if("{"!==e[0])throw new Error("Expected { but found "+e[0]);for(e.shift();e.length;){if("}"===e[0])return e.shift(),";"===e[0]&&e.shift(),t;if("option"!==e[0])throw new Error("Unexpected token in rpc options: "+e[0]);var r=y(e);if(void 0!==t.options[r.name])throw new Error("Duplicate option "+r.name);t.options[r.name]=r.value}throw new Error("No closing tag for rpc")};e.exports=function(e){for(var t=n(e.toString()),r=0;rt.extensions.to)throw new Error(t.name+" does not declare "+e.tag+" as an extension number");t.fields.push(e)})})}),s.messages.forEach(function(e){e.fields.forEach(function(t){var r,n,o,a;if(t.options&&"true"===t.options.packed&&-1===i.indexOf(t.type)){if(-1===t.type.indexOf(".")){if(e.enums&&e.enums.some(function(e){return e.name===t.type}))return}else{if((r=t.type.split(".")).length>2)throw new Error("what is this?");if(n=r[0],o=r[1],s.messages.some(function(e){if(e.name===n)return a=e,e}),a&&a.enums&&a.enums.some(function(e){return e.name===o}))return}throw new Error("Fields of type "+t.type+' cannot be declared [packed=true]. Only repeated fields of primitive numeric types (types which use the varint, 32-bit, or 64-bit wire types) can be declared "packed". See https://developers.google.com/protocol-buffers/docs/encoding#optional')}})}),s}},function(e,t){e.exports=function(e){var t,r=function(e){return e.trim()};return e.replace(/([;,{}()=:[\]<>]|\/\*|\*\/)/g," $1 ").split(/\n/).map(r).filter(Boolean).map(function(e){var t=e.indexOf("//");return t>-1?e.slice(0,t):e}).map(r).filter(Boolean).join("\n").split(/\s+|\n+/gm).filter((t=!1,function(e){return"/*"===e?(t=!0,!1):"*/"===e?(t=!1,!1):!t}))}},function(e,t){var r=function(e,t){var r=e.repeated?"repeated":e.required?"required":"optional";"map"===e.type&&(r="map<"+e.map.from+","+e.map.to+">"),e.oneof&&(r="");var n=Object.keys(e.options||{}).map(function(t){return t+" = "+e.options[t]}).join(",");return n&&(n=" ["+n+"]"),t.push((r?r+" ":"")+("map"===e.map?"":e.type+" ")+e.name+" = "+e.tag+n+";"),t},n=function(e,t){t.push("message "+e.name+" {"),e.enums||(e.enums=[]),e.enums.forEach(function(e){t.push(i(e,[]))}),e.messages||(e.messages=[]),e.messages.forEach(function(e){t.push(n(e,[]))});var o={};return e.fields||(e.fields=[]),e.fields.forEach(function(e){e.oneof?(o[e.oneof]||(o[e.oneof]=[]),o[e.oneof].push(r(e,[]))):t.push(r(e,[]))}),Object.keys(o).forEach(function(e){o[e].unshift("oneof "+e+" {"),o[e].push("}"),t.push(o[e])}),t.push("}",""),t},i=function(e,t){t.push("enum "+e.name+" {"),e.options||(e.options={});var r=s(e.options,[]);return r.length>1&&t.push(r.slice(0,-1)),Object.keys(e.values).map(function(r){var n=o(e.values[r]);t.push([r+" = "+n+";"])}),t.push("}",""),t},o=function(e,t){var r=Object.keys(e.options||{}).map(function(t){return t+" = "+e.options[t]}).join(",");return r&&(r=" ["+r+"]"),e.value+r},s=function(e,t){var r=Object.keys(e);return r.forEach(function(r){var n=e[r];~r.indexOf(".")&&(r="("+r+")");var i=typeof n;"object"===i?(n=a(n,[])).length&&t.push("option "+r+" = {",n,"};"):("string"===i&&"optimize_for"!==r&&(n='"'+n+'"'),t.push("option "+r+" = "+n+";"))}),r.length>0&&t.push(""),t},a=function(e,t){return Object.keys(e).forEach(function(r){var n=e[r],i=typeof n;"object"===i?Array.isArray(n)?n.forEach(function(e){(e=a(e,[])).length&&t.push(r+" {",e,"}")}):(n=a(n,[])).length&&t.push(r+" {",n,"}"):("string"===i&&(n='"'+n+'"'),t.push(r+": "+n))}),t},u=function(e,t){var r="rpc "+e.name+"(";e.client_streaming&&(r+="stream "),r+=e.input_type+") returns (",e.server_streaming&&(r+="stream "),r+=e.output_type+")",e.options||(e.options={});var n=s(e.options,[]);return n.length>1?t.push(r+" {",n.slice(0,-1),"}"):t.push(r+";"),t},c=function(e){return function(t){return Array.isArray(t)?t.map(c(e+" ")).join("\n"):e+t}};e.exports=function(e){var t=[];return t.push('syntax = "proto'+e.syntax+'";',""),e.package&&t.push("package "+e.package+";",""),e.options||(e.options={}),s(e.options,t),e.enums||(e.enums=[]),e.enums.forEach(function(e){i(e,t)}),e.messages||(e.messages=[]),e.messages.forEach(function(e){n(e,t)}),e.services&&e.services.forEach(function(e){!function(e,t){t.push("service "+e.name+" {"),e.options||(e.options={}),s(e.options,t),e.methods||(e.methods=[]),e.methods.forEach(function(e){t.push(u(e,[]))}),t.push("}","")}(e,t)}),t.map(c("")).join("\n")}},function(e,t,r){"use strict";var n=r(372),i=r(374),o=r(375),s=r(376),a=r(18);e.exports=function(e,t){var r={},u={},c={},f=function(e,t){e.enums&&e.enums.forEach(function(e){e.id=t+(t?".":"")+e.name,u[e.id]=e,f(e,e.id)}),e.messages&&e.messages.forEach(function(n){n.id=t+(t?".":"")+n.name,r[n.id]=n,n.fields.forEach(function(n){if(n.map){var i="Map_"+n.map.from+"_"+n.map.to,o={name:i,enums:[],messages:[],fields:[{name:"key",type:n.map.from,tag:1,repeated:!1,required:!0},{name:"value",type:n.map.to,tag:2,repeated:!1,required:!1}],extensions:null,id:t+(t?".":"")+i};r[o.id]||(r[o.id]=o,e.messages.push(o)),n.type=i,n.repeated=!0}}),f(n,n.id)})};f(e,"");var l=function(e,t){e.messages.forEach(function(r){t[r.name]=h(r.name,e.id)}),e.enums.forEach(function(e){t[e.name]=function(e){if(!e)return null;var t={};return Object.keys(e).forEach(function(r){t[r]=e[r].value}),t}(e.values)}),t.type=2,t.message=!0,t.name=e.name;var r={};e.fields.forEach(function(e){e.oneof&&(r[e.oneof]||(r[e.oneof]=[]),r[e.oneof].push(e.name))});var n=e.fields.map(function(t){return h(t.type,e.id)}),a=s(e,n,r),u=o(e,h,n,r,a),c=i(e,h,n);return u.bytes=c.bytes=0,t.buffer=!0,t.encode=u,t.decode=c,t.encodingLength=a,t},h=function(e,i,o){if(t&&t[e])return t[e];if(n[e])return n[e];var s,f,h=(i?i+"."+e:e).split(".").map(function(t,r,n){return n.slice(0,r).concat(e).join(".")}).reverse().reduce(function(e,t){return e||r[t]||u[t]},null);if(!1===o)return h;if(!h)throw new Error("Could not resolve "+e);return h.values?(s=h,f=Object.keys(s.values||[]).map(function(e){return parseInt(s.values[e].value,10)}),n.make(0,function e(t,r,n){if(!f.length||-1===f.indexOf(t))throw new Error("Invalid enum value: "+t);return a.encode(t,r,n),e.bytes=a.encode.bytes,r},function e(t,r){var n=a.decode(t,r);if(!f.length||-1===f.indexOf(n))throw new Error("Invalid enum value: "+n);return e.bytes=a.decode.bytes,n},a.encodingLength)):c[h.id]||l(h,c[h.id]={})};return(e.enums||[]).concat((e.messages||[]).map(function(e){return h(e.id)}))}},function(e,t,r){"use strict";var n,i,o,s=r(18),a=r(373),u=r(6).Buffer,c=function(e,t,r,n){return t.bytes=r.bytes=0,{type:e,encode:t,decode:r,encodingLength:n}};t.make=c,t.bytes=(n=function(e){return u.isBuffer(e)?e.length:u.byteLength(e)},c(2,i=function(e,t,r){var o=r,a=n(e);return s.encode(a,t,r),r+=s.encode.bytes,u.isBuffer(e)?e.copy(t,r):t.write(e,r,a),r+=a,i.bytes=r-o,t},o=function(e,t){var r=t,n=s.decode(e,t);t+=s.decode.bytes;var i=e.slice(t,t+n);return t+=i.length,o.bytes=t-r,i},function(e){var t=n(e);return s.encodingLength(t)+t})),t.string=function(){var e=function(t,r,n){var i=n,o=u.byteLength(t);return s.encode(o,r,n,"utf-8"),n+=s.encode.bytes,r.write(t,n,o),n+=o,e.bytes=n-i,r},t=function(e,r){var n=r,i=s.decode(e,r);r+=s.decode.bytes;var o=e.toString("utf-8",r,r+i);return r+=i,t.bytes=r-n,o};return c(2,e,t,function(e){var t=u.byteLength(e);return s.encodingLength(t)+t})}(),t.bool=function(){var e=function(t,r,n){return r[n]=t?1:0,e.bytes=1,r},t=function(e,r){var n=e[r]>0;return t.bytes=1,n};return c(0,e,t,function(e){return 1})}(),t.int32=function(){var e=function(t,r){var n=s.decode(t,r);return e.bytes=s.decode.bytes,n>2147483647?n-4294967296:n};return c(0,s.encode,e,function(e){return s.encodingLength(e<0?e+4294967296:e)})}(),t.int64=function(){var e=function(t,r){var n=s.decode(t,r);if(n>=Math.pow(2,63)){for(var i=9;255===t[r+i-1];)i--;i=i||9;var o=u.allocUnsafe(i);t.copy(o,0,r,r+i),o[i-1]=127&o[i-1],n=-1*s.decode(o,0),e.bytes=10}else e.bytes=s.decode.bytes;return n},t=function(e,r,n){if(e<0){var i=n+9;for(s.encode(-1*e,r,n),r[n+=s.encode.bytes-1]=128|r[n];n=0?2*t:-2*t-1;var o=n.encode(t,r,i);return e.bytes=n.encode.bytes,o},t.decode=function e(t,r){var i=n.decode(t,r);return e.bytes=n.decode.bytes,1&i?(i+1)/-2:i/2},t.encodingLength=function(e){return n.encodingLength(e>=0?2*e:-2*e-1)}},function(e,t,r){"use strict";var n=r(18),i=r(132).defined;var o=function(e,t,r){switch(e){case 0:return n.decode(t,r),r+n.decode.bytes;case 1:return r+8;case 2:var i=n.decode(t,r);return r+n.decode.bytes+i;case 3:case 4:throw new Error("Groups are not supported");case 5:return r+4;default:throw new Error("Unknown wire type: "+e)}},s=function(e,t){if(e.map)return{};if(e.repeated)return[];switch(e.type){case"string":return null!=t?t:"";case"bool":return"true"===t;case"float":case"double":case"sfixed32":case"fixed32":case"varint":case"enum":case"uint64":case"uint32":case"int64":case"int32":case"sint64":case"sint32":return parseInt(t||0,10);default:return null}};e.exports=function(e,t,r){for(var a=[],u={},c=[],f=[],l=0;l-1&&delete r[u[f]];if(e.message){var l=n.decode(i,o);o+=n.decode.bytes;var h=e.decode(i,o,o+l);t.map?(r[a]=r[a]||{},r[a][h.key]=h.value):t.repeated?(r[a]=r[a]||[],r[a].push(h)):r[a]=h}else t.repeated?(r[a]=r[a]||[],r[a].push(e.decode(i,o))):r[a]=e.decode(i,o);return o+=e.decode.bytes}return function t(l,h,p){if(null==h&&(h=0),null==p&&(p=l.length),!(p<=l.length&&h<=l.length))throw new Error("Decoded message is not valid");for(var d,g=h,m={};;){if(p<=h){var v,b,_="",E=0;for(E=0;E-1){S=!0;break}S||(v?d.repeated?m[_]=[]:(b=b&&v[b]?v[b].value:v[Object.keys(v)[0]].value,m[_]=parseInt(b||0,10)):m[_]=s(d,b))}return t.bytes=h-g,m}var A=n.decode(l,h);h+=n.decode.bytes;var C=u[A>>3];if(null!=C){var B=r[C];if((d=e.fields[C]).packed){var T=n.decode(l,h);for(T+=h+=n.decode.bytes;h-1){if(v)throw new Error("only one of the properties defined in oneof "+b+" can be set");v=!0}}for(m=0;me.name!==r);else{if(!t.isBuffer(r))return n(new Error("second arg needs to be a name or multihash"),null);u=u.filter(e=>!e.multihash.equals(r))}s(a,u,n)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{put:(0,n.expose)("ipfs.dht.put",(0,i.pre)(t.pre("dht.put"),function(){var t;return(t=e().dht).put.apply(t,arguments)}),t),get:(0,n.expose)("ipfs.dht.get",(0,i.pre)(t.pre("dht.get"),function(){var t;return(t=e().dht).get.apply(t,arguments)}),t),findprovs:(0,n.expose)("ipfs.dht.findprovs",(0,i.pre)((0,a.preBufferFromJson)(0),t.pre("dht.findprovs"),(0,i.post)(function(){var t;return(t=e().dht).findprovs.apply(t,arguments)},function(e){return e.map(function(e){return(0,s.isPeerInfo)(e)?(0,s.peerInfoToJson)(e):e})})),t),findpeer:(0,n.expose)("ipfs.dht.findpeer",(0,i.pre)((0,s.prePeerIdFromJson)(0),t.pre("dht.findpeer"),(0,i.post)(function(){var t;return(t=e().dht).findpeer.apply(t,arguments)},function(e){return(0,s.isPeerInfo)(e)?(0,s.peerInfoToJson)(e):e})),t),provide:(0,n.expose)("ipfs.dht.provide",(0,i.pre)((0,a.preBufferFromJson)(0),(0,a.preArrayOfBufferFromJson)(0),(0,o.preCidFromJson)(0),(0,o.preArrayOfCidFromJson)(0),t.pre("dht.provide"),(0,i.post)(function(){var t;return(t=e().dht).provide.apply(t,arguments)},function(){return null})),t),query:(0,n.expose)("ipfs.dht.query",(0,i.pre)((0,s.prePeerIdFromJson)(0),t.pre("dht.query"),(0,i.post)(function(){var t;return(t=e().dht).query.apply(t,arguments)},function(e){return e.map(function(e){return(0,s.isPeerInfo)(e)?(0,s.peerInfoToJson)(e):e})})),t)}};var n=r(1),i=r(2),o=r(21),s=r(107),a=r(10)},function(e,t,r){"use strict";const n=r(386),i=r(236).ensureMultiaddr,o=r(464),s=r(22);class a{constructor(e){s(e,"Missing peerId. Use Peer.create(cb) to create one"),this.id=e,this.multiaddrs=new o,this.protocols=new Set,this._connectedMultiaddr=void 0}connect(e){if(e=i(e),!this.multiaddrs.has(e)&&e.toString()!==`/ipfs/${this.id.toB58String()}`)throw new Error("can't be connected to missing multiaddr from set");this._connectedMultiaddr=e}disconnect(){this._connectedMultiaddr=void 0}isConnected(){return this._connectedMultiaddr}}a.create=((e,t)=>{if("function"==typeof e)return t=e,e=null,void n.create((e,r)=>{if(e)return t(e);t(null,new a(r))});"function"==typeof e.toJSON?t(null,new a(e)):n.createFromJSON(e,(e,r)=>t(e,new a(r)))}),a.isPeerInfo=(e=>Boolean("object"==typeof e&&e.id&&e.multiaddrs)),e.exports=a},function(e,t,r){"use strict";(function(n){const i=r(13),o=r(387),s=r(22),a=r(9);class u{constructor(e,t,r){s(n.isBuffer(e),"invalid id provided"),t&&r&&s(t.public.bytes.equals(r.bytes),"inconsistent arguments"),this._id=e,this._idB58String=i.toB58String(this.id),this._privKey=t,this._pubKey=r}get id(){return this._id}set id(e){throw new Error("Id is immutable")}get privKey(){return this._privKey}set privKey(e){this._privKey=e}get pubKey(){return this._pubKey?this._pubKey:this._privKey?this._privKey.public:void 0}set pubKey(e){this._pubKey=e}marshalPubKey(){if(this.pubKey)return o.keys.marshalPublicKey(this.pubKey)}marshalPrivKey(){if(this.privKey)return o.keys.marshalPrivateKey(this.privKey)}toPrint(){return this.toJSON()}toJSON(){return{id:this.toB58String(),privKey:c(this.marshalPrivKey()),pubKey:c(this.marshalPubKey())}}toHexString(){return i.toHexString(this.id)}toBytes(){return this.id}toB58String(){return this._idB58String}isEqual(e){if(n.isBuffer(e))return this.id.equals(e);if(e.id)return this.id.equals(e.id);throw new Error("not valid Id")}isValid(e){this.privKey&&this.privKey.public&&this.privKey.public.bytes&&n.isBuffer(this.pubKey.bytes)&&this.privKey.public.bytes.equals(this.pubKey.bytes)?e():e(new Error("Keys not match"))}}function c(e){if(e)return e.toString("base64")}(t=e.exports=u).create=function(e,t){"function"==typeof e&&(t=e,e={}),(e=e||{}).bits=e.bits||2048,a([t=>o.keys.generateKeyPair("RSA",e.bits,t),(e,t)=>e.public.hash((r,n)=>{t(r,n,e)})],(e,r,n)=>{if(e)return t(e);t(null,new u(r,n))})},t.createFromHexString=function(e){return new u(i.fromHexString(e))},t.createFromBytes=function(e){return new u(e)},t.createFromB58String=function(e){return new u(i.fromB58String(e))},t.createFromPubKey=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let r;try{let i=e;if("string"==typeof i&&(i=n.from(e,"base64")),!n.isBuffer(i))throw new Error("Supplied key is neither a base64 string nor a buffer");r=o.keys.unmarshalPublicKey(i)}catch(e){return t(e)}r.hash((e,n)=>{if(e)return t(e);t(null,new u(n,null,r))})},t.createFromPrivKey=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let r=e;try{if("string"==typeof r&&(r=n.from(e,"base64")),!n.isBuffer(r))throw new Error("Supplied key is neither a base64 string nor a buffer")}catch(e){return t(e)}a([e=>o.keys.unmarshalPrivateKey(r,e),(e,t)=>e.public.hash((r,n)=>{t(r,n,e)})],(e,r,n)=>{if(e)return t(e);t(null,new u(r,n,n.public))})},t.createFromJSON=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let r,s,c,f;try{r=i.fromB58String(e.id),s=e.privKey&&n.from(e.privKey,"base64"),c=e.pubKey&&n.from(e.pubKey,"base64"),f=c&&o.keys.unmarshalPublicKey(c)}catch(e){return t(e)}s?a([e=>o.keys.unmarshalPrivateKey(s,e),(e,t)=>e.public.hash((r,n)=>{t(r,n,e)}),(e,t,r)=>{f?f.hash((n,i)=>{r(n,e,t,i)}):r(null,e,t)}],(e,n,i,o)=>e?t(e):f&&!n.equals(o)?t(new Error("Public and private key do not match")):r&&!n.equals(r)?t(new Error("Id and private key do not match")):void t(null,new u(r,i,f))):t(null,new u(r,null,f))},t.isPeerId=function(e){return Boolean("object"==typeof e&&e._id&&e._idB58String)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(190),i=r(389),o=r(409);(t=e.exports).aes=i,t.hmac=n,t.keys=o,t.randomBytes=r(235),t.pbkdf2=r(460)},function(e,t,r){"use strict";e.exports={SHA1:20,SHA256:32,SHA512:64}},function(e,t,r){"use strict";const n=r(390),i={16:"aes-128-ctr",32:"aes-256-ctr"};t.create=function(e,t,r){const o=i[e.length];if(!o)return r(new Error("Invalid key length"));const s=n.createCipheriv(o,e,t),a=n.createDecipheriv(o,e,t);r(null,{encrypt(e,t){t(null,s.update(e))},decrypt(e,t){t(null,a.update(e))}})}},function(e,t,r){"use strict";const n=r(155);e.exports={createCipheriv:n.createCipheriv,createDecipheriv:n.createDecipheriv}},function(e,t,r){var n=r(192),i=r(196),o=r(6).Buffer,s=r(201),a=r(58),u=r(108),c=r(202);function f(e,t,r){a.call(this),this._cache=new h,this._cipher=new u.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}r(7)(f,a),f.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return o.concat(n)};var l=o.alloc(16,16);function h(){this.cache=o.allocUnsafe(0)}function p(e,t,r){var a=n[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=o.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===a.type?new s(a.module,t,r):"auth"===a.type?new i(a.module,t,r):new f(a.module,t,r)}f.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(l))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=o.concat([this.cache,e])},h.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},h.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r>s%8,e._prev=o(e._prev,r?n:i);return a}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i>7;return o}t.encrypt=function(e,t,r){for(var o=t.length,s=n.allocUnsafe(o),a=-1;++a0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,o=n.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,r=o,i=a,t.copy(r,i),a+=s.data.length,s=s.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,r){(function(t){function r(e){try{if(!t.localStorage)return!1}catch(e){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,r(12))},function(e,t,r){"use strict";e.exports=o;var n=r(200),i=r(87);function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}i.inherits=r(56),i.inherits(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){e.exports=r(137)},function(e,t,r){e.exports=r(59)},function(e,t,r){e.exports=r(136).Transform},function(e,t,r){e.exports=r(136).PassThrough},function(e,t,r){var n=r(6).Buffer,i=n.alloc(16,0);function o(e){var t=n.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function s(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}s.prototype.ghash=function(e){for(var t=-1;++t0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},s.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},s.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=s},function(e,t,r){var n=r(196),i=r(6).Buffer,o=r(192),s=r(201),a=r(58),u=r(108),c=r(202);function f(e,t,r){a.call(this),this._cache=new l,this._last=void 0,this._cipher=new u.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function l(){this.cache=i.allocUnsafe(0)}function h(e,t,r){var a=o[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=i.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===a.type?new s(a.module,t,r,!0):"auth"===a.type?new n(a.module,t,r,!0):new f(a.module,t,r)}r(7)(f,a),f.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),n.push(r);return i.concat(n)},f.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var r=-1;for(;++r16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},l.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=c(t,!1,r.key,r.iv);return h(e,n.key,n.iv)},t.createDecipheriv=h},function(e,t,r){"use strict";(function(n){const i=r(25)(r(139)),o=r(75);t=e.exports;const s={rsa:r(418),ed25519:r(436),secp256k1:r(227)(i,r(235))};function a(e){return void 0!==s[e.toLowerCase()]}t.supportedKeys=s,t.keysPBM=i,t.keyStretcher=r(457),t.generateEphemeralKeyPair=r(458),t.generateKeyPair=((e,t,r)=>{let n=s[e.toLowerCase()];if(!n)return r(new Error("invalid or unsupported key type"));n.generateKeyPair(t,r)}),t.generateKeyPairFromSeed=((e,t,r,n)=>{let i=s[e.toLowerCase()];return i?"ed25519"!==e.toLowerCase()?n(new Error("Seed key derivation is unimplemented for RSA or secp256k1")):void i.generateKeyPairFromSeed(t,r,n):n(new Error("invalid or unsupported key type"))}),t.unmarshalPublicKey=(e=>{const t=i.PublicKey.decode(e),r=t.Data;switch(t.Type){case i.KeyType.RSA:return s.rsa.unmarshalRsaPublicKey(r);case i.KeyType.Ed25519:return s.ed25519.unmarshalEd25519PublicKey(r);case i.KeyType.Secp256k1:if(s.secp256k1)return s.secp256k1.unmarshalSecp256k1PublicKey(r);throw new Error("secp256k1 support requires libp2p-crypto-secp256k1 package");default:throw new Error("invalid or unsupported key type")}}),t.marshalPublicKey=((e,t)=>{if(!a(t=(t||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type");return e.bytes}),t.unmarshalPrivateKey=((e,t)=>{let r;try{r=i.PrivateKey.decode(e)}catch(e){return t(e)}const n=r.Data;switch(r.Type){case i.KeyType.RSA:return s.rsa.unmarshalRsaPrivateKey(n,t);case i.KeyType.Ed25519:return s.ed25519.unmarshalEd25519PrivateKey(n,t);case i.KeyType.Secp256k1:return s.secp256k1?s.secp256k1.unmarshalSecp256k1PrivateKey(n,t):t(new Error("secp256k1 support requires libp2p-crypto-secp256k1 package"));default:t(new Error("invalid or unsupported key type"))}}),t.marshalPrivateKey=((e,t)=>{if(!a(t=(t||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type");return e.bytes}),t.import=((e,t,r)=>{try{const i=o.pki.decryptRsaPrivateKey(e,t);if(null===i)throw new Error("Cannot read the key, most likely the password is wrong or not a RSA key");let a=o.asn1.toDer(o.pki.privateKeyToAsn1(i));return a=n.from(a.getBytes(),"binary"),s.rsa.unmarshalRsaPrivateKey(a,r)}catch(e){r(e)}})}).call(this,r(0).Buffer)},function(e,t,r){(function(t){var r={};e.exports=r;var n={};r.encode=function(e,t,r){if("string"!=typeof t)throw new TypeError('"alphabet" must be a string.');if(void 0!==r&&"number"!=typeof r)throw new TypeError('"maxline" must be a number.');var n="";if(e instanceof Uint8Array){var i=0,o=t.length,s=t.charAt(0),a=[0];for(i=0;i0;)a.push(c%o),c=c/o|0}for(i=0;0===e[i]&&i=0;--i)n+=t[a[i]]}else n=function(e,t){var r=0,n=t.length,i=t.charAt(0),o=[0];for(r=0;r0;)o.push(a%n),a=a/n|0}var u="";for(r=0;0===e.at(r)&&r=0;--r)u+=t[o[r]];return u}(e,t);if(r){var f=new RegExp(".{1,"+r+"}","g");n=n.match(f).join("\r\n")}return n},r.decode=function(e,r){if("string"!=typeof e)throw new TypeError('"input" must be a string.');if("string"!=typeof r)throw new TypeError('"alphabet" must be a string.');var i=n[r];if(!i){i=n[r]=[];for(var o=0;o>=8;for(;l>0;)u.push(255&l),l>>=8}for(var h=0;e[h]===a&&h=i.Versions.TLS_1_1.minor&&u.output.putBytes(r),u.update(e.fragment),u.finish(a)&&(e.fragment=u.output,e.length=e.fragment.length(),o=!0),o}function a(e,t,r){if(!r){var n=e-t.length()%e;t.fillWithByte(n-1,n)}return!0}function u(e,t,r){var n=!0;if(r){for(var i=t.length(),o=t.last(),s=i-1-o;s=a?(e.fragment=s.output.getBytes(f-a),c=s.output.getBytes(a)):e.fragment=s.output.getBytes(),e.fragment=n.util.createBuffer(e.fragment),e.length=e.fragment.length();var l=t.macFunction(t.macKey,t.sequenceNumber,e);return t.updateSequenceNumber(),o=function(e,t,r){var i=n.hmac.create();return i.start("SHA1",e),i.update(t),t=i.digest().getBytes(),i.start(null,null),i.update(r),r=i.digest().getBytes(),t===r}(t.macKey,c,l)&&o}},function(e,t,r){var n=r(3);r(215),e.exports=n.mgf=n.mgf||{},n.mgf.mgf1=n.mgf1},function(e,t,r){(function(t){var n=r(3);if(r(112),r(32),r(156),r(8),void 0===i)var i=n.jsbn.BigInteger;var o=n.util.ByteBuffer,s=void 0===t?Uint8Array:t;n.pki=n.pki||{},e.exports=n.pki.ed25519=n.ed25519=n.ed25519||{};var a=n.ed25519;function u(e){var r=e.message;if(r instanceof Uint8Array)return r;var n=e.encoding;if(void 0===r){if(!e.md)throw new TypeError('"options.message" or "options.md" not specified.');r=e.md.digest().getBytes(),n="binary"}if("string"==typeof r&&!n)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if("string"==typeof r){if(void 0!==t)return new t(r,n);r=new o(r,n)}else if(!(r instanceof o))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var i=new s(r.length()),a=0;a=0;--r)P(n,n),1!==r&&K(n,n,t);for(r=0;r<16;++r)e[r]=n[r]}(r,r),K(r,r,i),K(r,r,o),K(r,r,o),K(e[0],r,o),P(n,e[0]),K(n,n,o),k(n,i)&&K(e[0],e[0],g);if(P(n,e[0]),K(n,n,o),k(n,i))return-1;C(e[0])===t[31]>>7&&R(e[0],c,e[0]);return K(e[3],e[0],e[1]),0}(u,n))return-1;for(i=0;i=0};var c=N(),f=N([1]),l=N([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),h=N([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),p=N([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),d=N([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),y=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),g=N([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function m(e,r){var i=n.md.sha512.create(),u=new o(e);i.update(u.getBytes(r),"binary");var c=i.digest().getBytes();if(void 0!==t)return new t(c,"binary");for(var f=new s(a.constants.HASH_BYTE_LENGTH),l=0;l<64;++l)f[l]=c.charCodeAt(l);return f}function v(e,t){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i>8,t[i]-=256*r;t[i]+=r,t[n]=0}for(r=0,i=0;i<32;++i)t[i]+=r-(t[31]>>4)*y[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;++i)t[i]-=r*y[i];for(n=0;n<32;++n)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function b(e){for(var t=new Float64Array(64),r=0;r<64;++r)t[r]=e[r],e[r]=0;v(e,t)}function _(e,t){var r=N(),n=N(),i=N(),o=N(),s=N(),a=N(),u=N(),c=N(),f=N();R(r,e[1],e[0]),R(f,t[1],t[0]),K(r,r,f),L(n,e[0],e[1]),L(f,t[0],t[1]),K(n,n,f),K(i,e[3],t[3]),K(i,i,h),K(o,e[2],t[2]),L(o,o,o),R(s,n,r),R(a,o,i),L(u,o,i),L(c,n,r),K(e[0],s,a),K(e[1],c,u),K(e[2],u,a),K(e[3],s,c)}function E(e,t,r){for(var n=0;n<4;++n)M(e[n],t[n],r)}function S(e,t){var r=N(),n=N(),i=N();!function(e,t){var r,n=N();for(r=0;r<16;++r)n[r]=t[r];for(r=253;r>=0;--r)P(n,n),2!==r&&4!==r&&K(n,n,t);for(r=0;r<16;++r)e[r]=n[r]}(i,t[2]),K(r,t[0],i),K(n,t[1],i),w(e,n),e[31]^=C(r)<<7}function w(e,t){var r,n,i,o=N(),s=N();for(r=0;r<16;++r)s[r]=t[r];for(x(s),x(s),x(s),n=0;n<2;++n){for(o[0]=s[0]-65517,r=1;r<15;++r)o[r]=s[r]-65535-(o[r-1]>>16&1),o[r-1]&=65535;o[15]=s[15]-32767-(o[14]>>16&1),i=o[15]>>16&1,o[14]&=65535,M(s,o,1-i)}for(r=0;r<16;r++)e[2*r]=255&s[r],e[2*r+1]=s[r]>>8}function k(e,t){var r=new s(32),n=new s(32);return w(r,e),w(n,t),A(r,0,n,0)}function A(e,t,r,n){return function(e,t,r,n,i){var o,s=0;for(o=0;o>>8)-1}(e,t,r,n,32)}function C(e){var t=new s(32);return w(t,e),1&t[0]}function B(e,t,r){var n,i;for(I(e[0],c),I(e[1],f),I(e[2],f),I(e[3],c),i=255;i>=0;--i)E(e,t,n=r[i/8|0]>>(7&i)&1),_(t,e),_(e,e),E(e,t,n)}function T(e,t){var r=[N(),N(),N(),N()];I(r[0],p),I(r[1],d),I(r[2],f),K(r[3],p,d),B(e,r,t)}function I(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function x(e){var t,r,n=1;for(t=0;t<16;++t)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function M(e,t,r){for(var n,i=~(r-1),o=0;o<16;++o)n=i&(e[o]^t[o]),e[o]^=n,t[o]^=n}function N(e){var t,r=new Float64Array(16);if(e)for(t=0;t0&&(s=n.util.fillString(String.fromCharCode(0),u)+s),{encapsulation:t.encrypt(s,"NONE"),key:e.generate(s,o)}},decrypt:function(t,r,n){var i=t.decrypt(r,"NONE");return e.generate(i,n)}};return o},n.kem.kdf1=function(e,t){o(this,e,0,t||e.digestLength)},n.kem.kdf2=function(e,t){o(this,e,1,t||e.digestLength)}},function(e,t,r){e.exports=r(45),r(141),r(89),r(208),r(156)},function(e,t,r){var n=r(3);r(61),r(88),r(141),r(89),r(8);var i=e.exports=n.ssh=n.ssh||{};function o(e,t){var r=t.toString(16);r[0]>="8"&&(r="00"+r);var i=n.util.hexToBytes(r);e.putInt32(i.length),e.putBytes(i)}function s(e,t){e.putInt32(t.length),e.putString(t)}function a(){for(var e=n.md.sha1.create(),t=arguments.length,r=0;r0&&(this.state=d[this.state].block)},y.prototype.unblock=function(e){return e=void 0===e?1:e,this.blocks-=e,0===this.blocks&&this.state!==h&&(this.state=c,g(this,0)),this.blocks},y.prototype.sleep=function(e){e=void 0===e?0:e,this.state=d[this.state].sleep;var t=this;this.timeoutId=setTimeout(function(){t.timeoutId=null,t.state=c,g(t,0)},e)},y.prototype.wait=function(e){e.wait(this)},y.prototype.wakeup=function(){this.state===l&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state=c,g(this,0))},y.prototype.cancel=function(){this.state=d[this.state].cancel,this.permitsNeeded=0,null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null),this.subtasks=[]},y.prototype.fail=function(e){if(this.error=!0,m(this,!0),e)e.error=this.error,e.swapTime=this.swapTime,e.userData=this.userData,g(e,0);else{if(null!==this.parent){for(var t=this.parent;null!==t.parent;)t.error=this.error,t.swapTime=this.swapTime,t.userData=this.userData,t=t.parent;m(t,!0)}this.failureCallback&&this.failureCallback(this)}};var g=function(e,t){var r=t>30||+new Date-e.swapTime>20,n=function(t){if(t++,e.state===c)if(r&&(e.swapTime=+new Date),e.subtasks.length>0){var n=e.subtasks.shift();n.error=e.error,n.swapTime=e.swapTime,n.userData=e.userData,n.run(n),n.error||g(n,t)}else m(e),e.error||null!==e.parent&&(e.parent.error=e.error,e.parent.swapTime=e.swapTime,e.parent.userData=e.userData,g(e.parent,t))};r?setTimeout(n,0):n(t)},m=function(e,t){e.state=h,delete o[e.id],null===e.parent&&(e.type in a?0===a[e.type].length?n.log.error(i,"[%s][%s] task queue empty [%s]",e.id,e.name,e.type):a[e.type][0]!==e?n.log.error(i,"[%s][%s] task not first in queue [%s]",e.id,e.name,e.type):(a[e.type].shift(),0===a[e.type].length?delete a[e.type]:a[e.type][0].start()):n.log.error(i,"[%s][%s] task queue missing [%s]",e.id,e.name,e.type),t||(e.error&&e.failureCallback?e.failureCallback(e):!e.error&&e.successCallback&&e.successCallback(e)))};e.exports=n.task=n.task||{},n.task.start=function(e){var t=new y({run:e.run,name:e.name||"?"});t.type=e.type,t.successCallback=e.success||null,t.failureCallback=e.failure||null,t.type in a?a[e.type].push(t):(a[t.type]=[t],function(e){e.error=!1,e.state=d[e.state].start,setTimeout(function(){e.state===c&&(e.swapTime=+new Date,e.run(e),g(e,0))},0)}(t))},n.task.cancel=function(e){e in a&&(a[e]=[a[e][0]])},n.task.createCondition=function(){var e={tasks:{},wait:function(t){t.id in e.tasks||(t.block(),e.tasks[t.id]=t)},notify:function(){var t=e.tasks;for(var r in e.tasks={},t)t[r].unblock()}};return e}},function(e,t,r){"use strict";const n=r(218),i=r(25),o=r(27),s=r(221),a=i(r(139)),u=r(75),c=r(17);class f{constructor(e){this._key=e}verify(e,t,r){h(r),s.hashAndVerify(this._key,t,e,r)}marshal(){return s.utils.jwkToPkix(this._key)}get bytes(){return a.PublicKey.encode({Type:a.KeyType.RSA,Data:this.marshal()})}encrypt(e){return this._key.encrypt(e,"RSAES-PKCS1-V1_5")}equals(e){return this.bytes.equals(e.bytes)}hash(e){h(e),n(this.bytes,"sha2-256",e)}}class l{constructor(e,t){this._key=e,this._publicKey=t}genSecret(){return s.getRandomValues(new Uint8Array(16))}sign(e,t){h(t),s.hashAndSign(this._key,e,t)}get public(){if(!this._publicKey)throw new Error("public key not provided");return new f(this._publicKey)}decrypt(e,t){s.decrypt(this._key,e,t)}marshal(){return s.utils.jwkToPkcs1(this._key)}get bytes(){return a.PrivateKey.encode({Type:a.KeyType.RSA,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){h(e),n(this.bytes,"sha2-256",e)}id(e){this.public.hash((t,r)=>{if(t)return e(t);e(null,o.encode(r))})}export(e,t,r){"function"==typeof t&&(r=t,t=e,e="pkcs-8"),h(r),c(()=>{let n=null,i=null;try{const r=new u.util.ByteBuffer(this.marshal()),o=u.asn1.fromDer(r),s=u.pki.privateKeyFromAsn1(o);if("pkcs-8"===e){const e={algorithm:"aes256",count:1e4,saltSize:16,prfAlgorithm:"sha512"};i=u.pki.encryptRsaPrivateKey(s,t,e)}else n=new Error(`Unknown export format '${e}'`)}catch(e){n=e}r(n,i)})}}function h(e){if("function"!=typeof e)throw new Error("callback is required")}e.exports={RsaPublicKey:f,RsaPrivateKey:l,unmarshalRsaPublicKey:function(e){const t=s.utils.pkixToJwk(e);return new f(t)},unmarshalRsaPrivateKey:function(e,t){const r=s.utils.pkcs1ToJwk(e);s.unmarshalPrivateKey(r,(e,r)=>{if(e)return t(e);t(null,new l(r.privateKey,r.publicKey))})},generateKeyPair:function(e,t){s.generateKey(e,(e,r)=>{if(e)return t(e);t(null,new l(r.privateKey,r.publicKey))})},fromJwk:function(e,t){s.unmarshalPrivateKey(e,(e,r)=>{if(e)return t(e);t(null,new l(r.privateKey,r.publicKey))})}}},function(e,t,r){"use strict";(function(t){const n=r(219),i=r(128),o=r(220),s=r(420),a=o.toCallback,u=o.toBuf,c=o.fromString,f=o.fromNumberTo32BitBuf;e.exports={sha1:s.sha1,sha2256:s.sha2256,sha2512:s.sha2512,sha3512:a(u(n.sha3_512)),sha3384:a(u(n.sha3_384)),sha3256:a(u(n.sha3_256)),sha3224:a(u(n.sha3_224)),shake128:a(u(n.shake_128,256)),shake256:a(u(n.shake_256,512)),keccak224:a(u(n.keccak_224)),keccak256:a(u(n.keccak_256)),keccak384:a(u(n.keccak_384)),keccak512:a(u(n.keccak_512)),murmur3128:a(u(c(i.x64.hash128))),murmur332:a(f(c(i.x86.hash32))),addBlake:r(421),dblSha2256:(e,r)=>{s.sha2256(e,(e,n)=>{e&&r(e),s.sha2256(t.from(n),r)})}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(129),i=function(){if(self.crypto)return self.crypto.subtle||self.crypto.webkitSubtle;if(self.msCrypto)return self.msCrypto.subtle}();function o(e){if(!i)throw new Error("Please use a browser with webcrypto support");return(r,o)=>{const s=i.digest({name:e},r);if("function"!=typeof s.then)return s.onerror=(()=>{o(new Error(`hashing data using ${e}`))}),void(s.oncomplete=(e=>{o(null,e.target.result)}));n(s.then(e=>t.from(new Uint8Array(e))),o)}}e.exports={sha1:function(e,t){o("SHA-1")(e,t)},sha2256:function(e,t){o("SHA-256")(e,t)},sha2512:function(e,t){o("SHA-512")(e,t)}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(130),i=r(220).toCallback,o={init:n.blake2bInit,update:n.blake2bUpdate,digest:n.blake2bFinal},s={init:n.blake2sInit,update:n.blake2sUpdate,digest:n.blake2sFinal},a=(e,r)=>i(n=>{const i=r.init(e,null);return r.update(i,n),t.from(r.digest(i))});e.exports=(e=>{for(let t=0;t<64;t++)e[45569+t]=a(t+1,o);for(let t=0;t<32;t++)e[45633+t]=a(t+1,s)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(36),i=r(226),o=i.toBase64,s=i.toBn,a=n.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}),u=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid({"1.2.840.113549.1.1.1":"rsa"}),this.key("none").optional().null_(),this.key("curve").optional().objid(),this.key("params").optional().seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()))}),c=n.define("RSAPublicKey",function(){this.seq().obj(this.key("algorithm").use(u),this.key("subjectPublicKey").bitstr())}),f=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});t.pkcs1ToJwk=function(e){const t=a.decode(e,"der");return{kty:"RSA",n:o(t.modulus),e:o(t.publicExponent),d:o(t.privateExponent),p:o(t.prime1),q:o(t.prime2),dp:o(t.exponent1),dq:o(t.exponent2),qi:o(t.coefficient),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkcs1=function(e){return a.encode({version:0,modulus:s(e.n),publicExponent:s(e.e),privateExponent:s(e.d),prime1:s(e.p),prime2:s(e.q),exponent1:s(e.dp),exponent2:s(e.dq),coefficient:s(e.qi)},"der")},t.pkixToJwk=function(e){const t=c.decode(e,"der"),r=f.decode(t.subjectPublicKey.data,"der");return{kty:"RSA",n:o(r.modulus),e:o(r.publicExponent),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkix=function(e){return c.encode({algorithm:{algorithm:"rsa",none:null},subjectPublicKey:{data:f.encode({modulus:s(e.n),publicExponent:s(e.e)},"der")}},"der")}},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s=r(424).Buffer}catch(e){}function a(e,t,r){for(var n=0,i=Math.min(e.length,r),o=t;o=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function u(e,t,r,n){for(var i=0,o=Math.min(e.length,r),s=t;s=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=a(e,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==t&&(i=a(e,t,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,c=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c>>26,l=67108863&u,h=Math.min(c,t.length-1),p=Math.max(0,c-e.length+1);p<=h;p++){var d=c-p|0;f+=(s=(i=0|e.words[d])*(o=0|t.words[p])+l)/67108864|0,l=67108863&s}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var h=f[e],p=l[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var y=d.modn(p).toString(e);r=(d=d.idivn(p)).isZero()?y+r:c[h-y.length]+y+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==s),this.toArrayLike(s,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,c=new e(o),f=this.clone();if(u){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),c[a]=s;for(;a=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==o&&s>26,this.words[s]=67108863&t;if(0===o&&s>>13,p=0|s[1],d=8191&p,y=p>>>13,g=0|s[2],m=8191&g,v=g>>>13,b=0|s[3],_=8191&b,E=b>>>13,S=0|s[4],w=8191&S,k=S>>>13,A=0|s[5],C=8191&A,B=A>>>13,T=0|s[6],I=8191&T,x=T>>>13,M=0|s[7],N=8191&M,L=M>>>13,R=0|s[8],P=8191&R,K=R>>>13,O=0|s[9],D=8191&O,U=O>>>13,j=0|a[0],F=8191&j,V=j>>>13,q=0|a[1],J=8191&q,H=q>>>13,z=0|a[2],G=8191&z,Y=z>>>13,W=0|a[3],$=8191&W,Q=W>>>13,Z=0|a[4],X=8191&Z,ee=Z>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ue=8191&ae,ce=ae>>>13,fe=0|a[8],le=8191&fe,he=fe>>>13,pe=0|a[9],de=8191&pe,ye=pe>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(c+(n=Math.imul(l,F))|0)+((8191&(i=(i=Math.imul(l,V))+Math.imul(h,F)|0))<<13)|0;c=((o=Math.imul(h,V))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(d,F),i=(i=Math.imul(d,V))+Math.imul(y,F)|0,o=Math.imul(y,V);var me=(c+(n=n+Math.imul(l,J)|0)|0)+((8191&(i=(i=i+Math.imul(l,H)|0)+Math.imul(h,J)|0))<<13)|0;c=((o=o+Math.imul(h,H)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,F),i=(i=Math.imul(m,V))+Math.imul(v,F)|0,o=Math.imul(v,V),n=n+Math.imul(d,J)|0,i=(i=i+Math.imul(d,H)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,H)|0;var ve=(c+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(h,G)|0))<<13)|0;c=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(_,F),i=(i=Math.imul(_,V))+Math.imul(E,F)|0,o=Math.imul(E,V),n=n+Math.imul(m,J)|0,i=(i=i+Math.imul(m,H)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,H)|0,n=n+Math.imul(d,G)|0,i=(i=i+Math.imul(d,Y)|0)+Math.imul(y,G)|0,o=o+Math.imul(y,Y)|0;var be=(c+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,Q)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,Q)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,F),i=(i=Math.imul(w,V))+Math.imul(k,F)|0,o=Math.imul(k,V),n=n+Math.imul(_,J)|0,i=(i=i+Math.imul(_,H)|0)+Math.imul(E,J)|0,o=o+Math.imul(E,H)|0,n=n+Math.imul(m,G)|0,i=(i=i+Math.imul(m,Y)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,Y)|0,n=n+Math.imul(d,$)|0,i=(i=i+Math.imul(d,Q)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,Q)|0;var _e=(c+(n=n+Math.imul(l,X)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(h,X)|0))<<13)|0;c=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(C,F),i=(i=Math.imul(C,V))+Math.imul(B,F)|0,o=Math.imul(B,V),n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,H)|0,n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,Y)|0,n=n+Math.imul(m,$)|0,i=(i=i+Math.imul(m,Q)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,Q)|0,n=n+Math.imul(d,X)|0,i=(i=i+Math.imul(d,ee)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,ee)|0;var Ee=(c+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(h,re)|0))<<13)|0;c=((o=o+Math.imul(h,ne)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(I,F),i=(i=Math.imul(I,V))+Math.imul(x,F)|0,o=Math.imul(x,V),n=n+Math.imul(C,J)|0,i=(i=i+Math.imul(C,H)|0)+Math.imul(B,J)|0,o=o+Math.imul(B,H)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,Q)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,Q)|0,n=n+Math.imul(m,X)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(d,re)|0,i=(i=i+Math.imul(d,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0;var Se=(c+(n=n+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,se)|0)+Math.imul(h,oe)|0))<<13)|0;c=((o=o+Math.imul(h,se)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(N,F),i=(i=Math.imul(N,V))+Math.imul(L,F)|0,o=Math.imul(L,V),n=n+Math.imul(I,J)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,H)|0,n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,Y)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,Q)|0,n=n+Math.imul(_,X)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,ee)|0,n=n+Math.imul(m,re)|0,i=(i=i+Math.imul(m,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0,n=n+Math.imul(d,oe)|0,i=(i=i+Math.imul(d,se)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,se)|0;var we=(c+(n=n+Math.imul(l,ue)|0)|0)+((8191&(i=(i=i+Math.imul(l,ce)|0)+Math.imul(h,ue)|0))<<13)|0;c=((o=o+Math.imul(h,ce)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(P,F),i=(i=Math.imul(P,V))+Math.imul(K,F)|0,o=Math.imul(K,V),n=n+Math.imul(N,J)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(L,J)|0,o=o+Math.imul(L,H)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(x,G)|0,o=o+Math.imul(x,Y)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,Q)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Q)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(E,re)|0,o=o+Math.imul(E,ne)|0,n=n+Math.imul(m,oe)|0,i=(i=i+Math.imul(m,se)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,se)|0,n=n+Math.imul(d,ue)|0,i=(i=i+Math.imul(d,ce)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,ce)|0;var ke=(c+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,he)|0)+Math.imul(h,le)|0))<<13)|0;c=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(D,F),i=(i=Math.imul(D,V))+Math.imul(U,F)|0,o=Math.imul(U,V),n=n+Math.imul(P,J)|0,i=(i=i+Math.imul(P,H)|0)+Math.imul(K,J)|0,o=o+Math.imul(K,H)|0,n=n+Math.imul(N,G)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(L,G)|0,o=o+Math.imul(L,Y)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,Q)|0,n=n+Math.imul(C,X)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,se)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,se)|0,n=n+Math.imul(m,ue)|0,i=(i=i+Math.imul(m,ce)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,ce)|0,n=n+Math.imul(d,le)|0,i=(i=i+Math.imul(d,he)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,he)|0;var Ae=(c+(n=n+Math.imul(l,de)|0)|0)+((8191&(i=(i=i+Math.imul(l,ye)|0)+Math.imul(h,de)|0))<<13)|0;c=((o=o+Math.imul(h,ye)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,J),i=(i=Math.imul(D,H))+Math.imul(U,J)|0,o=Math.imul(U,H),n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(K,G)|0,o=o+Math.imul(K,Y)|0,n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,Q)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,Q)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,se)|0,n=n+Math.imul(_,ue)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(E,ue)|0,o=o+Math.imul(E,ce)|0,n=n+Math.imul(m,le)|0,i=(i=i+Math.imul(m,he)|0)+Math.imul(v,le)|0,o=o+Math.imul(v,he)|0;var Ce=(c+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,ye)|0)+Math.imul(y,de)|0))<<13)|0;c=((o=o+Math.imul(y,ye)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(D,G),i=(i=Math.imul(D,Y))+Math.imul(U,G)|0,o=Math.imul(U,Y),n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,Q)|0)+Math.imul(K,$)|0,o=o+Math.imul(K,Q)|0,n=n+Math.imul(N,X)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,n=n+Math.imul(_,le)|0,i=(i=i+Math.imul(_,he)|0)+Math.imul(E,le)|0,o=o+Math.imul(E,he)|0;var Be=(c+(n=n+Math.imul(m,de)|0)|0)+((8191&(i=(i=i+Math.imul(m,ye)|0)+Math.imul(v,de)|0))<<13)|0;c=((o=o+Math.imul(v,ye)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(D,$),i=(i=Math.imul(D,Q))+Math.imul(U,$)|0,o=Math.imul(U,Q),n=n+Math.imul(P,X)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(K,X)|0,o=o+Math.imul(K,ee)|0,n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(L,re)|0,o=o+Math.imul(L,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,se)|0,n=n+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(B,ue)|0,o=o+Math.imul(B,ce)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,he)|0;var Te=(c+(n=n+Math.imul(_,de)|0)|0)+((8191&(i=(i=i+Math.imul(_,ye)|0)+Math.imul(E,de)|0))<<13)|0;c=((o=o+Math.imul(E,ye)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,X),i=(i=Math.imul(D,ee))+Math.imul(U,X)|0,o=Math.imul(U,ee),n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(K,re)|0,o=o+Math.imul(K,ne)|0,n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(L,oe)|0,o=o+Math.imul(L,se)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(x,ue)|0,o=o+Math.imul(x,ce)|0,n=n+Math.imul(C,le)|0,i=(i=i+Math.imul(C,he)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,he)|0;var Ie=(c+(n=n+Math.imul(w,de)|0)|0)+((8191&(i=(i=i+Math.imul(w,ye)|0)+Math.imul(k,de)|0))<<13)|0;c=((o=o+Math.imul(k,ye)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(D,re),i=(i=Math.imul(D,ne))+Math.imul(U,re)|0,o=Math.imul(U,ne),n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,se)|0)+Math.imul(K,oe)|0,o=o+Math.imul(K,se)|0,n=n+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,ce)|0)+Math.imul(L,ue)|0,o=o+Math.imul(L,ce)|0,n=n+Math.imul(I,le)|0,i=(i=i+Math.imul(I,he)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,he)|0;var xe=(c+(n=n+Math.imul(C,de)|0)|0)+((8191&(i=(i=i+Math.imul(C,ye)|0)+Math.imul(B,de)|0))<<13)|0;c=((o=o+Math.imul(B,ye)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,oe),i=(i=Math.imul(D,se))+Math.imul(U,oe)|0,o=Math.imul(U,se),n=n+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(K,ue)|0,o=o+Math.imul(K,ce)|0,n=n+Math.imul(N,le)|0,i=(i=i+Math.imul(N,he)|0)+Math.imul(L,le)|0,o=o+Math.imul(L,he)|0;var Me=(c+(n=n+Math.imul(I,de)|0)|0)+((8191&(i=(i=i+Math.imul(I,ye)|0)+Math.imul(x,de)|0))<<13)|0;c=((o=o+Math.imul(x,ye)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(D,ue),i=(i=Math.imul(D,ce))+Math.imul(U,ue)|0,o=Math.imul(U,ce),n=n+Math.imul(P,le)|0,i=(i=i+Math.imul(P,he)|0)+Math.imul(K,le)|0,o=o+Math.imul(K,he)|0;var Ne=(c+(n=n+Math.imul(N,de)|0)|0)+((8191&(i=(i=i+Math.imul(N,ye)|0)+Math.imul(L,de)|0))<<13)|0;c=((o=o+Math.imul(L,ye)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(D,le),i=(i=Math.imul(D,he))+Math.imul(U,le)|0,o=Math.imul(U,he);var Le=(c+(n=n+Math.imul(P,de)|0)|0)+((8191&(i=(i=i+Math.imul(P,ye)|0)+Math.imul(K,de)|0))<<13)|0;c=((o=o+Math.imul(K,ye)|0)+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863;var Re=(c+(n=Math.imul(D,de))|0)+((8191&(i=(i=Math.imul(D,ye))+Math.imul(U,de)|0))<<13)|0;return c=((o=Math.imul(U,ye))+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,u[0]=ge,u[1]=me,u[2]=ve,u[3]=be,u[4]=_e,u[5]=Ee,u[6]=Se,u[7]=we,u[8]=ke,u[9]=Ae,u[10]=Ce,u[11]=Be,u[12]=Te,u[13]=Ie,u[14]=xe,u[15]=Me,u[16]=Ne,u[17]=Le,u[18]=Re,0!==c&&(u[19]=c,r.length++),r};function d(e,t,r){return(new y).mulp(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):r<63?h(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):d(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},y.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,c=0;c=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&a}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==t){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/s|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);a&&(a.words[l]=h)}return a&&a.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=t.clone();!t.isZero();){for(var h=0,p=1;0==(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(f),s.isub(l)),i.iushrn(1),s.iushrn(1);for(var d=0,y=1;0==(r.words[0]&y)&&d<26;++d,y<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(f),u.isub(l)),a.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(u)):(r.isub(t),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(t.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,h=1;0==(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function m(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function w(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},m.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},m.prototype.split=function(e,t){e.iushrn(this.n,0,t)},m.prototype.imulK=function(e){return e.imul(this.k)},i(v,m),v.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new b;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new E}return g[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,i),h=this.pow(e,i.addn(1).iushrn(1)),p=this.pow(e,i),d=s;0!==p.cmp(a);){for(var y=p,g=0;0!==y.cmp(a);g++)y=y.redSqr();n(g=0;n--){for(var c=t.words[n],f=u-1;f>=0;f--){var l=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4===++a||0===n&&0===f)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new w(e)},i(w,S),w.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},w.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},w.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},w.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},w.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(50)(e))},function(e,t){},function(e,t,r){"use strict";const n=r(36),i=r(7);function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new o(e,t)},o.prototype._createNamed=function(e){let t;try{t=r(426).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){t=function(e){this._initNamed(e)}}return i(t,e),t.prototype._initNamed=function(t){e.call(this,t)},new t(this)},o.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n.decoders[e])),this.decoders[e]},o.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},o.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n.encoders[e])),this.encoders[e]},o.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},function(module,exports,__webpack_require__){var indexOf=__webpack_require__(427),Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in e)t.push(r);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r{if(t)return e(t);e(null,o.encode(r))})}}function f(e){if("function"!=typeof e)throw new Error("callback is required")}function l(e,r){if(t.isBuffer(e)&&(e=new Uint8Array(e)),!(e instanceof Uint8Array)||e.length!==r)throw new Error("Key must be a Uint8Array or Buffer of length "+r);return e}e.exports={Ed25519PublicKey:u,Ed25519PrivateKey:c,unmarshalEd25519PrivateKey:function(e,t){try{e=l(e,s.privateKeyLength+s.publicKeyLength)}catch(e){return t(e)}const r=e.slice(0,s.privateKeyLength),n=e.slice(s.privateKeyLength,e.length);t(null,new c(r,n))},unmarshalEd25519PublicKey:function(e){return e=l(e,s.publicKeyLength),new u(e)},generateKeyPair:function(e,t){void 0===t&&"function"==typeof e&&(t=e),s.generateKey((e,r)=>{if(e)return t(e);let n;try{n=new c(r.secretKey,r.publicKey)}catch(e){return void t(e)}t(null,n)})},generateKeyPairFromSeed:function(e,t,r){void 0===r&&"function"==typeof t&&(r=t),s.generateKeyFromSeed(e,(e,t)=>{if(e)return r(e);let n;try{n=new c(t.secretKey,t.publicKey)}catch(e){return void r(e)}r(null,n)})}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(157),i=r(17);t.publicKeyLength=n.sign.publicKeyLength,t.privateKeyLength=n.sign.secretKeyLength,t.generateKey=function(e){i(()=>{let t;try{t=n.sign.keyPair()}catch(t){return e(t)}e(null,t)})},t.generateKeyFromSeed=function(e,t){i(()=>{let r;try{r=n.sign.keyPair.fromSeed(e)}catch(e){return t(e)}t(null,r)})},t.hashAndSign=function(t,r,o){i(()=>{o(null,e.from(n.sign.detached(r,t)))})},t.hashAndVerify=function(e,t,r,o){i(()=>{let i;try{i=n.sign.detached.verify(r,t,e)}catch(e){return o(e)}o(null,i)})}}).call(this,r(0).Buffer)},function(e,t){},function(e,t,r){"use strict";const n=r(265),i=r(29),o=r(17),s="sha2-256";e.exports=(e=>{function t(e){if(!n.privateKeyVerify(e))throw new Error("Invalid private key")}return{generateKey:function(t){let r;do{r=e(32)}while(!n.privateKeyVerify(r));((e,r)=>o(()=>t(e,r)))(null,r)},privateKeyLength:32,hashAndSign:function(e,t,r){const a=(e,t)=>o(()=>r(e,t));i.digest(t,s,(t,r)=>{if(t)return a(t);try{const i=n.sign(r,e),o=n.signatureExport(i.signature);return a(null,o)}catch(t){a(t)}})},hashAndVerify:function(e,t,r,a){const u=(e,t)=>o(()=>a(e,t));i.digest(r,s,(r,i)=>{if(r)return u(r);try{t=n.signatureImport(t);const o=n.verify(i,t,e);return u(null,o)}catch(r){u(r)}})},compressPublicKey:function(e){if(!n.publicKeyVerify(e))throw new Error("Invalid public key");return n.publicKeyConvert(e,!0)},decompressPublicKey:function(e){return n.publicKeyConvert(e,!1)},validatePrivateKey:t,validatePublicKey:function(e){if(!n.publicKeyVerify(e))throw new Error("Invalid public key")},computePublicKey:function(e){return t(e),n.publicKeyCreate(e)}}})},function(e,t,r){"use strict";var n=r(441),i=r(442),o=r(228);function s(e,t){return void 0===e?t:(n.isBoolean(e,o.COMPRESSED_TYPE_INVALID),e)}e.exports=function(e){return{privateKeyVerify:function(t){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),32===t.length&&e.privateKeyVerify(t)},privateKeyExport:function(t,r){n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),r=s(r,!0);var a=e.privateKeyExport(t,r);return i.privateKeyExport(t,a,r)},privateKeyImport:function(t){if(n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),(t=i.privateKeyImport(t))&&32===t.length&&e.privateKeyVerify(t))return t;throw new Error(o.EC_PRIVATE_KEY_IMPORT_DER_FAIL)},privateKeyNegate:function(t){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),e.privateKeyNegate(t)},privateKeyModInverse:function(t){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),e.privateKeyModInverse(t)},privateKeyTweakAdd:function(t,r){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),e.privateKeyTweakAdd(t,r)},privateKeyTweakMul:function(t,r){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),e.privateKeyTweakMul(t,r)},publicKeyCreate:function(t,r){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),r=s(r,!0),e.publicKeyCreate(t,r)},publicKeyConvert:function(t,r){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),r=s(r,!0),e.publicKeyConvert(t,r)},publicKeyVerify:function(t){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),e.publicKeyVerify(t)},publicKeyTweakAdd:function(t,r,i){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),i=s(i,!0),e.publicKeyTweakAdd(t,r,i)},publicKeyTweakMul:function(t,r,i){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),i=s(i,!0),e.publicKeyTweakMul(t,r,i)},publicKeyCombine:function(t,r){n.isArray(t,o.EC_PUBLIC_KEYS_TYPE_INVALID),n.isLengthGTZero(t,o.EC_PUBLIC_KEYS_LENGTH_INVALID);for(var i=0;i=r)throw RangeError(n)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";var n=r(6).Buffer,i=r(443),o=n.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),s=n.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);t.privateKeyExport=function(e,t,r){var i=n.from(r?o:s);return e.copy(i,r?8:9),t.copy(i,r?181:214),i},t.privateKeyImport=function(e){var t=e.length,r=0;if(!(t2||t1?e[r+n-2]<<8:0);if(!(t<(r+=n)+i||t32||t1&&0===t[o]&&!(128&t[o+1]);--r,++o);for(var s=n.concat([n.from([0]),e.s]),a=33,u=0;a>1&&0===s[u]&&!(128&s[u+1]);--a,++u);return i.encode(t.slice(o),s.slice(u))},t.signatureImport=function(e){var t=n.alloc(32,0),r=n.alloc(32,0);try{var o=i.decode(e);if(33===o.r.length&&0===o.r[0]&&(o.r=o.r.slice(1)),o.r.length>32)throw new Error("R length is too long");if(33===o.s.length&&0===o.s[0]&&(o.s=o.s.slice(1)),o.s.length>32)throw new Error("S length is too long")}catch(e){return}return o.r.copy(t,32-o.r.length),o.s.copy(r,32-o.s.length),{r:t,s:r}},t.signatureImportLax=function(e){var t=n.alloc(32,0),r=n.alloc(32,0),i=e.length,o=0;if(48===e[o++]){var s=e[o++];if(!(128&s&&(o+=s-128)>i)&&2===e[o++]){var a=e[o++];if(128&a){if(o+(s=a-128)>i)return;for(;s>0&&0===e[o];o+=1,s-=1);for(a=0;s>0;o+=1,s-=1)a=(a<<8)+e[o]}if(!(a>i-o)){var u=o;if(o+=a,2===e[o++]){var c=e[o++];if(128&c){if(o+(s=c-128)>i)return;for(;s>0&&0===e[o];o+=1,s-=1);for(c=0;s>0;o+=1,s-=1)c=(c<<8)+e[o]}if(!(c>i-o)){var f=o;for(o+=c;a>0&&0===e[u];a-=1,u+=1);if(!(a>32)){var l=e.slice(u,u+a);for(l.copy(t,32-l.length);c>0&&0===e[f];c-=1,f+=1);if(!(c>32)){var h=e.slice(f,f+c);return h.copy(r,32-h.length),{r:t,s:r}}}}}}}}}},function(e,t,r){var n=r(6).Buffer;e.exports={check:function(e){if(e.length<8)return!1;if(e.length>72)return!1;if(48!==e[0])return!1;if(e[1]!==e.length-2)return!1;if(2!==e[2])return!1;var t=e[3];if(0===t)return!1;if(5+t>=e.length)return!1;if(2!==e[4+t])return!1;var r=e[5+t];return!(0===r||6+t+r!==e.length||128&e[4]||t>1&&0===e[4]&&!(128&e[5])||128&e[t+6]||r>1&&0===e[t+6]&&!(128&e[t+7]))},decode:function(e){if(e.length<8)throw new Error("DER sequence length is too short");if(e.length>72)throw new Error("DER sequence length is too long");if(48!==e[0])throw new Error("Expected DER sequence");if(e[1]!==e.length-2)throw new Error("DER sequence length is invalid");if(2!==e[2])throw new Error("Expected DER integer");var t=e[3];if(0===t)throw new Error("R length is zero");if(5+t>=e.length)throw new Error("R length is too long");if(2!==e[4+t])throw new Error("Expected DER integer (2)");var r=e[5+t];if(0===r)throw new Error("S length is zero");if(6+t+r!==e.length)throw new Error("S length is invalid");if(128&e[4])throw new Error("R value is negative");if(t>1&&0===e[4]&&!(128&e[5]))throw new Error("R value excessively padded");if(128&e[t+6])throw new Error("S value is negative");if(r>1&&0===e[t+6]&&!(128&e[t+7]))throw new Error("S value excessively padded");return{r:e.slice(4,4+t),s:e.slice(6+t)}},encode:function(e,t){var r=e.length,i=t.length;if(0===r)throw new Error("R length is zero");if(0===i)throw new Error("S length is zero");if(r>33)throw new Error("R length is too long");if(i>33)throw new Error("S length is too long");if(128&e[0])throw new Error("R value is negative");if(128&t[0])throw new Error("S value is negative");if(r>1&&0===e[0]&&!(128&e[1]))throw new Error("R value excessively padded");if(i>1&&0===t[0]&&!(128&t[1]))throw new Error("S value excessively padded");var o=n.allocUnsafe(6+r+i);return o[0]=48,o[1]=o.length-2,o[2]=2,o[3]=e.length,e.copy(o,4),o[4+r]=2,o[5+r]=t.length,t.copy(o,6+r),o}}},function(e,t,r){"use strict";var n=r(6).Buffer,i=r(445),o=r(450),s=r(228),a=r(113),u=r(233),c=r(456);t.privateKeyVerify=function(e){var t=a.fromBuffer(e);return!(t.isOverflow()||t.isZero())},t.privateKeyExport=function(e,t){var r=a.fromBuffer(e);if(r.isOverflow()||r.isZero())throw new Error(s.EC_PRIVATE_KEY_EXPORT_DER_FAIL);return c.mul(r).toPublicKey(t)},t.privateKeyNegate=function(e){var t=a.fromBuffer(e);return t.isZero()?n.alloc(32):(t.ucmp(a.n)>0&&t.isub(a.n),a.n.sub(t).toBuffer())},t.privateKeyModInverse=function(e){var t=a.fromBuffer(e);if(t.isOverflow()||t.isZero())throw new Error(s.EC_PRIVATE_KEY_RANGE_INVALID);return t.uinvm().toBuffer()},t.privateKeyTweakAdd=function(e,t){var r=a.fromBuffer(t);if(r.isOverflow())throw new Error(s.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);if(r.iadd(a.fromBuffer(e)),r.isOverflow()&&r.isub(a.n),r.isZero())throw new Error(s.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);return r.toBuffer()},t.privateKeyTweakMul=function(e,t){var r=a.fromBuffer(t);if(r.isOverflow()||r.isZero())throw new Error(s.EC_PRIVATE_KEY_TWEAK_MUL_FAIL);var n=a.fromBuffer(e);return r.umul(n).ureduce().toBuffer()},t.publicKeyCreate=function(e,t){var r=a.fromBuffer(e);if(r.isOverflow()||r.isZero())throw new Error(s.EC_PUBLIC_KEY_CREATE_FAIL);return c.mul(r).toPublicKey(t)},t.publicKeyConvert=function(e,t){var r=u.fromPublicKey(e);if(null===r)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);return r.toPublicKey(t)},t.publicKeyVerify=function(e){return null!==u.fromPublicKey(e)},t.publicKeyTweakAdd=function(e,t,r){var n=u.fromPublicKey(e);if(null===n)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);if((t=a.fromBuffer(t)).isOverflow())throw new Error(s.EC_PUBLIC_KEY_TWEAK_ADD_FAIL);var i=c.mul(t).add(n);if(i.inf)throw new Error(s.EC_PUBLIC_KEY_TWEAK_ADD_FAIL);return i.toPublicKey(r)},t.publicKeyTweakMul=function(e,t,r){var n=u.fromPublicKey(e);if(null===n)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);if((t=a.fromBuffer(t)).isOverflow()||t.isZero())throw new Error(s.EC_PUBLIC_KEY_TWEAK_MUL_FAIL);return n.mul(t).toPublicKey(r)},t.publicKeyCombine=function(e,t){for(var r=new Array(e.length),n=0;n=0)&&0===n.iadd(a.psn).redMul(d).ucmp(p.x)},t.recover=function(e,t,r,i){var o=a.fromBuffer(t.slice(0,32)),f=a.fromBuffer(t.slice(32,64));if(o.isOverflow()||f.isOverflow())throw new Error(s.ECDSA_SIGNATURE_PARSE_FAIL);do{if(o.isZero()||f.isZero())break;var l=o;if(r>>1){if(l.ucmp(a.psn)>=0)break;l=o.add(a.n)}var h=n.concat([n.from([2+(1&r)]),l.toBuffer()]),p=u.fromPublicKey(h);if(null===p)break;var d=o.uinvm(),y=a.n.sub(a.fromBuffer(e)).umul(d).ureduce(),g=f.umul(d).ureduce();return u.fromECJPoint(c.mulAdd(y,p,g)).toPublicKey(i)}while(0);throw new Error(s.ECDSA_RECOVER_FAIL)},t.ecdh=function(e,r){var n=t.ecdhUnsafe(e,r,!0);return i("sha256").update(n).digest()},t.ecdhUnsafe=function(e,t,r){var n=u.fromPublicKey(e);if(null===n)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);var i=a.fromBuffer(t);if(i.isOverflow()||i.isZero())throw new Error(s.ECDH_FAIL);return n.mul(i).toPublicKey(r)}},function(e,t,r){"use strict";var n=r(7),i=r(138),o=r(229),s=r(230),a=r(58);function u(e){a.call(this,"digest"),this._hash=e}n(u,a),u.prototype._update=function(e){this._hash.update(e)},u.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new u(s(e))}},function(e,t,r){var n=r(7),i=r(77),o=r(6).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,l=0;l<16;++l)r[l]=e.readInt32BE(4*l);for(;l<80;++l)r[l]=r[l-3]^r[l-8]^r[l-14]^r[l-16];for(var h=0;h<80;++h){var p=~~(h/20),d=0|((t=n)<<5|t>>>27)+f(p,i,o,a)+u+r[h]+s[p];u=a,a=o,o=c(i),i=n,n=d}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},function(e,t,r){var n=r(7),i=r(77),o=r(6).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(e){return e<<5|e>>>27}function f(e){return e<<30|e>>>2}function l(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,h=0;h<16;++h)r[h]=e.readInt32BE(4*h);for(;h<80;++h)r[h]=(t=r[h-3]^r[h-8]^r[h-14]^r[h-16])<<1|t>>>31;for(var p=0;p<80;++p){var d=~~(p/20),y=c(n)+l(d,i,o,a)+u+r[p]+s[d]|0;u=a,a=o,o=f(i),i=n,n=y}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},function(e,t,r){var n=r(7),i=r(231),o=r(77),s=r(6).Buffer,a=new Array(64);function u(){this.init(),this._w=a,o.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},function(e,t,r){var n=r(7),i=r(232),o=r(77),s=r(6).Buffer,a=new Array(160);function u(){this.init(),this._w=a,o.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=u},function(e,t,r){"use strict";(function(t){var n=r(451),i=r(454),o=new t(0),s=new t([0]),a=new t([1]);function u(e,t,r,n){var o=i[e];if(void 0===o)throw new Error("hash "+e+" is not supported");this._algo=e,this._securityStrength=o.securityStrength/8,this._outlen=o.outlen/8,this._reseedInterval=281474976710656,this._init(t,r,n)}u.prototype._update=function(e){var t=n(this._algo,this._K).update(this._V).update(s);e&&t.update(e),this._K=t.digest(),this._V=n(this._algo,this._K).update(this._V).digest(),e&&(this._K=n(this._algo,this._K).update(this._V).update(a).update(e).digest(),this._V=n(this._algo,this._K).update(this._V).digest())},u.prototype._init=function(e,r,n){if(e.lengththis._reseedInterval)throw new Error("Reseed is required");r&&0===r.length&&(r=void 0),r&&this._update(r);for(var i=new t(0);i.lengthr)?t=("rmd160"===e?new u:c(e)).update(t).digest():t.lengtha?t=e(t):t.length>>13,p=0|s[1],d=8191&p,y=p>>>13,g=0|s[2],m=8191&g,v=g>>>13,b=0|s[3],_=8191&b,E=b>>>13,S=0|s[4],w=8191&S,k=S>>>13,A=0|s[5],C=8191&A,B=A>>>13,T=0|s[6],I=8191&T,x=T>>>13,M=0|s[7],N=8191&M,L=M>>>13,R=0|s[8],P=8191&R,K=R>>>13,O=0|s[9],D=8191&O,U=O>>>13,j=0|a[0],F=8191&j,V=j>>>13,q=0|a[1],J=8191&q,H=q>>>13,z=0|a[2],G=8191&z,Y=z>>>13,W=0|a[3],$=8191&W,Q=W>>>13,Z=0|a[4],X=8191&Z,ee=Z>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ue=8191&ae,ce=ae>>>13,fe=0|a[8],le=8191&fe,he=fe>>>13,pe=0|a[9],de=8191&pe,ye=pe>>>13;r.length=19,n=Math.imul(l,F),i=Math.imul(l,V);var ge=c+n+((8191&(i+=Math.imul(h,F)))<<13);c=(o=Math.imul(h,V))+(i>>>13)+(ge>>>26),ge&=67108863,n=Math.imul(d,F),i=Math.imul(d,V),i+=Math.imul(y,F),o=Math.imul(y,V),n+=Math.imul(l,J),i+=Math.imul(l,H);var me=c+n+((8191&(i+=Math.imul(h,J)))<<13);c=(o+=Math.imul(h,H))+(i>>>13)+(me>>>26),me&=67108863,n=Math.imul(m,F),i=Math.imul(m,V),i+=Math.imul(v,F),o=Math.imul(v,V),n+=Math.imul(d,J),i+=Math.imul(d,H),i+=Math.imul(y,J),o+=Math.imul(y,H),n+=Math.imul(l,G),i+=Math.imul(l,Y);var ve=c+n+((8191&(i+=Math.imul(h,G)))<<13);c=(o+=Math.imul(h,Y))+(i>>>13)+(ve>>>26),ve&=67108863,n=Math.imul(_,F),i=Math.imul(_,V),i+=Math.imul(E,F),o=Math.imul(E,V),n+=Math.imul(m,J),i+=Math.imul(m,H),i+=Math.imul(v,J),o+=Math.imul(v,H),n+=Math.imul(d,G),i+=Math.imul(d,Y),i+=Math.imul(y,G),o+=Math.imul(y,Y),n+=Math.imul(l,$),i+=Math.imul(l,Q);var be=c+n+((8191&(i+=Math.imul(h,$)))<<13);c=(o+=Math.imul(h,Q))+(i>>>13)+(be>>>26),be&=67108863,n=Math.imul(w,F),i=Math.imul(w,V),i+=Math.imul(k,F),o=Math.imul(k,V),n+=Math.imul(_,J),i+=Math.imul(_,H),i+=Math.imul(E,J),o+=Math.imul(E,H),n+=Math.imul(m,G),i+=Math.imul(m,Y),i+=Math.imul(v,G),o+=Math.imul(v,Y),n+=Math.imul(d,$),i+=Math.imul(d,Q),i+=Math.imul(y,$),o+=Math.imul(y,Q),n+=Math.imul(l,X),i+=Math.imul(l,ee);var _e=c+n+((8191&(i+=Math.imul(h,X)))<<13);c=(o+=Math.imul(h,ee))+(i>>>13)+(_e>>>26),_e&=67108863,n=Math.imul(C,F),i=Math.imul(C,V),i+=Math.imul(B,F),o=Math.imul(B,V),n+=Math.imul(w,J),i+=Math.imul(w,H),i+=Math.imul(k,J),o+=Math.imul(k,H),n+=Math.imul(_,G),i+=Math.imul(_,Y),i+=Math.imul(E,G),o+=Math.imul(E,Y),n+=Math.imul(m,$),i+=Math.imul(m,Q),i+=Math.imul(v,$),o+=Math.imul(v,Q),n+=Math.imul(d,X),i+=Math.imul(d,ee),i+=Math.imul(y,X),o+=Math.imul(y,ee),n+=Math.imul(l,re),i+=Math.imul(l,ne);var Ee=c+n+((8191&(i+=Math.imul(h,re)))<<13);c=(o+=Math.imul(h,ne))+(i>>>13)+(Ee>>>26),Ee&=67108863,n=Math.imul(I,F),i=Math.imul(I,V),i+=Math.imul(x,F),o=Math.imul(x,V),n+=Math.imul(C,J),i+=Math.imul(C,H),i+=Math.imul(B,J),o+=Math.imul(B,H),n+=Math.imul(w,G),i+=Math.imul(w,Y),i+=Math.imul(k,G),o+=Math.imul(k,Y),n+=Math.imul(_,$),i+=Math.imul(_,Q),i+=Math.imul(E,$),o+=Math.imul(E,Q),n+=Math.imul(m,X),i+=Math.imul(m,ee),i+=Math.imul(v,X),o+=Math.imul(v,ee),n+=Math.imul(d,re),i+=Math.imul(d,ne),i+=Math.imul(y,re),o+=Math.imul(y,ne),n+=Math.imul(l,oe),i+=Math.imul(l,se);var Se=c+n+((8191&(i+=Math.imul(h,oe)))<<13);c=(o+=Math.imul(h,se))+(i>>>13)+(Se>>>26),Se&=67108863,n=Math.imul(N,F),i=Math.imul(N,V),i+=Math.imul(L,F),o=Math.imul(L,V),n+=Math.imul(I,J),i+=Math.imul(I,H),i+=Math.imul(x,J),o+=Math.imul(x,H),n+=Math.imul(C,G),i+=Math.imul(C,Y),i+=Math.imul(B,G),o+=Math.imul(B,Y),n+=Math.imul(w,$),i+=Math.imul(w,Q),i+=Math.imul(k,$),o+=Math.imul(k,Q),n+=Math.imul(_,X),i+=Math.imul(_,ee),i+=Math.imul(E,X),o+=Math.imul(E,ee),n+=Math.imul(m,re),i+=Math.imul(m,ne),i+=Math.imul(v,re),o+=Math.imul(v,ne),n+=Math.imul(d,oe),i+=Math.imul(d,se),i+=Math.imul(y,oe),o+=Math.imul(y,se),n+=Math.imul(l,ue),i+=Math.imul(l,ce);var we=c+n+((8191&(i+=Math.imul(h,ue)))<<13);c=(o+=Math.imul(h,ce))+(i>>>13)+(we>>>26),we&=67108863,n=Math.imul(P,F),i=Math.imul(P,V),i+=Math.imul(K,F),o=Math.imul(K,V),n+=Math.imul(N,J),i+=Math.imul(N,H),i+=Math.imul(L,J),o+=Math.imul(L,H),n+=Math.imul(I,G),i+=Math.imul(I,Y),i+=Math.imul(x,G),o+=Math.imul(x,Y),n+=Math.imul(C,$),i+=Math.imul(C,Q),i+=Math.imul(B,$),o+=Math.imul(B,Q),n+=Math.imul(w,X),i+=Math.imul(w,ee),i+=Math.imul(k,X),o+=Math.imul(k,ee),n+=Math.imul(_,re),i+=Math.imul(_,ne),i+=Math.imul(E,re),o+=Math.imul(E,ne),n+=Math.imul(m,oe),i+=Math.imul(m,se),i+=Math.imul(v,oe),o+=Math.imul(v,se),n+=Math.imul(d,ue),i+=Math.imul(d,ce),i+=Math.imul(y,ue),o+=Math.imul(y,ce),n+=Math.imul(l,le),i+=Math.imul(l,he);var ke=c+n+((8191&(i+=Math.imul(h,le)))<<13);c=(o+=Math.imul(h,he))+(i>>>13)+(ke>>>26),ke&=67108863,n=Math.imul(D,F),i=Math.imul(D,V),i+=Math.imul(U,F),o=Math.imul(U,V),n+=Math.imul(P,J),i+=Math.imul(P,H),i+=Math.imul(K,J),o+=Math.imul(K,H),n+=Math.imul(N,G),i+=Math.imul(N,Y),i+=Math.imul(L,G),o+=Math.imul(L,Y),n+=Math.imul(I,$),i+=Math.imul(I,Q),i+=Math.imul(x,$),o+=Math.imul(x,Q),n+=Math.imul(C,X),i+=Math.imul(C,ee),i+=Math.imul(B,X),o+=Math.imul(B,ee),n+=Math.imul(w,re),i+=Math.imul(w,ne),i+=Math.imul(k,re),o+=Math.imul(k,ne),n+=Math.imul(_,oe),i+=Math.imul(_,se),i+=Math.imul(E,oe),o+=Math.imul(E,se),n+=Math.imul(m,ue),i+=Math.imul(m,ce),i+=Math.imul(v,ue),o+=Math.imul(v,ce),n+=Math.imul(d,le),i+=Math.imul(d,he),i+=Math.imul(y,le),o+=Math.imul(y,he),n+=Math.imul(l,de),i+=Math.imul(l,ye);var Ae=c+n+((8191&(i+=Math.imul(h,de)))<<13);c=(o+=Math.imul(h,ye))+(i>>>13)+(Ae>>>26),Ae&=67108863,n=Math.imul(D,J),i=Math.imul(D,H),i+=Math.imul(U,J),o=Math.imul(U,H),n+=Math.imul(P,G),i+=Math.imul(P,Y),i+=Math.imul(K,G),o+=Math.imul(K,Y),n+=Math.imul(N,$),i+=Math.imul(N,Q),i+=Math.imul(L,$),o+=Math.imul(L,Q),n+=Math.imul(I,X),i+=Math.imul(I,ee),i+=Math.imul(x,X),o+=Math.imul(x,ee),n+=Math.imul(C,re),i+=Math.imul(C,ne),i+=Math.imul(B,re),o+=Math.imul(B,ne),n+=Math.imul(w,oe),i+=Math.imul(w,se),i+=Math.imul(k,oe),o+=Math.imul(k,se),n+=Math.imul(_,ue),i+=Math.imul(_,ce),i+=Math.imul(E,ue),o+=Math.imul(E,ce),n+=Math.imul(m,le),i+=Math.imul(m,he),i+=Math.imul(v,le),o+=Math.imul(v,he),n+=Math.imul(d,de),i+=Math.imul(d,ye);var Ce=c+n+((8191&(i+=Math.imul(y,de)))<<13);c=(o+=Math.imul(y,ye))+(i>>>13)+(Ce>>>26),Ce&=67108863,n=Math.imul(D,G),i=Math.imul(D,Y),i+=Math.imul(U,G),o=Math.imul(U,Y),n+=Math.imul(P,$),i+=Math.imul(P,Q),i+=Math.imul(K,$),o+=Math.imul(K,Q),n+=Math.imul(N,X),i+=Math.imul(N,ee),i+=Math.imul(L,X),o+=Math.imul(L,ee),n+=Math.imul(I,re),i+=Math.imul(I,ne),i+=Math.imul(x,re),o+=Math.imul(x,ne),n+=Math.imul(C,oe),i+=Math.imul(C,se),i+=Math.imul(B,oe),o+=Math.imul(B,se),n+=Math.imul(w,ue),i+=Math.imul(w,ce),i+=Math.imul(k,ue),o+=Math.imul(k,ce),n+=Math.imul(_,le),i+=Math.imul(_,he),i+=Math.imul(E,le),o+=Math.imul(E,he),n+=Math.imul(m,de),i+=Math.imul(m,ye);var Be=c+n+((8191&(i+=Math.imul(v,de)))<<13);c=(o+=Math.imul(v,ye))+(i>>>13)+(Be>>>26),Be&=67108863,n=Math.imul(D,$),i=Math.imul(D,Q),i+=Math.imul(U,$),o=Math.imul(U,Q),n+=Math.imul(P,X),i+=Math.imul(P,ee),i+=Math.imul(K,X),o+=Math.imul(K,ee),n+=Math.imul(N,re),i+=Math.imul(N,ne),i+=Math.imul(L,re),o+=Math.imul(L,ne),n+=Math.imul(I,oe),i+=Math.imul(I,se),i+=Math.imul(x,oe),o+=Math.imul(x,se),n+=Math.imul(C,ue),i+=Math.imul(C,ce),i+=Math.imul(B,ue),o+=Math.imul(B,ce),n+=Math.imul(w,le),i+=Math.imul(w,he),i+=Math.imul(k,le),o+=Math.imul(k,he),n+=Math.imul(_,de),i+=Math.imul(_,ye);var Te=c+n+((8191&(i+=Math.imul(E,de)))<<13);c=(o+=Math.imul(E,ye))+(i>>>13)+(Te>>>26),Te&=67108863,n=Math.imul(D,X),i=Math.imul(D,ee),i+=Math.imul(U,X),o=Math.imul(U,ee),n+=Math.imul(P,re),i+=Math.imul(P,ne),i+=Math.imul(K,re),o+=Math.imul(K,ne),n+=Math.imul(N,oe),i+=Math.imul(N,se),i+=Math.imul(L,oe),o+=Math.imul(L,se),n+=Math.imul(I,ue),i+=Math.imul(I,ce),i+=Math.imul(x,ue),o+=Math.imul(x,ce),n+=Math.imul(C,le),i+=Math.imul(C,he),i+=Math.imul(B,le),o+=Math.imul(B,he),n+=Math.imul(w,de),i+=Math.imul(w,ye);var Ie=c+n+((8191&(i+=Math.imul(k,de)))<<13);c=(o+=Math.imul(k,ye))+(i>>>13)+(Ie>>>26),Ie&=67108863,n=Math.imul(D,re),i=Math.imul(D,ne),i+=Math.imul(U,re),o=Math.imul(U,ne),n+=Math.imul(P,oe),i+=Math.imul(P,se),i+=Math.imul(K,oe),o+=Math.imul(K,se),n+=Math.imul(N,ue),i+=Math.imul(N,ce),i+=Math.imul(L,ue),o+=Math.imul(L,ce),n+=Math.imul(I,le),i+=Math.imul(I,he),i+=Math.imul(x,le),o+=Math.imul(x,he),n+=Math.imul(C,de),i+=Math.imul(C,ye);var xe=c+n+((8191&(i+=Math.imul(B,de)))<<13);c=(o+=Math.imul(B,ye))+(i>>>13)+(xe>>>26),xe&=67108863,n=Math.imul(D,oe),i=Math.imul(D,se),i+=Math.imul(U,oe),o=Math.imul(U,se),n+=Math.imul(P,ue),i+=Math.imul(P,ce),i+=Math.imul(K,ue),o+=Math.imul(K,ce),n+=Math.imul(N,le),i+=Math.imul(N,he),i+=Math.imul(L,le),o+=Math.imul(L,he),n+=Math.imul(I,de),i+=Math.imul(I,ye);var Me=c+n+((8191&(i+=Math.imul(x,de)))<<13);c=(o+=Math.imul(x,ye))+(i>>>13)+(Me>>>26),Me&=67108863,n=Math.imul(D,ue),i=Math.imul(D,ce),i+=Math.imul(U,ue),o=Math.imul(U,ce),n+=Math.imul(P,le),i+=Math.imul(P,he),i+=Math.imul(K,le),o+=Math.imul(K,he),n+=Math.imul(N,de),i+=Math.imul(N,ye);var Ne=c+n+((8191&(i+=Math.imul(L,de)))<<13);c=(o+=Math.imul(L,ye))+(i>>>13)+(Ne>>>26),Ne&=67108863,n=Math.imul(D,le),i=Math.imul(D,he),i+=Math.imul(U,le),o=Math.imul(U,he),n+=Math.imul(P,de),i+=Math.imul(P,ye);var Le=c+n+((8191&(i+=Math.imul(K,de)))<<13);c=(o+=Math.imul(K,ye))+(i>>>13)+(Le>>>26),Le&=67108863,n=Math.imul(D,de),i=Math.imul(D,ye);var Re=c+n+((8191&(i+=Math.imul(U,de)))<<13);return c=(o=Math.imul(U,ye))+(i>>>13)+(Re>>>26),Re&=67108863,u[0]=ge,u[1]=me,u[2]=ve,u[3]=be,u[4]=_e,u[5]=Ee,u[6]=Se,u[7]=we,u[8]=ke,u[9]=Ae,u[10]=Ce,u[11]=Be,u[12]=Te,u[13]=Ie,u[14]=xe,u[15]=Me,u[16]=Ne,u[17]=Le,u[18]=Re,0!==c&&(u[19]=c,r.length++),r}},function(e,t,r){"use strict";var n=r(6).Buffer,i=r(113),o=r(233),s=r(234);function a(){this.x=i.fromBuffer(n.from("79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798","hex")),this.y=i.fromBuffer(n.from("483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8","hex")),this.inf=!1,this._precompute()}a.prototype._precompute=function(){for(var e=new o(this.x,this.y),t=new Array(1+Math.ceil(64.25)),r=t[0]=e,n=1;n=c;l--)f=(f<<1)+i[l];u.push(f)}for(var h=new s(null,null,null),p=new s(null,null,null),d=a;d>0;d--){for(var y=0;y=0;f--){for(var l=0;f>=0&&(c[0]=0|a[0][f],c[1]=0|a[1][f],0===c[0]&&0===c[1]);++l,--f);if(f>=0&&(l+=1),u=u.dblp(l),f<0)break;for(var h=0;h<2;h++){var p,d=c[h];0!==d&&(d>0?p=o[h][d>>1]:d<0&&(p=o[h][-d>>1].neg()),u=void 0===p.z?u.mixedAdd(p):u.add(p))}}return u},e.exports=new a},function(e,t,r){"use strict";(function(t){const n=r(96),i=r(190),o={"AES-128":{ivSize:16,keySize:16},"AES-256":{ivSize:16,keySize:32},Blowfish:{ivSize:8,cipherKeySize:32}};e.exports=((e,r,s,a)=>{const u=o[e];if(!u)return a(new Error("unkown cipherType passed"));if(!r)return a(new Error("unkown hashType passed"));const c=u.keySize,f=u.ivSize,l=t.from("key expansion"),h=2*(f+c+20);i.create(r,s,(e,r)=>{if(e)return a(e);r.digest(l,(e,i)=>{if(e)return a(e);let o=[],s=0;n(()=>s{if(t)return e(t);let a=n.length;s+a>h&&(a=h-s),o.push(n),s+=a,r.digest(i,(t,r)=>{if(t)return e(t);i=r,e()})})},function(e){if(e)return a(e);const r=h/2,n=t.concat(o),i=n.slice(0,r),s=n.slice(r,h),u=e=>({iv:e.slice(0,f),cipherKey:e.slice(f,f+c),macKey:e.slice(f+c)});a(null,{k1:u(i),k2:u(s)})})})})})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(459);e.exports=((e,t)=>{n.generateEphmeralKeyPair(e,t)})},function(e,t,r){"use strict";(function(e){const n=r(135)(),i=r(134),o=r(36).bignum,s=r(226),a=s.toBase64,u=s.toBn,c={"P-256":256,"P-384":384,"P-521":521};t.generateEphmeralKeyPair=function(t,r){i(n.subtle.generateKey({name:"ECDH",namedCurve:t},!0,["deriveBits"]).then(r=>{const s=(s,u,f)=>{let l;"function"==typeof u&&(f=u,u=void 0),l=u?n.subtle.importKey("jwk",function(e,t){const r=h(e,t.public);return r.d=a(new o(t.private)),r}(t,u),{name:"ECDH",namedCurve:t},!1,["deriveBits"]):Promise.resolve(r.privateKey);const p=Promise.all([n.subtle.importKey("jwk",h(t,s),{name:"ECDH",namedCurve:t},!1,[]),l]);i(p.then(e=>n.subtle.deriveBits({name:"ECDH",namedCurve:t,public:e[0]},e[1],c[t])).then(t=>e.from(t)),f)};return n.subtle.exportKey("jwk",r.publicKey).then(e=>({key:l(e),genSharedKey:s}))}),r)};const f={"P-256":32,"P-384":48,"P-521":66};function l(t){const r=f[t.crv];return e.concat([e.from([4]),u(t.x).toArrayLike(e,"be",r),u(t.y).toArrayLike(e,"be",r)],1+2*r)}function h(t,r){const n=f[t];if(!r.slice(0,1).equals(e.from([4])))throw new Error("Invalid key format");const i=new o(r.slice(1,n+1)),s=new o(r.slice(1+n));return{kty:"EC",crv:t,x:a(i,n),y:a(s,n),ext:!0}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(75),i={sha1:"sha1","sha2-256":"sha256","sha2-512":"sha512"};e.exports=function(e,t,r,o,s){const a=i[s];if(!a)throw new Error(`Hash '${s}' is unknown or not supported`);const u=n.pkcs5.pbkdf2(e,t,r,o,a);return n.util.encode64(u)}},function(e,t,r){"use strict";(function(t){const n=r(73),i=r(66),o=r(462),s=r(143),a=r(18),u=r(27),c=r(19),f=new Error("Sorry, Not Implemented Yet."),l=c.proto(function(e){if(!(this instanceof l))return new l(e);if(null==e&&(e=""),e instanceof t)this.buffer=o.fromBuffer(e);else if("string"==typeof e||e instanceof String)this.buffer=o.fromString(e);else{if(!(e.buffer&&e.protos&&e.protoCodes))throw new Error("addr must be a string, Buffer, or another Multiaddr");this.buffer=o.fromBuffer(e.buffer)}},{className:"Multiaddr",symbolName:"@multiformats/js-multiaddr/multiaddr"});l.prototype.toString=function(){return o.bufferToString(this.buffer)},l.prototype.toOptions=function(){const e={},t=this.toString().split("/");return e.family="ip4"===t[1]?"ipv4":"ipv6",e.host=t[2],e.transport=t[3],e.port=t[4],e},l.prototype.inspect=function(){return""},l.prototype.protos=function(){return n(this.protoCodes(),function(e){return i(s(e))})},l.prototype.protoCodes=function(){const e=[],t=this.buffer;let r=0;for(;r{if(e[0]===s.names.ipfs.code)return!0})[0][1],u.decode(e)}catch(t){e=null}return e},l.prototype.equals=function(e){return this.buffer.equals(e.buffer)},l.prototype.nodeAddress=function(){if(!this.isThinWaistAddress())throw new Error('Multiaddr must be "thin waist" address for nodeAddress.');const e=this.protoCodes(),t=this.toString().split("/").slice(1);return{family:41===e[0]?"IPv6":"IPv4",address:t[1],port:t[3]}},l.fromNodeAddress=function(e,t){if(!e)throw new Error("requires node address object");if(!t)throw new Error("requires transport protocol");const r="IPv6"===e.family?"ip6":"ip4";return l("/"+[r,e.address,t,e.port].join("/"))},l.prototype.isThinWaistAddress=function(e){const t=(e||this).protos();return 2===t.length&&((4===t[0].code||41===t[0].code)&&(6===t[1].code||17===t[1].code))},l.prototype.fromStupidString=function(e){throw f},l.protocols=s,l.isName=function(e){return!!l.isMultiaddr(e)&&e.protos().some(e=>e.resolvable)},l.resolve=function(e,t){return l.isMultiaddr(e)&&l.isName(e)?t(new Error("not implemented yet")):t(new Error("not a valid name"))},e.exports=l}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(73),i=r(175),o=r(463),s=r(143),a=r(18);function u(e){const t=[],r=e.split("/").slice(1);if(1===r.length&&""===r[0])return[];for(let n=0;n=r.length)throw b("invalid address: "+e);t.push([i,r[n]])}else t.push([i])}return t}function c(e){const t=[];return n(e,function(e){const r=_(e);t.push(r.name),e.length>1&&t.push(e[1])}),"/"+t.join("/")}function f(e){return n(e,function(e){Array.isArray(e)||(e=[e]);const t=_(e);return e.length>1?[t.code,o.toBuffer(t.code,e[1])]:[t.code]})}function l(e){return n(e,function(e){const t=_(e);return e.length>1?[t.code,o.toString(t.code,e[1])]:[t.code]})}function h(e){return g(t.concat(n(e,function(e){const r=_(e);let n=t.from(a.encode(r.code));return e.length>1&&(n=t.concat([n,e[1]])),n})))}function p(e,t){if(e.size>0)return e.size/8;if(0===e.size)return 0;return a.decode(t)+a.decode.bytes}function d(e){const t=[];let r=0;for(;re.length)throw b("Invalid address buffer: "+e.toString("hex"));t.push([n,u])}return t}function y(e){return h(f(u(e=v(e))))}function g(e){const r=m(e);if(r)throw r;return t.from(e)}function m(e){try{d(e)}catch(e){return e}}function v(e){return"/"+i(e.trim().split("/")).join("/")}function b(e){return new Error("Error parsing address: "+e)}function _(e){return s(e[0])}e.exports={stringToStringTuples:u,stringTuplesToString:c,tuplesToStringTuples:l,stringTuplesToTuples:f,bufferToTuples:d,tuplesToBuffer:h,bufferToString:function(e){return c(l(d(e)))},stringToBuffer:y,fromString:function(e){return y(e)},fromBuffer:g,validateBuffer:m,isValidBuffer:function(e){return void 0===m(e)},cleanPath:v,ParseError:b,protoFromTuple:_,sizeForAddr:p}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(153),i=r(176),o=r(143),s=r(27),a=r(18);function u(e,r){return r instanceof t?u.toString(e,r):u.toBuffer(e,r)}function c(e){if(!e.isValid())throw new Error("invalid ip address");return n.toBuffer(e.address)}e.exports=u,u.toString=function(e,t){switch((e=o(e)).code){case 4:case 41:return n.toString(t);case 6:case 17:case 33:case 132:return function(e){return e.readUInt16BE(0)}(t);case 54:case 55:case 56:return function(e){const t=a.decode(e);if((e=e.slice(a.decode.bytes)).length!==t)throw new Error("inconsistent lengths");return e.toString()}(t);case 421:return function(e){const t=a.decode(e),r=e.slice(a.decode.bytes);if(r.length!==t)throw new Error("inconsistent lengths");return s.encode(r)}(t);default:return t.toString("hex")}},u.toBuffer=function(e,r){switch((e=o(e)).code){case 4:return c(new i.Address4(r));case 41:return c(new i.Address6(r));case 6:case 17:case 33:case 132:return function(e){const r=t.alloc(2);return r.writeUInt16BE(e,0),r}(parseInt(r,10));case 54:case 55:case 56:return function(e){const r=t.from(e),n=t.from(a.encode(r.length));return t.concat([n,r])}(r);case 421:return function(e){const r=t.from(s.decode(e)),n=t.from(a.encode(r.length));return t.concat([n,r])}(r);default:return t.from(r,"hex")}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(236).ensureMultiaddr,i=r(465);e.exports=class{constructor(e){this._multiaddrs=e||[],this._observedMultiaddrs=[]}add(e){e=n(e),this.has(e)||this._multiaddrs.push(e)}addSafe(e){e=n(e),this._observedMultiaddrs.some((t,r)=>{if(t.equals(e))return this.add(e),this._observedMultiaddrs.splice(r,1),!0})||this._observedMultiaddrs.push(e)}toArray(){return this._multiaddrs.slice()}get size(){return this._multiaddrs.length}forEach(e){return this._multiaddrs.forEach(e)}filterBy(e){return"object"!=typeof e||"function"!=typeof e.matches||"function"!=typeof e.partialMatch||"function"!=typeof e.toString?[]:this._multiaddrs.filter(t=>e.matches(t))}has(e){return e=n(e),this._multiaddrs.some(t=>t.equals(e))}delete(e){e=n(e),this._multiaddrs.some((t,r)=>{if(t.equals(e))return this._multiaddrs.splice(r,1),!0})}replace(e,t){Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]),e.forEach(e=>this.delete(e)),t.forEach(e=>this.add(e))}clear(){this._multiaddrs=[]}distinct(){return i(this._multiaddrs,e=>[e.toOptions().port,e.toOptions().transport].join())}}},function(e,t,r){(function(e,r){var n=200,i="Expected a function",o="__lodash_hash_undefined__",s=1,a=2,u=1/0,c=9007199254740991,f="[object Arguments]",l="[object Array]",h="[object Boolean]",p="[object Date]",d="[object Error]",y="[object Function]",g="[object GeneratorFunction]",m="[object Map]",v="[object Number]",b="[object Object]",_="[object RegExp]",E="[object Set]",S="[object String]",w="[object Symbol]",k="[object ArrayBuffer]",A="[object DataView]",C=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,B=/^\w*$/,T=/^\./,I=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,x=/\\(\\)?/g,M=/^\[object .+?Constructor\]$/,N=/^(?:0|[1-9]\d*)$/,L={};L["[object Float32Array]"]=L["[object Float64Array]"]=L["[object Int8Array]"]=L["[object Int16Array]"]=L["[object Int32Array]"]=L["[object Uint8Array]"]=L["[object Uint8ClampedArray]"]=L["[object Uint16Array]"]=L["[object Uint32Array]"]=!0,L[f]=L[l]=L[k]=L[h]=L[A]=L[p]=L[d]=L[y]=L[m]=L[v]=L[b]=L[_]=L[E]=L[S]=L["[object WeakMap]"]=!1;var R="object"==typeof e&&e&&e.Object===Object&&e,P="object"==typeof self&&self&&self.Object===Object&&self,K=R||P||Function("return this")(),O=t&&!t.nodeType&&t,D=O&&"object"==typeof r&&r&&!r.nodeType&&r,U=D&&D.exports===O&&R.process,j=function(){try{return U&&U.binding("util")}catch(e){}}(),F=j&&j.isTypedArray;function V(e,t){return!!(e?e.length:0)&&function(e,t,r){if(t!=t)return function(e,t,r,n){var i=e.length,o=r+(n?1:-1);for(;n?o--:++o-1}function q(e,t,r){for(var n=-1,i=e?e.length:0;++n-1},Te.prototype.set=function(e,t){var r=this.__data__,n=Le(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},Ie.prototype.clear=function(){this.__data__={hash:new Be,map:new(de||Te),string:new Be}},Ie.prototype.delete=function(e){return qe(this,e).delete(e)},Ie.prototype.get=function(e){return qe(this,e).get(e)},Ie.prototype.has=function(e){return qe(this,e).has(e)},Ie.prototype.set=function(e,t){return qe(this,e).set(e,t),this},xe.prototype.add=xe.prototype.push=function(e){return this.__data__.set(e,o),this},xe.prototype.has=function(e){return this.__data__.has(e)},Me.prototype.clear=function(){this.__data__=new Te},Me.prototype.delete=function(e){return this.__data__.delete(e)},Me.prototype.get=function(e){return this.__data__.get(e)},Me.prototype.has=function(e){return this.__data__.has(e)},Me.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Te){var i=r.__data__;if(!de||i.lengthc))return!1;var l=o.get(e);if(l&&o.get(t))return l==t;var h=-1,p=!0,d=i&s?new xe:void 0;for(o.set(e,t),o.set(t,e);++h-1&&e%1==0&&e-1&&e%1==0&&e<=c}function st(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function at(e){return!!e&&"object"==typeof e}function ut(e){return"symbol"==typeof e||at(e)&&se.call(e)==w}var ct=F?function(e){return function(t){return e(t)}}(F):function(e){return at(e)&&ot(e.length)&&!!L[se.call(e)]};function ft(e){return nt(e)?Ne(e):Ue(e)}function lt(e){return e}r.exports=function(e,t){return e&&e.length?function(e,t,r){var i=-1,o=V,s=e.length,a=!0,u=[],c=u;if(r)a=!1,o=q;else if(s>=n){var f=t?null:Fe(e);if(f)return W(f);a=!1,o=z,c=new xe}else c=t?[]:u;e:for(;++i"}toJSON(){return{id:this.toB58String(),privKey:c(this.marshalPrivKey()),pubKey:c(this.marshalPubKey())}}toHexString(){return i.toHexString(this.id)}toBytes(){return this.id}toB58String(){return this._idB58String}isEqual(e){if(n.isBuffer(e))return this.id.equals(e);if(e.id)return this.id.equals(e.id);throw new Error("not valid Id")}isValid(e){this.privKey&&this.privKey.public&&this.privKey.public.bytes&&n.isBuffer(this.pubKey.bytes)&&this.privKey.public.bytes.equals(this.pubKey.bytes)?e():e(new Error("Keys not match"))}}function c(e){if(e)return e.toString("base64")}(t=e.exports=u).create=function(e,t){"function"==typeof e&&(t=e,e={}),(e=e||{}).bits=e.bits||2048,a([t=>o.keys.generateKeyPair("RSA",e.bits,t),(e,t)=>e.public.hash((r,n)=>{t(r,n,e)})],(e,r,n)=>{if(e)return t(e);t(null,new u(r,n))})},t.createFromHexString=function(e){return new u(i.fromHexString(e))},t.createFromBytes=function(e){return new u(e)},t.createFromB58String=function(e){return new u(i.fromB58String(e))},t.createFromPubKey=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let r;try{let i=e;if("string"==typeof i&&(i=n.from(e,"base64")),!n.isBuffer(i))throw new Error("Supplied key is neither a base64 string nor a buffer");r=o.keys.unmarshalPublicKey(i)}catch(e){return t(e)}r.hash((e,n)=>{if(e)return t(e);t(null,new u(n,null,r))})},t.createFromPrivKey=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let r=e;try{if("string"==typeof r&&(r=n.from(e,"base64")),!n.isBuffer(r))throw new Error("Supplied key is neither a base64 string nor a buffer")}catch(e){return t(e)}a([e=>o.keys.unmarshalPrivateKey(r,e),(e,t)=>e.public.hash((r,n)=>{t(r,n,e)})],(e,r,n)=>{if(e)return t(e);t(null,new u(r,n,n.public))})},t.createFromJSON=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let r,s,c,f;try{r=i.fromB58String(e.id),s=e.privKey&&n.from(e.privKey,"base64"),c=e.pubKey&&n.from(e.pubKey,"base64"),f=c&&o.keys.unmarshalPublicKey(c)}catch(e){return t(e)}s?a([e=>o.keys.unmarshalPrivateKey(s,e),(e,t)=>e.public.hash((r,n)=>{t(r,n,e)}),(e,t,r)=>{f?f.hash((n,i)=>{r(n,e,t,i)}):r(null,e,t)}],(e,n,i,o)=>e?t(e):f&&!n.equals(o)?t(new Error("Public and private key do not match")):r&&!n.equals(r)?t(new Error("Id and private key do not match")):void t(null,new u(r,i,f))):t(null,new u(r,null,f))},t.isPeerId=function(e){return Boolean("object"==typeof e&&e._id&&e._idB58String)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(237),i=r(469),o=r(471);(t=e.exports).aes=i,t.hmac=n,t.keys=o,t.randomBytes=r(242),t.pbkdf2=r(482)},function(e,t,r){"use strict";e.exports={SHA1:20,SHA256:32,SHA512:64}},function(e,t,r){"use strict";const n=r(470),i={16:"aes-128-ctr",32:"aes-256-ctr"};t.create=function(e,t,r){const o=i[e.length];if(!o)return r(new Error("Invalid key length"));const s=n.createCipheriv(o,e,t),a=n.createDecipheriv(o,e,t);r(null,{encrypt(e,t){t(null,s.update(e))},decrypt(e,t){t(null,a.update(e))}})}},function(e,t,r){"use strict";const n=r(155);e.exports={createCipheriv:n.createCipheriv,createDecipheriv:n.createDecipheriv}},function(e,t,r){"use strict";(function(n){const i=r(25)(r(146)),o=r(75);t=e.exports;const s={rsa:r(472),ed25519:r(477),secp256k1:r(227)(i,r(242))};function a(e){return void 0!==s[e.toLowerCase()]}t.supportedKeys=s,t.keysPBM=i,t.keyStretcher=r(479),t.generateEphemeralKeyPair=r(480),t.generateKeyPair=((e,t,r)=>{let n=s[e.toLowerCase()];if(!n)return r(new Error("invalid or unsupported key type"));n.generateKeyPair(t,r)}),t.generateKeyPairFromSeed=((e,t,r,n)=>{let i=s[e.toLowerCase()];return i?"ed25519"!==e.toLowerCase()?n(new Error("Seed key derivation is unimplemented for RSA or secp256k1")):void i.generateKeyPairFromSeed(t,r,n):n(new Error("invalid or unsupported key type"))}),t.unmarshalPublicKey=(e=>{const t=i.PublicKey.decode(e),r=t.Data;switch(t.Type){case i.KeyType.RSA:return s.rsa.unmarshalRsaPublicKey(r);case i.KeyType.Ed25519:return s.ed25519.unmarshalEd25519PublicKey(r);case i.KeyType.Secp256k1:if(s.secp256k1)return s.secp256k1.unmarshalSecp256k1PublicKey(r);throw new Error("secp256k1 support requires libp2p-crypto-secp256k1 package");default:throw new Error("invalid or unsupported key type")}}),t.marshalPublicKey=((e,t)=>{if(!a(t=(t||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type");return e.bytes}),t.unmarshalPrivateKey=((e,t)=>{let r;try{r=i.PrivateKey.decode(e)}catch(e){return t(e)}const n=r.Data;switch(r.Type){case i.KeyType.RSA:return s.rsa.unmarshalRsaPrivateKey(n,t);case i.KeyType.Ed25519:return s.ed25519.unmarshalEd25519PrivateKey(n,t);case i.KeyType.Secp256k1:return s.secp256k1?s.secp256k1.unmarshalSecp256k1PrivateKey(n,t):t(new Error("secp256k1 support requires libp2p-crypto-secp256k1 package"));default:t(new Error("invalid or unsupported key type"))}}),t.marshalPrivateKey=((e,t)=>{if(!a(t=(t||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type");return e.bytes}),t.import=((e,t,r)=>{try{const i=o.pki.decryptRsaPrivateKey(e,t);if(null===i)throw new Error("Cannot read the key, most likely the password is wrong or not a RSA key");let a=o.asn1.toDer(o.pki.privateKeyToAsn1(i));return a=n.from(a.getBytes(),"binary"),s.rsa.unmarshalRsaPrivateKey(a,r)}catch(e){r(e)}})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(238),i=r(25),o=r(27),s=r(240),a=i(r(146)),u=r(75),c=r(17);class f{constructor(e){this._key=e}verify(e,t,r){h(r),s.hashAndVerify(this._key,t,e,r)}marshal(){return s.utils.jwkToPkix(this._key)}get bytes(){return a.PublicKey.encode({Type:a.KeyType.RSA,Data:this.marshal()})}encrypt(e){return this._key.encrypt(e,"RSAES-PKCS1-V1_5")}equals(e){return this.bytes.equals(e.bytes)}hash(e){h(e),n(this.bytes,"sha2-256",e)}}class l{constructor(e,t){this._key=e,this._publicKey=t}genSecret(){return s.getRandomValues(new Uint8Array(16))}sign(e,t){h(t),s.hashAndSign(this._key,e,t)}get public(){if(!this._publicKey)throw new Error("public key not provided");return new f(this._publicKey)}decrypt(e,t){s.decrypt(this._key,e,t)}marshal(){return s.utils.jwkToPkcs1(this._key)}get bytes(){return a.PrivateKey.encode({Type:a.KeyType.RSA,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){h(e),n(this.bytes,"sha2-256",e)}id(e){this.public.hash((t,r)=>{if(t)return e(t);e(null,o.encode(r))})}export(e,t,r){"function"==typeof t&&(r=t,t=e,e="pkcs-8"),h(r),c(()=>{let n=null,i=null;try{const r=new u.util.ByteBuffer(this.marshal()),o=u.asn1.fromDer(r),s=u.pki.privateKeyFromAsn1(o);if("pkcs-8"===e){const e={algorithm:"aes256",count:1e4,saltSize:16,prfAlgorithm:"sha512"};i=u.pki.encryptRsaPrivateKey(s,t,e)}else n=new Error(`Unknown export format '${e}'`)}catch(e){n=e}r(n,i)})}}function h(e){if("function"!=typeof e)throw new Error("callback is required")}e.exports={RsaPublicKey:f,RsaPrivateKey:l,unmarshalRsaPublicKey:function(e){const t=s.utils.pkixToJwk(e);return new f(t)},unmarshalRsaPrivateKey:function(e,t){const r=s.utils.pkcs1ToJwk(e);s.unmarshalPrivateKey(r,(e,r)=>{if(e)return t(e);t(null,new l(r.privateKey,r.publicKey))})},generateKeyPair:function(e,t){s.generateKey(e,(e,r)=>{if(e)return t(e);t(null,new l(r.privateKey,r.publicKey))})},fromJwk:function(e,t){s.unmarshalPrivateKey(e,(e,r)=>{if(e)return t(e);t(null,new l(r.privateKey,r.publicKey))})}}},function(e,t,r){"use strict";(function(t){const n=r(219),i=r(128),o=r(239),s=r(474),a=o.toCallback,u=o.toBuf,c=o.fromString,f=o.fromNumberTo32BitBuf;e.exports={sha1:s.sha1,sha2256:s.sha2256,sha2512:s.sha2512,sha3512:a(u(n.sha3_512)),sha3384:a(u(n.sha3_384)),sha3256:a(u(n.sha3_256)),sha3224:a(u(n.sha3_224)),shake128:a(u(n.shake_128,256)),shake256:a(u(n.shake_256,512)),keccak224:a(u(n.keccak_224)),keccak256:a(u(n.keccak_256)),keccak384:a(u(n.keccak_384)),keccak512:a(u(n.keccak_512)),murmur3128:a(u(c(i.x64.hash128))),murmur332:a(f(c(i.x86.hash32))),addBlake:r(475),dblSha2256:(e,r)=>{s.sha2256(e,(e,n)=>{e&&r(e),s.sha2256(t.from(n),r)})}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(129),i=function(){if(self.crypto)return self.crypto.subtle||self.crypto.webkitSubtle;if(self.msCrypto)return self.msCrypto.subtle}();function o(e){if(!i)throw new Error("Please use a browser with webcrypto support");return(r,o)=>{const s=i.digest({name:e},r);if("function"!=typeof s.then)return s.onerror=(()=>{o(new Error(`hashing data using ${e}`))}),void(s.oncomplete=(e=>{o(null,e.target.result)}));n(s.then(e=>t.from(new Uint8Array(e))),o)}}e.exports={sha1:function(e,t){o("SHA-1")(e,t)},sha2256:function(e,t){o("SHA-256")(e,t)},sha2512:function(e,t){o("SHA-512")(e,t)}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(130),i=r(239).toCallback,o={init:n.blake2bInit,update:n.blake2bUpdate,digest:n.blake2bFinal},s={init:n.blake2sInit,update:n.blake2sUpdate,digest:n.blake2sFinal},a=(e,r)=>i(n=>{const i=r.init(e,null);return r.update(i,n),t.from(r.digest(i))});e.exports=(e=>{for(let t=0;t<64;t++)e[45569+t]=a(t+1,o);for(let t=0;t<32;t++)e[45633+t]=a(t+1,s)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(36),i=r(241),o=i.toBase64,s=i.toBn,a=n.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}),u=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid({"1.2.840.113549.1.1.1":"rsa"}),this.key("none").optional().null_(),this.key("curve").optional().objid(),this.key("params").optional().seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()))}),c=n.define("RSAPublicKey",function(){this.seq().obj(this.key("algorithm").use(u),this.key("subjectPublicKey").bitstr())}),f=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});t.pkcs1ToJwk=function(e){const t=a.decode(e,"der");return{kty:"RSA",n:o(t.modulus),e:o(t.publicExponent),d:o(t.privateExponent),p:o(t.prime1),q:o(t.prime2),dp:o(t.exponent1),dq:o(t.exponent2),qi:o(t.coefficient),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkcs1=function(e){return a.encode({version:0,modulus:s(e.n),publicExponent:s(e.e),privateExponent:s(e.d),prime1:s(e.p),prime2:s(e.q),exponent1:s(e.dp),exponent2:s(e.dq),coefficient:s(e.qi)},"der")},t.pkixToJwk=function(e){const t=c.decode(e,"der"),r=f.decode(t.subjectPublicKey.data,"der");return{kty:"RSA",n:o(r.modulus),e:o(r.publicExponent),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkix=function(e){return c.encode({algorithm:{algorithm:"rsa",none:null},subjectPublicKey:{data:f.encode({modulus:s(e.n),publicExponent:s(e.e)},"der")}},"der")}},function(e,t,r){"use strict";(function(t){const n=r(238),i=r(25),o=r(27),s=r(478),a=i(r(146));class u{constructor(e){this._key=l(e,s.publicKeyLength)}verify(e,t,r){f(r),s.hashAndVerify(this._key,t,e,r)}marshal(){return t.from(this._key)}get bytes(){return a.PublicKey.encode({Type:a.KeyType.Ed25519,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){f(e),n(this.bytes,"sha2-256",e)}}class c{constructor(e,t){this._key=l(e,s.privateKeyLength),this._publicKey=l(t,s.publicKeyLength)}sign(e,t){f(t),s.hashAndSign(this._key,e,t)}get public(){if(!this._publicKey)throw new Error("public key not provided");return new u(this._publicKey)}marshal(){return t.concat([t.from(this._key),t.from(this._publicKey)])}get bytes(){return a.PrivateKey.encode({Type:a.KeyType.Ed25519,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){f(e),n(this.bytes,"sha2-256",e)}id(e){this.public.hash((t,r)=>{if(t)return e(t);e(null,o.encode(r))})}}function f(e){if("function"!=typeof e)throw new Error("callback is required")}function l(e,r){if(t.isBuffer(e)&&(e=new Uint8Array(e)),!(e instanceof Uint8Array)||e.length!==r)throw new Error("Key must be a Uint8Array or Buffer of length "+r);return e}e.exports={Ed25519PublicKey:u,Ed25519PrivateKey:c,unmarshalEd25519PrivateKey:function(e,t){try{e=l(e,s.privateKeyLength+s.publicKeyLength)}catch(e){return t(e)}const r=e.slice(0,s.privateKeyLength),n=e.slice(s.privateKeyLength,e.length);t(null,new c(r,n))},unmarshalEd25519PublicKey:function(e){return e=l(e,s.publicKeyLength),new u(e)},generateKeyPair:function(e,t){void 0===t&&"function"==typeof e&&(t=e),s.generateKey((e,r)=>{if(e)return t(e);let n;try{n=new c(r.secretKey,r.publicKey)}catch(e){return void t(e)}t(null,n)})},generateKeyPairFromSeed:function(e,t,r){void 0===r&&"function"==typeof t&&(r=t),s.generateKeyFromSeed(e,(e,t)=>{if(e)return r(e);let n;try{n=new c(t.secretKey,t.publicKey)}catch(e){return void r(e)}r(null,n)})}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(157),i=r(17);t.publicKeyLength=n.sign.publicKeyLength,t.privateKeyLength=n.sign.secretKeyLength,t.generateKey=function(e){i(()=>{let t;try{t=n.sign.keyPair()}catch(t){return e(t)}e(null,t)})},t.generateKeyFromSeed=function(e,t){i(()=>{let r;try{r=n.sign.keyPair.fromSeed(e)}catch(e){return t(e)}t(null,r)})},t.hashAndSign=function(t,r,o){i(()=>{o(null,e.from(n.sign.detached(r,t)))})},t.hashAndVerify=function(e,t,r,o){i(()=>{let i;try{i=n.sign.detached.verify(r,t,e)}catch(e){return o(e)}o(null,i)})}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(96),i=r(237),o={"AES-128":{ivSize:16,keySize:16},"AES-256":{ivSize:16,keySize:32},Blowfish:{ivSize:8,cipherKeySize:32}};e.exports=((e,r,s,a)=>{const u=o[e];if(!u)return a(new Error("unkown cipherType passed"));if(!r)return a(new Error("unkown hashType passed"));const c=u.keySize,f=u.ivSize,l=t.from("key expansion"),h=2*(f+c+20);i.create(r,s,(e,r)=>{if(e)return a(e);r.digest(l,(e,i)=>{if(e)return a(e);let o=[],s=0;n(()=>s{if(t)return e(t);let a=n.length;s+a>h&&(a=h-s),o.push(n),s+=a,r.digest(i,(t,r)=>{if(t)return e(t);i=r,e()})})},function(e){if(e)return a(e);const r=h/2,n=t.concat(o),i=n.slice(0,r),s=n.slice(r,h),u=e=>({iv:e.slice(0,f),cipherKey:e.slice(f,f+c),macKey:e.slice(f+c)});a(null,{k1:u(i),k2:u(s)})})})})})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(481);e.exports=((e,t)=>{n.generateEphmeralKeyPair(e,t)})},function(e,t,r){"use strict";(function(e){const n=r(145)(),i=r(144),o=r(36).bignum,s=r(241),a=s.toBase64,u=s.toBn,c={"P-256":256,"P-384":384,"P-521":521};t.generateEphmeralKeyPair=function(t,r){i(n.subtle.generateKey({name:"ECDH",namedCurve:t},!0,["deriveBits"]).then(r=>{const s=(s,u,f)=>{let l;"function"==typeof u&&(f=u,u=void 0),l=u?n.subtle.importKey("jwk",function(e,t){const r=h(e,t.public);return r.d=a(new o(t.private)),r}(t,u),{name:"ECDH",namedCurve:t},!1,["deriveBits"]):Promise.resolve(r.privateKey);const p=Promise.all([n.subtle.importKey("jwk",h(t,s),{name:"ECDH",namedCurve:t},!1,[]),l]);i(p.then(e=>n.subtle.deriveBits({name:"ECDH",namedCurve:t,public:e[0]},e[1],c[t])).then(t=>e.from(t)),f)};return n.subtle.exportKey("jwk",r.publicKey).then(e=>({key:l(e),genSharedKey:s}))}),r)};const f={"P-256":32,"P-384":48,"P-521":66};function l(t){const r=f[t.crv];return e.concat([e.from([4]),u(t.x).toArrayLike(e,"be",r),u(t.y).toArrayLike(e,"be",r)],1+2*r)}function h(t,r){const n=f[t];if(!r.slice(0,1).equals(e.from([4])))throw new Error("Invalid key format");const i=new o(r.slice(1,n+1)),s=new o(r.slice(1+n));return{kty:"EC",crv:t,x:a(i,n),y:a(s,n),ext:!0}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(75),i={sha1:"sha1","sha2-256":"sha256","sha2-512":"sha512"};e.exports=function(e,t,r,o,s){const a=i[s];if(!a)throw new Error(`Hash '${s}' is unknown or not supported`);const u=n.pkcs5.pbkdf2(e,t,r,o,a);return n.util.encode64(u)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return Object.assign((0,n.default)(e,t),(0,i.default)(e,t),(0,o.default)(e,t),(0,s.default)(e,t),(0,a.default)(e,t),(0,u.default)(e,t),(0,c.default)(e,t),(0,f.default)(e,t),(0,l.default)(e,t),(0,h.default)(e,t),(0,p.default)(e,t),(0,d.default)(e,t))};var n=y(r(484)),i=y(r(498)),o=y(r(499)),s=y(r(500)),a=y(r(501)),u=y(r(502)),c=y(r(503)),f=y(r(504)),l=y(r(505)),h=y(r(506)),p=y(r(507)),d=y(r(508));function y(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{add:(0,n.expose)("ipfs.files.add",(0,i.pre)(function(){for(var e=arguments.length,r=Array(e),n=0;ne?n(!0):void n(null,t++)}}},function(e,t,r){"use strict";e.exports=function(e){return e=e||Math.random,function(t,r){return t?r&&r(t):r(null,e())}}},function(e,t,r){"use strict";e.exports={drain:r(91),onEnd:r(266),log:r(490),find:r(491),reduce:r(122),collect:r(33),concat:r(492)}},function(e,t,r){"use strict";var n=r(91);e.exports=function(e){return n(function(e){console.log(e)},e)}},function(e,t,r){"use strict";function n(e){return e}var i=r(92),o=r(91);e.exports=function(e,t){var r=!1;return t?e=i(e)||n:(t=e,e=n),o(function(n){if(e(n))return r=!0,t(null,n),!1},function(e){r||t(!0===e?null:e,null)})}},function(e,t,r){"use strict";var n=r(122);e.exports=function(e){return n(function(e,t){return e+t},"",e)}},function(e,t,r){"use strict";e.exports={map:r(67),asyncMap:r(81),filter:r(52),filterNot:r(494),through:r(158),take:r(245),unique:r(246),nonUnique:r(495),flatten:r(159)}},function(e,t,r){"use strict";var n=r(244),i=r(52);e.exports=function(e){return e=n(e),i(function(t){return!e(t)})}},function(e,t,r){"use strict";var n=r(246);e.exports=function(e){return n(e,!0)}},function(e,t,r){const{caller:n}=r(1),{post:i}=r(2);e.exports=function(e,t){const r=i(n(e,t),t&&t.post);return(e,t)=>{e&&!0!==e&&(e=Object.assign({message:e.message,stack:void 0},e.output&&e.output.payload)),r(e).then(e=>t(e.end,e.data)).catch(t)}}},function(e,t,r){const{expose:n}=r(1),{post:i}=r(2);e.exports=function(e,t){return function(r){const o=n(e,i(e=>new Promise((t,n)=>{e&&!0!==e&&(e=Object.assign(new Error,e)),r(e,(e,r)=>{if(e)return!0===e?t({end:e}):n(e),o.close();t({end:e,data:r})})}),t&&t.post),t)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{cat:(0,n.expose)("ipfs.files.cat",(0,i.pre)((0,c.preBufferFromJson)(0),(0,u.preCidFromJson)(0),t.pre("files.cat"),(0,i.post)(function(){var t;return(t=e().files).cat.apply(t,arguments)},c.bufferToJson)),t),catPullStream:(0,n.expose)("ipfs.files.catPullStream",(0,i.pre)((0,c.preBufferFromJson)(0),(0,u.preCidFromJson)(0),t.pre("files.catPullStream"),(0,i.post)(function(){var t;return(t=e().files).catPullStream.apply(t,arguments)},function(e){return new Promise(function(r){var n=(0,a.default)();(0,o.default)(e,s.default.sink(n,Object.assign({},t,{post:function(e){return(0,c.isBuffer)(e.data)&&(e.data=(0,c.bufferToJson)(e.data)),e}}))),r((0,f.functionToJson)(n))})})),t)}};var n=r(1),i=r(2),o=l(r(16)),s=l(r(26)),a=l(r(30)),u=r(21),c=r(10),f=r(40);function l(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{cp:(0,n.expose)("ipfs.files.cp",(0,i.pre)(t.pre("files.cp"),(0,i.post)(function(){var t;return(t=e().files).cp.apply(t,arguments)},function(){return null})),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{flush:(0,n.expose)("ipfs.files.flush",(0,i.pre)(t.pre("files.flush"),(0,i.post)(function(){var t;return(t=e().files).flush.apply(t,arguments)},function(){return null})),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{get:(0,n.expose)("ipfs.files.get",(0,i.pre)((0,c.preBufferFromJson)(0),(0,u.preCidFromJson)(0),t.pre("files.get"),(0,i.post)(function(){var t;return(t=e().files).get.apply(t,arguments)},function(e){return e.map(function(e){return e.content&&(e.content=(0,c.bufferToJson)(e.content)),e})})),t),getPullStream:(0,n.expose)("ipfs.files.getPullStream",(0,i.pre)((0,c.preBufferFromJson)(0),(0,u.preCidFromJson)(0),t.pre("files.getPullStream"),(0,i.post)(function(){var t;return(t=e().files).getPullStream.apply(t,arguments)},function(e){return new Promise(function(r){var n=(0,a.default)();(0,o.default)(e,o.default.map(function(e){if(e.content){var r=(0,a.default)();(0,o.default)(e.content,s.default.sink(r,Object.assign({},t,{post:function(e){return(0,c.isBuffer)(e.data)&&(e.data=(0,c.bufferToJson)(e.data)),e}}))),e.content=(0,f.functionToJson)(r)}return e}),s.default.sink(n,t)),r((0,f.functionToJson)(n))})})),t)}};var n=r(1),i=r(2),o=l(r(16)),s=l(r(26)),a=l(r(30)),u=r(21),c=r(10),f=r(40);function l(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{ls:(0,n.expose)("ipfs.files.ls",(0,i.pre)(t.pre("files.ls"),function(){var t;return(t=e().files).ls.apply(t,arguments)}),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{mkdir:(0,n.expose)("ipfs.files.mkdir",(0,i.pre)(t.pre("files.mkdir"),(0,i.post)(function(){var t;return(t=e().files).mkdir.apply(t,arguments)},function(){return null})),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{mv:(0,n.expose)("ipfs.files.mv",(0,i.pre)(t.pre("files.mv"),(0,i.post)(function(){var t;return(t=e().files).mv.apply(t,arguments)},function(){return null})),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{read:(0,n.expose)("ipfs.files.read",(0,i.pre)(t.pre("files.read"),(0,i.post)(function(){var t;return(t=e().files).read.apply(t,arguments)},u.bufferToJson)),t),readPullStream:(0,n.expose)("ipfs.files.readPullStream",(0,i.pre)(t.pre("files.readPullStream"),(0,i.post)(function(){var t;return(t=e().files).readPullStream.apply(t,arguments)},function(e){return new Promise(function(r){var n=(0,o.default)();(0,s.default)(e,a.default.sink(n,Object.assign({},t,{post:function(e){return(0,u.isBuffer)(e.data)&&(e.data=(0,u.bufferToJson)(e.data)),e}}))),r((0,c.functionToJson)(n))})})),t)}};var n=r(1),i=r(2),o=f(r(30)),s=f(r(16)),a=f(r(26)),u=r(10),c=r(40);function f(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{rm:(0,n.expose)("ipfs.files.rm",(0,i.pre)(t.pre("files.rm"),(0,i.post)(function(){var t;return(t=e().files).rm.apply(t,arguments)},function(){return null})),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{stat:(0,n.expose)("ipfs.files.stat",(0,i.pre)(t.pre("files.stat"),function(){var t;return(t=e().files).stat.apply(t,arguments)}),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{write:(0,n.expose)("ipfs.files.write",(0,i.pre)((0,o.preBufferFromJson)(1),t.pre("files.write"),function(){var t;return(t=e().files).write.apply(t,arguments)}),t)}};var n=r(1),i=r(2),o=r(10)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{export:(0,n.expose)("ipfs.key.export",(0,i.pre)(t.pre("key.export"),function(){var t;return(t=e().key).export.apply(t,arguments)}),t),gen:(0,n.expose)("ipfs.key.gen",(0,i.pre)(t.pre("key.gen"),function(){var t;return(t=e().key).gen.apply(t,arguments)}),t),import:(0,n.expose)("ipfs.key.import",(0,i.pre)(t.pre("key.import"),function(){var t;return(t=e().key).import.apply(t,arguments)}),t),list:(0,n.expose)("ipfs.key.list",(0,i.pre)(t.pre("key.list"),function(){return e().key.list()}),t),rename:(0,n.expose)("ipfs.key.rename",(0,i.pre)(t.pre("key.rename"),function(){var t;return(t=e().key).rename.apply(t,arguments)}),t),rm:(0,n.expose)("ipfs.key.rm",(0,i.pre)(t.pre("key.rm"),function(){var t;return(t=e().key).rm.apply(t,arguments)}),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{ls:(0,n.expose)("ipfs.ls",(0,i.pre)((0,c.preBufferFromJson)(0),(0,u.preCidFromJson)(0),t.pre("ls"),function(){var t;return(t=e()).ls.apply(t,arguments)}),t),lsPullStream:(0,n.expose)("ipfs.lsPullStream",(0,i.pre)((0,c.preBufferFromJson)(0),(0,u.preCidFromJson)(0),t.pre("lsPullStream"),(0,i.post)(function(){var t;return(t=e()).lsPullStream.apply(t,arguments)},function(e){return new Promise(function(r){var n=(0,a.default)();(0,o.default)(e,s.default.sink(n,t)),r((0,f.functionToJson)(n))})})),t)}};var n=r(1),i=r(2),o=l(r(16)),s=l(r(26)),a=l(r(30)),u=r(21),c=r(10),f=r(40);function l(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{publish:(0,n.expose)("ipfs.name.publish",(0,i.pre)(t.pre("name.publish"),function(){var t;return(t=e().name).publish.apply(t,arguments)}),t),resolve:(0,n.expose)("ipfs.name.resolve",(0,i.pre)(t.pre("name.resolve"),function(){var t;return(t=e().name).resolve.apply(t,arguments)}),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{new:(0,n.expose)("ipfs.object.new",(0,i.pre)(t.pre("object.new"),(0,i.post)(function(){var t;return(t=e().object).new.apply(t,arguments)},o.dagNodeToJson)),t),put:(0,n.expose)("ipfs.object.put",(0,i.pre)((0,o.preDagNodeFromJson)(0),(0,a.preBufferFromJson)(0),function(){for(var e=arguments.length,t=Array(e),r=0;r{for(var t of e)t.unregister()}),document.querySelector("#id").addEventListener("click",async()=>{if(!i)return alert("Service worker not registered");const{agentVersion:e,id:t}=await i.id();alert(`${e} ${t}`)}),document.querySelector("#show").addEventListener("click",()=>{const e=document.querySelector("#input").value;i?!i||!e||e.length<4?alert(`invalid multihash received: ${e}`):window.location.href=`/ipfs/${e}`:alert("Service worker not registered")}),document.querySelector("#serviceWorkerStart").addEventListener("click",()=>{i||(o(),document.querySelector("#serviceWorkerStart").classList.add("disable-button"),document.querySelector("#serviceWorkerStop").classList.remove("disable-button"))}),document.querySelector("#serviceWorkerStop").addEventListener("click",()=>{i&&(s(),document.querySelector("#serviceWorkerStart").classList.remove("disable-button"),document.querySelector("#serviceWorkerStop").classList.add("disable-button"))});const o=()=>{"serviceWorker"in navigator&&navigator.serviceWorker.register("service-worker-bundle.js").then(e=>{i=n({addListener:navigator.serviceWorker.addEventListener.bind(navigator.serviceWorker),postMessage:e=>navigator.serviceWorker.controller.postMessage(e)})}).catch(e=>{console.log("-> Failed to register:",e)})},s=()=>{"serviceWorker"in navigator&&navigator.serviceWorker.ready.then(e=>{e.unregister(),i=null})}}]); \ No newline at end of file diff --git a/example/public/service-worker-bundle.js b/example/public/service-worker-bundle.js index 28b12ac..c3ffe66 100644 --- a/example/public/service-worker-bundle.js +++ b/example/public/service-worker-bundle.js @@ -1,18 +1,18 @@ -!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}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=1016)}([function(e,t,r){"use strict";(function(e){ +!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}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=736)}([function(e,t,r){"use strict";(function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ -var n=r(402),i=r(403),o=r(216);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function d(e,t){if(c.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 F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return L(e).length;default:if(n)return F(e).length;t=(""+t).toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function b(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=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){var o,s=1,a=e.length,c=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;s=2,a/=2,c/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var f=-1;for(o=r;oa&&(r=a-c),o=r;o>=0;o--){for(var l=!0,h=0;hi&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function E(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function k(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+l<=r)switch(l){case 1:u<128&&(f=u);break;case 2:128==(192&(o=e[i+1]))&&(c=(31&u)<<6|63&o)>127&&(f=c);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(c=(15&u)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(f=c);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(f=c)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(e){var t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);var r="",n=0;for(;nthis.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 B(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return C(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},c.prototype.compare=function(e,t,r,n,i){if(!c.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 o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(o,s),u=this.slice(n,i),f=e.slice(t,r),l=0;li)&&(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 o=!1;;)switch(n){case"hex":return y(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":return w(this,e,t,r);case"latin1":case"binary":return A(this,e,t,r);case"base64":return _(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function C(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,r,n,i,o){if(!c.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 O(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function M(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function N(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(e,t,r,n,o){return o||N(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function K(e,t,r,n,o){return o||N(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.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},c.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||R(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||R(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||P(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);P(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);P(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,r){return D(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return D(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return K(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return K(this,e,t,!1,r)},c.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(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.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;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function L(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).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(12))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(387);Object.defineProperty(t,"caller",{enumerable:!0,get:function(){return o(n).default}}),Object.defineProperty(t,"call",{enumerable:!0,get:function(){return n.call}});var i=r(396);function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"expose",{enumerable:!0,get:function(){return o(i).default}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(397);Object.defineProperty(t,"pre",{enumerable:!0,get:function(){return o(n).default}});var i=r(398);function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"post",{enumerable:!0,get:function(){return o(i).default}})},function(e,t,r){var n=r(0),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.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},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){e.exports={encode:r(404),decode:r(405),encodingLength:r(406)}},function(e,t){var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var c,u=[],f=!1,l=-1;function h(){f&&c&&(f=!1,c.length?u=c.concat(u):l=-1,u.length&&p())}function p(){if(!f){var e=a(h);f=!0;for(var t=u.length;t;){for(c=u,u=[];++l1)for(var r=1;r{"%%"!==e&&(n++,"%c"===e&&(i=n))}),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=r(1035)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,r(6))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){(function(t,n,i){var o=r(8),s=r(480),a=e.exports=o.util=o.util||{};function c(e){if(8!==e&&16!==e&&24!==e&&32!==e)throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}function u(e){if(this.data="",this.read=0,"string"==typeof e)this.data=e;else if(a.isArrayBuffer(e)||a.isArrayBufferView(e))if(void 0!==i&&e instanceof i)this.data=e.toString("binary");else{var t=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,t)}catch(e){for(var r=0;r15?(i=Date.now(),c(e)):(r.push(e),1===r.length&&s.setAttribute("a",o=!o))}}a.nextTick=a.setImmediate}(),a.isNodejs=void 0!==t&&t.versions&&t.versions.node,a.isArray=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},a.isArrayBuffer=function(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer},a.isArrayBufferView=function(e){return e&&a.isArrayBuffer(e.buffer)&&void 0!==e.byteLength},a.ByteBuffer=u,a.ByteStringBuffer=u;a.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},a.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},a.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},a.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))},a.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var r=this.data;t>0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e);return this.data=r,this._optimizeConstructedString(t),this},a.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this},a.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(a.encodeUtf8(e))},a.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},a.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},a.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},a.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255))},a.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))},a.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))},a.ByteStringBuffer.prototype.putInt=function(e,t){c(t);var r="";do{t-=8,r+=String.fromCharCode(e>>t&255)}while(t>0);return this.putBytes(r)},a.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<0);return t},a.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<=r&&(t-=r<<1),t},a.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},a.ByteStringBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},a.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)},a.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this},a.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},a.ByteStringBuffer.prototype.copy=function(){var e=a.createBuffer(this.data);return e.read=this.read,e},a.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},a.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},a.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this},a.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t=e)return this;t=Math.max(t||this.growSize,e);var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+t);return n.set(r),this.data=new DataView(n.buffer),this},a.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this},a.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var r=0;r>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this},a.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this},a.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this},a.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this},a.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this},a.DataBuffer.prototype.putInt=function(e,t){c(t),this.accommodate(t/8);do{t-=8,this.data.setInt8(this.write++,e>>t&255)}while(t>0);return this},a.DataBuffer.prototype.putSignedInt=function(e,t){return c(t),this.accommodate(t/8),e<0&&(e+=2<0);return t},a.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<=r&&(t-=r<<1),t},a.DataBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},a.DataBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},a.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)},a.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this},a.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},a.DataBuffer.prototype.copy=function(){return new a.DataBuffer(this)},a.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength);t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this},a.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},a.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this},a.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e);return r},a.xorBytes=function(e,t,r){for(var n="",i="",o="",s=0,a=0;r>0;--r,++s)i=e.charCodeAt(s)^t.charCodeAt(s),a>=10&&(n+=o,o="",a=0),o+=String.fromCharCode(i),++a;return n+=o},a.hexToBytes=function(e){var t="",r=0;for(!0&e.length&&(r=1,t+=String.fromCharCode(parseInt(e[0],16)));r>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e)};var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],h="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";a.encode64=function(e,t){for(var r,n,i,o="",s="",a=0;a>2),o+=f.charAt((3&r)<<4|n>>4),isNaN(n)?o+="==":(o+=f.charAt((15&n)<<2|i>>6),o+=isNaN(i)?"=":f.charAt(63&i)),t&&o.length>t&&(s+=o.substr(0,t)+"\r\n",o=o.substr(t));return s+=o},a.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var t,r,n,i,o="",s=0;s>4),64!==n&&(o+=String.fromCharCode((15&r)<<4|n>>2),64!==i&&(o+=String.fromCharCode((3&n)<<6|i)));return o},a.encodeUtf8=function(e){return unescape(encodeURIComponent(e))},a.decodeUtf8=function(e){return decodeURIComponent(escape(e))},a.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:s.encode,decode:s.decode}},a.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)},a.binary.raw.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(e.length));for(var i=r=r||0,o=0;o>2),o+=f.charAt((3&r)<<4|n>>4),isNaN(n)?o+="==":(o+=f.charAt((15&n)<<2|i>>6),o+=isNaN(i)?"=":f.charAt(63&i)),t&&o.length>t&&(s+=o.substr(0,t)+"\r\n",o=o.substr(t));return s+=o},a.binary.base64.decode=function(e,t,r){var n,i,o,s,a=t;a||(a=new Uint8Array(3*Math.ceil(e.length/4))),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var c=0,u=r=r||0;c>4,64!==o&&(a[u++]=(15&i)<<4|o>>2,64!==s&&(a[u++]=(3&o)<<6|s));return t?u-r:a.subarray(0,u)},a.binary.base58.encode=function(e,t){return a.binary.baseN.encode(e,h,t)},a.binary.base58.decode=function(e,t){return a.binary.baseN.decode(e,h,t)},a.text={utf8:{},utf16:{}},a.text.utf8.encode=function(e,t,r){e=a.encodeUtf8(e);var n=t;n||(n=new Uint8Array(e.length));for(var i=r=r||0,o=0;o0?(i=r[n].substring(0,s),o=r[n].substring(s+1)):(i=r[n],o=null),i in t||(t[i]=[]),i in Object.prototype||null===o||t[i].push(unescape(o))}return t};return void 0===e?(null===w&&(w="undefined"!=typeof window&&window.location&&window.location.search?r(window.location.search.substring(1)):{}),t=w):t=r(e),t},a.parseFragment=function(e){var t=e,r="",n=e.indexOf("?");n>0&&(t=e.substring(0,n),r=e.substring(n+1));var i=t.split("/");return i.length>0&&""===i[0]&&i.shift(),{pathString:t,queryString:r,path:i,query:""===r?{}:a.getQueryVariables(r)}},a.makeRequest=function(e){var t=a.parseFragment(e),r={path:t.pathString,query:t.queryString,getPath:function(e){return void 0===e?t.path:t.path[e]},getQuery:function(e,r){var n;return void 0===e?n=t.query:(n=t.query[e])&&void 0!==r&&(n=n[r]),n},getQueryLast:function(e,t){var n=r.getQuery(e);return n?n[n.length-1]:t}};return r},a.makeLink=function(e,t,r){e=jQuery.isArray(e)?e.join("/"):e;var n=jQuery.param(t||{});return r=r||"",e+(n.length>0?"?"+n:"")+(r.length>0?"#"+r:"")},a.setPath=function(e,t,r){if("object"==typeof e&&null!==e)for(var n=0,i=t.length;n0&&o.push(r),s=n.lastIndex;var a=t[0][1];switch(a){case"s":case"o":i");break;case"%":o.push("%");break;default:o.push("<%"+a+"?>")}}return o.push(e.substring(s)),o.join("")},a.formatNumber=function(e,t,r,n){var i=e,o=isNaN(t=Math.abs(t))?2:t,s=void 0===r?",":r,a=void 0===n?".":n,c=i<0?"-":"",u=parseInt(i=Math.abs(+i||0).toFixed(o),10)+"",f=u.length>3?u.length%3:0;return c+(f?u.substr(0,f)+a:"")+u.substr(f).replace(/(\d{3})(?=\d)/g,"$1"+a)+(o?s+Math.abs(i-u).toFixed(o).slice(2):"")},a.formatSize=function(e){return e=e>=1073741824?a.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?a.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?a.formatNumber(e/1024,0)+" KiB":a.formatNumber(e,0)+" bytes"},a.bytesFromIP=function(e){return-1!==e.indexOf(".")?a.bytesFromIPv4(e):-1!==e.indexOf(":")?a.bytesFromIPv6(e):null},a.bytesFromIPv4=function(e){if(4!==(e=e.split(".")).length)return null;for(var t=a.createBuffer(),r=0;rr[n].end-r[n].start&&(n=r.length-1)):r.push({start:c,end:c})}t.push(o)}if(r.length>0){var u=r[n];u.end-u.start>0&&(t.splice(u.start,u.end-u.start+1,""),0===u.start&&t.unshift(""),7===u.end&&t.push(""))}return t.join(":")},a.estimateCores=function(e,t){if("function"==typeof e&&(t=e,e={}),e=e||{},"cores"in a&&!e.update)return t(null,a.cores);if("undefined"!=typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return a.cores=navigator.hardwareConcurrency,t(null,a.cores);if("undefined"==typeof Worker)return a.cores=1,t(null,a.cores);if("undefined"==typeof Blob)return a.cores=2,t(null,a.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(e){for(var t=Date.now(),r=t+4;Date.now()a.st&&i.sti.st&&a.st-1},ke.prototype.set=function(e,t){var r=this.__data__,n=Te(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},xe.prototype.clear=function(){this.__data__={hash:new Ee,map:new(le||ke),string:new Ee}},xe.prototype.delete=function(e){return qe(this,e).delete(e)},xe.prototype.get=function(e){return qe(this,e).get(e)},xe.prototype.has=function(e){return qe(this,e).has(e)},xe.prototype.set=function(e,t){return qe(this,e).set(e,t),this},Ce.prototype.add=Ce.prototype.push=function(e){return this.__data__.set(e,o),this},Ce.prototype.has=function(e){return this.__data__.has(e)},Ie.prototype.clear=function(){this.__data__=new ke},Ie.prototype.delete=function(e){return this.__data__.delete(e)},Ie.prototype.get=function(e){return this.__data__.get(e)},Ie.prototype.has=function(e){return this.__data__.has(e)},Ie.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ke){var i=r.__data__;if(!le||i.lengthu))return!1;var l=o.get(e);if(l&&o.get(t))return l==t;var h=-1,p=!0,d=i&s?new Ce:void 0;for(o.set(e,t),o.set(t,e);++h-1&&e%1==0&&e-1&&e%1==0&&e<=u}function at(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ct(e){return!!e&&"object"==typeof e}function ut(e){return"symbol"==typeof e||ct(e)&&ne.call(e)==S}var ft=L?function(e){return function(t){return e(t)}}(L):function(e){return ct(e)&&st(e.length)&&!!O[ne.call(e)]};function lt(e){return it(e)?Be(e):Fe(e)}function ht(e){return e}r.exports=function(e,t){return(nt(e)?z:Le)(e,je(t))}}).call(this,r(12),r(39)(e))},function(e,t,r){"use strict";(function(t){const n=r(24),i=r(147),o=r(412),s=r(148),a=r(414);class c{constructor(r,s,a){if(e.exports.isCID(r)){let e=r;return this.version=e.version,this.codec=e.codec,void(this.multihash=t.from(e.multihash))}if("string"==typeof r)if(i.isEncoded(r)){const e=i.decode(r);r=parseInt(e.slice(0,1).toString("hex"),16),s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=n.fromB58String(r),r=0;else if(t.isBuffer(r)){const e=r.slice(0,1),t=parseInt(e.toString("hex"),16);if(0===t||1===t){const e=r;r=t,s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=r,r=0}this.codec=s,this.version=r,this.multihash=a,c.validateCID(this)}get buffer(){switch(this.version){case 0:return this.multihash;case 1:return t.concat([t.from("01","hex"),o.getCodeVarint(this.codec),this.multihash]);default:throw new Error("unsupported version")}}get prefix(){return t.concat([t.from(`0${this.version}`,"hex"),o.getCodeVarint(this.codec),n.prefix(this.multihash)])}toV0(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");const{name:e,length:t}=n.decode(this.multihash);if("sha2-256"!==e)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==t)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new u(0,this.codec,this.multihash)}toV1(){return new u(1,this.codec,this.multihash)}toBaseEncodedString(e){switch(e=e||"base58btc",this.version){case 0:if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");return n.toB58String(this.multihash);case 1:return i.encode(e,this.buffer).toString();default:throw new Error("Unsupported version")}}toString(e){return this.toBaseEncodedString(e)}toJSON(){return{codec:this.codec,version:this.version,hash:this.multihash}}equals(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}static validateCID(e){let t=a.checkCIDComponents(e);if(t)throw new Error(t)}}const u=r(26)(c,{className:"CID",symbolName:"@ipld/js-cid/CID"});u.codecs=s,e.exports=u}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.preArrayOfBufferFromJson=t.preArrayOfBufferToJson=t.preBufferToJson=t.preBufferFromJson=t.isBufferJson=t.isBuffer=t.bufferToJson=t.bufferFromJson=void 0;var n=r(129),i=t.bufferFromJson=function(t){return e.from(JSON.parse(t.data).data)},o=t.bufferToJson=function(e){return{__ipfsPostMsgProxyType:"Buffer",data:JSON.stringify(e)}},s=t.isBuffer=e.isBuffer,a=t.isBufferJson=function(e){return e&&"Buffer"===e.__ipfsPostMsgProxyType};t.preBufferFromJson=function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n=1&&"function"==typeof t[t.length-1]))return e.apply(r,arguments);var n=t.pop();e.apply(this,t).then(function(e){n.call(r,null,e)},function(e){n.call(r,e)})}}},function(e,t,r){"use strict";(function(t){var n=r(438),i=r(442);e.exports=function(e,r){if(r||(r={}),!e)throw new Error("Pass in a .proto string or a protobuf-schema parsed object");var o="object"!=typeof e||t.isBuffer(e)?n.parse(e):e,s=function(){var e=this;i(o,r.encodings||{}).forEach(function(t){e[t.name]=function(e){if(!e)return null;var t={};return Object.keys(e).forEach(function(r){t[r]=e[r].value}),t}(t.values)||t})};return s.prototype.toString=function(){return n.stringify(o)},s.prototype.toJSON=function(){return o},new s}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){ +var n=r(328),i=r(329),o=r(172);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function d(e,t){if(c.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 F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(e).length;default:if(n)return F(e).length;t=(""+t).toLowerCase(),n=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(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=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,i);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,i){var o,s=1,a=e.length,c=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;s=2,a/=2,c/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var l=-1;for(o=r;oa&&(r=a-c),o=r;o>=0;o--){for(var f=!0,p=0;pi&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function S(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function _(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+f<=r)switch(f){case 1:u<128&&(l=u);break;case 2:128==(192&(o=e[i+1]))&&(c=(31&u)<<6|63&o)>127&&(l=c);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(c=(15&u)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(e){var t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);var r="",n=0;for(;nthis.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 B(this,t,r);case"utf8":case"utf-8":return _(this,t,r);case"ascii":return C(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},c.prototype.compare=function(e,t,r,n,i){if(!c.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 o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(o,s),u=this.slice(n,i),l=e.slice(t,r),f=0;fi)&&(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 o=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":return A(this,e,t,r);case"latin1":case"binary":return w(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function C(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,r,n,i,o){if(!c.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 P(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function M(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function D(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function O(e,t,r,n,o){return o||D(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,o){return o||D(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.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},c.prototype.readUInt8=function(e,t){return t||T(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||T(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||T(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||T(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||T(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||T(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){t||T(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||T(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||T(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||T(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||T(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||N(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);N(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);N(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,r){return O(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return O(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},c.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(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.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;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function K(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(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(12))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(312);Object.defineProperty(t,"caller",{enumerable:!0,get:function(){return o(n).default}}),Object.defineProperty(t,"call",{enumerable:!0,get:function(){return n.call}});var i=r(321);function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"expose",{enumerable:!0,get:function(){return o(i).default}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(322);Object.defineProperty(t,"pre",{enumerable:!0,get:function(){return o(n).default}});var i=r(323);function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"post",{enumerable:!0,get:function(){return o(i).default}})},function(e,t){e.exports={options:{usePureJavaScript:!1}}},function(e,t){var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var c,u=[],l=!1,f=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):f=-1,u.length&&h())}function h(){if(!l){var e=a(p);l=!0;for(var t=u.length;t;){for(c=u,u=[];++f1)for(var r=1;r{"%%"!==e&&(n++,"%c"===e&&(i=n))}),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=r(765)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,r(4))},function(e,t,r){var n=r(0),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.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},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){(function(t,n,i){var o=r(3),s=r(410),a=e.exports=o.util=o.util||{};function c(e){if(8!==e&&16!==e&&24!==e&&32!==e)throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}function u(e){if(this.data="",this.read=0,"string"==typeof e)this.data=e;else if(a.isArrayBuffer(e)||a.isArrayBufferView(e))if(void 0!==i&&e instanceof i)this.data=e.toString("binary");else{var t=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,t)}catch(e){for(var r=0;r15?(i=Date.now(),c(e)):(r.push(e),1===r.length&&s.setAttribute("a",o=!o))}}a.nextTick=a.setImmediate}(),a.isNodejs=void 0!==t&&t.versions&&t.versions.node,a.isArray=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},a.isArrayBuffer=function(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer},a.isArrayBufferView=function(e){return e&&a.isArrayBuffer(e.buffer)&&void 0!==e.byteLength},a.ByteBuffer=u,a.ByteStringBuffer=u;a.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},a.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},a.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},a.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))},a.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var r=this.data;t>0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e);return this.data=r,this._optimizeConstructedString(t),this},a.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this},a.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(a.encodeUtf8(e))},a.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},a.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},a.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},a.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255))},a.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))},a.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))},a.ByteStringBuffer.prototype.putInt=function(e,t){c(t);var r="";do{t-=8,r+=String.fromCharCode(e>>t&255)}while(t>0);return this.putBytes(r)},a.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<0);return t},a.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<=r&&(t-=r<<1),t},a.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},a.ByteStringBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},a.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)},a.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this},a.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},a.ByteStringBuffer.prototype.copy=function(){var e=a.createBuffer(this.data);return e.read=this.read,e},a.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},a.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},a.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this},a.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t=e)return this;t=Math.max(t||this.growSize,e);var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+t);return n.set(r),this.data=new DataView(n.buffer),this},a.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this},a.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var r=0;r>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this},a.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this},a.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this},a.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this},a.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this},a.DataBuffer.prototype.putInt=function(e,t){c(t),this.accommodate(t/8);do{t-=8,this.data.setInt8(this.write++,e>>t&255)}while(t>0);return this},a.DataBuffer.prototype.putSignedInt=function(e,t){return c(t),this.accommodate(t/8),e<0&&(e+=2<0);return t},a.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<=r&&(t-=r<<1),t},a.DataBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},a.DataBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},a.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)},a.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this},a.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},a.DataBuffer.prototype.copy=function(){return new a.DataBuffer(this)},a.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength);t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this},a.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},a.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this},a.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e);return r},a.xorBytes=function(e,t,r){for(var n="",i="",o="",s=0,a=0;r>0;--r,++s)i=e.charCodeAt(s)^t.charCodeAt(s),a>=10&&(n+=o,o="",a=0),o+=String.fromCharCode(i),++a;return n+=o},a.hexToBytes=function(e){var t="",r=0;for(!0&e.length&&(r=1,t+=String.fromCharCode(parseInt(e[0],16)));r>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e)};var l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",f=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],p="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";a.encode64=function(e,t){for(var r,n,i,o="",s="",a=0;a>2),o+=l.charAt((3&r)<<4|n>>4),isNaN(n)?o+="==":(o+=l.charAt((15&n)<<2|i>>6),o+=isNaN(i)?"=":l.charAt(63&i)),t&&o.length>t&&(s+=o.substr(0,t)+"\r\n",o=o.substr(t));return s+=o},a.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var t,r,n,i,o="",s=0;s>4),64!==n&&(o+=String.fromCharCode((15&r)<<4|n>>2),64!==i&&(o+=String.fromCharCode((3&n)<<6|i)));return o},a.encodeUtf8=function(e){return unescape(encodeURIComponent(e))},a.decodeUtf8=function(e){return decodeURIComponent(escape(e))},a.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:s.encode,decode:s.decode}},a.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)},a.binary.raw.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(e.length));for(var i=r=r||0,o=0;o>2),o+=l.charAt((3&r)<<4|n>>4),isNaN(n)?o+="==":(o+=l.charAt((15&n)<<2|i>>6),o+=isNaN(i)?"=":l.charAt(63&i)),t&&o.length>t&&(s+=o.substr(0,t)+"\r\n",o=o.substr(t));return s+=o},a.binary.base64.decode=function(e,t,r){var n,i,o,s,a=t;a||(a=new Uint8Array(3*Math.ceil(e.length/4))),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var c=0,u=r=r||0;c>4,64!==o&&(a[u++]=(15&i)<<4|o>>2,64!==s&&(a[u++]=(3&o)<<6|s));return t?u-r:a.subarray(0,u)},a.binary.base58.encode=function(e,t){return a.binary.baseN.encode(e,p,t)},a.binary.base58.decode=function(e,t){return a.binary.baseN.decode(e,p,t)},a.text={utf8:{},utf16:{}},a.text.utf8.encode=function(e,t,r){e=a.encodeUtf8(e);var n=t;n||(n=new Uint8Array(e.length));for(var i=r=r||0,o=0;o0?(i=r[n].substring(0,s),o=r[n].substring(s+1)):(i=r[n],o=null),i in t||(t[i]=[]),i in Object.prototype||null===o||t[i].push(unescape(o))}return t};return void 0===e?(null===A&&(A="undefined"!=typeof window&&window.location&&window.location.search?r(window.location.search.substring(1)):{}),t=A):t=r(e),t},a.parseFragment=function(e){var t=e,r="",n=e.indexOf("?");n>0&&(t=e.substring(0,n),r=e.substring(n+1));var i=t.split("/");return i.length>0&&""===i[0]&&i.shift(),{pathString:t,queryString:r,path:i,query:""===r?{}:a.getQueryVariables(r)}},a.makeRequest=function(e){var t=a.parseFragment(e),r={path:t.pathString,query:t.queryString,getPath:function(e){return void 0===e?t.path:t.path[e]},getQuery:function(e,r){var n;return void 0===e?n=t.query:(n=t.query[e])&&void 0!==r&&(n=n[r]),n},getQueryLast:function(e,t){var n=r.getQuery(e);return n?n[n.length-1]:t}};return r},a.makeLink=function(e,t,r){e=jQuery.isArray(e)?e.join("/"):e;var n=jQuery.param(t||{});return r=r||"",e+(n.length>0?"?"+n:"")+(r.length>0?"#"+r:"")},a.setPath=function(e,t,r){if("object"==typeof e&&null!==e)for(var n=0,i=t.length;n0&&o.push(r),s=n.lastIndex;var a=t[0][1];switch(a){case"s":case"o":i");break;case"%":o.push("%");break;default:o.push("<%"+a+"?>")}}return o.push(e.substring(s)),o.join("")},a.formatNumber=function(e,t,r,n){var i=e,o=isNaN(t=Math.abs(t))?2:t,s=void 0===r?",":r,a=void 0===n?".":n,c=i<0?"-":"",u=parseInt(i=Math.abs(+i||0).toFixed(o),10)+"",l=u.length>3?u.length%3:0;return c+(l?u.substr(0,l)+a:"")+u.substr(l).replace(/(\d{3})(?=\d)/g,"$1"+a)+(o?s+Math.abs(i-u).toFixed(o).slice(2):"")},a.formatSize=function(e){return e=e>=1073741824?a.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?a.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?a.formatNumber(e/1024,0)+" KiB":a.formatNumber(e,0)+" bytes"},a.bytesFromIP=function(e){return-1!==e.indexOf(".")?a.bytesFromIPv4(e):-1!==e.indexOf(":")?a.bytesFromIPv6(e):null},a.bytesFromIPv4=function(e){if(4!==(e=e.split(".")).length)return null;for(var t=a.createBuffer(),r=0;rr[n].end-r[n].start&&(n=r.length-1)):r.push({start:c,end:c})}t.push(o)}if(r.length>0){var u=r[n];u.end-u.start>0&&(t.splice(u.start,u.end-u.start+1,""),0===u.start&&t.unshift(""),7===u.end&&t.push(""))}return t.join(":")},a.estimateCores=function(e,t){if("function"==typeof e&&(t=e,e={}),e=e||{},"cores"in a&&!e.update)return t(null,a.cores);if("undefined"!=typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return a.cores=navigator.hardwareConcurrency,t(null,a.cores);if("undefined"==typeof Worker)return a.cores=1,t(null,a.cores);if("undefined"==typeof Blob)return a.cores=2,t(null,a.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(e){for(var t=Date.now(),r=t+4;Date.now()a.st&&i.sti.st&&a.st=1&&"function"==typeof t[t.length-1]))return e.apply(r,arguments);var n=t.pop();e.apply(this,t).then(function(e){n.call(r,null,e)},function(e){n.call(r,e)})}}},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";(function(e){const n=r(27),i=r(330);t.names=i.names,t.codes=i.codes,t.defaultLengths=i.defaultLengths;const o=r(18);function s(e){t.decode(e)}t.toHexString=function(t){if(!e.isBuffer(t))throw new Error("must be passed a buffer");return t.toString("hex")},t.fromHexString=function(t){return e.from(t,"hex")},t.toB58String=function(t){if(!e.isBuffer(t))throw new Error("must be passed a buffer");return n.encode(t)},t.fromB58String=function(t){let r=t;return e.isBuffer(t)&&(r=t.toString()),e.from(n.decode(r))},t.decode=function(r){if(!e.isBuffer(r))throw new Error("multihash must be a Buffer");if(r.length<3)throw new Error("multihash too short. must be > 3 bytes.");let n=o.decode(r);if(!t.isValidCode(n))throw new Error(`multihash unknown function code: 0x${n.toString(16)}`);r=r.slice(o.decode.bytes);let s=o.decode(r);if(s<1)throw new Error(`multihash invalid length: 0x${s.toString(16)}`);if((r=r.slice(o.decode.bytes)).length!==s)throw new Error(`multihash length inconsistent: 0x${r.toString("hex")}`);return{code:n,name:i.codes[n],length:s,digest:r}},t.encode=function(r,n,i){if(!r||!n)throw new Error("multihash encode requires at least two args: digest, code");const s=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(o.encode(s)),e.from(o.encode(i)),r])},t.coerceCode=function(e){let r=e;if("string"==typeof e){if(!i.names[e])throw new Error(`Unrecognized hash function named: ${e}`);r=i.names[e]}if("number"!=typeof r)throw new Error(`Hash function code should be a number. Got: ${r}`);if(!i.codes[r]&&!t.isAppCode(r))throw new Error(`Unrecognized function code: ${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=s,t.prefix=function(e){return s(e),e.slice(0,2)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";var n,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var c=10;function u(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var i,o,s,a;if("function"!=typeof r)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r);if(void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return e}function f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=function(){for(var e=[],t=0;t0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)o(c,this,t);else{var u=c.length,l=d(c,u);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},a.prototype.listenerCount=h,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,r){"use strict";e.exports=function e(t){var r=arguments.length;if("function"==typeof t&&1===t.length){for(var n=new Array(r),i=0;i!(!e||!e[n])),i},e.exports.proto=function(e,{className:t,symbolName:r,withoutNew:n}){const i=Symbol.for(r),o={[t]:function(...t){if(n&&!(this instanceof o))return new o(...t);const r=e.call(this,...t)||this;return r&&!r[i]&&Object.defineProperty(r,i,{value:!0}),r}}[t];return o.prototype=Object.create(e.prototype),o.prototype.constructor=o,Object.defineProperty(o.prototype,Symbol.toStringTag,{get:()=>t}),o[`is${t}`]=(e=>!(!e||!e[i])),o}},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";Object.defineProperty(t,"__esModule",{value:!0}),t.preArrayOfCidFromJson=t.preArrayOfCidToJson=t.preCidToJson=t.preCidFromJson=t.isCidJson=t.isCid=t.cidToJson=t.cidFromJson=void 0;var n,i=r(72),o=(n=i)&&n.__esModule?n:{default:n},s=r(10),a=r(100);var c=t.cidFromJson=function(e){return new o.default(e.version,e.codec,(0,s.bufferFromJson)(e.hash))},u=t.cidToJson=function(e){return{__ipfsPostMsgProxyType:"CID",codec:e.codec,version:e.version,hash:(0,s.bufferToJson)(e.multihash)}},l=t.isCid=o.default.isCID,f=t.isCidJson=function(e){return e&&"CID"===e.__ipfsPostMsgProxyType};t.preCidFromJson=function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n * @license MIT */ -function n(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i=0;u--)if(f[u]!==l[u])return!1;for(u=f.length-1;u>=0;u--)if(c=f[u],!y(e[c],t[c],r,n))return!1;return!0}(e,t,r,s))}return r?e===t:e==t}function v(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function A(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&b(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!e&&i&&!r;if((!e&&o.isError(i)&&s&&w(i,r)||a)&&b(i,r,"Got unwanted exception"+n),e&&i&&r&&!w(i,r)||!e&&i)throw i}l.AssertionError=function(e){var t;this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=d(g((t=this).actual),128)+" "+t.operator+" "+d(g(t.expected),128),this.generatedMessage=!0);var r=e.stackStartFunction||b;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var i=n.stack,o=p(r),s=i.indexOf("\n"+o);if(s>=0){var a=i.indexOf("\n",s+1);i=i.substring(a+1)}this.stack=i}}},o.inherits(l.AssertionError,Error),l.fail=b,l.ok=m,l.equal=function(e,t,r){e!=t&&b(e,t,r,"==",l.equal)},l.notEqual=function(e,t,r){e==t&&b(e,t,r,"!=",l.notEqual)},l.deepEqual=function(e,t,r){y(e,t,!1)||b(e,t,r,"deepEqual",l.deepEqual)},l.deepStrictEqual=function(e,t,r){y(e,t,!0)||b(e,t,r,"deepStrictEqual",l.deepStrictEqual)},l.notDeepEqual=function(e,t,r){y(e,t,!1)&&b(e,t,r,"notDeepEqual",l.notDeepEqual)},l.notDeepStrictEqual=function e(t,r,n){y(t,r,!0)&&b(t,r,n,"notDeepStrictEqual",e)},l.strictEqual=function(e,t,r){e!==t&&b(e,t,r,"===",l.strictEqual)},l.notStrictEqual=function(e,t,r){e===t&&b(e,t,r,"!==",l.notStrictEqual)},l.throws=function(e,t,r){A(!0,e,t,r)},l.doesNotThrow=function(e,t,r){A(!1,e,t,r)},l.ifError=function(e){if(e)throw e};var _=Object.keys||function(e){var t=[];for(var r in e)s.call(e,r)&&t.push(r);return t}}).call(this,r(12))},function(e,t,r){"use strict";const n=t;n.bignum=r(71),n.define=r(495).define,n.base=r(111),n.constants=r(263),n.decoders=r(500),n.encoders=r(502)},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function i(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,r,s,a,c,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var f=new Error('Uncaught, unspecified "error" event. ('+t+")");throw f.context=t,f}if(o(r=this._events[e]))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),r.apply(this,a)}else if(i(r))for(a=Array.prototype.slice.call(arguments,1),s=(u=r.slice()).length,c=0;c0&&this._events[e].length>s&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){if(!n(t))throw TypeError("listener must be a function");var r=!1;function i(){this.removeListener(e,i),r||(r=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},r.prototype.removeListener=function(e,t){var r,o,s,a;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(r=this._events[e]).length,o=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(r)){for(a=s;a-- >0;)if(r[a]===t||r[a].listener&&r[a].listener===t){o=a;break}if(o<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n(r=this._events[e]))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,r){"use strict";(function(e){const n=r(9),i=r(314);t.names=i.names,t.codes=i.codes,t.defaultLengths=i.defaultLengths;const o=r(5);function s(e){t.decode(e)}t.toHexString=function(t){if(!e.isBuffer(t))throw new Error("must be passed a buffer");return t.toString("hex")},t.fromHexString=function(t){return e.from(t,"hex")},t.toB58String=function(t){if(!e.isBuffer(t))throw new Error("must be passed a buffer");return n.encode(t)},t.fromB58String=function(t){let r=t;return e.isBuffer(t)&&(r=t.toString()),e.from(n.decode(r))},t.decode=function(r){if(!e.isBuffer(r))throw new Error("multihash must be a Buffer");if(r.length<3)throw new Error("multihash too short. must be > 3 bytes.");let n=o.decode(r);if(!t.isValidCode(n))throw new Error(`multihash unknown function code: 0x${n.toString(16)}`);r=r.slice(o.decode.bytes);let s=o.decode(r);if(s<1)throw new Error(`multihash invalid length: 0x${s.toString(16)}`);if((r=r.slice(o.decode.bytes)).length!==s)throw new Error(`multihash length inconsistent: 0x${r.toString("hex")}`);return{code:n,name:i.codes[n],length:s,digest:r}},t.encode=function(r,n,i){if(!r||!n)throw new Error("multihash encode requires at least two args: digest, code");const s=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(o.encode(s)),e.from(o.encode(i)),r])},t.coerceCode=function(e){let r=e;if("string"==typeof e){if(!i.names[e])throw new Error(`Unrecognized hash function named: ${e}`);r=i.names[e]}if("number"!=typeof r)throw new Error(`Hash function code should be a number. Got: ${r}`);if(!i.codes[r]&&!t.isAppCode(r))throw new Error(`Unrecognized function code: ${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=s,t.prefix=function(e){return s(e),e.slice(0,2)}}).call(this,r(0).Buffer)},function(e,t,r){e.exports=r(8),r(81),r(481),r(59),r(170),r(256),r(138),r(483),r(109),r(484),r(258),r(485),r(255),r(172),r(93),r(251),r(253),r(486),r(245),r(252),r(249),r(174),r(43),r(250),r(487),r(488),r(244),r(13)},function(e,t,r){"use strict";e.exports=function(e,{className:t,symbolName:r}){const n=Symbol.for(r),i={[t]:class extends e{constructor(...e){super(...e),Object.defineProperty(this,n,{value:!0})}get[Symbol.toStringTag](){return t}}}[t];return i[`is${t}`]=(e=>!(!e||!e[n])),i},e.exports.proto=function(e,{className:t,symbolName:r,withoutNew:n}){const i=Symbol.for(r),o={[t]:function(...t){if(n&&!(this instanceof o))return new o(...t);const r=e.call(this,...t)||this;return r&&!r[i]&&Object.defineProperty(r,i,{value:!0}),r}}[t];return o.prototype=Object.create(e.prototype),o.prototype.constructor=o,Object.defineProperty(o.prototype,Symbol.toStringTag,{get:()=>t}),o[`is${t}`]=(e=>!(!e||!e[i])),o}},function(e,t,r){var n=r(0),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.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},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.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";Object.defineProperty(t,"__esModule",{value:!0}),t.preArrayOfCidFromJson=t.preArrayOfCidToJson=t.preCidToJson=t.preCidFromJson=t.isCidJson=t.isCid=t.cidToJson=t.cidFromJson=void 0;var n,i=r(16),o=(n=i)&&n.__esModule?n:{default:n},s=r(17),a=r(129);var c=t.cidFromJson=function(e){return new o.default(e.version,e.codec,(0,s.bufferFromJson)(e.hash))},u=t.cidToJson=function(e){return{__ipfsPostMsgProxyType:"CID",codec:e.codec,version:e.version,hash:(0,s.bufferToJson)(e.multihash)}},f=t.isCid=o.default.isCID,l=t.isCidJson=function(e){return e&&"CID"===e.__ipfsPostMsgProxyType};t.preCidFromJson=function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n=0;u--)if(l[u]!==f[u])return!1;for(u=l.length-1;u>=0;u--)if(c=l[u],!b(e[c],t[c],r,n))return!1;return!0}(e,t,r,s))}return r?e===t:e==t}function v(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function A(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function w(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&g(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!e&&i&&!r;if((!e&&o.isError(i)&&s&&A(i,r)||a)&&g(i,r,"Got unwanted exception"+n),e&&i&&r&&!A(i,r)||!e&&i)throw i}f.AssertionError=function(e){var t;this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=d(m((t=this).actual),128)+" "+t.operator+" "+d(m(t.expected),128),this.generatedMessage=!0);var r=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var i=n.stack,o=h(r),s=i.indexOf("\n"+o);if(s>=0){var a=i.indexOf("\n",s+1);i=i.substring(a+1)}this.stack=i}}},o.inherits(f.AssertionError,Error),f.fail=g,f.ok=y,f.equal=function(e,t,r){e!=t&&g(e,t,r,"==",f.equal)},f.notEqual=function(e,t,r){e==t&&g(e,t,r,"!=",f.notEqual)},f.deepEqual=function(e,t,r){b(e,t,!1)||g(e,t,r,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,r){b(e,t,!0)||g(e,t,r,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,r){b(e,t,!1)&&g(e,t,r,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,r,n){b(t,r,!0)&&g(t,r,n,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,r){e!==t&&g(e,t,r,"===",f.strictEqual)},f.notStrictEqual=function(e,t,r){e===t&&g(e,t,r,"!==",f.notStrictEqual)},f.throws=function(e,t,r){w(!0,e,t,r)},f.doesNotThrow=function(e,t,r){w(!1,e,t,r)},f.ifError=function(e){if(e)throw e};var E=Object.keys||function(e){var t=[];for(var r in e)s.call(e,r)&&t.push(r);return t}}).call(this,r(12))},function(e,t,r){ /** PROMISIFY CALLBACK-STYLE FUNCTIONS TO ES6 PROMISES * * EXAMPLE: @@ -35,16 +35,13 @@ function n(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r * @version: 1.0.3 * @author: Manuel Di Iorio **/ -var n=function(e,t){return function(){var r=Array.prototype.slice.call(arguments),n=r.length-1,i=r&&r.length>0?r[n]:null;return("function"==typeof i?i:null)?e.apply(t,r):new Promise(function(n,i){r.push(function(e,t){if(e)return i(e);n(t)}),e.apply(t,r)})}};e.exports=function(e,t){t=t||{};var r=Object.prototype.toString.call(e);if("[object Object]"===r||"[object Array]"===r){var i=t.replace?e:{};for(var o in e)e.hasOwnProperty(o)&&(i[o]=n(e[o]));return i}return n(e,t.context||e)}},function(e,t,r){(function(e,n){var i; +var n=function(e,t){return function(){var r=Array.prototype.slice.call(arguments),n=r.length-1,i=r&&r.length>0?r[n]:null;return("function"==typeof i?i:null)?e.apply(t,r):new Promise(function(n,i){r.push(function(e,t){if(e)return i(e);n(t)}),e.apply(t,r)})}};e.exports=function(e,t){t=t||{};var r=Object.prototype.toString.call(e);if("[object Object]"===r||"[object Array]"===r){var i=t.replace?e:{};for(var o in e)e.hasOwnProperty(o)&&(i[o]=n(e[o]));return i}return n(e,t.context||e)}},function(e,t,r){"use strict";(function(n){const i=r(13),o=r(614),s=r(22),a=r(9);const c=r(19)(class{constructor(e,t,r){s(n.isBuffer(e),"invalid id provided"),t&&r&&s(t.public.bytes.equals(r.bytes),"inconsistent arguments"),this._id=e,this._idB58String=i.toB58String(this.id),this._privKey=t,this._pubKey=r}get id(){return this._id}set id(e){throw new Error("Id is immutable")}get privKey(){return this._privKey}set privKey(e){this._privKey=e}get pubKey(){return this._pubKey?this._pubKey:this._privKey?this._privKey.public:void 0}set pubKey(e){this._pubKey=e}marshalPubKey(){if(this.pubKey)return o.marshalPublicKey(this.pubKey)}marshalPrivKey(){if(this.privKey)return o.marshalPrivateKey(this.privKey)}toPrint(){let e=this.toB58String();e.startsWith("Qm")&&(e=e.slice(2));let t=6;return e.length"}toJSON(){return{id:this.toB58String(),privKey:u(this.marshalPrivKey()),pubKey:u(this.marshalPubKey())}}toHexString(){return i.toHexString(this.id)}toBytes(){return this.id}toB58String(){return this._idB58String}isEqual(e){if(n.isBuffer(e))return this.id.equals(e);if(e.id)return this.id.equals(e.id);throw new Error("not valid Id")}isValid(e){this.privKey&&this.privKey.public&&this.privKey.public.bytes&&n.isBuffer(this.pubKey.bytes)&&this.privKey.public.bytes.equals(this.pubKey.bytes)?e():e(new Error("Keys not match"))}},{className:"PeerId",symbolName:"@libp2p/js-peer-id/PeerId"});function u(e){if(e)return e.toString("base64")}(t=e.exports=c).create=function(e,t){"function"==typeof e&&(t=e,e={}),(e=e||{}).bits=e.bits||2048,a([t=>o.generateKeyPair("RSA",e.bits,t),(e,t)=>e.public.hash((r,n)=>{t(r,n,e)})],(e,r,n)=>{if(e)return t(e);t(null,new c(r,n))})},t.createFromHexString=function(e){return new c(i.fromHexString(e))},t.createFromBytes=function(e){return new c(e)},t.createFromB58String=function(e){return new c(i.fromB58String(e))},t.createFromPubKey=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let r;try{let i=e;if("string"==typeof i&&(i=n.from(e,"base64")),!n.isBuffer(i))throw new Error("Supplied key is neither a base64 string nor a buffer");r=o.unmarshalPublicKey(i)}catch(e){return t(e)}r.hash((e,n)=>{if(e)return t(e);t(null,new c(n,null,r))})},t.createFromPrivKey=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let r=e;try{if("string"==typeof r&&(r=n.from(e,"base64")),!n.isBuffer(r))throw new Error("Supplied key is neither a base64 string nor a buffer")}catch(e){return t(e)}a([e=>o.unmarshalPrivateKey(r,e),(e,t)=>e.public.hash((r,n)=>{t(r,n,e)})],(e,r,n)=>{if(e)return t(e);t(null,new c(r,n,n.public))})},t.createFromJSON=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let r,s,u,l;try{r=i.fromB58String(e.id),s=e.privKey&&n.from(e.privKey,"base64"),u=e.pubKey&&n.from(e.pubKey,"base64"),l=u&&o.unmarshalPublicKey(u)}catch(e){return t(e)}s?a([e=>o.unmarshalPrivateKey(s,e),(e,t)=>e.public.hash((r,n)=>{t(r,n,e)}),(e,t,r)=>{l?l.hash((n,i)=>{r(n,e,t,i)}):r(null,e,t)}],(e,n,i,o)=>e?t(e):l&&!n.equals(o)?t(new Error("Public and private key do not match")):r&&!n.equals(r)?t(new Error("Id and private key do not match")):void t(null,new c(r,i,l))):t(null,new c(r,null,l))},t.isPeerId=function(e){return Boolean("object"==typeof e&&e._id&&e._idB58String)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){var n=r(367),i=r(371);e.exports=function(e,r){if(r||(r={}),!e)throw new Error("Pass in a .proto string or a protobuf-schema parsed object");var o="object"!=typeof e||t.isBuffer(e)?n.parse(e):e,s=function(){var e=this;i(o,r.encodings||{}).forEach(function(t){e[t.name]=function(e){if(!e)return null;var t={};return Object.keys(e).forEach(function(r){t[r]=e[r].value}),t}(t.values)||t})};return s.prototype.toString=function(){return n.stringify(o)},s.prototype.toJSON=function(){return o},new s}}).call(this,r(0).Buffer)},function(e,t,r){t.source=r(496),t.sink=r(497)},function(e,t,r){var n=r(173);e.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(e,t,r){"use strict";const n=r(622),i=r(831),o=r(566),s=r(625);t.Key=n,t.MemoryDatastore=i,t.utils=o,t.Errors=s},function(e,t,r){"use strict";(function(t){const n=r(13),i=r(358);function o(e,t,r,i){if("function"==typeof r&&(i=r,r=void 0),!i)throw new Error("Missing callback");o.digest(e,t,r,(e,o)=>{if(e)return i(e);i(null,n.encode(o,t,r))})}e.exports=o,o.Buffer=t,o.multihash=n,o.digest=function(e,t,r,n){if("function"==typeof r&&(n=r,r=void 0),!n)throw new Error("Missing callback");let i,s=n;r&&(s=((e,t)=>{if(e)return n(e);n(null,t.slice(0,r))}));try{i=o.createHash(t)}catch(e){return s(e)}i(e,s)},o.createHash=function(e){if(e=n.coerceCode(e),!o.functions[e])throw new Error("multihash function "+e+" not yet supported");return o.functions[e]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";e.exports=r(313)},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},r(362),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(12))},function(e,t,r){var n=r(3);r(61),r(208),r(209),r(8),n.random&&n.random.getBytes?e.exports=n.random:function(t){var r={},i=new Array(4),o=n.util.createBuffer();function s(){var e=n.prng.create(r);return e.getBytes=function(t,r){return e.generate(t,r)},e.getBytesSync=function(t){return e.generate(t)},e}r.formatKey=function(e){var t=n.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),n.aes._expandKey(e,!1)},r.formatSeed=function(e){var t=n.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),e},r.cipher=function(e,t){return n.aes._updateBlock(e,t,i,!1),o.putInt32(i[0]),o.putInt32(i[1]),o.putInt32(i[2]),o.putInt32(i[3]),o.getBytes()},r.increment=function(e){return++e[3],e},r.md=n.md.sha256;var a=s(),c=null;if("undefined"!=typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(c=function(e){return u.getRandomValues(e)})}if(n.options.usePureJavaScript||!n.util.isNodejs&&!c){if("undefined"==typeof window||window.document,a.collectInt(+new Date,32),"undefined"!=typeof navigator){var l="";for(var f in navigator)try{"string"==typeof navigator[f]&&(l+=navigator[f])}catch(e){}a.collect(l),l=null}t&&(t().mousemove(function(e){a.collectInt(e.clientX,16),a.collectInt(e.clientY,16)}),t().keypress(function(e){a.collectInt(e.charCode,8)}))}if(n.random)for(var f in a)n.random[f]=a[f];else n.random=a;n.random.createInstance=s,e.exports=n.random}("undefined"!=typeof jQuery?jQuery:null)},function(e,t,r){"use strict";var n=r(122);e.exports=function(e){return n(function(e,t){return e.push(t),e},[],e)}},function(e,t,r){"use strict";(function(t){const n=r(815),i=r(563),o=r(18),s=r(27),a=r(19).proto(function(e){if(!(this instanceof a))return new a(e);if(null==e&&(e=""),e instanceof t)this.buffer=n.fromBuffer(e);else if("string"==typeof e||e instanceof String){if(e.length>0&&"/"!==e.charAt(0))throw new Error(`multiaddr "${e}" must start with a "/"`);this.buffer=n.fromString(e)}else{if(!(e.buffer&&e.protos&&e.protoCodes))throw new Error("addr must be a string, Buffer, or another Multiaddr");this.buffer=n.fromBuffer(e.buffer)}},{className:"Multiaddr",symbolName:"@multiformats/js-multiaddr/multiaddr"});a.prototype.toString=function(){return n.bufferToString(this.buffer)},a.prototype.toJSON=a.prototype.toString,a.prototype.toOptions=function(){const e={},t=this.toString().split("/");return e.family="ip4"===t[1]?"ipv4":"ipv6",e.host=t[2],e.transport=t[3],e.port=t[4],e},a.prototype.inspect=function(){return""},a.prototype.protos=function(){return this.protoCodes().map(e=>Object.assign({},i(e)))},a.prototype.protoCodes=function(){const e=[],t=this.buffer;let r=0;for(;re.name)},a.prototype.tuples=function(){return n.bufferToTuples(this.buffer)},a.prototype.stringTuples=function(){const e=n.bufferToTuples(this.buffer);return n.tuplesToStringTuples(e)},a.prototype.encapsulate=function(e){return e=a(e),a(this.toString()+e.toString())},a.prototype.decapsulate=function(e){e=e.toString();const t=this.toString(),r=t.lastIndexOf(e);if(r<0)throw new Error("Address "+this+" does not contain subaddress: "+e);return a(t.slice(0,r))},a.prototype.getPeerId=function(){let e=null;try{e=this.stringTuples().filter(e=>{if(e[0]===i.names.ipfs.code)return!0})[0][1],s.decode(e)}catch(t){e=null}return e},a.prototype.getPath=function(){let e=null;try{e=this.stringTuples().filter(e=>{if(i(e[0]).path)return!0})[0][1]}catch(t){e=null}return e},a.prototype.equals=function(e){return this.buffer.equals(e.buffer)},a.prototype.nodeAddress=function(){const e=this.protoCodes(),t=this.protoNames(),r=this.toString().split("/").slice(1);if(r.length<4)throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6}/{address}/{tcp, udp}/{port}".');if(4!==e[0]&&41!==e[0]&&54!==e[0]&&55!==e[0])throw new Error(`no protocol with name: "'${t[0]}'". Must have a valid family name: "{ip4, ip6, dns4, dns6}".`);if("tcp"!==r[2]&&"udp"!==r[2])throw new Error(`no protocol with name: "'${t[1]}'". Must have a valid transport protocol: "{tcp, udp}".`);return{family:41===e[0]||55===e[0]?6:4,address:r[1],port:r[3]}},a.fromNodeAddress=function(e,t){if(!e)throw new Error("requires node address object");if(!t)throw new Error("requires transport protocol");const r="IPv6"===e.family?"ip6":"ip4";return a("/"+[r,e.address,t,e.port].join("/"))},a.prototype.isThinWaistAddress=function(e){const t=(e||this).protos();return 2===t.length&&((4===t[0].code||41===t[0].code)&&(6===t[1].code||273===t[1].code))},a.protocols=i,a.isName=function(e){return!!a.isMultiaddr(e)&&e.protos().some(e=>e.resolvable)},a.resolve=function(e,t){return a.isMultiaddr(e)&&a.isName(e)?t(new Error("not implemented yet")):t(new Error("not a valid name"))},e.exports=a}).call(this,r(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAsync=void 0;var n,i=r(378),o=(n=i)&&n.__esModule?n:{default:n};var s="function"==typeof Symbol;function a(e){return s&&"AsyncFunction"===e[Symbol.toStringTag]}t.default=function(e){return a(e)?(0,o.default)(e):e},t.isAsync=a},function(e,t,r){"use strict";const n=t;n.bignum=r(423),n.define=r(425).define,n.base=r(90),n.constants=r(223),n.decoders=r(432),n.encoders=r(434)},function(e,t,r){"use strict";var n=r(243);e.exports=function(e,t){if(!e)return function(e,r){return e?n(r,e,t):r(!0)};Array.isArray(e)||(e=Object.keys(e).map(function(t){return e[t]}));var r=0;return function(i,o){if(i)return n(o,i,t);r>=e.length?o(!0):o(null,e[r++])}}},function(e,t,r){t.source=r(147),t.through=r(528),t.sink=r(247),t.duplex=r(268)},function(e,t,r){"use strict";(function(n){const i=r(334);(t=e.exports=s).encode=function(e,t){const r=a(e);return s(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(e){return!1}},t.names=Object.freeze(Object.keys(i.names)),t.codes=Object.freeze(Object.keys(i.codes));const o=new Error("Unsupported encoding");function s(e,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 o;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";Object.defineProperty(t,"__esModule",{value:!0});t.functionToJson=function(e){return{__ipfsPostMsgProxyType:"Function",name:e}},t.isFunctionJson=function(e){return e&&"Function"===e.__ipfsPostMsgProxyType}},function(e,t,r){(function(t,n){var i=r(80);e.exports=s,e.exports.source=function(e){return s(null,e)},e.exports.sink=function(e){return s(e,null)};var o=void 0===t?n.nextTick:t;function s(e,t){e&&"object"==typeof e&&(t=e.source,e=e.sink);var r,n,s,a=[],c=[],u=new i;u.writable=u.readable=!0,u.write=function(e){return a.length?a.shift()(null,e):c.push(e),a.length||(n=!0),!!a.length},u.end=function(){t?c.length?d():t(r=!0,a.length?a.shift():function(){}):a.length&&a.shift()(!0)},u.source=function(e,t){c.length?(t(null,c.shift()),c.length||u.emit("drain")):((r=r||e)?t(r):a.push(t),n&&(n=!1,u.emit("drain")))},e&&(s=e(u.source)),s&&!t&&(t=s);var l=[],f=!1,p=!1;if(u.sink=function(e){t=e,o(d)},t){u.sink(t);var h=u.pipe.bind(u);u.pipe=function(e,t){var r=h(e,t);return u.paused&&u.resume(),r}}function d(){if(!1,t&&!p){for(;l.length&&!u.paused;)u.emit("data",l.shift());if(!u.paused){if(f)return u.emit("end");p=!0,t(null,function e(n,i){p=!1,u.paused?(!0===n?f=n:n?u.emit("error",n):l.push(i),!0):n&&!0!==(r=n)?u.emit("error",n):(r=r||n)?u.emit("end"):(u.emit("data",i),p=!0,t(null,e))})}}}return u.pause=function(){return u.paused=!0,u},u.resume=function(){return u.paused=!1,d(),u},u.destroy=function(){!r&&t&&t(r=!0,function(){}),r=!0,a.length&&a.shift()(!0),u.emit("close")},u}}).call(this,r(31).setImmediate,r(4))},function(e,t,r){"use strict";(function(e){t.raw=e.from("55","hex"),t.cbor=e.from("51","hex"),t.protobuf=e.from("50","hex"),t.rlp=e.from("60","hex"),t.bencode=e.from("63","hex"),t.multicodec=e.from("30","hex"),t.multihash=e.from("31","hex"),t.multiaddr=e.from("32","hex"),t.multibase=e.from("33","hex"),t.identity=e.from("00","hex"),t.md4=e.from("d4","hex"),t.md5=e.from("d5","hex"),t.sha1=e.from("11","hex"),t["sha2-256"]=e.from("12","hex"),t["sha2-512"]=e.from("13","hex"),t["dbl-sha2-256"]=e.from("56","hex"),t["sha3-224"]=e.from("17","hex"),t["sha3-256"]=e.from("16","hex"),t["sha3-384"]=e.from("15","hex"),t["sha3-512"]=e.from("14","hex"),t["shake-128"]=e.from("18","hex"),t["shake-256"]=e.from("19","hex"),t["keccak-224"]=e.from("1a","hex"),t["keccak-256"]=e.from("1b","hex"),t["keccak-384"]=e.from("1c","hex"),t["keccak-512"]=e.from("1d","hex"),t["murmur3-128"]=e.from("22","hex"),t["murmur3-32"]=e.from("23","hex"),t.x11=e.from("1100","hex"),t["blake2b-8"]=e.from("b201","hex"),t["blake2b-16"]=e.from("b202","hex"),t["blake2b-24"]=e.from("b203","hex"),t["blake2b-32"]=e.from("b204","hex"),t["blake2b-40"]=e.from("b205","hex"),t["blake2b-48"]=e.from("b206","hex"),t["blake2b-56"]=e.from("b207","hex"),t["blake2b-64"]=e.from("b208","hex"),t["blake2b-72"]=e.from("b209","hex"),t["blake2b-80"]=e.from("b20a","hex"),t["blake2b-88"]=e.from("b20b","hex"),t["blake2b-96"]=e.from("b20c","hex"),t["blake2b-104"]=e.from("b20d","hex"),t["blake2b-112"]=e.from("b20e","hex"),t["blake2b-120"]=e.from("b20f","hex"),t["blake2b-128"]=e.from("b210","hex"),t["blake2b-136"]=e.from("b211","hex"),t["blake2b-144"]=e.from("b212","hex"),t["blake2b-152"]=e.from("b213","hex"),t["blake2b-160"]=e.from("b214","hex"),t["blake2b-168"]=e.from("b215","hex"),t["blake2b-176"]=e.from("b216","hex"),t["blake2b-184"]=e.from("b217","hex"),t["blake2b-192"]=e.from("b218","hex"),t["blake2b-200"]=e.from("b219","hex"),t["blake2b-208"]=e.from("b21a","hex"),t["blake2b-216"]=e.from("b21b","hex"),t["blake2b-224"]=e.from("b21c","hex"),t["blake2b-232"]=e.from("b21d","hex"),t["blake2b-240"]=e.from("b21e","hex"),t["blake2b-248"]=e.from("b21f","hex"),t["blake2b-256"]=e.from("b220","hex"),t["blake2b-264"]=e.from("b221","hex"),t["blake2b-272"]=e.from("b222","hex"),t["blake2b-280"]=e.from("b223","hex"),t["blake2b-288"]=e.from("b224","hex"),t["blake2b-296"]=e.from("b225","hex"),t["blake2b-304"]=e.from("b226","hex"),t["blake2b-312"]=e.from("b227","hex"),t["blake2b-320"]=e.from("b228","hex"),t["blake2b-328"]=e.from("b229","hex"),t["blake2b-336"]=e.from("b22a","hex"),t["blake2b-344"]=e.from("b22b","hex"),t["blake2b-352"]=e.from("b22c","hex"),t["blake2b-360"]=e.from("b22d","hex"),t["blake2b-368"]=e.from("b22e","hex"),t["blake2b-376"]=e.from("b22f","hex"),t["blake2b-384"]=e.from("b230","hex"),t["blake2b-392"]=e.from("b231","hex"),t["blake2b-400"]=e.from("b232","hex"),t["blake2b-408"]=e.from("b233","hex"),t["blake2b-416"]=e.from("b234","hex"),t["blake2b-424"]=e.from("b235","hex"),t["blake2b-432"]=e.from("b236","hex"),t["blake2b-440"]=e.from("b237","hex"),t["blake2b-448"]=e.from("b238","hex"),t["blake2b-456"]=e.from("b239","hex"),t["blake2b-464"]=e.from("b23a","hex"),t["blake2b-472"]=e.from("b23b","hex"),t["blake2b-480"]=e.from("b23c","hex"),t["blake2b-488"]=e.from("b23d","hex"),t["blake2b-496"]=e.from("b23e","hex"),t["blake2b-504"]=e.from("b23f","hex"),t["blake2b-512"]=e.from("b240","hex"),t["blake2s-8"]=e.from("b241","hex"),t["blake2s-16"]=e.from("b242","hex"),t["blake2s-24"]=e.from("b243","hex"),t["blake2s-32"]=e.from("b244","hex"),t["blake2s-40"]=e.from("b245","hex"),t["blake2s-48"]=e.from("b246","hex"),t["blake2s-56"]=e.from("b247","hex"),t["blake2s-64"]=e.from("b248","hex"),t["blake2s-72"]=e.from("b249","hex"),t["blake2s-80"]=e.from("b24a","hex"),t["blake2s-88"]=e.from("b24b","hex"),t["blake2s-96"]=e.from("b24c","hex"),t["blake2s-104"]=e.from("b24d","hex"),t["blake2s-112"]=e.from("b24e","hex"),t["blake2s-120"]=e.from("b24f","hex"),t["blake2s-128"]=e.from("b250","hex"),t["blake2s-136"]=e.from("b251","hex"),t["blake2s-144"]=e.from("b252","hex"),t["blake2s-152"]=e.from("b253","hex"),t["blake2s-160"]=e.from("b254","hex"),t["blake2s-168"]=e.from("b255","hex"),t["blake2s-176"]=e.from("b256","hex"),t["blake2s-184"]=e.from("b257","hex"),t["blake2s-192"]=e.from("b258","hex"),t["blake2s-200"]=e.from("b259","hex"),t["blake2s-208"]=e.from("b25a","hex"),t["blake2s-216"]=e.from("b25b","hex"),t["blake2s-224"]=e.from("b25c","hex"),t["blake2s-232"]=e.from("b25d","hex"),t["blake2s-240"]=e.from("b25e","hex"),t["blake2s-248"]=e.from("b25f","hex"),t["blake2s-256"]=e.from("b260","hex"),t["skein256-8"]=e.from("b301","hex"),t["skein256-16"]=e.from("b302","hex"),t["skein256-24"]=e.from("b303","hex"),t["skein256-32"]=e.from("b304","hex"),t["skein256-40"]=e.from("b305","hex"),t["skein256-48"]=e.from("b306","hex"),t["skein256-56"]=e.from("b307","hex"),t["skein256-64"]=e.from("b308","hex"),t["skein256-72"]=e.from("b309","hex"),t["skein256-80"]=e.from("b30a","hex"),t["skein256-88"]=e.from("b30b","hex"),t["skein256-96"]=e.from("b30c","hex"),t["skein256-104"]=e.from("b30d","hex"),t["skein256-112"]=e.from("b30e","hex"),t["skein256-120"]=e.from("b30f","hex"),t["skein256-128"]=e.from("b310","hex"),t["skein256-136"]=e.from("b311","hex"),t["skein256-144"]=e.from("b312","hex"),t["skein256-152"]=e.from("b313","hex"),t["skein256-160"]=e.from("b314","hex"),t["skein256-168"]=e.from("b315","hex"),t["skein256-176"]=e.from("b316","hex"),t["skein256-184"]=e.from("b317","hex"),t["skein256-192"]=e.from("b318","hex"),t["skein256-200"]=e.from("b319","hex"),t["skein256-208"]=e.from("b31a","hex"),t["skein256-216"]=e.from("b31b","hex"),t["skein256-224"]=e.from("b31c","hex"),t["skein256-232"]=e.from("b31d","hex"),t["skein256-240"]=e.from("b31e","hex"),t["skein256-248"]=e.from("b31f","hex"),t["skein256-256"]=e.from("b320","hex"),t["skein512-8"]=e.from("b321","hex"),t["skein512-16"]=e.from("b322","hex"),t["skein512-24"]=e.from("b323","hex"),t["skein512-32"]=e.from("b324","hex"),t["skein512-40"]=e.from("b325","hex"),t["skein512-48"]=e.from("b326","hex"),t["skein512-56"]=e.from("b327","hex"),t["skein512-64"]=e.from("b328","hex"),t["skein512-72"]=e.from("b329","hex"),t["skein512-80"]=e.from("b32a","hex"),t["skein512-88"]=e.from("b32b","hex"),t["skein512-96"]=e.from("b32c","hex"),t["skein512-104"]=e.from("b32d","hex"),t["skein512-112"]=e.from("b32e","hex"),t["skein512-120"]=e.from("b32f","hex"),t["skein512-128"]=e.from("b330","hex"),t["skein512-136"]=e.from("b331","hex"),t["skein512-144"]=e.from("b332","hex"),t["skein512-152"]=e.from("b333","hex"),t["skein512-160"]=e.from("b334","hex"),t["skein512-168"]=e.from("b335","hex"),t["skein512-176"]=e.from("b336","hex"),t["skein512-184"]=e.from("b337","hex"),t["skein512-192"]=e.from("b338","hex"),t["skein512-200"]=e.from("b339","hex"),t["skein512-208"]=e.from("b33a","hex"),t["skein512-216"]=e.from("b33b","hex"),t["skein512-224"]=e.from("b33c","hex"),t["skein512-232"]=e.from("b33d","hex"),t["skein512-240"]=e.from("b33e","hex"),t["skein512-248"]=e.from("b33f","hex"),t["skein512-256"]=e.from("b340","hex"),t["skein512-264"]=e.from("b341","hex"),t["skein512-272"]=e.from("b342","hex"),t["skein512-280"]=e.from("b343","hex"),t["skein512-288"]=e.from("b344","hex"),t["skein512-296"]=e.from("b345","hex"),t["skein512-304"]=e.from("b346","hex"),t["skein512-312"]=e.from("b347","hex"),t["skein512-320"]=e.from("b348","hex"),t["skein512-328"]=e.from("b349","hex"),t["skein512-336"]=e.from("b34a","hex"),t["skein512-344"]=e.from("b34b","hex"),t["skein512-352"]=e.from("b34c","hex"),t["skein512-360"]=e.from("b34d","hex"),t["skein512-368"]=e.from("b34e","hex"),t["skein512-376"]=e.from("b34f","hex"),t["skein512-384"]=e.from("b350","hex"),t["skein512-392"]=e.from("b351","hex"),t["skein512-400"]=e.from("b352","hex"),t["skein512-408"]=e.from("b353","hex"),t["skein512-416"]=e.from("b354","hex"),t["skein512-424"]=e.from("b355","hex"),t["skein512-432"]=e.from("b356","hex"),t["skein512-440"]=e.from("b357","hex"),t["skein512-448"]=e.from("b358","hex"),t["skein512-456"]=e.from("b359","hex"),t["skein512-464"]=e.from("b35a","hex"),t["skein512-472"]=e.from("b35b","hex"),t["skein512-480"]=e.from("b35c","hex"),t["skein512-488"]=e.from("b35d","hex"),t["skein512-496"]=e.from("b35e","hex"),t["skein512-504"]=e.from("b35f","hex"),t["skein512-512"]=e.from("b360","hex"),t["skein1024-8"]=e.from("b361","hex"),t["skein1024-16"]=e.from("b362","hex"),t["skein1024-24"]=e.from("b363","hex"),t["skein1024-32"]=e.from("b364","hex"),t["skein1024-40"]=e.from("b365","hex"),t["skein1024-48"]=e.from("b366","hex"),t["skein1024-56"]=e.from("b367","hex"),t["skein1024-64"]=e.from("b368","hex"),t["skein1024-72"]=e.from("b369","hex"),t["skein1024-80"]=e.from("b36a","hex"),t["skein1024-88"]=e.from("b36b","hex"),t["skein1024-96"]=e.from("b36c","hex"),t["skein1024-104"]=e.from("b36d","hex"),t["skein1024-112"]=e.from("b36e","hex"),t["skein1024-120"]=e.from("b36f","hex"),t["skein1024-128"]=e.from("b370","hex"),t["skein1024-136"]=e.from("b371","hex"),t["skein1024-144"]=e.from("b372","hex"),t["skein1024-152"]=e.from("b373","hex"),t["skein1024-160"]=e.from("b374","hex"),t["skein1024-168"]=e.from("b375","hex"),t["skein1024-176"]=e.from("b376","hex"),t["skein1024-184"]=e.from("b377","hex"),t["skein1024-192"]=e.from("b378","hex"),t["skein1024-200"]=e.from("b379","hex"),t["skein1024-208"]=e.from("b37a","hex"),t["skein1024-216"]=e.from("b37b","hex"),t["skein1024-224"]=e.from("b37c","hex"),t["skein1024-232"]=e.from("b37d","hex"),t["skein1024-240"]=e.from("b37e","hex"),t["skein1024-248"]=e.from("b37f","hex"),t["skein1024-256"]=e.from("b380","hex"),t["skein1024-264"]=e.from("b381","hex"),t["skein1024-272"]=e.from("b382","hex"),t["skein1024-280"]=e.from("b383","hex"),t["skein1024-288"]=e.from("b384","hex"),t["skein1024-296"]=e.from("b385","hex"),t["skein1024-304"]=e.from("b386","hex"),t["skein1024-312"]=e.from("b387","hex"),t["skein1024-320"]=e.from("b388","hex"),t["skein1024-328"]=e.from("b389","hex"),t["skein1024-336"]=e.from("b38a","hex"),t["skein1024-344"]=e.from("b38b","hex"),t["skein1024-352"]=e.from("b38c","hex"),t["skein1024-360"]=e.from("b38d","hex"),t["skein1024-368"]=e.from("b38e","hex"),t["skein1024-376"]=e.from("b38f","hex"),t["skein1024-384"]=e.from("b390","hex"),t["skein1024-392"]=e.from("b391","hex"),t["skein1024-400"]=e.from("b392","hex"),t["skein1024-408"]=e.from("b393","hex"),t["skein1024-416"]=e.from("b394","hex"),t["skein1024-424"]=e.from("b395","hex"),t["skein1024-432"]=e.from("b396","hex"),t["skein1024-440"]=e.from("b397","hex"),t["skein1024-448"]=e.from("b398","hex"),t["skein1024-456"]=e.from("b399","hex"),t["skein1024-464"]=e.from("b39a","hex"),t["skein1024-472"]=e.from("b39b","hex"),t["skein1024-480"]=e.from("b39c","hex"),t["skein1024-488"]=e.from("b39d","hex"),t["skein1024-496"]=e.from("b39e","hex"),t["skein1024-504"]=e.from("b39f","hex"),t["skein1024-512"]=e.from("b3a0","hex"),t["skein1024-520"]=e.from("b3a1","hex"),t["skein1024-528"]=e.from("b3a2","hex"),t["skein1024-536"]=e.from("b3a3","hex"),t["skein1024-544"]=e.from("b3a4","hex"),t["skein1024-552"]=e.from("b3a5","hex"),t["skein1024-560"]=e.from("b3a6","hex"),t["skein1024-568"]=e.from("b3a7","hex"),t["skein1024-576"]=e.from("b3a8","hex"),t["skein1024-584"]=e.from("b3a9","hex"),t["skein1024-592"]=e.from("b3aa","hex"),t["skein1024-600"]=e.from("b3ab","hex"),t["skein1024-608"]=e.from("b3ac","hex"),t["skein1024-616"]=e.from("b3ad","hex"),t["skein1024-624"]=e.from("b3ae","hex"),t["skein1024-632"]=e.from("b3af","hex"),t["skein1024-640"]=e.from("b3b0","hex"),t["skein1024-648"]=e.from("b3b1","hex"),t["skein1024-656"]=e.from("b3b2","hex"),t["skein1024-664"]=e.from("b3b3","hex"),t["skein1024-672"]=e.from("b3b4","hex"),t["skein1024-680"]=e.from("b3b5","hex"),t["skein1024-688"]=e.from("b3b6","hex"),t["skein1024-696"]=e.from("b3b7","hex"),t["skein1024-704"]=e.from("b3b8","hex"),t["skein1024-712"]=e.from("b3b9","hex"),t["skein1024-720"]=e.from("b3ba","hex"),t["skein1024-728"]=e.from("b3bb","hex"),t["skein1024-736"]=e.from("b3bc","hex"),t["skein1024-744"]=e.from("b3bd","hex"),t["skein1024-752"]=e.from("b3be","hex"),t["skein1024-760"]=e.from("b3bf","hex"),t["skein1024-768"]=e.from("b3c0","hex"),t["skein1024-776"]=e.from("b3c1","hex"),t["skein1024-784"]=e.from("b3c2","hex"),t["skein1024-792"]=e.from("b3c3","hex"),t["skein1024-800"]=e.from("b3c4","hex"),t["skein1024-808"]=e.from("b3c5","hex"),t["skein1024-816"]=e.from("b3c6","hex"),t["skein1024-824"]=e.from("b3c7","hex"),t["skein1024-832"]=e.from("b3c8","hex"),t["skein1024-840"]=e.from("b3c9","hex"),t["skein1024-848"]=e.from("b3ca","hex"),t["skein1024-856"]=e.from("b3cb","hex"),t["skein1024-864"]=e.from("b3cc","hex"),t["skein1024-872"]=e.from("b3cd","hex"),t["skein1024-880"]=e.from("b3ce","hex"),t["skein1024-888"]=e.from("b3cf","hex"),t["skein1024-896"]=e.from("b3d0","hex"),t["skein1024-904"]=e.from("b3d1","hex"),t["skein1024-912"]=e.from("b3d2","hex"),t["skein1024-920"]=e.from("b3d3","hex"),t["skein1024-928"]=e.from("b3d4","hex"),t["skein1024-936"]=e.from("b3d5","hex"),t["skein1024-944"]=e.from("b3d6","hex"),t["skein1024-952"]=e.from("b3d7","hex"),t["skein1024-960"]=e.from("b3d8","hex"),t["skein1024-968"]=e.from("b3d9","hex"),t["skein1024-976"]=e.from("b3da","hex"),t["skein1024-984"]=e.from("b3db","hex"),t["skein1024-992"]=e.from("b3dc","hex"),t["skein1024-1000"]=e.from("b3dd","hex"),t["skein1024-1008"]=e.from("b3de","hex"),t["skein1024-1016"]=e.from("b3df","hex"),t["skein1024-1024"]=e.from("b3e0","hex"),t.ip4=e.from("04","hex"),t.ip6=e.from("29","hex"),t.ip6zone=e.from("2a","hex"),t.tcp=e.from("06","hex"),t.udp=e.from("0111","hex"),t.dccp=e.from("21","hex"),t.sctp=e.from("84","hex"),t.udt=e.from("012d","hex"),t.utp=e.from("012e","hex"),t.p2p=e.from("01a5","hex"),t.ipfs=e.from("01a5","hex"),t.http=e.from("01e0","hex"),t.https=e.from("01bb","hex"),t.quic=e.from("01cc","hex"),t.ws=e.from("01dd","hex"),t.wss=e.from("01de","hex"),t.onion=e.from("01bc","hex"),t.onion3=e.from("01bd","hex"),t.garlic64=e.from("01be","hex"),t["p2p-circuit"]=e.from("0122","hex"),t.dns=e.from("35","hex"),t.dns4=e.from("36","hex"),t.dns6=e.from("37","hex"),t.dnsaddr=e.from("38","hex"),t["p2p-websocket-star"]=e.from("01df","hex"),t["p2p-stardust"]=e.from("0115","hex"),t["p2p-webrtc-star"]=e.from("0113","hex"),t["p2p-webrtc-direct"]=e.from("0114","hex"),t.unix=e.from("0190","hex"),t["dag-pb"]=e.from("70","hex"),t["dag-cbor"]=e.from("71","hex"),t["dag-json"]=e.from("0129","hex"),t["git-raw"]=e.from("78","hex"),t["eth-block"]=e.from("90","hex"),t["eth-block-list"]=e.from("91","hex"),t["eth-tx-trie"]=e.from("92","hex"),t["eth-tx"]=e.from("93","hex"),t["eth-tx-receipt-trie"]=e.from("94","hex"),t["eth-tx-receipt"]=e.from("95","hex"),t["eth-state-trie"]=e.from("96","hex"),t["eth-account-snapshot"]=e.from("97","hex"),t["eth-storage-trie"]=e.from("98","hex"),t["bitcoin-block"]=e.from("b0","hex"),t["bitcoin-tx"]=e.from("b1","hex"),t["zcash-block"]=e.from("c0","hex"),t["zcash-tx"]=e.from("c1","hex"),t["stellar-block"]=e.from("d0","hex"),t["stellar-tx"]=e.from("d1","hex"),t["decred-block"]=e.from("e0","hex"),t["decred-tx"]=e.from("e1","hex"),t["dash-block"]=e.from("f0","hex"),t["dash-tx"]=e.from("f1","hex"),t["leofcoin-block"]=e.from("81","hex"),t["leofcoin-tx"]=e.from("82","hex"),t["leofcoin-pr"]=e.from("83","hex"),t["torrent-info"]=e.from("7b","hex"),t["torrent-file"]=e.from("7c","hex"),t["ed25519-pub"]=e.from("ed","hex"),t["ipld-ns"]=e.from("e2","hex"),t["ipfs-ns"]=e.from("e3","hex"),t["swarm-ns"]=e.from("e4","hex")}).call(this,r(0).Buffer)},function(e,t,r){var n=r(3);r(8),r(62);var i=e.exports=n.asn1=n.asn1||{};function o(e,t,r){if(r>t){var n=new Error("Too few bytes to parse DER.");throw n.available=e.length(),n.remaining=t,n.requested=r,n}}i.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},i.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},i.create=function(e,t,r,o,s){if(n.util.isArray(o)){for(var a=[],c=0;cr){if(a.strict){var h=new Error("Too few bytes to read ASN.1 value.");throw h.available=t.length(),h.remaining=r,h.requested=p,h}p=r}var d;var m;var g=32==(32&u);if(g)if(d=[],void 0===p)for(;;){if(o(t,r,2),t.bytes(2)===String.fromCharCode(0,0)){t.getBytes(2),r-=2;break}c=t.length(),d.push(e(t,r,n+1,a)),r-=c-t.length()}else for(;p>0;)c=t.length(),d.push(e(t,p,n+1,a)),r-=c-t.length(),p-=c-t.length();void 0===d&&l===i.Class.UNIVERSAL&&f===i.Type.BITSTRING&&(m=t.bytes(p));if(void 0===d&&a.decodeBitStrings&&l===i.Class.UNIVERSAL&&f===i.Type.BITSTRING&&p>1){var y=t.read,b=r,v=0;if(f===i.Type.BITSTRING&&(o(t,r,1),v=t.getByte(),r--),0===v)try{c=t.length();var A={verbose:a.verbose,strict:!0,decodeBitStrings:!0},w=e(t,r,n+1,A),E=c-t.length();r-=E,f==i.Type.BITSTRING&&E++;var k=w.tagClass;E!==p||k!==i.Class.UNIVERSAL&&k!==i.Class.CONTEXT_SPECIFIC||(d=[w])}catch(e){}void 0===d&&(t.read=y,r=b)}if(void 0===d){if(void 0===p){if(a.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");p=r}if(f===i.Type.BMPSTRING)for(d="";p>0;p-=2)o(t,r,2),d+=String.fromCharCode(t.getInt16()),r-=2;else d=t.getBytes(p)}var S=void 0===m?null:{bitStringContents:m};return i.create(l,f,g,d,S)}(e,e.length(),0,t)},i.toDer=function(e){var t=n.util.createBuffer(),r=e.tagClass|e.type,o=n.util.createBuffer(),s=!1;if("bitStringContents"in e&&(s=!0,e.original&&(s=i.equals(e,e.original))),s)o.putBytes(e.bitStringContents);else if(e.composed){e.constructed?r|=32:o.putByte(0);for(var a=0;a1&&(0===e.value.charCodeAt(0)&&0==(128&e.value.charCodeAt(1))||255===e.value.charCodeAt(0)&&128==(128&e.value.charCodeAt(1)))?o.putBytes(e.value.substr(1)):o.putBytes(e.value);if(t.putByte(r),o.length()<=127)t.putByte(127&o.length());else{var c=o.length(),u="";do{u+=String.fromCharCode(255&c),c>>>=8}while(c>0);t.putByte(128|u.length);for(a=u.length-1;a>=0;--a)t.putByte(u.charCodeAt(a))}return t.putBuffer(o),t},i.oidToDer=function(e){var t,r,i,o,s=e.split("."),a=n.util.createBuffer();a.putByte(40*parseInt(s[0],10)+parseInt(s[1],10));for(var c=2;c>>=7,t||(o|=128),r.push(o),t=!1}while(i>0);for(var u=r.length-1;u>=0;--u)a.putByte(r[u])}return a},i.derToOid=function(e){var t;"string"==typeof e&&(e=n.util.createBuffer(e));var r=e.getByte();t=Math.floor(r/40)+"."+r%40;for(var i=0;e.length()>0;)i<<=7,128&(r=e.getByte())?i+=127&r:(t+="."+(i+r),i=0);return t},i.utcTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,2),10);r=r>=50?1900+r:2e3+r;var n=parseInt(e.substr(2,2),10)-1,i=parseInt(e.substr(4,2),10),o=parseInt(e.substr(6,2),10),s=parseInt(e.substr(8,2),10),a=0;if(e.length>11){var c=e.charAt(10),u=10;"+"!==c&&"-"!==c&&(a=parseInt(e.substr(10,2),10),u+=2)}if(t.setUTCFullYear(r,n,i),t.setUTCHours(o,s,a,0),u&&("+"===(c=e.charAt(u))||"-"===c)){var l=60*parseInt(e.substr(u+1,2),10)+parseInt(e.substr(u+4,2),10);l*=6e4,"+"===c?t.setTime(+t-l):t.setTime(+t+l)}return t},i.generalizedTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,4),10),n=parseInt(e.substr(4,2),10)-1,i=parseInt(e.substr(6,2),10),o=parseInt(e.substr(8,2),10),s=parseInt(e.substr(10,2),10),a=parseInt(e.substr(12,2),10),c=0,u=0,l=!1;"Z"===e.charAt(e.length-1)&&(l=!0);var f=e.length-5,p=e.charAt(f);"+"!==p&&"-"!==p||(u=60*parseInt(e.substr(f+1,2),10)+parseInt(e.substr(f+4,2),10),u*=6e4,"+"===p&&(u*=-1),l=!0);return"."===e.charAt(14)&&(c=1e3*parseFloat(e.substr(14),10)),l?(t.setUTCFullYear(r,n,i),t.setUTCHours(o,s,a,c),t.setTime(+t+u)):(t.setFullYear(r,n,i),t.setHours(o,s,a,c)),t},i.dateToUtcTime=function(e){if("string"==typeof e)return e;var t="",r=[];r.push((""+e.getUTCFullYear()).substr(2)),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(var n=0;n=-128&&e<128)return t.putSignedInt(e,8);if(e>=-32768&&e<32768)return t.putSignedInt(e,16);if(e>=-8388608&&e<8388608)return t.putSignedInt(e,24);if(e>=-2147483648&&e<2147483648)return t.putSignedInt(e,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=e,r},i.derToInteger=function(e){"string"==typeof e&&(e=n.util.createBuffer(e));var t=8*e.length();if(t>32)throw new Error("Integer too large; max is 32-bits.");return e.getSignedInt(t)},i.validate=function(e,t,r,o){var s=!1;if(e.tagClass!==t.tagClass&&void 0!==t.tagClass||e.type!==t.type&&void 0!==t.type)o&&(e.tagClass!==t.tagClass&&o.push("["+t.name+'] Expected tag class "'+t.tagClass+'", got "'+e.tagClass+'"'),e.type!==t.type&&o.push("["+t.name+'] Expected type "'+t.type+'", got "'+e.type+'"'));else if(e.constructed===t.constructed||void 0===t.constructed){if(s=!0,t.value&&n.util.isArray(t.value))for(var a=0,c=0;s&&c0&&(o+="\n");for(var s="",c=0;c1?o+="0x"+n.util.bytesToHex(e.value.slice(1)):o+="(none)",e.value.length>0){var p=e.value.charCodeAt(0);1==p?o+=" (1 unused bit shown)":p>1&&(o+=" ("+p+" unused bits shown)")}}else e.type===i.Type.OCTETSTRING?(a.test(e.value)||(o+="("+e.value+") "),o+="0x"+n.util.bytesToHex(e.value)):e.type===i.Type.UTF8?o+=n.util.decodeUtf8(e.value):e.type===i.Type.PRINTABLESTRING||e.type===i.Type.IA5String?o+=e.value:a.test(e.value)?o+="0x"+n.util.bytesToHex(e.value):0===e.value.length?o+="[null]":o+=e.value}return o}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,i.default)(n.default,e,t)};var n=o(r(557)),i=o(r(620));function o(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,r){var n=r(3);e.exports=n.md=n.md||{},n.md.algorithms=n.md.algorithms||{}},function(e,t,r){"use strict";const n=r(24),{ensureMultiaddr:i}=r(617),o=r(819),s=r(22);class a{constructor(e){s(e,"Missing peerId. Use Peer.create(cb) to create one"),this.id=e,this.multiaddrs=new o,this.protocols=new Set,this._connectedMultiaddr=void 0}connect(e){if(e=i(e),!this.multiaddrs.has(e)&&e.toString()!==`/ipfs/${this.id.toB58String()}`)throw new Error("can't be connected to missing multiaddr from set");this._connectedMultiaddr=e}disconnect(){this._connectedMultiaddr=void 0}isConnected(){return this._connectedMultiaddr}}a.create=((e,t)=>{if("function"==typeof e)return t=e,e=null,void n.create((e,r)=>{if(e)return t(e);t(null,new a(r))});"function"==typeof e.toJSON?t(null,new a(e)):n.createFromJSON(e,(e,r)=>t(e,new a(r)))}),a.isPeerInfo=(e=>Boolean("object"==typeof e&&e.id&&e.multiaddrs)),e.exports=a},function(e,t,r){"use strict";(function(n){const i=r(18),o=r(339),s=r(260),a=r(174);(t=e.exports).addPrefix=((e,t)=>{let r;if(n.isBuffer(e))r=a.varintBufferEncode(e);else{if(!o[e])throw new Error("multicodec not recognized");r=o[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=s[t.toString("hex")];if(void 0===r)throw new Error("Code `0x"+t.toString("hex")+"` not found");return r}),t.getCode=(e=>i.decode(e)),t.getCodeVarint=(e=>{const t=o[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return t}),t.getVarint=(e=>i.encode(e));const c=r(340);Object.assign(t,c),t.print=r(341)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(25)(r(764)).Data,i=["raw","directory","file","metadata","symlink","hamt-sharded-directory"],o=["directory","hamt-sharded-directory"];function s(e,t){if(!(this instanceof s))return new s(e,t);if(-1===i.indexOf(e))throw new Error("Type: "+e+" is not valid");this.type=e,this.data=t,this.blockSizes=[],this.addBlockSize=(e=>{this.blockSizes.push(e)}),this.removeBlockSize=(e=>{this.blockSizes.splice(e,1)}),this.fileSize=(()=>{if(o.indexOf(this.type)>=0)return;let e=0;return this.blockSizes.forEach(t=>{e+=t}),t&&(e+=t.length),e}),this.marshal=(()=>{let e;switch(this.type){case"raw":e=n.DataType.Raw;break;case"directory":e=n.DataType.Directory;break;case"file":e=n.DataType.File;break;case"metadata":e=n.DataType.Metadata;break;case"symlink":e=n.DataType.Symlink;break;case"hamt-sharded-directory":e=n.DataType.HAMTShard;break;default:throw new Error(`Unkown type: "${this.type}"`)}let t=this.fileSize(),r=this.data;this.data&&this.data.length||(r=void 0);let i=this.blockSizes;return this.blockSizes&&this.blockSizes.length||(i=void 0),n.encode({Type:e,Data:r,filesize:t,blocksizes:i,hashType:this.hashType,fanout:this.fanout})})}s.unmarshal=(e=>{const t=n.decode(e);t.Data||(t.Data=void 0);const r=new s(i[t.Type],t.Data);return r.blockSizes=t.blocksizes,r}),e.exports=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)(i.default,e,t)};var n=o(r(620)),i=o(r(269));function o(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){e.exports=function(){}},function(e,t,r){"use strict";var n=r(244);e.exports=function(e){return e=n(e),function(t){return function r(n,i){for(var o,s=!0;s;)s=!1,o=!0,t(n,function(t,n){if(!t&&!e(n))return o?s=!0:r(t,i);i(t,n)}),o=!1}}}},function(e,t,r){var n=r(740);function i(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function o(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}e.exports=n(i),e.exports.strict=n(o),i.proto=i(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})})},function(e,t,r){"use strict";t.DAGNode=r(276),t.DAGLink=r(148),t.resolver=r(612),t.util=r(278)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){(0,n.default)(e,(0,i.default)((0,o.default)(t)),r)};var n=s(r(557)),i=s(r(621)),o=s(r(35));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){"use strict";const n=r(72),i=r(22),o=r(19);(t=e.exports=o(class{constructor(e,t,r){i(r,"A link requires a multihash to point to"),this._name=e||"",this._size=t,this._cid=new n(r)}toString(){return`DAGLink <${this._cid.toBaseEncodedString()} - name: "${this.name}", size: ${this.size}>`}toJSON(){return this._json||(this._json=Object.freeze({name:this.name,size:this.size,multihash:this._cid.toBaseEncodedString()})),Object.assign({},this._json)}get name(){return this._name}set name(e){throw new Error("Can't set property: 'name' is immutable")}get size(){return this._size}set size(e){throw new Error("Can't set property: 'size' is immutable")}get multihash(){return this._cid.buffer}set multihash(e){throw new Error("Can't set property: 'multihash' is immutable")}get cid(){return this._cid}set cid(e){throw new Error("Can't set property: 'cid' is immutable")}},{className:"DAGLink",symbolName:"@ipld/js-ipld-dag-pb/daglink"})).create=r(379),t.util=r(380)},function(e,t,r){var n=r(6).Buffer,i=r(80).Transform,o=r(60).StringDecoder;function s(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(7)(s,i),s.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},s.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},s.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},s.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=s},function(e,t,r){"use strict";var n=r(109),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=f;var o=r(87);o.inherits=r(56);var s=r(197),a=r(137);o.inherits(f,s);for(var c=i(a.prototype),u=0;u>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function p(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,r){var n=r(3);function i(e,t){n.cipher.registerAlgorithm(e,function(){return new n.aes.Algorithm(e,t)})}r(140),r(204),r(8),e.exports=n.aes=n.aes||{},n.aes.startEncrypting=function(e,t,r,n){var i=m({key:e,output:r,decrypt:!1,mode:n});return i.start(t),i},n.aes.createEncryptionCipher=function(e,t){return m({key:e,output:null,decrypt:!1,mode:t})},n.aes.startDecrypting=function(e,t,r,n){var i=m({key:e,output:r,decrypt:!0,mode:n});return i.start(t),i},n.aes.createDecryptionCipher=function(e,t){return m({key:e,output:null,decrypt:!0,mode:t})},n.aes.Algorithm=function(e,t){l||p();var r=this;r.name=e,r.mode=new t({blockSize:16,cipher:{encrypt:function(e,t){return d(r._w,e,t,!1)},decrypt:function(e,t){return d(r._w,e,t,!0)}}}),r._init=!1},n.aes.Algorithm.prototype.initialize=function(e){if(!this._init){var t,r=e.key;if("string"!=typeof r||16!==r.length&&24!==r.length&&32!==r.length){if(n.util.isArray(r)&&(16===r.length||24===r.length||32===r.length)){t=r,r=n.util.createBuffer();for(var i=0;i>>=2;for(i=0;i>8^255&f^99,o[m]=f,s[f]=m,h=(p=e[f])<<24^f<<16^f<<8^f^p,d=((r=e[m])^(n=e[r])^(i=e[n]))<<24^(m^i)<<16^(m^n^i)<<8^m^r^i;for(var y=0;y<4;++y)c[y][m]=h,u[y][f]=d,h=h<<24|h>>>8,d=d<<24|d>>>8;0===m?m=g=1:(m=r^e[e[e[r^i]]],g^=e[e[g]])}}function h(e,t){for(var r,n=e.slice(0),i=1,s=n.length,c=f*(s+6+1),l=s;l>>16&255]<<24^o[r>>>8&255]<<16^o[255&r]<<8^o[r>>>24]^a[i]<<24,i++):s>6&&l%s==4&&(r=o[r>>>24]<<24^o[r>>>16&255]<<16^o[r>>>8&255]<<8^o[255&r]),n[l]=n[l-s]^r;if(t){for(var p,h=u[0],d=u[1],m=u[2],g=u[3],y=n.slice(0),b=(l=0,(c=n.length)-f);l>>24]]^d[o[p>>>16&255]]^m[o[p>>>8&255]]^g[o[255&p]];n=y}return n}function d(e,t,r,n){var i,a,l,f,p,h,d,m,g,y,b,v,A=e.length/4-1;n?(i=u[0],a=u[1],l=u[2],f=u[3],p=s):(i=c[0],a=c[1],l=c[2],f=c[3],p=o),h=t[0]^e[0],d=t[n?3:1]^e[1],m=t[2]^e[2],g=t[n?1:3]^e[3];for(var w=3,E=1;E>>24]^a[d>>>16&255]^l[m>>>8&255]^f[255&g]^e[++w],b=i[d>>>24]^a[m>>>16&255]^l[g>>>8&255]^f[255&h]^e[++w],v=i[m>>>24]^a[g>>>16&255]^l[h>>>8&255]^f[255&d]^e[++w],g=i[g>>>24]^a[h>>>16&255]^l[d>>>8&255]^f[255&m]^e[++w],h=y,d=b,m=v;r[0]=p[h>>>24]<<24^p[d>>>16&255]<<16^p[m>>>8&255]<<8^p[255&g]^e[++w],r[n?3:1]=p[d>>>24]<<24^p[m>>>16&255]<<16^p[g>>>8&255]<<8^p[255&h]^e[++w],r[2]=p[m>>>24]<<24^p[g>>>16&255]<<16^p[h>>>8&255]<<8^p[255&d]^e[++w],r[n?1:3]=p[g>>>24]<<24^p[h>>>16&255]<<16^p[d>>>8&255]<<8^p[255&m]^e[++w]}function m(e){var t,r="AES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start;return t.start=function(e,r){var o=null;r instanceof n.util.ByteBuffer&&(o=r,r={}),(r=r||{}).output=o,r.iv=e,i.call(t,r)},t}},function(e,t,r){var n=r(3);n.pki=n.pki||{};var i=e.exports=n.pki.oids=n.oids=n.oids||{};function o(e,t){i[e]=t,i[t]=e}function s(e,t){i[e]=t}o("1.2.840.113549.1.1.1","rsaEncryption"),o("1.2.840.113549.1.1.4","md5WithRSAEncryption"),o("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),o("1.2.840.113549.1.1.7","RSAES-OAEP"),o("1.2.840.113549.1.1.8","mgf1"),o("1.2.840.113549.1.1.9","pSpecified"),o("1.2.840.113549.1.1.10","RSASSA-PSS"),o("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),o("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),o("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),o("1.2.840.10040.4.3","dsa-with-sha1"),o("1.3.14.3.2.7","desCBC"),o("1.3.14.3.2.26","sha1"),o("2.16.840.1.101.3.4.2.1","sha256"),o("2.16.840.1.101.3.4.2.2","sha384"),o("2.16.840.1.101.3.4.2.3","sha512"),o("1.2.840.113549.2.5","md5"),o("1.2.840.113549.1.7.1","data"),o("1.2.840.113549.1.7.2","signedData"),o("1.2.840.113549.1.7.3","envelopedData"),o("1.2.840.113549.1.7.4","signedAndEnvelopedData"),o("1.2.840.113549.1.7.5","digestedData"),o("1.2.840.113549.1.7.6","encryptedData"),o("1.2.840.113549.1.9.1","emailAddress"),o("1.2.840.113549.1.9.2","unstructuredName"),o("1.2.840.113549.1.9.3","contentType"),o("1.2.840.113549.1.9.4","messageDigest"),o("1.2.840.113549.1.9.5","signingTime"),o("1.2.840.113549.1.9.6","counterSignature"),o("1.2.840.113549.1.9.7","challengePassword"),o("1.2.840.113549.1.9.8","unstructuredAddress"),o("1.2.840.113549.1.9.14","extensionRequest"),o("1.2.840.113549.1.9.20","friendlyName"),o("1.2.840.113549.1.9.21","localKeyId"),o("1.2.840.113549.1.9.22.1","x509Certificate"),o("1.2.840.113549.1.12.10.1.1","keyBag"),o("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),o("1.2.840.113549.1.12.10.1.3","certBag"),o("1.2.840.113549.1.12.10.1.4","crlBag"),o("1.2.840.113549.1.12.10.1.5","secretBag"),o("1.2.840.113549.1.12.10.1.6","safeContentsBag"),o("1.2.840.113549.1.5.13","pkcs5PBES2"),o("1.2.840.113549.1.5.12","pkcs5PBKDF2"),o("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),o("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),o("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),o("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),o("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),o("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),o("1.2.840.113549.2.7","hmacWithSHA1"),o("1.2.840.113549.2.8","hmacWithSHA224"),o("1.2.840.113549.2.9","hmacWithSHA256"),o("1.2.840.113549.2.10","hmacWithSHA384"),o("1.2.840.113549.2.11","hmacWithSHA512"),o("1.2.840.113549.3.7","des-EDE3-CBC"),o("2.16.840.1.101.3.4.1.2","aes128-CBC"),o("2.16.840.1.101.3.4.1.22","aes192-CBC"),o("2.16.840.1.101.3.4.1.42","aes256-CBC"),o("2.5.4.3","commonName"),o("2.5.4.5","serialName"),o("2.5.4.6","countryName"),o("2.5.4.7","localityName"),o("2.5.4.8","stateOrProvinceName"),o("2.5.4.10","organizationName"),o("2.5.4.11","organizationalUnitName"),o("2.16.840.1.113730.1.1","nsCertType"),s("2.5.29.1","authorityKeyIdentifier"),s("2.5.29.2","keyAttributes"),s("2.5.29.3","certificatePolicies"),s("2.5.29.4","keyUsageRestriction"),s("2.5.29.5","policyMapping"),s("2.5.29.6","subtreesConstraint"),s("2.5.29.7","subjectAltName"),s("2.5.29.8","issuerAltName"),s("2.5.29.9","subjectDirectoryAttributes"),s("2.5.29.10","basicConstraints"),s("2.5.29.11","nameConstraints"),s("2.5.29.12","policyConstraints"),s("2.5.29.13","basicConstraints"),o("2.5.29.14","subjectKeyIdentifier"),o("2.5.29.15","keyUsage"),s("2.5.29.16","privateKeyUsagePeriod"),o("2.5.29.17","subjectAltName"),o("2.5.29.18","issuerAltName"),o("2.5.29.19","basicConstraints"),s("2.5.29.20","cRLNumber"),s("2.5.29.21","cRLReason"),s("2.5.29.22","expirationDate"),s("2.5.29.23","instructionCode"),s("2.5.29.24","invalidityDate"),s("2.5.29.25","cRLDistributionPoints"),s("2.5.29.26","issuingDistributionPoint"),s("2.5.29.27","deltaCRLIndicator"),s("2.5.29.28","issuingDistributionPoint"),s("2.5.29.29","certificateIssuer"),s("2.5.29.30","nameConstraints"),o("2.5.29.31","cRLDistributionPoints"),o("2.5.29.32","certificatePolicies"),s("2.5.29.33","policyMappings"),s("2.5.29.34","policyConstraints"),o("2.5.29.35","authorityKeyIdentifier"),s("2.5.29.36","policyConstraints"),o("2.5.29.37","extKeyUsage"),s("2.5.29.46","freshestCRL"),s("2.5.29.54","inhibitAnyPolicy"),o("1.3.6.1.4.1.11129.2.4.2","timestampList"),o("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),o("1.3.6.1.5.5.7.3.1","serverAuth"),o("1.3.6.1.5.5.7.3.2","clientAuth"),o("1.3.6.1.5.5.7.3.3","codeSigning"),o("1.3.6.1.5.5.7.3.4","emailProtection"),o("1.3.6.1.5.5.7.3.8","timeStamping")},function(e,t,r){"use strict";(function(n,i){Object.defineProperty(t,"__esModule",{value:!0});var o,s=r(133);o=s.hasNextTick?n.nextTick:s.hasSetImmediate?i:s.fallback,t.default=(0,s.wrap)(o),e.exports=t.default}).call(this,r(4),r(31).setImmediate)},function(e,t,r){(function(e){function r(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===r(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===r(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===r(e)},t.isError=function(e){return"[object Error]"===r(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(903),i=r(904);t.encode=n,t.decode=i.decode,t.decodeFromReader=i.decodeFromReader},function(e,t){e.exports=function(){for(var e={},t=0;t{i.digest(e,"sha2-256",t)}),t.convertPeerId=((e,t)=>{i.digest(e.id,"sha2-256",t)}),t.bufferToKey=(e=>new s("/"+t.encodeBase32(e),!1)),t.keyForPublicKey=(t=>e.concat([e.from("/pk/"),t.id])),t.isPublicKeyKey=(e=>"/pk/"===e.slice(0,4).toString()),t.fromPublicKeyKey=(e=>new p(e.slice(4))),t.now=(()=>Date.now()),t.encodeBase32=(e=>{return(new a.Encoder).write(e).finalize()}),t.decodeBase32=(t=>{const r=new a.Decoder;return e.from(r.write(t).finalize())}),t.sortClosestPeers=((e,r,n)=>{u(e,(e,n)=>{t.convertPeerId(e,(t,i)=>{if(t)return n(t);n(null,{peer:e,distance:c(i,r)})})},(e,r)=>{if(e)return n(e);n(null,r.sort(t.xorCompare).map(e=>e.peer))})}),t.xorCompare=((e,t)=>c.compare(e.distance,t.distance)),t.pathSize=((e,t)=>Math.ceil(e/t)),t.createPutRecord=((e,t,r)=>{const n=new Date,i=new l(e,t,n);f(()=>{r(null,i.serialize())})}),t.logger=((e,t)=>{const r=["libp2p","dht"];t&&r.push(t),e&&r.push(`${e.toB58String().slice(0,8)}`),n.formatters.b=(e=>o.toB58String(e));const i=n(r.join(":"));return i.error=n(r.concat(["error"]).join(":")),i})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBigJson=t.isBig=t.bigToJson=t.bigFromJson=void 0;var n,i=r(325),o=(n=i)&&n.__esModule?n:{default:n};t.bigFromJson=function(e){return(0,o.default)(e.value)},t.bigToJson=function(e){return{__ipfsPostMsgProxyType:"Big",value:e.toJSON()}},t.isBig=function(e){return e&&e.constructor&&null!=e.constructor.DP},t.isBigJson=function(e){return e&&"Big"===e.__ipfsPostMsgProxyType}},function(e,t,r){"use strict";(function(t){const n=r(13),i=r(39),o=r(47),s=r(42),a=r(342);class c{constructor(r,s,a){if(e.exports.isCID(r)){let e=r;return this.version=e.version,this.codec=e.codec,void(this.multihash=t.from(e.multihash))}if("string"==typeof r)if(i.isEncoded(r)){const e=i.decode(r);r=parseInt(e.slice(0,1).toString("hex"),16),s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=n.fromB58String(r),r=0;else if(t.isBuffer(r)){const e=r.slice(0,1),t=parseInt(e.toString("hex"),16);if(0===t||1===t){const e=r;r=t,s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=r,r=0}this.codec=s,this.version=r,this.multihash=a,c.validateCID(this)}get buffer(){let e=this._buffer;if(!e){if(0===this.version)e=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");e=t.concat([t.from("01","hex"),o.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:e})}return e}get prefix(){return t.concat([t.from(`0${this.version}`,"hex"),o.getCodeVarint(this.codec),n.prefix(this.multihash)])}toV0(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");const{name:e,length:t}=n.decode(this.multihash);if("sha2-256"!==e)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==t)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new u(0,this.codec,this.multihash)}toV1(){return new u(1,this.codec,this.multihash)}toBaseEncodedString(e){switch(e=e||"base58btc",this.version){case 0:if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");return n.toB58String(this.multihash);case 1:return i.encode(e,this.buffer).toString();default:throw new Error("Unsupported version")}}toString(e){return this.toBaseEncodedString(e)}toJSON(){return{codec:this.codec,version:this.version,hash:this.multihash}}equals(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}static validateCID(e){let t=a.checkCIDComponents(e);if(t)throw new Error(t)}}const u=r(19)(c,{className:"CID",symbolName:"@ipld/js-cid/CID"});u.codecs=s,e.exports=u}).call(this,r(0).Buffer)},function(e,t,r){(function(e,r){var n=200,i="Expected a function",o="__lodash_hash_undefined__",s=1,a=2,c=1/0,u=9007199254740991,l="[object Arguments]",f="[object Array]",p="[object Boolean]",h="[object Date]",d="[object Error]",m="[object Function]",g="[object GeneratorFunction]",y="[object Map]",b="[object Number]",v="[object Object]",A="[object RegExp]",w="[object Set]",E="[object String]",k="[object Symbol]",S="[object ArrayBuffer]",_="[object DataView]",x=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,C=/^\w*$/,I=/^\./,B=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,R=/\\(\\)?/g,T=/^\[object .+?Constructor\]$/,N=/^(?:0|[1-9]\d*)$/,P={};P["[object Float32Array]"]=P["[object Float64Array]"]=P["[object Int8Array]"]=P["[object Int16Array]"]=P["[object Int32Array]"]=P["[object Uint8Array]"]=P["[object Uint8ClampedArray]"]=P["[object Uint16Array]"]=P["[object Uint32Array]"]=!0,P[l]=P[f]=P[S]=P[p]=P[_]=P[h]=P[d]=P[m]=P[y]=P[b]=P[v]=P[A]=P[w]=P[E]=P["[object WeakMap]"]=!1;var M="object"==typeof e&&e&&e.Object===Object&&e,D="object"==typeof self&&self&&self.Object===Object&&self,O=M||D||Function("return this")(),L=t&&!t.nodeType&&t,U=L&&"object"==typeof r&&r&&!r.nodeType&&r,j=U&&U.exports===L&&M.process,F=function(){try{return j&&j.binding("util")}catch(e){}}(),K=F&&F.isTypedArray;function V(e,t){for(var r=-1,n=e?e.length:0,i=Array(n);++r-1},_e.prototype.set=function(e,t){var r=this.__data__,n=Re(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},xe.prototype.clear=function(){this.__data__={hash:new Se,map:new(fe||_e),string:new Se}},xe.prototype.delete=function(e){return Ge(this,e).delete(e)},xe.prototype.get=function(e){return Ge(this,e).get(e)},xe.prototype.has=function(e){return Ge(this,e).has(e)},xe.prototype.set=function(e,t){return Ge(this,e).set(e,t),this},Ce.prototype.add=Ce.prototype.push=function(e){return this.__data__.set(e,o),this},Ce.prototype.has=function(e){return this.__data__.has(e)},Ie.prototype.clear=function(){this.__data__=new _e},Ie.prototype.delete=function(e){return this.__data__.delete(e)},Ie.prototype.get=function(e){return this.__data__.get(e)},Ie.prototype.has=function(e){return this.__data__.has(e)},Ie.prototype.set=function(e,t){var r=this.__data__;if(r instanceof _e){var i=r.__data__;if(!fe||i.lengthu))return!1;var f=o.get(e);if(f&&o.get(t))return f==t;var p=-1,h=!0,d=i&s?new Ce:void 0;for(o.set(e,t),o.set(t,e);++p-1&&e%1==0&&e-1&&e%1==0&&e<=u}function at(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ct(e){return!!e&&"object"==typeof e}function ut(e){return"symbol"==typeof e||ct(e)&&ne.call(e)==k}var lt=K?function(e){return function(t){return e(t)}}(K):function(e){return ct(e)&&st(e.length)&&!!P[ne.call(e)]};function ft(e){return it(e)?Be(e):Fe(e)}function pt(e){return e}r.exports=function(e,t){return(nt(e)?V:Ke)(e,je(t))}}).call(this,r(12),r(50)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){t|=0;for(var r=Math.max(e.length-t,0),n=Array(r),i=0;i65&&-1!==s){var a=t[s];","===a?(++s,t=t.substr(0,s)+"\r\n "+t.substr(s)):t=t.substr(0,s)+"\r\n"+a+t.substr(s+1),o=i-s-1,s=-1,++i}else" "!==t[i]&&"\t"!==t[i]&&","!==t[i]||(s=i);return t}function s(e){return e.replace(/^\s+/,"")}i.encode=function(e,t){t=t||{};var r,i="-----BEGIN "+e.type+"-----\r\n";if(e.procType&&(i+=o(r={name:"Proc-Type",values:[String(e.procType.version),e.procType.type]})),e.contentDomain&&(i+=o(r={name:"Content-Domain",values:[e.contentDomain]})),e.dekInfo&&(r={name:"DEK-Info",values:[e.dekInfo.algorithm]},e.dekInfo.parameters&&r.values.push(e.dekInfo.parameters),i+=o(r)),e.headers)for(var s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,r){"use strict";e.exports=function(e){return function(t,r){r(e)}}},function(e,t,r){"use strict";t.Connection=r(942)},function(e,t,r){e.exports=i;var n=r(14).EventEmitter;function i(){n.call(this)}r(56)(i,n),i.Readable=r(136),i.Writable=r(403),i.Duplex=r(404),i.Transform=r(405),i.PassThrough=r(406),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",c));var s=!1;function a(){s||(s=!0,e.end())}function c(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(l(),0===n.listenerCount(this,"error"))throw e}function l(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",c),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",l),r.removeListener("close",l),e.removeListener("close",l)}return r.on("error",u),e.on("error",u),r.on("end",l),r.on("close",l),e.on("close",l),e.emit("pipe",r),e}},function(e,t,r){"use strict";function n(e){return e}var i=r(92);e.exports=function(e){if(!e)return n;e=i(e);var t,r,o=!1;return function(n){return function i(s,a){if(r)return a(r);s?(r=s,n(s,o?function(e){o?t=a:a(s)}:function(e){a(s)})):n(null,function(n,s){n?a(n):r?a(r):(o=!0,e(s,function(e,n){o=!1,r?(a(r),t&&t(r)):e?i(e,a):a(null,n)}))})}}}},function(e,t,r){"use strict";(function(t){!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,r,n,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,r)});case 3:return t.nextTick(function(){e.call(null,r,n)});case 4:return t.nextTick(function(){e.call(null,r,n,i)});default:for(o=new Array(a-1),s=0;s=0),a[8]){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,a[6]?parseInt(a[6]):0);break;case"e":r=a[7]?parseFloat(r).toExponential(a[7]):parseFloat(r).toExponential();break;case"f":r=a[7]?parseFloat(r).toFixed(a[7]):parseFloat(r);break;case"g":r=a[7]?String(Number(r.toPrecision(a[7]))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=a[7]?r.substring(0,a[7]):r;break;case"t":r=String(!!r),r=a[7]?r.substring(0,a[7]):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=a[7]?r.substring(0,a[7]):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=a[7]?r.substring(0,a[7]):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(a[8])?m+=r:(!i.number.test(a[8])||f&&!a[3]?p="":(p=f?"+":"-",r=r.toString().replace(i.sign,"")),u=a[4]?"0"===a[4]?"0":a[4].charAt(1):" ",l=a[6]-(p+r).length,c=a[6]&&l>0?u.repeat(l):"",m+=a[5]?p+r+c:"0"===u?p+c+r:c+p+r)}return m}(function(e){if(a[e])return a[e];var t,r=e,n=[],o=0;for(;r;){if(null!==(t=i.text.exec(r)))n.push(t[0]);else if(null!==(t=i.modulo.exec(r)))n.push("%");else{if(null===(t=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var s=[],c=t[2],u=[];if(null===(u=i.key.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(u[1]);""!==(c=c.substring(u[0].length));)if(null!==(u=i.key_access.exec(c)))s.push(u[1]);else{if(null===(u=i.index_access.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(u[1])}t[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push(t)}r=r.substring(t[0].length)}return a[e]=n}(e),arguments)}function s(e,t){return o.apply(null,[e].concat(t||[]))}var a=Object.create(null);t.sprintf=o,t.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(n=function(){return{sprintf:o,vsprintf:s}}.call(t,r,t,e))||(e.exports=n))}()},function(e,t,r){(function(t){e.exports=function(e,r){for(var n=Math.min(e.length,r.length),i=new t(n),o=0;ot.blockLength&&(t.start(),t.update(s.bytes()),s=t.digest()),r=n.util.createBuffer(),i=n.util.createBuffer(),u=s.length();for(c=0;c>>0,c>>>0];for(var u=i.fullMessageLength.length-1;u>=0;--u)i.fullMessageLength[u]+=c[1],c[1]=c[0]+(i.fullMessageLength[u]/4294967296>>>0),i.fullMessageLength[u]=i.fullMessageLength[u]>>>0,c[0]=c[1]/4294967296>>>0;return t.putBytes(o),a(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(t.bytes());var c,u=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(o.substr(0,i.blockLength-u));for(var l=8*i.fullMessageLength[0],f=0;f>>0,s.putInt32(l>>>0),l=c>>>0;s.putInt32(l);var p={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};a(p,r,s);var h=n.util.createBuffer();return h.putInt32(p.h0),h.putInt32(p.h1),h.putInt32(p.h2),h.putInt32(p.h3),h.putInt32(p.h4),h},i};var o=null,s=!1;function a(e,t,r){for(var n,i,o,s,a,c,u,l=r.length();l>=64;){for(i=e.h0,o=e.h1,s=e.h2,a=e.h3,c=e.h4,u=0;u<16;++u)n=r.getInt32(),t[u]=n,n=(i<<5|i>>>27)+(a^o&(s^a))+c+1518500249+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;u<20;++u)n=(n=t[u-3]^t[u-8]^t[u-14]^t[u-16])<<1|n>>>31,t[u]=n,n=(i<<5|i>>>27)+(a^o&(s^a))+c+1518500249+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;u<32;++u)n=(n=t[u-3]^t[u-8]^t[u-14]^t[u-16])<<1|n>>>31,t[u]=n,n=(i<<5|i>>>27)+(o^s^a)+c+1859775393+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;u<40;++u)n=(n=t[u-6]^t[u-16]^t[u-28]^t[u-32])<<2|n>>>30,t[u]=n,n=(i<<5|i>>>27)+(o^s^a)+c+1859775393+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;u<60;++u)n=(n=t[u-6]^t[u-16]^t[u-28]^t[u-32])<<2|n>>>30,t[u]=n,n=(i<<5|i>>>27)+(o&s|a&(o^s))+c+2400959708+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;u<80;++u)n=(n=t[u-6]^t[u-16]^t[u-28]^t[u-32])<<2|n>>>30,t[u]=n,n=(i<<5|i>>>27)+(o^s^a)+c+3395469782+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;e.h0=e.h0+i|0,e.h1=e.h1+o|0,e.h2=e.h2+s|0,e.h3=e.h3+a|0,e.h4=e.h4+c|0,l-=64}}},function(e,t,r){"use strict";const n=t;n.Reporter=r(428).Reporter,n.DecoderBuffer=r(222).DecoderBuffer,n.EncoderBuffer=r(222).EncoderBuffer,n.Node=r(429)},function(e,t,r){"use strict";e.exports=function(e,t){var r,n;function i(o){if(r=o,n)return i.abort();!function i(){for(var o=!0,s=!1;o;)if(s=!1,r(null,function(a,c){if(s=!0,a=a||n){if(o=!1,t)t(!0===a?null:a);else if(a&&!0!==a)throw a}else e&&!1===e(c)||n?(o=!1,r(n||!0,t||function(){})):o||i()}),!s)return void(o=!1)}()}return i.abort=function(e,t){if("function"==typeof e&&(t=e,e=!0),n=e||!0,r)return r(n,t||function(){})},i}},function(e,t){e.exports=function(e){return e&&("string"==typeof e?function(t){return t[e]}:"object"==typeof e&&"function"==typeof e.exec?function(t){var r=e.exec(t);return r&&r[0]}:e)}},function(e,t,r){"use strict";const n=r(34),i=B("dns4"),o=B("dns6"),s=I(B("dnsaddr"),i,o),a=I(B("ip4"),B("ip6")),c=I(C(a,B("tcp")),C(s,B("tcp"))),u=C(a,B("udp")),l=C(u,B("utp")),f=I(C(s,B("tcp")),s),p=I(C(c,B("ws")),C(f,B("ws"))),h=I(C(c,B("wss")),C(f,B("wss"))),d=I(C(c,B("http")),C(a,B("http")),C(f,B("http")),C(f)),m=I(C(c,B("https")),C(a,B("https")),C(f,B("https"))),g=I(C(p,B("p2p-webrtc-star"),B("ipfs")),C(h,B("p2p-webrtc-star"),B("ipfs"))),y=I(C(p,B("p2p-websocket-star"),B("ipfs")),C(h,B("p2p-websocket-star"),B("ipfs")),C(p,B("p2p-websocket-star")),C(h,B("p2p-websocket-star"))),b=I(C(d,B("p2p-webrtc-direct")),C(m,B("p2p-webrtc-direct"))),v=I(p,h,d,m,g,b,c,l),A=I(C(v,B("p2p-stardust"),B("ipfs")),C(v,B("p2p-stardust")));let w=I(C(v,B("ipfs")),g,B("ipfs"));const E=I(C(w,B("p2p-circuit"),w),C(w,B("p2p-circuit")),C(B("p2p-circuit"),w),C(v,B("p2p-circuit")),C(B("p2p-circuit"),v),B("p2p-circuit")),k=()=>I(C(E,k),E),S=k(),_=I(C(S,w,S),C(w,S),C(S,w),S,w);function x(e){return function(t){if(!n.isMultiaddr(t))try{t=n(t)}catch(e){return!1}let r=e(t.protoNames());return null!==r&&0===r.length}}function C(){const e=Array.from(arguments);function t(t){return t.length{if(null===(t="function"==typeof e?e().partialMatch(t):e.partialMatch(t)))return!0}),t)}return{toString:function(){return"{ "+e.join(" ")+" }"},input:e,matches:x(t),partialMatch:t}}function I(){const e=Array.from(arguments);function t(t){let r=null;return e.some(e=>{const n="function"==typeof e?e().partialMatch(t):e.partialMatch(t);if(n)return r=n,!0}),r}return{toString:function(){return"{ "+e.join(" ")+" }"},input:e,matches:x(t),partialMatch:t}}function B(e){const t=e;return{toString:function(){return t},matches:function(e){if("string"==typeof e)try{e=n(e)}catch(e){return!1}const r=e.protoNames();return 1===r.length&&r[0]===t},partialMatch:function(e){return 0===e.length?null:e[0]===t?e.slice(1):null}}}t.DNS=f,t.DNS4=i,t.DNS6=o,t.IP=a,t.TCP=c,t.UDP=u,t.UTP=l,t.HTTP=d,t.HTTPS=m,t.WebSockets=p,t.WebSocketsSecure=h,t.WebSocketStar=y,t.WebRTCStar=g,t.WebRTCDirect=b,t.Reliable=v,t.Stardust=A,t.Circuit=S,t.IPFS=_},function(e,t,r){"use strict";const n=r(308);e.exports={addLink:r(720),countStreamBytes:r(1213),createLock:r(1214),createNode:r(1221),formatCid:r(1222),limitStreamBytes:r(1223),loadNode:r(1224),removeLink:r(1225),toMfsPath:r(724),toPathComponents:r(592),toPullSource:r(1226),toSourcesAndDestination:r(1237),toSources:r(731),toTrail:r(1238),updateMfsRoot:r(1239),updateTree:r(1240),withMfsRoot:r(725),zeros:r(1242),FILE_SEPARATOR:n.FILE_SEPARATOR,MAX_CHUNK_SIZE:n.MAX_CHUNK_SIZE,MAX_LINKS:n.MAX_LINKS,FILE_TYPES:n.FILE_TYPES}},function(e,t,r){var n=r(3);if(r(43),r(112),r(62),r(211),r(212),r(32),r(8),void 0===i)var i=n.jsbn.BigInteger;var o=n.asn1;n.pki=n.pki||{},e.exports=n.pki.rsa=n.rsa=n.rsa||{};var s=n.pki,a=[6,4,2,4,2,4,6,2],c={name:"PrivateKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},u={name:"RSAPrivateKey",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},l={name:"RSAPublicKey",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},f=n.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:o.Class.UNIVERSAL,type:o.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},p=function(e){var t;if(!(e.algorithm in s.oids)){var r=new Error("Unknown message digest algorithm.");throw r.algorithm=e.algorithm,r}t=s.oids[e.algorithm];var n=o.oidToDer(t).getBytes(),i=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[]),a=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[]);a.value.push(o.create(o.Class.UNIVERSAL,o.Type.OID,!1,n)),a.value.push(o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,""));var c=o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,e.digest().getBytes());return i.value.push(a),i.value.push(c),o.toDer(i).getBytes()},h=function(e,t,r){if(r)return e.modPow(t.e,t.n);if(!t.p||!t.q)return e.modPow(t.d,t.n);var o;t.dP||(t.dP=t.d.mod(t.p.subtract(i.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(i.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));do{o=new i(n.util.bytesToHex(n.random.getBytes(t.n.bitLength()/8)),16)}while(o.compareTo(t.n)>=0||!o.gcd(t.n).equals(i.ONE));for(var s=(e=e.multiply(o.modPow(t.e,t.n)).mod(t.n)).mod(t.p).modPow(t.dP,t.p),a=e.mod(t.q).modPow(t.dQ,t.q);s.compareTo(a)<0;)s=s.add(t.p);var c=s.subtract(a).multiply(t.qInv).mod(t.p).multiply(t.q).add(a);return c=c.multiply(o.modInverse(t.n)).mod(t.n)};function d(e,t,r){var i=n.util.createBuffer(),o=Math.ceil(t.n.bitLength()/8);if(e.length>o-11){var s=new Error("Message is too long for PKCS#1 v1.5 padding.");throw s.length=e.length,s.max=o-11,s}i.putByte(0),i.putByte(r);var a,c=o-3-e.length;if(0===r||1===r){a=0===r?0:255;for(var u=0;u0;){var l=0,f=n.random.getBytes(c);for(u=0;u1;){if(255!==s.getByte()){--s.read;break}++u}else if(2===c)for(u=0;s.length()>1;){if(0===s.getByte()){--s.read;break}++u}if(0!==s.getByte()||u!==o-3-s.length())throw new Error("Encryption block is invalid.");return s.getBytes()}function g(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var r=n.util.hexToBytes(t);return r.length>1&&(0===r.charCodeAt(0)&&0==(128&r.charCodeAt(1))||255===r.charCodeAt(0)&&128==(128&r.charCodeAt(1)))?r.substr(1):r}function y(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}function b(e){return"undefined"!=typeof window&&"object"==typeof window.crypto&&"object"==typeof window.crypto.subtle&&"function"==typeof window.crypto.subtle[e]}function v(e){return"undefined"!=typeof window&&"object"==typeof window.msCrypto&&"object"==typeof window.msCrypto.subtle&&"function"==typeof window.msCrypto.subtle[e]}function A(e){for(var t=n.util.hexToBytes(e.toString(16)),r=new Uint8Array(t.length),i=0;i0;)l.putByte(0),--f;return l.putBytes(n.util.hexToBytes(u)),l.getBytes()},s.rsa.decrypt=function(e,t,r,o){var s=Math.ceil(t.n.bitLength()/8);if(e.length!==s){var a=new Error("Encrypted message length is invalid.");throw a.length=e.length,a.expected=s,a}var c=new i(n.util.createBuffer(e).toHex(),16);if(c.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var u=h(c,t,r).toString(16),l=n.util.createBuffer(),f=s-Math.ceil(u.length/2);f>0;)l.putByte(0),--f;return l.putBytes(n.util.hexToBytes(u)),!1!==o?m(l.getBytes(),t,r):l.getBytes()},s.rsa.createKeyPairGenerationState=function(e,t,r){"string"==typeof e&&(e=parseInt(e,10)),e=e||2048;var o,s=(r=r||{}).prng||n.random,a={nextBytes:function(e){for(var t=s.getBytesSync(e.length),r=0;r>1,pBits:e-(e>>1),pqState:0,num:null,keys:null}).e.fromInt(o.eInt),o},s.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var r=new i(null);r.fromInt(30);for(var n,o=0,c=function(e,t){return e|t},u=+new Date,l=0;null===e.keys&&(t<=0||lf?e.pqState=0:e.num.isProbablePrime(y(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(a[o++%8],0):2===e.pqState?e.pqState=0===e.num.subtract(i.ONE).gcd(e.e).compareTo(i.ONE)?3:0:3===e.pqState&&(e.pqState=0,null===e.p?e.p=e.num:e.q=e.num,null!==e.p&&null!==e.q&&++e.state,e.num=null)}else if(1===e.state)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(2===e.state)e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(3===e.state)0===e.phi.gcd(e.e).compareTo(i.ONE)?++e.state:(e.p=null,e.q=null,e.state=0);else if(4===e.state)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(5===e.state){var h=e.e.modInverse(e.phi);e.keys={privateKey:s.rsa.setPrivateKey(e.n,e.e,h,e.p,e.q,h.mod(e.p1),h.mod(e.q1),e.q.modInverse(e.p)),publicKey:s.rsa.setPublicKey(e.n,e.e)}}l+=(n=+new Date)-u,u=n}return null!==e.keys},s.rsa.generateKeyPair=function(e,t,r,a){if(1===arguments.length?"object"==typeof e?(r=e,e=void 0):"function"==typeof e&&(a=e,e=void 0):2===arguments.length?"number"==typeof e?"function"==typeof t?(a=t,t=void 0):"number"!=typeof t&&(r=t,t=void 0):(r=e,a=t,e=void 0,t=void 0):3===arguments.length&&("number"==typeof t?"function"==typeof r&&(a=r,r=void 0):(a=r,r=t,t=void 0)),r=r||{},void 0===e&&(e=r.bits||2048),void 0===t&&(t=r.e||65537),!n.options.usePureJavaScript&&a&&e>=256&&e<=16384&&(65537===t||3===t)){if(b("generateKey")&&b("exportKey"))return window.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:A(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(e){return window.crypto.subtle.exportKey("pkcs8",e.privateKey)}).then(void 0,function(e){a(e)}).then(function(e){if(e){var t=s.privateKeyFromAsn1(o.fromDer(n.util.createBuffer(e)));a(null,{privateKey:t,publicKey:s.setRsaPublicKey(t.n,t.e)})}});if(v("generateKey")&&v("exportKey")){var c=window.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:A(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);return c.oncomplete=function(e){var t=e.target.result,r=window.msCrypto.subtle.exportKey("pkcs8",t.privateKey);r.oncomplete=function(e){var t=e.target.result,r=s.privateKeyFromAsn1(o.fromDer(n.util.createBuffer(t)));a(null,{privateKey:r,publicKey:s.setRsaPublicKey(r.n,r.e)})},r.onerror=function(e){a(e)}},void(c.onerror=function(e){a(e)})}}var u=s.rsa.createKeyPairGenerationState(e,t,r);if(!a)return s.rsa.stepKeyPairGenerationState(u,0),u.keys;!function(e,t,r){"function"==typeof t&&(r=t,t={});var o={algorithm:{name:(t=t||{}).algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};"prng"in t&&(o.prng=t.prng);function a(){c(e.pBits,function(t,n){return t?r(t):(e.p=n,null!==e.q?u(t,e.q):void c(e.qBits,u))})}function c(e,t){n.prime.generateProbablePrime(e,o,t)}function u(t,n){if(t)return r(t);if(e.q=n,e.p.compareTo(e.q)<0){var o=e.p;e.p=e.q,e.q=o}if(0!==e.p.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.p=null,void a();if(0!==e.q.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.q=null,void c(e.qBits,u);if(e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),0!==e.phi.gcd(e.e).compareTo(i.ONE))return e.p=e.q=null,void a();if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits)return e.q=null,void c(e.qBits,u);var l=e.e.modInverse(e.phi);e.keys={privateKey:s.rsa.setPrivateKey(e.n,e.e,l,e.p,e.q,l.mod(e.p1),l.mod(e.q1),e.q.modInverse(e.p)),publicKey:s.rsa.setPublicKey(e.n,e.e)},r(null,e.keys)}a()}(u,r,a)},s.setRsaPublicKey=s.rsa.setPublicKey=function(e,t){var r={n:e,e:t,encrypt:function(e,t,i){if("string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===t)t={encode:function(e,t,r){return d(e,t,2).getBytes()}};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={encode:function(e,t){return n.pkcs1.encode_rsa_oaep(t,e,i)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(t))t={encode:function(e){return e}};else if("string"==typeof t)throw new Error('Unsupported encryption scheme: "'+t+'".');var o=t.encode(e,r,!0);return s.rsa.encrypt(o,r,!0)},verify:function(e,t,n){"string"==typeof n?n=n.toUpperCase():void 0===n&&(n="RSASSA-PKCS1-V1_5"),"RSASSA-PKCS1-V1_5"===n?n={verify:function(e,t){return t=m(t,r,!0),e===o.fromDer(t).value[1].value}}:"NONE"!==n&&"NULL"!==n&&null!==n||(n={verify:function(e,t){return e===(t=m(t,r,!0))}});var i=s.rsa.decrypt(t,r,!0,!1);return n.verify(e,i,r.n.bitLength())}};return r},s.setRsaPrivateKey=s.rsa.setPrivateKey=function(e,t,r,i,o,a,c,u){var l={n:e,e:t,d:r,p:i,q:o,dP:a,dQ:c,qInv:u,decrypt:function(e,t,r){"string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5");var i=s.rsa.decrypt(e,l,!1,!1);if("RSAES-PKCS1-V1_5"===t)t={decode:m};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={decode:function(e,t){return n.pkcs1.decode_rsa_oaep(t,e,r)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(t))throw new Error('Unsupported encryption scheme: "'+t+'".');t={decode:function(e){return e}}}return t.decode(i,l,!1)},sign:function(e,t){var r=!1;"string"==typeof t&&(t=t.toUpperCase()),void 0===t||"RSASSA-PKCS1-V1_5"===t?(t={encode:p},r=1):"NONE"!==t&&"NULL"!==t&&null!==t||(t={encode:function(){return e}},r=1);var n=t.encode(e,l.n.bitLength());return s.rsa.encrypt(n,l,r)}};return l},s.wrapRsaPrivateKey=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(0).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(s.oids.rsaEncryption).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")]),o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,o.toDer(e).getBytes())])},s.privateKeyFromAsn1=function(e){var t,r,a,l,f,p,h,d,m={},g=[];if(o.validate(e,c,m,g)&&(e=o.fromDer(n.util.createBuffer(m.privateKey))),m={},g=[],!o.validate(e,u,m,g)){var y=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw y.errors=g,y}return t=n.util.createBuffer(m.privateKeyModulus).toHex(),r=n.util.createBuffer(m.privateKeyPublicExponent).toHex(),a=n.util.createBuffer(m.privateKeyPrivateExponent).toHex(),l=n.util.createBuffer(m.privateKeyPrime1).toHex(),f=n.util.createBuffer(m.privateKeyPrime2).toHex(),p=n.util.createBuffer(m.privateKeyExponent1).toHex(),h=n.util.createBuffer(m.privateKeyExponent2).toHex(),d=n.util.createBuffer(m.privateKeyCoefficient).toHex(),s.setRsaPrivateKey(new i(t,16),new i(r,16),new i(a,16),new i(l,16),new i(f,16),new i(p,16),new i(h,16),new i(d,16))},s.privateKeyToAsn1=s.privateKeyToRSAPrivateKey=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(0).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(e.n)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(e.e)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(e.d)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(e.p)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(e.q)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(e.dP)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(e.dQ)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(e.qInv))])},s.publicKeyFromAsn1=function(e){var t={},r=[];if(o.validate(e,f,t,r)){var a,c=o.derToOid(t.publicKeyOid);if(c!==s.oids.rsaEncryption)throw(a=new Error("Cannot read public key. Unknown OID.")).oid=c,a;e=t.rsaPublicKey}if(r=[],!o.validate(e,l,t,r))throw(a=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=r,a;var u=n.util.createBuffer(t.publicKeyModulus).toHex(),p=n.util.createBuffer(t.publicKeyExponent).toHex();return s.setRsaPublicKey(new i(u,16),new i(p,16))},s.publicKeyToAsn1=s.publicKeyToSubjectPublicKeyInfo=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(s.oids.rsaEncryption).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")]),o.create(o.Class.UNIVERSAL,o.Type.BITSTRING,!1,[s.publicKeyToRSAPublicKey(e)])])},s.publicKeyToRSAPublicKey=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(e.n)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,g(e.e))])}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){r=(0,o.default)(r||n.default);var a=(0,s.default)(t);if(!e())return r(null);var c=function(t){if(t)return r(t);if(e())return a(c);var n=(0,i.default)(arguments,1);r.apply(null,[null].concat(n))};a(c)};var n=a(r(51)),i=a(r(74)),o=a(r(105)),s=a(r(35));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,r){"use strict";e.exports=function(){return function(e,t){t(!0)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(r(163)),i=o(r(600));function o(e){return e&&e.__esModule?e:{default:e}}t.default=(0,n.default)(i.default),e.exports=t.default},function(e,t,r){"use strict";var n,i,o,s=r(314),a="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";function c(){o=!1}function u(e){if(e){if(e!==n){if(e.length!==a.length)throw new Error("Custom alphabet for shortid must be "+a.length+" unique characters. You submitted "+e.length+" characters: "+e);var t=e.split("").filter(function(e,t,r){return t!==r.lastIndexOf(e)});if(t.length)throw new Error("Custom alphabet for shortid must be "+a.length+" unique characters. These characters were not unique: "+t.join(", "));n=e,c()}}else n!==a&&(n=a,c())}function l(){return o||(o=function(){n||u(a);for(var e,t=n.split(""),r=[],i=s.nextValue();t.length>0;)i=s.nextValue(),e=Math.floor(i*t.length),r.push(t.splice(e,1)[0]);return r.join("")}())}e.exports={get:function(){return n||a},characters:function(e){return u(e),n},seed:function(e){s.seed(e),i!==e&&(c(),i=e)},lookup:function(e){return l()[e]},shuffled:l}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.preArrayOf=function(e,t,r){return function(){for(var n=arguments.length,i=Array(n),o=0;oe.toJSON()),multihash:this._cid.toBaseEncodedString(),size:this.size})),Object.assign({},this._json)}toString(){return`DAGNode <${this._cid.toBaseEncodedString()} - data: "${this.data.toString()}", links: ${this.links.length}, size: ${this.size}>`}get data(){return this._data}set data(e){throw new Error("Can't set property: 'data' is immutable")}get links(){return this._links}set links(e){throw new Error("Can't set property: 'links' is immutable")}get serialized(){return this._serialized}set serialized(e){throw new Error("Can't set property: 'serialized' is immutable")}get size(){return void 0===this._size&&(this._size=this.links.reduce((e,t)=>e+t.size,this.serialized.length)),this._size}set size(e){throw new Error("Can't set property: 'size' is immutable")}get multihash(){return this._cid.buffer}set multihash(e){throw new Error("Can't set property: 'multihash' is immutable")}get cid(){return this._cid}set cid(e){throw new Error("Can't set property: 'cid' is immutable")}},{className:"DAGNode",symbolName:"@ipld/js-ipld-dag-pb/dagnode"})).create=r(104),t.clone=r(381),t.addLink=r(382),t.rmLink=r(383)}).call(this,r(0).Buffer)},function(e,t,r){(function(e){var n=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),c=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&t._extend(n,r),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),l(n,e,n.depth)}function c(e,t){var r=a.styles[t];return r?"["+a.colors[r][0]+"m"+e+"["+a.colors[r][1]+"m":e}function u(e,t){return e}function l(e,r,n){if(e.customInspect&&r&&k(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return y(i)||(i=l(e,i,n)),i}var o=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(g(t))return e.stylize(""+t,"number");if(d(t))return e.stylize(""+t,"boolean");if(m(t))return e.stylize("null","null")}(e,r);if(o)return o;var s=Object.keys(r),a=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),E(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return f(r);if(0===s.length){if(k(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(v(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(w(r))return e.stylize(Date.prototype.toString.call(r),"date");if(E(r))return f(r)}var u,A="",S=!1,_=["{","}"];(h(r)&&(S=!0,_=["[","]"]),k(r))&&(A=" [Function"+(r.name?": "+r.name:"")+"]");return v(r)&&(A=" "+RegExp.prototype.toString.call(r)),w(r)&&(A=" "+Date.prototype.toUTCString.call(r)),E(r)&&(A=" "+f(r)),0!==s.length||S&&0!=r.length?n<0?v(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),u=S?function(e,t,r,n,i){for(var o=[],s=0,a=t.length;s=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(u,A,_)):_[0]+A+_[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,i,o){var s,a,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),C(n,i)||(s="["+i+"]"),a||(e.seen.indexOf(c.value)<0?(a=m(r)?l(e,c.value,null):l(e,c.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n")):a=e.stylize("[Circular]","special")),b(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function h(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function y(e){return"string"==typeof e}function b(e){return void 0===e}function v(e){return A(e)&&"[object RegExp]"===S(e)}function A(e){return"object"==typeof e&&null!==e}function w(e){return A(e)&&"[object Date]"===S(e)}function E(e){return A(e)&&("[object Error]"===S(e)||e instanceof Error)}function k(e){return"function"==typeof e}function S(e){return Object.prototype.toString.call(e)}function _(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(r){if(b(o)&&(o=e.env.NODE_DEBUG||""),r=r.toUpperCase(),!s[r])if(new RegExp("\\b"+r+"\\b","i").test(o)){var n=e.pid;s[r]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",r,n,e)}}else s[r]=function(){};return s[r]},t.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=d,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=y,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=v,t.isObject=A,t.isDate=w,t.isError=E,t.isFunction=k,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(357);var x=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(e=new Date,r=[_(e.getHours()),_(e.getMinutes()),_(e.getSeconds())].join(":"),[e.getDate(),x[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(56),t._extend=function(e,t){if(!t||!A(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var I="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function B(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(I&&e[I]){var t;if("function"!=typeof(t=e[I]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,I,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise(function(e,n){t=e,r=n}),i=[],o=0;oc.isDAGLink(e)?e:c.util.createDagLinkFromB58EncodedHash(e)),p=i(f,s);o({data:e,links:p},(t,r)=>{if(t)return l(t);n(r,u,(t,n)=>{if(t)return l(t);const i=new a(e,p,r,n);l(null,i)})})}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){if(null===e)throw new Error("Callback was already called.");var t=e;e=null,t.apply(this,arguments)}},e.exports=t.default},function(e,t,r){"use strict";(function(n){const i=r(57);(t=e.exports).cloneData=function(e){let t;return e.data&&e.data.length>0?(t=n.alloc(e.data.length),e.data.copy(t)):t=n.alloc(0),t},t.cloneLinks=function(e){return e.links.slice()},t.linkSort=function(e,t){const r=n.from(e.name||""),i=n.from(t.name||"");return r.compare(i)},t.toDAGLink=function(e){return new i("",e.size,e.multihash)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prePeerIdToJson=t.prePeerIdFromJson=t.isPeerIdJson=t.isPeerId=t.peerIdToJson=t.peerIdFromJson=t.prePeerInfoToJson=t.prePeerInfoFromJson=t.isPeerInfoJson=t.isPeerInfo=t.peerInfoToJson=t.peerInfoFromJson=void 0;var n=s(r(385)),i=s(r(466)),o=r(84);function s(e){return e&&e.__esModule?e:{default:e}}var a=t.peerInfoFromJson=function(e){return f(e.id).then(function(t){var r=new n.default(t);return e.multiaddrs.forEach(function(e){r.multiaddrs.add((0,o.multiaddrFromJson)(e))}),e._connectedMultiaddr&&r.connect((0,o.multiaddrFromJson)(e._connectedMultiaddr)),r})},c=t.peerInfoToJson=function(e){return{__ipfsPostMsgProxyType:"PeerInfo",id:p(e.id),multiaddrs:e.multiaddrs.toArray().map(o.multiaddrToJson),_connectedMultiaddr:e._connectedMultiaddr?(0,o.multiaddrToJson)(e._connectedMultiaddr):null}},u=t.isPeerInfo=n.default.isPeerInfo,l=t.isPeerInfoJson=function(e){return e&&"PeerInfo"===e.__ipfsPostMsgProxyType},f=(t.prePeerInfoFromJson=function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n>>24]^l[d>>>16&255]^f[m>>>8&255]^p[255&g]^t[y++],s=u[d>>>24]^l[m>>>16&255]^f[g>>>8&255]^p[255&h]^t[y++],a=u[m>>>24]^l[g>>>16&255]^f[h>>>8&255]^p[255&d]^t[y++],c=u[g>>>24]^l[h>>>16&255]^f[d>>>8&255]^p[255&m]^t[y++],h=o,d=s,m=a,g=c;return o=(n[h>>>24]<<24|n[d>>>16&255]<<16|n[m>>>8&255]<<8|n[255&g])^t[y++],s=(n[d>>>24]<<24|n[m>>>16&255]<<16|n[g>>>8&255]<<8|n[255&h])^t[y++],a=(n[m>>>24]<<24|n[g>>>16&255]<<16|n[h>>>8&255]<<8|n[255&d])^t[y++],c=(n[g>>>24]<<24|n[h>>>16&255]<<16|n[d>>>8&255]<<8|n[255&m])^t[y++],[o>>>=0,s>>>=0,a>>>=0,c>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],c=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,c=0;c<256;++c){var u=a^a<<1^a<<2^a<<3^a<<4;u=u>>>8^255&u^99,r[s]=u,n[u]=s;var l=e[s],f=e[l],p=e[f],h=257*e[u]^16843008*u;i[0][s]=h<<24|h>>>8,i[1][s]=h<<16|h>>>16,i[2][s]=h<<8|h>>>24,i[3][s]=h,h=16843009*p^65537*f^257*l^16843008*s,o[0][u]=h<<24|h>>>8,o[1][u]=h<<16|h>>>16,o[2][u]=h<<8|h>>>24,o[3][u]=h,0===s?s=a=1:(s=l^e[e[e[p^l]]],a^=e[e[a]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function u(e){this._key=i(e),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o>>24,s=c.SBOX[s>>>24]<<24|c.SBOX[s>>>16&255]<<16|c.SBOX[s>>>8&255]<<8|c.SBOX[255&s],s^=a[o/t|0]<<24):t>6&&o%t==4&&(s=c.SBOX[s>>>24]<<24|c.SBOX[s>>>16&255]<<16|c.SBOX[s>>>8&255]<<8|c.SBOX[255&s]),i[o]=i[o-t]^s}for(var u=[],l=0;l>>24]]^c.INV_SUB_MIX[1][c.SBOX[p>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[p>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&p]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(e){return s(e=i(e),this._keySchedule,c.SUB_MIX,c.SBOX,this._nRounds)},u.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},u.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=s(e,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},u.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=u},function(e,t,r){"use strict";(function(t){!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,r,n,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,r)});case 3:return t.nextTick(function(){e.call(null,r,n)});case 4:return t.nextTick(function(){e.call(null,r,n,i)});default:for(o=new Array(a-1),s=0;s8?3:1,y=[],b=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],v=0,A=0;A>>4^E))<<4,w^=t=65535&((E^=t)>>>-16^w),w^=(t=858993459&(w>>>2^(E^=t<<-16)))<<2,w^=t=65535&((E^=t)>>>-16^w),w^=(t=1431655765&(w>>>1^(E^=t<<-16)))<<1,w^=t=16711935&((E^=t)>>>8^w),t=(w^=(t=1431655765&(w>>>1^(E^=t<<8)))<<1)<<8|(E^=t)>>>20&240,w=E<<24|E<<8&16711680|E>>>8&65280|E>>>24&240,E=t;for(var k=0;k>>26,E=E<<2|E>>>26):(w=w<<1|w>>>27,E=E<<1|E>>>27);var S=r[(w&=-15)>>>28]|n[w>>>24&15]|i[w>>>20&15]|o[w>>>16&15]|s[w>>>12&15]|a[w>>>8&15]|c[w>>>4&15],_=u[(E&=-15)>>>28]|l[E>>>24&15]|f[E>>>20&15]|p[E>>>16&15]|h[E>>>12&15]|d[E>>>8&15]|m[E>>>4&15];t=65535&(_>>>16^S),y[v++]=S^t,y[v++]=_^t<<16}}return y}(t),this._init=!0}},i("DES-ECB",n.cipher.modes.ecb),i("DES-CBC",n.cipher.modes.cbc),i("DES-CFB",n.cipher.modes.cfb),i("DES-OFB",n.cipher.modes.ofb),i("DES-CTR",n.cipher.modes.ctr),i("3DES-ECB",n.cipher.modes.ecb),i("3DES-CBC",n.cipher.modes.cbc),i("3DES-CFB",n.cipher.modes.cfb),i("3DES-OFB",n.cipher.modes.ofb),i("3DES-CTR",n.cipher.modes.ctr);var o=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],s=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],a=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],c=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],u=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],l=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],f=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],p=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function h(e,t,r,n){var i,h,d=32===e.length?3:9;i=3===d?n?[30,-2,-2]:[0,32,2]:n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var m=t[0],g=t[1];m^=(h=252645135&(m>>>4^g))<<4,m^=(h=65535&(m>>>16^(g^=h)))<<16,m^=h=858993459&((g^=h)>>>2^m),m^=h=16711935&((g^=h<<2)>>>8^m),m=(m^=(h=1431655765&(m>>>1^(g^=h<<8)))<<1)<<1|m>>>31,g=(g^=h)<<1|g>>>31;for(var y=0;y>>4|g<<28)^e[A+1];h=m,m=g,g=h^(s[w>>>24&63]|c[w>>>16&63]|l[w>>>8&63]|p[63&w]|o[E>>>24&63]|a[E>>>16&63]|u[E>>>8&63]|f[63&E])}h=m,m=g,g=h}g=g>>>1|g<<31,g^=h=1431655765&((m=m>>>1|m<<31)>>>1^g),g^=(h=16711935&(g>>>8^(m^=h<<1)))<<8,g^=(h=858993459&(g>>>2^(m^=h)))<<2,g^=h=65535&((m^=h)>>>16^g),g^=h=252645135&((m^=h<<16)>>>4^g),m^=h<<4,r[0]=m,r[1]=g}function d(e){var t,r="DES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start;return t.start=function(e,r){var o=null;r instanceof n.util.ByteBuffer&&(o=r,r={}),(r=r||{}).output=o,r.iv=e,i.call(t,r)},t}},function(e,t,r){var n,i=r(3);e.exports=i.jsbn=i.jsbn||{};function o(e,t,r){this.data=[],null!=e&&("number"==typeof e?this.fromNumber(e,t,r):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function s(){return new o(null)}function a(e,t,r,n,i,o){for(var s=16383&t,a=t>>14;--o>=0;){var c=16383&this.data[e],u=this.data[e++]>>14,l=a*c+u*s;i=((c=s*c+((16383&l)<<14)+r.data[n]+i)>>28)+(l>>14)+a*u,r.data[n++]=268435455&c}return i}i.jsbn.BigInteger=o,"undefined"==typeof navigator?(o.prototype.am=a,n=28):"Microsoft Internet Explorer"==navigator.appName?(o.prototype.am=function(e,t,r,n,i,o){for(var s=32767&t,a=t>>15;--o>=0;){var c=32767&this.data[e],u=this.data[e++]>>15,l=a*c+u*s;i=((c=s*c+((32767&l)<<15)+r.data[n]+(1073741823&i))>>>30)+(l>>>15)+a*u+(i>>>30),r.data[n++]=1073741823&c}return i},n=30):"Netscape"!=navigator.appName?(o.prototype.am=function(e,t,r,n,i,o){for(;--o>=0;){var s=t*this.data[e++]+r.data[n]+i;i=Math.floor(s/67108864),r.data[n++]=67108863&s}return i},n=26):(o.prototype.am=a,n=28),o.prototype.DB=n,o.prototype.DM=(1<>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function g(e){this.m=e}function y(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function k(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function S(){}function _(e){return e}function x(e){this.r2=s(),this.q3=s(),o.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}g.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},g.prototype.revert=function(e){return e},g.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},g.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},g.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},y.prototype.convert=function(e){var t=s();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(o.ZERO)>0&&this.m.subTo(t,t),t},y.prototype.revert=function(e){var t=s();return e.copyTo(t),this.reduce(t),t},y.prototype.reduce=function(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;t>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e.data[r]+=this.m.am(0,n,e,t,0,this.m.t);e.data[r]>=e.DV;)e.data[r]-=e.DV,e.data[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},y.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},y.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},o.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s},o.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0},o.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.fromRadix(e,t);r=2}this.t=0,this.s=0;for(var n=e.length,i=!1,s=0;--n>=0;){var a=8==r?255&e[n]:h(e,n);a<0?"-"==e.charAt(n)&&(i=!0):(i=!1,0==s?this.data[this.t++]=a:s+r>this.DB?(this.data[this.t-1]|=(a&(1<>this.DB-s):this.data[this.t-1]|=a<=this.DB&&(s-=this.DB))}8==r&&0!=(128&e[0])&&(this.s=-1,s>0&&(this.data[this.t-1]|=(1<0&&this.data[this.t-1]==e;)--this.t},o.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t.data[r+e]=this.data[r];for(r=e-1;r>=0;--r)t.data[r]=0;t.t=this.t+e,t.s=this.s},o.prototype.drShiftTo=function(e,t){for(var r=e;r=0;--r)t.data[r+s+1]=this.data[r]>>i|a,a=(this.data[r]&o)<=0;--r)t.data[r]=0;t.data[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()},o.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,o=(1<>n;for(var s=r+1;s>n;n>0&&(t.data[this.t-r-1]|=(this.s&o)<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t.data[r++]=this.DV+n:n>0&&(t.data[r++]=n),t.t=r,t.clamp()},o.prototype.multiplyTo=function(e,t){var r=this.abs(),n=e.abs(),i=r.t;for(t.t=i+n.t;--i>=0;)t.data[i]=0;for(i=0;i=0;)e.data[r]=0;for(r=0;r=t.DV&&(e.data[r+t.t]-=t.DV,e.data[r+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(r,t.data[r],e,2*r,0,1)),e.s=0,e.clamp()},o.prototype.divRemTo=function(e,t,r){var n=e.abs();if(!(n.t<=0)){var i=this.abs();if(i.t0?(n.lShiftTo(l,a),i.lShiftTo(l,r)):(n.copyTo(a),i.copyTo(r));var f=a.t,p=a.data[f-1];if(0!=p){var h=p*(1<1?a.data[f-2]>>this.F2:0),d=this.FV/h,g=(1<=0&&(r.data[r.t++]=1,r.subTo(A,r)),o.ONE.dlShiftTo(f,A),A.subTo(a,a);a.t=0;){var w=r.data[--b]==p?this.DM:Math.floor(r.data[b]*d+(r.data[b-1]+y)*g);if((r.data[b]+=a.am(0,w,r,v,0,f))0&&r.rShiftTo(l,r),c<0&&o.ZERO.subTo(r,r)}}},o.prototype.invDigit=function(){if(this.t<1)return 0;var e=this.data[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},o.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},o.prototype.exp=function(e,t){if(e>4294967295||e<1)return o.ONE;var r=s(),n=s(),i=t.convert(this),a=m(e)-1;for(i.copyTo(r);--a>=0;)if(t.sqrTo(r,n),(e&1<0)t.mulTo(n,i,r);else{var c=r;r=n,n=c}return t.revert(r)},o.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,n=(1<0)for(a>a)>0&&(i=!0,o=p(r));s>=0;)a>(a+=this.DB-t)):(r=this.data[s]>>(a-=t)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=p(r));return i?o:"0"},o.prototype.negate=function(){var e=s();return o.ZERO.subTo(this,e),e},o.prototype.abs=function(){return this.s<0?this.negate():this},o.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this.data[r]-e.data[r]))return t;return 0},o.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+m(this.data[this.t-1]^this.s&this.DM)},o.prototype.mod=function(e){var t=s();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(o.ZERO)>0&&e.subTo(t,t),t},o.prototype.modPowInt=function(e,t){var r;return r=e<256||t.isEven()?new g(t):new y(t),this.exp(e,r)},o.ZERO=d(0),o.ONE=d(1),S.prototype.convert=_,S.prototype.revert=_,S.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},S.prototype.sqrTo=function(e,t){e.squareTo(t)},x.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=s();return e.copyTo(t),this.reduce(t),t},x.prototype.revert=function(e){return e},x.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},x.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},x.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var C=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],I=(1<<26)/C[C.length-1];o.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},o.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),n=d(r),i=s(),o=s(),a="";for(this.divRemTo(n,i,o);i.signum()>0;)a=(r+o.intValue()).toString(e).substr(1)+a,i.divRemTo(n,i,o);return o.intValue().toString(e)+a},o.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var r=this.chunkSize(t),n=Math.pow(t,r),i=!1,s=0,a=0,c=0;c=r&&(this.dMultiply(n),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(t,s)),this.dAddOffset(a,0)),i&&o.ZERO.subTo(this,this)},o.prototype.fromNumber=function(e,t,r){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(o.ONE.shiftLeft(e-1),v,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(o.ONE.shiftLeft(e-1),this);else{var n=new Array,i=7&e;n.length=1+(e>>3),t.nextBytes(n),i>0?n[0]&=(1<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t.data[r++]=n:n<-1&&(t.data[r++]=this.DV+n),t.t=r,t.clamp()},o.prototype.dMultiply=function(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},o.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this.data[this.t++]=0;for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}},o.prototype.multiplyLowerTo=function(e,t,r){var n,i=Math.min(this.t+e.t,t);for(r.s=0,r.t=i;i>0;)r.data[--i]=0;for(n=r.t-this.t;i=0;)r.data[n]=0;for(n=Math.max(t-this.t,0);n0)if(0==t)r=this.data[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this.data[n])%e;return r},o.prototype.millerRabin=function(e){var t=this.subtract(o.ONE),r=t.getLowestSetBit();if(r<=0)return!1;for(var n,i=t.shiftRight(r),s={nextBytes:function(e){for(var t=0;t=0);var c=n.modPow(i,this);if(0!=c.compareTo(o.ONE)&&0!=c.compareTo(t)){for(var u=1;u++>24},o.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},o.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},o.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var r,n=this.DB-e*this.DB%8,i=0;if(e-- >0)for(n>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<=0;)n<8?(r=(this.data[e]&(1<>(n+=this.DB-8)):(r=this.data[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t},o.prototype.equals=function(e){return 0==this.compareTo(e)},o.prototype.min=function(e){return this.compareTo(e)<0?this:e},o.prototype.max=function(e){return this.compareTo(e)>0?this:e},o.prototype.and=function(e){var t=s();return this.bitwiseTo(e,b,t),t},o.prototype.or=function(e){var t=s();return this.bitwiseTo(e,v,t),t},o.prototype.xor=function(e){var t=s();return this.bitwiseTo(e,A,t),t},o.prototype.andNot=function(e){var t=s();return this.bitwiseTo(e,w,t),t},o.prototype.not=function(){for(var e=s(),t=0;t=this.t?0!=this.s:0!=(this.data[t]&1<1){var f=s();for(n.sqrTo(a[1],f);c<=l;)a[c]=s(),n.mulTo(f,a[c-2],a[c]),c+=2}var p,h,b=e.t-1,v=!0,A=s();for(i=m(e.data[b])-1;b>=0;){for(i>=u?p=e.data[b]>>i-u&l:(p=(e.data[b]&(1<0&&(p|=e.data[b-1]>>this.DB+i-u)),c=r;0==(1&p);)p>>=1,--c;if((i-=c)<0&&(i+=this.DB,--b),v)a[p].copyTo(o),v=!1;else{for(;c>1;)n.sqrTo(o,A),n.sqrTo(A,o),c-=2;c>0?n.sqrTo(o,A):(h=o,o=A,A=h),n.mulTo(A,a[p],o)}for(;b>=0&&0==(e.data[b]&1<=0?(r.subTo(n,r),t&&i.subTo(a,i),s.subTo(c,s)):(n.subTo(r,n),t&&a.subTo(i,a),c.subTo(s,c))}return 0!=n.compareTo(o.ONE)?o.ZERO:c.compareTo(e)>=0?c.subtract(e):c.signum()<0?(c.addTo(e,c),c.signum()<0?c.add(e):c):c},o.prototype.pow=function(e){return this.exp(e,new S)},o.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var i=t.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return t;for(i0&&(t.rShiftTo(o,t),r.rShiftTo(o,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},o.prototype.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r.data[0]<=C[C.length-1]){for(t=0;t>>2,t.words[2]=(63&e[22])<<20|e[23]<<12|e[24]<<4|e[25]>>>4,t.words[3]=(255&e[19])<<18|e[20]<<10|e[21]<<2|e[22]>>>6,t.words[4]=(3&e[15])<<24|e[16]<<16|e[17]<<8|e[18],t.words[5]=(15&e[12])<<22|e[13]<<14|e[14]<<6|e[15]>>>2,t.words[6]=(63&e[9])<<20|e[10]<<12|e[11]<<4|e[12]>>>4,t.words[7]=(255&e[6])<<18|e[7]<<10|e[8]<<2|e[9]>>>6,t.words[8]=(3&e[2])<<24|e[3]<<16|e[4]<<8|e[5],t.words[9]=e[0]<<14|e[1]<<6|e[2]>>>2,t.length=10,t.strip()},o.prototype.toBuffer=function(){for(var e=this.words,t=this.length;t<10;++t)e[t]=0;return n.from([e[9]>>>14&255,e[9]>>>6&255,(63&e[9])<<2|e[8]>>>24&3,e[8]>>>16&255,e[8]>>>8&255,255&e[8],e[7]>>>18&255,e[7]>>>10&255,e[7]>>>2&255,(3&e[7])<<6|e[6]>>>20&63,e[6]>>>12&255,e[6]>>>4&255,(15&e[6])<<4|e[5]>>>22&15,e[5]>>>14&255,e[5]>>>6&255,(63&e[5])<<2|e[4]>>>24&3,e[4]>>>16&255,e[4]>>>8&255,255&e[4],e[3]>>>18&255,e[3]>>>10&255,e[3]>>>2&255,(3&e[3])<<6|e[2]>>>20&63,e[2]>>>12&255,e[2]>>>4&255,(15&e[2])<<4|e[1]>>>22&15,e[1]>>>14&255,e[1]>>>6&255,(63&e[1])<<2|e[0]>>>24&3,e[0]>>>16&255,e[0]>>>8&255,255&e[0]])},o.prototype.clone=function(){var e=new o;e.words=new Array(this.length);for(var t=0;t1&&0==(0|this.words[this.length-1]);)this.length--;return this},o.prototype.normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.ucmp=function(e){if(this.length!==e.length)return this.length>e.length?1:-1;for(var t=this.length-1;t>=0;--t)if(this.words[t]!==e.words[t])return this.words[t]>e.words[t]?1:-1;return 0},o.prototype.gtOne=function(){return this.length>1||this.words[0]>1},o.prototype.isOverflow=function(){return this.ucmp(o.n)>=0},o.prototype.isHigh=function(){return 1===this.ucmp(o.nh)},o.prototype.bitLengthGT256=function(){return this.length>10||10===this.length&&this.words[9]>4194303},o.prototype.iuaddn=function(e){this.words[0]+=e;for(var t=0;this.words[t]>67108863&&te.length?(t=this,r=e):(t=e,r=this);for(var n=0,i=0;n>>26}for(;0!==i&&n>>26;if(this.length=t.length,0!==i)this.words[this.length++]=i;else if(t!==this)for(;n0?(t=this,r=e):(t=e,r=this);for(var i=0,o=0;i>26,this.words[i]=67108863&s}for(;0!==o&&i>26,this.words[i]=67108863&s;if(0===o&&i>>26,c=67108863&i,u=Math.max(0,o-e.length+1),l=Math.min(o,t.length-1);u<=l;u++){var f=o-u,p=e.words[f]*t.words[u]+c;a+=p/67108864|0,c=67108863&p}r.words[o]=c,i=a}return 0!==i&&(r.words[r.length++]=i),r.strip()},o.umulTo10x10=Math.imul?i.umulTo10x10:o.umulTo,o.umulnTo=function(e,t,r){if(0===t)return r.words=[0],r.length=1,r;for(var n=0,i=0;n0?(r.words[n]=i,r.length=e.length+1):r.length=e.length,r},o.prototype.umul=function(e){var t=new o;return t.words=new Array(this.length+e.length),10===this.length&&10===e.length?o.umulTo10x10(this,e,t):1===this.length?o.umulnTo(e,this.words[0],t):1===e.length?o.umulnTo(this,e.words[0],t):o.umulTo(this,e,t)},o.prototype.isplit=function(e){e.length=Math.min(this.length,9);for(var t=0;t>>22,r=n}return r>>>=22,this.words[t-10]=r,0===r&&this.length>10?this.length-=10:this.length-=9,this},o.prototype.fireduce=function(){return this.isOverflow()&&this.isub(o.n),this},o.prototype.ureduce=function(){var e=this.clone().isplit(o.tmp).umul(o.nc).iadd(o.tmp);return e.bitLengthGT256()&&(e=e.isplit(o.tmp).umul(o.nc).iadd(o.tmp)).bitLengthGT256()&&(e=e.isplit(o.tmp).umul(o.nc).iadd(o.tmp)),e.fireduce()},o.prototype.ishrn=function(e){for(var t=(1<=0;--n){var o=this.words[n];this.words[n]=i<>>e,i=o&t}return this.length>1&&0===this.words[this.length-1]&&(this.length-=1),this},o.prototype.uinvm=function(){for(var e=this.clone(),t=o.n.clone(),r=o.fromNumber(1),n=o.fromNumber(0),i=o.fromNumber(0),s=o.fromNumber(1);e.isEven()&&t.isEven();){for(var a=1,c=1;0==(e.words[0]&c)&&0==(t.words[0]&c)&&a<26;++a,c<<=1);e.ishrn(a),t.ishrn(a)}for(var u=t.clone(),l=e.clone();!e.isZero();){for(var f=0,p=1;0==(e.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(e.ishrn(f);f-- >0;)(r.isOdd()||n.isOdd())&&(r.iadd(u),n.isub(l)),r.ishrn(1),n.ishrn(1);for(var h=0,d=1;0==(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.ishrn(h);h-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(u),s.isub(l)),i.ishrn(1),s.ishrn(1);e.ucmp(t)>=0?(e.isub(t),r.isub(i),n.isub(s)):(t.isub(e),i.isub(r),s.isub(n))}if(1===i.negative){i.negative=0;var m=i.ureduce();return m.negative^=1,m.normSign().iadd(o.n)}return i.ureduce()},o.prototype.imulK=function(){this.words[this.length]=0,this.words[this.length+1]=0,this.length+=2;for(var e=0,t=0;e0?this.isub(o.p):this.strip(),this},o.prototype.redNeg=function(){return this.isZero()?o.fromNumber(0):o.p.sub(this)},o.prototype.redAdd=function(e){return this.clone().redIAdd(e)},o.prototype.redIAdd=function(e){return this.iadd(e),this.ucmp(o.p)>=0&&this.isub(o.p),this},o.prototype.redIAdd7=function(){return this.iuaddn(7),this.ucmp(o.p)>=0&&this.isub(o.p),this},o.prototype.redSub=function(e){return this.clone().redISub(e)},o.prototype.redISub=function(e){return this.isub(e),0!==this.negative&&this.iadd(o.p),this},o.prototype.redMul=function(e){return this.umul(e).redIReduce()},o.prototype.redSqr=function(){return this.umul(this).redIReduce()},o.prototype.redSqrt=function(){if(this.isZero())return this.clone();for(var e=this.redSqr(),t=e.redSqr(),r=t.redSqr().redMul(t),n=r.redMul(e),i=n.redMul(this),o=i,s=0;s<54;++s)o=o.redSqr().redSqr().redSqr().redSqr().redMul(i);for(o=o.redSqr().redSqr().redSqr().redSqr().redMul(n),s=0;s<5;++s)o=o.redSqr().redSqr().redSqr().redSqr().redMul(i);return 0===(o=(o=o.redSqr().redSqr().redSqr().redSqr().redMul(r)).redSqr().redSqr().redSqr().redSqr().redSqr().redSqr().redMul(r)).redSqr().ucmp(this)?o:null},o.prototype.redInvm=function(){for(var e,t=this.clone(),r=o.p.clone(),n=o.fromNumber(1),i=o.fromNumber(0);t.gtOne()&&r.gtOne();){for(var s=0,a=1;0==(t.words[0]&a)&&s<26;++s,a<<=1);if(s>0)for(t.ishrn(s);s-- >0;)n.isOdd()&&n.iadd(o.p),n.ishrn(1);for(var c=0,u=1;0==(r.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(r.ishrn(c);c-- >0;)i.isOdd()&&i.iadd(o.p),i.ishrn(1);t.ucmp(r)>=0?(t.isub(r),n.isub(i)):(r.isub(t),i.isub(n))}return 0!==(e=1===t.length&&1===t.words[0]?n:i).negative&&e.iadd(o.p),0!==e.negative?(e.negative=0,e.redIReduce().redNeg()):e.redIReduce()},o.prototype.getNAF=function(e){for(var t=[],r=1<>1,o=this.clone();!o.isZero();){for(var s=0,a=1;0==(o.words[0]&a)&&s<26;++s,a<<=1)t.push(0);if(0!==s)o.ishrn(s);else{var c=o.words[0]&n;if(c>=i)t.push(i-c),o.iuaddn(c-i).ishrn(1);else if(t.push(c),o.words[0]-=c,!o.isZero()){for(s=e-1;s>0;--s)t.push(0);o.ishrn(e)}}}return t},o.prototype.inspect=function(){if(this.isZero())return"0";for(var e=this.toBuffer().toString("hex"),t=0;"0"===e[t];++t);return e.slice(t)},o.n=o.fromBuffer(n.from("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141","hex")),o.nh=o.n.clone().ishrn(1),o.nc=o.fromBuffer(n.from("000000000000000000000000000000014551231950B75FC4402DA1732FC9BEBF","hex")),o.p=o.fromBuffer(n.from("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F","hex")),o.psn=o.p.sub(o.n),o.tmp=new o,o.tmp.words=new Array(10),o.fromNumber(1).words[3]=0,e.exports=o},function(e,t,r){"use strict";var n=r(243);e.exports=function(e,t){return function(r,i){if(r)return n(i,r,t);if(null!=e){var o=e;e=null,i(null,o)}else i(!0)}}},function(e,t,r){"use strict";const n=r(603),i=Object.prototype.hasOwnProperty,o=Object.propertyIsEnumerable,s=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0}),a=this,c={concatArrays:!1},u=e=>{const t=[];for(const r in e)i.call(e,r)&&t.push(r);if(Object.getOwnPropertySymbols){const r=Object.getOwnPropertySymbols(e);for(let n=0;n{s(t,r,l(e[r]))}),t}(e):n(e)?function(e){const t=null===Object.getPrototypeOf(e)?Object.create(null):{};return u(e).forEach(r=>{s(t,r,l(e[r]))}),t}(e):e}const f=(e,t,r,n)=>(r.forEach(r=>{r in e&&e[r]!==Object.getPrototypeOf(e)?s(e,r,h(e[r],t[r],n)):s(e,r,l(t[r]))}),e),p=(e,t,r)=>{let n=e.slice(0,0),o=0;return[e,t].forEach(t=>{const a=[];for(let r=0;r-1===a.indexOf(e)),r)}),n};function h(e,t,r){return r.concatArrays&&Array.isArray(e)&&Array.isArray(t)?p(e,t,r):n(t)&&n(e)?f(e,t,u(t),r):l(t)}e.exports=function(){const e=h(l(c),this!==a&&this||{},c);let t={foobar:{}};for(let r=0;r0||e===t?t:t-1}function v(e){for(var t,r,n=1,i=e.length,o=e[0]+"";nu^r?1:-1;for(a=(c=i.length)<(u=o.length)?c:u,s=0;so[s]^r?1:-1;return c==u?0:c>u^r?1:-1}function w(e,t,r,n){if(er||e!==u(e))throw Error(l+(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 b(e.e/h)==t&&e.c[t]%2!=0}function k(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function S(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 tL?y.c=y.e=null:e.e=10;l/=10,c++);return void(c>L?y.c=y.e=null:(y.e=c,y.c=[e]))}g=String(e)}else{if(!s.test(g=String(e)))return i(y,g,p);y.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(c=g.indexOf("."))>-1&&(g=g.replace(".","")),(l=g.search(/e/i))>0?(c<0&&(c=l),c+=+g.slice(l+1),g=g.substring(0,l)):c<0&&(c=g.length)}else{if(w(t,2,V.length,"Base"),10==t)return Y(y=new z(e),N+y.e+1,P);if(g=String(e),p="number"==typeof e){if(0*e!=0)return i(y,g,p,t);if(y.s=1/e<0?(g=g.slice(1),-1):1,z.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(f+e)}else y.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(r=V.slice(0,t),c=l=0,m=g.length;lc){c=m;continue}}else if(!a&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){a=!0,l=-1,c=0;continue}return i(y,String(e),p,t)}p=!1,(c=(g=n(g,t,10,y.s)).indexOf("."))>-1?g=g.replace(".",""):c=g.length}for(l=0;48===g.charCodeAt(l);l++);for(m=g.length;48===g.charCodeAt(--m););if(g=g.slice(l,++m)){if(m-=l,p&&z.DEBUG&&m>15&&(e>d||e!==u(e)))throw Error(f+y.s*e);if((c=c-l-1)>L)y.c=y.e=null;else if(c=D)?k(c,s):S(c,s,"0");else if(o=(e=Y(new z(e),t,r)).e,a=(c=v(e.c)).length,1==n||2==n&&(t<=o||o<=M)){for(;aa){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=o-a)>0)for(o+1==a&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function q(e,t){for(var r,n=1,i=new z(e[0]);n=10;i/=10,n++);return(r=n+r*h-1)>L?e.c=e.e=null:r=10;a/=10,i++);if((o=t-i)<0)o+=h,s=t,d=(l=g[f=0])/y[i-s-1]%10|0;else if((f=c((o+1)/h))>=g.length){if(!n)break e;for(;g.length<=f;g.push(0));l=d=0,i=1,s=(o%=h)-h+1}else{for(l=a=g[f],i=1;a>=10;a/=10,i++);d=(s=(o%=h)-h+i)<0?0:l/y[i-s-1]%10|0}if(n=n||t<0||null!=g[f+1]||(s<0?l:l%y[i-s-1]),n=r<4?(d||n)&&(0==r||r==(e.s<0?3:2)):d>5||5==d&&(4==r||n||6==r&&(o>0?s>0?l/y[i-s]:0:g[f-1])%10&1||r==(e.s<0?8:7)),t<1||!g[0])return g.length=0,n?(t-=e.e+1,g[0]=y[(h-t%h)%h],e.e=-t||0):g[0]=e.e=0,e;if(0==o?(g.length=f,a=1,f--):(g.length=f+1,a=y[h-o],g[f]=s>0?u(l/y[i-s]%y[s])*a:0),n)for(;;){if(0==f){for(o=1,s=g[0];s>=10;s/=10,o++);for(s=g[0]+=a,a=1;s>=10;s/=10,a++);o!=a&&(e.e++,g[0]==p&&(g[0]=1));break}if(g[f]+=a,g[f]!=p)break;g[f--]=0,a=1}for(o=g.length;0===g[--o];g.pop());}e.e>L?e.c=e.e=null:e.e=D?k(t,r):S(t,r,"0"),e.s<0?"-"+t:t)}return z.clone=e,z.ROUND_UP=0,z.ROUND_DOWN=1,z.ROUND_CEIL=2,z.ROUND_FLOOR=3,z.ROUND_HALF_UP=4,z.ROUND_HALF_DOWN=5,z.ROUND_HALF_EVEN=6,z.ROUND_HALF_CEIL=7,z.ROUND_HALF_FLOOR=8,z.EUCLID=9,z.config=z.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(l+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(w(r=e[t],0,y,t),N=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(w(r=e[t],0,8,t),P=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(w(r[0],-y,0,t),w(r[1],0,y,t),M=r[0],D=r[1]):(w(r,-y,y,t),M=-(D=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)w(r[0],-y,-1,t),w(r[1],1,y,t),O=r[0],L=r[1];else{if(w(r,-y,y,t),!r)throw Error(l+t+" cannot be zero: "+r);O=-(L=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(l+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw U=!r,Error(l+"crypto unavailable");U=r}else U=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(w(r=e[t],0,9,t),j=r),e.hasOwnProperty(t="POW_PRECISION")&&(w(r=e[t],0,y,t),F=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(l+t+" not an object: "+r);K=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(l+t+" invalid: "+r);V=r}}return{DECIMAL_PLACES:N,ROUNDING_MODE:P,EXPONENTIAL_AT:[M,D],RANGE:[O,L],CRYPTO:U,MODULO_MODE:j,POW_PRECISION:F,FORMAT:K,ALPHABET:V}},z.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!z.DEBUG)return!0;var t,r,n=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-y&&i<=y&&i===u(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%h)<1&&(t+=h),String(n[0]).length==t){for(t=0;t=p||r!==u(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(l+"Invalid BigNumber: "+e)},z.maximum=z.max=function(){return q(arguments,R.lt)},z.minimum=z.min=function(){return q(arguments,R.gt)},z.random=(o=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,s,a=0,f=[],p=new z(T);if(null==e?e=N:w(e,0,y),i=c(e/h),U)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));a>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[a]=r[0],t[a+1]=r[1]):(f.push(s%1e14),a+=2);a=i/2}else{if(!crypto.randomBytes)throw U=!1,Error(l+"crypto unavailable");for(t=crypto.randomBytes(i*=7);a=9e15?crypto.randomBytes(7).copy(t,a):(f.push(s%1e14),a+=7);a=i/7}if(!U)for(;a=10;s/=10,a++);ar-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/r|0,s[i]%=r)}return s.reverse()}return function(t,n,i,o,s){var a,c,u,l,f,p,h,d,m=t.indexOf("."),g=N,y=P;for(m>=0&&(l=F,F=0,t=t.replace(".",""),p=(d=new z(n)).pow(t.length-m),F=l,d.c=e(S(v(p.c),p.e,"0"),10,i,"0123456789"),d.e=d.c.length),u=l=(h=e(t,n,i,s?(a=V,"0123456789"):(a="0123456789",V))).length;0==h[--l];h.pop());if(!h[0])return a.charAt(0);if(m<0?--u:(p.c=h,p.e=u,p.s=o,h=(p=r(p,d,g,y,i)).c,f=p.r,u=p.e),m=h[c=u+g+1],l=i/2,f=f||c<0||null!=h[c+1],f=y<4?(null!=m||f)&&(0==y||y==(p.s<0?3:2)):m>l||m==l&&(4==y||f||6==y&&1&h[c-1]||y==(p.s<0?8:7)),c<1||!h[0])t=f?S(a.charAt(1),-g,a.charAt(0)):a.charAt(0);else{if(h.length=c,f)for(--i;++h[--c]>i;)h[c]=0,c||(++u,h=[1].concat(h));for(l=h.length;!h[--l];);for(m=0,t="";m<=l;t+=a.charAt(h[m++]));t=S(t,u,a.charAt(0))}return t}}(),r=function(){function e(e,t,r){var n,i,o,s,a=0,c=e.length,u=t%g,l=t/g|0;for(e=e.slice();c--;)a=((i=u*(o=e[c]%g)+(n=l*o+(s=e[c]/g|0)*u)%g*g+a)/r|0)+(n/g|0)+l*s,e[c]=i%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}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,o,s,a){var c,l,f,d,m,g,y,v,A,w,E,k,S,_,x,C,I,B=n.s==i.s?1:-1,R=n.c,T=i.c;if(!(R&&R[0]&&T&&T[0]))return new z(n.s&&i.s&&(R?!T||R[0]!=T[0]:T)?R&&0==R[0]||!T?0*B:B/0:NaN);for(A=(v=new z(B)).c=[],B=o+(l=n.e-i.e)+1,a||(a=p,l=b(n.e/h)-b(i.e/h),B=B/h|0),f=0;T[f]==(R[f]||0);f++);if(T[f]>(R[f]||0)&&l--,B<0)A.push(1),d=!0;else{for(_=R.length,C=T.length,f=0,B+=2,(m=u(a/(T[0]+1)))>1&&(T=e(T,m,a),R=e(R,m,a),C=T.length,_=R.length),S=C,E=(w=R.slice(0,C)).length;E=a/2&&x++;do{if(m=0,(c=t(T,w,C,E))<0){if(k=w[0],C!=E&&(k=k*a+(w[1]||0)),(m=u(k/x))>1)for(m>=a&&(m=a-1),y=(g=e(T,m,a)).length,E=w.length;1==t(g,w,y,E);)m--,r(g,C=10;B/=10,f++);Y(v,o+(v.e=f+l*h-1)+1,s,d)}else v.e=l,v.r=+d;return v}}(),_=/^(-?)0([xbo])(?=\w[\w.]*$)/i,x=/^([^.]+)\.$/,C=/^\.([^.]+)$/,I=/^-?(Infinity|NaN)$/,B=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,r,n){var i,o=r?t:t.replace(B,"");if(I.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(_,function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t}),n&&(i=n,o=o.replace(x,"$1").replace(C,"0.$1")),t!=o))return new z(o,i);if(z.DEBUG)throw Error(l+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},R.absoluteValue=R.abs=function(){var e=new z(this);return e.s<0&&(e.s=1),e},R.comparedTo=function(e,t){return A(this,new z(e,t))},R.decimalPlaces=R.dp=function(e,t){var r,n,i,o=this;if(null!=e)return w(e,0,y),null==t?t=P:w(t,0,8),Y(new z(o),e+o.e+1,t);if(!(r=o.c))return null;if(n=((i=r.length-1)-b(this.e/h))*h,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},R.dividedBy=R.div=function(e,t){return r(this,new z(e,t),N,P)},R.dividedToIntegerBy=R.idiv=function(e,t){return r(this,new z(e,t),0,1)},R.exponentiatedBy=R.pow=function(e,t){var r,n,i,o,s,a,f,p,d=this;if((e=new z(e)).c&&!e.isInteger())throw Error(l+"Exponent not an integer: "+J(e));if(null!=t&&(t=new z(t)),s=e.e>14,!d.c||!d.c[0]||1==d.c[0]&&!d.e&&1==d.c.length||!e.c||!e.c[0])return p=new z(Math.pow(+J(d),s?2-E(e):+J(e))),t?p.mod(t):p;if(a=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new z(NaN);(n=!a&&d.isInteger()&&t.isInteger())&&(d=d.mod(t))}else{if(e.e>9&&(d.e>0||d.e<-1||(0==d.e?d.c[0]>1||s&&d.c[1]>=24e7:d.c[0]<8e13||s&&d.c[0]<=9999975e7)))return o=d.s<0&&E(e)?-0:0,d.e>-1&&(o=1/o),new z(a?1/o:o);F&&(o=c(F/h+2))}for(s?(r=new z(.5),a&&(e.s=1),f=E(e)):f=(i=Math.abs(+J(e)))%2,p=new z(T);;){if(f){if(!(p=p.times(d)).c)break;o?p.c.length>o&&(p.c.length=o):n&&(p=p.mod(t))}if(i){if(0===(i=u(i/2)))break;f=i%2}else if(Y(e=e.times(r),e.e+1,1),e.e>14)f=E(e);else{if(0==(i=+J(e)))break;f=i%2}d=d.times(d),o?d.c&&d.c.length>o&&(d.c.length=o):n&&(d=d.mod(t))}return n?p:(a&&(p=T.div(p)),t?p.mod(t):o?Y(p,F,P,void 0):p)},R.integerValue=function(e){var t=new z(this);return null==e?e=P:w(e,0,8),Y(t,t.e+1,e)},R.isEqualTo=R.eq=function(e,t){return 0===A(this,new z(e,t))},R.isFinite=function(){return!!this.c},R.isGreaterThan=R.gt=function(e,t){return A(this,new z(e,t))>0},R.isGreaterThanOrEqualTo=R.gte=function(e,t){return 1===(t=A(this,new z(e,t)))||0===t},R.isInteger=function(){return!!this.c&&b(this.e/h)>this.c.length-2},R.isLessThan=R.lt=function(e,t){return A(this,new z(e,t))<0},R.isLessThanOrEqualTo=R.lte=function(e,t){return-1===(t=A(this,new z(e,t)))||0===t},R.isNaN=function(){return!this.s},R.isNegative=function(){return this.s<0},R.isPositive=function(){return this.s>0},R.isZero=function(){return!!this.c&&0==this.c[0]},R.minus=function(e,t){var r,n,i,o,s=this,a=s.s;if(t=(e=new z(e,t)).s,!a||!t)return new z(NaN);if(a!=t)return e.s=-t,s.plus(e);var c=s.e/h,u=e.e/h,l=s.c,f=e.c;if(!c||!u){if(!l||!f)return l?(e.s=-t,e):new z(f?s:NaN);if(!l[0]||!f[0])return f[0]?(e.s=-t,e):new z(l[0]?s:3==P?-0:0)}if(c=b(c),u=b(u),l=l.slice(),a=c-u){for((o=a<0)?(a=-a,i=l):(u=c,i=f),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(n=(o=(a=l.length)<(t=f.length))?a:t,a=t=0;t0)for(;t--;l[r++]=0);for(t=p-1;n>a;){if(l[--n]=0;){for(r=0,d=k[i]%A,m=k[i]/A|0,o=i+(s=c);o>i;)r=((u=d*(u=E[--s]%A)+(a=m*u+(l=E[s]/A|0)*d)%A*A+y[o]+r)/v|0)+(a/A|0)+m*l,y[o--]=u%v;y[o]=r}return r?++n:y.splice(0,1),H(e,y,n)},R.negated=function(){var e=new z(this);return e.s=-e.s||null,e},R.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new z(e,t)).s,!i||!t)return new z(NaN);if(i!=t)return e.s=-t,n.minus(e);var o=n.e/h,s=e.e/h,a=n.c,c=e.c;if(!o||!s){if(!a||!c)return new z(i/0);if(!a[0]||!c[0])return c[0]?e:new z(a[0]?n:0*i)}if(o=b(o),s=b(s),a=a.slice(),i=o-s){for(i>0?(s=o,r=c):(i=-i,r=a),r.reverse();i--;r.push(0));r.reverse()}for((i=a.length)-(t=c.length)<0&&(r=c,c=a,a=r,t=i),i=0;t;)i=(a[--t]=a[t]+c[t]+i)/p|0,a[t]=p===a[t]?0:a[t]%p;return i&&(a=[i].concat(a),++s),H(e,a,s)},R.precision=R.sd=function(e,t){var r,n,i,o=this;if(null!=e&&e!==!!e)return w(e,1,y),null==t?t=P:w(t,0,8),Y(new z(o),e,t);if(!(r=o.c))return null;if(n=(i=r.length-1)*h+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},R.shiftedBy=function(e){return w(e,-d,d),this.times("1e"+e)},R.squareRoot=R.sqrt=function(){var e,t,n,i,o,s=this,a=s.c,c=s.s,u=s.e,l=N+4,f=new z("0.5");if(1!==c||!a||!a[0])return new z(!c||c<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(c=Math.sqrt(+J(s)))||c==1/0?(((t=v(a)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=b((u+1)/2)-(u<0||u%2),n=new z(t=c==1/0?"1e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new z(c+""),n.c[0])for((c=(u=n.e)+l)<3&&(c=0);;)if(o=n,n=f.times(o.plus(r(s,o,l,1))),v(o.c).slice(0,c)===(t=v(n.c)).slice(0,c)){if(n.e0&&m>0){for(o=m%a||a,f=d.substr(0,o);o0&&(f+=u+d.slice(o)),h&&(f="-"+f)}n=p?f+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?p.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):p):f}return(r.prefix||"")+n+(r.suffix||"")},R.toFraction=function(e){var t,n,i,o,s,a,c,u,f,p,d,g,y=this,b=y.c;if(null!=e&&(!(c=new z(e)).isInteger()&&(c.c||1!==c.s)||c.lt(T)))throw Error(l+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+J(c));if(!b)return new z(y);for(t=new z(T),f=n=new z(T),i=u=new z(T),g=v(b),s=t.e=g.length-y.e-1,t.c[0]=m[(a=s%h)<0?h+a:a],e=!e||c.comparedTo(t)>0?s>0?t:f:c,a=L,L=1/0,c=new z(g),u.c[0]=0;p=r(c,t,0,1),1!=(o=n.plus(p.times(i))).comparedTo(e);)n=i,i=o,f=u.plus(p.times(o=f)),u=o,t=c.minus(p.times(o=t)),c=o;return o=r(e.minus(n),i,0,1),u=u.plus(o.times(f)),n=n.plus(o.times(i)),u.s=f.s=y.s,d=r(f,i,s*=2,P).minus(y).abs().comparedTo(r(u,n,s,P).minus(y).abs())<1?[f,i]:[u,n],L=a,d},R.toNumber=function(){return+J(this)},R.toPrecision=function(e,t){return null!=e&&w(e,1,y),G(this,e,t,2)},R.toString=function(e){var t,r=this,i=r.s,o=r.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=M||o>=D?k(v(r.c),o):S(v(r.c),o,"0"):10===e?t=S(v((r=Y(new z(r),N+o+1,P)).c),r.e,"0"):(w(e,2,V.length,"Base"),t=n(S(v(r.c),o,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},R.valueOf=R.toJSON=function(){return J(this)},R._isBigNumber=!0,a&&(R[Symbol.toStringTag]="BigNumber",R[Symbol.for("nodejs.util.inspect.custom")]=R.valueOf),null!=t&&z.set(t),z}()).default=o.BigNumber=o,void 0===(n=function(){return o}.call(t,r,t,e))||(e.exports=n)}()},function(e,t,r){"use strict";(function(t){const n=r(15),i=r(37),o=r(78),s=r(52),a=r(67),c=r(718),u=r(1196).createResolver;const l={maxDepth:1/0,offset:void 0,length:void 0,fullPath:!1};e.exports=((e,r,p)=>{let h;p=Object.assign({},l,p);try{h=function(e){let r=e,n="/";if(t.isBuffer(e)&&(r=new c(e).toBaseEncodedString()),"string"==typeof e){0===e.indexOf("/ipfs/")&&(e=r=e.substring(6));const t=e.indexOf("/");t>0&&(r=e.substring(0,t),n=e.substring(t))}else c.isCID(r)&&(r=r.toBaseEncodedString());return{base:r=new c(r).toBaseEncodedString(),rest:f(n)}}(e)}catch(e){return o(e)}const d=function(e){return e.reduce((e,t)=>(e.length&&(e+="/"),e+t),"")}([h.base].concat(h.rest.slice(0,h.rest.length-1))).length,m=new c(h.base);return n(i([{cid:m,name:h.base,path:h.base,pathRest:h.rest,depth:0}]),u(r,p),s(Boolean),a(e=>({depth:e.depth,name:e.name,path:p.fullPath?e.path:g(e),size:e.size,cid:e.cid,content:e.content,type:e.type})));function g(e){if(!h.rest.length)return e.path;let t=e.path.substring(d);return"/"===t.charAt(0)&&(t=t.substring(1)),t||(t=h.rest[h.rest.length-1]||h.base),t}});const f=(e="")=>(e.trim().match(/([^\\^\/]|\\\/)+/g)||[]).filter(Boolean)}).call(this,r(0).Buffer)},function(e,t){var r=Array.isArray;e.exports=r},function(e,t,r){var n=r(3);if(r(61),r(43),r(111),r(45),r(62),r(120),r(76),r(32),r(210),r(95),r(8),void 0===i)var i=n.jsbn.BigInteger;var o=n.asn1,s=n.pki=n.pki||{};e.exports=s.pbe=n.pbe=n.pbe||{};var a=s.oids,c={name:"EncryptedPrivateKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},u={name:"PBES2Algorithms",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},l={name:"pkcs-12PbeParams",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"iterations"}]};function f(e,t){return e.start().update(t).digest().getBytes()}function p(e){var t;if(e){if(!(t=s.oids[o.derToOid(e)])){var r=new Error("Unsupported PRF OID.");throw r.oid=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}}else t="hmacWithSHA1";return h(t)}function h(e){var t=n.md;switch(e){case"hmacWithSHA224":t=n.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":e=e.substr(8).toLowerCase();break;default:var r=new Error("Unsupported PRF algorithm.");throw r.algorithm=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}if(!(t&&e in t))throw new Error("Unknown hash algorithm: "+e);return t[e].create()}s.encryptPrivateKeyInfo=function(e,t,r){(r=r||{}).saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||"aes128",r.prfAlgorithm=r.prfAlgorithm||"sha1";var i,c,u,l=n.random.getBytesSync(r.saltSize),f=r.count,p=o.integerToDer(f);if(0===r.algorithm.indexOf("aes")||"des"===r.algorithm){var d,m,g;switch(r.algorithm){case"aes128":i=16,d=16,m=a["aes128-CBC"],g=n.aes.createEncryptionCipher;break;case"aes192":i=24,d=16,m=a["aes192-CBC"],g=n.aes.createEncryptionCipher;break;case"aes256":i=32,d=16,m=a["aes256-CBC"],g=n.aes.createEncryptionCipher;break;case"des":i=8,d=8,m=a.desCBC,g=n.des.createEncryptionCipher;break;default:throw(E=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,E}var y="hmacWith"+r.prfAlgorithm.toUpperCase(),b=h(y),v=n.pkcs5.pbkdf2(t,l,f,i,b),A=n.random.getBytesSync(d);(k=g(v)).start(A),k.update(o.toDer(e)),k.finish(),u=k.output.getBytes();var w=function(e,t,r,i){var a=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,e),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,t.getBytes())]);"hmacWithSHA1"!==i&&a.value.push(o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,n.util.hexToBytes(r.toString(16))),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(s.oids[i]).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")]));return a}(l,p,i,y);c=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(a.pkcs5PBES2).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(a.pkcs5PBKDF2).getBytes()),w]),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(m).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,A)])])])}else{var E;if("3des"!==r.algorithm)throw(E=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,E;i=24;var k,S=new n.util.ByteBuffer(l);v=s.pbe.generatePkcs12Key(t,S,1,f,i),A=s.pbe.generatePkcs12Key(t,S,2,f,i);(k=n.des.createEncryptionCipher(v)).start(A),k.update(o.toDer(e)),k.finish(),u=k.output.getBytes(),c=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(a["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,l),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,p.getBytes())])])}return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[c,o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,u)])},s.decryptPrivateKeyInfo=function(e,t){var r=null,i={},a=[];if(!o.validate(e,c,i,a)){var u=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw u.errors=a,u}var l=o.derToOid(i.encryptionOid),f=s.pbe.getCipher(l,i.encryptionParams,t),p=n.util.createBuffer(i.encryptedData);return f.update(p),f.finish()&&(r=o.fromDer(f.output)),r},s.encryptedPrivateKeyToPem=function(e,t){var r={type:"ENCRYPTED PRIVATE KEY",body:o.toDer(e).getBytes()};return n.pem.encode(r,{maxline:t})},s.encryptedPrivateKeyFromPem=function(e){var t=n.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==t.type){var r=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return o.fromDer(t.body)},s.encryptRsaPrivateKey=function(e,t,r){if(!(r=r||{}).legacy){var i=s.wrapRsaPrivateKey(s.privateKeyToAsn1(e));return i=s.encryptPrivateKeyInfo(i,t,r),s.encryptedPrivateKeyToPem(i)}var a,c,u,l;switch(r.algorithm){case"aes128":a="AES-128-CBC",u=16,c=n.random.getBytesSync(16),l=n.aes.createEncryptionCipher;break;case"aes192":a="AES-192-CBC",u=24,c=n.random.getBytesSync(16),l=n.aes.createEncryptionCipher;break;case"aes256":a="AES-256-CBC",u=32,c=n.random.getBytesSync(16),l=n.aes.createEncryptionCipher;break;case"3des":a="DES-EDE3-CBC",u=24,c=n.random.getBytesSync(8),l=n.des.createEncryptionCipher;break;case"des":a="DES-CBC",u=8,c=n.random.getBytesSync(8),l=n.des.createEncryptionCipher;break;default:var f=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+r.algorithm+'".');throw f.algorithm=r.algorithm,f}var p=l(n.pbe.opensslDeriveBytes(t,c.substr(0,8),u));p.start(c),p.update(o.toDer(s.privateKeyToAsn1(e))),p.finish();var h={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:a,parameters:n.util.bytesToHex(c).toUpperCase()},body:p.output.getBytes()};return n.pem.encode(h)},s.decryptRsaPrivateKey=function(e,t){var r=null,i=n.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==i.type&&"PRIVATE KEY"!==i.type&&"RSA PRIVATE KEY"!==i.type)throw(u=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".')).headerType=u,u;if(i.procType&&"ENCRYPTED"===i.procType.type){var a,c;switch(i.dekInfo.algorithm){case"DES-CBC":a=8,c=n.des.createDecryptionCipher;break;case"DES-EDE3-CBC":a=24,c=n.des.createDecryptionCipher;break;case"AES-128-CBC":a=16,c=n.aes.createDecryptionCipher;break;case"AES-192-CBC":a=24,c=n.aes.createDecryptionCipher;break;case"AES-256-CBC":a=32,c=n.aes.createDecryptionCipher;break;case"RC2-40-CBC":a=5,c=function(e){return n.rc2.createDecryptionCipher(e,40)};break;case"RC2-64-CBC":a=8,c=function(e){return n.rc2.createDecryptionCipher(e,64)};break;case"RC2-128-CBC":a=16,c=function(e){return n.rc2.createDecryptionCipher(e,128)};break;default:var u;throw(u=new Error('Could not decrypt private key; unsupported encryption algorithm "'+i.dekInfo.algorithm+'".')).algorithm=i.dekInfo.algorithm,u}var l=n.util.hexToBytes(i.dekInfo.parameters),f=c(n.pbe.opensslDeriveBytes(t,l.substr(0,8),a));if(f.start(l),f.update(n.util.createBuffer(i.body)),!f.finish())return r;r=f.output.getBytes()}else r=i.body;return null!==(r="ENCRYPTED PRIVATE KEY"===i.type?s.decryptPrivateKeyInfo(o.fromDer(r),t):o.fromDer(r))&&(r=s.privateKeyFromAsn1(r)),r},s.pbe.generatePkcs12Key=function(e,t,r,i,o,s){var a,c;if(null==s){if(!("sha1"in n.md))throw new Error('"sha1" hash algorithm unavailable.');s=n.md.sha1.create()}var u=s.digestLength,l=s.blockLength,f=new n.util.ByteBuffer,p=new n.util.ByteBuffer;if(null!=e){for(c=0;c=0;c--)B>>=8,B+=_.at(c)+I.at(c),I.setAt(c,255&B);C.putBuffer(I)}A=C,f.putBuffer(k)}return f.truncate(f.length()-o),f},s.pbe.getCipher=function(e,t,r){switch(e){case s.oids.pkcs5PBES2:return s.pbe.getCipherForPBES2(e,t,r);case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case s.oids["pbewithSHAAnd40BitRC2-CBC"]:return s.pbe.getCipherForPKCS12PBE(e,t,r);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=e,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}},s.pbe.getCipherForPBES2=function(e,t,r){var i,a={},c=[];if(!o.validate(t,u,a,c))throw(i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=c,i;if((e=o.derToOid(a.kdfOid))!==s.oids.pkcs5PBKDF2)throw(i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.")).oid=e,i.supportedOids=["pkcs5PBKDF2"],i;if((e=o.derToOid(a.encOid))!==s.oids["aes128-CBC"]&&e!==s.oids["aes192-CBC"]&&e!==s.oids["aes256-CBC"]&&e!==s.oids["des-EDE3-CBC"]&&e!==s.oids.desCBC)throw(i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.")).oid=e,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i;var l,f,h=a.kdfSalt,d=n.util.createBuffer(a.kdfIterationCount);switch(d=d.getInt(d.length()<<3),s.oids[e]){case"aes128-CBC":l=16,f=n.aes.createDecryptionCipher;break;case"aes192-CBC":l=24,f=n.aes.createDecryptionCipher;break;case"aes256-CBC":l=32,f=n.aes.createDecryptionCipher;break;case"des-EDE3-CBC":l=24,f=n.des.createDecryptionCipher;break;case"desCBC":l=8,f=n.des.createDecryptionCipher}var m=p(a.prfOid),g=n.pkcs5.pbkdf2(r,h,d,l,m),y=a.encIv,b=f(g);return b.start(y),b},s.pbe.getCipherForPKCS12PBE=function(e,t,r){var i={},a=[];if(!o.validate(t,l,i,a))throw(m=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=a,m;var c,u,f,h=n.util.createBuffer(i.salt),d=n.util.createBuffer(i.iterations);switch(d=d.getInt(d.length()<<3),e){case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:c=24,u=8,f=n.des.startDecrypting;break;case s.oids["pbewithSHAAnd40BitRC2-CBC"]:c=5,u=8,f=function(e,t){var r=n.rc2.createDecryptionCipher(e,40);return r.start(t,null),r};break;default:var m;throw(m=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.")).oid=e,m}var g=p(i.prfOid),y=s.pbe.generatePkcs12Key(r,h,1,d,c,g);return g.start(),f(y,s.pbe.generatePkcs12Key(r,h,2,d,u,g))},s.pbe.opensslDeriveBytes=function(e,t,r,i){if(null==i){if(!("md5"in n.md))throw new Error('"md5" hash algorithm unavailable.');i=n.md.md5.create()}null===t&&(t="");for(var o=[f(i,e+t)],s=16,a=1;s4||!a||"sha1"===a))return"string"!=typeof a&&(a="sha1"),e=new t(e,"binary"),r=new t(r,"binary"),c?4===i.pbkdf2Sync.length?i.pbkdf2(e,r,o,s,function(e,t){if(e)return c(e);c(null,t.toString("binary"))}):i.pbkdf2(e,r,o,s,a,function(e,t){if(e)return c(e);c(null,t.toString("binary"))}):4===i.pbkdf2Sync.length?i.pbkdf2Sync(e,r,o,s).toString("binary"):i.pbkdf2Sync(e,r,o,s,a).toString("binary");if(null==a&&(a="sha1"),"string"==typeof a){if(!(a in n.md.algorithms))throw new Error("Unknown hash algorithm: "+a);a=n.md[a].create()}var u=a.digestLength;if(s>4294967295*u){var l=new Error("Derived key is too long.");if(c)return c(l);throw l}var f=Math.ceil(s/u),p=s-(f-1)*u,h=n.hmac.create();h.start(a,e);var d,m,g,y="";if(!c){for(var b=1;b<=f;++b){h.start(null,null),h.update(r),h.update(n.util.int32ToBytes(b)),d=g=h.digest().getBytes();for(var v=2;v<=o;++v)h.start(null,null),h.update(g),m=h.digest().getBytes(),d=n.util.xorBytes(d,m,u),g=m;y+=bf)return c(null,y);h.start(null,null),h.update(r),h.update(n.util.int32ToBytes(b)),d=g=h.digest().getBytes(),v=2,w()}function w(){if(v<=o)return h.start(null,null),h.update(g),m=h.digest().getBytes(),d=n.util.xorBytes(d,m,u),g=m,++v,n.util.setImmediate(w);y+=b2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(f.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(c.validity.notBefore=f[0],c.validity.notAfter=f[1],c.tbsCertificate=r.tbsCertificate,t){var p;if(c.md=null,c.signatureOid in s)switch(s[c.signatureOid]){case"sha1WithRSAEncryption":c.md=n.md.sha1.create();break;case"md5WithRSAEncryption":c.md=n.md.md5.create();break;case"sha256WithRSAEncryption":c.md=n.md.sha256.create();break;case"sha384WithRSAEncryption":c.md=n.md.sha384.create();break;case"sha512WithRSAEncryption":c.md=n.md.sha512.create();break;case"RSASSA-PSS":c.md=n.md.sha256.create()}if(null===c.md)throw(p=new Error("Could not compute certificate digest. Unknown signature OID.")).signatureOid=c.signatureOid,p;var m=i.toDer(c.tbsCertificate);c.md.update(m.getBytes())}var y=n.md.sha1.create();c.issuer.getField=function(e){return h(c.issuer,e)},c.issuer.addField=function(e){g([e]),c.issuer.attributes.push(e)},c.issuer.attributes=o.RDNAttributesAsArray(r.certIssuer,y),r.certIssuerUniqueId&&(c.issuer.uniqueId=r.certIssuerUniqueId),c.issuer.hash=y.digest().toHex();var b=n.md.sha1.create();return c.subject.getField=function(e){return h(c.subject,e)},c.subject.addField=function(e){g([e]),c.subject.attributes.push(e)},c.subject.attributes=o.RDNAttributesAsArray(r.certSubject,b),r.certSubjectUniqueId&&(c.subject.uniqueId=r.certSubjectUniqueId),c.subject.hash=b.digest().toHex(),r.certExtensions?c.extensions=o.certificateExtensionsFromAsn1(r.certExtensions):c.extensions=[],c.publicKey=o.publicKeyFromAsn1(r.subjectPublicKeyInfo),c},o.certificateExtensionsFromAsn1=function(e){for(var t=[],r=0;r1&&(r=c.value.charCodeAt(1),o=c.value.length>2?c.value.charCodeAt(2):0),t.digitalSignature=128==(128&r),t.nonRepudiation=64==(64&r),t.keyEncipherment=32==(32&r),t.dataEncipherment=16==(16&r),t.keyAgreement=8==(8&r),t.keyCertSign=4==(4&r),t.cRLSign=2==(2&r),t.encipherOnly=1==(1&r),t.decipherOnly=128==(128&o)}else if("basicConstraints"===t.name){(c=i.fromDer(t.value)).value.length>0&&c.value[0].type===i.Type.BOOLEAN?t.cA=0!==c.value[0].value.charCodeAt(0):t.cA=!1;var a=null;c.value.length>0&&c.value[0].type===i.Type.INTEGER?a=c.value[0].value:c.value.length>1&&(a=c.value[1].value),null!==a&&(t.pathLenConstraint=i.derToInteger(a))}else if("extKeyUsage"===t.name)for(var c=i.fromDer(t.value),u=0;u1&&(r=c.value.charCodeAt(1)),t.client=128==(128&r),t.server=64==(64&r),t.email=32==(32&r),t.objsign=16==(16&r),t.reserved=8==(8&r),t.sslCA=4==(4&r),t.emailCA=2==(2&r),t.objCA=1==(1&r)}else if("subjectAltName"===t.name||"issuerAltName"===t.name){var f;t.altNames=[];c=i.fromDer(t.value);for(var p=0;p0&&t.value.push(o.certificateExtensionsToAsn1(e.extensions)),t},o.getCertificationRequestInfo=function(e){return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes()),m(e.subject),o.publicKeyToAsn1(e.publicKey),v(e)])},o.distinguishedNameToAsn1=function(e){return m(e)},o.certificateToAsn1=function(e){var t=e.tbsCertificate||o.getTBSCertificate(e);return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[t,i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.signatureOid).getBytes()),b(e.signatureOid,e.signatureParameters)]),i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},o.certificateExtensionsToAsn1=function(e){var t=i.create(i.Class.CONTEXT_SPECIFIC,3,!0,[]),r=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);t.value.push(r);for(var n=0;nl.validity.notAfter)&&(c={message:"Certificate is not valid yet or has expired.",error:o.certificateError.certificate_expired,notBefore:l.validity.notBefore,notAfter:l.validity.notAfter,now:s}),null===c){if(null===(f=t[0]||e.getIssuer(l))&&l.isIssuer(l)&&(p=!0,f=l),f){var h=f;n.util.isArray(h)||(h=[h]);for(var d=!1;!d&&h.length>0;){f=h.shift();try{d=f.verify(l)}catch(e){}}d||(c={message:"Certificate signature is invalid.",error:o.certificateError.bad_certificate})}null!==c||f&&!p||e.hasCertificate(l)||(c={message:"Certificate is not trusted.",error:o.certificateError.unknown_ca})}if(null===c&&f&&!l.isIssuer(f)&&(c={message:"Certificate issuer is invalid.",error:o.certificateError.bad_certificate}),null===c)for(var m={keyUsage:!0,basicConstraints:!0},g=0;null===c&&gb.pathLenConstraint&&(c={message:"Certificate basicConstraints pathLenConstraint violated.",error:o.certificateError.bad_certificate})}var A=null===c||c.error,w=r?r(A,u,i):A;if(!0!==w)throw!0===A&&(c={message:"The application rejected the certificate.",error:o.certificateError.bad_certificate}),(w||0===w)&&("object"!=typeof w||n.util.isArray(w)?"string"==typeof w&&(c.error=w):(w.message&&(c.message=w.message),w.error&&(c.error=w.error))),c;c=null,a=!1,++u}while(t.length>0);return!0}},function(e,t,r){"use strict";var n=r(91);e.exports=function(e,t,r){r||(r=t,t=null);var i=n(function(r){t=e(t,r)},function(e){r(e,t)});return 2===arguments.length?function(e){e(null,function(n,o){if(n)return r(!0===n?null:n);t=o,i(e)})}:i}},function(e,t,r){(function(n){r(15);var i=r(267);function o(e){e.destroy?e.destroy():console.error("warning, stream-to-pull-stream: \nthe wrapped node-stream does not implement `destroy`, \nthis may cause resource leaks.")}function s(e,t,r){var s,a,c=!1;function u(){a||(a=!0,r&&r(!0===s?null:s))}function l(){c||(c=!0,p(),s?u():e(s=!0,u))}function f(t){p(),s||e(s=t,u)}function p(){t.on("finish",l),t.removeListener("close",l),t.removeListener("error",f)}t.on("close",l),t.on("finish",l),t.on("error",f),n.nextTick(function(){i(function(r){e(null,function(e,n){if(s=s||e,!0===e)return t._isStdio?u():t.end();if(s=s||e)return o(t),u();t._isStdio?t.write(n,function(){r()}):!1===t.write(n)?t.once("drain",r):r()})})})}function a(e){var t,r=[],n=[],i=!1;function s(){for(;(r.length||t)&&n.length;)n.shift()(r.length?null:t,r.shift());!r.length&&i&&(i=!1,e.resume())}return e.on("data",function(t){r.push(t),s(),r.length&&e.pause&&(i=!0,e.pause())}),e.on("end",function(){t=!0,s()}),e.on("close",function(){t=!0,s()}),e.on("error",function(e){t=e,s()}),function(r,i){if(!i)throw new Error("*must* provide cb");if(r){function a(){for(;n.length;)n.shift()(r);i(r)}if(t)return a();e.once("close",a),o(e)}else n.push(i),s()}}var c=a,u=function(e,t){return function(r){return s(r,e,t)}},l=function(e){return a(e)};(t=e.exports=function(e,t){return e.writable&&e.write?e.readable?function(r){return s(r,e,t),a(e)}:u(e,t):l(e)}).sink=u,t.source=l,t.read=c,t.read1=a,t.read2=function(e){var t,r=!1,n=!1;function i(){var r=e.read();if(null!==r&&t){var n=t;t=null,n(null,r)}}return e.on("readable",function(){n=!0,t&&i()}).on("end",function(){r=!0,t&&t(r)}).on("error",function(e){r=e,t&&t(r)}),function(e,o){t=o,r?o(r):n&&i()}},t.duplex=function(e,t){return{source:l(e),sink:u(e,t)}},t.transform=function(e){return function(t){var r=l(e);return u(e)(t),r}}}).call(this,r(4))},function(e,t,r){"use strict";(function(t){const n=r(22),i=r(46),o=r(24),s=r(25),a=r(165).Record,c=s(r(1021)),u=c.Message.MessageType,l=c.Message.ConnectionType;class f{constructor(e,r,i){r&&n(t.isBuffer(r)),this.type=e,this.key=r,this._clusterLevelRaw=i,this.closerPeers=[],this.providerPeers=[],this.record=null}get clusterLevel(){const e=this._clusterLevelRaw-1;return e<0?0:e}set clusterLevel(e){this._clusterLevelRaw=e}serialize(){const e={key:this.key,type:this.type,clusterLevelRaw:this._clusterLevelRaw,closerPeers:this.closerPeers.map(p),providerPeers:this.providerPeers.map(p)};return this.record&&(t.isBuffer(this.record)?e.record=this.record:e.record=this.record.serialize()),c.Message.encode(e)}static deserialize(e){const t=c.Message.decode(e),r=new f(t.type,t.key,t.clusterLevelRaw);return r.closerPeers=t.closerPeers.map(h),r.providerPeers=t.providerPeers.map(h),t.record&&(r.record=a.deserialize(t.record)),r}}function p(e){const t={id:e.id.id,addrs:e.multiaddrs.toArray().map(e=>e.buffer)};return e.isConnected()?t.connection=l.CONNECTED:t.connection=l.NOT_CONNECTED,t}function h(e){const t=new i(new o(e.id));return e.addrs.forEach(e=>t.multiaddrs.add(e)),t}f.TYPES=u,f.CONNECTION_TYPES=l,e.exports=f}).call(this,r(0).Buffer)},function(e,t){t.BITS=32,t.GROUPS=4,t.RE_ADDRESS=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g,t.RE_SUBNET_STRING=/\/\d{1,2}$/},function(e,t){t.BITS=128,t.GROUPS=8,t.SCOPES={0:"Reserved",1:"Interface local",2:"Link local",4:"Admin local",5:"Site local",8:"Organization local",14:"Global",15:"Reserved"},t.TYPES={"ff01::1/128":"Multicast (All nodes on this interface)","ff01::2/128":"Multicast (All routers on this interface)","ff02::1/128":"Multicast (All nodes on this link)","ff02::2/128":"Multicast (All routers on this link)","ff05::2/128":"Multicast (All routers in this site)","ff02::5/128":"Multicast (OSPFv3 AllSPF routers)","ff02::6/128":"Multicast (OSPFv3 AllDR routers)","ff02::9/128":"Multicast (RIP routers)","ff02::a/128":"Multicast (EIGRP routers)","ff02::d/128":"Multicast (PIM routers)","ff02::16/128":"Multicast (MLDv2 reports)","ff01::fb/128":"Multicast (mDNSv6)","ff02::fb/128":"Multicast (mDNSv6)","ff05::fb/128":"Multicast (mDNSv6)","ff02::1:2/128":"Multicast (All DHCP servers and relay agents on this link)","ff05::1:2/128":"Multicast (All DHCP servers and relay agents in this site)","ff02::1:3/128":"Multicast (All DHCP servers on this link)","ff05::1:3/128":"Multicast (All DHCP servers in this site)","::/128":"Unspecified","::1/128":"Loopback","ff00::/8":"Multicast","fe80::/10":"Link-local unicast"},t.RE_BAD_CHARACTERS=/([^0-9a-f:\/%])/gi,t.RE_BAD_ADDRESS=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi,t.RE_SUBNET_STRING=/\/\d{1,3}(?=%|$)/,t.RE_ZONE_STRING=/%.*$/,t.RE_URL=new RegExp(/^\[{0,1}([0-9a-f:]+)\]{0,1}/),t.RE_URL_WITH_PORT=new RegExp(/\[([0-9a-f:]+)\]:([0-9]{1,5})/)},function(e,t,r){"use strict";const n=r(73);function i(e){if("number"==typeof e){if(i.codes[e])return i.codes[e];throw new Error("no protocol with code: "+e)}if("string"==typeof e||e instanceof String){if(i.names[e])return i.names[e];throw new Error("no protocol with name: "+e)}throw new Error("invalid protocol id type: "+e)}function o(e,t,r,n){return{code:e,size:t,name:r,resolvable:Boolean(n)}}i.lengthPrefixedVarSize=-1,i.V=-1,i.table=[[4,32,"ip4"],[6,16,"tcp"],[17,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[54,-1,"dns4","resolvable"],[55,-1,"dns6","resolvable"],[56,-1,"dnsaddr","resolvable"],[132,16,"sctp"],[302,0,"utp"],[421,i.lengthPrefixedVarSize,"ipfs"],[480,0,"http"],[443,0,"https"],[460,0,"quic"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[290,0,"p2p-circuit"]],i.names={},i.codes={},n(i.table,function(e){const t=o.apply(null,e);i.codes[t.code]=t,i.names[t.name]=t}),i.object=o,e.exports=i},function(e,t,r){e.exports=r(360)},function(e,t,r){(function(t,n){var i,o=r(363),s=r(185);function a(e,t){return"function"!=typeof t?e:e.then(function(e){i(function(){t(null,e)})},function(e){i(function(){t(e)})})}function c(e){return a(this,e)}function u(e){if(e&&s(e)){e.nodeify=c;var t=e.then;return e.then=function(){return u(t.apply(this,arguments))},e}"function"==typeof e?e.prototype.nodeify=c:o.prototype.nodeify=c}function l(e){if(!(this instanceof l))return new l(e);o.call(this,e),u(this)}i="function"==typeof t?t:"object"==typeof n&&n&&n.nextTick?n.nextTick:function(e){setTimeout(e,0)},e.exports=a,a.extend=u,a.Promise=l,l.prototype=Object.create(o.prototype),l.prototype.constructor=l}).call(this,r(31).setImmediate,r(4))},function(e,t,r){var n=r(365),i=r(366);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";(function(n){const i=r(72),o=r(25)(r(377)),s=r(187),a=r(57),c=r(102),u=r(29),l=r(9);function f(e,t){let r;!c.isDAGNode(e)&&e.links&&(e.links=e.links.map(e=>a.isDAGLink(e)?e:a.util.createDagLinkFromB58EncodedHash(e)));try{r=o.PBNode.encode(function(e){const t={};e.data&&e.data.length>0?t.Data=e.data:t.Data=null;e.links&&e.links.length>0?t.Links=e.links.map(e=>({Hash:e.multihash,Name:e.name,Tsize:e.size})):t.Links=null;return t}(e))}catch(e){return t(e)}t(null,r)}(t=e.exports).serialize=f,t.deserialize=function(e,t){const r=o.PBNode.decode(e),i=r.Links.map(e=>new a(e.Name,e.Tsize,e.Hash)),s=null==r.Data?n.alloc(0):n.from(r.Data);c.create(s,i,t)},t.cid=function(e,t,r){"function"==typeof t&&(r=t,t={});const n=(t=t||{}).hashAlg||s.defaultHashAlg;let o=t.version;void 0===o&&(o="sha2-256"===n?0:1),l([t=>f(e,t),(e,t)=>u(e,n,t),(e,t)=>t(null,new i(o,s.multicodec,e))],r)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";t.defined=function(e){return null!=e&&("number"!=typeof e||!isNaN(e))}},function(e,t,r){"use strict";(function(e,n){Object.defineProperty(t,"__esModule",{value:!0}),t.hasNextTick=t.hasSetImmediate=void 0,t.fallback=l,t.wrap=f;var i,o=r(74),s=(i=o)&&i.__esModule?i:{default:i};var a,c=t.hasSetImmediate="function"==typeof e&&e,u=t.hasNextTick="object"==typeof n&&"function"==typeof n.nextTick;function l(e){setTimeout(e,0)}function f(e){return function(t){var r=(0,s.default)(arguments,1);e(function(){t.apply(null,r)})}}a=c?e:u?n.nextTick:l,t.default=f(a)}).call(this,r(31).setImmediate,r(4))},function(e,t,r){"use strict";e.exports=function(e,t){return e.then(e=>{t(null,e)},e=>{t(e)})}},function(e,t,r){"use strict";e.exports=(()=>{if("undefined"!=typeof self&&(r(191)(self),self.crypto))return self.crypto;throw new Error("Please use an environment with crypto support")})},function(e,t,r){(t=e.exports=r(197)).Stream=t,t.Readable=t,t.Writable=r(137),t.Duplex=r(59),t.Transform=r(200),t.PassThrough=r(402)},function(e,t,r){"use strict";(function(t,n,i){var o=r(109);function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=b;var a,c=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?n:o.nextTick;b.WritableState=y;var u=r(87);u.inherits=r(56);var l={deprecate:r(401)},f=r(198),p=r(110).Buffer,h=i.Uint8Array||function(){};var d,m=r(199);function g(){}function y(e,t){a=a||r(59),e=e||{};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,u=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(u||0===u)?u:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===e.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(o.nextTick(i,n),o.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),S(e,t))}(e,r,n,t,i);else{var s=E(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||w(e,r),n?c(A,e,r,s,i):A(e,r,s,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function b(e){if(a=a||r(59),!(d.call(b,this)||this instanceof a))return new b(e);this._writableState=new y(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function v(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function A(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),S(e,t)}function w(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,c=!0;r;)i[a]=r,r.isBuf||(c=!1),r=r.next,a+=1;i.allBuffers=c,v(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,l=r.encoding,f=r.callback;if(v(e,t,!1,t.objectMode?1:u.length,u,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),S(e,t)})}function S(e,t){var r=E(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(k,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(b,f),y.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(y.prototype,"buffer",{get:l.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===b&&(e&&e._writableState instanceof y)}})):d=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,r){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=e,p.isBuffer(n)||n instanceof h);return a&&!p.isBuffer(e)&&(e=function(e){return p.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=g),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),o.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),o.nextTick(n,s),i=!1),i}(this,i,e,r))&&(i.pendingcb++,s=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=p.from(t,r));return t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var c=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,S(e,t),r&&(t.finished?o.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=m.destroy,b.prototype._undestroy=m.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(4),r(31).setImmediate,r(12))},function(e,t,r){"use strict";var n=r(7),i=r(203),o=r(6).Buffer,s=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function c(e,t){return e<>>32-t}function u(e,t,r,n,i,o,s){return c(e+(t&r|~t&n)+i+o|0,s)+t|0}function l(e,t,r,n,i,o,s){return c(e+(t&n|r&~n)+i+o|0,s)+t|0}function f(e,t,r,n,i,o,s){return c(e+(t^r^n)+i+o|0,s)+t|0}function p(e,t,r,n,i,o,s){return c(e+(r^(t|~n))+i+o|0,s)+t|0}n(a,i),a.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=u(r,n,i,o,e[0],3614090360,7),o=u(o,r,n,i,e[1],3905402710,12),i=u(i,o,r,n,e[2],606105819,17),n=u(n,i,o,r,e[3],3250441966,22),r=u(r,n,i,o,e[4],4118548399,7),o=u(o,r,n,i,e[5],1200080426,12),i=u(i,o,r,n,e[6],2821735955,17),n=u(n,i,o,r,e[7],4249261313,22),r=u(r,n,i,o,e[8],1770035416,7),o=u(o,r,n,i,e[9],2336552879,12),i=u(i,o,r,n,e[10],4294925233,17),n=u(n,i,o,r,e[11],2304563134,22),r=u(r,n,i,o,e[12],1804603682,7),o=u(o,r,n,i,e[13],4254626195,12),i=u(i,o,r,n,e[14],2792965006,17),r=l(r,n=u(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=l(o,r,n,i,e[6],3225465664,9),i=l(i,o,r,n,e[11],643717713,14),n=l(n,i,o,r,e[0],3921069994,20),r=l(r,n,i,o,e[5],3593408605,5),o=l(o,r,n,i,e[10],38016083,9),i=l(i,o,r,n,e[15],3634488961,14),n=l(n,i,o,r,e[4],3889429448,20),r=l(r,n,i,o,e[9],568446438,5),o=l(o,r,n,i,e[14],3275163606,9),i=l(i,o,r,n,e[3],4107603335,14),n=l(n,i,o,r,e[8],1163531501,20),r=l(r,n,i,o,e[13],2850285829,5),o=l(o,r,n,i,e[2],4243563512,9),i=l(i,o,r,n,e[7],1735328473,14),r=f(r,n=l(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=f(o,r,n,i,e[8],2272392833,11),i=f(i,o,r,n,e[11],1839030562,16),n=f(n,i,o,r,e[14],4259657740,23),r=f(r,n,i,o,e[1],2763975236,4),o=f(o,r,n,i,e[4],1272893353,11),i=f(i,o,r,n,e[7],4139469664,16),n=f(n,i,o,r,e[10],3200236656,23),r=f(r,n,i,o,e[13],681279174,4),o=f(o,r,n,i,e[0],3936430074,11),i=f(i,o,r,n,e[3],3572445317,16),n=f(n,i,o,r,e[6],76029189,23),r=f(r,n,i,o,e[9],3654602809,4),o=f(o,r,n,i,e[12],3873151461,11),i=f(i,o,r,n,e[15],530742520,16),r=p(r,n=f(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=p(o,r,n,i,e[7],1126891415,10),i=p(i,o,r,n,e[14],2878612391,15),n=p(n,i,o,r,e[5],4237533241,21),r=p(r,n,i,o,e[12],1700485571,6),o=p(o,r,n,i,e[3],2399980690,10),i=p(i,o,r,n,e[10],4293915773,15),n=p(n,i,o,r,e[1],2240044497,21),r=p(r,n,i,o,e[8],1873313359,6),o=p(o,r,n,i,e[15],4264355552,10),i=p(i,o,r,n,e[6],2734768916,15),n=p(n,i,o,r,e[13],1309151649,21),r=p(r,n,i,o,e[4],4149444226,6),o=p(o,r,n,i,e[11],3174756917,10),i=p(i,o,r,n,e[2],718787259,15),n=p(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=a},function(e,t,r){"use strict";e.exports="enum KeyType {\n RSA = 0;\n Ed25519 = 1;\n Secp256k1 = 2;\n}\nmessage PublicKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}\nmessage PrivateKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}"},function(e,t,r){var n=r(3);r(8),e.exports=n.cipher=n.cipher||{},n.cipher.algorithms=n.cipher.algorithms||{},n.cipher.createCipher=function(e,t){var r=e;if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e);return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!1})},n.cipher.createDecipher=function(e,t){var r=e;if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e);return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!0})},n.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),n.cipher.algorithms[e]=t},n.cipher.getAlgorithm=function(e){return(e=e.toUpperCase())in n.cipher.algorithms?n.cipher.algorithms[e]:null};var i=n.cipher.BlockCipher=function(e){this.algorithm=e.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=e.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=e.decrypt,this.algorithm.initialize(e)};i.prototype.start=function(e){e=e||{};var t={};for(var r in e)t[r]=e[r];t.decrypt=this._decrypt,this._finish=!1,this._input=n.util.createBuffer(),this.output=e.output||n.util.createBuffer(),this.mode.start(t)},i.prototype.update=function(e){for(e&&this._input.putBuffer(e);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},i.prototype.finish=function(e){!e||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(t){return e(this.blockSize,t,!1)},this.mode.unpad=function(t){return e(this.blockSize,t,!0)});var t={};return t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t))&&(this._finish=!0,this.update(),!(this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t))&&!(this.mode.afterFinish&&!this.mode.afterFinish(this.output,t)))}},function(e,t,r){var n=r(3);r(45),r(8);var i=e.exports=n.md5=n.md5||{};n.md.md5=n.md.algorithms.md5=i,i.create=function(){u||function(){o=String.fromCharCode(128),o+=n.util.fillString(String.fromCharCode(0),64),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],a=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],c=new Array(64);for(var e=0;e<64;++e)c[e]=Math.floor(4294967296*Math.abs(Math.sin(e+1)));u=!0}();var e=null,t=n.util.createBuffer(),r=new Array(16),i={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,o=0;o>>0,a>>>0];for(var c=i.fullMessageLength.length-1;c>=0;--c)i.fullMessageLength[c]+=a[1],a[1]=a[0]+(i.fullMessageLength[c]/4294967296>>>0),i.fullMessageLength[c]=i.fullMessageLength[c]>>>0,a[0]=a[1]/4294967296>>>0;return t.putBytes(o),l(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(t.bytes());var a=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(o.substr(0,i.blockLength-a));for(var c,u=0,f=i.fullMessageLength.length-1;f>=0;--f)u=(c=8*i.fullMessageLength[f]+u)/4294967296>>>0,s.putInt32Le(c>>>0);var p={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3};l(p,r,s);var h=n.util.createBuffer();return h.putInt32Le(p.h0),h.putInt32Le(p.h1),h.putInt32Le(p.h2),h.putInt32Le(p.h3),h},i};var o=null,s=null,a=null,c=null,u=!1;function l(e,t,r){for(var n,i,o,u,l,f,p,h=r.length();h>=64;){for(i=e.h0,o=e.h1,u=e.h2,l=e.h3,p=0;p<16;++p)t[p]=r.getInt32Le(),n=i+(l^o&(u^l))+c[p]+t[p],i=l,l=u,u=o,o+=n<<(f=a[p])|n>>>32-f;for(;p<32;++p)n=i+(u^l&(o^u))+c[p]+t[s[p]],i=l,l=u,u=o,o+=n<<(f=a[p])|n>>>32-f;for(;p<48;++p)n=i+(o^u^l)+c[p]+t[s[p]],i=l,l=u,u=o,o+=n<<(f=a[p])|n>>>32-f;for(;p<64;++p)n=i+(u^(o|~l))+c[p]+t[s[p]],i=l,l=u,u=o,o+=n<<(f=a[p])|n>>>32-f;e.h0=e.h0+i|0,e.h1=e.h1+o|0,e.h2=e.h2+u|0,e.h3=e.h3+l|0,h-=64}}},function(e,t,r){var n=r(3);r(32),r(8),(e.exports=n.pss=n.pss||{}).create=function(e){3===arguments.length&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var t,r=e.md,i=e.mgf,o=r.digestLength,s=e.salt||null;if("string"==typeof s&&(s=n.util.createBuffer(s)),"saltLength"in e)t=e.saltLength;else{if(null===s)throw new Error("Salt length not specified or specific salt not given.");t=s.length()}if(null!==s&&s.length()!==t)throw new Error("Given salt length does not match length of given salt.");var a=e.prng||n.random,c={encode:function(e,c){var u,l,f=c-1,p=Math.ceil(f/8),h=e.digest().getBytes();if(p>8*p-f&255;return(A=String.fromCharCode(A.charCodeAt(0)&~w)+A.substr(1))+m+String.fromCharCode(188)},verify:function(e,s,a){var c,u=a-1,l=Math.ceil(u/8);if(s=s.substr(-l),l>8*l-u&255;if(0!=(p.charCodeAt(0)&d))throw new Error("Bits beyond keysize not zero as expected.");var m=i.generate(h,f),g="";for(c=0;c{t(null,e)},e=>{t(e)})}},function(e,t,r){"use strict";e.exports=(()=>{if("undefined"!=typeof self&&(r(191)(self),self.crypto))return self.crypto;throw new Error("Please use an environment with crypto support")})},function(e,t,r){"use strict";e.exports="enum KeyType {\n RSA = 0;\n Ed25519 = 1;\n Secp256k1 = 2;\n}\nmessage PublicKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}\nmessage PrivateKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}"},function(e,t){e.exports=function(){var e,t,r,n,i=function(i,o){e?e(i,o):i?(n=i,r=o):t=o};return i.resolve=function(i){if(e)throw new Error("already resolved");if(!(e=i))throw new Error("no read cannot resolve!"+e);t&&i(null,t),r&&i(n,r)},i.abort=function(e){i.resolve(function(t,r){r(e||!0)})},i}},function(e,t,r){"use strict";(function(n){const i=r(279),o=r(22),s=r(19);(t=e.exports=s(class{constructor(e,t,r){o(r,"A link requires a cid to point to"),this._name=e||"",this._nameBuf=null,this._size=t,this._cid=new i(r)}toString(){return`DAGLink <${this._cid.toBaseEncodedString()} - name: "${this.name}", size: ${this.size}>`}toJSON(){return this._json||(this._json=Object.freeze({name:this.name,size:this.size,cid:this._cid.toBaseEncodedString()})),Object.assign({},this._json)}get name(){return this._name}get nameAsBuffer(){return null!==this._nameBuf?this._nameBuf:(this._nameBuf=n.from(this._name),this._nameBuf)}set name(e){throw new Error("Can't set property: 'name' is immutable")}get size(){return this._size}set size(e){throw new Error("Can't set property: 'size' is immutable")}get cid(){return this._cid}set cid(e){throw new Error("Can't set property: 'cid' is immutable")}},{className:"DAGLink",symbolName:"@ipld/js-ipld-dag-pb/daglink"})).create=r(796),t.util=r(797)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(5),i=(e,t,r)=>{let n=0;const i=r.length;for(;n{const r=["bitswap"];t&&r.push(t),e&&r.push(`${e.toB58String().slice(0,8)}`);const i=n(r.join(":"));return i.error=n(r.concat(["error"]).join(":")),i},includesWith:i,uniqWith:(e,t)=>{let r=0;const n=t.length,o=[];let s;for(;rt.reduce((t,r)=>{const n=e(r);return t[n]?t[n].push(r):t[n]=[r],t},{}),pullAllWith:(e,t,r)=>t.filter(t=>!i(e,t,r)),sortBy:(e,t)=>Array.prototype.slice.call(t,0).sort((t,r)=>{const n=e(t),i=e(r);return ni?1:0})}},function(e,t,r){var n=r(653),i=r(83),o=r(296),s=r(297);e.exports=function(e,t){var r,a;"function"==typeof e&&(t=e,e={}),r=t||function(){},a=0,t=function(e,t,n){a++||r(e,t,n)};var c=n(e&&e.timeout||5e3),u=i(function(e){e&&t(e)}),l=s();return{handshake:{read:c.read,abort:function(e){u.end(e),c.abort(e,function(e){}),t(e)},write:u.push,rest:function(){return u.end(),{source:c.read(),sink:l.sink}}},sink:c,source:o([u,l.source])}}},function(e,t,r){"use strict";const n=t.second=1e3,i=t.minute=60*n,o=t.hour=60*i;t.MAX_RECORD_AGE=36*o,t.PROTOCOL_DHT="/ipfs/kad/1.0.0",t.PROVIDERS_KEY_PREFIX="/providers/",t.PROVIDERS_LRU_CACHE_SIZE=256,t.PROVIDERS_VALIDITY=24*o,t.PROVIDERS_CLEANUP_INTERVAL=o,t.READ_MESSAGE_TIMEOUT=i,t.GET_MANY_RECORD_COUNT=16,t.K=20,t.ALPHA=3,t.DISJOINT_PATHS=10,t.maxMessageSize=2<<22,t.defaultRandomWalk={enabled:!0,queriesPerPeriod:1,interval:5*i,timeout:10*n}},function(e,t,r){"use strict";(function(t){const n=r(13),i=r(39),o=r(47),s=r(42),a=r(1212);class c{constructor(r,s,a){if(e.exports.isCID(r)){let e=r;return this.version=e.version,this.codec=e.codec,void(this.multihash=t.from(e.multihash))}if("string"==typeof r)if(i.isEncoded(r)){const e=i.decode(r);r=parseInt(e.slice(0,1).toString("hex"),16),s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=n.fromB58String(r),r=0;else if(t.isBuffer(r)){const e=r.slice(0,1),t=parseInt(e.toString("hex"),16);if(0===t||1===t){const e=r;r=t,s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=r,r=0}this.codec=s,this.version=r,this.multihash=a,c.validateCID(this)}get buffer(){let e=this._buffer;if(!e){if(0===this.version)e=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");e=t.concat([t.from("01","hex"),o.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:e})}return e}get prefix(){return t.concat([t.from(`0${this.version}`,"hex"),o.getCodeVarint(this.codec),n.prefix(this.multihash)])}toV0(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");const{name:e,length:t}=n.decode(this.multihash);if("sha2-256"!==e)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==t)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new u(0,this.codec,this.multihash)}toV1(){return new u(1,this.codec,this.multihash)}toBaseEncodedString(e){switch(e=e||"base58btc",this.version){case 0:if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");return n.toB58String(this.multihash);case 1:return i.encode(e,this.buffer).toString();default:throw new Error("Unsupported version")}}toString(e){return this.toBaseEncodedString(e)}toJSON(){return{codec:this.codec,version:this.version,hash:this.multihash}}equals(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}static validateCID(e){let t=a.checkCIDComponents(e);if(t)throw new Error(t)}}const u=r(19)(c,{className:"CID",symbolName:"@ipld/js-cid/CID"});u.codecs=s,e.exports=u}).call(this,r(0).Buffer)},function(e,t,r){"use strict";var n=t,i=r(0).Buffer,o=r(261);n.toBuffer=function(e,t,r){var n;if(r=~~r,this.isV4Format(e))n=t||new i(r+4),e.split(/\./g).map(function(e){n[r++]=255&parseInt(e,10)});else if(this.isV6Format(e)){var o,s=e.split(":",8);for(o=0;o0;o--)c.push("0");s.splice.apply(s,c)}for(n=t||new i(r+16),o=0;o>8&255,n[r++]=255&u}}if(!n)throw Error("Invalid ip address: "+e);return n},n.toString=function(e,t,r){t=~~t;var n=[];if(4===(r=r||e.length-t)){for(var i=0;i32?"ipv6":c(t))&&(r=16);for(var o=new i(r),s=0,a=o.length;s>u)}return n.toString(o)},n.mask=function(e,t){e=n.toBuffer(e),t=n.toBuffer(t);var r=new i(Math.max(e.length,t.length)),o=0;if(e.length===t.length)for(o=0;oe.length&&(i=t,o=e);var s=i.length-o.length;for(r=s;r>>0},n.fromLong=function(e){return(e>>>24)+"."+(e>>16&255)+"."+(e>>8&255)+"."+(255&e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){if(null!==e){var t=e;e=null,t.apply(this,arguments)}}},e.exports=t.default},function(e,t,r){var n=r(391),i=r(408),o=r(195);t.createCipher=t.Cipher=n.createCipher,t.createCipheriv=t.Cipheriv=n.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(o)}},function(e,t,r){var n=r(3);r(45),r(8);var i=e.exports=n.sha512=n.sha512||{};n.md.sha512=n.md.algorithms.sha512=i;var o=n.sha384=n.sha512.sha384=n.sha512.sha384||{};o.create=function(){return i.create("SHA-384")},n.md.sha384=n.md.algorithms.sha384=o,n.sha512.sha256=n.sha512.sha256||{create:function(){return i.create("SHA-512/256")}},n.md["sha512/256"]=n.md.algorithms["sha512/256"]=n.sha512.sha256,n.sha512.sha224=n.sha512.sha224||{create:function(){return i.create("SHA-512/224")}},n.md["sha512/224"]=n.md.algorithms["sha512/224"]=n.sha512.sha224,i.create=function(e){if(a||(s=String.fromCharCode(128),s+=n.util.fillString(String.fromCharCode(0),128),c=[[1116352408,3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],[1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],[3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],(u={})["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],u["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],u["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],u["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],a=!0),void 0===e&&(e="SHA-512"),!(e in u))throw new Error("Invalid SHA-512 algorithm: "+e);for(var t=u[e],r=null,i=n.util.createBuffer(),o=new Array(80),f=0;f<80;++f)o[f]=new Array(2);var p=64;switch(e){case"SHA-384":p=48;break;case"SHA-512/256":p=32;break;case"SHA-512/224":p=28}var h={algorithm:e.replace("-","").toLowerCase(),blockLength:128,digestLength:p,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){h.messageLength=0,h.fullMessageLength=h.messageLength128=[];for(var e=h.messageLengthSize/4,o=0;o>>0,s>>>0];for(var a=h.fullMessageLength.length-1;a>=0;--a)h.fullMessageLength[a]+=s[1],s[1]=s[0]+(h.fullMessageLength[a]/4294967296>>>0),h.fullMessageLength[a]=h.fullMessageLength[a]>>>0,s[0]=s[1]/4294967296>>>0;return i.putBytes(e),l(r,o,i),(i.read>2048||0===i.length())&&i.compact(),h},h.digest=function(){var t=n.util.createBuffer();t.putBytes(i.bytes());var a,c=h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1;t.putBytes(s.substr(0,h.blockLength-c));for(var u=8*h.fullMessageLength[0],f=0;f>>0,t.putInt32(u>>>0),u=a>>>0;t.putInt32(u);var p=new Array(r.length);for(f=0;f=128;){for(R=0;R<16;++R)t[R][0]=r.getInt32()>>>0,t[R][1]=r.getInt32()>>>0;for(;R<80;++R)n=(((T=(P=t[R-2])[0])>>>19|(N=P[1])<<13)^(N>>>29|T<<3)^T>>>6)>>>0,i=((T<<13|N>>>19)^(N<<3|T>>>29)^(T<<26|N>>>6))>>>0,o=(((T=(D=t[R-15])[0])>>>1|(N=D[1])<<31)^(T>>>8|N<<24)^T>>>7)>>>0,s=((T<<31|N>>>1)^(T<<24|N>>>8)^(T<<25|N>>>7))>>>0,M=t[R-7],O=t[R-16],N=i+M[1]+s+O[1],t[R][0]=n+M[0]+o+O[0]+(N/4294967296>>>0)>>>0,t[R][1]=N>>>0;for(d=e[0][0],m=e[0][1],g=e[1][0],y=e[1][1],b=e[2][0],v=e[2][1],A=e[3][0],w=e[3][1],E=e[4][0],k=e[4][1],S=e[5][0],_=e[5][1],x=e[6][0],C=e[6][1],I=e[7][0],B=e[7][1],R=0;R<80;++R)l=((E>>>14|k<<18)^(E>>>18|k<<14)^(k>>>9|E<<23))>>>0,f=(x^E&(S^x))>>>0,a=((d>>>28|m<<4)^(m>>>2|d<<30)^(m>>>7|d<<25))>>>0,u=((d<<4|m>>>28)^(m<<30|d>>>2)^(m<<25|d>>>7))>>>0,p=(d&g|b&(d^g))>>>0,h=(m&y|v&(m^y))>>>0,N=B+(((E<<18|k>>>14)^(E<<14|k>>>18)^(k<<23|E>>>9))>>>0)+((C^k&(_^C))>>>0)+c[R][1]+t[R][1],n=I+l+f+c[R][0]+t[R][0]+(N/4294967296>>>0)>>>0,i=N>>>0,o=a+p+((N=u+h)/4294967296>>>0)>>>0,s=N>>>0,I=x,B=C,x=S,C=_,S=E,_=k,E=A+n+((N=w+i)/4294967296>>>0)>>>0,k=N>>>0,A=b,w=v,b=g,v=y,g=d,y=m,d=n+o+((N=i+s)/4294967296>>>0)>>>0,m=N>>>0;N=e[0][1]+m,e[0][0]=e[0][0]+d+(N/4294967296>>>0)>>>0,e[0][1]=N>>>0,N=e[1][1]+y,e[1][0]=e[1][0]+g+(N/4294967296>>>0)>>>0,e[1][1]=N>>>0,N=e[2][1]+v,e[2][0]=e[2][0]+b+(N/4294967296>>>0)>>>0,e[2][1]=N>>>0,N=e[3][1]+w,e[3][0]=e[3][0]+A+(N/4294967296>>>0)>>>0,e[3][1]=N>>>0,N=e[4][1]+k,e[4][0]=e[4][0]+E+(N/4294967296>>>0)>>>0,e[4][1]=N>>>0,N=e[5][1]+_,e[5][0]=e[5][0]+S+(N/4294967296>>>0)>>>0,e[5][1]=N>>>0,N=e[6][1]+C,e[6][0]=e[6][0]+x+(N/4294967296>>>0)>>>0,e[6][1]=N>>>0,N=e[7][1]+B,e[7][0]=e[7][0]+I+(N/4294967296>>>0)>>>0,e[7][1]=N>>>0,L-=128}}},function(e,t,r){!function(e){"use strict";var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function m(e,t,r,n,i){var o,s=0;for(o=0;o>>8)-1}function g(e,t,r,n){return m(e,t,r,n,16)}function y(e,t,r,n){return m(e,t,r,n,32)}function b(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,p=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,m=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,g=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,A=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=o,E=s,k=a,S=c,_=u,x=l,C=f,I=p,B=h,R=d,T=m,N=g,P=y,M=b,D=v,O=A,L=0;L<20;L+=2)w^=(i=(P^=(i=(B^=(i=(_^=(i=w+P|0)<<7|i>>>25)+w|0)<<9|i>>>23)+_|0)<<13|i>>>19)+B|0)<<18|i>>>14,x^=(i=(E^=(i=(M^=(i=(R^=(i=x+E|0)<<7|i>>>25)+x|0)<<9|i>>>23)+R|0)<<13|i>>>19)+M|0)<<18|i>>>14,T^=(i=(C^=(i=(k^=(i=(D^=(i=T+C|0)<<7|i>>>25)+T|0)<<9|i>>>23)+D|0)<<13|i>>>19)+k|0)<<18|i>>>14,O^=(i=(N^=(i=(I^=(i=(S^=(i=O+N|0)<<7|i>>>25)+O|0)<<9|i>>>23)+S|0)<<13|i>>>19)+I|0)<<18|i>>>14,w^=(i=(S^=(i=(k^=(i=(E^=(i=w+S|0)<<7|i>>>25)+w|0)<<9|i>>>23)+E|0)<<13|i>>>19)+k|0)<<18|i>>>14,x^=(i=(_^=(i=(I^=(i=(C^=(i=x+_|0)<<7|i>>>25)+x|0)<<9|i>>>23)+C|0)<<13|i>>>19)+I|0)<<18|i>>>14,T^=(i=(R^=(i=(B^=(i=(N^=(i=T+R|0)<<7|i>>>25)+T|0)<<9|i>>>23)+N|0)<<13|i>>>19)+B|0)<<18|i>>>14,O^=(i=(D^=(i=(M^=(i=(P^=(i=O+D|0)<<7|i>>>25)+O|0)<<9|i>>>23)+P|0)<<13|i>>>19)+M|0)<<18|i>>>14;w=w+o|0,E=E+s|0,k=k+a|0,S=S+c|0,_=_+u|0,x=x+l|0,C=C+f|0,I=I+p|0,B=B+h|0,R=R+d|0,T=T+m|0,N=N+g|0,P=P+y|0,M=M+b|0,D=D+v|0,O=O+A|0,e[0]=w>>>0&255,e[1]=w>>>8&255,e[2]=w>>>16&255,e[3]=w>>>24&255,e[4]=E>>>0&255,e[5]=E>>>8&255,e[6]=E>>>16&255,e[7]=E>>>24&255,e[8]=k>>>0&255,e[9]=k>>>8&255,e[10]=k>>>16&255,e[11]=k>>>24&255,e[12]=S>>>0&255,e[13]=S>>>8&255,e[14]=S>>>16&255,e[15]=S>>>24&255,e[16]=_>>>0&255,e[17]=_>>>8&255,e[18]=_>>>16&255,e[19]=_>>>24&255,e[20]=x>>>0&255,e[21]=x>>>8&255,e[22]=x>>>16&255,e[23]=x>>>24&255,e[24]=C>>>0&255,e[25]=C>>>8&255,e[26]=C>>>16&255,e[27]=C>>>24&255,e[28]=I>>>0&255,e[29]=I>>>8&255,e[30]=I>>>16&255,e[31]=I>>>24&255,e[32]=B>>>0&255,e[33]=B>>>8&255,e[34]=B>>>16&255,e[35]=B>>>24&255,e[36]=R>>>0&255,e[37]=R>>>8&255,e[38]=R>>>16&255,e[39]=R>>>24&255,e[40]=T>>>0&255,e[41]=T>>>8&255,e[42]=T>>>16&255,e[43]=T>>>24&255,e[44]=N>>>0&255,e[45]=N>>>8&255,e[46]=N>>>16&255,e[47]=N>>>24&255,e[48]=P>>>0&255,e[49]=P>>>8&255,e[50]=P>>>16&255,e[51]=P>>>24&255,e[52]=M>>>0&255,e[53]=M>>>8&255,e[54]=M>>>16&255,e[55]=M>>>24&255,e[56]=D>>>0&255,e[57]=D>>>8&255,e[58]=D>>>16&255,e[59]=D>>>24&255,e[60]=O>>>0&255,e[61]=O>>>8&255,e[62]=O>>>16&255,e[63]=O>>>24&255}(e,t,r,n)}function v(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,p=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,m=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,g=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,A=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=0;w<20;w+=2)o^=(i=(y^=(i=(h^=(i=(u^=(i=o+y|0)<<7|i>>>25)+o|0)<<9|i>>>23)+u|0)<<13|i>>>19)+h|0)<<18|i>>>14,l^=(i=(s^=(i=(b^=(i=(d^=(i=l+s|0)<<7|i>>>25)+l|0)<<9|i>>>23)+d|0)<<13|i>>>19)+b|0)<<18|i>>>14,m^=(i=(f^=(i=(a^=(i=(v^=(i=m+f|0)<<7|i>>>25)+m|0)<<9|i>>>23)+v|0)<<13|i>>>19)+a|0)<<18|i>>>14,A^=(i=(g^=(i=(p^=(i=(c^=(i=A+g|0)<<7|i>>>25)+A|0)<<9|i>>>23)+c|0)<<13|i>>>19)+p|0)<<18|i>>>14,o^=(i=(c^=(i=(a^=(i=(s^=(i=o+c|0)<<7|i>>>25)+o|0)<<9|i>>>23)+s|0)<<13|i>>>19)+a|0)<<18|i>>>14,l^=(i=(u^=(i=(p^=(i=(f^=(i=l+u|0)<<7|i>>>25)+l|0)<<9|i>>>23)+f|0)<<13|i>>>19)+p|0)<<18|i>>>14,m^=(i=(d^=(i=(h^=(i=(g^=(i=m+d|0)<<7|i>>>25)+m|0)<<9|i>>>23)+g|0)<<13|i>>>19)+h|0)<<18|i>>>14,A^=(i=(v^=(i=(b^=(i=(y^=(i=A+v|0)<<7|i>>>25)+A|0)<<9|i>>>23)+y|0)<<13|i>>>19)+b|0)<<18|i>>>14;e[0]=o>>>0&255,e[1]=o>>>8&255,e[2]=o>>>16&255,e[3]=o>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=m>>>0&255,e[9]=m>>>8&255,e[10]=m>>>16&255,e[11]=m>>>24&255,e[12]=A>>>0&255,e[13]=A>>>8&255,e[14]=A>>>16&255,e[15]=A>>>24&255,e[16]=f>>>0&255,e[17]=f>>>8&255,e[18]=f>>>16&255,e[19]=f>>>24&255,e[20]=p>>>0&255,e[21]=p>>>8&255,e[22]=p>>>16&255,e[23]=p>>>24&255,e[24]=h>>>0&255,e[25]=h>>>8&255,e[26]=h>>>16&255,e[27]=h>>>24&255,e[28]=d>>>0&255,e[29]=d>>>8&255,e[30]=d>>>16&255,e[31]=d>>>24&255}(e,t,r,n)}var A=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function w(e,t,r,n,i,o,s){var a,c,u=new Uint8Array(16),l=new Uint8Array(64);for(c=0;c<16;c++)u[c]=0;for(c=0;c<8;c++)u[c]=o[c];for(;i>=64;){for(b(l,u,s,A),c=0;c<64;c++)e[t+c]=r[n+c]^l[c];for(a=1,c=8;c<16;c++)a=a+(255&u[c])|0,u[c]=255&a,a>>>=8;i-=64,t+=64,n+=64}if(i>0)for(b(l,u,s,A),c=0;c=64;){for(b(c,a,i,A),s=0;s<64;s++)e[t+s]=c[s];for(o=1,s=8;s<16;s++)o=o+(255&a[s])|0,a[s]=255&o,o>>>=8;r-=64,t+=64}if(r>0)for(b(c,a,i,A),s=0;s>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|i<<9),o=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,s=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(o>>>14|s<<2),a=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(s>>>11|a<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(a>>>8|c<<8),this.r[9]=c>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function x(e,t,r,n,i,o){var s=new _(o);return s.update(r,n,i),s.finish(e,t),0}function C(e,t,r,n,i,o){var s=new Uint8Array(16);return x(s,0,r,n,i,o),g(e,t,s,0)}function I(e,t,r,n,i){var o;if(r<32)return-1;for(S(e,0,t,0,r,n,i),x(e,16,e,32,r-32,e),o=0;o<16;o++)e[o]=0;return 0}function B(e,t,r,n,i){var o,s=new Uint8Array(32);if(r<32)return-1;if(k(s,0,32,n,i),0!==C(t,16,t,32,r-32,s))return-1;for(S(e,0,t,0,r,n,i),o=0;o<32;o++)e[o]=0;return 0}function R(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function T(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function N(e,t,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(e[o]^t[o]),e[o]^=n,t[o]^=n}function P(e,r){var n,i,o,s=t(),a=t();for(n=0;n<16;n++)a[n]=r[n];for(T(a),T(a),T(a),i=0;i<2;i++){for(s[0]=a[0]-65517,n=1;n<15;n++)s[n]=a[n]-65535-(s[n-1]>>16&1),s[n-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),o=s[15]>>16&1,s[14]&=65535,N(a,s,1-o)}for(n=0;n<16;n++)e[2*n]=255&a[n],e[2*n+1]=a[n]>>8}function M(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return P(r,e),P(n,t),y(r,0,n,0)}function D(e){var t=new Uint8Array(32);return P(t,e),1&t[0]}function O(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function L(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function U(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function j(e,t,r){var n,i,o=0,s=0,a=0,c=0,u=0,l=0,f=0,p=0,h=0,d=0,m=0,g=0,y=0,b=0,v=0,A=0,w=0,E=0,k=0,S=0,_=0,x=0,C=0,I=0,B=0,R=0,T=0,N=0,P=0,M=0,D=0,O=r[0],L=r[1],U=r[2],j=r[3],F=r[4],K=r[5],V=r[6],z=r[7],G=r[8],q=r[9],H=r[10],Y=r[11],J=r[12],W=r[13],Z=r[14],Q=r[15];o+=(n=t[0])*O,s+=n*L,a+=n*U,c+=n*j,u+=n*F,l+=n*K,f+=n*V,p+=n*z,h+=n*G,d+=n*q,m+=n*H,g+=n*Y,y+=n*J,b+=n*W,v+=n*Z,A+=n*Q,s+=(n=t[1])*O,a+=n*L,c+=n*U,u+=n*j,l+=n*F,f+=n*K,p+=n*V,h+=n*z,d+=n*G,m+=n*q,g+=n*H,y+=n*Y,b+=n*J,v+=n*W,A+=n*Z,w+=n*Q,a+=(n=t[2])*O,c+=n*L,u+=n*U,l+=n*j,f+=n*F,p+=n*K,h+=n*V,d+=n*z,m+=n*G,g+=n*q,y+=n*H,b+=n*Y,v+=n*J,A+=n*W,w+=n*Z,E+=n*Q,c+=(n=t[3])*O,u+=n*L,l+=n*U,f+=n*j,p+=n*F,h+=n*K,d+=n*V,m+=n*z,g+=n*G,y+=n*q,b+=n*H,v+=n*Y,A+=n*J,w+=n*W,E+=n*Z,k+=n*Q,u+=(n=t[4])*O,l+=n*L,f+=n*U,p+=n*j,h+=n*F,d+=n*K,m+=n*V,g+=n*z,y+=n*G,b+=n*q,v+=n*H,A+=n*Y,w+=n*J,E+=n*W,k+=n*Z,S+=n*Q,l+=(n=t[5])*O,f+=n*L,p+=n*U,h+=n*j,d+=n*F,m+=n*K,g+=n*V,y+=n*z,b+=n*G,v+=n*q,A+=n*H,w+=n*Y,E+=n*J,k+=n*W,S+=n*Z,_+=n*Q,f+=(n=t[6])*O,p+=n*L,h+=n*U,d+=n*j,m+=n*F,g+=n*K,y+=n*V,b+=n*z,v+=n*G,A+=n*q,w+=n*H,E+=n*Y,k+=n*J,S+=n*W,_+=n*Z,x+=n*Q,p+=(n=t[7])*O,h+=n*L,d+=n*U,m+=n*j,g+=n*F,y+=n*K,b+=n*V,v+=n*z,A+=n*G,w+=n*q,E+=n*H,k+=n*Y,S+=n*J,_+=n*W,x+=n*Z,C+=n*Q,h+=(n=t[8])*O,d+=n*L,m+=n*U,g+=n*j,y+=n*F,b+=n*K,v+=n*V,A+=n*z,w+=n*G,E+=n*q,k+=n*H,S+=n*Y,_+=n*J,x+=n*W,C+=n*Z,I+=n*Q,d+=(n=t[9])*O,m+=n*L,g+=n*U,y+=n*j,b+=n*F,v+=n*K,A+=n*V,w+=n*z,E+=n*G,k+=n*q,S+=n*H,_+=n*Y,x+=n*J,C+=n*W,I+=n*Z,B+=n*Q,m+=(n=t[10])*O,g+=n*L,y+=n*U,b+=n*j,v+=n*F,A+=n*K,w+=n*V,E+=n*z,k+=n*G,S+=n*q,_+=n*H,x+=n*Y,C+=n*J,I+=n*W,B+=n*Z,R+=n*Q,g+=(n=t[11])*O,y+=n*L,b+=n*U,v+=n*j,A+=n*F,w+=n*K,E+=n*V,k+=n*z,S+=n*G,_+=n*q,x+=n*H,C+=n*Y,I+=n*J,B+=n*W,R+=n*Z,T+=n*Q,y+=(n=t[12])*O,b+=n*L,v+=n*U,A+=n*j,w+=n*F,E+=n*K,k+=n*V,S+=n*z,_+=n*G,x+=n*q,C+=n*H,I+=n*Y,B+=n*J,R+=n*W,T+=n*Z,N+=n*Q,b+=(n=t[13])*O,v+=n*L,A+=n*U,w+=n*j,E+=n*F,k+=n*K,S+=n*V,_+=n*z,x+=n*G,C+=n*q,I+=n*H,B+=n*Y,R+=n*J,T+=n*W,N+=n*Z,P+=n*Q,v+=(n=t[14])*O,A+=n*L,w+=n*U,E+=n*j,k+=n*F,S+=n*K,_+=n*V,x+=n*z,C+=n*G,I+=n*q,B+=n*H,R+=n*Y,T+=n*J,N+=n*W,P+=n*Z,M+=n*Q,A+=(n=t[15])*O,s+=38*(E+=n*U),a+=38*(k+=n*j),c+=38*(S+=n*F),u+=38*(_+=n*K),l+=38*(x+=n*V),f+=38*(C+=n*z),p+=38*(I+=n*G),h+=38*(B+=n*q),d+=38*(R+=n*H),m+=38*(T+=n*Y),g+=38*(N+=n*J),y+=38*(P+=n*W),b+=38*(M+=n*Z),v+=38*(D+=n*Q),o=(n=(o+=38*(w+=n*L))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),A=(n=A+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),A=(n=A+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),e[0]=o,e[1]=s,e[2]=a,e[3]=c,e[4]=u,e[5]=l,e[6]=f,e[7]=p,e[8]=h,e[9]=d,e[10]=m,e[11]=g,e[12]=y,e[13]=b,e[14]=v,e[15]=A}function F(e,t){j(e,t,t)}function K(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)F(i,i),2!==n&&4!==n&&j(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}function V(e,r,n){var i,o,s=new Uint8Array(32),a=new Float64Array(80),u=t(),l=t(),f=t(),p=t(),h=t(),d=t();for(o=0;o<31;o++)s[o]=r[o];for(s[31]=127&r[31]|64,s[0]&=248,O(a,n),o=0;o<16;o++)l[o]=a[o],p[o]=u[o]=f[o]=0;for(u[0]=p[0]=1,o=254;o>=0;--o)N(u,l,i=s[o>>>3]>>>(7&o)&1),N(f,p,i),L(h,u,f),U(u,u,f),L(f,l,p),U(l,l,p),F(p,h),F(d,u),j(u,f,u),j(f,l,h),L(h,u,f),U(u,u,f),F(l,u),U(f,p,d),j(u,f,c),L(u,u,p),j(f,f,u),j(u,p,d),j(p,l,a),F(l,h),N(u,l,i),N(f,p,i);for(o=0;o<16;o++)a[o+16]=u[o],a[o+32]=f[o],a[o+48]=l[o],a[o+64]=p[o];var m=a.subarray(32),g=a.subarray(16);return K(m,m),j(g,g,m),P(e,g),0}function z(e,t){return V(e,t,o)}function G(e,t){return n(t,32),z(e,t)}function q(e,t,r){var n=new Uint8Array(32);return V(n,r,t),v(e,i,n,A)}_.prototype.blocks=function(e,t,r){for(var n,i,o,s,a,c,u,l,f,p,h,d,m,g,y,b,v,A,w,E=this.fin?0:2048,k=this.h[0],S=this.h[1],_=this.h[2],x=this.h[3],C=this.h[4],I=this.h[5],B=this.h[6],R=this.h[7],T=this.h[8],N=this.h[9],P=this.r[0],M=this.r[1],D=this.r[2],O=this.r[3],L=this.r[4],U=this.r[5],j=this.r[6],F=this.r[7],K=this.r[8],V=this.r[9];r>=16;)p=f=0,p+=(k+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*P,p+=(S+=8191&(n>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*V),p+=(_+=8191&(i>>>10|(o=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*K),p+=(x+=8191&(o>>>7|(s=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*F),f=(p+=(C+=8191&(s>>>4|(a=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*j))>>>13,p&=8191,p+=(I+=a>>>1&8191)*(5*U),p+=(B+=8191&(a>>>14|(c=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*L),p+=(R+=8191&(c>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*O),p+=(T+=8191&(u>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*D),h=f+=(p+=(N+=l>>>5|E)*(5*M))>>>13,h+=k*M,h+=S*P,h+=_*(5*V),h+=x*(5*K),f=(h+=C*(5*F))>>>13,h&=8191,h+=I*(5*j),h+=B*(5*U),h+=R*(5*L),h+=T*(5*O),f+=(h+=N*(5*D))>>>13,h&=8191,d=f,d+=k*D,d+=S*M,d+=_*P,d+=x*(5*V),f=(d+=C*(5*K))>>>13,d&=8191,d+=I*(5*F),d+=B*(5*j),d+=R*(5*U),d+=T*(5*L),m=f+=(d+=N*(5*O))>>>13,m+=k*O,m+=S*D,m+=_*M,m+=x*P,f=(m+=C*(5*V))>>>13,m&=8191,m+=I*(5*K),m+=B*(5*F),m+=R*(5*j),m+=T*(5*U),g=f+=(m+=N*(5*L))>>>13,g+=k*L,g+=S*O,g+=_*D,g+=x*M,f=(g+=C*P)>>>13,g&=8191,g+=I*(5*V),g+=B*(5*K),g+=R*(5*F),g+=T*(5*j),y=f+=(g+=N*(5*U))>>>13,y+=k*U,y+=S*L,y+=_*O,y+=x*D,f=(y+=C*M)>>>13,y&=8191,y+=I*P,y+=B*(5*V),y+=R*(5*K),y+=T*(5*F),b=f+=(y+=N*(5*j))>>>13,b+=k*j,b+=S*U,b+=_*L,b+=x*O,f=(b+=C*D)>>>13,b&=8191,b+=I*M,b+=B*P,b+=R*(5*V),b+=T*(5*K),v=f+=(b+=N*(5*F))>>>13,v+=k*F,v+=S*j,v+=_*U,v+=x*L,f=(v+=C*O)>>>13,v&=8191,v+=I*D,v+=B*M,v+=R*P,v+=T*(5*V),A=f+=(v+=N*(5*K))>>>13,A+=k*K,A+=S*F,A+=_*j,A+=x*U,f=(A+=C*L)>>>13,A&=8191,A+=I*O,A+=B*D,A+=R*M,A+=T*P,w=f+=(A+=N*(5*V))>>>13,w+=k*V,w+=S*K,w+=_*F,w+=x*j,f=(w+=C*U)>>>13,w&=8191,w+=I*L,w+=B*O,w+=R*D,w+=T*M,k=p=8191&(f=(f=((f+=(w+=N*P)>>>13)<<2)+f|0)+(p&=8191)|0),S=h+=f>>>=13,_=d&=8191,x=m&=8191,C=g&=8191,I=y&=8191,B=b&=8191,R=v&=8191,T=A&=8191,N=w&=8191,t+=16,r-=16;this.h[0]=k,this.h[1]=S,this.h[2]=_,this.h[3]=x,this.h[4]=C,this.h[5]=I,this.h[6]=B,this.h[7]=R,this.h[8]=T,this.h[9]=N},_.prototype.finish=function(e,t){var r,n,i,o,s=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,s[0]=this.h[0]+5,r=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this.h[o]+r,r=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,n=(1^r)-1,o=0;o<10;o++)s[o]&=n;for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|s[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},_.prototype.update=function(e,t,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n=16&&(i=r-r%16,this.blocks(e,t,i),t+=i,r-=i),r){for(n=0;n=128;){for(E=0;E<16;E++)k=8*E+W,R[E]=r[k+0]<<24|r[k+1]<<16|r[k+2]<<8|r[k+3],T[E]=r[k+4]<<24|r[k+5]<<16|r[k+6]<<8|r[k+7];for(E=0;E<80;E++)if(i=N,o=P,s=M,a=D,c=O,u=L,l=U,j,p=F,h=K,d=V,m=z,g=G,y=q,b=H,Y,x=65535&(_=Y),C=_>>>16,I=65535&(S=j),B=S>>>16,x+=65535&(_=(G>>>14|O<<18)^(G>>>18|O<<14)^(O>>>9|G<<23)),C+=_>>>16,I+=65535&(S=(O>>>14|G<<18)^(O>>>18|G<<14)^(G>>>9|O<<23)),B+=S>>>16,x+=65535&(_=G&q^~G&H),C+=_>>>16,I+=65535&(S=O&L^~O&U),B+=S>>>16,S=J[2*E],x+=65535&(_=J[2*E+1]),C+=_>>>16,I+=65535&S,B+=S>>>16,S=R[E%16],C+=(_=T[E%16])>>>16,I+=65535&S,B+=S>>>16,I+=(C+=(x+=65535&_)>>>16)>>>16,x=65535&(_=w=65535&x|C<<16),C=_>>>16,I=65535&(S=A=65535&I|(B+=I>>>16)<<16),B=S>>>16,x+=65535&(_=(F>>>28|N<<4)^(N>>>2|F<<30)^(N>>>7|F<<25)),C+=_>>>16,I+=65535&(S=(N>>>28|F<<4)^(F>>>2|N<<30)^(F>>>7|N<<25)),B+=S>>>16,C+=(_=F&K^F&V^K&V)>>>16,I+=65535&(S=N&P^N&M^P&M),B+=S>>>16,f=65535&(I+=(C+=(x+=65535&_)>>>16)>>>16)|(B+=I>>>16)<<16,v=65535&x|C<<16,x=65535&(_=m),C=_>>>16,I=65535&(S=a),B=S>>>16,C+=(_=w)>>>16,I+=65535&(S=A),B+=S>>>16,P=i,M=o,D=s,O=a=65535&(I+=(C+=(x+=65535&_)>>>16)>>>16)|(B+=I>>>16)<<16,L=c,U=u,j=l,N=f,K=p,V=h,z=d,G=m=65535&x|C<<16,q=g,H=y,Y=b,F=v,E%16==15)for(k=0;k<16;k++)S=R[k],x=65535&(_=T[k]),C=_>>>16,I=65535&S,B=S>>>16,S=R[(k+9)%16],x+=65535&(_=T[(k+9)%16]),C+=_>>>16,I+=65535&S,B+=S>>>16,A=R[(k+1)%16],x+=65535&(_=((w=T[(k+1)%16])>>>1|A<<31)^(w>>>8|A<<24)^(w>>>7|A<<25)),C+=_>>>16,I+=65535&(S=(A>>>1|w<<31)^(A>>>8|w<<24)^A>>>7),B+=S>>>16,A=R[(k+14)%16],C+=(_=((w=T[(k+14)%16])>>>19|A<<13)^(A>>>29|w<<3)^(w>>>6|A<<26))>>>16,I+=65535&(S=(A>>>19|w<<13)^(w>>>29|A<<3)^A>>>6),B+=S>>>16,B+=(I+=(C+=(x+=65535&_)>>>16)>>>16)>>>16,R[k]=65535&I|B<<16,T[k]=65535&x|C<<16;x=65535&(_=F),C=_>>>16,I=65535&(S=N),B=S>>>16,S=e[0],C+=(_=t[0])>>>16,I+=65535&S,B+=S>>>16,B+=(I+=(C+=(x+=65535&_)>>>16)>>>16)>>>16,e[0]=N=65535&I|B<<16,t[0]=F=65535&x|C<<16,x=65535&(_=K),C=_>>>16,I=65535&(S=P),B=S>>>16,S=e[1],C+=(_=t[1])>>>16,I+=65535&S,B+=S>>>16,B+=(I+=(C+=(x+=65535&_)>>>16)>>>16)>>>16,e[1]=P=65535&I|B<<16,t[1]=K=65535&x|C<<16,x=65535&(_=V),C=_>>>16,I=65535&(S=M),B=S>>>16,S=e[2],C+=(_=t[2])>>>16,I+=65535&S,B+=S>>>16,B+=(I+=(C+=(x+=65535&_)>>>16)>>>16)>>>16,e[2]=M=65535&I|B<<16,t[2]=V=65535&x|C<<16,x=65535&(_=z),C=_>>>16,I=65535&(S=D),B=S>>>16,S=e[3],C+=(_=t[3])>>>16,I+=65535&S,B+=S>>>16,B+=(I+=(C+=(x+=65535&_)>>>16)>>>16)>>>16,e[3]=D=65535&I|B<<16,t[3]=z=65535&x|C<<16,x=65535&(_=G),C=_>>>16,I=65535&(S=O),B=S>>>16,S=e[4],C+=(_=t[4])>>>16,I+=65535&S,B+=S>>>16,B+=(I+=(C+=(x+=65535&_)>>>16)>>>16)>>>16,e[4]=O=65535&I|B<<16,t[4]=G=65535&x|C<<16,x=65535&(_=q),C=_>>>16,I=65535&(S=L),B=S>>>16,S=e[5],C+=(_=t[5])>>>16,I+=65535&S,B+=S>>>16,B+=(I+=(C+=(x+=65535&_)>>>16)>>>16)>>>16,e[5]=L=65535&I|B<<16,t[5]=q=65535&x|C<<16,x=65535&(_=H),C=_>>>16,I=65535&(S=U),B=S>>>16,S=e[6],C+=(_=t[6])>>>16,I+=65535&S,B+=S>>>16,B+=(I+=(C+=(x+=65535&_)>>>16)>>>16)>>>16,e[6]=U=65535&I|B<<16,t[6]=H=65535&x|C<<16,x=65535&(_=Y),C=_>>>16,I=65535&(S=j),B=S>>>16,S=e[7],C+=(_=t[7])>>>16,I+=65535&S,B+=S>>>16,B+=(I+=(C+=(x+=65535&_)>>>16)>>>16)>>>16,e[7]=j=65535&I|B<<16,t[7]=Y=65535&x|C<<16,W+=128,n-=128}return n}function Z(e,t,r){var n,i=new Int32Array(8),o=new Int32Array(8),s=new Uint8Array(256),a=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,W(i,o,t,r),r%=128,n=0;n=0;--i)X(e,t,n=r[i/8|0]>>(7&i)&1),Q(t,e),Q(e,e),X(e,t,n)}function te(e,r){var n=[t(),t(),t(),t()];R(n[0],f),R(n[1],p),R(n[2],a),j(n[3],f,p),ee(e,n,r)}function re(e,r,i){var o,s=new Uint8Array(64),a=[t(),t(),t(),t()];for(i||n(r,32),Z(s,r,32),s[0]&=248,s[31]&=127,s[31]|=64,te(a,s),$(e,a),o=0;o<32;o++)r[o+32]=e[o];return 0}var ne=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ie(e,t){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i>8,t[i]-=256*r;t[i]+=r,t[n]=0}for(r=0,i=0;i<32;i++)t[i]+=r-(t[31]>>4)*ne[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*ne[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function oe(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;ie(e,r)}function se(e,r,n,i){var o,s,a=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),l=new Float64Array(64),f=[t(),t(),t(),t()];Z(a,i,32),a[0]&=248,a[31]&=127,a[31]|=64;var p=n+64;for(o=0;o=0;n--)F(i,i),1!==n&&j(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}(n,n),j(n,n,o),j(n,n,c),j(n,n,c),j(e[0],n,c),F(i,e[0]),j(i,i,c),M(i,o)&&j(e[0],e[0],h),F(i,e[0]),j(i,i,c),M(i,o)?-1:(D(e[0])===r[31]>>7&&U(e[0],s,e[0]),j(e[3],e[0],e[1]),0)}function ce(e,r,n,i){var o,s=new Uint8Array(32),a=new Uint8Array(64),c=[t(),t(),t(),t()],u=[t(),t(),t(),t()];if(-1,n<64)return-1;if(ae(u,i))return-1;for(o=0;o=0},e.sign.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(64);return re(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(me(e),64!==e.length)throw new Error("bad secret key size");for(var t=new Uint8Array(32),r=0;r1?{type:h[i],data:e.substring(1)}:{type:h[i]}:d}i=new Uint8Array(e)[0];var o=s(e,1);return m&&"blob"===r&&(o=new m([o])),{type:h[i],data:o}},t.decodeBase64Packet=function(e,t){var r=h[e.charAt(0)];if(!n)return{type:r,data:{base64:!0,data:e.substr(1)}};var i=n.decode(e.substr(1));return"blob"===t&&m&&(i=new m([i])),{type:r,data:i}},t.encodePayload=function(e,r,n){"function"==typeof r&&(n=r,r=null);var i=o(e);if(r&&i)return m&&!f?t.encodePayloadAsBlob(e,n):t.encodePayloadAsArrayBuffer(e,n);if(!e.length)return n("0:");g(e,function(e,n){t.encodePacket(e,!!i&&r,!1,function(e){n(null,function(e){return e.length+":"+e}(e))})},function(e,t){return n(t.join(""))})},t.decodePayload=function(e,r,n){if("string"!=typeof e)return t.decodePayloadAsBinary(e,r,n);var i;if("function"==typeof r&&(n=r,r=null),""===e)return n(d,0,1);for(var o,s,a="",c=0,u=e.length;c0;){for(var a=new Uint8Array(i),c=0===a[0],u="",l=1;255!==a[l];l++){if(u.length>310)return n(d,0,1);u+=a[l]}i=s(i,2+u.length),u=parseInt(u);var f=s(i,0,u);if(c)try{f=String.fromCharCode.apply(null,new Uint8Array(f))}catch(e){var p=new Uint8Array(f);f="";for(l=0;l>=8;for(;u>0;)o.push(255&u),u>>=8}for(var l=0;e[l]===i&&l0;)n.push(a%r),a=a/r|0}for(var c="",u=0;0===t[u]&&u=0;--l)c+=e[n[l]];return c},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){const n=r(18);function i(e){return parseInt(e.toString("hex"),16)}function o(e){let r=e.toString(16);return r.length%2==1&&(r="0"+r),t.from(r,"hex")}e.exports={numberToBuffer:o,bufferToNumber:i,varintBufferEncode:function(e){return t.from(n.encode(i(e)))},varintBufferDecode:function(e){return o(n.decode(e))}}}).call(this,r(0).Buffer)},function(e,t,r){(function(e,r){var n=200,i="Expected a function",o="__lodash_hash_undefined__",s=1,a=2,c=1/0,u=9007199254740991,l="[object Arguments]",f="[object Array]",p="[object Boolean]",h="[object Date]",d="[object Error]",m="[object Function]",g="[object GeneratorFunction]",y="[object Map]",b="[object Number]",v="[object Object]",A="[object RegExp]",w="[object Set]",E="[object String]",k="[object Symbol]",S="[object ArrayBuffer]",_="[object DataView]",x=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,C=/^\w*$/,I=/^\./,B=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,R=/\\(\\)?/g,T=/^\[object .+?Constructor\]$/,N=/^(?:0|[1-9]\d*)$/,P={};P["[object Float32Array]"]=P["[object Float64Array]"]=P["[object Int8Array]"]=P["[object Int16Array]"]=P["[object Int32Array]"]=P["[object Uint8Array]"]=P["[object Uint8ClampedArray]"]=P["[object Uint16Array]"]=P["[object Uint32Array]"]=!0,P[l]=P[f]=P[S]=P[p]=P[_]=P[h]=P[d]=P[m]=P[y]=P[b]=P[v]=P[A]=P[w]=P[E]=P["[object WeakMap]"]=!1;var M="object"==typeof e&&e&&e.Object===Object&&e,D="object"==typeof self&&self&&self.Object===Object&&self,O=M||D||Function("return this")(),L=t&&!t.nodeType&&t,U=L&&"object"==typeof r&&r&&!r.nodeType&&r,j=U&&U.exports===L&&M.process,F=function(){try{return j&&j.binding("util")}catch(e){}}(),K=F&&F.isTypedArray;function V(e,t){for(var r=-1,n=e?e.length:0,i=0,o=[];++r-1},_e.prototype.set=function(e,t){var r=this.__data__,n=Re(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},xe.prototype.clear=function(){this.__data__={hash:new Se,map:new(fe||_e),string:new Se}},xe.prototype.delete=function(e){return Ge(this,e).delete(e)},xe.prototype.get=function(e){return Ge(this,e).get(e)},xe.prototype.has=function(e){return Ge(this,e).has(e)},xe.prototype.set=function(e,t){return Ge(this,e).set(e,t),this},Ce.prototype.add=Ce.prototype.push=function(e){return this.__data__.set(e,o),this},Ce.prototype.has=function(e){return this.__data__.has(e)},Ie.prototype.clear=function(){this.__data__=new _e},Ie.prototype.delete=function(e){return this.__data__.delete(e)},Ie.prototype.get=function(e){return this.__data__.get(e)},Ie.prototype.has=function(e){return this.__data__.has(e)},Ie.prototype.set=function(e,t){var r=this.__data__;if(r instanceof _e){var i=r.__data__;if(!fe||i.lengthu))return!1;var f=o.get(e);if(f&&o.get(t))return f==t;var p=-1,h=!0,d=i&s?new Ce:void 0;for(o.set(e,t),o.set(t,e);++p-1&&e%1==0&&e-1&&e%1==0&&e<=u}function at(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ct(e){return!!e&&"object"==typeof e}function ut(e){return"symbol"==typeof e||ct(e)&&ne.call(e)==k}var lt=K?function(e){return function(t){return e(t)}}(K):function(e){return ct(e)&&st(e.length)&&!!P[ne.call(e)]};function ft(e){return it(e)?Be(e):Ke(e)}function pt(e){return e}r.exports=function(e,t){return(nt(e)?V:Me)(e,Fe(t))}}).call(this,r(12),r(50)(e))},function(e,t,r){"use strict";t.Address4=r(177),t.Address6=r(347),t.v6={helpers:r(182)}},function(e,t,r){"use strict";var n=r(178).BigInteger,i=r(179),o=r(180),s=r(181),a=r(85).sprintf,c=r(125);function u(e){this.valid=!1,this.address=e,this.groups=c.GROUPS,this.v4=!0,this.subnet="/32",this.subnetMask=32;var t=c.RE_SUBNET_STRING.exec(e);if(t){if(this.parsedSubnet=t[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet="/"+this.subnetMask,this.subnetMask<0||this.subnetMask>c.BITS)return this.valid=!1,void(this.error="Invalid subnet mask.");e=e.replace(c.RE_SUBNET_STRING,"")}this.addressMinusSuffix=e,this.parsedAddress=this.parse(e)}u.prototype.parse=function(e){var t=e.split(".");return e.match(c.RE_ADDRESS)?this.valid=!0:this.error="Invalid IPv4 address.",t},u.prototype.isValid=function(){return this.valid},u.prototype.correctForm=function(){return this.parsedAddress.map(function(e){return parseInt(e,10)}).join(".")},u.prototype.isCorrect=i.isCorrect(c.BITS),u.fromHex=function(e){var t,r=o(e.replace(/:/g,""),8,"0"),n=[];for(t=0;t<8;t+=2){var i=r.slice(t,t+2);n.push(parseInt(i,16))}return new u(n.join("."))},u.fromInteger=function(e){return u.fromHex(e.toString(16))},u.prototype.toHex=function(){return this.parsedAddress.map(function(e){return a("%02x",parseInt(e,10))}).join(":")},u.prototype.toArray=function(){return this.parsedAddress.map(function(e){return parseInt(e,10)})},u.prototype.toGroup6=function(){var e,t=[];for(e=0;e>15;--o>=0;){var c=32767&this[e],u=this[e++]>>15,l=a*c+u*s;i=((c=s*c+((32767&l)<<15)+r[n]+(1073741823&i))>>>30)+(l>>>15)+a*u+(i>>>30),r[n++]=1073741823&c}return i},t=30):i&&"Netscape"!=navigator.appName?(r.prototype.am=function(e,t,r,n,i,o){for(;--o>=0;){var s=t*this[e++]+r[n]+i;i=Math.floor(s/67108864),r[n++]=67108863&s}return i},t=26):(r.prototype.am=function(e,t,r,n,i,o){for(var s=16383&t,a=t>>14;--o>=0;){var c=16383&this[e],u=this[e++]>>14,l=a*c+u*s;i=((c=s*c+((16383&l)<<14)+r[n]+i)>>28)+(l>>14)+a*u,r[n++]=268435455&c}return i},t=28),r.prototype.DB=t,r.prototype.DM=(1<>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function h(e){this.m=e}function d(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function A(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function w(){}function E(e){return e}function k(e){this.r2=n(),this.q3=n(),r.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}h.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},h.prototype.revert=function(e){return e},h.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},h.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},h.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},d.prototype.convert=function(e){var t=n();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(r.ZERO)>0&&this.m.subTo(t,t),t},d.prototype.revert=function(e){var t=n();return e.copyTo(t),this.reduce(t),t},d.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t>15)*this.mpl&this.um)<<15)&e.DM;for(e[r=t+this.m.t]+=this.m.am(0,n,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},d.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},d.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},r.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},r.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},r.prototype.fromString=function(e,t){var n;if(16==t)n=4;else if(8==t)n=3;else if(256==t)n=8;else if(2==t)n=1;else if(32==t)n=5;else{if(4!=t)return void this.fromRadix(e,t);n=2}this.t=0,this.s=0;for(var i=e.length,o=!1,s=0;--i>=0;){var a=8==n?255&e[i]:l(e,i);a<0?"-"==e.charAt(i)&&(o=!0):(o=!1,0==s?this[this.t++]=a:s+n>this.DB?(this[this.t-1]|=(a&(1<>this.DB-s):this[this.t-1]|=a<=this.DB&&(s-=this.DB))}8==n&&0!=(128&e[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==e;)--this.t},r.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s},r.prototype.drShiftTo=function(e,t){for(var r=e;r=0;--r)t[r+s+1]=this[r]>>i|a,a=(this[r]&o)<=0;--r)t[r]=0;t[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()},r.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,o=(1<>n;for(var s=r+1;s>n;n>0&&(t[this.t-r-1]|=(this.s&o)<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[r++]=this.DV+n:n>0&&(t[r++]=n),t.t=r,t.clamp()},r.prototype.multiplyTo=function(e,t){var n=this.abs(),i=e.abs(),o=n.t;for(t.t=o+i.t;--o>=0;)t[o]=0;for(o=0;o=0;)e[r]=0;for(r=0;r=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()},r.prototype.divRemTo=function(e,t,i){var o=e.abs();if(!(o.t<=0)){var s=this.abs();if(s.t0?(o.lShiftTo(l,a),s.lShiftTo(l,i)):(o.copyTo(a),s.copyTo(i));var f=a.t,h=a[f-1];if(0!=h){var d=h*(1<1?a[f-2]>>this.F2:0),m=this.FV/d,g=(1<=0&&(i[i.t++]=1,i.subTo(A,i)),r.ONE.dlShiftTo(f,A),A.subTo(a,a);a.t=0;){var w=i[--b]==h?this.DM:Math.floor(i[b]*m+(i[b-1]+y)*g);if((i[b]+=a.am(0,w,i,v,0,f))0&&i.rShiftTo(l,i),c<0&&r.ZERO.subTo(i,i)}}},r.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},r.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},r.prototype.exp=function(e,t){if(e>4294967295||e<1)return r.ONE;var i=n(),o=n(),s=t.convert(this),a=p(e)-1;for(s.copyTo(i);--a>=0;)if(t.sqrTo(i,o),(e&1<0)t.mulTo(o,s,i);else{var c=i;i=o,o=c}return t.revert(i)},r.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,n=(1<0)for(a>a)>0&&(i=!0,o=u(r));s>=0;)a>(a+=this.DB-t)):(r=this[s]>>(a-=t)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=u(r));return i?o:"0"},r.prototype.negate=function(){var e=n();return r.ZERO.subTo(this,e),e},r.prototype.abs=function(){return this.s<0?this.negate():this},r.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this[r]-e[r]))return t;return 0},r.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+p(this[this.t-1]^this.s&this.DM)},r.prototype.mod=function(e){var t=n();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(r.ZERO)>0&&e.subTo(t,t),t},r.prototype.modPowInt=function(e,t){var r;return r=e<256||t.isEven()?new h(t):new d(t),this.exp(e,r)},r.ZERO=f(0),r.ONE=f(1),w.prototype.convert=E,w.prototype.revert=E,w.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},w.prototype.sqrTo=function(e,t){e.squareTo(t)},k.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=n();return e.copyTo(t),this.reduce(t),t},k.prototype.revert=function(e){return e},k.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},k.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},k.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var S,_,x,C=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],I=(1<<26)/C[C.length-1];function B(){var e;e=(new Date).getTime(),_[x++]^=255&e,_[x++]^=e>>8&255,_[x++]^=e>>16&255,_[x++]^=e>>24&255,x>=O&&(x-=O)}if(r.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},r.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),i=f(r),o=n(),s=n(),a="";for(this.divRemTo(i,o,s);o.signum()>0;)a=(r+s.intValue()).toString(e).substr(1)+a,o.divRemTo(i,o,s);return s.intValue().toString(e)+a},r.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var n=this.chunkSize(t),i=Math.pow(t,n),o=!1,s=0,a=0,c=0;c=n&&(this.dMultiply(i),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(t,s)),this.dAddOffset(a,0)),o&&r.ZERO.subTo(this,this)},r.prototype.fromNumber=function(e,t,n){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(r.ONE.shiftLeft(e-1),g,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(r.ONE.shiftLeft(e-1),this);else{var i=new Array,o=7&e;i.length=1+(e>>3),t.nextBytes(i),o>0?i[0]&=(1<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t[r++]=n:n<-1&&(t[r++]=this.DV+n),t.t=r,t.clamp()},r.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},r.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},r.prototype.multiplyLowerTo=function(e,t,r){var n,i=Math.min(this.t+e.t,t);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(n=r.t-this.t;i=0;)r[n]=0;for(n=Math.max(t-this.t,0);n0)if(0==t)r=this[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this[n])%e;return r},r.prototype.millerRabin=function(e){var t=this.subtract(r.ONE),i=t.getLowestSetBit();if(i<=0)return!1;var o=t.shiftRight(i);(e=e+1>>1)>C.length&&(e=C.length);for(var s=n(),a=0;a>24},r.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},r.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},r.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var r,n=this.DB-e*this.DB%8,i=0;if(e-- >0)for(n>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<=0;)n<8?(r=(this[e]&(1<>(n+=this.DB-8)):(r=this[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t},r.prototype.equals=function(e){return 0==this.compareTo(e)},r.prototype.min=function(e){return this.compareTo(e)<0?this:e},r.prototype.max=function(e){return this.compareTo(e)>0?this:e},r.prototype.and=function(e){var t=n();return this.bitwiseTo(e,m,t),t},r.prototype.or=function(e){var t=n();return this.bitwiseTo(e,g,t),t},r.prototype.xor=function(e){var t=n();return this.bitwiseTo(e,y,t),t},r.prototype.andNot=function(e){var t=n();return this.bitwiseTo(e,b,t),t},r.prototype.not=function(){for(var e=n(),t=0;t=this.t?0!=this.s:0!=(this[t]&1<1){var m=n();for(i.sqrTo(a[1],m);c<=l;)a[c]=n(),i.mulTo(m,a[c-2],a[c]),c+=2}var g,y,b=e.t-1,v=!0,A=n();for(o=p(e[b])-1;b>=0;){for(o>=u?g=e[b]>>o-u&l:(g=(e[b]&(1<0&&(g|=e[b-1]>>this.DB+o-u)),c=r;0==(1&g);)g>>=1,--c;if((o-=c)<0&&(o+=this.DB,--b),v)a[g].copyTo(s),v=!1;else{for(;c>1;)i.sqrTo(s,A),i.sqrTo(A,s),c-=2;c>0?i.sqrTo(s,A):(y=s,s=A,A=y),i.mulTo(A,a[g],s)}for(;b>=0&&0==(e[b]&1<=0?(n.subTo(i,n),t&&o.subTo(a,o),s.subTo(c,s)):(i.subTo(n,i),t&&a.subTo(o,a),c.subTo(s,c))}return 0!=i.compareTo(r.ONE)?r.ZERO:c.compareTo(e)>=0?c.subtract(e):c.signum()<0?(c.addTo(e,c),c.signum()<0?c.add(e):c):c},r.prototype.pow=function(e){return this.exp(e,new w)},r.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var i=t.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return t;for(i0&&(t.rShiftTo(o,t),r.rShiftTo(o,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},r.prototype.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r[0]<=C[C.length-1]){for(t=0;t>>8,_[x++]=255&R;x=0,B()}function P(){if(null==S){for(B(),(S=new D).init(_),x=0;x<_.length;++x)_[x]=0;x=0}return S.next()}function M(){}function D(){this.i=0,this.j=0,this.S=new Array}M.prototype.nextBytes=function(e){var t;for(t=0;ti)return r;do{t%2&&(r+=e),(t=M(t/2))&&(e+=e)}while(t);return r}function U(e){if("string"==typeof e)return e;if(K(e))return O?O.call(e):"";var t=e+"";return"0"==t&&1/e==-n?"-0":t}function j(e,t,r){var n=e.length;return r=void 0===r?n:r,!t&&r>=n?e:function(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n-1&&e%1==0&&e<=n}(e.length)&&!function(e){var t=S(e)?b.call(e):"";return t==s||t==a}(e)}(r)&&function(e,t){return!!(t=null==t?n:t)&&("number"==typeof e||h.test(e))&&e>-1&&e%1==0&&en)return r;do{t%2&&(r+=e),(t=A(t/2))&&(e+=e)}while(t);return r}(C(e),t)}}).call(this,r(12))},function(e,t,r){"use strict";var n=r(85).sprintf,i=t.spanAllZeroes=function(e){return e.replace(/(0+)/g,'$1')};function o(e){return e.replace(/^(0+)/,'$1')}t.spanAll=function(e,t){return void 0===t&&(t=0),e.split("").map(function(e,r){return n('%s',e,r+t,i(e))}).join("")},t.spanLeadingZeroes=function(e){return e.split(":").map(function(e){return o(e)}).join(":")},t.simpleGroup=function(e,t){var r=e.split(":");return t||(t=0),r.map(function(e,r){return/group-v4/.test(e)?e:n('%s',r+t,o(e))}).join(":")}},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,r){"use strict";(function(e,r){t.toCallback=(t=>(function(r,n){let i;try{i=t(r)}catch(t){return void e.nextTick(n,t)}e.nextTick(n,null,i)})),t.toBuf=((e,t)=>n=>{let i=e(n,t);return r.from(i,"hex")}),t.fromString=((e,t)=>n=>{const i=r.isBuffer(n)?n.toString():n;return e(i,t)}),t.fromNumberTo32BitBuf=((e,t)=>n=>{let i=e(n,t);const o=new Array(4);for(let e=0;e<4;e++)o[e]=255&i,i>>=8;return r.from(o)})}).call(this,r(4),r(0).Buffer)},function(e,t){e.exports=function(e){return e&&"function"==typeof e.then}},function(e,t,r){(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+" = ",o=0;o{n([t=>o.deserialize(e,t),(e,n)=>{if(!t)return r(null,{value:e,remainderPath:""});const i=t.split("/");if("Links"===i[0]){let t="";if(!i[1])return n(null,{value:e.links.map(e=>e.toJSON()),remainderPath:""});const r={};e.links.forEach((e,t)=>{const n=e.toJSON();r[t]=r[n.name]={hash:n.multihash,name:n.name,size:n.size}});let o=r[i[1]];"Hash"===i[2]?o={"/":o.hash}:"Tsize"===i[2]?o=o.size:"Name"===i[2]&&(o=o.name),n(null,{value:o,remainderPath:t=i.slice(3).join("/")})}else if("Data"===i[0])n(null,{value:e.data,remainderPath:""});else{const t={};e.links.forEach((e,r)=>{const n=e.toJSON();t[n.name]={hash:n.multihash,name:n.name,size:n.size}});const r=t[i[0]];if(r)return n(null,{value:{"/":r.hash},remainderPath:i.slice(1).join("/")});n(new Error("path not available"))}}],r)}),t.tree=((e,t,r)=>{"function"==typeof t&&(r=t,t={}),t=t||{},o.deserialize(e,(e,t)=>{if(e)return r(e);const n=[];n.push("Links"),t.links.forEach((e,t)=>{n.push(`Links/${t}/Name`),n.push(`Links/${t}/Tsize`),n.push(`Links/${t}/Hash`)}),n.push("Data"),r(null,n)})}),t.isLink=((e,r,n)=>{t.resolve(e,r,(e,t)=>{if(e)return n(e);if(t.remainderPath.length>0)return n(new Error("path out of scope"));if("object"==typeof t.value&&t.value["/"]){let r;try{r=i.isCID(new i(t.value["/"]))}catch(e){r=!1}if(r)return n(null,t.value)}n(null,!1)})})},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,r,n){if(!function(e){var t=Object.prototype.toString.call(e);return"[object Object]"===t||"[object Array]"===t}(t))return t;if(Array.isArray(t))return t.map(function(t,i){return r(t)?n(t):e(t,r,n)});return Object.keys(t).reduce(function(i,o){return i[o]=r(t[o])?n(t[o]):e(t[o],r,n),i},{})}},function(e,t,r){"use strict";(function(e){const n=r(134),i=r(135)(),o=r(388),s={SHA1:"SHA-1",SHA256:"SHA-256",SHA512:"SHA-512"};t.create=function(t,r,a){const c=s[t];n(i.subtle.importKey("raw",r,{name:"HMAC",hash:{name:c}},!1,["sign"]).then(r=>({digest(t,o){((t,r,o)=>{n(i.subtle.sign({name:"HMAC"},t,r).then(t=>e.from(t)),o)})(r,t,o)},length:o[t]})),a)}}).call(this,r(0).Buffer)},function(e,t){ /** - * @license - * lodash 3.10.1 (Custom Build) - * Build: `lodash modern -d -o ./index.js` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */(function(){var o,s,a,c="3.10.1",u=1,f=2,l=4,h=8,p=16,d=32,g=64,b=128,m=256,y=30,v="...",w=150,A=16,_=200,S=1,E=2,k="Expected a function",x="__lodash_placeholder__",C="[object Arguments]",I="[object Array]",B="[object Boolean]",T="[object Date]",R="[object Error]",P="[object Function]",O="[object Number]",M="[object Object]",N="[object RegExp]",D="[object String]",K="[object ArrayBuffer]",U="[object Float32Array]",j="[object Float64Array]",F="[object Int8Array]",L="[object Int16Array]",z="[object Int32Array]",H="[object Uint8Array]",q="[object Uint8ClampedArray]",V="[object Uint16Array]",G="[object Uint32Array]",W=/\b__p \+= '';/g,Y=/\b(__p \+=) '' \+/g,J=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Z=/&(?:amp|lt|gt|quot|#39|#96);/g,Q=/[&<>"'`]/g,X=RegExp(Z.source),$=RegExp(Q.source),ee=/<%-([\s\S]+?)%>/g,te=/<%([\s\S]+?)%>/g,re=/<%=([\s\S]+?)%>/g,ne=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,ie=/^\w*$/,oe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,se=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,ae=RegExp(se.source),ce=/[\u0300-\u036f\ufe20-\ufe23]/g,ue=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,le=/\w*$/,he=/^0[xX]/,pe=/^\[object .+?Constructor\]$/,de=/^\d+$/,ge=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,be=/($^)/,me=/['\n\r\u2028\u2029\\]/g,ye=(s="[A-Z\\xc0-\\xd6\\xd8-\\xde]",a="[a-z\\xdf-\\xf6\\xf8-\\xff]+",RegExp(s+"+(?="+s+a+")|"+s+"?"+a+"|"+s+"+|[0-9]+","g")),ve=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],we=-1,Ae={};Ae[U]=Ae[j]=Ae[F]=Ae[L]=Ae[z]=Ae[H]=Ae[q]=Ae[V]=Ae[G]=!0,Ae[C]=Ae[I]=Ae[K]=Ae[B]=Ae[T]=Ae[R]=Ae[P]=Ae["[object Map]"]=Ae[O]=Ae[M]=Ae[N]=Ae["[object Set]"]=Ae[D]=Ae["[object WeakMap]"]=!1;var _e={};_e[C]=_e[I]=_e[K]=_e[B]=_e[T]=_e[U]=_e[j]=_e[F]=_e[L]=_e[z]=_e[O]=_e[M]=_e[N]=_e[D]=_e[H]=_e[q]=_e[V]=_e[G]=!0,_e[R]=_e[P]=_e["[object Map]"]=_e["[object Set]"]=_e["[object WeakMap]"]=!1;var Se={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Ee={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},ke={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},xe={function:!0,object:!0},Ce={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Ie={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Be=xe[typeof t]&&t&&!t.nodeType&&t,Te=xe[typeof e]&&e&&!e.nodeType&&e,Re=Be&&Te&&"object"==typeof n&&n&&n.Object&&n,Pe=xe[typeof self]&&self&&self.Object&&self,Oe=xe[typeof window]&&window&&window.Object&&window,Me=(Te&&Te.exports,Re||Oe!==(this&&this.window)&&Oe||Pe||this);function Ne(e,t){if(e!==t){var r=null===e,n=e===o,i=e==e,s=null===t,a=t===o,c=t==t;if(e>t&&!s||!i||r&&!a&&c||n&&c)return 1;if(e-1;);return r}function Le(e,t){for(var r=e.length;r--&&t.indexOf(e.charAt(r))>-1;);return r}function ze(e,t){return Ne(e.criteria,t.criteria)||e.index-t.index}function He(e){return Se[e]}function qe(e){return Ee[e]}function Ve(e,t,r){return t?e=Ce[e]:r&&(e=Ie[e]),"\\"+e}function Ge(e){return"\\"+Ie[e]}function We(e,t,r){for(var n=e.length,i=t+(r?0:-1);r?i--:++i=9&&e<=13||32==e||160==e||5760==e||6158==e||e>=8192&&(e<=8202||8232==e||8233==e||8239==e||8287==e||12288==e||65279==e)}function Ze(e,t){for(var r=-1,n=e.length,i=-1,o=[];++r>>1,Bt=9007199254740991,Tt=ht&&new ht,Rt={};function Pt(e){if(Ye(e)&&!Gi(e)&&!(e instanceof Nt)){if(e instanceof Mt)return e;if(Pe.call(e,"__chain__")&&Pe.call(e,"__wrapped__"))return Dn(e)}return new Mt(e)}function Ot(){}function Mt(e,t,r){this.__wrapped__=e,this.__actions__=r||[],this.__chain__=!!t}Pt.support={};function Nt(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=kt,this.__views__=[]}function Dt(){this.__data__={}}function Kt(e){var t=e?e.length:0;for(this.data={hash:dt(null),set:new ct};t--;)this.push(e[t])}function Ut(e,t){var r=e.data;return("string"==typeof t||Zi(t)?r.set.has(t):r.hash[t])?0:-1}function jt(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n=_?Hr(t):null,c=t.length;a&&(o=Ut,s=!1,t=a);e:for(;++iu))return!1;for(;++cs?0:s+t),(n=n===o||n>s?s:+n||0)<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var a=r(s);++i=a)return c;var u=r[n];return c*("asc"===u||!0===u?1:-1)}}return e.index-t.index}(e,t,r)})}function Br(e,t){var r=-1,n=gn(),i=e.length,o=n==Ke,s=o&&i>=_,a=s?Hr():null,c=[];a?(n=Ut,o=!1):(s=!1,a=t?[]:c);e:for(;++r>>1,s=e[o];(r?s<=t:s2?r[i-2]:o,a=i>2?r[2]:o,c=i>1?r[i-1]:o;for("function"==typeof s?(s=Nr(s,c,5),i-=2):i-=(s="function"==typeof c?c:o)?1:0,a&&_n(r[0],r[1],a)&&(s=i<3?o:s,i=1);++n-1?r[s]:o}return ar(r,n,e)}}function Zr(e){return function(t,r,n){return t&&t.length?De(t,r=hn(r,n,3),e):-1}}function Qr(e){return function(t,r,n){return ar(t,r=hn(r,n,3),e,!0)}}function Xr(e){return function(){for(var t,n=arguments.length,i=e?n:-1,s=0,a=r(n);e?i--:++i=_)return t.plant(r).value();for(var i=0,o=n?a[i].apply(this,e):r;++i=(t=+t)||!mt(t))return"";var i=t-n;return Ro(r=null==r?" ":r+"",pt(i/r.length)).slice(0,i)}function un(e){var t=a[e];return function(e,r){return(r=r===o?0:+r||0)?(r=st(10,r),t(e*r)/r):t(e)}}function fn(e){return function(t,r,n,i){var o=hn(n);return null==n&&o===Xt?Or(t,r,e):Mr(t,r,o(n,i,1),e)}}function ln(e,t,n,i,s,a,c,p){var y=t&f;if(!y&&"function"!=typeof e)throw new Ce(k);var v=i?i.length:0;if(v||(t&=~(d|g),i=s=o),v-=s?s.length:0,t&g){var w=i,A=s;i=s=o}var _=y?o:pn(e),S=[e,t,n,i,s,w,A,a,c,p];if(_&&(function(e,t){var r=e[1],n=t[1],i=r|n,o=i-1&&e%1==0&&e-1&&e%1==0&&e<=Bt}function xn(e){return e==e&&!Zi(e)}function Cn(e,t){e=Mn(e);for(var r=-1,n=t.length,i={};++r0){if(++Bn>=w)return e}else Bn=0;return Er(e,t)});function Pn(e){for(var t=vo(e),r=t.length,n=r&&e.length,i=!!n&&kn(n)&&(Gi(e)||Vi(e)),o=-1,s=[];++o=120?Hr(n&&c):null}var u=e[0],f=-1,l=u?u.length:0,h=i[0];e:for(;++f2?e[t-2]:o,n=t>1?e[t-1]:o;return t>2&&"function"==typeof r?t-=2:(r=t>1&&"function"==typeof n?(--t,n):o,n=o),e.length=t,$n(e,r,n)});function ii(e){var t=Pt(e);return t.__chain__=!0,t}function oi(e,t,r){return t.call(r,e)}var si=Hi(function(e){return e=cr(e),this.thru(function(t){return function(e,t){for(var n=-1,i=e.length,o=-1,s=t.length,a=r(i+s);++n-1:!!i&&gn(e,t,r)>-1}var mi=jr(function(e,t,r){e[r]=t}),yi=Hi(function(e,t,n){var i=-1,s="function"==typeof t,a=Sn(t),c=wn(e)?r(e.length):[];return nr(e,function(e){var r=s?t:a&&null!=e?e[t]:o;c[++i]=r?r.apply(e,n):vn(e,t,n)}),c});function vi(e,t,r){return(Gi(e)?Ht:yr)(e,t=hn(t,r,3))}var wi=jr(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]});var Ai=sn(Vt,nr),_i=sn(function(e,t,r,n){var i=e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r},ir);function Si(e,t,r){if(r?_n(e,t,r):null==t)return(n=(e=On(e)).length)>0?e[Sr(0,n-1)]:o;var n,i=-1,s=io(e),a=(n=s.length)-1;for(t=wt(t<0?0:+t||0,n);++i0&&(r=t.apply(this,arguments)),e<=1&&(t=o),r}}var Ii=Hi(function(e,t,r){var n=u;if(r.length){var i=Ze(r,Ii.placeholder);n|=d}return ln(e,n,t,r,i)}),Bi=Hi(function(e,t){for(var r=-1,n=(t=t.length?cr(t):mo(e)).length;++rt?g(f,i):u=ut(b,e)}function m(){g(p,u)}function y(){if(n=arguments,a=xi(),c=this,f=p&&(u||!d),!1===h)var r=d&&!u;else{i||d||(l=a);var g=h-(a-l),y=g<=0||g>h;y?(i&&(i=it(i)),l=a,s=e.apply(c,n)):i||(i=ut(m,g))}return y&&u?u=it(u):u||t===h||(u=ut(b,t)),r&&(y=!0,s=e.apply(c,n)),!y||u||i||(n=c=o),s}return y.cancel=function(){u&&it(u),i&&it(i),l=0,i=u=f=o},y}var Mi=Hi(function(e,t){return tr(e,1,t)}),Ni=Hi(function(e,t,r){return tr(e,t,r)}),Di=Xr(),Ki=Xr(!0);function Ui(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new Ce(k);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s),s};return r.cache=new Ui.Cache,r}var ji=Hi(function(e,t){if(t=cr(t),"function"!=typeof e||!Lt(t,Ue))throw new Ce(k);var r=t.length;return Hi(function(n){for(var i=wt(n.length,r);i--;)n[i]=t[i](n[i]);return e.apply(this,n)})});var Fi=on(d),Li=on(g),zi=Hi(function(e,t){return ln(e,m,o,o,o,cr(t))});function Hi(e,t){if("function"!=typeof e)throw new Ce(k);return t=vt(t===o?e.length-1:+t||0,0),function(){for(var n=arguments,i=-1,o=vt(n.length-t,0),s=r(o);++it}function Vi(e){return Ye(e)&&wn(e)&&Pe.call(e,"callee")&&!at.call(e,"callee")}var Gi=bt||function(e){return Ye(e)&&kn(e.length)&&Je.call(e)==I};function Wi(e,t,r,n){var i=(r="function"==typeof r?Nr(r,n,3):o)?r(e,t):o;return i===o?br(e,t,r):!!i}function Yi(e){return Ye(e)&&"string"==typeof e.message&&Je.call(e)==R}function Ji(e){return Zi(e)&&Je.call(e)==P}function Zi(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Qi(e){return null!=e&&(Ji(e)?rt.test(Re.call(e)):Ye(e)&&pe.test(e))}function Xi(e){return"number"==typeof e||Ye(e)&&Je.call(e)==O}function $i(e){var t,r;return!(!Ye(e)||Je.call(e)!=M||Vi(e)||!(Pe.call(e,"constructor")||"function"!=typeof(t=e.constructor)||t instanceof t))&&(lr(e,function(e,t){r=t}),r===o||Pe.call(e,r))}function eo(e){return Zi(e)&&Je.call(e)==N}function to(e){return"string"==typeof e||Ye(e)&&Je.call(e)==D}function ro(e){return Ye(e)&&kn(e.length)&&!!Ae[Je.call(e)]}function no(e,t){return e0;++ii?0:i+r),(n=n===o||n>i?i:+n||0)<0&&(n+=i),i=r>n?0:n>>>0,r>>>=0;r-1;)ft.call(t,o,1);return t},Pt.pullAt=Gn,Pt.range=function(e,t,n){n&&_n(e,t,n)&&(t=n=o),e=+e||0,null==t?(t=e,e=0):t=+t||0;for(var i=-1,s=vt(pt((t-e)/((n=null==n?1:+n||0)||1)),0),a=r(s);++i=0&&e.indexOf(t,r)==r},Pt.escape=function(e){return(e=je(e))&&$.test(e)?e.replace(Q,qe):e},Pt.escapeRegExp=function(e){return(e=je(e))&&ae.test(e)?e.replace(se,Ve):e||"(?:)"},Pt.every=ui,Pt.find=li,Pt.findIndex=Fn,Pt.findKey=fo,Pt.findLast=hi,Pt.findLastIndex=Ln,Pt.findLastKey=lo,Pt.findWhere=function(e,t){return li(e,vr(t))},Pt.first=zn,Pt.floor=Wo,Pt.get=function(e,t,r){var n=null==e?o:gr(e,Nn(t),t+"");return n===o?r:n},Pt.gt=qi,Pt.gte=function(e,t){return e>=t},Pt.has=function(e,t){if(null==e)return!1;var r=Pe.call(e,t);if(!r&&!Sn(t)){if(null==(e=1==(t=Nn(t)).length?e:gr(e,kr(t,0,-1))))return!1;t=Vn(t),r=Pe.call(e,t)}return r||kn(e.length)&&An(t,e.length)&&(Gi(e)||Vi(e))},Pt.identity=Uo,Pt.includes=bi,Pt.indexOf=Hn,Pt.inRange=function(e,t,r){return t=+t||0,r===o?(r=t,t=0):r=+r||0,e>=wt(t,r)&&e=t||!mt(t))return e;var i=(t-n)/2,o=gt(i);return(r=cn("",pt(i),r)).slice(0,o)+e+r},Pt.padLeft=Bo,Pt.padRight=To,Pt.parseInt=function(e,t,r){return(r?_n(e,t,r):null==t)?t=0:t&&(t=+t),e=Mo(e),_t(e,t||(he.test(e)?16:10))},Pt.random=function(e,t,r){r&&_n(e,t,r)&&(t=r=o);var n=null==e,i=null==t;if(null==r&&(i&&"boolean"==typeof e?(r=e,e=1):"boolean"==typeof t&&(r=t,i=!0)),n&&i&&(t=1,i=!1),e=+e||0,i?(t=e,e=0):t=+t||0,r||e%1||t%1){var s=St();return wt(e+s*(t-e+ot("1e-"+((s+"").length-1))),t)}return Sr(e,t)},Pt.reduce=Ai,Pt.reduceRight=_i,Pt.repeat=Ro,Pt.result=function(e,t,r){var n=null==e?o:e[t];return n===o&&(null==e||Sn(t,e)||(n=null==(e=1==(t=Nn(t)).length?e:gr(e,kr(t,0,-1)))?o:e[Vn(t)]),n=n===o?r:n),Ji(n)?n.call(e):n},Pt.round=Zo,Pt.runInContext=e,Pt.size=function(e){var t=e?bn(e):0;return kn(t)?t:yo(e).length},Pt.snakeCase=Po,Pt.some=Ei,Pt.sortedIndex=Yn,Pt.sortedLastIndex=Jn,Pt.startCase=Oo,Pt.startsWith=function(e,t,r){return e=je(e),r=null==r?0:wt(r<0?0:+r||0,e.length),e.lastIndexOf(t,r)==r},Pt.sum=function(e,t,r){return r&&_n(e,t,r)&&(t=o),1==(t=hn(t,r,3)).length?function(e,t){for(var r=e.length,n=0;r--;)n+=+t(e[r])||0;return n}(Gi(e)?e:On(e),t):function(e,t){var r=0;return nr(e,function(e,n,i){r+=+t(e,n,i)||0}),r}(e,t)},Pt.template=function(e,t,r){var n=Pt.templateSettings;r&&_n(e,t,r)&&(t=r=o),e=je(e),t=Yt(Jt({},r||t),n,Wt);var i,a,c=Yt(Jt({},t.imports),n.imports,Wt),u=yo(c),f=Tr(c,u),l=0,h=t.interpolate||be,p="__p += '",d=ke((t.escape||be).source+"|"+h.source+"|"+(h===re?fe:be).source+"|"+(t.evaluate||be).source+"|$","g"),g="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++we+"]")+"\n";e.replace(d,function(t,r,n,o,s,c){return n||(n=o),p+=e.slice(l,c).replace(me,Ge),r&&(i=!0,p+="' +\n__e("+r+") +\n'"),s&&(a=!0,p+="';\n"+s+";\n__p += '"),n&&(p+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=c+t.length,t}),p+="';\n";var b=t.variable;b||(p="with (obj) {\n"+p+"\n}\n"),p=(a?p.replace(W,""):p).replace(Y,"$1").replace(J,"$1;"),p="function("+(b||"obj")+") {\n"+(b?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var m=Do(function(){return s(u,g+"return "+p).apply(o,f)});if(m.source=p,Yi(m))throw m;return m},Pt.trim=Mo,Pt.trimLeft=function(e,t,r){var n=e;return(e=je(e))?(r?_n(n,t,r):null==t)?e.slice(Qe(e)):e.slice(Fe(e,t+"")):e},Pt.trimRight=function(e,t,r){var n=e;return(e=je(e))?(r?_n(n,t,r):null==t)?e.slice(0,Xe(e)+1):e.slice(0,Le(e,t+"")+1):e},Pt.trunc=function(e,t,r){r&&_n(e,t,r)&&(t=o);var n=y,i=v;if(null!=t)if(Zi(t)){var s="separator"in t?t.separator:s;n="length"in t?+t.length||0:n,i="omission"in t?je(t.omission):i}else n=+t||0;if(n>=(e=je(e)).length)return e;var a=n-i.length;if(a<1)return i;var c=e.slice(0,a);if(null==s)return c+i;if(eo(s)){if(e.slice(a).search(s)){var u,f,l=e.slice(0,a);for(s.global||(s=ke(s.source,(le.exec(s)||"")+"g")),s.lastIndex=0;u=s.exec(l);)f=u.index;c=c.slice(0,null==f?a:f)}}else if(e.indexOf(s,a)!=a){var h=c.lastIndexOf(s);h>-1&&(c=c.slice(0,h))}return c+i},Pt.unescape=function(e){return(e=je(e))&&X.test(e)?e.replace(Z,$e):e},Pt.uniqueId=function(e){var t=++Oe;return je(e)+t},Pt.words=No,Pt.all=ui,Pt.any=Ei,Pt.contains=bi,Pt.eq=Wi,Pt.detect=li,Pt.foldl=Ai,Pt.foldr=_i,Pt.head=zn,Pt.include=bi,Pt.inject=Ai,zo(Pt,(Vo={},hr(Pt,function(e,t){Pt.prototype[t]||(Vo[t]=e)}),Vo),!1),Pt.sample=Si,Pt.prototype.sample=function(e){return this.__chain__||null!=e?this.thru(function(t){return Si(t,e)}):Si(this.value())},Pt.VERSION=c,Ft(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Pt[e].placeholder=Pt}),Ft(["drop","take"],function(e,t){Nt.prototype[e]=function(r){var n=this.__filtered__;if(n&&!t)return new Nt(this);r=null==r?1:vt(gt(r)||0,0);var i=this.clone();return n?i.__takeCount__=wt(i.__takeCount__,r):i.__views__.push({size:r,type:e+(i.__dir__<0?"Right":"")}),i},Nt.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Ft(["filter","map","takeWhile"],function(e,t){var r=t+1,n=r!=E;Nt.prototype[e]=function(e,t){var i=this.clone();return i.__iteratees__.push({iteratee:hn(e,t,1),type:r}),i.__filtered__=i.__filtered__||n,i}}),Ft(["first","last"],function(e,t){var r="take"+(t?"Right":"");Nt.prototype[e]=function(){return this[r](1).value()[0]}}),Ft(["initial","rest"],function(e,t){var r="drop"+(t?"":"Right");Nt.prototype[e]=function(){return this.__filtered__?new Nt(this):this[r](1)}}),Ft(["pluck","where"],function(e,t){var r=t?"filter":"map",n=t?vr:qo;Nt.prototype[e]=function(e){return this[r](n(e))}}),Nt.prototype.compact=function(){return this.filter(Uo)},Nt.prototype.reject=function(e,t){return e=hn(e,t,1),this.filter(function(t){return!e(t)})},Nt.prototype.slice=function(e,t){e=null==e?0:+e||0;var r=this;return r.__filtered__&&(e>0||t<0)?new Nt(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==o&&(r=(t=+t||0)<0?r.dropRight(-t):r.take(t-e)),r)},Nt.prototype.takeRightWhile=function(e,t){return this.reverse().takeWhile(e,t).reverse()},Nt.prototype.toArray=function(){return this.take(kt)},hr(Nt.prototype,function(e,t){var r=/^(?:filter|map|reject)|While$/.test(t),n=/^(?:first|last)$/.test(t),i=Pt[n?"take"+("last"==t?"Right":""):t];i&&(Pt.prototype[t]=function(){var t=n?[1]:arguments,s=this.__chain__,a=this.__wrapped__,c=!!this.__actions__.length,u=a instanceof Nt,f=t[0],l=u||Gi(a);l&&r&&"function"==typeof f&&1!=f.length&&(u=l=!1);var h=function(e){return n&&s?i(e,1)[0]:i.apply(o,qt([e],t))},p={func:oi,args:[h],thisArg:o},d=u&&!c;if(n&&!s)return d?((a=a.clone()).__actions__.push(p),e.call(a)):i.call(o,this.value())[0];if(!n&&l){a=d?a:new Nt(this);var g=e.apply(a,t);return g.__actions__.push(p),new Mt(g,s)}return this.thru(h)})}),Ft(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(e){var t=(/^(?:replace|split)$/.test(e)?Te:Ie)[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:join|pop|replace|shift)$/.test(e);Pt.prototype[e]=function(){var e=arguments;return n&&!this.__chain__?t.apply(this.value(),e):this[r](function(r){return t.apply(r,e)})}}),hr(Nt.prototype,function(e,t){var r=Pt[t];if(r){var n=r.name;(Rt[n]||(Rt[n]=[])).push({name:t,func:r})}}),Rt[an(o,f).name]=[{name:"wrapper",func:o}],Nt.prototype.clone=function(){var e=new Nt(this.__wrapped__);return e.__actions__=jt(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=jt(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=jt(this.__views__),e},Nt.prototype.reverse=function(){if(this.__filtered__){var e=new Nt(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Nt.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Gi(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},r(432),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(12))},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";e.exports=function e(t){var r=arguments.length;if("function"==typeof t&&1===t.length){for(var n=new Array(r),i=0;i=f.OP_1&&e<=f.OP_16||e===f.OP_1NEGATE)}(e)}function d(e){return c.Array(e)&&e.every(p)}function g(e){return 0===e.length?f.OP_0:1===e.length?e[0]>=1&&e[0]<=16?h+e[0]:129===e[0]?f.OP_1NEGATE:void 0:void 0}function b(e){if(n.isBuffer(e))return e;a(c.Array,e);const t=e.reduce(function(e,t){return n.isBuffer(t)?1===t.length&&void 0!==g(t)?e+1:e+s.encodingLength(t.length)+t.length:e+1},0),r=n.allocUnsafe(t);let i=0;if(e.forEach(function(e){if(n.isBuffer(e)){const t=g(e);if(void 0!==t)return r.writeUInt8(t,i),void(i+=1);i+=s.encode(r,e.length,i),e.copy(r,i),i+=e.length}else r.writeUInt8(e,i),i+=1}),i!==r.length)throw new Error("Could not decode chunks");return r}function m(e){if(c.Array(e))return e;a(c.Buffer,e);const t=[];let r=0;for(;rf.OP_0&&n<=f.OP_PUSHDATA4){const n=s.decode(e,r);if(null===n)return null;if((r+=n.size)+n.number>e.length)return null;const i=e.slice(r,r+n.number);r+=n.number;const o=g(i);void 0!==o?t.push(o):t.push(i)}else t.push(n),r+=1}return t}function y(e){const t=-129&e;return t>0&&t<4}e.exports={compile:b,decompile:m,fromASM:function(e){return a(c.String,e),b(e.split(" ").map(function(e){return void 0!==f[e]?f[e]:(a(c.Hex,e),n.from(e,"hex"))}))},toASM:function(e){return n.isBuffer(e)&&(e=m(e)),e.map(function(e){if(n.isBuffer(e)){const t=g(e);if(void 0===t)return e.toString("hex");e=t}return l[e]}).join(" ")},toStack:function(e){return e=m(e),a(d,e),e.map(function(e){return n.isBuffer(e)?e:e===f.OP_0?n.allocUnsafe(0):u.encode(e-h)})},number:r(961),signature:r(1814),isCanonicalPubKey:function(e){return o.isPoint(e)},isCanonicalScriptSignature:function(e){return!!n.isBuffer(e)&&!!y(e[e.length-1])&&i.check(e.slice(0,-1))},isPushOnly:d,isDefinedHashType:y}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";(function(t){var n=r(0),i=r(20),o=r(62),s=r(32);function a(e,t){if(e.length!==t.length)return!1;for(var r=e.length,n=0;n>24&255),r.push(e>>16&255),r.push(e>>8&255),r.push(255&e),new t(r)},integerFromBuffer:function(e){return s.checkArgumentType(e,"Buffer","buffer"),e[0]<<24|e[1]<<16|e[2]<<8|e[3]},integerFromSingleByteBuffer:function(e){return s.checkArgumentType(e,"Buffer","buffer"),e[0]},bufferToHex:function(e){return s.checkArgumentType(e,"Buffer","buffer"),e.toString("hex")},reverse:function(e){for(var t=new n.Buffer(e.length),r=0;r"}toJSON(){return{id:this.toB58String(),privKey:u(this.marshalPrivKey()),pubKey:u(this.marshalPubKey())}}toHexString(){return i.toHexString(this.id)}toBytes(){return this.id}toB58String(){return this._idB58String}isEqual(e){if(n.isBuffer(e))return this.id.equals(e);if(e.id)return this.id.equals(e.id);throw new Error("not valid Id")}isValid(e){this.privKey&&this.privKey.public&&this.privKey.public.bytes&&n.isBuffer(this.pubKey.bytes)&&this.privKey.public.bytes.equals(this.pubKey.bytes)?e():e(new Error("Keys not match"))}},{className:"PeerId",symbolName:"@libp2p/js-peer-id/PeerId"});function u(e){if(e)return e.toString("base64")}(t=e.exports=c).create=function(e,t){"function"==typeof e&&(t=e,e={}),(e=e||{}).bits=e.bits||2048,a([t=>o.keys.generateKeyPair("RSA",e.bits,t),(e,t)=>e.public.hash((r,n)=>{t(r,n,e)})],(e,r,n)=>{if(e)return t(e);t(null,new c(r,n))})},t.createFromHexString=function(e){return new c(i.fromHexString(e))},t.createFromBytes=function(e){return new c(e)},t.createFromB58String=function(e){return new c(i.fromB58String(e))},t.createFromPubKey=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let r;try{let i=e;if("string"==typeof i&&(i=n.from(e,"base64")),!n.isBuffer(i))throw new Error("Supplied key is neither a base64 string nor a buffer");r=o.keys.unmarshalPublicKey(i)}catch(e){return t(e)}r.hash((e,n)=>{if(e)return t(e);t(null,new c(n,null,r))})},t.createFromPrivKey=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let r=e;try{if("string"==typeof r&&(r=n.from(e,"base64")),!n.isBuffer(r))throw new Error("Supplied key is neither a base64 string nor a buffer")}catch(e){return t(e)}a([e=>o.keys.unmarshalPrivateKey(r,e),(e,t)=>e.public.hash((r,n)=>{t(r,n,e)})],(e,r,n)=>{if(e)return t(e);t(null,new c(r,n,n.public))})},t.createFromJSON=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let r,s,u,f;try{r=i.fromB58String(e.id),s=e.privKey&&n.from(e.privKey,"base64"),u=e.pubKey&&n.from(e.pubKey,"base64"),f=u&&o.keys.unmarshalPublicKey(u)}catch(e){return t(e)}s?a([e=>o.keys.unmarshalPrivateKey(s,e),(e,t)=>e.public.hash((r,n)=>{t(r,n,e)}),(e,t,r)=>{f?f.hash((n,i)=>{r(n,e,t,i)}):r(null,e,t)}],(e,n,i,o)=>e?t(e):f&&!n.equals(o)?t(new Error("Public and private key do not match")):r&&!n.equals(r)?t(new Error("Id and private key do not match")):void t(null,new c(r,i,f))):t(null,new c(r,null,f))},t.isPeerId=function(e){return Boolean("object"==typeof e&&e._id&&e._idB58String)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";e.exports=r(388)},function(e,t,r){var n=r(8);r(81),r(248),r(249),r(13),n.random&&n.random.getBytes?e.exports=n.random:function(t){var r={},i=new Array(4),o=n.util.createBuffer();function s(){var e=n.prng.create(r);return e.getBytes=function(t,r){return e.generate(t,r)},e.getBytesSync=function(t){return e.generate(t)},e}r.formatKey=function(e){var t=n.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),n.aes._expandKey(e,!1)},r.formatSeed=function(e){var t=n.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),e},r.cipher=function(e,t){return n.aes._updateBlock(e,t,i,!1),o.putInt32(i[0]),o.putInt32(i[1]),o.putInt32(i[2]),o.putInt32(i[3]),o.getBytes()},r.increment=function(e){return++e[3],e},r.md=n.md.sha256;var a=s(),c=null;if("undefined"!=typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(c=function(e){return u.getRandomValues(e)})}if(n.options.usePureJavaScript||!n.util.isNodejs&&!c){if("undefined"==typeof window||window.document,a.collectInt(+new Date,32),"undefined"!=typeof navigator){var f="";for(var l in navigator)try{"string"==typeof navigator[l]&&(f+=navigator[l])}catch(e){}a.collect(f),f=null}t&&(t().mousemove(function(e){a.collectInt(e.clientX,16),a.collectInt(e.clientY,16)}),t().keypress(function(e){a.collectInt(e.charCode,8)}))}if(n.random)for(var l in a)n.random[l]=a[l];else n.random=a;n.random.createInstance=s,e.exports=n.random}("undefined"!=typeof jQuery?jQuery:null)},function(e,t,r){(function(e,r){var n=200,i="Expected a function",o="__lodash_hash_undefined__",s=1,a=2,c=1/0,u=9007199254740991,f="[object Arguments]",l="[object Array]",h="[object Boolean]",p="[object Date]",d="[object Error]",g="[object Function]",b="[object GeneratorFunction]",m="[object Map]",y="[object Number]",v="[object Object]",w="[object RegExp]",A="[object Set]",_="[object String]",S="[object Symbol]",E="[object ArrayBuffer]",k="[object DataView]",x=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,C=/^\w*$/,I=/^\./,B=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,T=/\\(\\)?/g,R=/^\[object .+?Constructor\]$/,P=/^(?:0|[1-9]\d*)$/,O={};O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O[f]=O[l]=O[E]=O[h]=O[k]=O[p]=O[d]=O[g]=O[m]=O[y]=O[v]=O[w]=O[A]=O[_]=O["[object WeakMap]"]=!1;var M="object"==typeof e&&e&&e.Object===Object&&e,N="object"==typeof self&&self&&self.Object===Object&&self,D=M||N||Function("return this")(),K=t&&!t.nodeType&&t,U=K&&"object"==typeof r&&r&&!r.nodeType&&r,j=U&&U.exports===K&&M.process,F=function(){try{return j&&j.binding("util")}catch(e){}}(),L=F&&F.isTypedArray;function z(e,t){for(var r=-1,n=e?e.length:0,i=0,o=[];++r-1},ke.prototype.set=function(e,t){var r=this.__data__,n=Te(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},xe.prototype.clear=function(){this.__data__={hash:new Ee,map:new(le||ke),string:new Ee}},xe.prototype.delete=function(e){return qe(this,e).delete(e)},xe.prototype.get=function(e){return qe(this,e).get(e)},xe.prototype.has=function(e){return qe(this,e).has(e)},xe.prototype.set=function(e,t){return qe(this,e).set(e,t),this},Ce.prototype.add=Ce.prototype.push=function(e){return this.__data__.set(e,o),this},Ce.prototype.has=function(e){return this.__data__.has(e)},Ie.prototype.clear=function(){this.__data__=new ke},Ie.prototype.delete=function(e){return this.__data__.delete(e)},Ie.prototype.get=function(e){return this.__data__.get(e)},Ie.prototype.has=function(e){return this.__data__.has(e)},Ie.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ke){var i=r.__data__;if(!le||i.lengthu))return!1;var l=o.get(e);if(l&&o.get(t))return l==t;var h=-1,p=!0,d=i&s?new Ce:void 0;for(o.set(e,t),o.set(t,e);++h-1&&e%1==0&&e-1&&e%1==0&&e<=u}function at(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ct(e){return!!e&&"object"==typeof e}function ut(e){return"symbol"==typeof e||ct(e)&&ne.call(e)==S}var ft=L?function(e){return function(t){return e(t)}}(L):function(e){return ct(e)&&st(e.length)&&!!O[ne.call(e)]};function lt(e){return it(e)?Be(e):Le(e)}function ht(e){return e}r.exports=function(e,t){return(nt(e)?z:Me)(e,Fe(t))}}).call(this,r(12),r(39)(e))},function(e,t,r){"use strict";var n=t,i=r(0).Buffer,o=r(316);n.toBuffer=function(e,t,r){var n;if(r=~~r,this.isV4Format(e))n=t||new i(r+4),e.split(/\./g).map(function(e){n[r++]=255&parseInt(e,10)});else if(this.isV6Format(e)){var o,s=e.split(":",8);for(o=0;o0;o--)c.push("0");s.splice.apply(s,c)}for(n=t||new i(r+16),o=0;o>8&255,n[r++]=255&u}}if(!n)throw Error("Invalid ip address: "+e);return n},n.toString=function(e,t,r){t=~~t;var n=[];if(4===(r=r||e.length-t)){for(var i=0;i32?"ipv6":c(t))&&(r=16);for(var o=new i(r),s=0,a=o.length;s>u)}return n.toString(o)},n.mask=function(e,t){e=n.toBuffer(e),t=n.toBuffer(t);var r=new i(Math.max(e.length,t.length)),o=0;if(e.length===t.length)for(o=0;oe.length&&(i=t,o=e);var s=i.length-o.length;for(r=s;r>>0},n.fromLong=function(e){return(e>>>24)+"."+(e>>16&255)+"."+(e>>8&255)+"."+(255&e)}},function(e,t,r){"use strict";t.Address4=r(219),t.Address6=r(419),t.v6={helpers:r(224)}},function(e,t,r){t.source=r(180),t.through=r(596),t.sink=r(288),t.duplex=r(325)},function(e){e.exports={OP_FALSE:0,OP_0:0,OP_PUSHDATA1:76,OP_PUSHDATA2:77,OP_PUSHDATA4:78,OP_1NEGATE:79,OP_RESERVED:80,OP_TRUE:81,OP_1:81,OP_2:82,OP_3:83,OP_4:84,OP_5:85,OP_6:86,OP_7:87,OP_8:88,OP_9:89,OP_10:90,OP_11:91,OP_12:92,OP_13:93,OP_14:94,OP_15:95,OP_16:96,OP_NOP:97,OP_VER:98,OP_IF:99,OP_NOTIF:100,OP_VERIF:101,OP_VERNOTIF:102,OP_ELSE:103,OP_ENDIF:104,OP_VERIFY:105,OP_RETURN:106,OP_TOALTSTACK:107,OP_FROMALTSTACK:108,OP_2DROP:109,OP_2DUP:110,OP_3DUP:111,OP_2OVER:112,OP_2ROT:113,OP_2SWAP:114,OP_IFDUP:115,OP_DEPTH:116,OP_DROP:117,OP_DUP:118,OP_NIP:119,OP_OVER:120,OP_PICK:121,OP_ROLL:122,OP_ROT:123,OP_SWAP:124,OP_TUCK:125,OP_CAT:126,OP_SUBSTR:127,OP_LEFT:128,OP_RIGHT:129,OP_SIZE:130,OP_INVERT:131,OP_AND:132,OP_OR:133,OP_XOR:134,OP_EQUAL:135,OP_EQUALVERIFY:136,OP_RESERVED1:137,OP_RESERVED2:138,OP_1ADD:139,OP_1SUB:140,OP_2MUL:141,OP_2DIV:142,OP_NEGATE:143,OP_ABS:144,OP_NOT:145,OP_0NOTEQUAL:146,OP_ADD:147,OP_SUB:148,OP_MUL:149,OP_DIV:150,OP_MOD:151,OP_LSHIFT:152,OP_RSHIFT:153,OP_BOOLAND:154,OP_BOOLOR:155,OP_NUMEQUAL:156,OP_NUMEQUALVERIFY:157,OP_NUMNOTEQUAL:158,OP_LESSTHAN:159,OP_GREATERTHAN:160,OP_LESSTHANOREQUAL:161,OP_GREATERTHANOREQUAL:162,OP_MIN:163,OP_MAX:164,OP_WITHIN:165,OP_RIPEMD160:166,OP_SHA1:167,OP_SHA256:168,OP_HASH160:169,OP_HASH256:170,OP_CODESEPARATOR:171,OP_CHECKSIG:172,OP_CHECKSIGVERIFY:173,OP_CHECKMULTISIG:174,OP_CHECKMULTISIGVERIFY:175,OP_NOP1:176,OP_NOP2:177,OP_CHECKLOCKTIMEVERIFY:177,OP_NOP3:178,OP_CHECKSEQUENCEVERIFY:178,OP_NOP4:179,OP_NOP5:180,OP_NOP6:181,OP_NOP7:182,OP_NOP8:183,OP_NOP9:184,OP_NOP10:185,OP_PUBKEYHASH:253,OP_PUBKEY:254,OP_INVALIDOPCODE:255}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAsync=void 0;var n,i=r(192),o=(n=i)&&n.__esModule?n:{default:n};var s="function"==typeof Symbol;function a(e){return s&&"AsyncFunction"===e[Symbol.toStringTag]}t.default=function(e){return a(e)?(0,o.default)(e):e},t.isAsync=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.functionToJson=function(e){return{__ipfsPostMsgProxyType:"Function",name:e}},t.isFunctionJson=function(e){return e&&"Function"===e.__ipfsPostMsgProxyType}},function(e,t,r){(function(t,n){var i=r(66);e.exports=s,e.exports.source=function(e){return s(null,e)},e.exports.sink=function(e){return s(e,null)};var o=void 0===t?n.nextTick:t;function s(e,t){e&&"object"==typeof e&&(t=e.source,e=e.sink);var r,n,s,a=[],c=[],u=new i;u.writable=u.readable=!0,u.write=function(e){return a.length?a.shift()(null,e):c.push(e),a.length||(n=!0),!!a.length},u.end=function(){t?c.length?d():t(r=!0,a.length?a.shift():function(){}):a.length&&a.shift()(!0)},u.source=function(e,t){c.length?(t(null,c.shift()),c.length||u.emit("drain")):((r=r||e)?t(r):a.push(t),n&&(n=!1,u.emit("drain")))},e&&(s=e(u.source)),s&&!t&&(t=s);var f=[],l=!1,h=!1;if(u.sink=function(e){t=e,o(d)},t){u.sink(t);var p=u.pipe.bind(u);u.pipe=function(e,t){var r=p(e,t);return u.paused&&u.resume(),r}}function d(){if(!1,t&&!h){for(;f.length&&!u.paused;)u.emit("data",f.shift());if(!u.paused){if(l)return u.emit("end");h=!0,t(null,function e(n,i){h=!1,u.paused?(!0===n?l=n:n?u.emit("error",n):f.push(i),!0):n&&!0!==(r=n)?u.emit("error",n):(r=r||n)?u.emit("end"):(u.emit("data",i),h=!0,t(null,e))})}}}return u.pause=function(){return u.paused=!0,u},u.resume=function(){return u.paused=!1,d(),u},u.destroy=function(){!r&&t&&t(r=!0,function(){}),r=!0,a.length&&a.shift()(!0),u.emit("close")},u}}).call(this,r(35).setImmediate,r(6))},function(e,t,r){"use strict";var n=r(27).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=f,this.end=l,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function f(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,r){(function(e){function r(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===r(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===r(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===r(e)},t.isError=function(e){return"[object Error]"===r(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,r(0).Buffer)},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s=r(1919).Buffer}catch(e){}function a(e,t,r){for(var n=0,i=Math.min(e.length,r),o=t;o=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function c(e,t,r,n){for(var i=0,o=Math.min(e.length,r),s=t;s=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=a(e,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==t&&(i=a(e,t,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,c=s/67108864|0;r.words[0]=a;for(var u=1;u>>26,l=67108863&c,h=Math.min(u,t.length-1),p=Math.max(0,u-e.length+1);p<=h;p++){var d=u-p|0;f+=(s=(i=0|e.words[d])*(o=0|t.words[p])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,c=0|f}return 0!==c?r.words[u]=0|c:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s>>24-i&16777215)||s!==this.length-1?u[6-c.length]+c+r:c+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var h=f[e],p=l[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modn(p).toString(e);r=(d=d.idivn(p)).isZero()?g+r:u[h-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==s),this.toArrayLike(s,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,c="le"===t,u=new e(o),f=this.clone();if(c){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),u[a]=s;for(;a=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==o&&s>26,this.words[s]=67108863&t;if(0===o&&s>>13,p=0|s[1],d=8191&p,g=p>>>13,b=0|s[2],m=8191&b,y=b>>>13,v=0|s[3],w=8191&v,A=v>>>13,_=0|s[4],S=8191&_,E=_>>>13,k=0|s[5],x=8191&k,C=k>>>13,I=0|s[6],B=8191&I,T=I>>>13,R=0|s[7],P=8191&R,O=R>>>13,M=0|s[8],N=8191&M,D=M>>>13,K=0|s[9],U=8191&K,j=K>>>13,F=0|a[0],L=8191&F,z=F>>>13,H=0|a[1],q=8191&H,V=H>>>13,G=0|a[2],W=8191&G,Y=G>>>13,J=0|a[3],Z=8191&J,Q=J>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ce=8191&ae,ue=ae>>>13,fe=0|a[8],le=8191&fe,he=fe>>>13,pe=0|a[9],de=8191&pe,ge=pe>>>13;r.negative=e.negative^t.negative,r.length=19;var be=(u+(n=Math.imul(l,L))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(h,L)|0))<<13)|0;u=((o=Math.imul(h,z))+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(d,L),i=(i=Math.imul(d,z))+Math.imul(g,L)|0,o=Math.imul(g,z);var me=(u+(n=n+Math.imul(l,q)|0)|0)+((8191&(i=(i=i+Math.imul(l,V)|0)+Math.imul(h,q)|0))<<13)|0;u=((o=o+Math.imul(h,V)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,L),i=(i=Math.imul(m,z))+Math.imul(y,L)|0,o=Math.imul(y,z),n=n+Math.imul(d,q)|0,i=(i=i+Math.imul(d,V)|0)+Math.imul(g,q)|0,o=o+Math.imul(g,V)|0;var ye=(u+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(h,W)|0))<<13)|0;u=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,L),i=(i=Math.imul(w,z))+Math.imul(A,L)|0,o=Math.imul(A,z),n=n+Math.imul(m,q)|0,i=(i=i+Math.imul(m,V)|0)+Math.imul(y,q)|0,o=o+Math.imul(y,V)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,Y)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,Y)|0;var ve=(u+(n=n+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,Q)|0)+Math.imul(h,Z)|0))<<13)|0;u=((o=o+Math.imul(h,Q)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(S,L),i=(i=Math.imul(S,z))+Math.imul(E,L)|0,o=Math.imul(E,z),n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,V)|0,n=n+Math.imul(m,W)|0,i=(i=i+Math.imul(m,Y)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,Y)|0,n=n+Math.imul(d,Z)|0,i=(i=i+Math.imul(d,Q)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,Q)|0;var we=(u+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(h,$)|0))<<13)|0;u=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,L),i=(i=Math.imul(x,z))+Math.imul(C,L)|0,o=Math.imul(C,z),n=n+Math.imul(S,q)|0,i=(i=i+Math.imul(S,V)|0)+Math.imul(E,q)|0,o=o+Math.imul(E,V)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(m,Z)|0,i=(i=i+Math.imul(m,Q)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,Q)|0,n=n+Math.imul(d,$)|0,i=(i=i+Math.imul(d,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0;var Ae=(u+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(h,re)|0))<<13)|0;u=((o=o+Math.imul(h,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(B,L),i=(i=Math.imul(B,z))+Math.imul(T,L)|0,o=Math.imul(T,z),n=n+Math.imul(x,q)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(C,q)|0,o=o+Math.imul(C,V)|0,n=n+Math.imul(S,W)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Y)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,Q)|0,n=n+Math.imul(m,$)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,ee)|0,n=n+Math.imul(d,re)|0,i=(i=i+Math.imul(d,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0;var _e=(u+(n=n+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,se)|0)+Math.imul(h,oe)|0))<<13)|0;u=((o=o+Math.imul(h,se)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(P,L),i=(i=Math.imul(P,z))+Math.imul(O,L)|0,o=Math.imul(O,z),n=n+Math.imul(B,q)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(T,q)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,Y)|0,n=n+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Q)|0)+Math.imul(E,Z)|0,o=o+Math.imul(E,Q)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(m,re)|0,i=(i=i+Math.imul(m,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0,n=n+Math.imul(d,oe)|0,i=(i=i+Math.imul(d,se)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,se)|0;var Se=(u+(n=n+Math.imul(l,ce)|0)|0)+((8191&(i=(i=i+Math.imul(l,ue)|0)+Math.imul(h,ce)|0))<<13)|0;u=((o=o+Math.imul(h,ue)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(N,L),i=(i=Math.imul(N,z))+Math.imul(D,L)|0,o=Math.imul(D,z),n=n+Math.imul(P,q)|0,i=(i=i+Math.imul(P,V)|0)+Math.imul(O,q)|0,o=o+Math.imul(O,V)|0,n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,Y)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,Q)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,Q)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(m,oe)|0,i=(i=i+Math.imul(m,se)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,se)|0,n=n+Math.imul(d,ce)|0,i=(i=i+Math.imul(d,ue)|0)+Math.imul(g,ce)|0,o=o+Math.imul(g,ue)|0;var Ee=(u+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,he)|0)+Math.imul(h,le)|0))<<13)|0;u=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(U,L),i=(i=Math.imul(U,z))+Math.imul(j,L)|0,o=Math.imul(j,z),n=n+Math.imul(N,q)|0,i=(i=i+Math.imul(N,V)|0)+Math.imul(D,q)|0,o=o+Math.imul(D,V)|0,n=n+Math.imul(P,W)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,Y)|0,n=n+Math.imul(B,Z)|0,i=(i=i+Math.imul(B,Q)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,Q)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(E,re)|0,o=o+Math.imul(E,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,n=n+Math.imul(m,ce)|0,i=(i=i+Math.imul(m,ue)|0)+Math.imul(y,ce)|0,o=o+Math.imul(y,ue)|0,n=n+Math.imul(d,le)|0,i=(i=i+Math.imul(d,he)|0)+Math.imul(g,le)|0,o=o+Math.imul(g,he)|0;var ke=(u+(n=n+Math.imul(l,de)|0)|0)+((8191&(i=(i=i+Math.imul(l,ge)|0)+Math.imul(h,de)|0))<<13)|0;u=((o=o+Math.imul(h,ge)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,q),i=(i=Math.imul(U,V))+Math.imul(j,q)|0,o=Math.imul(j,V),n=n+Math.imul(N,W)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(D,W)|0,o=o+Math.imul(D,Y)|0,n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,Q)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Q)|0,n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,se)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,se)|0,n=n+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(A,ce)|0,o=o+Math.imul(A,ue)|0,n=n+Math.imul(m,le)|0,i=(i=i+Math.imul(m,he)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,he)|0;var xe=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,ge)|0)+Math.imul(g,de)|0))<<13)|0;u=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(U,W),i=(i=Math.imul(U,Y))+Math.imul(j,W)|0,o=Math.imul(j,Y),n=n+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,Q)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,Q)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,se)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,se)|0,n=n+Math.imul(S,ce)|0,i=(i=i+Math.imul(S,ue)|0)+Math.imul(E,ce)|0,o=o+Math.imul(E,ue)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,he)|0;var Ce=(u+(n=n+Math.imul(m,de)|0)|0)+((8191&(i=(i=i+Math.imul(m,ge)|0)+Math.imul(y,de)|0))<<13)|0;u=((o=o+Math.imul(y,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,Z),i=(i=Math.imul(U,Q))+Math.imul(j,Z)|0,o=Math.imul(j,Q),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,se)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,se)|0,n=n+Math.imul(x,ce)|0,i=(i=i+Math.imul(x,ue)|0)+Math.imul(C,ce)|0,o=o+Math.imul(C,ue)|0,n=n+Math.imul(S,le)|0,i=(i=i+Math.imul(S,he)|0)+Math.imul(E,le)|0,o=o+Math.imul(E,he)|0;var Ie=(u+(n=n+Math.imul(w,de)|0)|0)+((8191&(i=(i=i+Math.imul(w,ge)|0)+Math.imul(A,de)|0))<<13)|0;u=((o=o+Math.imul(A,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(U,$),i=(i=Math.imul(U,ee))+Math.imul(j,$)|0,o=Math.imul(j,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(D,re)|0,o=o+Math.imul(D,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,n=n+Math.imul(B,ce)|0,i=(i=i+Math.imul(B,ue)|0)+Math.imul(T,ce)|0,o=o+Math.imul(T,ue)|0,n=n+Math.imul(x,le)|0,i=(i=i+Math.imul(x,he)|0)+Math.imul(C,le)|0,o=o+Math.imul(C,he)|0;var Be=(u+(n=n+Math.imul(S,de)|0)|0)+((8191&(i=(i=i+Math.imul(S,ge)|0)+Math.imul(E,de)|0))<<13)|0;u=((o=o+Math.imul(E,ge)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(U,re),i=(i=Math.imul(U,ne))+Math.imul(j,re)|0,o=Math.imul(j,ne),n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(D,oe)|0,o=o+Math.imul(D,se)|0,n=n+Math.imul(P,ce)|0,i=(i=i+Math.imul(P,ue)|0)+Math.imul(O,ce)|0,o=o+Math.imul(O,ue)|0,n=n+Math.imul(B,le)|0,i=(i=i+Math.imul(B,he)|0)+Math.imul(T,le)|0,o=o+Math.imul(T,he)|0;var Te=(u+(n=n+Math.imul(x,de)|0)|0)+((8191&(i=(i=i+Math.imul(x,ge)|0)+Math.imul(C,de)|0))<<13)|0;u=((o=o+Math.imul(C,ge)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,oe),i=(i=Math.imul(U,se))+Math.imul(j,oe)|0,o=Math.imul(j,se),n=n+Math.imul(N,ce)|0,i=(i=i+Math.imul(N,ue)|0)+Math.imul(D,ce)|0,o=o+Math.imul(D,ue)|0,n=n+Math.imul(P,le)|0,i=(i=i+Math.imul(P,he)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,he)|0;var Re=(u+(n=n+Math.imul(B,de)|0)|0)+((8191&(i=(i=i+Math.imul(B,ge)|0)+Math.imul(T,de)|0))<<13)|0;u=((o=o+Math.imul(T,ge)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(U,ce),i=(i=Math.imul(U,ue))+Math.imul(j,ce)|0,o=Math.imul(j,ue),n=n+Math.imul(N,le)|0,i=(i=i+Math.imul(N,he)|0)+Math.imul(D,le)|0,o=o+Math.imul(D,he)|0;var Pe=(u+(n=n+Math.imul(P,de)|0)|0)+((8191&(i=(i=i+Math.imul(P,ge)|0)+Math.imul(O,de)|0))<<13)|0;u=((o=o+Math.imul(O,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,le),i=(i=Math.imul(U,he))+Math.imul(j,le)|0,o=Math.imul(j,he);var Oe=(u+(n=n+Math.imul(N,de)|0)|0)+((8191&(i=(i=i+Math.imul(N,ge)|0)+Math.imul(D,de)|0))<<13)|0;u=((o=o+Math.imul(D,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863;var Me=(u+(n=Math.imul(U,de))|0)+((8191&(i=(i=Math.imul(U,ge))+Math.imul(j,de)|0))<<13)|0;return u=((o=Math.imul(j,ge))+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,c[0]=be,c[1]=me,c[2]=ye,c[3]=ve,c[4]=we,c[5]=Ae,c[6]=_e,c[7]=Se,c[8]=Ee,c[9]=ke,c[10]=xe,c[11]=Ce,c[12]=Ie,c[13]=Be,c[14]=Te,c[15]=Re,c[16]=Pe,c[17]=Oe,c[18]=Me,0!==u&&(c[19]=u,r.length++),r};function d(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):r<63?h(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):d(this,e,t)},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},g.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==f||u>=i);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,c=n.length-i.length;if("mod"!==t){(a=new o(null)).length=c+1,a.words=new Array(a.length);for(var u=0;u=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/s|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);a&&(a.words[l]=h)}return a&&a.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),c=new o(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=t.clone();!t.isZero();){for(var h=0,p=1;0==(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(f),s.isub(l)),i.iushrn(1),s.iushrn(1);for(var d=0,g=1;0==(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||c.isOdd())&&(a.iadd(f),c.isub(l)),a.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(c)):(r.isub(t),a.isub(i),c.isub(s))}return{a:a,b:c,gcd:r.iushln(u)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(t.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var l=0,h=1;0==(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new _(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function m(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},m.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},m.prototype.split=function(e,t){e.iushrn(this.n,0,t)},m.prototype.imulK=function(e){return e.imul(this.k)},i(y,m),y.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new v;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return b[e]=t,t},_.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},_.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),c=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,u).cmp(c);)f.redIAdd(c);for(var l=this.pow(f,i),h=this.pow(e,i.addn(1).iushrn(1)),p=this.pow(e,i),d=s;0!==p.cmp(a);){for(var g=p,b=0;0!==g.cmp(a);b++)g=g.redSqr();n(b=0;n--){for(var u=t.words[n],f=c-1;f>=0;f--){var l=u>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4===++a||0===n&&0===f)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}c=26}return i},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new S(e)},i(S,_),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(39)(e))},function(e,t,r){(function(n,i){var o; + * @file Web Cryptography API shim + * @author Artem S Vybornov + * @license MIT + */ +e.exports=function(e){"use strict";if("function"!=typeof Promise)throw"Promise support required";var t=e.crypto||e.msCrypto;if(t){var r=t.subtle||t.webkitSubtle;if(r){var n=e.Crypto||t.constructor||Object,i=e.SubtleCrypto||r.constructor||Object,o=(e.CryptoKey||e.Key||Object,e.navigator.userAgent.indexOf("Edge/")>-1),s=!!e.msCrypto&&!o,a=!t.subtle&&!!t.webkitSubtle;if(s||a){var c={KoZIhvcNAQEB:"1.2.840.113549.1.1.1"},u={"1.2.840.113549.1.1.1":"KoZIhvcNAQEB"};if(["generateKey","importKey","unwrapKey"].forEach(function(e){var n=r[e];r[e]=function(i,o,c){var u,l,v,k,S,_=[].slice.call(arguments);switch(e){case"generateKey":u=m(i),l=o,v=c;break;case"importKey":u=m(c),l=_[3],v=_[4],"jwk"===i&&((o=y(o)).alg||(o.alg=g(u)),o.key_ops||(o.key_ops="oct"!==o.kty?"d"in o?v.filter(E):v.filter(w):v.slice()),_[1]=(k=y(o),s&&(k.extractable=k.ext,delete k.ext),h(unescape(encodeURIComponent(JSON.stringify(k)))).buffer));break;case"unwrapKey":u=_[4],l=_[5],v=_[6],_[2]=c._key}if("generateKey"===e&&"HMAC"===u.name&&u.hash)return u.length=u.length||{"SHA-1":512,"SHA-256":512,"SHA-384":1024,"SHA-512":1024}[u.hash.name],r.importKey("raw",t.getRandomValues(new Uint8Array(u.length+7>>3)),u,l,v);if(a&&"generateKey"===e&&"RSASSA-PKCS1-v1_5"===u.name&&(!u.modulusLength||u.modulusLength>=2048))return(i=m(i)).name="RSAES-PKCS1-v1_5",delete i.hash,r.generateKey(i,!0,["encrypt","decrypt"]).then(function(e){return Promise.all([r.exportKey("jwk",e.publicKey),r.exportKey("jwk",e.privateKey)])}).then(function(e){return e[0].alg=e[1].alg=g(u),e[0].key_ops=v.filter(w),e[1].key_ops=v.filter(E),Promise.all([r.importKey("jwk",e[0],u,!0,e[0].key_ops),r.importKey("jwk",e[1],u,l,e[1].key_ops)])}).then(function(e){return{publicKey:e[0],privateKey:e[1]}});if((a||s&&"SHA-1"===(u.hash||{}).name)&&"importKey"===e&&"jwk"===i&&"HMAC"===u.name&&"oct"===o.kty)return r.importKey("raw",h(p(o.k)),c,_[3],_[4]);if(a&&"importKey"===e&&("spki"===i||"pkcs8"===i))return r.importKey("jwk",function(e){var t=b(e),r=!1;t.length>2&&(r=!0,t.shift());var n={ext:!0};switch(t[0][0]){case"1.2.840.113549.1.1.1":var i=["n","e","d","p","q","dp","dq","qi"],o=b(t[1]);r&&o.shift();for(var s=0;s2&&(n=!0,o.unshift(new Uint8Array([0]))),r[0][0]="1.2.840.113549.1.1.1",t=o;break;default:throw new TypeError("Unsupported key type")}return r.push(new Uint8Array(v(t)).buffer),n?r.unshift(new Uint8Array([0])):r[1]={tag:3,value:r[1]},new Uint8Array(v(r)).buffer}(y(e))})),c}}),["encrypt","decrypt","sign","verify"].forEach(function(e){var t=r[e];r[e]=function(n,i,o,a){if(s&&(!o.byteLength||a&&!a.byteLength))throw new Error("Empy input is not allowed");var c,u=[].slice.call(arguments),l=m(n);if(s&&"decrypt"===e&&"AES-GCM"===l.name){var f=n.tagLength>>3;u[2]=(o.buffer||o).slice(0,o.byteLength-f),n.tag=(o.buffer||o).slice(o.byteLength-f)}u[1]=i._key;try{c=t.apply(r,u)}catch(e){return Promise.reject(e)}return s&&(c=new Promise(function(t,r){c.onabort=c.onerror=function(e){r(e)},c.oncomplete=function(r){r=r.target.result;if("encrypt"===e&&r instanceof AesGcmEncryptResult){var n=r.ciphertext,i=r.tag;(r=new Uint8Array(n.byteLength+i.byteLength)).set(new Uint8Array(n),0),r.set(new Uint8Array(i),n.byteLength),r=r.buffer}t(r)}})),c}}),s){var l=r.digest;r.digest=function(e,t){if(!t.byteLength)throw new Error("Empy input is not allowed");var n;try{n=l.call(r,e,t)}catch(e){return Promise.reject(e)}return n=new Promise(function(e,t){n.onabort=n.onerror=function(e){t(e)},n.oncomplete=function(t){e(t.target.result)}})},e.crypto=Object.create(t,{getRandomValues:{value:function(e){return t.getRandomValues(e)}},subtle:{value:r}}),e.CryptoKey=A}a&&(t.subtle=r,e.Crypto=n,e.SubtleCrypto=i,e.CryptoKey=A)}}}function f(e){return btoa(e).replace(/\=+$/,"").replace(/\+/g,"-").replace(/\//g,"_")}function p(e){return e=(e+="===").slice(0,-e.length%4),atob(e.replace(/-/g,"+").replace(/_/g,"/"))}function h(e){for(var t=new Uint8Array(e.length),r=0;re.length)throw new RangeError("Malformed DER");var r,n=e[t.pos++],i=e[t.pos++];if(i>=128){if(i&=127,t.end-t.pos=128){var a=n;n=4;for(t.splice(i,0,a>>24&255,a>>16&255,a>>8&255,255&a);n>1&&!(a>>24);)a<<=8,n--;n<4&&t.splice(i,4-n),n|=128}return t.splice(i-2,2,r,n),t}function A(e,t,r,n){Object.defineProperties(this,{_key:{value:e},type:{value:e.type,enumerable:!0},extractable:{value:void 0===r?e.extractable:r,enumerable:!0},algorithm:{value:void 0===t?e.algorithm:t,enumerable:!0},usages:{value:void 0===n?e.usages:n,enumerable:!0}})}function w(e){return"verify"===e||"encrypt"===e||"wrapKey"===e}function E(e){return"sign"===e||"decrypt"===e||"unwrapKey"===e}}},function(e,t,r){var n={ECB:r(392),CBC:r(393),CFB:r(394),CFB8:r(395),CFB1:r(396),OFB:r(397),CTR:r(193),GCM:r(193)},i=r(195);for(var o in i)i[o].module=n[i[o].mode];e.exports=i},function(e,t,r){var n=r(86),i=r(6).Buffer,o=r(194);function s(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}t.encrypt=function(e,t){var r=Math.ceil(t.length/16),o=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*r)]);for(var a=0;a0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?w(e,s,t,!1):x(e,s)):w(e,s,t,!1))):n||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=E?e=E:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(_,e):_(e))}function _(e){h("emit readable"),e.emit("readable"),R(e)}function x(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(C,e,t))}function C(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;eo.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0===(e-=s)){s===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,s),0===(e-=s)){s===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function N(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(P,t,e))}function P(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function M(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?N(this):S(this),null;if(0===(e=k(e,t))&&t.ended)return 0===t.length&&N(this),null;var n,i=t.needReadable;return h("need readable",i),(0===t.length||t.length-e0?T(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&N(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,h("pipe count=%d opts=%j",o.pipesCount,t);var c=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?l:v;function u(t,n){h("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,h("cleanup"),e.removeListener("close",y),e.removeListener("finish",b),e.removeListener("drain",f),e.removeListener("error",g),e.removeListener("unpipe",u),r.removeListener("end",l),r.removeListener("end",v),r.removeListener("data",m),p=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function l(){h("onend"),e.end()}o.endEmitted?i.nextTick(c):r.once("end",c),e.on("unpipe",u);var f=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,R(e))}}(r);e.on("drain",f);var p=!1;var d=!1;function m(t){h("ondata"),d=!1,!1!==e.write(t)||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==M(o.pipes,e))&&!p&&(h("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function g(t){h("onerror",t),v(),e.removeListener("error",g),0===a(e,"error")&&e.emit("error",t)}function y(){e.removeListener("finish",b),v()}function b(){h("onfinish"),e.removeListener("close",y),v()}function v(){h("unpipe"),r.unpipe(e)}return r.on("data",m),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",g),e.once("close",y),e.once("finish",b),e.emit("pipe",r),o.flowing||(h("pipe resume"),r.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0||o>0;){var l=new i;l.update(u),l.update(e),t&&l.update(t),u=l.digest();var f=0;if(s>0){var p=a.length-s;f=Math.min(s,u.length),u.copy(a,p,0,f),s-=f}if(f0){var h=c.length-o,d=Math.min(o,u.length-f);u.copy(c,h,f,f+d),o-=d}}return u.fill(0),{key:a,iv:c}}},function(e,t,r){"use strict";var n=r(6).Buffer,i=r(80).Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(7)(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},function(e,t,r){var n=r(3);r(8),n.cipher=n.cipher||{};var i=e.exports=n.cipher.modes=n.cipher.modes||{};function o(e){if("string"==typeof e&&(e=n.util.createBuffer(e)),n.util.isArray(e)&&e.length>4){var t=e;e=n.util.createBuffer();for(var r=0;r0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=e.length(),n=e.at(r-1);return!(n>this.blockSize<<2)&&(e.truncate(n),!0)},i.cbc=function(e){e=e||{},this.name="CBC",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.cbc.prototype.start=function(e){if(null===e.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv),this._prev=this._iv.slice(0)}},i.cbc.prototype.encrypt=function(e,t,r){if(e.length()0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=e.length(),n=e.at(r-1);return!(n>this.blockSize<<2)&&(e.truncate(n),!0)},i.cfb=function(e){e=e||{},this.name="CFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.cfb.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0)e.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.cfb.prototype.decrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0)e.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb=function(e){e=e||{},this.name="OFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ofb.prototype.encrypt=function(e,t,r){var n=e.length();if(0===e.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0)e.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb.prototype.decrypt=i.ofb.prototype.encrypt,i.ctr=function(e){e=e||{},this.name="CTR",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ctr.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0&&(e.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}s(this._inBlock)},i.ctr.prototype.decrypt=i.ctr.prototype.encrypt,i.gcm=function(e){e=e||{},this.name="GCM",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0,this._R=3774873600},i.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");var t,r=n.util.createBuffer(e.iv);if(this._cipherLength=0,t="additionalData"in e?n.util.createBuffer(e.additionalData):n.util.createBuffer(),this._tagLength="tagLength"in e?e.tagLength:128,this._tag=null,e.decrypt&&(this._tag=n.util.createBuffer(e.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var i=r.length();if(12===i)this._j0=[r.getInt32(),r.getInt32(),r.getInt32(),1];else{for(this._j0=[0,0,0,0];r.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(a(8*i)))}this._inBlock=this._j0.slice(0),s(this._inBlock),this._partialBytes=0,t=n.util.createBuffer(t),this._aDataLength=a(8*t.length());var o=t.length()%this.blockSize;for(o&&t.fillWithByte(0,this.blockSize-o),this._s=[0,0,0,0];t.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()])},i.gcm.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize){for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return e.read-=this.blockSize,t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),s(this._inBlock)},i.gcm.prototype.decrypt=function(e,t,r){var n=e.length();if(n0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),s(this._inBlock),this._hashBlock[0]=e.getInt32(),this._hashBlock[1]=e.getInt32(),this._hashBlock[2]=e.getInt32(),this._hashBlock[3]=e.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var i=0;i0;--n)t[n]=e[n]>>>1|(1&e[n-1])<<31;t[0]=e[0]>>>1,r&&(t[0]^=this._R)},i.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],r=0;r<32;++r){var n=e[r/8|0]>>>4*(7-r%8)&15,i=this._m[r][n];t[0]^=i[0],t[1]^=i[1],t[2]^=i[2],t[3]^=i[3]}return t},i.gcm.prototype.ghash=function(e,t,r){return t[0]^=r[0],t[1]^=r[1],t[2]^=r[2],t[3]^=r[3],this.tableMultiply(t)},i.gcm.prototype.generateHashTable=function(e,t){for(var r=8/t,n=4*r,i=16*r,o=new Array(i),s=0;s>>1,i=new Array(r);i[n]=e.slice(0);for(var o=n>>>1;o>0;)this.pow(i[2*o],i[o]=[]),o>>=1;for(o=2;o>1,a=s+(1&e.length),c=e.substr(0,a),u=e.substr(s,a),l=n.util.createBuffer(),f=n.hmac.create();r=t+r;var p=Math.ceil(i/16),h=Math.ceil(i/20);f.start("MD5",c);var d=n.util.createBuffer();l.putBytes(r);for(var m=0;m0&&(u.queue(e,u.createAlert(e,{level:u.Alert.Level.warning,description:u.Alert.Description.no_renegotiation})),u.flush(e)),e.process()},u.parseHelloMessage=function(e,t,r){var i=null,o=e.entity===u.ConnectionEnd.client;if(r<38)e.error(e,{message:o?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}});else{var s=t.fragment,c=s.length();if(i={version:{major:s.getByte(),minor:s.getByte()},random:n.util.createBuffer(s.getBytes(32)),session_id:a(s,1),extensions:[]},o?(i.cipher_suite=s.getBytes(2),i.compression_method=s.getByte()):(i.cipher_suites=a(s,2),i.compression_methods=a(s,1)),(c=r-(c-s.length()))>0){for(var l=a(s,2);l.length()>0;)i.extensions.push({type:[l.getByte(),l.getByte()],data:a(l,2)});if(!o)for(var f=0;f0;){if(0!==h.getByte())break;e.session.extensions.server_name.serverNameList.push(a(h,2).getBytes())}}}if(e.session.version&&(i.version.major!==e.session.version.major||i.version.minor!==e.session.version.minor))return e.error(e,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.protocol_version}});if(o)e.session.cipherSuite=u.getCipherSuite(i.cipher_suite);else for(var d=n.util.createBuffer(i.cipher_suites.bytes());d.length()>0&&(e.session.cipherSuite=u.getCipherSuite(d.getBytes(2)),null===e.session.cipherSuite););if(null===e.session.cipherSuite)return e.error(e,{message:"No cipher suites in common.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.handshake_failure},cipherSuite:n.util.bytesToHex(i.cipher_suite)});e.session.compressionMethod=o?i.compression_method:u.CompressionMethod.none}return i},u.createSecurityParameters=function(e,t){var r=e.entity===u.ConnectionEnd.client,n=t.random.bytes(),i=r?e.session.sp.client_random:n,o=r?n:u.createRandom().getBytes();e.session.sp={entity:e.entity,prf_algorithm:u.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:e.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:i,server_random:o}},u.handleServerHello=function(e,t,r){var n=u.parseHelloMessage(e,t,r);if(!e.fail){if(!(n.version.minor<=e.version.minor))return e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.protocol_version}});e.version.minor=n.version.minor,e.session.version=e.version;var i=n.session_id.bytes();i.length>0&&i===e.session.id?(e.expect=d,e.session.resuming=!0,e.session.sp.server_random=n.random.bytes()):(e.expect=l,e.session.resuming=!1,u.createSecurityParameters(e,n)),e.session.id=i,e.process()}},u.handleClientHello=function(e,t,r){var i=u.parseHelloMessage(e,t,r);if(!e.fail){var o=i.session_id.bytes(),s=null;if(e.sessionCache&&(null===(s=e.sessionCache.getSession(o))?o="":(s.version.major!==i.version.major||s.version.minor>i.version.minor)&&(s=null,o="")),0===o.length&&(o=n.random.getBytes(32)),e.session.id=o,e.session.clientHelloVersion=i.version,e.session.sp={},s)e.version=e.session.version=s.version,e.session.sp=s.sp;else{for(var a,c=1;c0;)i=a(c.certificate_list,3),o=n.asn1.fromDer(i),i=n.pki.certificateFromAsn1(o,!0),l.push(i)}catch(t){return e.error(e,{message:"Could not parse certificate list.",cause:t,send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.bad_certificate}})}var p=e.entity===u.ConnectionEnd.client;!p&&!0!==e.verifyClient||0!==l.length?0===l.length?e.expect=p?f:v:(p?e.session.serverCertificate=l[0]:e.session.clientCertificate=l[0],u.verifyCertificateChain(e,l)&&(e.expect=p?f:v)):e.error(e,{message:p?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}}),e.process()},u.handleServerKeyExchange=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.unsupported_certificate}});e.expect=p,e.process()},u.handleClientKeyExchange=function(e,t,r){if(r<48)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.unsupported_certificate}});var i=t.fragment,o={enc_pre_master_secret:a(i,2).getBytes()},s=null;if(e.getPrivateKey)try{s=e.getPrivateKey(e,e.session.serverCertificate),s=n.pki.privateKeyFromPem(s)}catch(t){e.error(e,{message:"Could not get private key.",cause:t,send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}})}if(null===s)return e.error(e,{message:"No private key set.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}});try{var c=e.session.sp;c.pre_master_secret=s.decrypt(o.enc_pre_master_secret);var l=e.session.clientHelloVersion;if(l.major!==c.pre_master_secret.charCodeAt(0)||l.minor!==c.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch(e){c.pre_master_secret=n.random.getBytes(48)}e.expect=w,null!==e.session.clientCertificate&&(e.expect=A),e.process()},u.handleCertificateRequest=function(e,t,r){if(r<3)return e.error(e,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}});var n=t.fragment,i={certificate_types:a(n,1),certificate_authorities:a(n,2)};e.session.certificateRequest=i,e.expect=h,e.process()},u.handleCertificateVerify=function(e,t,r){if(r<2)return e.error(e,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}});var i=t.fragment;i.read-=4;var o=i.bytes();i.read+=4;var s={signature:a(i,2).getBytes()},c=n.util.createBuffer();c.putBuffer(e.session.md5.digest()),c.putBuffer(e.session.sha1.digest()),c=c.getBytes();try{if(!e.session.clientCertificate.publicKey.verify(c,s.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");e.session.md5.update(o),e.session.sha1.update(o)}catch(t){return e.error(e,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.handshake_failure}})}e.expect=w,e.process()},u.handleServerHelloDone=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.record_overflow}});if(null===e.serverCertificate){var i={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.insufficient_security}},o=e.verify(e,i.alert.description,0,[]);if(!0!==o)return(o||0===o)&&("object"!=typeof o||n.util.isArray(o)?"number"==typeof o&&(i.alert.description=o):(o.message&&(i.message=o.message),o.alert&&(i.alert.description=o.alert))),e.error(e,i)}null!==e.session.certificateRequest&&(t=u.createRecord(e,{type:u.ContentType.handshake,data:u.createCertificate(e)}),u.queue(e,t)),t=u.createRecord(e,{type:u.ContentType.handshake,data:u.createClientKeyExchange(e)}),u.queue(e,t),e.expect=y;var s=function(e,t){null!==e.session.certificateRequest&&null!==e.session.clientCertificate&&u.queue(e,u.createRecord(e,{type:u.ContentType.handshake,data:u.createCertificateVerify(e,t)})),u.queue(e,u.createRecord(e,{type:u.ContentType.change_cipher_spec,data:u.createChangeCipherSpec()})),e.state.pending=u.createConnectionState(e),e.state.current.write=e.state.pending.write,u.queue(e,u.createRecord(e,{type:u.ContentType.handshake,data:u.createFinished(e)})),e.expect=d,u.flush(e),e.process()};if(null===e.session.certificateRequest||null===e.session.clientCertificate)return s(e,null);u.getClientSignature(e,s)},u.handleChangeCipherSpec=function(e,t){if(1!==t.fragment.getByte())return e.error(e,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}});var r=e.entity===u.ConnectionEnd.client;(e.session.resuming&&r||!e.session.resuming&&!r)&&(e.state.pending=u.createConnectionState(e)),e.state.current.read=e.state.pending.read,(!e.session.resuming&&r||e.session.resuming&&!r)&&(e.state.pending=null),e.expect=r?m:E,e.process()},u.handleFinished=function(e,t,r){var o=t.fragment;o.read-=4;var s=o.bytes();o.read+=4;var a=t.fragment.getBytes();(o=n.util.createBuffer()).putBuffer(e.session.md5.digest()),o.putBuffer(e.session.sha1.digest());var c=e.entity===u.ConnectionEnd.client,l=c?"server finished":"client finished",f=e.session.sp;if((o=i(f.master_secret,l,o.getBytes(),12)).getBytes()!==a)return e.error(e,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.decrypt_error}});e.session.md5.update(s),e.session.sha1.update(s),(e.session.resuming&&c||!e.session.resuming&&!c)&&(u.queue(e,u.createRecord(e,{type:u.ContentType.change_cipher_spec,data:u.createChangeCipherSpec()})),e.state.current.write=e.state.pending.write,e.state.pending=null,u.queue(e,u.createRecord(e,{type:u.ContentType.handshake,data:u.createFinished(e)}))),e.expect=c?g:k,e.handshaking=!1,++e.handshakes,e.peerCertificate=c?e.session.serverCertificate:e.session.clientCertificate,u.flush(e),e.isConnected=!0,e.connected(e),e.process()},u.handleAlert=function(e,t){var r,n=t.fragment,i={level:n.getByte(),description:n.getByte()};switch(i.description){case u.Alert.Description.close_notify:r="Connection closed.";break;case u.Alert.Description.unexpected_message:r="Unexpected message.";break;case u.Alert.Description.bad_record_mac:r="Bad record MAC.";break;case u.Alert.Description.decryption_failed:r="Decryption failed.";break;case u.Alert.Description.record_overflow:r="Record overflow.";break;case u.Alert.Description.decompression_failure:r="Decompression failed.";break;case u.Alert.Description.handshake_failure:r="Handshake failure.";break;case u.Alert.Description.bad_certificate:r="Bad certificate.";break;case u.Alert.Description.unsupported_certificate:r="Unsupported certificate.";break;case u.Alert.Description.certificate_revoked:r="Certificate revoked.";break;case u.Alert.Description.certificate_expired:r="Certificate expired.";break;case u.Alert.Description.certificate_unknown:r="Certificate unknown.";break;case u.Alert.Description.illegal_parameter:r="Illegal parameter.";break;case u.Alert.Description.unknown_ca:r="Unknown certificate authority.";break;case u.Alert.Description.access_denied:r="Access denied.";break;case u.Alert.Description.decode_error:r="Decode error.";break;case u.Alert.Description.decrypt_error:r="Decrypt error.";break;case u.Alert.Description.export_restriction:r="Export restriction.";break;case u.Alert.Description.protocol_version:r="Unsupported protocol version.";break;case u.Alert.Description.insufficient_security:r="Insufficient security.";break;case u.Alert.Description.internal_error:r="Internal error.";break;case u.Alert.Description.user_canceled:r="User canceled.";break;case u.Alert.Description.no_renegotiation:r="Renegotiation not supported.";break;default:r="Unknown error."}if(i.description===u.Alert.Description.close_notify)return e.close();e.error(e,{message:r,send:!1,origin:e.entity===u.ConnectionEnd.client?"server":"client",alert:i}),e.process()},u.handleHandshake=function(e,t){var r=t.fragment,i=r.getByte(),o=r.getInt24();if(o>r.length())return e.fragmented=t,t.fragment=n.util.createBuffer(),r.read-=4,e.process();e.fragmented=null,r.read-=4;var s=r.bytes(o+4);r.read+=4,i in U[e.entity][e.expect]?(e.entity!==u.ConnectionEnd.server||e.open||e.fail||(e.handshaking=!0,e.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:n.md.md5.create(),sha1:n.md.sha1.create()}),i!==u.HandshakeType.hello_request&&i!==u.HandshakeType.certificate_verify&&i!==u.HandshakeType.finished&&(e.session.md5.update(s),e.session.sha1.update(s)),U[e.entity][e.expect][i](e,t,o)):u.handleUnexpected(e,t)},u.handleApplicationData=function(e,t){e.data.putBuffer(t.fragment),e.dataReady(e),e.process()},u.handleHeartbeat=function(e,t){var r=t.fragment,i=r.getByte(),o=r.getInt16(),s=r.getBytes(o);if(i===u.HeartbeatMessageType.heartbeat_request){if(e.handshaking||o>s.length)return e.process();u.queue(e,u.createRecord(e,{type:u.ContentType.heartbeat,data:u.createHeartbeat(u.HeartbeatMessageType.heartbeat_response,s)})),u.flush(e)}else if(i===u.HeartbeatMessageType.heartbeat_response){if(s!==e.expectedHeartbeatPayload)return e.process();e.heartbeatReceived&&e.heartbeatReceived(e,n.util.createBuffer(s))}e.process()};var l=1,f=2,p=3,h=4,d=5,m=6,g=7,y=8,b=1,v=2,A=3,w=4,E=5,k=6,S=u.handleUnexpected,_=u.handleChangeCipherSpec,x=u.handleAlert,C=u.handleHandshake,I=u.handleApplicationData,B=u.handleHeartbeat,R=[];R[u.ConnectionEnd.client]=[[S,x,C,S,B],[S,x,C,S,B],[S,x,C,S,B],[S,x,C,S,B],[S,x,C,S,B],[_,x,S,S,B],[S,x,C,S,B],[S,x,C,I,B],[S,x,C,S,B]],R[u.ConnectionEnd.server]=[[S,x,C,S,B],[S,x,C,S,B],[S,x,C,S,B],[S,x,C,S,B],[_,x,S,S,B],[S,x,C,S,B],[S,x,C,I,B],[S,x,C,S,B]];var T=u.handleHelloRequest,N=u.handleServerHello,P=u.handleCertificate,M=u.handleServerKeyExchange,D=u.handleCertificateRequest,O=u.handleServerHelloDone,L=u.handleFinished,U=[];U[u.ConnectionEnd.client]=[[S,S,N,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S],[T,S,S,S,S,S,S,S,S,S,S,P,M,D,O,S,S,S,S,S,S],[T,S,S,S,S,S,S,S,S,S,S,S,M,D,O,S,S,S,S,S,S],[T,S,S,S,S,S,S,S,S,S,S,S,S,D,O,S,S,S,S,S,S],[T,S,S,S,S,S,S,S,S,S,S,S,S,S,O,S,S,S,S,S,S],[T,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S],[T,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,L],[T,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S],[T,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S]];var j=u.handleClientHello,F=u.handleClientKeyExchange,K=u.handleCertificateVerify;U[u.ConnectionEnd.server]=[[S,j,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S],[S,S,S,S,S,S,S,S,S,S,S,P,S,S,S,S,S,S,S,S,S],[S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,F,S,S,S,S],[S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,K,S,S,S,S,S],[S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S],[S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,L],[S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S],[S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S]],u.generateKeys=function(e,t){var r=i,n=t.client_random+t.server_random;e.session.resuming||(t.master_secret=r(t.pre_master_secret,"master secret",n,48).bytes(),t.pre_master_secret=null),n=t.server_random+t.client_random;var o=2*t.mac_key_length+2*t.enc_key_length,s=e.version.major===u.Versions.TLS_1_0.major&&e.version.minor===u.Versions.TLS_1_0.minor;s&&(o+=2*t.fixed_iv_length);var a=r(t.master_secret,"key expansion",n,o),c={client_write_MAC_key:a.getBytes(t.mac_key_length),server_write_MAC_key:a.getBytes(t.mac_key_length),client_write_key:a.getBytes(t.enc_key_length),server_write_key:a.getBytes(t.enc_key_length)};return s&&(c.client_write_IV=a.getBytes(t.fixed_iv_length),c.server_write_IV=a.getBytes(t.fixed_iv_length)),c},u.createConnectionState=function(e){var t=e.entity===u.ConnectionEnd.client,r=function(){var e={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(e){return!0},compressionState:null,compressFunction:function(e){return!0},updateSequenceNumber:function(){4294967295===e.sequenceNumber[1]?(e.sequenceNumber[1]=0,++e.sequenceNumber[0]):++e.sequenceNumber[1]}};return e},n={read:r(),write:r()};if(n.read.update=function(e,t){return n.read.cipherFunction(t,n.read)?n.read.compressFunction(e,t,n.read)||e.error(e,{message:"Could not decompress record.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.decompression_failure}}):e.error(e,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.bad_record_mac}}),!e.fail},n.write.update=function(e,t){return n.write.compressFunction(e,t,n.write)?n.write.cipherFunction(t,n.write)||e.error(e,{message:"Could not encrypt record.",send:!1,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}}):e.error(e,{message:"Could not compress record.",send:!1,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}}),!e.fail},e.session){var i=e.session.sp;switch(e.session.cipherSuite.initSecurityParameters(i),i.keys=u.generateKeys(e,i),n.read.macKey=t?i.keys.server_write_MAC_key:i.keys.client_write_MAC_key,n.write.macKey=t?i.keys.client_write_MAC_key:i.keys.server_write_MAC_key,e.session.cipherSuite.initConnectionState(n,e,i),i.compression_algorithm){case u.CompressionMethod.none:break;case u.CompressionMethod.deflate:n.read.compressFunction=s,n.write.compressFunction=o;break;default:throw new Error("Unsupported compression algorithm.")}}return n},u.createRandom=function(){var e=new Date,t=+e+6e4*e.getTimezoneOffset(),r=n.util.createBuffer();return r.putInt32(t),r.putBytes(n.random.getBytes(28)),r},u.createRecord=function(e,t){return t.data?{type:t.type,version:{major:e.version.major,minor:e.version.minor},length:t.data.length(),fragment:t.data}:null},u.createAlert=function(e,t){var r=n.util.createBuffer();return r.putByte(t.level),r.putByte(t.description),u.createRecord(e,{type:u.ContentType.alert,data:r})},u.createClientHello=function(e){e.session.clientHelloVersion={major:e.version.major,minor:e.version.minor};for(var t=n.util.createBuffer(),r=0;r0&&(d+=2);var m=e.session.id,g=m.length+1+2+4+28+2+o+1+a+d,y=n.util.createBuffer();return y.putByte(u.HandshakeType.client_hello),y.putInt24(g),y.putByte(e.version.major),y.putByte(e.version.minor),y.putBytes(e.session.sp.client_random),c(y,1,n.util.createBuffer(m)),c(y,2,t),c(y,1,s),d>0&&c(y,2,l),y},u.createServerHello=function(e){var t=e.session.id,r=t.length+1+2+4+28+2+1,i=n.util.createBuffer();return i.putByte(u.HandshakeType.server_hello),i.putInt24(r),i.putByte(e.version.major),i.putByte(e.version.minor),i.putBytes(e.session.sp.server_random),c(i,1,n.util.createBuffer(t)),i.putByte(e.session.cipherSuite.id[0]),i.putByte(e.session.cipherSuite.id[1]),i.putByte(e.session.compressionMethod),i},u.createCertificate=function(e){var t,r=e.entity===u.ConnectionEnd.client,i=null;e.getCertificate&&(t=r?e.session.certificateRequest:e.session.extensions.server_name.serverNameList,i=e.getCertificate(e,t));var o=n.util.createBuffer();if(null!==i)try{n.util.isArray(i)||(i=[i]);for(var s=null,a=0;au.MaxFragment;)i.push(u.createRecord(e,{type:t.type,data:n.util.createBuffer(o.slice(0,u.MaxFragment))})),o=o.slice(u.MaxFragment);o.length>0&&i.push(u.createRecord(e,{type:t.type,data:n.util.createBuffer(o)}))}for(var s=0;s0&&(i=r.order[0]),null!==i&&i in r.cache)for(var o in t=r.cache[i],delete r.cache[i],r.order)if(r.order[o]===i){r.order.splice(o,1);break}return t},r.setSession=function(e,t){if(r.order.length===r.capacity){var i=r.order.shift();delete r.cache[i]}i=n.util.bytesToHex(e);r.order.push(i),r.cache[i]=t}}return r},u.createConnection=function(e){var t=null;t=e.caStore?n.util.isArray(e.caStore)?n.pki.createCaStore(e.caStore):e.caStore:n.pki.createCaStore();var r=e.cipherSuites||null;if(null===r)for(var i in r=[],u.CipherSuites)r.push(u.CipherSuites[i]);var o=e.server?u.ConnectionEnd.server:u.ConnectionEnd.client,s=e.sessionCache?u.createSessionCache(e.sessionCache):null,a={version:{major:u.Version.major,minor:u.Version.minor},entity:o,sessionId:e.sessionId,caStore:t,sessionCache:s,cipherSuites:r,connected:e.connected,virtualHost:e.virtualHost||null,verifyClient:e.verifyClient||!1,verify:e.verify||function(e,t,r,n){return t},getCertificate:e.getCertificate||null,getPrivateKey:e.getPrivateKey||null,getSignature:e.getSignature||null,input:n.util.createBuffer(),tlsData:n.util.createBuffer(),data:n.util.createBuffer(),tlsDataReady:e.tlsDataReady,dataReady:e.dataReady,heartbeatReceived:e.heartbeatReceived,closed:e.closed,error:function(t,r){r.origin=r.origin||(t.entity===u.ConnectionEnd.client?"client":"server"),r.send&&(u.queue(t,u.createAlert(t,r.alert)),u.flush(t));var n=!1!==r.fatal;n&&(t.fail=!0),e.error(t,r),n&&t.close(!1)},deflate:e.deflate||null,inflate:e.inflate||null,reset:function(e){a.version={major:u.Version.major,minor:u.Version.minor},a.record=null,a.session=null,a.peerCertificate=null,a.state={pending:null,current:null},a.expect=(a.entity,u.ConnectionEnd.client,0),a.fragmented=null,a.records=[],a.open=!1,a.handshakes=0,a.handshaking=!1,a.isConnected=!1,a.fail=!(e||void 0===e),a.input.clear(),a.tlsData.clear(),a.data.clear(),a.state.current=u.createConnectionState(a)}};a.reset();return a.handshake=function(e){if(a.entity!==u.ConnectionEnd.client)a.error(a,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(a.handshaking)a.error(a,{message:"Handshake already in progress.",fatal:!1});else{a.fail&&!a.open&&0===a.handshakes&&(a.fail=!1),a.handshaking=!0;var t=null;(e=e||"").length>0&&(a.sessionCache&&(t=a.sessionCache.getSession(e)),null===t&&(e="")),0===e.length&&a.sessionCache&&null!==(t=a.sessionCache.getSession())&&(e=t.id),a.session={id:e,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:n.md.md5.create(),sha1:n.md.sha1.create()},t&&(a.version=t.version,a.session.sp=t.sp),a.session.sp.client_random=u.createRandom().getBytes(),a.open=!0,u.queue(a,u.createRecord(a,{type:u.ContentType.handshake,data:u.createClientHello(a)})),u.flush(a)}},a.process=function(e){var t=0;return e&&a.input.putBytes(e),a.fail||(null!==a.record&&a.record.ready&&a.record.fragment.isEmpty()&&(a.record=null),null===a.record&&(t=function(e){var t=0,r=e.input,i=r.length();if(i<5)t=5-i;else{e.record={type:r.getByte(),version:{major:r.getByte(),minor:r.getByte()},length:r.getInt16(),fragment:n.util.createBuffer(),ready:!1};var o=e.record.version.major===e.version.major;o&&e.session&&e.session.version&&(o=e.record.version.minor===e.version.minor),o||e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.protocol_version}})}return t}(a)),a.fail||null===a.record||a.record.ready||(t=function(e){var t=0,r=e.input,n=r.length();n>>0,a>>>0];for(var u=i.fullMessageLength.length-1;u>=0;--u)i.fullMessageLength[u]+=a[1],a[1]=a[0]+(i.fullMessageLength[u]/4294967296>>>0),i.fullMessageLength[u]=i.fullMessageLength[u]>>>0,a[0]=a[1]/4294967296>>>0;return t.putBytes(o),c(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(t.bytes());var a,u=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(o.substr(0,i.blockLength-u));for(var l=8*i.fullMessageLength[0],f=0;f>>0,s.putInt32(l>>>0),l=a>>>0;s.putInt32(l);var p={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};c(p,r,s);var h=n.util.createBuffer();return h.putInt32(p.h0),h.putInt32(p.h1),h.putInt32(p.h2),h.putInt32(p.h3),h.putInt32(p.h4),h.putInt32(p.h5),h.putInt32(p.h6),h.putInt32(p.h7),h},i};var o=null,s=!1,a=null;function c(e,t,r){for(var n,i,o,s,c,u,l,f,p,h,d,m,g,y=r.length();y>=64;){for(c=0;c<16;++c)t[c]=r.getInt32();for(;c<64;++c)n=((n=t[c-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,i=((i=t[c-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,t[c]=n+t[c-7]+i+t[c-16]|0;for(u=e.h0,l=e.h1,f=e.h2,p=e.h3,h=e.h4,d=e.h5,m=e.h6,g=e.h7,c=0;c<64;++c)o=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),s=u&l|f&(u^l),n=g+((h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(m^h&(d^m))+a[c]+t[c],g=m,m=d,d=h,h=p+n>>>0,p=f,f=l,l=u,u=n+(i=o+s)>>>0;e.h0=e.h0+u|0,e.h1=e.h1+l|0,e.h2=e.h2+f|0,e.h3=e.h3+p|0,e.h4=e.h4+h|0,e.h5=e.h5+d|0,e.h6=e.h6+m|0,e.h7=e.h7+g|0,y-=64}}},function(e,t,r){(function(t){var n=r(3);r(8);var i=null;!n.util.isNodejs||n.options.usePureJavaScript||t.versions["node-webkit"]||(i=r(207)),(e.exports=n.prng=n.prng||{}).create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=e.md,o=new Array(32),s=0;s<32;++s)o[s]=r.create();function a(){if(t.pools[0].messageLength>=32)return c();var e=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(e)),c()}function c(){t.reseeds=4294967295===t.reseeds?0:t.reseeds+1;var e=t.plugin.md.create();e.update(t.keyBytes);for(var r=1,n=0;n<32;++n)t.reseeds%r==0&&(e.update(t.pools[n].digest().getBytes()),t.pools[n].start()),r<<=1;t.keyBytes=e.digest().getBytes(),e.start(),e.update(t.keyBytes);var i=e.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(i),t.generated=0}function u(e){var t=null;if("undefined"!=typeof window){var r=window.crypto||window.msCrypto;r&&r.getRandomValues&&(t=function(e){return r.getRandomValues(e)})}var i=n.util.createBuffer();if(t)for(;i.length()>16)))<<16,f=4294967295&(u=(2147483647&(u+=c>>15))+(u>>31));for(a=0;a<3;++a)l=f>>>(a<<3),l^=Math.floor(256*Math.random()),i.putByte(String.fromCharCode(255&l))}return i.getBytes(e)}return t.pools=o,t.pool=0,t.generate=function(e,r){if(!r)return t.generateSync(e);var i=t.plugin.cipher,o=t.plugin.increment,s=t.plugin.formatKey,a=t.plugin.formatSeed,u=n.util.createBuffer();t.key=null,function l(f){if(f)return r(f);if(u.length()>=e)return r(null,u.getBytes(e));t.generated>1048575&&(t.key=null);if(null===t.key)return n.util.nextTick(function(){!function(e){if(t.pools[0].messageLength>=32)return c(),e();var r=32-t.pools[0].messageLength<<5;t.seedFile(r,function(r,n){if(r)return e(r);t.collect(n),c(),e()})}(l)});var p=i(t.key,t.seed);t.generated+=p.length;u.putBytes(p);t.key=s(i(t.key,o(t.seed)));t.seed=a(i(t.key,t.seed));n.util.setImmediate(l)}()},t.generateSync=function(e){var r=t.plugin.cipher,i=t.plugin.increment,o=t.plugin.formatKey,s=t.plugin.formatSeed;t.key=null;for(var c=n.util.createBuffer();c.length()1048575&&(t.key=null),null===t.key&&a();var u=r(t.key,t.seed);t.generated+=u.length,c.putBytes(u),t.key=o(r(t.key,i(t.seed))),t.seed=s(r(t.key,t.seed))}return c.getBytes(e)},i?(t.seedFile=function(e,t){i.randomBytes(e,function(e,r){if(e)return t(e);t(null,r.toString())})},t.seedFileSync=function(e){return i.randomBytes(e).toString()}):(t.seedFile=function(e,t){try{t(null,u(e))}catch(e){t(e)}},t.seedFileSync=u),t.collect=function(e){for(var r=e.length,n=0;n>i&255);t.collect(n)},t.registerWorker=function(e){if(e===self)t.seedFile=function(e,t){self.addEventListener("message",function e(r){var n=r.data;n.forge&&n.forge.prng&&(self.removeEventListener("message",e),t(n.forge.prng.err,n.forge.prng.bytes))}),self.postMessage({forge:{prng:{needed:e}}})};else{e.addEventListener("message",function(r){var n=r.data;n.forge&&n.forge.prng&&t.seedFile(n.forge.prng.needed,function(t,r){e.postMessage({forge:{prng:{err:t,bytes:r}}})})})}},t}}).call(this,r(4))},function(e,t,r){var n=r(3);r(8);var i=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],o=[1,2,3,5];e.exports=n.rc2=n.rc2||{},n.rc2.expandKey=function(e,t){"string"==typeof e&&(e=n.util.createBuffer(e)),t=t||128;var r,o=e,s=e.length(),a=t,c=Math.ceil(a/8),u=255>>(7&a);for(r=s;r<128;r++)o.putByte(i[o.at(r-1)+o.at(r-s)&255]);for(o.setAt(128-c,i[o.at(128-c)&u]),r=127-c;r>=0;r--)o.setAt(r,i[o.at(r+1)^o.at(r+c)]);return o};var s=function(e,t,r){var i,s,a,c,u=!1,l=null,f=null,p=null,h=[];for(e=n.rc2.expandKey(e,t),a=0;a<64;a++)h.push(e.getInt16Le());r?(i=function(e){for(a=0;a<4;a++)e[a]+=h[c]+(e[(a+3)%4]&e[(a+2)%4])+(~e[(a+3)%4]&e[(a+1)%4]),e[a]=(t=e[a])<<(r=o[a])&65535|(65535&t)>>16-r,c++;var t,r},s=function(e){for(a=0;a<4;a++)e[a]+=h[63&e[(a+3)%4]]}):(i=function(e){for(a=3;a>=0;a--)e[a]=(65535&(t=e[a]))>>(r=o[a])|t<<16-r&65535,e[a]-=h[c]+(e[(a+3)%4]&e[(a+2)%4])+(~e[(a+3)%4]&e[(a+1)%4]),c--;var t,r},s=function(e){for(a=3;a>=0;a--)e[a]-=h[63&e[(a+3)%4]]});var d=function(e){var t=[];for(a=0;a<4;a++){var n=l.getInt16Le();null!==p&&(r?n^=p.getInt16Le():p.putInt16Le(n)),t.push(65535&n)}c=r?0:63;for(var i=0;i=8;)d([[5,i],[1,s],[6,i],[1,s],[5,i]])},finish:function(e){var t=!0;if(r)if(e)t=e(8,l,!r);else{var n=8===l.length()?8:8-l.length();l.fillWithByte(n,n)}if(t&&(u=!0,m.update()),!r&&(t=0===l.length()))if(e)t=e(8,f,!r);else{var i=f.length(),o=f.at(i-1);o>i?t=!1:f.truncate(o)}return t}}};n.rc2.startEncrypting=function(e,t,r){var i=n.rc2.createEncryptionCipher(e,128);return i.start(t,r),i},n.rc2.createEncryptionCipher=function(e,t){return s(e,t,!0)},n.rc2.startDecrypting=function(e,t,r){var i=n.rc2.createDecryptionCipher(e,128);return i.start(t,r),i},n.rc2.createDecryptionCipher=function(e,t){return s(e,t,!1)}},function(e,t,r){var n=r(3);r(8),r(32),r(89);var i=e.exports=n.pkcs1=n.pkcs1||{};function o(e,t,r){r||(r=n.md.sha1.create());for(var i="",o=Math.ceil(t/r.digestLength),s=0;s>24&255,s>>16&255,s>>8&255,255&s);r.start(),r.update(e+a),i+=r.digest().getBytes()}return i.substring(0,t)}i.encode_rsa_oaep=function(e,t,r){var i,s,a,c;"string"==typeof r?(i=r,s=arguments[3]||void 0,a=arguments[4]||void 0):r&&(i=r.label||void 0,s=r.seed||void 0,a=r.md||void 0,r.mgf1&&r.mgf1.md&&(c=r.mgf1.md)),a?a.start():a=n.md.sha1.create(),c||(c=a);var u=Math.ceil(e.n.bitLength()/8),l=u-2*a.digestLength-2;if(t.length>l)throw(g=new Error("RSAES-OAEP input message length is too long.")).length=t.length,g.maxLength=l,g;i||(i=""),a.update(i,"raw");for(var f=a.digest(),p="",h=l-t.length,d=0;de&&(s=c(e,t));var h=s.toString(16);i.target.postMessage({hex:h,workLoad:l}),s.dAddOffset(f,0)}}}h()}(e,t,i,o);return a(e,t,i,o)}(e,u,o.options,i);throw new Error("Invalid prime generation algorithm: "+o.name)}}function a(e,t,r,o){var s=c(e,t),a=function(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}(s.bitLength());"millerRabinTests"in r&&(a=r.millerRabinTests);var u=10;"maxBlockTime"in r&&(u=r.maxBlockTime),function e(t,r,o,s,a,u,l){var f=+new Date;do{if(t.bitLength()>r&&(t=c(r,o)),t.isProbablePrime(a))return l(null,t);t.dAddOffset(i[s++%8],0)}while(u<0||+new Date-f=0&&i.push(a):i.push(a))}return i}function h(e){if(e.composed||e.constructed){for(var t=n.util.createBuffer(),r=0;r0&&(c=i.create(i.Class.UNIVERSAL,i.Type.SET,!0,f));var p=[],h=[];null!==t&&(h=n.util.isArray(t)?t:[t]);for(var d=[],m=0;m0){var v=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,d),A=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(v).getBytes())])]);p.push(A)}var w=null;if(null!==e){var E=o.wrapRsaPrivateKey(o.privateKeyToAsn1(e));w=null===r?i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.keyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[E]),c]):i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.pkcs8ShroudedKeyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[o.encryptPrivateKeyInfo(E,r,a)]),c]);var k=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[w]),S=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(k).getBytes())])]);p.push(S)}var _,x=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,p);if(a.useMac){var C=n.md.sha1.create(),I=new n.util.ByteBuffer(n.random.getBytes(a.saltSize)),B=a.count,R=(e=s.generateKey(r,I,3,B,20),n.hmac.create());R.start(C,e),R.update(i.toDer(x).getBytes());var T=R.getMac();_=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.sha1).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,T.getBytes())]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,I.getBytes()),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(B).getBytes())])}return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(3).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(x).getBytes())])]),_])},s.generateKey=n.pbe.generatePkcs12Key},function(e,t,r){var n=r(3);r(43),r(8);var i=n.asn1,o=e.exports=n.pkcs7asn1=n.pkcs7asn1||{};n.pkcs7=n.pkcs7||{},n.pkcs7.asn1=o;var s={name:"ContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};o.contentInfoValidator=s;var a={name:"EncryptedContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};o.envelopedDataValidator={name:"EnvelopedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(a)},o.encryptedDataValidator={name:"EncryptedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"}].concat(a)};var c={name:"SignerInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};o.signedDataValidator={name:"SignedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},s,{name:"SignedData.Certificates",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,capture:"signerInfos",optional:!0,value:[c]}]},o.recipientInfoValidator={name:"RecipientInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}},function(e,t,r){var n=r(3);r(8),n.mgf=n.mgf||{},(e.exports=n.mgf.mgf1=n.mgf1=n.mgf1||{}).create=function(e){return{generate:function(t,r){for(var i=new n.util.ByteBuffer,o=Math.ceil(r/e.digestLength),s=0;s{if(e)return i(e);i(null,n.encode(o,t,r))})}e.exports=o,o.Buffer=t,o.multihash=n,o.digest=function(e,t,r,n){if("function"==typeof r&&(n=r,r=void 0),!n)throw new Error("Missing callback");let i,s=n;r&&(s=((e,t)=>{if(e)return n(e);n(null,t.slice(0,r))}));try{i=o.createHash(t)}catch(e){return s(e)}i(e,s)},o.createHash=function(e){if(e=n.coerceCode(e),!o.functions[e])throw new Error("multihash function "+e+" not yet supported");return o.functions[e]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,r(0).Buffer)},function(e,t,r){(function(n,i){var o; /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * @@ -61,16 +58,27 @@ var n=function(e,t){return function(){var r=Array.prototype.slice.call(arguments * @copyright Chen, Yi-Cyuan 2015-2017 * @license MIT */ -!function(){"use strict";var s="input is invalid type",a="object"==typeof window,c=a?window:{};c.JS_SHA3_NO_WINDOW&&(a=!1);var u=!a&&"object"==typeof self;!c.JS_SHA3_NO_NODE_JS&&"object"==typeof n&&n.versions&&n.versions.node?c=i:u&&(c=self);var f=!c.JS_SHA3_NO_COMMON_JS&&"object"==typeof e&&e.exports,l=r(430),h=!c.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,p="0123456789abcdef".split(""),d=[4,1024,262144,67108864],g=[0,8,16,24],b=[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],y=[128,256],v=["hex","buffer","arrayBuffer","array","digest"],w={128:168,256:136};!c.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!h||!c.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 A=function(e,t,r){return function(n){return new D(e,t,e).update(n)[r]()}},_=function(e,t,r){return function(n,i){return new D(e,t,i).update(n)[r]()}},S=function(e,t,r){return function(t,n,i,o){return I["cshake"+e].update(t,n,i,o)[r]()}},E=function(e,t,r){return function(t,n,i,o){return I["kmac"+e].update(t,n,i,o)[r]()}},k=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 K(e,t,r){D.call(this,e,t,r)}D.prototype.update=function(e){if(!this.finalized){var t,r=typeof e;if("string"!==r){if("object"!==r)throw s;if(null===e)throw s;if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw s;t=!0}for(var n,i,o=this.blocks,a=this.byteCount,c=e.length,u=this.blockCount,f=0,l=this.s;f>2]|=e[f]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(o[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=o[u],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},D.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw s;if(null===e)throw s;if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw s;t=!0}var n=0,i=e.length;if(t)n=i;else for(var o=0;o=57344?n+=3:(a=65536+((1023&a)<<10|1023&e.charCodeAt(++o)),n+=4)}return n+=this.encode(8*n),this.update(e),n},D.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]+p[15&e]+p[e>>12&15]+p[e>>8&15]+p[e>>20&15]+p[e>>16&15]+p[e>>28&15]+p[e>>24&15];s%t==0&&(U(r),o=0)}return i&&(e=r[o],a+=p[e>>4&15]+p[15&e],i>1&&(a+=p[e>>12&15]+p[e>>8&15]),i>2&&(a+=p[e>>20&15]+p[e>>16&15])),a},D.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,s=0,a=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(a);for(var c=new Uint32Array(e);s>8&255,c[e+2]=t>>16&255,c[e+3]=t>>24&255;a%r==0&&U(n)}return o&&(e=a<<2,t=n[s],c[e]=255&t,o>1&&(c[e+1]=t>>8&255),o>2&&(c[e+2]=t>>16&255)),c},K.prototype=new D,K.prototype.finalize=function(){return this.encode(this.outputBits,!0),D.prototype.finalize.call(this)};var U=function(e){var t,r,n,i,o,s,a,c,u,f,l,h,p,d,g,m,y,v,w,A,_,S,E,k,x,C,I,B,T,R,P,O,M,N,D,K,U,j,F,L,z,H,q,V,G,W,Y,J,Z,Q,X,$,ee,te,re,ne,ie,oe,se,ae,ce,ue,fe;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|a>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(a<<1|s>>>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^(c<<1|u>>>31),r=o^(u<<1|c>>>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=s^(f<<1|l>>>31),r=a^(l<<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=c^(h<<1|p>>>31),r=u^(p<<1|h>>>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|o>>>31),r=l^(o<<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,d=e[0],g=e[1],W=e[11]<<4|e[10]>>>28,Y=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,ce=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,q=e[41]<<18|e[40]>>>14,N=e[2]<<1|e[3]>>>31,D=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,y=e[12]<<12|e[13]>>>20,J=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,R=e[33]<<13|e[32]>>>19,P=e[32]<<13|e[33]>>>19,ue=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,K=e[14]<<6|e[15]>>>26,U=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Q=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,O=e[45]<<29|e[44]>>>3,M=e[44]<<29|e[45]>>>3,k=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,j=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,A=e[36]<<21|e[37]>>>11,_=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,V=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,C=e[18]<<20|e[19]>>>12,I=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,L=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,S=e[48]<<14|e[49]>>>18,E=e[49]<<14|e[48]>>>18,e[0]=d^~m&v,e[1]=g^~y&w,e[10]=k^~C&B,e[11]=x^~I&T,e[20]=N^~K&j,e[21]=D^~U&F,e[30]=V^~W&J,e[31]=G^~Y&Z,e[40]=te^~ne&oe,e[41]=re^~ie&se,e[2]=m^~v&A,e[3]=y^~w&_,e[12]=C^~B&R,e[13]=I^~T&P,e[22]=K^~j&L,e[23]=U^~F&z,e[32]=W^~J&Q,e[33]=Y^~Z&X,e[42]=ne^~oe&ae,e[43]=ie^~se&ce,e[4]=v^~A&S,e[5]=w^~_&E,e[14]=B^~R&O,e[15]=T^~P&M,e[24]=j^~L&H,e[25]=F^~z&q,e[34]=J^~Q&$,e[35]=Z^~X&ee,e[44]=oe^~ae&ue,e[45]=se^~ce&fe,e[6]=A^~S&d,e[7]=_^~E&g,e[16]=R^~O&k,e[17]=P^~M&x,e[26]=L^~H&N,e[27]=z^~q&D,e[36]=Q^~$&V,e[37]=X^~ee&G,e[46]=ae^~ue&te,e[47]=ce^~fe&re,e[8]=S^~d&m,e[9]=E^~g&y,e[18]=O^~k&C,e[19]=M^~x&I,e[28]=H^~N&K,e[29]=q^~D&U,e[38]=$^~V&W,e[39]=ee^~G&Y,e[48]=ue^~te&ne,e[49]=fe^~re&ie,e[0]^=b[n],e[1]^=b[n+1]};if(f)e.exports=I;else{for(T=0;Tt){var n=new Error("Too few bytes to parse DER.");throw n.available=e.length(),n.remaining=t,n.requested=r,n}}i.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},i.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},i.create=function(e,t,r,o,s){if(n.util.isArray(o)){for(var a=[],c=0;cr){if(a.strict){var p=new Error("Too few bytes to read ASN.1 value.");throw p.available=t.length(),p.remaining=r,p.requested=h,p}h=r}var d;var g;var b=32==(32&u);if(b)if(d=[],void 0===h)for(;;){if(o(t,r,2),t.bytes(2)===String.fromCharCode(0,0)){t.getBytes(2),r-=2;break}c=t.length(),d.push(e(t,r,n+1,a)),r-=c-t.length()}else for(;h>0;)c=t.length(),d.push(e(t,h,n+1,a)),r-=c-t.length(),h-=c-t.length();void 0===d&&f===i.Class.UNIVERSAL&&l===i.Type.BITSTRING&&(g=t.bytes(h));if(void 0===d&&a.decodeBitStrings&&f===i.Class.UNIVERSAL&&l===i.Type.BITSTRING&&h>1){var m=t.read,y=r,v=0;if(l===i.Type.BITSTRING&&(o(t,r,1),v=t.getByte(),r--),0===v)try{c=t.length();var w={verbose:a.verbose,strict:!0,decodeBitStrings:!0},A=e(t,r,n+1,w),_=c-t.length();r-=_,l==i.Type.BITSTRING&&_++;var S=A.tagClass;_!==h||S!==i.Class.UNIVERSAL&&S!==i.Class.CONTEXT_SPECIFIC||(d=[A])}catch(e){}void 0===d&&(t.read=m,r=y)}if(void 0===d){if(void 0===h){if(a.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");h=r}if(l===i.Type.BMPSTRING)for(d="";h>0;h-=2)o(t,r,2),d+=String.fromCharCode(t.getInt16()),r-=2;else d=t.getBytes(h)}var E=void 0===g?null:{bitStringContents:g};return i.create(f,l,b,d,E)}(e,e.length(),0,t)},i.toDer=function(e){var t=n.util.createBuffer(),r=e.tagClass|e.type,o=n.util.createBuffer(),s=!1;if("bitStringContents"in e&&(s=!0,e.original&&(s=i.equals(e,e.original))),s)o.putBytes(e.bitStringContents);else if(e.composed){e.constructed?r|=32:o.putByte(0);for(var a=0;a1&&(0===e.value.charCodeAt(0)&&0==(128&e.value.charCodeAt(1))||255===e.value.charCodeAt(0)&&128==(128&e.value.charCodeAt(1)))?o.putBytes(e.value.substr(1)):o.putBytes(e.value);if(t.putByte(r),o.length()<=127)t.putByte(127&o.length());else{var c=o.length(),u="";do{u+=String.fromCharCode(255&c),c>>>=8}while(c>0);t.putByte(128|u.length);for(a=u.length-1;a>=0;--a)t.putByte(u.charCodeAt(a))}return t.putBuffer(o),t},i.oidToDer=function(e){var t,r,i,o,s=e.split("."),a=n.util.createBuffer();a.putByte(40*parseInt(s[0],10)+parseInt(s[1],10));for(var c=2;c>>=7,t||(o|=128),r.push(o),t=!1}while(i>0);for(var u=r.length-1;u>=0;--u)a.putByte(r[u])}return a},i.derToOid=function(e){var t;"string"==typeof e&&(e=n.util.createBuffer(e));var r=e.getByte();t=Math.floor(r/40)+"."+r%40;for(var i=0;e.length()>0;)i<<=7,128&(r=e.getByte())?i+=127&r:(t+="."+(i+r),i=0);return t},i.utcTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,2),10);r=r>=50?1900+r:2e3+r;var n=parseInt(e.substr(2,2),10)-1,i=parseInt(e.substr(4,2),10),o=parseInt(e.substr(6,2),10),s=parseInt(e.substr(8,2),10),a=0;if(e.length>11){var c=e.charAt(10),u=10;"+"!==c&&"-"!==c&&(a=parseInt(e.substr(10,2),10),u+=2)}if(t.setUTCFullYear(r,n,i),t.setUTCHours(o,s,a,0),u&&("+"===(c=e.charAt(u))||"-"===c)){var f=60*parseInt(e.substr(u+1,2),10)+parseInt(e.substr(u+4,2),10);f*=6e4,"+"===c?t.setTime(+t-f):t.setTime(+t+f)}return t},i.generalizedTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,4),10),n=parseInt(e.substr(4,2),10)-1,i=parseInt(e.substr(6,2),10),o=parseInt(e.substr(8,2),10),s=parseInt(e.substr(10,2),10),a=parseInt(e.substr(12,2),10),c=0,u=0,f=!1;"Z"===e.charAt(e.length-1)&&(f=!0);var l=e.length-5,h=e.charAt(l);"+"!==h&&"-"!==h||(u=60*parseInt(e.substr(l+1,2),10)+parseInt(e.substr(l+4,2),10),u*=6e4,"+"===h&&(u*=-1),f=!0);return"."===e.charAt(14)&&(c=1e3*parseFloat(e.substr(14),10)),f?(t.setUTCFullYear(r,n,i),t.setUTCHours(o,s,a,c),t.setTime(+t+u)):(t.setFullYear(r,n,i),t.setHours(o,s,a,c)),t},i.dateToUtcTime=function(e){if("string"==typeof e)return e;var t="",r=[];r.push((""+e.getUTCFullYear()).substr(2)),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(var n=0;n=-128&&e<128)return t.putSignedInt(e,8);if(e>=-32768&&e<32768)return t.putSignedInt(e,16);if(e>=-8388608&&e<8388608)return t.putSignedInt(e,24);if(e>=-2147483648&&e<2147483648)return t.putSignedInt(e,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=e,r},i.derToInteger=function(e){"string"==typeof e&&(e=n.util.createBuffer(e));var t=8*e.length();if(t>32)throw new Error("Integer too large; max is 32-bits.");return e.getSignedInt(t)},i.validate=function(e,t,r,o){var s=!1;if(e.tagClass!==t.tagClass&&void 0!==t.tagClass||e.type!==t.type&&void 0!==t.type)o&&(e.tagClass!==t.tagClass&&o.push("["+t.name+'] Expected tag class "'+t.tagClass+'", got "'+e.tagClass+'"'),e.type!==t.type&&o.push("["+t.name+'] Expected type "'+t.type+'", got "'+e.type+'"'));else if(e.constructed===t.constructed||void 0===t.constructed){if(s=!0,t.value&&n.util.isArray(t.value))for(var a=0,c=0;s&&c0&&(o+="\n");for(var s="",c=0;c1?o+="0x"+n.util.bytesToHex(e.value.slice(1)):o+="(none)",e.value.length>0){var h=e.value.charCodeAt(0);1==h?o+=" (1 unused bit shown)":h>1&&(o+=" ("+h+" unused bits shown)")}}else e.type===i.Type.OCTETSTRING?(a.test(e.value)||(o+="("+e.value+") "),o+="0x"+n.util.bytesToHex(e.value)):e.type===i.Type.UTF8?o+=n.util.decodeUtf8(e.value):e.type===i.Type.PRINTABLESTRING||e.type===i.Type.IA5String?o+=e.value:a.test(e.value)?o+="0x"+n.util.bytesToHex(e.value):0===e.value.length?o+="[null]":o+=e.value}return o}},function(e,t,r){var n=r(8);e.exports=n.md=n.md||{},n.md.algorithms=n.md.algorithms||{}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)(i.default,e,t)};var n=o(r(743)),i=o(r(619));function o(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,r){"use strict";var n=r(30),i=function(e){return!!n.isString(e)&&/^[0-9a-fA-F]+$/.test(e)};e.exports={isValidJSON:function(e){var t;if(!n.isString(e))return!1;try{t=JSON.parse(e)}catch(e){return!1}return"object"==typeof t},isHexa:i,isHexaString:i,cloneArray:function(e){return[].concat(e)},defineImmutable:function(e,t){return Object.keys(t).forEach(function(r){Object.defineProperty(e,r,{configurable:!1,enumerable:!0,value:t[r]})}),e},isNaturalNumber:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&e>=0}}},function(e,t,r){"use strict";(function(t){const n=r(24),i=r(429);function o(e,t,r,i){if("function"==typeof r&&(i=r,r=void 0),!i)throw new Error("Missing callback");o.digest(e,t,r,(e,o)=>{if(e)return i(e);i(null,n.encode(o,t,r))})}e.exports=o,o.Buffer=t,o.multihash=n,o.digest=function(e,t,r,n){if("function"==typeof r&&(n=r,r=void 0),!n)throw new Error("Missing callback");let i,s=n;r&&(s=((e,t)=>{if(e)return n(e);n(null,t.slice(0,r))}));try{i=o.createHash(t)}catch(e){return s(e)}i(e,s)},o.createHash=function(e){if(e=n.coerceCode(e),!o.functions[e])throw new Error("multihash function "+e+" not yet supported");return o.functions[e]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){r=(0,o.default)(r||n.default);var a=(0,s.default)(t);if(!e())return r(null);var c=function(t){if(t)return r(t);if(e())return a(c);var n=(0,i.default)(arguments,1);r.apply(null,[null].concat(n))};a(c)};var n=a(r(70)),i=a(r(92)),o=a(r(133)),s=a(r(49));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,r){var n=r(960),i=r(706),o=n.tfJSON,s=n.TfTypeError,a=n.TfPropertyTypeError,c=n.tfSubError,u=n.getValueTypeName,f={arrayOf:function(e,t){function r(r,n){return!!i.Array(r)&&(!i.Nil(r)&&(!(void 0!==t.minLength&&r.lengtht.maxLength)&&((void 0===t.length||r.length===t.length)&&r.every(function(t,r){try{return h(e,t,n)}catch(e){throw c(e,r)}})))))}return e=l(e),t=t||{},r.toJSON=function(){var r="["+o(e)+"]";return void 0!==t.length?r+="{"+t.length+"}":void 0===t.minLength&&void 0===t.maxLength||(r+="{"+(void 0===t.minLength?0:t.minLength)+","+(void 0===t.maxLength?1/0:t.maxLength)+"}"),r},r},maybe:function e(t){function r(r,n){return i.Nil(r)||t(r,n,e)}return t=l(t),r.toJSON=function(){return"?"+o(t)},r},map:function(e,t){function r(r,n){if(!i.Object(r))return!1;if(i.Nil(r))return!1;for(var o in r){try{t&&h(t,o,n)}catch(e){throw c(e,o,"key")}try{var s=r[o];h(e,s,n)}catch(e){throw c(e,o)}}return!0}return e=l(e),t&&(t=l(t)),r.toJSON=t?function(){return"{"+o(t)+": "+o(e)+"}"}:function(){return"{"+o(e)+"}"},r},object:function(e){var t={};for(var r in e)t[r]=l(e[r]);function n(e,r){if(!i.Object(e))return!1;if(i.Nil(e))return!1;var n;try{for(n in t){h(t[n],e[n],r)}}catch(e){throw c(e,n)}if(r)for(n in e)if(!t[n])throw new a(void 0,n);return!0}return n.toJSON=function(){return o(t)},n},anyOf:function(){var e=[].slice.call(arguments).map(l);function t(t,r){return e.some(function(e){try{return h(e,t,r)}catch(e){return!1}})}return t.toJSON=function(){return e.map(o).join("|")},t},allOf:function(){var e=[].slice.call(arguments).map(l);function t(t,r){return e.every(function(e){try{return h(e,t,r)}catch(e){return!1}})}return t.toJSON=function(){return e.map(o).join(" & ")},t},quacksLike:function(e){function t(t){return e===u(t)}return t.toJSON=function(){return e},t},tuple:function(){var e=[].slice.call(arguments).map(l);function t(t,r){return!i.Nil(t)&&(!i.Nil(t.length)&&((!r||t.length===e.length)&&e.every(function(e,n){try{return h(e,t[n],r)}catch(e){throw c(e,n)}})))}return t.toJSON=function(){return"("+e.map(o).join(", ")+")"},t},value:function(e){function t(t){return t===e}return t.toJSON=function(){return e},t}};function l(e){if(i.String(e))return"?"===e[0]?f.maybe(e.slice(1)):i[e]||f.quacksLike(e);if(e&&i.Object(e)){if(i.Array(e)){if(1!==e.length)throw new TypeError("Expected compile() parameter of type Array of length 1");return f.arrayOf(e[0])}return f.object(e)}return i.Function(e)?e:f.value(e)}function h(e,t,r,n){if(i.Function(e)){if(e(t,r))return!0;throw new s(n||e,t)}return h(l(e),t,r)}for(var p in f.oneOf=f.anyOf,i)h[p]=i[p];for(p in f)h[p]=f[p];var d=r(1812);for(p in d)h[p]=d[p];h.compile=l,h.TfTypeError=s,h.TfPropertyTypeError=a,e.exports=h},function(e,t,r){e.exports=i;var n=r(23).EventEmitter;function i(){n.call(this)}r(22)(i,n),i.Readable=r(166),i.Writable=r(473),i.Duplex=r(474),i.Transform=r(475),i.PassThrough=r(476),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",c));var s=!1;function a(){s||(s=!0,e.end())}function c(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(f(),0===n.listenerCount(this,"error"))throw e}function f(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",c),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return r.on("error",u),e.on("error",u),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e}},function(e,t,r){"use strict";var n=r(285);e.exports=function(e,t){if(!e)return function(e,r){return e?n(r,e,t):r(!0)};Array.isArray(e)||(e=Object.keys(e).map(function(t){return e[t]}));var r=0;return function(i,o){if(i)return n(o,i,t);r>=e.length?o(!0):o(null,e[r++])}}},function(e,t,r){"use strict";const n=r(19)(r(1034)).Data,i=["raw","directory","file","metadata","symlink","hamt-sharded-directory"],o=["directory","hamt-sharded-directory"];function s(e,t){if(!(this instanceof s))return new s(e,t);if(-1===i.indexOf(e))throw new Error("Type: "+e+" is not valid");this.type=e,this.data=t,this.blockSizes=[],this.addBlockSize=(e=>{this.blockSizes.push(e)}),this.removeBlockSize=(e=>{this.blockSizes.splice(e,1)}),this.fileSize=(()=>{if(o.indexOf(this.type)>=0)return;let e=0;return this.blockSizes.forEach(t=>{e+=t}),t&&(e+=t.length),e}),this.marshal=(()=>{let e;switch(this.type){case"raw":e=n.DataType.Raw;break;case"directory":e=n.DataType.Directory;break;case"file":e=n.DataType.File;break;case"metadata":e=n.DataType.Metadata;break;case"symlink":e=n.DataType.Symlink;break;case"hamt-sharded-directory":e=n.DataType.HAMTShard;break;default:throw new Error(`Unkown type: "${this.type}"`)}let t=this.fileSize(),r=this.data;this.data&&this.data.length||(r=void 0);let i=this.blockSizes;return this.blockSizes&&this.blockSizes.length||(i=void 0),n.encode({Type:e,Data:r,filesize:t,blocksizes:i,hashType:this.hashType,fanout:this.fanout})})}s.unmarshal=(e=>{const t=n.decode(e);t.Data||(t.Data=void 0);const r=new s(i[t.Type],t.Data);return r.blockSizes=t.blocksizes,r}),e.exports=s},function(e,t,r){"use strict";(function(t){var n=r(145),i=r(32),o=r(30),s=function(e){for(var r=new t(e.length),n=0;ne.size?r=n.trim(r,o):o0&&0==(127&e[e.length-1])&&(e.length<=1||0==(128&e[e.length-2])))throw new Error("non-minimally encoded script number");return n.fromSM(e,{endian:"little"})},n.prototype.toScriptNumBuffer=function(){return this.toSM({endian:"little"})},n.prototype.gt=function(e){return this.cmp(e)>0},n.prototype.gte=function(e){return this.cmp(e)>=0},n.prototype.lt=function(e){return this.cmp(e)<0},n.trim=function(e,t){return e.slice(t-e.length,e.length)},n.pad=function(e,r,n){for(var i=new t(n),o=0;o=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function c(e,t,r,n){for(var i=0,o=Math.min(e.length,r),s=t;s=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=a(e,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==t&&(i=a(e,t,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,c=s/67108864|0;r.words[0]=a;for(var u=1;u>>26,l=67108863&c,h=Math.min(u,t.length-1),p=Math.max(0,u-e.length+1);p<=h;p++){var d=u-p|0;f+=(s=(i=0|e.words[d])*(o=0|t.words[p])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,c=0|f}return 0!==c?r.words[u]=0|c:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s>>24-i&16777215)||s!==this.length-1?u[6-c.length]+c+r:c+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var h=f[e],p=l[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modn(p).toString(e);r=(d=d.idivn(p)).isZero()?g+r:u[h-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==s),this.toArrayLike(s,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,c="le"===t,u=new e(o),f=this.clone();if(c){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),u[a]=s;for(;a=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==o&&s>26,this.words[s]=67108863&t;if(0===o&&s>>13,p=0|s[1],d=8191&p,g=p>>>13,b=0|s[2],m=8191&b,y=b>>>13,v=0|s[3],w=8191&v,A=v>>>13,_=0|s[4],S=8191&_,E=_>>>13,k=0|s[5],x=8191&k,C=k>>>13,I=0|s[6],B=8191&I,T=I>>>13,R=0|s[7],P=8191&R,O=R>>>13,M=0|s[8],N=8191&M,D=M>>>13,K=0|s[9],U=8191&K,j=K>>>13,F=0|a[0],L=8191&F,z=F>>>13,H=0|a[1],q=8191&H,V=H>>>13,G=0|a[2],W=8191&G,Y=G>>>13,J=0|a[3],Z=8191&J,Q=J>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ce=8191&ae,ue=ae>>>13,fe=0|a[8],le=8191&fe,he=fe>>>13,pe=0|a[9],de=8191&pe,ge=pe>>>13;r.negative=e.negative^t.negative,r.length=19;var be=(u+(n=Math.imul(l,L))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(h,L)|0))<<13)|0;u=((o=Math.imul(h,z))+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(d,L),i=(i=Math.imul(d,z))+Math.imul(g,L)|0,o=Math.imul(g,z);var me=(u+(n=n+Math.imul(l,q)|0)|0)+((8191&(i=(i=i+Math.imul(l,V)|0)+Math.imul(h,q)|0))<<13)|0;u=((o=o+Math.imul(h,V)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,L),i=(i=Math.imul(m,z))+Math.imul(y,L)|0,o=Math.imul(y,z),n=n+Math.imul(d,q)|0,i=(i=i+Math.imul(d,V)|0)+Math.imul(g,q)|0,o=o+Math.imul(g,V)|0;var ye=(u+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(h,W)|0))<<13)|0;u=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,L),i=(i=Math.imul(w,z))+Math.imul(A,L)|0,o=Math.imul(A,z),n=n+Math.imul(m,q)|0,i=(i=i+Math.imul(m,V)|0)+Math.imul(y,q)|0,o=o+Math.imul(y,V)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,Y)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,Y)|0;var ve=(u+(n=n+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,Q)|0)+Math.imul(h,Z)|0))<<13)|0;u=((o=o+Math.imul(h,Q)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(S,L),i=(i=Math.imul(S,z))+Math.imul(E,L)|0,o=Math.imul(E,z),n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,V)|0,n=n+Math.imul(m,W)|0,i=(i=i+Math.imul(m,Y)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,Y)|0,n=n+Math.imul(d,Z)|0,i=(i=i+Math.imul(d,Q)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,Q)|0;var we=(u+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(h,$)|0))<<13)|0;u=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,L),i=(i=Math.imul(x,z))+Math.imul(C,L)|0,o=Math.imul(C,z),n=n+Math.imul(S,q)|0,i=(i=i+Math.imul(S,V)|0)+Math.imul(E,q)|0,o=o+Math.imul(E,V)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(m,Z)|0,i=(i=i+Math.imul(m,Q)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,Q)|0,n=n+Math.imul(d,$)|0,i=(i=i+Math.imul(d,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0;var Ae=(u+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(h,re)|0))<<13)|0;u=((o=o+Math.imul(h,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(B,L),i=(i=Math.imul(B,z))+Math.imul(T,L)|0,o=Math.imul(T,z),n=n+Math.imul(x,q)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(C,q)|0,o=o+Math.imul(C,V)|0,n=n+Math.imul(S,W)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Y)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,Q)|0,n=n+Math.imul(m,$)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,ee)|0,n=n+Math.imul(d,re)|0,i=(i=i+Math.imul(d,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0;var _e=(u+(n=n+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,se)|0)+Math.imul(h,oe)|0))<<13)|0;u=((o=o+Math.imul(h,se)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(P,L),i=(i=Math.imul(P,z))+Math.imul(O,L)|0,o=Math.imul(O,z),n=n+Math.imul(B,q)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(T,q)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,Y)|0,n=n+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Q)|0)+Math.imul(E,Z)|0,o=o+Math.imul(E,Q)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(m,re)|0,i=(i=i+Math.imul(m,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0,n=n+Math.imul(d,oe)|0,i=(i=i+Math.imul(d,se)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,se)|0;var Se=(u+(n=n+Math.imul(l,ce)|0)|0)+((8191&(i=(i=i+Math.imul(l,ue)|0)+Math.imul(h,ce)|0))<<13)|0;u=((o=o+Math.imul(h,ue)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(N,L),i=(i=Math.imul(N,z))+Math.imul(D,L)|0,o=Math.imul(D,z),n=n+Math.imul(P,q)|0,i=(i=i+Math.imul(P,V)|0)+Math.imul(O,q)|0,o=o+Math.imul(O,V)|0,n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,Y)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,Q)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,Q)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(m,oe)|0,i=(i=i+Math.imul(m,se)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,se)|0,n=n+Math.imul(d,ce)|0,i=(i=i+Math.imul(d,ue)|0)+Math.imul(g,ce)|0,o=o+Math.imul(g,ue)|0;var Ee=(u+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,he)|0)+Math.imul(h,le)|0))<<13)|0;u=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(U,L),i=(i=Math.imul(U,z))+Math.imul(j,L)|0,o=Math.imul(j,z),n=n+Math.imul(N,q)|0,i=(i=i+Math.imul(N,V)|0)+Math.imul(D,q)|0,o=o+Math.imul(D,V)|0,n=n+Math.imul(P,W)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,Y)|0,n=n+Math.imul(B,Z)|0,i=(i=i+Math.imul(B,Q)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,Q)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(E,re)|0,o=o+Math.imul(E,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,n=n+Math.imul(m,ce)|0,i=(i=i+Math.imul(m,ue)|0)+Math.imul(y,ce)|0,o=o+Math.imul(y,ue)|0,n=n+Math.imul(d,le)|0,i=(i=i+Math.imul(d,he)|0)+Math.imul(g,le)|0,o=o+Math.imul(g,he)|0;var ke=(u+(n=n+Math.imul(l,de)|0)|0)+((8191&(i=(i=i+Math.imul(l,ge)|0)+Math.imul(h,de)|0))<<13)|0;u=((o=o+Math.imul(h,ge)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,q),i=(i=Math.imul(U,V))+Math.imul(j,q)|0,o=Math.imul(j,V),n=n+Math.imul(N,W)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(D,W)|0,o=o+Math.imul(D,Y)|0,n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,Q)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Q)|0,n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,se)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,se)|0,n=n+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(A,ce)|0,o=o+Math.imul(A,ue)|0,n=n+Math.imul(m,le)|0,i=(i=i+Math.imul(m,he)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,he)|0;var xe=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,ge)|0)+Math.imul(g,de)|0))<<13)|0;u=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(U,W),i=(i=Math.imul(U,Y))+Math.imul(j,W)|0,o=Math.imul(j,Y),n=n+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,Q)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,Q)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,se)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,se)|0,n=n+Math.imul(S,ce)|0,i=(i=i+Math.imul(S,ue)|0)+Math.imul(E,ce)|0,o=o+Math.imul(E,ue)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,he)|0;var Ce=(u+(n=n+Math.imul(m,de)|0)|0)+((8191&(i=(i=i+Math.imul(m,ge)|0)+Math.imul(y,de)|0))<<13)|0;u=((o=o+Math.imul(y,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,Z),i=(i=Math.imul(U,Q))+Math.imul(j,Z)|0,o=Math.imul(j,Q),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,se)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,se)|0,n=n+Math.imul(x,ce)|0,i=(i=i+Math.imul(x,ue)|0)+Math.imul(C,ce)|0,o=o+Math.imul(C,ue)|0,n=n+Math.imul(S,le)|0,i=(i=i+Math.imul(S,he)|0)+Math.imul(E,le)|0,o=o+Math.imul(E,he)|0;var Ie=(u+(n=n+Math.imul(w,de)|0)|0)+((8191&(i=(i=i+Math.imul(w,ge)|0)+Math.imul(A,de)|0))<<13)|0;u=((o=o+Math.imul(A,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(U,$),i=(i=Math.imul(U,ee))+Math.imul(j,$)|0,o=Math.imul(j,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(D,re)|0,o=o+Math.imul(D,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,n=n+Math.imul(B,ce)|0,i=(i=i+Math.imul(B,ue)|0)+Math.imul(T,ce)|0,o=o+Math.imul(T,ue)|0,n=n+Math.imul(x,le)|0,i=(i=i+Math.imul(x,he)|0)+Math.imul(C,le)|0,o=o+Math.imul(C,he)|0;var Be=(u+(n=n+Math.imul(S,de)|0)|0)+((8191&(i=(i=i+Math.imul(S,ge)|0)+Math.imul(E,de)|0))<<13)|0;u=((o=o+Math.imul(E,ge)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(U,re),i=(i=Math.imul(U,ne))+Math.imul(j,re)|0,o=Math.imul(j,ne),n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(D,oe)|0,o=o+Math.imul(D,se)|0,n=n+Math.imul(P,ce)|0,i=(i=i+Math.imul(P,ue)|0)+Math.imul(O,ce)|0,o=o+Math.imul(O,ue)|0,n=n+Math.imul(B,le)|0,i=(i=i+Math.imul(B,he)|0)+Math.imul(T,le)|0,o=o+Math.imul(T,he)|0;var Te=(u+(n=n+Math.imul(x,de)|0)|0)+((8191&(i=(i=i+Math.imul(x,ge)|0)+Math.imul(C,de)|0))<<13)|0;u=((o=o+Math.imul(C,ge)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,oe),i=(i=Math.imul(U,se))+Math.imul(j,oe)|0,o=Math.imul(j,se),n=n+Math.imul(N,ce)|0,i=(i=i+Math.imul(N,ue)|0)+Math.imul(D,ce)|0,o=o+Math.imul(D,ue)|0,n=n+Math.imul(P,le)|0,i=(i=i+Math.imul(P,he)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,he)|0;var Re=(u+(n=n+Math.imul(B,de)|0)|0)+((8191&(i=(i=i+Math.imul(B,ge)|0)+Math.imul(T,de)|0))<<13)|0;u=((o=o+Math.imul(T,ge)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(U,ce),i=(i=Math.imul(U,ue))+Math.imul(j,ce)|0,o=Math.imul(j,ue),n=n+Math.imul(N,le)|0,i=(i=i+Math.imul(N,he)|0)+Math.imul(D,le)|0,o=o+Math.imul(D,he)|0;var Pe=(u+(n=n+Math.imul(P,de)|0)|0)+((8191&(i=(i=i+Math.imul(P,ge)|0)+Math.imul(O,de)|0))<<13)|0;u=((o=o+Math.imul(O,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,le),i=(i=Math.imul(U,he))+Math.imul(j,le)|0,o=Math.imul(j,he);var Oe=(u+(n=n+Math.imul(N,de)|0)|0)+((8191&(i=(i=i+Math.imul(N,ge)|0)+Math.imul(D,de)|0))<<13)|0;u=((o=o+Math.imul(D,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863;var Me=(u+(n=Math.imul(U,de))|0)+((8191&(i=(i=Math.imul(U,ge))+Math.imul(j,de)|0))<<13)|0;return u=((o=Math.imul(j,ge))+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,c[0]=be,c[1]=me,c[2]=ye,c[3]=ve,c[4]=we,c[5]=Ae,c[6]=_e,c[7]=Se,c[8]=Ee,c[9]=ke,c[10]=xe,c[11]=Ce,c[12]=Ie,c[13]=Be,c[14]=Te,c[15]=Re,c[16]=Pe,c[17]=Oe,c[18]=Me,0!==u&&(c[19]=u,r.length++),r};function d(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):r<63?h(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):d(this,e,t)},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},g.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==f||u>=i);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,c=n.length-i.length;if("mod"!==t){(a=new o(null)).length=c+1,a.words=new Array(a.length);for(var u=0;u=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/s|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);a&&(a.words[l]=h)}return a&&a.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),c=new o(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=t.clone();!t.isZero();){for(var h=0,p=1;0==(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(f),s.isub(l)),i.iushrn(1),s.iushrn(1);for(var d=0,g=1;0==(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||c.isOdd())&&(a.iadd(f),c.isub(l)),a.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(c)):(r.isub(t),a.isub(i),c.isub(s))}return{a:a,b:c,gcd:r.iushln(u)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(t.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var l=0,h=1;0==(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new _(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function m(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},m.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},m.prototype.split=function(e,t){e.iushrn(this.n,0,t)},m.prototype.imulK=function(e){return e.imul(this.k)},i(y,m),y.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new v;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return b[e]=t,t},_.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},_.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),c=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,u).cmp(c);)f.redIAdd(c);for(var l=this.pow(f,i),h=this.pow(e,i.addn(1).iushrn(1)),p=this.pow(e,i),d=s;0!==p.cmp(a);){for(var g=p,b=0;0!==g.cmp(a);b++)g=g.redSqr();n(b=0;n--){for(var u=t.words[n],f=c-1;f>=0;f--){var l=u>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4===++a||0===n&&0===f)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}c=26}return i},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new S(e)},i(S,_),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(39)(e))},function(e,t,r){"use strict";var n=r(179);e.exports=function(e){return n(function(e,t){return e.push(t),e},[],e)}},function(e,t,r){"use strict";var n=r(286);e.exports=function(e){return e=n(e),function(t){return function r(n,i){for(var o,s=!0;s;)s=!1,o=!0,t(n,function(t,n){if(!t&&!e(n))return o?s=!0:r(t,i);i(t,n)}),o=!1}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,i.default)(n.default,e,t)};var n=o(r(330)),i=o(r(743));function o(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,r){"use strict";(function(t){!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,r,n,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,r)});case 3:return t.nextTick(function(){e.call(null,r,n)});case 4:return t.nextTick(function(){e.call(null,r,n,i)});default:for(o=new Array(a-1),s=0;s`}toJSON(){return this._json||(this._json=Object.freeze({name:this.name,size:this.size,multihash:this._cid.toBaseEncodedString()})),Object.assign({},this._json)}get name(){return this._name}set name(e){throw new Error("Can't set property: 'name' is immutable")}get size(){return this._size}set size(e){throw new Error("Can't set property: 'size' is immutable")}get multihash(){return this._cid.buffer}set multihash(e){throw new Error("Can't set property: 'multihash' is immutable")}get cid(){return this._cid}set cid(e){throw new Error("Can't set property: 'cid' is immutable")}},{className:"DAGLink",symbolName:"@ipld/js-ipld-dag-pb/daglink"})).create=r(449),t.util=r(450)},function(e,t){ +!function(){"use strict";var s="input is invalid type",a="object"==typeof window,c=a?window:{};c.JS_SHA3_NO_WINDOW&&(a=!1);var u=!a&&"object"==typeof self;!c.JS_SHA3_NO_NODE_JS&&"object"==typeof n&&n.versions&&n.versions.node?c=i:u&&(c=self);var l=!c.JS_SHA3_NO_COMMON_JS&&"object"==typeof e&&e.exports,f=r(183),p=!c.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,h="0123456789abcdef".split(""),d=[4,1024,262144,67108864],m=[0,8,16,24],g=[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],y=[224,256,384,512],b=[128,256],v=["hex","buffer","arrayBuffer","array","digest"],A={128:168,256:136};!c.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!p||!c.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 w=function(e,t,r){return function(n){return new O(e,t,e).update(n)[r]()}},E=function(e,t,r){return function(n,i){return new O(e,t,i).update(n)[r]()}},k=function(e,t,r){return function(t,n,i,o){return I["cshake"+e].update(t,n,i,o)[r]()}},S=function(e,t,r){return function(t,n,i,o){return I["kmac"+e].update(t,n,i,o)[r]()}},_=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 L(e,t,r){O.call(this,e,t,r)}O.prototype.update=function(e){if(!this.finalized){var t,r=typeof e;if("string"!==r){if("object"!==r)throw s;if(null===e)throw s;if(p&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||p&&ArrayBuffer.isView(e)))throw s;t=!0}for(var n,i,o=this.blocks,a=this.byteCount,c=e.length,u=this.blockCount,l=0,f=this.s;l>2]|=e[l]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(o[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=o[u],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},O.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw s;if(null===e)throw s;if(p&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||p&&ArrayBuffer.isView(e)))throw s;t=!0}var n=0,i=e.length;if(t)n=i;else for(var o=0;o=57344?n+=3:(a=65536+((1023&a)<<10|1023&e.charCodeAt(++o)),n+=4)}return n+=this.encode(8*n),this.update(e),n},O.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]+h[15&e]+h[e>>12&15]+h[e>>8&15]+h[e>>20&15]+h[e>>16&15]+h[e>>28&15]+h[e>>24&15];s%t==0&&(U(r),o=0)}return i&&(e=r[o],a+=h[e>>4&15]+h[15&e],i>1&&(a+=h[e>>12&15]+h[e>>8&15]),i>2&&(a+=h[e>>20&15]+h[e>>16&15])),a},O.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,s=0,a=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(a);for(var c=new Uint32Array(e);s>8&255,c[e+2]=t>>16&255,c[e+3]=t>>24&255;a%r==0&&U(n)}return o&&(e=a<<2,t=n[s],c[e]=255&t,o>1&&(c[e+1]=t>>8&255),o>2&&(c[e+2]=t>>16&255)),c},L.prototype=new O,L.prototype.finalize=function(){return this.encode(this.outputBits,!0),O.prototype.finalize.call(this)};var U=function(e){var t,r,n,i,o,s,a,c,u,l,f,p,h,d,m,y,b,v,A,w,E,k,S,_,x,C,I,B,R,T,N,P,M,D,O,L,U,j,F,K,V,z,G,q,H,Y,J,W,Z,Q,X,$,ee,te,re,ne,ie,oe,se,ae,ce,ue,le;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(p=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|a>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(a<<1|s>>>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^(c<<1|u>>>31),r=o^(u<<1|c>>>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=s^(l<<1|f>>>31),r=a^(f<<1|l>>>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=c^(p<<1|h>>>31),r=u^(h<<1|p>>>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=l^(i<<1|o>>>31),r=f^(o<<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,d=e[0],m=e[1],Y=e[11]<<4|e[10]>>>28,J=e[10]<<4|e[11]>>>28,B=e[20]<<3|e[21]>>>29,R=e[21]<<3|e[20]>>>29,ae=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,z=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,D=e[2]<<1|e[3]>>>31,O=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,W=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,T=e[33]<<13|e[32]>>>19,N=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,U=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,A=e[24]<<11|e[25]>>>21,Q=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,P=e[45]<<29|e[44]>>>3,M=e[44]<<29|e[45]>>>3,_=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,j=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,E=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,q=e[8]<<27|e[9]>>>5,H=e[9]<<27|e[8]>>>5,C=e[18]<<20|e[19]>>>12,I=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,K=e[38]<<8|e[39]>>>24,V=e[39]<<8|e[38]>>>24,k=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=d^~y&v,e[1]=m^~b&A,e[10]=_^~C&B,e[11]=x^~I&R,e[20]=D^~L&j,e[21]=O^~U&F,e[30]=q^~Y&W,e[31]=H^~J&Z,e[40]=te^~ne&oe,e[41]=re^~ie&se,e[2]=y^~v&w,e[3]=b^~A&E,e[12]=C^~B&T,e[13]=I^~R&N,e[22]=L^~j&K,e[23]=U^~F&V,e[32]=Y^~W&Q,e[33]=J^~Z&X,e[42]=ne^~oe&ae,e[43]=ie^~se&ce,e[4]=v^~w&k,e[5]=A^~E&S,e[14]=B^~T&P,e[15]=R^~N&M,e[24]=j^~K&z,e[25]=F^~V&G,e[34]=W^~Q&$,e[35]=Z^~X&ee,e[44]=oe^~ae&ue,e[45]=se^~ce&le,e[6]=w^~k&d,e[7]=E^~S&m,e[16]=T^~P&_,e[17]=N^~M&x,e[26]=K^~z&D,e[27]=V^~G&O,e[36]=Q^~$&q,e[37]=X^~ee&H,e[46]=ae^~ue&te,e[47]=ce^~le&re,e[8]=k^~d&y,e[9]=S^~m&b,e[18]=P^~_&C,e[19]=M^~x&I,e[28]=z^~D&L,e[29]=G^~O&U,e[38]=$^~q&Y,e[39]=ee^~H&J,e[48]=ue^~te&ne,e[49]=le^~re&ie,e[0]^=g[n],e[1]^=g[n+1]};if(l)e.exports=I;else{for(R=0;R(function(t,r){const i=(e,t)=>n(()=>{r(e,t)});let o;try{o=e(t)}catch(e){return void i(e)}i(null,o)})),t.toBuf=((t,r)=>n=>{let i=t(n,r);return e.from(i,"hex")}),t.fromString=((t,r)=>n=>{const i=e.isBuffer(n)?n.toString():n;return t(i,r)}),t.fromNumberTo32BitBuf=((t,r)=>n=>{let i=t(n,r);const o=new Array(4);for(let e=0;e<4;e++)o[e]=255&i,i>>=8;return e.from(o)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(134),i=r(135)();function o(e){return Promise.all([i.subtle.exportKey("jwk",e.privateKey),i.subtle.exportKey("jwk",e.publicKey)])}t.utils=r(422),t.generateKey=function(e,t){n(i.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(o).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.unmarshalPrivateKey=function(e,t){const r=i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);var s;n(Promise.all([r,(s=e,i.subtle.importKey("jwk",{kty:s.kty,n:s.n,e:s.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]))]).then(e=>o({privateKey:e[0],publicKey:e[1]})).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.getRandomValues=function(t){return e.from(i.getRandomValues(t))},t.hashAndSign=function(t,r,o){n(i.subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]).then(e=>i.subtle.sign({name:"RSASSA-PKCS1-v1_5"},e,Uint8Array.from(r))).then(t=>e.from(t)),o)},t.hashAndVerify=function(e,t,r,o){n(i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]).then(e=>i.subtle.verify({name:"RSASSA-PKCS1-v1_5"},e,t,r)),o)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(7),i=r(90).Reporter,o=r(0).Buffer;function s(e,t){i.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function a(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof a||(e=new a(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(s,i),t.DecoderBuffer=s,s.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},s.prototype.restore=function(e){const t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.EncoderBuffer=a,a.prototype.join=function(e,t){return e||(e=new o(this.length)),t||(t=0),0===this.length?e:(Array.isArray(this.value)?this.value.forEach(function(r){r.join(e,t),t+=r.length}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length),e)}},function(e,t,r){"use strict";const n=t;n._reverse=function(e){const t={};return Object.keys(e).forEach(function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r}),t},n.der=r(431)},function(e,t,r){"use strict";const n=r(7),i=r(36),o=i.base,s=i.bignum,a=i.constants.der;function c(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}function u(e){o.Node.call(this,"der",e)}function l(e,t){let r=e.readUInt8(t);if(e.isError(r))return r;const n=a.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){let n=r;for(r=0;128==(128&n);){if(n=e.readUInt8(t),e.isError(n))return n;r<<=7,r|=127&n}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:a.tag[r]}}function f(e,t,r){let n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;const i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(let t=0;t=31)return n.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=a.tagClassByName[r||"universal"]<<6}(e,t,r,this.reporter);if(n.length<128){const e=new i(2);return e[0]=o,e[1]=n.length,this._createEncoderBuffer([e,n])}let s=1;for(let e=n.length;e>=256;e>>=8)s++;const c=new i(2+s);c[0]=o,c[1]=128|s;for(let e=1+s,t=n.length;t>0;e--,t>>=8)c[e]=255&t;return this._createEncoderBuffer([c,n])},u.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=new i(2*e.length);for(let r=0;r=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let n=0;for(let t=0;t=128;r>>=7)n++}const o=new i(n);let s=o.length-1;for(let t=e.length-1;t>=0;t--){let r=e[t];for(o[s--]=127&r;(r>>=7)>0;)o[s--]=128|127&r}return this._createEncoderBuffer(o)},u.prototype._encodeTime=function(e,t){let r;const n=new Date(e);return"gentime"===t?r=[l(n.getUTCFullYear()),l(n.getUTCMonth()+1),l(n.getUTCDate()),l(n.getUTCHours()),l(n.getUTCMinutes()),l(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[l(n.getUTCFullYear()%100),l(n.getUTCMonth()+1),l(n.getUTCDate()),l(n.getUTCHours()),l(n.getUTCMinutes()),l(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=new i(t)}if(i.isBuffer(e)){let t=e.length;0===e.length&&t++;const r=new i(t);return e.copy(r),0===e.length&&(r[0]=0),this._createEncoderBuffer(r)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let r=1;for(let t=e;t>=256;t>>=8)r++;const n=new Array(r);for(let t=n.length-1;t>=0;t--)n[t]=255&e,e>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(new i(n))},u.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},u.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},u.prototype._skipDefault=function(e,t,r){const n=this._baseState;let i;if(null===n.default)return!1;const o=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,r).join()),o.length!==n.defaultBuffer.length)return!1;for(i=0;i{i=i||r(439)(t);class o{constructor(e){i.validatePublicKey(e),this._key=e}verify(e,t,r){a(r),i.hashAndVerify(this._key,t,e,r)}marshal(){return i.compressPublicKey(this._key)}get bytes(){return e.PublicKey.encode({Type:e.KeyType.Secp256k1,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){a(e),n(this.bytes,"sha2-256",e)}}class s{constructor(e,t){this._key=e,this._publicKey=t||i.computePublicKey(e),i.validatePrivateKey(this._key),i.validatePublicKey(this._publicKey)}sign(e,t){a(t),i.hashAndSign(this._key,e,t)}get public(){return new o(this._publicKey)}marshal(){return this._key}get bytes(){return e.PrivateKey.encode({Type:e.KeyType.Secp256k1,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){a(e),n(this.bytes,"sha2-256",e)}}function a(e){if("function"!=typeof e)throw new Error("callback is required")}return{Secp256k1PublicKey:o,Secp256k1PrivateKey:s,unmarshalSecp256k1PrivateKey:function(e,t){t(null,new s(e),null)},unmarshalSecp256k1PublicKey:function(e){return new o(e)},generateKeyPair:function(e,t){void 0===t&&"function"==typeof e&&(t=e),a(t),i.generateKey((e,r)=>{if(e)return t(e);let n;try{n=new s(r)}catch(e){return t(e)}t(null,n)})}}})},function(e){e.exports={COMPRESSED_TYPE_INVALID:"compressed should be a boolean",EC_PRIVATE_KEY_TYPE_INVALID:"private key should be a Buffer",EC_PRIVATE_KEY_LENGTH_INVALID:"private key length is invalid",EC_PRIVATE_KEY_RANGE_INVALID:"private key range is invalid",EC_PRIVATE_KEY_TWEAK_ADD_FAIL:"tweak out of range or resulting private key is invalid",EC_PRIVATE_KEY_TWEAK_MUL_FAIL:"tweak out of range",EC_PRIVATE_KEY_EXPORT_DER_FAIL:"couldn't export to DER format",EC_PRIVATE_KEY_IMPORT_DER_FAIL:"couldn't import from DER format",EC_PUBLIC_KEYS_TYPE_INVALID:"public keys should be an Array",EC_PUBLIC_KEYS_LENGTH_INVALID:"public keys Array should have at least 1 element",EC_PUBLIC_KEY_TYPE_INVALID:"public key should be a Buffer",EC_PUBLIC_KEY_LENGTH_INVALID:"public key length is invalid",EC_PUBLIC_KEY_PARSE_FAIL:"the public key could not be parsed or is invalid",EC_PUBLIC_KEY_CREATE_FAIL:"private was invalid, try again",EC_PUBLIC_KEY_TWEAK_ADD_FAIL:"tweak out of range or resulting public key is invalid",EC_PUBLIC_KEY_TWEAK_MUL_FAIL:"tweak out of range",EC_PUBLIC_KEY_COMBINE_FAIL:"the sum of the public keys is not valid",ECDH_FAIL:"scalar was invalid (zero or overflow)",ECDSA_SIGNATURE_TYPE_INVALID:"signature should be a Buffer",ECDSA_SIGNATURE_LENGTH_INVALID:"signature length is invalid",ECDSA_SIGNATURE_PARSE_FAIL:"couldn't parse signature",ECDSA_SIGNATURE_PARSE_DER_FAIL:"couldn't parse DER signature",ECDSA_SIGNATURE_SERIALIZE_DER_FAIL:"couldn't serialize signature to DER format",ECDSA_SIGN_FAIL:"nonce generation function failed or private key is invalid",ECDSA_RECOVER_FAIL:"couldn't recover public key from signature",MSG32_TYPE_INVALID:"message should be a Buffer",MSG32_LENGTH_INVALID:"message length is invalid",OPTIONS_TYPE_INVALID:"options should be an Object",OPTIONS_DATA_TYPE_INVALID:"options.data should be a Buffer",OPTIONS_DATA_LENGTH_INVALID:"options.data length is invalid",OPTIONS_NONCEFN_TYPE_INVALID:"options.noncefn should be a Function",RECOVERY_ID_TYPE_INVALID:"recovery should be a Number",RECOVERY_ID_VALUE_INVALID:"recovery should have value between -1 and 4",TWEAK_TYPE_INVALID:"tweak should be a Buffer",TWEAK_LENGTH_INVALID:"tweak length is invalid"}},function(e,t,r){"use strict";var n=r(0).Buffer,i=r(7),o=r(203),s=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],l=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],f=[0,1518500249,1859775393,2400959708,2840853838],p=[1352829926,1548603684,1836072691,2053994217,0];function h(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function d(e,t){return e<>>32-t}function m(e,t,r,n,i,o,s,a){return d(e+(t^r^n)+o+s|0,a)+i|0}function g(e,t,r,n,i,o,s,a){return d(e+(t&r|~t&n)+o+s|0,a)+i|0}function y(e,t,r,n,i,o,s,a){return d(e+((t|~r)^n)+o+s|0,a)+i|0}function b(e,t,r,n,i,o,s,a){return d(e+(t&n|r&~n)+o+s|0,a)+i|0}function v(e,t,r,n,i,o,s,a){return d(e+(t^(r|~n))+o+s|0,a)+i|0}i(h,o),h.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,h=0|this._e,A=0|this._a,w=0|this._b,E=0|this._c,k=0|this._d,S=0|this._e,_=0;_<80;_+=1){var x,C;_<16?(x=m(r,n,i,o,h,e[a[_]],f[0],u[_]),C=v(A,w,E,k,S,e[c[_]],p[0],l[_])):_<32?(x=g(r,n,i,o,h,e[a[_]],f[1],u[_]),C=b(A,w,E,k,S,e[c[_]],p[1],l[_])):_<48?(x=y(r,n,i,o,h,e[a[_]],f[2],u[_]),C=y(A,w,E,k,S,e[c[_]],p[2],l[_])):_<64?(x=b(r,n,i,o,h,e[a[_]],f[3],u[_]),C=g(A,w,E,k,S,e[c[_]],p[3],l[_])):(x=v(r,n,i,o,h,e[a[_]],f[4],u[_]),C=m(A,w,E,k,S,e[c[_]],p[4],l[_])),r=h,h=o,o=d(i,10),i=n,n=x,A=S,S=k,k=d(E,10),E=w,w=C}var I=this._b+i+k|0;this._b=this._c+o+S|0,this._c=this._d+h+A|0,this._d=this._e+r+w|0,this._e=this._a+n+E|0,this._a=I},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=h},function(e,t,r){(t=e.exports=function(e){e=e.toLowerCase();var r=t[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r}).sha=r(446),t.sha1=r(447),t.sha224=r(448),t.sha256=r(231),t.sha384=r(449),t.sha512=r(232)},function(e,t,r){var n=r(7),i=r(77),o=r(6).Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function c(){this.init(),this._w=a,i.call(this,64,56)}function u(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function f(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function p(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(c,i),c.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,c=0|this._e,d=0|this._f,m=0|this._g,g=0|this._h,y=0;y<16;++y)r[y]=e.readInt32BE(4*y);for(;y<64;++y)r[y]=0|(((t=r[y-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[y-7]+h(r[y-15])+r[y-16];for(var b=0;b<64;++b){var v=g+p(c)+u(c,d,m)+s[b]+r[b]|0,A=f(n)+l(n,i,o)|0;g=m,m=d,d=c,c=a+v|0,a=o,o=i,i=n,n=v+A|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=c+this._e|0,this._f=d+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},c.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=c},function(e,t,r){var n=r(7),i=r(77),o=r(6).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function c(){this.init(),this._w=a,i.call(this,128,112)}function u(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function f(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function p(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function y(e,t){return e>>>0>>0?1:0}n(c,i),c.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},c.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,c=0|this._fh,b=0|this._gh,v=0|this._hh,A=0|this._al,w=0|this._bl,E=0|this._cl,k=0|this._dl,S=0|this._el,_=0|this._fl,x=0|this._gl,C=0|this._hl,I=0;I<32;I+=2)t[I]=e.readInt32BE(4*I),t[I+1]=e.readInt32BE(4*I+4);for(;I<160;I+=2){var B=t[I-30],R=t[I-30+1],T=h(B,R),N=d(R,B),P=m(B=t[I-4],R=t[I-4+1]),M=g(R,B),D=t[I-14],O=t[I-14+1],L=t[I-32],U=t[I-32+1],j=N+O|0,F=T+D+y(j,N)|0;F=(F=F+P+y(j=j+M|0,M)|0)+L+y(j=j+U|0,U)|0,t[I]=F,t[I+1]=j}for(var K=0;K<160;K+=2){F=t[K],j=t[K+1];var V=l(r,n,i),z=l(A,w,E),G=f(r,A),q=f(A,r),H=p(a,S),Y=p(S,a),J=s[K],W=s[K+1],Z=u(a,c,b),Q=u(S,_,x),X=C+Y|0,$=v+H+y(X,C)|0;$=($=($=$+Z+y(X=X+Q|0,Q)|0)+J+y(X=X+W|0,W)|0)+F+y(X=X+j|0,j)|0;var ee=q+z|0,te=G+V+y(ee,q)|0;v=b,C=x,b=c,x=_,c=a,_=S,a=o+$+y(S=k+X|0,k)|0,o=i,k=E,i=n,E=w,n=r,w=A,r=$+te+y(A=X+ee|0,X)|0}this._al=this._al+A|0,this._bl=this._bl+w|0,this._cl=this._cl+E|0,this._dl=this._dl+k|0,this._el=this._el+S|0,this._fl=this._fl+_|0,this._gl=this._gl+x|0,this._hl=this._hl+C|0,this._ah=this._ah+r+y(this._al,A)|0,this._bh=this._bh+n+y(this._bl,w)|0,this._ch=this._ch+i+y(this._cl,E)|0,this._dh=this._dh+o+y(this._dl,k)|0,this._eh=this._eh+a+y(this._el,S)|0,this._fh=this._fh+c+y(this._fl,_)|0,this._gh=this._gh+b+y(this._gl,x)|0,this._hh=this._hh+v+y(this._hl,C)|0},c.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=c},function(e,t,r){"use strict";var n=r(6).Buffer,i=r(113),o=r(234);function s(e,t){null===e&&null===t?(this.x=this.y=null,this.inf=!0):(this.x=e,this.y=t,this.inf=!1)}s.fromPublicKey=function(e){var t,r,n=e[0];return 33!==e.length||2!==n&&3!==n?65!==e.length||4!==n&&6!==n&&7!==n?null:(t=i.fromBuffer(e.slice(1,33)),r=i.fromBuffer(e.slice(33,65)),t.ucmp(i.p)>=0||r.ucmp(i.p)>=0?null:6!==n&&7!==n||r.isOdd()===(7===n)?0!==t.redSqr().redMul(t).redIAdd7().ucmp(r.redSqr())?null:new s(t,r):null):(t=i.fromBuffer(e.slice(1,33))).ucmp(i.p)>=0?null:null===(r=t.redSqr().redMul(t).redIAdd7().redSqrt())?null:(3===n!==r.isOdd()&&(r=r.redNeg()),new s(t,r))},s.prototype.toPublicKey=function(e){var t,r=this.x,i=this.y;return e?((t=n.alloc(33))[0]=i.isOdd()?3:2,r.toBuffer().copy(t,1)):((t=n.alloc(65))[0]=4,r.toBuffer().copy(t,1),i.toBuffer().copy(t,33)),t},s.fromECJPoint=function(e){if(e.inf)return new s(null,null);var t=e.z.redInvm(),r=t.redSqr();return new s(e.x.redMul(r),e.y.redMul(r).redMul(t))},s.prototype.toECJPoint=function(){return this.inf?new o(null,null,null):new o(this.x,this.y,o.one)},s.prototype.neg=function(){return this.inf?this:new s(this.x,this.y.redNeg())},s.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(0===this.x.ucmp(e.x))return 0===this.y.ucmp(e.y)?this.dbl():new s(null,null);var t=this.y.redSub(e.y);t.isZero()||(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x);return new s(r,t.redMul(this.x.redSub(r)).redISub(this.y))},s.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.isZero())return new s(null,null);var t=this.x.redSqr(),r=t.redAdd(t).redIAdd(t).redMul(e.redInvm()),n=r.redSqr().redISub(this.x.redAdd(this.x));return new s(n,r.redMul(this.x.redSub(n)).redISub(this.y))},s.prototype.mul=function(e){for(var t=this._getNAFPoints(4),r=t.points,n=e.getNAF(t.wnd),i=new o(null,null,null),a=n.length-1;a>=0;a--){for(var c=0;a>=0&&0===n[a];a--,++c);if(a>=0&&(c+=1),i=i.dblp(c),a<0)break;var u=n[a];i=u>0?i.mixedAdd(r[u-1>>1]):i.mixedAdd(r[-u-1>>1].neg())}return s.fromECJPoint(i)},s.prototype._getNAFPoints1=function(){return{wnd:1,points:[this]}},s.prototype._getNAFPoints=function(e){var t=new Array((1<({digest(t,o){((t,r,o)=>{n(i.subtle.sign({name:"HMAC"},t,r).then(t=>e.from(t)),o)})(r,t,o)},length:o[t]})),a)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(13),i=r(473);function o(e,t,r,i){if("function"==typeof r&&(i=r,r=void 0),!i)throw new Error("Missing callback");o.digest(e,t,r,(e,o)=>{if(e)return i(e);i(null,n.encode(o,t,r))})}e.exports=o,o.Buffer=t,o.multihash=n,o.digest=function(e,t,r,n){if("function"==typeof r&&(n=r,r=void 0),!n)throw new Error("Missing callback");let i,s=n;r&&(s=((e,t)=>{if(e)return n(e);n(null,t.slice(0,r))}));try{i=o.createHash(t)}catch(e){return s(e)}i(e,s)},o.createHash=function(e){if(e=n.coerceCode(e),!o.functions[e])throw new Error("multihash function "+e+" not yet supported");return o.functions[e]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(17);t.toCallback=(e=>(function(t,r){const i=(e,t)=>n(()=>{r(e,t)});let o;try{o=e(t)}catch(e){return void i(e)}i(null,o)})),t.toBuf=((t,r)=>n=>{let i=t(n,r);return e.from(i,"hex")}),t.fromString=((t,r)=>n=>{const i=e.isBuffer(n)?n.toString():n;return t(i,r)}),t.fromNumberTo32BitBuf=((t,r)=>n=>{let i=t(n,r);const o=new Array(4);for(let e=0;e<4;e++)o[e]=255&i,i>>=8;return e.from(o)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(144),i=r(145)();function o(e){return Promise.all([i.subtle.exportKey("jwk",e.privateKey),i.subtle.exportKey("jwk",e.publicKey)])}t.utils=r(476),t.generateKey=function(e,t){n(i.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(o).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.unmarshalPrivateKey=function(e,t){const r=i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);var s;n(Promise.all([r,(s=e,i.subtle.importKey("jwk",{kty:s.kty,n:s.n,e:s.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]))]).then(e=>o({privateKey:e[0],publicKey:e[1]})).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.getRandomValues=function(t){return e.from(i.getRandomValues(t))},t.hashAndSign=function(t,r,o){n(i.subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]).then(e=>i.subtle.sign({name:"RSASSA-PKCS1-v1_5"},e,Uint8Array.from(r))).then(t=>e.from(t)),o)},t.hashAndVerify=function(e,t,r,o){n(i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]).then(e=>i.subtle.verify({name:"RSASSA-PKCS1-v1_5"},e,t,r)),o)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(36).bignum;t.toBase64=function(t,r){return t.toArrayLike(e,"be",r).toString("base64").replace(/(=*)$/,"").replace(/\+/g,"-").replace(/\//g,"_")},t.toBn=function(t){return new n(e.from(t,"base64"))}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(240);e.exports=function(e){if(!e||"number"!=typeof e)throw new Error("first argument must be a Number bigger than 0");return n.getRandomValues(new Uint8Array(e))}},function(e,t){e.exports=function(e,t,r){e(t),r&&r(!0===t?null:t)}},function(e,t,r){var n=r(92);function i(e){return e}e.exports=function(e){return"object"==typeof e&&"function"==typeof e.test?function(t){return e.test(t)}:n(e)||i}},function(e,t,r){"use strict";e.exports=function(e,t){var r=(t=t||{}).last||!1,n=!1;if("number"==typeof e){r=!0;var i=e;e=function(){return--i}}return function(t){function i(e){t(!0,function(t){r=!1,e(t||!0)})}return function(o,s){n&&!o?r?i(s):s(n):(n=o)?t(n,s):t(null,function(t,o){(n=n||t)?s(n):e(o)?s(null,o):(n=!0,r?s(null,o):i(s))})}}}},function(e,t,r){"use strict";function n(e){return e}var i=r(92),o=r(52);e.exports=function(e,t){e=i(e)||n;var r={};return o(function(n){var i=e(n);return r[i]?!!t:(r[i]=!0,!t)})}},function(e,t){e.exports=function(e){var t,r=!1;function n(n){if(!n)throw new Error("must be passed a readable");t=n,r&&e(t)}return n.resolve=n.ready=n.start=function(i){return r=!0,e=i||e,t&&e(t),n},n}},function(e,t,r){var n=r(552),i=r(599);e.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},function(e,t,r){(function(e){function r(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}var n=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(e){return n.exec(e).slice(1)};function o(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n=-1&&!n;i--){var s=i>=0?arguments[i]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,n="/"===s.charAt(0))}return(n?"/":"")+(t=r(o(t.split("/"),function(e){return!!e}),!n).join("/"))||"."},t.normalize=function(e){var n=t.isAbsolute(e),i="/"===s(e,-1);return(e=r(o(e.split("/"),function(e){return!!e}),!n).join("/"))||n||(e="."),e&&i&&(e+="/"),(n?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(o(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},t.relative=function(e,r){function n(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=t.resolve(e).substr(1),r=t.resolve(r).substr(1);for(var i=n(e.split("/")),o=n(r.split("/")),s=Math.min(i.length,o.length),a=s,c=0;c{v(e,t,i,n,(e,s)=>{if(e)return l.error("record signature creation failed"),o(Object.assign(new Error("record signature verification failed"),{code:h.ERR_SIGNATURE_CREATION}));const a={value:t,signature:s,validityType:i,validity:n,sequence:r};return l(`ipns entry for ${t} created`),o(null,a)})},g=(e,t,r)=>{const{value:n,validityType:i,validity:o}=t,s=A(n,i,o);e.verify(s,t.signature,(e,t)=>{if(e||!t)return l.error("record signature verification failed"),r(Object.assign(new Error("record signature verification failed"),{code:h.ERR_SIGNATURE_VERIFICATION}));if(i===f.ValidityType.EOL){let e;try{e=p(o.toString())}catch(e){return l.error("unrecognized validity format (not an rfc3339 format)"),r(Object.assign(new Error("unrecognized validity format (not an rfc3339 format)"),{code:h.ERR_UNRECOGNIZED_FORMAT}))}if(e{if(!t||!e){const e="one or more of the provided parameters are not defined";return l.error(e),r(Object.assign(new Error(e),{code:h.ERR_UNDEFINED_PARAMETER}))}if(t.pubKey){let e;try{e=s.keys.unmarshalPublicKey(t.pubKey)}catch(e){return l.error(e),r(e)}return r(null,e)}e.pubKey?r(null,e.pubKey):r(Object.assign(new Error("no public key is available"),{code:h.ERR_UNDEFINED_PARAMETER}))},b=e=>n(e,"RFC4648",{padding:!1}),v=(e,t,r,n,i)=>{const o=A(t,r,n);e.sign(o,(e,t)=>e?i(e):i(null,t))},A=(e,r,n)=>{const i=t.from(e),o=t.from((e=>{if("0"===e.toString())return"EOL";{const t=`unrecognized validity type ${e.toString()}`;throw l.error(t),Object.assign(new Error(t),{code:h.ERR_UNRECOGNIZED_VALIDITY})}})(r)),s=t.from(n);return t.concat([i,s,o])},w=e=>{const t=c.decode(e.id);return t.code!==d?null:s.keys.unmarshalPublicKey(t.digest)},E=f.encode,k=f.decode,S={validate:(e,t,r)=>{const n=k(e),i=t.slice("/ipns/".length);let o;try{o=a.createFromBytes(i)}catch(e){return r(e)}y(o,n,(e,t)=>{if(e)return r(e);g(t,n,e=>{if(e)return r(e);r(null,!0)})})},select:(e,t,r)=>{const n=k(e),i=k(t),o=n.sequence>i.sequence?0:1;if("function"!=typeof r)return o;r(null,o)}};e.exports={create:(e,t,r,n,o)=>{const s=new i(Date.now()+Number(n)).toString(),a=f.ValidityType.EOL;m(e,t,r,s,a,o)},createWithExpiration:(e,t,r,n,i)=>{const o=f.ValidityType.EOL;m(e,t,r,n,o,i)},validate:g,embedPublicKey:(e,t,r)=>{if(!e||!e.bytes||!t){const e="one or more of the provided parameters are not defined";return l.error(e),r(Object.assign(new Error(e),{code:h.ERR_UNDEFINED_PARAMETER}))}a.createFromPubKey(e.bytes,(n,i)=>{if(n)return l.error(n),r(Object.assign(new Error(n),{code:h.ERR_PEER_ID_FROM_PUBLIC_KEY}));let o;try{o=w(i)}catch(n){return l.error(n),r(Object.assign(new Error(n),{code:h.ERR_PUBLIC_KEY_FROM_ID}))}if(o)return r(null,null);try{t.pubKey=s.keys.marshalPublicKey(e)}catch(n){return l.error(n),r(n)}r(null,t)})},extractPublicKey:y,getLocalKey:e=>new o(`/ipns/${b(e)}`),getIdKeys:e=>{const r=t.from("/pk/"),n=t.from("/ipns/");return{routingPubKey:new o(t.concat([r,e])),pkKey:new o(b(t.concat([r,e]))),routingKey:new o(t.concat([n,e])),ipnsKey:new o(b(t.concat([n,e])))}},marshal:E,unmarshal:k,validator:S,namespace:"/ipns/",namespaceLength:"/ipns/".length}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";var n={};function i(e,t,r){r||(r=Error);var i=function(e){var r,n;function i(r,n,i){return e.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,i))||this}return n=e,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=e,n[e]=i}function o(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(e){return String(e)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),i("ERR_INVALID_ARG_TYPE",function(e,t,r){var n,i,s,a;if("string"==typeof t&&(i="not ",t.substr(!s||s<0?0:+s,i.length)===i)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a="The ".concat(e," ").concat(n," ").concat(o(t,"type"));else{var c=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(c," ").concat(n," ").concat(o(t,"type"))}return a+=". Received type ".concat(typeof r)},TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){var o=(0,i.default)(e);return(0,n.default)(function(n,i){var s,a=!1;n.push(function(){a||(i.apply(null,arguments),clearTimeout(s))}),s=setTimeout(function(){var t=e.name||"anonymous",n=new Error('Callback function "'+t+'" timed out.');n.code="ETIMEDOUT",r&&(n.info=r);a=!0,i(n)},t),o.apply(null,n)})};var n=o(r(263)),i=o(r(35));function o(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,r){const n=r(14).EventEmitter,i=r(22),o=r(1040);e.exports=function(e,t){"object"==typeof e&&(t=e,e="START");i.equal(typeof e,"string"),i.equal(typeof t,"object"),i.ok(t[e],"invalid starting state "+e),i.ok(o.validate(t));const r=new n;return s._graph=o.reachable(t),s._emitter=r,s._events=t,s._state=e,s.emit=s,s.on=function(e,t){r.on(e,t)},s;function s(e){const t=s._events[s._state][e];if(!function(e,t,r){if(!t)return!1;if(!e)return!0;const n=r[e];return!(!n||!n[t])&&1===n[t].length}(s._state,t,s._graph)){const t="invalid transition: "+s._state+" -> "+e;return r.emit("error",t)}const n=s._state+":leave",i=t+":enter";return s._state?void(r._events[n]?r.emit(n,o):o()):o();function o(){r._events[i]?r.emit(i,a):a()}function a(){s._state=t,r.emit(t),r.emit("done")}}}},function(e,t,r){"use strict";const n=r(34),i=r(46),o=r(24),s=r(257);e.exports=function(e){function t(e,t,r){return r=r||(()=>{}),e.write(s.CircuitRelay.encode({type:s.CircuitRelay.Type.STATUS,code:t})),r()}return{getB58String:function(e){let t=null;n.isMultiaddr(e)?t=n(e).getPeerId():i.isPeerInfo(e)&&(t=e.id.toB58String());return t},peerInfoFromMa:function(t){let r;if(i.isPeerInfo(t))r=t;else if(n.isMultiaddr(t)){const n=t.getPeerId();try{r=e._peerBook.get(n)}catch(e){r=new i(o.createFromB58String(n))}r.multiaddrs.add(t)}else if(o.isPeerId(t)){const n=t.toB58String();r=e._peerBook.has(n)?e._peerBook.get(n):t}return r},isPeerConnected:function(t){return e.muxedConns[t]||e.conns[t]},validateAddrs:function(e,r,i,o){try{e.dstPeer.addrs.forEach(e=>n(e))}catch(e){return t(r,i===s.CircuitRelay.Type.HOP?s.CircuitRelay.Status.HOP_DST_MULTIADDR_INVALID:s.CircuitRelay.Status.STOP_DST_MULTIADDR_INVALID),o(e)}try{e.srcPeer.addrs.forEach(e=>n(e))}catch(e){return t(r,i===s.CircuitRelay.Type.HOP?s.CircuitRelay.Status.HOP_SRC_MULTIADDR_INVALID:s.CircuitRelay.Status.STOP_SRC_MULTIADDR_INVALID),o(e)}return o(null)},writeResponse:t,peerIdFromId:function(e){return"string"==typeof e?o.createFromB58String(e):o.createFromBytes(e)}}}},function(e,t,r){"use strict";const n=r(25);e.exports=n("\nmessage CircuitRelay {\n\n enum Status {\n SUCCESS = 100;\n HOP_SRC_ADDR_TOO_LONG = 220;\n HOP_DST_ADDR_TOO_LONG = 221;\n HOP_SRC_MULTIADDR_INVALID = 250;\n HOP_DST_MULTIADDR_INVALID = 251;\n HOP_NO_CONN_TO_DST = 260;\n HOP_CANT_DIAL_DST = 261;\n HOP_CANT_OPEN_DST_STREAM = 262;\n HOP_CANT_SPEAK_RELAY = 270;\n HOP_CANT_RELAY_TO_SELF = 280;\n STOP_SRC_ADDR_TOO_LONG = 320;\n STOP_DST_ADDR_TOO_LONG = 321;\n STOP_SRC_MULTIADDR_INVALID = 350;\n STOP_DST_MULTIADDR_INVALID = 351;\n STOP_RELAY_REFUSED = 390;\n MALFORMED_MESSAGE = 400;\n }\n\n enum Type { // RPC identifier, either HOP, STOP or STATUS\n HOP = 1;\n STOP = 2;\n STATUS = 3;\n CAN_HOP = 4;\n }\n\n message Peer {\n required bytes id = 1; // peer id\n repeated bytes addrs = 2; // peer's known addresses\n }\n\n optional Type type = 1; // Type of the message\n\n optional Peer srcPeer = 2; // srcPeer and dstPeer are used when Type is HOP or STATUS\n optional Peer dstPeer = 3;\n\n optional Status code = 4; // Status code, used when Type is STATUS\n}\n")},function(e,t,r){"use strict";const n=r(23),i=r(98),o=r(281),s=r(69);t.OFFLINE_ERROR="This command must be run in online mode. Try running 'ipfs daemon' first.";const a=n(function(e,r,n){Array.isArray(r)||(r=[r]),i(r,(r,n)=>{if("string"!=typeof r){let e;try{e=new s(r)}catch(e){return n(e)}return n(null,e.buffer)}let i;try{i=t.parseIpfsPath(r)}catch(e){return n(e)}const o=new s(i.hash),a=i.links;if(!a.length)return n(null,o.buffer);e.get(o,function t(r,i,o,s){if(o)return n(o);if(!i.length)return n(null,r.buffer);const a=i[0];const c=s.links.find(e=>e.name===a);if(!c)return n(new Error(`no link named "${a}" under ${r.toBaseEncodedString()}`));e.get(c.cid,t.bind(null,c.cid,i.slice(1)))}.bind(null,o,a))},n)});t.normalizePath=(e=>{if(o.cid(e))return`/ipfs/${e}`;if(o.path(e))return e;throw Object.assign(new Error(`invalid ${e} path`),{code:"ERR_BAD_PATH"})}),t.parseIpfsPath=function(e){const t=new Error("invalid ipfs ref path"),r=(e=e.replace(/^\/ipfs\//,"")).match(/([^\/]+(?:\/[^\/]+)*)\/?$/);if(!r)throw t;const[n,...i]=r[1].split("/");if(o.cid(n))return{hash:n,links:i};throw t},t.resolvePath=a},function(e,t,r){var n=r(267);e.exports=function(e,t){return function(r){var i,o,s=[];function a(e){s.push(e)}e=e||function(e){this.queue(e)},t=t||function(){this.queue(null)};var c,u={emit:function(e,t){"data"==e&&a(t),"end"==e&&(i=!0,a(null)),"error"==e&&(o=t)},queue:a};return function(a,l){if(i=i||a,a)return r(a,function(){if(c){var e=c;c=null,e(a)}l(a)});c=l,n(function n(a){if(c)if(l=c,o)c=null,l(o);else if(s.length){var f=s.shift();c=null,l(null===f,f)}else r(i,function(s,f){if(s&&!0!==s)return o=s,a();if(i=i||s)t.call(u);else if(null!==f&&(e.call(u,f),o||i))return r(o||i,function(){c=null,l(o||i)});a(n)})})}}}},function(e,t,r){"use strict";const n=r(42),i={};e.exports=i;for(let e in n){i[n[e].toString("hex")]=e}},function(e,t){t.endianness=function(){return"LE"},t.hostname=function(){return"undefined"!=typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"}},function(e,t,r){ +//! stable.js 0.1.8, https://github.com/Two-Screen/stable +//! © 2018 Angry Bytes and contributors. MIT licensed. +e.exports=function(){"use strict";var e=function(e,r){return t(e.slice(),r)};function t(e,t){"function"!=typeof t&&(t=function(e,t){return String(e).localeCompare(t)});var n=e.length;if(n<=1)return e;for(var i=new Array(n),o=1;ou&&(o=u),s>u&&(s=u),a=i,c=o;;)if(a0){for(var r=i.create(i.Class.CONTEXT_SPECIFIC,1,!0,[]),o=0;o=r&&s0&&s.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,t)),o.length>0&&s.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,o)),s.value[0].value.push(i.create(i.Class.UNIVERSAL,i.Type.SET,!0,e.signerInfos)),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.type).getBytes()),s])},addSigner:function(t){var r=t.issuer,i=t.serialNumber;if(t.certificate){var o=t.certificate;"string"==typeof o&&(o=n.pki.certificateFromPem(o)),r=o.issuer.attributes,i=o.serialNumber}var s=t.key;if(!s)throw new Error("Could not add PKCS#7 signer; no private key specified.");"string"==typeof s&&(s=n.pki.privateKeyFromPem(s));var a=t.digestAlgorithm||n.pki.oids.sha1;switch(a){case n.pki.oids.sha1:case n.pki.oids.sha256:case n.pki.oids.sha384:case n.pki.oids.sha512:case n.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+a)}var c=t.authenticatedAttributes||[];if(c.length>0){for(var u=!1,l=!1,f=0;fe.toJSON()),size:this.size})),Object.assign({},this._json)}toString(){return`DAGNode `}get data(){return this._data}set data(e){throw new Error("Can't set property: 'data' is immutable")}get links(){return this._links}set links(e){throw new Error("Can't set property: 'links' is immutable")}get size(){return void 0===this._size&&(this._size=this.links.reduce((e,t)=>e+t.size,this._serializedSize)),this._size}set size(e){throw new Error("Can't set property: 'size' is immutable")}},{className:"DAGNode",symbolName:"@ipld/js-ipld-dag-pb/dagnode"})).create=r(277),t.clone=r(798),t.addLink=r(799),t.rmLink=r(800)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(262),{serialize:i}=r(278),o=r(280).linkSort,s=r(276),a=r(148);e.exports=function(e,r,c){if("function"==typeof e?(c=e,e=void 0):"string"==typeof e&&(e=t.from(e)),"function"==typeof r&&(c=r,r=[]),!t.isBuffer(e))return c(new Error("Passed 'data' is not a buffer or a string!"));r=r.map(e=>a.isDAGLink(e)?e:a.util.createDagLinkFromB58EncodedHash(e)),r=n(r,o),i({data:e,links:r},(t,n)=>t?c(t):c(null,new s(e,r,n.length)))}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(n){const i=r(279),o=r(25)(r(795)),s=r(612),a=r(148),c=r(276),u=r(29),l=r(9),f=r(17);function p(e,t){let r,{data:n,links:i=[]}=e;!c.isDAGNode(e)&&i&&(i=i.map(e=>a.isDAGLink(e)?e:a.util.createDagLinkFromB58EncodedHash(e)));try{r=o.PBNode.encode(function(e){const t={};e.data&&e.data.length>0?t.Data=e.data:t.Data=null;e.links&&e.links.length>0?t.Links=e.links.map(e=>({Hash:e.cid.buffer,Name:e.name,Tsize:e.size})):t.Links=null;return t}({data:n,links:i}))}catch(e){return t(e)}t(null,r)}(t=e.exports).serialize=p,t.deserialize=function(e,t){const r=o.PBNode.decode(e),i=r.Links.map(e=>new a(e.Name,e.Tsize,e.Hash)),s=null==r.Data?n.alloc(0):r.Data;f(()=>t(null,new c(s,i,e.length)))},t.cid=function(e,t,r){"function"==typeof t&&(r=t,t={});const o=(t=t||{}).hashAlg||s.defaultHashAlg;let a=t.version;void 0===a&&(a="sha2-256"===o?0:1),l([t=>{if(n.isBuffer(e))return t(null,e);p(e,t)},(e,t)=>u(e,o,t),(e,t)=>t(null,new i(a,s.multicodec,e))],r)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(13),i=r(39),o=r(47),s=r(42),a=r(794);class c{constructor(r,s,a){if(e.exports.isCID(r)){let e=r;return this.version=e.version,this.codec=e.codec,void(this.multihash=t.from(e.multihash))}if("string"==typeof r)if(i.isEncoded(r)){const e=i.decode(r);r=parseInt(e.slice(0,1).toString("hex"),16),s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=n.fromB58String(r),r=0;else if(t.isBuffer(r)){const e=r.slice(0,1),t=parseInt(e.toString("hex"),16);if(0===t||1===t){const e=r;r=t,s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=r,r=0}this.codec=s,this.version=r,this.multihash=a,c.validateCID(this)}get buffer(){let e=this._buffer;if(!e){if(0===this.version)e=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");e=t.concat([t.from("01","hex"),o.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:e})}return e}get prefix(){return t.concat([t.from(`0${this.version}`,"hex"),o.getCodeVarint(this.codec),n.prefix(this.multihash)])}toV0(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");const{name:e,length:t}=n.decode(this.multihash);if("sha2-256"!==e)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==t)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new u(0,this.codec,this.multihash)}toV1(){return new u(1,this.codec,this.multihash)}toBaseEncodedString(e){switch(e=e||"base58btc",this.version){case 0:if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");return n.toB58String(this.multihash);case 1:return i.encode(e,this.buffer).toString();default:throw new Error("Unsupported version")}}toString(e){return this.toBaseEncodedString(e)}toJSON(){return{codec:this.codec,version:this.version,hash:this.multihash}}equals(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}static validateCID(e){let t=a.checkCIDComponents(e);if(t)throw new Error(t)}}const u=r(19)(c,{className:"CID",symbolName:"@ipld/js-cid/CID"});u.codecs=s,e.exports=u}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(n){const i=r(148),{cid:o}=r(278);(t=e.exports).cloneData=function(e){let t;return e.data&&e.data.length>0?(t=n.alloc(e.data.length),e.data.copy(t)):t=n.alloc(0),t},t.cloneLinks=function(e){return e.links.slice()},t.linkSort=function(e,t){return n.compare(e.nameAsBuffer,t.nameAsBuffer)},t.toDAGLink=function(e,t,r){"function"==typeof t&&(r=t,t={}),o(e,t,(n,o)=>{if(n)return r(n);r(null,new i(t.name||"",e.size,o))})}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(27),i=r(13),o=r(39),s=r(34),a=r(93),c=r(824),u=/^https?:\/\/[^\/]+\/(ip(f|n)s)\/((\w+).*)/,l=/^\/(ip(f|n)s)\/((\w+).*)/,f=1,p=4,h=/^https?:\/\/([^\/]+)\.(ip(?:f|n)s)\.[^\/]+/;function d(e){try{return new c(e),!0}catch(e){return!1}}function m(e){if(!e)return!1;if(s.isMultiaddr(e))return!0;try{return new s(e),!0}catch(e){return!1}}function g(e,t,r=f,n=p){const i=v(e);if(!i)return!1;const o=i.match(t);if(!o)return!1;if("ipfs"!==o[r])return!1;let s=o[n];return s&&t===h&&(s=s.toLowerCase()),d(s)}function y(e,t,r=f,n){const i=v(e);if(!i)return!1;const o=i.match(t);if(!o)return!1;if("ipns"!==o[r])return!1;if(n&&t===h){let e=o[n];return d(e=e.toLowerCase())}return!0}function b(e){return"string"==typeof e}function v(e){return t.isBuffer(e)?n.encode(e):!!b(e)&&e}const A=e=>g(e,h,2,1),w=e=>y(e,h,2,1);e.exports={multihash:function(e){const r=v(e);try{const e=t.from(n.decode(r));return i.decode(e),!0}catch(e){return!1}},multiaddr:m,peerMultiaddr:function(e){return m(e)&&a.IPFS.matches(e)},cid:d,base32cid:e=>"base32"===function(e){try{return o.isEncoded(e)}catch(e){return!1}}(e)&&d(e),ipfsSubdomain:A,ipnsSubdomain:w,subdomain:e=>A(e)||w(e),subdomainPattern:h,ipfsUrl:e=>g(e,u),ipnsUrl:e=>y(e,u),url:e=>g(e,u)||y(e,u),urlPattern:u,ipfsPath:e=>g(e,l),ipnsPath:e=>y(e,l),path:e=>g(e,l)||y(e,l),pathPattern:l,urlOrPath:e=>g(e,u)||y(e,u)||g(e,l)||y(e,l),cidPath:e=>b(e)&&!d(e)&&g(`/ipfs/${e}`,l)}}).call(this,r(0).Buffer)},function(e,t,r){e.exports=function(e,t,r,n){for(n=0,t=t.split?t.split("."):t;e&&n{e.put(this.transform.convert(t),r)},delete:t=>{e.delete(this.transform.convert(t))},commit:t=>{e.commit(t)}}}query(e){return n(this.child.query(e),n.map(e=>(e.key=this.transform.invert(e.key),e)))}close(e){this.child.close(e)}}},function(e,t,r){"use strict";e.exports=function(e,t,r){if((t-=(e+="").length)<=0)return e;r||0===r||(r=" ");if(" "==(r+="")&&t<10)return n[t]+e;var i="";for(;1&t&&(i+=r),t>>=1;)r+=r;return i+e};var n=[""," "," "," "," "," "," "," "," "," "]},function(e,t,r){"use strict";(function(t){const n=r(16),i=r(855),o=r(28).utils.asyncFilter,s=r(28).utils.asyncSort,a=r(28).Key,c=r(28).Errors,u=r(868);e.exports=class{constructor(e,t){let n;t&&t.db?(n=t.db,delete t.db):n=r(873),this.db=i(u(n(e),{valueEncoding:"binary"}),Object.assign({},t,{compression:!1}),e=>{if(e)throw e})}open(e){this.db.open(t=>{if(t)return e(c.dbOpenFailedError(t));e()})}put(e,t,r){this.db.put(e.toString(),t,e=>{if(e)return r(c.dbWriteFailedError(e));r()})}get(e,t){this.db.get(e.toString(),(e,r)=>{if(e)return t(c.notFoundError(e));t(null,r)})}has(e,t){this.db.get(e.toString(),(e,r)=>{if(e)return e.notFound?void t(null,!1):void t(e);t(null,!0)})}delete(e,t){this.db.del(e.toString(),e=>{if(e)return t(c.dbDeleteFailedError(e));t()})}close(e){this.db.close(e)}batch(){const e=[];return{put:(t,r)=>{e.push({type:"put",key:t.toString(),value:r})},delete:t=>{e.push({type:"del",key:t.toString()})},commit:t=>{this.db.batch(e,t)}}}query(e){let r=!0;null!=e.keysOnly&&(r=!e.keysOnly);const i=this.db.db.iterator({keys:!0,values:r,keyAsBuffer:!0});let c=[(e,n)=>{if(e)return i.end(t=>{n(t||e)});i.next((e,o,s)=>{if(e)return n(e);if(null==e&&null==o&&null==s)return i.end(e=>{n(e||!0)});const c={key:new a(o,!1)};r&&(c.value=t.from(s)),n(null,c)})}],u=[];if(null!=e.prefix){const t=e.prefix;u.push((e,r)=>r(null,e.key.toString().startsWith(t)))}if(null!=e.filters&&(u=u.concat(e.filters)),c=c.concat(u.map(e=>o(e))),null!=e.orders&&(c=c.concat(e.orders.map(e=>s(e)))),null!=e.offset){let t=0;c.push(n.filter(()=>t++>=e.offset))}return null!=e.limit&&c.push(n.take(e.limit)),n.apply(null,c)}}}).call(this,r(0).Buffer)},function(e,t,r){(function(t){function r(e){try{if(!t.localStorage)return!1}catch(e){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,r(12))},function(e,t){e.exports=function(e){return e}},function(e,t,r){"use strict";const n=r(25),i=r(273),o=r(895),s=r(22),a=r(55),c=r(63),u=r(569),l=r(260),f=r(897),p=r(29),h=n(r(898)),d=r(899);class m{constructor(e){this.full=e,this.wantlist=new Map,this.blocks=new Map}get empty(){return 0===this.blocks.size&&0===this.wantlist.size}addEntry(e,t,r){s(e&&u.isCID(e),"must be a valid cid");const n=e.buffer.toString(),i=this.wantlist.get(n);i?(i.priority=t,i.cancel=Boolean(r)):this.wantlist.set(n,new d(e,t,r))}addBlock(e){s(i.isBlock(e),"must be a valid cid");const t=e.cid.buffer.toString();this.blocks.set(t,e)}cancel(e){s(u.isCID(e),"must be a valid cid");const t=e.buffer.toString();this.wantlist.delete(t),this.addEntry(e,0,!0)}serializeToBitswap100(){const e={wantlist:{entries:Array.from(this.wantlist.values()).map(e=>({block:e.cid.buffer,priority:Number(e.priority),cancel:Boolean(e.cancel)}))},blocks:Array.from(this.blocks.values()).map(e=>e.data)};return this.full&&(e.wantlist.full=!0),h.Message.encode(e)}serializeToBitswap110(){const e={wantlist:{entries:Array.from(this.wantlist.values()).map(e=>({block:e.cid.buffer,priority:Number(e.priority),cancel:Boolean(e.cancel)}))},payload:[]};return this.full&&(e.wantlist.full=!0),this.blocks.forEach(t=>{e.payload.push({prefix:t.cid.prefix,data:t.data})}),h.Message.encode(e)}equals(e){const t=(e,t)=>{if(e.equals&&"function"==typeof e.equals)return e.equals(t)};return!(this.full!==e.full||!o(this.wantlist,e.wantlist,t)||!o(this.blocks,e.blocks,t))}get[Symbol.toStringTag](){const e=Array.from(this.wantlist.keys()),t=Array.from(this.blocks.keys());return`BitswapMessage `}}m.deserialize=((e,t)=>{let r;try{r=h.Message.decode(e)}catch(e){return c(()=>t(e))}const n=r.wantlist&&r.wantlist.full||!1,o=new m(n);return r.wantlist&&r.wantlist.entries.forEach(e=>{let r;try{r=new u(e.block)}catch(e){return t(e)}o.addEntry(r,e.priority,e.cancel)}),r.blocks.length>0?a(r.blocks,(e,r)=>{p(e,"sha2-256",(n,s)=>{if(n)return r(n);let a;try{a=new u(s)}catch(n){return t(n)}o.addBlock(new i(e,a)),r()})},e=>{if(e)return t(e);t(null,o)}):r.payload.length>0?a(r.payload,(e,t)=>{if(!e.prefix||!e.data)return c(t);const r=f(e.prefix),n=r[0],s=r[1],a=r[2];p(e.data,a,(r,a)=>{if(r)return t(r);let c;try{c=new u(n,l[s.toString("16")],a)}catch(r){return t(r)}o.addBlock(new i(e.data,c)),t()})},e=>{if(e)return t(e);t(null,o)}):void t(null,o)}),m.Entry=d,e.exports=m},function(e,t,r){"use strict";const{sortBy:n}=r(149),i=r(900);class o{constructor(e){this.set=new Map,this._stats=e}get length(){return this.set.size}add(e,t){const r=e.buffer.toString(),n=this.set.get(r);n?(n.inc(),n.priority=t):(this.set.set(r,new i(e,t)),this._stats&&this._stats.push(null,"wantListSize",1))}remove(e){const t=e.buffer.toString(),r=this.set.get(t);r&&(r.dec(),r.hasRefs()||(this.set.delete(t),this._stats&&this._stats.push(null,"wantListSize",-1)))}removeForce(e){this.set.has(e)&&this.set.delete(e)}forEach(e){return this.set.forEach(e)}entries(){return this.set.entries()}sortedEntries(){return new Map(n(e=>e[1].key,Array.from(this.set.entries())))}contains(e){const t=e.buffer.toString();return this.set.get(t)}}o.Entry=i,e.exports=o},function(e,t,r){(function(n){function i(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG),e}(t=e.exports=r(946)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),!r)return;var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,n)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=i,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(i())}).call(this,r(4))},function(e,t){t.encode=function(e){var t="";for(var r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t},t.decode=function(e){for(var t={},r=e.split("&"),n=0,i=r.length;n=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(i())}).call(this,r(4))},function(e,t,r){(t=e.exports=r(686)).Stream=t,t.Readable=t,t.Writable=r(690),t.Duplex=r(169),t.Transform=r(691),t.PassThrough=r(996)},function(e,t){function r(e,t,r){var n=e.length;if(!n)return r(t);function i(){--n||r(t)}e.forEach(function(e){e?e(t,i):i()}),n||i()}e.exports=function(e){return function(t,n){!function i(){t?r(e,t,n):e.length?e[0]?e[0](null,function(t,o){t?(e.shift(),!0===t?i():r(e,t,n)):n(null,o)}):(e.shift(),i()):n(!0)}()}}},function(e,t,r){"use strict";e.exports=function(){var e,t;return{source:function(r,n){e?e(r,n):t=[r,n]},sink:function(r){if("function"!=typeof r)throw new Error("read must be function");if(e)throw new Error("already piped");if(e=r,t){var n=t;t=null,e.apply(null,n)}}}}},function(e,t,r){"use strict";t.Listener=t.listener=r(1053),t.Dialer=t.dialer=r(1057),t.matchSemver=r(1058),t.matchExact=r(698)},function(e,t,r){"use strict";(function(n){const i=r(15),o=r(37),s=r(33),a=r(65),c=r(5);function u(e){const t=(~~(1e9*Math.random())).toString(36);function r(e){return r=>{Array.isArray(r)&&(r=r.join(" ")),e("(%s) %s",t,r)}}const n=r(c("mss:"+e));return n.error=r(c("mss:"+e+":error")),n}(t=e.exports).writeEncoded=((e,t,r)=>{!function(e,t){i(o(n.isBuffer(e)?[e]:[n.from(e)]),a.encode(),s((e,r)=>{if(e)return t(e);t(null,r[0])}))}(t,(t,n)=>{if(t)return r(t);e.write(n)})}),t.log={},t.log.dialer=(()=>u("dialer\t")),t.log.listener=(()=>u("listener\t"))}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(20);e.exports={CONNECTION_FAILED:e=>n(e,"CONNECTION_FAILED"),DIAL_ABORTED:()=>n("Dial was aborted","DIAL_ABORTED"),ERR_BLACKLISTED:()=>n("Dial is currently blacklisted for this peer","ERR_BLACKLISTED"),DIAL_SELF:()=>n("A node cannot dial itself","DIAL_SELF"),INVALID_STATE_TRANSITION:e=>n(e,"INVALID_STATE_TRANSITION"),NO_TRANSPORTS_REGISTERED:()=>n("No transports registered, dial not possible","NO_TRANSPORTS_REGISTERED"),PROTECTOR_REQUIRED:()=>n("No protector provided with private network enforced","PROTECTOR_REQUIRED"),UNEXPECTED_END:()=>n("Unexpected end of input from reader.","UNEXPECTED_END"),maybeUnexpectedEnd:t=>!0===t?e.exports.UNEXPECTED_END():t}},function(e,t,r){var n=r(706)(Object,"create");e.exports=n},function(e,t,r){var n=r(1101);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},function(e,t,r){var n=r(1107);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},function(e,t,r){var n=r(1164);function i(e,t){return(e=e||[]).push(t),e}e.exports=function(e,t,r,o){var s,a;function c(i){var u=null,l=!1,f=0;if(i,s)return i(!!s.abort||s,function(e){o(e),a&&a()});var p=!1,h=n(function(){p||s||(p=!0,i(null,function(n,c){p=!1,function(c,p){s||((s=n)?l||o(!0===s?null:s):(u=t(u,p),f=u&&u.length||0,null!=u&&function t(){if(l)return;var r=u;u=null;l=!0;f=0;e(r,function(e){l=!1,!0!==s||f?s&&!0!==s?(o(s),a&&a()):e?i(s=!!e.abort||e,o):f?t():h():o(e)})}(),f{let u=a.cidVersion||i,l=a.hashAlg||o,f=a.codec||s;if(t.isBuffer(e)&&(u=1,f="raw"),"sha2-256"!==l&&(u=1),a.onlyHash)return n(e,{version:u,hashAlg:l},(t,r)=>{c(t,{cid:r,node:e})});r.put(e,{version:u,hashAlg:l,format:f},(t,r)=>{c(t,{cid:r,node:e})})})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(285),i=r(96),o=r(9),s=r(54),a=r(48),c=s.DAGLink,u=s.DAGNode,l=r(29),f=r(590),p=r(305),h=r(1179),d=r(15),m=r(266),g=r(81),y=r(1182),b=function(e){return new Promise((r,n)=>{l(e,"murmur3-128",(e,i)=>{if(e)n(e);else{const e=i.slice(2,10),n=e.length,o=t.alloc(n);for(let t=0;t{e(t.key,t.value,r)}),m(t))}flush(e,r,s,l){!function(e,r,s,l,f,h){const d=r._children;let m=0;const g=[];i(()=>m{const r=d.get(m);r?function(t,r,i){const o=n(r.toString(16).toUpperCase(),2,"0");if(y.isBucket(t))w(e,t,s,l,null,(e,{cid:t,node:r})=>{e?i(e):(g.push(new c(o,r.size,t)),i())});else{const e=t.value,r=o+t.key;g.push(new c(r,e.size,e.multihash)),i()}}(r,m,e=>{m++,t(e)}):(m++,t())},n=>{n?h(n):function(n,i){const c=t.from(d.bitField().reverse()),h=new a("hamt-sharded-directory",c);h.fanout=r.tableSize(),h.hashType=e.hashFn.code,o([e=>u.create(h.marshal(),n,e),(t,r)=>p(t,l,e,r),({cid:e,node:t},r)=>{const n={path:s,size:t.size,multihash:e.buffer};f&&f.push(n),r(null,{cid:e,node:t})}],i)}(g,h)})}(this._options,this._bucket,e,r,s,(e,t)=>{if(e)return l(e);this.multihash=t.cid.buffer,this.size=t.node.size,l(null,t)})}}function w(e,r,s,l,f,h){const d=r._children;let m=0;const g=[];i(()=>m{const t=d.get(m);if(t){b(t,m,t=>{m++;e(t)})}else{m++;e()}},e=>{if(e){h(e);return}v(g,h)});function b(t,r,i){const o=n(r.toString(16).toUpperCase(),2,"0");if(y.isBucket(t)){w(e,t,s,l,null,(e,{cid:t,node:r})=>{if(e){i(e);return}g.push(new c(o,r.size,t));i()})}else{const e=t.value;const r=o+t.key;g.push(new c(r,e.size,e.multihash));i()}}function v(n,i){const c=t.from(d.bitField().reverse()),h=new a("hamt-sharded-directory",c);h.fanout=r.tableSize(),h.hashType=e.hashFn.code,o([e=>u.create(h.marshal(),n,e),(t,r)=>p(t,l,e,r),({cid:e,node:t},r)=>{const n={path:s,size:t.size,multihash:e.buffer};if(f){f.push(n)}r(null,{cid:e,node:t})}],i)}}e.exports=function(e,t){return new A(e,t)},e.exports.hashFn=b}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(69);function i(e){const t={},r=e.split("-");switch(r.length){case 1:t.avgChunkSize=262144;break;case 2:t.avgChunkSize=o(r[1],"avg");break;case 4:t.minChunkSize=o(r[1],"min"),t.avgChunkSize=o(r[2],"avg"),t.maxChunkSize=o(r[3],"max");break;default:throw new Error('Incorrect chunker format (expected "rabin" "rabin-[avg]" or "rabin-[min]-[avg]-[max]"')}return t}function o(e,t){let r=parseInt(e);if(isNaN(r))throw new Error(`Chunker parameter ${t} must be an integer`);return r}t.normalizePath=(t=>e.isBuffer(t)?new n(t).toString():n.isCID(t)?t.toString():(0===t.indexOf("/ipfs/")&&(t=t.substring("/ipfs/".length)),"/"===t.charAt(t.length-1)&&(t=t.substring(0,t.length-1)),t)),t.parseChunkerString=(e=>{if(e){if(e.startsWith("size-")){const t=e.split("-")[1],r=parseInt(t);if(isNaN(r))throw new Error("Chunker parameter size must be an integer");return{chunker:"fixed",chunkerOptions:{maxChunkSize:r}}}if(e.startsWith("rabin"))return{chunker:"rabin",chunkerOptions:i(e)};throw new Error(`Unrecognized chunker option: ${e}`)}return{chunker:"fixed"}})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(28).Key;e.exports={FILE_SEPARATOR:"/",MFS_ROOT_KEY:new n("/local/filesroot"),MAX_CHUNK_SIZE:262144,MAX_LINKS:174,FILE_TYPES:{file:0,directory:1,"hamt-sharded-directory":1}}},function(e,t,r){"use strict";(function(t){const n=r(48).unmarshal,{formatCid:i,toMfsPath:o,loadNode:s}=r(94),a=r(9),c=r(15),u=r(33),l=r(81),f=r(117),p=r(5)("ipfs:mfs:stat"),h={hash:!1,size:!1,withLocal:!1,cidBase:"base58btc"};e.exports=(e=>(function(r,d,m){"function"==typeof d&&(m=d,d={}),d=Object.assign({},h,d),p(`Fetching stats for ${r}`),a([t=>o(e,r,t),({mfsPath:o,depth:a},h)=>{c(f(o,e.ipld,{maxDepth:a}),l((r,o)=>d.hash?o(null,{hash:i(r.cid,d.cidBase)}):d.size?o(null,{size:r.size}):void s(e,{cid:r.cid},(e,r)=>{if(e)return o(e);const{node:s,cid:a}=r;if(t.isBuffer(s))return o(null,{hash:i(a,d.cidBase),size:s.length,cumulativeSize:s.length,blocks:0,type:"file",local:void 0,sizeLocal:void 0,withLocality:!1});const c=n(s.data);let u=s.links.length;"file"===c.type&&(u=c.blockSizes.length),o(null,{hash:i(a,d.cidBase),size:c.fileSize()||0,cumulativeSize:s.size,blocks:u,type:c.type,local:void 0,sizeLocal:void 0,withLocality:!1})})),u((e,t)=>e?h(e):t.length?(p(`Stats for ${r}`,t[0]),h(null,t[0])):h(new Error(`${r} does not exist`))))}],m)}))}).call(this,r(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(311);Object.defineProperty(t,"createProxyServer",{enumerable:!0,get:function(){return o(n).default}}),Object.defineProperty(t,"closeProxyServer",{enumerable:!0,get:function(){return n.closeProxyServer}});var i=r(519);function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"createProxyClient",{enumerable:!0,get:function(){return o(i).default}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.closeProxyServer=function e(t){return Promise.all(Object.keys(t).map(function(r){return t[r].close?Promise.resolve(t[r].close()):Promise.resolve(e(t[r]))}))};var n=r(1),i=r(2),o=E(r(324)),s=E(r(326)),a=E(r(343)),c=E(r(354)),u=E(r(355)),l=E(r(384)),f=E(r(483)),p=E(r(509)),h=E(r(510)),d=E(r(511)),m=E(r(512)),g=E(r(513)),y=E(r(514)),b=E(r(515)),v=E(r(516)),A=E(r(517)),w=E(r(518));function E(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if("function"!=typeof(t=t||{}).pre){var r=t.pre||{};t.pre=function(e){return r[e]}}var E={bitswap:(0,o.default)(e,t),block:(0,s.default)(e,t),bootstrap:(0,a.default)(e,t),config:(0,c.default)(e,t),dag:(0,u.default)(e,t),dht:(0,l.default)(e,t),dns:(0,n.expose)("ipfs.dns",(0,i.pre)(t.pre("dns"),function(){var t;return(t=e()).dns.apply(t,arguments)}),t),files:(0,f.default)(e,t),id:(0,n.expose)("ipfs.id",(0,i.pre)(t.pre("id"),function(){return e().id()}),t),key:(0,p.default)(e,t),name:(0,d.default)(e,t),object:(0,m.default)(e,t),pin:(0,g.default)(e,t),pubsub:(0,b.default)(e,t),repo:(0,v.default)(e,t),resolve:(0,n.expose)("ipfs.resolve",(0,i.pre)(t.pre("resolve"),function(){var t;return(t=e()).resolve.apply(t,arguments)}),t),stats:(0,A.default)(e,t),stop:(0,n.expose)("ipfs.stop",(0,i.pre)(t.pre("stop"),function(){return e().stop()}),t),swarm:(0,w.default)(e,t),version:(0,n.expose)("ipfs.version",(0,i.pre)(t.pre("version"),function(){return e().version()}),t)};return Object.assign(E,(0,h.default)(e,t),(0,y.default)(e,t)),E}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s,t.call=function(e){return s(e).apply(null,[].slice.call(arguments,1))};var n,i=r(30),o=(n=i)&&n.__esModule?n:{default:n};function s(e,t){var r=(t=t||{}).addListener||window.addEventListener,n=t.removeListener||window.removeEventListener,i=t.postMessage||window.postMessage,s=t.targetOrigin||"*",a=t.getMessageData||function(e){return e.data};return function(){var t={sender:"postmsg-rpc/client",id:(0,o.default)(),func:e,args:Array.from(arguments)},c=void 0,u=new Promise(function(o,u){var l=function r(){var i=a.apply(null,arguments);if(i&&"postmsg-rpc/server"===i.sender&&i.id===t.id){if(n("message",r),i.err){var s=new Error("Unexpected error calling "+e);return Object.assign(s,i.err),u(s)}o(i.res)}};c=function(){n("message",l);var t=new Error("Canceled call to "+e);t.isCanceled=!0,u(t)},r("message",l),i(t,s)});return u.cancel=function(){return c()},u}}},function(e,t,r){"use strict";var n=r(99),i=r(315),o=r(319),s=r(320)||0;function a(){return i(s)}e.exports=a,e.exports.generate=a,e.exports.seed=function(t){return n.seed(t),e.exports},e.exports.worker=function(t){return s=t,e.exports},e.exports.characters=function(e){return void 0!==e&&n.characters(e),n.shuffled()},e.exports.isValid=o},function(e,t,r){"use strict";var n=1;e.exports={nextValue:function(){return(n=(9301*n+49297)%233280)/233280},seed:function(e){n=e}}},function(e,t,r){"use strict";var n,i,o=r(316),s=(r(99),1459707606518),a=6;e.exports=function(e){var t="",r=Math.floor(.001*(Date.now()-s));return r===i?n++:(n=0,i=r),t+=o(a),t+=o(e),n>0&&(t+=o(n)),t+=o(r)}},function(e,t,r){"use strict";var n=r(99),i=r(317),o=r(318);e.exports=function(e){for(var t,r=0,s="";!t;)s+=o(i,n.get(),1),t=e2&&(o=[o[0],e.apply(void 0,n(o.slice(1)))]);var a=o[0]||i;if("function"!=typeof a)throw new TypeError("Pre function must be a function");var c=o[1];if("function"!=typeof c)throw new TypeError("Function to call must be a function");return function(){for(var e=arguments.length,t=Array(e),r=0;r2&&(o=[e.apply(void 0,n(o.slice(0,-1))),o[o.length-1]]);var a=o[0];if("function"!=typeof a)throw new TypeError("Function to call must be a function");var c=o[1]||i;if("function"!=typeof c)throw new TypeError("Post function must be a function");return function(){var e=a.apply(void 0,arguments);return e&&"function"==typeof e.then?e.then(c):c(e)}};var i=function(e){return e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{ledger:(0,n.expose)("ipfs.bitswap.ledger",function(){var t;return(t=e().bitswap).ledger.apply(t,arguments)},t),reprovide:(0,n.expose)("ipfs.bitswap.reprovide",function(){var t;return(t=e().bitswap).reprovide.apply(t,arguments)},t),stat:(0,n.expose)("ipfs.bitswap.stat",(0,i.post)(function(){var t;return(t=e().bitswap).stat.apply(t,arguments)},function(e){return e&&((0,o.isBig)(e.blocksReceived)&&(e.blocksReceived=(0,o.bigToJson)(e.blocksReceived)),(0,o.isBig)(e.dataReceived)&&(e.dataReceived=(0,o.bigToJson)(e.dataReceived)),(0,o.isBig)(e.blocksSent)&&(e.blocksSent=(0,o.bigToJson)(e.blocksSent)),(0,o.isBig)(e.dataSent)&&(e.dataSent=(0,o.bigToJson)(e.dataSent)),(0,o.isBig)(e.dupBlksReceived)&&(e.dupBlksReceived=(0,o.bigToJson)(e.dupBlksReceived)),(0,o.isBig)(e.dupDataReceived)&&(e.dupDataReceived=(0,o.bigToJson)(e.dupDataReceived))),e}),t),unwant:(0,n.expose)("ipfs.bitswap.unwant",function(){var t;return(t=e().bitswap).unwant.apply(t,arguments)},t),wantlist:(0,n.expose)("ipfs.bitswap.wantlist",function(){var t;return(t=e().bitswap).wantlist.apply(t,arguments)},t)}};var n=r(1),i=r(2),o=r(71)},function(e,t,r){var n;!function(i){"use strict";var o,s=20,a=1,c=1e6,u=-7,l=21,f="[big.js] ",p=f+"Invalid ",h=p+"decimal places",d=p+"rounding mode",m={},g=void 0,y=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function b(e,t,r,n){var i=e.c,o=e.e+t+1;if(o=5;else if(2===r)n=i[o]>5||5==i[o]&&(n||o<0||i[o+1]!==g||1&i[o-1]);else if(3===r)n=n||!!i[0];else if(n=!1,0!==r)throw Error(d);if(o<1)i.length=1,n?(e.e=-t,i[0]=1):i[0]=e.e=0;else{if(i.length=o--,n)for(;++i[o]>9;)i[o]=0,o--||(++e.e,i.unshift(1));for(o=i.length;!i[--o];)i.pop()}}else if(r<0||r>3||r!==~~r)throw Error(d);return e}function v(e,t,r,n){var i,o,s=e.constructor,a=!e.c[0];if(r!==g){if(r!==~~r||r<(3==t)||r>c)throw Error(3==t?p+"precision":h);for(r=n-(e=new s(e)).e,e.c.length>++n&&b(e,r,s.RM),2==t&&(n=e.e+r+1);e.c.length=s.PE))o=o.charAt(0)+(r>1?"."+o.slice(1):"")+(i<0?"e":"e+")+i;else if(i<0){for(;++i;)o="0"+o;o="0."+o}else if(i>0)if(++i>r)for(i-=r;i--;)o+="0";else i1&&(o=o.charAt(0)+"."+o.slice(1));return e.s<0&&(!a||4==t)?"-"+o:o}m.abs=function(){var e=new this.constructor(this);return e.s=1,e},m.cmp=function(e){var t,r=this,n=r.c,i=(e=new r.constructor(e)).c,o=r.s,s=e.s,a=r.e,c=e.e;if(!n[0]||!i[0])return n[0]?o:i[0]?-s:0;if(o!=s)return o;if(t=o<0,a!=c)return a>c^t?1:-1;for(s=(a=n.length)<(c=i.length)?a:c,o=-1;++oi[o]^t?1:-1;return a==c?0:a>c^t?1:-1},m.div=function(e){var t=this,r=t.constructor,n=t.c,i=(e=new r(e)).c,o=t.s==e.s?1:-1,s=r.DP;if(s!==~~s||s<0||s>c)throw Error(h);if(!i[0])throw Error("[big.js] Division by zero");if(!n[0])return new r(0*o);var a,u,l,f,p,d=i.slice(),m=a=i.length,y=n.length,v=n.slice(0,a),A=v.length,w=e,E=w.c=[],k=0,S=s+(w.e=t.e-e.e)+1;for(w.s=o,o=S<0?0:S,d.unshift(0);A++A?1:-1;else for(p=-1,f=0;++pv[p]?1:-1;break}if(!(f<0))break;for(u=A==a?i:d;A;){if(v[--A]S&&b(w,s,r.RM,v[0]!==g),w},m.eq=function(e){return!this.cmp(e)},m.gt=function(e){return this.cmp(e)>0},m.gte=function(e){return this.cmp(e)>-1},m.lt=function(e){return this.cmp(e)<0},m.lte=function(e){return this.cmp(e)<1},m.minus=m.sub=function(e){var t,r,n,i,o=this,s=o.constructor,a=o.s,c=(e=new s(e)).s;if(a!=c)return e.s=-c,o.plus(e);var u=o.c.slice(),l=o.e,f=e.c,p=e.e;if(!u[0]||!f[0])return f[0]?(e.s=-c,e):new s(u[0]?o:0);if(a=l-p){for((i=a<0)?(a=-a,n=u):(p=l,n=f),n.reverse(),c=a;c--;)n.push(0);n.reverse()}else for(r=((i=u.length0)for(;c--;)u[t++]=0;for(c=t;r>a;){if(u[--r]0?(c=s,t=u):(i=-i,t=a),t.reverse();i--;)t.push(0);t.reverse()}for(a.length-u.length<0&&(t=u,u=a,a=t),i=u.length,o=0;i;a[i]%=10)o=(a[--i]=a[i]+u[i]+o)/10|0;for(o&&(a.unshift(o),++c),i=a.length;0===a[--i];)a.pop();return e.c=a,e.e=c,e},m.pow=function(e){var t=this,r=new t.constructor(1),n=r,i=e<0;if(e!==~~e||e<-1e6||e>1e6)throw Error(p+"exponent");for(i&&(e=-e);1&e&&(n=n.times(t)),e>>=1;)t=t.times(t);return i?r.div(n):n},m.round=function(e,t){var r=this.constructor;if(e===g)e=0;else if(e!==~~e||e<-c||e>c)throw Error(h);return b(new r(this),e,t===g?r.RM:t)},m.sqrt=function(){var e,t,r,n=this,i=n.constructor,o=n.s,s=n.e,a=new i(.5);if(!n.c[0])return new i(n);if(o<0)throw Error(f+"No square root");0===(o=Math.sqrt(n+""))||o===1/0?((t=n.c.join("")).length+s&1||(t+="0"),s=((s+1)/2|0)-(s<0||1&s),e=new i(((o=Math.sqrt(t))==1/0?"1e":(o=o.toExponential()).slice(0,o.indexOf("e")+1))+s)):e=new i(o),s=e.e+(i.DP+=4);do{r=e,e=a.times(r.plus(n.div(r)))}while(r.c.slice(0,s).join("")!==e.c.slice(0,s).join(""));return b(e,i.DP-=4,i.RM)},m.times=m.mul=function(e){var t,r=this,n=r.constructor,i=r.c,o=(e=new n(e)).c,s=i.length,a=o.length,c=r.e,u=e.e;if(e.s=r.s==e.s?1:-1,!i[0]||!o[0])return new n(0*e.s);for(e.e=c+u,sc;)a=t[u]+o[c]*i[u-c-1]+a,t[u--]=a%10,a=a/10|0;t[u]=(t[u]+a)%10}for(a?++e.e:t.shift(),c=t.length;!t[--c];)t.pop();return e.c=t,e},m.toExponential=function(e){return v(this,1,e,e)},m.toFixed=function(e){return v(this,2,e,this.e+e)},m.toPrecision=function(e){return v(this,3,e,e-1)},m.toString=function(){return v(this)},m.valueOf=m.toJSON=function(){return v(this,4)},(o=function e(){function t(r){var n=this;if(!(n instanceof t))return r===g?e():new t(r);r instanceof t?(n.s=r.s,n.e=r.e,n.c=r.c.slice()):function(e,t){var r,n,i;if(0===t&&1/t<0)t="-0";else if(!y.test(t+=""))throw Error(p+"number");for(e.s="-"==t.charAt(0)?(t=t.slice(1),-1):1,(r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),i=t.length,n=0;n0&&"0"==t.charAt(--i););for(e.e=r-n-1,e.c=[],r=0;n<=i;)e.c[r++]=+t.charAt(n++)}}(n,r),n.constructor=t}return t.prototype=m,t.DP=s,t.RM=a,t.NE=u,t.PE=l,t.version="5.2.2",t}()).default=o.Big=o,void 0===(n=function(){return o}.call(t,r,t,e))||(e.exports=n)}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{put:(0,n.expose)("ipfs.block.put",(0,i.pre)((0,a.preBufferFromJson)(0),(0,o.preBlockFromJson)(0),function(){for(var e=arguments.length,t=Array(e),r=0;r0?n-4:n,f=0;f>16&255,a[c++]=t>>8&255,a[c++]=255&t;2===s&&(t=i[e.charCodeAt(f)]<<2|i[e.charCodeAt(f+1)]>>4,a[c++]=255&t);1===s&&(t=i[e.charCodeAt(f)]<<10|i[e.charCodeAt(f+1)]<<4|i[e.charCodeAt(f+2)]>>2,a[c++]=t>>8&255,a[c++]=255&t);return a},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],s=0,a=r-i;sa?a:s+16383));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.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 l(e,t,r){for(var i,o,s=[],a=t;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,c=(1<>1,l=-7,f=r?i-1:0,p=r?-1:1,h=e[t+f];for(f+=p,o=h&(1<<-l)-1,h>>=-l,l+=a;l>0;o=256*o+e[t+f],f+=p,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+e[t+f],f+=p,l-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),o-=u}return(h?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,c,u=8*o-i-1,l=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+f>=1?p/c:p*Math.pow(2,1-f))*c>=2&&(s++,c/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*c-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+h]=255&a,h+=d,a/=256,i-=8);for(s=s<0;e[r+h]=255&s,h+=d,s/=256,u-=8);e[r+h-d]|=128*m}},function(e,t,r){"use strict";t.names=Object.freeze({id: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({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",46000:"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,46000: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){e.exports=function e(t,o,s){o=o||[];s=s||0;var a=s;for(;t>=i;)o[s++]=255&t|r,t/=128;for(;t&n;)o[s++]=255&t|r,t>>>=7;o[s]=0|t;e.bytes=s-a+1;return o};var r=128,n=-128,i=Math.pow(2,31)},function(e,t){e.exports=function e(t,i){var o,s=0,i=i||0,a=0,c=i,u=t.length;do{if(c>=u)throw e.bytes=0,new RangeError("Could not decode varint");o=t[c++],s+=a<28?(o&n)<=r);e.bytes=c-i;return s};var r=128,n=127},function(e,t){var r=Math.pow(2,7),n=Math.pow(2,14),i=Math.pow(2,21),o=Math.pow(2,28),s=Math.pow(2,35),a=Math.pow(2,42),c=Math.pow(2,49),u=Math.pow(2,56),l=Math.pow(2,63);e.exports=function(e){return e(e[t[0]]=new n(t[0],t[1],t[2],t[3]),e),{}),l=c.reduce((e,t)=>(e[t[1]]=u[t[0]],e),{});e.exports={names:u,codes:l}},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 o=0,s=0,a="";for(let e=0;e=5;)a+=t[s>>>o-5&31],o-=5;if(o>0&&(a+=t[s<<5-o&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,o=0,s=new Uint8Array(5*r/8|0);for(let a=0;a=8&&(s[o++]=i>>>n-8&255,n-=8);return s.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 o=i.indexOf("=");return o>0&&!r&&(i=i.substring(0,o)),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";const n=r(42),i=r(174).varintBufferEncode,o={};e.exports=o;for(let e in n){let t=n[e];o[e]=i(t)}},function(e,t,r){"use strict";e.exports=Object.freeze({RAW:85,CBOR:81,PROTOBUF:80,RLP:96,BENCODE:99,MULTICODEC:48,MULTIHASH:49,MULTIADDR:50,MULTIBASE:51,IDENTITY:0,MD4:212,MD5:213,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,X11:4352,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,IP4:4,IP6:41,IP6ZONE:42,TCP:6,UDP:273,DCCP:33,SCTP:132,UDT:301,UTP:302,P2P:421,IPFS:421,HTTP:480,HTTPS:443,QUIC:460,WS:477,WSS:478,ONION:444,ONION3:445,GARLIC64:446,P2P_CIRCUIT:290,DNS:53,DNS4:54,DNS6:55,DNSADDR:56,P2P_WEBSOCKET_STAR:479,P2P_STARDUST:277,P2P_WEBRTC_STAR:275,P2P_WEBRTC_DIRECT:276,UNIX:400,DAG_PB:112,DAG_CBOR:113,DAG_JSON:297,GIT_RAW:120,ETH_BLOCK:144,ETH_BLOCK_LIST:145,ETH_TX_TRIE:146,ETH_TX:147,ETH_TX_RECEIPT_TRIE:148,ETH_TX_RECEIPT:149,ETH_STATE_TRIE:150,ETH_ACCOUNT_SNAPSHOT:151,ETH_STORAGE_TRIE:152,BITCOIN_BLOCK:176,BITCOIN_TX:177,ZCASH_BLOCK:192,ZCASH_TX:193,STELLAR_BLOCK:208,STELLAR_TX:209,DECRED_BLOCK:224,DECRED_TX:225,DASH_BLOCK:240,DASH_TX:241,LEOFCOIN_BLOCK:129,LEOFCOIN_TX:130,LEOFCOIN_PR:131,TORRENT_INFO:123,TORRENT_FILE:124,ED25519_PUB:237,IPLD_NS:226,IPFS_NS:227,SWARM_NS:228})},function(e,t,r){"use strict";e.exports=Object.freeze({85:"raw",81:"cbor",80:"protobuf",96:"rlp",99:"bencode",48:"multicodec",49:"multihash",50:"multiaddr",51:"multibase",0:"identity",212:"md4",213:"md5",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",4352:"x11",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",46000:"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",4:"ip4",41:"ip6",42:"ip6zone",6:"tcp",273:"udp",33:"dccp",132:"sctp",301:"udt",302:"utp",421:"p2p",480:"http",443:"https",460:"quic",477:"ws",478:"wss",444:"onion",445:"onion3",446:"garlic64",290:"p2p-circuit",53:"dns",54:"dns4",55:"dns6",56:"dnsaddr",479:"p2p-websocket-star",277:"p2p-stardust",275:"p2p-webrtc-star",276:"p2p-webrtc-direct",400:"unix",112:"dag-pb",113:"dag-cbor",297:"dag-json",120:"git-raw",144:"eth-block",145:"eth-block-list",146:"eth-tx-trie",147:"eth-tx",148:"eth-tx-receipt-trie",149:"eth-tx-receipt",150:"eth-state-trie",151:"eth-account-snapshot",152:"eth-storage-trie",176:"bitcoin-block",177:"bitcoin-tx",192:"zcash-block",193:"zcash-tx",208:"stellar-block",209:"stellar-tx",224:"decred-block",225:"decred-tx",240:"dash-block",241:"dash-tx",129:"leofcoin-block",130:"leofcoin-tx",131:"leofcoin-pr",123:"torrent-info",124:"torrent-file",237:"ed25519-pub",226:"ipld-ns",227:"ipfs-ns",228:"swarm-ns"})},function(e,t,r){"use strict";(function(t){const n=r(13);var i={checkCIDComponents:function(e){if(null==e)return"null values are not valid CIDs";if(0!==e.version&&1!==e.version)return"Invalid version, must be a number equal to 1 or 0";if("string"!=typeof e.codec)return"codec must be string";if(!t.isBuffer(e.multihash))return"multihash must be a Buffer";try{n.validate(e.multihash)}catch(e){let t=e.message;return t||(t="Multihash validation failed"),t}}};e.exports=i}).call(this,r(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{add:(0,n.expose)("ipfs.bootstrap.add",(0,i.pre)(t.pre("bootstrap.add"),(0,i.post)(function(){var t;return(t=e().bootstrap).add.apply(t,arguments)},(0,o.postArrayOf)("Peers",s.isMultiaddr,s.multiaddrToJson))),t),list:(0,n.expose)("ipfs.bootstrap.list",(0,i.pre)(t.pre("bootstrap.list"),(0,i.post)(function(){var t;return(t=e().bootstrap).list.apply(t,arguments)},(0,o.postArrayOf)("Peers",s.isMultiaddr,s.multiaddrToJson))),t),rm:(0,n.expose)("ipfs.bootstrap.rm",(0,i.pre)(t.pre("bootstrap.rm"),(0,i.post)(function(){var t;return(t=e().bootstrap).rm.apply(t,arguments)},(0,o.postArrayOf)("Peers",s.isMultiaddr,s.multiaddrToJson))),t)}};var n=r(1),i=r(2),o=r(100),s=r(84)},function(e,t,r){"use strict";(function(t){const n=r(73),i=r(66),o=r(345),s=r(127),a=r(18),c=r(27),u=r(19),l=new Error("Sorry, Not Implemented Yet."),f=u.proto(function(e){if(!(this instanceof f))return new f(e);if(null==e&&(e=""),e instanceof t)this.buffer=o.fromBuffer(e);else if("string"==typeof e||e instanceof String){if(e.length>0&&"/"!==e.charAt(0))throw new Error(`multiaddr "${e}" must start with a "/"`);this.buffer=o.fromString(e)}else{if(!(e.buffer&&e.protos&&e.protoCodes))throw new Error("addr must be a string, Buffer, or another Multiaddr");this.buffer=o.fromBuffer(e.buffer)}},{className:"Multiaddr",symbolName:"@multiformats/js-multiaddr/multiaddr"});f.prototype.toString=function(){return o.bufferToString(this.buffer)},f.prototype.toOptions=function(){const e={},t=this.toString().split("/");return e.family="ip4"===t[1]?"ipv4":"ipv6",e.host=t[2],e.transport=t[3],e.port=t[4],e},f.prototype.inspect=function(){return""},f.prototype.protos=function(){return n(this.protoCodes(),function(e){return i(s(e))})},f.prototype.protoCodes=function(){const e=[],t=this.buffer;let r=0;for(;r{if(e[0]===s.names.ipfs.code)return!0})[0][1],c.decode(e)}catch(t){e=null}return e},f.prototype.equals=function(e){return this.buffer.equals(e.buffer)},f.prototype.nodeAddress=function(){const e=this.protoCodes(),t=this.protoNames(),r=this.toString().split("/").slice(1);if(r.length<4)throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6}/{address}/{tcp, udp}/{port}".');if(4!==e[0]&&41!==e[0]&&54!==e[0]&&55!==e[0])throw new Error(`no protocol with name: "'${t[0]}'". Must have a valid family name: "{ip4, ip6, dns4, dns6}".`);if("tcp"!==r[2]&&"udp"!==r[2])throw new Error(`no protocol with name: "'${t[1]}'". Must have a valid transport protocol: "{tcp, udp}".`);return{family:41===e[0]||55===e[0]?6:4,address:r[1],port:r[3]}},f.fromNodeAddress=function(e,t){if(!e)throw new Error("requires node address object");if(!t)throw new Error("requires transport protocol");const r="IPv6"===e.family?"ip6":"ip4";return f("/"+[r,e.address,t,e.port].join("/"))},f.prototype.isThinWaistAddress=function(e){const t=(e||this).protos();return 2===t.length&&((4===t[0].code||41===t[0].code)&&(6===t[1].code||17===t[1].code))},f.prototype.fromStupidString=function(e){throw l},f.protocols=s,f.isName=function(e){return!!f.isMultiaddr(e)&&e.protos().some(e=>e.resolvable)},f.resolve=function(e,t){return f.isMultiaddr(e)&&f.isName(e)?t(new Error("not implemented yet")):t(new Error("not a valid name"))},e.exports=f}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(73),i=r(175),o=r(346),s=r(127),a=r(18);function c(e){const t=[],r=e.split("/").slice(1);if(1===r.length&&""===r[0])return[];for(let n=0;n=r.length)throw v("invalid address: "+e);t.push([i,r[n]])}else t.push([i])}return t}function u(e){const t=[];return n(e,function(e){const r=A(e);t.push(r.name),e.length>1&&t.push(e[1])}),"/"+t.join("/")}function l(e){return n(e,function(e){Array.isArray(e)||(e=[e]);const t=A(e);return e.length>1?[t.code,o.toBuffer(t.code,e[1])]:[t.code]})}function f(e){return n(e,function(e){const t=A(e);return e.length>1?[t.code,o.toString(t.code,e[1])]:[t.code]})}function p(e){return g(t.concat(n(e,function(e){const r=A(e);let n=t.from(a.encode(r.code));return e.length>1&&(n=t.concat([n,e[1]])),n})))}function h(e,t){if(e.size>0)return e.size/8;if(0===e.size)return 0;return a.decode(t)+a.decode.bytes}function d(e){const t=[];let r=0;for(;re.length)throw v("Invalid address buffer: "+e.toString("hex"));t.push([n,c])}return t}function m(e){return p(l(c(e=b(e))))}function g(e){const r=y(e);if(r)throw r;return t.from(e)}function y(e){try{d(e)}catch(e){return e}}function b(e){return"/"+i(e.trim().split("/")).join("/")}function v(e){return new Error("Error parsing address: "+e)}function A(e){return s(e[0])}e.exports={stringToStringTuples:c,stringTuplesToString:u,tuplesToStringTuples:f,stringTuplesToTuples:l,bufferToTuples:d,tuplesToBuffer:p,bufferToString:function(e){return u(f(d(e)))},stringToBuffer:m,fromString:function(e){return m(e)},fromBuffer:g,validateBuffer:y,isValidBuffer:function(e){return void 0===y(e)},cleanPath:b,ParseError:v,protoFromTuple:A,sizeForAddr:h}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(153),i=r(176),o=r(127),s=r(27),a=r(18);function c(e,r){return r instanceof t?c.toString(e,r):c.toBuffer(e,r)}function u(e){if(!e.isValid())throw new Error("invalid ip address");return n.toBuffer(e.address)}e.exports=c,c.toString=function(e,t){switch((e=o(e)).code){case 4:case 41:return n.toString(t);case 6:case 17:case 33:case 132:return function(e){return e.readUInt16BE(0)}(t);case 54:case 55:case 56:return function(e){const t=a.decode(e);if((e=e.slice(a.decode.bytes)).length!==t)throw new Error("inconsistent lengths");return e.toString()}(t);case 421:return function(e){const t=a.decode(e),r=e.slice(a.decode.bytes);if(r.length!==t)throw new Error("inconsistent lengths");return s.encode(r)}(t);default:return t.toString("hex")}},c.toBuffer=function(e,r){switch((e=o(e)).code){case 4:return u(new i.Address4(r));case 41:return u(new i.Address6(r));case 6:case 17:case 33:case 132:return function(e){const r=t.alloc(2);return r.writeUInt16BE(e,0),r}(parseInt(r,10));case 54:case 55:case 56:return function(e){const r=t.from(e),n=t.from(a.encode(r.length));return t.concat([n,r])}(r);case 421:return function(e){const r=t.from(s.decode(e)),n=t.from(a.encode(r.length));return t.concat([n,r])}(r);default:return t.from(r,"hex")}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";var n=r(178).BigInteger,i=r(348),o=r(349),s=r(350),a=r(180),c=r(181),u=r(85).sprintf,l=r(125),f=r(126),p=r(177);function h(e){return e=(e=e.replace(/^(0{1,})([1-9]+)$/,'$1$2')).replace(/^(0{1,})(0)$/,'$1$2')}function d(e,t){this.groups=void 0===t?f.GROUPS:t,this.v4=!1,this.subnet="/128",this.subnetMask=128,this.zone="",this.address=e;var r=f.RE_SUBNET_STRING.exec(e);if(r){if(this.parsedSubnet=r[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet="/"+this.subnetMask,isNaN(this.subnetMask)||this.subnetMask<0||this.subnetMask>f.BITS)return this.valid=!1,void(this.error="Invalid subnet mask.");e=e.replace(f.RE_SUBNET_STRING,"")}else if(/\//.test(e))return this.valid=!1,void(this.error="Invalid subnet mask.");var n=f.RE_ZONE_STRING.exec(e);n&&(this.zone=n[0],e=e.replace(f.RE_ZONE_STRING,"")),this.addressMinusSuffix=e,this.parsedAddress=this.parse(this.addressMinusSuffix)}function m(e){return u("%04x",parseInt(e,16))}function g(e){return 255&e}s(d.prototype,r(351)),s(d.prototype,r(352)),s(d.prototype,r(353)),d.fromBigInteger=function(e){var t,r=a(e.toString(16),32,"0"),n=[];for(t=0;t65536)&&(r=null):r=null,{address:new d(t),port:r}},d.fromAddress4=function(e){e=new p(e);var t=f.BITS-(l.BITS-e.subnetMask);return new d("::ffff:"+e.correctForm()+"/"+t)},d.fromArpa=function(e){var t=e.replace(/(\.ip6\.arpa)?\.$/,"");if(63!==t.length)return t={error:"Not Valid 'ip6.arpa' form",address:null};t=t.split(".").reverse();for(var r=7;r>0;r--){var n=4*r;t.splice(n,0,":")}return new d(t=t.join(""))},d.prototype.microsoftTranscription=function(){return u("%s.ipv6-literal.net",this.correctForm().replace(/:/g,"-"))},d.prototype.mask=function(e){return void 0===e&&(e=this.subnetMask),this.getBitsBase2(0,e)},d.prototype.possibleSubnets=function(e){void 0===e&&(e=128);var t=f.BITS-this.subnetMask-Math.abs(e-f.BITS);return t<0?"0":function(e){for(var t=/(\d+)(\d{3})/;t.test(e);)e=e.replace(t,"$1,$2");return e}(new n("2",10).pow(t).toString(10))},d.prototype._startAddress=function(){return new n(this.mask()+c(0,f.BITS-this.subnetMask),2)},d.prototype.startAddress=function(){return d.fromBigInteger(this._startAddress())},d.prototype.startAddressExclusive=function(){var e=new n("1");return d.fromBigInteger(this._startAddress().add(e))},d.prototype._endAddress=function(){return new n(this.mask()+c(1,f.BITS-this.subnetMask),2)},d.prototype.endAddress=function(){return d.fromBigInteger(this._endAddress())},d.prototype.endAddressExclusive=function(){var e=new n("1");return d.fromBigInteger(this._endAddress().subtract(e))},d.prototype.getScope=function(){var e=f.SCOPES[this.getBits(12,16)];return"Global unicast"===this.getType()&&"Link local"!==e&&(e="Global"),e},d.prototype.getType=function(){var e=this;return i(f.TYPES,function(t,r){return e.isInSubnet(new d(r))})||"Global unicast"},d.prototype.getBits=function(e,t){return new n(this.getBitsBase2(e,t),2)},d.prototype.getBitsBase2=function(e,t){return this.binaryZeroPad().slice(e,t)},d.prototype.getBitsBase16=function(e,t){var r=t-e;return r%4!=0?null:a(this.getBits(e,t).toString(16),r/4,"0")},d.prototype.getBitsPastSubnet=function(){return this.getBitsBase2(this.subnetMask,f.BITS)},d.prototype.reverseForm=function(e){e||(e={});var t=Math.floor(this.subnetMask/4),r=this.canonicalForm().replace(/:/g,"").split("").slice(0,t).reverse().join(".");return t>0?e.omitSuffix?r:u("%s.ip6.arpa.",r):e.omitSuffix?"":"ip6.arpa."},d.prototype.correctForm=function(){if(!this.parsedAddress)return null;var e,t=[],r=0,n=[];for(e=0;e0&&(r>1&&n.push([e-r,e-1]),r=0)}r>1&&n.push([this.parsedAddress.length-r,this.parsedAddress.length-1]);var s=n.map(function(e){return e[1]-e[0]+1});if(n.length>0){var a=s.indexOf(o(s));t=function(e,t){var r,n=[],i=[];for(r=0;rt[1]&&i.push(e[r]);return n.concat(["compact"]).concat(i)}(this.parsedAddress,n[a])}else t=this.parsedAddress;for(e=0;e1?"s":"",t.join("")),this.parseError=e.replace(f.RE_BAD_CHARACTERS,'$1'),null;var r=e.match(f.RE_BAD_ADDRESS);if(r)return this.valid=!1,this.error=u("Address failed regex: %s",r.join("")),this.parseError=e.replace(f.RE_BAD_ADDRESS,'$1'),null;var n=[],i=e.split("::");if(2===i.length){var o=i[0].split(":"),s=i[1].split(":");1===o.length&&""===o[0]&&(o=[]),1===s.length&&""===s[0]&&(s=[]);var a=this.groups-(o.length+s.length);if(!a)return this.valid=!1,this.error="Error parsing groups",null;this.elidedGroups=a,this.elisionBegin=o.length,this.elisionEnd=o.length+this.elidedGroups,o.forEach(function(e){n.push(e)});for(var c=0;c=0;o--)r=r.add(i.multiply(new n(e[o].toString(10),10))),i=i.multiply(t);return d.fromBigInteger(r)},e.exports=d},function(e,t,r){(function(e,r){var n=200,i="Expected a function",o="__lodash_hash_undefined__",s=1,a=2,c=1/0,u=9007199254740991,l=1.7976931348623157e308,f=NaN,p="[object Arguments]",h="[object Array]",d="[object Boolean]",m="[object Date]",g="[object Error]",y="[object Function]",b="[object GeneratorFunction]",v="[object Map]",A="[object Number]",w="[object Object]",E="[object RegExp]",k="[object Set]",S="[object String]",_="[object Symbol]",x="[object ArrayBuffer]",C="[object DataView]",I=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,B=/^\w*$/,R=/^\./,T=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,N=/^\s+|\s+$/g,P=/\\(\\)?/g,M=/^[-+]0x[0-9a-f]+$/i,D=/^0b[01]+$/i,O=/^\[object .+?Constructor\]$/,L=/^0o[0-7]+$/i,U=/^(?:0|[1-9]\d*)$/,j={};j["[object Float32Array]"]=j["[object Float64Array]"]=j["[object Int8Array]"]=j["[object Int16Array]"]=j["[object Int32Array]"]=j["[object Uint8Array]"]=j["[object Uint8ClampedArray]"]=j["[object Uint16Array]"]=j["[object Uint32Array]"]=!0,j[p]=j[h]=j[x]=j[d]=j[C]=j[m]=j[g]=j[y]=j[v]=j[A]=j[w]=j[E]=j[k]=j[S]=j["[object WeakMap]"]=!1;var F=parseInt,K="object"==typeof e&&e&&e.Object===Object&&e,V="object"==typeof self&&self&&self.Object===Object&&self,z=K||V||Function("return this")(),G=t&&!t.nodeType&&t,q=G&&"object"==typeof r&&r&&!r.nodeType&&r,H=q&&q.exports===G&&K.process,Y=function(){try{return H&&H.binding("util")}catch(e){}}(),J=Y&&Y.isTypedArray;function W(e,t){for(var r=-1,n=e?e.length:0;++ru))return!1;var f=o.get(e);if(f&&o.get(t))return f==t;var p=-1,h=!0,d=i&s?new Me:void 0;for(o.set(e,t),o.set(t,e);++p-1},Ne.prototype.set=function(e,t){var r=this.__data__,n=Le(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},Pe.prototype.clear=function(){this.__data__={hash:new Te,map:new(be||Ne),string:new Te}},Pe.prototype.delete=function(e){return He(this,e).delete(e)},Pe.prototype.get=function(e){return He(this,e).get(e)},Pe.prototype.has=function(e){return He(this,e).has(e)},Pe.prototype.set=function(e,t){return He(this,e).set(e,t),this},Me.prototype.add=Me.prototype.push=function(e){return this.__data__.set(e,o),this},Me.prototype.has=function(e){return this.__data__.has(e)},De.prototype.clear=function(){this.__data__=new Ne},De.prototype.delete=function(e){return this.__data__.delete(e)},De.prototype.get=function(e){return this.__data__.get(e)},De.prototype.has=function(e){return this.__data__.has(e)},De.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Ne){var i=r.__data__;if(!be||i.length-1&&e%1==0&&e-1?n[i?e[o]:o]:void 0});function it(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(i);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s),s};return r.cache=new(it.Cache||Pe),r}function ot(e,t){return e===t||e!=e&&t!=t}function st(e){return function(e){return pt(e)&&ct(e)}(e)&&ce.call(e,"callee")&&(!he.call(e,"callee")||ue.call(e)==p)}it.Cache=Pe;var at=Array.isArray;function ct(e){return null!=e&<(e.length)&&!ut(e)}function ut(e){var t=ft(e)?ue.call(e):"";return t==y||t==b}function lt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=u}function ft(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function pt(e){return!!e&&"object"==typeof e}function ht(e){return"symbol"==typeof e||pt(e)&&ue.call(e)==_}var dt=J?function(e){return function(t){return e(t)}}(J):function(e){return pt(e)&<(e.length)&&!!j[ue.call(e)]};function mt(e){return ct(e)?Oe(e):ze(e)}function gt(e){return e}r.exports=nt}).call(this,r(12),r(50)(e))},function(e,t){var r="[object Symbol]",n=Object.prototype.toString;function i(e,t){return e>t}function o(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&n.call(e)==r}function s(e){return e}e.exports=function(e){return e&&e.length?function(e,t,r){for(var n=-1,i=e.length;++n-1},oe.prototype.set=function(e,t){var r=this.__data__,n=fe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},se.prototype.clear=function(){this.size=0,this.__data__={hash:new ie,map:new(te||oe),string:new ie}},se.prototype.delete=function(e){var t=we(this,e).delete(e);return this.size-=t?1:0,t},se.prototype.get=function(e){return we(this,e).get(e)},se.prototype.has=function(e){return we(this,e).has(e)},se.prototype.set=function(e,t){var r=we(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},ae.prototype.clear=function(){this.__data__=new oe,this.size=0},ae.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},ae.prototype.get=function(e){return this.__data__.get(e)},ae.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.set=function(e,t){var r=this.__data__;if(r instanceof oe){var i=r.__data__;if(!te||i.length-1&&e%1==0&&e0){if(++t>=o)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Q?function(e,t){return Q(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:je);function xe(e,t){return e===t||e!=e&&t!=t}var Ce=ge(function(){return arguments}())?ge:function(e){return Me(e)&&L.call(e,"callee")&&!J.call(e,"callee")},Ie=Array.isArray;function Be(e){return null!=e&&Ne(e.length)&&!Te(e)}var Re=X||function(){return!1};function Te(e){if(!Pe(e))return!1;var t=me(e);return t==l||t==f||t==u||t==d}function Ne(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Pe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Me(e){return null!=e&&"object"==typeof e}var De=C?function(e){return function(t){return e(t)}}(C):function(e){return Me(e)&&Ne(e.length)&&!!b[me(e)]};function Oe(e){return Be(e)?ce(e,!0):be(e)}var Le,Ue=(Le=function(e,t,r){ve(e,t,r)},Ae(function(e,t){var r=-1,n=t.length,i=n>1?t[n-1]:void 0,o=n>2?t[2]:void 0;for(i=Le.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(e,t,r){if(!Pe(r))return!1;var n=typeof t;return!!("number"==n?Be(r)&&ke(t,r.length):"string"==n&&t in r)&&xe(r[t],e)}(t[0],t[1],o)&&(i=n<3?void 0:i,n=1),e=Object(e);++r%2$s',e.prefix,t.call(this),e.className):o('%2$s',e.prefix,t.call(this))},t.group=function(){var e,t=this.address.match(n.RE_ADDRESS);if(t){var r=t[0].split(".");this.address=this.address.replace(n.RE_ADDRESS,o('%s.%s',r.slice(0,2).join("."),r.slice(2,4).join(".")))}if(0===this.elidedGroups)return i.simpleGroup(this.address);var s=[],a=this.address.split("::");a[0].length?s.push(i.simpleGroup(a[0])):s.push("");var c=["hover-group"];for(e=this.elisionBegin;e',c.join(" "))),a[1].length?s.push(i.simpleGroup(a[1],this.elisionEnd)):s.push(""),s.join(":")}},function(e,t,r){"use strict";var n=r(85).sprintf,i=r(126);function o(e){return n("(%s)",e.join("|"))}function s(e){return e.length<4?n("0{0,%d}%s",4-e.length,e):e}function a(e){var t=[];e.forEach(function(e,r){0===parseInt(e,16)&&t.push(r)});var r=t.map(function(t){return e.map(function(e,r){if(r===t){var n=0===r||r===i.GROUPS-1?":":"";return o([s(e),n])}return s(e)}).join(":")});return r.push(e.map(s).join(":")),o(r)}function c(e,t,r){var i=t?"":":",s=r?"":":",a=[];t||r||a.push("::"),t&&r&&a.push(""),(r&&!t||!r&&t)&&a.push(":"),a.push(n("%s(:0{1,4}){1,%d}",i,e-1)),a.push(n("(0{1,4}:){1,%d}%s",e-1,s)),a.push(n("(0{1,4}:){%d}0{1,4}",e-1));for(var c=1;c{s.sha2256(e,(e,n)=>{e&&r(e),s.sha2256(t.from(n),r)})}}}).call(this,r(0).Buffer)},function(e,t,r){(function(n,i){var o; /** - * @file Web Cryptography API shim - * @author Artem S Vybornov + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.8.0 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2018 * @license MIT */ -e.exports=function(e){"use strict";if("function"!=typeof Promise)throw"Promise support required";var t=e.crypto||e.msCrypto;if(t){var r=t.subtle||t.webkitSubtle;if(r){var n=e.Crypto||t.constructor||Object,i=e.SubtleCrypto||r.constructor||Object,o=(e.CryptoKey||e.Key||Object,e.navigator.userAgent.indexOf("Edge/")>-1),s=!!e.msCrypto&&!o,a=!t.subtle&&!!t.webkitSubtle;if(s||a){var c={KoZIhvcNAQEB:"1.2.840.113549.1.1.1"},u={"1.2.840.113549.1.1.1":"KoZIhvcNAQEB"};if(["generateKey","importKey","unwrapKey"].forEach(function(e){var n=r[e];r[e]=function(i,o,c){var u,f,v,S,E,k=[].slice.call(arguments);switch(e){case"generateKey":u=g(i),f=o,v=c;break;case"importKey":u=g(c),f=k[3],v=k[4],"jwk"===i&&((o=m(o)).alg||(o.alg=b(u)),o.key_ops||(o.key_ops="oct"!==o.kty?"d"in o?v.filter(_):v.filter(A):v.slice()),k[1]=(S=m(o),s&&(S.extractable=S.ext,delete S.ext),p(unescape(encodeURIComponent(JSON.stringify(S)))).buffer));break;case"unwrapKey":u=k[4],f=k[5],v=k[6],k[2]=c._key}if("generateKey"===e&&"HMAC"===u.name&&u.hash)return u.length=u.length||{"SHA-1":512,"SHA-256":512,"SHA-384":1024,"SHA-512":1024}[u.hash.name],r.importKey("raw",t.getRandomValues(new Uint8Array(u.length+7>>3)),u,f,v);if(a&&"generateKey"===e&&"RSASSA-PKCS1-v1_5"===u.name&&(!u.modulusLength||u.modulusLength>=2048))return(i=g(i)).name="RSAES-PKCS1-v1_5",delete i.hash,r.generateKey(i,!0,["encrypt","decrypt"]).then(function(e){return Promise.all([r.exportKey("jwk",e.publicKey),r.exportKey("jwk",e.privateKey)])}).then(function(e){return e[0].alg=e[1].alg=b(u),e[0].key_ops=v.filter(A),e[1].key_ops=v.filter(_),Promise.all([r.importKey("jwk",e[0],u,!0,e[0].key_ops),r.importKey("jwk",e[1],u,f,e[1].key_ops)])}).then(function(e){return{publicKey:e[0],privateKey:e[1]}});if((a||s&&"SHA-1"===(u.hash||{}).name)&&"importKey"===e&&"jwk"===i&&"HMAC"===u.name&&"oct"===o.kty)return r.importKey("raw",p(h(o.k)),c,k[3],k[4]);if(a&&"importKey"===e&&("spki"===i||"pkcs8"===i))return r.importKey("jwk",function(e){var t=y(e),r=!1;t.length>2&&(r=!0,t.shift());var n={ext:!0};switch(t[0][0]){case"1.2.840.113549.1.1.1":var i=["n","e","d","p","q","dp","dq","qi"],o=y(t[1]);r&&o.shift();for(var s=0;s2&&(n=!0,o.unshift(new Uint8Array([0]))),r[0][0]="1.2.840.113549.1.1.1",t=o;break;default:throw new TypeError("Unsupported key type")}return r.push(new Uint8Array(v(t)).buffer),n?r.unshift(new Uint8Array([0])):r[1]={tag:3,value:r[1]},new Uint8Array(v(r)).buffer}(m(e))})),c}}),["encrypt","decrypt","sign","verify"].forEach(function(e){var t=r[e];r[e]=function(n,i,o,a){if(s&&(!o.byteLength||a&&!a.byteLength))throw new Error("Empy input is not allowed");var c,u=[].slice.call(arguments),f=g(n);if(s&&"decrypt"===e&&"AES-GCM"===f.name){var l=n.tagLength>>3;u[2]=(o.buffer||o).slice(0,o.byteLength-l),n.tag=(o.buffer||o).slice(o.byteLength-l)}u[1]=i._key;try{c=t.apply(r,u)}catch(e){return Promise.reject(e)}return s&&(c=new Promise(function(t,r){c.onabort=c.onerror=function(e){r(e)},c.oncomplete=function(r){r=r.target.result;if("encrypt"===e&&r instanceof AesGcmEncryptResult){var n=r.ciphertext,i=r.tag;(r=new Uint8Array(n.byteLength+i.byteLength)).set(new Uint8Array(n),0),r.set(new Uint8Array(i),n.byteLength),r=r.buffer}t(r)}})),c}}),s){var f=r.digest;r.digest=function(e,t){if(!t.byteLength)throw new Error("Empy input is not allowed");var n;try{n=f.call(r,e,t)}catch(e){return Promise.reject(e)}return n=new Promise(function(e,t){n.onabort=n.onerror=function(e){t(e)},n.oncomplete=function(t){e(t.target.result)}})},e.crypto=Object.create(t,{getRandomValues:{value:function(e){return t.getRandomValues(e)}},subtle:{value:r}}),e.CryptoKey=w}a&&(t.subtle=r,e.Crypto=n,e.SubtleCrypto=i,e.CryptoKey=w)}}}function l(e){return btoa(e).replace(/\=+$/,"").replace(/\+/g,"-").replace(/\//g,"_")}function h(e){return e=(e+="===").slice(0,-e.length%4),atob(e.replace(/-/g,"+").replace(/_/g,"/"))}function p(e){for(var t=new Uint8Array(e.length),r=0;re.length)throw new RangeError("Malformed DER");var r,n=e[t.pos++],i=e[t.pos++];if(i>=128){if(i&=127,t.end-t.pos=128){var a=n;n=4;for(t.splice(i,0,a>>24&255,a>>16&255,a>>8&255,255&a);n>1&&!(a>>24);)a<<=8,n--;n<4&&t.splice(i,4-n),n|=128}return t.splice(i-2,2,r,n),t}function w(e,t,r,n){Object.defineProperties(this,{_key:{value:e},type:{value:e.type,enumerable:!0},extractable:{value:void 0===r?e.extractable:r,enumerable:!0},algorithm:{value:void 0===t?e.algorithm:t,enumerable:!0},usages:{value:void 0===n?e.usages:n,enumerable:!0}})}function A(e){return"verify"===e||"encrypt"===e||"wrapKey"===e}function _(e){return"sign"===e||"decrypt"===e||"unwrapKey"===e}}},function(e,t,r){var n=r(461),i=r(478),o=r(234);t.createCipher=t.Cipher=n.createCipher,t.createCipheriv=t.Cipheriv=n.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(o)}},function(e,t,r){var n=r(3).Buffer,i=r(66).Transform,o=r(52).StringDecoder;function s(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(4)(s,i),s.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},s.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},s.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},s.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=s},function(e,t,r){"use strict";var n=r(137),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var o=r(108);o.inherits=r(22);var s=r(236),a=r(167);o.inherits(l,s);for(var c=i(a.prototype),u=0;u>>=2;for(i=0;i>8^255&l^99,o[g]=l,s[l]=g,p=(h=e[l])<<24^l<<16^l<<8^l^h,d=((r=e[g])^(n=e[r])^(i=e[n]))<<24^(g^i)<<16^(g^n^i)<<8^g^r^i;for(var m=0;m<4;++m)c[m][g]=p,u[m][l]=d,p=p<<24|p>>>8,d=d<<24|d>>>8;0===g?g=b=1:(g=r^e[e[e[r^i]]],b^=e[e[b]])}}function p(e,t){for(var r,n=e.slice(0),i=1,s=n.length,c=l*(s+6+1),f=s;f>>16&255]<<24^o[r>>>8&255]<<16^o[255&r]<<8^o[r>>>24]^a[i]<<24,i++):s>6&&f%s==4&&(r=o[r>>>24]<<24^o[r>>>16&255]<<16^o[r>>>8&255]<<8^o[255&r]),n[f]=n[f-s]^r;if(t){for(var h,p=u[0],d=u[1],g=u[2],b=u[3],m=n.slice(0),y=(f=0,(c=n.length)-l);f>>24]]^d[o[h>>>16&255]]^g[o[h>>>8&255]]^b[o[255&h]];n=m}return n}function d(e,t,r,n){var i,a,f,l,h,p,d,g,b,m,y,v,w=e.length/4-1;n?(i=u[0],a=u[1],f=u[2],l=u[3],h=s):(i=c[0],a=c[1],f=c[2],l=c[3],h=o),p=t[0]^e[0],d=t[n?3:1]^e[1],g=t[2]^e[2],b=t[n?1:3]^e[3];for(var A=3,_=1;_>>24]^a[d>>>16&255]^f[g>>>8&255]^l[255&b]^e[++A],y=i[d>>>24]^a[g>>>16&255]^f[b>>>8&255]^l[255&p]^e[++A],v=i[g>>>24]^a[b>>>16&255]^f[p>>>8&255]^l[255&d]^e[++A],b=i[b>>>24]^a[p>>>16&255]^f[d>>>8&255]^l[255&g]^e[++A],p=m,d=y,g=v;r[0]=h[p>>>24]<<24^h[d>>>16&255]<<16^h[g>>>8&255]<<8^h[255&b]^e[++A],r[n?3:1]=h[d>>>24]<<24^h[g>>>16&255]<<16^h[b>>>8&255]<<8^h[255&p]^e[++A],r[2]=h[g>>>24]<<24^h[b>>>16&255]<<16^h[p>>>8&255]<<8^h[255&d]^e[++A],r[n?1:3]=h[b>>>24]<<24^h[p>>>16&255]<<16^h[d>>>8&255]<<8^h[255&g]^e[++A]}function g(e){var t,r="AES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start;return t.start=function(e,r){var o=null;r instanceof n.util.ByteBuffer&&(o=r,r={}),(r=r||{}).output=o,r.iv=e,i.call(t,r)},t}},function(e,t,r){var n=r(8);n.pki=n.pki||{};var i=e.exports=n.pki.oids=n.oids=n.oids||{};function o(e,t){i[e]=t,i[t]=e}function s(e,t){i[e]=t}o("1.2.840.113549.1.1.1","rsaEncryption"),o("1.2.840.113549.1.1.4","md5WithRSAEncryption"),o("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),o("1.2.840.113549.1.1.7","RSAES-OAEP"),o("1.2.840.113549.1.1.8","mgf1"),o("1.2.840.113549.1.1.9","pSpecified"),o("1.2.840.113549.1.1.10","RSASSA-PSS"),o("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),o("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),o("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),o("1.2.840.10040.4.3","dsa-with-sha1"),o("1.3.14.3.2.7","desCBC"),o("1.3.14.3.2.26","sha1"),o("2.16.840.1.101.3.4.2.1","sha256"),o("2.16.840.1.101.3.4.2.2","sha384"),o("2.16.840.1.101.3.4.2.3","sha512"),o("1.2.840.113549.2.5","md5"),o("1.2.840.113549.1.7.1","data"),o("1.2.840.113549.1.7.2","signedData"),o("1.2.840.113549.1.7.3","envelopedData"),o("1.2.840.113549.1.7.4","signedAndEnvelopedData"),o("1.2.840.113549.1.7.5","digestedData"),o("1.2.840.113549.1.7.6","encryptedData"),o("1.2.840.113549.1.9.1","emailAddress"),o("1.2.840.113549.1.9.2","unstructuredName"),o("1.2.840.113549.1.9.3","contentType"),o("1.2.840.113549.1.9.4","messageDigest"),o("1.2.840.113549.1.9.5","signingTime"),o("1.2.840.113549.1.9.6","counterSignature"),o("1.2.840.113549.1.9.7","challengePassword"),o("1.2.840.113549.1.9.8","unstructuredAddress"),o("1.2.840.113549.1.9.14","extensionRequest"),o("1.2.840.113549.1.9.20","friendlyName"),o("1.2.840.113549.1.9.21","localKeyId"),o("1.2.840.113549.1.9.22.1","x509Certificate"),o("1.2.840.113549.1.12.10.1.1","keyBag"),o("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),o("1.2.840.113549.1.12.10.1.3","certBag"),o("1.2.840.113549.1.12.10.1.4","crlBag"),o("1.2.840.113549.1.12.10.1.5","secretBag"),o("1.2.840.113549.1.12.10.1.6","safeContentsBag"),o("1.2.840.113549.1.5.13","pkcs5PBES2"),o("1.2.840.113549.1.5.12","pkcs5PBKDF2"),o("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),o("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),o("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),o("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),o("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),o("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),o("1.2.840.113549.2.7","hmacWithSHA1"),o("1.2.840.113549.2.8","hmacWithSHA224"),o("1.2.840.113549.2.9","hmacWithSHA256"),o("1.2.840.113549.2.10","hmacWithSHA384"),o("1.2.840.113549.2.11","hmacWithSHA512"),o("1.2.840.113549.3.7","des-EDE3-CBC"),o("2.16.840.1.101.3.4.1.2","aes128-CBC"),o("2.16.840.1.101.3.4.1.22","aes192-CBC"),o("2.16.840.1.101.3.4.1.42","aes256-CBC"),o("2.5.4.3","commonName"),o("2.5.4.5","serialName"),o("2.5.4.6","countryName"),o("2.5.4.7","localityName"),o("2.5.4.8","stateOrProvinceName"),o("2.5.4.10","organizationName"),o("2.5.4.11","organizationalUnitName"),o("2.16.840.1.113730.1.1","nsCertType"),s("2.5.29.1","authorityKeyIdentifier"),s("2.5.29.2","keyAttributes"),s("2.5.29.3","certificatePolicies"),s("2.5.29.4","keyUsageRestriction"),s("2.5.29.5","policyMapping"),s("2.5.29.6","subtreesConstraint"),s("2.5.29.7","subjectAltName"),s("2.5.29.8","issuerAltName"),s("2.5.29.9","subjectDirectoryAttributes"),s("2.5.29.10","basicConstraints"),s("2.5.29.11","nameConstraints"),s("2.5.29.12","policyConstraints"),s("2.5.29.13","basicConstraints"),o("2.5.29.14","subjectKeyIdentifier"),o("2.5.29.15","keyUsage"),s("2.5.29.16","privateKeyUsagePeriod"),o("2.5.29.17","subjectAltName"),o("2.5.29.18","issuerAltName"),o("2.5.29.19","basicConstraints"),s("2.5.29.20","cRLNumber"),s("2.5.29.21","cRLReason"),s("2.5.29.22","expirationDate"),s("2.5.29.23","instructionCode"),s("2.5.29.24","invalidityDate"),s("2.5.29.25","cRLDistributionPoints"),s("2.5.29.26","issuingDistributionPoint"),s("2.5.29.27","deltaCRLIndicator"),s("2.5.29.28","issuingDistributionPoint"),s("2.5.29.29","certificateIssuer"),s("2.5.29.30","nameConstraints"),o("2.5.29.31","cRLDistributionPoints"),o("2.5.29.32","certificatePolicies"),s("2.5.29.33","policyMappings"),s("2.5.29.34","policyConstraints"),o("2.5.29.35","authorityKeyIdentifier"),s("2.5.29.36","policyConstraints"),o("2.5.29.37","extKeyUsage"),s("2.5.29.46","freshestCRL"),s("2.5.29.54","inhibitAnyPolicy"),o("1.3.6.1.4.1.11129.2.4.2","timestampList"),o("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),o("1.3.6.1.5.5.7.3.1","serverAuth"),o("1.3.6.1.5.5.7.3.2","clientAuth"),o("1.3.6.1.5.5.7.3.3","codeSigning"),o("1.3.6.1.5.5.7.3.4","emailProtection"),o("1.3.6.1.5.5.7.3.8","timeStamping")},function(e,t,r){!function(e){"use strict";var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function g(e,t,r,n,i){var o,s=0;for(o=0;o>>8)-1}function b(e,t,r,n){return g(e,t,r,n,16)}function m(e,t,r,n){return g(e,t,r,n,32)}function y(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,f=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,b=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,m=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,y=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,A=o,_=s,S=a,E=c,k=u,x=f,C=l,I=h,B=p,T=d,R=g,P=b,O=m,M=y,N=v,D=w,K=0;K<20;K+=2)A^=(i=(O^=(i=(B^=(i=(k^=(i=A+O|0)<<7|i>>>25)+A|0)<<9|i>>>23)+k|0)<<13|i>>>19)+B|0)<<18|i>>>14,x^=(i=(_^=(i=(M^=(i=(T^=(i=x+_|0)<<7|i>>>25)+x|0)<<9|i>>>23)+T|0)<<13|i>>>19)+M|0)<<18|i>>>14,R^=(i=(C^=(i=(S^=(i=(N^=(i=R+C|0)<<7|i>>>25)+R|0)<<9|i>>>23)+N|0)<<13|i>>>19)+S|0)<<18|i>>>14,D^=(i=(P^=(i=(I^=(i=(E^=(i=D+P|0)<<7|i>>>25)+D|0)<<9|i>>>23)+E|0)<<13|i>>>19)+I|0)<<18|i>>>14,A^=(i=(E^=(i=(S^=(i=(_^=(i=A+E|0)<<7|i>>>25)+A|0)<<9|i>>>23)+_|0)<<13|i>>>19)+S|0)<<18|i>>>14,x^=(i=(k^=(i=(I^=(i=(C^=(i=x+k|0)<<7|i>>>25)+x|0)<<9|i>>>23)+C|0)<<13|i>>>19)+I|0)<<18|i>>>14,R^=(i=(T^=(i=(B^=(i=(P^=(i=R+T|0)<<7|i>>>25)+R|0)<<9|i>>>23)+P|0)<<13|i>>>19)+B|0)<<18|i>>>14,D^=(i=(N^=(i=(M^=(i=(O^=(i=D+N|0)<<7|i>>>25)+D|0)<<9|i>>>23)+O|0)<<13|i>>>19)+M|0)<<18|i>>>14;A=A+o|0,_=_+s|0,S=S+a|0,E=E+c|0,k=k+u|0,x=x+f|0,C=C+l|0,I=I+h|0,B=B+p|0,T=T+d|0,R=R+g|0,P=P+b|0,O=O+m|0,M=M+y|0,N=N+v|0,D=D+w|0,e[0]=A>>>0&255,e[1]=A>>>8&255,e[2]=A>>>16&255,e[3]=A>>>24&255,e[4]=_>>>0&255,e[5]=_>>>8&255,e[6]=_>>>16&255,e[7]=_>>>24&255,e[8]=S>>>0&255,e[9]=S>>>8&255,e[10]=S>>>16&255,e[11]=S>>>24&255,e[12]=E>>>0&255,e[13]=E>>>8&255,e[14]=E>>>16&255,e[15]=E>>>24&255,e[16]=k>>>0&255,e[17]=k>>>8&255,e[18]=k>>>16&255,e[19]=k>>>24&255,e[20]=x>>>0&255,e[21]=x>>>8&255,e[22]=x>>>16&255,e[23]=x>>>24&255,e[24]=C>>>0&255,e[25]=C>>>8&255,e[26]=C>>>16&255,e[27]=C>>>24&255,e[28]=I>>>0&255,e[29]=I>>>8&255,e[30]=I>>>16&255,e[31]=I>>>24&255,e[32]=B>>>0&255,e[33]=B>>>8&255,e[34]=B>>>16&255,e[35]=B>>>24&255,e[36]=T>>>0&255,e[37]=T>>>8&255,e[38]=T>>>16&255,e[39]=T>>>24&255,e[40]=R>>>0&255,e[41]=R>>>8&255,e[42]=R>>>16&255,e[43]=R>>>24&255,e[44]=P>>>0&255,e[45]=P>>>8&255,e[46]=P>>>16&255,e[47]=P>>>24&255,e[48]=O>>>0&255,e[49]=O>>>8&255,e[50]=O>>>16&255,e[51]=O>>>24&255,e[52]=M>>>0&255,e[53]=M>>>8&255,e[54]=M>>>16&255,e[55]=M>>>24&255,e[56]=N>>>0&255,e[57]=N>>>8&255,e[58]=N>>>16&255,e[59]=N>>>24&255,e[60]=D>>>0&255,e[61]=D>>>8&255,e[62]=D>>>16&255,e[63]=D>>>24&255}(e,t,r,n)}function v(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,f=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,b=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,m=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,y=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,A=0;A<20;A+=2)o^=(i=(m^=(i=(p^=(i=(u^=(i=o+m|0)<<7|i>>>25)+o|0)<<9|i>>>23)+u|0)<<13|i>>>19)+p|0)<<18|i>>>14,f^=(i=(s^=(i=(y^=(i=(d^=(i=f+s|0)<<7|i>>>25)+f|0)<<9|i>>>23)+d|0)<<13|i>>>19)+y|0)<<18|i>>>14,g^=(i=(l^=(i=(a^=(i=(v^=(i=g+l|0)<<7|i>>>25)+g|0)<<9|i>>>23)+v|0)<<13|i>>>19)+a|0)<<18|i>>>14,w^=(i=(b^=(i=(h^=(i=(c^=(i=w+b|0)<<7|i>>>25)+w|0)<<9|i>>>23)+c|0)<<13|i>>>19)+h|0)<<18|i>>>14,o^=(i=(c^=(i=(a^=(i=(s^=(i=o+c|0)<<7|i>>>25)+o|0)<<9|i>>>23)+s|0)<<13|i>>>19)+a|0)<<18|i>>>14,f^=(i=(u^=(i=(h^=(i=(l^=(i=f+u|0)<<7|i>>>25)+f|0)<<9|i>>>23)+l|0)<<13|i>>>19)+h|0)<<18|i>>>14,g^=(i=(d^=(i=(p^=(i=(b^=(i=g+d|0)<<7|i>>>25)+g|0)<<9|i>>>23)+b|0)<<13|i>>>19)+p|0)<<18|i>>>14,w^=(i=(v^=(i=(y^=(i=(m^=(i=w+v|0)<<7|i>>>25)+w|0)<<9|i>>>23)+m|0)<<13|i>>>19)+y|0)<<18|i>>>14;e[0]=o>>>0&255,e[1]=o>>>8&255,e[2]=o>>>16&255,e[3]=o>>>24&255,e[4]=f>>>0&255,e[5]=f>>>8&255,e[6]=f>>>16&255,e[7]=f>>>24&255,e[8]=g>>>0&255,e[9]=g>>>8&255,e[10]=g>>>16&255,e[11]=g>>>24&255,e[12]=w>>>0&255,e[13]=w>>>8&255,e[14]=w>>>16&255,e[15]=w>>>24&255,e[16]=l>>>0&255,e[17]=l>>>8&255,e[18]=l>>>16&255,e[19]=l>>>24&255,e[20]=h>>>0&255,e[21]=h>>>8&255,e[22]=h>>>16&255,e[23]=h>>>24&255,e[24]=p>>>0&255,e[25]=p>>>8&255,e[26]=p>>>16&255,e[27]=p>>>24&255,e[28]=d>>>0&255,e[29]=d>>>8&255,e[30]=d>>>16&255,e[31]=d>>>24&255}(e,t,r,n)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function A(e,t,r,n,i,o,s){var a,c,u=new Uint8Array(16),f=new Uint8Array(64);for(c=0;c<16;c++)u[c]=0;for(c=0;c<8;c++)u[c]=o[c];for(;i>=64;){for(y(f,u,s,w),c=0;c<64;c++)e[t+c]=r[n+c]^f[c];for(a=1,c=8;c<16;c++)a=a+(255&u[c])|0,u[c]=255&a,a>>>=8;i-=64,t+=64,n+=64}if(i>0)for(y(f,u,s,w),c=0;c=64;){for(y(c,a,i,w),s=0;s<64;s++)e[t+s]=c[s];for(o=1,s=8;s<16;s++)o=o+(255&a[s])|0,a[s]=255&o,o>>>=8;r-=64,t+=64}if(r>0)for(y(c,a,i,w),s=0;s>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|i<<9),o=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,s=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(o>>>14|s<<2),a=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(s>>>11|a<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(a>>>8|c<<8),this.r[9]=c>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function x(e,t,r,n,i,o){var s=new k(o);return s.update(r,n,i),s.finish(e,t),0}function C(e,t,r,n,i,o){var s=new Uint8Array(16);return x(s,0,r,n,i,o),b(e,t,s,0)}function I(e,t,r,n,i){var o;if(r<32)return-1;for(E(e,0,t,0,r,n,i),x(e,16,e,32,r-32,e),o=0;o<16;o++)e[o]=0;return 0}function B(e,t,r,n,i){var o,s=new Uint8Array(32);if(r<32)return-1;if(S(s,0,32,n,i),0!==C(t,16,t,32,r-32,s))return-1;for(E(e,0,t,0,r,n,i),o=0;o<32;o++)e[o]=0;return 0}function T(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function R(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function P(e,t,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(e[o]^t[o]),e[o]^=n,t[o]^=n}function O(e,r){var n,i,o,s=t(),a=t();for(n=0;n<16;n++)a[n]=r[n];for(R(a),R(a),R(a),i=0;i<2;i++){for(s[0]=a[0]-65517,n=1;n<15;n++)s[n]=a[n]-65535-(s[n-1]>>16&1),s[n-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),o=s[15]>>16&1,s[14]&=65535,P(a,s,1-o)}for(n=0;n<16;n++)e[2*n]=255&a[n],e[2*n+1]=a[n]>>8}function M(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return O(r,e),O(n,t),m(r,0,n,0)}function N(e){var t=new Uint8Array(32);return O(t,e),1&t[0]}function D(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function K(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function U(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function j(e,t,r){var n,i,o=0,s=0,a=0,c=0,u=0,f=0,l=0,h=0,p=0,d=0,g=0,b=0,m=0,y=0,v=0,w=0,A=0,_=0,S=0,E=0,k=0,x=0,C=0,I=0,B=0,T=0,R=0,P=0,O=0,M=0,N=0,D=r[0],K=r[1],U=r[2],j=r[3],F=r[4],L=r[5],z=r[6],H=r[7],q=r[8],V=r[9],G=r[10],W=r[11],Y=r[12],J=r[13],Z=r[14],Q=r[15];o+=(n=t[0])*D,s+=n*K,a+=n*U,c+=n*j,u+=n*F,f+=n*L,l+=n*z,h+=n*H,p+=n*q,d+=n*V,g+=n*G,b+=n*W,m+=n*Y,y+=n*J,v+=n*Z,w+=n*Q,s+=(n=t[1])*D,a+=n*K,c+=n*U,u+=n*j,f+=n*F,l+=n*L,h+=n*z,p+=n*H,d+=n*q,g+=n*V,b+=n*G,m+=n*W,y+=n*Y,v+=n*J,w+=n*Z,A+=n*Q,a+=(n=t[2])*D,c+=n*K,u+=n*U,f+=n*j,l+=n*F,h+=n*L,p+=n*z,d+=n*H,g+=n*q,b+=n*V,m+=n*G,y+=n*W,v+=n*Y,w+=n*J,A+=n*Z,_+=n*Q,c+=(n=t[3])*D,u+=n*K,f+=n*U,l+=n*j,h+=n*F,p+=n*L,d+=n*z,g+=n*H,b+=n*q,m+=n*V,y+=n*G,v+=n*W,w+=n*Y,A+=n*J,_+=n*Z,S+=n*Q,u+=(n=t[4])*D,f+=n*K,l+=n*U,h+=n*j,p+=n*F,d+=n*L,g+=n*z,b+=n*H,m+=n*q,y+=n*V,v+=n*G,w+=n*W,A+=n*Y,_+=n*J,S+=n*Z,E+=n*Q,f+=(n=t[5])*D,l+=n*K,h+=n*U,p+=n*j,d+=n*F,g+=n*L,b+=n*z,m+=n*H,y+=n*q,v+=n*V,w+=n*G,A+=n*W,_+=n*Y,S+=n*J,E+=n*Z,k+=n*Q,l+=(n=t[6])*D,h+=n*K,p+=n*U,d+=n*j,g+=n*F,b+=n*L,m+=n*z,y+=n*H,v+=n*q,w+=n*V,A+=n*G,_+=n*W,S+=n*Y,E+=n*J,k+=n*Z,x+=n*Q,h+=(n=t[7])*D,p+=n*K,d+=n*U,g+=n*j,b+=n*F,m+=n*L,y+=n*z,v+=n*H,w+=n*q,A+=n*V,_+=n*G,S+=n*W,E+=n*Y,k+=n*J,x+=n*Z,C+=n*Q,p+=(n=t[8])*D,d+=n*K,g+=n*U,b+=n*j,m+=n*F,y+=n*L,v+=n*z,w+=n*H,A+=n*q,_+=n*V,S+=n*G,E+=n*W,k+=n*Y,x+=n*J,C+=n*Z,I+=n*Q,d+=(n=t[9])*D,g+=n*K,b+=n*U,m+=n*j,y+=n*F,v+=n*L,w+=n*z,A+=n*H,_+=n*q,S+=n*V,E+=n*G,k+=n*W,x+=n*Y,C+=n*J,I+=n*Z,B+=n*Q,g+=(n=t[10])*D,b+=n*K,m+=n*U,y+=n*j,v+=n*F,w+=n*L,A+=n*z,_+=n*H,S+=n*q,E+=n*V,k+=n*G,x+=n*W,C+=n*Y,I+=n*J,B+=n*Z,T+=n*Q,b+=(n=t[11])*D,m+=n*K,y+=n*U,v+=n*j,w+=n*F,A+=n*L,_+=n*z,S+=n*H,E+=n*q,k+=n*V,x+=n*G,C+=n*W,I+=n*Y,B+=n*J,T+=n*Z,R+=n*Q,m+=(n=t[12])*D,y+=n*K,v+=n*U,w+=n*j,A+=n*F,_+=n*L,S+=n*z,E+=n*H,k+=n*q,x+=n*V,C+=n*G,I+=n*W,B+=n*Y,T+=n*J,R+=n*Z,P+=n*Q,y+=(n=t[13])*D,v+=n*K,w+=n*U,A+=n*j,_+=n*F,S+=n*L,E+=n*z,k+=n*H,x+=n*q,C+=n*V,I+=n*G,B+=n*W,T+=n*Y,R+=n*J,P+=n*Z,O+=n*Q,v+=(n=t[14])*D,w+=n*K,A+=n*U,_+=n*j,S+=n*F,E+=n*L,k+=n*z,x+=n*H,C+=n*q,I+=n*V,B+=n*G,T+=n*W,R+=n*Y,P+=n*J,O+=n*Z,M+=n*Q,w+=(n=t[15])*D,s+=38*(_+=n*U),a+=38*(S+=n*j),c+=38*(E+=n*F),u+=38*(k+=n*L),f+=38*(x+=n*z),l+=38*(C+=n*H),h+=38*(I+=n*q),p+=38*(B+=n*V),d+=38*(T+=n*G),g+=38*(R+=n*W),b+=38*(P+=n*Y),m+=38*(O+=n*J),y+=38*(M+=n*Z),v+=38*(N+=n*Q),o=(n=(o+=38*(A+=n*K))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),e[0]=o,e[1]=s,e[2]=a,e[3]=c,e[4]=u,e[5]=f,e[6]=l,e[7]=h,e[8]=p,e[9]=d,e[10]=g,e[11]=b,e[12]=m,e[13]=y,e[14]=v,e[15]=w}function F(e,t){j(e,t,t)}function L(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)F(i,i),2!==n&&4!==n&&j(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}function z(e,r,n){var i,o,s=new Uint8Array(32),a=new Float64Array(80),u=t(),f=t(),l=t(),h=t(),p=t(),d=t();for(o=0;o<31;o++)s[o]=r[o];for(s[31]=127&r[31]|64,s[0]&=248,D(a,n),o=0;o<16;o++)f[o]=a[o],h[o]=u[o]=l[o]=0;for(u[0]=h[0]=1,o=254;o>=0;--o)P(u,f,i=s[o>>>3]>>>(7&o)&1),P(l,h,i),K(p,u,l),U(u,u,l),K(l,f,h),U(f,f,h),F(h,p),F(d,u),j(u,l,u),j(l,f,p),K(p,u,l),U(u,u,l),F(f,u),U(l,h,d),j(u,l,c),K(u,u,h),j(l,l,u),j(u,h,d),j(h,f,a),F(f,p),P(u,f,i),P(l,h,i);for(o=0;o<16;o++)a[o+16]=u[o],a[o+32]=l[o],a[o+48]=f[o],a[o+64]=h[o];var g=a.subarray(32),b=a.subarray(16);return L(g,g),j(b,b,g),O(e,b),0}function H(e,t){return z(e,t,o)}function q(e,t){return n(t,32),H(e,t)}function V(e,t,r){var n=new Uint8Array(32);return z(n,r,t),v(e,i,n,w)}k.prototype.blocks=function(e,t,r){for(var n,i,o,s,a,c,u,f,l,h,p,d,g,b,m,y,v,w,A,_=this.fin?0:2048,S=this.h[0],E=this.h[1],k=this.h[2],x=this.h[3],C=this.h[4],I=this.h[5],B=this.h[6],T=this.h[7],R=this.h[8],P=this.h[9],O=this.r[0],M=this.r[1],N=this.r[2],D=this.r[3],K=this.r[4],U=this.r[5],j=this.r[6],F=this.r[7],L=this.r[8],z=this.r[9];r>=16;)h=l=0,h+=(S+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*O,h+=(E+=8191&(n>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*z),h+=(k+=8191&(i>>>10|(o=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*L),h+=(x+=8191&(o>>>7|(s=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*F),l=(h+=(C+=8191&(s>>>4|(a=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*j))>>>13,h&=8191,h+=(I+=a>>>1&8191)*(5*U),h+=(B+=8191&(a>>>14|(c=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*K),h+=(T+=8191&(c>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*D),h+=(R+=8191&(u>>>8|(f=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*N),p=l+=(h+=(P+=f>>>5|_)*(5*M))>>>13,p+=S*M,p+=E*O,p+=k*(5*z),p+=x*(5*L),l=(p+=C*(5*F))>>>13,p&=8191,p+=I*(5*j),p+=B*(5*U),p+=T*(5*K),p+=R*(5*D),l+=(p+=P*(5*N))>>>13,p&=8191,d=l,d+=S*N,d+=E*M,d+=k*O,d+=x*(5*z),l=(d+=C*(5*L))>>>13,d&=8191,d+=I*(5*F),d+=B*(5*j),d+=T*(5*U),d+=R*(5*K),g=l+=(d+=P*(5*D))>>>13,g+=S*D,g+=E*N,g+=k*M,g+=x*O,l=(g+=C*(5*z))>>>13,g&=8191,g+=I*(5*L),g+=B*(5*F),g+=T*(5*j),g+=R*(5*U),b=l+=(g+=P*(5*K))>>>13,b+=S*K,b+=E*D,b+=k*N,b+=x*M,l=(b+=C*O)>>>13,b&=8191,b+=I*(5*z),b+=B*(5*L),b+=T*(5*F),b+=R*(5*j),m=l+=(b+=P*(5*U))>>>13,m+=S*U,m+=E*K,m+=k*D,m+=x*N,l=(m+=C*M)>>>13,m&=8191,m+=I*O,m+=B*(5*z),m+=T*(5*L),m+=R*(5*F),y=l+=(m+=P*(5*j))>>>13,y+=S*j,y+=E*U,y+=k*K,y+=x*D,l=(y+=C*N)>>>13,y&=8191,y+=I*M,y+=B*O,y+=T*(5*z),y+=R*(5*L),v=l+=(y+=P*(5*F))>>>13,v+=S*F,v+=E*j,v+=k*U,v+=x*K,l=(v+=C*D)>>>13,v&=8191,v+=I*N,v+=B*M,v+=T*O,v+=R*(5*z),w=l+=(v+=P*(5*L))>>>13,w+=S*L,w+=E*F,w+=k*j,w+=x*U,l=(w+=C*K)>>>13,w&=8191,w+=I*D,w+=B*N,w+=T*M,w+=R*O,A=l+=(w+=P*(5*z))>>>13,A+=S*z,A+=E*L,A+=k*F,A+=x*j,l=(A+=C*U)>>>13,A&=8191,A+=I*K,A+=B*D,A+=T*N,A+=R*M,S=h=8191&(l=(l=((l+=(A+=P*O)>>>13)<<2)+l|0)+(h&=8191)|0),E=p+=l>>>=13,k=d&=8191,x=g&=8191,C=b&=8191,I=m&=8191,B=y&=8191,T=v&=8191,R=w&=8191,P=A&=8191,t+=16,r-=16;this.h[0]=S,this.h[1]=E,this.h[2]=k,this.h[3]=x,this.h[4]=C,this.h[5]=I,this.h[6]=B,this.h[7]=T,this.h[8]=R,this.h[9]=P},k.prototype.finish=function(e,t){var r,n,i,o,s=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,s[0]=this.h[0]+5,r=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this.h[o]+r,r=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,n=(1^r)-1,o=0;o<10;o++)s[o]&=n;for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|s[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},k.prototype.update=function(e,t,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n=16&&(i=r-r%16,this.blocks(e,t,i),t+=i,r-=i),r){for(n=0;n=128;){for(_=0;_<16;_++)S=8*_+J,T[_]=r[S+0]<<24|r[S+1]<<16|r[S+2]<<8|r[S+3],R[_]=r[S+4]<<24|r[S+5]<<16|r[S+6]<<8|r[S+7];for(_=0;_<80;_++)if(i=P,o=O,s=M,a=N,c=D,u=K,f=U,j,h=F,p=L,d=z,g=H,b=q,m=V,y=G,W,x=65535&(k=W),C=k>>>16,I=65535&(E=j),B=E>>>16,x+=65535&(k=(q>>>14|D<<18)^(q>>>18|D<<14)^(D>>>9|q<<23)),C+=k>>>16,I+=65535&(E=(D>>>14|q<<18)^(D>>>18|q<<14)^(q>>>9|D<<23)),B+=E>>>16,x+=65535&(k=q&V^~q&G),C+=k>>>16,I+=65535&(E=D&K^~D&U),B+=E>>>16,E=Y[2*_],x+=65535&(k=Y[2*_+1]),C+=k>>>16,I+=65535&E,B+=E>>>16,E=T[_%16],C+=(k=R[_%16])>>>16,I+=65535&E,B+=E>>>16,I+=(C+=(x+=65535&k)>>>16)>>>16,x=65535&(k=A=65535&x|C<<16),C=k>>>16,I=65535&(E=w=65535&I|(B+=I>>>16)<<16),B=E>>>16,x+=65535&(k=(F>>>28|P<<4)^(P>>>2|F<<30)^(P>>>7|F<<25)),C+=k>>>16,I+=65535&(E=(P>>>28|F<<4)^(F>>>2|P<<30)^(F>>>7|P<<25)),B+=E>>>16,C+=(k=F&L^F&z^L&z)>>>16,I+=65535&(E=P&O^P&M^O&M),B+=E>>>16,l=65535&(I+=(C+=(x+=65535&k)>>>16)>>>16)|(B+=I>>>16)<<16,v=65535&x|C<<16,x=65535&(k=g),C=k>>>16,I=65535&(E=a),B=E>>>16,C+=(k=A)>>>16,I+=65535&(E=w),B+=E>>>16,O=i,M=o,N=s,D=a=65535&(I+=(C+=(x+=65535&k)>>>16)>>>16)|(B+=I>>>16)<<16,K=c,U=u,j=f,P=l,L=h,z=p,H=d,q=g=65535&x|C<<16,V=b,G=m,W=y,F=v,_%16==15)for(S=0;S<16;S++)E=T[S],x=65535&(k=R[S]),C=k>>>16,I=65535&E,B=E>>>16,E=T[(S+9)%16],x+=65535&(k=R[(S+9)%16]),C+=k>>>16,I+=65535&E,B+=E>>>16,w=T[(S+1)%16],x+=65535&(k=((A=R[(S+1)%16])>>>1|w<<31)^(A>>>8|w<<24)^(A>>>7|w<<25)),C+=k>>>16,I+=65535&(E=(w>>>1|A<<31)^(w>>>8|A<<24)^w>>>7),B+=E>>>16,w=T[(S+14)%16],C+=(k=((A=R[(S+14)%16])>>>19|w<<13)^(w>>>29|A<<3)^(A>>>6|w<<26))>>>16,I+=65535&(E=(w>>>19|A<<13)^(A>>>29|w<<3)^w>>>6),B+=E>>>16,B+=(I+=(C+=(x+=65535&k)>>>16)>>>16)>>>16,T[S]=65535&I|B<<16,R[S]=65535&x|C<<16;x=65535&(k=F),C=k>>>16,I=65535&(E=P),B=E>>>16,E=e[0],C+=(k=t[0])>>>16,I+=65535&E,B+=E>>>16,B+=(I+=(C+=(x+=65535&k)>>>16)>>>16)>>>16,e[0]=P=65535&I|B<<16,t[0]=F=65535&x|C<<16,x=65535&(k=L),C=k>>>16,I=65535&(E=O),B=E>>>16,E=e[1],C+=(k=t[1])>>>16,I+=65535&E,B+=E>>>16,B+=(I+=(C+=(x+=65535&k)>>>16)>>>16)>>>16,e[1]=O=65535&I|B<<16,t[1]=L=65535&x|C<<16,x=65535&(k=z),C=k>>>16,I=65535&(E=M),B=E>>>16,E=e[2],C+=(k=t[2])>>>16,I+=65535&E,B+=E>>>16,B+=(I+=(C+=(x+=65535&k)>>>16)>>>16)>>>16,e[2]=M=65535&I|B<<16,t[2]=z=65535&x|C<<16,x=65535&(k=H),C=k>>>16,I=65535&(E=N),B=E>>>16,E=e[3],C+=(k=t[3])>>>16,I+=65535&E,B+=E>>>16,B+=(I+=(C+=(x+=65535&k)>>>16)>>>16)>>>16,e[3]=N=65535&I|B<<16,t[3]=H=65535&x|C<<16,x=65535&(k=q),C=k>>>16,I=65535&(E=D),B=E>>>16,E=e[4],C+=(k=t[4])>>>16,I+=65535&E,B+=E>>>16,B+=(I+=(C+=(x+=65535&k)>>>16)>>>16)>>>16,e[4]=D=65535&I|B<<16,t[4]=q=65535&x|C<<16,x=65535&(k=V),C=k>>>16,I=65535&(E=K),B=E>>>16,E=e[5],C+=(k=t[5])>>>16,I+=65535&E,B+=E>>>16,B+=(I+=(C+=(x+=65535&k)>>>16)>>>16)>>>16,e[5]=K=65535&I|B<<16,t[5]=V=65535&x|C<<16,x=65535&(k=G),C=k>>>16,I=65535&(E=U),B=E>>>16,E=e[6],C+=(k=t[6])>>>16,I+=65535&E,B+=E>>>16,B+=(I+=(C+=(x+=65535&k)>>>16)>>>16)>>>16,e[6]=U=65535&I|B<<16,t[6]=G=65535&x|C<<16,x=65535&(k=W),C=k>>>16,I=65535&(E=j),B=E>>>16,E=e[7],C+=(k=t[7])>>>16,I+=65535&E,B+=E>>>16,B+=(I+=(C+=(x+=65535&k)>>>16)>>>16)>>>16,e[7]=j=65535&I|B<<16,t[7]=W=65535&x|C<<16,J+=128,n-=128}return n}function Z(e,t,r){var n,i=new Int32Array(8),o=new Int32Array(8),s=new Uint8Array(256),a=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,J(i,o,t,r),r%=128,n=0;n=0;--i)X(e,t,n=r[i/8|0]>>(7&i)&1),Q(t,e),Q(e,e),X(e,t,n)}function te(e,r){var n=[t(),t(),t(),t()];T(n[0],l),T(n[1],h),T(n[2],a),j(n[3],l,h),ee(e,n,r)}function re(e,r,i){var o,s=new Uint8Array(64),a=[t(),t(),t(),t()];for(i||n(r,32),Z(s,r,32),s[0]&=248,s[31]&=127,s[31]|=64,te(a,s),$(e,a),o=0;o<32;o++)r[o+32]=e[o];return 0}var ne=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ie(e,t){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i>8,t[i]-=256*r;t[i]+=r,t[n]=0}for(r=0,i=0;i<32;i++)t[i]+=r-(t[31]>>4)*ne[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*ne[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function oe(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;ie(e,r)}function se(e,r,n,i){var o,s,a=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),f=new Float64Array(64),l=[t(),t(),t(),t()];Z(a,i,32),a[0]&=248,a[31]&=127,a[31]|=64;var h=n+64;for(o=0;o=0;n--)F(i,i),1!==n&&j(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}(n,n),j(n,n,o),j(n,n,c),j(n,n,c),j(e[0],n,c),F(i,e[0]),j(i,i,c),M(i,o)&&j(e[0],e[0],p),F(i,e[0]),j(i,i,c),M(i,o)?-1:(N(e[0])===r[31]>>7&&U(e[0],s,e[0]),j(e[3],e[0],e[1]),0)}function ce(e,r,n,i){var o,s=new Uint8Array(32),a=new Uint8Array(64),c=[t(),t(),t(),t()],u=[t(),t(),t(),t()];if(-1,n<64)return-1;if(ae(u,i))return-1;for(o=0;o=0},e.sign.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(64);return re(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(ge(e),64!==e.length)throw new Error("bad secret key size");for(var t=new Uint8Array(32),r=0;r{i=i||r(510)(t);class o{constructor(e){i.validatePublicKey(e),this._key=e}verify(e,t,r){a(r),i.hashAndVerify(this._key,t,e,r)}marshal(){return i.compressPublicKey(this._key)}get bytes(){return e.PublicKey.encode({Type:e.KeyType.Secp256k1,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){a(e),n(this.bytes,"sha2-256",e)}}class s{constructor(e,t){this._key=e,this._publicKey=t||i.computePublicKey(e),i.validatePrivateKey(this._key),i.validatePublicKey(this._publicKey)}sign(e,t){a(t),i.hashAndSign(this._key,e,t)}get public(){return new o(this._publicKey)}marshal(){return this._key}get bytes(){return e.PrivateKey.encode({Type:e.KeyType.Secp256k1,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){a(e),n(this.bytes,"sha2-256",e)}}function a(e){if("function"!=typeof e)throw new Error("callback is required")}return{Secp256k1PublicKey:o,Secp256k1PrivateKey:s,unmarshalSecp256k1PrivateKey:function(e,t){t(null,new s(e),null)},unmarshalSecp256k1PublicKey:function(e){return new o(e)},generateKeyPair:function(e,t){void 0===t&&"function"==typeof e&&(t=e),a(t),i.generateKey((e,r)=>{if(e)return t(e);let n;try{n=new s(r)}catch(e){return t(e)}t(null,n)})}}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){(0,n.default)(e,(0,i.default)((0,o.default)(t)),r)};var n=s(r(330)),i=s(r(744)),o=s(r(49));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,r){"use strict";t.DAGNode=r(339),t.DAGLink=r(182),t.resolver=r(780),t.util=r(341)},function(e,t,r){"use strict";(function(t){var n=r(715),i=r(40),o=r(32),s=e.exports;s.sha1=function(e){return o.checkArgument(i.isBuffer(e)),n.createHash("sha1").update(e).digest()},s.sha1.blocksize=512,s.sha256=function(e){return o.checkArgument(i.isBuffer(e)),n.createHash("sha256").update(e).digest()},s.sha256.blocksize=512,s.sha256sha256=function(e){return o.checkArgument(i.isBuffer(e)),s.sha256(s.sha256(e))},s.ripemd160=function(e){return o.checkArgument(i.isBuffer(e)),n.createHash("ripemd160").update(e).digest()},s.sha256ripemd160=function(e){return o.checkArgument(i.isBuffer(e)),s.ripemd160(s.sha256(e))},s.sha512=function(e){return o.checkArgument(i.isBuffer(e)),n.createHash("sha512").update(e).digest()},s.sha512.blocksize=1024,s.hmac=function(e,r,n){o.checkArgument(i.isBuffer(r)),o.checkArgument(i.isBuffer(n)),o.checkArgument(e.blocksize);var s=e.blocksize/8;if(n.length>s)n=e(n);else if(n65&&-1!==s){var a=t[s];","===a?(++s,t=t.substr(0,s)+"\r\n "+t.substr(s)):t=t.substr(0,s)+"\r\n"+a+t.substr(s+1),o=i-s-1,s=-1,++i}else" "!==t[i]&&"\t"!==t[i]&&","!==t[i]||(s=i);return t}function s(e){return e.replace(/^\s+/,"")}i.encode=function(e,t){t=t||{};var r,i="-----BEGIN "+e.type+"-----\r\n";if(e.procType&&(i+=o(r={name:"Proc-Type",values:[String(e.procType.version),e.procType.type]})),e.contentDomain&&(i+=o(r={name:"Content-Domain",values:[e.contentDomain]})),e.dekInfo&&(r={name:"DEK-Info",values:[e.dekInfo.algorithm]},e.dekInfo.parameters&&r.values.push(e.dekInfo.parameters),i+=o(r)),e.headers)for(var s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,r){"use strict";const n=r(1270),i=r(1271);t.encode=n,t.decode=i.decode,t.decodeFromReader=i.decodeFromReader},function(e,t,r){"use strict";var n=t;n.version=r(1787).version,n.utils=r(1788),n.rand=r(1789),n.curve=r(371),n.curves=r(1795),n.ec=r(1803),n.eddsa=r(1807)},function(e,t,r){"use strict";e.exports=function(e){return function(t,r){r(e)}}},function(e,t,r){"use strict";function n(e){return e}var i=r(114);e.exports=function(e){return e?(e=i(e),function(t){return function(r,n){t(r,function(r,i){try{i=r?null:e(i)}catch(e){return t(e,function(){return n(e)})}n(r,i)})}}):n}},function(e,t,r){"use strict";function n(e){return e}var i=r(114);e.exports=function(e){if(!e)return n;e=i(e);var t,r,o=!1;return function(n){return function i(s,a){if(r)return a(r);s?(r=s,n(s,o?function(e){o?t=a:a(s)}:function(e){a(s)})):n(null,function(n,s){n?a(n):r?a(r):(o=!0,e(s,function(e,n){o=!1,r?(a(r),t&&t(r)):e?i(e,a):a(null,n)}))})}}}},function(e,t){e.exports=function(e,t){"function"==typeof e&&(t=e,e=!1);var r,n,i,o=[];function s(e,t){e&&(r=e,n&&f(r)),n=t,u()}function a(e){i=i||e||!0,u()}function c(e){i||(n?f(r,e):o.push(e))}if(e)return{push:c,end:a,source:s,buffer:o};return s.push=c,s.end=a,s.buffer=o,s;function u(){n&&(r?f(r):!o.length&&i?f(i):o.length&&f(null,o.shift()))}function f(e,r){var i=n;if(e&&t){var o=t;t=null,o(!0===e?null:e)}n=null,i(e,r)}}},function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=r,r.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},function(e,t,r){"use strict";(function(t){var n=r(40),i=r(20),o=function e(t){if(!(this instanceof e))return new e(t);t?this.set(t):this.bufs=[]};o.prototype.set=function(e){return this.bufs=e.bufs||this.bufs||[],this},o.prototype.toBuffer=function(){return this.concat()},o.prototype.concat=function(){return t.concat(this.bufs)},o.prototype.write=function(e){return i(n.isBuffer(e)),this.bufs.push(e),this},o.prototype.writeReverse=function(e){return i(n.isBuffer(e)),this.bufs.push(n.reverse(e)),this},o.prototype.writeUInt8=function(e){var r=new t(1);return r.writeUInt8(e,0),this.write(r),this},o.prototype.writeUInt16BE=function(e){var r=new t(2);return r.writeUInt16BE(e,0),this.write(r),this},o.prototype.writeUInt16LE=function(e){var r=new t(2);return r.writeUInt16LE(e,0),this.write(r),this},o.prototype.writeUInt32BE=function(e){var r=new t(4);return r.writeUInt32BE(e,0),this.write(r),this},o.prototype.writeInt32LE=function(e){var r=new t(4);return r.writeInt32LE(e,0),this.write(r),this},o.prototype.writeUInt32LE=function(e){var r=new t(4);return r.writeUInt32LE(e,0),this.write(r),this},o.prototype.writeUInt64BEBN=function(e){var t=e.toBuffer({size:8});return this.write(t),this},o.prototype.writeUInt64LEBN=function(e){var t=e.toBuffer({size:8});return this.writeReverse(t),this},o.prototype.writeVarintNum=function(e){var t=o.varintBufNum(e);return this.write(t),this},o.prototype.writeVarintBN=function(e){var t=o.varintBufBN(e);return this.write(t),this},o.varintBufNum=function(e){var r=void 0;return e<253?(r=new t(1)).writeUInt8(e,0):e<65536?((r=new t(3)).writeUInt8(253,0),r.writeUInt16LE(e,1)):e<4294967296?((r=new t(5)).writeUInt8(254,0),r.writeUInt32LE(e,1)):((r=new t(9)).writeUInt8(255,0),r.writeInt32LE(-1&e,1),r.writeUInt32LE(Math.floor(e/4294967296),5)),r},o.varintBufBN=function(e){var r=void 0,n=e.toNumber();if(n<253)(r=new t(1)).writeUInt8(n,0);else if(n<65536)(r=new t(3)).writeUInt8(253,0),r.writeUInt16LE(n,1);else if(n<4294967296)(r=new t(5)).writeUInt8(254,0),r.writeUInt32LE(n,1);else{var i=new o;i.writeUInt8(255),i.writeUInt64LEBN(e);r=i.concat()}return r},e.exports=o}).call(this,r(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.preMultiaddrToJson=t.preMultiaddrFromJson=t.isMultiaddrJson=t.isMultiaddr=t.multiaddrToJson=t.multiaddrFromJson=void 0;var n,i=r(416),o=(n=i)&&n.__esModule?n:{default:n};var s=t.multiaddrFromJson=function(e){return new o.default(e.multiaddr)},a=t.multiaddrToJson=function(e){return{__ipfsPostMsgProxyType:"Multiaddr",multiaddr:e.toString()}},c=t.isMultiaddr=function(e){return e&&o.default.isMultiaddr(e)},u=t.isMultiaddrJson=function(e){return e&&"Multiaddr"===e.__ipfsPostMsgProxyType};t.preMultiaddrFromJson=function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n=0),a[8]){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,a[6]?parseInt(a[6]):0);break;case"e":r=a[7]?parseFloat(r).toExponential(a[7]):parseFloat(r).toExponential();break;case"f":r=a[7]?parseFloat(r).toFixed(a[7]):parseFloat(r);break;case"g":r=a[7]?parseFloat(r).toPrecision(a[7]):parseFloat(r);break;case"o":r=r.toString(8);break;case"s":r=String(r),r=a[7]?r.substring(0,a[7]):r;break;case"t":r=String(!!r),r=a[7]?r.substring(0,a[7]):r;break;case"T":r=c(r),r=a[7]?r.substring(0,a[7]):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=a[7]?r.substring(0,a[7]):r;break;case"x":r=parseInt(r,10).toString(16);break;case"X":r=parseInt(r,10).toString(16).toUpperCase()}o.json.test(a[8])?b[b.length]=r:(!o.number.test(a[8])||m&&!a[3]?y="":(y=m?"+":"-",r=r.toString().replace(o.sign,"")),l=a[4]?"0"===a[4]?"0":a[4].charAt(1):" ",h=a[6]-(y+r).length,u=a[6]&&h>0?f(l,h):"",b[b.length]=a[5]?y+r+u:"0"===l?y+u+r:u+y+r)}return b.join("")},s.cache=Object.create(null),s.parse=function(e){for(var t=e,r=[],n=[],i=0;t;){if(null!==(r=o.text.exec(t)))n[n.length]=r[0];else if(null!==(r=o.modulo.exec(t)))n[n.length]="%";else{if(null===(r=o.placeholder.exec(t)))throw new SyntaxError("[sprintf] unexpected placeholder");if(r[2]){i|=1;var s=[],a=r[2],c=[];if(null===(c=o.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s[s.length]=c[1];""!==(a=a.substring(c[0].length));)if(null!==(c=o.key_access.exec(a)))s[s.length]=c[1];else{if(null===(c=o.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s[s.length]=c[1]}r[2]=s}else i|=2;if(3===i)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n[n.length]=r}t=t.substring(r[0].length)}return n};var a=function(e,t,r){return(r=(t||[]).slice(0)).splice(0,0,e),s.apply(null,r)};function c(e){return"number"==typeof e?"number":"string"==typeof e?"string":Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}var u={0:["","0","00","000","0000","00000","000000","0000000"]," ":[""," "," "," "," "," "," "," "],_:["","_","__","___","____","_____","______","_______"]};function f(e,t){return t>=0&&t<=7&&u[e]?u[e][t]:Array(t+1).join(e)}t.sprintf=s,t.vsprintf=a,void 0!==i&&(i.sprintf=s,i.vsprintf=a,void 0===(n=function(){return{sprintf:s,vsprintf:a}}.call(t,r,t,e))||(e.exports=n))}("undefined"==typeof window?this:window)},function(e,t){var r=Array.isArray;e.exports=r},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,r){(function(t){e.exports=function(e,r){for(var n=Math.min(e.length,r.length),i=new t(n),o=0;ot.blockLength&&(t.start(),t.update(s.bytes()),s=t.digest()),r=n.util.createBuffer(),i=n.util.createBuffer(),u=s.length();for(c=0;c>>0,c>>>0];for(var u=i.fullMessageLength.length-1;u>=0;--u)i.fullMessageLength[u]+=c[1],c[1]=c[0]+(i.fullMessageLength[u]/4294967296>>>0),i.fullMessageLength[u]=i.fullMessageLength[u]>>>0,c[0]=c[1]/4294967296>>>0;return t.putBytes(o),a(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(t.bytes());var c,u=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(o.substr(0,i.blockLength-u));for(var f=8*i.fullMessageLength[0],l=0;l>>0,s.putInt32(f>>>0),f=c>>>0;s.putInt32(f);var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};a(h,r,s);var p=n.util.createBuffer();return p.putInt32(h.h0),p.putInt32(h.h1),p.putInt32(h.h2),p.putInt32(h.h3),p.putInt32(h.h4),p},i};var o=null,s=!1;function a(e,t,r){for(var n,i,o,s,a,c,u,f=r.length();f>=64;){for(i=e.h0,o=e.h1,s=e.h2,a=e.h3,c=e.h4,u=0;u<16;++u)n=r.getInt32(),t[u]=n,n=(i<<5|i>>>27)+(a^o&(s^a))+c+1518500249+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;u<20;++u)n=(n=t[u-3]^t[u-8]^t[u-14]^t[u-16])<<1|n>>>31,t[u]=n,n=(i<<5|i>>>27)+(a^o&(s^a))+c+1518500249+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;u<32;++u)n=(n=t[u-3]^t[u-8]^t[u-14]^t[u-16])<<1|n>>>31,t[u]=n,n=(i<<5|i>>>27)+(o^s^a)+c+1859775393+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;u<40;++u)n=(n=t[u-6]^t[u-16]^t[u-28]^t[u-32])<<2|n>>>30,t[u]=n,n=(i<<5|i>>>27)+(o^s^a)+c+1859775393+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;u<60;++u)n=(n=t[u-6]^t[u-16]^t[u-28]^t[u-32])<<2|n>>>30,t[u]=n,n=(i<<5|i>>>27)+(o&s|a&(o^s))+c+2400959708+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;u<80;++u)n=(n=t[u-6]^t[u-16]^t[u-28]^t[u-32])<<2|n>>>30,t[u]=n,n=(i<<5|i>>>27)+(o^s^a)+c+3395469782+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;e.h0=e.h0+i|0,e.h1=e.h1+o|0,e.h2=e.h2+s|0,e.h3=e.h3+a|0,e.h4=e.h4+c|0,f-=64}}},function(e,t,r){"use strict";const n=t;n.Reporter=r(497).Reporter,n.DecoderBuffer=r(262).DecoderBuffer,n.EncoderBuffer=r(262).EncoderBuffer,n.Node=r(498)},function(e,t,r){(function(e,r){var n=200,i="Expected a function",o="__lodash_hash_undefined__",s=1,a=2,c=1/0,u=9007199254740991,f="[object Arguments]",l="[object Array]",h="[object Boolean]",p="[object Date]",d="[object Error]",g="[object Function]",b="[object GeneratorFunction]",m="[object Map]",y="[object Number]",v="[object Object]",w="[object RegExp]",A="[object Set]",_="[object String]",S="[object Symbol]",E="[object ArrayBuffer]",k="[object DataView]",x=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,C=/^\w*$/,I=/^\./,B=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,T=/\\(\\)?/g,R=/^\[object .+?Constructor\]$/,P=/^(?:0|[1-9]\d*)$/,O={};O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O[f]=O[l]=O[E]=O[h]=O[k]=O[p]=O[d]=O[g]=O[m]=O[y]=O[v]=O[w]=O[A]=O[_]=O["[object WeakMap]"]=!1;var M="object"==typeof e&&e&&e.Object===Object&&e,N="object"==typeof self&&self&&self.Object===Object&&self,D=M||N||Function("return this")(),K=t&&!t.nodeType&&t,U=K&&"object"==typeof r&&r&&!r.nodeType&&r,j=U&&U.exports===K&&M.process,F=function(){try{return j&&j.binding("util")}catch(e){}}(),L=F&&F.isTypedArray;function z(e,t){return!!(e?e.length:0)&&function(e,t,r){if(t!=t)return function(e,t,r,n){var i=e.length,o=r+(n?1:-1);for(;n?o--:++o-1}function H(e,t,r){for(var n=-1,i=e?e.length:0;++n-1},Ie.prototype.set=function(e,t){var r=this.__data__,n=Oe(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},Be.prototype.clear=function(){this.__data__={hash:new Ce,map:new(de||Ie),string:new Ce}},Be.prototype.delete=function(e){return He(this,e).delete(e)},Be.prototype.get=function(e){return He(this,e).get(e)},Be.prototype.has=function(e){return He(this,e).has(e)},Be.prototype.set=function(e,t){return He(this,e).set(e,t),this},Te.prototype.add=Te.prototype.push=function(e){return this.__data__.set(e,o),this},Te.prototype.has=function(e){return this.__data__.has(e)},Re.prototype.clear=function(){this.__data__=new Ie},Re.prototype.delete=function(e){return this.__data__.delete(e)},Re.prototype.get=function(e){return this.__data__.get(e)},Re.prototype.has=function(e){return this.__data__.has(e)},Re.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Ie){var i=r.__data__;if(!de||i.lengthu))return!1;var l=o.get(e);if(l&&o.get(t))return l==t;var h=-1,p=!0,d=i&s?new Te:void 0;for(o.set(e,t),o.set(t,e);++h-1&&e%1==0&&e-1&&e%1==0&&e<=u}function st(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function at(e){return!!e&&"object"==typeof e}function ct(e){return"symbol"==typeof e||at(e)&&se.call(e)==S}var ut=L?function(e){return function(t){return e(t)}}(L):function(e){return at(e)&&ot(e.length)&&!!O[se.call(e)]};function ft(e){return nt(e)?Pe(e):je(e)}function lt(e){return e}r.exports=function(e,t){return e&&e.length?function(e,t,r){var i=-1,o=z,s=e.length,a=!0,c=[],u=c;if(r)a=!1,o=H;else if(s>=n){var f=t?null:Le(e);if(f)return J(f);a=!1,o=G,u=new Te}else u=t?[]:c;e:for(;++i73)return!1;if(48!==e[0])return!1;if(e[1]!==e.length-3)return!1;var t=e[3];if(5+t>=e.length)return!1;var r=e[5+t];if(t+r+7!==e.length)return!1;var n=e.slice(4);if(2!==e[2])return!1;if(0===t)return!1;if(128&n[0])return!1;if(t>1&&0===n[0]&&!(128&n[1]))return!1;var i=e.slice(6+t);return 2===e[6+t-2]&&(0!==r&&(!(128&i[0])&&!(r>1&&0===i[0]&&!(128&i[1]))))},c.prototype.hasLowS=function(){return!this.s.lt(new n(1))&&!this.s.gt(new n("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex"))},c.prototype.hasDefinedHashtype=function(){if(!a.isNaturalNumber(this.nhashtype))return!1;var e=this.nhashtype&~c.SIGHASH_ANYONECANPAY;return!(ec.SIGHASH_SINGLE)},c.prototype.toTxFormat=function(){var e=this.toDER(),r=new t(1);return r.writeUInt8(this.nhashtype,0),t.concat([e,r])},c.SIGHASH_ALL=1,c.SIGHASH_NONE=2,c.SIGHASH_SINGLE=3,c.SIGHASH_ANYONECANPAY=128,e.exports=c}).call(this,r(0).Buffer)},function(e,t,r){e.exports=r(1011),e.exports.Interpreter=r(1979)},function(e,t,r){var n;!function(i){"use strict";var o,s=20,a=1,c=1e6,u=-7,f=21,l="[big.js] ",h=l+"Invalid ",p=h+"decimal places",d=h+"rounding mode",g={},b=void 0,m=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function y(e,t,r,n){var i=e.c,o=e.e+t+1;if(o=5;else if(2===r)n=i[o]>5||5==i[o]&&(n||o<0||i[o+1]!==b||1&i[o-1]);else if(3===r)n=n||!!i[0];else if(n=!1,0!==r)throw Error(d);if(o<1)i.length=1,n?(e.e=-t,i[0]=1):i[0]=e.e=0;else{if(i.length=o--,n)for(;++i[o]>9;)i[o]=0,o--||(++e.e,i.unshift(1));for(o=i.length;!i[--o];)i.pop()}}else if(r<0||r>3||r!==~~r)throw Error(d);return e}function v(e,t,r,n){var i,o,s=e.constructor,a=!e.c[0];if(r!==b){if(r!==~~r||r<(3==t)||r>c)throw Error(3==t?h+"precision":p);for(r=n-(e=new s(e)).e,e.c.length>++n&&y(e,r,s.RM),2==t&&(n=e.e+r+1);e.c.length=s.PE))o=o.charAt(0)+(r>1?"."+o.slice(1):"")+(i<0?"e":"e+")+i;else if(i<0){for(;++i;)o="0"+o;o="0."+o}else if(i>0)if(++i>r)for(i-=r;i--;)o+="0";else i1&&(o=o.charAt(0)+"."+o.slice(1));return e.s<0&&(!a||4==t)?"-"+o:o}g.abs=function(){var e=new this.constructor(this);return e.s=1,e},g.cmp=function(e){var t,r=this,n=r.c,i=(e=new r.constructor(e)).c,o=r.s,s=e.s,a=r.e,c=e.e;if(!n[0]||!i[0])return n[0]?o:i[0]?-s:0;if(o!=s)return o;if(t=o<0,a!=c)return a>c^t?1:-1;for(s=(a=n.length)<(c=i.length)?a:c,o=-1;++oi[o]^t?1:-1;return a==c?0:a>c^t?1:-1},g.div=function(e){var t=this,r=t.constructor,n=t.c,i=(e=new r(e)).c,o=t.s==e.s?1:-1,s=r.DP;if(s!==~~s||s<0||s>c)throw Error(p);if(!i[0])throw Error("[big.js] Division by zero");if(!n[0])return new r(0*o);var a,u,f,l,h,d=i.slice(),g=a=i.length,m=n.length,v=n.slice(0,a),w=v.length,A=e,_=A.c=[],S=0,E=s+(A.e=t.e-e.e)+1;for(A.s=o,o=E<0?0:E,d.unshift(0);w++w?1:-1;else for(h=-1,l=0;++hv[h]?1:-1;break}if(!(l<0))break;for(u=w==a?i:d;w;){if(v[--w]E&&y(A,s,r.RM,v[0]!==b),A},g.eq=function(e){return!this.cmp(e)},g.gt=function(e){return this.cmp(e)>0},g.gte=function(e){return this.cmp(e)>-1},g.lt=function(e){return this.cmp(e)<0},g.lte=function(e){return this.cmp(e)<1},g.minus=g.sub=function(e){var t,r,n,i,o=this,s=o.constructor,a=o.s,c=(e=new s(e)).s;if(a!=c)return e.s=-c,o.plus(e);var u=o.c.slice(),f=o.e,l=e.c,h=e.e;if(!u[0]||!l[0])return l[0]?(e.s=-c,e):new s(u[0]?o:0);if(a=f-h){for((i=a<0)?(a=-a,n=u):(h=f,n=l),n.reverse(),c=a;c--;)n.push(0);n.reverse()}else for(r=((i=u.length0)for(;c--;)u[t++]=0;for(c=t;r>a;){if(u[--r]0?(c=s,t=u):(i=-i,t=a),t.reverse();i--;)t.push(0);t.reverse()}for(a.length-u.length<0&&(t=u,u=a,a=t),i=u.length,o=0;i;a[i]%=10)o=(a[--i]=a[i]+u[i]+o)/10|0;for(o&&(a.unshift(o),++c),i=a.length;0===a[--i];)a.pop();return e.c=a,e.e=c,e},g.pow=function(e){var t=this,r=new t.constructor(1),n=r,i=e<0;if(e!==~~e||e<-1e6||e>1e6)throw Error(h+"exponent");for(i&&(e=-e);1&e&&(n=n.times(t)),e>>=1;)t=t.times(t);return i?r.div(n):n},g.round=function(e,t){var r=this.constructor;if(e===b)e=0;else if(e!==~~e||e<-c||e>c)throw Error(p);return y(new r(this),e,t===b?r.RM:t)},g.sqrt=function(){var e,t,r,n=this,i=n.constructor,o=n.s,s=n.e,a=new i(.5);if(!n.c[0])return new i(n);if(o<0)throw Error(l+"No square root");0===(o=Math.sqrt(n+""))||o===1/0?((t=n.c.join("")).length+s&1||(t+="0"),s=((s+1)/2|0)-(s<0||1&s),e=new i(((o=Math.sqrt(t))==1/0?"1e":(o=o.toExponential()).slice(0,o.indexOf("e")+1))+s)):e=new i(o),s=e.e+(i.DP+=4);do{r=e,e=a.times(r.plus(n.div(r)))}while(r.c.slice(0,s).join("")!==e.c.slice(0,s).join(""));return y(e,i.DP-=4,i.RM)},g.times=g.mul=function(e){var t,r=this,n=r.constructor,i=r.c,o=(e=new n(e)).c,s=i.length,a=o.length,c=r.e,u=e.e;if(e.s=r.s==e.s?1:-1,!i[0]||!o[0])return new n(0*e.s);for(e.e=c+u,sc;)a=t[u]+o[c]*i[u-c-1]+a,t[u--]=a%10,a=a/10|0;t[u]=(t[u]+a)%10}for(a?++e.e:t.shift(),c=t.length;!t[--c];)t.pop();return e.c=t,e},g.toExponential=function(e){return v(this,1,e,e)},g.toFixed=function(e){return v(this,2,e,this.e+e)},g.toPrecision=function(e){return v(this,3,e,e-1)},g.toString=function(){return v(this)},g.valueOf=g.toJSON=function(){return v(this,4)},(o=function e(){function t(r){var n=this;if(!(n instanceof t))return r===b?e():new t(r);r instanceof t?(n.s=r.s,n.e=r.e,n.c=r.c.slice()):function(e,t){var r,n,i;if(0===t&&1/t<0)t="-0";else if(!m.test(t+=""))throw Error(h+"number");for(e.s="-"==t.charAt(0)?(t=t.slice(1),-1):1,(r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),i=t.length,n=0;n0&&"0"==t.charAt(--i););for(e.e=r-n-1,e.c=[],r=0;n<=i;)e.c[r++]=+t.charAt(n++)}}(n,r),n.constructor=t}return t.prototype=g,t.DP=s,t.RM=a,t.NE=u,t.PE=f,t.version="5.2.2",t}()).default=o.Big=o,void 0===(n=function(){return o}.call(t,r,t,e))||(e.exports=n)}()},function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=r,r.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},function(e,t,r){"use strict";var n=r(122),i=r(4);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[n++]=63&s|128):o(e,i)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i>>0}return s},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,s=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,s,a){var c=0,u=t;return c+=(u=u+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,o,s,a){return t+n+o+a>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,s,a,c,u){var f=0,l=t;return f+=(l=l+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,o,s,a,c,u){return t+n+o+a+u>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},function(e,t,r){const n=r(65),i=Math.pow(2,31)-1;function o(e){return n.String(e)&&e.match(/^(m\/)?(\d+'?\/)*\d+'?$/)}o.toJSON=function(){return"BIP32 derivation path"};const s=21e14;const a=n.quacksLike("Point"),c=n.compile({messagePrefix:n.oneOf(n.Buffer,n.String),bip32:{public:n.UInt32,private:n.UInt32},pubKeyHash:n.UInt8,scriptHash:n.UInt8,wif:n.UInt8}),u={BIP32Path:o,Buffer256bit:n.BufferN(32),ECPoint:a,Hash160bit:n.BufferN(20),Hash256bit:n.BufferN(32),Network:c,Satoshi:function(e){return n.UInt53(e)&&e<=s},UInt31:function(e){return n.UInt32(e)&&e<=i}};for(var f in n)u[f]=n[f];e.exports=u},function(e,t,r){"use strict";var n=t;n.version=r(1891).version,n.utils=r(1892),n.rand=r(1893),n.hmacDRBG=r(1964),n.curve=r(379),n.curves=r(1974),n.ec=r(1976)},function(e,t,r){"use strict";var n=r(101),i=r(22);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[n++]=63&s|128):o(e,i)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i>>0}return s},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,s=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,s,a){var c=0,u=t;return c+=(u=u+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,o,s,a){return t+n+o+a>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,s,a,c,u){var f=0,l=t;return f+=(l=l+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,o,s,a,c,u){return t+n+o+a+u>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},function(e,t,r){"use strict";(function(t){var n=r(69),i=r(211),o=r(87),s=r(62),a=r(188),c=r(30),u=r(32);function f(e,t){if(!(this instanceof f))return new f(e,t);if(u.checkArgument(e,"First argument is required, please include public key data."),e instanceof f)return e;t=t||{};var r=this._classifyArgs(e,t);return r.point.validate(),s.defineImmutable(this,{point:r.point,compressed:r.compressed,network:r.network||a.defaultNetwork}),this}f.prototype._classifyArgs=function(e,r){var n={compressed:c.isUndefined(r.compressed)||r.compressed};if(e instanceof i)n.point=e;else if(e.x&&e.y)n=f._transformObject(e);else if("string"==typeof e)n=f._transformDER(new t(e,"hex"));else if(f._isBuffer(e))n=f._transformDER(e);else{if(!f._isPrivateKey(e))throw new TypeError("First argument is an unrecognized data format.");n=f._transformPrivateKey(e)}return n.network||(n.network=c.isUndefined(r.network)?void 0:a.get(r.network)),n},f._isPrivateKey=function(e){return e instanceof r(380)},f._isBuffer=function(e){return e instanceof t||e instanceof Uint8Array},f._transformPrivateKey=function(e){u.checkArgument(f._isPrivateKey(e),"Must be an instance of PrivateKey");var t={};return t.point=i.getG().mul(e.bn),t.compressed=e.compressed,t.network=e.network,t},f._transformDER=function(e,t){u.checkArgument(f._isBuffer(e),"Must be a hex buffer of DER encoded public key");var r,o,s,a,l={};if(t=!!c.isUndefined(t)||t,4!==e[0]&&(t||6!==e[0]&&7!==e[0]))if(3===e[0])s=e.slice(1),r=new n(s),(l=f._transformX(!0,r)).compressed=!0;else{if(2!==e[0])throw new TypeError("Invalid DER format public key");s=e.slice(1),r=new n(s),(l=f._transformX(!1,r)).compressed=!0}else{if(s=e.slice(1,33),a=e.slice(33,65),32!==s.length||32!==a.length||65!==e.length)throw new TypeError("Length of x and y must be 32 bytes");r=new n(s),o=new n(a),l.point=new i(r,o),l.compressed=!1}return l},f._transformX=function(e,t){u.checkArgument("boolean"==typeof e,"Must specify whether y is odd or not (true or false)");var r={};return r.point=i.fromX(e,t),r},f._transformObject=function(e){var t=new n(e.x,"hex"),r=new n(e.y,"hex");return new f(new i(t,r),{compressed:e.compressed})},f.fromPrivateKey=function(e){u.checkArgument(f._isPrivateKey(e),"Must be an instance of PrivateKey");var t=f._transformPrivateKey(e);return new f(t.point,{compressed:t.compressed,network:t.network})},f.fromDER=f.fromBuffer=function(e,t){u.checkArgument(f._isBuffer(e),"Must be a hex buffer of DER encoded public key");var r=f._transformDER(e,t);return new f(r.point,{compressed:r.compressed})},f.fromPoint=function(e,t){return u.checkArgument(e instanceof i,"First argument must be an instance of Point."),new f(e,{compressed:t})},f.fromString=function(e,r){var n=new t(e,r||"hex"),i=f._transformDER(n);return new f(i.point,{compressed:i.compressed})},f.fromX=function(e,t){var r=f._transformX(e,t);return new f(r.point,{compressed:r.compressed})},f.getValidationError=function(e){var t;try{new f(e)}catch(e){t=e}return t},f.isValid=function(e){return!f.getValidationError(e)},f.prototype.toObject=f.prototype.toJSON=function(){return{x:this.point.getX().toString("hex",2),y:this.point.getY().toString("hex",2),compressed:this.compressed}},f.prototype.toBuffer=f.prototype.toDER=function(){var e,r=this.point.getX(),n=this.point.getY(),i=r.toBuffer({size:32}),o=n.toBuffer({size:32});if(this.compressed){var s=o[o.length-1]%2;return e=new t(s?[3]:[2]),t.concat([e,i])}return e=new t([4]),t.concat([e,i,o])},f.prototype._getID=function(){return o.sha256ripemd160(this.toBuffer())},f.prototype.toAddress=function(e){return r(189).fromPublicKey(this,e||this.network)},f.prototype.toString=function(){return this.toDER().toString("hex")},f.prototype.inspect=function(){return""},e.exports=f}).call(this,r(0).Buffer)},function(e,t,r){"use strict";var n,i,o,s=r(389),a="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";function c(){o=!1}function u(e){if(e){if(e!==n){if(e.length!==a.length)throw new Error("Custom alphabet for shortid must be "+a.length+" unique characters. You submitted "+e.length+" characters: "+e);var t=e.split("").filter(function(e,t,r){return t!==r.lastIndexOf(e)});if(t.length)throw new Error("Custom alphabet for shortid must be "+a.length+" unique characters. These characters were not unique: "+t.join(", "));n=e,c()}}else n!==a&&(n=a,c())}function f(){return o||(o=function(){n||u(a);for(var e,t=n.split(""),r=[],i=s.nextValue();t.length>0;)i=s.nextValue(),e=Math.floor(i*t.length),r.push(t.splice(e,1)[0]);return r.join("")}())}e.exports={get:function(){return n||a},characters:function(e){return u(e),n},seed:function(e){s.seed(e),i!==e&&(c(),i=e)},lookup:function(e){return f()[e]},shuffled:f}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.preArrayOf=function(e,t,r){return function(){for(var n=arguments.length,i=Array(n),o=0;oe.toJSON()),multihash:this._cid.toBaseEncodedString(),size:this.size})),Object.assign({},this._json)}toString(){return`DAGNode <${this._cid.toBaseEncodedString()} - data: "${this.data.toString()}", links: ${this.links.length}, size: ${this.size}>`}get data(){return this._data}set data(e){throw new Error("Can't set property: 'data' is immutable")}get links(){return this._links}set links(e){throw new Error("Can't set property: 'links' is immutable")}get serialized(){return this._serialized}set serialized(e){throw new Error("Can't set property: 'serialized' is immutable")}get size(){return void 0===this._size&&(this._size=this.links.reduce((e,t)=>e+t.size,this.serialized.length)),this._size}set size(e){throw new Error("Can't set property: 'size' is immutable")}get multihash(){return this._cid.buffer}set multihash(e){throw new Error("Can't set property: 'multihash' is immutable")}get cid(){return this._cid}set cid(e){throw new Error("Can't set property: 'cid' is immutable")}},{className:"DAGNode",symbolName:"@ipld/js-ipld-dag-pb/dagnode"})).create=r(132),t.clone=r(451),t.addLink=r(452),t.rmLink=r(453)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(63),i=r(318),o=r(162).serialize,s=r(134).linkSort,a=r(131),c=r(76);e.exports=function(e,r,u,f){if("function"==typeof e?(f=e,e=void 0):"string"==typeof e&&(e=t.from(e)),"function"==typeof r&&(f=r,r=[]),"function"==typeof u&&(f=u,u=void 0),!t.isBuffer(e))return f(new Error("Passed 'data' is not a buffer or a string!"));u||(u="sha2-256");const l=r.map(e=>c.isDAGLink(e)?e:c.util.createDagLinkFromB58EncodedHash(e)),h=i(l,s);o({data:e,links:h},(t,r)=>{if(t)return f(t);n(r,u,(t,n)=>{if(t)return f(t);const i=new a(e,h,r,n);f(null,i)})})}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){if(null===e)throw new Error("Callback was already called.");var t=e;e=null,t.apply(this,arguments)}},e.exports=t.default},function(e,t,r){"use strict";(function(n){const i=r(76);(t=e.exports).cloneData=function(e){let t;return e.data&&e.data.length>0?(t=n.alloc(e.data.length),e.data.copy(t)):t=n.alloc(0),t},t.cloneLinks=function(e){return e.links.slice()},t.linkSort=function(e,t){const r=n.from(e.name||""),i=n.from(t.name||"");return r.compare(i)},t.toDAGLink=function(e){return new i("",e.size,e.multihash)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prePeerIdToJson=t.prePeerIdFromJson=t.isPeerIdJson=t.isPeerId=t.peerIdToJson=t.peerIdFromJson=t.prePeerInfoToJson=t.prePeerInfoFromJson=t.isPeerInfoJson=t.isPeerInfo=t.peerInfoToJson=t.peerInfoFromJson=void 0;var n=s(r(455)),i=s(r(533)),o=r(103);function s(e){return e&&e.__esModule?e:{default:e}}var a=t.peerInfoFromJson=function(e){return l(e.id).then(function(t){var r=new n.default(t);return e.multiaddrs.forEach(function(e){r.multiaddrs.add((0,o.multiaddrFromJson)(e))}),e._connectedMultiaddr&&r.connect((0,o.multiaddrFromJson)(e._connectedMultiaddr)),r})},c=t.peerInfoToJson=function(e){return{__ipfsPostMsgProxyType:"PeerInfo",id:h(e.id),multiaddrs:e.multiaddrs.toArray().map(o.multiaddrToJson),_connectedMultiaddr:e._connectedMultiaddr?(0,o.multiaddrToJson)(e._connectedMultiaddr):null}},u=t.isPeerInfo=n.default.isPeerInfo,f=t.isPeerInfoJson=function(e){return e&&"PeerInfo"===e.__ipfsPostMsgProxyType},l=(t.prePeerInfoFromJson=function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n>>24]^f[d>>>16&255]^l[g>>>8&255]^h[255&b]^t[m++],s=u[d>>>24]^f[g>>>16&255]^l[b>>>8&255]^h[255&p]^t[m++],a=u[g>>>24]^f[b>>>16&255]^l[p>>>8&255]^h[255&d]^t[m++],c=u[b>>>24]^f[p>>>16&255]^l[d>>>8&255]^h[255&g]^t[m++],p=o,d=s,g=a,b=c;return o=(n[p>>>24]<<24|n[d>>>16&255]<<16|n[g>>>8&255]<<8|n[255&b])^t[m++],s=(n[d>>>24]<<24|n[g>>>16&255]<<16|n[b>>>8&255]<<8|n[255&p])^t[m++],a=(n[g>>>24]<<24|n[b>>>16&255]<<16|n[p>>>8&255]<<8|n[255&d])^t[m++],c=(n[b>>>24]<<24|n[p>>>16&255]<<16|n[d>>>8&255]<<8|n[255&g])^t[m++],[o>>>=0,s>>>=0,a>>>=0,c>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],c=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,c=0;c<256;++c){var u=a^a<<1^a<<2^a<<3^a<<4;u=u>>>8^255&u^99,r[s]=u,n[u]=s;var f=e[s],l=e[f],h=e[l],p=257*e[u]^16843008*u;i[0][s]=p<<24|p>>>8,i[1][s]=p<<16|p>>>16,i[2][s]=p<<8|p>>>24,i[3][s]=p,p=16843009*h^65537*l^257*f^16843008*s,o[0][u]=p<<24|p>>>8,o[1][u]=p<<16|p>>>16,o[2][u]=p<<8|p>>>24,o[3][u]=p,0===s?s=a=1:(s=f^e[e[e[h^f]]],a^=e[e[a]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function u(e){this._key=i(e),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o>>24,s=c.SBOX[s>>>24]<<24|c.SBOX[s>>>16&255]<<16|c.SBOX[s>>>8&255]<<8|c.SBOX[255&s],s^=a[o/t|0]<<24):t>6&&o%t==4&&(s=c.SBOX[s>>>24]<<24|c.SBOX[s>>>16&255]<<16|c.SBOX[s>>>8&255]<<8|c.SBOX[255&s]),i[o]=i[o-t]^s}for(var u=[],f=0;f>>24]]^c.INV_SUB_MIX[1][c.SBOX[h>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[h>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&h]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(e){return s(e=i(e),this._keySchedule,c.SUB_MIX,c.SBOX,this._nRounds)},u.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},u.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=s(e,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},u.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=u},function(e,t,r){"use strict";(function(t){!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,r,n,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,r)});case 3:return t.nextTick(function(){e.call(null,r,n)});case 4:return t.nextTick(function(){e.call(null,r,n,i)});default:for(o=new Array(a-1),s=0;s8?3:1,m=[],y=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],v=0,w=0;w>>4^_))<<4,A^=t=65535&((_^=t)>>>-16^A),A^=(t=858993459&(A>>>2^(_^=t<<-16)))<<2,A^=t=65535&((_^=t)>>>-16^A),A^=(t=1431655765&(A>>>1^(_^=t<<-16)))<<1,A^=t=16711935&((_^=t)>>>8^A),t=(A^=(t=1431655765&(A>>>1^(_^=t<<8)))<<1)<<8|(_^=t)>>>20&240,A=_<<24|_<<8&16711680|_>>>8&65280|_>>>24&240,_=t;for(var S=0;S>>26,_=_<<2|_>>>26):(A=A<<1|A>>>27,_=_<<1|_>>>27);var E=r[(A&=-15)>>>28]|n[A>>>24&15]|i[A>>>20&15]|o[A>>>16&15]|s[A>>>12&15]|a[A>>>8&15]|c[A>>>4&15],k=u[(_&=-15)>>>28]|f[_>>>24&15]|l[_>>>20&15]|h[_>>>16&15]|p[_>>>12&15]|d[_>>>8&15]|g[_>>>4&15];t=65535&(k>>>16^E),m[v++]=E^t,m[v++]=k^t<<16}}return m}(t),this._init=!0}},i("DES-ECB",n.cipher.modes.ecb),i("DES-CBC",n.cipher.modes.cbc),i("DES-CFB",n.cipher.modes.cfb),i("DES-OFB",n.cipher.modes.ofb),i("DES-CTR",n.cipher.modes.ctr),i("3DES-ECB",n.cipher.modes.ecb),i("3DES-CBC",n.cipher.modes.cbc),i("3DES-CFB",n.cipher.modes.cfb),i("3DES-OFB",n.cipher.modes.ofb),i("3DES-CTR",n.cipher.modes.ctr);var o=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],s=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],a=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],c=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],u=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],f=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],l=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],h=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function p(e,t,r,n){var i,p,d=32===e.length?3:9;i=3===d?n?[30,-2,-2]:[0,32,2]:n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var g=t[0],b=t[1];g^=(p=252645135&(g>>>4^b))<<4,g^=(p=65535&(g>>>16^(b^=p)))<<16,g^=p=858993459&((b^=p)>>>2^g),g^=p=16711935&((b^=p<<2)>>>8^g),g=(g^=(p=1431655765&(g>>>1^(b^=p<<8)))<<1)<<1|g>>>31,b=(b^=p)<<1|b>>>31;for(var m=0;m>>4|b<<28)^e[w+1];p=g,g=b,b=p^(s[A>>>24&63]|c[A>>>16&63]|f[A>>>8&63]|h[63&A]|o[_>>>24&63]|a[_>>>16&63]|u[_>>>8&63]|l[63&_])}p=g,g=b,b=p}b=b>>>1|b<<31,b^=p=1431655765&((g=g>>>1|g<<31)>>>1^b),b^=(p=16711935&(b>>>8^(g^=p<<1)))<<8,b^=(p=858993459&(b>>>2^(g^=p)))<<2,b^=p=65535&((g^=p)>>>16^b),b^=p=252645135&((g^=p<<16)>>>4^b),g^=p<<4,r[0]=g,r[1]=b}function d(e){var t,r="DES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start;return t.start=function(e,r){var o=null;r instanceof n.util.ByteBuffer&&(o=r,r={}),(r=r||{}).output=o,r.iv=e,i.call(t,r)},t}},function(e,t,r){var n=r(8);if(r(59),r(140),r(82),r(251),r(252),r(43),r(13),void 0===i)var i=n.jsbn.BigInteger;var o=n.asn1;n.pki=n.pki||{},e.exports=n.pki.rsa=n.rsa=n.rsa||{};var s=n.pki,a=[6,4,2,4,2,4,6,2],c={name:"PrivateKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},u={name:"RSAPrivateKey",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},f={name:"RSAPublicKey",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},l=n.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:o.Class.UNIVERSAL,type:o.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},h=function(e){var t;if(!(e.algorithm in s.oids)){var r=new Error("Unknown message digest algorithm.");throw r.algorithm=e.algorithm,r}t=s.oids[e.algorithm];var n=o.oidToDer(t).getBytes(),i=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[]),a=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[]);a.value.push(o.create(o.Class.UNIVERSAL,o.Type.OID,!1,n)),a.value.push(o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,""));var c=o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,e.digest().getBytes());return i.value.push(a),i.value.push(c),o.toDer(i).getBytes()},p=function(e,t,r){if(r)return e.modPow(t.e,t.n);if(!t.p||!t.q)return e.modPow(t.d,t.n);var o;t.dP||(t.dP=t.d.mod(t.p.subtract(i.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(i.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));do{o=new i(n.util.bytesToHex(n.random.getBytes(t.n.bitLength()/8)),16)}while(o.compareTo(t.n)>=0||!o.gcd(t.n).equals(i.ONE));for(var s=(e=e.multiply(o.modPow(t.e,t.n)).mod(t.n)).mod(t.p).modPow(t.dP,t.p),a=e.mod(t.q).modPow(t.dQ,t.q);s.compareTo(a)<0;)s=s.add(t.p);var c=s.subtract(a).multiply(t.qInv).mod(t.p).multiply(t.q).add(a);return c=c.multiply(o.modInverse(t.n)).mod(t.n)};function d(e,t,r){var i=n.util.createBuffer(),o=Math.ceil(t.n.bitLength()/8);if(e.length>o-11){var s=new Error("Message is too long for PKCS#1 v1.5 padding.");throw s.length=e.length,s.max=o-11,s}i.putByte(0),i.putByte(r);var a,c=o-3-e.length;if(0===r||1===r){a=0===r?0:255;for(var u=0;u0;){var f=0,l=n.random.getBytes(c);for(u=0;u1;){if(255!==s.getByte()){--s.read;break}++u}else if(2===c)for(u=0;s.length()>1;){if(0===s.getByte()){--s.read;break}++u}if(0!==s.getByte()||u!==o-3-s.length())throw new Error("Encryption block is invalid.");return s.getBytes()}function b(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var r=n.util.hexToBytes(t);return r.length>1&&(0===r.charCodeAt(0)&&0==(128&r.charCodeAt(1))||255===r.charCodeAt(0)&&128==(128&r.charCodeAt(1)))?r.substr(1):r}function m(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}function y(e){return"undefined"!=typeof window&&"object"==typeof window.crypto&&"object"==typeof window.crypto.subtle&&"function"==typeof window.crypto.subtle[e]}function v(e){return"undefined"!=typeof window&&"object"==typeof window.msCrypto&&"object"==typeof window.msCrypto.subtle&&"function"==typeof window.msCrypto.subtle[e]}function w(e){for(var t=n.util.hexToBytes(e.toString(16)),r=new Uint8Array(t.length),i=0;i0;)f.putByte(0),--l;return f.putBytes(n.util.hexToBytes(u)),f.getBytes()},s.rsa.decrypt=function(e,t,r,o){var s=Math.ceil(t.n.bitLength()/8);if(e.length!==s){var a=new Error("Encrypted message length is invalid.");throw a.length=e.length,a.expected=s,a}var c=new i(n.util.createBuffer(e).toHex(),16);if(c.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var u=p(c,t,r).toString(16),f=n.util.createBuffer(),l=s-Math.ceil(u.length/2);l>0;)f.putByte(0),--l;return f.putBytes(n.util.hexToBytes(u)),!1!==o?g(f.getBytes(),t,r):f.getBytes()},s.rsa.createKeyPairGenerationState=function(e,t,r){"string"==typeof e&&(e=parseInt(e,10)),e=e||2048;var o,s=(r=r||{}).prng||n.random,a={nextBytes:function(e){for(var t=s.getBytesSync(e.length),r=0;r>1,pBits:e-(e>>1),pqState:0,num:null,keys:null}).e.fromInt(o.eInt),o},s.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var r=new i(null);r.fromInt(30);for(var n,o=0,c=function(e,t){return e|t},u=+new Date,f=0;null===e.keys&&(t<=0||fl?e.pqState=0:e.num.isProbablePrime(m(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(a[o++%8],0):2===e.pqState?e.pqState=0===e.num.subtract(i.ONE).gcd(e.e).compareTo(i.ONE)?3:0:3===e.pqState&&(e.pqState=0,null===e.p?e.p=e.num:e.q=e.num,null!==e.p&&null!==e.q&&++e.state,e.num=null)}else if(1===e.state)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(2===e.state)e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(3===e.state)0===e.phi.gcd(e.e).compareTo(i.ONE)?++e.state:(e.p=null,e.q=null,e.state=0);else if(4===e.state)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(5===e.state){var p=e.e.modInverse(e.phi);e.keys={privateKey:s.rsa.setPrivateKey(e.n,e.e,p,e.p,e.q,p.mod(e.p1),p.mod(e.q1),e.q.modInverse(e.p)),publicKey:s.rsa.setPublicKey(e.n,e.e)}}f+=(n=+new Date)-u,u=n}return null!==e.keys},s.rsa.generateKeyPair=function(e,t,r,a){if(1===arguments.length?"object"==typeof e?(r=e,e=void 0):"function"==typeof e&&(a=e,e=void 0):2===arguments.length?"number"==typeof e?"function"==typeof t?(a=t,t=void 0):"number"!=typeof t&&(r=t,t=void 0):(r=e,a=t,e=void 0,t=void 0):3===arguments.length&&("number"==typeof t?"function"==typeof r&&(a=r,r=void 0):(a=r,r=t,t=void 0)),r=r||{},void 0===e&&(e=r.bits||2048),void 0===t&&(t=r.e||65537),!n.options.usePureJavaScript&&a&&e>=256&&e<=16384&&(65537===t||3===t)){if(y("generateKey")&&y("exportKey"))return window.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:w(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(e){return window.crypto.subtle.exportKey("pkcs8",e.privateKey)}).then(void 0,function(e){a(e)}).then(function(e){if(e){var t=s.privateKeyFromAsn1(o.fromDer(n.util.createBuffer(e)));a(null,{privateKey:t,publicKey:s.setRsaPublicKey(t.n,t.e)})}});if(v("generateKey")&&v("exportKey")){var c=window.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:w(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);return c.oncomplete=function(e){var t=e.target.result,r=window.msCrypto.subtle.exportKey("pkcs8",t.privateKey);r.oncomplete=function(e){var t=e.target.result,r=s.privateKeyFromAsn1(o.fromDer(n.util.createBuffer(t)));a(null,{privateKey:r,publicKey:s.setRsaPublicKey(r.n,r.e)})},r.onerror=function(e){a(e)}},void(c.onerror=function(e){a(e)})}}var u=s.rsa.createKeyPairGenerationState(e,t,r);if(!a)return s.rsa.stepKeyPairGenerationState(u,0),u.keys;!function(e,t,r){"function"==typeof t&&(r=t,t={});var o={algorithm:{name:(t=t||{}).algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};"prng"in t&&(o.prng=t.prng);function a(){c(e.pBits,function(t,n){return t?r(t):(e.p=n,null!==e.q?u(t,e.q):void c(e.qBits,u))})}function c(e,t){n.prime.generateProbablePrime(e,o,t)}function u(t,n){if(t)return r(t);if(e.q=n,e.p.compareTo(e.q)<0){var o=e.p;e.p=e.q,e.q=o}if(0!==e.p.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.p=null,void a();if(0!==e.q.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.q=null,void c(e.qBits,u);if(e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),0!==e.phi.gcd(e.e).compareTo(i.ONE))return e.p=e.q=null,void a();if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits)return e.q=null,void c(e.qBits,u);var f=e.e.modInverse(e.phi);e.keys={privateKey:s.rsa.setPrivateKey(e.n,e.e,f,e.p,e.q,f.mod(e.p1),f.mod(e.q1),e.q.modInverse(e.p)),publicKey:s.rsa.setPublicKey(e.n,e.e)},r(null,e.keys)}a()}(u,r,a)},s.setRsaPublicKey=s.rsa.setPublicKey=function(e,t){var r={n:e,e:t,encrypt:function(e,t,i){if("string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===t)t={encode:function(e,t,r){return d(e,t,2).getBytes()}};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={encode:function(e,t){return n.pkcs1.encode_rsa_oaep(t,e,i)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(t))t={encode:function(e){return e}};else if("string"==typeof t)throw new Error('Unsupported encryption scheme: "'+t+'".');var o=t.encode(e,r,!0);return s.rsa.encrypt(o,r,!0)},verify:function(e,t,n){"string"==typeof n?n=n.toUpperCase():void 0===n&&(n="RSASSA-PKCS1-V1_5"),"RSASSA-PKCS1-V1_5"===n?n={verify:function(e,t){return t=g(t,r,!0),e===o.fromDer(t).value[1].value}}:"NONE"!==n&&"NULL"!==n&&null!==n||(n={verify:function(e,t){return e===(t=g(t,r,!0))}});var i=s.rsa.decrypt(t,r,!0,!1);return n.verify(e,i,r.n.bitLength())}};return r},s.setRsaPrivateKey=s.rsa.setPrivateKey=function(e,t,r,i,o,a,c,u){var f={n:e,e:t,d:r,p:i,q:o,dP:a,dQ:c,qInv:u,decrypt:function(e,t,r){"string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5");var i=s.rsa.decrypt(e,f,!1,!1);if("RSAES-PKCS1-V1_5"===t)t={decode:g};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={decode:function(e,t){return n.pkcs1.decode_rsa_oaep(t,e,r)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(t))throw new Error('Unsupported encryption scheme: "'+t+'".');t={decode:function(e){return e}}}return t.decode(i,f,!1)},sign:function(e,t){var r=!1;"string"==typeof t&&(t=t.toUpperCase()),void 0===t||"RSASSA-PKCS1-V1_5"===t?(t={encode:h},r=1):"NONE"!==t&&"NULL"!==t&&null!==t||(t={encode:function(){return e}},r=1);var n=t.encode(e,f.n.bitLength());return s.rsa.encrypt(n,f,r)}};return f},s.wrapRsaPrivateKey=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(0).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(s.oids.rsaEncryption).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")]),o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,o.toDer(e).getBytes())])},s.privateKeyFromAsn1=function(e){var t,r,a,f,l,h,p,d,g={},b=[];if(o.validate(e,c,g,b)&&(e=o.fromDer(n.util.createBuffer(g.privateKey))),g={},b=[],!o.validate(e,u,g,b)){var m=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw m.errors=b,m}return t=n.util.createBuffer(g.privateKeyModulus).toHex(),r=n.util.createBuffer(g.privateKeyPublicExponent).toHex(),a=n.util.createBuffer(g.privateKeyPrivateExponent).toHex(),f=n.util.createBuffer(g.privateKeyPrime1).toHex(),l=n.util.createBuffer(g.privateKeyPrime2).toHex(),h=n.util.createBuffer(g.privateKeyExponent1).toHex(),p=n.util.createBuffer(g.privateKeyExponent2).toHex(),d=n.util.createBuffer(g.privateKeyCoefficient).toHex(),s.setRsaPrivateKey(new i(t,16),new i(r,16),new i(a,16),new i(f,16),new i(l,16),new i(h,16),new i(p,16),new i(d,16))},s.privateKeyToAsn1=s.privateKeyToRSAPrivateKey=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(0).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.n)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.e)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.d)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.p)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.q)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.dP)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.dQ)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.qInv))])},s.publicKeyFromAsn1=function(e){var t={},r=[];if(o.validate(e,l,t,r)){var a,c=o.derToOid(t.publicKeyOid);if(c!==s.oids.rsaEncryption)throw(a=new Error("Cannot read public key. Unknown OID.")).oid=c,a;e=t.rsaPublicKey}if(r=[],!o.validate(e,f,t,r))throw(a=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=r,a;var u=n.util.createBuffer(t.publicKeyModulus).toHex(),h=n.util.createBuffer(t.publicKeyExponent).toHex();return s.setRsaPublicKey(new i(u,16),new i(h,16))},s.publicKeyToAsn1=s.publicKeyToSubjectPublicKeyInfo=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(s.oids.rsaEncryption).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")]),o.create(o.Class.UNIVERSAL,o.Type.BITSTRING,!1,[s.publicKeyToRSAPublicKey(e)])])},s.publicKeyToRSAPublicKey=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.n)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.e))])}},function(e,t,r){var n,i=r(8);e.exports=i.jsbn=i.jsbn||{};function o(e,t,r){this.data=[],null!=e&&("number"==typeof e?this.fromNumber(e,t,r):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function s(){return new o(null)}function a(e,t,r,n,i,o){for(var s=16383&t,a=t>>14;--o>=0;){var c=16383&this.data[e],u=this.data[e++]>>14,f=a*c+u*s;i=((c=s*c+((16383&f)<<14)+r.data[n]+i)>>28)+(f>>14)+a*u,r.data[n++]=268435455&c}return i}i.jsbn.BigInteger=o,"undefined"==typeof navigator?(o.prototype.am=a,n=28):"Microsoft Internet Explorer"==navigator.appName?(o.prototype.am=function(e,t,r,n,i,o){for(var s=32767&t,a=t>>15;--o>=0;){var c=32767&this.data[e],u=this.data[e++]>>15,f=a*c+u*s;i=((c=s*c+((32767&f)<<15)+r.data[n]+(1073741823&i))>>>30)+(f>>>15)+a*u+(i>>>30),r.data[n++]=1073741823&c}return i},n=30):"Netscape"!=navigator.appName?(o.prototype.am=function(e,t,r,n,i,o){for(;--o>=0;){var s=t*this.data[e++]+r.data[n]+i;i=Math.floor(s/67108864),r.data[n++]=67108863&s}return i},n=26):(o.prototype.am=a,n=28),o.prototype.DB=n,o.prototype.DM=(1<>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function b(e){this.m=e}function m(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function S(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function E(){}function k(e){return e}function x(e){this.r2=s(),this.q3=s(),o.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}b.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},b.prototype.revert=function(e){return e},b.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},b.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},b.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},m.prototype.convert=function(e){var t=s();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(o.ZERO)>0&&this.m.subTo(t,t),t},m.prototype.revert=function(e){var t=s();return e.copyTo(t),this.reduce(t),t},m.prototype.reduce=function(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;t>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e.data[r]+=this.m.am(0,n,e,t,0,this.m.t);e.data[r]>=e.DV;)e.data[r]-=e.DV,e.data[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},m.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},m.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},o.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s},o.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0},o.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.fromRadix(e,t);r=2}this.t=0,this.s=0;for(var n=e.length,i=!1,s=0;--n>=0;){var a=8==r?255&e[n]:p(e,n);a<0?"-"==e.charAt(n)&&(i=!0):(i=!1,0==s?this.data[this.t++]=a:s+r>this.DB?(this.data[this.t-1]|=(a&(1<>this.DB-s):this.data[this.t-1]|=a<=this.DB&&(s-=this.DB))}8==r&&0!=(128&e[0])&&(this.s=-1,s>0&&(this.data[this.t-1]|=(1<0&&this.data[this.t-1]==e;)--this.t},o.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t.data[r+e]=this.data[r];for(r=e-1;r>=0;--r)t.data[r]=0;t.t=this.t+e,t.s=this.s},o.prototype.drShiftTo=function(e,t){for(var r=e;r=0;--r)t.data[r+s+1]=this.data[r]>>i|a,a=(this.data[r]&o)<=0;--r)t.data[r]=0;t.data[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()},o.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,o=(1<>n;for(var s=r+1;s>n;n>0&&(t.data[this.t-r-1]|=(this.s&o)<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t.data[r++]=this.DV+n:n>0&&(t.data[r++]=n),t.t=r,t.clamp()},o.prototype.multiplyTo=function(e,t){var r=this.abs(),n=e.abs(),i=r.t;for(t.t=i+n.t;--i>=0;)t.data[i]=0;for(i=0;i=0;)e.data[r]=0;for(r=0;r=t.DV&&(e.data[r+t.t]-=t.DV,e.data[r+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(r,t.data[r],e,2*r,0,1)),e.s=0,e.clamp()},o.prototype.divRemTo=function(e,t,r){var n=e.abs();if(!(n.t<=0)){var i=this.abs();if(i.t0?(n.lShiftTo(f,a),i.lShiftTo(f,r)):(n.copyTo(a),i.copyTo(r));var l=a.t,h=a.data[l-1];if(0!=h){var p=h*(1<1?a.data[l-2]>>this.F2:0),d=this.FV/p,b=(1<=0&&(r.data[r.t++]=1,r.subTo(w,r)),o.ONE.dlShiftTo(l,w),w.subTo(a,a);a.t=0;){var A=r.data[--y]==h?this.DM:Math.floor(r.data[y]*d+(r.data[y-1]+m)*b);if((r.data[y]+=a.am(0,A,r,v,0,l))0&&r.rShiftTo(f,r),c<0&&o.ZERO.subTo(r,r)}}},o.prototype.invDigit=function(){if(this.t<1)return 0;var e=this.data[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},o.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},o.prototype.exp=function(e,t){if(e>4294967295||e<1)return o.ONE;var r=s(),n=s(),i=t.convert(this),a=g(e)-1;for(i.copyTo(r);--a>=0;)if(t.sqrTo(r,n),(e&1<0)t.mulTo(n,i,r);else{var c=r;r=n,n=c}return t.revert(r)},o.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,n=(1<0)for(a>a)>0&&(i=!0,o=h(r));s>=0;)a>(a+=this.DB-t)):(r=this.data[s]>>(a-=t)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=h(r));return i?o:"0"},o.prototype.negate=function(){var e=s();return o.ZERO.subTo(this,e),e},o.prototype.abs=function(){return this.s<0?this.negate():this},o.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this.data[r]-e.data[r]))return t;return 0},o.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+g(this.data[this.t-1]^this.s&this.DM)},o.prototype.mod=function(e){var t=s();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(o.ZERO)>0&&e.subTo(t,t),t},o.prototype.modPowInt=function(e,t){var r;return r=e<256||t.isEven()?new b(t):new m(t),this.exp(e,r)},o.ZERO=d(0),o.ONE=d(1),E.prototype.convert=k,E.prototype.revert=k,E.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},E.prototype.sqrTo=function(e,t){e.squareTo(t)},x.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=s();return e.copyTo(t),this.reduce(t),t},x.prototype.revert=function(e){return e},x.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},x.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},x.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var C=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],I=(1<<26)/C[C.length-1];o.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},o.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),n=d(r),i=s(),o=s(),a="";for(this.divRemTo(n,i,o);i.signum()>0;)a=(r+o.intValue()).toString(e).substr(1)+a,i.divRemTo(n,i,o);return o.intValue().toString(e)+a},o.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var r=this.chunkSize(t),n=Math.pow(t,r),i=!1,s=0,a=0,c=0;c=r&&(this.dMultiply(n),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(t,s)),this.dAddOffset(a,0)),i&&o.ZERO.subTo(this,this)},o.prototype.fromNumber=function(e,t,r){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(o.ONE.shiftLeft(e-1),v,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(o.ONE.shiftLeft(e-1),this);else{var n=new Array,i=7&e;n.length=1+(e>>3),t.nextBytes(n),i>0?n[0]&=(1<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t.data[r++]=n:n<-1&&(t.data[r++]=this.DV+n),t.t=r,t.clamp()},o.prototype.dMultiply=function(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},o.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this.data[this.t++]=0;for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}},o.prototype.multiplyLowerTo=function(e,t,r){var n,i=Math.min(this.t+e.t,t);for(r.s=0,r.t=i;i>0;)r.data[--i]=0;for(n=r.t-this.t;i=0;)r.data[n]=0;for(n=Math.max(t-this.t,0);n0)if(0==t)r=this.data[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this.data[n])%e;return r},o.prototype.millerRabin=function(e){var t=this.subtract(o.ONE),r=t.getLowestSetBit();if(r<=0)return!1;for(var n,i=t.shiftRight(r),s={nextBytes:function(e){for(var t=0;t=0);var c=n.modPow(i,this);if(0!=c.compareTo(o.ONE)&&0!=c.compareTo(t)){for(var u=1;u++>24},o.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},o.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},o.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var r,n=this.DB-e*this.DB%8,i=0;if(e-- >0)for(n>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<=0;)n<8?(r=(this.data[e]&(1<>(n+=this.DB-8)):(r=this.data[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t},o.prototype.equals=function(e){return 0==this.compareTo(e)},o.prototype.min=function(e){return this.compareTo(e)<0?this:e},o.prototype.max=function(e){return this.compareTo(e)>0?this:e},o.prototype.and=function(e){var t=s();return this.bitwiseTo(e,y,t),t},o.prototype.or=function(e){var t=s();return this.bitwiseTo(e,v,t),t},o.prototype.xor=function(e){var t=s();return this.bitwiseTo(e,w,t),t},o.prototype.andNot=function(e){var t=s();return this.bitwiseTo(e,A,t),t},o.prototype.not=function(){for(var e=s(),t=0;t=this.t?0!=this.s:0!=(this.data[t]&1<1){var l=s();for(n.sqrTo(a[1],l);c<=f;)a[c]=s(),n.mulTo(l,a[c-2],a[c]),c+=2}var h,p,y=e.t-1,v=!0,w=s();for(i=g(e.data[y])-1;y>=0;){for(i>=u?h=e.data[y]>>i-u&f:(h=(e.data[y]&(1<0&&(h|=e.data[y-1]>>this.DB+i-u)),c=r;0==(1&h);)h>>=1,--c;if((i-=c)<0&&(i+=this.DB,--y),v)a[h].copyTo(o),v=!1;else{for(;c>1;)n.sqrTo(o,w),n.sqrTo(w,o),c-=2;c>0?n.sqrTo(o,w):(p=o,o=w,w=p),n.mulTo(w,a[h],o)}for(;y>=0&&0==(e.data[y]&1<=0?(r.subTo(n,r),t&&i.subTo(a,i),s.subTo(c,s)):(n.subTo(r,n),t&&a.subTo(i,a),c.subTo(s,c))}return 0!=n.compareTo(o.ONE)?o.ZERO:c.compareTo(e)>=0?c.subtract(e):c.signum()<0?(c.addTo(e,c),c.signum()<0?c.add(e):c):c},o.prototype.pow=function(e){return this.exp(e,new E)},o.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var i=t.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return t;for(i0&&(t.rShiftTo(o,t),r.rShiftTo(o,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},o.prototype.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r.data[0]<=C[C.length-1]){for(t=0;t>>2,t.words[2]=(63&e[22])<<20|e[23]<<12|e[24]<<4|e[25]>>>4,t.words[3]=(255&e[19])<<18|e[20]<<10|e[21]<<2|e[22]>>>6,t.words[4]=(3&e[15])<<24|e[16]<<16|e[17]<<8|e[18],t.words[5]=(15&e[12])<<22|e[13]<<14|e[14]<<6|e[15]>>>2,t.words[6]=(63&e[9])<<20|e[10]<<12|e[11]<<4|e[12]>>>4,t.words[7]=(255&e[6])<<18|e[7]<<10|e[8]<<2|e[9]>>>6,t.words[8]=(3&e[2])<<24|e[3]<<16|e[4]<<8|e[5],t.words[9]=e[0]<<14|e[1]<<6|e[2]>>>2,t.length=10,t.strip()},o.prototype.toBuffer=function(){for(var e=this.words,t=this.length;t<10;++t)e[t]=0;return n.from([e[9]>>>14&255,e[9]>>>6&255,(63&e[9])<<2|e[8]>>>24&3,e[8]>>>16&255,e[8]>>>8&255,255&e[8],e[7]>>>18&255,e[7]>>>10&255,e[7]>>>2&255,(3&e[7])<<6|e[6]>>>20&63,e[6]>>>12&255,e[6]>>>4&255,(15&e[6])<<4|e[5]>>>22&15,e[5]>>>14&255,e[5]>>>6&255,(63&e[5])<<2|e[4]>>>24&3,e[4]>>>16&255,e[4]>>>8&255,255&e[4],e[3]>>>18&255,e[3]>>>10&255,e[3]>>>2&255,(3&e[3])<<6|e[2]>>>20&63,e[2]>>>12&255,e[2]>>>4&255,(15&e[2])<<4|e[1]>>>22&15,e[1]>>>14&255,e[1]>>>6&255,(63&e[1])<<2|e[0]>>>24&3,e[0]>>>16&255,e[0]>>>8&255,255&e[0]])},o.prototype.clone=function(){var e=new o;e.words=new Array(this.length);for(var t=0;t1&&0==(0|this.words[this.length-1]);)this.length--;return this},o.prototype.normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.ucmp=function(e){if(this.length!==e.length)return this.length>e.length?1:-1;for(var t=this.length-1;t>=0;--t)if(this.words[t]!==e.words[t])return this.words[t]>e.words[t]?1:-1;return 0},o.prototype.gtOne=function(){return this.length>1||this.words[0]>1},o.prototype.isOverflow=function(){return this.ucmp(o.n)>=0},o.prototype.isHigh=function(){return 1===this.ucmp(o.nh)},o.prototype.bitLengthGT256=function(){return this.length>10||10===this.length&&this.words[9]>4194303},o.prototype.iuaddn=function(e){this.words[0]+=e;for(var t=0;this.words[t]>67108863&&te.length?(t=this,r=e):(t=e,r=this);for(var n=0,i=0;n>>26}for(;0!==i&&n>>26;if(this.length=t.length,0!==i)this.words[this.length++]=i;else if(t!==this)for(;n0?(t=this,r=e):(t=e,r=this);for(var i=0,o=0;i>26,this.words[i]=67108863&s}for(;0!==o&&i>26,this.words[i]=67108863&s;if(0===o&&i>>26,c=67108863&i,u=Math.max(0,o-e.length+1),f=Math.min(o,t.length-1);u<=f;u++){var l=o-u,h=e.words[l]*t.words[u]+c;a+=h/67108864|0,c=67108863&h}r.words[o]=c,i=a}return 0!==i&&(r.words[r.length++]=i),r.strip()},o.umulTo10x10=Math.imul?i.umulTo10x10:o.umulTo,o.umulnTo=function(e,t,r){if(0===t)return r.words=[0],r.length=1,r;for(var n=0,i=0;n0?(r.words[n]=i,r.length=e.length+1):r.length=e.length,r},o.prototype.umul=function(e){var t=new o;return t.words=new Array(this.length+e.length),10===this.length&&10===e.length?o.umulTo10x10(this,e,t):1===this.length?o.umulnTo(e,this.words[0],t):1===e.length?o.umulnTo(this,e.words[0],t):o.umulTo(this,e,t)},o.prototype.isplit=function(e){e.length=Math.min(this.length,9);for(var t=0;t>>22,r=n}return r>>>=22,this.words[t-10]=r,0===r&&this.length>10?this.length-=10:this.length-=9,this},o.prototype.fireduce=function(){return this.isOverflow()&&this.isub(o.n),this},o.prototype.ureduce=function(){var e=this.clone().isplit(o.tmp).umul(o.nc).iadd(o.tmp);return e.bitLengthGT256()&&(e=e.isplit(o.tmp).umul(o.nc).iadd(o.tmp)).bitLengthGT256()&&(e=e.isplit(o.tmp).umul(o.nc).iadd(o.tmp)),e.fireduce()},o.prototype.ishrn=function(e){for(var t=(1<=0;--n){var o=this.words[n];this.words[n]=i<>>e,i=o&t}return this.length>1&&0===this.words[this.length-1]&&(this.length-=1),this},o.prototype.uinvm=function(){for(var e=this.clone(),t=o.n.clone(),r=o.fromNumber(1),n=o.fromNumber(0),i=o.fromNumber(0),s=o.fromNumber(1);e.isEven()&&t.isEven();){for(var a=1,c=1;0==(e.words[0]&c)&&0==(t.words[0]&c)&&a<26;++a,c<<=1);e.ishrn(a),t.ishrn(a)}for(var u=t.clone(),f=e.clone();!e.isZero();){for(var l=0,h=1;0==(e.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(e.ishrn(l);l-- >0;)(r.isOdd()||n.isOdd())&&(r.iadd(u),n.isub(f)),r.ishrn(1),n.ishrn(1);for(var p=0,d=1;0==(t.words[0]&d)&&p<26;++p,d<<=1);if(p>0)for(t.ishrn(p);p-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(u),s.isub(f)),i.ishrn(1),s.ishrn(1);e.ucmp(t)>=0?(e.isub(t),r.isub(i),n.isub(s)):(t.isub(e),i.isub(r),s.isub(n))}if(1===i.negative){i.negative=0;var g=i.ureduce();return g.negative^=1,g.normSign().iadd(o.n)}return i.ureduce()},o.prototype.imulK=function(){this.words[this.length]=0,this.words[this.length+1]=0,this.length+=2;for(var e=0,t=0;e0?this.isub(o.p):this.strip(),this},o.prototype.redNeg=function(){return this.isZero()?o.fromNumber(0):o.p.sub(this)},o.prototype.redAdd=function(e){return this.clone().redIAdd(e)},o.prototype.redIAdd=function(e){return this.iadd(e),this.ucmp(o.p)>=0&&this.isub(o.p),this},o.prototype.redIAdd7=function(){return this.iuaddn(7),this.ucmp(o.p)>=0&&this.isub(o.p),this},o.prototype.redSub=function(e){return this.clone().redISub(e)},o.prototype.redISub=function(e){return this.isub(e),0!==this.negative&&this.iadd(o.p),this},o.prototype.redMul=function(e){return this.umul(e).redIReduce()},o.prototype.redSqr=function(){return this.umul(this).redIReduce()},o.prototype.redSqrt=function(){if(this.isZero())return this.clone();for(var e=this.redSqr(),t=e.redSqr(),r=t.redSqr().redMul(t),n=r.redMul(e),i=n.redMul(this),o=i,s=0;s<54;++s)o=o.redSqr().redSqr().redSqr().redSqr().redMul(i);for(o=o.redSqr().redSqr().redSqr().redSqr().redMul(n),s=0;s<5;++s)o=o.redSqr().redSqr().redSqr().redSqr().redMul(i);return 0===(o=(o=o.redSqr().redSqr().redSqr().redSqr().redMul(r)).redSqr().redSqr().redSqr().redSqr().redSqr().redSqr().redMul(r)).redSqr().ucmp(this)?o:null},o.prototype.redInvm=function(){for(var e,t=this.clone(),r=o.p.clone(),n=o.fromNumber(1),i=o.fromNumber(0);t.gtOne()&&r.gtOne();){for(var s=0,a=1;0==(t.words[0]&a)&&s<26;++s,a<<=1);if(s>0)for(t.ishrn(s);s-- >0;)n.isOdd()&&n.iadd(o.p),n.ishrn(1);for(var c=0,u=1;0==(r.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(r.ishrn(c);c-- >0;)i.isOdd()&&i.iadd(o.p),i.ishrn(1);t.ucmp(r)>=0?(t.isub(r),n.isub(i)):(r.isub(t),i.isub(n))}return 0!==(e=1===t.length&&1===t.words[0]?n:i).negative&&e.iadd(o.p),0!==e.negative?(e.negative=0,e.redIReduce().redNeg()):e.redIReduce()},o.prototype.getNAF=function(e){for(var t=[],r=1<>1,o=this.clone();!o.isZero();){for(var s=0,a=1;0==(o.words[0]&a)&&s<26;++s,a<<=1)t.push(0);if(0!==s)o.ishrn(s);else{var c=o.words[0]&n;if(c>=i)t.push(i-c),o.iuaddn(c-i).ishrn(1);else if(t.push(c),o.words[0]-=c,!o.isZero()){for(s=e-1;s>0;--s)t.push(0);o.ishrn(e)}}}return t},o.prototype.inspect=function(){if(this.isZero())return"0";for(var e=this.toBuffer().toString("hex"),t=0;"0"===e[t];++t);return e.slice(t)},o.n=o.fromBuffer(n.from("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141","hex")),o.nh=o.n.clone().ishrn(1),o.nc=o.fromBuffer(n.from("000000000000000000000000000000014551231950B75FC4402DA1732FC9BEBF","hex")),o.p=o.fromBuffer(n.from("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F","hex")),o.psn=o.p.sub(o.n),o.tmp=new o,o.tmp.words=new Array(10),o.fromNumber(1).words[3]=0,e.exports=o},function(e,t,r){"use strict";var n=r(285);e.exports=function(e,t){return function(r,i){if(r)return n(i,r,t);if(null!=e){var o=e;e=null,i(null,o)}else i(!0)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(r(329)),i=o(r(741));function o(e){return e&&e.__esModule?e:{default:e}}t.default=(0,n.default)(i.default),e.exports=t.default},function(e,t,r){"use strict";const n=r(345),i=C("dns4"),o=C("dns6"),s=x(C("dnsaddr"),i,o),a=x(C("ip4"),C("ip6")),c=x(k(a,C("tcp")),k(s,C("tcp"))),u=k(a,C("udp")),f=k(u,C("utp")),l=x(k(s,C("tcp")),s),h=x(k(c,C("ws")),k(l,C("ws"))),p=x(k(c,C("wss")),k(l,C("wss"))),d=x(k(c,C("http")),k(a,C("http")),k(l,C("http")),k(l)),g=x(k(c,C("https")),k(a,C("https")),k(l,C("https"))),b=x(k(h,C("p2p-webrtc-star"),C("ipfs")),k(p,C("p2p-webrtc-star"),C("ipfs"))),m=x(k(h,C("p2p-websocket-star"),C("ipfs")),k(p,C("p2p-websocket-star"),C("ipfs")),k(h,C("p2p-websocket-star")),k(p,C("p2p-websocket-star"))),y=x(k(d,C("p2p-webrtc-direct")),k(g,C("p2p-webrtc-direct"))),v=x(h,p,d,g,b,y,c,f);let w=x(k(v,C("ipfs")),b,C("ipfs"));const A=x(k(w,C("p2p-circuit"),w),k(w,C("p2p-circuit")),k(C("p2p-circuit"),w),k(v,C("p2p-circuit")),k(C("p2p-circuit"),v),C("p2p-circuit")),_=()=>x(k(A,_),A),S=_(),E=x(k(S,w,S),k(w,S),k(S,w),S,w);function k(){const e=Array.from(arguments);function t(t){return t.length{if(null===(t="function"==typeof e?e().partialMatch(t):e.partialMatch(t)))return!0}),t)}return{toString:function(){return"{ "+e.join(" ")+" }"},input:e,matches:function(e){"string"==typeof e&&(e=n(e));let r=t(e.protoNames());return null!==r&&0===r.length},partialMatch:t}}function x(){const e=Array.from(arguments);function t(t){let r=null;return e.some(e=>{const n="function"==typeof e?e().partialMatch(t):e.partialMatch(t);if(n)return r=n,!0}),r}return{toString:function(){return"{ "+e.join(" ")+" }"},input:e,matches:function(e){"string"==typeof e&&(e=n(e));const r=t(e.protoNames());return null!==r&&0===r.length},partialMatch:t}}function C(e){const t=e;return{toString:function(){return t},matches:function(e){"string"==typeof e&&(e=n(e));const r=e.protoNames();return 1===r.length&&r[0]===t},partialMatch:function(e){return 0===e.length?null:e[0]===t?e.slice(1):null}}}t.DNS=l,t.DNS4=i,t.DNS6=o,t.IP=a,t.TCP=c,t.UDP=u,t.UTP=f,t.HTTP=d,t.HTTPS=g,t.WebSockets=h,t.WebSocketsSecure=p,t.WebSocketStar=m,t.WebRTCStar=b,t.WebRTCDirect=y,t.Reliable=v,t.Circuit=S,t.IPFS=E},function(e,t,r){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(null!==e&&"object"==typeof e&&Array.isArray(e.words))return e;this.sign=!1,this.words=null,this.length=0,this.red=null,"le"!==t&&"be"!==t||(r=t,t=10),null!==e&&this._init(e||0,t||10,r||"be")}function o(e,t,r){for(var n=0,i=Math.min(e.length,r),o=t;o=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function s(e,t,r,n){for(var i=0,o=Math.min(e.length,r),s=t;s=49?a-49+10:a>=17?a-17+10:a}return i}"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26,i.prototype._init=function(e,t,n){if("number"==typeof e)return e<0&&(this.sign=!0,e=-e),void(e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3));if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.sign=!0),this.strip()},i.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3){var a=e[i]|e[i-1]<<8|e[i-2]<<16;this.words[s]|=a<>>26-o&67108863,(o+=24)>=26&&(o-=26,s++)}}else if("le"===n)for(i=0,s=0;i>>26-o&67108863,(o+=24)>=26&&(o-=26,s++)}return this.strip()},i.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6){var s=o(e,r,r+6);this.words[i]|=s<>>26-n&4194303,(n+=24)>=26&&(n-=26,i++)}if(r+6!==t){s=o(e,t,r+6);this.words[i]|=s<>>26-n&4194303}this.strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,c=Math.min(o,o-a)+r,u=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.sign=!1),this},i.prototype.inspect=function(){return(this.red?""};var a=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],u=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(e,t){if(16===(e=e||10)||"hex"===e){for(var n="",i=0,o=(t=0|t||1,0),s=0;s>>24-i&16777215)||s!==this.length-1?a[6-l.length]+l+n:l+n,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(n=o.toString(16)+n);n.length%t!=0;)n="0"+n;return this.sign&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var h=c[e],p=u[e],d=(n="",this.clone());for(d.sign=!1;0!==d.cmpn(0);){var g=d.modn(p).toString(e);n=0!==(d=d.idivn(p)).cmpn(0)?a[h-g.length]+g+n:g+n}return 0===this.cmpn(0)&&(n="0"+n),this.sign&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toArray=function(){this.strip();var e=new Array(this.byteLength());e[0]=0;for(var t=this.clone(),r=0;0!==t.cmpn(0);r++){var n=t.andln(255);t.ishrn(8),e[e.length-r-1]=n}return e},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(0===this.cmpn(0))return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.iand=function(e){var t;this.sign=this.sign&&e.sign,t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.ixor=function(e){var t,r;this.sign=this.sign||e.sign,this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);for(var n=e/26|0,i=e%26;this.length<=n;)this.words[this.length++]=0;return this.words[n]=t?this.words[n]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26}for(;0!==i&&o>>26}if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(e.sign){e.sign=!1;var t=this.iadd(e);return e.sign=!0,t._normSign()}if(this.sign)return this.sign=!1,this.iadd(e),this.sign=!0,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.sign=!1,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&t}for(;0!==o&&s>26,this.words[s]=67108863&t}if(0===o&&s>>26,o=67108863&r,s=Math.min(n,e.length-1),a=Math.max(0,n-this.length+1);a<=s;a++){var c=n-a,u=(0|this.words[c])*(0|e.words[a]),f=67108863&u;o=67108863&(f=f+o|0),i=(i=i+(u/67108864|0)|0)+(f>>>26)|0}t.words[n]=o,r=i}return 0!==r?t.words[n]=r:t.length--,t.strip()},i.prototype._bigMulTo=function(e,t){t.sign=e.sign!==this.sign,t.length=this.length+e.length;for(var r=0,n=0,i=0;i>>26)|0)>>>26,o&=67108863}t.words[i]=s,r=o,o=n}return 0!==r?t.words[i]=r:t.length--,t.strip()},i.prototype.mulTo=function(e,t){return this.length+e.length<63?this._smallMulTo(e,t):this._bigMulTo(e,t)},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.imul=function(e){if(0===this.cmpn(0)||0===e.cmpn(0))return this.words[0]=0,this.length=1,this;var t=this.length,r=e.length;this.sign=e.sign!==this.sign,this.length=this.length+e.length,this.words[this.length-1]=0;for(var n=this.length-2;n>=0;n--){for(var i=0,o=0,s=Math.min(n,r-1),a=Math.max(0,n-t+1);a<=s;a++){var c=n-a,u=this.words[c]*e.words[a],f=67108863&u;i+=u/67108864|0,o=67108863&(f+=o),i+=f>>>26}this.words[n]=o,this.words[n+1]+=i,i=0}for(i=0,c=1;c>>26}return this.strip()},i.prototype.imuln=function(e){r("number"==typeof e);for(var t=0,n=0;n>=26,t+=i/67108864|0,t+=o>>>26,this.words[n]=67108863&o}return 0!==t&&(this.words[n]=t,this.length++),this},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.mul(this)},i.prototype.ishln=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=67108863>>>26-t<<26-t;if(0!==t){for(var o=0,s=0;s>>26-t}o&&(this.words[s]=o,this.length++)}if(0!==n){for(s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(s=0;s=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<s){this.length-=s;for(u=0;u=0&&(0!==f||u>=i);u--){var l=this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip(),this},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<=0);var t=e%26,n=(e-t)/26;if(r(!this.sign,"imaskn works only with positive numbers"),0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(r("number"==typeof e),e<0)return this.iaddn(-e);if(this.sign)return this.sign=!1,this.iaddn(e),this.sign=!0,this;this.words[0]-=e;for(var t=0;t>26)-(u/67108864|0),this.words[s+n]=67108863&c}for(;s>26,this.words[s+n]=67108863&c}if(0===a)return this.strip();r(-1===a),a=0;for(s=0;s>26,this.words[s]=67108863&c}return this.sign=!0,this.strip()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),o=e,s=o.words[o.length-1];0!==(r=26-this._countBits(s))&&(o=o.shln(r),n.ishln(r),s=o.words[o.length-1]);var a,c=n.length-o.length;if("mod"!==t){(a=new i(null)).length=c+1,a.words=new Array(a.length);for(var u=0;u=0;l--){var h=67108864*n.words[o.length+l]+n.words[o.length+l-1];for(h=Math.min(h/s|0,67108863),n._ishlnsubmul(o,h,l);n.sign;)h--,n.sign=!1,n._ishlnsubmul(o,1,l),0!==n.cmpn(0)&&(n.sign=!n.sign);a&&(a.words[l]=h)}return a&&a.strip(),n.strip(),"div"!==t&&0!==r&&n.ishrn(r),{div:a||null,mod:n}},i.prototype.divmod=function(e,t){if(r(0!==e.cmpn(0)),this.sign&&!e.sign){var n,o=this.neg().divmod(e,t);return"mod"!==t&&(s=o.div.neg()),"div"!==t&&(n=0===o.mod.cmpn(0)?o.mod:e.sub(o.mod)),{div:s,mod:n}}if(!this.sign&&e.sign){var s;o=this.divmod(e.neg(),t);return"mod"!==t&&(s=o.div.neg()),{div:s,mod:o.mod}}return this.sign&&e.sign?this.neg().divmod(e.neg(),t):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t)},i.prototype.div=function(e){return this.divmod(e,"div").div},i.prototype.mod=function(e){return this.divmod(e,"mod").mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(0===t.mod.cmpn(0))return t.div;var r=t.div.sign?t.mod.isub(e):t.mod,n=e.shrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:t.div.sign?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+this.words[i])%e;return n},i.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=this.words[n]+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(!e.sign),r(0!==e.cmpn(0));var t=this,n=e.clone();t=t.sign?t.mod(e):t.clone();for(var o=new i(1),s=new i(0),a=new i(0),c=new i(1),u=0;t.isEven()&&n.isEven();)t.ishrn(1),n.ishrn(1),++u;for(var f=n.clone(),l=t.clone();0!==t.cmpn(0);){for(;t.isEven();)t.ishrn(1),o.isEven()&&s.isEven()?(o.ishrn(1),s.ishrn(1)):(o.iadd(f).ishrn(1),s.isub(l).ishrn(1));for(;n.isEven();)n.ishrn(1),a.isEven()&&c.isEven()?(a.ishrn(1),c.ishrn(1)):(a.iadd(f).ishrn(1),c.isub(l).ishrn(1));t.cmp(n)>=0?(t.isub(n),o.isub(a),s.isub(c)):(n.isub(t),a.isub(o),c.isub(s))}return{a:a,b:c,gcd:n.ishln(u)}},i.prototype._invmp=function(e){r(!e.sign),r(0!==e.cmpn(0));var t=this,n=e.clone();t=t.sign?t.mod(e):t.clone();for(var o=new i(1),s=new i(0),a=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(;t.isEven();)t.ishrn(1),o.isEven()?o.ishrn(1):o.iadd(a).ishrn(1);for(;n.isEven();)n.ishrn(1),s.isEven()?s.ishrn(1):s.iadd(a).ishrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(s)):(n.isub(t),s.isub(o))}return 0===t.cmpn(1)?o:s},i.prototype.gcd=function(e){if(0===this.cmpn(0))return e.clone();if(0===e.cmpn(0))return this.clone();var t=this.clone(),r=e.clone();t.sign=!1,r.sign=!1;for(var n=0;t.isEven()&&r.isEven();n++)t.ishrn(1),r.ishrn(1);for(;;){for(;t.isEven();)t.ishrn(1);for(;r.isEven();)r.ishrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.ishln(n)},i.prototype.invm=function(e){return this.egcd(e).a.mod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<>>26,a&=67108863,this.words[o]=a}return 0!==s&&(this.words[o]=s,this.length++),this},i.prototype.cmpn=function(e){var t,r=e<0;if(r&&(e=-e),this.sign&&!r)return-1;if(!this.sign&&r)return 1;if(e&=67108863,this.strip(),this.length>1)t=1;else{var n=this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;r--){var n=this.words[r],i=e.words[r];if(n!==i){ni&&(t=1);break}}return t},i.red=function(e){return new b(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(!this.sign,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var f={k256:null,p224:null,p192:null,p25519:null};function l(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).ishln(this.n).isub(this.p),this.tmp=this._tmp()}function h(){l.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function p(){l.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function d(){l.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function g(){l.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function b(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else this.m=e,this.prime=null}function m(e){b.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).ishln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv.sign=!0,this.minv=this.minv.mod(this.r)}l.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},l.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},l.prototype.split=function(e,t){e.ishrn(this.n,0,t)},l.prototype.imulK=function(e){return e.imul(this.k)},n(h,l),h.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}e.words[n-10]=i>>>22,e.length-=9},h.prototype.imulK=function(e){var t;e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var r=0,n=0;n>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(f[e])return f[e];var t;if("k256"===e)t=new h;else if("p224"===e)t=new p;else if("p192"===e)t=new d;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new g}return f[e]=t,t},b.prototype._verify1=function(e){r(!e.sign,"red works only with positives"),r(e.red,"red works only with red numbers")},b.prototype._verify2=function(e,t){r(!e.sign&&!t.sign,"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},b.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.mod(this.m)._forceRed(this)},b.prototype.neg=function(e){var t=e.clone();return t.sign=!t.sign,t.iadd(this.m)._forceRed(this)},b.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},b.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},b.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},b.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},b.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.shln(t))},b.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},b.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},b.prototype.isqr=function(e){return this.imul(e,e)},b.prototype.sqr=function(e){return this.mul(e,e)},b.prototype.sqrt=function(e){if(0===e.cmpn(0))return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new i(1)).ishrn(2);return h=this.pow(e,n)}for(var o=this.m.subn(1),s=0;0!==o.cmpn(0)&&0===o.andln(1);)s++,o.ishrn(1);r(0!==o.cmpn(0));var a=new i(1).toRed(this),c=a.redNeg(),u=this.m.subn(1).ishrn(1),f=this.m.bitLength();for(f=new i(2*f*f).toRed(this);0!==this.pow(f,u).cmp(c);)f.redIAdd(c);for(var l=this.pow(f,o),h=this.pow(e,o.addn(1).ishrn(1)),p=this.pow(e,o),d=s;0!==p.cmp(a);){for(var g=p,b=0;0!==g.cmp(a);b++)g=g.redSqr();r(b=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},m.prototype.mul=function(e,t){if(0===e.cmpn(0)||0===t.cmpn(0))return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).ishrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},m.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(39)(e))},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){"use strict";(function(n){const i=r(407);(t=e.exports=s).encode=function(e,t){const r=a(e);return s(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(e){return!1}},t.names=Object.freeze(Object.keys(i.names)),t.codes=Object.freeze(Object.keys(i.codes));const o=new Error("Unsupported encoding");function s(e,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 o;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";(function(r){(t=e.exports).raw=r.from("55","hex"),t.base1=r.from("01","hex"),t.base2=r.from("00","hex"),t.base8=r.from("07","hex"),t.base10=r.from("09","hex"),t.cbor=r.from("51","hex"),t.protobuf=r.from("50","hex"),t.rlp=r.from("60","hex"),t.bencode=r.from("63","hex"),t.multicodec=r.from("30","hex"),t.multihash=r.from("31","hex"),t.multiaddr=r.from("32","hex"),t.multibase=r.from("33","hex"),t.md4=r.from("d4","hex"),t.md5=r.from("d5","hex"),t.sha1=r.from("11","hex"),t["sha2-256"]=r.from("12","hex"),t["sha2-512"]=r.from("13","hex"),t["dbl-sha2-256"]=r.from("56","hex"),t["sha3-224"]=r.from("17","hex"),t["sha3-256"]=r.from("16","hex"),t["sha3-384"]=r.from("15","hex"),t["sha3-512"]=r.from("14","hex"),t["shake-128"]=r.from("18","hex"),t["shake-256"]=r.from("19","hex"),t["keccak-224"]=r.from("1a","hex"),t["keccak-256"]=r.from("1b","hex"),t["keccak-384"]=r.from("1c","hex"),t["keccak-512"]=r.from("1d","hex"),t.murmur3=r.from("22","hex"),t["blake2b-8"]=r.from("b201","hex"),t["blake2b-16"]=r.from("b202","hex"),t["blake2b-24"]=r.from("b203","hex"),t["blake2b-32"]=r.from("b204","hex"),t["blake2b-40"]=r.from("b205","hex"),t["blake2b-48"]=r.from("b206","hex"),t["blake2b-56"]=r.from("b207","hex"),t["blake2b-64"]=r.from("b208","hex"),t["blake2b-72"]=r.from("b209","hex"),t["blake2b-80"]=r.from("b20a","hex"),t["blake2b-88"]=r.from("b20b","hex"),t["blake2b-96"]=r.from("b20c","hex"),t["blake2b-104"]=r.from("b20d","hex"),t["blake2b-112"]=r.from("b20e","hex"),t["blake2b-120"]=r.from("b20f","hex"),t["blake2b-128"]=r.from("b210","hex"),t["blake2b-136"]=r.from("b211","hex"),t["blake2b-144"]=r.from("b212","hex"),t["blake2b-152"]=r.from("b213","hex"),t["blake2b-160"]=r.from("b214","hex"),t["blake2b-168"]=r.from("b215","hex"),t["blake2b-176"]=r.from("b216","hex"),t["blake2b-184"]=r.from("b217","hex"),t["blake2b-192"]=r.from("b218","hex"),t["blake2b-200"]=r.from("b219","hex"),t["blake2b-208"]=r.from("b21a","hex"),t["blake2b-216"]=r.from("b21b","hex"),t["blake2b-224"]=r.from("b21c","hex"),t["blake2b-232"]=r.from("b21d","hex"),t["blake2b-240"]=r.from("b21e","hex"),t["blake2b-248"]=r.from("b21f","hex"),t["blake2b-256"]=r.from("b220","hex"),t["blake2b-264"]=r.from("b221","hex"),t["blake2b-272"]=r.from("b222","hex"),t["blake2b-280"]=r.from("b223","hex"),t["blake2b-288"]=r.from("b224","hex"),t["blake2b-296"]=r.from("b225","hex"),t["blake2b-304"]=r.from("b226","hex"),t["blake2b-312"]=r.from("b227","hex"),t["blake2b-320"]=r.from("b228","hex"),t["blake2b-328"]=r.from("b229","hex"),t["blake2b-336"]=r.from("b22a","hex"),t["blake2b-344"]=r.from("b22b","hex"),t["blake2b-352"]=r.from("b22c","hex"),t["blake2b-360"]=r.from("b22d","hex"),t["blake2b-368"]=r.from("b22e","hex"),t["blake2b-376"]=r.from("b22f","hex"),t["blake2b-384"]=r.from("b230","hex"),t["blake2b-392"]=r.from("b231","hex"),t["blake2b-400"]=r.from("b232","hex"),t["blake2b-408"]=r.from("b233","hex"),t["blake2b-416"]=r.from("b234","hex"),t["blake2b-424"]=r.from("b235","hex"),t["blake2b-432"]=r.from("b236","hex"),t["blake2b-440"]=r.from("b237","hex"),t["blake2b-448"]=r.from("b238","hex"),t["blake2b-456"]=r.from("b239","hex"),t["blake2b-464"]=r.from("b23a","hex"),t["blake2b-472"]=r.from("b23b","hex"),t["blake2b-480"]=r.from("b23c","hex"),t["blake2b-488"]=r.from("b23d","hex"),t["blake2b-496"]=r.from("b23e","hex"),t["blake2b-504"]=r.from("b23f","hex"),t["blake2b-512"]=r.from("b240","hex"),t["blake2s-8"]=r.from("b241","hex"),t["blake2s-16"]=r.from("b242","hex"),t["blake2s-24"]=r.from("b243","hex"),t["blake2s-32"]=r.from("b244","hex"),t["blake2s-40"]=r.from("b245","hex"),t["blake2s-48"]=r.from("b246","hex"),t["blake2s-56"]=r.from("b247","hex"),t["blake2s-64"]=r.from("b248","hex"),t["blake2s-72"]=r.from("b249","hex"),t["blake2s-80"]=r.from("b24a","hex"),t["blake2s-88"]=r.from("b24b","hex"),t["blake2s-96"]=r.from("b24c","hex"),t["blake2s-104"]=r.from("b24d","hex"),t["blake2s-112"]=r.from("b24e","hex"),t["blake2s-120"]=r.from("b24f","hex"),t["blake2s-128"]=r.from("b250","hex"),t["blake2s-136"]=r.from("b251","hex"),t["blake2s-144"]=r.from("b252","hex"),t["blake2s-152"]=r.from("b253","hex"),t["blake2s-160"]=r.from("b254","hex"),t["blake2s-168"]=r.from("b255","hex"),t["blake2s-176"]=r.from("b256","hex"),t["blake2s-184"]=r.from("b257","hex"),t["blake2s-192"]=r.from("b258","hex"),t["blake2s-200"]=r.from("b259","hex"),t["blake2s-208"]=r.from("b25a","hex"),t["blake2s-216"]=r.from("b25b","hex"),t["blake2s-224"]=r.from("b25c","hex"),t["blake2s-232"]=r.from("b25d","hex"),t["blake2s-240"]=r.from("b25e","hex"),t["blake2s-248"]=r.from("b25f","hex"),t["blake2s-256"]=r.from("b260","hex"),t["skein256-8"]=r.from("b301","hex"),t["skein256-16"]=r.from("b302","hex"),t["skein256-24"]=r.from("b303","hex"),t["skein256-32"]=r.from("b304","hex"),t["skein256-40"]=r.from("b305","hex"),t["skein256-48"]=r.from("b306","hex"),t["skein256-56"]=r.from("b307","hex"),t["skein256-64"]=r.from("b308","hex"),t["skein256-72"]=r.from("b309","hex"),t["skein256-80"]=r.from("b30a","hex"),t["skein256-88"]=r.from("b30b","hex"),t["skein256-96"]=r.from("b30c","hex"),t["skein256-104"]=r.from("b30d","hex"),t["skein256-112"]=r.from("b30e","hex"),t["skein256-120"]=r.from("b30f","hex"),t["skein256-128"]=r.from("b310","hex"),t["skein256-136"]=r.from("b311","hex"),t["skein256-144"]=r.from("b312","hex"),t["skein256-152"]=r.from("b313","hex"),t["skein256-160"]=r.from("b314","hex"),t["skein256-168"]=r.from("b315","hex"),t["skein256-176"]=r.from("b316","hex"),t["skein256-184"]=r.from("b317","hex"),t["skein256-192"]=r.from("b318","hex"),t["skein256-200"]=r.from("b319","hex"),t["skein256-208"]=r.from("b31a","hex"),t["skein256-216"]=r.from("b31b","hex"),t["skein256-224"]=r.from("b31c","hex"),t["skein256-232"]=r.from("b31d","hex"),t["skein256-240"]=r.from("b31e","hex"),t["skein256-248"]=r.from("b31f","hex"),t["skein256-256"]=r.from("b320","hex"),t["skein512-8"]=r.from("b321","hex"),t["skein512-16"]=r.from("b322","hex"),t["skein512-24"]=r.from("b323","hex"),t["skein512-32"]=r.from("b324","hex"),t["skein512-40"]=r.from("b325","hex"),t["skein512-48"]=r.from("b326","hex"),t["skein512-56"]=r.from("b327","hex"),t["skein512-64"]=r.from("b328","hex"),t["skein512-72"]=r.from("b329","hex"),t["skein512-80"]=r.from("b32a","hex"),t["skein512-88"]=r.from("b32b","hex"),t["skein512-96"]=r.from("b32c","hex"),t["skein512-104"]=r.from("b32d","hex"),t["skein512-112"]=r.from("b32e","hex"),t["skein512-120"]=r.from("b32f","hex"),t["skein512-128"]=r.from("b330","hex"),t["skein512-136"]=r.from("b331","hex"),t["skein512-144"]=r.from("b332","hex"),t["skein512-152"]=r.from("b333","hex"),t["skein512-160"]=r.from("b334","hex"),t["skein512-168"]=r.from("b335","hex"),t["skein512-176"]=r.from("b336","hex"),t["skein512-184"]=r.from("b337","hex"),t["skein512-192"]=r.from("b338","hex"),t["skein512-200"]=r.from("b339","hex"),t["skein512-208"]=r.from("b33a","hex"),t["skein512-216"]=r.from("b33b","hex"),t["skein512-224"]=r.from("b33c","hex"),t["skein512-232"]=r.from("b33d","hex"),t["skein512-240"]=r.from("b33e","hex"),t["skein512-248"]=r.from("b33f","hex"),t["skein512-256"]=r.from("b340","hex"),t["skein512-264"]=r.from("b341","hex"),t["skein512-272"]=r.from("b342","hex"),t["skein512-280"]=r.from("b343","hex"),t["skein512-288"]=r.from("b344","hex"),t["skein512-296"]=r.from("b345","hex"),t["skein512-304"]=r.from("b346","hex"),t["skein512-312"]=r.from("b347","hex"),t["skein512-320"]=r.from("b348","hex"),t["skein512-328"]=r.from("b349","hex"),t["skein512-336"]=r.from("b34a","hex"),t["skein512-344"]=r.from("b34b","hex"),t["skein512-352"]=r.from("b34c","hex"),t["skein512-360"]=r.from("b34d","hex"),t["skein512-368"]=r.from("b34e","hex"),t["skein512-376"]=r.from("b34f","hex"),t["skein512-384"]=r.from("b350","hex"),t["skein512-392"]=r.from("b351","hex"),t["skein512-400"]=r.from("b352","hex"),t["skein512-408"]=r.from("b353","hex"),t["skein512-416"]=r.from("b354","hex"),t["skein512-424"]=r.from("b355","hex"),t["skein512-432"]=r.from("b356","hex"),t["skein512-440"]=r.from("b357","hex"),t["skein512-448"]=r.from("b358","hex"),t["skein512-456"]=r.from("b359","hex"),t["skein512-464"]=r.from("b35a","hex"),t["skein512-472"]=r.from("b35b","hex"),t["skein512-480"]=r.from("b35c","hex"),t["skein512-488"]=r.from("b35d","hex"),t["skein512-496"]=r.from("b35e","hex"),t["skein512-504"]=r.from("b35f","hex"),t["skein512-512"]=r.from("b360","hex"),t["skein1024-8"]=r.from("b361","hex"),t["skein1024-16"]=r.from("b362","hex"),t["skein1024-24"]=r.from("b363","hex"),t["skein1024-32"]=r.from("b364","hex"),t["skein1024-40"]=r.from("b365","hex"),t["skein1024-48"]=r.from("b366","hex"),t["skein1024-56"]=r.from("b367","hex"),t["skein1024-64"]=r.from("b368","hex"),t["skein1024-72"]=r.from("b369","hex"),t["skein1024-80"]=r.from("b36a","hex"),t["skein1024-88"]=r.from("b36b","hex"),t["skein1024-96"]=r.from("b36c","hex"),t["skein1024-104"]=r.from("b36d","hex"),t["skein1024-112"]=r.from("b36e","hex"),t["skein1024-120"]=r.from("b36f","hex"),t["skein1024-128"]=r.from("b370","hex"),t["skein1024-136"]=r.from("b371","hex"),t["skein1024-144"]=r.from("b372","hex"),t["skein1024-152"]=r.from("b373","hex"),t["skein1024-160"]=r.from("b374","hex"),t["skein1024-168"]=r.from("b375","hex"),t["skein1024-176"]=r.from("b376","hex"),t["skein1024-184"]=r.from("b377","hex"),t["skein1024-192"]=r.from("b378","hex"),t["skein1024-200"]=r.from("b379","hex"),t["skein1024-208"]=r.from("b37a","hex"),t["skein1024-216"]=r.from("b37b","hex"),t["skein1024-224"]=r.from("b37c","hex"),t["skein1024-232"]=r.from("b37d","hex"),t["skein1024-240"]=r.from("b37e","hex"),t["skein1024-248"]=r.from("b37f","hex"),t["skein1024-256"]=r.from("b380","hex"),t["skein1024-264"]=r.from("b381","hex"),t["skein1024-272"]=r.from("b382","hex"),t["skein1024-280"]=r.from("b383","hex"),t["skein1024-288"]=r.from("b384","hex"),t["skein1024-296"]=r.from("b385","hex"),t["skein1024-304"]=r.from("b386","hex"),t["skein1024-312"]=r.from("b387","hex"),t["skein1024-320"]=r.from("b388","hex"),t["skein1024-328"]=r.from("b389","hex"),t["skein1024-336"]=r.from("b38a","hex"),t["skein1024-344"]=r.from("b38b","hex"),t["skein1024-352"]=r.from("b38c","hex"),t["skein1024-360"]=r.from("b38d","hex"),t["skein1024-368"]=r.from("b38e","hex"),t["skein1024-376"]=r.from("b38f","hex"),t["skein1024-384"]=r.from("b390","hex"),t["skein1024-392"]=r.from("b391","hex"),t["skein1024-400"]=r.from("b392","hex"),t["skein1024-408"]=r.from("b393","hex"),t["skein1024-416"]=r.from("b394","hex"),t["skein1024-424"]=r.from("b395","hex"),t["skein1024-432"]=r.from("b396","hex"),t["skein1024-440"]=r.from("b397","hex"),t["skein1024-448"]=r.from("b398","hex"),t["skein1024-456"]=r.from("b399","hex"),t["skein1024-464"]=r.from("b39a","hex"),t["skein1024-472"]=r.from("b39b","hex"),t["skein1024-480"]=r.from("b39c","hex"),t["skein1024-488"]=r.from("b39d","hex"),t["skein1024-496"]=r.from("b39e","hex"),t["skein1024-504"]=r.from("b39f","hex"),t["skein1024-512"]=r.from("b3a0","hex"),t["skein1024-520"]=r.from("b3a1","hex"),t["skein1024-528"]=r.from("b3a2","hex"),t["skein1024-536"]=r.from("b3a3","hex"),t["skein1024-544"]=r.from("b3a4","hex"),t["skein1024-552"]=r.from("b3a5","hex"),t["skein1024-560"]=r.from("b3a6","hex"),t["skein1024-568"]=r.from("b3a7","hex"),t["skein1024-576"]=r.from("b3a8","hex"),t["skein1024-584"]=r.from("b3a9","hex"),t["skein1024-592"]=r.from("b3aa","hex"),t["skein1024-600"]=r.from("b3ab","hex"),t["skein1024-608"]=r.from("b3ac","hex"),t["skein1024-616"]=r.from("b3ad","hex"),t["skein1024-624"]=r.from("b3ae","hex"),t["skein1024-632"]=r.from("b3af","hex"),t["skein1024-640"]=r.from("b3b0","hex"),t["skein1024-648"]=r.from("b3b1","hex"),t["skein1024-656"]=r.from("b3b2","hex"),t["skein1024-664"]=r.from("b3b3","hex"),t["skein1024-672"]=r.from("b3b4","hex"),t["skein1024-680"]=r.from("b3b5","hex"),t["skein1024-688"]=r.from("b3b6","hex"),t["skein1024-696"]=r.from("b3b7","hex"),t["skein1024-704"]=r.from("b3b8","hex"),t["skein1024-712"]=r.from("b3b9","hex"),t["skein1024-720"]=r.from("b3ba","hex"),t["skein1024-728"]=r.from("b3bb","hex"),t["skein1024-736"]=r.from("b3bc","hex"),t["skein1024-744"]=r.from("b3bd","hex"),t["skein1024-752"]=r.from("b3be","hex"),t["skein1024-760"]=r.from("b3bf","hex"),t["skein1024-768"]=r.from("b3c0","hex"),t["skein1024-776"]=r.from("b3c1","hex"),t["skein1024-784"]=r.from("b3c2","hex"),t["skein1024-792"]=r.from("b3c3","hex"),t["skein1024-800"]=r.from("b3c4","hex"),t["skein1024-808"]=r.from("b3c5","hex"),t["skein1024-816"]=r.from("b3c6","hex"),t["skein1024-824"]=r.from("b3c7","hex"),t["skein1024-832"]=r.from("b3c8","hex"),t["skein1024-840"]=r.from("b3c9","hex"),t["skein1024-848"]=r.from("b3ca","hex"),t["skein1024-856"]=r.from("b3cb","hex"),t["skein1024-864"]=r.from("b3cc","hex"),t["skein1024-872"]=r.from("b3cd","hex"),t["skein1024-880"]=r.from("b3ce","hex"),t["skein1024-888"]=r.from("b3cf","hex"),t["skein1024-896"]=r.from("b3d0","hex"),t["skein1024-904"]=r.from("b3d1","hex"),t["skein1024-912"]=r.from("b3d2","hex"),t["skein1024-920"]=r.from("b3d3","hex"),t["skein1024-928"]=r.from("b3d4","hex"),t["skein1024-936"]=r.from("b3d5","hex"),t["skein1024-944"]=r.from("b3d6","hex"),t["skein1024-952"]=r.from("b3d7","hex"),t["skein1024-960"]=r.from("b3d8","hex"),t["skein1024-968"]=r.from("b3d9","hex"),t["skein1024-976"]=r.from("b3da","hex"),t["skein1024-984"]=r.from("b3db","hex"),t["skein1024-992"]=r.from("b3dc","hex"),t["skein1024-1000"]=r.from("b3dd","hex"),t["skein1024-1008"]=r.from("b3de","hex"),t["skein1024-1016"]=r.from("b3df","hex"),t["skein1024-1024"]=r.from("b3e0","hex"),t.ip4=r.from("04","hex"),t.ip6=r.from("29","hex"),t.tcp=r.from("06","hex"),t.udp=r.from("0111","hex"),t.dccp=r.from("21","hex"),t.sctp=r.from("84","hex"),t.udt=r.from("012d","hex"),t.utp=r.from("012e","hex"),t.ipfs=r.from("01a5","hex"),t.http=r.from("01e0","hex"),t.https=r.from("01bb","hex"),t.quic=r.from("01cc","hex"),t.ws=r.from("01dd","hex"),t.onion=r.from("01bc","hex"),t["p2p-circuit"]=r.from("0122","hex"),t["git-raw"]=r.from("78","hex"),t["dag-pb"]=r.from("70","hex"),t["dag-cbor"]=r.from("71","hex"),t["git-raw"]=r.from("78","hex"),t["eth-block"]=r.from("90","hex"),t["eth-block-list"]=r.from("91","hex"),t["eth-tx-trie"]=r.from("92","hex"),t["eth-tx"]=r.from("93","hex"),t["eth-tx-receipt-trie"]=r.from("94","hex"),t["eth-tx-receipt"]=r.from("95","hex"),t["eth-state-trie"]=r.from("96","hex"),t["eth-account-snapshot"]=r.from("97","hex"),t["eth-storage-trie"]=r.from("98","hex"),t["bitcoin-block"]=r.from("b0","hex"),t["bitcoin-tx"]=r.from("b1","hex"),t["zcash-block"]=r.from("c0","hex"),t["zcash-tx"]=r.from("c1","hex"),t["stellar-block"]=r.from("d0","hex"),t["stellar-tx"]=r.from("d1","hex"),t["torrent-info"]=r.from("7b","hex"),t["torrent-file"]=r.from("7c","hex"),t["ed25519-pub"]=r.from("ed","hex")}).call(this,r(0).Buffer)},function(e,t,r){(function(e,n){var i=/%[sdj%]/g;t.format=function(e){if(!m(e)){for(var t=[],r=0;r=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),c=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&t._extend(n,r),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),f(n,e,n.depth)}function c(e,t){var r=a.styles[t];return r?"["+a.colors[r][0]+"m"+e+"["+a.colors[r][1]+"m":e}function u(e,t){return e}function f(e,r,n){if(e.customInspect&&r&&S(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return m(i)||(i=f(e,i,n)),i}var o=function(e,t){if(y(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(b(t))return e.stylize(""+t,"number");if(d(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,r);if(o)return o;var s=Object.keys(r),a=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),_(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(S(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(v(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(A(r))return e.stylize(Date.prototype.toString.call(r),"date");if(_(r))return l(r)}var u,w="",E=!1,k=["{","}"];(p(r)&&(E=!0,k=["[","]"]),S(r))&&(w=" [Function"+(r.name?": "+r.name:"")+"]");return v(r)&&(w=" "+RegExp.prototype.toString.call(r)),A(r)&&(w=" "+Date.prototype.toUTCString.call(r)),_(r)&&(w=" "+l(r)),0!==s.length||E&&0!=r.length?n<0?v(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),u=E?function(e,t,r,n,i){for(var o=[],s=0,a=t.length;s=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(u,w,k)):k[0]+w+k[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,i,o){var s,a,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),C(n,i)||(s="["+i+"]"),a||(e.seen.indexOf(c.value)<0?(a=g(r)?f(e,c.value,null):f(e,c.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n")):a=e.stylize("[Circular]","special")),y(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function p(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function g(e){return null===e}function b(e){return"number"==typeof e}function m(e){return"string"==typeof e}function y(e){return void 0===e}function v(e){return w(e)&&"[object RegExp]"===E(e)}function w(e){return"object"==typeof e&&null!==e}function A(e){return w(e)&&"[object Date]"===E(e)}function _(e){return w(e)&&("[object Error]"===E(e)||e instanceof Error)}function S(e){return"function"==typeof e}function E(e){return Object.prototype.toString.call(e)}function k(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(y(o)&&(o=n.env.NODE_DEBUG||""),e=e.toUpperCase(),!s[e])if(new RegExp("\\b"+e+"\\b","i").test(o)){var r=n.pid;s[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else s[e]=function(){};return s[e]},t.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=d,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=b,t.isString=m,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=y,t.isRegExp=v,t.isObject=w,t.isDate=A,t.isError=_,t.isFunction=S,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(428);var x=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(e=new Date,r=[k(e.getHours()),k(e.getMinutes()),k(e.getSeconds())].join(":"),[e.getDate(),x[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(22),t._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,r(12),r(6))},function(e,t,r){"use strict";var n=r(4),i=r(168),o=r(270),s=r(271),a=r(79);function c(e){a.call(this,"digest"),this._hash=e}n(c,a),c.prototype._update=function(e){this._hash.update(e)},c.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new c(s(e))}},function(e,t,r){(function(n){r(37);var i=r(324);function o(e,t){function r(){i(),t()}function n(e){i(),t(e)}function i(){e.removeListener("close",r),e.removeListener("error",n)}e.on("close",r),e.on("error",n)}function o(e){e.destroy?e.destroy():console.error("warning, stream-to-pull-stream: \nthe wrapped node-stream does not implement `destroy`, \nthis may cause resource leaks.")}function s(e,t,r){var s,a,c=!1;function u(){a||(a=!0,r&&r(!0===s?null:s))}function f(){c||(c=!0,h(),s?u():e(s=!0,u))}function l(t){h(),s||e(s=t,u)}function h(){t.on("finish",f),t.removeListener("close",f),t.removeListener("error",l)}t.on("close",f),t.on("finish",f),t.on("error",l),n.nextTick(function(){i(function(r){e(null,function(e,n){if(s=s||e,!0===e)return t._isStdio?u():t.end();if(s=s||e)return o(t),u();t._isStdio?t.write(n,function(){r()}):!1===t.write(n)?t.once("drain",r):r()})})})}function a(e){var t,r=[],n=[],i=!1;function s(){for(;(r.length||t)&&n.length;)n.shift()(r.length?null:t,r.shift());!r.length&&i&&(i=!1,e.resume())}return e.on("data",function(t){r.push(t),s(),r.length&&e.pause&&(i=!0,e.pause())}),e.on("end",function(){t=!0,s()}),e.on("close",function(){t=!0,s()}),e.on("error",function(e){t=e,s()}),function(r,i){if(!i)throw new Error("*must* provide cb");if(r){function a(){for(;n.length;)n.shift()(r);i(r)}if(t)return a();e.once("close",a),o(e)}else n.push(i),s()}}var c=a,u=function(e,t){return function(r){return s(r,e,t)}},f=function(e){return a(e)};(t=e.exports=function(e,t){return e.writable&&e.write?e.readable?function(r){return s(r,e,t),a(e)}:u(e,t):f(e)}).sink=u,t.source=f,t.read=c,t.read1=a,t.read2=function(e){var t,r=!1,n=!1;function i(){var r=e.read();if(null!==r&&t){var n=t;t=null,n(null,r)}}return e.on("readable",function(){n=!0,t&&i()}).on("end",function(){r=!0,t&&t(r)}).on("error",function(e){r=e,t&&t(r)}),function(e,o){t=o,r?o(r):n&&i()}},t.duplex=function(e,t){return{source:f(e),sink:u(e,t)}},t.transform=function(e){return function(t){var r=f(e);return u(e)(t),r}}}).call(this,r(6))},function(e,t,r){var n=r(326),i=r(732);e.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},function(e,t,r){"use strict";(function(t){const n=r(14),i=r(1073),o=r(34).utils.asyncFilter,s=r(34).utils.asyncSort,a=r(34).Key,c=r(34).Errors,u=r(1086);e.exports=class{constructor(e,t){let n;t&&t.db?(n=t.db,delete t.db):n=r(1091),this.db=i(u(n(e),{valueEncoding:"binary"}),Object.assign({},t,{compression:!1}),e=>{if(e)throw e})}open(e){this.db.open(t=>{if(t)return e(c.dbOpenFailedError(t));e()})}put(e,t,r){this.db.put(e.toString(),t,e=>{if(e)return r(c.dbWriteFailedError(e));r()})}get(e,t){this.db.get(e.toString(),(e,r)=>{if(e)return t(c.notFoundError(e));t(null,r)})}has(e,t){this.db.get(e.toString(),(e,r)=>{if(e)return e.notFound?void t(null,!1):void t(e);t(null,!0)})}delete(e,t){this.db.del(e.toString(),e=>{if(e)return t(c.dbDeleteFailedError(e));t()})}close(e){this.db.close(e)}batch(){const e=[];return{put:(t,r)=>{e.push({type:"put",key:t.toString(),value:r})},delete:t=>{e.push({type:"del",key:t.toString()})},commit:t=>{this.db.batch(e,t)}}}query(e){let r=!0;null!=e.keysOnly&&(r=!e.keysOnly);const i=this.db.db.iterator({keys:!0,values:r,keyAsBuffer:!0});let c=[(e,n)=>{if(e)return i.end(t=>{n(t||e)});i.next((e,o,s)=>{if(e)return n(e);if(null==e&&null==o&&null==s)return i.end(e=>{n(e||!0)});const c={key:new a(o,!1)};r&&(c.value=t.from(s)),n(null,c)})}],u=[];if(null!=e.prefix){const t=e.prefix;u.push((e,r)=>r(null,e.key.toString().startsWith(t)))}if(null!=e.filters&&(u=u.concat(e.filters)),c=c.concat(u.map(e=>o(e))),null!=e.orders&&(c=c.concat(e.orders.map(e=>s(e)))),null!=e.offset){let t=0;c.push(n.filter(()=>t++>=e.offset))}return null!=e.limit&&c.push(n.take(e.limit)),n.apply(null,c)}}}).call(this,r(0).Buffer)},function(e,t,r){const n=r(150);function i(e){return n("rmd160").update(e).digest()}function o(e){return n("sha256").update(e).digest()}e.exports={hash160:function(e){return i(o(e))},hash256:function(e){return o(o(e))},ripemd160:i,sha1:function(e){return n("sha1").update(e).digest()},sha256:o}},function(e,t,r){var n=r(27).Buffer,i=r(66).Transform,o=r(52).StringDecoder;function s(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(22)(s,i),s.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},s.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},s.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},s.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=s},function(e,t,r){"use strict";(function(t){var n=r(30),i=r(32),o=r(40),s=r(69),a=function e(r){if(!(this instanceof e))return new e(r);if(!n.isUndefined(r))if(t.isBuffer(r))this.set({buf:r});else if(n.isString(r))this.set({buf:new t(r,"hex")});else{if(!n.isObject(r))throw new TypeError("Unrecognized argument for BufferReader");var i=r;this.set(i)}};a.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this.pos=e.pos||this.pos||0,this},a.prototype.eof=function(){return this.pos>=this.buf.length},a.prototype.finished=a.prototype.eof,a.prototype.read=function(e){i.checkArgument(!n.isUndefined(e),"Must specify a length");var t=this.buf.slice(this.pos,this.pos+e);return this.pos=this.pos+e,t},a.prototype.readAll=function(){var e=this.buf.slice(this.pos,this.buf.length);return this.pos=this.buf.length,e},a.prototype.readUInt8=function(){var e=this.buf.readUInt8(this.pos);return this.pos=this.pos+1,e},a.prototype.readUInt16BE=function(){var e=this.buf.readUInt16BE(this.pos);return this.pos=this.pos+2,e},a.prototype.readUInt16LE=function(){var e=this.buf.readUInt16LE(this.pos);return this.pos=this.pos+2,e},a.prototype.readUInt32BE=function(){var e=this.buf.readUInt32BE(this.pos);return this.pos=this.pos+4,e},a.prototype.readUInt32LE=function(){var e=this.buf.readUInt32LE(this.pos);return this.pos=this.pos+4,e},a.prototype.readUInt64BEBN=function(){var e=this.buf.slice(this.pos,this.pos+8),t=s.fromBuffer(e);return this.pos=this.pos+8,t},a.prototype.readUInt64LEBN=function(){var e,t=this.buf.readUInt32LE(this.pos),r=4294967296*this.buf.readUInt32LE(this.pos+4)+t;if(r<=9007199254740991)e=new s(r);else{var n=Array.prototype.slice.call(this.buf,this.pos,this.pos+8);e=new s(n,10,"le")}return this.pos=this.pos+8,e},a.prototype.readVarintNum=function(){var e=this.readUInt8();switch(e){case 253:return this.readUInt16LE();case 254:return this.readUInt32LE();case 255:var t=this.readUInt64LEBN().toNumber();if(t<=Math.pow(2,53))return t;throw new Error("number too large to retain precision - use readVarintBN");default:return e}},a.prototype.readVarLengthBuffer=function(){var e=this.readVarintNum(),t=this.read(e);return i.checkState(t.length===e,"Invalid length while reading varlength buffer. Expected to read: "+e+" and read "+t.length),t},a.prototype.readVarintBuf=function(){switch(this.buf.readUInt8(this.pos)){case 253:return this.read(3);case 254:return this.read(5);case 255:return this.read(9);default:return this.read(1)}},a.prototype.readVarintBN=function(){var e=this.readUInt8();switch(e){case 253:return new s(this.readUInt16LE());case 254:return new s(this.readUInt32LE());case 255:return this.readUInt64LEBN();default:return new s(e)}},a.prototype.reverse=function(){for(var e=new t(this.buf.length),r=0;r=m.outputs.length)return new t("0000000000000000000000000000000000000000000000000000000000000001","hex");for(m.outputs.length=h+1,d=0;d9007199254740991?"transaction txout satoshis greater than max safe integer":this._satoshis!==this._satoshisBN.toNumber()?"transaction txout satoshis has corrupted value":this._satoshis<0&&"transaction txout negative"},h.prototype.toObject=h.prototype.toJSON=function(){var e={satoshis:this.satoshis};return e.script=this._scriptBuffer.toString("hex"),e},h.fromObject=function(e){return new h(e)},h.prototype.setScriptFromBuffer=function(e){this._scriptBuffer=e;try{this._script=u.fromBuffer(this._scriptBuffer),this._script._isOutput=!0}catch(e){if(!(e instanceof l.Script.InvalidBuffer))throw e;this._script=null}},h.prototype.setScript=function(e){if(e instanceof u)this._scriptBuffer=e.toBuffer(),this._script=e,this._script._isOutput=!0;else if(n.isString(e))this._script=u.fromString(e),this._scriptBuffer=this._script.toBuffer(),this._script._isOutput=!0;else{if(!s.isBuffer(e))throw new TypeError("Invalid argument type: script");this.setScriptFromBuffer(e)}return this},h.prototype.inspect=function(){var e;return e=this.script?this.script.inspect():this._scriptBuffer.toString("hex"),""},h.fromBufferReader=function(e){var t={};t.satoshis=e.readUInt64LEBN();var r=e.readVarintNum();return t.script=0!==r?e.read(r):new o.Buffer([]),new h(t)},h.prototype.toBufferWriter=function(e){e||(e=new c),e.writeUInt64LEBN(this._satoshisBN);var t=this._scriptBuffer;return e.writeVarintNum(t.length),e.write(t),e},e.exports=h},function(e,t){t.BITS=32,t.GROUPS=4,t.RE_ADDRESS=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g,t.RE_SUBNET_STRING=/\/\d{1,2}$/},function(e,t){t.BITS=128,t.GROUPS=8,t.SCOPES={0:"Reserved",1:"Interface local",2:"Link local",4:"Admin local",5:"Site local",8:"Organization local",14:"Global",15:"Reserved"},t.TYPES={"ff01::1/128":"Multicast (All nodes on this interface)","ff01::2/128":"Multicast (All routers on this interface)","ff02::1/128":"Multicast (All nodes on this link)","ff02::2/128":"Multicast (All routers on this link)","ff05::2/128":"Multicast (All routers in this site)","ff02::5/128":"Multicast (OSPFv3 AllSPF routers)","ff02::6/128":"Multicast (OSPFv3 AllDR routers)","ff02::9/128":"Multicast (RIP routers)","ff02::a/128":"Multicast (EIGRP routers)","ff02::d/128":"Multicast (PIM routers)","ff02::16/128":"Multicast (MLDv2 reports)","ff01::fb/128":"Multicast (mDNSv6)","ff02::fb/128":"Multicast (mDNSv6)","ff05::fb/128":"Multicast (mDNSv6)","ff02::1:2/128":"Multicast (All DHCP servers and relay agents on this link)","ff05::1:2/128":"Multicast (All DHCP servers and relay agents in this site)","ff02::1:3/128":"Multicast (All DHCP servers on this link)","ff05::1:3/128":"Multicast (All DHCP servers in this site)","::/128":"Unspecified","::1/128":"Loopback","ff00::/8":"Multicast","fe80::/10":"Link-local unicast"},t.RE_BAD_CHARACTERS=/([^0-9a-f:\/%])/gi,t.RE_BAD_ADDRESS=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi,t.RE_SUBNET_STRING=/\/\d{1,3}(?=%|$)/,t.RE_ZONE_STRING=/%.*$/,t.RE_URL=new RegExp(/^\[{0,1}([0-9a-f:]+)\]{0,1}/),t.RE_URL_WITH_PORT=new RegExp(/\[([0-9a-f:]+)\]:([0-9]{1,5})/)},function(e,t,r){"use strict";const n=r(15);function i(e){if("number"==typeof e){if(i.codes[e])return i.codes[e];throw new Error("no protocol with code: "+e)}if("string"==typeof e||e instanceof String){if(i.names[e])return i.names[e];throw new Error("no protocol with name: "+e)}throw new Error("invalid protocol id type: "+e)}function o(e,t,r,n){return{code:e,size:t,name:r,resolvable:Boolean(n)}}i.lengthPrefixedVarSize=-1,i.V=-1,i.table=[[4,32,"ip4"],[6,16,"tcp"],[17,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[54,-1,"dns4","resolvable"],[55,-1,"dns6","resolvable"],[56,-1,"dnsaddr","resolvable"],[132,16,"sctp"],[302,0,"utp"],[421,i.lengthPrefixedVarSize,"ipfs"],[480,0,"http"],[443,0,"https"],[460,0,"quic"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[290,0,"p2p-circuit"]],i.names={},i.codes={},n(i.table,function(e){const t=o.apply(null,e);i.codes[t.code]=t,i.names[t.name]=t}),i.object=o,e.exports=i},function(e,t,r){"use strict";(function(n){const i=r(16),o=r(19)(r(448)),s=r(228),a=r(76),c=r(131),u=r(63),f=r(10);function l(e,t){let r;!c.isDAGNode(e)&&e.links&&(e.links=e.links.map(e=>a.isDAGLink(e)?e:a.util.createDagLinkFromB58EncodedHash(e)));try{r=o.PBNode.encode(function(e){const t={};e.data&&e.data.length>0?t.Data=e.data:t.Data=null;e.links&&e.links.length>0?t.Links=e.links.map(e=>({Hash:e.multihash,Name:e.name,Tsize:e.size})):t.Links=null;return t}(e))}catch(e){return t(e)}t(null,r)}(t=e.exports).serialize=l,t.deserialize=function(e,t){const r=o.PBNode.decode(e),i=r.Links.map(e=>new a(e.Name,e.Tsize,e.Hash)),s=null==r.Data?n.alloc(0):n.from(r.Data);c.create(s,i,t)},t.cid=function(e,t,r){"function"==typeof t&&(r=t,t={});const n=(t=t||{}).hashAlg||s.defaultHashAlg;let o=t.version;void 0===o&&(o="sha2-256"===n?0:1),f([t=>l(e,t),(e,t)=>u(e,n,t),(e,t)=>t(null,new i(o,s.multicodec,e))],r)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";t.defined=function(e){return null!=e&&("number"!=typeof e||!isNaN(e))}},function(e,t,r){"use strict";e.exports=function(e,t){return e.then(e=>{t(null,e)},e=>{t(e)})}},function(e,t,r){"use strict";e.exports=(()=>{if("undefined"!=typeof self&&(r(77)(self),self.crypto))return self.crypto;throw new Error("Please use an environment with crypto support")})},function(e,t,r){(t=e.exports=r(236)).Stream=t,t.Readable=t,t.Writable=r(167),t.Duplex=r(80),t.Transform=r(239),t.PassThrough=r(472)},function(e,t,r){"use strict";(function(t,n,i){var o=r(137);function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=y;var a,c=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?n:o.nextTick;y.WritableState=m;var u=r(108);u.inherits=r(22);var f={deprecate:r(471)},l=r(237),h=r(27).Buffer,p=i.Uint8Array||function(){};var d,g=r(238);function b(){}function m(e,t){a=a||r(80),e=e||{};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,u=e.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(u||0===u)?u:f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(o.nextTick(i,n),o.nextTick(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),E(e,t))}(e,r,n,t,i);else{var s=_(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||A(e,r),n?c(w,e,r,s,i):w(e,r,s,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function y(e){if(a=a||r(80),!(d.call(y,this)||this instanceof a))return new y(e);this._writableState=new m(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function v(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function A(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,c=!0;r;)i[a]=r,r.isBuf||(c=!1),r=r.next,a+=1;i.allBuffers=c,v(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,l=r.callback;if(v(e,t,!1,t.objectMode?1:u.length,u,f,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function _(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)})}function E(e,t){var r=_(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(y,l),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===y&&(e&&e._writableState instanceof m)}})):d=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,r){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=e,h.isBuffer(n)||n instanceof p);return a&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=b),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),o.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),o.nextTick(n,s),i=!1),i}(this,i,e,r))&&(i.pendingcb++,s=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,r));return t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var c=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?o.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=g.destroy,y.prototype._undestroy=g.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(6),r(35).setImmediate,r(12))},function(e,t,r){"use strict";var n=r(4),i=r(242),o=r(3).Buffer,s=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function c(e,t){return e<>>32-t}function u(e,t,r,n,i,o,s){return c(e+(t&r|~t&n)+i+o|0,s)+t|0}function f(e,t,r,n,i,o,s){return c(e+(t&n|r&~n)+i+o|0,s)+t|0}function l(e,t,r,n,i,o,s){return c(e+(t^r^n)+i+o|0,s)+t|0}function h(e,t,r,n,i,o,s){return c(e+(r^(t|~n))+i+o|0,s)+t|0}n(a,i),a.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=u(r,n,i,o,e[0],3614090360,7),o=u(o,r,n,i,e[1],3905402710,12),i=u(i,o,r,n,e[2],606105819,17),n=u(n,i,o,r,e[3],3250441966,22),r=u(r,n,i,o,e[4],4118548399,7),o=u(o,r,n,i,e[5],1200080426,12),i=u(i,o,r,n,e[6],2821735955,17),n=u(n,i,o,r,e[7],4249261313,22),r=u(r,n,i,o,e[8],1770035416,7),o=u(o,r,n,i,e[9],2336552879,12),i=u(i,o,r,n,e[10],4294925233,17),n=u(n,i,o,r,e[11],2304563134,22),r=u(r,n,i,o,e[12],1804603682,7),o=u(o,r,n,i,e[13],4254626195,12),i=u(i,o,r,n,e[14],2792965006,17),r=f(r,n=u(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=f(o,r,n,i,e[6],3225465664,9),i=f(i,o,r,n,e[11],643717713,14),n=f(n,i,o,r,e[0],3921069994,20),r=f(r,n,i,o,e[5],3593408605,5),o=f(o,r,n,i,e[10],38016083,9),i=f(i,o,r,n,e[15],3634488961,14),n=f(n,i,o,r,e[4],3889429448,20),r=f(r,n,i,o,e[9],568446438,5),o=f(o,r,n,i,e[14],3275163606,9),i=f(i,o,r,n,e[3],4107603335,14),n=f(n,i,o,r,e[8],1163531501,20),r=f(r,n,i,o,e[13],2850285829,5),o=f(o,r,n,i,e[2],4243563512,9),i=f(i,o,r,n,e[7],1735328473,14),r=l(r,n=f(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=l(o,r,n,i,e[8],2272392833,11),i=l(i,o,r,n,e[11],1839030562,16),n=l(n,i,o,r,e[14],4259657740,23),r=l(r,n,i,o,e[1],2763975236,4),o=l(o,r,n,i,e[4],1272893353,11),i=l(i,o,r,n,e[7],4139469664,16),n=l(n,i,o,r,e[10],3200236656,23),r=l(r,n,i,o,e[13],681279174,4),o=l(o,r,n,i,e[0],3936430074,11),i=l(i,o,r,n,e[3],3572445317,16),n=l(n,i,o,r,e[6],76029189,23),r=l(r,n,i,o,e[9],3654602809,4),o=l(o,r,n,i,e[12],3873151461,11),i=l(i,o,r,n,e[15],530742520,16),r=h(r,n=l(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=h(o,r,n,i,e[7],1126891415,10),i=h(i,o,r,n,e[14],2878612391,15),n=h(n,i,o,r,e[5],4237533241,21),r=h(r,n,i,o,e[12],1700485571,6),o=h(o,r,n,i,e[3],2399980690,10),i=h(i,o,r,n,e[10],4293915773,15),n=h(n,i,o,r,e[1],2240044497,21),r=h(r,n,i,o,e[8],1873313359,6),o=h(o,r,n,i,e[15],4264355552,10),i=h(i,o,r,n,e[6],2734768916,15),n=h(n,i,o,r,e[13],1309151649,21),r=h(r,n,i,o,e[4],4149444226,6),o=h(o,r,n,i,e[11],3174756917,10),i=h(i,o,r,n,e[2],718787259,15),n=h(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=a},function(e,t,r){"use strict";e.exports="enum KeyType {\n RSA = 0;\n Ed25519 = 1;\n Secp256k1 = 2;\n}\nmessage PublicKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}\nmessage PrivateKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}"},function(e,t,r){var n=r(8);r(13),e.exports=n.cipher=n.cipher||{},n.cipher.algorithms=n.cipher.algorithms||{},n.cipher.createCipher=function(e,t){var r=e;if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e);return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!1})},n.cipher.createDecipher=function(e,t){var r=e;if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e);return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!0})},n.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),n.cipher.algorithms[e]=t},n.cipher.getAlgorithm=function(e){return(e=e.toUpperCase())in n.cipher.algorithms?n.cipher.algorithms[e]:null};var i=n.cipher.BlockCipher=function(e){this.algorithm=e.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=e.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=e.decrypt,this.algorithm.initialize(e)};i.prototype.start=function(e){e=e||{};var t={};for(var r in e)t[r]=e[r];t.decrypt=this._decrypt,this._finish=!1,this._input=n.util.createBuffer(),this.output=e.output||n.util.createBuffer(),this.mode.start(t)},i.prototype.update=function(e){for(e&&this._input.putBuffer(e);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},i.prototype.finish=function(e){!e||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(t){return e(this.blockSize,t,!1)},this.mode.unpad=function(t){return e(this.blockSize,t,!0)});var t={};return t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t))&&(this._finish=!0,this.update(),!(this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t))&&!(this.mode.afterFinish&&!this.mode.afterFinish(this.output,t)))}},function(e,t,r){var n=r(8);r(60),r(13);var i=e.exports=n.md5=n.md5||{};n.md.md5=n.md.algorithms.md5=i,i.create=function(){u||function(){o=String.fromCharCode(128),o+=n.util.fillString(String.fromCharCode(0),64),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],a=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],c=new Array(64);for(var e=0;e<64;++e)c[e]=Math.floor(4294967296*Math.abs(Math.sin(e+1)));u=!0}();var e=null,t=n.util.createBuffer(),r=new Array(16),i={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,o=0;o>>0,a>>>0];for(var c=i.fullMessageLength.length-1;c>=0;--c)i.fullMessageLength[c]+=a[1],a[1]=a[0]+(i.fullMessageLength[c]/4294967296>>>0),i.fullMessageLength[c]=i.fullMessageLength[c]>>>0,a[0]=a[1]/4294967296>>>0;return t.putBytes(o),f(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(t.bytes());var a=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(o.substr(0,i.blockLength-a));for(var c,u=0,l=i.fullMessageLength.length-1;l>=0;--l)u=(c=8*i.fullMessageLength[l]+u)/4294967296>>>0,s.putInt32Le(c>>>0);var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3};f(h,r,s);var p=n.util.createBuffer();return p.putInt32Le(h.h0),p.putInt32Le(h.h1),p.putInt32Le(h.h2),p.putInt32Le(h.h3),p},i};var o=null,s=null,a=null,c=null,u=!1;function f(e,t,r){for(var n,i,o,u,f,l,h,p=r.length();p>=64;){for(i=e.h0,o=e.h1,u=e.h2,f=e.h3,h=0;h<16;++h)t[h]=r.getInt32Le(),n=i+(f^o&(u^f))+c[h]+t[h],i=f,f=u,u=o,o+=n<<(l=a[h])|n>>>32-l;for(;h<32;++h)n=i+(u^f&(o^u))+c[h]+t[s[h]],i=f,f=u,u=o,o+=n<<(l=a[h])|n>>>32-l;for(;h<48;++h)n=i+(o^u^f)+c[h]+t[s[h]],i=f,f=u,u=o,o+=n<<(l=a[h])|n>>>32-l;for(;h<64;++h)n=i+(u^(o|~f))+c[h]+t[s[h]],i=f,f=u,u=o,o+=n<<(l=a[h])|n>>>32-l;e.h0=e.h0+i|0,e.h1=e.h1+o|0,e.h2=e.h2+u|0,e.h3=e.h3+f|0,p-=64}}},function(e,t,r){(function(t){var n=r(8);r(109),r(60),r(13);var i,o=n.pkcs5=n.pkcs5||{};n.util.isNodejs&&!n.options.usePureJavaScript&&(i=r(247)),e.exports=n.pbkdf2=o.pbkdf2=function(e,r,o,s,a,c){if("function"==typeof a&&(c=a,a=null),n.util.isNodejs&&!n.options.usePureJavaScript&&i.pbkdf2&&(null===a||"object"!=typeof a)&&(i.pbkdf2Sync.length>4||!a||"sha1"===a))return"string"!=typeof a&&(a="sha1"),e=new t(e,"binary"),r=new t(r,"binary"),c?4===i.pbkdf2Sync.length?i.pbkdf2(e,r,o,s,function(e,t){if(e)return c(e);c(null,t.toString("binary"))}):i.pbkdf2(e,r,o,s,a,function(e,t){if(e)return c(e);c(null,t.toString("binary"))}):4===i.pbkdf2Sync.length?i.pbkdf2Sync(e,r,o,s).toString("binary"):i.pbkdf2Sync(e,r,o,s,a).toString("binary");if(null==a&&(a="sha1"),"string"==typeof a){if(!(a in n.md.algorithms))throw new Error("Unknown hash algorithm: "+a);a=n.md[a].create()}var u=a.digestLength;if(s>4294967295*u){var f=new Error("Derived key is too long.");if(c)return c(f);throw f}var l=Math.ceil(s/u),h=s-(l-1)*u,p=n.hmac.create();p.start(a,e);var d,g,b,m="";if(!c){for(var y=1;y<=l;++y){p.start(null,null),p.update(r),p.update(n.util.int32ToBytes(y)),d=b=p.digest().getBytes();for(var v=2;v<=o;++v)p.start(null,null),p.update(b),g=p.digest().getBytes(),d=n.util.xorBytes(d,g,u),b=g;m+=yl)return c(null,m);p.start(null,null),p.update(r),p.update(n.util.int32ToBytes(y)),d=b=p.digest().getBytes(),v=2,A()}function A(){if(v<=o)return p.start(null,null),p.update(b),g=p.digest().getBytes(),d=n.util.xorBytes(d,g,u),b=g,++v,n.util.setImmediate(A);m+=y2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(l.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(c.validity.notBefore=l[0],c.validity.notAfter=l[1],c.tbsCertificate=r.tbsCertificate,t){var h;if(c.md=null,c.signatureOid in s)switch(s[c.signatureOid]){case"sha1WithRSAEncryption":c.md=n.md.sha1.create();break;case"md5WithRSAEncryption":c.md=n.md.md5.create();break;case"sha256WithRSAEncryption":c.md=n.md.sha256.create();break;case"sha384WithRSAEncryption":c.md=n.md.sha384.create();break;case"sha512WithRSAEncryption":c.md=n.md.sha512.create();break;case"RSASSA-PSS":c.md=n.md.sha256.create()}if(null===c.md)throw(h=new Error("Could not compute certificate digest. Unknown signature OID.")).signatureOid=c.signatureOid,h;var g=i.toDer(c.tbsCertificate);c.md.update(g.getBytes())}var m=n.md.sha1.create();c.issuer.getField=function(e){return p(c.issuer,e)},c.issuer.addField=function(e){b([e]),c.issuer.attributes.push(e)},c.issuer.attributes=o.RDNAttributesAsArray(r.certIssuer,m),r.certIssuerUniqueId&&(c.issuer.uniqueId=r.certIssuerUniqueId),c.issuer.hash=m.digest().toHex();var y=n.md.sha1.create();return c.subject.getField=function(e){return p(c.subject,e)},c.subject.addField=function(e){b([e]),c.subject.attributes.push(e)},c.subject.attributes=o.RDNAttributesAsArray(r.certSubject,y),r.certSubjectUniqueId&&(c.subject.uniqueId=r.certSubjectUniqueId),c.subject.hash=y.digest().toHex(),r.certExtensions?c.extensions=o.certificateExtensionsFromAsn1(r.certExtensions):c.extensions=[],c.publicKey=o.publicKeyFromAsn1(r.subjectPublicKeyInfo),c},o.certificateExtensionsFromAsn1=function(e){for(var t=[],r=0;r1&&(r=c.value.charCodeAt(1),o=c.value.length>2?c.value.charCodeAt(2):0),t.digitalSignature=128==(128&r),t.nonRepudiation=64==(64&r),t.keyEncipherment=32==(32&r),t.dataEncipherment=16==(16&r),t.keyAgreement=8==(8&r),t.keyCertSign=4==(4&r),t.cRLSign=2==(2&r),t.encipherOnly=1==(1&r),t.decipherOnly=128==(128&o)}else if("basicConstraints"===t.name){(c=i.fromDer(t.value)).value.length>0&&c.value[0].type===i.Type.BOOLEAN?t.cA=0!==c.value[0].value.charCodeAt(0):t.cA=!1;var a=null;c.value.length>0&&c.value[0].type===i.Type.INTEGER?a=c.value[0].value:c.value.length>1&&(a=c.value[1].value),null!==a&&(t.pathLenConstraint=i.derToInteger(a))}else if("extKeyUsage"===t.name)for(var c=i.fromDer(t.value),u=0;u1&&(r=c.value.charCodeAt(1)),t.client=128==(128&r),t.server=64==(64&r),t.email=32==(32&r),t.objsign=16==(16&r),t.reserved=8==(8&r),t.sslCA=4==(4&r),t.emailCA=2==(2&r),t.objCA=1==(1&r)}else if("subjectAltName"===t.name||"issuerAltName"===t.name){var l;t.altNames=[];c=i.fromDer(t.value);for(var h=0;h0&&t.value.push(o.certificateExtensionsToAsn1(e.extensions)),t},o.getCertificationRequestInfo=function(e){return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes()),g(e.subject),o.publicKeyToAsn1(e.publicKey),v(e)])},o.distinguishedNameToAsn1=function(e){return g(e)},o.certificateToAsn1=function(e){var t=e.tbsCertificate||o.getTBSCertificate(e);return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[t,i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.signatureOid).getBytes()),y(e.signatureOid,e.signatureParameters)]),i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},o.certificateExtensionsToAsn1=function(e){var t=i.create(i.Class.CONTEXT_SPECIFIC,3,!0,[]),r=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);t.value.push(r);for(var n=0;nf.validity.notAfter)&&(c={message:"Certificate is not valid yet or has expired.",error:o.certificateError.certificate_expired,notBefore:f.validity.notBefore,notAfter:f.validity.notAfter,now:s}),null===c){if(null===(l=t[0]||e.getIssuer(f))&&f.isIssuer(f)&&(h=!0,l=f),l){var p=l;n.util.isArray(p)||(p=[p]);for(var d=!1;!d&&p.length>0;){l=p.shift();try{d=l.verify(f)}catch(e){}}d||(c={message:"Certificate signature is invalid.",error:o.certificateError.bad_certificate})}null!==c||l&&!h||e.hasCertificate(f)||(c={message:"Certificate is not trusted.",error:o.certificateError.unknown_ca})}if(null===c&&l&&!f.isIssuer(l)&&(c={message:"Certificate issuer is invalid.",error:o.certificateError.bad_certificate}),null===c)for(var g={keyUsage:!0,basicConstraints:!0},b=0;null===c&&by.pathLenConstraint&&(c={message:"Certificate basicConstraints pathLenConstraint violated.",error:o.certificateError.bad_certificate})}var w=null===c||c.error,A=r?r(w,u,i):w;if(!0!==A)throw!0===w&&(c={message:"The application rejected the certificate.",error:o.certificateError.bad_certificate}),(A||0===A)&&("object"!=typeof A||n.util.isArray(A)?"string"==typeof A&&(c.error=A):(A.message&&(c.message=A.message),A.error&&(c.error=A.error))),c;c=null,a=!1,++u}while(t.length>0);return!0}},function(e,t,r){var n=r(8);r(43),r(13),(e.exports=n.pss=n.pss||{}).create=function(e){3===arguments.length&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var t,r=e.md,i=e.mgf,o=r.digestLength,s=e.salt||null;if("string"==typeof s&&(s=n.util.createBuffer(s)),"saltLength"in e)t=e.saltLength;else{if(null===s)throw new Error("Salt length not specified or specific salt not given.");t=s.length()}if(null!==s&&s.length()!==t)throw new Error("Given salt length does not match length of given salt.");var a=e.prng||n.random,c={encode:function(e,c){var u,f,l=c-1,h=Math.ceil(l/8),p=e.digest().getBytes();if(h>8*h-l&255;return(w=String.fromCharCode(w.charCodeAt(0)&~A)+w.substr(1))+g+String.fromCharCode(188)},verify:function(e,s,a){var c,u=a-1,f=Math.ceil(u/8);if(s=s.substr(-f),f>8*f-u&255;if(0!=(h.charCodeAt(0)&d))throw new Error("Bits beyond keysize not zero as expected.");var g=i.generate(p,l),b="";for(c=0;c{t(null,e)},e=>{t(e)})}},function(e,t,r){"use strict";e.exports=(()=>{if("undefined"!=typeof self&&(r(77)(self),self.crypto))return self.crypto;throw new Error("Please use an environment with crypto support")})},function(e,t,r){"use strict";e.exports="enum KeyType {\n RSA = 0;\n Ed25519 = 1;\n Secp256k1 = 2;\n}\nmessage PublicKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}\nmessage PrivateKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}"},function(e,t,r){"use strict";var n=r(113);e.exports=function(e,t,r){r||(r=t,t=null);var i=n(function(r){t=e(t,r)},function(e){r(e,t)});return 2===arguments.length?function(e){e(null,function(n,o){if(n)return r(!0===n?null:n);t=o,i(e)})}:i}},function(e,t){e.exports=function(){var e,t,r,n,i=function(i,o){e?e(i,o):i?(n=i,r=o):t=o};return i.resolve=function(i){if(e)throw new Error("already resolved");if(!(e=i))throw new Error("no read cannot resolve!"+e);t&&i(null,t),r&&i(n,r)},i.abort=function(e){i.resolve(function(t,r){r(e||!0)})},i}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,r){"use strict";(function(n){const i=r(16),o=r(20),s=r(26);(t=e.exports=s(class{constructor(e,t,r){o(r,"A link requires a cid to point to"),this._name=e||"",this._nameBuf=null,this._size=t,this._cid=new i(r)}toString(){return`DAGLink <${this._cid.toBaseEncodedString()} - name: "${this.name}", size: ${this.size}>`}toJSON(){return this._json||(this._json=Object.freeze({name:this.name,size:this.size,cid:this._cid.toBaseEncodedString()})),Object.assign({},this._json)}get name(){return this._name}get nameAsBuffer(){return null!==this._nameBuf?this._nameBuf:(this._nameBuf=n.from(this._name),this._nameBuf)}set name(e){throw new Error("Can't set property: 'name' is immutable")}get size(){return this._size}set size(e){throw new Error("Can't set property: 'size' is immutable")}get cid(){return this._cid}set cid(e){throw new Error("Can't set property: 'cid' is immutable")}},{className:"DAGLink",symbolName:"@ipld/js-ipld-dag-pb/daglink"})).create=r(1114),t.util=r(1115)}).call(this,r(0).Buffer)},function(e,t,r){var n=r(811),i=r(100),o=r(359),s=r(360);e.exports=function(e,t){var r,a;"function"==typeof e&&(t=e,e={}),r=t||function(){},a=0,t=function(e,t,n){a++||r(e,t,n)};var c=n(e&&e.timeout||5e3),u=i(function(e){e&&t(e)}),f=s();return{handshake:{read:c.read,abort:function(e){u.end(e),c.abort(e,function(e){}),t(e)},write:u.push,rest:function(){return u.end(),{source:c.read(),sink:f.sink}}},sink:c,source:o([u,f.source])}}},function(e,t,r){"use strict";(function(t){const n=r(37),i=r(67),o=r(97),s=r(73),a=r(98),c=r(16),u=r(1700).createResolver;const f={maxDepth:1/0,offset:void 0,length:void 0,fullPath:!1};e.exports=((e,r,h)=>{let p;h=Object.assign({},f,h);try{p=function(e){let r=e,n="/";if(t.isBuffer(e)&&(r=new c(e).toBaseEncodedString()),"string"==typeof e){0===e.indexOf("/ipfs/")&&(e=r=e.substring(6));const t=e.indexOf("/");t>0&&(r=e.substring(0,t),n=e.substring(t))}else c.isCID(r)&&(r=r.toBaseEncodedString());return{base:r=new c(r).toBaseEncodedString(),rest:l(n)}}(e)}catch(e){return o(e)}const d=function(e){return e.reduce((e,t)=>(e.length&&(e+="/"),e+t),"")}([p.base].concat(p.rest.slice(0,p.rest.length-1))).length,g=new c(p.base);return n(i([{multihash:g.buffer,name:p.base,path:p.base,pathRest:p.rest,depth:0}]),u(r,h),s(Boolean),a(e=>({depth:e.depth,name:e.name,path:h.fullPath?e.path:b(e),size:e.size,hash:e.multihash,content:e.content,type:e.type})));function b(e){if(!p.rest.length)return e.path;let t=e.path.substring(d);return"/"===t.charAt(0)&&(t=t.substring(1)),t||(t=p.rest[p.rest.length-1]||p.base),t}});const l=(e="")=>(e.trim().match(/([^\\^\/]|\\\/)+/g)||[]).filter(Boolean)}).call(this,r(0).Buffer)},function(e,t,r){(function(t){const n=r(71),i=new(0,r(96).ec)("secp256k1"),o=r(1810),s=t.alloc(32,0),a=t.from("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141","hex"),c=t.from("fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f","hex"),u=i.curve.n,f=u.shrn(1),l=i.curve.g,h="Expected Private",p="Expected Point",d="Expected Tweak",g="Expected Hash",b="Expected Signature";function m(e){return t.isBuffer(e)&&32===e.length}function y(e){return!!m(e)&&e.compare(a)<0}function v(e){if(!t.isBuffer(e))return!1;if(e.length<33)return!1;const r=e[0],n=e.slice(1,33);if(0===n.compare(s))return!1;if(n.compare(c)>=0)return!1;if((2===r||3===r)&&33===e.length)return!0;const i=e.slice(33);return 0!==i.compare(s)&&(!(i.compare(c)>=0)&&(4===r&&65===e.length))}function w(e){return 4!==e[0]}function A(e){return!!m(e)&&(e.compare(s)>0&&e.compare(a)<0)}function _(e,t){return void 0===e&&void 0!==t?w(t):void 0===e||e}function S(e){return new n(e)}function E(e){return e.toArrayLike(t,"be",32)}function k(e){return i.curve.decodePoint(e)}function x(e,r){return t.from(e._encode(r))}e.exports={isPoint:v,isPointCompressed:function(e){return!!v(e)&&w(e)},isPrivate:A,pointAdd:function(e,t,r){if(!v(e))throw new TypeError(p);if(!v(t))throw new TypeError(p);const n=k(e),i=k(t),o=n.add(i);return o.isInfinity()?null:x(o,_(r,e))},pointAddScalar:function(e,t,r){if(!v(e))throw new TypeError(p);if(!y(t))throw new TypeError(d);const n=_(r,e),i=k(e);if(0===t.compare(s))return x(i,n);const o=S(t),a=l.mul(o),c=i.add(a);return c.isInfinity()?null:x(c,n)},pointCompress:function(e,t){if(!v(e))throw new TypeError(p);const r=k(e);if(r.isInfinity())throw new TypeError(p);return x(r,t)},pointFromScalar:function(e,t){if(!A(e))throw new TypeError(h);const r=S(e),n=l.mul(r);return n.isInfinity()?null:x(n,_(t))},pointMultiply:function(e,t,r){if(!v(e))throw new TypeError(p);if(!y(t))throw new TypeError(d);const n=_(r,e),i=k(e),o=S(t),s=i.mul(o);return s.isInfinity()?null:x(s,n)},privateAdd:function(e,t){if(!A(e))throw new TypeError(h);if(!y(t))throw new TypeError(d);const r=S(e),n=S(t),i=E(r.add(n).umod(u));return A(i)?i:null},privateSub:function(e,t){if(!A(e))throw new TypeError(h);if(!y(t))throw new TypeError(d);const r=S(e),n=S(t),i=E(r.sub(n).umod(u));return A(i)?i:null},sign:function(e,r){if(!m(e))throw new TypeError(g);if(!A(r))throw new TypeError(h);const n=S(r),i=S(e);let s,a;o(e,r,function(e){const t=S(e),r=l.mul(t);return!r.isInfinity()&&0!==(s=r.x.umod(u)).isZero()&&0!==(a=t.invm(u).mul(i.add(n.mul(s))).umod(u)).isZero()},A),a.cmp(f)>0&&(a=u.sub(a));const c=t.allocUnsafe(64);return E(s).copy(c,0),E(a).copy(c,32),c},verify:function(e,r,n){if(!m(e))throw new TypeError(g);if(!v(r))throw new TypeError(p);if(!function(e){const r=e.slice(0,32),n=e.slice(32,64);return t.isBuffer(e)&&64===e.length&&r.compare(a)<0&&n.compare(a)<0}(n))throw new TypeError(b);const i=k(r),o=S(n.slice(0,32)),s=S(n.slice(32,64));if(o.gtn(0)<=0)return!1;if(s.gtn(0)<=0)return!1;const c=S(e),f=s.invm(u),h=c.mul(f).umod(u),d=o.mul(f).umod(u),y=l.mulAdd(h,i,d);return!y.isInfinity()&&y.x.umod(u).eq(o)}}}).call(this,r(0).Buffer)},function(e,t){e.exports={prop:function(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){let e=r.call(this);return this[t]=e,e},set:function(e){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:e,writable:!0})}})},value:function(e){let t;return function(){return void 0!==t?t:t=e()}}}},function(e,t,r){"use strict";t.ethAccountSnapshot=r(968),t.ethBlock=r(973),t.ethBlockList=r(1874),t.ethStateTrie=r(1875),t.ethStorageTrie=r(1878),t.ethTx=r(975),t.ethTxTrie=r(1881)},function(e,t,r){"use strict";var n=r(30),i=r(40),o=r(62),s=[],a={};function c(){}function u(e,t){if(~s.indexOf(e))return e;if(!t)return a[e];n.isArray(t)||(t=[t]);var r=function(t){return s[i][t]===e};for(var i in s)if(n.any(t,r))return s[i]}function f(e){var t=new c;return o.defineImmutable(t,{name:e.name,alias:e.alias,pubkeyhash:e.pubkeyhash,privatekey:e.privatekey,scripthash:e.scripthash,xpubkey:e.xpubkey,xprivkey:e.xprivkey,zaddr:e.zaddr,zkey:e.zkey}),e.networkMagic&&o.defineImmutable(t,{networkMagic:i.integerAsBuffer(e.networkMagic)}),e.port&&o.defineImmutable(t,{port:e.port}),e.dnsSeeds&&o.defineImmutable(t,{dnsSeeds:e.dnsSeeds}),n.each(t,function(e){n.isUndefined(e)||n.isObject(e)||(a[e]=t)}),s.push(t),t}c.prototype.toString=function(){return this.name},f({name:"livenet",alias:"mainnet",pubkeyhash:7352,privatekey:128,scripthash:7357,xpubkey:76067358,xprivkey:76066276,zaddr:5786,zkey:43830,networkMagic:4179340459,port:8233,dnsSeeds:[]});var l=u("livenet");f({name:"testnet",alias:"regtest",pubkeyhash:7461,privatekey:239,scripthash:7354,xpubkey:70617039,xprivkey:70615956,zaddr:5814,zkey:44040});var h=u("testnet"),p={PORT:18233,NETWORK_MAGIC:i.integerAsBuffer(4187956406),DNS_SEEDS:["dnsseed.testnet.z.cash"]};for(var d in p)n.isObject(p[d])||(a[p[d]]=h);var g={PORT:18444,NETWORK_MAGIC:i.integerAsBuffer(2867347295),DNS_SEEDS:[]};for(var d in g)n.isObject(g[d])||(a[g[d]]=h);Object.defineProperty(h,"port",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?g.PORT:p.PORT}}),Object.defineProperty(h,"networkMagic",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?g.NETWORK_MAGIC:p.NETWORK_MAGIC}}),Object.defineProperty(h,"dnsSeeds",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?g.DNS_SEEDS:p.DNS_SEEDS}}),e.exports={add:f,remove:function(e){for(var t=0;t"},e.exports=l;var h=r(120)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e,n){Object.defineProperty(t,"__esModule",{value:!0}),t.hasNextTick=t.hasSetImmediate=void 0,t.fallback=f,t.wrap=l;var i,o=r(92),s=(i=o)&&i.__esModule?i:{default:i};var a,c=t.hasSetImmediate="function"==typeof e&&e,u=t.hasNextTick="object"==typeof n&&"function"==typeof n.nextTick;function f(e){setTimeout(e,0)}function l(e){return function(t){var r=(0,s.default)(arguments,1);e(function(){t.apply(null,r)})}}a=c?e:u?n.nextTick:f,t.default=l(a)}).call(this,r(35).setImmediate,r(6))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){if(null!==e){var t=e;e=null,t.apply(this,arguments)}}},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,i.default)(function(t,r){var i;try{i=e.apply(this,t)}catch(e){return r(e)}(0,n.default)(i)&&"function"==typeof i.then?i.then(function(e){a(r,null,e)},function(e){a(r,e.message?e:new Error(e))}):r(null,i)})};var n=s(r(106)),i=s(r(319)),o=s(r(190));function s(e){return e&&e.__esModule?e:{default:e}}function a(e,t,r){try{e(t,r)}catch(e){(0,o.default)(c,e)}}function c(e){throw e}e.exports=t.default},function(e){e.exports={COMPRESSED_TYPE_INVALID:"compressed should be a boolean",EC_PRIVATE_KEY_TYPE_INVALID:"private key should be a Buffer",EC_PRIVATE_KEY_LENGTH_INVALID:"private key length is invalid",EC_PRIVATE_KEY_RANGE_INVALID:"private key range is invalid",EC_PRIVATE_KEY_TWEAK_ADD_FAIL:"tweak out of range or resulting private key is invalid",EC_PRIVATE_KEY_TWEAK_MUL_FAIL:"tweak out of range",EC_PRIVATE_KEY_EXPORT_DER_FAIL:"couldn't export to DER format",EC_PRIVATE_KEY_IMPORT_DER_FAIL:"couldn't import from DER format",EC_PUBLIC_KEYS_TYPE_INVALID:"public keys should be an Array",EC_PUBLIC_KEYS_LENGTH_INVALID:"public keys Array should have at least 1 element",EC_PUBLIC_KEY_TYPE_INVALID:"public key should be a Buffer",EC_PUBLIC_KEY_LENGTH_INVALID:"public key length is invalid",EC_PUBLIC_KEY_PARSE_FAIL:"the public key could not be parsed or is invalid",EC_PUBLIC_KEY_CREATE_FAIL:"private was invalid, try again",EC_PUBLIC_KEY_TWEAK_ADD_FAIL:"tweak out of range or resulting public key is invalid",EC_PUBLIC_KEY_TWEAK_MUL_FAIL:"tweak out of range",EC_PUBLIC_KEY_COMBINE_FAIL:"the sum of the public keys is not valid",ECDH_FAIL:"scalar was invalid (zero or overflow)",ECDSA_SIGNATURE_TYPE_INVALID:"signature should be a Buffer",ECDSA_SIGNATURE_LENGTH_INVALID:"signature length is invalid",ECDSA_SIGNATURE_PARSE_FAIL:"couldn't parse signature",ECDSA_SIGNATURE_PARSE_DER_FAIL:"couldn't parse DER signature",ECDSA_SIGNATURE_SERIALIZE_DER_FAIL:"couldn't serialize signature to DER format",ECDSA_SIGN_FAIL:"nonce generation function failed or private key is invalid",ECDSA_RECOVER_FAIL:"couldn't recover public key from signature",MSG32_TYPE_INVALID:"message should be a Buffer",MSG32_LENGTH_INVALID:"message length is invalid",OPTIONS_TYPE_INVALID:"options should be an Object",OPTIONS_DATA_TYPE_INVALID:"options.data should be a Buffer",OPTIONS_DATA_LENGTH_INVALID:"options.data length is invalid",OPTIONS_NONCEFN_TYPE_INVALID:"options.noncefn should be a Function",RECOVERY_ID_TYPE_INVALID:"recovery should be a Number",RECOVERY_ID_VALUE_INVALID:"recovery should have value between -1 and 4",TWEAK_TYPE_INVALID:"tweak should be a Buffer",TWEAK_LENGTH_INVALID:"tweak length is invalid"}},function(e,t,r){"use strict";e.exports=function(){return function(e,t){t(!0)}}},function(e,t,r){"use strict";var n=r(67),i=r(142);e.exports=function(){return function(e){var t;return function(r,o){function s(){t(null,function(t,r){!0===t?a():t?e(!0,function(e){o(t)}):o(null,r)})}function a(){t=null,e(null,function(e,r){if(e)return o(e);Array.isArray(r)||r&&"object"==typeof r?r=n(r):"function"!=typeof r&&(r=i(r)),t=r,s()})}r?t?t(r,function(t){e(t||r,o)}):e(r,o):t?s():a()}}}},function(e,t,r){"use strict";var n=e.exports=function(e){return null!==e&&"object"==typeof e&&"function"==typeof e.pipe};n.writable=function(e){return n(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState},n.readable=function(e){return n(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState},n.duplex=function(e){return n.writable(e)&&n.readable(e)},n.transform=function(e){return n.duplex(e)&&"function"==typeof e._transform&&"object"==typeof e._transformState}},function(e,t){function r(e){return"function"==typeof e}function n(e){return r(e)&&2===e.length}function i(e){return r(e)&&1===e.length}t.isDuplex=function(e){return"object"==typeof e&&n(e.source)&&i(e.sink)},t.isSource=n,t.isSink=i},function(e,t,r){var n=r(327),i=r(1023),o=r(1024),s="[object Null]",a="[object Undefined]",c=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?a:s:c&&c in Object(e)?i(e):o(e)}},function(e,t,r){var n=r(731),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();e.exports=o},function(e,t,r){(function(e){function r(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}var n=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(e){return n.exec(e).slice(1)};function o(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n=-1&&!n;i--){var s=i>=0?arguments[i]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,n="/"===s.charAt(0))}return(n?"/":"")+(t=r(o(t.split("/"),function(e){return!!e}),!n).join("/"))||"."},t.normalize=function(e){var n=t.isAbsolute(e),i="/"===s(e,-1);return(e=r(o(e.split("/"),function(e){return!!e}),!n).join("/"))||n||(e="."),e&&i&&(e+="/"),(n?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(o(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},t.relative=function(e,r){function n(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=t.resolve(e).substr(1),r=t.resolve(r).substr(1);for(var i=n(e.split("/")),o=n(r.split("/")),s=Math.min(i.length,o.length),a=s,c=0;c{const r=["bitswap"];t&&r.push(t),e&&r.push(`${e.toB58String().slice(0,8)}`);const i=n(r.join(":"));return i.error=n(r.concat(["error"]).join(":")),i})},function(e,t,r){function n(e){if(e)return function(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}(e)}e.exports=n,n.prototype.on=n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},n.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i1?{type:p[i],data:e.substring(1)}:{type:p[i]}:d}i=new Uint8Array(e)[0];var o=s(e,1);return g&&"blob"===r&&(o=new g([o])),{type:p[i],data:o}},t.decodeBase64Packet=function(e,t){var r=p[e.charAt(0)];if(!n)return{type:r,data:{base64:!0,data:e.substr(1)}};var i=n.decode(e.substr(1));return"blob"===t&&g&&(i=new g([i])),{type:r,data:i}},t.encodePayload=function(e,r,n){"function"==typeof r&&(n=r,r=null);var i=o(e);if(r&&i)return g&&!l?t.encodePayloadAsBlob(e,n):t.encodePayloadAsArrayBuffer(e,n);if(!e.length)return n("0:");b(e,function(e,n){t.encodePacket(e,!!i&&r,!1,function(e){n(null,function(e){return e.length+":"+e}(e))})},function(e,t){return n(t.join(""))})},t.decodePayload=function(e,r,n){if("string"!=typeof e)return t.decodePayloadAsBinary(e,r,n);var i;if("function"==typeof r&&(n=r,r=null),""===e)return n(d,0,1);for(var o,s,a="",c=0,u=e.length;c0;){for(var a=new Uint8Array(i),c=0===a[0],u="",f=1;255!==a[f];f++){if(u.length>310)return n(d,0,1);u+=a[f]}i=s(i,2+u.length),u=parseInt(u);var l=s(i,0,u);if(c)try{l=String.fromCharCode.apply(null,new Uint8Array(l))}catch(e){var h=new Uint8Array(l);l="";for(f=0;f65536)throw new Error("requested too many random bytes");var s=new t.Uint8Array(e);e>0&&o.getRandomValues(s);var a=i.from(s.buffer);if("function"==typeof r)return n.nextTick(function(){r(null,a)});return a}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,r(12),r(6))},function(e,t,r){var n=r(27).Buffer;function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,o=e.length,s=this._len,a=0;a=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,r){var n=t;n.utils=r(1965),n.common=r(1966),n.sha=r(1967),n.ripemd=r(1968),n.hmac=r(1969),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.preBlockToJson=t.preBlockFromJson=t.isBlockJson=t.isBlock=t.blockFromJson=t.blockToJson=void 0;var n,i=r(401),o=(n=i)&&n.__esModule?n:{default:n},s=r(28),a=r(17);var c=t.blockToJson=function(e){return{__ipfsPostMsgProxyType:"Block",cid:(0,s.cidToJson)(e.cid),data:(0,a.bufferToJson)(e.data)}},u=t.blockFromJson=function(e){var t=(0,s.cidFromJson)(e.cid),r=(0,a.bufferFromJson)(e.data);return new o.default(r,t)},f=t.isBlock=function(e){return e&&o.default.isBlock(e)},l=t.isBlockJson=function(e){return e&&"Block"===e.__ipfsPostMsgProxyType};t.preBlockFromJson=function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n>=8;for(;u>0;)o.push(255&u),u>>=8}for(var f=0;e[f]===i&&f0;)n.push(a%r),a=a/r|0}for(var c="",u=0;0===t[u]&&u=0;--f)c+=e[n[f]];return c},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){const n=r(5);function i(e){return parseInt(e.toString("hex"),16)}function o(e){let r=e.toString(16);return r.length%2==1&&(r="0"+r),t.from(r,"hex")}e.exports={numberToBuffer:o,bufferToNumber:i,varintBufferEncode:function(e){return t.from(n.encode(i(e)))},varintBufferDecode:function(e){return o(n.decode(e))}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";var n=r(220).BigInteger,i=r(221),o=r(222),s=r(223),a=r(104).sprintf,c=r(159);function u(e){this.valid=!1,this.address=e,this.groups=c.GROUPS,this.v4=!0,this.subnet="/32",this.subnetMask=32;var t=c.RE_SUBNET_STRING.exec(e);if(t){if(this.parsedSubnet=t[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet="/"+this.subnetMask,this.subnetMask<0||this.subnetMask>c.BITS)return this.valid=!1,void(this.error="Invalid subnet mask.");e=e.replace(c.RE_SUBNET_STRING,"")}this.addressMinusSuffix=e,this.parsedAddress=this.parse(e)}u.prototype.parse=function(e){var t=e.split(".");return e.match(c.RE_ADDRESS)?this.valid=!0:this.error="Invalid IPv4 address.",t},u.prototype.isValid=function(){return this.valid},u.prototype.correctForm=function(){return this.parsedAddress.map(function(e){return parseInt(e,10)}).join(".")},u.prototype.isCorrect=i.isCorrect(c.BITS),u.fromHex=function(e){var t,r=o(e.replace(/:/g,""),8,"0"),n=[];for(t=0;t<8;t+=2){var i=r.slice(t,t+2);n.push(parseInt(i,16))}return new u(n.join("."))},u.fromInteger=function(e){return u.fromHex(e.toString(16))},u.prototype.toHex=function(){return this.parsedAddress.map(function(e){return a("%02x",parseInt(e,10))}).join(":")},u.prototype.toArray=function(){return this.parsedAddress.map(function(e){return parseInt(e,10)})},u.prototype.toGroup6=function(){var e,t=[];for(e=0;e>15;--o>=0;){var c=32767&this[e],u=this[e++]>>15,f=a*c+u*s;i=((c=s*c+((32767&f)<<15)+r[n]+(1073741823&i))>>>30)+(f>>>15)+a*u+(i>>>30),r[n++]=1073741823&c}return i},t=30):i&&"Netscape"!=navigator.appName?(r.prototype.am=function(e,t,r,n,i,o){for(;--o>=0;){var s=t*this[e++]+r[n]+i;i=Math.floor(s/67108864),r[n++]=67108863&s}return i},t=26):(r.prototype.am=function(e,t,r,n,i,o){for(var s=16383&t,a=t>>14;--o>=0;){var c=16383&this[e],u=this[e++]>>14,f=a*c+u*s;i=((c=s*c+((16383&f)<<14)+r[n]+i)>>28)+(f>>14)+a*u,r[n++]=268435455&c}return i},t=28),r.prototype.DB=t,r.prototype.DM=(1<>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function p(e){this.m=e}function d(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function w(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function A(){}function _(e){return e}function S(e){this.r2=n(),this.q3=n(),r.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}p.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},p.prototype.revert=function(e){return e},p.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},p.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},p.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},d.prototype.convert=function(e){var t=n();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(r.ZERO)>0&&this.m.subTo(t,t),t},d.prototype.revert=function(e){var t=n();return e.copyTo(t),this.reduce(t),t},d.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t>15)*this.mpl&this.um)<<15)&e.DM;for(e[r=t+this.m.t]+=this.m.am(0,n,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},d.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},d.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},r.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},r.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},r.prototype.fromString=function(e,t){var n;if(16==t)n=4;else if(8==t)n=3;else if(256==t)n=8;else if(2==t)n=1;else if(32==t)n=5;else{if(4!=t)return void this.fromRadix(e,t);n=2}this.t=0,this.s=0;for(var i=e.length,o=!1,s=0;--i>=0;){var a=8==n?255&e[i]:f(e,i);a<0?"-"==e.charAt(i)&&(o=!0):(o=!1,0==s?this[this.t++]=a:s+n>this.DB?(this[this.t-1]|=(a&(1<>this.DB-s):this[this.t-1]|=a<=this.DB&&(s-=this.DB))}8==n&&0!=(128&e[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==e;)--this.t},r.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s},r.prototype.drShiftTo=function(e,t){for(var r=e;r=0;--r)t[r+s+1]=this[r]>>i|a,a=(this[r]&o)<=0;--r)t[r]=0;t[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()},r.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,o=(1<>n;for(var s=r+1;s>n;n>0&&(t[this.t-r-1]|=(this.s&o)<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[r++]=this.DV+n:n>0&&(t[r++]=n),t.t=r,t.clamp()},r.prototype.multiplyTo=function(e,t){var n=this.abs(),i=e.abs(),o=n.t;for(t.t=o+i.t;--o>=0;)t[o]=0;for(o=0;o=0;)e[r]=0;for(r=0;r=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()},r.prototype.divRemTo=function(e,t,i){var o=e.abs();if(!(o.t<=0)){var s=this.abs();if(s.t0?(o.lShiftTo(f,a),s.lShiftTo(f,i)):(o.copyTo(a),s.copyTo(i));var l=a.t,p=a[l-1];if(0!=p){var d=p*(1<1?a[l-2]>>this.F2:0),g=this.FV/d,b=(1<=0&&(i[i.t++]=1,i.subTo(w,i)),r.ONE.dlShiftTo(l,w),w.subTo(a,a);a.t=0;){var A=i[--y]==p?this.DM:Math.floor(i[y]*g+(i[y-1]+m)*b);if((i[y]+=a.am(0,A,i,v,0,l))0&&i.rShiftTo(f,i),c<0&&r.ZERO.subTo(i,i)}}},r.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},r.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},r.prototype.exp=function(e,t){if(e>4294967295||e<1)return r.ONE;var i=n(),o=n(),s=t.convert(this),a=h(e)-1;for(s.copyTo(i);--a>=0;)if(t.sqrTo(i,o),(e&1<0)t.mulTo(o,s,i);else{var c=i;i=o,o=c}return t.revert(i)},r.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,n=(1<0)for(a>a)>0&&(i=!0,o=u(r));s>=0;)a>(a+=this.DB-t)):(r=this[s]>>(a-=t)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=u(r));return i?o:"0"},r.prototype.negate=function(){var e=n();return r.ZERO.subTo(this,e),e},r.prototype.abs=function(){return this.s<0?this.negate():this},r.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this[r]-e[r]))return t;return 0},r.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+h(this[this.t-1]^this.s&this.DM)},r.prototype.mod=function(e){var t=n();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(r.ZERO)>0&&e.subTo(t,t),t},r.prototype.modPowInt=function(e,t){var r;return r=e<256||t.isEven()?new p(t):new d(t),this.exp(e,r)},r.ZERO=l(0),r.ONE=l(1),A.prototype.convert=_,A.prototype.revert=_,A.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},A.prototype.sqrTo=function(e,t){e.squareTo(t)},S.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=n();return e.copyTo(t),this.reduce(t),t},S.prototype.revert=function(e){return e},S.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},S.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},S.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var E,k,x,C=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],I=(1<<26)/C[C.length-1];function B(){var e;e=(new Date).getTime(),k[x++]^=255&e,k[x++]^=e>>8&255,k[x++]^=e>>16&255,k[x++]^=e>>24&255,x>=D&&(x-=D)}if(r.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},r.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),i=l(r),o=n(),s=n(),a="";for(this.divRemTo(i,o,s);o.signum()>0;)a=(r+s.intValue()).toString(e).substr(1)+a,o.divRemTo(i,o,s);return s.intValue().toString(e)+a},r.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var n=this.chunkSize(t),i=Math.pow(t,n),o=!1,s=0,a=0,c=0;c=n&&(this.dMultiply(i),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(t,s)),this.dAddOffset(a,0)),o&&r.ZERO.subTo(this,this)},r.prototype.fromNumber=function(e,t,n){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(r.ONE.shiftLeft(e-1),b,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(r.ONE.shiftLeft(e-1),this);else{var i=new Array,o=7&e;i.length=1+(e>>3),t.nextBytes(i),o>0?i[0]&=(1<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t[r++]=n:n<-1&&(t[r++]=this.DV+n),t.t=r,t.clamp()},r.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},r.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},r.prototype.multiplyLowerTo=function(e,t,r){var n,i=Math.min(this.t+e.t,t);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(n=r.t-this.t;i=0;)r[n]=0;for(n=Math.max(t-this.t,0);n0)if(0==t)r=this[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this[n])%e;return r},r.prototype.millerRabin=function(e){var t=this.subtract(r.ONE),i=t.getLowestSetBit();if(i<=0)return!1;var o=t.shiftRight(i);(e=e+1>>1)>C.length&&(e=C.length);for(var s=n(),a=0;a>24},r.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},r.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},r.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var r,n=this.DB-e*this.DB%8,i=0;if(e-- >0)for(n>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<=0;)n<8?(r=(this[e]&(1<>(n+=this.DB-8)):(r=this[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t},r.prototype.equals=function(e){return 0==this.compareTo(e)},r.prototype.min=function(e){return this.compareTo(e)<0?this:e},r.prototype.max=function(e){return this.compareTo(e)>0?this:e},r.prototype.and=function(e){var t=n();return this.bitwiseTo(e,g,t),t},r.prototype.or=function(e){var t=n();return this.bitwiseTo(e,b,t),t},r.prototype.xor=function(e){var t=n();return this.bitwiseTo(e,m,t),t},r.prototype.andNot=function(e){var t=n();return this.bitwiseTo(e,y,t),t},r.prototype.not=function(){for(var e=n(),t=0;t=this.t?0!=this.s:0!=(this[t]&1<1){var g=n();for(i.sqrTo(a[1],g);c<=f;)a[c]=n(),i.mulTo(g,a[c-2],a[c]),c+=2}var b,m,y=e.t-1,v=!0,w=n();for(o=h(e[y])-1;y>=0;){for(o>=u?b=e[y]>>o-u&f:(b=(e[y]&(1<0&&(b|=e[y-1]>>this.DB+o-u)),c=r;0==(1&b);)b>>=1,--c;if((o-=c)<0&&(o+=this.DB,--y),v)a[b].copyTo(s),v=!1;else{for(;c>1;)i.sqrTo(s,w),i.sqrTo(w,s),c-=2;c>0?i.sqrTo(s,w):(m=s,s=w,w=m),i.mulTo(w,a[b],s)}for(;y>=0&&0==(e[y]&1<=0?(n.subTo(i,n),t&&o.subTo(a,o),s.subTo(c,s)):(i.subTo(n,i),t&&a.subTo(o,a),c.subTo(s,c))}return 0!=i.compareTo(r.ONE)?r.ZERO:c.compareTo(e)>=0?c.subtract(e):c.signum()<0?(c.addTo(e,c),c.signum()<0?c.add(e):c):c},r.prototype.pow=function(e){return this.exp(e,new A)},r.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var i=t.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return t;for(i0&&(t.rShiftTo(o,t),r.rShiftTo(o,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},r.prototype.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r[0]<=C[C.length-1]){for(t=0;t>>8,k[x++]=255&T;x=0,B()}function O(){if(null==E){for(B(),(E=new N).init(k),x=0;xi)return r;do{t%2&&(r+=e),(t=M(t/2))&&(e+=e)}while(t);return r}function U(e){if("string"==typeof e)return e;if(L(e))return D?D.call(e):"";var t=e+"";return"0"==t&&1/e==-n?"-0":t}function j(e,t,r){var n=e.length;return r=void 0===r?n:r,!t&&r>=n?e:function(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n-1&&e%1==0&&e<=n}(e.length)&&!function(e){var t=E(e)?y.call(e):"";return t==s||t==a}(e)}(r)&&function(e,t){return!!(t=null==t?n:t)&&("number"==typeof e||p.test(e))&&e>-1&&e%1==0&&en)return r;do{t%2&&(r+=e),(t=w(t/2))&&(e+=e)}while(t);return r}(C(e),t)}}).call(this,r(12))},function(e,t,r){"use strict";var n=r(104).sprintf,i=t.spanAllZeroes=function(e){return e.replace(/(0+)/g,'$1')};function o(e){return e.replace(/^(0+)/,'$1')}t.spanAll=function(e,t){return void 0===t&&(t=0),e.split("").map(function(e,r){return n('%s',e,r+t,i(e))}).join("")},t.spanLeadingZeroes=function(e){return e.split(":").map(function(e){return o(e)}).join(":")},t.simpleGroup=function(e,t){var r=e.split(":");return t||(t=0),r.map(function(e,r){return/group-v4/.test(e)?e:n('%s',r+t,o(e))}).join(":")}},function(e,t,r){"use strict";(function(e){const n=r(7);t.toCallback=(e=>(function(t,r){const i=(e,t)=>n(()=>{r(e,t)});let o;try{o=e(t)}catch(e){return void i(e)}i(null,o)})),t.toBuf=((t,r)=>n=>{let i=t(n,r);return e.from(i,"hex")}),t.fromString=((t,r)=>n=>{const i=e.isBuffer(n)?n.toString():n;return t(i,r)}),t.fromNumberTo32BitBuf=((t,r)=>n=>{let i=t(n,r);const o=new Array(4);for(let e=0;e<4;e++)o[e]=255&i,i>>=8;return e.from(o)})}).call(this,r(0).Buffer)},function(e,t){e.exports=function(e){return e&&"function"==typeof e.then}},function(e,t,r){(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+" = ",o=0;o{n([t=>o.deserialize(e,t),(e,n)=>{if(!t)return r(null,{value:e,remainderPath:""});const i=t.split("/");if("Links"===i[0]){let t="";if(!i[1])return n(null,{value:e.links.map(e=>e.toJSON()),remainderPath:""});const r={};e.links.forEach((e,t)=>{const n=e.toJSON();r[t]=r[n.name]={hash:n.multihash,name:n.name,size:n.size}});let o=r[i[1]];"Hash"===i[2]?o={"/":o.hash}:"Tsize"===i[2]?o=o.size:"Name"===i[2]&&(o=o.name),n(null,{value:o,remainderPath:t=i.slice(3).join("/")})}else if("Data"===i[0])n(null,{value:e.data,remainderPath:""});else{const t={};e.links.forEach((e,r)=>{const n=e.toJSON();t[n.name]={hash:n.multihash,name:n.name,size:n.size}});const r=t[i[0]];if(r)return n(null,{value:{"/":r.hash},remainderPath:i.slice(1).join("/")});n(new Error("path not available"))}}],r)}),t.tree=((e,t,r)=>{"function"==typeof t&&(r=t,t={}),t=t||{},o.deserialize(e,(e,t)=>{if(e)return r(e);const n=[];n.push("Links"),t.links.forEach((e,t)=>{n.push(`Links/${t}/Name`),n.push(`Links/${t}/Tsize`),n.push(`Links/${t}/Hash`)}),n.push("Data"),r(null,n)})}),t.isLink=((e,r,n)=>{t.resolve(e,r,(e,t)=>{if(e)return n(e);if(t.remainderPath.length>0)return n(new Error("path out of scope"));if("object"==typeof t.value&&t.value["/"]){let r;try{r=i.isCID(new i(t.value["/"]))}catch(e){r=!1}if(r)return n(null,t.value)}n(null,!1)})})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,r,n){if(!function(e){var t=Object.prototype.toString.call(e);return"[object Object]"===t||"[object Array]"===t}(t))return t;if(Array.isArray(t))return t.map(function(t,i){return r(t)?n(t):e(t,r,n)});return Object.keys(t).reduce(function(i,o){return i[o]=r(t[o])?n(t[o]):e(t[o],r,n),i},{})}},function(e,t,r){"use strict";(function(e){const n=r(164),i=r(165)(),o=r(458),s={SHA1:"SHA-1",SHA256:"SHA-256",SHA512:"SHA-512"};t.create=function(t,r,a){const c=s[t];n(i.subtle.importKey("raw",r,{name:"HMAC",hash:{name:c}},!1,["sign"]).then(r=>({digest(t,o){((t,r,o)=>{n(i.subtle.sign({name:"HMAC"},t,r).then(t=>e.from(t)),o)})(r,t,o)},length:o[t]})),a)}}).call(this,r(0).Buffer)},function(e,t,r){var n={ECB:r(462),CBC:r(463),CFB:r(464),CFB8:r(465),CFB1:r(466),OFB:r(467),CTR:r(232),GCM:r(232)},i=r(234);for(var o in i)i[o].module=n[i[o].mode];e.exports=i},function(e,t,r){var n=r(107),i=r(3).Buffer,o=r(233);function s(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}t.encrypt=function(e,t){var r=Math.ceil(t.length/16),o=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*r)]);for(var a=0;a0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):A(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?A(e,s,t,!1):x(e,s)):A(e,s,t,!1))):n||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=_?e=_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function E(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(k,e):k(e))}function k(e){p("emit readable"),e.emit("readable"),T(e)}function x(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(C,e,t))}function C(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;eo.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0===(e-=s)){s===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,s),0===(e-=s)){s===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(O,t,e))}function O(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function M(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):E(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&P(this),null;var n,i=t.needReadable;return p("need readable",i),(0===t.length||t.length-e0?R(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&P(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,t);var c=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?f:v;function u(t,n){p("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,p("cleanup"),e.removeListener("close",m),e.removeListener("finish",y),e.removeListener("drain",l),e.removeListener("error",b),e.removeListener("unpipe",u),r.removeListener("end",f),r.removeListener("end",v),r.removeListener("data",g),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function f(){p("onend"),e.end()}o.endEmitted?i.nextTick(c):r.once("end",c),e.on("unpipe",u);var l=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,T(e))}}(r);e.on("drain",l);var h=!1;var d=!1;function g(t){p("ondata"),d=!1,!1!==e.write(t)||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==M(o.pipes,e))&&!h&&(p("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function b(t){p("onerror",t),v(),e.removeListener("error",b),0===a(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",y),v()}function y(){p("onfinish"),e.removeListener("close",m),v()}function v(){p("unpipe"),r.unpipe(e)}return r.on("data",g),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",b),e.once("close",m),e.once("finish",y),e.emit("pipe",r),o.flowing||(p("pipe resume"),r.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0||o>0;){var f=new i;f.update(u),f.update(e),t&&f.update(t),u=f.digest();var l=0;if(s>0){var h=a.length-s;l=Math.min(s,u.length),u.copy(a,h,0,l),s-=l}if(l0){var p=c.length-o,d=Math.min(o,u.length-l);u.copy(c,p,l,l+d),o-=d}}return u.fill(0),{key:a,iv:c}}},function(e,t,r){"use strict";var n=r(3).Buffer,i=r(66).Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(4)(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},function(e,t,r){var n=r(8);r(13),n.cipher=n.cipher||{};var i=e.exports=n.cipher.modes=n.cipher.modes||{};function o(e){if("string"==typeof e&&(e=n.util.createBuffer(e)),n.util.isArray(e)&&e.length>4){var t=e;e=n.util.createBuffer();for(var r=0;r0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=e.length(),n=e.at(r-1);return!(n>this.blockSize<<2)&&(e.truncate(n),!0)},i.cbc=function(e){e=e||{},this.name="CBC",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.cbc.prototype.start=function(e){if(null===e.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv),this._prev=this._iv.slice(0)}},i.cbc.prototype.encrypt=function(e,t,r){if(e.length()0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=e.length(),n=e.at(r-1);return!(n>this.blockSize<<2)&&(e.truncate(n),!0)},i.cfb=function(e){e=e||{},this.name="CFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.cfb.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0)e.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.cfb.prototype.decrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0)e.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb=function(e){e=e||{},this.name="OFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ofb.prototype.encrypt=function(e,t,r){var n=e.length();if(0===e.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0)e.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb.prototype.decrypt=i.ofb.prototype.encrypt,i.ctr=function(e){e=e||{},this.name="CTR",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ctr.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0&&(e.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}s(this._inBlock)},i.ctr.prototype.decrypt=i.ctr.prototype.encrypt,i.gcm=function(e){e=e||{},this.name="GCM",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0,this._R=3774873600},i.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");var t,r=n.util.createBuffer(e.iv);if(this._cipherLength=0,t="additionalData"in e?n.util.createBuffer(e.additionalData):n.util.createBuffer(),this._tagLength="tagLength"in e?e.tagLength:128,this._tag=null,e.decrypt&&(this._tag=n.util.createBuffer(e.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var i=r.length();if(12===i)this._j0=[r.getInt32(),r.getInt32(),r.getInt32(),1];else{for(this._j0=[0,0,0,0];r.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(a(8*i)))}this._inBlock=this._j0.slice(0),s(this._inBlock),this._partialBytes=0,t=n.util.createBuffer(t),this._aDataLength=a(8*t.length());var o=t.length()%this.blockSize;for(o&&t.fillWithByte(0,this.blockSize-o),this._s=[0,0,0,0];t.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()])},i.gcm.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize){for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return e.read-=this.blockSize,t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),s(this._inBlock)},i.gcm.prototype.decrypt=function(e,t,r){var n=e.length();if(n0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),s(this._inBlock),this._hashBlock[0]=e.getInt32(),this._hashBlock[1]=e.getInt32(),this._hashBlock[2]=e.getInt32(),this._hashBlock[3]=e.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var i=0;i0;--n)t[n]=e[n]>>>1|(1&e[n-1])<<31;t[0]=e[0]>>>1,r&&(t[0]^=this._R)},i.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],r=0;r<32;++r){var n=e[r/8|0]>>>4*(7-r%8)&15,i=this._m[r][n];t[0]^=i[0],t[1]^=i[1],t[2]^=i[2],t[3]^=i[3]}return t},i.gcm.prototype.ghash=function(e,t,r){return t[0]^=r[0],t[1]^=r[1],t[2]^=r[2],t[3]^=r[3],this.tableMultiply(t)},i.gcm.prototype.generateHashTable=function(e,t){for(var r=8/t,n=4*r,i=16*r,o=new Array(i),s=0;s>>1,i=new Array(r);i[n]=e.slice(0);for(var o=n>>>1;o>0;)this.pow(i[2*o],i[o]=[]),o>>=1;for(o=2;o>1,a=s+(1&e.length),c=e.substr(0,a),u=e.substr(s,a),f=n.util.createBuffer(),l=n.hmac.create();r=t+r;var h=Math.ceil(i/16),p=Math.ceil(i/20);l.start("MD5",c);var d=n.util.createBuffer();f.putBytes(r);for(var g=0;g0&&(u.queue(e,u.createAlert(e,{level:u.Alert.Level.warning,description:u.Alert.Description.no_renegotiation})),u.flush(e)),e.process()},u.parseHelloMessage=function(e,t,r){var i=null,o=e.entity===u.ConnectionEnd.client;if(r<38)e.error(e,{message:o?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}});else{var s=t.fragment,c=s.length();if(i={version:{major:s.getByte(),minor:s.getByte()},random:n.util.createBuffer(s.getBytes(32)),session_id:a(s,1),extensions:[]},o?(i.cipher_suite=s.getBytes(2),i.compression_method=s.getByte()):(i.cipher_suites=a(s,2),i.compression_methods=a(s,1)),(c=r-(c-s.length()))>0){for(var f=a(s,2);f.length()>0;)i.extensions.push({type:[f.getByte(),f.getByte()],data:a(f,2)});if(!o)for(var l=0;l0;){if(0!==p.getByte())break;e.session.extensions.server_name.serverNameList.push(a(p,2).getBytes())}}}if(e.session.version&&(i.version.major!==e.session.version.major||i.version.minor!==e.session.version.minor))return e.error(e,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.protocol_version}});if(o)e.session.cipherSuite=u.getCipherSuite(i.cipher_suite);else for(var d=n.util.createBuffer(i.cipher_suites.bytes());d.length()>0&&(e.session.cipherSuite=u.getCipherSuite(d.getBytes(2)),null===e.session.cipherSuite););if(null===e.session.cipherSuite)return e.error(e,{message:"No cipher suites in common.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.handshake_failure},cipherSuite:n.util.bytesToHex(i.cipher_suite)});e.session.compressionMethod=o?i.compression_method:u.CompressionMethod.none}return i},u.createSecurityParameters=function(e,t){var r=e.entity===u.ConnectionEnd.client,n=t.random.bytes(),i=r?e.session.sp.client_random:n,o=r?n:u.createRandom().getBytes();e.session.sp={entity:e.entity,prf_algorithm:u.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:e.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:i,server_random:o}},u.handleServerHello=function(e,t,r){var n=u.parseHelloMessage(e,t,r);if(!e.fail){if(!(n.version.minor<=e.version.minor))return e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.protocol_version}});e.version.minor=n.version.minor,e.session.version=e.version;var i=n.session_id.bytes();i.length>0&&i===e.session.id?(e.expect=d,e.session.resuming=!0,e.session.sp.server_random=n.random.bytes()):(e.expect=f,e.session.resuming=!1,u.createSecurityParameters(e,n)),e.session.id=i,e.process()}},u.handleClientHello=function(e,t,r){var i=u.parseHelloMessage(e,t,r);if(!e.fail){var o=i.session_id.bytes(),s=null;if(e.sessionCache&&(null===(s=e.sessionCache.getSession(o))?o="":(s.version.major!==i.version.major||s.version.minor>i.version.minor)&&(s=null,o="")),0===o.length&&(o=n.random.getBytes(32)),e.session.id=o,e.session.clientHelloVersion=i.version,e.session.sp={},s)e.version=e.session.version=s.version,e.session.sp=s.sp;else{for(var a,c=1;c0;)i=a(c.certificate_list,3),o=n.asn1.fromDer(i),i=n.pki.certificateFromAsn1(o,!0),f.push(i)}catch(t){return e.error(e,{message:"Could not parse certificate list.",cause:t,send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.bad_certificate}})}var h=e.entity===u.ConnectionEnd.client;!h&&!0!==e.verifyClient||0!==f.length?0===f.length?e.expect=h?l:v:(h?e.session.serverCertificate=f[0]:e.session.clientCertificate=f[0],u.verifyCertificateChain(e,f)&&(e.expect=h?l:v)):e.error(e,{message:h?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}}),e.process()},u.handleServerKeyExchange=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.unsupported_certificate}});e.expect=h,e.process()},u.handleClientKeyExchange=function(e,t,r){if(r<48)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.unsupported_certificate}});var i=t.fragment,o={enc_pre_master_secret:a(i,2).getBytes()},s=null;if(e.getPrivateKey)try{s=e.getPrivateKey(e,e.session.serverCertificate),s=n.pki.privateKeyFromPem(s)}catch(t){e.error(e,{message:"Could not get private key.",cause:t,send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}})}if(null===s)return e.error(e,{message:"No private key set.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}});try{var c=e.session.sp;c.pre_master_secret=s.decrypt(o.enc_pre_master_secret);var f=e.session.clientHelloVersion;if(f.major!==c.pre_master_secret.charCodeAt(0)||f.minor!==c.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch(e){c.pre_master_secret=n.random.getBytes(48)}e.expect=A,null!==e.session.clientCertificate&&(e.expect=w),e.process()},u.handleCertificateRequest=function(e,t,r){if(r<3)return e.error(e,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}});var n=t.fragment,i={certificate_types:a(n,1),certificate_authorities:a(n,2)};e.session.certificateRequest=i,e.expect=p,e.process()},u.handleCertificateVerify=function(e,t,r){if(r<2)return e.error(e,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}});var i=t.fragment;i.read-=4;var o=i.bytes();i.read+=4;var s={signature:a(i,2).getBytes()},c=n.util.createBuffer();c.putBuffer(e.session.md5.digest()),c.putBuffer(e.session.sha1.digest()),c=c.getBytes();try{if(!e.session.clientCertificate.publicKey.verify(c,s.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");e.session.md5.update(o),e.session.sha1.update(o)}catch(t){return e.error(e,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.handshake_failure}})}e.expect=A,e.process()},u.handleServerHelloDone=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.record_overflow}});if(null===e.serverCertificate){var i={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.insufficient_security}},o=e.verify(e,i.alert.description,0,[]);if(!0!==o)return(o||0===o)&&("object"!=typeof o||n.util.isArray(o)?"number"==typeof o&&(i.alert.description=o):(o.message&&(i.message=o.message),o.alert&&(i.alert.description=o.alert))),e.error(e,i)}null!==e.session.certificateRequest&&(t=u.createRecord(e,{type:u.ContentType.handshake,data:u.createCertificate(e)}),u.queue(e,t)),t=u.createRecord(e,{type:u.ContentType.handshake,data:u.createClientKeyExchange(e)}),u.queue(e,t),e.expect=m;var s=function(e,t){null!==e.session.certificateRequest&&null!==e.session.clientCertificate&&u.queue(e,u.createRecord(e,{type:u.ContentType.handshake,data:u.createCertificateVerify(e,t)})),u.queue(e,u.createRecord(e,{type:u.ContentType.change_cipher_spec,data:u.createChangeCipherSpec()})),e.state.pending=u.createConnectionState(e),e.state.current.write=e.state.pending.write,u.queue(e,u.createRecord(e,{type:u.ContentType.handshake,data:u.createFinished(e)})),e.expect=d,u.flush(e),e.process()};if(null===e.session.certificateRequest||null===e.session.clientCertificate)return s(e,null);u.getClientSignature(e,s)},u.handleChangeCipherSpec=function(e,t){if(1!==t.fragment.getByte())return e.error(e,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}});var r=e.entity===u.ConnectionEnd.client;(e.session.resuming&&r||!e.session.resuming&&!r)&&(e.state.pending=u.createConnectionState(e)),e.state.current.read=e.state.pending.read,(!e.session.resuming&&r||e.session.resuming&&!r)&&(e.state.pending=null),e.expect=r?g:_,e.process()},u.handleFinished=function(e,t,r){var o=t.fragment;o.read-=4;var s=o.bytes();o.read+=4;var a=t.fragment.getBytes();(o=n.util.createBuffer()).putBuffer(e.session.md5.digest()),o.putBuffer(e.session.sha1.digest());var c=e.entity===u.ConnectionEnd.client,f=c?"server finished":"client finished",l=e.session.sp;if((o=i(l.master_secret,f,o.getBytes(),12)).getBytes()!==a)return e.error(e,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.decrypt_error}});e.session.md5.update(s),e.session.sha1.update(s),(e.session.resuming&&c||!e.session.resuming&&!c)&&(u.queue(e,u.createRecord(e,{type:u.ContentType.change_cipher_spec,data:u.createChangeCipherSpec()})),e.state.current.write=e.state.pending.write,e.state.pending=null,u.queue(e,u.createRecord(e,{type:u.ContentType.handshake,data:u.createFinished(e)}))),e.expect=c?b:S,e.handshaking=!1,++e.handshakes,e.peerCertificate=c?e.session.serverCertificate:e.session.clientCertificate,u.flush(e),e.isConnected=!0,e.connected(e),e.process()},u.handleAlert=function(e,t){var r,n=t.fragment,i={level:n.getByte(),description:n.getByte()};switch(i.description){case u.Alert.Description.close_notify:r="Connection closed.";break;case u.Alert.Description.unexpected_message:r="Unexpected message.";break;case u.Alert.Description.bad_record_mac:r="Bad record MAC.";break;case u.Alert.Description.decryption_failed:r="Decryption failed.";break;case u.Alert.Description.record_overflow:r="Record overflow.";break;case u.Alert.Description.decompression_failure:r="Decompression failed.";break;case u.Alert.Description.handshake_failure:r="Handshake failure.";break;case u.Alert.Description.bad_certificate:r="Bad certificate.";break;case u.Alert.Description.unsupported_certificate:r="Unsupported certificate.";break;case u.Alert.Description.certificate_revoked:r="Certificate revoked.";break;case u.Alert.Description.certificate_expired:r="Certificate expired.";break;case u.Alert.Description.certificate_unknown:r="Certificate unknown.";break;case u.Alert.Description.illegal_parameter:r="Illegal parameter.";break;case u.Alert.Description.unknown_ca:r="Unknown certificate authority.";break;case u.Alert.Description.access_denied:r="Access denied.";break;case u.Alert.Description.decode_error:r="Decode error.";break;case u.Alert.Description.decrypt_error:r="Decrypt error.";break;case u.Alert.Description.export_restriction:r="Export restriction.";break;case u.Alert.Description.protocol_version:r="Unsupported protocol version.";break;case u.Alert.Description.insufficient_security:r="Insufficient security.";break;case u.Alert.Description.internal_error:r="Internal error.";break;case u.Alert.Description.user_canceled:r="User canceled.";break;case u.Alert.Description.no_renegotiation:r="Renegotiation not supported.";break;default:r="Unknown error."}if(i.description===u.Alert.Description.close_notify)return e.close();e.error(e,{message:r,send:!1,origin:e.entity===u.ConnectionEnd.client?"server":"client",alert:i}),e.process()},u.handleHandshake=function(e,t){var r=t.fragment,i=r.getByte(),o=r.getInt24();if(o>r.length())return e.fragmented=t,t.fragment=n.util.createBuffer(),r.read-=4,e.process();e.fragmented=null,r.read-=4;var s=r.bytes(o+4);r.read+=4,i in U[e.entity][e.expect]?(e.entity!==u.ConnectionEnd.server||e.open||e.fail||(e.handshaking=!0,e.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:n.md.md5.create(),sha1:n.md.sha1.create()}),i!==u.HandshakeType.hello_request&&i!==u.HandshakeType.certificate_verify&&i!==u.HandshakeType.finished&&(e.session.md5.update(s),e.session.sha1.update(s)),U[e.entity][e.expect][i](e,t,o)):u.handleUnexpected(e,t)},u.handleApplicationData=function(e,t){e.data.putBuffer(t.fragment),e.dataReady(e),e.process()},u.handleHeartbeat=function(e,t){var r=t.fragment,i=r.getByte(),o=r.getInt16(),s=r.getBytes(o);if(i===u.HeartbeatMessageType.heartbeat_request){if(e.handshaking||o>s.length)return e.process();u.queue(e,u.createRecord(e,{type:u.ContentType.heartbeat,data:u.createHeartbeat(u.HeartbeatMessageType.heartbeat_response,s)})),u.flush(e)}else if(i===u.HeartbeatMessageType.heartbeat_response){if(s!==e.expectedHeartbeatPayload)return e.process();e.heartbeatReceived&&e.heartbeatReceived(e,n.util.createBuffer(s))}e.process()};var f=1,l=2,h=3,p=4,d=5,g=6,b=7,m=8,y=1,v=2,w=3,A=4,_=5,S=6,E=u.handleUnexpected,k=u.handleChangeCipherSpec,x=u.handleAlert,C=u.handleHandshake,I=u.handleApplicationData,B=u.handleHeartbeat,T=[];T[u.ConnectionEnd.client]=[[E,x,C,E,B],[E,x,C,E,B],[E,x,C,E,B],[E,x,C,E,B],[E,x,C,E,B],[k,x,E,E,B],[E,x,C,E,B],[E,x,C,I,B],[E,x,C,E,B]],T[u.ConnectionEnd.server]=[[E,x,C,E,B],[E,x,C,E,B],[E,x,C,E,B],[E,x,C,E,B],[k,x,E,E,B],[E,x,C,E,B],[E,x,C,I,B],[E,x,C,E,B]];var R=u.handleHelloRequest,P=u.handleServerHello,O=u.handleCertificate,M=u.handleServerKeyExchange,N=u.handleCertificateRequest,D=u.handleServerHelloDone,K=u.handleFinished,U=[];U[u.ConnectionEnd.client]=[[E,E,P,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[R,E,E,E,E,E,E,E,E,E,E,O,M,N,D,E,E,E,E,E,E],[R,E,E,E,E,E,E,E,E,E,E,E,M,N,D,E,E,E,E,E,E],[R,E,E,E,E,E,E,E,E,E,E,E,E,N,D,E,E,E,E,E,E],[R,E,E,E,E,E,E,E,E,E,E,E,E,E,D,E,E,E,E,E,E],[R,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[R,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,K],[R,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[R,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E]];var j=u.handleClientHello,F=u.handleClientKeyExchange,L=u.handleCertificateVerify;U[u.ConnectionEnd.server]=[[E,j,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,O,E,E,E,E,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,F,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,L,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,K],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E]],u.generateKeys=function(e,t){var r=i,n=t.client_random+t.server_random;e.session.resuming||(t.master_secret=r(t.pre_master_secret,"master secret",n,48).bytes(),t.pre_master_secret=null),n=t.server_random+t.client_random;var o=2*t.mac_key_length+2*t.enc_key_length,s=e.version.major===u.Versions.TLS_1_0.major&&e.version.minor===u.Versions.TLS_1_0.minor;s&&(o+=2*t.fixed_iv_length);var a=r(t.master_secret,"key expansion",n,o),c={client_write_MAC_key:a.getBytes(t.mac_key_length),server_write_MAC_key:a.getBytes(t.mac_key_length),client_write_key:a.getBytes(t.enc_key_length),server_write_key:a.getBytes(t.enc_key_length)};return s&&(c.client_write_IV=a.getBytes(t.fixed_iv_length),c.server_write_IV=a.getBytes(t.fixed_iv_length)),c},u.createConnectionState=function(e){var t=e.entity===u.ConnectionEnd.client,r=function(){var e={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(e){return!0},compressionState:null,compressFunction:function(e){return!0},updateSequenceNumber:function(){4294967295===e.sequenceNumber[1]?(e.sequenceNumber[1]=0,++e.sequenceNumber[0]):++e.sequenceNumber[1]}};return e},n={read:r(),write:r()};if(n.read.update=function(e,t){return n.read.cipherFunction(t,n.read)?n.read.compressFunction(e,t,n.read)||e.error(e,{message:"Could not decompress record.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.decompression_failure}}):e.error(e,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.bad_record_mac}}),!e.fail},n.write.update=function(e,t){return n.write.compressFunction(e,t,n.write)?n.write.cipherFunction(t,n.write)||e.error(e,{message:"Could not encrypt record.",send:!1,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}}):e.error(e,{message:"Could not compress record.",send:!1,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}}),!e.fail},e.session){var i=e.session.sp;switch(e.session.cipherSuite.initSecurityParameters(i),i.keys=u.generateKeys(e,i),n.read.macKey=t?i.keys.server_write_MAC_key:i.keys.client_write_MAC_key,n.write.macKey=t?i.keys.client_write_MAC_key:i.keys.server_write_MAC_key,e.session.cipherSuite.initConnectionState(n,e,i),i.compression_algorithm){case u.CompressionMethod.none:break;case u.CompressionMethod.deflate:n.read.compressFunction=s,n.write.compressFunction=o;break;default:throw new Error("Unsupported compression algorithm.")}}return n},u.createRandom=function(){var e=new Date,t=+e+6e4*e.getTimezoneOffset(),r=n.util.createBuffer();return r.putInt32(t),r.putBytes(n.random.getBytes(28)),r},u.createRecord=function(e,t){return t.data?{type:t.type,version:{major:e.version.major,minor:e.version.minor},length:t.data.length(),fragment:t.data}:null},u.createAlert=function(e,t){var r=n.util.createBuffer();return r.putByte(t.level),r.putByte(t.description),u.createRecord(e,{type:u.ContentType.alert,data:r})},u.createClientHello=function(e){e.session.clientHelloVersion={major:e.version.major,minor:e.version.minor};for(var t=n.util.createBuffer(),r=0;r0&&(d+=2);var g=e.session.id,b=g.length+1+2+4+28+2+o+1+a+d,m=n.util.createBuffer();return m.putByte(u.HandshakeType.client_hello),m.putInt24(b),m.putByte(e.version.major),m.putByte(e.version.minor),m.putBytes(e.session.sp.client_random),c(m,1,n.util.createBuffer(g)),c(m,2,t),c(m,1,s),d>0&&c(m,2,f),m},u.createServerHello=function(e){var t=e.session.id,r=t.length+1+2+4+28+2+1,i=n.util.createBuffer();return i.putByte(u.HandshakeType.server_hello),i.putInt24(r),i.putByte(e.version.major),i.putByte(e.version.minor),i.putBytes(e.session.sp.server_random),c(i,1,n.util.createBuffer(t)),i.putByte(e.session.cipherSuite.id[0]),i.putByte(e.session.cipherSuite.id[1]),i.putByte(e.session.compressionMethod),i},u.createCertificate=function(e){var t,r=e.entity===u.ConnectionEnd.client,i=null;e.getCertificate&&(t=r?e.session.certificateRequest:e.session.extensions.server_name.serverNameList,i=e.getCertificate(e,t));var o=n.util.createBuffer();if(null!==i)try{n.util.isArray(i)||(i=[i]);for(var s=null,a=0;au.MaxFragment;)i.push(u.createRecord(e,{type:t.type,data:n.util.createBuffer(o.slice(0,u.MaxFragment))})),o=o.slice(u.MaxFragment);o.length>0&&i.push(u.createRecord(e,{type:t.type,data:n.util.createBuffer(o)}))}for(var s=0;s0&&(i=r.order[0]),null!==i&&i in r.cache)for(var o in t=r.cache[i],delete r.cache[i],r.order)if(r.order[o]===i){r.order.splice(o,1);break}return t},r.setSession=function(e,t){if(r.order.length===r.capacity){var i=r.order.shift();delete r.cache[i]}i=n.util.bytesToHex(e);r.order.push(i),r.cache[i]=t}}return r},u.createConnection=function(e){var t=null;t=e.caStore?n.util.isArray(e.caStore)?n.pki.createCaStore(e.caStore):e.caStore:n.pki.createCaStore();var r=e.cipherSuites||null;if(null===r)for(var i in r=[],u.CipherSuites)r.push(u.CipherSuites[i]);var o=e.server?u.ConnectionEnd.server:u.ConnectionEnd.client,s=e.sessionCache?u.createSessionCache(e.sessionCache):null,a={version:{major:u.Version.major,minor:u.Version.minor},entity:o,sessionId:e.sessionId,caStore:t,sessionCache:s,cipherSuites:r,connected:e.connected,virtualHost:e.virtualHost||null,verifyClient:e.verifyClient||!1,verify:e.verify||function(e,t,r,n){return t},getCertificate:e.getCertificate||null,getPrivateKey:e.getPrivateKey||null,getSignature:e.getSignature||null,input:n.util.createBuffer(),tlsData:n.util.createBuffer(),data:n.util.createBuffer(),tlsDataReady:e.tlsDataReady,dataReady:e.dataReady,heartbeatReceived:e.heartbeatReceived,closed:e.closed,error:function(t,r){r.origin=r.origin||(t.entity===u.ConnectionEnd.client?"client":"server"),r.send&&(u.queue(t,u.createAlert(t,r.alert)),u.flush(t));var n=!1!==r.fatal;n&&(t.fail=!0),e.error(t,r),n&&t.close(!1)},deflate:e.deflate||null,inflate:e.inflate||null,reset:function(e){a.version={major:u.Version.major,minor:u.Version.minor},a.record=null,a.session=null,a.peerCertificate=null,a.state={pending:null,current:null},a.expect=(a.entity,u.ConnectionEnd.client,0),a.fragmented=null,a.records=[],a.open=!1,a.handshakes=0,a.handshaking=!1,a.isConnected=!1,a.fail=!(e||void 0===e),a.input.clear(),a.tlsData.clear(),a.data.clear(),a.state.current=u.createConnectionState(a)}};a.reset();return a.handshake=function(e){if(a.entity!==u.ConnectionEnd.client)a.error(a,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(a.handshaking)a.error(a,{message:"Handshake already in progress.",fatal:!1});else{a.fail&&!a.open&&0===a.handshakes&&(a.fail=!1),a.handshaking=!0;var t=null;(e=e||"").length>0&&(a.sessionCache&&(t=a.sessionCache.getSession(e)),null===t&&(e="")),0===e.length&&a.sessionCache&&null!==(t=a.sessionCache.getSession())&&(e=t.id),a.session={id:e,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:n.md.md5.create(),sha1:n.md.sha1.create()},t&&(a.version=t.version,a.session.sp=t.sp),a.session.sp.client_random=u.createRandom().getBytes(),a.open=!0,u.queue(a,u.createRecord(a,{type:u.ContentType.handshake,data:u.createClientHello(a)})),u.flush(a)}},a.process=function(e){var t=0;return e&&a.input.putBytes(e),a.fail||(null!==a.record&&a.record.ready&&a.record.fragment.isEmpty()&&(a.record=null),null===a.record&&(t=function(e){var t=0,r=e.input,i=r.length();if(i<5)t=5-i;else{e.record={type:r.getByte(),version:{major:r.getByte(),minor:r.getByte()},length:r.getInt16(),fragment:n.util.createBuffer(),ready:!1};var o=e.record.version.major===e.version.major;o&&e.session&&e.session.version&&(o=e.record.version.minor===e.version.minor),o||e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.protocol_version}})}return t}(a)),a.fail||null===a.record||a.record.ready||(t=function(e){var t=0,r=e.input,n=r.length();n=0;c--)B>>=8,B+=k.at(c)+I.at(c),I.setAt(c,255&B);C.putBuffer(I)}w=C,l.putBuffer(S)}return l.truncate(l.length()-o),l},s.pbe.getCipher=function(e,t,r){switch(e){case s.oids.pkcs5PBES2:return s.pbe.getCipherForPBES2(e,t,r);case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case s.oids["pbewithSHAAnd40BitRC2-CBC"]:return s.pbe.getCipherForPKCS12PBE(e,t,r);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=e,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}},s.pbe.getCipherForPBES2=function(e,t,r){var i,a={},c=[];if(!o.validate(t,u,a,c))throw(i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=c,i;if((e=o.derToOid(a.kdfOid))!==s.oids.pkcs5PBKDF2)throw(i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.")).oid=e,i.supportedOids=["pkcs5PBKDF2"],i;if((e=o.derToOid(a.encOid))!==s.oids["aes128-CBC"]&&e!==s.oids["aes192-CBC"]&&e!==s.oids["aes256-CBC"]&&e!==s.oids["des-EDE3-CBC"]&&e!==s.oids.desCBC)throw(i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.")).oid=e,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i;var f,l,p=a.kdfSalt,d=n.util.createBuffer(a.kdfIterationCount);switch(d=d.getInt(d.length()<<3),s.oids[e]){case"aes128-CBC":f=16,l=n.aes.createDecryptionCipher;break;case"aes192-CBC":f=24,l=n.aes.createDecryptionCipher;break;case"aes256-CBC":f=32,l=n.aes.createDecryptionCipher;break;case"des-EDE3-CBC":f=24,l=n.des.createDecryptionCipher;break;case"desCBC":f=8,l=n.des.createDecryptionCipher}var g=h(a.prfOid),b=n.pkcs5.pbkdf2(r,p,d,f,g),m=a.encIv,y=l(b);return y.start(m),y},s.pbe.getCipherForPKCS12PBE=function(e,t,r){var i={},a=[];if(!o.validate(t,f,i,a))throw(g=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=a,g;var c,u,l,p=n.util.createBuffer(i.salt),d=n.util.createBuffer(i.iterations);switch(d=d.getInt(d.length()<<3),e){case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:c=24,u=8,l=n.des.startDecrypting;break;case s.oids["pbewithSHAAnd40BitRC2-CBC"]:c=5,u=8,l=function(e,t){var r=n.rc2.createDecryptionCipher(e,40);return r.start(t,null),r};break;default:var g;throw(g=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.")).oid=e,g}var b=h(i.prfOid),m=s.pbe.generatePkcs12Key(r,p,1,d,c,b);return b.start(),l(m,s.pbe.generatePkcs12Key(r,p,2,d,u,b))},s.pbe.opensslDeriveBytes=function(e,t,r,i){if(null==i){if(!("md5"in n.md))throw new Error('"md5" hash algorithm unavailable.');i=n.md.md5.create()}null===t&&(t="");for(var o=[l(i,e+t)],s=16,a=1;s>>0,a>>>0];for(var u=i.fullMessageLength.length-1;u>=0;--u)i.fullMessageLength[u]+=a[1],a[1]=a[0]+(i.fullMessageLength[u]/4294967296>>>0),i.fullMessageLength[u]=i.fullMessageLength[u]>>>0,a[0]=a[1]/4294967296>>>0;return t.putBytes(o),c(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(t.bytes());var a,u=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(o.substr(0,i.blockLength-u));for(var f=8*i.fullMessageLength[0],l=0;l>>0,s.putInt32(f>>>0),f=a>>>0;s.putInt32(f);var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};c(h,r,s);var p=n.util.createBuffer();return p.putInt32(h.h0),p.putInt32(h.h1),p.putInt32(h.h2),p.putInt32(h.h3),p.putInt32(h.h4),p.putInt32(h.h5),p.putInt32(h.h6),p.putInt32(h.h7),p},i};var o=null,s=!1,a=null;function c(e,t,r){for(var n,i,o,s,c,u,f,l,h,p,d,g,b,m=r.length();m>=64;){for(c=0;c<16;++c)t[c]=r.getInt32();for(;c<64;++c)n=((n=t[c-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,i=((i=t[c-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,t[c]=n+t[c-7]+i+t[c-16]|0;for(u=e.h0,f=e.h1,l=e.h2,h=e.h3,p=e.h4,d=e.h5,g=e.h6,b=e.h7,c=0;c<64;++c)o=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),s=u&f|l&(u^f),n=b+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(g^p&(d^g))+a[c]+t[c],b=g,g=d,d=p,p=h+n>>>0,h=l,l=f,f=u,u=n+(i=o+s)>>>0;e.h0=e.h0+u|0,e.h1=e.h1+f|0,e.h2=e.h2+l|0,e.h3=e.h3+h|0,e.h4=e.h4+p|0,e.h5=e.h5+d|0,e.h6=e.h6+g|0,e.h7=e.h7+b|0,m-=64}}},function(e,t,r){(function(t){var n=r(8);r(13);var i=null;!n.util.isNodejs||n.options.usePureJavaScript||t.versions["node-webkit"]||(i=r(247)),(e.exports=n.prng=n.prng||{}).create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=e.md,o=new Array(32),s=0;s<32;++s)o[s]=r.create();function a(){if(t.pools[0].messageLength>=32)return c();var e=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(e)),c()}function c(){t.reseeds=4294967295===t.reseeds?0:t.reseeds+1;var e=t.plugin.md.create();e.update(t.keyBytes);for(var r=1,n=0;n<32;++n)t.reseeds%r==0&&(e.update(t.pools[n].digest().getBytes()),t.pools[n].start()),r<<=1;t.keyBytes=e.digest().getBytes(),e.start(),e.update(t.keyBytes);var i=e.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(i),t.generated=0}function u(e){var t=null;if("undefined"!=typeof window){var r=window.crypto||window.msCrypto;r&&r.getRandomValues&&(t=function(e){return r.getRandomValues(e)})}var i=n.util.createBuffer();if(t)for(;i.length()>16)))<<16,l=4294967295&(u=(2147483647&(u+=c>>15))+(u>>31));for(a=0;a<3;++a)f=l>>>(a<<3),f^=Math.floor(256*Math.random()),i.putByte(String.fromCharCode(255&f))}return i.getBytes(e)}return t.pools=o,t.pool=0,t.generate=function(e,r){if(!r)return t.generateSync(e);var i=t.plugin.cipher,o=t.plugin.increment,s=t.plugin.formatKey,a=t.plugin.formatSeed,u=n.util.createBuffer();t.key=null,function f(l){if(l)return r(l);if(u.length()>=e)return r(null,u.getBytes(e));t.generated>1048575&&(t.key=null);if(null===t.key)return n.util.nextTick(function(){!function(e){if(t.pools[0].messageLength>=32)return c(),e();var r=32-t.pools[0].messageLength<<5;t.seedFile(r,function(r,n){if(r)return e(r);t.collect(n),c(),e()})}(f)});var h=i(t.key,t.seed);t.generated+=h.length;u.putBytes(h);t.key=s(i(t.key,o(t.seed)));t.seed=a(i(t.key,t.seed));n.util.setImmediate(f)}()},t.generateSync=function(e){var r=t.plugin.cipher,i=t.plugin.increment,o=t.plugin.formatKey,s=t.plugin.formatSeed;t.key=null;for(var c=n.util.createBuffer();c.length()1048575&&(t.key=null),null===t.key&&a();var u=r(t.key,t.seed);t.generated+=u.length,c.putBytes(u),t.key=o(r(t.key,i(t.seed))),t.seed=s(r(t.key,t.seed))}return c.getBytes(e)},i?(t.seedFile=function(e,t){i.randomBytes(e,function(e,r){if(e)return t(e);t(null,r.toString())})},t.seedFileSync=function(e){return i.randomBytes(e).toString()}):(t.seedFile=function(e,t){try{t(null,u(e))}catch(e){t(e)}},t.seedFileSync=u),t.collect=function(e){for(var r=e.length,n=0;n>i&255);t.collect(n)},t.registerWorker=function(e){if(e===self)t.seedFile=function(e,t){self.addEventListener("message",function e(r){var n=r.data;n.forge&&n.forge.prng&&(self.removeEventListener("message",e),t(n.forge.prng.err,n.forge.prng.bytes))}),self.postMessage({forge:{prng:{needed:e}}})};else{e.addEventListener("message",function(r){var n=r.data;n.forge&&n.forge.prng&&t.seedFile(n.forge.prng.needed,function(t,r){e.postMessage({forge:{prng:{err:t,bytes:r}}})})})}},t}}).call(this,r(6))},function(e,t,r){var n=r(8);r(13);var i=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],o=[1,2,3,5];e.exports=n.rc2=n.rc2||{},n.rc2.expandKey=function(e,t){"string"==typeof e&&(e=n.util.createBuffer(e)),t=t||128;var r,o=e,s=e.length(),a=t,c=Math.ceil(a/8),u=255>>(7&a);for(r=s;r<128;r++)o.putByte(i[o.at(r-1)+o.at(r-s)&255]);for(o.setAt(128-c,i[o.at(128-c)&u]),r=127-c;r>=0;r--)o.setAt(r,i[o.at(r+1)^o.at(r+c)]);return o};var s=function(e,t,r){var i,s,a,c,u=!1,f=null,l=null,h=null,p=[];for(e=n.rc2.expandKey(e,t),a=0;a<64;a++)p.push(e.getInt16Le());r?(i=function(e){for(a=0;a<4;a++)e[a]+=p[c]+(e[(a+3)%4]&e[(a+2)%4])+(~e[(a+3)%4]&e[(a+1)%4]),e[a]=(t=e[a])<<(r=o[a])&65535|(65535&t)>>16-r,c++;var t,r},s=function(e){for(a=0;a<4;a++)e[a]+=p[63&e[(a+3)%4]]}):(i=function(e){for(a=3;a>=0;a--)e[a]=(65535&(t=e[a]))>>(r=o[a])|t<<16-r&65535,e[a]-=p[c]+(e[(a+3)%4]&e[(a+2)%4])+(~e[(a+3)%4]&e[(a+1)%4]),c--;var t,r},s=function(e){for(a=3;a>=0;a--)e[a]-=p[63&e[(a+3)%4]]});var d=function(e){var t=[];for(a=0;a<4;a++){var n=f.getInt16Le();null!==h&&(r?n^=h.getInt16Le():h.putInt16Le(n)),t.push(65535&n)}c=r?0:63;for(var i=0;i=8;)d([[5,i],[1,s],[6,i],[1,s],[5,i]])},finish:function(e){var t=!0;if(r)if(e)t=e(8,f,!r);else{var n=8===f.length()?8:8-f.length();f.fillWithByte(n,n)}if(t&&(u=!0,g.update()),!r&&(t=0===f.length()))if(e)t=e(8,l,!r);else{var i=l.length(),o=l.at(i-1);o>i?t=!1:l.truncate(o)}return t}}};n.rc2.startEncrypting=function(e,t,r){var i=n.rc2.createEncryptionCipher(e,128);return i.start(t,r),i},n.rc2.createEncryptionCipher=function(e,t){return s(e,t,!0)},n.rc2.startDecrypting=function(e,t,r){var i=n.rc2.createDecryptionCipher(e,128);return i.start(t,r),i},n.rc2.createDecryptionCipher=function(e,t){return s(e,t,!1)}},function(e,t,r){var n=r(8);r(13),r(43),r(110);var i=e.exports=n.pkcs1=n.pkcs1||{};function o(e,t,r){r||(r=n.md.sha1.create());for(var i="",o=Math.ceil(t/r.digestLength),s=0;s>24&255,s>>16&255,s>>8&255,255&s);r.start(),r.update(e+a),i+=r.digest().getBytes()}return i.substring(0,t)}i.encode_rsa_oaep=function(e,t,r){var i,s,a,c;"string"==typeof r?(i=r,s=arguments[3]||void 0,a=arguments[4]||void 0):r&&(i=r.label||void 0,s=r.seed||void 0,a=r.md||void 0,r.mgf1&&r.mgf1.md&&(c=r.mgf1.md)),a?a.start():a=n.md.sha1.create(),c||(c=a);var u=Math.ceil(e.n.bitLength()/8),f=u-2*a.digestLength-2;if(t.length>f)throw(b=new Error("RSAES-OAEP input message length is too long.")).length=t.length,b.maxLength=f,b;i||(i=""),a.update(i,"raw");for(var l=a.digest(),h="",p=f-t.length,d=0;de&&(s=c(e,t));var p=s.toString(16);i.target.postMessage({hex:p,workLoad:f}),s.dAddOffset(l,0)}}}p()}(e,t,i,o);return a(e,t,i,o)}(e,u,o.options,i);throw new Error("Invalid prime generation algorithm: "+o.name)}}function a(e,t,r,o){var s=c(e,t),a=function(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}(s.bitLength());"millerRabinTests"in r&&(a=r.millerRabinTests);var u=10;"maxBlockTime"in r&&(u=r.maxBlockTime),function e(t,r,o,s,a,u,f){var l=+new Date;do{if(t.bitLength()>r&&(t=c(r,o)),t.isProbablePrime(a))return f(null,t);t.dAddOffset(i[s++%8],0)}while(u<0||+new Date-l=0&&i.push(a):i.push(a))}return i}function p(e){if(e.composed||e.constructed){for(var t=n.util.createBuffer(),r=0;r0&&(c=i.create(i.Class.UNIVERSAL,i.Type.SET,!0,l));var h=[],p=[];null!==t&&(p=n.util.isArray(t)?t:[t]);for(var d=[],g=0;g0){var v=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,d),w=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(v).getBytes())])]);h.push(w)}var A=null;if(null!==e){var _=o.wrapRsaPrivateKey(o.privateKeyToAsn1(e));A=null===r?i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.keyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[_]),c]):i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.pkcs8ShroudedKeyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[o.encryptPrivateKeyInfo(_,r,a)]),c]);var S=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[A]),E=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(S).getBytes())])]);h.push(E)}var k,x=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,h);if(a.useMac){var C=n.md.sha1.create(),I=new n.util.ByteBuffer(n.random.getBytes(a.saltSize)),B=a.count,T=(e=s.generateKey(r,I,3,B,20),n.hmac.create());T.start(C,e),T.update(i.toDer(x).getBytes());var R=T.getMac();k=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.sha1).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,R.getBytes())]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,I.getBytes()),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(B).getBytes())])}return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(3).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(x).getBytes())])]),k])},s.generateKey=n.pbe.generatePkcs12Key},function(e,t,r){var n=r(8);r(59),r(13);var i=n.asn1,o=e.exports=n.pkcs7asn1=n.pkcs7asn1||{};n.pkcs7=n.pkcs7||{},n.pkcs7.asn1=o;var s={name:"ContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};o.contentInfoValidator=s;var a={name:"EncryptedContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};o.envelopedDataValidator={name:"EnvelopedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(a)},o.encryptedDataValidator={name:"EncryptedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"}].concat(a)};var c={name:"SignerInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};o.signedDataValidator={name:"SignedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},s,{name:"SignedData.Certificates",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,capture:"signerInfos",optional:!0,value:[c]}]},o.recipientInfoValidator={name:"RecipientInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}},function(e,t,r){var n=r(8);r(13),n.mgf=n.mgf||{},(e.exports=n.mgf.mgf1=n.mgf1=n.mgf1||{}).create=function(e){return{generate:function(t,r){for(var i=new n.util.ByteBuffer,o=Math.ceil(r/e.digestLength),s=0;s>>0,s>>>0];for(var a=p.fullMessageLength.length-1;a>=0;--a)p.fullMessageLength[a]+=s[1],s[1]=s[0]+(p.fullMessageLength[a]/4294967296>>>0),p.fullMessageLength[a]=p.fullMessageLength[a]>>>0,s[0]=s[1]/4294967296>>>0;return i.putBytes(e),f(r,o,i),(i.read>2048||0===i.length())&&i.compact(),p},p.digest=function(){var t=n.util.createBuffer();t.putBytes(i.bytes());var a,c=p.fullMessageLength[p.fullMessageLength.length-1]+p.messageLengthSize&p.blockLength-1;t.putBytes(s.substr(0,p.blockLength-c));for(var u=8*p.fullMessageLength[0],l=0;l>>0,t.putInt32(u>>>0),u=a>>>0;t.putInt32(u);var h=new Array(r.length);for(l=0;l=128;){for(T=0;T<16;++T)t[T][0]=r.getInt32()>>>0,t[T][1]=r.getInt32()>>>0;for(;T<80;++T)n=(((R=(O=t[T-2])[0])>>>19|(P=O[1])<<13)^(P>>>29|R<<3)^R>>>6)>>>0,i=((R<<13|P>>>19)^(P<<3|R>>>29)^(R<<26|P>>>6))>>>0,o=(((R=(N=t[T-15])[0])>>>1|(P=N[1])<<31)^(R>>>8|P<<24)^R>>>7)>>>0,s=((R<<31|P>>>1)^(R<<24|P>>>8)^(R<<25|P>>>7))>>>0,M=t[T-7],D=t[T-16],P=i+M[1]+s+D[1],t[T][0]=n+M[0]+o+D[0]+(P/4294967296>>>0)>>>0,t[T][1]=P>>>0;for(d=e[0][0],g=e[0][1],b=e[1][0],m=e[1][1],y=e[2][0],v=e[2][1],w=e[3][0],A=e[3][1],_=e[4][0],S=e[4][1],E=e[5][0],k=e[5][1],x=e[6][0],C=e[6][1],I=e[7][0],B=e[7][1],T=0;T<80;++T)f=((_>>>14|S<<18)^(_>>>18|S<<14)^(S>>>9|_<<23))>>>0,l=(x^_&(E^x))>>>0,a=((d>>>28|g<<4)^(g>>>2|d<<30)^(g>>>7|d<<25))>>>0,u=((d<<4|g>>>28)^(g<<30|d>>>2)^(g<<25|d>>>7))>>>0,h=(d&b|y&(d^b))>>>0,p=(g&m|v&(g^m))>>>0,P=B+(((_<<18|S>>>14)^(_<<14|S>>>18)^(S<<23|_>>>9))>>>0)+((C^S&(k^C))>>>0)+c[T][1]+t[T][1],n=I+f+l+c[T][0]+t[T][0]+(P/4294967296>>>0)>>>0,i=P>>>0,o=a+h+((P=u+p)/4294967296>>>0)>>>0,s=P>>>0,I=x,B=C,x=E,C=k,E=_,k=S,_=w+n+((P=A+i)/4294967296>>>0)>>>0,S=P>>>0,w=y,A=v,y=b,v=m,b=d,m=g,d=n+o+((P=i+s)/4294967296>>>0)>>>0,g=P>>>0;P=e[0][1]+g,e[0][0]=e[0][0]+d+(P/4294967296>>>0)>>>0,e[0][1]=P>>>0,P=e[1][1]+m,e[1][0]=e[1][0]+b+(P/4294967296>>>0)>>>0,e[1][1]=P>>>0,P=e[2][1]+v,e[2][0]=e[2][0]+y+(P/4294967296>>>0)>>>0,e[2][1]=P>>>0,P=e[3][1]+A,e[3][0]=e[3][0]+w+(P/4294967296>>>0)>>>0,e[3][1]=P>>>0,P=e[4][1]+S,e[4][0]=e[4][0]+_+(P/4294967296>>>0)>>>0,e[4][1]=P>>>0,P=e[5][1]+k,e[5][0]=e[5][0]+E+(P/4294967296>>>0)>>>0,e[5][1]=P>>>0,P=e[6][1]+C,e[6][0]=e[6][0]+x+(P/4294967296>>>0)>>>0,e[6][1]=P>>>0,P=e[7][1]+B,e[7][0]=e[7][0]+I+(P/4294967296>>>0)>>>0,e[7][1]=P>>>0,K-=128}}},function(e,t,r){var n=r(8);r(13),e.exports=n.log=n.log||{},n.log.levels=["none","error","warning","info","debug","verbose","max"];var i={},o=[],s=null;n.log.LEVEL_LOCKED=2,n.log.NO_LEVEL_CHECK=4,n.log.INTERPOLATE=8;for(var a=0;a{if(e)return i(e);i(null,n.encode(o,t,r))})}e.exports=o,o.Buffer=t,o.multihash=n,o.digest=function(e,t,r,n){if("function"==typeof r&&(n=r,r=void 0),!n)throw new Error("Missing callback");let i,s=n;r&&(s=((e,t)=>{if(e)return n(e);n(null,t.slice(0,r))}));try{i=o.createHash(t)}catch(e){return s(e)}i(e,s)},o.createHash=function(e){if(e=n.coerceCode(e),!o.functions[e])throw new Error("multihash function "+e+" not yet supported");return o.functions[e]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(7);t.toCallback=(e=>(function(t,r){const i=(e,t)=>n(()=>{r(e,t)});let o;try{o=e(t)}catch(e){return void i(e)}i(null,o)})),t.toBuf=((t,r)=>n=>{let i=t(n,r);return e.from(i,"hex")}),t.fromString=((t,r)=>n=>{const i=e.isBuffer(n)?n.toString():n;return t(i,r)}),t.fromNumberTo32BitBuf=((t,r)=>n=>{let i=t(n,r);const o=new Array(4);for(let e=0;e<4;e++)o[e]=255&i,i>>=8;return e.from(o)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(164),i=r(165)();function o(e){return Promise.all([i.subtle.exportKey("jwk",e.privateKey),i.subtle.exportKey("jwk",e.publicKey)])}t.utils=r(493),t.generateKey=function(e,t){n(i.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(o).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.unmarshalPrivateKey=function(e,t){const r=i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);var s;n(Promise.all([r,(s=e,i.subtle.importKey("jwk",{kty:s.kty,n:s.n,e:s.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]))]).then(e=>o({privateKey:e[0],publicKey:e[1]})).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.getRandomValues=function(t){return e.from(i.getRandomValues(t))},t.hashAndSign=function(t,r,o){n(i.subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]).then(e=>i.subtle.sign({name:"RSASSA-PKCS1-v1_5"},e,Uint8Array.from(r))).then(t=>e.from(t)),o)},t.hashAndVerify=function(e,t,r,o){n(i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]).then(e=>i.subtle.verify({name:"RSASSA-PKCS1-v1_5"},e,t,r)),o)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(4),i=r(111).Reporter,o=r(0).Buffer;function s(e,t){i.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function a(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof a||(e=new a(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(s,i),t.DecoderBuffer=s,s.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},s.prototype.restore=function(e){const t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.EncoderBuffer=a,a.prototype.join=function(e,t){return e||(e=new o(this.length)),t||(t=0),0===this.length?e:(Array.isArray(this.value)?this.value.forEach(function(r){r.join(e,t),t+=r.length}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length),e)}},function(e,t,r){"use strict";const n=t;n._reverse=function(e){const t={};return Object.keys(e).forEach(function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r}),t},n.der=r(499)},function(e,t,r){"use strict";const n=r(4),i=r(21),o=i.base,s=i.bignum,a=i.constants.der;function c(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}function u(e){o.Node.call(this,"der",e)}function f(e,t){let r=e.readUInt8(t);if(e.isError(r))return r;const n=a.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){let n=r;for(r=0;128==(128&n);){if(n=e.readUInt8(t),e.isError(n))return n;r<<=7,r|=127&n}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:a.tag[r]}}function l(e,t,r){let n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;const i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(let t=0;t=31)return n.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=a.tagClassByName[r||"universal"]<<6}(e,t,r,this.reporter);if(n.length<128){const e=new i(2);return e[0]=o,e[1]=n.length,this._createEncoderBuffer([e,n])}let s=1;for(let e=n.length;e>=256;e>>=8)s++;const c=new i(2+s);c[0]=o,c[1]=128|s;for(let e=1+s,t=n.length;t>0;e--,t>>=8)c[e]=255&t;return this._createEncoderBuffer([c,n])},u.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=new i(2*e.length);for(let r=0;r=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let n=0;for(let t=0;t=128;r>>=7)n++}const o=new i(n);let s=o.length-1;for(let t=e.length-1;t>=0;t--){let r=e[t];for(o[s--]=127&r;(r>>=7)>0;)o[s--]=128|127&r}return this._createEncoderBuffer(o)},u.prototype._encodeTime=function(e,t){let r;const n=new Date(e);return"gentime"===t?r=[f(n.getUTCFullYear()),f(n.getUTCMonth()+1),f(n.getUTCDate()),f(n.getUTCHours()),f(n.getUTCMinutes()),f(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[f(n.getUTCFullYear()%100),f(n.getUTCMonth()+1),f(n.getUTCDate()),f(n.getUTCHours()),f(n.getUTCMinutes()),f(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=new i(t)}if(i.isBuffer(e)){let t=e.length;0===e.length&&t++;const r=new i(t);return e.copy(r),0===e.length&&(r[0]=0),this._createEncoderBuffer(r)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let r=1;for(let t=e;t>=256;t>>=8)r++;const n=new Array(r);for(let t=n.length-1;t>=0;t--)n[t]=255&e,e>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(new i(n))},u.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},u.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},u.prototype._skipDefault=function(e,t,r){const n=this._baseState;let i;if(null===n.default)return!1;const o=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,r).join()),o.length!==n.defaultBuffer.length)return!1;for(i=0;i{if(e)return i(e);i(null,n.encode(o,t,r))})}e.exports=o,o.Buffer=t,o.multihash=n,o.digest=function(e,t,r,n){if("function"==typeof r&&(n=r,r=void 0),!n)throw new Error("Missing callback");let i,s=n;r&&(s=((e,t)=>{if(e)return n(e);n(null,t.slice(0,r))}));try{i=o.createHash(t)}catch(e){return s(e)}i(e,s)},o.createHash=function(e){if(e=n.coerceCode(e),!o.functions[e])throw new Error("multihash function "+e+" not yet supported");return o.functions[e]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(7);t.toCallback=(e=>(function(t,r){const i=(e,t)=>n(()=>{r(e,t)});let o;try{o=e(t)}catch(e){return void i(e)}i(null,o)})),t.toBuf=((t,r)=>n=>{let i=t(n,r);return e.from(i,"hex")}),t.fromString=((t,r)=>n=>{const i=e.isBuffer(n)?n.toString():n;return t(i,r)}),t.fromNumberTo32BitBuf=((t,r)=>n=>{let i=t(n,r);const o=new Array(4);for(let e=0;e<4;e++)o[e]=255&i,i>>=8;return e.from(o)})}).call(this,r(0).Buffer)},function(e,t,r){var n=r(3).Buffer;e.exports={check:function(e){if(e.length<8)return!1;if(e.length>72)return!1;if(48!==e[0])return!1;if(e[1]!==e.length-2)return!1;if(2!==e[2])return!1;var t=e[3];if(0===t)return!1;if(5+t>=e.length)return!1;if(2!==e[4+t])return!1;var r=e[5+t];return!(0===r||6+t+r!==e.length||128&e[4]||t>1&&0===e[4]&&!(128&e[5])||128&e[t+6]||r>1&&0===e[t+6]&&!(128&e[t+7]))},decode:function(e){if(e.length<8)throw new Error("DER sequence length is too short");if(e.length>72)throw new Error("DER sequence length is too long");if(48!==e[0])throw new Error("Expected DER sequence");if(e[1]!==e.length-2)throw new Error("DER sequence length is invalid");if(2!==e[2])throw new Error("Expected DER integer");var t=e[3];if(0===t)throw new Error("R length is zero");if(5+t>=e.length)throw new Error("R length is too long");if(2!==e[4+t])throw new Error("Expected DER integer (2)");var r=e[5+t];if(0===r)throw new Error("S length is zero");if(6+t+r!==e.length)throw new Error("S length is invalid");if(128&e[4])throw new Error("R value is negative");if(t>1&&0===e[4]&&!(128&e[5]))throw new Error("R value excessively padded");if(128&e[t+6])throw new Error("S value is negative");if(r>1&&0===e[t+6]&&!(128&e[t+7]))throw new Error("S value excessively padded");return{r:e.slice(4,4+t),s:e.slice(6+t)}},encode:function(e,t){var r=e.length,i=t.length;if(0===r)throw new Error("R length is zero");if(0===i)throw new Error("S length is zero");if(r>33)throw new Error("R length is too long");if(i>33)throw new Error("S length is too long");if(128&e[0])throw new Error("R value is negative");if(128&t[0])throw new Error("S value is negative");if(r>1&&0===e[0]&&!(128&e[1]))throw new Error("R value excessively padded");if(i>1&&0===t[0]&&!(128&t[1]))throw new Error("S value excessively padded");var o=n.allocUnsafe(6+r+i);return o[0]=48,o[1]=o.length-2,o[2]=2,o[3]=e.length,e.copy(o,4),o[4+r]=2,o[5+r]=t.length,t.copy(o,6+r),o}}},function(e,t,r){"use strict";var n=r(0).Buffer,i=r(4),o=r(242),s=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],l=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function p(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function d(e,t){return e<>>32-t}function g(e,t,r,n,i,o,s,a){return d(e+(t^r^n)+o+s|0,a)+i|0}function b(e,t,r,n,i,o,s,a){return d(e+(t&r|~t&n)+o+s|0,a)+i|0}function m(e,t,r,n,i,o,s,a){return d(e+((t|~r)^n)+o+s|0,a)+i|0}function y(e,t,r,n,i,o,s,a){return d(e+(t&n|r&~n)+o+s|0,a)+i|0}function v(e,t,r,n,i,o,s,a){return d(e+(t^(r|~n))+o+s|0,a)+i|0}i(p,o),p.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,p=0|this._e,w=0|this._a,A=0|this._b,_=0|this._c,S=0|this._d,E=0|this._e,k=0;k<80;k+=1){var x,C;k<16?(x=g(r,n,i,o,p,e[a[k]],l[0],u[k]),C=v(w,A,_,S,E,e[c[k]],h[0],f[k])):k<32?(x=b(r,n,i,o,p,e[a[k]],l[1],u[k]),C=y(w,A,_,S,E,e[c[k]],h[1],f[k])):k<48?(x=m(r,n,i,o,p,e[a[k]],l[2],u[k]),C=m(w,A,_,S,E,e[c[k]],h[2],f[k])):k<64?(x=y(r,n,i,o,p,e[a[k]],l[3],u[k]),C=b(w,A,_,S,E,e[c[k]],h[3],f[k])):(x=v(r,n,i,o,p,e[a[k]],l[4],u[k]),C=g(w,A,_,S,E,e[c[k]],h[4],f[k])),r=p,p=o,o=d(i,10),i=n,n=x,w=E,E=S,S=d(_,10),_=A,A=C}var I=this._b+i+S|0;this._b=this._c+o+E|0,this._c=this._d+p+w|0,this._d=this._e+r+A|0,this._e=this._a+n+_|0,this._a=I},p.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=p},function(e,t,r){(t=e.exports=function(e){e=e.toLowerCase();var r=t[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r}).sha=r(515),t.sha1=r(516),t.sha224=r(517),t.sha256=r(272),t.sha384=r(518),t.sha512=r(273)},function(e,t,r){var n=r(4),i=r(94),o=r(3).Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function c(){this.init(),this._w=a,i.call(this,64,56)}function u(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function l(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function h(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function p(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(c,i),c.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,c=0|this._e,d=0|this._f,g=0|this._g,b=0|this._h,m=0;m<16;++m)r[m]=e.readInt32BE(4*m);for(;m<64;++m)r[m]=0|(((t=r[m-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[m-7]+p(r[m-15])+r[m-16];for(var y=0;y<64;++y){var v=b+h(c)+u(c,d,g)+s[y]+r[y]|0,w=l(n)+f(n,i,o)|0;b=g,g=d,d=c,c=a+v|0,a=o,o=i,i=n,n=v+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=c+this._e|0,this._f=d+this._f|0,this._g=g+this._g|0,this._h=b+this._h|0},c.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=c},function(e,t,r){var n=r(4),i=r(94),o=r(3).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function c(){this.init(),this._w=a,i.call(this,128,112)}function u(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function l(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function h(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function m(e,t){return e>>>0>>0?1:0}n(c,i),c.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},c.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,c=0|this._fh,y=0|this._gh,v=0|this._hh,w=0|this._al,A=0|this._bl,_=0|this._cl,S=0|this._dl,E=0|this._el,k=0|this._fl,x=0|this._gl,C=0|this._hl,I=0;I<32;I+=2)t[I]=e.readInt32BE(4*I),t[I+1]=e.readInt32BE(4*I+4);for(;I<160;I+=2){var B=t[I-30],T=t[I-30+1],R=p(B,T),P=d(T,B),O=g(B=t[I-4],T=t[I-4+1]),M=b(T,B),N=t[I-14],D=t[I-14+1],K=t[I-32],U=t[I-32+1],j=P+D|0,F=R+N+m(j,P)|0;F=(F=F+O+m(j=j+M|0,M)|0)+K+m(j=j+U|0,U)|0,t[I]=F,t[I+1]=j}for(var L=0;L<160;L+=2){F=t[L],j=t[L+1];var z=f(r,n,i),H=f(w,A,_),q=l(r,w),V=l(w,r),G=h(a,E),W=h(E,a),Y=s[L],J=s[L+1],Z=u(a,c,y),Q=u(E,k,x),X=C+W|0,$=v+G+m(X,C)|0;$=($=($=$+Z+m(X=X+Q|0,Q)|0)+Y+m(X=X+J|0,J)|0)+F+m(X=X+j|0,j)|0;var ee=V+H|0,te=q+z+m(ee,V)|0;v=y,C=x,y=c,x=k,c=a,k=E,a=o+$+m(E=S+X|0,S)|0,o=i,S=_,i=n,_=A,n=r,A=w,r=$+te+m(w=X+ee|0,X)|0}this._al=this._al+w|0,this._bl=this._bl+A|0,this._cl=this._cl+_|0,this._dl=this._dl+S|0,this._el=this._el+E|0,this._fl=this._fl+k|0,this._gl=this._gl+x|0,this._hl=this._hl+C|0,this._ah=this._ah+r+m(this._al,w)|0,this._bh=this._bh+n+m(this._bl,A)|0,this._ch=this._ch+i+m(this._cl,_)|0,this._dh=this._dh+o+m(this._dl,S)|0,this._eh=this._eh+a+m(this._el,E)|0,this._fh=this._fh+c+m(this._fl,k)|0,this._gh=this._gh+y+m(this._gl,x)|0,this._hh=this._hh+v+m(this._hl,C)|0},c.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=c},function(e,t,r){"use strict";var n=r(4),i=r(520),o=r(79),s=r(3).Buffer,a=r(521),c=r(270),u=r(271),f=s.alloc(128);function l(e,t){o.call(this,"digest"),"string"==typeof t&&(t=s.from(t));var r="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>r)?t=("rmd160"===e?new c:u(e)).update(t).digest():t.length=0||r.ucmp(i.p)>=0?null:6!==n&&7!==n||r.isOdd()===(7===n)?0!==t.redSqr().redMul(t).redIAdd7().ucmp(r.redSqr())?null:new s(t,r):null):(t=i.fromBuffer(e.slice(1,33))).ucmp(i.p)>=0?null:null===(r=t.redSqr().redMul(t).redIAdd7().redSqrt())?null:(3===n!==r.isOdd()&&(r=r.redNeg()),new s(t,r))},s.prototype.toPublicKey=function(e){var t,r=this.x,i=this.y;return e?((t=n.alloc(33))[0]=i.isOdd()?3:2,r.toBuffer().copy(t,1)):((t=n.alloc(65))[0]=4,r.toBuffer().copy(t,1),i.toBuffer().copy(t,33)),t},s.fromECJPoint=function(e){if(e.inf)return new s(null,null);var t=e.z.redInvm(),r=t.redSqr();return new s(e.x.redMul(r),e.y.redMul(r).redMul(t))},s.prototype.toECJPoint=function(){return this.inf?new o(null,null,null):new o(this.x,this.y,o.one)},s.prototype.neg=function(){return this.inf?this:new s(this.x,this.y.redNeg())},s.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(0===this.x.ucmp(e.x))return 0===this.y.ucmp(e.y)?this.dbl():new s(null,null);var t=this.y.redSub(e.y);t.isZero()||(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x);return new s(r,t.redMul(this.x.redSub(r)).redISub(this.y))},s.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.isZero())return new s(null,null);var t=this.x.redSqr(),r=t.redAdd(t).redIAdd(t).redMul(e.redInvm()),n=r.redSqr().redISub(this.x.redAdd(this.x));return new s(n,r.redMul(this.x.redSub(n)).redISub(this.y))},s.prototype.mul=function(e){for(var t=this._getNAFPoints(4),r=t.points,n=e.getNAF(t.wnd),i=new o(null,null,null),a=n.length-1;a>=0;a--){for(var c=0;a>=0&&0===n[a];a--,++c);if(a>=0&&(c+=1),i=i.dblp(c),a<0)break;var u=n[a];i=u>0?i.mixedAdd(r[u-1>>1]):i.mixedAdd(r[-u-1>>1].neg())}return s.fromECJPoint(i)},s.prototype._getNAFPoints1=function(){return{wnd:1,points:[this]}},s.prototype._getNAFPoints=function(e){var t=new Array((1<({digest(t,o){((t,r,o)=>{n(i.subtle.sign({name:"HMAC"},t,r).then(t=>e.from(t)),o)})(r,t,o)},length:o[t]})),a)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(24),i=r(540);function o(e,t,r,i){if("function"==typeof r&&(i=r,r=void 0),!i)throw new Error("Missing callback");o.digest(e,t,r,(e,o)=>{if(e)return i(e);i(null,n.encode(o,t,r))})}e.exports=o,o.Buffer=t,o.multihash=n,o.digest=function(e,t,r,n){if("function"==typeof r&&(n=r,r=void 0),!n)throw new Error("Missing callback");let i,s=n;r&&(s=((e,t)=>{if(e)return n(e);n(null,t.slice(0,r))}));try{i=o.createHash(t)}catch(e){return s(e)}i(e,s)},o.createHash=function(e){if(e=n.coerceCode(e),!o.functions[e])throw new Error("multihash function "+e+" not yet supported");return o.functions[e]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(7);t.toCallback=(e=>(function(t,r){const i=(e,t)=>n(()=>{r(e,t)});let o;try{o=e(t)}catch(e){return void i(e)}i(null,o)})),t.toBuf=((t,r)=>n=>{let i=t(n,r);return e.from(i,"hex")}),t.fromString=((t,r)=>n=>{const i=e.isBuffer(n)?n.toString():n;return t(i,r)}),t.fromNumberTo32BitBuf=((t,r)=>n=>{let i=t(n,r);const o=new Array(4);for(let e=0;e<4;e++)o[e]=255&i,i>>=8;return e.from(o)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(176),i=r(177)();function o(e){return Promise.all([i.subtle.exportKey("jwk",e.privateKey),i.subtle.exportKey("jwk",e.publicKey)])}t.utils=r(543),t.generateKey=function(e,t){n(i.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(o).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.unmarshalPrivateKey=function(e,t){const r=i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);var s;n(Promise.all([r,(s=e,i.subtle.importKey("jwk",{kty:s.kty,n:s.n,e:s.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]))]).then(e=>o({privateKey:e[0],publicKey:e[1]})).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.getRandomValues=function(t){return e.from(i.getRandomValues(t))},t.hashAndSign=function(t,r,o){n(i.subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]).then(e=>i.subtle.sign({name:"RSASSA-PKCS1-v1_5"},e,Uint8Array.from(r))).then(t=>e.from(t)),o)},t.hashAndVerify=function(e,t,r,o){n(i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]).then(e=>i.subtle.verify({name:"RSASSA-PKCS1-v1_5"},e,t,r)),o)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(21).bignum;t.toBase64=function(t,r){return t.toArrayLike(e,"be",r).toString("base64").replace(/(=*)$/,"").replace(/\+/g,"-").replace(/\//g,"_")},t.toBn=function(t){return new n(e.from(t,"base64"))}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(282);e.exports=function(e){if(!e||"number"!=typeof e)throw new Error("first argument must be a Number bigger than 0");return n.getRandomValues(new Uint8Array(e))}},function(e,t){e.exports=function(e,t,r){e(t),r&&r(!0===t?null:t)}},function(e,t,r){var n=r(114);function i(e){return e}e.exports=function(e){return"object"==typeof e&&"function"==typeof e.test?function(t){return e.test(t)}:n(e)||i}},function(e,t,r){"use strict";function n(e){return e}var i=r(114),o=r(73);e.exports=function(e,t){e=i(e)||n;var r={};return o(function(n){var i=e(n);return r[i]?!!t:(r[i]=!0,!t)})}},function(e,t){e.exports=function(e){var t,r=!1;function n(n){if(!n)throw new Error("must be passed a readable");t=n,r&&e(t)}return n.resolve=n.ready=n.start=function(i){return r=!0,e=i||e,t&&e(t),n},n}},function(e,t){var r=1e3,n=60*r,i=60*n,o=24*i,s=7*o,a=365.25*o;function c(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}e.exports=function(e,t){t=t||{};var u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var c=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*a;case"weeks":case"week":case"w":return c*s;case"days":case"day":case"d":return c*o;case"hours":case"hour":case"hrs":case"hr":case"h":return c*i;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?function(e){var t=Math.abs(e);if(t>=o)return c(e,t,o,"day");if(t>=i)return c(e,t,i,"hour");if(t>=n)return c(e,t,n,"minute");if(t>=r)return c(e,t,r,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=o)return Math.round(e/o)+"d";if(t>=i)return Math.round(e/i)+"h";if(t>=n)return Math.round(e/n)+"m";if(t>=r)return Math.round(e/r)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,r){"use strict";var n=r(1105),i=r(1106);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=v,t.resolve=function(e,t){return v(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?v(e,!1,!0).resolveObject(t):t},t.format=function(e){i.isString(e)&&(e=v(e));return e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(u),l=["%","/","?",";","#"].concat(f),h=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},b={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=r(1107);function v(e,t,r){if(e&&i.isObject(e)&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}o.prototype.parse=function(e,t,r){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o127?O+="x":O+=P[M];if(!O.match(p)){var D=T.slice(0,C),K=T.slice(C+1),U=P.match(d);U&&(D.push(U[1]),K.unshift(U[2])),K.length&&(v="/"+K.join(".")+v),this.hostname=D.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),B||(this.hostname=n.toASCII(this.hostname));var j=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+j,this.href+=this.host,B&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==v[0]&&(v="/"+v))}if(!g[_])for(C=0,R=f.length;C0)&&r.host.split("@"))&&(r.auth=B.shift(),r.host=r.hostname=B.shift());return r.search=e.search,r.query=e.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!S.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var k=S.slice(-1)[0],x=(r.host||e.host||S.length>1)&&("."===k||".."===k)||""===k,C=0,I=S.length;I>=0;I--)"."===(k=S[I])?S.splice(I,1):".."===k?(S.splice(I,1),C++):C&&(S.splice(I,1),C--);if(!A&&!_)for(;C--;C)S.unshift("..");!A||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),x&&"/"!==S.join("/").substr(-1)&&S.push("");var B,T=""===S[0]||S[0]&&"/"===S[0].charAt(0);E&&(r.hostname=r.host=T?"":S.length?S.shift():"",(B=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=B.shift(),r.host=r.hostname=B.shift()));return(A=A||r.host&&S.length)&&!T&&S.unshift(""),S.length?r.pathname=S.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,r){"use strict";var n=r(1155);e.exports=function(){var e={};return n.toArray(arguments).reverse().forEach(function(t){n.mergeWith(e,t,function(e,t){return n.isArray(t)?t:void 0})}),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(r(812)),i=o(r(328));function o(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.default)(n.default,1),e.exports=t.default},function(e,t,r){"use strict";(function(t){const n=r(1293),i=r(121),o=r(1294).default,{Key:s}=r(34),a=r(115),c=r(41),u=r(24),f=r(11),l=f("jsipns");l.error=f("jsipns:error");const h=r(1297),{parseRFC3339:p}=r(1298),d=r(1299),g=u.names.id,b=(e,t,r,n,i,o)=>{w(e,t,i,n,(e,s)=>{if(e)return l.error("record signature creation failed"),o(Object.assign(new Error("record signature verification failed"),{code:d.ERR_SIGNATURE_CREATION}));const a={value:t,signature:s,validityType:i,validity:n,sequence:r};return l(`ipns entry for ${t} created`),o(null,a)})},m=(e,t,r)=>{const{value:n,validityType:i,validity:o}=t,s=A(n,i,o);e.verify(s,t.signature,(e,t)=>{if(e||!t)return l.error("record signature verification failed"),r(Object.assign(new Error("record signature verification failed"),{code:d.ERR_SIGNATURE_VERIFICATION}));if(i===h.ValidityType.EOL){let e;try{e=p(o.toString())}catch(e){return l.error("unrecognized validity format (not an rfc3339 format)"),r(Object.assign(new Error("unrecognized validity format (not an rfc3339 format)"),{code:d.ERR_UNRECOGNIZED_FORMAT}))}if(e{if(!t||!e){const e="one or more of the provided parameters are not defined";return l.error(e),r(Object.assign(new Error(e),{code:d.ERR_UNDEFINED_PARAMETER}))}if(t.pubKey){let e;try{e=a.keys.unmarshalPublicKey(t.pubKey)}catch(e){return l.error(e),r(e)}return r(null,e)}r(null,e.pubKey)},v=e=>n(e,"RFC4648",{padding:!1}),w=(e,t,r,n,i)=>{const o=A(t,r,n);e.sign(o,(e,t)=>e?i(e):i(null,t))},A=(e,r,n)=>{const i=t.from(e),o=t.from((e=>{if("0"===e.toString())return"EOL";{const t=`unrecognized validity type ${e.toString()}`;throw l.error(t),Object.assign(new Error(t),{code:d.ERR_UNRECOGNIZED_VALIDITY})}})(r)),s=t.from(n);return t.concat([i,s,o])},_=e=>{const t=u.decode(e.id);return t.code!==g?null:a.keys.unmarshalPublicKey(t.digest)},S=h.encode,E=h.decode,k={validate:(e,t,r)=>{const n=E(e),i=t.slice("/ipns/".length);let o;try{o=c.createFromBytes(i)}catch(e){return r(e)}y(o,n,(e,t)=>{if(e)return r(e);m(t,n,e=>{if(e)return r(e);r(null,!0)})})},select:(e,t,r)=>{const n=E(e),i=E(t),o=n.sequence>i.sequence?0:1;if("function"!=typeof r)return o;r(null,o)}};e.exports={create:(e,t,r,n,s)=>{const a=new i(n),c=new i(new o).plus(a).times("10e+6"),u=new o(c.toString()).toISOStringFull(),f=h.ValidityType.EOL;b(e,t,r,u,f,s)},createWithExpiration:(e,t,r,n,s)=>{const a=new o(new i(n).toString()).toISOStringFull(),c=h.ValidityType.EOL;b(e,t,r,a,c,s)},validate:m,embedPublicKey:(e,t,r)=>{if(!e||!e.bytes||!t){const e="one or more of the provided parameters are not defined";return l.error(e),r(Object.assign(new Error(e),{code:d.ERR_UNDEFINED_PARAMETER}))}c.createFromPubKey(e.bytes,(n,i)=>{if(n)return l.error(n),r(Object.assign(new Error(n),{code:d.ERR_PEER_ID_FROM_PUBLIC_KEY}));let o;try{o=_(i)}catch(n){return l.error(n),r(Object.assign(new Error(n),{code:d.ERR_PUBLIC_KEY_FROM_ID}))}if(o)return r(null,null);try{t.pubKey=a.keys.marshalPublicKey(e)}catch(n){return l.error(n),r(n)}r(null,t)})},extractPublicKey:y,getLocalKey:e=>new s(`/ipns/${v(e)}`),getIdKeys:e=>{const r=t.from("/pk/"),n=t.from("/ipns/");return{routingPubKey:new s(t.concat([r,e])),pkKey:new s(v(t.concat([r,e]))),routingKey:new s(t.concat([n,e])),ipnsKey:new s(v(t.concat([n,e])))}},marshal:S,unmarshal:E,validator:k,namespace:"/ipns/",namespaceLength:"/ipns/".length}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var a={};function c(e,t,r){r||(r=Error);var n=function(e){function n(e,r,s){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),i(this,o(n).call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(e,r,s)))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(n,r),n}();n.prototype.name=r.name,n.prototype.code=e,a[e]=n}function u(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(e){return String(e)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}c("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),c("ERR_INVALID_ARG_TYPE",function(e,t,r){var i,o,s,a;if("string"==typeof t&&(o="not ",t.substr(!s||s<0?0:+s,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a="The ".concat(e," ").concat(i," ").concat(u(t,"type"));else{var c=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(c," ").concat(i," ").concat(u(t,"type"))}return a+=". Received type ".concat(n(r))},TypeError),c("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),c("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),c("ERR_STREAM_PREMATURE_CLOSE","Premature close"),c("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),c("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),c("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),c("ERR_STREAM_WRITE_AFTER_END","write after end"),c("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),c("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),c("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=a},function(e,t,r){const n=r(23).EventEmitter,i=r(20),o=r(1518);e.exports=function(e,t){"object"==typeof e&&(t=e,e="START");i.equal(typeof e,"string"),i.equal(typeof t,"object"),i.ok(t[e],"invalid starting state "+e),i.ok(o.validate(t));const r=new n;return s._graph=o.reachable(t),s._emitter=r,s._events=t,s._state=e,s.emit=s,s.on=function(e,t){r.on(e,t)},s;function s(e){const t=s._events[s._state][e];if(!function(e,t,r){if(!t)return!1;if(!e)return!0;const n=r[e];return!(!n||!n[t])&&1===n[t].length}(s._state,t,s._graph)){const t="invalid transition: "+s._state+" -> "+e;return r.emit("error",t)}const n=s._state+":leave",i=t+":enter";return s._state?void(r._events[n]?r.emit(n,o):o()):o();function o(){r._events[i]?r.emit(i,a):a()}function a(){s._state=t,r.emit(t),r.emit("done")}}}},function(e,t,r){"use strict";(function(t){const n=r(15),i=r(31),o=r(1584),s=r(685),a=r(5),c=r(9),u=r(26),f=new Error("Sorry, Not Implemented Yet."),l=u.proto(function(e){if(!(this instanceof l))return new l(e);if(null==e&&(e=""),e instanceof t)this.buffer=o.fromBuffer(e);else if("string"==typeof e||e instanceof String){if(e.length>0&&"/"!==e.charAt(0))throw new Error(`multiaddr "${e}" must start with a "/"`);this.buffer=o.fromString(e)}else{if(!(e.buffer&&e.protos&&e.protoCodes))throw new Error("addr must be a string, Buffer, or another Multiaddr");this.buffer=o.fromBuffer(e.buffer)}},{className:"Multiaddr",symbolName:"@multiformats/js-multiaddr/multiaddr"});l.prototype.toString=function(){return o.bufferToString(this.buffer)},l.prototype.toOptions=function(){const e={},t=this.toString().split("/");return e.family="ip4"===t[1]?"ipv4":"ipv6",e.host=t[2],e.transport=t[3],e.port=t[4],e},l.prototype.inspect=function(){return""},l.prototype.protos=function(){return n(this.protoCodes(),function(e){return i(s(e))})},l.prototype.protoCodes=function(){const e=[],t=this.buffer;let r=0;for(;r{if(e[0]===s.names.ipfs.code)return!0})[0][1],c.decode(e)}catch(t){e=null}return e},l.prototype.equals=function(e){return this.buffer.equals(e.buffer)},l.prototype.nodeAddress=function(){const e=this.protoCodes(),t=this.protoNames(),r=this.toString().split("/").slice(1);if(r.length<4)throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6}/{address}/{tcp, udp}/{port}".');if(4!==e[0]&&41!==e[0]&&54!==e[0]&&55!==e[0])throw new Error(`no protocol with name: "'${t[0]}'". Must have a valid family name: "{ip4, ip6, dns4, dns6}".`);if("tcp"!==r[2]&&"udp"!==r[2])throw new Error(`no protocol with name: "'${t[1]}'". Must have a valid transport protocol: "{tcp, udp}".`);return{family:41===e[0]||55===e[0]?6:4,address:r[1],port:r[3]}},l.fromNodeAddress=function(e,t){if(!e)throw new Error("requires node address object");if(!t)throw new Error("requires transport protocol");const r="IPv6"===e.family?"ip6":"ip4";return l("/"+[r,e.address,t,e.port].join("/"))},l.prototype.isThinWaistAddress=function(e){const t=(e||this).protos();return 2===t.length&&((4===t[0].code||41===t[0].code)&&(6===t[1].code||17===t[1].code))},l.prototype.fromStupidString=function(e){throw f},l.protocols=s,l.isName=function(e){return!!l.isMultiaddr(e)&&e.protos().some(e=>e.resolvable)},l.resolve=function(e,t){return l.isMultiaddr(e)&&l.isName(e)?t(new Error("not implemented yet")):t(new Error("not a valid name"))},e.exports=l}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(296),i=r(686),o=r(41),s=r(298);e.exports=function(e){function t(e,t,r){return r=r||(()=>{}),e.write(s.CircuitRelay.encode({type:s.CircuitRelay.Type.STATUS,code:t})),r()}return{getB58String:function(e){let t=null;n.isMultiaddr(e)?t=n(e).getPeerId():i.isPeerInfo(e)&&(t=e.id.toB58String());return t},peerInfoFromMa:function(t){let r;if(i.isPeerInfo(t))r=t;else if(n.isMultiaddr(t)){const n=t.getPeerId();try{r=e._peerBook.get(n)}catch(e){r=new i(o.createFromB58String(n))}r.multiaddrs.add(t)}else if(o.isPeerId(t)){const n=t.toB58String();r=e._peerBook.has(n)?e._peerBook.get(n):t}return r},isPeerConnected:function(t){return e.muxedConns[t]||e.conns[t]},validateAddrs:function(e,r,i,o){try{e.dstPeer.addrs.forEach(e=>n(e))}catch(e){return t(r,i===s.CircuitRelay.Type.HOP?s.CircuitRelay.Status.HOP_DST_MULTIADDR_INVALID:s.CircuitRelay.Status.STOP_DST_MULTIADDR_INVALID),o(e)}try{e.srcPeer.addrs.forEach(e=>n(e))}catch(e){return t(r,i===s.CircuitRelay.Type.HOP?s.CircuitRelay.Status.HOP_SRC_MULTIADDR_INVALID:s.CircuitRelay.Status.STOP_SRC_MULTIADDR_INVALID),o(e)}return o(null)},writeResponse:t,peerIdFromId:function(e){return"string"==typeof e?o.createFromB58String(e):o.createFromBytes(e)}}}},function(e,t,r){"use strict";const n=r(19);e.exports=n("\nmessage CircuitRelay {\n\n enum Status {\n SUCCESS = 100;\n HOP_SRC_ADDR_TOO_LONG = 220;\n HOP_DST_ADDR_TOO_LONG = 221;\n HOP_SRC_MULTIADDR_INVALID = 250;\n HOP_DST_MULTIADDR_INVALID = 251;\n HOP_NO_CONN_TO_DST = 260;\n HOP_CANT_DIAL_DST = 261;\n HOP_CANT_OPEN_DST_STREAM = 262;\n HOP_CANT_SPEAK_RELAY = 270;\n HOP_CANT_RELAY_TO_SELF = 280;\n STOP_SRC_ADDR_TOO_LONG = 320;\n STOP_DST_ADDR_TOO_LONG = 321;\n STOP_SRC_MULTIADDR_INVALID = 350;\n STOP_DST_MULTIADDR_INVALID = 351;\n STOP_RELAY_REFUSED = 390;\n MALFORMED_MESSAGE = 400;\n }\n\n enum Type { // RPC identifier, either HOP, STOP or STATUS\n HOP = 1;\n STOP = 2;\n STATUS = 3;\n CAN_HOP = 4;\n }\n\n message Peer {\n required bytes id = 1; // peer id\n repeated bytes addrs = 2; // peer's known addresses\n }\n\n optional Type type = 1; // Type of the message\n\n optional Peer srcPeer = 2; // srcPeer and dstPeer are used when Type is HOP or STATUS\n optional Peer dstPeer = 3;\n\n optional Status code = 4; // Status code, used when Type is STATUS\n}\n")},function(e,t,r){"use strict";const n=r(29),i=r(143),o=r(344),s=r(16);t.OFFLINE_ERROR="This command must be run in online mode. Try running 'ipfs daemon' first.";const a=n(function(e,r,n){Array.isArray(r)||(r=[r]),i(r,(r,n)=>{if("string"!=typeof r){let e;try{e=new s(r)}catch(e){return n(e)}return n(null,e.buffer)}let i;try{i=t.parseIpfsPath(r)}catch(e){return n(e)}const o=new s(i.hash),a=i.links;if(!a.length)return n(null,o.buffer);e.get(o,function t(r,i,o,s){if(o)return n(o);if(!i.length)return n(null,r.buffer);const a=i[0];const c=s.links.find(e=>e.name===a);if(!c)return n(new Error(`no link named "${a}" under ${r.toBaseEncodedString()}`));e.get(c.cid,t.bind(null,c.cid,i.slice(1)))}.bind(null,o,a))},n)});t.normalizePath=(e=>{if(o.cid(e))return`/ipfs/${e}`;if(o.path(e))return e;throw Object.assign(new Error(`invalid ${e} path`),{code:"ERR_BAD_PATH"})}),t.parseIpfsPath=function(e){const t=new Error("invalid ipfs ref path"),r=(e=e.replace(/^\/ipfs\//,"")).match(/([^\/]+(?:\/[^\/]+)*)\/?$/);if(!r)throw t;const[n,...i]=r[1].split("/");if(o.cid(n))return{hash:n,links:i};throw t},t.resolvePath=a},function(e,t,r){var n=r(324);e.exports=function(e,t){return function(r){var i,o,s=[];function a(e){s.push(e)}e=e||function(e){this.queue(e)},t=t||function(){this.queue(null)};var c,u={emit:function(e,t){"data"==e&&a(t),"end"==e&&(i=!0,a(null)),"error"==e&&(o=t)},queue:a};return function(a,f){if(i=i||a,a)return r(a,function(){if(c){var e=c;c=null,e(a)}f(a)});c=f,n(function n(a){if(c)if(f=c,o)c=null,f(o);else if(s.length){var l=s.shift();c=null,f(null===l,l)}else r(i,function(s,l){if(s&&!0!==s)return o=s,a();if(i=i||s)t.call(u);else if(null!==l&&(e.call(u,l),o||i))return r(o||i,function(){c=null,f(o||i)});a(n)})})}}}},function(e,t,r){"use strict";var n=r(123),i=r(122);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;or.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(a=r.slice(o,l)).length)throw new Error("invalid rlp, List has a invalid length");for(;a.length;)c=t(a),u.push(c.data),a=c.remainder;return{data:u,remainder:r.slice(l)}}(c(t));if(r)return n;if(0!==n.remainder.length)throw new Error("invalid remainder");return n.data},t.getLength=function(t){if(!t||0===t.length)return e.from([]);var r=c(t),n=r[0];if(n<=127)return r.length;if(n<=183)return n-127;if(n<=191)return n-182;if(n<=247)return n-191;var o=n-246;return o+i(r.slice(1,o).toString("hex"),16)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(16),i=r(24);e.exports=function(e,t,r){const o=(r=r||{}).hashAlg||"keccak-256",s=void 0===r.version?1:r.version,a=i.encode(t,o);return new n(s,e,a)}},function(e,t,r){"use strict";const n=r(10),i=r(970),o=r(971);e.exports=function(e,t,r){const s=o(e,t);return{resolver:{multicodec:e,defaultHashAlg:"keccak-256",resolve:c,tree:function(e,t,r){"function"==typeof t&&(r=t,t=void 0);t||(t={});n([t=>s.deserialize(e,t),(e,r)=>a(e,t,r)],r)},isLink:i(c),_resolveFromEthObject:u,_treeFromEthObject:a,_mapFromEthObject:r},util:s};function a(e,t,i){n([n=>r(e,t,n),(e,t)=>t(null,e.map(e=>e.path))],i)}function c(e,t,r){n([t=>s.deserialize(e,t),(e,r)=>u(e,t,r)],r)}function u(e,t,n){if(!t||"/"===t){const t={value:e,remainderPath:""};return n(null,t)}r(e,{},(e,r)=>{if(e)return n(e);const i=t.split("/");let o=r.filter(e=>e.path===t.slice(0,e.path.length));const s=(o=o.filter(e=>e.path.split("/").every((e,t)=>e===i[t]))).sort((e,t)=>t.path.length-e.path.length),a=s[0];if(!a){let e=new Error('Path not found ("'+t+'").');return n(e)}const c=t.slice(a.path.length+1),u={value:a.value,remainderPath:c};return n(null,u)})}}},function(e,t,r){"use strict";var n=r(22),i=r(716),o=r(717),s=r(718),a=r(155);function c(e){a.call(this,"digest"),this._hash=e}n(c,a),c.prototype._update=function(e){this._hash.update(e)},c.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new c(s(e))}},function(e,t,r){(function(t){e.exports=function(e,r){for(var n=Math.min(e.length,r.length),i=new t(n),o=0;o=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;ou))return!1;var l=o.get(e);if(l&&o.get(t))return l==t;var h=-1,p=!0,d=i&s?new Me:void 0;for(o.set(e,t),o.set(t,e);++h-1},Pe.prototype.set=function(e,t){var r=this.__data__,n=Ke(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},Oe.prototype.clear=function(){this.__data__={hash:new Re,map:new(ye||Pe),string:new Re}},Oe.prototype.delete=function(e){return Ge(this,e).delete(e)},Oe.prototype.get=function(e){return Ge(this,e).get(e)},Oe.prototype.has=function(e){return Ge(this,e).has(e)},Oe.prototype.set=function(e,t){return Ge(this,e).set(e,t),this},Me.prototype.add=Me.prototype.push=function(e){return this.__data__.set(e,o),this},Me.prototype.has=function(e){return this.__data__.has(e)},Ne.prototype.clear=function(){this.__data__=new Pe},Ne.prototype.delete=function(e){return this.__data__.delete(e)},Ne.prototype.get=function(e){return this.__data__.get(e)},Ne.prototype.has=function(e){return this.__data__.has(e)},Ne.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Pe){var i=r.__data__;if(!ye||i.length-1&&e%1==0&&e-1?n[i?e[o]:o]:void 0});function it(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(i);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s),s};return r.cache=new(it.Cache||Oe),r}function ot(e,t){return e===t||e!=e&&t!=t}function st(e){return function(e){return ht(e)&&ct(e)}(e)&&ce.call(e,"callee")&&(!pe.call(e,"callee")||ue.call(e)==h)}it.Cache=Oe;var at=Array.isArray;function ct(e){return null!=e&&ft(e.length)&&!ut(e)}function ut(e){var t=lt(e)?ue.call(e):"";return t==m||t==y}function ft(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=u}function lt(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ht(e){return!!e&&"object"==typeof e}function pt(e){return"symbol"==typeof e||ht(e)&&ue.call(e)==k}var dt=Y?function(e){return function(t){return e(t)}}(Y):function(e){return ht(e)&&ft(e.length)&&!!j[ue.call(e)]};function gt(e){return ct(e)?De(e):He(e)}function bt(e){return e}r.exports=nt}).call(this,r(12),r(39)(e))},function(e,t,r){ -//! stable.js 0.1.8, https://github.com/Two-Screen/stable -//! © 2018 Angry Bytes and contributors. MIT licensed. -e.exports=function(){"use strict";var e=function(e,r){return t(e.slice(),r)};function t(e,t){"function"!=typeof t&&(t=function(e,t){return String(e).localeCompare(t)});var n=e.length;if(n<=1)return e;for(var i=new Array(n),o=1;ou&&(o=u),s>u&&(s=u),a=i,c=o;;)if(a-1},M.prototype.set=function(e,t){var r=this.__data__,n=D(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},N.prototype.clear=function(){this.__data__={hash:new O,map:new(B||M),string:new O}},N.prototype.delete=function(e){return j(this,e).delete(e)},N.prototype.get=function(e){return j(this,e).get(e)},N.prototype.has=function(e){return j(this,e).has(e)},N.prototype.set=function(e,t){return j(this,e).set(e,t),this};var L=H(function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(G(e))return P?P.call(e):"";var t=e+"";return"0"==t&&1/e==-i?"-0":t}(t);var r=[];return f.test(e)&&r.push(""),e.replace(l,function(e,t,n,i){r.push(n?i.replace(h,"$1"):t||e)}),r});function z(e){if("string"==typeof e||G(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}function H(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(r);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s),s};return n.cache=new(H.Cache||N),n}H.Cache=N;var q=Array.isArray;function V(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function G(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&k.call(e)==a}e.exports=function(e,t,r){var n=null==e?void 0:K(e,t);return void 0===n?r:n}}).call(this,r(12))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=(0,i.default)(e);return(0,n.default)(function(e,t){r(e[0],t)},t,1)};var n=o(r(1053)),i=o(r(49));function o(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,r){"use strict";const n=r(14);e.exports=class{constructor(e,t){this.child=e,this.transform=t}open(e){this.child.open(e)}put(e,t,r){this.child.put(this.transform.convert(e),t,r)}get(e,t){this.child.get(this.transform.convert(e),t)}has(e,t){this.child.has(this.transform.convert(e),t)}delete(e,t){this.child.delete(this.transform.convert(e),t)}batch(){const e=this.child.batch();return{put:(t,r)=>{e.put(this.transform.convert(t),r)},delete:t=>{e.delete(this.transform.convert(t))},commit:t=>{e.commit(t)}}}query(e){return n(this.child.query(e),n.map(e=>(e.key=this.transform.invert(e.key),e)))}close(e){this.child.close(e)}}},function(e,t,r){"use strict";e.exports=function(e,t,r){if((t-=(e+="").length)<=0)return e;r||0===r||(r=" ");if(" "==(r+="")&&t<10)return n[t]+e;var i="";for(;1&t&&(i+=r),t>>=1;)r+=r;return i+e};var n=[""," "," "," "," "," "," "," "," "," "]},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){var n;!function(i){"use strict";var o,s=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a=Math.ceil,c=Math.floor,u="[BigNumber Error] ",f=u+"Number primitive has more than 15 significant digits: ",l=1e14,h=14,p=9007199254740991,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7,b=1e9;function m(e){var t=0|e;return e>0||e===t?t:t-1}function y(e){for(var t,r,n=1,i=e.length,o=e[0]+"";nu^r?1:-1;for(a=(c=i.length)<(u=o.length)?c:u,s=0;so[s]^r?1:-1;return c==u?0:c>u^r?1:-1}function w(e,t,r,n){if(er||e!==(e<0?a(e):c(e)))throw Error(u+(n||"Argument")+("number"==typeof e?er?" out of range: ":" not an integer: ":" not a primitive number: ")+e)}function A(e){return"[object Array]"==Object.prototype.toString.call(e)}function _(e){var t=e.c.length-1;return m(e.e/h)==t&&e.c[t]%2!=0}function S(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function E(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 t=10;l/=10,u++);return m.e=u,void(m.c=[e])}b=e+""}else{if(!s.test(b=e+""))return i(m,b,d);m.s=45==b.charCodeAt(0)?(b=b.slice(1),-1):1}(u=b.indexOf("."))>-1&&(b=b.replace(".","")),(l=b.search(/e/i))>0?(u<0&&(u=l),u+=+b.slice(l+1),b=b.substring(0,l)):u<0&&(u=b.length)}else{if(w(t,2,z.length,"Base"),b=e+"",10==t)return W(m=new H(e instanceof H?e:b),P+m.e+1,O);if(d="number"==typeof e){if(0*e!=0)return i(m,b,d,t);if(m.s=1/e<0?(b=b.slice(1),-1):1,H.DEBUG&&b.replace(/^0\.0*|\./,"").length>15)throw Error(f+e);d=!1}else m.s=45===b.charCodeAt(0)?(b=b.slice(1),-1):1;for(r=z.slice(0,t),u=l=0,g=b.length;lu){u=g;continue}}else if(!a&&(b==b.toUpperCase()&&(b=b.toLowerCase())||b==b.toLowerCase()&&(b=b.toUpperCase()))){a=!0,l=-1,u=0;continue}return i(m,e+"",d,t)}(u=(b=n(b,t,10,m.s)).indexOf("."))>-1?b=b.replace(".",""):u=b.length}for(l=0;48===b.charCodeAt(l);l++);for(g=b.length;48===b.charCodeAt(--g););if(b=b.slice(l,++g)){if(g-=l,d&&H.DEBUG&&g>15&&(e>p||e!==c(e)))throw Error(f+m.s*e);if((u=u-l-1)>K)m.c=m.e=null;else if(ua){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=o-a)>0)for(o+1==a&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function V(e,t){var r,n,i=0;for(A(e[0])&&(e=e[0]),r=new H(e[0]);++i=10;i/=10,n++);return(r=n+r*h-1)>K?e.c=e.e=null:r=10;u/=10,i++);if((o=t-i)<0)o+=h,s=t,g=(f=b[p=0])/m[i-s-1]%10|0;else if((p=a((o+1)/h))>=b.length){if(!n)break e;for(;b.length<=p;b.push(0));f=g=0,i=1,s=(o%=h)-h+1}else{for(f=u=b[p],i=1;u>=10;u/=10,i++);g=(s=(o%=h)-h+i)<0?0:f/m[i-s-1]%10|0}if(n=n||t<0||null!=b[p+1]||(s<0?f:f%m[i-s-1]),n=r<4?(g||n)&&(0==r||r==(e.s<0?3:2)):g>5||5==g&&(4==r||n||6==r&&(o>0?s>0?f/m[i-s]:0:b[p-1])%10&1||r==(e.s<0?8:7)),t<1||!b[0])return b.length=0,n?(t-=e.e+1,b[0]=m[(h-t%h)%h],e.e=-t||0):b[0]=e.e=0,e;if(0==o?(b.length=p,u=1,p--):(b.length=p+1,u=m[h-o],b[p]=s>0?c(f/m[i-s]%m[s])*u:0),n)for(;;){if(0==p){for(o=1,s=b[0];s>=10;s/=10,o++);for(s=b[0]+=u,u=1;s>=10;s/=10,u++);o!=u&&(e.e++,b[0]==l&&(b[0]=1));break}if(b[p]+=u,b[p]!=l)break;b[p--]=0,u=1}for(o=b.length;0===b[--o];b.pop());}e.e>K?e.c=e.e=null:e.e>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[f]=r[0],t[f+1]=r[1]):(l.push(s%1e14),f+=2);f=i/2}else{if(!crypto.randomBytes)throw U=!1,Error(u+"crypto unavailable");for(t=crypto.randomBytes(i*=7);f=9e15?crypto.randomBytes(7).copy(t,f):(l.push(s%1e14),f+=7);f=i/7}if(!U)for(;f=10;s/=10,f++);fr-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/r|0,s[i]%=r)}return s.reverse()}return function(t,n,i,o,s){var a,c,u,f,l,h,p,d,g=t.indexOf("."),b=P,m=O;for(g>=0&&(f=F,F=0,t=t.replace(".",""),h=(d=new H(n)).pow(t.length-g),F=f,d.c=e(E(y(h.c),h.e,"0"),10,i,"0123456789"),d.e=d.c.length),u=f=(p=e(t,n,i,s?(a=z,"0123456789"):(a="0123456789",z))).length;0==p[--f];p.pop());if(!p[0])return a.charAt(0);if(g<0?--u:(h.c=p,h.e=u,h.s=o,p=(h=r(h,d,b,m,i)).c,l=h.r,u=h.e),g=p[c=u+b+1],f=i/2,l=l||c<0||null!=p[c+1],l=m<4?(null!=g||l)&&(0==m||m==(h.s<0?3:2)):g>f||g==f&&(4==m||l||6==m&&1&p[c-1]||m==(h.s<0?8:7)),c<1||!p[0])t=l?E(a.charAt(1),-b,a.charAt(0)):a.charAt(0);else{if(p.length=c,l)for(--i;++p[--c]>i;)p[c]=0,c||(++u,p=[1].concat(p));for(f=p.length;!p[--f];);for(g=0,t="";g<=f;t+=a.charAt(p[g++]));t=E(t,u,a.charAt(0))}return t}}(),r=function(){function e(e,t,r){var n,i,o,s,a=0,c=e.length,u=t%g,f=t/g|0;for(e=e.slice();c--;)a=((i=u*(o=e[c]%g)+(n=f*o+(s=e[c]/g|0)*u)%g*g+a)/r|0)+(n/g|0)+f*s,e[c]=i%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}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,o,s,a){var u,f,p,d,g,b,y,v,w,A,_,S,E,k,x,C,I,B=n.s==i.s?1:-1,T=n.c,R=i.c;if(!(T&&T[0]&&R&&R[0]))return new H(n.s&&i.s&&(T?!R||T[0]!=R[0]:R)?T&&0==T[0]||!R?0*B:B/0:NaN);for(w=(v=new H(B)).c=[],B=o+(f=n.e-i.e)+1,a||(a=l,f=m(n.e/h)-m(i.e/h),B=B/h|0),p=0;R[p]==(T[p]||0);p++);if(R[p]>(T[p]||0)&&f--,B<0)w.push(1),d=!0;else{for(k=T.length,C=R.length,p=0,B+=2,(g=c(a/(R[0]+1)))>1&&(R=e(R,g,a),T=e(T,g,a),C=R.length,k=T.length),E=C,_=(A=T.slice(0,C)).length;_=a/2&&x++;do{if(g=0,(u=t(R,A,C,_))<0){if(S=A[0],C!=_&&(S=S*a+(A[1]||0)),(g=c(S/x))>1)for(g>=a&&(g=a-1),y=(b=e(R,g,a)).length,_=A.length;1==t(b,A,y,_);)g--,r(b,C=10;B/=10,p++);W(v,o+(v.e=p+f*h-1)+1,s,d)}else v.e=f,v.r=+d;return v}}(),k=/^(-?)0([xbo])(?=\w[\w.]*$)/i,x=/^([^.]+)\.$/,C=/^\.([^.]+)$/,I=/^-?(Infinity|NaN)$/,B=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,r,n){var i,o=r?t:t.replace(B,"");if(I.test(o))e.s=isNaN(o)?null:o<0?-1:1,e.c=e.e=null;else{if(!r&&(o=o.replace(k,function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t}),n&&(i=n,o=o.replace(x,"$1").replace(C,"0.$1")),t!=o))return new H(o,i);if(H.DEBUG)throw Error(u+"Not a"+(n?" base "+n:"")+" number: "+t);e.c=e.e=e.s=null}},T.absoluteValue=T.abs=function(){var e=new H(this);return e.s<0&&(e.s=1),e},T.comparedTo=function(e,t){return v(this,new H(e,t))},T.decimalPlaces=T.dp=function(e,t){var r,n,i,o=this;if(null!=e)return w(e,0,b),null==t?t=O:w(t,0,8),W(new H(o),e+o.e+1,t);if(!(r=o.c))return null;if(n=((i=r.length-1)-m(this.e/h))*h,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},T.dividedBy=T.div=function(e,t){return r(this,new H(e,t),P,O)},T.dividedToIntegerBy=T.idiv=function(e,t){return r(this,new H(e,t),0,1)},T.exponentiatedBy=T.pow=function(e,t){var r,n,i,o,s,f,l,p=this;if((e=new H(e)).c&&!e.isInteger())throw Error(u+"Exponent not an integer: "+e);if(null!=t&&(t=new H(t)),o=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return l=new H(Math.pow(+p.valueOf(),o?2-_(e):+e)),t?l.mod(t):l;if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new H(NaN);(n=!s&&p.isInteger()&&t.isInteger())&&(p=p.mod(t))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||o&&p.c[1]>=24e7:p.c[0]<8e13||o&&p.c[0]<=9999975e7)))return i=p.s<0&&_(e)?-0:0,p.e>-1&&(i=1/i),new H(s?1/i:i);F&&(i=a(F/h+2))}for(o?(r=new H(.5),f=_(e)):f=e%2,s&&(e.s=1),l=new H(R);;){if(f){if(!(l=l.times(p)).c)break;i?l.c.length>i&&(l.c.length=i):n&&(l=l.mod(t))}if(o){if(W(e=e.times(r),e.e+1,1),!e.c[0])break;o=e.e>14,f=_(e)}else{if(!(e=c(e/2)))break;f=e%2}p=p.times(p),i?p.c&&p.c.length>i&&(p.c.length=i):n&&(p=p.mod(t))}return n?l:(s&&(l=R.div(l)),t?l.mod(t):i?W(l,F,O,void 0):l)},T.integerValue=function(e){var t=new H(this);return null==e?e=O:w(e,0,8),W(t,t.e+1,e)},T.isEqualTo=T.eq=function(e,t){return 0===v(this,new H(e,t))},T.isFinite=function(){return!!this.c},T.isGreaterThan=T.gt=function(e,t){return v(this,new H(e,t))>0},T.isGreaterThanOrEqualTo=T.gte=function(e,t){return 1===(t=v(this,new H(e,t)))||0===t},T.isInteger=function(){return!!this.c&&m(this.e/h)>this.c.length-2},T.isLessThan=T.lt=function(e,t){return v(this,new H(e,t))<0},T.isLessThanOrEqualTo=T.lte=function(e,t){return-1===(t=v(this,new H(e,t)))||0===t},T.isNaN=function(){return!this.s},T.isNegative=function(){return this.s<0},T.isPositive=function(){return this.s>0},T.isZero=function(){return!!this.c&&0==this.c[0]},T.minus=function(e,t){var r,n,i,o,s=this,a=s.s;if(t=(e=new H(e,t)).s,!a||!t)return new H(NaN);if(a!=t)return e.s=-t,s.plus(e);var c=s.e/h,u=e.e/h,f=s.c,p=e.c;if(!c||!u){if(!f||!p)return f?(e.s=-t,e):new H(p?s:NaN);if(!f[0]||!p[0])return p[0]?(e.s=-t,e):new H(f[0]?s:3==O?-0:0)}if(c=m(c),u=m(u),f=f.slice(),a=c-u){for((o=a<0)?(a=-a,i=f):(u=c,i=p),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(n=(o=(a=f.length)<(t=p.length))?a:t,a=t=0;t0)for(;t--;f[r++]=0);for(t=l-1;n>a;){if(f[--n]=0;){for(r=0,d=S[i]%w,b=S[i]/w|0,o=i+(s=c);o>i;)r=((u=d*(u=_[--s]%w)+(a=b*u+(f=_[s]/w|0)*d)%w*w+y[o]+r)/v|0)+(a/w|0)+b*f,y[o--]=u%v;y[o]=r}return r?++n:y.splice(0,1),G(e,y,n)},T.negated=function(){var e=new H(this);return e.s=-e.s||null,e},T.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 o=n.e/h,s=e.e/h,a=n.c,c=e.c;if(!o||!s){if(!a||!c)return new H(i/0);if(!a[0]||!c[0])return c[0]?e:new H(a[0]?n:0*i)}if(o=m(o),s=m(s),a=a.slice(),i=o-s){for(i>0?(s=o,r=c):(i=-i,r=a),r.reverse();i--;r.push(0));r.reverse()}for((i=a.length)-(t=c.length)<0&&(r=c,c=a,a=r,t=i),i=0;t;)i=(a[--t]=a[t]+c[t]+i)/l|0,a[t]=l===a[t]?0:a[t]%l;return i&&(a=[i].concat(a),++s),G(e,a,s)},T.precision=T.sd=function(e,t){var r,n,i,o=this;if(null!=e&&e!==!!e)return w(e,1,b),null==t?t=O:w(t,0,8),W(new H(o),e,t);if(!(r=o.c))return null;if(n=(i=r.length-1)*h+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},T.shiftedBy=function(e){return w(e,-p,p),this.times("1e"+e)},T.squareRoot=T.sqrt=function(){var e,t,n,i,o,s=this,a=s.c,c=s.s,u=s.e,f=P+4,l=new H("0.5");if(1!==c||!a||!a[0])return new H(!c||c<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(c=Math.sqrt(+s))||c==1/0?(((t=y(a)).length+u)%2==0&&(t+="0"),c=Math.sqrt(t),u=m((u+1)/2)-(u<0||u%2),n=new H(t=c==1/0?"1e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new H(c+""),n.c[0])for((c=(u=n.e)+f)<3&&(c=0);;)if(o=n,n=l.times(o.plus(r(s,o,f,1))),y(o.c).slice(0,c)===(t=y(n.c)).slice(0,c)){if(n.e0&&h>0){for(n=h%o||o,c=l.substr(0,n);n0&&(c+=a+l.slice(n)),f&&(c="-"+c)}r=u?c+L.decimalSeparator+((s=+L.fractionGroupSize)?u.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+L.fractionGroupSeparator):u):c}return r},T.toFraction=function(e){var t,n,i,o,s,a,c,f,l,p,g,b,m=this,v=m.c;if(null!=e&&(!(f=new H(e)).isInteger()&&(f.c||1!==f.s)||f.lt(R)))throw Error(u+"Argument "+(f.isInteger()?"out of range: ":"not an integer: ")+e);if(!v)return m.toString();for(n=new H(R),p=i=new H(R),o=l=new H(R),b=y(v),a=n.e=b.length-m.e-1,n.c[0]=d[(c=a%h)<0?h+c:c],e=!e||f.comparedTo(n)>0?a>0?n:p:f,c=K,K=1/0,f=new H(b),l.c[0]=0;g=r(f,n,0,1),1!=(s=i.plus(g.times(o))).comparedTo(e);)i=o,o=s,p=l.plus(g.times(s=p)),l=s,n=f.minus(g.times(s=n)),f=s;return s=r(e.minus(i),o,0,1),l=l.plus(s.times(p)),i=i.plus(s.times(o)),l.s=p.s=m.s,t=r(p,o,a*=2,O).minus(m).abs().comparedTo(r(l,i,a,O).minus(m).abs())<1?[p.toString(),o.toString()]:[l.toString(),i.toString()],K=c,t},T.toNumber=function(){return+this},T.toPrecision=function(e,t){return null!=e&&w(e,1,b),q(this,e,t,2)},T.toString=function(e){var t,r=this,i=r.s,o=r.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(t=y(r.c),null==e?t=o<=M||o>=N?S(t,o):E(t,o,"0"):(w(e,2,z.length,"Base"),t=n(E(t,o,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},T.valueOf=T.toJSON=function(){var e,t=this,r=t.e;return null===r?t.toString():(e=y(t.c),e=r<=M||r>=N?S(e,r):E(e,r,"0"),t.s<0?"-"+e:e)},T._isBigNumber=!0,null!=t&&H.set(t),H}()).default=o.BigNumber=o,void 0===(n=function(){return o}.call(t,r,t,e))||(e.exports=n)}()},function(e,t,r){"use strict";const n=r(337);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";(function(n){const i=r(20),o=r(26);(t=e.exports=o(class{constructor(e,t,r){0!==r&&i(r,"A DAGNode requires it's serialized size"),this._data=e||n.alloc(0),this._links=t||[],this._serializedSize=r}toJSON(){return this._json||(this._json=Object.freeze({data:this.data,links:this.links.map(e=>e.toJSON()),size:this.size})),Object.assign({},this._json)}toString(){return`DAGNode `}get data(){return this._data}set data(e){throw new Error("Can't set property: 'data' is immutable")}get links(){return this._links}set links(e){throw new Error("Can't set property: 'links' is immutable")}get size(){return void 0===this._size&&(this._size=this.links.reduce((e,t)=>e+t.size,this._serializedSize)),this._size}set size(e){throw new Error("Can't set property: 'size' is immutable")}},{className:"DAGNode",symbolName:"@ipld/js-ipld-dag-pb/dagnode"})).create=r(340),t.clone=r(1116),t.addLink=r(1117),t.rmLink=r(1118)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(318),{serialize:i}=r(341),o=r(342).linkSort,s=r(339),a=r(182);e.exports=function(e,r,c){if("function"==typeof e?(c=e,e=void 0):"string"==typeof e&&(e=t.from(e)),"function"==typeof r&&(c=r,r=[]),!t.isBuffer(e))return c(new Error("Passed 'data' is not a buffer or a string!"));r=r.map(e=>a.isDAGLink(e)?e:a.util.createDagLinkFromB58EncodedHash(e)),r=n(r,o),i({data:e,links:r},(t,n)=>{if(t)return c(t);c(null,new s(e,r,n.length))})}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(n,i){const o=r(16),s=r(19)(r(1113)),a=r(780),c=r(182),u=r(339),f=r(63),l=r(10);function h(e,t){let r,{data:n,links:i=[]}=e;!u.isDAGNode(e)&&i&&(i=i.map(e=>c.isDAGLink(e)?e:c.util.createDagLinkFromB58EncodedHash(e)));try{r=s.PBNode.encode(function(e){const t={};e.data&&e.data.length>0?t.Data=e.data:t.Data=null;e.links&&e.links.length>0?t.Links=e.links.map(e=>({Hash:e.cid.buffer,Name:e.name,Tsize:e.size})):t.Links=null;return t}({data:n,links:i}))}catch(e){return t(e)}t(null,r)}(t=e.exports).serialize=h,t.deserialize=function(e,t){const r=s.PBNode.decode(e),o=r.Links.map(e=>new c(e.Name,e.Tsize,e.Hash)),a=null==r.Data?n.alloc(0):r.Data;i(()=>t(null,new u(a,o,e.length)))},t.cid=function(e,t,r){"function"==typeof t&&(r=t,t={});const i=(t=t||{}).hashAlg||a.defaultHashAlg;let s=t.version;void 0===s&&(s="sha2-256"===i?0:1),l([t=>{if(n.isBuffer(e))return t(null,e);h(e,t)},(e,t)=>f(e,i,t),(e,t)=>t(null,new o(s,a.multicodec,e))],r)}}).call(this,r(0).Buffer,r(35).setImmediate)},function(e,t,r){"use strict";(function(n){const i=r(182),{cid:o}=r(341);(t=e.exports).cloneData=function(e){let t;return e.data&&e.data.length>0?(t=n.alloc(e.data.length),e.data.copy(t)):t=n.alloc(0),t},t.cloneLinks=function(e){return e.links.slice()},t.linkSort=function(e,t){return n.compare(e.nameAsBuffer,t.nameAsBuffer)},t.toDAGLink=function(e,t,r){"function"==typeof t&&(r=t,t={}),o(e,t,(n,o)=>{if(n)return r(n);r(null,new i(t.name||"",e.size,o))})}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(41),i=r(787).ensureMultiaddr,o=r(1139),s=r(20);class a{constructor(e){s(e,"Missing peerId. Use Peer.create(cb) to create one"),this.id=e,this.multiaddrs=new o,this.protocols=new Set,this._connectedMultiaddr=void 0}connect(e){if(e=i(e),!this.multiaddrs.has(e)&&e.toString()!==`/ipfs/${this.id.toB58String()}`)throw new Error("can't be connected to missing multiaddr from set");this._connectedMultiaddr=e}disconnect(){this._connectedMultiaddr=void 0}isConnected(){return this._connectedMultiaddr}}a.create=((e,t)=>{if("function"==typeof e)return t=e,e=null,void n.create((e,r)=>{if(e)return t(e);t(null,new a(r))});"function"==typeof e.toJSON?t(null,new a(e)):n.createFromJSON(e,(e,r)=>t(e,new a(r)))}),a.isPeerInfo=(e=>Boolean("object"==typeof e&&e.id&&e.multiaddrs)),e.exports=a},function(e,t,r){"use strict";(function(t){const n=r(9),i=r(24),o=r(147),s=r(16),a=/^https?:\/\/[^\/]+\/(ip(f|n)s)\/((\w+).*)/,c=/^\/(ip(f|n)s)\/((\w+).*)/,u=1,f=4,l=/^https?:\/\/([^\/]+)\.(ip(?:f|n)s)\.[^\/]+/;function h(e){try{return s.isCID(new s(e))}catch(e){return!1}}function p(e,t,r=u,n=f){const i=g(e);if(!i)return!1;const o=i.match(t);if(!o)return!1;if("ipfs"!==o[r])return!1;let s=o[n];return s&&t===l&&(s=s.toLowerCase()),h(s)}function d(e,t,r=u,n){const i=g(e);if(!i)return!1;const o=i.match(t);if(!o)return!1;if("ipns"!==o[r])return!1;if(n&&t===l){let e=o[n];return h(e=e.toLowerCase())}return!0}function g(e){return t.isBuffer(e)?n.encode(e):"string"==typeof e&&e}const b=e=>p(e,l,2,1),m=e=>d(e,l,2,1);e.exports={multihash:function(e){const r=g(e);try{const e=t.from(n.decode(r));return i.decode(e),!0}catch(e){return!1}},cid:h,base32cid:e=>"base32"===function(e){try{return o.isEncoded(e)}catch(e){return!1}}(e)&&h(e),ipfsSubdomain:b,ipnsSubdomain:m,subdomain:e=>b(e)||m(e),subdomainPattern:l,ipfsUrl:e=>p(e,a),ipnsUrl:e=>d(e,a),url:e=>p(e,a)||d(e,a),urlPattern:a,ipfsPath:e=>p(e,c),ipnsPath:e=>d(e,c),path:e=>p(e,c)||d(e,c),pathPattern:c,urlOrPath:e=>p(e,a)||d(e,a)||p(e,c)||d(e,c)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(15),i=r(31),o=r(1152),s=r(639),a=r(5),c=r(9),u=r(26),f=new Error("Sorry, Not Implemented Yet."),l=u.proto(function(e){if(!(this instanceof l))return new l(e);if(null==e&&(e=""),e instanceof t)this.buffer=o.fromBuffer(e);else if("string"==typeof e||e instanceof String){if(e.length>0&&"/"!==e.charAt(0))throw new Error(`multiaddr "${e}" must start with a "/"`);this.buffer=o.fromString(e)}else{if(!(e.buffer&&e.protos&&e.protoCodes))throw new Error("addr must be a string, Buffer, or another Multiaddr");this.buffer=o.fromBuffer(e.buffer)}},{className:"Multiaddr",symbolName:"@multiformats/js-multiaddr/multiaddr"});l.prototype.toString=function(){return o.bufferToString(this.buffer)},l.prototype.toOptions=function(){const e={},t=this.toString().split("/");return e.family="ip4"===t[1]?"ipv4":"ipv6",e.host=t[2],e.transport=t[3],e.port=t[4],e},l.prototype.inspect=function(){return""},l.prototype.protos=function(){return n(this.protoCodes(),function(e){return i(s(e))})},l.prototype.protoCodes=function(){const e=[],t=this.buffer;let r=0;for(;r{if(e[0]===s.names.ipfs.code)return!0})[0][1],c.decode(e)}catch(t){e=null}return e},l.prototype.equals=function(e){return this.buffer.equals(e.buffer)},l.prototype.nodeAddress=function(){const e=this.protoCodes(),t=this.protoNames(),r=this.toString().split("/").slice(1);if(r.length<4)throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6}/{address}/{tcp, udp}/{port}".');if(4!==e[0]&&41!==e[0]&&54!==e[0]&&55!==e[0])throw new Error(`no protocol with name: "'${t[0]}'". Must have a valid family name: "{ip4, ip6, dns4, dns6}".`);if("tcp"!==r[2]&&"udp"!==r[2])throw new Error(`no protocol with name: "'${t[1]}'". Must have a valid transport protocol: "{tcp, udp}".`);return{family:41===e[0]||55===e[0]?6:4,address:r[1],port:r[3]}},l.fromNodeAddress=function(e,t){if(!e)throw new Error("requires node address object");if(!t)throw new Error("requires transport protocol");const r="IPv6"===e.family?"ip6":"ip4";return l("/"+[r,e.address,t,e.port].join("/"))},l.prototype.isThinWaistAddress=function(e){const t=(e||this).protos();return 2===t.length&&((4===t[0].code||41===t[0].code)&&(6===t[1].code||273===t[1].code))},l.prototype.fromStupidString=function(e){throw f},l.protocols=s,l.isName=function(e){return!!l.isMultiaddr(e)&&e.protos().some(e=>e.resolvable)},l.resolve=function(e,t){return l.isMultiaddr(e)&&l.isName(e)?t(new Error("not implemented yet")):t(new Error("not a valid name"))},e.exports=l}).call(this,r(0).Buffer)},function(e,t,r){var n=r(1182),i=r(1183),o=r(1184),s=r(1185),a=r(1186);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t({block:e.cid.buffer,priority:Number(e.priority),cancel:Boolean(e.cancel)}))},blocks:Array.from(this.blocks.values()).map(e=>e.data)};return this.full&&(e.wantlist.full=!0),h.Message.encode(e)}serializeToBitswap110(){const e={wantlist:{entries:Array.from(this.wantlist.values()).map(e=>({block:e.cid.buffer,priority:Number(e.priority),cancel:Boolean(e.cancel)}))},payload:[]};return this.full&&(e.wantlist.full=!0),this.blocks.forEach(t=>{e.payload.push({prefix:t.cid.prefix,data:t.data})}),h.Message.encode(e)}equals(e){const t=(e,t)=>{if(e.equals&&"function"==typeof e.equals)return e.equals(t)};return!(this.full!==e.full||!o(this.wantlist,e.wantlist,t)||!o(this.blocks,e.blocks,t))}get[Symbol.toStringTag](){const e=Array.from(this.wantlist.keys()),t=Array.from(this.blocks.keys());return`BitswapMessage `}}d.deserialize=((e,r)=>{let n;try{n=h.Message.decode(e)}catch(e){return t(()=>r(e))}const o=n.wantlist&&n.wantlist.full||!1,s=new d(o);return n.wantlist&&n.wantlist.entries.forEach(e=>{let t;try{t=new c(e.block)}catch(e){return r(e)}s.addEntry(t,e.priority,e.cancel)}),n.blocks.length>0?a(n.blocks,(e,t)=>{l(e,"sha2-256",(n,o)=>{if(n)return t(n);let a;try{a=new c(o)}catch(n){return r(n)}s.addBlock(new i(e,a)),t()})},e=>{if(e)return r(e);r(null,s)}):n.payload.length>0?a(n.payload,(e,t)=>{e.prefix&&e.data||t();const n=f(e.prefix),o=n[0],a=n[1],h=n[2];l(e.data,h,(n,f)=>{if(n)return t(n);let l;try{l=new c(o,u[a.toString("16")],f)}catch(n){return r(n)}s.addBlock(new i(e.data,l)),t()})},e=>{if(e)return r(e);r(null,s)}):void r(null,s)}),d.Entry=p,e.exports=d}).call(this,r(35).setImmediate)},function(e,t,r){"use strict";const n=r(1266),i=r(1267);class o{constructor(e){this.set=new Map,this._stats=e}get length(){return this.set.size}add(e,t){const r=e.buffer.toString(),n=this.set.get(r);n?(n.inc(),n.priority=t):(this.set.set(r,new i(e,t)),this._stats&&this._stats.push(null,"wantListSize",1))}remove(e){const t=e.buffer.toString(),r=this.set.get(t);r&&(r.dec(),r.hasRefs()||(this.set.delete(t),this._stats&&this._stats.push(null,"wantListSize",-1)))}removeForce(e){this.set.has(e)&&this.set.delete(e)}forEach(e){return this.set.forEach(e)}entries(){return this.set.entries()}sortedEntries(){return new Map(n(Array.from(this.set.entries()),e=>e[1].key))}contains(e){const t=e.buffer.toString();return this.set.get(t)}}o.Entry=i,e.exports=o},function(e,t,r){(function(n){function i(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG),e}(t=e.exports=r(1353)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),!r)return;var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,n)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=i,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(i())}).call(this,r(6))},function(e,t){t.encode=function(e){var t="";for(var r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t},t.decode=function(e){for(var t={},r=e.split("&"),n=0,i=r.length;n=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(i())}).call(this,r(6))},function(e,t){function r(e,t,r){var n=e.length;if(!n)return r(t);function i(){--n||r(t)}e.forEach(function(e){e?e(t,i):i()}),n||i()}e.exports=function(e){return function(t,n){!function i(){t?r(e,t,n):e.length?e[0]?e[0](null,function(t,o){t?(e.shift(),!0===t?i():r(e,t,n)):n(null,o)}):(e.shift(),i()):n(!0)}()}}},function(e,t,r){"use strict";e.exports=function(){var e,t;return{source:function(r,n){e?e(r,n):t=[r,n]},sink:function(r){if("function"!=typeof r)throw new Error("read must be function");if(e)throw new Error("already piped");if(e=r,t){var n=t;t=null,e.apply(null,n)}}}}},function(e,t,r){"use strict";t.Listener=t.listener=r(1575),t.Dialer=t.dialer=r(1580),t.matchSemver=r(1581),t.matchExact=r(908)},function(e,t,r){"use strict";(function(n){const i=r(14),o=r(95),s=r(1576);function a(e){const t=(~~(1e9*Math.random())).toString(36);function r(e){return r=>{Array.isArray(r)&&(r=r.join(" ")),e("(%s) %s",t,r)}}const n=r(s("mss:"+e));return n.error=r(s("mss:"+e+":error")),n}(t=e.exports).writeEncoded=((e,t,r)=>{!function(e,t){const r=n.isBuffer(e)?[e]:[n.from(e)];i(i.values(r),o.encode(),i.collect((e,r)=>{if(e)return t(e);t(null,r[0])}))}(t,(t,n)=>{if(t)return r(t);e.write(n)})}),t.log={},t.log.dialer=(()=>a("dialer\t")),t.log.listener=(()=>a("listener\t"))}).call(this,r(0).Buffer)},function(e,t,r){"use strict";t.importer=t.Importer=r(929),t.exporter=t.Exporter=r(184)},function(e,t,r){var n=r(1675);function i(e,t){return(e=e||[]).push(t),e}e.exports=function(e,t,r,o){var s,a;function c(i){var u=null,f=!1,l=0;if(i,s)return i(!!s.abort||s,function(e){o(e),a&&a()});var h=!1,p=n(function(){h||s||(h=!0,i(null,function(n,c){h=!1,function(c,h){s||((s=n)?f||o(!0===s?null:s):(u=t(u,h),l=u&&u.length||0,null!=u&&function t(){if(f)return;var r=u;u=null;f=!0;l=0;e(r,function(e){f=!1,!0!==s||l?s&&!0!==s?(o(s),a&&a()):e?i(s=!!e.abort||e,o):l?t():p():o(e)})}(),l{let u=a.cidVersion||i,f=a.hashAlg||o,l=a.codec||s;if(t.isBuffer(e)&&(u=1,l="raw"),"sha2-256"!==f&&(u=1),a.onlyHash)return n(e,{version:u,hashAlg:f},(t,r)=>{c(t,{cid:r,node:e})});r.put(e,{version:u,hashAlg:f,format:l},(t,r)=>{c(t,{cid:r,node:e})})})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(335),i=r(64),o=r(10),s=r(86),a=r(68),c=s.DAGLink,u=s.DAGNode,f=r(63),l=r(697),h=r(365),p=r(1689),d=r(37),g=r(322),b=r(99),m=r(1690),y=function(e){return new Promise((r,n)=>{f(e,"murmur3-128",(e,i)=>{if(e)n(e);else{const e=i.slice(2,10),n=e.length,o=t.alloc(n);for(let t=0;t{e(t.key,t.value,r)}),g(t))}flush(e,r,s,f){!function(e,r,s,f,l,p){const d=r._children;let g=0;const b=[];i(()=>g{const r=d.get(g);r?function(t,r,i){const o=n(r.toString(16).toUpperCase(),2,"0");if(m.isBucket(t))A(e,t,s,f,null,(e,{cid:t,node:r})=>{e?i(e):(b.push(new c(o,r.size,t)),i())});else{const e=t.value,r=o+t.key;b.push(new c(r,e.size,e.multihash)),i()}}(r,g,e=>{g++,t(e)}):(g++,t())},n=>{n?p(n):function(n,i){const c=t.from(d.bitField().reverse()),p=new a("hamt-sharded-directory",c);p.fanout=r.tableSize(),p.hashType=e.hashFn.code,o([e=>u.create(p.marshal(),n,e),(t,r)=>h(t,f,e,r),({cid:e,node:t},r)=>{const n={path:s,size:t.size,multihash:e.buffer};l&&l.push(n),r(null,{cid:e,node:t})}],i)}(b,p)})}(this._options,this._bucket,e,r,s,(e,t)=>{if(e)return f(e);this.multihash=t.cid.buffer,this.size=t.node.size,f(null,t)})}}function A(e,r,s,f,l,p){const d=r._children;let g=0;const b=[];i(()=>g{const t=d.get(g);if(t){y(t,g,t=>{g++;e(t)})}else{g++;e()}},e=>{if(e){p(e);return}v(b,p)});function y(t,r,i){const o=n(r.toString(16).toUpperCase(),2,"0");if(m.isBucket(t)){A(e,t,s,f,null,(e,{cid:t,node:r})=>{if(e){i(e);return}b.push(new c(o,r.size,t));i()})}else{const e=t.value;const r=o+t.key;b.push(new c(r,e.size,e.multihash));i()}}function v(n,i){const c=t.from(d.bitField().reverse()),p=new a("hamt-sharded-directory",c);p.fanout=r.tableSize(),p.hashType=e.hashFn.code,o([e=>u.create(p.marshal(),n,e),(t,r)=>h(t,f,e,r),({cid:e,node:t},r)=>{const n={path:s,size:t.size,multihash:e.buffer};if(l){l.push(n)}r(null,{cid:e,node:t})}],i)}}e.exports=function(e,t){return new w(e,t)},e.exports.hashFn=y}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(16);function i(e){const t={},r=e.split("-");switch(r.length){case 1:t.avgChunkSize=262144;break;case 2:t.avgChunkSize=o(r[1],"avg");break;case 4:t.minChunkSize=o(r[1],"min"),t.avgChunkSize=o(r[2],"avg"),t.maxChunkSize=o(r[3],"max");break;default:throw new Error('Incorrect chunker format (expected "rabin" "rabin-[avg]" or "rabin-[min]-[avg]-[max]"')}return t}function o(e,t){let r=parseInt(e);if(isNaN(r))throw new Error(`Chunker parameter ${t} must be an integer`);return r}t.normalizePath=(t=>e.isBuffer(t)?new n(t).toString():n.isCID(t)?t.toString():(0===t.indexOf("/ipfs/")&&(t=t.substring("/ipfs/".length)),"/"===t.charAt(t.length-1)&&(t=t.substring(0,t.length-1)),t)),t.parseChunkerString=(e=>{if(e){if(e.startsWith("size-")){const t=e.split("-")[1],r=parseInt(t);if(isNaN(r))throw new Error("Chunker parameter size must be an integer");return{chunker:"fixed",chunkerOptions:{maxChunkSize:r}}}if(e.startsWith("rabin"))return{chunker:"rabin",chunkerOptions:i(e)};throw new Error(`Unrecognized chunker option: ${e}`)}return{chunker:"fixed"}})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var i={};function o(e,t,r){r||(r=Error);var n=function(e){function n(e,r,i){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(e,r,i)))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,r),n}();n.prototype.name=r.name,n.prototype.code=e,i[e]=n}function s(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(e){return String(e)}),r>2?"one of "+t+" "+e.slice(0,r-1).join(", ")+", or "+e[r-1]:2===r?"one of "+t+" "+e[0]+" or "+e[1]:"of "+t+" "+e[0]}return"of "+t+" "+String(e)}o("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),o("ERR_INVALID_ARG_TYPE",function(e,t,r){var i,o,a=void 0;"string"==typeof t&&(i="not ",t.substr(!o||o<0?0:+o,i.length)===i)?(a="must not be",t=t.replace(/^not /,"")):a="must be";var c=void 0;(function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t})(e," argument")?c="The "+e+" "+a+" "+s(t,"type"):c='The "'+e+'" '+(function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument")+" "+a+" "+s(t,"type");return c+=". Received type "+(void 0===r?"undefined":n(r))},TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=i},function(e,t,r){"use strict";const n=r(34).Key;e.exports={FILE_SEPARATOR:"/",MFS_ROOT_KEY:new n("/local/filesroot"),MAX_CHUNK_SIZE:262144,MAX_LINKS:174,FILE_TYPES:{file:0,directory:1,"hamt-sharded-directory":1}}},function(e,t,r){"use strict";const n=r(68).unmarshal,{formatCid:i,toMfsPath:o,loadNode:s}=r(116),a=r(10),c=r(37),u=r(72),f=r(99),l=r(184),h=r(16),p=r(11)("ipfs:mfs:stat"),d={hash:!1,size:!1,withLocal:!1,cidBase:"base58btc"};e.exports=(e=>(function(t,r,g){"function"==typeof r&&(g=r,r={}),r=Object.assign({},d,r),p(`Fetching stats for ${t}`),a([r=>o(e,t,r),({mfsPath:o,depth:a},d)=>{c(l(o,e.ipld,{maxDepth:a}),f((t,o)=>r.hash?o(null,{hash:i(new h(t.hash),r.cidBase)}):r.size?o(null,{size:t.size}):void s(e,{cid:t.hash},(e,t)=>{if(e)return o(e);const{node:s,cid:a}=t,c=n(s.data);let u=s.links.length;"file"===c.type&&(u=c.blockSizes.length),o(null,{hash:i(a,r.cidBase),size:c.fileSize()||0,cumulativeSize:s.size,blocks:u,type:c.type,local:void 0,sizeLocal:void 0,withLocality:!1})})),u((e,r)=>e?d(e):r.length?(p(`Stats for ${t}`,r[0]),d(null,r[0])):d(new Error(`${t} does not exist`))))}],g)}))},function(e,t,r){"use strict";var n=t;n.base=r(1791),n.short=r(1792),n.mont=r(1793),n.edwards=r(1794)},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(1847),o=r(1853),s=r(20),a=r(303),c=r(71),u=r(150),f=r(3).Buffer;Object.assign(t,r(1855)),t.MAX_INTEGER=new c("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new c("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.SHA3_NULL_S=t.KECCAK256_NULL_S,t.KECCAK256_NULL=f.from(t.KECCAK256_NULL_S,"hex"),t.SHA3_NULL=t.KECCAK256_NULL,t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.SHA3_RLP_ARRAY_S=t.KECCAK256_RLP_ARRAY_S,t.KECCAK256_RLP_ARRAY=f.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.SHA3_RLP_ARRAY=t.KECCAK256_RLP_ARRAY,t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.SHA3_RLP_S=t.KECCAK256_RLP_S,t.KECCAK256_RLP=f.from(t.KECCAK256_RLP_S,"hex"),t.SHA3_RLP=t.KECCAK256_RLP,t.BN=c,t.rlp=a,t.secp256k1=o,t.zeros=function(e){return f.allocUnsafe(e).fill(0)},t.zeroAddress=function(){var e=t.zeros(20);return t.bufferToHex(e)},t.setLengthLeft=t.setLength=function(e,r,n){var i=t.zeros(r);return e=t.toBuffer(e),n?e.length0&&"0"===r.toString();)r=(e=e.slice(1))[0];return e},t.toBuffer=function(e){if(!f.isBuffer(e))if(Array.isArray(e))e=f.from(e);else if("string"==typeof e)e=t.isHexString(e)?f.from(t.padToEven(t.stripHexPrefix(e)),"hex"):f.from(e);else if("number"==typeof e)e=t.intToBuffer(e);else if(null==e)e=f.allocUnsafe(0);else if(c.isBN(e))e=e.toArrayLike(f);else{if(!e.toArray)throw new Error("invalid type");e=f.from(e.toArray())}return e},t.bufferToInt=function(e){return new c(t.toBuffer(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=t.toBuffer(e)).toString("hex")},t.fromSigned=function(e){return new c(e).fromTwos(256)},t.toUnsigned=function(e){return f.from(e.toTwos(256).toArray())},t.keccak=function(e,r){return e=t.toBuffer(e),r||(r=256),i("keccak"+r).update(e).digest()},t.keccak256=function(e){return t.keccak(e)},t.sha3=t.keccak,t.sha256=function(e){return e=t.toBuffer(e),u("sha256").update(e).digest()},t.ripemd160=function(e,r){e=t.toBuffer(e);var n=u("rmd160").update(e).digest();return!0===r?t.setLength(n,32):n},t.rlphash=function(e){return t.keccak(a.encode(e))},t.isValidPrivate=function(e){return o.privateKeyVerify(e)},t.isValidPublic=function(e,t){return 64===e.length?o.publicKeyVerify(f.concat([f.from([4]),e])):!!t&&o.publicKeyVerify(e)},t.pubToAddress=t.publicToAddress=function(e,r){return e=t.toBuffer(e),r&&64!==e.length&&(e=o.publicKeyConvert(e,!1).slice(1)),s(64===e.length),t.keccak(e).slice(-20)};var l=t.privateToPublic=function(e){return e=t.toBuffer(e),o.publicKeyCreate(e,!1).slice(1)};t.importPublic=function(e){return 64!==(e=t.toBuffer(e)).length&&(e=o.publicKeyConvert(e,!1).slice(1)),e},t.ecsign=function(e,t){var r=o.sign(e,t),n={};return n.r=r.signature.slice(0,32),n.s=r.signature.slice(32,64),n.v=r.recovery+27,n},t.hashPersonalMessage=function(e){var r=t.toBuffer("Ethereum Signed Message:\n"+e.length.toString());return t.keccak(f.concat([r,e]))},t.ecrecover=function(e,r,n,i){var s=f.concat([t.setLength(n,32),t.setLength(i,32)],64),a=r-27;if(0!==a&&1!==a)throw new Error("Invalid signature v value");var c=o.recover(e,s,a);return o.publicKeyConvert(c,!1).slice(1)},t.toRpcSig=function(e,r,n){if(27!==e&&28!==e)throw new Error("Invalid recovery id");return t.bufferToHex(f.concat([t.setLengthLeft(r,32),t.setLengthLeft(n,32),t.toBuffer(e-27)]))},t.fromRpcSig=function(e){if(65!==(e=t.toBuffer(e)).length)throw new Error("Invalid signature length");var r=e[64];return r<27&&(r+=27),{v:r,r:e.slice(0,32),s:e.slice(32,64)}},t.privateToAddress=function(e){return t.publicToAddress(l(e))},t.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},t.isZeroAddress=function(e){return t.zeroAddress()===t.addHexPrefix(e)},t.toChecksumAddress=function(e){e=t.stripHexPrefix(e).toLowerCase();for(var r=t.keccak(e).toString("hex"),n="0x",i=0;i=8?n+=e[i].toUpperCase():n+=e[i];return n},t.isValidChecksumAddress=function(e){return t.isValidAddress(e)&&t.toChecksumAddress(e)===e},t.generateAddress=function(e,r){return e=t.toBuffer(e),r=(r=new c(r)).isZero()?null:f.from(r.toArray()),t.rlphash([e,r]).slice(-20)},t.isPrecompiled=function(e){var r=t.unpad(e);return 1===r.length&&r[0]>=1&&r[0]<=8},t.addHexPrefix=function(e){return"string"!=typeof e?e:t.isHexPrefixed(e)?e:"0x"+e},t.isValidSignature=function(e,t,r,n){var i=new c("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),o=new c("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return 32===t.length&&32===r.length&&((27===e||28===e)&&(t=new c(t),r=new c(r),!(t.isZero()||t.gt(o)||r.isZero()||r.gt(o))&&(!1!==n||1!==new c(r).cmp(i))))},t.baToJSON=function(e){if(f.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var r=[],n=0;n=i.length,"The field "+r.name+" must not have more "+r.length+" bytes")):r.allowZero&&0===i.length||!r.length||s(r.length===i.length,"The field "+r.name+" must have byte length of "+r.length),e.raw[n]=i}e._fields.push(r.name),Object.defineProperty(e,r.name,{enumerable:!0,configurable:!0,get:i,set:o}),r.default&&(e[r.name]=r.default),r.alias&&Object.defineProperty(e,r.alias,{enumerable:!1,configurable:!0,set:o,get:i})}),i)if("string"==typeof i&&(i=f.from(t.stripHexPrefix(i),"hex")),f.isBuffer(i)&&(i=a.decode(i)),Array.isArray(i)){if(i.length>e._fields.length)throw new Error("wrong number of fields in data");i.forEach(function(r,n){e[e._fields[n]]=t.toBuffer(r)})}else{if("object"!==(void 0===i?"undefined":n(i)))throw new Error("invalid data");var o=Object.keys(i);r.forEach(function(t){-1!==o.indexOf(t.name)&&(e[t.name]=i[t.name]),-1!==o.indexOf(t.alias)&&(e[t.alias]=i[t.alias])})}}},function(e,t,r){"use strict";const n=r(374).SmartBuffer,i=r(314),o=r(148),s=r(24),a=r(16);(t=e.exports).SHA1_LENGTH=i.defaultLengths[i.names.sha1],t.find=((e,t)=>{for(let r=0;r{let t=e.match(/^(([^<]+)\s)?\s?<([^>]+)>\s?(\d+\s[+\-\d]+)?$/);return null===t?null:{name:t[2],email:t[3],date:t[4]}}),t.serializePersonLine=(e=>{let t=[];return e.name&&t.push(e.name),t.push("<"+e.email+">"),e.date&&t.push(e.date),t.join(" ")}),t.shaToCid=(e=>{let r=new n;return r.writeUInt8(1),r.writeBuffer(o["git-raw"]),r.writeUInt8(i.names.sha1),r.writeUInt8(t.SHA1_LENGTH),r.writeBuffer(e),r.toBuffer()}),t.cidToSha=(e=>{let t=s.decode(new a(e).multihash);return"sha1"!==t.name?null:t.digest})},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});const n=r(1883),i=4096,o="utf8";class s{constructor(t){if(this.length=0,this._encoding=o,this._writeOffset=0,this._readOffset=0,s.isSmartBufferOptions(t))if(t.encoding&&(n.checkEncoding(t.encoding),this._encoding=t.encoding),t.size){if(!(n.isFiniteInteger(t.size)&&t.size>0))throw new Error(n.ERRORS.INVALID_SMARTBUFFER_SIZE);this._buff=e.allocUnsafe(t.size)}else if(t.buff){if(!(t.buff instanceof e))throw new Error(n.ERRORS.INVALID_SMARTBUFFER_BUFFER);this._buff=t.buff,this.length=t.buff.length}else this._buff=e.allocUnsafe(i);else{if(void 0!==t)throw new Error(n.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=e.allocUnsafe(i)}}static fromSize(e,t){return new this({size:e,encoding:t})}static fromBuffer(e,t){return new this({buff:e,encoding:t})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){const t=e;return t&&(void 0!==t.encoding||void 0!==t.size||void 0!==t.buff)}readInt8(t){return this._readNumberValue(e.prototype.readInt8,1,t)}readInt16BE(t){return this._readNumberValue(e.prototype.readInt16BE,2,t)}readInt16LE(t){return this._readNumberValue(e.prototype.readInt16LE,2,t)}readInt32BE(t){return this._readNumberValue(e.prototype.readInt32BE,4,t)}readInt32LE(t){return this._readNumberValue(e.prototype.readInt32LE,4,t)}writeInt8(t,r){return this._writeNumberValue(e.prototype.writeInt8,1,t,r),this}insertInt8(t,r){return this._insertNumberValue(e.prototype.writeInt8,1,t,r),this}writeInt16BE(t,r){return this._writeNumberValue(e.prototype.writeInt16BE,2,t,r),this}insertInt16BE(t,r){return this._insertNumberValue(e.prototype.writeInt16BE,2,t,r),this}writeInt16LE(t,r){return this._writeNumberValue(e.prototype.writeInt16LE,2,t,r),this}insertInt16LE(t,r){return this._insertNumberValue(e.prototype.writeInt16LE,2,t,r),this}writeInt32BE(t,r){return this._writeNumberValue(e.prototype.writeInt32BE,4,t,r),this}insertInt32BE(t,r){return this._insertNumberValue(e.prototype.writeInt32BE,4,t,r),this}writeInt32LE(t,r){return this._writeNumberValue(e.prototype.writeInt32LE,4,t,r),this}insertInt32LE(t,r){return this._insertNumberValue(e.prototype.writeInt32LE,4,t,r),this}readUInt8(t){return this._readNumberValue(e.prototype.readUInt8,1,t)}readUInt16BE(t){return this._readNumberValue(e.prototype.readUInt16BE,2,t)}readUInt16LE(t){return this._readNumberValue(e.prototype.readUInt16LE,2,t)}readUInt32BE(t){return this._readNumberValue(e.prototype.readUInt32BE,4,t)}readUInt32LE(t){return this._readNumberValue(e.prototype.readUInt32LE,4,t)}writeUInt8(t,r){return this._writeNumberValue(e.prototype.writeUInt8,1,t,r),this}insertUInt8(t,r){return this._insertNumberValue(e.prototype.writeUInt8,1,t,r),this}writeUInt16BE(t,r){return this._writeNumberValue(e.prototype.writeUInt16BE,2,t,r),this}insertUInt16BE(t,r){return this._insertNumberValue(e.prototype.writeUInt16BE,2,t,r),this}writeUInt16LE(t,r){return this._writeNumberValue(e.prototype.writeUInt16LE,2,t,r),this}insertUInt16LE(t,r){return this._insertNumberValue(e.prototype.writeUInt16LE,2,t,r),this}writeUInt32BE(t,r){return this._writeNumberValue(e.prototype.writeUInt32BE,4,t,r),this}insertUInt32BE(t,r){return this._insertNumberValue(e.prototype.writeUInt32BE,4,t,r),this}writeUInt32LE(t,r){return this._writeNumberValue(e.prototype.writeUInt32LE,4,t,r),this}insertUInt32LE(t,r){return this._insertNumberValue(e.prototype.writeUInt32LE,4,t,r),this}readFloatBE(t){return this._readNumberValue(e.prototype.readFloatBE,4,t)}readFloatLE(t){return this._readNumberValue(e.prototype.readFloatLE,4,t)}writeFloatBE(t,r){return this._writeNumberValue(e.prototype.writeFloatBE,4,t,r),this}insertFloatBE(t,r){return this._insertNumberValue(e.prototype.writeFloatBE,4,t,r),this}writeFloatLE(t,r){return this._writeNumberValue(e.prototype.writeFloatLE,4,t,r),this}insertFloatLE(t,r){return this._insertNumberValue(e.prototype.writeFloatLE,4,t,r),this}readDoubleBE(t){return this._readNumberValue(e.prototype.readDoubleBE,8,t)}readDoubleLE(t){return this._readNumberValue(e.prototype.readDoubleLE,8,t)}writeDoubleBE(t,r){return this._writeNumberValue(e.prototype.writeDoubleBE,8,t,r),this}insertDoubleBE(t,r){return this._insertNumberValue(e.prototype.writeDoubleBE,8,t,r),this}writeDoubleLE(t,r){return this._writeNumberValue(e.prototype.writeDoubleLE,8,t,r),this}insertDoubleLE(t,r){return this._insertNumberValue(e.prototype.writeDoubleLE,8,t,r),this}readString(e,t){let r;"number"==typeof e?(n.checkLengthValue(e),r=Math.min(e,this.length-this._readOffset)):(t=e,r=this.length-this._readOffset),void 0!==t&&n.checkEncoding(t);const i=this._buff.slice(this._readOffset,this._readOffset+r).toString(t||this._encoding);return this._readOffset+=r,i}insertString(e,t,r){return n.checkOffsetValue(t),this._handleString(e,!0,t,r)}writeString(e,t,r){return this._handleString(e,!1,t,r)}readStringNT(e){void 0!==e&&n.checkEncoding(e);let t=this.length;for(let e=this._readOffset;ethis.length)throw new Error(n.ERRORS.INVALID_READ_BEYOND_BOUNDS)}ensureInsertable(e,t){n.checkOffsetValue(t),this._ensureCapacity(this.length+e),tthis.length?this.length=t+e:this.length+=e}_ensureWriteable(e,t){const r="number"==typeof t?t:this._writeOffset;this._ensureCapacity(r+e),r+e>this.length&&(this.length=r+e)}_ensureCapacity(t){const r=this._buff.length;if(t>r){let n=this._buff,i=3*r/2+1;i>>24]^f[d>>>16&255]^l[g>>>8&255]^h[255&b]^t[m++],s=u[d>>>24]^f[g>>>16&255]^l[b>>>8&255]^h[255&p]^t[m++],a=u[g>>>24]^f[b>>>16&255]^l[p>>>8&255]^h[255&d]^t[m++],c=u[b>>>24]^f[p>>>16&255]^l[d>>>8&255]^h[255&g]^t[m++],p=o,d=s,g=a,b=c;return o=(n[p>>>24]<<24|n[d>>>16&255]<<16|n[g>>>8&255]<<8|n[255&b])^t[m++],s=(n[d>>>24]<<24|n[g>>>16&255]<<16|n[b>>>8&255]<<8|n[255&p])^t[m++],a=(n[g>>>24]<<24|n[b>>>16&255]<<16|n[p>>>8&255]<<8|n[255&d])^t[m++],c=(n[b>>>24]<<24|n[p>>>16&255]<<16|n[d>>>8&255]<<8|n[255&g])^t[m++],[o>>>=0,s>>>=0,a>>>=0,c>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],c=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,c=0;c<256;++c){var u=a^a<<1^a<<2^a<<3^a<<4;u=u>>>8^255&u^99,r[s]=u,n[u]=s;var f=e[s],l=e[f],h=e[l],p=257*e[u]^16843008*u;i[0][s]=p<<24|p>>>8,i[1][s]=p<<16|p>>>16,i[2][s]=p<<8|p>>>24,i[3][s]=p,p=16843009*h^65537*l^257*f^16843008*s,o[0][u]=p<<24|p>>>8,o[1][u]=p<<16|p>>>16,o[2][u]=p<<8|p>>>24,o[3][u]=p,0===s?s=a=1:(s=f^e[e[e[h^f]]],a^=e[e[a]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function u(e){this._key=i(e),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o>>24,s=c.SBOX[s>>>24]<<24|c.SBOX[s>>>16&255]<<16|c.SBOX[s>>>8&255]<<8|c.SBOX[255&s],s^=a[o/t|0]<<24):t>6&&o%t==4&&(s=c.SBOX[s>>>24]<<24|c.SBOX[s>>>16&255]<<16|c.SBOX[s>>>8&255]<<8|c.SBOX[255&s]),i[o]=i[o-t]^s}for(var u=[],f=0;f>>24]]^c.INV_SUB_MIX[1][c.SBOX[h>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[h>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&h]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(e){return s(e=i(e),this._keySchedule,c.SUB_MIX,c.SBOX,this._nRounds)},u.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},u.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=s(e,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},u.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=u},function(e,t,r){var n=r(27).Buffer,i=r(716);e.exports=function(e,t,r,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=r/8,a=n.alloc(s),c=n.alloc(o||0),u=n.alloc(0);s>0||o>0;){var f=new i;f.update(u),f.update(e),t&&f.update(t),u=f.digest();var l=0;if(s>0){var h=a.length-s;l=Math.min(s,u.length),u.copy(a,h,0,l),s-=l}if(l0){var p=c.length-o,d=Math.min(o,u.length-l);u.copy(c,p,l,l+d),o-=d}}return u.fill(0),{key:a,iv:c}}},function(e,t,r){"use strict";var n=t;n.base=r(1927),n.short=r(1928),n.mont=r(1929),n.edwards=r(1930)},function(e,t,r){(function(t){var n=r(1946),i=r(1956),o=r(1957),s=r(720),a=r(986);function c(e){var r;"object"!=typeof e||t.isBuffer(e)||(r=e.passphrase,e=e.key),"string"==typeof e&&(e=new t(e));var c,u,f=o(e,r),l=f.tag,h=f.data;switch(l){case"CERTIFICATE":u=n.certificate.decode(h,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(u||(u=n.PublicKey.decode(h,"der")),c=u.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(u.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return u.subjectPrivateKey=u.subjectPublicKey,{type:"ec",data:u};case"1.2.840.10040.4.1":return u.algorithm.params.pub_key=n.DSAparam.decode(u.subjectPublicKey.data,"der"),{type:"dsa",data:u.algorithm.params};default:throw new Error("unknown key id "+c)}throw new Error("unknown key type "+l);case"ENCRYPTED PRIVATE KEY":h=function(e,r){var n=e.algorithm.decrypt.kde.kdeparams.salt,o=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),c=i[e.algorithm.decrypt.cipher.algo.join(".")],u=e.algorithm.decrypt.cipher.iv,f=e.subjectPrivateKey,l=parseInt(c.split("-")[1],10)/8,h=a.pbkdf2Sync(r,n,o,l),p=s.createDecipheriv(c,h,u),d=[];return d.push(p.update(f)),d.push(p.final()),t.concat(d)}(h=n.EncryptedPrivateKey.decode(h,"der"),r);case"PRIVATE KEY":switch(c=(u=n.PrivateKey.decode(h,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(u.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:u.algorithm.curve,privateKey:n.ECPrivateKey.decode(u.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return u.algorithm.params.priv_key=n.DSAparam.decode(u.subjectPrivateKey,"der"),{type:"dsa",params:u.algorithm.params};default:throw new Error("unknown key id "+c)}throw new Error("unknown key type "+l);case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(h,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(h,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(h,"der")};case"EC PRIVATE KEY":return{curve:(h=n.ECPrivateKey.decode(h,"der")).parameters.value,privateKey:h.privateKey};default:throw new Error("unknown key type "+l)}}e.exports=c,c.signature=n.signature}).call(this,r(0).Buffer)},function(e,t,r){"use strict";var n=t;n.base=r(1970),n.short=r(1971),n.mont=r(1972),n.edwards=r(1973)},function(e,t,r){"use strict";(function(t){var n=r(30),i=r(189),o=r(311),s=r(69),a=r(62),c=r(188),u=r(211),f=r(127),l=r(383),h=r(32);function p(e,t){if(!(this instanceof p))return new p(e,t);if(e instanceof p)return e;var r=this._classifyArguments(e,t);if(!r.bn||0===r.bn.cmp(new s(0)))throw new TypeError("Number can not be equal to zero, undefined, null or false");if(!r.bn.lt(u.getN()))throw new TypeError("Number must be less than N");if(void 0===r.network)throw new TypeError('Must specify the network ("livenet" or "testnet")');return a.defineImmutable(this,{bn:r.bn,compressed:r.compressed,network:r.network}),Object.defineProperty(this,"publicKey",{configurable:!1,enumerable:!0,get:this.toPublicKey.bind(this)}),this}p.prototype._classifyArguments=function(e,r){var i={compressed:!0,network:r?c.get(r):c.defaultNetwork};if(n.isUndefined(e)||n.isNull(e))i.bn=p._getRandomBN();else if(e instanceof s)i.bn=e;else if(e instanceof t||e instanceof Uint8Array)i=p._transformBuffer(e,r);else if(e.bn&&e.network)i=p._transformObject(e);else if(!r&&c.get(e))i.bn=p._getRandomBN(),i.network=c.get(e);else{if("string"!=typeof e)throw new TypeError("First argument is an unrecognized data type.");a.isHexa(e)?i.bn=new s(new t(e,"hex")):i=p._transformWIF(e,r)}return i},p._getRandomBN=function(){var e,t;do{var r=l.getRandomBuffer(32);e=(t=s.fromBuffer(r)).lt(u.getN())}while(!e);return t},p._transformBuffer=function(e,t){var r={};if(32===e.length)return p._transformBNBuffer(e,t);if(r.network=c.get(e[0],"privatekey"),!r.network)throw new Error("Invalid network");if(t&&r.network!==c.get(t))throw new TypeError("Private key network mismatch");if(34===e.length&&1===e[33])r.compressed=!0;else{if(33!==e.length)throw new Error("Length of buffer must be 33 (uncompressed) or 34 (compressed)");r.compressed=!1}return r.bn=s.fromBuffer(e.slice(1,33)),r},p._transformBNBuffer=function(e,t){var r={};return r.network=c.get(t)||c.defaultNetwork,r.bn=s.fromBuffer(e),r.compressed=!1,r},p._transformWIF=function(e,t){return p._transformBuffer(o.decode(e),t)},p.fromBuffer=function(e,t){return new p(e,t)},p._transformObject=function(e){return{bn:new s(e.bn,"hex"),network:c.get(e.network),compressed:e.compressed}},p.fromString=p.fromWIF=function(e){return h.checkArgument(n.isString(e),"First argument is expected to be a string."),new p(e)},p.fromObject=function(e){return h.checkArgument(n.isObject(e),"First argument is expected to be an object."),new p(e)},p.fromRandom=function(e){var t=p._getRandomBN();return new p(t,e)},p.getValidationError=function(e,t){var r;try{new p(e,t)}catch(e){r=e}return r},p.isValid=function(e,t){return!!e&&!p.getValidationError(e,t)},p.prototype.toString=function(){return this.toBuffer().toString("hex")},p.prototype.toWIF=function(){var e,r=this.network;return e=this.compressed?t.concat([new t([r.privatekey]),this.bn.toBuffer({size:32}),new t([1])]):t.concat([new t([r.privatekey]),this.bn.toBuffer({size:32})]),o.encode(e)},p.prototype.toBigNumber=function(){return this.bn},p.prototype.toBuffer=function(){return this.bn.toBuffer()},p.prototype.toPublicKey=function(){return this._pubkey||(this._pubkey=f.fromPrivateKey(this)),this._pubkey},p.prototype.toAddress=function(e){var t=this.toPublicKey();return i.fromPublicKey(t,e||this.network)},p.prototype.toObject=p.prototype.toJSON=function(){return{bn:this.bn.toString("hex"),compressed:this.compressed,network:this.network.toString()}},p.prototype.inspect=function(){var e=this.compressed?"":", uncompressed";return""},e.exports=p}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){var n=r(30),i=r(1010),o=r(0),s="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz".split(""),a=function e(r){if(!(this instanceof e))return new e(r);if(t.isBuffer(r)){var n=r;this.fromBuffer(n)}else if("string"==typeof r){var i=r;this.fromString(i)}else r&&this.set(r)};a.validCharacters=function(e){return o.Buffer.isBuffer(e)&&(e=e.toString()),n.all(n.map(e,function(e){return n.contains(s,e)}))},a.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this},a.encode=function(e){if(!o.Buffer.isBuffer(e))throw new Error("Input should be a buffer");return i.encode(e)},a.decode=function(e){if("string"!=typeof e)throw new Error("Input should be a string");return new t(i.decode(e))},a.prototype.fromBuffer=function(e){return this.buf=e,this},a.prototype.fromString=function(e){var t=a.decode(e);return this.buf=t,this},a.prototype.toBuffer=function(){return this.buf},a.prototype.toString=function(){return a.encode(this.buf)},e.exports=a}).call(this,r(0).Buffer)},function(e,t,r){e.exports=r(725),e.exports.Input=r(726),e.exports.Output=r(158),e.exports.UnspentOutput=r(1012),e.exports.Signature=r(313),e.exports.Sighash=r(157)},function(e,t,r){"use strict";(function(t,n){function i(){}i.getRandomBuffer=function(e){return t.browser?i.getRandomBufferBrowser(e):i.getRandomBufferNode(e)},i.getRandomBufferNode=function(e){return r(715).randomBytes(e)},i.getRandomBufferBrowser=function(e){if(!window.crypto&&!window.msCrypto)throw new Error("window.crypto not available");if(window.crypto&&window.crypto.getRandomValues)var t=window.crypto;else{if(!window.msCrypto||!window.msCrypto.getRandomValues)throw new Error("window.crypto.getRandomValues not available");t=window.msCrypto}var r=new Uint8Array(e);return t.getRandomValues(r),new n(r)},i.getPseudoRandomBuffer=function(e){for(var t,r=new n(e),i=0;i<=e;i++){0===i-4*Math.floor(i/4)?(t=4294967296*Math.random(),r[i]=255&t):r[i]=255&(t>>>=8)}return r},e.exports=i}).call(this,r(6),r(0).Buffer)},function(e,t,r){"use strict";(function(t){var n=r(30),i=r(69),o=r(40),s=r(156),a=r(102),c=r(87),u=(r(62),r(32)),f=function e(t){if(!(this instanceof e))return new e(t);var r=e._from(t);return this.version=r.version,this.prevHash=r.prevHash,this.merkleRoot=r.merkleRoot,this.reserved=r.reserved,this.time=r.time,this.timestamp=r.time,this.bits=r.bits,this.nonce=r.nonce,this.solution=r.solution,r.hash&&u.checkState(this.hash===r.hash,"Argument object hash property does not match block hash."),this};f._from=function(e){var t={};if(o.isBuffer(e))t=f._fromBufferReader(s(e));else{if(!n.isObject(e))throw new TypeError("Unrecognized argument for BlockHeader");t=f._fromObject(e)}return t},f._fromObject=function(e){u.checkArgument(e,"data is required");var r=e.prevHash,i=e.merkleRoot,s=e.reserved,a=e.nonce,c=e.solution;return n.isString(e.prevHash)&&(r=o.reverse(new t(e.prevHash,"hex"))),n.isString(e.merkleRoot)&&(i=o.reverse(new t(e.merkleRoot,"hex"))),n.isString(e.reserved)&&(s=o.reverse(new t(e.reserved,"hex"))),n.isString(e.nonce)&&(a=o.reverse(new t(e.nonce,"hex"))),n.isString(e.solution)&&(c=new t(e.solution,"hex")),{hash:e.hash,version:e.version,prevHash:r,merkleRoot:i,reserved:s,time:e.time,timestamp:e.time,bits:e.bits,nonce:a,solution:c}},f.fromObject=function(e){var t=f._fromObject(e);return new f(t)},f.fromRawBlock=function(e){o.isBuffer(e)||(e=new t(e,"binary"));var r=s(e);r.pos=f.Constants.START_OF_HEADER;var n=f._fromBufferReader(r);return new f(n)},f.fromBuffer=function(e){var t=f._fromBufferReader(s(e));return new f(t)},f.fromString=function(e){var r=new t(e,"hex");return f.fromBuffer(r)},f._fromBufferReader=function(e){var t={};t.version=e.readUInt32LE(),t.prevHash=e.read(32),t.merkleRoot=e.read(32),t.reserved=e.read(32),t.time=e.readUInt32LE(),t.bits=e.readUInt32LE(),t.nonce=e.read(32);var r=e.readVarintNum();return t.solution=e.read(r),t},f.fromBufferReader=function(e){var t=f._fromBufferReader(e);return new f(t)},f.prototype.toObject=f.prototype.toJSON=function(){return{hash:this.hash,version:this.version,prevHash:o.reverse(this.prevHash).toString("hex"),merkleRoot:o.reverse(this.merkleRoot).toString("hex"),reserved:o.reverse(this.reserved).toString("hex"),time:this.time,bits:this.bits,nonce:o.reverse(this.nonce).toString("hex"),solution:this.solution.toString("hex")}},f.prototype.toBuffer=function(){return this.toBufferWriter().concat()},f.prototype.toString=function(){return this.toBuffer().toString("hex")},f.prototype.toBufferWriter=function(e){return e||(e=new a),e.writeUInt32LE(this.version),e.write(this.prevHash),e.write(this.merkleRoot),e.write(this.reserved),e.writeUInt32LE(this.time),e.writeUInt32LE(this.bits),e.write(this.nonce),e.writeVarintNum(this.solution.length),e.write(this.solution),e},f.prototype.getTargetDifficulty=function(e){e=e||this.bits;for(var t=new i(16777215&e),r=8*((e>>>24)-3);r-- >0;)t=t.mul(new i(2));return t},f.prototype.getDifficulty=function(){var e=this.getTargetDifficulty(537133055).mul(new i(Math.pow(10,8))),t=this.getTargetDifficulty(),r=e.div(t).toString(10),n=r.length-8;return r=r.slice(0,n)+"."+r.slice(n),parseFloat(r)},f.prototype._getHash=function(){var e=this.toBuffer();return c.sha256sha256(e)};var l={configurable:!1,enumerable:!0,get:function(){return this._id||(this._id=s(this._getHash()).readReverse().toString("hex")),this._id},set:n.noop};Object.defineProperty(f.prototype,"id",l),Object.defineProperty(f.prototype,"hash",l),f.prototype.validTimestamp=function(){var e=Math.round((new Date).getTime()/1e3);return!(this.time>e+f.Constants.MAX_TIME_OFFSET)},f.prototype.validProofOfWork=function(){var e=new i(this.id,"hex"),t=this.getTargetDifficulty();return!(e.cmp(t)>0)},f.prototype.inspect=function(){return""},f.Constants={START_OF_HEADER:8,MAX_TIME_OFFSET:7200,LARGEST_HASH:new i("10000000000000000000000000000000000000000000000000000000000000000","hex")},e.exports=f}).call(this,r(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(386);Object.defineProperty(t,"createProxyServer",{enumerable:!0,get:function(){return o(n).default}}),Object.defineProperty(t,"closeProxyServer",{enumerable:!0,get:function(){return n.closeProxyServer}});var i=r(587);function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"createProxyClient",{enumerable:!0,get:function(){return o(i).default}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.closeProxyServer=function e(t){return Promise.all(Object.keys(t).map(function(r){return t[r].close?Promise.resolve(t[r].close()):Promise.resolve(e(t[r]))}))};var n=r(1),i=r(2),o=_(r(399)),s=_(r(400)),a=_(r(415)),c=_(r(425)),u=_(r(426)),f=_(r(454)),l=_(r(550)),h=_(r(577)),p=_(r(578)),d=_(r(579)),g=_(r(580)),b=_(r(581)),m=_(r(582)),y=_(r(583)),v=_(r(584)),w=_(r(585)),A=_(r(586));function _(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if("function"!=typeof(t=t||{}).pre){var r=t.pre||{};t.pre=function(e){return r[e]}}var _={bitswap:(0,o.default)(e,t),block:(0,s.default)(e,t),bootstrap:(0,a.default)(e,t),config:(0,c.default)(e,t),dag:(0,u.default)(e,t),dht:(0,f.default)(e,t),dns:(0,n.expose)("ipfs.dns",(0,i.pre)(t.pre("dns"),function(){var t;return(t=e()).dns.apply(t,arguments)}),t),files:(0,l.default)(e,t),id:(0,n.expose)("ipfs.id",(0,i.pre)(t.pre("id"),function(){return e().id()}),t),key:(0,h.default)(e,t),name:(0,d.default)(e,t),object:(0,g.default)(e,t),pin:(0,b.default)(e,t),pubsub:(0,y.default)(e,t),repo:(0,v.default)(e,t),resolve:(0,n.expose)("ipfs.resolve",(0,i.pre)(t.pre("resolve"),function(){var t;return(t=e()).resolve.apply(t,arguments)}),t),stats:(0,w.default)(e,t),stop:(0,n.expose)("ipfs.stop",(0,i.pre)(t.pre("stop"),function(){return e().stop()}),t),swarm:(0,A.default)(e,t),version:(0,n.expose)("ipfs.version",(0,i.pre)(t.pre("version"),function(){return e().version()}),t)};return Object.assign(_,(0,p.default)(e,t),(0,m.default)(e,t)),_}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s,t.call=function(e){return s(e).apply(null,[].slice.call(arguments,1))};var n,i=r(42),o=(n=i)&&n.__esModule?n:{default:n};function s(e,t){var r=(t=t||{}).addListener||window.addEventListener,n=t.removeListener||window.removeEventListener,i=t.postMessage||window.postMessage,s=t.targetOrigin||"*",a=t.getMessageData||function(e){return e.data};return function(){var t={sender:"postmsg-rpc/client",id:(0,o.default)(),func:e,args:Array.from(arguments)},c=void 0,u=new Promise(function(o,u){var f=function r(){var i=a.apply(null,arguments);if(i&&"postmsg-rpc/server"===i.sender&&i.id===t.id){if(n("message",r),i.err){var s=new Error("Unexpected error calling "+e);return Object.assign(s,i.err),u(s)}o(i.res)}};c=function(){n("message",f);var t=new Error("Canceled call to "+e);t.isCanceled=!0,u(t)},r("message",f),i(t,s)});return u.cancel=function(){return c()},u}}},function(e,t,r){"use strict";var n=r(128),i=r(390),o=r(394),s=r(395)||0;function a(){return i(s)}e.exports=a,e.exports.generate=a,e.exports.seed=function(t){return n.seed(t),e.exports},e.exports.worker=function(t){return s=t,e.exports},e.exports.characters=function(e){return void 0!==e&&n.characters(e),n.shuffled()},e.exports.isValid=o},function(e,t,r){"use strict";var n=1;e.exports={nextValue:function(){return(n=(9301*n+49297)%233280)/233280},seed:function(e){n=e}}},function(e,t,r){"use strict";var n,i,o=r(391),s=(r(128),1459707606518),a=6;e.exports=function(e){var t="",r=Math.floor(.001*(Date.now()-s));return r===i?n++:(n=0,i=r),t+=o(a),t+=o(e),n>0&&(t+=o(n)),t+=o(r)}},function(e,t,r){"use strict";var n=r(128),i=r(392),o=r(393);e.exports=function(e){for(var t,r=0,s="";!t;)s+=o(i,n.get(),1),t=e2&&(o=[o[0],e.apply(void 0,n(o.slice(1)))]);var a=o[0]||i;if("function"!=typeof a)throw new TypeError("Pre function must be a function");var c=o[1];if("function"!=typeof c)throw new TypeError("Function to call must be a function");return function(){for(var e=arguments.length,t=Array(e),r=0;r2&&(o=[e.apply(void 0,n(o.slice(0,-1))),o[o.length-1]]);var a=o[0];if("function"!=typeof a)throw new TypeError("Function to call must be a function");var c=o[1]||i;if("function"!=typeof c)throw new TypeError("Post function must be a function");return function(){var e=a.apply(void 0,arguments);return e&&"function"==typeof e.then?e.then(c):c(e)}};var i=function(e){return e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{ledger:(0,n.expose)("ipfs.bitswap.ledger",function(){var t;return(t=e().bitswap).ledger.apply(t,arguments)},t),reprovide:(0,n.expose)("ipfs.bitswap.reprovide",function(){var t;return(t=e().bitswap).reprovide.apply(t,arguments)},t),stat:(0,n.expose)("ipfs.bitswap.stat",(0,i.post)(function(){var t;return(t=e().bitswap).stat.apply(t,arguments)},function(e){return e&&((0,o.isBig)(e.blocksReceived)&&(e.blocksReceived=(0,o.bigToJson)(e.blocksReceived)),(0,o.isBig)(e.dataReceived)&&(e.dataReceived=(0,o.bigToJson)(e.dataReceived)),(0,o.isBig)(e.blocksSent)&&(e.blocksSent=(0,o.bigToJson)(e.blocksSent)),(0,o.isBig)(e.dataSent)&&(e.dataSent=(0,o.bigToJson)(e.dataSent)),(0,o.isBig)(e.dupBlksReceived)&&(e.dupBlksReceived=(0,o.bigToJson)(e.dupBlksReceived)),(0,o.isBig)(e.dupDataReceived)&&(e.dupDataReceived=(0,o.bigToJson)(e.dupDataReceived))),e}),t),unwant:(0,n.expose)("ipfs.bitswap.unwant",function(){var t;return(t=e().bitswap).unwant.apply(t,arguments)},t),wantlist:(0,n.expose)("ipfs.bitswap.wantlist",function(){var t;return(t=e().bitswap).wantlist.apply(t,arguments)},t)}};var n=r(1),i=r(2),o=r(91)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{put:(0,n.expose)("ipfs.block.put",(0,i.pre)((0,a.preBufferFromJson)(0),(0,o.preBlockFromJson)(0),function(){for(var e=arguments.length,t=Array(e),r=0;r0?n-4:n,l=0;l>16&255,a[c++]=t>>8&255,a[c++]=255&t;2===s&&(t=i[e.charCodeAt(l)]<<2|i[e.charCodeAt(l+1)]>>4,a[c++]=255&t);1===s&&(t=i[e.charCodeAt(l)]<<10|i[e.charCodeAt(l+1)]<<4|i[e.charCodeAt(l+2)]>>2,a[c++]=t>>8&255,a[c++]=255&t);return a},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],s=0,a=r-i;sa?a:s+16383));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.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,o,s=[],a=t;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,c=(1<>1,f=-7,l=r?i-1:0,h=r?-1:1,p=e[t+l];for(l+=h,o=p&(1<<-f)-1,p>>=-f,f+=a;f>0;o=256*o+e[t+l],l+=h,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+e[t+l],l+=h,f-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=u}return(p?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,c,u=8*o-i-1,f=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+l>=1?h/c:h*Math.pow(2,1-l))*c>=2&&(s++,c/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(t*c-1)*Math.pow(2,i),s+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;e[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;e[r+p]=255&s,p+=d,s/=256,u-=8);e[r+p-d]|=128*g}},function(e,t){e.exports=function e(t,o,s){o=o||[];s=s||0;var a=s;for(;t>=i;)o[s++]=255&t|r,t/=128;for(;t&n;)o[s++]=255&t|r,t>>>=7;o[s]=0|t;e.bytes=s-a+1;return o};var r=128,n=-128,i=Math.pow(2,31)},function(e,t){e.exports=function e(t,i){var o,s=0,i=i||0,a=0,c=i,u=t.length;do{if(c>=u)throw e.bytes=0,new RangeError("Could not decode varint");o=t[c++],s+=a<28?(o&n)<=r);e.bytes=c-i;return s};var r=128,n=127},function(e,t){var r=Math.pow(2,7),n=Math.pow(2,14),i=Math.pow(2,21),o=Math.pow(2,28),s=Math.pow(2,35),a=Math.pow(2,42),c=Math.pow(2,49),u=Math.pow(2,56),f=Math.pow(2,63);e.exports=function(e){return e(e[t[0]]=new n(t[0],t[1],t[2],t[3]),e),{}),f=c.reduce((e,t)=>(e[t[1]]=u[t[0]],e),{});e.exports={names:u,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 o=0,s=0,a="";for(let e=0;e=5;)a+=t[s>>>o-5&31],o-=5;if(o>0&&(a+=t[s<<5-o&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,o=0,s=new Uint8Array(5*r/8|0);for(let a=0;a=8&&(s[o++]=i>>>n-8&255,n-=8);return s.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 o=i.indexOf("=");return o>0&&!r&&(i=i.substring(0,o)),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(n){const i=r(5),o=r(413),s=r(315),a=r(218);(t=e.exports).addPrefix=((e,t)=>{let r;if(n.isBuffer(e))r=a.varintBufferEncode(e);else{if(!o[e])throw new Error("multicodec not recognized");r=o[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=s[t.toString("hex")];if(void 0===r)throw new Error("Code `0x"+t.toString("hex")+"` not found");return r}),t.getCodeVarint=(e=>{const t=o[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return t}),t.addCodec=((e,t)=>{o[e]=a.varintBufferEncode(t),s[t.toString("hex")]=e})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(148),i=r(218).varintBufferEncode,o={};e.exports=o;for(let e in n){let t=n[e];o[e]=i(t)}},function(e,t,r){"use strict";(function(t){const n=r(24);var i={checkCIDComponents:function(e){if(null==e)return"null values are not valid CIDs";if(0!==e.version&&1!==e.version)return"Invalid version, must be a number equal to 1 or 0";if("string"!=typeof e.codec)return"codec must be string";if(!t.isBuffer(e.multihash))return"multihash must be a Buffer";try{n.validate(e.multihash)}catch(e){let t=e.message;return t||(t="Multihash validation failed"),t}}};e.exports=i}).call(this,r(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{add:(0,n.expose)("ipfs.bootstrap.add",(0,i.pre)(t.pre("bootstrap.add"),(0,i.post)(function(){var t;return(t=e().bootstrap).add.apply(t,arguments)},(0,o.postArrayOf)("Peers",s.isMultiaddr,s.multiaddrToJson))),t),list:(0,n.expose)("ipfs.bootstrap.list",(0,i.pre)(t.pre("bootstrap.list"),(0,i.post)(function(){var t;return(t=e().bootstrap).list.apply(t,arguments)},(0,o.postArrayOf)("Peers",s.isMultiaddr,s.multiaddrToJson))),t),rm:(0,n.expose)("ipfs.bootstrap.rm",(0,i.pre)(t.pre("bootstrap.rm"),(0,i.post)(function(){var t;return(t=e().bootstrap).rm.apply(t,arguments)},(0,o.postArrayOf)("Peers",s.isMultiaddr,s.multiaddrToJson))),t)}};var n=r(1),i=r(2),o=r(129),s=r(103)},function(e,t,r){"use strict";(function(t){const n=r(15),i=r(31),o=r(417),s=r(161),a=r(5),c=r(9),u=r(26),f=new Error("Sorry, Not Implemented Yet."),l=u.proto(function(e){if(!(this instanceof l))return new l(e);if(null==e&&(e=""),e instanceof t)this.buffer=o.fromBuffer(e);else if("string"==typeof e||e instanceof String){if(e.length>0&&"/"!==e.charAt(0))throw new Error(`multiaddr "${e}" must start with a "/"`);this.buffer=o.fromString(e)}else{if(!(e.buffer&&e.protos&&e.protoCodes))throw new Error("addr must be a string, Buffer, or another Multiaddr");this.buffer=o.fromBuffer(e.buffer)}},{className:"Multiaddr",symbolName:"@multiformats/js-multiaddr/multiaddr"});l.prototype.toString=function(){return o.bufferToString(this.buffer)},l.prototype.toOptions=function(){const e={},t=this.toString().split("/");return e.family="ip4"===t[1]?"ipv4":"ipv6",e.host=t[2],e.transport=t[3],e.port=t[4],e},l.prototype.inspect=function(){return""},l.prototype.protos=function(){return n(this.protoCodes(),function(e){return i(s(e))})},l.prototype.protoCodes=function(){const e=[],t=this.buffer;let r=0;for(;r{if(e[0]===s.names.ipfs.code)return!0})[0][1],c.decode(e)}catch(t){e=null}return e},l.prototype.equals=function(e){return this.buffer.equals(e.buffer)},l.prototype.nodeAddress=function(){const e=this.protoCodes(),t=this.protoNames(),r=this.toString().split("/").slice(1);if(r.length<4)throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6}/{address}/{tcp, udp}/{port}".');if(4!==e[0]&&41!==e[0]&&54!==e[0]&&55!==e[0])throw new Error(`no protocol with name: "'${t[0]}'". Must have a valid family name: "{ip4, ip6, dns4, dns6}".`);if("tcp"!==r[2]&&"udp"!==r[2])throw new Error(`no protocol with name: "'${t[1]}'". Must have a valid transport protocol: "{tcp, udp}".`);return{family:41===e[0]||55===e[0]?6:4,address:r[1],port:r[3]}},l.fromNodeAddress=function(e,t){if(!e)throw new Error("requires node address object");if(!t)throw new Error("requires transport protocol");const r="IPv6"===e.family?"ip6":"ip4";return l("/"+[r,e.address,t,e.port].join("/"))},l.prototype.isThinWaistAddress=function(e){const t=(e||this).protos();return 2===t.length&&((4===t[0].code||41===t[0].code)&&(6===t[1].code||17===t[1].code))},l.prototype.fromStupidString=function(e){throw f},l.protocols=s,l.isName=function(e){return!!l.isMultiaddr(e)&&e.protos().some(e=>e.resolvable)},l.resolve=function(e,t){return l.isMultiaddr(e)&&l.isName(e)?t(new Error("not implemented yet")):t(new Error("not a valid name"))},e.exports=l}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(15),i=r(44),o=r(418),s=r(161),a=r(5);function c(e){const t=[],r=e.split("/").slice(1);if(1===r.length&&""===r[0])return[];for(let n=0;n=r.length)throw v("invalid address: "+e);t.push([i,r[n]])}else t.push([i])}return t}function u(e){const t=[];return n(e,function(e){const r=w(e);t.push(r.name),e.length>1&&t.push(e[1])}),"/"+t.join("/")}function f(e){return n(e,function(e){Array.isArray(e)||(e=[e]);const t=w(e);return e.length>1?[t.code,o.toBuffer(t.code,e[1])]:[t.code]})}function l(e){return n(e,function(e){const t=w(e);return e.length>1?[t.code,o.toString(t.code,e[1])]:[t.code]})}function h(e){return b(t.concat(n(e,function(e){const r=w(e);let n=t.from(a.encode(r.code));return e.length>1&&(n=t.concat([n,e[1]])),n})))}function p(e,t){if(e.size>0)return e.size/8;if(0===e.size)return 0;return a.decode(t)+a.decode.bytes}function d(e){const t=[];let r=0;for(;re.length)throw v("Invalid address buffer: "+e.toString("hex"));t.push([n,c])}return t}function g(e){return h(f(c(e=y(e))))}function b(e){const r=m(e);if(r)throw r;return t.from(e)}function m(e){try{d(e)}catch(e){return e}}function y(e){return"/"+i(e.trim().split("/")).join("/")}function v(e){return new Error("Error parsing address: "+e)}function w(e){return s(e[0])}e.exports={stringToStringTuples:c,stringTuplesToString:u,tuplesToStringTuples:l,stringTuplesToTuples:f,bufferToTuples:d,tuplesToBuffer:h,bufferToString:function(e){return u(l(d(e)))},stringToBuffer:g,fromString:function(e){return g(e)},fromBuffer:b,validateBuffer:m,isValidBuffer:function(e){return void 0===m(e)},cleanPath:y,ParseError:v,protoFromTuple:w,sizeForAddr:p}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(45),i=r(46),o=r(161),s=r(9),a=r(5);function c(e,r){return r instanceof t?c.toString(e,r):c.toBuffer(e,r)}function u(e){if(!e.isValid())throw new Error("invalid ip address");return n.toBuffer(e.address)}e.exports=c,c.toString=function(e,t){switch((e=o(e)).code){case 4:case 41:return n.toString(t);case 6:case 17:case 33:case 132:return function(e){return e.readUInt16BE(0)}(t);case 54:case 55:case 56:return function(e){const t=a.decode(e);if((e=e.slice(a.decode.bytes)).length!==t)throw new Error("inconsistent lengths");return e.toString()}(t);case 421:return function(e){const t=a.decode(e),r=e.slice(a.decode.bytes);if(r.length!==t)throw new Error("inconsistent lengths");return s.encode(r)}(t);default:return t.toString("hex")}},c.toBuffer=function(e,r){switch((e=o(e)).code){case 4:return u(new i.Address4(r));case 41:return u(new i.Address6(r));case 6:case 17:case 33:case 132:return function(e){const r=t.alloc(2);return r.writeUInt16BE(e,0),r}(parseInt(r,10));case 54:case 55:case 56:return function(e){const r=t.from(e),n=t.from(a.encode(r.length));return t.concat([n,r])}(r);case 421:return function(e){const r=t.from(s.decode(e)),n=t.from(a.encode(r.length));return t.concat([n,r])}(r);default:return t.from(r,"hex")}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";var n=r(220).BigInteger,i=r(317),o=r(420),s=r(421),a=r(222),c=r(223),u=r(104).sprintf,f=r(159),l=r(160),h=r(219);function p(e){return e=(e=e.replace(/^(0{1,})([1-9]+)$/,'$1$2')).replace(/^(0{1,})(0)$/,'$1$2')}function d(e,t){this.groups=void 0===t?l.GROUPS:t,this.v4=!1,this.subnet="/128",this.subnetMask=128,this.zone="",this.address=e;var r=l.RE_SUBNET_STRING.exec(e);if(r){if(this.parsedSubnet=r[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet="/"+this.subnetMask,isNaN(this.subnetMask)||this.subnetMask<0||this.subnetMask>l.BITS)return this.valid=!1,void(this.error="Invalid subnet mask.");e=e.replace(l.RE_SUBNET_STRING,"")}else if(/\//.test(e))return this.valid=!1,void(this.error="Invalid subnet mask.");var n=l.RE_ZONE_STRING.exec(e);n&&(this.zone=n[0],e=e.replace(l.RE_ZONE_STRING,"")),this.addressMinusSuffix=e,this.parsedAddress=this.parse(this.addressMinusSuffix)}function g(e){return u("%04x",parseInt(e,16))}function b(e){return 255&e}s(d.prototype,r(422)),s(d.prototype,r(423)),s(d.prototype,r(424)),d.fromBigInteger=function(e){var t,r=a(e.toString(16),32,"0"),n=[];for(t=0;t65536)&&(r=null):r=null,{address:new d(t),port:r}},d.fromAddress4=function(e){e=new h(e);var t=l.BITS-(f.BITS-e.subnetMask);return new d("::ffff:"+e.correctForm()+"/"+t)},d.fromArpa=function(e){var t=e.replace(/(\.ip6\.arpa)?\.$/,"");if(63!==t.length)return t={error:"Not Valid 'ip6.arpa' form",address:null};t=t.split(".").reverse();for(var r=7;r>0;r--){var n=4*r;t.splice(n,0,":")}return new d(t=t.join(""))},d.prototype.microsoftTranscription=function(){return u("%s.ipv6-literal.net",this.correctForm().replace(/:/g,"-"))},d.prototype.mask=function(e){return void 0===e&&(e=this.subnetMask),this.getBitsBase2(0,e)},d.prototype.possibleSubnets=function(e){void 0===e&&(e=128);var t=l.BITS-this.subnetMask-Math.abs(e-l.BITS);return t<0?"0":function(e){for(var t=/(\d+)(\d{3})/;t.test(e);)e=e.replace(t,"$1,$2");return e}(new n("2",10).pow(t).toString(10))},d.prototype.startAddress=function(){var e=new n(this.mask()+c(0,l.BITS-this.subnetMask),2);return d.fromBigInteger(e)},d.prototype.endAddress=function(){var e=new n(this.mask()+c(1,l.BITS-this.subnetMask),2);return d.fromBigInteger(e)},d.prototype.getScope=function(){var e=l.SCOPES[this.getBits(12,16)];return"Global unicast"===this.getType()&&"Link local"!==e&&(e="Global"),e},d.prototype.getType=function(){var e=this;return i(l.TYPES,function(t,r){return e.isInSubnet(new d(r))})||"Global unicast"},d.prototype.getBits=function(e,t){return new n(this.getBitsBase2(e,t),2)},d.prototype.getBitsBase2=function(e,t){return this.binaryZeroPad().slice(e,t)},d.prototype.getBitsBase16=function(e,t){var r=t-e;return r%4!=0?null:a(this.getBits(e,t).toString(16),r/4,"0")},d.prototype.getBitsPastSubnet=function(){return this.getBitsBase2(this.subnetMask,l.BITS)},d.prototype.reverseForm=function(e){e||(e={});var t=Math.floor(this.subnetMask/4),r=this.canonicalForm().replace(/:/g,"").split("").slice(0,t).reverse().join(".");return t>0?e.omitSuffix?r:u("%s.ip6.arpa.",r):e.omitSuffix?"":"ip6.arpa."},d.prototype.correctForm=function(){if(!this.parsedAddress)return null;var e,t=[],r=0,n=[];for(e=0;e0&&(r>1&&n.push([e-r,e-1]),r=0)}r>1&&n.push([this.parsedAddress.length-r,this.parsedAddress.length-1]);var s=n.map(function(e){return e[1]-e[0]+1});if(n.length>0){var a=s.indexOf(o(s));t=function(e,t){var r,n=[],i=[];for(r=0;rt[1]&&i.push(e[r]);return n.concat(["compact"]).concat(i)}(this.parsedAddress,n[a])}else t=this.parsedAddress;for(e=0;e1?"s":"",t.join("")),this.parseError=e.replace(l.RE_BAD_CHARACTERS,'$1'),null;var r=e.match(l.RE_BAD_ADDRESS);if(r)return this.valid=!1,this.error=u("Address failed regex: %s",r.join("")),this.parseError=e.replace(l.RE_BAD_ADDRESS,'$1'),null;var n=[],i=e.split("::");if(2===i.length){var o=i[0].split(":"),s=i[1].split(":");1===o.length&&""===o[0]&&(o=[]),1===s.length&&""===s[0]&&(s=[]);var a=this.groups-(o.length+s.length);if(!a)return this.valid=!1,this.error="Error parsing groups",null;this.elidedGroups=a,this.elisionBegin=o.length,this.elisionEnd=o.length+this.elidedGroups,o.forEach(function(e){n.push(e)});for(var c=0;c=0;o--)r=r.add(i.multiply(new n(e[o].toString(10),10))),i=i.multiply(t);return d.fromBigInteger(r)},e.exports=d},function(e,t){var r="[object Symbol]",n=Object.prototype.toString;function i(e,t){return e>t}function o(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&n.call(e)==r}function s(e){return e}e.exports=function(e){return e&&e.length?function(e,t,r){for(var n=-1,i=e.length;++n-1},oe.prototype.set=function(e,t){var r=this.__data__,n=le(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},se.prototype.clear=function(){this.size=0,this.__data__={hash:new ie,map:new(te||oe),string:new ie}},se.prototype.delete=function(e){var t=Ae(this,e).delete(e);return this.size-=t?1:0,t},se.prototype.get=function(e){return Ae(this,e).get(e)},se.prototype.has=function(e){return Ae(this,e).has(e)},se.prototype.set=function(e,t){var r=Ae(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},ae.prototype.clear=function(){this.__data__=new oe,this.size=0},ae.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},ae.prototype.get=function(e){return this.__data__.get(e)},ae.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.set=function(e,t){var r=this.__data__;if(r instanceof oe){var i=r.__data__;if(!te||i.length-1&&e%1==0&&e0){if(++t>=o)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Q?function(e,t){return Q(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:je);function xe(e,t){return e===t||e!=e&&t!=t}var Ce=be(function(){return arguments}())?be:function(e){return Me(e)&&K.call(e,"callee")&&!Y.call(e,"callee")},Ie=Array.isArray;function Be(e){return null!=e&&Pe(e.length)&&!Re(e)}var Te=X||function(){return!1};function Re(e){if(!Oe(e))return!1;var t=ge(e);return t==f||t==l||t==u||t==d}function Pe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Oe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Me(e){return null!=e&&"object"==typeof e}var Ne=C?function(e){return function(t){return e(t)}}(C):function(e){return Me(e)&&Pe(e.length)&&!!y[ge(e)]};function De(e){return Be(e)?ce(e,!0):ye(e)}var Ke,Ue=(Ke=function(e,t,r){ve(e,t,r)},we(function(e,t){var r=-1,n=t.length,i=n>1?t[n-1]:void 0,o=n>2?t[2]:void 0;for(i=Ke.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(e,t,r){if(!Oe(r))return!1;var n=typeof t;return!!("number"==n?Be(r)&&Se(t,r.length):"string"==n&&t in r)&&xe(r[t],e)}(t[0],t[1],o)&&(i=n<3?void 0:i,n=1),e=Object(e);++r%2$s',e.prefix,t.call(this),e.className):o('%2$s',e.prefix,t.call(this))},t.group=function(){var e,t=this.address.match(n.RE_ADDRESS);if(t){var r=t[0].split(".");this.address=this.address.replace(n.RE_ADDRESS,o('%s.%s',r.slice(0,2).join("."),r.slice(2,4).join(".")))}if(0===this.elidedGroups)return i.simpleGroup(this.address);var s=[],a=this.address.split("::");a[0].length?s.push(i.simpleGroup(a[0])):s.push("");var c=["hover-group"];for(e=this.elisionBegin;e',c.join(" "))),a[1].length?s.push(i.simpleGroup(a[1],this.elisionEnd)):s.push(""),s.join(":")}},function(e,t,r){"use strict";var n=r(104).sprintf,i=r(160);function o(e){return n("(%s)",e.join("|"))}function s(e){return e.length<4?n("0{0,%d}%s",4-e.length,e):e}function a(e){var t=[];e.forEach(function(e,r){0===parseInt(e,16)&&t.push(r)});var r=t.map(function(t){return e.map(function(e,r){if(r===t){var n=0===r||r===i.GROUPS-1?":":"";return o([s(e),n])}return s(e)}).join(":")});return r.push(e.map(s).join(":")),o(r)}function c(e,t,r){var i=t?"":":",s=r?"":":",a=[];t||r||a.push("::"),t&&r&&a.push(""),(r&&!t||!r&&t)&&a.push(":"),a.push(n("%s(:0{1,4}){1,%d}",i,e-1)),a.push(n("(0{1,4}:){1,%d}%s",e-1,s)),a.push(n("(0{1,4}:){%d}0{1,4}",e-1));for(var c=1;c{s.sha2256(e,(e,n)=>{e&&r(e),s.sha2256(t.from(n),r)})}}}).call(this,r(0).Buffer)},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,r){!function(r,n){"use strict";var i={version:"3.0.1",x86:{},x64:{}};function o(e,t){return(65535&e)*t+(((e>>>16)*t&65535)<<16)}function s(e,t){return e<>>32-t}function a(e){return e=o(e^=e>>>16,2246822507),e=o(e^=e>>>13,3266489909),e^=e>>>16}function c(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 u(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 f(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=h(e=u(e,[4283543511,3981806797]),[0,e[0]>>>1]),e=h(e=u(e,[3301882366,444984403]),[0,e[0]>>>1])}i.x86.hash32=function(e,t){t=t||0;for(var r=(e=e||"").length%4,n=e.length-r,i=t,c=0,u=3432918353,f=461845907,l=0;l>>0},i.x86.hash128=function(e,t){t=t||0;for(var r=(e=e||"").length%16,n=e.length-r,i=t,c=t,u=t,f=t,l=0,h=0,p=0,d=0,g=597399067,b=2869860233,m=951274213,y=2716044179,v=0;v>>0).toString(16)).slice(-8)+("00000000"+(c>>>0).toString(16)).slice(-8)+("00000000"+(u>>>0).toString(16)).slice(-8)+("00000000"+(f>>>0).toString(16)).slice(-8)},i.x64.hash128=function(e,t){t=t||0;for(var r=(e=e||"").length%16,n=e.length-r,i=[0,t],o=[0,t],s=[0,0],a=[0,0],d=[2277735313,289559509],g=[1291169091,658871167],b=0;b>>0).toString(16)).slice(-8)+("00000000"+(i[1]>>>0).toString(16)).slice(-8)+("00000000"+(o[0]>>>0).toString(16)).slice(-8)+("00000000"+(o[1]>>>0).toString(16)).slice(-8)},e.exports&&(t=e.exports=i),t.murmurHash3=i}()},function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var n,i,o,s,a,c=1,u={},f=!1,l=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick(function(){d(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){d(e.data)},n=function(e){o.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(i=l.documentElement,n=function(e){var t=l.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):n=function(e){setTimeout(d,0,e)}:(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&d(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),n=function(t){e.postMessage(s+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r{const s=i.digest({name:e},r);if("function"!=typeof s.then)return s.onerror=(()=>{o(new Error(`hashing data using ${e}`))}),void(s.oncomplete=(e=>{o(null,e.target.result)}));n(s.then(e=>t.from(new Uint8Array(e))),o)}}e.exports={sha1:function(e,t){o("SHA-1")(e,t)},sha2256:function(e,t){o("SHA-256")(e,t)},sha2512:function(e,t){o("SHA-512")(e,t)}}}).call(this,r(0).Buffer)},function(e,t,r){(function(t){var n,i=r(226);n="function"==typeof setImediate?setImediate:"object"==typeof t&&t&&t.nextTick?t.nextTick:function(e){setTimeout(e,0)};var o=[];function s(e){if(!(this instanceof s))return"function"==typeof e?new s(e):(r=new s(function(e){t=e}),{resolver:t,promise:r});var t,r,a,c=!1,u=!1,f=[],l=!1;function h(e){f.length?(l=!0,f.shift()(e||!1)):l=!1}this.then=function(e,t){return new s(function(r){f.push(function(i){var o=u?e:t;if("function"==typeof o){function s(){var e;try{e=o(a)}catch(e){return r.reject(e),h()}r.fulfill(e),h(!0)}i?s():n(s)}else u?(r.fulfill(a),h(i)):(r.reject(a),h(i))}),c&&!l&&h()})},function(){function t(e){c||(c=!0,u=!1,a=e,h())}for(var r={fulfill:function e(r){c||(i(r)?r.then(e,t):(c=u=!0,a=r,h()))},reject:t},n=0;ni(n=>{const i=r.init(e,null);return r.update(i,n),t.from(r.digest(i))});e.exports=(e=>{for(let t=0;t<64;t++)e[45569+t]=a(t+1,o);for(let t=0;t<32;t++)e[45633+t]=a(t+1,s)})}).call(this,r(0).Buffer)},function(e,t,r){var n=r(227);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 o(e,t,r,n){var i=e[t]+r;r<0&&(i+=4294967296);var o=e[t+1]+n;i>=4294967296&&o++,e[t]=i,e[t+1]=o}function s(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function a(e,t,r,n,s,a){var c=l[s],u=l[s+1],h=l[a],p=l[a+1];i(f,e,t),o(f,e,c,u);var d=f[n]^f[e],g=f[n+1]^f[e+1];f[n]=g,f[n+1]=d,i(f,r,n),d=f[t]^f[r],g=f[t+1]^f[r+1],f[t]=d>>>24^g<<8,f[t+1]=g>>>24^d<<8,i(f,e,t),o(f,e,h,p),d=f[n]^f[e],g=f[n+1]^f[e+1],f[n]=d>>>16^g<<16,f[n+1]=g>>>16^d<<16,i(f,r,n),d=f[t]^f[r],g=f[t+1]^f[r+1],f[t]=g>>>31^d<<1,f[t+1]=d>>>31^g<<1}var c=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,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,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),l=new Uint32Array(32);function h(e,t){var r=0;for(r=0;r<16;r++)f[r]=e.h[r],f[r+16]=c[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++)l[r]=s(e.b,4*r);for(r=0;r<12;r++)a(0,8,16,24,u[16*r+0],u[16*r+1]),a(2,10,18,26,u[16*r+2],u[16*r+3]),a(4,12,20,28,u[16*r+4],u[16*r+5]),a(6,14,22,30,u[16*r+6],u[16*r+7]),a(0,10,20,30,u[16*r+8],u[16*r+9]),a(2,12,22,24,u[16*r+10],u[16*r+11]),a(4,14,16,26,u[16*r+12],u[16*r+13]),a(6,8,18,28,u[16*r+14],u[16*r+15]);for(r=0;r<16;r++)e.h[r]=e.h[r]^f[r]^f[r+16]}function p(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]=c[n];var i=t?t.length:0;return r.h[0]^=16842752^i<<8^e,t&&(d(r,t),r.c=128),r}function d(e,t){for(var r=0;r>2]>>8*(3&r);return t}function b(e,t,r){r=r||64,e=n.normalizeInput(e);var i=p(r,t);return d(i,e),g(i)}e.exports={blake2b:b,blake2bHex:function(e,t,r){var i=b(e,t,r);return n.toHex(i)},blake2bInit:p,blake2bUpdate:d,blake2bFinal:g}},function(e,t,r){var n=r(227);function i(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function o(e,t,r,n,i,o){u[e]=u[e]+u[t]+i,u[n]=s(u[n]^u[e],16),u[r]=u[r]+u[n],u[t]=s(u[t]^u[r],12),u[e]=u[e]+u[t]+o,u[n]=s(u[n]^u[e],8),u[r]=u[r]+u[n],u[t]=s(u[t]^u[r],7)}function s(e,t){return e>>>t^e<<32-t}var a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),c=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]),u=new Uint32Array(16),f=new Uint32Array(16);function l(e,t){var r=0;for(r=0;r<8;r++)u[r]=e.h[r],u[r+8]=a[r];for(u[12]^=e.t,u[13]^=e.t/4294967296,t&&(u[14]=~u[14]),r=0;r<16;r++)f[r]=i(e.b,4*r);for(r=0;r<10;r++)o(0,4,8,12,f[c[16*r+0]],f[c[16*r+1]]),o(1,5,9,13,f[c[16*r+2]],f[c[16*r+3]]),o(2,6,10,14,f[c[16*r+4]],f[c[16*r+5]]),o(3,7,11,15,f[c[16*r+6]],f[c[16*r+7]]),o(0,5,10,15,f[c[16*r+8]],f[c[16*r+9]]),o(1,6,11,12,f[c[16*r+10]],f[c[16*r+11]]),o(2,7,8,13,f[c[16*r+12]],f[c[16*r+13]]),o(3,4,9,14,f[c[16*r+14]],f[c[16*r+15]]);for(r=0;r<8;r++)e.h[r]^=u[r]^u[r+8]}function h(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&&(p(n,t),n.c=64),n}function p(e,t){for(var r=0;r>2]>>8*(3&r)&255;return t}function g(e,t,r){r=r||32,e=n.normalizeInput(e);var i=h(r,t);return p(i,e),d(i)}e.exports={blake2s:g,blake2sHex:function(e,t,r){var i=g(e,t,r);return n.toHex(i)},blake2sInit:h,blake2sUpdate:p,blake2sFinal:d}},function(e,t,r){var n=r(439),i=r(441);e.exports=n,e.exports.parse=n,e.exports.stringify=i},function(e,t,r){var n=r(440),i=["int32","int64","uint32","uint64","sint32","sint64","bool","fixed64","sfixed64","double","fixed32","sfixed32","float"],o=function(e){for(var t={};e.length;)switch(e[0]){case"[":case",":e.shift();var r=e.shift();if("("===r&&(r=e.shift(),e.shift()),"="!==e[0])throw new Error("Unexpected token in field options: "+e[0]);if(e.shift(),"]"===e[0])throw new Error("Unexpected ] in field option");t[r]=e.shift();break;case"]":return e.shift(),t;default:throw new Error("Unexpected token in field options: "+e[0])}throw new Error("No closing tag for field options")},s=function(e){for(var t={name:null,type:null,tag:-1,map:null,oneof:null,required:!1,repeated:!1,options:{}};e.length;)switch(e[0]){case"=":e.shift(),t.tag=Number(e.shift());break;case"map":if(t.type="map",t.map={from:null,to:null},e.shift(),"<"!==e[0])throw new Error("Unexpected token in map type: "+e[0]);if(e.shift(),t.map.from=e.shift(),","!==e[0])throw new Error("Unexpected token in map type: "+e[0]);if(e.shift(),t.map.to=e.shift(),">"!==e[0])throw new Error("Unexpected token in map type: "+e[0]);e.shift(),t.name=e.shift();break;case"repeated":case"required":case"optional":var r=e.shift();t.required="required"===r,t.repeated="repeated"===r,t.type=e.shift(),t.name=e.shift();break;case"[":t.options=o(e);break;case";":if(null===t.name)throw new Error("Missing field name");if(null===t.type)throw new Error("Missing type in message field: "+t.name);if(-1===t.tag)throw new Error("Missing tag number in message field: "+t.name);return e.shift(),t;default:throw new Error("Unexpected token in message field: "+e[0])}throw new Error("No ; found for message field")},a=function(e){for(var t={enums:[],messages:[],fields:[],extends:[],extensions:null};e.length;)switch(e[0]){case"map":case"repeated":case"optional":case"required":t.fields.push(s(e));break;case"enum":t.enums.push(d(e));break;case"message":t.messages.push(f(e));break;case"extensions":t.extensions=u(e);break;case"oneof":e.shift();var r=e.shift();if("{"!==e[0])throw new Error("Unexpected token in oneof: "+e[0]);for(e.shift();"}"!==e[0];){e.unshift("optional");var n=s(e);n.oneof=r,t.fields.push(n)}e.shift();break;case"extend":t.extends.push(c(e));break;case";":e.shift();break;case"reserved":case"option":for(e.shift();";"!==e[0];)e.shift();break;default:e.unshift("optional"),t.fields.push(s(e))}return t},c=function(e){return{name:e[1],message:f(e)}},u=function(e){e.shift();var t=Number(e.shift());if(isNaN(t))throw new Error("Invalid from in extensions definition");if("to"!==e.shift())throw new Error("Expected keyword 'to' in extensions definition");var r=e.shift();if("max"===r&&(r=536870911),r=Number(r),isNaN(r))throw new Error("Invalid to in extensions definition");if(";"!==e.shift())throw new Error("Missing ; in extensions definition");return{from:t,to:r}},f=function(e){e.shift();var t=1,r=[],n={name:e.shift(),enums:[],extends:[],messages:[],fields:[]};if("{"!==e[0])throw new Error("Expected { but found "+e[0]);for(e.shift();e.length;){if("{"===e[0]?t++:"}"===e[0]&&t--,!t)return e.shift(),r=a(r),n.enums=r.enums,n.messages=r.messages,n.fields=r.fields,n.extends=r.extends,n.extensions=r.extensions,n;r.push(e.shift())}if(t)throw new Error("No closing tag for message")},l=function(e){e.shift();var t=e.shift();if(";"!==e[0])throw new Error("Expected ; but found "+e[0]);return e.shift(),t},h=function(e){if(e.shift(),"="!==e[0])throw new Error("Expected = but found "+e[0]);e.shift();var t=e.shift();switch(t){case'"proto2"':t=2;break;case'"proto3"':t=3;break;default:throw new Error("Expected protobuf syntax version but found "+t)}if(";"!==e[0])throw new Error("Expected ; but found "+e[0]);return e.shift(),t},p=function(e){if(e.length<4)throw new Error("Invalid enum value: "+e.slice(0,3).join(" "));if("="!==e[1])throw new Error("Expected = but found "+e[1]);if(";"!==e[3]&&"["!==e[3])throw new Error("Expected ; or [ but found "+e[1]);var t=e.shift();e.shift();var r={value:null,options:{}};return r.value=Number(e.shift()),"["===e[0]&&(r.options=o(e)),e.shift(),{name:t,val:r}},d=function(e){e.shift();var t={},r={name:e.shift(),values:{},options:{}};if("{"!==e[0])throw new Error("Expected { but found "+e[0]);for(e.shift();e.length;){if("}"===e[0])return e.shift(),";"===e[0]&&e.shift(),r;if("option"!==e[0]){var n=p(e);r.values[n.name]=n.val}else t=g(e),r.options[t.name]=t.value}throw new Error("No closing tag for enum")},g=function(e){for(var t=null,r=null,n=function(e){return"true"===e||"false"!==e&&e.replace(/^"+|"+$/gm,"")};e.length;){if(";"===e[0])return e.shift(),{name:t,value:r};switch(e[0]){case"option":e.shift();var i="("===e[0];if(i&&e.shift(),t=e.shift(),i){if(")"!==e[0])throw new Error("Expected ) but found "+e[0]);e.shift()}"."===e[0][0]&&(t+=e.shift());break;case"=":if(e.shift(),null===t)throw new Error("Expected key for option with value: "+e[0]);if(r=n(e.shift()),"optimize_for"===t&&!/^(SPEED|CODE_SIZE|LITE_RUNTIME)$/.test(r))throw new Error("Unexpected value for option optimize_for: "+r);"{"===r&&(r=b(e));break;default:throw new Error("Unexpected token in option: "+e[0])}}},b=function(e){for(var t=function(e){return"true"===e||"false"!==e&&e.replace(/^"+|"+$/gm,"")},r={};e.length;){if("}"===e[0])return e.shift(),r;var n="("===e[0];n&&e.shift();var i=e.shift();if(n){if(")"!==e[0])throw new Error("Expected ) but found "+e[0]);e.shift()}var o=null;switch(e[0]){case":":if(void 0!==r[i])throw new Error("Duplicate option map key "+i);e.shift(),"{"===(o=t(e.shift()))&&(o=b(e)),r[i]=o,";"===e[0]&&e.shift();break;case"{":if(e.shift(),o=b(e),void 0===r[i]&&(r[i]=[]),!Array.isArray(r[i]))throw new Error("Duplicate option map key "+i);r[i].push(o);break;default:throw new Error("Unexpected token in option map: "+e[0])}}throw new Error("No closing tag for option map")},m=function(e){e.shift();var t=e.shift().replace(/^"+|"+$/gm,"");if(";"!==e[0])throw new Error("Unexpected token: "+e[0]+'. Expected ";"');return e.shift(),t},y=function(e){e.shift();var t={name:e.shift(),methods:[],options:{}};if("{"!==e[0])throw new Error("Expected { but found "+e[0]);for(e.shift();e.length;){if("}"===e[0])return e.shift(),";"===e[0]&&e.shift(),t;switch(e[0]){case"option":var r=g(e);if(void 0!==t.options[r.name])throw new Error("Duplicate option "+r.name);t.options[r.name]=r.value;break;case"rpc":t.methods.push(v(e));break;default:throw new Error("Unexpected token in service: "+e[0])}}throw new Error("No closing tag for service")},v=function(e){e.shift();var t={name:e.shift(),input_type:null,output_type:null,client_streaming:!1,server_streaming:!1,options:{}};if("("!==e[0])throw new Error("Expected ( but found "+e[0]);if(e.shift(),"stream"===e[0]&&(e.shift(),t.client_streaming=!0),t.input_type=e.shift(),")"!==e[0])throw new Error("Expected ) but found "+e[0]);if(e.shift(),"returns"!==e[0])throw new Error("Expected returns but found "+e[0]);if(e.shift(),"("!==e[0])throw new Error("Expected ( but found "+e[0]);if(e.shift(),"stream"===e[0]&&(e.shift(),t.server_streaming=!0),t.output_type=e.shift(),")"!==e[0])throw new Error("Expected ) but found "+e[0]);if(e.shift(),";"===e[0])return e.shift(),t;if("{"!==e[0])throw new Error("Expected { but found "+e[0]);for(e.shift();e.length;){if("}"===e[0])return e.shift(),";"===e[0]&&e.shift(),t;if("option"!==e[0])throw new Error("Unexpected token in rpc options: "+e[0]);var r=g(e);if(void 0!==t.options[r.name])throw new Error("Duplicate option "+r.name);t.options[r.name]=r.value}throw new Error("No closing tag for rpc")};e.exports=function(e){for(var t=n(e.toString()),r=0;rt.extensions.to)throw new Error(t.name+" does not declare "+e.tag+" as an extension number");t.fields.push(e)})})}),s.messages.forEach(function(e){e.fields.forEach(function(t){var r,n,o,a;if(t.options&&"true"===t.options.packed&&-1===i.indexOf(t.type)){if(-1===t.type.indexOf(".")){if(e.enums&&e.enums.some(function(e){return e.name===t.type}))return}else{if((r=t.type.split(".")).length>2)throw new Error("what is this?");if(n=r[0],o=r[1],s.messages.some(function(e){if(e.name===n)return a=e,e}),a&&a.enums&&a.enums.some(function(e){return e.name===o}))return}throw new Error("Fields of type "+t.type+' cannot be declared [packed=true]. Only repeated fields of primitive numeric types (types which use the varint, 32-bit, or 64-bit wire types) can be declared "packed". See https://developers.google.com/protocol-buffers/docs/encoding#optional')}})}),s}},function(e,t){e.exports=function(e){var t,r=function(e){return e.trim()};return e.replace(/([;,{}()=:[\]<>]|\/\*|\*\/)/g," $1 ").split(/\n/).map(r).filter(Boolean).map(function(e){var t=e.indexOf("//");return t>-1?e.slice(0,t):e}).map(r).filter(Boolean).join("\n").split(/\s+|\n+/gm).filter((t=!1,function(e){return"/*"===e?(t=!0,!1):"*/"===e?(t=!1,!1):!t}))}},function(e,t){var r=function(e,t){var r=e.repeated?"repeated":e.required?"required":"optional";"map"===e.type&&(r="map<"+e.map.from+","+e.map.to+">"),e.oneof&&(r="");var n=Object.keys(e.options||{}).map(function(t){return t+" = "+e.options[t]}).join(",");return n&&(n=" ["+n+"]"),t.push((r?r+" ":"")+("map"===e.map?"":e.type+" ")+e.name+" = "+e.tag+n+";"),t},n=function(e,t){t.push("message "+e.name+" {"),e.enums||(e.enums=[]),e.enums.forEach(function(e){t.push(i(e,[]))}),e.messages||(e.messages=[]),e.messages.forEach(function(e){t.push(n(e,[]))});var o={};return e.fields||(e.fields=[]),e.fields.forEach(function(e){e.oneof?(o[e.oneof]||(o[e.oneof]=[]),o[e.oneof].push(r(e,[]))):t.push(r(e,[]))}),Object.keys(o).forEach(function(e){o[e].unshift("oneof "+e+" {"),o[e].push("}"),t.push(o[e])}),t.push("}",""),t},i=function(e,t){t.push("enum "+e.name+" {"),e.options||(e.options={});var r=s(e.options,[]);return r.length>1&&t.push(r.slice(0,-1)),Object.keys(e.values).map(function(r){var n=o(e.values[r]);t.push([r+" = "+n+";"])}),t.push("}",""),t},o=function(e,t){var r=Object.keys(e.options||{}).map(function(t){return t+" = "+e.options[t]}).join(",");return r&&(r=" ["+r+"]"),e.value+r},s=function(e,t){var r=Object.keys(e);return r.forEach(function(r){var n=e[r];~r.indexOf(".")&&(r="("+r+")");var i=typeof n;"object"===i?(n=a(n,[])).length&&t.push("option "+r+" = {",n,"};"):("string"===i&&"optimize_for"!==r&&(n='"'+n+'"'),t.push("option "+r+" = "+n+";"))}),r.length>0&&t.push(""),t},a=function(e,t){return Object.keys(e).forEach(function(r){var n=e[r],i=typeof n;"object"===i?Array.isArray(n)?n.forEach(function(e){(e=a(e,[])).length&&t.push(r+" {",e,"}")}):(n=a(n,[])).length&&t.push(r+" {",n,"}"):("string"===i&&(n='"'+n+'"'),t.push(r+": "+n))}),t},c=function(e,t){var r="rpc "+e.name+"(";e.client_streaming&&(r+="stream "),r+=e.input_type+") returns (",e.server_streaming&&(r+="stream "),r+=e.output_type+")",e.options||(e.options={});var n=s(e.options,[]);return n.length>1?t.push(r+" {",n.slice(0,-1),"}"):t.push(r+";"),t},u=function(e){return function(t){return Array.isArray(t)?t.map(u(e+" ")).join("\n"):e+t}};e.exports=function(e){var t=[];return t.push('syntax = "proto'+e.syntax+'";',""),e.package&&t.push("package "+e.package+";",""),e.options||(e.options={}),s(e.options,t),e.enums||(e.enums=[]),e.enums.forEach(function(e){i(e,t)}),e.messages||(e.messages=[]),e.messages.forEach(function(e){n(e,t)}),e.services&&e.services.forEach(function(e){!function(e,t){t.push("service "+e.name+" {"),e.options||(e.options={}),s(e.options,t),e.methods||(e.methods=[]),e.methods.forEach(function(e){t.push(c(e,[]))}),t.push("}","")}(e,t)}),t.map(u("")).join("\n")}},function(e,t,r){"use strict";var n=r(443),i=r(445),o=r(446),s=r(447),a=r(5);e.exports=function(e,t){var r={},c={},u={},f=function(e,t){e.enums&&e.enums.forEach(function(e){e.id=t+(t?".":"")+e.name,c[e.id]=e,f(e,e.id)}),e.messages&&e.messages.forEach(function(n){n.id=t+(t?".":"")+n.name,r[n.id]=n,n.fields.forEach(function(n){if(n.map){var i="Map_"+n.map.from+"_"+n.map.to,o={name:i,enums:[],messages:[],fields:[{name:"key",type:n.map.from,tag:1,repeated:!1,required:!0},{name:"value",type:n.map.to,tag:2,repeated:!1,required:!1}],extensions:null,id:t+(t?".":"")+i};r[o.id]||(r[o.id]=o,e.messages.push(o)),n.type=i,n.repeated=!0}}),f(n,n.id)})};f(e,"");var l=function(e,t){e.messages.forEach(function(r){t[r.name]=h(r.name,e.id)}),e.enums.forEach(function(e){t[e.name]=function(e){if(!e)return null;var t={};return Object.keys(e).forEach(function(r){t[r]=e[r].value}),t}(e.values)}),t.type=2,t.message=!0,t.name=e.name;var r={};e.fields.forEach(function(e){e.oneof&&(r[e.oneof]||(r[e.oneof]=[]),r[e.oneof].push(e.name))});var n=e.fields.map(function(t){return h(t.type,e.id)}),a=s(e,n,r),c=o(e,h,n,r,a),u=i(e,h,n);return c.bytes=u.bytes=0,t.buffer=!0,t.encode=c,t.decode=u,t.encodingLength=a,t},h=function(e,i,o){if(t&&t[e])return t[e];if(n[e])return n[e];var s,f,h=(i?i+"."+e:e).split(".").map(function(t,r,n){return n.slice(0,r).concat(e).join(".")}).reverse().reduce(function(e,t){return e||r[t]||c[t]},null);if(!1===o)return h;if(!h)throw new Error("Could not resolve "+e);return h.values?(s=h,f=Object.keys(s.values||[]).map(function(e){return parseInt(s.values[e].value,10)}),n.make(0,function e(t,r,n){if(!f.length||-1===f.indexOf(t))throw new Error("Invalid enum value: "+t);return a.encode(t,r,n),e.bytes=a.encode.bytes,r},function e(t,r){var n=a.decode(t,r);if(!f.length||-1===f.indexOf(n))throw new Error("Invalid enum value: "+n);return e.bytes=a.decode.bytes,n},a.encodingLength)):u[h.id]||l(h,u[h.id]={})};return(e.enums||[]).concat((e.messages||[]).map(function(e){return h(e.id)}))}},function(e,t,r){"use strict";var n,i,o,s=r(5),a=r(444),c=r(3).Buffer,u=function(e,t,r,n){return t.bytes=r.bytes=0,{type:e,encode:t,decode:r,encodingLength:n}};t.make=u,t.bytes=(n=function(e){return c.isBuffer(e)?e.length:c.byteLength(e)},u(2,i=function(e,t,r){var o=r,a=n(e);return s.encode(a,t,r),r+=s.encode.bytes,c.isBuffer(e)?e.copy(t,r):t.write(e,r,a),r+=a,i.bytes=r-o,t},o=function(e,t){var r=t,n=s.decode(e,t);t+=s.decode.bytes;var i=e.slice(t,t+n);return t+=i.length,o.bytes=t-r,i},function(e){var t=n(e);return s.encodingLength(t)+t})),t.string=function(){var e=function(t,r,n){var i=n,o=c.byteLength(t);return s.encode(o,r,n,"utf-8"),n+=s.encode.bytes,r.write(t,n,o),n+=o,e.bytes=n-i,r},t=function(e,r){var n=r,i=s.decode(e,r);r+=s.decode.bytes;var o=e.toString("utf-8",r,r+i);return r+=i,t.bytes=r-n,o};return u(2,e,t,function(e){var t=c.byteLength(e);return s.encodingLength(t)+t})}(),t.bool=function(){var e=function(t,r,n){return r[n]=t?1:0,e.bytes=1,r},t=function(e,r){var n=e[r]>0;return t.bytes=1,n};return u(0,e,t,function(e){return 1})}(),t.int32=function(){var e=function(t,r){var n=s.decode(t,r);return e.bytes=s.decode.bytes,n>2147483647?n-4294967296:n};return u(0,s.encode,e,function(e){return s.encodingLength(e<0?e+4294967296:e)})}(),t.int64=function(){var e=function(t,r){var n=s.decode(t,r);if(n>=Math.pow(2,63)){for(var i=9;255===t[r+i-1];)i--;i=i||9;var o=c.allocUnsafe(i);t.copy(o,0,r,r+i),o[i-1]=127&o[i-1],n=-1*s.decode(o,0),e.bytes=10}else e.bytes=s.decode.bytes;return n},t=function(e,r,n){if(e<0){var i=n+9;for(s.encode(-1*e,r,n),r[n+=s.encode.bytes-1]=128|r[n];n=0?2*t:-2*t-1;var o=n.encode(t,r,i);return e.bytes=n.encode.bytes,o},t.decode=function e(t,r){var i=n.decode(t,r);return e.bytes=n.decode.bytes,1&i?(i+1)/-2:i/2},t.encodingLength=function(e){return n.encodingLength(e>=0?2*e:-2*e-1)}},function(e,t,r){"use strict";var n=r(5),i=r(163).defined;var o=function(e,t,r){switch(e){case 0:return n.decode(t,r),r+n.decode.bytes;case 1:return r+8;case 2:var i=n.decode(t,r);return r+n.decode.bytes+i;case 3:case 4:throw new Error("Groups are not supported");case 5:return r+4;default:throw new Error("Unknown wire type: "+e)}},s=function(e,t){if(e.map)return{};if(e.repeated)return[];switch(e.type){case"string":return null!=t?t:"";case"bool":return"true"===t;case"float":case"double":case"sfixed32":case"fixed32":case"varint":case"enum":case"uint64":case"uint32":case"int64":case"int32":case"sint64":case"sint32":return parseInt(t||0,10);default:return null}};e.exports=function(e,t,r){for(var a=[],c={},u=[],f=[],l=0;l-1&&delete r[c[f]];if(e.message){var l=n.decode(i,o);o+=n.decode.bytes;var h=e.decode(i,o,o+l);t.map?(r[a]=r[a]||{},r[a][h.key]=h.value):t.repeated?(r[a]=r[a]||[],r[a].push(h)):r[a]=h}else t.repeated?(r[a]=r[a]||[],r[a].push(e.decode(i,o))):r[a]=e.decode(i,o);return o+=e.decode.bytes}return function t(l,h,p){if(null==h&&(h=0),null==p&&(p=l.length),!(p<=l.length&&h<=l.length))throw new Error("Decoded message is not valid");for(var d,b=h,m={};;){if(p<=h){var y,v,w="",A=0;for(A=0;A-1){_=!0;break}_||(y?d.repeated?m[w]=[]:(v=v&&y[v]?y[v].value:y[Object.keys(y)[0]].value,m[w]=parseInt(v||0,10)):m[w]=s(d,v))}return t.bytes=h-b,m}var k=n.decode(l,h);h+=n.decode.bytes;var x=c[k>>3];if(null!=x){var C=r[x];if((d=e.fields[x]).packed){var I=n.decode(l,h);for(I+=h+=n.decode.bytes;h-1){if(y)throw new Error("only one of the properties defined in oneof "+v+" can be set");y=!0}}for(m=0;me.name!==r);else{if(!t.isBuffer(r))return n(new Error("second arg needs to be a name or multihash"),null);c=c.filter(e=>!e.multihash.equals(r))}s(a,c,n)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{put:(0,n.expose)("ipfs.dht.put",(0,i.pre)(t.pre("dht.put"),function(){var t;return(t=e().dht).put.apply(t,arguments)}),t),get:(0,n.expose)("ipfs.dht.get",(0,i.pre)(t.pre("dht.get"),function(){var t;return(t=e().dht).get.apply(t,arguments)}),t),findprovs:(0,n.expose)("ipfs.dht.findprovs",(0,i.pre)((0,a.preBufferFromJson)(0),t.pre("dht.findprovs"),(0,i.post)(function(){var t;return(t=e().dht).findprovs.apply(t,arguments)},function(e){return e.map(function(e){return(0,s.isPeerInfo)(e)?(0,s.peerInfoToJson)(e):e})})),t),findpeer:(0,n.expose)("ipfs.dht.findpeer",(0,i.pre)((0,s.prePeerIdFromJson)(0),t.pre("dht.findpeer"),(0,i.post)(function(){var t;return(t=e().dht).findpeer.apply(t,arguments)},function(e){return(0,s.isPeerInfo)(e)?(0,s.peerInfoToJson)(e):e})),t),provide:(0,n.expose)("ipfs.dht.provide",(0,i.pre)((0,a.preBufferFromJson)(0),(0,a.preArrayOfBufferFromJson)(0),(0,o.preCidFromJson)(0),(0,o.preArrayOfCidFromJson)(0),t.pre("dht.provide"),(0,i.post)(function(){var t;return(t=e().dht).provide.apply(t,arguments)},function(){return null})),t),query:(0,n.expose)("ipfs.dht.query",(0,i.pre)((0,s.prePeerIdFromJson)(0),t.pre("dht.query"),(0,i.post)(function(){var t;return(t=e().dht).query.apply(t,arguments)},function(e){return e.map(function(e){return(0,s.isPeerInfo)(e)?(0,s.peerInfoToJson)(e):e})})),t)}};var n=r(1),i=r(2),o=r(28),s=r(135),a=r(17)},function(e,t,r){"use strict";const n=r(456),i=r(278).ensureMultiaddr,o=r(532),s=r(20);class a{constructor(e){s(e,"Missing peerId. Use Peer.create(cb) to create one"),this.id=e,this.multiaddrs=new o,this.protocols=new Set,this._connectedMultiaddr=void 0}connect(e){if(e=i(e),!this.multiaddrs.has(e)&&e.toString()!==`/ipfs/${this.id.toB58String()}`)throw new Error("can't be connected to missing multiaddr from set");this._connectedMultiaddr=e}disconnect(){this._connectedMultiaddr=void 0}isConnected(){return this._connectedMultiaddr}}a.create=((e,t)=>{if("function"==typeof e)return t=e,e=null,void n.create((e,r)=>{if(e)return t(e);t(null,new a(r))});"function"==typeof e.toJSON?t(null,new a(e)):n.createFromJSON(e,(e,r)=>t(e,new a(r)))}),a.isPeerInfo=(e=>Boolean("object"==typeof e&&e.id&&e.multiaddrs)),e.exports=a},function(e,t,r){"use strict";(function(n){const i=r(24),o=r(457),s=r(20),a=r(10);class c{constructor(e,t,r){s(n.isBuffer(e),"invalid id provided"),t&&r&&s(t.public.bytes.equals(r.bytes),"inconsistent arguments"),this._id=e,this._idB58String=i.toB58String(this.id),this._privKey=t,this._pubKey=r}get id(){return this._id}set id(e){throw new Error("Id is immutable")}get privKey(){return this._privKey}set privKey(e){this._privKey=e}get pubKey(){return this._pubKey?this._pubKey:this._privKey?this._privKey.public:void 0}set pubKey(e){this._pubKey=e}marshalPubKey(){if(this.pubKey)return o.keys.marshalPublicKey(this.pubKey)}marshalPrivKey(){if(this.privKey)return o.keys.marshalPrivateKey(this.privKey)}toPrint(){return this.toJSON()}toJSON(){return{id:this.toB58String(),privKey:u(this.marshalPrivKey()),pubKey:u(this.marshalPubKey())}}toHexString(){return i.toHexString(this.id)}toBytes(){return this.id}toB58String(){return this._idB58String}isEqual(e){if(n.isBuffer(e))return this.id.equals(e);if(e.id)return this.id.equals(e.id);throw new Error("not valid Id")}isValid(e){this.privKey&&this.privKey.public&&this.privKey.public.bytes&&n.isBuffer(this.pubKey.bytes)&&this.privKey.public.bytes.equals(this.pubKey.bytes)?e():e(new Error("Keys not match"))}}function u(e){if(e)return e.toString("base64")}(t=e.exports=c).create=function(e,t){"function"==typeof e&&(t=e,e={}),(e=e||{}).bits=e.bits||2048,a([t=>o.keys.generateKeyPair("RSA",e.bits,t),(e,t)=>e.public.hash((r,n)=>{t(r,n,e)})],(e,r,n)=>{if(e)return t(e);t(null,new c(r,n))})},t.createFromHexString=function(e){return new c(i.fromHexString(e))},t.createFromBytes=function(e){return new c(e)},t.createFromB58String=function(e){return new c(i.fromB58String(e))},t.createFromPubKey=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let r;try{let i=e;if("string"==typeof i&&(i=n.from(e,"base64")),!n.isBuffer(i))throw new Error("Supplied key is neither a base64 string nor a buffer");r=o.keys.unmarshalPublicKey(i)}catch(e){return t(e)}r.hash((e,n)=>{if(e)return t(e);t(null,new c(n,null,r))})},t.createFromPrivKey=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let r=e;try{if("string"==typeof r&&(r=n.from(e,"base64")),!n.isBuffer(r))throw new Error("Supplied key is neither a base64 string nor a buffer")}catch(e){return t(e)}a([e=>o.keys.unmarshalPrivateKey(r,e),(e,t)=>e.public.hash((r,n)=>{t(r,n,e)})],(e,r,n)=>{if(e)return t(e);t(null,new c(r,n,n.public))})},t.createFromJSON=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let r,s,u,f;try{r=i.fromB58String(e.id),s=e.privKey&&n.from(e.privKey,"base64"),u=e.pubKey&&n.from(e.pubKey,"base64"),f=u&&o.keys.unmarshalPublicKey(u)}catch(e){return t(e)}s?a([e=>o.keys.unmarshalPrivateKey(s,e),(e,t)=>e.public.hash((r,n)=>{t(r,n,e)}),(e,t,r)=>{f?f.hash((n,i)=>{r(n,e,t,i)}):r(null,e,t)}],(e,n,i,o)=>e?t(e):f&&!n.equals(o)?t(new Error("Public and private key do not match")):r&&!n.equals(r)?t(new Error("Id and private key do not match")):void t(null,new c(r,i,f))):t(null,new c(r,null,f))},t.isPeerId=function(e){return Boolean("object"==typeof e&&e._id&&e._idB58String)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(230),i=r(459),o=r(479);(t=e.exports).aes=i,t.hmac=n,t.keys=o,t.randomBytes=r(277),t.pbkdf2=r(528)},function(e,t,r){"use strict";e.exports={SHA1:20,SHA256:32,SHA512:64}},function(e,t,r){"use strict";const n=r(460),i={16:"aes-128-ctr",32:"aes-256-ctr"};t.create=function(e,t,r){const o=i[e.length];if(!o)return r(new Error("Invalid key length"));const s=n.createCipheriv(o,e,t),a=n.createDecipheriv(o,e,t);r(null,{encrypt(e,t){t(null,s.update(e))},decrypt(e,t){t(null,a.update(e))}})}},function(e,t,r){"use strict";const n=r(78);e.exports={createCipheriv:n.createCipheriv,createDecipheriv:n.createDecipheriv}},function(e,t,r){var n=r(231),i=r(235),o=r(3).Buffer,s=r(240),a=r(79),c=r(136),u=r(241);function f(e,t,r){a.call(this),this._cache=new h,this._cipher=new c.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}r(4)(f,a),f.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return o.concat(n)};var l=o.alloc(16,16);function h(){this.cache=o.allocUnsafe(0)}function p(e,t,r){var a=n[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=o.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===a.type?new s(a.module,t,r):"auth"===a.type?new i(a.module,t,r):new f(a.module,t,r)}f.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(l))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=o.concat([this.cache,e])},h.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},h.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r>s%8,e._prev=o(e._prev,r?n:i);return a}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i>7;return o}t.encrypt=function(e,t,r){for(var o=t.length,s=n.allocUnsafe(o),a=-1;++a0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,o=n.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,r=o,i=a,t.copy(r,i),a+=s.data.length,s=s.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,r){(function(t){function r(e){try{if(!t.localStorage)return!1}catch(e){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,r(12))},function(e,t,r){"use strict";e.exports=o;var n=r(239),i=r(108);function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}i.inherits=r(22),i.inherits(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){e.exports=r(167)},function(e,t,r){e.exports=r(80)},function(e,t,r){e.exports=r(166).Transform},function(e,t,r){e.exports=r(166).PassThrough},function(e,t,r){var n=r(3).Buffer,i=n.alloc(16,0);function o(e){var t=n.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function s(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}s.prototype.ghash=function(e){for(var t=-1;++t0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},s.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},s.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=s},function(e,t,r){var n=r(235),i=r(3).Buffer,o=r(231),s=r(240),a=r(79),c=r(136),u=r(241);function f(e,t,r){a.call(this),this._cache=new l,this._last=void 0,this._cipher=new c.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function l(){this.cache=i.allocUnsafe(0)}function h(e,t,r){var a=o[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=i.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===a.type?new s(a.module,t,r,!0):"auth"===a.type?new n(a.module,t,r,!0):new f(a.module,t,r)}r(4)(f,a),f.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),n.push(r);return i.concat(n)},f.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var r=-1;for(;++r16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},l.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=u(t,!1,r.key,r.iv);return h(e,n.key,n.iv)},t.createDecipheriv=h},function(e,t,r){"use strict";(function(n){const i=r(19)(r(169)),o=r(25);t=e.exports;const s={rsa:r(489),ed25519:r(504),secp256k1:r(84)(i,r(277))};function a(e){return void 0!==s[e.toLowerCase()]}t.supportedKeys=s,t.keysPBM=i,t.keyStretcher=r(525),t.generateEphemeralKeyPair=r(526),t.generateKeyPair=((e,t,r)=>{let n=s[e.toLowerCase()];if(!n)return r(new Error("invalid or unsupported key type"));n.generateKeyPair(t,r)}),t.generateKeyPairFromSeed=((e,t,r,n)=>{let i=s[e.toLowerCase()];return i?"ed25519"!==e.toLowerCase()?n(new Error("Seed key derivation is unimplemented for RSA or secp256k1")):void i.generateKeyPairFromSeed(t,r,n):n(new Error("invalid or unsupported key type"))}),t.unmarshalPublicKey=(e=>{const t=i.PublicKey.decode(e),r=t.Data;switch(t.Type){case i.KeyType.RSA:return s.rsa.unmarshalRsaPublicKey(r);case i.KeyType.Ed25519:return s.ed25519.unmarshalEd25519PublicKey(r);case i.KeyType.Secp256k1:if(s.secp256k1)return s.secp256k1.unmarshalSecp256k1PublicKey(r);throw new Error("secp256k1 support requires libp2p-crypto-secp256k1 package");default:throw new Error("invalid or unsupported key type")}}),t.marshalPublicKey=((e,t)=>{if(!a(t=(t||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type");return e.bytes}),t.unmarshalPrivateKey=((e,t)=>{let r;try{r=i.PrivateKey.decode(e)}catch(e){return t(e)}const n=r.Data;switch(r.Type){case i.KeyType.RSA:return s.rsa.unmarshalRsaPrivateKey(n,t);case i.KeyType.Ed25519:return s.ed25519.unmarshalEd25519PrivateKey(n,t);case i.KeyType.Secp256k1:return s.secp256k1?s.secp256k1.unmarshalSecp256k1PrivateKey(n,t):t(new Error("secp256k1 support requires libp2p-crypto-secp256k1 package"));default:t(new Error("invalid or unsupported key type"))}}),t.marshalPrivateKey=((e,t)=>{if(!a(t=(t||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type");return e.bytes}),t.import=((e,t,r)=>{try{const i=o.pki.decryptRsaPrivateKey(e,t);if(null===i)throw new Error("Cannot read the key, most likely the password is wrong or not a RSA key");let a=o.asn1.toDer(o.pki.privateKeyToAsn1(i));return a=n.from(a.getBytes(),"binary"),s.rsa.unmarshalRsaPrivateKey(a,r)}catch(e){r(e)}})}).call(this,r(0).Buffer)},function(e,t,r){(function(t){var r={};e.exports=r;var n={};r.encode=function(e,t,r){if("string"!=typeof t)throw new TypeError('"alphabet" must be a string.');if(void 0!==r&&"number"!=typeof r)throw new TypeError('"maxline" must be a number.');var n="";if(e instanceof Uint8Array){var i=0,o=t.length,s=t.charAt(0),a=[0];for(i=0;i0;)a.push(u%o),u=u/o|0}for(i=0;0===e[i]&&i=0;--i)n+=t[a[i]]}else n=function(e,t){var r=0,n=t.length,i=t.charAt(0),o=[0];for(r=0;r0;)o.push(a%n),a=a/n|0}var c="";for(r=0;0===e.at(r)&&r=0;--r)c+=t[o[r]];return c}(e,t);if(r){var f=new RegExp(".{1,"+r+"}","g");n=n.match(f).join("\r\n")}return n},r.decode=function(e,r){if("string"!=typeof e)throw new TypeError('"input" must be a string.');if("string"!=typeof r)throw new TypeError('"alphabet" must be a string.');var i=n[r];if(!i){i=n[r]=[];for(var o=0;o>=8;for(;l>0;)c.push(255&l),l>>=8}for(var h=0;e[h]===a&&h=i.Versions.TLS_1_1.minor&&c.output.putBytes(r),c.update(e.fragment),c.finish(a)&&(e.fragment=c.output,e.length=e.fragment.length(),o=!0),o}function a(e,t,r){if(!r){var n=e-t.length()%e;t.fillWithByte(n-1,n)}return!0}function c(e,t,r){var n=!0;if(r){for(var i=t.length(),o=t.last(),s=i-1-o;s=a?(e.fragment=s.output.getBytes(f-a),u=s.output.getBytes(a)):e.fragment=s.output.getBytes(),e.fragment=n.util.createBuffer(e.fragment),e.length=e.fragment.length();var l=t.macFunction(t.macKey,t.sequenceNumber,e);return t.updateSequenceNumber(),o=function(e,t,r){var i=n.hmac.create();return i.start("SHA1",e),i.update(t),t=i.digest().getBytes(),i.start(null,null),i.update(r),r=i.digest().getBytes(),t===r}(t.macKey,u,l)&&o}},function(e,t,r){var n=r(8);r(255),e.exports=n.mgf=n.mgf||{},n.mgf.mgf1=n.mgf1},function(e,t,r){(function(t){var n=r(8);if(r(140),r(43),r(257),r(13),void 0===i)var i=n.jsbn.BigInteger;var o=n.util.ByteBuffer,s=void 0===t?Uint8Array:t;n.pki=n.pki||{},e.exports=n.pki.ed25519=n.ed25519=n.ed25519||{};var a=n.ed25519;function c(e){var r=e.message;if(r instanceof Uint8Array)return r;var n=e.encoding;if(void 0===r){if(!e.md)throw new TypeError('"options.message" or "options.md" not specified.');r=e.md.digest().getBytes(),n="binary"}if("string"==typeof r&&!n)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if("string"==typeof r){if(void 0!==t)return new t(r,n);r=new o(r,n)}else if(!(r instanceof o))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var i=new s(r.length()),a=0;a=0;--r)N(n,n),1!==r&&D(n,n,t);for(r=0;r<16;++r)e[r]=n[r]}(r,r),D(r,r,i),D(r,r,o),D(r,r,o),D(e[0],r,o),N(n,e[0]),D(n,n,o),E(n,i)&&D(e[0],e[0],b);if(N(n,e[0]),D(n,n,o),E(n,i))return-1;x(e[0])===t[31]>>7&&M(e[0],u,e[0]);return D(e[3],e[0],e[1]),0}(c,n))return-1;for(i=0;i=0};var u=P(),f=P([1]),l=P([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),h=P([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),p=P([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),d=P([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),g=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),b=P([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function m(e,r){var i=n.md.sha512.create(),c=new o(e);i.update(c.getBytes(r),"binary");var u=i.digest().getBytes();if(void 0!==t)return new t(u,"binary");for(var f=new s(a.constants.HASH_BYTE_LENGTH),l=0;l<64;++l)f[l]=u.charCodeAt(l);return f}function y(e,t){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i>8,t[i]-=256*r;t[i]+=r,t[n]=0}for(r=0,i=0;i<32;++i)t[i]+=r-(t[31]>>4)*g[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;++i)t[i]-=r*g[i];for(n=0;n<32;++n)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function v(e){for(var t=new Float64Array(64),r=0;r<64;++r)t[r]=e[r],e[r]=0;y(e,t)}function w(e,t){var r=P(),n=P(),i=P(),o=P(),s=P(),a=P(),c=P(),u=P(),f=P();M(r,e[1],e[0]),M(f,t[1],t[0]),D(r,r,f),O(n,e[0],e[1]),O(f,t[0],t[1]),D(n,n,f),D(i,e[3],t[3]),D(i,i,h),D(o,e[2],t[2]),O(o,o,o),M(s,n,r),M(a,o,i),O(c,o,i),O(u,n,r),D(e[0],s,a),D(e[1],u,c),D(e[2],c,a),D(e[3],s,u)}function A(e,t,r){for(var n=0;n<4;++n)R(e[n],t[n],r)}function _(e,t){var r=P(),n=P(),i=P();!function(e,t){var r,n=P();for(r=0;r<16;++r)n[r]=t[r];for(r=253;r>=0;--r)N(n,n),2!==r&&4!==r&&D(n,n,t);for(r=0;r<16;++r)e[r]=n[r]}(i,t[2]),D(r,t[0],i),D(n,t[1],i),S(e,n),e[31]^=x(r)<<7}function S(e,t){var r,n,i,o=P(),s=P();for(r=0;r<16;++r)s[r]=t[r];for(T(s),T(s),T(s),n=0;n<2;++n){for(o[0]=s[0]-65517,r=1;r<15;++r)o[r]=s[r]-65535-(o[r-1]>>16&1),o[r-1]&=65535;o[15]=s[15]-32767-(o[14]>>16&1),i=o[15]>>16&1,o[14]&=65535,R(s,o,1-i)}for(r=0;r<16;r++)e[2*r]=255&s[r],e[2*r+1]=s[r]>>8}function E(e,t){var r=new s(32),n=new s(32);return S(r,e),S(n,t),k(r,0,n,0)}function k(e,t,r,n){return function(e,t,r,n,i){var o,s=0;for(o=0;o>>8)-1}(e,t,r,n,32)}function x(e){var t=new s(32);return S(t,e),1&t[0]}function C(e,t,r){var n,i;for(B(e[0],u),B(e[1],f),B(e[2],f),B(e[3],u),i=255;i>=0;--i)A(e,t,n=r[i/8|0]>>(7&i)&1),w(t,e),w(e,e),A(e,t,n)}function I(e,t){var r=[P(),P(),P(),P()];B(r[0],p),B(r[1],d),B(r[2],f),D(r[3],p,d),C(e,r,t)}function B(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function T(e){var t,r,n=1;for(t=0;t<16;++t)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function R(e,t,r){for(var n,i=~(r-1),o=0;o<16;++o)n=i&(e[o]^t[o]),e[o]^=n,t[o]^=n}function P(e){var t,r=new Float64Array(16);if(e)for(t=0;t0&&(s=n.util.fillString(String.fromCharCode(0),c)+s),{encapsulation:t.encrypt(s,"NONE"),key:e.generate(s,o)}},decrypt:function(t,r,n){var i=t.decrypt(r,"NONE");return e.generate(i,n)}};return o},n.kem.kdf1=function(e,t){o(this,e,0,t||e.digestLength)},n.kem.kdf2=function(e,t){o(this,e,1,t||e.digestLength)}},function(e,t,r){e.exports=r(60),r(171),r(110),r(248),r(257)},function(e,t,r){var n=r(8);r(81),r(59),r(138),r(82),r(93),r(254),r(43),r(13),r(173);var i=n.asn1,o=e.exports=n.pkcs7=n.pkcs7||{};function s(e){var t={},r=[];if(!i.validate(e,o.asn1.recipientInfoValidator,t,r)){var s=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw s.errors=r,s}return{version:t.version.charCodeAt(0),issuer:n.pki.RDNAttributesAsArray(t.issuer),serialNumber:n.util.createBuffer(t.serial).toHex(),encryptedContent:{algorithm:i.derToOid(t.encAlgorithm),parameter:t.encParameter.value,content:t.encKey}}}function a(e){for(var t,r=[],o=0;o0){for(var r=i.create(i.Class.CONTEXT_SPECIFIC,1,!0,[]),o=0;o=r&&s0&&s.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,t)),o.length>0&&s.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,o)),s.value[0].value.push(i.create(i.Class.UNIVERSAL,i.Type.SET,!0,e.signerInfos)),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.type).getBytes()),s])},addSigner:function(t){var r=t.issuer,i=t.serialNumber;if(t.certificate){var o=t.certificate;"string"==typeof o&&(o=n.pki.certificateFromPem(o)),r=o.issuer.attributes,i=o.serialNumber}var s=t.key;if(!s)throw new Error("Could not add PKCS#7 signer; no private key specified.");"string"==typeof s&&(s=n.pki.privateKeyFromPem(s));var a=t.digestAlgorithm||n.pki.oids.sha1;switch(a){case n.pki.oids.sha1:case n.pki.oids.sha256:case n.pki.oids.sha384:case n.pki.oids.sha512:case n.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+a)}var c=t.authenticatedAttributes||[];if(c.length>0){for(var u=!1,f=!1,l=0;l="8"&&(r="00"+r);var i=n.util.hexToBytes(r);e.putInt32(i.length),e.putBytes(i)}function s(e,t){e.putInt32(t.length),e.putString(t)}function a(){for(var e=n.md.sha1.create(),t=arguments.length,r=0;r0&&(this.state=d[this.state].block)},g.prototype.unblock=function(e){return e=void 0===e?1:e,this.blocks-=e,0===this.blocks&&this.state!==h&&(this.state=u,b(this,0)),this.blocks},g.prototype.sleep=function(e){e=void 0===e?0:e,this.state=d[this.state].sleep;var t=this;this.timeoutId=setTimeout(function(){t.timeoutId=null,t.state=u,b(t,0)},e)},g.prototype.wait=function(e){e.wait(this)},g.prototype.wakeup=function(){this.state===l&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state=u,b(this,0))},g.prototype.cancel=function(){this.state=d[this.state].cancel,this.permitsNeeded=0,null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null),this.subtasks=[]},g.prototype.fail=function(e){if(this.error=!0,m(this,!0),e)e.error=this.error,e.swapTime=this.swapTime,e.userData=this.userData,b(e,0);else{if(null!==this.parent){for(var t=this.parent;null!==t.parent;)t.error=this.error,t.swapTime=this.swapTime,t.userData=this.userData,t=t.parent;m(t,!0)}this.failureCallback&&this.failureCallback(this)}};var b=function(e,t){var r=t>30||+new Date-e.swapTime>20,n=function(t){if(t++,e.state===u)if(r&&(e.swapTime=+new Date),e.subtasks.length>0){var n=e.subtasks.shift();n.error=e.error,n.swapTime=e.swapTime,n.userData=e.userData,n.run(n),n.error||b(n,t)}else m(e),e.error||null!==e.parent&&(e.parent.error=e.error,e.parent.swapTime=e.swapTime,e.parent.userData=e.userData,b(e.parent,t))};r?setTimeout(n,0):n(t)},m=function(e,t){e.state=h,delete o[e.id],null===e.parent&&(e.type in a?0===a[e.type].length?n.log.error(i,"[%s][%s] task queue empty [%s]",e.id,e.name,e.type):a[e.type][0]!==e?n.log.error(i,"[%s][%s] task not first in queue [%s]",e.id,e.name,e.type):(a[e.type].shift(),0===a[e.type].length?delete a[e.type]:a[e.type][0].start()):n.log.error(i,"[%s][%s] task queue missing [%s]",e.id,e.name,e.type),t||(e.error&&e.failureCallback?e.failureCallback(e):!e.error&&e.successCallback&&e.successCallback(e)))};e.exports=n.task=n.task||{},n.task.start=function(e){var t=new g({run:e.run,name:e.name||"?"});t.type=e.type,t.successCallback=e.success||null,t.failureCallback=e.failure||null,t.type in a?a[e.type].push(t):(a[t.type]=[t],function(e){e.error=!1,e.state=d[e.state].start,setTimeout(function(){e.state===u&&(e.swapTime=+new Date,e.run(e),b(e,0))},0)}(t))},n.task.cancel=function(e){e in a&&(a[e]=[a[e][0]])},n.task.createCondition=function(){var e={tasks:{},wait:function(t){t.id in e.tasks||(t.block(),e.tasks[t.id]=t)},notify:function(){var t=e.tasks;for(var r in e.tasks={},t)t[r].unblock()}};return e}},function(e,t,r){"use strict";const n=r(259),i=r(19),o=r(9),s=r(261),a=i(r(169)),c=r(25),u=r(7);class f{constructor(e){this._key=e}verify(e,t,r){h(r),s.hashAndVerify(this._key,t,e,r)}marshal(){return s.utils.jwkToPkix(this._key)}get bytes(){return a.PublicKey.encode({Type:a.KeyType.RSA,Data:this.marshal()})}encrypt(e){return this._key.encrypt(e,"RSAES-PKCS1-V1_5")}equals(e){return this.bytes.equals(e.bytes)}hash(e){h(e),n(this.bytes,"sha2-256",e)}}class l{constructor(e,t){this._key=e,this._publicKey=t}genSecret(){return s.getRandomValues(new Uint8Array(16))}sign(e,t){h(t),s.hashAndSign(this._key,e,t)}get public(){if(!this._publicKey)throw new Error("public key not provided");return new f(this._publicKey)}decrypt(e,t){s.decrypt(this._key,e,t)}marshal(){return s.utils.jwkToPkcs1(this._key)}get bytes(){return a.PrivateKey.encode({Type:a.KeyType.RSA,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){h(e),n(this.bytes,"sha2-256",e)}id(e){this.public.hash((t,r)=>{if(t)return e(t);e(null,o.encode(r))})}export(e,t,r){"function"==typeof t&&(r=t,t=e,e="pkcs-8"),h(r),u(()=>{let n=null,i=null;try{const r=new c.util.ByteBuffer(this.marshal()),o=c.asn1.fromDer(r),s=c.pki.privateKeyFromAsn1(o);if("pkcs-8"===e){const e={algorithm:"aes256",count:1e4,saltSize:16,prfAlgorithm:"sha512"};i=c.pki.encryptRsaPrivateKey(s,t,e)}else n=new Error(`Unknown export format '${e}'`)}catch(e){n=e}r(n,i)})}}function h(e){if("function"!=typeof e)throw new Error("callback is required")}e.exports={RsaPublicKey:f,RsaPrivateKey:l,unmarshalRsaPublicKey:function(e){const t=s.utils.pkixToJwk(e);return new f(t)},unmarshalRsaPrivateKey:function(e,t){const r=s.utils.pkcs1ToJwk(e);s.unmarshalPrivateKey(r,(e,r)=>{if(e)return t(e);t(null,new l(r.privateKey,r.publicKey))})},generateKeyPair:function(e,t){s.generateKey(e,(e,r)=>{if(e)return t(e);t(null,new l(r.privateKey,r.publicKey))})},fromJwk:function(e,t){s.unmarshalPrivateKey(e,(e,r)=>{if(e)return t(e);t(null,new l(r.privateKey,r.publicKey))})}}},function(e,t,r){"use strict";(function(t){const n=r(55),i=r(56),o=r(260),s=r(491),a=o.toCallback,c=o.toBuf,u=o.fromString,f=o.fromNumberTo32BitBuf;e.exports={sha1:s.sha1,sha2256:s.sha2256,sha2512:s.sha2512,sha3512:a(c(n.sha3_512)),sha3384:a(c(n.sha3_384)),sha3256:a(c(n.sha3_256)),sha3224:a(c(n.sha3_224)),shake128:a(c(n.shake_128,256)),shake256:a(c(n.shake_256,512)),keccak224:a(c(n.keccak_224)),keccak256:a(c(n.keccak_256)),keccak384:a(c(n.keccak_384)),keccak512:a(c(n.keccak_512)),murmur3128:a(c(u(i.x64.hash128))),murmur332:a(f(u(i.x86.hash32))),addBlake:r(492),dblSha2256:(e,r)=>{s.sha2256(e,(e,n)=>{e&&r(e),s.sha2256(t.from(n),r)})}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(57),i=function(){if(self.crypto)return self.crypto.subtle||self.crypto.webkitSubtle;if(self.msCrypto)return self.msCrypto.subtle}();function o(e){if(!i)throw new Error("Please use a browser with webcrypto support");return(r,o)=>{const s=i.digest({name:e},r);if("function"!=typeof s.then)return s.onerror=(()=>{o(new Error(`hashing data using ${e}`))}),void(s.oncomplete=(e=>{o(null,e.target.result)}));n(s.then(e=>t.from(new Uint8Array(e))),o)}}e.exports={sha1:function(e,t){o("SHA-1")(e,t)},sha2256:function(e,t){o("SHA-256")(e,t)},sha2512:function(e,t){o("SHA-512")(e,t)}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(58),i=r(260).toCallback,o={init:n.blake2bInit,update:n.blake2bUpdate,digest:n.blake2bFinal},s={init:n.blake2sInit,update:n.blake2sUpdate,digest:n.blake2sFinal},a=(e,r)=>i(n=>{const i=r.init(e,null);return r.update(i,n),t.from(r.digest(i))});e.exports=(e=>{for(let t=0;t<64;t++)e[45569+t]=a(t+1,o);for(let t=0;t<32;t++)e[45633+t]=a(t+1,s)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(21),i=r(266),o=i.toBase64,s=i.toBn,a=n.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}),c=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid({"1.2.840.113549.1.1.1":"rsa"}),this.key("none").optional().null_(),this.key("curve").optional().objid(),this.key("params").optional().seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()))}),u=n.define("RSAPublicKey",function(){this.seq().obj(this.key("algorithm").use(c),this.key("subjectPublicKey").bitstr())}),f=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});t.pkcs1ToJwk=function(e){const t=a.decode(e,"der");return{kty:"RSA",n:o(t.modulus),e:o(t.publicExponent),d:o(t.privateExponent),p:o(t.prime1),q:o(t.prime2),dp:o(t.exponent1),dq:o(t.exponent2),qi:o(t.coefficient),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkcs1=function(e){return a.encode({version:0,modulus:s(e.n),publicExponent:s(e.e),privateExponent:s(e.d),prime1:s(e.p),prime2:s(e.q),exponent1:s(e.dp),exponent2:s(e.dq),coefficient:s(e.qi)},"der")},t.pkixToJwk=function(e){const t=u.decode(e,"der"),r=f.decode(t.subjectPublicKey.data,"der");return{kty:"RSA",n:o(r.modulus),e:o(r.publicExponent),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkix=function(e){return u.encode({algorithm:{algorithm:"rsa",none:null},subjectPublicKey:{data:f.encode({modulus:s(e.n),publicExponent:s(e.e)},"der")}},"der")}},function(e,t){},function(e,t,r){"use strict";const n=r(21),i=r(4);function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new o(e,t)},o.prototype._createNamed=function(e){let t;try{t=r(320).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){t=function(e){this._initNamed(e)}}return i(t,e),t.prototype._initNamed=function(t){e.call(this,t)},new t(this)},o.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n.decoders[e])),this.decoders[e]},o.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},o.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n.encoders[e])),this.encoders[e]},o.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},function(e,t){var r=[].indexOf;e.exports=function(e,t){if(r)return e.indexOf(t);for(var n=0;n{if(t)return e(t);e(null,o.encode(r))})}}function f(e){if("function"!=typeof e)throw new Error("callback is required")}function l(e,r){if(t.isBuffer(e)&&(e=new Uint8Array(e)),!(e instanceof Uint8Array)||e.length!==r)throw new Error("Key must be a Uint8Array or Buffer of length "+r);return e}e.exports={Ed25519PublicKey:c,Ed25519PrivateKey:u,unmarshalEd25519PrivateKey:function(e,t){try{e=l(e,s.privateKeyLength+s.publicKeyLength)}catch(e){return t(e)}const r=e.slice(0,s.privateKeyLength),n=e.slice(s.privateKeyLength,e.length);t(null,new u(r,n))},unmarshalEd25519PublicKey:function(e){return e=l(e,s.publicKeyLength),new c(e)},generateKeyPair:function(e,t){void 0===t&&"function"==typeof e&&(t=e),s.generateKey((e,r)=>{if(e)return t(e);let n;try{n=new u(r.secretKey,r.publicKey)}catch(e){return void t(e)}t(null,n)})},generateKeyPairFromSeed:function(e,t,r){void 0===r&&"function"==typeof t&&(r=t),s.generateKeyFromSeed(e,(e,t)=>{if(e)return r(e);let n;try{n=new u(t.secretKey,t.publicKey)}catch(e){return void r(e)}r(null,n)})}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(83),i=r(7);t.publicKeyLength=n.sign.publicKeyLength,t.privateKeyLength=n.sign.secretKeyLength,t.generateKey=function(e){i(()=>{let t;try{t=n.sign.keyPair()}catch(t){return e(t)}e(null,t)})},t.generateKeyFromSeed=function(e,t){i(()=>{let r;try{r=n.sign.keyPair.fromSeed(e)}catch(e){return t(e)}t(null,r)})},t.hashAndSign=function(t,r,o){i(()=>{o(null,e.from(n.sign.detached(r,t)))})},t.hashAndVerify=function(e,t,r,o){i(()=>{let i;try{i=n.sign.detached.verify(r,t,e)}catch(e){return o(e)}o(null,i)})}}).call(this,r(0).Buffer)},function(e,t){},function(e,t,r){"use strict";(function(t){const n=r(55),i=r(56),o=r(268),s=r(508),a=o.toCallback,c=o.toBuf,u=o.fromString,f=o.fromNumberTo32BitBuf;e.exports={sha1:s.sha1,sha2256:s.sha2256,sha2512:s.sha2512,sha3512:a(c(n.sha3_512)),sha3384:a(c(n.sha3_384)),sha3256:a(c(n.sha3_256)),sha3224:a(c(n.sha3_224)),shake128:a(c(n.shake_128,256)),shake256:a(c(n.shake_256,512)),keccak224:a(c(n.keccak_224)),keccak256:a(c(n.keccak_256)),keccak384:a(c(n.keccak_384)),keccak512:a(c(n.keccak_512)),murmur3128:a(c(u(i.x64.hash128))),murmur332:a(f(u(i.x86.hash32))),addBlake:r(509),dblSha2256:(e,r)=>{s.sha2256(e,(e,n)=>{e&&r(e),s.sha2256(t.from(n),r)})}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(57),i=function(){if(self.crypto)return self.crypto.subtle||self.crypto.webkitSubtle;if(self.msCrypto)return self.msCrypto.subtle}();function o(e){if(!i)throw new Error("Please use a browser with webcrypto support");return(r,o)=>{const s=i.digest({name:e},r);if("function"!=typeof s.then)return s.onerror=(()=>{o(new Error(`hashing data using ${e}`))}),void(s.oncomplete=(e=>{o(null,e.target.result)}));n(s.then(e=>t.from(new Uint8Array(e))),o)}}e.exports={sha1:function(e,t){o("SHA-1")(e,t)},sha2256:function(e,t){o("SHA-256")(e,t)},sha2512:function(e,t){o("SHA-512")(e,t)}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(58),i=r(268).toCallback,o={init:n.blake2bInit,update:n.blake2bUpdate,digest:n.blake2bFinal},s={init:n.blake2sInit,update:n.blake2sUpdate,digest:n.blake2sFinal},a=(e,r)=>i(n=>{const i=r.init(e,null);return r.update(i,n),t.from(r.digest(i))});e.exports=(e=>{for(let t=0;t<64;t++)e[45569+t]=a(t+1,o);for(let t=0;t<32;t++)e[45633+t]=a(t+1,s)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(511),i=r(267),o=r(7),s="sha2-256";e.exports=(e=>{function t(e){if(!n.privateKeyVerify(e))throw new Error("Invalid private key")}return{generateKey:function(t){let r;do{r=e(32)}while(!n.privateKeyVerify(r));((e,r)=>o(()=>t(e,r)))(null,r)},privateKeyLength:32,hashAndSign:function(e,t,r){const a=(e,t)=>o(()=>r(e,t));i.digest(t,s,(t,r)=>{if(t)return a(t);try{const i=n.sign(r,e),o=n.signatureExport(i.signature);return a(null,o)}catch(t){a(t)}})},hashAndVerify:function(e,t,r,a){const c=(e,t)=>o(()=>a(e,t));i.digest(r,s,(r,i)=>{if(r)return c(r);try{t=n.signatureImport(t);const o=n.verify(i,t,e);return c(null,o)}catch(r){c(r)}})},compressPublicKey:function(e){if(!n.publicKeyVerify(e))throw new Error("Invalid public key");return n.publicKeyConvert(e,!0)},decompressPublicKey:function(e){return n.publicKeyConvert(e,!1)},validatePrivateKey:t,validatePublicKey:function(e){if(!n.publicKeyVerify(e))throw new Error("Invalid public key")},computePublicKey:function(e){return t(e),n.publicKeyCreate(e)}}})},function(e,t,r){"use strict";e.exports=r(321)(r(514))},function(e,t,r){"use strict";(function(e){var r=Object.prototype.toString;t.isArray=function(e,t){if(!Array.isArray(e))throw TypeError(t)},t.isBoolean=function(e,t){if("[object Boolean]"!==r.call(e))throw TypeError(t)},t.isBuffer=function(t,r){if(!e.isBuffer(t))throw TypeError(r)},t.isFunction=function(e,t){if("[object Function]"!==r.call(e))throw TypeError(t)},t.isNumber=function(e,t){if("[object Number]"!==r.call(e))throw TypeError(t)},t.isObject=function(e,t){if("[object Object]"!==r.call(e))throw TypeError(t)},t.isBufferLength=function(e,t,r){if(e.length!==t)throw RangeError(r)},t.isBufferLength2=function(e,t,r,n){if(e.length!==t&&e.length!==r)throw RangeError(n)},t.isLengthGTZero=function(e,t){if(0===e.length)throw RangeError(t)},t.isNumberInInterval=function(e,t,r,n){if(e<=t||e>=r)throw RangeError(n)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";var n=r(3).Buffer,i=r(269),o=n.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),s=n.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);t.privateKeyExport=function(e,t,r){var i=n.from(r?o:s);return e.copy(i,r?8:9),t.copy(i,r?181:214),i},t.privateKeyImport=function(e){var t=e.length,r=0;if(!(t2||t1?e[r+n-2]<<8:0);if(!(t<(r+=n)+i||t32||t1&&0===t[o]&&!(128&t[o+1]);--r,++o);for(var s=n.concat([n.from([0]),e.s]),a=33,c=0;a>1&&0===s[c]&&!(128&s[c+1]);--a,++c);return i.encode(t.slice(o),s.slice(c))},t.signatureImport=function(e){var t=n.alloc(32,0),r=n.alloc(32,0);try{var o=i.decode(e);if(33===o.r.length&&0===o.r[0]&&(o.r=o.r.slice(1)),o.r.length>32)throw new Error("R length is too long");if(33===o.s.length&&0===o.s[0]&&(o.s=o.s.slice(1)),o.s.length>32)throw new Error("S length is too long")}catch(e){return}return o.r.copy(t,32-o.r.length),o.s.copy(r,32-o.s.length),{r:t,s:r}},t.signatureImportLax=function(e){var t=n.alloc(32,0),r=n.alloc(32,0),i=e.length,o=0;if(48===e[o++]){var s=e[o++];if(!(128&s&&(o+=s-128)>i)&&2===e[o++]){var a=e[o++];if(128&a){if(o+(s=a-128)>i)return;for(;s>0&&0===e[o];o+=1,s-=1);for(a=0;s>0;o+=1,s-=1)a=(a<<8)+e[o]}if(!(a>i-o)){var c=o;if(o+=a,2===e[o++]){var u=e[o++];if(128&u){if(o+(s=u-128)>i)return;for(;s>0&&0===e[o];o+=1,s-=1);for(u=0;s>0;o+=1,s-=1)u=(u<<8)+e[o]}if(!(u>i-o)){var f=o;for(o+=u;a>0&&0===e[c];a-=1,c+=1);if(!(a>32)){var l=e.slice(c,c+a);for(l.copy(t,32-l.length);u>0&&0===e[f];u-=1,f+=1);if(!(u>32)){var h=e.slice(f,f+u);return h.copy(r,32-h.length),{r:t,s:r}}}}}}}}}},function(e,t,r){"use strict";var n=r(3).Buffer,i=r(150),o=r(519),s=r(193),a=r(141),c=r(275),u=r(524);t.privateKeyVerify=function(e){var t=a.fromBuffer(e);return!(t.isOverflow()||t.isZero())},t.privateKeyExport=function(e,t){var r=a.fromBuffer(e);if(r.isOverflow()||r.isZero())throw new Error(s.EC_PRIVATE_KEY_EXPORT_DER_FAIL);return u.mul(r).toPublicKey(t)},t.privateKeyNegate=function(e){var t=a.fromBuffer(e);return t.isZero()?n.alloc(32):(t.ucmp(a.n)>0&&t.isub(a.n),a.n.sub(t).toBuffer())},t.privateKeyModInverse=function(e){var t=a.fromBuffer(e);if(t.isOverflow()||t.isZero())throw new Error(s.EC_PRIVATE_KEY_RANGE_INVALID);return t.uinvm().toBuffer()},t.privateKeyTweakAdd=function(e,t){var r=a.fromBuffer(t);if(r.isOverflow())throw new Error(s.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);if(r.iadd(a.fromBuffer(e)),r.isOverflow()&&r.isub(a.n),r.isZero())throw new Error(s.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);return r.toBuffer()},t.privateKeyTweakMul=function(e,t){var r=a.fromBuffer(t);if(r.isOverflow()||r.isZero())throw new Error(s.EC_PRIVATE_KEY_TWEAK_MUL_FAIL);var n=a.fromBuffer(e);return r.umul(n).ureduce().toBuffer()},t.publicKeyCreate=function(e,t){var r=a.fromBuffer(e);if(r.isOverflow()||r.isZero())throw new Error(s.EC_PUBLIC_KEY_CREATE_FAIL);return u.mul(r).toPublicKey(t)},t.publicKeyConvert=function(e,t){var r=c.fromPublicKey(e);if(null===r)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);return r.toPublicKey(t)},t.publicKeyVerify=function(e){return null!==c.fromPublicKey(e)},t.publicKeyTweakAdd=function(e,t,r){var n=c.fromPublicKey(e);if(null===n)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);if((t=a.fromBuffer(t)).isOverflow())throw new Error(s.EC_PUBLIC_KEY_TWEAK_ADD_FAIL);return u.mul(t).add(n).toPublicKey(r)},t.publicKeyTweakMul=function(e,t,r){var n=c.fromPublicKey(e);if(null===n)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);if((t=a.fromBuffer(t)).isOverflow()||t.isZero())throw new Error(s.EC_PUBLIC_KEY_TWEAK_MUL_FAIL);return n.mul(t).toPublicKey(r)},t.publicKeyCombine=function(e,t){for(var r=new Array(e.length),n=0;n=0)&&0===n.iadd(a.psn).redMul(d).ucmp(p.x)},t.recover=function(e,t,r,i){var o=a.fromBuffer(t.slice(0,32)),f=a.fromBuffer(t.slice(32,64));if(o.isOverflow()||f.isOverflow())throw new Error(s.ECDSA_SIGNATURE_PARSE_FAIL);do{if(o.isZero()||f.isZero())break;var l=o;if(r>>1){if(l.ucmp(a.psn)>=0)break;l=o.add(a.n)}var h=n.concat([n.from([2+(1&r)]),l.toBuffer()]),p=c.fromPublicKey(h);if(null===p)break;var d=o.uinvm(),g=a.n.sub(a.fromBuffer(e)).umul(d).ureduce(),b=f.umul(d).ureduce();return c.fromECJPoint(u.mulAdd(g,p,b)).toPublicKey(i)}while(0);throw new Error(s.ECDSA_RECOVER_FAIL)},t.ecdh=function(e,r){var n=t.ecdhUnsafe(e,r,!0);return i("sha256").update(n).digest()},t.ecdhUnsafe=function(e,t,r){var n=c.fromPublicKey(e);if(null===n)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);var i=a.fromBuffer(t);if(i.isOverflow()||i.isZero())throw new Error(s.ECDH_FAIL);return n.mul(i).toPublicKey(r)}},function(e,t,r){var n=r(4),i=r(94),o=r(3).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function c(){this.init(),this._w=a,i.call(this,64,56)}function u(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,c=0|this._e,l=0;l<16;++l)r[l]=e.readInt32BE(4*l);for(;l<80;++l)r[l]=r[l-3]^r[l-8]^r[l-14]^r[l-16];for(var h=0;h<80;++h){var p=~~(h/20),d=0|((t=n)<<5|t>>>27)+f(p,i,o,a)+c+r[h]+s[p];c=a,a=o,o=u(i),i=n,n=d}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},function(e,t,r){var n=r(4),i=r(94),o=r(3).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function c(){this.init(),this._w=a,i.call(this,64,56)}function u(e){return e<<5|e>>>27}function f(e){return e<<30|e>>>2}function l(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,c=0|this._e,h=0;h<16;++h)r[h]=e.readInt32BE(4*h);for(;h<80;++h)r[h]=(t=r[h-3]^r[h-8]^r[h-14]^r[h-16])<<1|t>>>31;for(var p=0;p<80;++p){var d=~~(p/20),g=u(n)+l(d,i,o,a)+c+r[p]+s[d]|0;c=a,a=o,o=f(i),i=n,n=g}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},function(e,t,r){var n=r(4),i=r(272),o=r(94),s=r(3).Buffer,a=new Array(64);function c(){this.init(),this._w=a,o.call(this,64,56)}n(c,i),c.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},c.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=c},function(e,t,r){var n=r(4),i=r(273),o=r(94),s=r(3).Buffer,a=new Array(160);function c(){this.init(),this._w=a,o.call(this,128,112)}n(c,i),c.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},c.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=c},function(e,t,r){"use strict";(function(t){var n=r(274),i=r(522),o=new t(0),s=new t([0]),a=new t([1]);function c(e,t,r,n){var o=i[e];if(void 0===o)throw new Error("hash "+e+" is not supported");this._algo=e,this._securityStrength=o.securityStrength/8,this._outlen=o.outlen/8,this._reseedInterval=281474976710656,this._init(t,r,n)}c.prototype._update=function(e){var t=n(this._algo,this._K).update(this._V).update(s);e&&t.update(e),this._K=t.digest(),this._V=n(this._algo,this._K).update(this._V).digest(),e&&(this._K=n(this._algo,this._K).update(this._V).update(a).update(e).digest(),this._V=n(this._algo,this._K).update(this._V).digest())},c.prototype._init=function(e,r,n){if(e.lengththis._reseedInterval)throw new Error("Reseed is required");r&&0===r.length&&(r=void 0),r&&this._update(r);for(var i=new t(0);i.lengtha?t=e(t):t.length>>13,p=0|s[1],d=8191&p,g=p>>>13,b=0|s[2],m=8191&b,y=b>>>13,v=0|s[3],w=8191&v,A=v>>>13,_=0|s[4],S=8191&_,E=_>>>13,k=0|s[5],x=8191&k,C=k>>>13,I=0|s[6],B=8191&I,T=I>>>13,R=0|s[7],P=8191&R,O=R>>>13,M=0|s[8],N=8191&M,D=M>>>13,K=0|s[9],U=8191&K,j=K>>>13,F=0|a[0],L=8191&F,z=F>>>13,H=0|a[1],q=8191&H,V=H>>>13,G=0|a[2],W=8191&G,Y=G>>>13,J=0|a[3],Z=8191&J,Q=J>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ce=8191&ae,ue=ae>>>13,fe=0|a[8],le=8191&fe,he=fe>>>13,pe=0|a[9],de=8191&pe,ge=pe>>>13;r.length=19,n=Math.imul(l,L),i=Math.imul(l,z);var be=u+n+((8191&(i+=Math.imul(h,L)))<<13);u=(o=Math.imul(h,z))+(i>>>13)+(be>>>26),be&=67108863,n=Math.imul(d,L),i=Math.imul(d,z),i+=Math.imul(g,L),o=Math.imul(g,z),n+=Math.imul(l,q),i+=Math.imul(l,V);var me=u+n+((8191&(i+=Math.imul(h,q)))<<13);u=(o+=Math.imul(h,V))+(i>>>13)+(me>>>26),me&=67108863,n=Math.imul(m,L),i=Math.imul(m,z),i+=Math.imul(y,L),o=Math.imul(y,z),n+=Math.imul(d,q),i+=Math.imul(d,V),i+=Math.imul(g,q),o+=Math.imul(g,V),n+=Math.imul(l,W),i+=Math.imul(l,Y);var ye=u+n+((8191&(i+=Math.imul(h,W)))<<13);u=(o+=Math.imul(h,Y))+(i>>>13)+(ye>>>26),ye&=67108863,n=Math.imul(w,L),i=Math.imul(w,z),i+=Math.imul(A,L),o=Math.imul(A,z),n+=Math.imul(m,q),i+=Math.imul(m,V),i+=Math.imul(y,q),o+=Math.imul(y,V),n+=Math.imul(d,W),i+=Math.imul(d,Y),i+=Math.imul(g,W),o+=Math.imul(g,Y),n+=Math.imul(l,Z),i+=Math.imul(l,Q);var ve=u+n+((8191&(i+=Math.imul(h,Z)))<<13);u=(o+=Math.imul(h,Q))+(i>>>13)+(ve>>>26),ve&=67108863,n=Math.imul(S,L),i=Math.imul(S,z),i+=Math.imul(E,L),o=Math.imul(E,z),n+=Math.imul(w,q),i+=Math.imul(w,V),i+=Math.imul(A,q),o+=Math.imul(A,V),n+=Math.imul(m,W),i+=Math.imul(m,Y),i+=Math.imul(y,W),o+=Math.imul(y,Y),n+=Math.imul(d,Z),i+=Math.imul(d,Q),i+=Math.imul(g,Z),o+=Math.imul(g,Q),n+=Math.imul(l,$),i+=Math.imul(l,ee);var we=u+n+((8191&(i+=Math.imul(h,$)))<<13);u=(o+=Math.imul(h,ee))+(i>>>13)+(we>>>26),we&=67108863,n=Math.imul(x,L),i=Math.imul(x,z),i+=Math.imul(C,L),o=Math.imul(C,z),n+=Math.imul(S,q),i+=Math.imul(S,V),i+=Math.imul(E,q),o+=Math.imul(E,V),n+=Math.imul(w,W),i+=Math.imul(w,Y),i+=Math.imul(A,W),o+=Math.imul(A,Y),n+=Math.imul(m,Z),i+=Math.imul(m,Q),i+=Math.imul(y,Z),o+=Math.imul(y,Q),n+=Math.imul(d,$),i+=Math.imul(d,ee),i+=Math.imul(g,$),o+=Math.imul(g,ee),n+=Math.imul(l,re),i+=Math.imul(l,ne);var Ae=u+n+((8191&(i+=Math.imul(h,re)))<<13);u=(o+=Math.imul(h,ne))+(i>>>13)+(Ae>>>26),Ae&=67108863,n=Math.imul(B,L),i=Math.imul(B,z),i+=Math.imul(T,L),o=Math.imul(T,z),n+=Math.imul(x,q),i+=Math.imul(x,V),i+=Math.imul(C,q),o+=Math.imul(C,V),n+=Math.imul(S,W),i+=Math.imul(S,Y),i+=Math.imul(E,W),o+=Math.imul(E,Y),n+=Math.imul(w,Z),i+=Math.imul(w,Q),i+=Math.imul(A,Z),o+=Math.imul(A,Q),n+=Math.imul(m,$),i+=Math.imul(m,ee),i+=Math.imul(y,$),o+=Math.imul(y,ee),n+=Math.imul(d,re),i+=Math.imul(d,ne),i+=Math.imul(g,re),o+=Math.imul(g,ne),n+=Math.imul(l,oe),i+=Math.imul(l,se);var _e=u+n+((8191&(i+=Math.imul(h,oe)))<<13);u=(o+=Math.imul(h,se))+(i>>>13)+(_e>>>26),_e&=67108863,n=Math.imul(P,L),i=Math.imul(P,z),i+=Math.imul(O,L),o=Math.imul(O,z),n+=Math.imul(B,q),i+=Math.imul(B,V),i+=Math.imul(T,q),o+=Math.imul(T,V),n+=Math.imul(x,W),i+=Math.imul(x,Y),i+=Math.imul(C,W),o+=Math.imul(C,Y),n+=Math.imul(S,Z),i+=Math.imul(S,Q),i+=Math.imul(E,Z),o+=Math.imul(E,Q),n+=Math.imul(w,$),i+=Math.imul(w,ee),i+=Math.imul(A,$),o+=Math.imul(A,ee),n+=Math.imul(m,re),i+=Math.imul(m,ne),i+=Math.imul(y,re),o+=Math.imul(y,ne),n+=Math.imul(d,oe),i+=Math.imul(d,se),i+=Math.imul(g,oe),o+=Math.imul(g,se),n+=Math.imul(l,ce),i+=Math.imul(l,ue);var Se=u+n+((8191&(i+=Math.imul(h,ce)))<<13);u=(o+=Math.imul(h,ue))+(i>>>13)+(Se>>>26),Se&=67108863,n=Math.imul(N,L),i=Math.imul(N,z),i+=Math.imul(D,L),o=Math.imul(D,z),n+=Math.imul(P,q),i+=Math.imul(P,V),i+=Math.imul(O,q),o+=Math.imul(O,V),n+=Math.imul(B,W),i+=Math.imul(B,Y),i+=Math.imul(T,W),o+=Math.imul(T,Y),n+=Math.imul(x,Z),i+=Math.imul(x,Q),i+=Math.imul(C,Z),o+=Math.imul(C,Q),n+=Math.imul(S,$),i+=Math.imul(S,ee),i+=Math.imul(E,$),o+=Math.imul(E,ee),n+=Math.imul(w,re),i+=Math.imul(w,ne),i+=Math.imul(A,re),o+=Math.imul(A,ne),n+=Math.imul(m,oe),i+=Math.imul(m,se),i+=Math.imul(y,oe),o+=Math.imul(y,se),n+=Math.imul(d,ce),i+=Math.imul(d,ue),i+=Math.imul(g,ce),o+=Math.imul(g,ue),n+=Math.imul(l,le),i+=Math.imul(l,he);var Ee=u+n+((8191&(i+=Math.imul(h,le)))<<13);u=(o+=Math.imul(h,he))+(i>>>13)+(Ee>>>26),Ee&=67108863,n=Math.imul(U,L),i=Math.imul(U,z),i+=Math.imul(j,L),o=Math.imul(j,z),n+=Math.imul(N,q),i+=Math.imul(N,V),i+=Math.imul(D,q),o+=Math.imul(D,V),n+=Math.imul(P,W),i+=Math.imul(P,Y),i+=Math.imul(O,W),o+=Math.imul(O,Y),n+=Math.imul(B,Z),i+=Math.imul(B,Q),i+=Math.imul(T,Z),o+=Math.imul(T,Q),n+=Math.imul(x,$),i+=Math.imul(x,ee),i+=Math.imul(C,$),o+=Math.imul(C,ee),n+=Math.imul(S,re),i+=Math.imul(S,ne),i+=Math.imul(E,re),o+=Math.imul(E,ne),n+=Math.imul(w,oe),i+=Math.imul(w,se),i+=Math.imul(A,oe),o+=Math.imul(A,se),n+=Math.imul(m,ce),i+=Math.imul(m,ue),i+=Math.imul(y,ce),o+=Math.imul(y,ue),n+=Math.imul(d,le),i+=Math.imul(d,he),i+=Math.imul(g,le),o+=Math.imul(g,he),n+=Math.imul(l,de),i+=Math.imul(l,ge);var ke=u+n+((8191&(i+=Math.imul(h,de)))<<13);u=(o+=Math.imul(h,ge))+(i>>>13)+(ke>>>26),ke&=67108863,n=Math.imul(U,q),i=Math.imul(U,V),i+=Math.imul(j,q),o=Math.imul(j,V),n+=Math.imul(N,W),i+=Math.imul(N,Y),i+=Math.imul(D,W),o+=Math.imul(D,Y),n+=Math.imul(P,Z),i+=Math.imul(P,Q),i+=Math.imul(O,Z),o+=Math.imul(O,Q),n+=Math.imul(B,$),i+=Math.imul(B,ee),i+=Math.imul(T,$),o+=Math.imul(T,ee),n+=Math.imul(x,re),i+=Math.imul(x,ne),i+=Math.imul(C,re),o+=Math.imul(C,ne),n+=Math.imul(S,oe),i+=Math.imul(S,se),i+=Math.imul(E,oe),o+=Math.imul(E,se),n+=Math.imul(w,ce),i+=Math.imul(w,ue),i+=Math.imul(A,ce),o+=Math.imul(A,ue),n+=Math.imul(m,le),i+=Math.imul(m,he),i+=Math.imul(y,le),o+=Math.imul(y,he),n+=Math.imul(d,de),i+=Math.imul(d,ge);var xe=u+n+((8191&(i+=Math.imul(g,de)))<<13);u=(o+=Math.imul(g,ge))+(i>>>13)+(xe>>>26),xe&=67108863,n=Math.imul(U,W),i=Math.imul(U,Y),i+=Math.imul(j,W),o=Math.imul(j,Y),n+=Math.imul(N,Z),i+=Math.imul(N,Q),i+=Math.imul(D,Z),o+=Math.imul(D,Q),n+=Math.imul(P,$),i+=Math.imul(P,ee),i+=Math.imul(O,$),o+=Math.imul(O,ee),n+=Math.imul(B,re),i+=Math.imul(B,ne),i+=Math.imul(T,re),o+=Math.imul(T,ne),n+=Math.imul(x,oe),i+=Math.imul(x,se),i+=Math.imul(C,oe),o+=Math.imul(C,se),n+=Math.imul(S,ce),i+=Math.imul(S,ue),i+=Math.imul(E,ce),o+=Math.imul(E,ue),n+=Math.imul(w,le),i+=Math.imul(w,he),i+=Math.imul(A,le),o+=Math.imul(A,he),n+=Math.imul(m,de),i+=Math.imul(m,ge);var Ce=u+n+((8191&(i+=Math.imul(y,de)))<<13);u=(o+=Math.imul(y,ge))+(i>>>13)+(Ce>>>26),Ce&=67108863,n=Math.imul(U,Z),i=Math.imul(U,Q),i+=Math.imul(j,Z),o=Math.imul(j,Q),n+=Math.imul(N,$),i+=Math.imul(N,ee),i+=Math.imul(D,$),o+=Math.imul(D,ee),n+=Math.imul(P,re),i+=Math.imul(P,ne),i+=Math.imul(O,re),o+=Math.imul(O,ne),n+=Math.imul(B,oe),i+=Math.imul(B,se),i+=Math.imul(T,oe),o+=Math.imul(T,se),n+=Math.imul(x,ce),i+=Math.imul(x,ue),i+=Math.imul(C,ce),o+=Math.imul(C,ue),n+=Math.imul(S,le),i+=Math.imul(S,he),i+=Math.imul(E,le),o+=Math.imul(E,he),n+=Math.imul(w,de),i+=Math.imul(w,ge);var Ie=u+n+((8191&(i+=Math.imul(A,de)))<<13);u=(o+=Math.imul(A,ge))+(i>>>13)+(Ie>>>26),Ie&=67108863,n=Math.imul(U,$),i=Math.imul(U,ee),i+=Math.imul(j,$),o=Math.imul(j,ee),n+=Math.imul(N,re),i+=Math.imul(N,ne),i+=Math.imul(D,re),o+=Math.imul(D,ne),n+=Math.imul(P,oe),i+=Math.imul(P,se),i+=Math.imul(O,oe),o+=Math.imul(O,se),n+=Math.imul(B,ce),i+=Math.imul(B,ue),i+=Math.imul(T,ce),o+=Math.imul(T,ue),n+=Math.imul(x,le),i+=Math.imul(x,he),i+=Math.imul(C,le),o+=Math.imul(C,he),n+=Math.imul(S,de),i+=Math.imul(S,ge);var Be=u+n+((8191&(i+=Math.imul(E,de)))<<13);u=(o+=Math.imul(E,ge))+(i>>>13)+(Be>>>26),Be&=67108863,n=Math.imul(U,re),i=Math.imul(U,ne),i+=Math.imul(j,re),o=Math.imul(j,ne),n+=Math.imul(N,oe),i+=Math.imul(N,se),i+=Math.imul(D,oe),o+=Math.imul(D,se),n+=Math.imul(P,ce),i+=Math.imul(P,ue),i+=Math.imul(O,ce),o+=Math.imul(O,ue),n+=Math.imul(B,le),i+=Math.imul(B,he),i+=Math.imul(T,le),o+=Math.imul(T,he),n+=Math.imul(x,de),i+=Math.imul(x,ge);var Te=u+n+((8191&(i+=Math.imul(C,de)))<<13);u=(o+=Math.imul(C,ge))+(i>>>13)+(Te>>>26),Te&=67108863,n=Math.imul(U,oe),i=Math.imul(U,se),i+=Math.imul(j,oe),o=Math.imul(j,se),n+=Math.imul(N,ce),i+=Math.imul(N,ue),i+=Math.imul(D,ce),o+=Math.imul(D,ue),n+=Math.imul(P,le),i+=Math.imul(P,he),i+=Math.imul(O,le),o+=Math.imul(O,he),n+=Math.imul(B,de),i+=Math.imul(B,ge);var Re=u+n+((8191&(i+=Math.imul(T,de)))<<13);u=(o+=Math.imul(T,ge))+(i>>>13)+(Re>>>26),Re&=67108863,n=Math.imul(U,ce),i=Math.imul(U,ue),i+=Math.imul(j,ce),o=Math.imul(j,ue),n+=Math.imul(N,le),i+=Math.imul(N,he),i+=Math.imul(D,le),o+=Math.imul(D,he),n+=Math.imul(P,de),i+=Math.imul(P,ge);var Pe=u+n+((8191&(i+=Math.imul(O,de)))<<13);u=(o+=Math.imul(O,ge))+(i>>>13)+(Pe>>>26),Pe&=67108863,n=Math.imul(U,le),i=Math.imul(U,he),i+=Math.imul(j,le),o=Math.imul(j,he),n+=Math.imul(N,de),i+=Math.imul(N,ge);var Oe=u+n+((8191&(i+=Math.imul(D,de)))<<13);u=(o+=Math.imul(D,ge))+(i>>>13)+(Oe>>>26),Oe&=67108863,n=Math.imul(U,de),i=Math.imul(U,ge);var Me=u+n+((8191&(i+=Math.imul(j,de)))<<13);return u=(o=Math.imul(j,ge))+(i>>>13)+(Me>>>26),Me&=67108863,c[0]=be,c[1]=me,c[2]=ye,c[3]=ve,c[4]=we,c[5]=Ae,c[6]=_e,c[7]=Se,c[8]=Ee,c[9]=ke,c[10]=xe,c[11]=Ce,c[12]=Ie,c[13]=Be,c[14]=Te,c[15]=Re,c[16]=Pe,c[17]=Oe,c[18]=Me,0!==u&&(c[19]=u,r.length++),r}},function(e,t,r){"use strict";var n=r(3).Buffer,i=r(141),o=r(275),s=r(276);function a(){this.x=i.fromBuffer(n.from("79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798","hex")),this.y=i.fromBuffer(n.from("483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8","hex")),this.inf=!1,this._precompute()}a.prototype._precompute=function(){for(var e=new o(this.x,this.y),t=new Array(1+Math.ceil(64.25)),r=t[0]=e,n=1;n=u;l--)f=(f<<1)+i[l];c.push(f)}for(var h=new s(null,null,null),p=new s(null,null,null),d=a;d>0;d--){for(var g=0;g=0;f--){for(var l=0;f>=0&&(u[0]=0|a[0][f],u[1]=0|a[1][f],0===u[0]&&0===u[1]);++l,--f);if(f>=0&&(l+=1),c=c.dblp(l),f<0)break;for(var h=0;h<2;h++){var p,d=u[h];0!==d&&(d>0?p=o[h][d>>1]:d<0&&(p=o[h][-d>>1].neg()),c=void 0===p.z?c.mixedAdd(p):c.add(p))}}return c},e.exports=new a},function(e,t,r){"use strict";(function(t){const n=r(64),i=r(230),o={"AES-128":{ivSize:16,keySize:16},"AES-256":{ivSize:16,keySize:32},Blowfish:{ivSize:8,cipherKeySize:32}};e.exports=((e,r,s,a)=>{const c=o[e];if(!c)return a(new Error("unkown cipherType passed"));if(!r)return a(new Error("unkown hashType passed"));const u=c.keySize,f=c.ivSize,l=t.from("key expansion"),h=2*(f+u+20);i.create(r,s,(e,r)=>{if(e)return a(e);r.digest(l,(e,i)=>{if(e)return a(e);let o=[],s=0;n(()=>s{if(t)return e(t);let a=n.length;s+a>h&&(a=h-s),o.push(n),s+=a,r.digest(i,(t,r)=>{if(t)return e(t);i=r,e()})})},function(e){if(e)return a(e);const r=h/2,n=t.concat(o),i=n.slice(0,r),s=n.slice(r,h),c=e=>({iv:e.slice(0,f),cipherKey:e.slice(f,f+u),macKey:e.slice(f+u)});a(null,{k1:c(i),k2:c(s)})})})})})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(527);e.exports=((e,t)=>{n.generateEphmeralKeyPair(e,t)})},function(e,t,r){"use strict";(function(e){const n=r(165)(),i=r(164),o=r(21).bignum,s=r(266),a=s.toBase64,c=s.toBn,u={"P-256":256,"P-384":384,"P-521":521};t.generateEphmeralKeyPair=function(t,r){i(n.subtle.generateKey({name:"ECDH",namedCurve:t},!0,["deriveBits"]).then(r=>{const s=(s,c,f)=>{let l;"function"==typeof c&&(f=c,c=void 0),l=c?n.subtle.importKey("jwk",function(e,t){const r=h(e,t.public);return r.d=a(new o(t.private)),r}(t,c),{name:"ECDH",namedCurve:t},!1,["deriveBits"]):Promise.resolve(r.privateKey);const p=Promise.all([n.subtle.importKey("jwk",h(t,s),{name:"ECDH",namedCurve:t},!1,[]),l]);i(p.then(e=>n.subtle.deriveBits({name:"ECDH",namedCurve:t,public:e[0]},e[1],u[t])).then(t=>e.from(t)),f)};return n.subtle.exportKey("jwk",r.publicKey).then(e=>({key:l(e),genSharedKey:s}))}),r)};const f={"P-256":32,"P-384":48,"P-521":66};function l(t){const r=f[t.crv];return e.concat([e.from([4]),c(t.x).toArrayLike(e,"be",r),c(t.y).toArrayLike(e,"be",r)],1+2*r)}function h(t,r){const n=f[t];if(!r.slice(0,1).equals(e.from([4])))throw new Error("Invalid key format");const i=new o(r.slice(1,n+1)),s=new o(r.slice(1+n));return{kty:"EC",crv:t,x:a(i,n),y:a(s,n),ext:!0}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(25),i={sha1:"sha1","sha2-256":"sha256","sha2-512":"sha512"};e.exports=function(e,t,r,o,s){const a=i[s];if(!a)throw new Error(`Hash '${s}' is unknown or not supported`);const c=n.pkcs5.pbkdf2(e,t,r,o,a);return n.util.encode64(c)}},function(e,t,r){"use strict";(function(t){const n=r(15),i=r(31),o=r(530),s=r(175),a=r(5),c=r(9),u=r(26),f=new Error("Sorry, Not Implemented Yet."),l=u.proto(function(e){if(!(this instanceof l))return new l(e);if(null==e&&(e=""),e instanceof t)this.buffer=o.fromBuffer(e);else if("string"==typeof e||e instanceof String)this.buffer=o.fromString(e);else{if(!(e.buffer&&e.protos&&e.protoCodes))throw new Error("addr must be a string, Buffer, or another Multiaddr");this.buffer=o.fromBuffer(e.buffer)}},{className:"Multiaddr",symbolName:"@multiformats/js-multiaddr/multiaddr"});l.prototype.toString=function(){return o.bufferToString(this.buffer)},l.prototype.toOptions=function(){const e={},t=this.toString().split("/");return e.family="ip4"===t[1]?"ipv4":"ipv6",e.host=t[2],e.transport=t[3],e.port=t[4],e},l.prototype.inspect=function(){return""},l.prototype.protos=function(){return n(this.protoCodes(),function(e){return i(s(e))})},l.prototype.protoCodes=function(){const e=[],t=this.buffer;let r=0;for(;r{if(e[0]===s.names.ipfs.code)return!0})[0][1],c.decode(e)}catch(t){e=null}return e},l.prototype.equals=function(e){return this.buffer.equals(e.buffer)},l.prototype.nodeAddress=function(){if(!this.isThinWaistAddress())throw new Error('Multiaddr must be "thin waist" address for nodeAddress.');const e=this.protoCodes(),t=this.toString().split("/").slice(1);return{family:41===e[0]?"IPv6":"IPv4",address:t[1],port:t[3]}},l.fromNodeAddress=function(e,t){if(!e)throw new Error("requires node address object");if(!t)throw new Error("requires transport protocol");const r="IPv6"===e.family?"ip6":"ip4";return l("/"+[r,e.address,t,e.port].join("/"))},l.prototype.isThinWaistAddress=function(e){const t=(e||this).protos();return 2===t.length&&((4===t[0].code||41===t[0].code)&&(6===t[1].code||17===t[1].code))},l.prototype.fromStupidString=function(e){throw f},l.protocols=s,l.isName=function(e){return!!l.isMultiaddr(e)&&e.protos().some(e=>e.resolvable)},l.resolve=function(e,t){return l.isMultiaddr(e)&&l.isName(e)?t(new Error("not implemented yet")):t(new Error("not a valid name"))},e.exports=l}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(15),i=r(44),o=r(531),s=r(175),a=r(5);function c(e){const t=[],r=e.split("/").slice(1);if(1===r.length&&""===r[0])return[];for(let n=0;n=r.length)throw v("invalid address: "+e);t.push([i,r[n]])}else t.push([i])}return t}function u(e){const t=[];return n(e,function(e){const r=w(e);t.push(r.name),e.length>1&&t.push(e[1])}),"/"+t.join("/")}function f(e){return n(e,function(e){Array.isArray(e)||(e=[e]);const t=w(e);return e.length>1?[t.code,o.toBuffer(t.code,e[1])]:[t.code]})}function l(e){return n(e,function(e){const t=w(e);return e.length>1?[t.code,o.toString(t.code,e[1])]:[t.code]})}function h(e){return b(t.concat(n(e,function(e){const r=w(e);let n=t.from(a.encode(r.code));return e.length>1&&(n=t.concat([n,e[1]])),n})))}function p(e,t){if(e.size>0)return e.size/8;if(0===e.size)return 0;return a.decode(t)+a.decode.bytes}function d(e){const t=[];let r=0;for(;re.length)throw v("Invalid address buffer: "+e.toString("hex"));t.push([n,c])}return t}function g(e){return h(f(c(e=y(e))))}function b(e){const r=m(e);if(r)throw r;return t.from(e)}function m(e){try{d(e)}catch(e){return e}}function y(e){return"/"+i(e.trim().split("/")).join("/")}function v(e){return new Error("Error parsing address: "+e)}function w(e){return s(e[0])}e.exports={stringToStringTuples:c,stringTuplesToString:u,tuplesToStringTuples:l,stringTuplesToTuples:f,bufferToTuples:d,tuplesToBuffer:h,bufferToString:function(e){return u(l(d(e)))},stringToBuffer:g,fromString:function(e){return g(e)},fromBuffer:b,validateBuffer:m,isValidBuffer:function(e){return void 0===m(e)},cleanPath:y,ParseError:v,protoFromTuple:w,sizeForAddr:p}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(45),i=r(46),o=r(175),s=r(9),a=r(5);function c(e,r){return r instanceof t?c.toString(e,r):c.toBuffer(e,r)}function u(e){if(!e.isValid())throw new Error("invalid ip address");return n.toBuffer(e.address)}e.exports=c,c.toString=function(e,t){switch((e=o(e)).code){case 4:case 41:return n.toString(t);case 6:case 17:case 33:case 132:return function(e){return e.readUInt16BE(0)}(t);case 54:case 55:case 56:return function(e){const t=a.decode(e);if((e=e.slice(a.decode.bytes)).length!==t)throw new Error("inconsistent lengths");return e.toString()}(t);case 421:return function(e){const t=a.decode(e),r=e.slice(a.decode.bytes);if(r.length!==t)throw new Error("inconsistent lengths");return s.encode(r)}(t);default:return t.toString("hex")}},c.toBuffer=function(e,r){switch((e=o(e)).code){case 4:return u(new i.Address4(r));case 41:return u(new i.Address6(r));case 6:case 17:case 33:case 132:return function(e){const r=t.alloc(2);return r.writeUInt16BE(e,0),r}(parseInt(r,10));case 54:case 55:case 56:return function(e){const r=t.from(e),n=t.from(a.encode(r.length));return t.concat([n,r])}(r);case 421:return function(e){const r=t.from(s.decode(e)),n=t.from(a.encode(r.length));return t.concat([n,r])}(r);default:return t.from(r,"hex")}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(278).ensureMultiaddr,i=r(112);e.exports=class{constructor(e){this._multiaddrs=e||[],this._observedMultiaddrs=[]}add(e){e=n(e),this.has(e)||this._multiaddrs.push(e)}addSafe(e){e=n(e),this._observedMultiaddrs.some((t,r)=>{if(t.equals(e))return this.add(e),this._observedMultiaddrs.splice(r,1),!0})||this._observedMultiaddrs.push(e)}toArray(){return this._multiaddrs.slice()}get size(){return this._multiaddrs.length}forEach(e){return this._multiaddrs.forEach(e)}filterBy(e){return"object"!=typeof e||"function"!=typeof e.matches||"function"!=typeof e.partialMatch||"function"!=typeof e.toString?[]:this._multiaddrs.filter(t=>e.matches(t))}has(e){return e=n(e),this._multiaddrs.some(t=>t.equals(e))}delete(e){e=n(e),this._multiaddrs.some((t,r)=>{if(t.equals(e))return this._multiaddrs.splice(r,1),!0})}replace(e,t){Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]),e.forEach(e=>this.delete(e)),t.forEach(e=>this.add(e))}clear(){this._multiaddrs=[]}distinct(){return i(this._multiaddrs,e=>[e.toOptions().port,e.toOptions().transport].join())}}},function(e,t,r){"use strict";(function(n){const i=r(24),o=r(534),s=r(20),a=r(10);class c{constructor(e,t,r){s(n.isBuffer(e),"invalid id provided"),t&&r&&s(t.public.bytes.equals(r.bytes),"inconsistent arguments"),this._id=e,this._idB58String=i.toB58String(this.id),this._privKey=t,this._pubKey=r}get id(){return this._id}set id(e){throw new Error("Id is immutable")}get privKey(){return this._privKey}set privKey(e){this._privKey=e}get pubKey(){return this._pubKey?this._pubKey:this._privKey?this._privKey.public:void 0}set pubKey(e){this._pubKey=e}marshalPubKey(){if(this.pubKey)return o.keys.marshalPublicKey(this.pubKey)}marshalPrivKey(){if(this.privKey)return o.keys.marshalPrivateKey(this.privKey)}toPrint(){let e=this.toB58String();e.startsWith("Qm")&&(e=e.slice(2));let t=6;return e.length"}toJSON(){return{id:this.toB58String(),privKey:u(this.marshalPrivKey()),pubKey:u(this.marshalPubKey())}}toHexString(){return i.toHexString(this.id)}toBytes(){return this.id}toB58String(){return this._idB58String}isEqual(e){if(n.isBuffer(e))return this.id.equals(e);if(e.id)return this.id.equals(e.id);throw new Error("not valid Id")}isValid(e){this.privKey&&this.privKey.public&&this.privKey.public.bytes&&n.isBuffer(this.pubKey.bytes)&&this.privKey.public.bytes.equals(this.pubKey.bytes)?e():e(new Error("Keys not match"))}}function u(e){if(e)return e.toString("base64")}(t=e.exports=c).create=function(e,t){"function"==typeof e&&(t=e,e={}),(e=e||{}).bits=e.bits||2048,a([t=>o.keys.generateKeyPair("RSA",e.bits,t),(e,t)=>e.public.hash((r,n)=>{t(r,n,e)})],(e,r,n)=>{if(e)return t(e);t(null,new c(r,n))})},t.createFromHexString=function(e){return new c(i.fromHexString(e))},t.createFromBytes=function(e){return new c(e)},t.createFromB58String=function(e){return new c(i.fromB58String(e))},t.createFromPubKey=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let r;try{let i=e;if("string"==typeof i&&(i=n.from(e,"base64")),!n.isBuffer(i))throw new Error("Supplied key is neither a base64 string nor a buffer");r=o.keys.unmarshalPublicKey(i)}catch(e){return t(e)}r.hash((e,n)=>{if(e)return t(e);t(null,new c(n,null,r))})},t.createFromPrivKey=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let r=e;try{if("string"==typeof r&&(r=n.from(e,"base64")),!n.isBuffer(r))throw new Error("Supplied key is neither a base64 string nor a buffer")}catch(e){return t(e)}a([e=>o.keys.unmarshalPrivateKey(r,e),(e,t)=>e.public.hash((r,n)=>{t(r,n,e)})],(e,r,n)=>{if(e)return t(e);t(null,new c(r,n,n.public))})},t.createFromJSON=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let r,s,u,f;try{r=i.fromB58String(e.id),s=e.privKey&&n.from(e.privKey,"base64"),u=e.pubKey&&n.from(e.pubKey,"base64"),f=u&&o.keys.unmarshalPublicKey(u)}catch(e){return t(e)}s?a([e=>o.keys.unmarshalPrivateKey(s,e),(e,t)=>e.public.hash((r,n)=>{t(r,n,e)}),(e,t,r)=>{f?f.hash((n,i)=>{r(n,e,t,i)}):r(null,e,t)}],(e,n,i,o)=>e?t(e):f&&!n.equals(o)?t(new Error("Public and private key do not match")):r&&!n.equals(r)?t(new Error("Id and private key do not match")):void t(null,new c(r,i,f))):t(null,new c(r,null,f))},t.isPeerId=function(e){return Boolean("object"==typeof e&&e._id&&e._idB58String)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(279),i=r(536),o=r(538);(t=e.exports).aes=i,t.hmac=n,t.keys=o,t.randomBytes=r(284),t.pbkdf2=r(549)},function(e,t,r){"use strict";e.exports={SHA1:20,SHA256:32,SHA512:64}},function(e,t,r){"use strict";const n=r(537),i={16:"aes-128-ctr",32:"aes-256-ctr"};t.create=function(e,t,r){const o=i[e.length];if(!o)return r(new Error("Invalid key length"));const s=n.createCipheriv(o,e,t),a=n.createDecipheriv(o,e,t);r(null,{encrypt(e,t){t(null,s.update(e))},decrypt(e,t){t(null,a.update(e))}})}},function(e,t,r){"use strict";const n=r(78);e.exports={createCipheriv:n.createCipheriv,createDecipheriv:n.createDecipheriv}},function(e,t,r){"use strict";(function(n){const i=r(19)(r(178)),o=r(25);t=e.exports;const s={rsa:r(539),ed25519:r(544),secp256k1:r(84)(i,r(284))};function a(e){return void 0!==s[e.toLowerCase()]}t.supportedKeys=s,t.keysPBM=i,t.keyStretcher=r(546),t.generateEphemeralKeyPair=r(547),t.generateKeyPair=((e,t,r)=>{let n=s[e.toLowerCase()];if(!n)return r(new Error("invalid or unsupported key type"));n.generateKeyPair(t,r)}),t.generateKeyPairFromSeed=((e,t,r,n)=>{let i=s[e.toLowerCase()];return i?"ed25519"!==e.toLowerCase()?n(new Error("Seed key derivation is unimplemented for RSA or secp256k1")):void i.generateKeyPairFromSeed(t,r,n):n(new Error("invalid or unsupported key type"))}),t.unmarshalPublicKey=(e=>{const t=i.PublicKey.decode(e),r=t.Data;switch(t.Type){case i.KeyType.RSA:return s.rsa.unmarshalRsaPublicKey(r);case i.KeyType.Ed25519:return s.ed25519.unmarshalEd25519PublicKey(r);case i.KeyType.Secp256k1:if(s.secp256k1)return s.secp256k1.unmarshalSecp256k1PublicKey(r);throw new Error("secp256k1 support requires libp2p-crypto-secp256k1 package");default:throw new Error("invalid or unsupported key type")}}),t.marshalPublicKey=((e,t)=>{if(!a(t=(t||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type");return e.bytes}),t.unmarshalPrivateKey=((e,t)=>{let r;try{r=i.PrivateKey.decode(e)}catch(e){return t(e)}const n=r.Data;switch(r.Type){case i.KeyType.RSA:return s.rsa.unmarshalRsaPrivateKey(n,t);case i.KeyType.Ed25519:return s.ed25519.unmarshalEd25519PrivateKey(n,t);case i.KeyType.Secp256k1:return s.secp256k1?s.secp256k1.unmarshalSecp256k1PrivateKey(n,t):t(new Error("secp256k1 support requires libp2p-crypto-secp256k1 package"));default:t(new Error("invalid or unsupported key type"))}}),t.marshalPrivateKey=((e,t)=>{if(!a(t=(t||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type");return e.bytes}),t.import=((e,t,r)=>{try{const i=o.pki.decryptRsaPrivateKey(e,t);if(null===i)throw new Error("Cannot read the key, most likely the password is wrong or not a RSA key");let a=o.asn1.toDer(o.pki.privateKeyToAsn1(i));return a=n.from(a.getBytes(),"binary"),s.rsa.unmarshalRsaPrivateKey(a,r)}catch(e){r(e)}})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(280),i=r(19),o=r(9),s=r(282),a=i(r(178)),c=r(25),u=r(7);class f{constructor(e){this._key=e}verify(e,t,r){h(r),s.hashAndVerify(this._key,t,e,r)}marshal(){return s.utils.jwkToPkix(this._key)}get bytes(){return a.PublicKey.encode({Type:a.KeyType.RSA,Data:this.marshal()})}encrypt(e){return this._key.encrypt(e,"RSAES-PKCS1-V1_5")}equals(e){return this.bytes.equals(e.bytes)}hash(e){h(e),n(this.bytes,"sha2-256",e)}}class l{constructor(e,t){this._key=e,this._publicKey=t}genSecret(){return s.getRandomValues(new Uint8Array(16))}sign(e,t){h(t),s.hashAndSign(this._key,e,t)}get public(){if(!this._publicKey)throw new Error("public key not provided");return new f(this._publicKey)}decrypt(e,t){s.decrypt(this._key,e,t)}marshal(){return s.utils.jwkToPkcs1(this._key)}get bytes(){return a.PrivateKey.encode({Type:a.KeyType.RSA,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){h(e),n(this.bytes,"sha2-256",e)}id(e){this.public.hash((t,r)=>{if(t)return e(t);e(null,o.encode(r))})}export(e,t,r){"function"==typeof t&&(r=t,t=e,e="pkcs-8"),h(r),u(()=>{let n=null,i=null;try{const r=new c.util.ByteBuffer(this.marshal()),o=c.asn1.fromDer(r),s=c.pki.privateKeyFromAsn1(o);if("pkcs-8"===e){const e={algorithm:"aes256",count:1e4,saltSize:16,prfAlgorithm:"sha512"};i=c.pki.encryptRsaPrivateKey(s,t,e)}else n=new Error(`Unknown export format '${e}'`)}catch(e){n=e}r(n,i)})}}function h(e){if("function"!=typeof e)throw new Error("callback is required")}e.exports={RsaPublicKey:f,RsaPrivateKey:l,unmarshalRsaPublicKey:function(e){const t=s.utils.pkixToJwk(e);return new f(t)},unmarshalRsaPrivateKey:function(e,t){const r=s.utils.pkcs1ToJwk(e);s.unmarshalPrivateKey(r,(e,r)=>{if(e)return t(e);t(null,new l(r.privateKey,r.publicKey))})},generateKeyPair:function(e,t){s.generateKey(e,(e,r)=>{if(e)return t(e);t(null,new l(r.privateKey,r.publicKey))})},fromJwk:function(e,t){s.unmarshalPrivateKey(e,(e,r)=>{if(e)return t(e);t(null,new l(r.privateKey,r.publicKey))})}}},function(e,t,r){"use strict";(function(t){const n=r(55),i=r(56),o=r(281),s=r(541),a=o.toCallback,c=o.toBuf,u=o.fromString,f=o.fromNumberTo32BitBuf;e.exports={sha1:s.sha1,sha2256:s.sha2256,sha2512:s.sha2512,sha3512:a(c(n.sha3_512)),sha3384:a(c(n.sha3_384)),sha3256:a(c(n.sha3_256)),sha3224:a(c(n.sha3_224)),shake128:a(c(n.shake_128,256)),shake256:a(c(n.shake_256,512)),keccak224:a(c(n.keccak_224)),keccak256:a(c(n.keccak_256)),keccak384:a(c(n.keccak_384)),keccak512:a(c(n.keccak_512)),murmur3128:a(c(u(i.x64.hash128))),murmur332:a(f(u(i.x86.hash32))),addBlake:r(542),dblSha2256:(e,r)=>{s.sha2256(e,(e,n)=>{e&&r(e),s.sha2256(t.from(n),r)})}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(57),i=function(){if(self.crypto)return self.crypto.subtle||self.crypto.webkitSubtle;if(self.msCrypto)return self.msCrypto.subtle}();function o(e){if(!i)throw new Error("Please use a browser with webcrypto support");return(r,o)=>{const s=i.digest({name:e},r);if("function"!=typeof s.then)return s.onerror=(()=>{o(new Error(`hashing data using ${e}`))}),void(s.oncomplete=(e=>{o(null,e.target.result)}));n(s.then(e=>t.from(new Uint8Array(e))),o)}}e.exports={sha1:function(e,t){o("SHA-1")(e,t)},sha2256:function(e,t){o("SHA-256")(e,t)},sha2512:function(e,t){o("SHA-512")(e,t)}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(58),i=r(281).toCallback,o={init:n.blake2bInit,update:n.blake2bUpdate,digest:n.blake2bFinal},s={init:n.blake2sInit,update:n.blake2sUpdate,digest:n.blake2sFinal},a=(e,r)=>i(n=>{const i=r.init(e,null);return r.update(i,n),t.from(r.digest(i))});e.exports=(e=>{for(let t=0;t<64;t++)e[45569+t]=a(t+1,o);for(let t=0;t<32;t++)e[45633+t]=a(t+1,s)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(21),i=r(283),o=i.toBase64,s=i.toBn,a=n.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}),c=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid({"1.2.840.113549.1.1.1":"rsa"}),this.key("none").optional().null_(),this.key("curve").optional().objid(),this.key("params").optional().seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()))}),u=n.define("RSAPublicKey",function(){this.seq().obj(this.key("algorithm").use(c),this.key("subjectPublicKey").bitstr())}),f=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});t.pkcs1ToJwk=function(e){const t=a.decode(e,"der");return{kty:"RSA",n:o(t.modulus),e:o(t.publicExponent),d:o(t.privateExponent),p:o(t.prime1),q:o(t.prime2),dp:o(t.exponent1),dq:o(t.exponent2),qi:o(t.coefficient),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkcs1=function(e){return a.encode({version:0,modulus:s(e.n),publicExponent:s(e.e),privateExponent:s(e.d),prime1:s(e.p),prime2:s(e.q),exponent1:s(e.dp),exponent2:s(e.dq),coefficient:s(e.qi)},"der")},t.pkixToJwk=function(e){const t=u.decode(e,"der"),r=f.decode(t.subjectPublicKey.data,"der");return{kty:"RSA",n:o(r.modulus),e:o(r.publicExponent),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkix=function(e){return u.encode({algorithm:{algorithm:"rsa",none:null},subjectPublicKey:{data:f.encode({modulus:s(e.n),publicExponent:s(e.e)},"der")}},"der")}},function(e,t,r){"use strict";(function(t){const n=r(280),i=r(19),o=r(9),s=r(545),a=i(r(178));class c{constructor(e){this._key=l(e,s.publicKeyLength)}verify(e,t,r){f(r),s.hashAndVerify(this._key,t,e,r)}marshal(){return t.from(this._key)}get bytes(){return a.PublicKey.encode({Type:a.KeyType.Ed25519,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){f(e),n(this.bytes,"sha2-256",e)}}class u{constructor(e,t){this._key=l(e,s.privateKeyLength),this._publicKey=l(t,s.publicKeyLength)}sign(e,t){f(t),s.hashAndSign(this._key,e,t)}get public(){if(!this._publicKey)throw new Error("public key not provided");return new c(this._publicKey)}marshal(){return t.concat([t.from(this._key),t.from(this._publicKey)])}get bytes(){return a.PrivateKey.encode({Type:a.KeyType.Ed25519,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){f(e),n(this.bytes,"sha2-256",e)}id(e){this.public.hash((t,r)=>{if(t)return e(t);e(null,o.encode(r))})}}function f(e){if("function"!=typeof e)throw new Error("callback is required")}function l(e,r){if(t.isBuffer(e)&&(e=new Uint8Array(e)),!(e instanceof Uint8Array)||e.length!==r)throw new Error("Key must be a Uint8Array or Buffer of length "+r);return e}e.exports={Ed25519PublicKey:c,Ed25519PrivateKey:u,unmarshalEd25519PrivateKey:function(e,t){try{e=l(e,s.privateKeyLength+s.publicKeyLength)}catch(e){return t(e)}const r=e.slice(0,s.privateKeyLength),n=e.slice(s.privateKeyLength,e.length);t(null,new u(r,n))},unmarshalEd25519PublicKey:function(e){return e=l(e,s.publicKeyLength),new c(e)},generateKeyPair:function(e,t){void 0===t&&"function"==typeof e&&(t=e),s.generateKey((e,r)=>{if(e)return t(e);let n;try{n=new u(r.secretKey,r.publicKey)}catch(e){return void t(e)}t(null,n)})},generateKeyPairFromSeed:function(e,t,r){void 0===r&&"function"==typeof t&&(r=t),s.generateKeyFromSeed(e,(e,t)=>{if(e)return r(e);let n;try{n=new u(t.secretKey,t.publicKey)}catch(e){return void r(e)}r(null,n)})}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(83),i=r(7);t.publicKeyLength=n.sign.publicKeyLength,t.privateKeyLength=n.sign.secretKeyLength,t.generateKey=function(e){i(()=>{let t;try{t=n.sign.keyPair()}catch(t){return e(t)}e(null,t)})},t.generateKeyFromSeed=function(e,t){i(()=>{let r;try{r=n.sign.keyPair.fromSeed(e)}catch(e){return t(e)}t(null,r)})},t.hashAndSign=function(t,r,o){i(()=>{o(null,e.from(n.sign.detached(r,t)))})},t.hashAndVerify=function(e,t,r,o){i(()=>{let i;try{i=n.sign.detached.verify(r,t,e)}catch(e){return o(e)}o(null,i)})}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(64),i=r(279),o={"AES-128":{ivSize:16,keySize:16},"AES-256":{ivSize:16,keySize:32},Blowfish:{ivSize:8,cipherKeySize:32}};e.exports=((e,r,s,a)=>{const c=o[e];if(!c)return a(new Error("unkown cipherType passed"));if(!r)return a(new Error("unkown hashType passed"));const u=c.keySize,f=c.ivSize,l=t.from("key expansion"),h=2*(f+u+20);i.create(r,s,(e,r)=>{if(e)return a(e);r.digest(l,(e,i)=>{if(e)return a(e);let o=[],s=0;n(()=>s{if(t)return e(t);let a=n.length;s+a>h&&(a=h-s),o.push(n),s+=a,r.digest(i,(t,r)=>{if(t)return e(t);i=r,e()})})},function(e){if(e)return a(e);const r=h/2,n=t.concat(o),i=n.slice(0,r),s=n.slice(r,h),c=e=>({iv:e.slice(0,f),cipherKey:e.slice(f,f+u),macKey:e.slice(f+u)});a(null,{k1:c(i),k2:c(s)})})})})})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(548);e.exports=((e,t)=>{n.generateEphmeralKeyPair(e,t)})},function(e,t,r){"use strict";(function(e){const n=r(177)(),i=r(176),o=r(21).bignum,s=r(283),a=s.toBase64,c=s.toBn,u={"P-256":256,"P-384":384,"P-521":521};t.generateEphmeralKeyPair=function(t,r){i(n.subtle.generateKey({name:"ECDH",namedCurve:t},!0,["deriveBits"]).then(r=>{const s=(s,c,f)=>{let l;"function"==typeof c&&(f=c,c=void 0),l=c?n.subtle.importKey("jwk",function(e,t){const r=h(e,t.public);return r.d=a(new o(t.private)),r}(t,c),{name:"ECDH",namedCurve:t},!1,["deriveBits"]):Promise.resolve(r.privateKey);const p=Promise.all([n.subtle.importKey("jwk",h(t,s),{name:"ECDH",namedCurve:t},!1,[]),l]);i(p.then(e=>n.subtle.deriveBits({name:"ECDH",namedCurve:t,public:e[0]},e[1],u[t])).then(t=>e.from(t)),f)};return n.subtle.exportKey("jwk",r.publicKey).then(e=>({key:l(e),genSharedKey:s}))}),r)};const f={"P-256":32,"P-384":48,"P-521":66};function l(t){const r=f[t.crv];return e.concat([e.from([4]),c(t.x).toArrayLike(e,"be",r),c(t.y).toArrayLike(e,"be",r)],1+2*r)}function h(t,r){const n=f[t];if(!r.slice(0,1).equals(e.from([4])))throw new Error("Invalid key format");const i=new o(r.slice(1,n+1)),s=new o(r.slice(1+n));return{kty:"EC",crv:t,x:a(i,n),y:a(s,n),ext:!0}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(25),i={sha1:"sha1","sha2-256":"sha256","sha2-512":"sha512"};e.exports=function(e,t,r,o,s){const a=i[s];if(!a)throw new Error(`Hash '${s}' is unknown or not supported`);const c=n.pkcs5.pbkdf2(e,t,r,o,a);return n.util.encode64(c)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return Object.assign((0,n.default)(e,t),(0,i.default)(e,t),(0,o.default)(e,t),(0,s.default)(e,t),(0,a.default)(e,t),(0,c.default)(e,t),(0,u.default)(e,t),(0,f.default)(e,t),(0,l.default)(e,t),(0,h.default)(e,t),(0,p.default)(e,t),(0,d.default)(e,t))};var n=g(r(551)),i=g(r(566)),o=g(r(567)),s=g(r(568)),a=g(r(569)),c=g(r(570)),u=g(r(571)),f=g(r(572)),l=g(r(573)),h=g(r(574)),p=g(r(575)),d=g(r(576));function g(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{add:(0,n.expose)("ipfs.files.add",(0,i.pre)(function(){for(var e=arguments.length,r=Array(e),n=0;ne?n(!0):void n(null,t++)}}},function(e,t,r){"use strict";e.exports=function(e){return e=e||Math.random,function(t,r){return t?r&&r(t):r(null,e())}}},function(e,t,r){"use strict";e.exports={drain:r(113),onEnd:r(322),log:r(557),find:r(558),reduce:r(179),collect:r(72),concat:r(559)}},function(e,t,r){"use strict";var n=r(113);e.exports=function(e){return n(function(e){console.log(e)},e)}},function(e,t,r){"use strict";function n(e){return e}var i=r(114),o=r(113);e.exports=function(e,t){var r=!1;return t?e=i(e)||n:(t=e,e=n),o(function(n){if(e(n))return r=!0,t(null,n),!1},function(e){r||t(!0===e?null:e,null)})}},function(e,t,r){"use strict";var n=r(179);e.exports=function(e){return n(function(e,t){return e+t},"",e)}},function(e,t,r){"use strict";e.exports={map:r(98),asyncMap:r(99),filter:r(73),filterNot:r(561),through:r(323),take:r(562),unique:r(287),nonUnique:r(563),flatten:r(195)}},function(e,t,r){"use strict";var n=r(286),i=r(73);e.exports=function(e){return e=n(e),i(function(t){return!e(t)})}},function(e,t,r){"use strict";e.exports=function(e,t){var r=(t=t||{}).last||!1,n=!1;if("number"==typeof e){r=!0;var i=e;e=function(){return--i}}return function(t){function i(e){t(!0,function(t){r=!1,e(t||!0)})}return function(o,s){n&&!o?r?i(s):s(n):(n=o)?t(n,s):t(null,function(t,o){(n=n||t)?s(n):e(o)?s(null,o):(n=!0,r?s(null,o):i(s))})}}}},function(e,t,r){"use strict";var n=r(287);e.exports=function(e){return n(e,!0)}},function(e,t,r){const{caller:n}=r(1),{post:i}=r(2);e.exports=function(e,t){const r=i(n(e,t),t&&t.post);return(e,t)=>{e&&!0!==e&&(e=Object.assign({message:e.message,stack:void 0},e.output&&e.output.payload)),r(e).then(e=>t(e.end,e.data)).catch(t)}}},function(e,t,r){const{expose:n}=r(1),{post:i}=r(2);e.exports=function(e,t){return function(r){const o=n(e,i(e=>new Promise((t,n)=>{e&&!0!==e&&(e=Object.assign(new Error,e)),r(e,(e,r)=>{if(e)return!0===e?t({end:e}):n(e),o.close();t({end:e,data:r})})}),t&&t.post),t)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{cat:(0,n.expose)("ipfs.files.cat",(0,i.pre)((0,u.preBufferFromJson)(0),(0,c.preCidFromJson)(0),t.pre("files.cat"),(0,i.post)(function(){var t;return(t=e().files).cat.apply(t,arguments)},u.bufferToJson)),t),catPullStream:(0,n.expose)("ipfs.files.catPullStream",(0,i.pre)((0,u.preBufferFromJson)(0),(0,c.preCidFromJson)(0),t.pre("files.catPullStream"),(0,i.post)(function(){var t;return(t=e().files).catPullStream.apply(t,arguments)},function(e){return new Promise(function(r){var n=(0,a.default)();(0,o.default)(e,s.default.sink(n,Object.assign({},t,{post:function(e){return(0,u.isBuffer)(e.data)&&(e.data=(0,u.bufferToJson)(e.data)),e}}))),r((0,f.functionToJson)(n))})})),t)}};var n=r(1),i=r(2),o=l(r(14)),s=l(r(33)),a=l(r(42)),c=r(28),u=r(17),f=r(50);function l(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{cp:(0,n.expose)("ipfs.files.cp",(0,i.pre)(t.pre("files.cp"),(0,i.post)(function(){var t;return(t=e().files).cp.apply(t,arguments)},function(){return null})),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{flush:(0,n.expose)("ipfs.files.flush",(0,i.pre)(t.pre("files.flush"),(0,i.post)(function(){var t;return(t=e().files).flush.apply(t,arguments)},function(){return null})),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{get:(0,n.expose)("ipfs.files.get",(0,i.pre)((0,u.preBufferFromJson)(0),(0,c.preCidFromJson)(0),t.pre("files.get"),(0,i.post)(function(){var t;return(t=e().files).get.apply(t,arguments)},function(e){return e.map(function(e){return e.content&&(e.content=(0,u.bufferToJson)(e.content)),e})})),t),getPullStream:(0,n.expose)("ipfs.files.getPullStream",(0,i.pre)((0,u.preBufferFromJson)(0),(0,c.preCidFromJson)(0),t.pre("files.getPullStream"),(0,i.post)(function(){var t;return(t=e().files).getPullStream.apply(t,arguments)},function(e){return new Promise(function(r){var n=(0,a.default)();(0,o.default)(e,o.default.map(function(e){if(e.content){var r=(0,a.default)();(0,o.default)(e.content,s.default.sink(r,Object.assign({},t,{post:function(e){return(0,u.isBuffer)(e.data)&&(e.data=(0,u.bufferToJson)(e.data)),e}}))),e.content=(0,f.functionToJson)(r)}return e}),s.default.sink(n,t)),r((0,f.functionToJson)(n))})})),t)}};var n=r(1),i=r(2),o=l(r(14)),s=l(r(33)),a=l(r(42)),c=r(28),u=r(17),f=r(50);function l(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{ls:(0,n.expose)("ipfs.files.ls",(0,i.pre)(t.pre("files.ls"),function(){var t;return(t=e().files).ls.apply(t,arguments)}),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{mkdir:(0,n.expose)("ipfs.files.mkdir",(0,i.pre)(t.pre("files.mkdir"),(0,i.post)(function(){var t;return(t=e().files).mkdir.apply(t,arguments)},function(){return null})),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{mv:(0,n.expose)("ipfs.files.mv",(0,i.pre)(t.pre("files.mv"),(0,i.post)(function(){var t;return(t=e().files).mv.apply(t,arguments)},function(){return null})),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{read:(0,n.expose)("ipfs.files.read",(0,i.pre)(t.pre("files.read"),(0,i.post)(function(){var t;return(t=e().files).read.apply(t,arguments)},c.bufferToJson)),t),readPullStream:(0,n.expose)("ipfs.files.readPullStream",(0,i.pre)(t.pre("files.readPullStream"),(0,i.post)(function(){var t;return(t=e().files).readPullStream.apply(t,arguments)},function(e){return new Promise(function(r){var n=(0,o.default)();(0,s.default)(e,a.default.sink(n,Object.assign({},t,{post:function(e){return(0,c.isBuffer)(e.data)&&(e.data=(0,c.bufferToJson)(e.data)),e}}))),r((0,u.functionToJson)(n))})})),t)}};var n=r(1),i=r(2),o=f(r(42)),s=f(r(14)),a=f(r(33)),c=r(17),u=r(50);function f(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{rm:(0,n.expose)("ipfs.files.rm",(0,i.pre)(t.pre("files.rm"),(0,i.post)(function(){var t;return(t=e().files).rm.apply(t,arguments)},function(){return null})),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{stat:(0,n.expose)("ipfs.files.stat",(0,i.pre)(t.pre("files.stat"),function(){var t;return(t=e().files).stat.apply(t,arguments)}),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{write:(0,n.expose)("ipfs.files.write",(0,i.pre)((0,o.preBufferFromJson)(1),t.pre("files.write"),function(){var t;return(t=e().files).write.apply(t,arguments)}),t)}};var n=r(1),i=r(2),o=r(17)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{export:(0,n.expose)("ipfs.key.export",(0,i.pre)(t.pre("key.export"),function(){var t;return(t=e().key).export.apply(t,arguments)}),t),gen:(0,n.expose)("ipfs.key.gen",(0,i.pre)(t.pre("key.gen"),function(){var t;return(t=e().key).gen.apply(t,arguments)}),t),import:(0,n.expose)("ipfs.key.import",(0,i.pre)(t.pre("key.import"),function(){var t;return(t=e().key).import.apply(t,arguments)}),t),list:(0,n.expose)("ipfs.key.list",(0,i.pre)(t.pre("key.list"),function(){return e().key.list()}),t),rename:(0,n.expose)("ipfs.key.rename",(0,i.pre)(t.pre("key.rename"),function(){var t;return(t=e().key).rename.apply(t,arguments)}),t),rm:(0,n.expose)("ipfs.key.rm",(0,i.pre)(t.pre("key.rm"),function(){var t;return(t=e().key).rm.apply(t,arguments)}),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{ls:(0,n.expose)("ipfs.ls",(0,i.pre)((0,u.preBufferFromJson)(0),(0,c.preCidFromJson)(0),t.pre("ls"),function(){var t;return(t=e()).ls.apply(t,arguments)}),t),lsPullStream:(0,n.expose)("ipfs.lsPullStream",(0,i.pre)((0,u.preBufferFromJson)(0),(0,c.preCidFromJson)(0),t.pre("lsPullStream"),(0,i.post)(function(){var t;return(t=e()).lsPullStream.apply(t,arguments)},function(e){return new Promise(function(r){var n=(0,a.default)();(0,o.default)(e,s.default.sink(n,t)),r((0,f.functionToJson)(n))})})),t)}};var n=r(1),i=r(2),o=l(r(14)),s=l(r(33)),a=l(r(42)),c=r(28),u=r(17),f=r(50);function l(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{publish:(0,n.expose)("ipfs.name.publish",(0,i.pre)(t.pre("name.publish"),function(){var t;return(t=e().name).publish.apply(t,arguments)}),t),resolve:(0,n.expose)("ipfs.name.resolve",(0,i.pre)(t.pre("name.resolve"),function(){var t;return(t=e().name).resolve.apply(t,arguments)}),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{new:(0,n.expose)("ipfs.object.new",(0,i.pre)(t.pre("object.new"),(0,i.post)(function(){var t;return(t=e().object).new.apply(t,arguments)},o.dagNodeToJson)),t),put:(0,n.expose)("ipfs.object.put",(0,i.pre)((0,o.preDagNodeFromJson)(0),(0,a.preBufferFromJson)(0),function(){for(var e=arguments.length,t=Array(e),r=0;re.length>0),(e=[""].concat(e.map(e=>o(e)))).join("/")}}},function(e,t,r){var n=r(746),i=r(747);e.exports=function(e,t,r){var o=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||n)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||i(s)}},function(e,t,r){"use strict";const n=r(14),i=r(180),o=r(200),s=r(316),a=r(625);t.asyncFilter=function(e){let t,r,n=!1;return function(i){return function o(s,a){if(r)return a(r);s?(r=s,i(s,n?()=>{n?t=a:a(s)}:a)):i(null,(i,s)=>{i?a(i):r?a(r):(n=!0,e(s,(e,i)=>{n=!1,r?(a(r),t(r)):e?o(e,a):i?a(null,s):o(null,a)}))})}}},t.asyncSort=function(e){const t=i(),r=n.collect((r,i)=>{if(r)return t.abort(r);e(i,(e,r)=>{if(e)return t.abort(e);t.resolve(n.values(i))})});return function(e){return r(e),t}},t.replaceStartWith=function(e,t){const r=new RegExp("^"+t);return e.replace(r,"")},t.tmpdir=(()=>o.join(s.tmpdir(),a()))},function(e,t,r){"use strict";const n=r(334),i=r(1062),o=r(1064),s=r(1066),a=r(1067),c=r(753);t.KeytransformDatastore=n,t.ShardingDatastore=i,t.MountDatastore=o,t.TieredDatastore=s,t.NamespaceDatastore=a,t.shard=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(r(1069)),i=o(r(329));function o(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.default)(n.default),e.exports=t.default},function(e,t){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r>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*s+t),t.buildInt64=((e,r,i,s)=>{const a=t.buildInt32(e,r),c=t.buildInt32(i,s);return a>2097151?new n(a).times(o).plus(c):a*o+c}),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 o=i>>16&32768;const s=i>>23&255,a=8388607&i;if(s>=113&&s<=142)o+=(s-112<<10)+(a>>13);else{if(!(s>=103&&s<113))return!1;if(a&(1<<126-s)-1)return!1;o+=a+8388608>>126-s}return t.writeUInt16BE(o,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<{t(null,e)},e=>{t(e)})}},function(e,t,r){"use strict";e.exports=(()=>{if("undefined"!=typeof self&&(r(77)(self),self.crypto))return self.crypto;throw new Error("Please use an environment with crypto support")})},function(e,t,r){"use strict";e.exports="enum KeyType {\n RSA = 0;\n Ed25519 = 1;\n Secp256k1 = 2;\n}\nmessage PublicKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}\nmessage PrivateKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}"},function(e,t,r){"use strict";const n=r(15);function i(e){if("number"==typeof e){if(i.codes[e])return i.codes[e];throw new Error("no protocol with code: "+e)}if("string"==typeof e||e instanceof String){if(i.names[e])return i.names[e];throw new Error("no protocol with name: "+e)}throw new Error("invalid protocol id type: "+e)}function o(e,t,r,n){return{code:e,size:t,name:r,resolvable:Boolean(n)}}i.lengthPrefixedVarSize=-1,i.V=-1,i.table=[[4,32,"ip4"],[6,16,"tcp"],[17,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[54,-1,"dns4","resolvable"],[55,-1,"dns6","resolvable"],[56,-1,"dnsaddr","resolvable"],[132,16,"sctp"],[302,0,"utp"],[421,i.lengthPrefixedVarSize,"ipfs"],[480,0,"http"],[443,0,"https"],[460,0,"quic"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[290,0,"p2p-circuit"]],i.names={},i.codes={},n(i.table,function(e){const t=o.apply(null,e);i.codes[t.code]=t,i.names[t.name]=t}),i.object=o,e.exports=i},function(e,t,r){"use strict";e.exports=function(e,t){return e.then(e=>{t(null,e)},e=>{t(e)})}},function(e,t,r){"use strict";e.exports=(()=>{if("undefined"!=typeof self&&(r(77)(self),self.crypto))return self.crypto;throw new Error("Please use an environment with crypto support")})},function(e,t,r){"use strict";e.exports="enum KeyType {\n RSA = 0;\n Ed25519 = 1;\n Secp256k1 = 2;\n}\nmessage PublicKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}\nmessage PrivateKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}"},function(e,t,r){"use strict";const n=r(15);function i(e){if("number"==typeof e){if(i.codes[e])return i.codes[e];throw new Error("no protocol with code: "+e)}if("string"==typeof e||e instanceof String){if(i.names[e])return i.names[e];throw new Error("no protocol with name: "+e)}throw new Error("invalid protocol id type: "+e)}function o(e,t,r,n){return{code:e,size:t,name:r,resolvable:Boolean(n)}}i.lengthPrefixedVarSize=-1,i.V=-1,i.table=[[4,32,"ip4"],[6,16,"tcp"],[273,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[54,-1,"dns4","resolvable"],[55,-1,"dns6","resolvable"],[56,-1,"dnsaddr","resolvable"],[132,16,"sctp"],[302,0,"utp"],[421,i.lengthPrefixedVarSize,"p2p"],[421,i.lengthPrefixedVarSize,"ipfs"],[480,0,"http"],[443,0,"https"],[460,0,"quic"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[290,0,"p2p-circuit"]],i.names={},i.codes={},n(i.table,function(e){const t=o.apply(null,e);i.codes[t.code]=t,i.names[t.name]=t}),i.object=o,e.exports=i},function(e,t,r){"use strict";const n=r(15);function i(e){if("number"==typeof e){if(i.codes[e])return i.codes[e];throw new Error("no protocol with code: "+e)}if("string"==typeof e||e instanceof String){if(i.names[e])return i.names[e];throw new Error("no protocol with name: "+e)}throw new Error("invalid protocol id type: "+e)}function o(e,t,r,n){return{code:e,size:t,name:r,resolvable:Boolean(n)}}i.lengthPrefixedVarSize=-1,i.V=-1,i.table=[[4,32,"ip4"],[6,16,"tcp"],[17,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[54,-1,"dns4","resolvable"],[55,-1,"dns6","resolvable"],[56,-1,"dnsaddr","resolvable"],[132,16,"sctp"],[302,0,"utp"],[421,i.lengthPrefixedVarSize,"ipfs"],[480,0,"http"],[443,0,"https"],[460,0,"quic"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[290,0,"p2p-circuit"]],i.names={},i.codes={},n(i.table,function(e){const t=o.apply(null,e);i.codes[t.code]=t,i.names[t.name]=t}),i.object=o,e.exports=i},function(e,t,r){"use strict";(function(t){const n=r(10),i=r(61),o=r(74),s=r(85),a=r(332),c=r(20),u=r(200),f=r(11),l=r(121),h=r(14),p=r(1162),d=r(1163),g=r(1164),b=r(1165),m=r(1166),y=r(1167),v=r(1168),w=r(1169),A=r(1170),_=f("repo"),S=Number.MAX_SAFE_INTEGER,E={memory:r(793),fs:r(793)},k=r(1171).repoVersion;function x(e,t){h(e.query({}),h.reduce((e,t)=>e.plus(t.value.byteLength).plus(t.key._buf.byteLength),new l(0),t))}function C(e,t){return r=>{t(r&&!e(r)?r:null)}}function I(e){return C(e=>"Already open"===e.message,e)}e.exports=class{constructor(e,t){c.strictEqual(typeof e,"string","missing repoPath"),this.options=function(e){const t=Object.assign({},v,e);return t.storageBackends=Object.assign({},v.storageBackends,t.storageBackends),t.storageBackendOptions=Object.assign({},v.storageBackendOptions,t.storageBackendOptions),t}(t),this.closed=!0,this.path=e,this._locker=this._getLocker(),this.root=p.create("root",this.path,this.options),this.version=d(this.root),this.config=g(this.root),this.spec=b(this.root),this.apiAddr=m(this.root)}init(e,t){_("initializing at: %s",this.path),i([e=>this.root.open(I(e)),t=>this.config.set(function(e){return e.datastore=Object.assign({},w,a(e,"datastore",{})),e}(e),t),t=>this.spec.set(function(e){const t=Object.assign({},w.Spec,a(e,"datastore.Spec",{}));return{type:t.type,mounts:t.mounts.map(e=>({mountpoint:e.mountpoint,type:e.child.type,path:e.child.path,shardFunc:e.child.shardFunc}))}}(e),t),e=>this.version.set(k,e)],t)}open(e){this.closed?(_("opening at: %s",this.path),n([e=>this.root.open(I(e)),e=>this._isInitialized(e),e=>this._openLock(this.path,e),(e,t)=>{_("aquired repo.lock"),this.lockfile=e,t()},e=>{_("creating datastore"),this.datastore=p.create("datastore",u.join(this.path,"datastore"),this.options),_("creating blocks");const t=p.create("blocks",u.join(this.path,"blocks"),this.options);y(t,this.options.storageBackendOptions.blocks,e)},(e,t)=>{this.blocks=e,t()},e=>{_("creating keystore"),this.keys=p.create("keys",u.join(this.path,"keys"),this.options),e()},e=>{this.closed=!1,_("all opened"),e()}],t=>{t&&this.lockfile?this._closeLock(r=>{r?_("error removing lock",r):this.lockfile=null,e(t)}):e(t)})):t(()=>e(new Error("repo is already open")))}_getLocker(){return"string"==typeof this.options.lock?(c(E[this.options.lock],"Unknown lock type: "+this.options.lock),E[this.options.lock]):(c(this.options.lock,"No lock provided"),this.options.lock)}_openLock(e,t){this._locker.lock(e,(e,r)=>{if(e)return t(e,null);c.strictEqual(typeof r.close,"function","Locks must have a close method"),t(null,r)})}_closeLock(e){if(this.lockfile)return this.lockfile.close(e);e()}_isInitialized(e){_("init check"),o({config:e=>this.config.exists(e),spec:e=>this.spec.exists(e),version:e=>this.version.check(k,e)},(t,r)=>{if(_("init",t,r),t&&!r.config)return e(Object.assign(new Error("repo is not initialized yet"),{code:A.ERR_REPO_NOT_INITIALIZED,path:this.path}));e(t)})}close(e){if(this.closed)return e(new Error("repo is already closed"));_("closing at: %s",this.path),i([e=>this.apiAddr.delete(function(e){return C(e=>e&&(e.code===A.ERR_REPO_NOT_INITIALIZED||e.message.startsWith("ENOENT")),e)}(e)),e=>{s([this.blocks,this.keys,this.datastore],(e,t)=>e.close(t),e)},e=>{_("unlocking"),this.closed=!0,this._closeLock(e)},e=>{this.lockfile=null,e()}],t=>e(t))}exists(e){this.version.exists(e)}stat(e,t){"function"==typeof e&&(t=e,e={}),e=Object.assign({},{human:!1},e),o({storageMax:e=>this.config.get("Datastore.StorageMax",(t,r)=>{e(null,new l(t?S:r))}),version:e=>this.version.get(e),blocks:e=>this.blocks.query({},(t,r)=>{const n=new l((r=r||[]).length);let i=new l(0);r.forEach(e=>{i=i.plus(e.value.byteLength).plus(e.key._buf.byteLength)}),e(t,{count:n,size:i})}),datastore:e=>x(this.datastore,e),keys:e=>x(this.keys,e)},(r,n)=>{if(r)return t(r);let i=n.blocks.size.plus(n.datastore).plus(n.keys);e.human&&(i=i.div(1048576)),t(null,{repoPath:this.path,storageMax:n.storageMax,version:n.version,numObjects:n.blocks.count,repoSize:i})})}},e.exports.repoVersion=k,e.exports.errors=A}).call(this,r(35).setImmediate)},function(e,t,r){var n=r(1192),i=r(1196);e.exports=function(e,t){var r=i(e,t);return n(r)?r:void 0}},function(e,t,r){var n=r(798);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},function(e,t,r){"use strict";e.exports=function(e,t){return e.then(e=>{t(null,e)},e=>{t(e)})}},function(e,t,r){"use strict";e.exports=(()=>{if("undefined"!=typeof self&&(r(77)(self),self.crypto))return self.crypto;throw new Error("Please use an environment with crypto support")})},function(e,t,r){"use strict";e.exports="enum KeyType {\n RSA = 0;\n Ed25519 = 1;\n Secp256k1 = 2;\n}\nmessage PublicKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}\nmessage PrivateKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}"},function(e,t,r){"use strict";e.exports={maxProvidersPerRequest:3,providerRequestTimeout:1e4,hasBlockTimeout:15e3,provideTimeout:15e3,kMaxPriority:Math.pow(2,31)-1,rebroadcastDelay:1e4,maxListeners:1e3}},function(e,t,r){var n=r(1282);e.exports=function(e,t,r){var i=null==e?void 0:n(e,t);return void 0===i?r:i}},function(e,t,r){"use strict";const n=r(15);function i(e){if("number"==typeof e){if(i.codes[e])return i.codes[e];throw new Error("no protocol with code: "+e)}if("string"==typeof e||e instanceof String){if(i.names[e])return i.names[e];throw new Error("no protocol with name: "+e)}throw new Error("invalid protocol id type: "+e)}function o(e,t,r,n){return{code:e,size:t,name:r,resolvable:Boolean(n)}}i.lengthPrefixedVarSize=-1,i.V=-1,i.table=[[4,32,"ip4"],[6,16,"tcp"],[17,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[54,-1,"dns4","resolvable"],[55,-1,"dns6","resolvable"],[56,-1,"dnsaddr","resolvable"],[132,16,"sctp"],[302,0,"utp"],[421,i.lengthPrefixedVarSize,"ipfs"],[480,0,"http"],[443,0,"https"],[460,0,"quic"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[290,0,"p2p-circuit"]],i.names={},i.codes={},n(i.table,function(e){const t=o.apply(null,e);i.codes[t.code]=t,i.names[t.name]=t}),i.object=o,e.exports=i},function(e,t,r){var n=r(1355)("socket.io-parser"),i=r(204),o=r(1358),s=r(828),a=r(829);function c(){}t.protocol=4,t.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],t.CONNECT=0,t.DISCONNECT=1,t.EVENT=2,t.ACK=3,t.ERROR=4,t.BINARY_EVENT=5,t.BINARY_ACK=6,t.Encoder=c,t.Decoder=l;var u=t.ERROR+'"encode error"';function f(e){var r=""+e.type;if(t.BINARY_EVENT!==e.type&&t.BINARY_ACK!==e.type||(r+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(r+=e.nsp+","),null!=e.id&&(r+=e.id),null!=e.data){var i=function(e){try{return JSON.stringify(e)}catch(e){return!1}}(e.data);if(!1===i)return u;r+=i}return n("encoded %j as %s",e,r),r}function l(){this.reconstructor=null}function h(e){this.reconPack=e,this.buffers=[]}function p(e){return{type:t.ERROR,data:"parser error: "+e}}c.prototype.encode=function(e,r){(n("encoding packet %j",e),t.BINARY_EVENT===e.type||t.BINARY_ACK===e.type)?function(e,t){o.removeBlobs(e,function(e){var r=o.deconstructPacket(e),n=f(r.packet),i=r.buffers;i.unshift(n),t(i)})}(e,r):r([f(e)])},i(l.prototype),l.prototype.add=function(e){var r;if("string"==typeof e)r=function(e){var r=0,i={type:Number(e.charAt(0))};if(null==t.types[i.type])return p("unknown packet type "+i.type);if(t.BINARY_EVENT===i.type||t.BINARY_ACK===i.type){for(var o="";"-"!==e.charAt(++r)&&(o+=e.charAt(r),r!=e.length););if(o!=Number(o)||"-"!==e.charAt(r))throw new Error("Illegal attachments");i.attachments=Number(o)}if("/"===e.charAt(r+1))for(i.nsp="";++r;){var a=e.charAt(r);if(","===a)break;if(i.nsp+=a,r===e.length)break}else i.nsp="/";var c=e.charAt(r+1);if(""!==c&&Number(c)==c){for(i.id="";++r;){var a=e.charAt(r);if(null==a||Number(a)!=a){--r;break}if(i.id+=e.charAt(r),r===e.length)break}i.id=Number(i.id)}if(e.charAt(++r)){var u=function(e){try{return JSON.parse(e)}catch(e){return!1}}(e.substr(r)),f=!1!==u&&(i.type===t.ERROR||s(u));if(!f)return p("invalid payload");i.data=u}return n("decoded %s as %j",e,i),i}(e),t.BINARY_EVENT===r.type||t.BINARY_ACK===r.type?(this.reconstructor=new h(r),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",r)):this.emit("decoded",r);else{if(!a(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(r=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,this.emit("decoded",r))}},l.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},h.prototype.takeBinaryData=function(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t=o.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null},h.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(e,t,r){var n=r(1361);e.exports=function(e){var t=e.xdomain,r=e.xscheme,i=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!t||n))return new XMLHttpRequest}catch(e){}try{if("undefined"!=typeof XDomainRequest&&!r&&i)return new XDomainRequest}catch(e){}if(!t)try{return new(self[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}},function(e,t,r){var n=r(205),i=r(204);function o(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.forceNode=e.forceNode,this.isReactNative=e.isReactNative,this.extraHeaders=e.extraHeaders,this.localAddress=e.localAddress}e.exports=o,i(o.prototype),o.prototype.onError=function(e,t){var r=new Error(e);return r.type="TransportError",r.description=t,this.emit("error",r),this},o.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},o.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},o.prototype.send=function(e){if("open"!==this.readyState)throw new Error("Transport not open");this.write(e)},o.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},o.prototype.onData=function(e){var t=n.decodePacket(e,this.socket.binaryType);this.onPacket(t)},o.prototype.onPacket=function(e){this.emit("packet",e)},o.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(e,t,r){"use strict";e.exports=function(e,t){return e.then(e=>{t(null,e)},e=>{t(e)})}},function(e,t,r){"use strict";e.exports=(()=>{if("undefined"!=typeof self&&(r(77)(self),self.crypto))return self.crypto;throw new Error("Please use an environment with crypto support")})},function(e,t,r){"use strict";e.exports="enum KeyType {\n RSA = 0;\n Ed25519 = 1;\n Secp256k1 = 2;\n}\nmessage PublicKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}\nmessage PrivateKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}"},function(e,t,r){"use strict";const n=r(15);function i(e){if("number"==typeof e){if(i.codes[e])return i.codes[e];throw new Error("no protocol with code: "+e)}if("string"==typeof e||e instanceof String){if(i.names[e])return i.names[e];throw new Error("no protocol with name: "+e)}throw new Error("invalid protocol id type: "+e)}function o(e,t,r,n){return{code:e,size:t,name:r,resolvable:Boolean(n)}}i.lengthPrefixedVarSize=-1,i.V=-1,i.table=[[4,32,"ip4"],[6,16,"tcp"],[17,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[54,-1,"dns4","resolvable"],[55,-1,"dns6","resolvable"],[56,-1,"dnsaddr","resolvable"],[132,16,"sctp"],[302,0,"utp"],[421,i.lengthPrefixedVarSize,"ipfs"],[480,0,"http"],[443,0,"https"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[290,0,"p2p-circuit"]],i.names={},i.codes={},n(i.table,function(e){const t=o.apply(null,e);i.codes[t.code]=t,i.names[t.name]=t}),i.object=o,e.exports=i},function(e,t,r){"use strict";(function(t){const n=r(15),i=r(31),o=r(1409),s=r(658),a=r(5),c=r(9),u=r(26),f=new Error("Sorry, Not Implemented Yet."),l=u.proto(function(e){if(!(this instanceof l))return new l(e);if(null==e&&(e=""),e instanceof t)this.buffer=o.fromBuffer(e);else if("string"==typeof e||e instanceof String){if(e.length>0&&"/"!==e.charAt(0))throw new Error(`multiaddr "${e}" must start with a "/"`);this.buffer=o.fromString(e)}else{if(!(e.buffer&&e.protos&&e.protoCodes))throw new Error("addr must be a string, Buffer, or another Multiaddr");this.buffer=o.fromBuffer(e.buffer)}},{className:"Multiaddr",symbolName:"@multiformats/js-multiaddr/multiaddr"});l.prototype.toString=function(){return o.bufferToString(this.buffer)},l.prototype.toOptions=function(){const e={},t=this.toString().split("/");return e.family="ip4"===t[1]?"ipv4":"ipv6",e.host=t[2],e.transport=t[3],e.port=t[4],e},l.prototype.inspect=function(){return""},l.prototype.protos=function(){return n(this.protoCodes(),function(e){return i(s(e))})},l.prototype.protoCodes=function(){const e=[],t=this.buffer;let r=0;for(;r{if(e[0]===s.names.ipfs.code)return!0})[0][1],c.decode(e)}catch(t){e=null}return e},l.prototype.equals=function(e){return this.buffer.equals(e.buffer)},l.prototype.nodeAddress=function(){const e=this.protoCodes(),t=this.protoNames(),r=this.toString().split("/").slice(1);if(r.length<4)throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6}/{address}/{tcp, udp}/{port}".');if(4!==e[0]&&41!==e[0]&&54!==e[0]&&55!==e[0])throw new Error(`no protocol with name: "'${t[0]}'". Must have a valid family name: "{ip4, ip6, dns4, dns6}".`);if("tcp"!==r[2]&&"udp"!==r[2])throw new Error(`no protocol with name: "'${t[1]}'". Must have a valid transport protocol: "{tcp, udp}".`);return{family:41===e[0]||55===e[0]?6:4,address:r[1],port:r[3]}},l.fromNodeAddress=function(e,t){if(!e)throw new Error("requires node address object");if(!t)throw new Error("requires transport protocol");const r="IPv6"===e.family?"ip6":"ip4";return l("/"+[r,e.address,t,e.port].join("/"))},l.prototype.isThinWaistAddress=function(e){const t=(e||this).protos();return 2===t.length&&((4===t[0].code||41===t[0].code)&&(6===t[1].code||17===t[1].code))},l.prototype.fromStupidString=function(e){throw f},l.protocols=s,l.isName=function(e){return!!l.isMultiaddr(e)&&e.protos().some(e=>e.resolvable)},l.resolve=function(e,t){return l.isMultiaddr(e)&&l.isName(e)?t(new Error("not implemented yet")):t(new Error("not a valid name"))},e.exports=l}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(15);function i(e){if("number"==typeof e){if(i.codes[e])return i.codes[e];throw new Error("no protocol with code: "+e)}if("string"==typeof e||e instanceof String){if(i.names[e])return i.names[e];throw new Error("no protocol with name: "+e)}throw new Error("invalid protocol id type: "+e)}function o(e,t,r,n){return{code:e,size:t,name:r,resolvable:Boolean(n)}}i.lengthPrefixedVarSize=-1,i.V=-1,i.table=[[4,32,"ip4"],[6,16,"tcp"],[17,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[54,-1,"dns4","resolvable"],[55,-1,"dns6","resolvable"],[56,-1,"dnsaddr","resolvable"],[132,16,"sctp"],[302,0,"utp"],[421,i.lengthPrefixedVarSize,"ipfs"],[480,0,"http"],[443,0,"https"],[460,0,"quic"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[290,0,"p2p-circuit"]],i.names={},i.codes={},n(i.table,function(e){const t=o.apply(null,e);i.codes[t.code]=t,i.names[t.name]=t}),i.object=o,e.exports=i},function(e,t,r){"use strict";e.exports=function(e,t){return e.then(e=>{t(null,e)},e=>{t(e)})}},function(e,t,r){"use strict";e.exports=(()=>{if("undefined"!=typeof self&&(r(77)(self),self.crypto))return self.crypto;throw new Error("Please use an environment with crypto support")})},function(e,t,r){"use strict";e.exports="enum KeyType {\n RSA = 0;\n Ed25519 = 1;\n Secp256k1 = 2;\n}\nmessage PublicKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}\nmessage PrivateKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}"},function(e,t,r){"use strict";const n=r(15);function i(e){if("number"==typeof e){if(i.codes[e])return i.codes[e];throw new Error("no protocol with code: "+e)}if("string"==typeof e||e instanceof String){if(i.names[e])return i.names[e];throw new Error("no protocol with name: "+e)}throw new Error("invalid protocol id type: "+e)}function o(e,t,r,n){return{code:e,size:t,name:r,resolvable:Boolean(n)}}i.lengthPrefixedVarSize=-1,i.V=-1,i.table=[[4,32,"ip4"],[6,16,"tcp"],[17,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[54,-1,"dns4","resolvable"],[55,-1,"dns6","resolvable"],[56,-1,"dnsaddr","resolvable"],[132,16,"sctp"],[302,0,"utp"],[421,i.lengthPrefixedVarSize,"ipfs"],[480,0,"http"],[443,0,"https"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[290,0,"p2p-circuit"]],i.names={},i.codes={},n(i.table,function(e){const t=o.apply(null,e);i.codes[t.code]=t,i.names[t.name]=t}),i.object=o,e.exports=i},function(e,t,r){"use strict";e.exports=function(e,t){return e.then(e=>{t(null,e)},e=>{t(e)})}},function(e,t,r){"use strict";e.exports=(()=>{if("undefined"!=typeof self&&(r(77)(self),self.crypto))return self.crypto;throw new Error("Please use an environment with crypto support")})},function(e,t,r){"use strict";e.exports="enum KeyType {\n RSA = 0;\n Ed25519 = 1;\n Secp256k1 = 2;\n}\nmessage PublicKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}\nmessage PrivateKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}"},function(e,t,r){"use strict";const n=r(15);function i(e){if("number"==typeof e){if(i.codes[e])return i.codes[e];throw new Error("no protocol with code: "+e)}if("string"==typeof e||e instanceof String){if(i.names[e])return i.names[e];throw new Error("no protocol with name: "+e)}throw new Error("invalid protocol id type: "+e)}function o(e,t,r,n){return{code:e,size:t,name:r,resolvable:Boolean(n)}}i.lengthPrefixedVarSize=-1,i.V=-1,i.table=[[4,32,"ip4"],[6,16,"tcp"],[17,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[54,-1,"dns4","resolvable"],[55,-1,"dns6","resolvable"],[56,-1,"dnsaddr","resolvable"],[132,16,"sctp"],[302,0,"utp"],[421,i.lengthPrefixedVarSize,"ipfs"],[480,0,"http"],[443,0,"https"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[290,0,"p2p-circuit"]],i.names={},i.codes={},n(i.table,function(e){const t=o.apply(null,e);i.codes[t.code]=t,i.names[t.name]=t}),i.object=o,e.exports=i},function(e,t,r){"use strict";(function(e){const n=r(63),i=r(95),o=r(14),s=r(115),a=r(74);t.exchanges=["P-256","P-384","P-521"],t.ciphers=["AES-256","AES-128"],t.hashes=["SHA256","SHA512"],t.theBest=((e,t,r)=>{let n,i;if(e<0)n=r,i=t;else{if(!(e>0))return t[0];n=t,i=r}for(let e of n)for(let t of i)if(e===t)return e;throw new Error("No algorithms in common!")}),t.makeMacAndCipher=((e,t)=>{a([t=>(function(e,t,r){s.hmac.create(e,t,r)})(e.hashT,e.keys.macKey,t),t=>(function(e,t,r,n){if("AES-128"===e||"AES-256"===e)return s.aes.create(r,t,n);n(new Error(`unrecognized cipher type: ${e}`))})(e.cipherT,e.keys.iv,e.keys.cipherKey,t)],(r,n)=>{if(r)return t(r);e.mac=n[0],e.cipher=n[1],t()})}),t.selectBest=((r,n,i)=>{t.digest(e.concat([n.pubKeyBytes,r.nonce]),(o,s)=>{if(o)return i(o);t.digest(e.concat([r.pubKeyBytes,n.nonce]),(o,a)=>{if(o)return i(o);const c=e.compare(s,a);if(0===c)return i(new Error("you are trying to talk to yourself"));i(null,{curveT:t.theBest(c,r.exchanges,n.exchanges),cipherT:t.theBest(c,r.ciphers,n.ciphers),hashT:t.theBest(c,r.hashes,n.hashes),order:c})})})}),t.digest=((e,t)=>{n.digest(e,"sha2-256",e.length,t)}),t.write=function(e,t,r){r=r||(()=>{}),o(o.values([t]),i.encode({fixed:!0,bytes:4}),o.collect((t,n)=>{if(t)return r(t);e.shake.write(n[0]),r()}))},t.read=function(e,t){i.decodeFromReader(e,{fixed:!0,bytes:4},t)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(19),i=r(41),o=r(115),s=r(74),a=r(10),c=r(11),u=c("libp2p:secio");u.error=c("libp2p:secio:error");const f=n(r(1486)),l=r(667);t.createProposal=(e=>(e.proposal.out={rand:o.randomBytes(16),pubkey:e.key.local.public.bytes,exchanges:l.exchanges.join(","),ciphers:l.ciphers.join(","),hashes:l.hashes.join(",")},e.proposalEncoded.out=f.Propose.encode(e.proposal.out),e.proposalEncoded.out)),t.createExchange=((t,r)=>{o.keys.generateEphemeralKeyPair(t.protocols.local.curveT,(n,i)=>{if(n)return r(n);t.ephemeralKey.local=i.key,t.shared.generate=i.genSharedKey;const o=e.concat([t.proposalEncoded.out,t.proposalEncoded.in,t.ephemeralKey.local]);t.key.local.sign(o,(e,n)=>{if(e)return r(e);t.exchange.out={epubkey:t.ephemeralKey.local,signature:n},r(null,f.Exchange.encode(t.exchange.out))})})}),t.identify=((e,t,r)=>{u("1.1 identify"),e.proposalEncoded.in=t,e.proposal.in=f.Propose.decode(t);const n=e.proposal.in.pubkey;e.key.remote=o.keys.unmarshalPublicKey(n),i.createFromPubKey(n.toString("base64"),(t,n)=>{if(t)return r(t);if(e.id.remote){if(e.id.remote.toB58String()!==n.toB58String())return r(new Error("dialed to the wrong peer, Ids do not match"))}else e.id.remote=n;u("1.1 identify - %s - identified remote peer as %s",e.id.local.toB58String(),e.id.remote.toB58String()),r()})}),t.selectProtocols=((e,t)=>{u("1.2 selection");const r={pubKeyBytes:e.key.local.public.bytes,exchanges:l.exchanges,hashes:l.hashes,ciphers:l.ciphers,nonce:e.proposal.out.rand},n={pubKeyBytes:e.proposal.in.pubkey,exchanges:e.proposal.in.exchanges.split(","),hashes:e.proposal.in.hashes.split(","),ciphers:e.proposal.in.ciphers.split(","),nonce:e.proposal.in.rand};l.selectBest(r,n,(r,n)=>{if(r)return t(r);e.protocols.remote={order:n.order,curveT:n.curveT,cipherT:n.cipherT,hashT:n.hashT},e.protocols.local={order:n.order,curveT:n.curveT,cipherT:n.cipherT,hashT:n.hashT},t()})}),t.verify=((t,r,n)=>{u("2.1. verify"),t.exchange.in=f.Exchange.decode(r),t.ephemeralKey.remote=t.exchange.in.epubkey;const i=e.concat([t.proposalEncoded.in,t.proposalEncoded.out,t.ephemeralKey.remote]);t.key.remote.verify(i,t.exchange.in.signature,(e,t)=>e?n(e):t?(u("2.1. verify - signature verified"),void n()):n(new Error("Bad signature")))}),t.generateKeys=((e,t)=>{u("2.2. keys"),a([t=>e.shared.generate(e.exchange.in.epubkey,t),(t,r)=>{e.shared.secret=t,o.keys.keyStretcher(e.protocols.local.cipherT,e.protocols.local.hashT,e.shared.secret,r)},(t,r)=>{if(e.protocols.local.order>0)e.protocols.local.keys=t.k1,e.protocols.remote.keys=t.k2;else{if(!(e.protocols.local.order<0))return r(new Error("you are trying to talk to yourself"));e.protocols.local.keys=t.k2,e.protocols.remote.keys=t.k1}u("2.3. mac + cipher"),s([t=>l.makeMacAndCipher(e.protocols.local,t),t=>l.makeMacAndCipher(e.protocols.remote,t)],r)}],t)}),t.verifyNonce=((e,t)=>{const r=e.proposal.out.rand;if(!r.equals(t))throw new Error(`Failed to read our encrypted nonce: ${r.toString("hex")} != ${t.toString("hex")}`)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";e.exports=function(e,t){return e.then(e=>{t(null,e)},e=>{t(e)})}},function(e,t,r){"use strict";e.exports=(()=>{if("undefined"!=typeof self&&(r(77)(self),self.crypto))return self.crypto;throw new Error("Please use an environment with crypto support")})},function(e,t,r){"use strict";e.exports="enum KeyType {\n RSA = 0;\n Ed25519 = 1;\n Secp256k1 = 2;\n}\nmessage PublicKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}\nmessage PrivateKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}"},function(e,t,r){"use strict";const n=r(15);function i(e){if("number"==typeof e){if(i.codes[e])return i.codes[e];throw new Error("no protocol with code: "+e)}if("string"==typeof e||e instanceof String){if(i.names[e])return i.names[e];throw new Error("no protocol with name: "+e)}throw new Error("invalid protocol id type: "+e)}function o(e,t,r,n){return{code:e,size:t,name:r,resolvable:Boolean(n)}}i.lengthPrefixedVarSize=-1,i.V=-1,i.table=[[4,32,"ip4"],[6,16,"tcp"],[17,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[54,-1,"dns4","resolvable"],[55,-1,"dns6","resolvable"],[56,-1,"dnsaddr","resolvable"],[132,16,"sctp"],[302,0,"utp"],[421,i.lengthPrefixedVarSize,"ipfs"],[480,0,"http"],[443,0,"https"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[290,0,"p2p-circuit"]],i.names={},i.codes={},n(i.table,function(e){const t=o.apply(null,e);i.codes[t.code]=t,i.names[t.name]=t}),i.object=o,e.exports=i},function(e,t,r){"use strict";const n=r(15);function i(e){if("number"==typeof e){if(i.codes[e])return i.codes[e];throw new Error("no protocol with code: "+e)}if("string"==typeof e||e instanceof String){if(i.names[e])return i.names[e];throw new Error("no protocol with name: "+e)}throw new Error("invalid protocol id type: "+e)}function o(e,t,r,n){return{code:e,size:t,name:r,resolvable:Boolean(n)}}i.lengthPrefixedVarSize=-1,i.V=-1,i.table=[[4,32,"ip4"],[6,16,"tcp"],[17,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[54,-1,"dns4","resolvable"],[55,-1,"dns6","resolvable"],[56,-1,"dnsaddr","resolvable"],[132,16,"sctp"],[302,0,"utp"],[421,i.lengthPrefixedVarSize,"ipfs"],[480,0,"http"],[443,0,"https"],[460,0,"quic"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[290,0,"p2p-circuit"]],i.names={},i.codes={},n(i.table,function(e){const t=o.apply(null,e);i.codes[t.code]=t,i.names[t.name]=t}),i.object=o,e.exports=i},function(e,t,r){"use strict";e.exports=function(e,t){return e.then(e=>{t(null,e)},e=>{t(e)})}},function(e,t,r){"use strict";e.exports=(()=>{if("undefined"!=typeof self&&(r(77)(self),self.crypto))return self.crypto;throw new Error("Please use an environment with crypto support")})},function(e,t,r){"use strict";e.exports="enum KeyType {\n RSA = 0;\n Ed25519 = 1;\n Secp256k1 = 2;\n}\nmessage PublicKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}\nmessage PrivateKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}"},function(e,t,r){"use strict";const n=r(15);function i(e){if("number"==typeof e){if(i.codes[e])return i.codes[e];throw new Error("no protocol with code: "+e)}if("string"==typeof e||e instanceof String){if(i.names[e])return i.names[e];throw new Error("no protocol with name: "+e)}throw new Error("invalid protocol id type: "+e)}function o(e,t,r,n){return{code:e,size:t,name:r,resolvable:Boolean(n)}}i.lengthPrefixedVarSize=-1,i.V=-1,i.table=[[4,32,"ip4"],[6,16,"tcp"],[17,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[54,-1,"dns4","resolvable"],[55,-1,"dns6","resolvable"],[56,-1,"dnsaddr","resolvable"],[132,16,"sctp"],[302,0,"utp"],[421,i.lengthPrefixedVarSize,"ipfs"],[480,0,"http"],[443,0,"https"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[290,0,"p2p-circuit"]],i.names={},i.codes={},n(i.table,function(e){const t=o.apply(null,e);i.codes[t.code]=t,i.names[t.name]=t}),i.object=o,e.exports=i},function(e,t,r){"use strict";const n=r(19);e.exports=n("\nmessage Identify {\n // protocolVersion determines compatibility between peers\n optional string protocolVersion = 5; // e.g. ipfs/1.0.0\n\n // agentVersion is like a UserAgent string in browsers, or client version in bittorrent\n // includes the client name and client.\n optional string agentVersion = 6; // e.g. go-ipfs/0.1.0\n\n // publicKey is this node's public key (which also gives its node.ID)\n // - may not need to be sent, as secure channel implies it has been sent.\n // - then again, if we change / disable secure channel, may still want it.\n optional bytes publicKey = 1;\n\n // listenAddrs are the multiaddrs the sender node listens for open connections on\n repeated bytes listenAddrs = 2;\n\n // oservedAddr is the multiaddr of the remote endpoint that the sender node perceives\n // this is useful information to convey to the other side, as it helps the remote endpoint\n // determine whether its connection to the local peer goes through NAT.\n optional bytes observedAddr = 4;\n\n repeated string protocols = 3;\n}\n").Identify},function(e,t,r){"use strict";e.exports=function(e,t){return e.then(e=>{t(null,e)},e=>{t(e)})}},function(e,t,r){"use strict";e.exports=(()=>{if("undefined"!=typeof self&&(r(77)(self),self.crypto))return self.crypto;throw new Error("Please use an environment with crypto support")})},function(e,t,r){"use strict";e.exports="enum KeyType {\n RSA = 0;\n Ed25519 = 1;\n Secp256k1 = 2;\n}\nmessage PublicKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}\nmessage PrivateKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}"},function(e,t,r){"use strict";const n=r(15);function i(e){if("number"==typeof e){if(i.codes[e])return i.codes[e];throw new Error("no protocol with code: "+e)}if("string"==typeof e||e instanceof String){if(i.names[e])return i.names[e];throw new Error("no protocol with name: "+e)}throw new Error("invalid protocol id type: "+e)}function o(e,t,r,n){return{code:e,size:t,name:r,resolvable:Boolean(n)}}i.lengthPrefixedVarSize=-1,i.V=-1,i.table=[[4,32,"ip4"],[6,16,"tcp"],[17,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[54,-1,"dns4","resolvable"],[55,-1,"dns6","resolvable"],[56,-1,"dnsaddr","resolvable"],[132,16,"sctp"],[302,0,"utp"],[421,i.lengthPrefixedVarSize,"ipfs"],[480,0,"http"],[443,0,"https"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[290,0,"p2p-circuit"]],i.names={},i.codes={},n(i.table,function(e){const t=o.apply(null,e);i.codes[t.code]=t,i.names[t.name]=t}),i.object=o,e.exports=i},function(e,t,r){"use strict";const n=r(15);function i(e){if("number"==typeof e){if(i.codes[e])return i.codes[e];throw new Error("no protocol with code: "+e)}if("string"==typeof e||e instanceof String){if(i.names[e])return i.names[e];throw new Error("no protocol with name: "+e)}throw new Error("invalid protocol id type: "+e)}function o(e,t,r,n){return{code:e,size:t,name:r,resolvable:Boolean(n)}}i.lengthPrefixedVarSize=-1,i.V=-1,i.table=[[4,32,"ip4"],[6,16,"tcp"],[17,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[54,-1,"dns4","resolvable"],[55,-1,"dns6","resolvable"],[56,-1,"dnsaddr","resolvable"],[132,16,"sctp"],[302,0,"utp"],[421,i.lengthPrefixedVarSize,"ipfs"],[480,0,"http"],[443,0,"https"],[460,0,"quic"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[290,0,"p2p-circuit"]],i.names={},i.codes={},n(i.table,function(e){const t=o.apply(null,e);i.codes[t.code]=t,i.names[t.name]=t}),i.object=o,e.exports=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return function(r,o,s,a){a=a||n.default;var c,u=!1;r(o,function(r,n,o){s(r,function(n,s){n?o(n):e(s)&&!c?(u=!0,c=t(!0,r),o(null,i.default)):o()})},function(e){e?a(e):a(null,u?c:t(!1))})}};var n=o(r(70)),i=o(r(623));function o(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,r){"use strict";const n=r(15);function i(e){if("number"==typeof e){if(i.codes[e])return i.codes[e];throw new Error("no protocol with code: "+e)}if("string"==typeof e||e instanceof String){if(i.names[e])return i.names[e];throw new Error("no protocol with name: "+e)}throw new Error("invalid protocol id type: "+e)}function o(e,t,r,n){return{code:e,size:t,name:r,resolvable:Boolean(n)}}i.lengthPrefixedVarSize=-1,i.V=-1,i.table=[[4,32,"ip4"],[6,16,"tcp"],[17,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[54,-1,"dns4","resolvable"],[55,-1,"dns6","resolvable"],[56,-1,"dnsaddr","resolvable"],[132,16,"sctp"],[302,0,"utp"],[421,i.lengthPrefixedVarSize,"ipfs"],[480,0,"http"],[443,0,"https"],[460,0,"quic"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[290,0,"p2p-circuit"]],i.names={},i.codes={},n(i.table,function(e){const t=o.apply(null,e);i.codes[t.code]=t,i.names[t.name]=t}),i.object=o,e.exports=i},function(e,t,r){"use strict";const n=r(1587),i=r(918).ensureMultiaddr,o=r(1607),s=r(20);class a{constructor(e){s(e,"Missing peerId. Use Peer.create(cb) to create one"),this.id=e,this.multiaddrs=new o,this.protocols=new Set,this._connectedMultiaddr=void 0}connect(e){if(e=i(e),!this.multiaddrs.has(e)&&e.toString()!==`/ipfs/${this.id.toB58String()}`)throw new Error("can't be connected to missing multiaddr from set");this._connectedMultiaddr=e}disconnect(){this._connectedMultiaddr=void 0}isConnected(){return this._connectedMultiaddr}}a.create=((e,t)=>{if("function"==typeof e)return t=e,e=null,void n.create((e,r)=>{if(e)return t(e);t(null,new a(r))});"function"==typeof e.toJSON?t(null,new a(e)):n.createFromJSON(e,(e,r)=>t(e,new a(r)))}),a.isPeerInfo=(e=>Boolean("object"==typeof e&&e.id&&e.multiaddrs)),e.exports=a},function(e,t,r){"use strict";e.exports=function(e,t){return e.then(e=>{t(null,e)},e=>{t(e)})}},function(e,t,r){"use strict";e.exports=(()=>{if("undefined"!=typeof self&&(r(77)(self),self.crypto))return self.crypto;throw new Error("Please use an environment with crypto support")})},function(e,t,r){"use strict";e.exports="enum KeyType {\n RSA = 0;\n Ed25519 = 1;\n Secp256k1 = 2;\n}\nmessage PublicKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}\nmessage PrivateKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}"},function(e,t,r){"use strict";const n=r(15);function i(e){if("number"==typeof e){if(i.codes[e])return i.codes[e];throw new Error("no protocol with code: "+e)}if("string"==typeof e||e instanceof String){if(i.names[e])return i.names[e];throw new Error("no protocol with name: "+e)}throw new Error("invalid protocol id type: "+e)}function o(e,t,r,n){return{code:e,size:t,name:r,resolvable:Boolean(n)}}i.lengthPrefixedVarSize=-1,i.V=-1,i.table=[[4,32,"ip4"],[6,16,"tcp"],[17,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[54,-1,"dns4","resolvable"],[55,-1,"dns6","resolvable"],[56,-1,"dnsaddr","resolvable"],[132,16,"sctp"],[302,0,"utp"],[421,i.lengthPrefixedVarSize,"ipfs"],[480,0,"http"],[443,0,"https"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[290,0,"p2p-circuit"]],i.names={},i.codes={},n(i.table,function(e){const t=o.apply(null,e);i.codes[t.code]=t,i.names[t.name]=t}),i.object=o,e.exports=i},function(e,t,r){"use strict";const n=r(14),i=r(95),o=r(183),s=r(11),a=s("libp2p:circuit:stream-handler");a.err=s("libp2p:circuit:error:stream-handler");e.exports=class{constructor(e,t,r,i){this.conn=e,this.stream=null,this.shake=null,this.timeout=t||6e4,this.maxLength=i||4096,"function"==typeof t&&(this.timeout=r||6e4),this.stream=o({timeout:this.timeout},t),this.shake=this.stream.handshake,n(this.stream,e,this.stream)}isValid(){return this.conn&&this.shake&&this.stream}read(e){if(!this.isValid())return e(new Error("handler is not in a valid state"));i.decodeFromReader(this.shake,{maxLength:this.maxLength},(t,r)=>t?(a.err(t),e(t)):e(null,r))}write(e,t){if(t=t||(()=>{}),!this.isValid())return t(new Error("handler is not in a valid state"));n(n.values([e]),i.encode(),n.collect((e,r)=>{if(e)return a.err(e),this.shake.abort(e),t(e);r.forEach(e=>this.shake.write(e)),t()}))}getRawConn(){return this.conn}rest(){const e=this.shake.rest();return this.conn=null,this.stream=null,this.shake=null,e}close(){this.isValid()&&n(n.empty(),this.rest())}}},function(e,t,r){"use strict";e.exports={relay:"/libp2p/circuit/relay/0.1.0"}},function(e,t,r){"use strict";const n=r(89).Connection,i=r(14);e.exports=((e,t,r,o)=>{const s=new Promise((e,t)=>{r.getPeerInfo((t,n)=>{if(!t&&n)return void e(n);const i=r.setPeerInfo;r.setPeerInfo=(t=>{i.call(r,t),e(t)})})}),a={source:i(r,o.incoming(e,t,s)),sink:i(o.outgoing(e,t,s),r)};return new n(a,r)})},function(e,t,r){"use strict";e.exports={PROTOCOL:"/ipfs/ping/1.0.0",PING_LENGTH:32}},function(e,t,r){"use strict";const n=r(15);function i(e){if("number"==typeof e){if(i.codes[e])return i.codes[e];throw new Error("no protocol with code: "+e)}if("string"==typeof e||e instanceof String){if(i.names[e])return i.names[e];throw new Error("no protocol with name: "+e)}throw new Error("invalid protocol id type: "+e)}function o(e,t,r,n){return{code:e,size:t,name:r,resolvable:Boolean(n)}}i.lengthPrefixedVarSize=-1,i.V=-1,i.table=[[4,32,"ip4"],[6,16,"tcp"],[17,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[54,-1,"dns4","resolvable"],[55,-1,"dns6","resolvable"],[56,-1,"dnsaddr","resolvable"],[132,16,"sctp"],[302,0,"utp"],[421,i.lengthPrefixedVarSize,"ipfs"],[480,0,"http"],[443,0,"https"],[460,0,"quic"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[290,0,"p2p-circuit"]],i.names={},i.codes={},n(i.table,function(e){const t=o.apply(null,e);i.codes[t.code]=t,i.names[t.name]=t}),i.object=o,e.exports=i},function(e,t,r){"use strict";const n=r(300);e.exports=function(e){const t=e||100;var r=[];return n(function(e){for(r=r.concat(e);r.length>=t;){const e=t,n=r.slice(0,e);r=r.slice(e),this.queue(n)}},function(e){r.length&&(this.queue(r),r=[]),this.queue(null)})}},function(e,t,r){"use strict";e.exports=class{constructor(e,t){this._options=t||{},Object.assign(this,e)}}},function(e,t,r){"use strict";const n=r(1691),i=r(1692),o={bits:8};class s{constructor(e,t,r){if(this._options=Object.assign({},o,e),this._popCount=0,this._parent=t,this._posAtParent=r,!this._options.hashFn)throw new Error("please define an options.hashFn");this._options.hash||(this._options.hash=i(this._options.hashFn)),this._children=new n}static isBucket(e){return e instanceof s}async put(e,t){const r=await this._findNewBucketAndPos(e);await r.bucket._putAt(r,e,t)}async get(e){const t=await this._findChild(e);if(t)return t.value}async del(e){const t=await this._findPlace(e),r=t.bucket._at(t.pos);r&&r.key===e&&t.bucket._delAt(t.pos)}leafCount(){return this._children.compactArray().reduce((e,t)=>t instanceof s?e+t.leafCount():e+1,0)}childrenCount(){return this._children.length}onlyChild(){return this._children.get(0)}*eachLeafSeries(){const e=this._children.compactArray();for(const t of e)if(t instanceof s)for(const e of t.eachLeafSeries())yield e;else yield t}serialize(e,t){return t(this._children.reduce((r,n,i)=>(n&&(n instanceof s?r.push(n.serialize(e,t)):r.push(e(n,i))),r),[]))}async asyncTransform(e,t){return async function e(t,r,n){const i=[];for(const o of t._children.compactArray()){if(o instanceof s)await e(o,r,n);else{const e=await r(o);i.push({bitField:t._children.bitField(),children:e})}return n(i)}}(this,e,t)}toJSON(){return this.serialize(c,u)}prettyPrint(){return JSON.stringify(this.toJSON(),null," ")}tableSize(){return Math.pow(2,this._options.bits)}async _findChild(e){const t=await this._findPlace(e),r=t.bucket._at(t.pos);if(r&&r.key===e)return r}async _findPlace(e){const t=this._options.hash(e),r=await t.take(this._options.bits),n=this._children.get(r);return n instanceof s?n._findPlace(t):{bucket:this,pos:r,hash:t}}async _findNewBucketAndPos(e){const t=await this._findPlace(e),r=t.bucket._at(t.pos);if(r&&r.key!==e){const e=new s(this._options,t.bucket,t.pos);t.bucket._putObjectAt(t.pos,e);const n=await e._findPlace(r.hash);return n.bucket._putAt(n,r.key,r.value),e._findNewBucketAndPos(t.hash)}return t}_putAt(e,t,r){this._putObjectAt(e.pos,{key:t,value:r,hash:e.hash})}_putObjectAt(e,t){this._children.get(e)||this._popCount++,this._children.set(e,t)}_delAt(e){this._children.get(e)&&this._popCount--,this._children.unset(e),this._level()}_level(){if(this._parent&&this._popCount<=1)if(1===this._popCount){const e=this._children.find(a);if(!(e instanceof s)){const t=e.hash;t.untake(this._options.bits);const r={pos:this._posAtParent,hash:t};this._parent._putAt(r,e.key,e.value)}}else this._parent._delAt(this._posAtParent)}_at(e){return this._children.get(e)}}function a(e){return Boolean(e)}function c(e,t){return e.key}function u(e){return e}e.exports=s},function(e,t,r){"use strict";e.exports=((e="")=>(e.trim().match(/([^\\^\/]|\\\/)+/g)||[]).filter(Boolean))},function(e,t,r){"use strict";const n=r(10),i=r(68),o=r(184),{loadNode:s,formatCid:a,toMfsPath:c,FILE_SEPARATOR:u,FILE_TYPES:f}=r(116),l=r(37),h=r(72),p=r(99),d=r(73),g=r(142),b=r(97),m=r(47),y={long:!1,cidBase:"base58btc"};e.exports=(e=>(function(t,r={}){"object"==typeof t&&(r=t,t=u),void 0===t&&(t=u),(r=Object.assign({},y,r)).long=r.l||r.long;const v=m.source();return n([r=>c(e,t,r),({mfsPath:r,depth:n},i)=>{l(o(r,e.ipld,{maxDepth:n}),h((s,a)=>{if(s)return i(s);if(a.length>1)return i(new Error(`Path ${t} had ${a.length} roots`));const c=a[0];if(!c)return i(new Error(`${t} does not exist`));if("dir"!==c.type)return i(null,g(c));let u=!0;return i(null,l(o(r,e.ipld,{maxDepth:n+1}),d(()=>!u||(u=!1,!1))))}))},(t,n)=>{n(null,l(t,p((t,n)=>{if(!r.long)return n(null,{name:t.name,type:0,size:0,hash:""});s(e,{cid:t.hash},(e,o)=>{if(e)return n(e);const s=i.unmarshal(o.node.data);n(null,{name:t.name,type:f[s.type],hash:a(t.hash,r.cidBase),size:s.fileSize()||0})})})))}],(e,t)=>{if(e)return v.resolve(b(e));v.resolve(t)}),v}))},function(e,t,r){"use strict";const n=r(10),i=r(143),o=r(11)("ipfs:mfs:mkdir"),s=r(184),a=r(37),c=r(73),u=r(98),f=r(72),l=r(16),{createNode:h,toMfsPath:p,toPathComponents:d,updateMfsRoot:g,updateTree:b,FILE_SEPARATOR:m}=r(116),y={parents:!1,hashAlg:"sha2-256",cidVersion:0,shardSplitThreshold:1e3,format:"dag-pb",flush:!0};e.exports=(e=>(function(t,r,v){if("function"==typeof r&&(v=r,r={}),(r=Object.assign({},y,r)).parents=r.p||r.parents,r.cidVersion=r.cidVersion||0,!t)return v(new Error("no path given to Mkdir"));if((t=t.trim())===m)return v(r.parents?null:new Error(`cannot create directory '${m}': Already exists`));o(`Creating ${t}`);const w=d(t);n([r=>p(e,t,r),({mfsDirectory:t,mfsPath:r,root:n},i)=>{const o=d(r).slice(1);let h=0,p="";a(s(r,e.ipld,{fullPath:!0}),c(e=>e.name===o[h]&&(h++,!0)),u(e=>{const t=`${p}${p?"/":""}${o[e.depth]}`;if("dir"!==e.type)throw new Error(`cannot access ${t}: Not a directory`);return p=t,{cid:new l(e.hash),name:e.name}}),f(i))},(t,o)=>{if(w.unshift("/"),t.length===w.length)return o(new Error("file already exists"));i(w.map((e,t)=>({part:e,index:t})),({part:i,index:o},s)=>t[o]?s(null,{name:i,...t[o]}):o===w.length-1||r.parents?void n([t=>h(e,"directory",r,t),({cid:e,node:t},r)=>{r(null,{cid:e,size:t.size,name:i})}],s):s(new Error("file does not exist")),o)},(t,n)=>b(e,t,r,n),({cid:t},r)=>g(e,t,r)],e=>{e&&e.message.includes("file already exists")&&r.parents&&(e=null),v(e)})}))},function(e,t,r){"use strict";const n=r(184),i=r(37),o=r(142),s=r(99),a=r(195),c=r(73),u=r(47),f=r(72),{toMfsPath:l}=r(116),h=r(11)("ipfs:mfs:read-pull-stream"),p={offset:0,length:void 0};e.exports=(e=>(function(t,r={}){(r=Object.assign({},p,r)).length=r.length||r.count,h(`Reading ${t}`);const d=u.source();return i(o(t),s((t,r)=>l(e,t,r)),s(({mfsPath:t,root:o},s)=>(h(`Exporting ${t}`),i(n(t,e.ipld,{offset:r.offset,length:r.length}),f(s)))),a(),c(),f((e,r)=>{if(e)return d.abort(e);if(!r||!r.length)return d.abort(new Error(`${t} does not exist`));const n=r[0];return"file"!==n.type?d.abort(new Error(`${t} was not a file`)):n.content?(h(`Got ${t} content`),void d.resolve(r[0].content)):d.abort(new Error(`Could not load content stream from ${t}`))})),d}))},function(e,t,r){"use strict";const n=r(15);function i(e){if("number"==typeof e){if(i.codes[e])return i.codes[e];throw new Error("no protocol with code: "+e)}if("string"==typeof e||e instanceof String){if(i.names[e])return i.names[e];throw new Error("no protocol with name: "+e)}throw new Error("invalid protocol id type: "+e)}function o(e,t,r,n){return{code:e,size:t,name:r,resolvable:Boolean(n)}}i.lengthPrefixedVarSize=-1,i.V=-1,i.table=[[4,32,"ip4"],[6,16,"tcp"],[17,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[54,-1,"dns4","resolvable"],[55,-1,"dns6","resolvable"],[56,-1,"dnsaddr","resolvable"],[132,16,"sctp"],[302,0,"utp"],[421,i.lengthPrefixedVarSize,"ipfs"],[480,0,"http"],[443,0,"https"],[460,0,"quic"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[290,0,"p2p-circuit"]],i.names={},i.codes={},n(i.table,function(e){const t=o.apply(null,e);i.codes[t.code]=t,i.names[t.name]=t}),i.object=o,e.exports=i},function(e,t,r){"use strict";const n=r(955),i=(e,t)=>{switch(t){case"version":return e.version;case"timestamp":return e.timestamp;case"difficulty":return e.bits;case"nonce":return e.nonce;case"parent":return{"/":n.hashToCid(e.prevHash)};case"tx":return{"/":n.hashToCid(e.merkleRoot)};default:return null}};e.exports={multicodec:"bitcoin-block",defaultHashAlg:"dbl-sha2-256",resolve:(e,t,r)=>{"function"==typeof t&&(r=t,t=void 0),n.deserialize(e,(e,n)=>{if(e)return r(e);if(!t)return r(null,{value:n,remainderPath:""});const o=t.split("/"),s=i(n,o[0]);if(null===s)return r(new Error("No such path"),null);let a=o.slice(1).join("/");return void 0!==s["/"]?r(null,{value:s,remainderPath:a}):a.length>0?r(new Error("No such path"),null):r(null,{value:s,remainderPath:""})})},tree:(e,t,r)=>{"function"==typeof t&&(r=t,t=void 0),t=t||{},n.deserialize(e,(e,n)=>{if(e)return r(e);const o=["version","timestamp","difficulty","nonce","parent","tx"];if(!0===t.values){const e={};for(let t of o)e[t]=i(n,t);return r(null,e)}return r(null,o)})}}},function(e,t,r){var n=t;n.utils=r(123),n.common=r(301),n.sha=r(1796),n.ripemd=r(1800),n.hmac=r(1801),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(e,t){var r={Array:function(e){return null!=e&&e.constructor===Array},Boolean:function(e){return"boolean"==typeof e},Function:function(e){return"function"==typeof e},Nil:function(e){return null==e},Number:function(e){return"number"==typeof e},Object:function(e){return"object"==typeof e},String:function(e){return"string"==typeof e},"":function(){return!0}};for(var n in r.Null=r.Nil,r)r[n].toJSON=function(e){return e}.bind(null,n);e.exports=r},function(e,t,r){const n=r(3).Buffer,i=r(154),o=r(38),s=r(1817),a=r(48),c=r(65),u=r(124),f=r(962);function l(e){const t=e.length;return f.encodingLength(t)+t}function h(){this.version=1,this.locktime=0,this.ins=[],this.outs=[]}h.DEFAULT_SEQUENCE=4294967295,h.SIGHASH_ALL=1,h.SIGHASH_NONE=2,h.SIGHASH_SINGLE=3,h.SIGHASH_ANYONECANPAY=128,h.ADVANCED_TRANSACTION_MARKER=0,h.ADVANCED_TRANSACTION_FLAG=1;const p=n.allocUnsafe(0),d=[],g=n.from("0000000000000000000000000000000000000000000000000000000000000000","hex"),b=n.from("0000000000000000000000000000000000000000000000000000000000000001","hex"),m=n.from("ffffffffffffffff","hex"),y={script:p,valueBuffer:m};h.fromBuffer=function(e,t){let r=0;function n(t){return r+=t,e.slice(r-t,r)}function i(){const t=e.readUInt32LE(r);return r+=4,t}function o(){const t=s.readUInt64LE(e,r);return r+=8,t}function a(){const t=f.decode(e,r);return r+=f.decode.bytes,t}function c(){return n(a())}function u(){const e=a(),t=[];for(var r=0;r=this.ins.length)return b;const s=o.compile(o.decompile(t).filter(function(e){return e!==a.OP_CODESEPARATOR})),f=this.clone();if((31&r)===h.SIGHASH_NONE)f.outs=[],f.ins.forEach(function(t,r){r!==e&&(t.sequence=0)});else if((31&r)===h.SIGHASH_SINGLE){if(e>=this.outs.length)return b;f.outs.length=e+1;for(var l=0;l>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function c(e){for(var t=1,r=0;r126)throw new Error("Invalid prefix ("+e+")");t=a(t)^n>>5}for(t=a(t),r=0;r=r;)o-=r,a.push(i>>o&s);if(n)o>0&&a.push(i<=t)throw new Error("Excess padding");if(i<t)throw new TypeError("Exceeds length limit");var r=e.toLowerCase(),n=e.toUpperCase();if(e!==r&&e!==n)throw new Error("Mixed-case string "+e);var o=(e=r).lastIndexOf("1");if(-1===o)throw new Error("No separator character for "+e);if(0===o)throw new Error("Missing prefix for "+e);var s=e.slice(0,o),u=e.slice(o+1);if(u.length<6)throw new Error("Data too short");for(var f=c(s),l=[],h=0;h=u.length||l.push(d)}if(1!==f)throw new Error("Invalid checksum for "+e);return{prefix:s,words:l}},encode:function(e,t,r){if(r=r||90,e.length+7+t.length>r)throw new TypeError("Exceeds length limit");for(var i=c(e=e.toLowerCase()),o=e+"1",s=0;s>5!=0)throw new Error("Non 5-bit word");i=a(i)^u,o+=n.charAt(u)}for(s=0;s<6;++s)i=a(i);for(i^=1,s=0;s<6;++s){var f=i>>5*(5-s)&31;o+=n.charAt(f)}return o},toWords:function(e){return u(e,8,5,!0)},fromWords:function(e){return u(e,5,8,!1)}}},function(e,t,r){const n=r(1820),i=r(1821),o=r(1822),s=r(1823),a=r(1824),c=r(1825),u=r(1826);e.exports={embed:n,p2ms:i,p2pk:o,p2pkh:s,p2sh:a,p2wpkh:c,p2wsh:u}},function(e,t,r){e.exports={input:r(1828),output:r(1829)}},function(e,t,r){e.exports={input:r(1831),output:r(1832)}},function(e,t,r){e.exports={input:r(1833),output:r(1834)}},function(e,t,r){"use strict";(function(t){const n=r(85),i=r(10),o=r(192),s=r(303),a=r(1876),c=r(304),u=r(305);r(1877),r(971),r(970),r(972);function f(e){return e.map(e=>e.toString(16)).join("/")}e.exports=function(e,r){const l=u(e,a,function(o,s,u){!function t(r,i,o){let s=[];"leaf"===r.type&&s.push({path:f(r.getKey()),value:r.getValue()});n(r.getChildren(),(r,n)=>{const o=f(r[0]),u=r[1];if(a.isRawNode(u)){const e=new a(u);s.push({path:o,value:e}),t(e,i,(e,t)=>{if(e)return n(e);t.forEach(e=>{e.path=o+"/"+e.path}),s=s.concat(t),n()})}else{let t={"/":c(e,u).toBaseEncodedString()};s.push({path:o,value:t}),n()}},e=>{if(e)return o(e);o(null,s)})}(o,s,(e,o)=>{if(e)return u(e);if(!r)return u(null,o);let a=o.slice();const c=o.filter(e=>t.isBuffer(e.value));n(c,(e,t)=>i([t=>r.util.deserialize(e.value,t),(e,t)=>r.resolver._mapFromEthObject(e,s,t)],(r,n)=>{if(r)return t(r);n.forEach(t=>{a.push({path:e.path+"/"+t.path,value:t.value})}),t()}),e=>{if(e)return u(e);u(null,a)})})});return l.util.deserialize=o(e=>{const t=s.decode(e);return new a(t)}),l}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(978),i=(e,t)=>{switch(t){case"version":return e.version;case"timestamp":return e.time;case"difficulty":return e.bits;case"nonce":return e.nonce;case"solution":return e.solution;case"reserved":return e.reserved;case"parent":return{"/":n.hashToCid(e.prevHash)};case"tx":return{"/":n.hashToCid(e.merkleRoot)};default:return null}};e.exports={multicodec:"zcash-block",defaultHashAlg:"dbl-sha2-256",resolve:(e,t,r)=>{"function"==typeof t&&(r=t,t=void 0),n.deserialize(e,(e,n)=>{if(e)return r(e);if(!t)return r(null,{value:n,remainderPath:""});const o=t.split("/"),s=i(n,o[0]);if(null===s)return r(new Error("No such path"),null);let a=o.slice(1).join("/");return void 0!==s["/"]?r(null,{value:s,remainderPath:a}):a.length>0?r(new Error("No such path"),null):r(null,{value:s,remainderPath:""})})},tree:(e,t,r)=>{"function"==typeof t&&(r=t,t=void 0),t=t||{},n.deserialize(e,(e,n)=>{if(e)return r(e);const o=["version","timestamp","difficulty","nonce","solution","reserved","parent","tx"];if(!0===t.values){const e={};for(let t of o)e[t]=i(n,t);return r(null,e)}return r(null,o)})}}},function(e,t,r){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(212),t.createHash=t.Hash=r(306),t.createHmac=t.Hmac=r(983);var n=r(1899),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return o};var s=r(986);t.pbkdf2=s.pbkdf2,t.pbkdf2Sync=s.pbkdf2Sync;var a=r(1901);t.Cipher=a.Cipher,t.createCipher=a.createCipher,t.Cipheriv=a.Cipheriv,t.createCipheriv=a.createCipheriv,t.Decipher=a.Decipher,t.createDecipher=a.createDecipher,t.Decipheriv=a.Decipheriv,t.createDecipheriv=a.createDecipheriv,t.getCiphers=a.getCiphers,t.listCiphers=a.listCiphers;var c=r(1918);t.DiffieHellmanGroup=c.DiffieHellmanGroup,t.createDiffieHellmanGroup=c.createDiffieHellmanGroup,t.getDiffieHellman=c.getDiffieHellman,t.createDiffieHellman=c.createDiffieHellman,t.DiffieHellman=c.DiffieHellman;var u=r(1923);t.createSign=u.createSign,t.Sign=u.Sign,t.createVerify=u.createVerify,t.Verify=u.Verify,t.createECDH=r(1959);var f=r(1960);t.publicEncrypt=f.publicEncrypt,t.privateEncrypt=f.privateEncrypt,t.publicDecrypt=f.publicDecrypt,t.privateDecrypt=f.privateDecrypt;var l=r(1963);t.randomFill=l.randomFill,t.randomFillSync=l.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(e,t,r){"use strict";var n=r(22),i=r(980),o=r(27).Buffer,s=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function c(e,t){return e<>>32-t}function u(e,t,r,n,i,o,s){return c(e+(t&r|~t&n)+i+o|0,s)+t|0}function f(e,t,r,n,i,o,s){return c(e+(t&n|r&~n)+i+o|0,s)+t|0}function l(e,t,r,n,i,o,s){return c(e+(t^r^n)+i+o|0,s)+t|0}function h(e,t,r,n,i,o,s){return c(e+(r^(t|~n))+i+o|0,s)+t|0}n(a,i),a.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=u(r,n,i,o,e[0],3614090360,7),o=u(o,r,n,i,e[1],3905402710,12),i=u(i,o,r,n,e[2],606105819,17),n=u(n,i,o,r,e[3],3250441966,22),r=u(r,n,i,o,e[4],4118548399,7),o=u(o,r,n,i,e[5],1200080426,12),i=u(i,o,r,n,e[6],2821735955,17),n=u(n,i,o,r,e[7],4249261313,22),r=u(r,n,i,o,e[8],1770035416,7),o=u(o,r,n,i,e[9],2336552879,12),i=u(i,o,r,n,e[10],4294925233,17),n=u(n,i,o,r,e[11],2304563134,22),r=u(r,n,i,o,e[12],1804603682,7),o=u(o,r,n,i,e[13],4254626195,12),i=u(i,o,r,n,e[14],2792965006,17),r=f(r,n=u(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=f(o,r,n,i,e[6],3225465664,9),i=f(i,o,r,n,e[11],643717713,14),n=f(n,i,o,r,e[0],3921069994,20),r=f(r,n,i,o,e[5],3593408605,5),o=f(o,r,n,i,e[10],38016083,9),i=f(i,o,r,n,e[15],3634488961,14),n=f(n,i,o,r,e[4],3889429448,20),r=f(r,n,i,o,e[9],568446438,5),o=f(o,r,n,i,e[14],3275163606,9),i=f(i,o,r,n,e[3],4107603335,14),n=f(n,i,o,r,e[8],1163531501,20),r=f(r,n,i,o,e[13],2850285829,5),o=f(o,r,n,i,e[2],4243563512,9),i=f(i,o,r,n,e[7],1735328473,14),r=l(r,n=f(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=l(o,r,n,i,e[8],2272392833,11),i=l(i,o,r,n,e[11],1839030562,16),n=l(n,i,o,r,e[14],4259657740,23),r=l(r,n,i,o,e[1],2763975236,4),o=l(o,r,n,i,e[4],1272893353,11),i=l(i,o,r,n,e[7],4139469664,16),n=l(n,i,o,r,e[10],3200236656,23),r=l(r,n,i,o,e[13],681279174,4),o=l(o,r,n,i,e[0],3936430074,11),i=l(i,o,r,n,e[3],3572445317,16),n=l(n,i,o,r,e[6],76029189,23),r=l(r,n,i,o,e[9],3654602809,4),o=l(o,r,n,i,e[12],3873151461,11),i=l(i,o,r,n,e[15],530742520,16),r=h(r,n=l(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=h(o,r,n,i,e[7],1126891415,10),i=h(i,o,r,n,e[14],2878612391,15),n=h(n,i,o,r,e[5],4237533241,21),r=h(r,n,i,o,e[12],1700485571,6),o=h(o,r,n,i,e[3],2399980690,10),i=h(i,o,r,n,e[10],4293915773,15),n=h(n,i,o,r,e[1],2240044497,21),r=h(r,n,i,o,e[8],1873313359,6),o=h(o,r,n,i,e[15],4264355552,10),i=h(i,o,r,n,e[6],2734768916,15),n=h(n,i,o,r,e[13],1309151649,21),r=h(r,n,i,o,e[4],4149444226,6),o=h(o,r,n,i,e[11],3174756917,10),i=h(i,o,r,n,e[2],718787259,15),n=h(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=a},function(e,t,r){"use strict";var n=r(0).Buffer,i=r(22),o=r(980),s=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],l=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function p(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function d(e,t){return e<>>32-t}function g(e,t,r,n,i,o,s,a){return d(e+(t^r^n)+o+s|0,a)+i|0}function b(e,t,r,n,i,o,s,a){return d(e+(t&r|~t&n)+o+s|0,a)+i|0}function m(e,t,r,n,i,o,s,a){return d(e+((t|~r)^n)+o+s|0,a)+i|0}function y(e,t,r,n,i,o,s,a){return d(e+(t&n|r&~n)+o+s|0,a)+i|0}function v(e,t,r,n,i,o,s,a){return d(e+(t^(r|~n))+o+s|0,a)+i|0}i(p,o),p.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,p=0|this._e,w=0|this._a,A=0|this._b,_=0|this._c,S=0|this._d,E=0|this._e,k=0;k<80;k+=1){var x,C;k<16?(x=g(r,n,i,o,p,e[a[k]],l[0],u[k]),C=v(w,A,_,S,E,e[c[k]],h[0],f[k])):k<32?(x=b(r,n,i,o,p,e[a[k]],l[1],u[k]),C=y(w,A,_,S,E,e[c[k]],h[1],f[k])):k<48?(x=m(r,n,i,o,p,e[a[k]],l[2],u[k]),C=m(w,A,_,S,E,e[c[k]],h[2],f[k])):k<64?(x=y(r,n,i,o,p,e[a[k]],l[3],u[k]),C=b(w,A,_,S,E,e[c[k]],h[3],f[k])):(x=v(r,n,i,o,p,e[a[k]],l[4],u[k]),C=g(w,A,_,S,E,e[c[k]],h[4],f[k])),r=p,p=o,o=d(i,10),i=n,n=x,w=E,E=S,S=d(_,10),_=A,A=C}var I=this._b+i+S|0;this._b=this._c+o+E|0,this._c=this._d+p+w|0,this._d=this._e+r+A|0,this._e=this._a+n+_|0,this._a=I},p.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=p},function(e,t,r){(t=e.exports=function(e){e=e.toLowerCase();var r=t[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r}).sha=r(1894),t.sha1=r(1895),t.sha224=r(1896),t.sha256=r(981),t.sha384=r(1897),t.sha512=r(982)},function(e,t,r){"use strict";t.utils=r(1903),t.Cipher=r(1904),t.DES=r(1905),t.CBC=r(1906),t.EDE=r(1907)},function(e,t,r){var n=r(1908),i=r(1916),o=r(992);t.createCipher=t.Cipher=n.createCipher,t.createCipheriv=t.Cipheriv=n.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(o)}},function(e,t,r){var n={ECB:r(1909),CBC:r(1910),CFB:r(1911),CFB8:r(1912),CFB1:r(1913),OFB:r(1914),CTR:r(990),GCM:r(990)},i=r(992);for(var o in i)i[o].module=n[i[o].mode];e.exports=i},function(e,t,r){(function(t){var n=r(54),i=r(212);function o(e,r){var i=function(e){var t=s(e);return{blinder:t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(r),o=r.modulus.byteLength(),a=(n.mont(r.modulus),new n(e).mul(i.blinder).umod(r.modulus)),c=a.toRed(n.mont(r.prime1)),u=a.toRed(n.mont(r.prime2)),f=r.coefficient,l=r.prime1,h=r.prime2,p=c.redPow(r.exponent1),d=u.redPow(r.exponent2);p=p.fromRed(),d=d.fromRed();var g=p.isub(d).imul(f).umod(l);return g.imul(h),d.iadd(g),new t(d.imul(i.unblinder).umod(r.modulus).toArray(!1,o))}function s(e){for(var t=e.modulus.byteLength(),r=new n(i(t));r.cmp(e.modulus)>=0||!r.umod(e.prime1)||!r.umod(e.prime2);)r=new n(i(t));return r}e.exports=o,o.getr=s}).call(this,r(0).Buffer)},function(e,t,r){var n=t;n.utils=r(126),n.common=r(308),n.sha=r(1932),n.ripemd=r(1936),n.hmac=r(1937),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(e,t,r){"use strict";(function(t){var n=r(30),i=r(32),o=r(40),s=r(62);function a(e){if(!(this instanceof a))return new a(e);var t;if(n.isNumber(e))t=e;else{if(!n.isString(e))throw new TypeError('Unrecognized num type: "'+typeof e+'" for Opcode');t=a.map[e]}return s.defineImmutable(this,{num:t}),this}for(var c in a.fromBuffer=function(e){return i.checkArgument(o.isBuffer(e)),new a(Number("0x"+e.toString("hex")))},a.fromNumber=function(e){return i.checkArgument(n.isNumber(e)),new a(e)},a.fromString=function(e){i.checkArgument(n.isString(e));var t=a.map[e];if(void 0===t)throw new TypeError("Invalid opcodestr");return new a(t)},a.prototype.toHex=function(){return this.num.toString(16)},a.prototype.toBuffer=function(){return new t(this.toHex(),"hex")},a.prototype.toNumber=function(){return this.num},a.prototype.toString=function(){var e=a.reverseMap[this.num];if(void 0===e)throw new Error("Opcode does not have a string representation");return e},a.smallInt=function(e){return i.checkArgument(n.isNumber(e),"Invalid Argument: n should be number"),i.checkArgument(e>=0&&e<=16,"Invalid Argument: n must be between 0 and 16"),0===e?a("OP_0"):new a(a.map.OP_1+e-1)},a.map={OP_FALSE:0,OP_0:0,OP_PUSHDATA1:76,OP_PUSHDATA2:77,OP_PUSHDATA4:78,OP_1NEGATE:79,OP_RESERVED:80,OP_TRUE:81,OP_1:81,OP_2:82,OP_3:83,OP_4:84,OP_5:85,OP_6:86,OP_7:87,OP_8:88,OP_9:89,OP_10:90,OP_11:91,OP_12:92,OP_13:93,OP_14:94,OP_15:95,OP_16:96,OP_NOP:97,OP_VER:98,OP_IF:99,OP_NOTIF:100,OP_VERIF:101,OP_VERNOTIF:102,OP_ELSE:103,OP_ENDIF:104,OP_VERIFY:105,OP_RETURN:106,OP_TOALTSTACK:107,OP_FROMALTSTACK:108,OP_2DROP:109,OP_2DUP:110,OP_3DUP:111,OP_2OVER:112,OP_2ROT:113,OP_2SWAP:114,OP_IFDUP:115,OP_DEPTH:116,OP_DROP:117,OP_DUP:118,OP_NIP:119,OP_OVER:120,OP_PICK:121,OP_ROLL:122,OP_ROT:123,OP_SWAP:124,OP_TUCK:125,OP_CAT:126,OP_SUBSTR:127,OP_LEFT:128,OP_RIGHT:129,OP_SIZE:130,OP_INVERT:131,OP_AND:132,OP_OR:133,OP_XOR:134,OP_EQUAL:135,OP_EQUALVERIFY:136,OP_RESERVED1:137,OP_RESERVED2:138,OP_1ADD:139,OP_1SUB:140,OP_2MUL:141,OP_2DIV:142,OP_NEGATE:143,OP_ABS:144,OP_NOT:145,OP_0NOTEQUAL:146,OP_ADD:147,OP_SUB:148,OP_MUL:149,OP_DIV:150,OP_MOD:151,OP_LSHIFT:152,OP_RSHIFT:153,OP_BOOLAND:154,OP_BOOLOR:155,OP_NUMEQUAL:156,OP_NUMEQUALVERIFY:157,OP_NUMNOTEQUAL:158,OP_LESSTHAN:159,OP_GREATERTHAN:160,OP_LESSTHANOREQUAL:161,OP_GREATERTHANOREQUAL:162,OP_MIN:163,OP_MAX:164,OP_WITHIN:165,OP_RIPEMD160:166,OP_SHA1:167,OP_SHA256:168,OP_HASH160:169,OP_HASH256:170,OP_CODESEPARATOR:171,OP_CHECKSIG:172,OP_CHECKSIGVERIFY:173,OP_CHECKMULTISIG:174,OP_CHECKMULTISIGVERIFY:175,OP_CHECKLOCKTIMEVERIFY:177,OP_NOP1:176,OP_NOP2:177,OP_NOP3:178,OP_NOP4:179,OP_NOP5:180,OP_NOP6:181,OP_NOP7:182,OP_NOP8:183,OP_NOP9:184,OP_NOP10:185,OP_PUBKEYHASH:253,OP_PUBKEY:254,OP_INVALIDOPCODE:255},a.reverseMap=[],a.map)a.reverseMap[a.map[c]]=c;n.extend(a,a.map),a.isSmallIntOp=function(e){return e instanceof a&&(e=e.toNumber()),e===a.map.OP_0||e>=a.map.OP_1&&e<=a.map.OP_16},a.prototype.inspect=function(){return""},e.exports=a}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){var n=r(30),i=r(32),o=r(0),s=t.compare||r(1980),a=r(118),c=r(40),u=r(62),f=r(156),l=r(102),h=r(87),p=r(119),d=r(157),g=r(189),b=r(1012),m=r(726),y=m.PublicKeyHash,v=m.PublicKey,w=m.MultiSigScriptHash,A=m.MultiSig,_=r(158),S=r(120),E=r(380),k=r(69),x=r(1985);function C(e){if(!(this instanceof C))return new C(e);if(this.inputs=[],this.outputs=[],this.joinSplits=[],this._inputAmount=void 0,this._outputAmount=void 0,e){if(e instanceof C)return C.shallowCopy(e);if(u.isHexa(e))this.fromString(e);else if(c.isBuffer(e))this.fromBuffer(e);else{if(!n.isObject(e))throw new a.InvalidArgument("Must provide an object or string to deserialize a transaction");this.fromObject(e)}}else this._newTransaction()}C.DUST_AMOUNT=546,C.FEE_SECURITY_MARGIN=15,C.MAX_MONEY=21e14,C.NLOCKTIME_BLOCKHEIGHT_LIMIT=5e8,C.NLOCKTIME_MAX_VALUE=4294967295,C.FEE_PER_KB=1e4,C.CHANGE_OUTPUT_MAX_SIZE=62,C.MAXIMUM_EXTRA_SIZE=26,C.shallowCopy=function(e){return new C(e.toBuffer())};var I={configurable:!1,enumerable:!0,get:function(){return new f(this._getHash()).readReverse().toString("hex")}};Object.defineProperty(C.prototype,"hash",I),Object.defineProperty(C.prototype,"id",I);var B={configurable:!1,enumerable:!0,get:function(){return this._getInputAmount()}};Object.defineProperty(C.prototype,"inputAmount",B),B.get=function(){return this._getOutputAmount()},Object.defineProperty(C.prototype,"outputAmount",B),C.prototype._getHash=function(){return h.sha256sha256(this.toBuffer())},C.prototype.serialize=function(e){return!0===e||e&&e.disableAll?this.uncheckedSerialize():this.checkedSerialize(e)},C.prototype.uncheckedSerialize=C.prototype.toString=function(){return this.toBuffer().toString("hex")},C.prototype.checkedSerialize=function(e){var t=this.getSerializationError(e);if(t)throw t.message+=" Use Transaction#uncheckedSerialize if you want to skip security checks. See http://bitcore.io/guide/transaction.html#Serialization for more info.",t;return this.uncheckedSerialize()},C.prototype.invalidSatoshis=function(){for(var e=!1,t=0;tr)return this._missingChange()?new a.Transaction.ChangeAddressMissing("Fee is too large and no change address was provided"):new a.Transaction.FeeError.TooLarge("expected less than "+r+" but got "+t)}if(!e.disableSmallFees){var i=Math.ceil(this._estimateFee()/C.FEE_SECURITY_MARGIN);if(t"},C.prototype.toBuffer=function(){var e=new l;return this.toBufferWriter(e).toBuffer()},C.prototype.toBufferWriter=function(e){return e.writeUInt32LE(this.version),e.writeVarintNum(this.inputs.length),n.each(this.inputs,function(t){t.toBufferWriter(e)}),e.writeVarintNum(this.outputs.length),n.each(this.outputs,function(t){t.toBufferWriter(e)}),e.writeUInt32LE(this.nLockTime),this.version>=2&&(e.writeVarintNum(this.joinSplits.length),n.each(this.joinSplits,function(t){t.toBufferWriter(e)}),this.joinSplits.length>0&&(e.write(this.joinSplitPubKey),e.write(this.joinSplitSig))),e},C.prototype.fromBuffer=function(e){var t=new f(e);return this.fromBufferReader(t)},C.prototype.fromBufferReader=function(e){var t,r,n,o;for(i.checkArgument(!e.finished(),"No transaction data received"),this.version=e.readUInt32LE(),r=e.readVarintNum(),t=0;t=2){for(o=e.readVarintNum(),t=0;t0&&(this.joinSplitPubKey=e.read(32),this.joinSplitSig=e.read(64))}return this},C.prototype.toObject=C.prototype.toJSON=function(){var e=[];this.inputs.forEach(function(t){e.push(t.toObject())});var t=[];this.outputs.forEach(function(e){t.push(e.toObject())});var r={hash:this.hash,version:this.version,inputs:e,outputs:t,nLockTime:this.nLockTime};if(this.version>=2){var i=[];this.joinSplits.forEach(function(e){i.push(e.toObject())}),r.joinSplits=i,this.joinSplits.length>0&&(r.joinSplitPubKey=c.reverse(this.joinSplitPubKey).toString("hex"),r.joinSplitSig=this.joinSplitSig.toString("hex"))}return this._changeScript&&(r.changeScript=this._changeScript.toString()),n.isUndefined(this._changeIndex)||(r.changeIndex=this._changeIndex),n.isUndefined(this._fee)||(r.fee=this._fee),r},C.prototype.fromObject=function(e){i.checkArgument(n.isObject(e)||e instanceof C);var r,o=this;return r=e instanceof C?r.toObject():e,n.each(r.inputs,function(e){if(e.output&&e.output.script){var t,r=new S(e.output.script);if(r.isPublicKeyHashOut())t=new m.PublicKeyHash(e);else if(r.isScriptHashOut()&&e.publicKeys&&e.threshold)t=new m.MultiSigScriptHash(e,e.publicKeys,e.threshold,e.signatures);else{if(!r.isPublicKeyOut())throw new a.Transaction.Input.UnsupportedScript(e.output.script);t=new m.PublicKey(e)}o.addInput(t)}else o.uncheckedAddInput(new m(e))}),n.each(r.outputs,function(e){o.addOutput(new _(e))}),r.changeIndex&&(this._changeIndex=r.changeIndex),r.changeScript&&(this._changeScript=new S(r.changeScript)),r.fee&&(this._fee=r.fee),this.nLockTime=r.nLockTime,this.version=r.version,this.version>=2&&(n.each(r.joinSplits,function(e){o.joinSplits.push(new x(e))}),o.joinSplits.length>0&&(o.joinSplitPubKey=c.reverse(new t(r.joinSplitPubKey,"hex")),o.joinSplitSig=new t(r.joinSplitSig,"hex"))),this._checkConsistency(e),this},C.prototype._checkConsistency=function(e){n.isUndefined(this._changeIndex)||(i.checkState(this._changeScript),i.checkState(this.outputs[this._changeIndex]),i.checkState(this.outputs[this._changeIndex].script.toString()===this._changeScript.toString())),e&&e.hash&&i.checkState(e.hash===this.hash,"Hash in object does not match transaction hash")},C.prototype.lockUntilDate=function(e){if(i.checkArgument(e),n.isNumber(e)&&e=C.NLOCKTIME_BLOCKHEIGHT_LIMIT)throw new a.Transaction.BlockHeightTooHigh;if(e<0)throw new a.Transaction.NLockTimeOutOfRange;for(var t=0;t0?(this._changeIndex=this.outputs.length,this._addOutput(new _({script:this._changeScript,satoshis:e}))):this._changeIndex=void 0}},C.prototype.getFee=function(){return this.isCoinbase()?0:n.isUndefined(this._fee)?this._changeScript?this._estimateFee():this._getUnspentValue():this._fee},C.prototype._estimateFee=function(){var e=this._estimateSize(),t=this._getUnspentValue();return C._estimateFee(e,t,this._feePerKb)},C.prototype._getUnspentValue=function(){return this._getInputAmount()-this._getOutputAmount()},C.prototype._clearSignatures=function(){n.each(this.inputs,function(e){e.clearSignatures()})},C._estimateFee=function(e,t,r){return t>Math.ceil(e/1e3)*(r||C.FEE_PER_KB)&&(e+=C.CHANGE_OUTPUT_MAX_SIZE),Math.ceil(e/1e3)*(r||C.FEE_PER_KB)},C.prototype._estimateSize=function(){var e=C.MAXIMUM_EXTRA_SIZE;return n.each(this.inputs,function(t){e+=t._estimateSize()}),n.each(this.outputs,function(t){e+=t.script.toBuffer().length+9}),e},C.prototype._removeOutput=function(e){var t=this.outputs[e];this.outputs=n.without(this.outputs,t),this._outputAmount=void 0},C.prototype.removeOutput=function(e){this._removeOutput(e),this._updateChangeOutput()},C.prototype.sort=function(){return this.sortInputs(function(e){var t=Array.prototype.concat.apply([],e);return t.sort(function(e,t){return s(e.prevTxId,t.prevTxId)||e.outputIndex-t.outputIndex}),t}),this.sortOutputs(function(e){var t=Array.prototype.concat.apply([],e);return t.sort(function(e,t){return e.satoshis-t.satoshis||s(e.script.toBuffer(),t.script.toBuffer())}),t}),this},C.prototype.shuffleOutputs=function(){return this.sortOutputs(n.shuffle)},C.prototype.sortOutputs=function(e){var t=e(this.outputs);return this._newOutputOrder(t)},C.prototype.sortInputs=function(e){return this.inputs=e(this.inputs),this._clearSignatures(),this},C.prototype._newOutputOrder=function(e){if(this.outputs.length!==e.length||0!==n.difference(this.outputs,e).length)throw new a.Transaction.InvalidSorting;if(!n.isUndefined(this._changeIndex)){var t=this.outputs[this._changeIndex];this._changeIndex=n.findIndex(e,t)}return this.outputs=e,this},C.prototype.removeInput=function(e,t){var r;if((r=!t&&n.isNumber(e)?e:n.findIndex(this.inputs,function(r){return r.prevTxId.toString("hex")===e&&r.outputIndex===t}))<0||r>=this.inputs.length)throw new a.Transaction.InvalidIndex(r,this.inputs.length);var i=this.inputs[r];this.inputs=n.without(this.inputs,i),this._inputAmount=void 0,this._updateChangeOutput()},C.prototype.sign=function(e,t){i.checkState(this.hasAllUtxoInfo());var r=this;return n.isArray(e)?(n.each(e,function(e){r.sign(e,t)}),this):(n.each(this.getSignatures(e,t),function(e){r.applySignature(e)}),this)},C.prototype.getSignatures=function(e,t){e=new E(e),t=t||p.SIGHASH_ALL;var r=this,i=[],o=h.sha256ripemd160(e.publicKey.toBuffer());return n.each(this.inputs,function(s,a){n.each(s.getSignatures(r,e,a,t,o),function(e){i.push(e)})}),i},C.prototype.applySignature=function(e){return this.inputs[e.inputIndex].addSignature(this,e),this},C.prototype.isFullySigned=function(){return n.each(this.inputs,function(e){if(e.isFullySigned===m.prototype.isFullySigned)throw new a.Transaction.UnableToVerifySignature("Unrecognized script kind, or not enough information to execute script.This usually happens when creating a transaction from a serialized transaction")}),n.all(n.map(this.inputs,function(e){return e.isFullySigned()}))},C.prototype.isValidSignature=function(e){if(this.inputs[e.inputIndex].isValidSignature===m.prototype.isValidSignature)throw new a.Transaction.UnableToVerifySignature("Unrecognized script kind, or not enough information to execute script.This usually happens when creating a transaction from a serialized transaction");return this.inputs[e.inputIndex].isValidSignature(this,e)},C.prototype.verifySignature=function(e,t,r,n){return d.verify(this,e,t,r,n)},C.prototype.verify=function(){if(0===this.inputs.length)return"transaction txins empty";if(0===this.outputs.length)return"transaction txouts empty";for(var e=new k(0),t=0;t1e6)return"transaction over the maximum block size";var i={};for(t=0;t100)return"coinbase transaction script size invalid"}else for(t=0;t=m.MAXINT-1&&(t.sequenceNumber=m.DEFAULT_RBF_SEQNUMBER)}return this},e.exports=C}).call(this,r(0).Buffer)},function(e,t,r){e.exports=r(312),e.exports.PublicKey=r(1981),e.exports.PublicKeyHash=r(1982),e.exports.MultiSig=r(1983),e.exports.MultiSigScriptHash=r(1984)},function(e,t,r){"use strict";var n=r(30),i=r(118),o=r(32),s={BTC:[1e8,8],mBTC:[1e5,5],uBTC:[100,2],bits:[100,2],satoshis:[1,0]};function a(e,t){if(!(this instanceof a))return new a(e,t);if(n.isNumber(t)){if(t<=0)throw new i.Unit.InvalidRate(t);e/=t,t=a.BTC}this._value=this._from(e,t);var r=this;Object.keys(s).forEach(function(e){Object.defineProperty(r,e,{get:function(){return r.to(e)},enumerable:!0})})}Object.keys(s).forEach(function(e){a[e]=e}),a.fromObject=function(e){return o.checkArgument(n.isObject(e),"Argument is expected to be an object"),new a(e.amount,e.code)},a.fromBTC=function(e){return new a(e,a.BTC)},a.fromMillis=a.fromMilis=function(e){return new a(e,a.mBTC)},a.fromMicros=a.fromBits=function(e){return new a(e,a.bits)},a.fromSatoshis=function(e){return new a(e,a.satoshis)},a.fromFiat=function(e,t){return new a(e,t)},a.prototype._from=function(e,t){if(!s[t])throw new i.Unit.UnknownCode(t);return parseInt((e*s[t][0]).toFixed())},a.prototype.to=function(e){if(n.isNumber(e)){if(e<=0)throw new i.Unit.InvalidRate(e);return parseFloat((this.BTC*e).toFixed(2))}if(!s[e])throw new i.Unit.UnknownCode(e);var t=this._value/s[e][0];return parseFloat(t.toFixed(s[e][1]))},a.prototype.toBTC=function(){return this.to(a.BTC)},a.prototype.toMillis=a.prototype.toMilis=function(){return this.to(a.mBTC)},a.prototype.toMicros=a.prototype.toBits=function(){return this.to(a.bits)},a.prototype.toSatoshis=function(){return this.to(a.satoshis)},a.prototype.atRate=function(e){return this.to(e)},a.prototype.toString=function(){return this.satoshis+" satoshis"},a.prototype.toObject=a.prototype.toJSON=function(){return{amount:this.BTC,code:a.BTC}},a.prototype.inspect=function(){return""},e.exports=a},function(e,t,r){"use strict";e.exports={_cache:{},_count:0,_eraseIndex:0,_usedList:{},_usedIndex:{},_CACHE_SIZE:5e3,get:function(e,t,r){var n=e+"/"+t+"/"+(r=!!r);if(this._cache[n])return this._cacheHit(n),this._cache[n]},set:function(e,t,r,n){var i=e+"/"+t+"/"+(r=!!r);this._cache[i]=n,this._cacheHit(i)},_cacheHit:function(e){this._usedIndex[e]&&delete this._usedList[this._usedIndex[e]],this._usedList[this._count]=e,this._usedIndex[e]=this._count,this._count++,this._cacheRemove()},_cacheRemove:function(){for(;this._eraseIndex-1&&e%1==0&&e<=r}},function(e,t,r){var n=r(734),i=r(1032),o=r(152);e.exports=function(e){return o(e)?n(e):i(e)}},function(e,t,r){var n=r(1026),i=r(621),o=r(105),s=r(735),a=r(736),c=r(737),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=o(e),f=!r&&i(e),l=!r&&!f&&s(e),h=!r&&!f&&!l&&c(e),p=r||f||l||h,d=p?n(e.length,String):[],g=d.length;for(var b in e)!t&&!u.call(e,b)||p&&("length"==b||l&&("offset"==b||"parent"==b)||h&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||a(b,g))||d.push(b);return d}},function(e,t,r){(function(e){var n=r(199),i=r(1028),o=t&&!t.nodeType&&t,s=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=s&&s.exports===o?n.Buffer:void 0,c=(a?a.isBuffer:void 0)||i;e.exports=c}).call(this,r(39)(e))},function(e,t){var r=9007199254740991,n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var i=typeof e;return!!(t=null==t?r:t)&&("number"==i||"symbol"!=i&&n.test(e))&&e>-1&&e%1==0&&e>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 L(e,t,r){O.call(this,e,t,r)}O.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(s);if(null===e)throw new Error(s);if(p&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||p&&ArrayBuffer.isView(e)))throw new Error(s);t=!0}for(var n,i,o=this.blocks,a=this.byteCount,c=e.length,u=this.blockCount,l=0,f=this.s;l>2]|=e[l]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(o[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=o[u],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},O.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(s);if(null===e)throw new Error(s);if(p&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||p&&ArrayBuffer.isView(e)))throw new Error(s);t=!0}var n=0,i=e.length;if(t)n=i;else for(var o=0;o=57344?n+=3:(a=65536+((1023&a)<<10|1023&e.charCodeAt(++o)),n+=4)}return n+=this.encode(8*n),this.update(e),n},O.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]+h[15&e]+h[e>>12&15]+h[e>>8&15]+h[e>>20&15]+h[e>>16&15]+h[e>>28&15]+h[e>>24&15];s%t==0&&(U(r),o=0)}return i&&(e=r[o],a+=h[e>>4&15]+h[15&e],i>1&&(a+=h[e>>12&15]+h[e>>8&15]),i>2&&(a+=h[e>>20&15]+h[e>>16&15])),a},O.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,s=0,a=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(a);for(var c=new Uint32Array(e);s>8&255,c[e+2]=t>>16&255,c[e+3]=t>>24&255;a%r==0&&U(n)}return o&&(e=a<<2,t=n[s],c[e]=255&t,o>1&&(c[e+1]=t>>8&255),o>2&&(c[e+2]=t>>16&255)),c},L.prototype=new O,L.prototype.finalize=function(){return this.encode(this.outputBits,!0),O.prototype.finalize.call(this)};var U=function(e){var t,r,n,i,o,s,a,c,u,l,f,p,h,d,m,y,b,v,A,w,E,k,S,_,x,C,I,B,R,T,N,P,M,D,O,L,U,j,F,K,V,z,G,q,H,Y,J,W,Z,Q,X,$,ee,te,re,ne,ie,oe,se,ae,ce,ue,le;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(p=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|a>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(a<<1|s>>>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^(c<<1|u>>>31),r=o^(u<<1|c>>>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=s^(l<<1|f>>>31),r=a^(f<<1|l>>>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=c^(p<<1|h>>>31),r=u^(h<<1|p>>>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=l^(i<<1|o>>>31),r=f^(o<<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,d=e[0],m=e[1],Y=e[11]<<4|e[10]>>>28,J=e[10]<<4|e[11]>>>28,B=e[20]<<3|e[21]>>>29,R=e[21]<<3|e[20]>>>29,ae=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,z=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,D=e[2]<<1|e[3]>>>31,O=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,W=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,T=e[33]<<13|e[32]>>>19,N=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,U=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,A=e[24]<<11|e[25]>>>21,Q=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,P=e[45]<<29|e[44]>>>3,M=e[44]<<29|e[45]>>>3,_=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,j=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,E=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,q=e[8]<<27|e[9]>>>5,H=e[9]<<27|e[8]>>>5,C=e[18]<<20|e[19]>>>12,I=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,K=e[38]<<8|e[39]>>>24,V=e[39]<<8|e[38]>>>24,k=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=d^~y&v,e[1]=m^~b&A,e[10]=_^~C&B,e[11]=x^~I&R,e[20]=D^~L&j,e[21]=O^~U&F,e[30]=q^~Y&W,e[31]=H^~J&Z,e[40]=te^~ne&oe,e[41]=re^~ie&se,e[2]=y^~v&w,e[3]=b^~A&E,e[12]=C^~B&T,e[13]=I^~R&N,e[22]=L^~j&K,e[23]=U^~F&V,e[32]=Y^~W&Q,e[33]=J^~Z&X,e[42]=ne^~oe&ae,e[43]=ie^~se&ce,e[4]=v^~w&k,e[5]=A^~E&S,e[14]=B^~T&P,e[15]=R^~N&M,e[24]=j^~K&z,e[25]=F^~V&G,e[34]=W^~Q&$,e[35]=Z^~X&ee,e[44]=oe^~ae&ue,e[45]=se^~ce&le,e[6]=w^~k&d,e[7]=E^~S&m,e[16]=T^~P&_,e[17]=N^~M&x,e[26]=K^~z&D,e[27]=V^~G&O,e[36]=Q^~$&q,e[37]=X^~ee&H,e[46]=ae^~ue&te,e[47]=ce^~le&re,e[8]=k^~d&y,e[9]=S^~m&b,e[18]=P^~_&C,e[19]=M^~x&I,e[28]=z^~D&L,e[29]=G^~O&U,e[38]=$^~q&Y,e[39]=ee^~H&J,e[48]=ue^~te&ne,e[49]=le^~re&ie,e[0]^=g[n],e[1]^=g[n+1]};if(l)e.exports=I;else{for(R=0;R>>16)*t&65535)<<16)}function s(e,t){return e<>>32-t}function a(e){return e=o(e^=e>>>16,2246822507),e=o(e^=e>>>13,3266489909),e^=e>>>16}function c(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 u(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 l(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 f(e,t){return 0===(t%=64)?e:t<32?[e[0]<>>32-t,e[1]<>>1]),e=p(e=u(e,[4283543511,3981806797]),[0,e[0]>>>1]),e=p(e=u(e,[3301882366,444984403]),[0,e[0]>>>1])}i.x86.hash32=function(e,t){t=t||0;for(var r=(e=e||"").length%4,n=e.length-r,i=t,c=0,u=3432918353,l=461845907,f=0;f>>0},i.x86.hash128=function(e,t){t=t||0;for(var r=(e=e||"").length%16,n=e.length-r,i=t,c=t,u=t,l=t,f=0,p=0,h=0,d=0,m=597399067,g=2869860233,y=951274213,b=2716044179,v=0;v>>0).toString(16)).slice(-8)+("00000000"+(c>>>0).toString(16)).slice(-8)+("00000000"+(u>>>0).toString(16)).slice(-8)+("00000000"+(l>>>0).toString(16)).slice(-8)},i.x64.hash128=function(e,t){t=t||0;for(var r=(e=e||"").length%16,n=e.length-r,i=[0,t],o=[0,t],s=[0,0],a=[0,0],d=[2277735313,289559509],m=[1291169091,658871167],g=0;g>>0).toString(16)).slice(-8)+("00000000"+(i[1]>>>0).toString(16)).slice(-8)+("00000000"+(o[0]>>>0).toString(16)).slice(-8)+("00000000"+(o[1]>>>0).toString(16)).slice(-8)},e.exports&&(t=e.exports=i),t.murmurHash3=i}()},function(e,t,r){"use strict";(function(t){const n=r(129),i=function(){if(self.crypto)return self.crypto.subtle||self.crypto.webkitSubtle;if(self.msCrypto)return self.msCrypto.subtle}();function o(e){if(!i)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(r,o)=>{const s=i.digest({name:e},r);if("function"!=typeof s.then)return s.onerror=(()=>{o(new Error(`hashing data using ${e}`))}),void(s.oncomplete=(e=>{o(null,e.target.result)}));n(s.then(e=>t.from(new Uint8Array(e))),o)}}e.exports={sha1:function(e,t){o("SHA-1")(e,t)},sha2256:function(e,t){o("SHA-256")(e,t)},sha2512:function(e,t){o("SHA-512")(e,t)}}}).call(this,r(0).Buffer)},function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var n,i,o,s,a,c=1,u={},l=!1,f=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick(function(){d(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){d(e.data)},n=function(e){o.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,n=function(e){var t=f.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):n=function(e){setTimeout(d,0,e)}:(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&d(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),n=function(t){e.postMessage(s+t,"*")}),p.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;ri(n=>{const i=r.init(e,null);return r.update(i,n),t.from(r.digest(i))});e.exports=(e=>{for(let t=0;t<64;t++)e[45569+t]=a(t+1,o);for(let t=0;t<32;t++)e[45633+t]=a(t+1,s)})}).call(this,r(0).Buffer)},function(e,t,r){var n=r(186);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 o(e,t,r,n){var i=e[t]+r;r<0&&(i+=4294967296);var o=e[t+1]+n;i>=4294967296&&o++,e[t]=i,e[t+1]=o}function s(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function a(e,t,r,n,s,a){var c=f[s],u=f[s+1],p=f[a],h=f[a+1];i(l,e,t),o(l,e,c,u);var d=l[n]^l[e],m=l[n+1]^l[e+1];l[n]=m,l[n+1]=d,i(l,r,n),d=l[t]^l[r],m=l[t+1]^l[r+1],l[t]=d>>>24^m<<8,l[t+1]=m>>>24^d<<8,i(l,e,t),o(l,e,p,h),d=l[n]^l[e],m=l[n+1]^l[e+1],l[n]=d>>>16^m<<16,l[n+1]=m>>>16^d<<16,i(l,r,n),d=l[t]^l[r],m=l[t+1]^l[r+1],l[t]=m>>>31^d<<1,l[t+1]=d>>>31^m<<1}var c=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,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,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})),l=new Uint32Array(32),f=new Uint32Array(32);function p(e,t){var r=0;for(r=0;r<16;r++)l[r]=e.h[r],l[r+16]=c[r];for(l[24]=l[24]^e.t,l[25]=l[25]^e.t/4294967296,t&&(l[28]=~l[28],l[29]=~l[29]),r=0;r<32;r++)f[r]=s(e.b,4*r);for(r=0;r<12;r++)a(0,8,16,24,u[16*r+0],u[16*r+1]),a(2,10,18,26,u[16*r+2],u[16*r+3]),a(4,12,20,28,u[16*r+4],u[16*r+5]),a(6,14,22,30,u[16*r+6],u[16*r+7]),a(0,10,20,30,u[16*r+8],u[16*r+9]),a(2,12,22,24,u[16*r+10],u[16*r+11]),a(4,14,16,26,u[16*r+12],u[16*r+13]),a(6,8,18,28,u[16*r+14],u[16*r+15]);for(r=0;r<16;r++)e.h[r]=e.h[r]^l[r]^l[r+16]}function h(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]=c[n];var i=t?t.length:0;return r.h[0]^=16842752^i<<8^e,t&&(d(r,t),r.c=128),r}function d(e,t){for(var r=0;r>2]>>8*(3&r);return t}function g(e,t,r){r=r||64,e=n.normalizeInput(e);var i=h(r,t);return d(i,e),m(i)}e.exports={blake2b:g,blake2bHex:function(e,t,r){var i=g(e,t,r);return n.toHex(i)},blake2bInit:h,blake2bUpdate:d,blake2bFinal:m}},function(e,t,r){var n=r(186);function i(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function o(e,t,r,n,i,o){u[e]=u[e]+u[t]+i,u[n]=s(u[n]^u[e],16),u[r]=u[r]+u[n],u[t]=s(u[t]^u[r],12),u[e]=u[e]+u[t]+o,u[n]=s(u[n]^u[e],8),u[r]=u[r]+u[n],u[t]=s(u[t]^u[r],7)}function s(e,t){return e>>>t^e<<32-t}var a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),c=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]),u=new Uint32Array(16),l=new Uint32Array(16);function f(e,t){var r=0;for(r=0;r<8;r++)u[r]=e.h[r],u[r+8]=a[r];for(u[12]^=e.t,u[13]^=e.t/4294967296,t&&(u[14]=~u[14]),r=0;r<16;r++)l[r]=i(e.b,4*r);for(r=0;r<10;r++)o(0,4,8,12,l[c[16*r+0]],l[c[16*r+1]]),o(1,5,9,13,l[c[16*r+2]],l[c[16*r+3]]),o(2,6,10,14,l[c[16*r+4]],l[c[16*r+5]]),o(3,7,11,15,l[c[16*r+6]],l[c[16*r+7]]),o(0,5,10,15,l[c[16*r+8]],l[c[16*r+9]]),o(1,6,11,12,l[c[16*r+10]],l[c[16*r+11]]),o(2,7,8,13,l[c[16*r+12]],l[c[16*r+13]]),o(3,4,9,14,l[c[16*r+14]],l[c[16*r+15]]);for(r=0;r<8;r++)e.h[r]^=u[r]^u[r+8]}function p(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&&(h(n,t),n.c=64),n}function h(e,t){for(var r=0;r>2]>>8*(3&r)&255;return t}function m(e,t,r){r=r||32,e=n.normalizeInput(e);var i=p(r,t);return h(i,e),d(i)}e.exports={blake2s:m,blake2sHex:function(e,t,r){var i=m(e,t,r);return n.toHex(i)},blake2sInit:p,blake2sUpdate:h,blake2sFinal:d}},function(e,t,r){var n=r(368),i=r(370);e.exports=n,e.exports.parse=n,e.exports.stringify=i},function(e,t,r){var n=r(369),i=["int32","int64","uint32","uint64","sint32","sint64","bool","fixed64","sfixed64","double","fixed32","sfixed32","float"],o=function(e){for(var t={};e.length;)switch(e[0]){case"[":case",":e.shift();var r=e.shift();if("("===r&&(r=e.shift(),e.shift()),"="!==e[0])throw new Error("Unexpected token in field options: "+e[0]);if(e.shift(),"]"===e[0])throw new Error("Unexpected ] in field option");t[r]=e.shift();break;case"]":return e.shift(),t;default:throw new Error("Unexpected token in field options: "+e[0])}throw new Error("No closing tag for field options")},s=function(e){for(var t={name:null,type:null,tag:-1,map:null,oneof:null,required:!1,repeated:!1,options:{}};e.length;)switch(e[0]){case"=":e.shift(),t.tag=Number(e.shift());break;case"map":if(t.type="map",t.map={from:null,to:null},e.shift(),"<"!==e[0])throw new Error("Unexpected token in map type: "+e[0]);if(e.shift(),t.map.from=e.shift(),","!==e[0])throw new Error("Unexpected token in map type: "+e[0]);if(e.shift(),t.map.to=e.shift(),">"!==e[0])throw new Error("Unexpected token in map type: "+e[0]);e.shift(),t.name=e.shift();break;case"repeated":case"required":case"optional":var r=e.shift();t.required="required"===r,t.repeated="repeated"===r,t.type=e.shift(),t.name=e.shift();break;case"[":t.options=o(e);break;case";":if(null===t.name)throw new Error("Missing field name");if(null===t.type)throw new Error("Missing type in message field: "+t.name);if(-1===t.tag)throw new Error("Missing tag number in message field: "+t.name);return e.shift(),t;default:throw new Error("Unexpected token in message field: "+e[0])}throw new Error("No ; found for message field")},a=function(e){for(var t={enums:[],messages:[],fields:[],extends:[],extensions:null};e.length;)switch(e[0]){case"map":case"repeated":case"optional":case"required":t.fields.push(s(e));break;case"enum":t.enums.push(d(e));break;case"message":t.messages.push(l(e));break;case"extensions":t.extensions=u(e);break;case"oneof":e.shift();var r=e.shift();if("{"!==e[0])throw new Error("Unexpected token in oneof: "+e[0]);for(e.shift();"}"!==e[0];){e.unshift("optional");var n=s(e);n.oneof=r,t.fields.push(n)}e.shift();break;case"extend":t.extends.push(c(e));break;case";":e.shift();break;case"reserved":case"option":for(e.shift();";"!==e[0];)e.shift();break;default:e.unshift("optional"),t.fields.push(s(e))}return t},c=function(e){return{name:e[1],message:l(e)}},u=function(e){e.shift();var t=Number(e.shift());if(isNaN(t))throw new Error("Invalid from in extensions definition");if("to"!==e.shift())throw new Error("Expected keyword 'to' in extensions definition");var r=e.shift();if("max"===r&&(r=536870911),r=Number(r),isNaN(r))throw new Error("Invalid to in extensions definition");if(";"!==e.shift())throw new Error("Missing ; in extensions definition");return{from:t,to:r}},l=function(e){e.shift();var t=1,r=[],n={name:e.shift(),enums:[],extends:[],messages:[],fields:[]};if("{"!==e[0])throw new Error("Expected { but found "+e[0]);for(e.shift();e.length;){if("{"===e[0]?t++:"}"===e[0]&&t--,!t)return e.shift(),r=a(r),n.enums=r.enums,n.messages=r.messages,n.fields=r.fields,n.extends=r.extends,n.extensions=r.extensions,n;r.push(e.shift())}if(t)throw new Error("No closing tag for message")},f=function(e){e.shift();var t=e.shift();if(";"!==e[0])throw new Error("Expected ; but found "+e[0]);return e.shift(),t},p=function(e){if(e.shift(),"="!==e[0])throw new Error("Expected = but found "+e[0]);e.shift();var t=e.shift();switch(t){case'"proto2"':t=2;break;case'"proto3"':t=3;break;default:throw new Error("Expected protobuf syntax version but found "+t)}if(";"!==e[0])throw new Error("Expected ; but found "+e[0]);return e.shift(),t},h=function(e){if(e.length<4)throw new Error("Invalid enum value: "+e.slice(0,3).join(" "));if("="!==e[1])throw new Error("Expected = but found "+e[1]);if(";"!==e[3]&&"["!==e[3])throw new Error("Expected ; or [ but found "+e[1]);var t=e.shift();e.shift();var r={value:null,options:{}};return r.value=Number(e.shift()),"["===e[0]&&(r.options=o(e)),e.shift(),{name:t,val:r}},d=function(e){e.shift();var t={},r={name:e.shift(),values:{},options:{}};if("{"!==e[0])throw new Error("Expected { but found "+e[0]);for(e.shift();e.length;){if("}"===e[0])return e.shift(),";"===e[0]&&e.shift(),r;if("option"!==e[0]){var n=h(e);r.values[n.name]=n.val}else t=m(e),r.options[t.name]=t.value}throw new Error("No closing tag for enum")},m=function(e){for(var t=null,r=null,n=function(e){return"true"===e||"false"!==e&&e.replace(/^"+|"+$/gm,"")};e.length;){if(";"===e[0])return e.shift(),{name:t,value:r};switch(e[0]){case"option":e.shift();var i="("===e[0];if(i&&e.shift(),t=e.shift(),i){if(")"!==e[0])throw new Error("Expected ) but found "+e[0]);e.shift()}"."===e[0][0]&&(t+=e.shift());break;case"=":if(e.shift(),null===t)throw new Error("Expected key for option with value: "+e[0]);if(r=n(e.shift()),"optimize_for"===t&&!/^(SPEED|CODE_SIZE|LITE_RUNTIME)$/.test(r))throw new Error("Unexpected value for option optimize_for: "+r);"{"===r&&(r=g(e));break;default:throw new Error("Unexpected token in option: "+e[0])}}},g=function(e){for(var t=function(e){return"true"===e||"false"!==e&&e.replace(/^"+|"+$/gm,"")},r={};e.length;){if("}"===e[0])return e.shift(),r;var n="("===e[0];n&&e.shift();var i=e.shift();if(n){if(")"!==e[0])throw new Error("Expected ) but found "+e[0]);e.shift()}var o=null;switch(e[0]){case":":if(void 0!==r[i])throw new Error("Duplicate option map key "+i);e.shift(),"{"===(o=t(e.shift()))&&(o=g(e)),r[i]=o,";"===e[0]&&e.shift();break;case"{":if(e.shift(),o=g(e),void 0===r[i]&&(r[i]=[]),!Array.isArray(r[i]))throw new Error("Duplicate option map key "+i);r[i].push(o);break;default:throw new Error("Unexpected token in option map: "+e[0])}}throw new Error("No closing tag for option map")},y=function(e){e.shift();var t=e.shift().replace(/^"+|"+$/gm,"");if(";"!==e[0])throw new Error("Unexpected token: "+e[0]+'. Expected ";"');return e.shift(),t},b=function(e){e.shift();var t={name:e.shift(),methods:[],options:{}};if("{"!==e[0])throw new Error("Expected { but found "+e[0]);for(e.shift();e.length;){if("}"===e[0])return e.shift(),";"===e[0]&&e.shift(),t;switch(e[0]){case"option":var r=m(e);if(void 0!==t.options[r.name])throw new Error("Duplicate option "+r.name);t.options[r.name]=r.value;break;case"rpc":t.methods.push(v(e));break;default:throw new Error("Unexpected token in service: "+e[0])}}throw new Error("No closing tag for service")},v=function(e){e.shift();var t={name:e.shift(),input_type:null,output_type:null,client_streaming:!1,server_streaming:!1,options:{}};if("("!==e[0])throw new Error("Expected ( but found "+e[0]);if(e.shift(),"stream"===e[0]&&(e.shift(),t.client_streaming=!0),t.input_type=e.shift(),")"!==e[0])throw new Error("Expected ) but found "+e[0]);if(e.shift(),"returns"!==e[0])throw new Error("Expected returns but found "+e[0]);if(e.shift(),"("!==e[0])throw new Error("Expected ( but found "+e[0]);if(e.shift(),"stream"===e[0]&&(e.shift(),t.server_streaming=!0),t.output_type=e.shift(),")"!==e[0])throw new Error("Expected ) but found "+e[0]);if(e.shift(),";"===e[0])return e.shift(),t;if("{"!==e[0])throw new Error("Expected { but found "+e[0]);for(e.shift();e.length;){if("}"===e[0])return e.shift(),";"===e[0]&&e.shift(),t;if("option"!==e[0])throw new Error("Unexpected token in rpc options: "+e[0]);var r=m(e);if(void 0!==t.options[r.name])throw new Error("Duplicate option "+r.name);t.options[r.name]=r.value}throw new Error("No closing tag for rpc")};e.exports=function(e){for(var t=n(e.toString()),r=0;rt.extensions.to)throw new Error(t.name+" does not declare "+e.tag+" as an extension number");t.fields.push(e)})})}),s.messages.forEach(function(e){e.fields.forEach(function(t){var r,n,o,a;if(t.options&&"true"===t.options.packed&&-1===i.indexOf(t.type)){if(-1===t.type.indexOf(".")){if(e.enums&&e.enums.some(function(e){return e.name===t.type}))return}else{if((r=t.type.split(".")).length>2)throw new Error("what is this?");if(n=r[0],o=r[1],s.messages.some(function(e){if(e.name===n)return a=e,e}),a&&a.enums&&a.enums.some(function(e){return e.name===o}))return}throw new Error("Fields of type "+t.type+' cannot be declared [packed=true]. Only repeated fields of primitive numeric types (types which use the varint, 32-bit, or 64-bit wire types) can be declared "packed". See https://developers.google.com/protocol-buffers/docs/encoding#optional')}})}),s}},function(e,t){e.exports=function(e){var t,r=function(e){return e.trim()};return e.replace(/([;,{}()=:[\]<>]|\/\*|\*\/)/g," $1 ").split(/\n/).map(r).filter(Boolean).map(function(e){var t=e.indexOf("//");return t>-1?e.slice(0,t):e}).map(r).filter(Boolean).join("\n").split(/\s+|\n+/gm).filter((t=!1,function(e){return"/*"===e?(t=!0,!1):"*/"===e?(t=!1,!1):!t}))}},function(e,t){var r=function(e,t){var r=e.repeated?"repeated":e.required?"required":"optional";"map"===e.type&&(r="map<"+e.map.from+","+e.map.to+">"),e.oneof&&(r="");var n=Object.keys(e.options||{}).map(function(t){return t+" = "+e.options[t]}).join(",");return n&&(n=" ["+n+"]"),t.push((r?r+" ":"")+("map"===e.map?"":e.type+" ")+e.name+" = "+e.tag+n+";"),t},n=function(e,t){t.push("message "+e.name+" {"),e.enums||(e.enums=[]),e.enums.forEach(function(e){t.push(i(e,[]))}),e.messages||(e.messages=[]),e.messages.forEach(function(e){t.push(n(e,[]))});var o={};return e.fields||(e.fields=[]),e.fields.forEach(function(e){e.oneof?(o[e.oneof]||(o[e.oneof]=[]),o[e.oneof].push(r(e,[]))):t.push(r(e,[]))}),Object.keys(o).forEach(function(e){o[e].unshift("oneof "+e+" {"),o[e].push("}"),t.push(o[e])}),t.push("}",""),t},i=function(e,t){t.push("enum "+e.name+" {"),e.options||(e.options={});var r=s(e.options,[]);return r.length>1&&t.push(r.slice(0,-1)),Object.keys(e.values).map(function(r){var n=o(e.values[r]);t.push([r+" = "+n+";"])}),t.push("}",""),t},o=function(e,t){var r=Object.keys(e.options||{}).map(function(t){return t+" = "+e.options[t]}).join(",");return r&&(r=" ["+r+"]"),e.value+r},s=function(e,t){var r=Object.keys(e);return r.forEach(function(r){var n=e[r];~r.indexOf(".")&&(r="("+r+")");var i=typeof n;"object"===i?(n=a(n,[])).length&&t.push("option "+r+" = {",n,"};"):("string"===i&&"optimize_for"!==r&&(n='"'+n+'"'),t.push("option "+r+" = "+n+";"))}),r.length>0&&t.push(""),t},a=function(e,t){return Object.keys(e).forEach(function(r){var n=e[r],i=typeof n;"object"===i?Array.isArray(n)?n.forEach(function(e){(e=a(e,[])).length&&t.push(r+" {",e,"}")}):(n=a(n,[])).length&&t.push(r+" {",n,"}"):("string"===i&&(n='"'+n+'"'),t.push(r+": "+n))}),t},c=function(e,t){var r="rpc "+e.name+"(";e.client_streaming&&(r+="stream "),r+=e.input_type+") returns (",e.server_streaming&&(r+="stream "),r+=e.output_type+")",e.options||(e.options={});var n=s(e.options,[]);return n.length>1?t.push(r+" {",n.slice(0,-1),"}"):t.push(r+";"),t},u=function(e){return function(t){return Array.isArray(t)?t.map(u(e+" ")).join("\n"):e+t}};e.exports=function(e){var t=[];return t.push('syntax = "proto'+e.syntax+'";',""),e.package&&t.push("package "+e.package+";",""),e.options||(e.options={}),s(e.options,t),e.enums||(e.enums=[]),e.enums.forEach(function(e){i(e,t)}),e.messages||(e.messages=[]),e.messages.forEach(function(e){n(e,t)}),e.services&&e.services.forEach(function(e){!function(e,t){t.push("service "+e.name+" {"),e.options||(e.options={}),s(e.options,t),e.methods||(e.methods=[]),e.methods.forEach(function(e){t.push(c(e,[]))}),t.push("}","")}(e,t)}),t.map(u("")).join("\n")}},function(e,t,r){"use strict";var n=r(372),i=r(374),o=r(375),s=r(376),a=r(18);e.exports=function(e,t){var r={},c={},u={},l=function(e,t){e.enums&&e.enums.forEach(function(e){e.id=t+(t?".":"")+e.name,c[e.id]=e,l(e,e.id)}),e.messages&&e.messages.forEach(function(n){n.id=t+(t?".":"")+n.name,r[n.id]=n,n.fields.forEach(function(n){if(n.map){var i="Map_"+n.map.from+"_"+n.map.to,o={name:i,enums:[],messages:[],fields:[{name:"key",type:n.map.from,tag:1,repeated:!1,required:!0},{name:"value",type:n.map.to,tag:2,repeated:!1,required:!1}],extensions:null,id:t+(t?".":"")+i};r[o.id]||(r[o.id]=o,e.messages.push(o)),n.type=i,n.repeated=!0}}),l(n,n.id)})};l(e,"");var f=function(e,t){e.messages.forEach(function(r){t[r.name]=p(r.name,e.id)}),e.enums.forEach(function(e){t[e.name]=function(e){if(!e)return null;var t={};return Object.keys(e).forEach(function(r){t[r]=e[r].value}),t}(e.values)}),t.type=2,t.message=!0,t.name=e.name;var r={};e.fields.forEach(function(e){e.oneof&&(r[e.oneof]||(r[e.oneof]=[]),r[e.oneof].push(e.name))});var n=e.fields.map(function(t){return p(t.type,e.id)}),a=s(e,n,r),c=o(e,p,n,r,a),u=i(e,p,n);return c.bytes=u.bytes=0,t.buffer=!0,t.encode=c,t.decode=u,t.encodingLength=a,t},p=function(e,i,o){if(t&&t[e])return t[e];if(n[e])return n[e];var s,l,p=(i?i+"."+e:e).split(".").map(function(t,r,n){return n.slice(0,r).concat(e).join(".")}).reverse().reduce(function(e,t){return e||r[t]||c[t]},null);if(!1===o)return p;if(!p)throw new Error("Could not resolve "+e);return p.values?(s=p,l=Object.keys(s.values||[]).map(function(e){return parseInt(s.values[e].value,10)}),n.make(0,function e(t,r,n){if(!l.length||-1===l.indexOf(t))throw new Error("Invalid enum value: "+t);return a.encode(t,r,n),e.bytes=a.encode.bytes,r},function e(t,r){var n=a.decode(t,r);if(!l.length||-1===l.indexOf(n))throw new Error("Invalid enum value: "+n);return e.bytes=a.decode.bytes,n},a.encodingLength)):u[p.id]||f(p,u[p.id]={})};return(e.enums||[]).concat((e.messages||[]).map(function(e){return p(e.id)}))}},function(e,t,r){"use strict";var n,i,o,s=r(18),a=r(373),c=r(6).Buffer,u=function(e,t,r,n){return t.bytes=r.bytes=0,{type:e,encode:t,decode:r,encodingLength:n}};t.make=u,t.bytes=(n=function(e){return c.isBuffer(e)?e.length:c.byteLength(e)},u(2,i=function(e,t,r){var o=r,a=n(e);return s.encode(a,t,r),r+=s.encode.bytes,c.isBuffer(e)?e.copy(t,r):t.write(e,r,a),r+=a,i.bytes=r-o,t},o=function(e,t){var r=t,n=s.decode(e,t);t+=s.decode.bytes;var i=e.slice(t,t+n);return t+=i.length,o.bytes=t-r,i},function(e){var t=n(e);return s.encodingLength(t)+t})),t.string=function(){var e=function(t,r,n){var i=n,o=c.byteLength(t);return s.encode(o,r,n,"utf-8"),n+=s.encode.bytes,r.write(t,n,o),n+=o,e.bytes=n-i,r},t=function(e,r){var n=r,i=s.decode(e,r);r+=s.decode.bytes;var o=e.toString("utf-8",r,r+i);return r+=i,t.bytes=r-n,o};return u(2,e,t,function(e){var t=c.byteLength(e);return s.encodingLength(t)+t})}(),t.bool=function(){var e=function(t,r,n){return r[n]=t?1:0,e.bytes=1,r},t=function(e,r){var n=e[r]>0;return t.bytes=1,n};return u(0,e,t,function(e){return 1})}(),t.int32=function(){var e=function(t,r){var n=s.decode(t,r);return e.bytes=s.decode.bytes,n>2147483647?n-4294967296:n};return u(0,s.encode,e,function(e){return s.encodingLength(e<0?e+4294967296:e)})}(),t.int64=function(){var e=function(t,r){var n=s.decode(t,r);if(n>=Math.pow(2,63)){for(var i=9;255===t[r+i-1];)i--;i=i||9;var o=c.allocUnsafe(i);t.copy(o,0,r,r+i),o[i-1]=127&o[i-1],n=-1*s.decode(o,0),e.bytes=10}else e.bytes=s.decode.bytes;return n},t=function(e,r,n){if(e<0){var i=n+9;for(s.encode(-1*e,r,n),r[n+=s.encode.bytes-1]=128|r[n];n=0?2*t:-2*t-1;var o=n.encode(t,r,i);return e.bytes=n.encode.bytes,o},t.decode=function e(t,r){var i=n.decode(t,r);return e.bytes=n.decode.bytes,1&i?(i+1)/-2:i/2},t.encodingLength=function(e){return n.encodingLength(e>=0?2*e:-2*e-1)}},function(e,t,r){"use strict";var n=r(18),i=r(132).defined;var o=function(e,t,r){switch(e){case 0:return n.decode(t,r),r+n.decode.bytes;case 1:return r+8;case 2:var i=n.decode(t,r);return r+n.decode.bytes+i;case 3:case 4:throw new Error("Groups are not supported");case 5:return r+4;default:throw new Error("Unknown wire type: "+e)}},s=function(e,t){if(e.map)return{};if(e.repeated)return[];switch(e.type){case"string":return null!=t?t:"";case"bool":return"true"===t;case"float":case"double":case"sfixed32":case"fixed32":case"varint":case"enum":case"uint64":case"uint32":case"int64":case"int32":case"sint64":case"sint32":return parseInt(t||0,10);default:return null}};e.exports=function(e,t,r){for(var a=[],c={},u=[],l=[],f=0;f-1&&delete r[c[l]];if(e.message){var f=n.decode(i,o);o+=n.decode.bytes;var p=e.decode(i,o,o+f);t.map?(r[a]=r[a]||{},r[a][p.key]=p.value):t.repeated?(r[a]=r[a]||[],r[a].push(p)):r[a]=p}else t.repeated?(r[a]=r[a]||[],r[a].push(e.decode(i,o))):r[a]=e.decode(i,o);return o+=e.decode.bytes}return function t(f,p,h){if(null==p&&(p=0),null==h&&(h=f.length),!(h<=f.length&&p<=f.length))throw new Error("Decoded message is not valid");for(var d,g=p,y={};;){if(h<=p){var b,v,A="",w=0;for(w=0;w-1){E=!0;break}E||(b?d.repeated?y[A]=[]:(v=v&&b[v]?b[v].value:b[Object.keys(b)[0]].value,y[A]=parseInt(v||0,10)):y[A]=s(d,v))}return t.bytes=p-g,y}var _=n.decode(f,p);p+=n.decode.bytes;var x=c[_>>3];if(null!=x){var C=r[x];if((d=e.fields[x]).packed){var I=n.decode(f,p);for(I+=p+=n.decode.bytes;p-1){if(b)throw new Error("only one of the properties defined in oneof "+v+" can be set");b=!0}}for(y=0;ye.name!==r);else{if(!t.isBuffer(r))return n(new Error("second arg needs to be a name or multihash"),null);c=c.filter(e=>!e.multihash.equals(r))}s(a,c,n)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{put:(0,n.expose)("ipfs.dht.put",(0,i.pre)(t.pre("dht.put"),function(){var t;return(t=e().dht).put.apply(t,arguments)}),t),get:(0,n.expose)("ipfs.dht.get",(0,i.pre)(t.pre("dht.get"),function(){var t;return(t=e().dht).get.apply(t,arguments)}),t),findprovs:(0,n.expose)("ipfs.dht.findprovs",(0,i.pre)((0,a.preBufferFromJson)(0),t.pre("dht.findprovs"),(0,i.post)(function(){var t;return(t=e().dht).findprovs.apply(t,arguments)},function(e){return e.map(function(e){return(0,s.isPeerInfo)(e)?(0,s.peerInfoToJson)(e):e})})),t),findpeer:(0,n.expose)("ipfs.dht.findpeer",(0,i.pre)((0,s.prePeerIdFromJson)(0),t.pre("dht.findpeer"),(0,i.post)(function(){var t;return(t=e().dht).findpeer.apply(t,arguments)},function(e){return(0,s.isPeerInfo)(e)?(0,s.peerInfoToJson)(e):e})),t),provide:(0,n.expose)("ipfs.dht.provide",(0,i.pre)((0,a.preBufferFromJson)(0),(0,a.preArrayOfBufferFromJson)(0),(0,o.preCidFromJson)(0),(0,o.preArrayOfCidFromJson)(0),t.pre("dht.provide"),(0,i.post)(function(){var t;return(t=e().dht).provide.apply(t,arguments)},function(){return null})),t),query:(0,n.expose)("ipfs.dht.query",(0,i.pre)((0,s.prePeerIdFromJson)(0),t.pre("dht.query"),(0,i.post)(function(){var t;return(t=e().dht).query.apply(t,arguments)},function(e){return e.map(function(e){return(0,s.isPeerInfo)(e)?(0,s.peerInfoToJson)(e):e})})),t)}};var n=r(1),i=r(2),o=r(21),s=r(107),a=r(10)},function(e,t,r){"use strict";const n=r(386),i=r(236).ensureMultiaddr,o=r(464),s=r(22);class a{constructor(e){s(e,"Missing peerId. Use Peer.create(cb) to create one"),this.id=e,this.multiaddrs=new o,this.protocols=new Set,this._connectedMultiaddr=void 0}connect(e){if(e=i(e),!this.multiaddrs.has(e)&&e.toString()!==`/ipfs/${this.id.toB58String()}`)throw new Error("can't be connected to missing multiaddr from set");this._connectedMultiaddr=e}disconnect(){this._connectedMultiaddr=void 0}isConnected(){return this._connectedMultiaddr}}a.create=((e,t)=>{if("function"==typeof e)return t=e,e=null,void n.create((e,r)=>{if(e)return t(e);t(null,new a(r))});"function"==typeof e.toJSON?t(null,new a(e)):n.createFromJSON(e,(e,r)=>t(e,new a(r)))}),a.isPeerInfo=(e=>Boolean("object"==typeof e&&e.id&&e.multiaddrs)),e.exports=a},function(e,t,r){"use strict";(function(n){const i=r(13),o=r(387),s=r(22),a=r(9);class c{constructor(e,t,r){s(n.isBuffer(e),"invalid id provided"),t&&r&&s(t.public.bytes.equals(r.bytes),"inconsistent arguments"),this._id=e,this._idB58String=i.toB58String(this.id),this._privKey=t,this._pubKey=r}get id(){return this._id}set id(e){throw new Error("Id is immutable")}get privKey(){return this._privKey}set privKey(e){this._privKey=e}get pubKey(){return this._pubKey?this._pubKey:this._privKey?this._privKey.public:void 0}set pubKey(e){this._pubKey=e}marshalPubKey(){if(this.pubKey)return o.keys.marshalPublicKey(this.pubKey)}marshalPrivKey(){if(this.privKey)return o.keys.marshalPrivateKey(this.privKey)}toPrint(){return this.toJSON()}toJSON(){return{id:this.toB58String(),privKey:u(this.marshalPrivKey()),pubKey:u(this.marshalPubKey())}}toHexString(){return i.toHexString(this.id)}toBytes(){return this.id}toB58String(){return this._idB58String}isEqual(e){if(n.isBuffer(e))return this.id.equals(e);if(e.id)return this.id.equals(e.id);throw new Error("not valid Id")}isValid(e){this.privKey&&this.privKey.public&&this.privKey.public.bytes&&n.isBuffer(this.pubKey.bytes)&&this.privKey.public.bytes.equals(this.pubKey.bytes)?e():e(new Error("Keys not match"))}}function u(e){if(e)return e.toString("base64")}(t=e.exports=c).create=function(e,t){"function"==typeof e&&(t=e,e={}),(e=e||{}).bits=e.bits||2048,a([t=>o.keys.generateKeyPair("RSA",e.bits,t),(e,t)=>e.public.hash((r,n)=>{t(r,n,e)})],(e,r,n)=>{if(e)return t(e);t(null,new c(r,n))})},t.createFromHexString=function(e){return new c(i.fromHexString(e))},t.createFromBytes=function(e){return new c(e)},t.createFromB58String=function(e){return new c(i.fromB58String(e))},t.createFromPubKey=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let r;try{let i=e;if("string"==typeof i&&(i=n.from(e,"base64")),!n.isBuffer(i))throw new Error("Supplied key is neither a base64 string nor a buffer");r=o.keys.unmarshalPublicKey(i)}catch(e){return t(e)}r.hash((e,n)=>{if(e)return t(e);t(null,new c(n,null,r))})},t.createFromPrivKey=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let r=e;try{if("string"==typeof r&&(r=n.from(e,"base64")),!n.isBuffer(r))throw new Error("Supplied key is neither a base64 string nor a buffer")}catch(e){return t(e)}a([e=>o.keys.unmarshalPrivateKey(r,e),(e,t)=>e.public.hash((r,n)=>{t(r,n,e)})],(e,r,n)=>{if(e)return t(e);t(null,new c(r,n,n.public))})},t.createFromJSON=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let r,s,u,l;try{r=i.fromB58String(e.id),s=e.privKey&&n.from(e.privKey,"base64"),u=e.pubKey&&n.from(e.pubKey,"base64"),l=u&&o.keys.unmarshalPublicKey(u)}catch(e){return t(e)}s?a([e=>o.keys.unmarshalPrivateKey(s,e),(e,t)=>e.public.hash((r,n)=>{t(r,n,e)}),(e,t,r)=>{l?l.hash((n,i)=>{r(n,e,t,i)}):r(null,e,t)}],(e,n,i,o)=>e?t(e):l&&!n.equals(o)?t(new Error("Public and private key do not match")):r&&!n.equals(r)?t(new Error("Id and private key do not match")):void t(null,new c(r,i,l))):t(null,new c(r,null,l))},t.isPeerId=function(e){return Boolean("object"==typeof e&&e._id&&e._idB58String)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(190),i=r(389),o=r(409);(t=e.exports).aes=i,t.hmac=n,t.keys=o,t.randomBytes=r(235),t.pbkdf2=r(460)},function(e,t,r){"use strict";e.exports={SHA1:20,SHA256:32,SHA512:64}},function(e,t,r){"use strict";const n=r(390),i={16:"aes-128-ctr",32:"aes-256-ctr"};t.create=function(e,t,r){const o=i[e.length];if(!o)return r(new Error("Invalid key length"));const s=n.createCipheriv(o,e,t),a=n.createDecipheriv(o,e,t);r(null,{encrypt(e,t){t(null,s.update(e))},decrypt(e,t){t(null,a.update(e))}})}},function(e,t,r){"use strict";const n=r(155);e.exports={createCipheriv:n.createCipheriv,createDecipheriv:n.createDecipheriv}},function(e,t,r){var n=r(192),i=r(196),o=r(6).Buffer,s=r(201),a=r(58),c=r(108),u=r(202);function l(e,t,r){a.call(this),this._cache=new p,this._cipher=new c.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}r(7)(l,a),l.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return o.concat(n)};var f=o.alloc(16,16);function p(){this.cache=o.allocUnsafe(0)}function h(e,t,r){var a=n[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=o.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===a.type?new s(a.module,t,r):"auth"===a.type?new i(a.module,t,r):new l(a.module,t,r)}l.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(f))throw this._cipher.scrub(),new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},p.prototype.add=function(e){this.cache=o.concat([this.cache,e])},p.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},p.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r>s%8,e._prev=o(e._prev,r?n:i);return a}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i>7;return o}t.encrypt=function(e,t,r){for(var o=t.length,s=n.allocUnsafe(o),a=-1;++a0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,o=n.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,r=o,i=a,t.copy(r,i),a+=s.data.length,s=s.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,r){(function(t){function r(e){try{if(!t.localStorage)return!1}catch(e){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,r(12))},function(e,t,r){"use strict";e.exports=o;var n=r(200),i=r(87);function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}i.inherits=r(56),i.inherits(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){e.exports=r(137)},function(e,t,r){e.exports=r(59)},function(e,t,r){e.exports=r(136).Transform},function(e,t,r){e.exports=r(136).PassThrough},function(e,t,r){var n=r(6).Buffer,i=n.alloc(16,0);function o(e){var t=n.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function s(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}s.prototype.ghash=function(e){for(var t=-1;++t0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},s.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},s.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=s},function(e,t,r){var n=r(196),i=r(6).Buffer,o=r(192),s=r(201),a=r(58),c=r(108),u=r(202);function l(e,t,r){a.call(this),this._cache=new f,this._last=void 0,this._cipher=new c.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function f(){this.cache=i.allocUnsafe(0)}function p(e,t,r){var a=o[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=i.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===a.type?new s(a.module,t,r,!0):"auth"===a.type?new n(a.module,t,r,!0):new l(a.module,t,r)}r(7)(l,a),l.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),n.push(r);return i.concat(n)},l.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var r=-1;for(;++r16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},f.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=u(t,!1,r.key,r.iv);return p(e,n.key,n.iv)},t.createDecipheriv=p},function(e,t,r){"use strict";(function(n){const i=r(25)(r(139)),o=r(75);t=e.exports;const s={rsa:r(418),ed25519:r(436),secp256k1:r(227)(i,r(235))};function a(e){return void 0!==s[e.toLowerCase()]}t.supportedKeys=s,t.keysPBM=i,t.keyStretcher=r(457),t.generateEphemeralKeyPair=r(458),t.generateKeyPair=((e,t,r)=>{let n=s[e.toLowerCase()];if(!n)return r(new Error("invalid or unsupported key type"));n.generateKeyPair(t,r)}),t.generateKeyPairFromSeed=((e,t,r,n)=>{let i=s[e.toLowerCase()];return i?"ed25519"!==e.toLowerCase()?n(new Error("Seed key derivation is unimplemented for RSA or secp256k1")):void i.generateKeyPairFromSeed(t,r,n):n(new Error("invalid or unsupported key type"))}),t.unmarshalPublicKey=(e=>{const t=i.PublicKey.decode(e),r=t.Data;switch(t.Type){case i.KeyType.RSA:return s.rsa.unmarshalRsaPublicKey(r);case i.KeyType.Ed25519:return s.ed25519.unmarshalEd25519PublicKey(r);case i.KeyType.Secp256k1:if(s.secp256k1)return s.secp256k1.unmarshalSecp256k1PublicKey(r);throw new Error("secp256k1 support requires libp2p-crypto-secp256k1 package");default:throw new Error("invalid or unsupported key type")}}),t.marshalPublicKey=((e,t)=>{if(!a(t=(t||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type");return e.bytes}),t.unmarshalPrivateKey=((e,t)=>{let r;try{r=i.PrivateKey.decode(e)}catch(e){return t(e)}const n=r.Data;switch(r.Type){case i.KeyType.RSA:return s.rsa.unmarshalRsaPrivateKey(n,t);case i.KeyType.Ed25519:return s.ed25519.unmarshalEd25519PrivateKey(n,t);case i.KeyType.Secp256k1:return s.secp256k1?s.secp256k1.unmarshalSecp256k1PrivateKey(n,t):t(new Error("secp256k1 support requires libp2p-crypto-secp256k1 package"));default:t(new Error("invalid or unsupported key type"))}}),t.marshalPrivateKey=((e,t)=>{if(!a(t=(t||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type");return e.bytes}),t.import=((e,t,r)=>{try{const i=o.pki.decryptRsaPrivateKey(e,t);if(null===i)throw new Error("Cannot read the key, most likely the password is wrong or not a RSA key");let a=o.asn1.toDer(o.pki.privateKeyToAsn1(i));return a=n.from(a.getBytes(),"binary"),s.rsa.unmarshalRsaPrivateKey(a,r)}catch(e){r(e)}})}).call(this,r(0).Buffer)},function(e,t,r){(function(t){var r={};e.exports=r;var n={};r.encode=function(e,t,r){if("string"!=typeof t)throw new TypeError('"alphabet" must be a string.');if(void 0!==r&&"number"!=typeof r)throw new TypeError('"maxline" must be a number.');var n="";if(e instanceof Uint8Array){var i=0,o=t.length,s=t.charAt(0),a=[0];for(i=0;i0;)a.push(u%o),u=u/o|0}for(i=0;0===e[i]&&i=0;--i)n+=t[a[i]]}else n=function(e,t){var r=0,n=t.length,i=t.charAt(0),o=[0];for(r=0;r0;)o.push(a%n),a=a/n|0}var c="";for(r=0;0===e.at(r)&&r=0;--r)c+=t[o[r]];return c}(e,t);if(r){var l=new RegExp(".{1,"+r+"}","g");n=n.match(l).join("\r\n")}return n},r.decode=function(e,r){if("string"!=typeof e)throw new TypeError('"input" must be a string.');if("string"!=typeof r)throw new TypeError('"alphabet" must be a string.');var i=n[r];if(!i){i=n[r]=[];for(var o=0;o>=8;for(;f>0;)c.push(255&f),f>>=8}for(var p=0;e[p]===a&&p=i.Versions.TLS_1_1.minor&&c.output.putBytes(r),c.update(e.fragment),c.finish(a)&&(e.fragment=c.output,e.length=e.fragment.length(),o=!0),o}function a(e,t,r){if(!r){var n=e-t.length()%e;t.fillWithByte(n-1,n)}return!0}function c(e,t,r){var n=!0;if(r){for(var i=t.length(),o=t.last(),s=i-1-o;s=a?(e.fragment=s.output.getBytes(l-a),u=s.output.getBytes(a)):e.fragment=s.output.getBytes(),e.fragment=n.util.createBuffer(e.fragment),e.length=e.fragment.length();var f=t.macFunction(t.macKey,t.sequenceNumber,e);return t.updateSequenceNumber(),o=function(e,t,r){var i=n.hmac.create();return i.start("SHA1",e),i.update(t),t=i.digest().getBytes(),i.start(null,null),i.update(r),r=i.digest().getBytes(),t===r}(t.macKey,u,f)&&o}},function(e,t,r){var n=r(3);r(215),e.exports=n.mgf=n.mgf||{},n.mgf.mgf1=n.mgf1},function(e,t,r){(function(t){var n=r(3);if(r(112),r(32),r(156),r(8),void 0===i)var i=n.jsbn.BigInteger;var o=n.util.ByteBuffer,s=void 0===t?Uint8Array:t;n.pki=n.pki||{},e.exports=n.pki.ed25519=n.ed25519=n.ed25519||{};var a=n.ed25519;function c(e){var r=e.message;if(r instanceof Uint8Array)return r;var n=e.encoding;if(void 0===r){if(!e.md)throw new TypeError('"options.message" or "options.md" not specified.');r=e.md.digest().getBytes(),n="binary"}if("string"==typeof r&&!n)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if("string"==typeof r){if(void 0!==t)return new t(r,n);r=new o(r,n)}else if(!(r instanceof o))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var i=new s(r.length()),a=0;a=0;--r)D(n,n),1!==r&&O(n,n,t);for(r=0;r<16;++r)e[r]=n[r]}(r,r),O(r,r,i),O(r,r,o),O(r,r,o),O(e[0],r,o),D(n,e[0]),O(n,n,o),S(n,i)&&O(e[0],e[0],g);if(D(n,e[0]),O(n,n,o),S(n,i))return-1;x(e[0])===t[31]>>7&&M(e[0],u,e[0]);return O(e[3],e[0],e[1]),0}(c,n))return-1;for(i=0;i=0};var u=N(),l=N([1]),f=N([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),p=N([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),h=N([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),d=N([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),m=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),g=N([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function y(e,r){var i=n.md.sha512.create(),c=new o(e);i.update(c.getBytes(r),"binary");var u=i.digest().getBytes();if(void 0!==t)return new t(u,"binary");for(var l=new s(a.constants.HASH_BYTE_LENGTH),f=0;f<64;++f)l[f]=u.charCodeAt(f);return l}function b(e,t){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i>8,t[i]-=256*r;t[i]+=r,t[n]=0}for(r=0,i=0;i<32;++i)t[i]+=r-(t[31]>>4)*m[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;++i)t[i]-=r*m[i];for(n=0;n<32;++n)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function v(e){for(var t=new Float64Array(64),r=0;r<64;++r)t[r]=e[r],e[r]=0;b(e,t)}function A(e,t){var r=N(),n=N(),i=N(),o=N(),s=N(),a=N(),c=N(),u=N(),l=N();M(r,e[1],e[0]),M(l,t[1],t[0]),O(r,r,l),P(n,e[0],e[1]),P(l,t[0],t[1]),O(n,n,l),O(i,e[3],t[3]),O(i,i,p),O(o,e[2],t[2]),P(o,o,o),M(s,n,r),M(a,o,i),P(c,o,i),P(u,n,r),O(e[0],s,a),O(e[1],u,c),O(e[2],c,a),O(e[3],s,u)}function w(e,t,r){for(var n=0;n<4;++n)T(e[n],t[n],r)}function E(e,t){var r=N(),n=N(),i=N();!function(e,t){var r,n=N();for(r=0;r<16;++r)n[r]=t[r];for(r=253;r>=0;--r)D(n,n),2!==r&&4!==r&&O(n,n,t);for(r=0;r<16;++r)e[r]=n[r]}(i,t[2]),O(r,t[0],i),O(n,t[1],i),k(e,n),e[31]^=x(r)<<7}function k(e,t){var r,n,i,o=N(),s=N();for(r=0;r<16;++r)s[r]=t[r];for(R(s),R(s),R(s),n=0;n<2;++n){for(o[0]=s[0]-65517,r=1;r<15;++r)o[r]=s[r]-65535-(o[r-1]>>16&1),o[r-1]&=65535;o[15]=s[15]-32767-(o[14]>>16&1),i=o[15]>>16&1,o[14]&=65535,T(s,o,1-i)}for(r=0;r<16;r++)e[2*r]=255&s[r],e[2*r+1]=s[r]>>8}function S(e,t){var r=new s(32),n=new s(32);return k(r,e),k(n,t),_(r,0,n,0)}function _(e,t,r,n){return function(e,t,r,n,i){var o,s=0;for(o=0;o>>8)-1}(e,t,r,n,32)}function x(e){var t=new s(32);return k(t,e),1&t[0]}function C(e,t,r){var n,i;for(B(e[0],u),B(e[1],l),B(e[2],l),B(e[3],u),i=255;i>=0;--i)w(e,t,n=r[i/8|0]>>(7&i)&1),A(t,e),A(e,e),w(e,t,n)}function I(e,t){var r=[N(),N(),N(),N()];B(r[0],h),B(r[1],d),B(r[2],l),O(r[3],h,d),C(e,r,t)}function B(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function R(e){var t,r,n=1;for(t=0;t<16;++t)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function T(e,t,r){for(var n,i=~(r-1),o=0;o<16;++o)n=i&(e[o]^t[o]),e[o]^=n,t[o]^=n}function N(e){var t,r=new Float64Array(16);if(e)for(t=0;t0&&(s=n.util.fillString(String.fromCharCode(0),c)+s),{encapsulation:t.encrypt(s,"NONE"),key:e.generate(s,o)}},decrypt:function(t,r,n){var i=t.decrypt(r,"NONE");return e.generate(i,n)}};return o},n.kem.kdf1=function(e,t){o(this,e,0,t||e.digestLength)},n.kem.kdf2=function(e,t){o(this,e,1,t||e.digestLength)}},function(e,t,r){e.exports=r(45),r(141),r(89),r(208),r(156)},function(e,t,r){var n=r(3);r(61),r(88),r(141),r(89),r(8);var i=e.exports=n.ssh=n.ssh||{};function o(e,t){var r=t.toString(16);r[0]>="8"&&(r="00"+r);var i=n.util.hexToBytes(r);e.putInt32(i.length),e.putBytes(i)}function s(e,t){e.putInt32(t.length),e.putString(t)}function a(){for(var e=n.md.sha1.create(),t=arguments.length,r=0;r0&&(this.state=d[this.state].block)},m.prototype.unblock=function(e){return e=void 0===e?1:e,this.blocks-=e,0===this.blocks&&this.state!==p&&(this.state=u,g(this,0)),this.blocks},m.prototype.sleep=function(e){e=void 0===e?0:e,this.state=d[this.state].sleep;var t=this;this.timeoutId=setTimeout(function(){t.timeoutId=null,t.state=u,g(t,0)},e)},m.prototype.wait=function(e){e.wait(this)},m.prototype.wakeup=function(){this.state===f&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state=u,g(this,0))},m.prototype.cancel=function(){this.state=d[this.state].cancel,this.permitsNeeded=0,null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null),this.subtasks=[]},m.prototype.fail=function(e){if(this.error=!0,y(this,!0),e)e.error=this.error,e.swapTime=this.swapTime,e.userData=this.userData,g(e,0);else{if(null!==this.parent){for(var t=this.parent;null!==t.parent;)t.error=this.error,t.swapTime=this.swapTime,t.userData=this.userData,t=t.parent;y(t,!0)}this.failureCallback&&this.failureCallback(this)}};var g=function(e,t){var r=t>30||+new Date-e.swapTime>20,n=function(t){if(t++,e.state===u)if(r&&(e.swapTime=+new Date),e.subtasks.length>0){var n=e.subtasks.shift();n.error=e.error,n.swapTime=e.swapTime,n.userData=e.userData,n.run(n),n.error||g(n,t)}else y(e),e.error||null!==e.parent&&(e.parent.error=e.error,e.parent.swapTime=e.swapTime,e.parent.userData=e.userData,g(e.parent,t))};r?setTimeout(n,0):n(t)},y=function(e,t){e.state=p,delete o[e.id],null===e.parent&&(e.type in a?0===a[e.type].length?n.log.error(i,"[%s][%s] task queue empty [%s]",e.id,e.name,e.type):a[e.type][0]!==e?n.log.error(i,"[%s][%s] task not first in queue [%s]",e.id,e.name,e.type):(a[e.type].shift(),0===a[e.type].length?delete a[e.type]:a[e.type][0].start()):n.log.error(i,"[%s][%s] task queue missing [%s]",e.id,e.name,e.type),t||(e.error&&e.failureCallback?e.failureCallback(e):!e.error&&e.successCallback&&e.successCallback(e)))};e.exports=n.task=n.task||{},n.task.start=function(e){var t=new m({run:e.run,name:e.name||"?"});t.type=e.type,t.successCallback=e.success||null,t.failureCallback=e.failure||null,t.type in a?a[e.type].push(t):(a[t.type]=[t],function(e){e.error=!1,e.state=d[e.state].start,setTimeout(function(){e.state===u&&(e.swapTime=+new Date,e.run(e),g(e,0))},0)}(t))},n.task.cancel=function(e){e in a&&(a[e]=[a[e][0]])},n.task.createCondition=function(){var e={tasks:{},wait:function(t){t.id in e.tasks||(t.block(),e.tasks[t.id]=t)},notify:function(){var t=e.tasks;for(var r in e.tasks={},t)t[r].unblock()}};return e}},function(e,t,r){"use strict";const n=r(218),i=r(25),o=r(27),s=r(221),a=i(r(139)),c=r(75),u=r(17);class l{constructor(e){this._key=e}verify(e,t,r){p(r),s.hashAndVerify(this._key,t,e,r)}marshal(){return s.utils.jwkToPkix(this._key)}get bytes(){return a.PublicKey.encode({Type:a.KeyType.RSA,Data:this.marshal()})}encrypt(e){return this._key.encrypt(e,"RSAES-PKCS1-V1_5")}equals(e){return this.bytes.equals(e.bytes)}hash(e){p(e),n(this.bytes,"sha2-256",e)}}class f{constructor(e,t){this._key=e,this._publicKey=t}genSecret(){return s.getRandomValues(new Uint8Array(16))}sign(e,t){p(t),s.hashAndSign(this._key,e,t)}get public(){if(!this._publicKey)throw new Error("public key not provided");return new l(this._publicKey)}decrypt(e,t){s.decrypt(this._key,e,t)}marshal(){return s.utils.jwkToPkcs1(this._key)}get bytes(){return a.PrivateKey.encode({Type:a.KeyType.RSA,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){p(e),n(this.bytes,"sha2-256",e)}id(e){this.public.hash((t,r)=>{if(t)return e(t);e(null,o.encode(r))})}export(e,t,r){"function"==typeof t&&(r=t,t=e,e="pkcs-8"),p(r),u(()=>{let n=null,i=null;try{const r=new c.util.ByteBuffer(this.marshal()),o=c.asn1.fromDer(r),s=c.pki.privateKeyFromAsn1(o);if("pkcs-8"===e){const e={algorithm:"aes256",count:1e4,saltSize:16,prfAlgorithm:"sha512"};i=c.pki.encryptRsaPrivateKey(s,t,e)}else n=new Error(`Unknown export format '${e}'`)}catch(e){n=e}r(n,i)})}}function p(e){if("function"!=typeof e)throw new Error("callback is required")}e.exports={RsaPublicKey:l,RsaPrivateKey:f,unmarshalRsaPublicKey:function(e){const t=s.utils.pkixToJwk(e);return new l(t)},unmarshalRsaPrivateKey:function(e,t){const r=s.utils.pkcs1ToJwk(e);s.unmarshalPrivateKey(r,(e,r)=>{if(e)return t(e);t(null,new f(r.privateKey,r.publicKey))})},generateKeyPair:function(e,t){s.generateKey(e,(e,r)=>{if(e)return t(e);t(null,new f(r.privateKey,r.publicKey))})},fromJwk:function(e,t){s.unmarshalPrivateKey(e,(e,r)=>{if(e)return t(e);t(null,new f(r.privateKey,r.publicKey))})}}},function(e,t,r){"use strict";(function(t){const n=r(219),i=r(128),o=r(220),s=r(420),a=o.toCallback,c=o.toBuf,u=o.fromString,l=o.fromNumberTo32BitBuf;e.exports={sha1:s.sha1,sha2256:s.sha2256,sha2512:s.sha2512,sha3512:a(c(n.sha3_512)),sha3384:a(c(n.sha3_384)),sha3256:a(c(n.sha3_256)),sha3224:a(c(n.sha3_224)),shake128:a(c(n.shake_128,256)),shake256:a(c(n.shake_256,512)),keccak224:a(c(n.keccak_224)),keccak256:a(c(n.keccak_256)),keccak384:a(c(n.keccak_384)),keccak512:a(c(n.keccak_512)),murmur3128:a(c(u(i.x64.hash128))),murmur332:a(l(u(i.x86.hash32))),addBlake:r(421),dblSha2256:(e,r)=>{s.sha2256(e,(e,n)=>{e&&r(e),s.sha2256(t.from(n),r)})}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(129),i=function(){if(self.crypto)return self.crypto.subtle||self.crypto.webkitSubtle;if(self.msCrypto)return self.msCrypto.subtle}();function o(e){if(!i)throw new Error("Please use a browser with webcrypto support");return(r,o)=>{const s=i.digest({name:e},r);if("function"!=typeof s.then)return s.onerror=(()=>{o(new Error(`hashing data using ${e}`))}),void(s.oncomplete=(e=>{o(null,e.target.result)}));n(s.then(e=>t.from(new Uint8Array(e))),o)}}e.exports={sha1:function(e,t){o("SHA-1")(e,t)},sha2256:function(e,t){o("SHA-256")(e,t)},sha2512:function(e,t){o("SHA-512")(e,t)}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(130),i=r(220).toCallback,o={init:n.blake2bInit,update:n.blake2bUpdate,digest:n.blake2bFinal},s={init:n.blake2sInit,update:n.blake2sUpdate,digest:n.blake2sFinal},a=(e,r)=>i(n=>{const i=r.init(e,null);return r.update(i,n),t.from(r.digest(i))});e.exports=(e=>{for(let t=0;t<64;t++)e[45569+t]=a(t+1,o);for(let t=0;t<32;t++)e[45633+t]=a(t+1,s)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(36),i=r(226),o=i.toBase64,s=i.toBn,a=n.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}),c=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid({"1.2.840.113549.1.1.1":"rsa"}),this.key("none").optional().null_(),this.key("curve").optional().objid(),this.key("params").optional().seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()))}),u=n.define("RSAPublicKey",function(){this.seq().obj(this.key("algorithm").use(c),this.key("subjectPublicKey").bitstr())}),l=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});t.pkcs1ToJwk=function(e){const t=a.decode(e,"der");return{kty:"RSA",n:o(t.modulus),e:o(t.publicExponent),d:o(t.privateExponent),p:o(t.prime1),q:o(t.prime2),dp:o(t.exponent1),dq:o(t.exponent2),qi:o(t.coefficient),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkcs1=function(e){return a.encode({version:0,modulus:s(e.n),publicExponent:s(e.e),privateExponent:s(e.d),prime1:s(e.p),prime2:s(e.q),exponent1:s(e.dp),exponent2:s(e.dq),coefficient:s(e.qi)},"der")},t.pkixToJwk=function(e){const t=u.decode(e,"der"),r=l.decode(t.subjectPublicKey.data,"der");return{kty:"RSA",n:o(r.modulus),e:o(r.publicExponent),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkix=function(e){return u.encode({algorithm:{algorithm:"rsa",none:null},subjectPublicKey:{data:l.encode({modulus:s(e.n),publicExponent:s(e.e)},"der")}},"der")}},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s=r(424).Buffer}catch(e){}function a(e,t,r){for(var n=0,i=Math.min(e.length,r),o=t;o=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function c(e,t,r,n){for(var i=0,o=Math.min(e.length,r),s=t;s=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=a(e,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==t&&(i=a(e,t,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,c=s/67108864|0;r.words[0]=a;for(var u=1;u>>26,f=67108863&c,p=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=p;h++){var d=u-h|0;l+=(s=(i=0|e.words[d])*(o=0|t.words[h])+f)/67108864|0,f=67108863&s}r.words[u]=0|f,c=0|l}return 0!==c?r.words[u]=0|c:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s>>24-i&16777215)||s!==this.length-1?u[6-c.length]+c+r:c+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var p=l[e],h=f[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modn(h).toString(e);r=(d=d.idivn(h)).isZero()?m+r:u[p-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==s),this.toArrayLike(s,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,c="le"===t,u=new e(o),l=this.clone();if(c){for(a=0;!l.isZero();a++)s=l.andln(255),l.iushrn(8),u[a]=s;for(;a=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==o&&s>26,this.words[s]=67108863&t;if(0===o&&s>>13,h=0|s[1],d=8191&h,m=h>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],A=8191&v,w=v>>>13,E=0|s[4],k=8191&E,S=E>>>13,_=0|s[5],x=8191&_,C=_>>>13,I=0|s[6],B=8191&I,R=I>>>13,T=0|s[7],N=8191&T,P=T>>>13,M=0|s[8],D=8191&M,O=M>>>13,L=0|s[9],U=8191&L,j=L>>>13,F=0|a[0],K=8191&F,V=F>>>13,z=0|a[1],G=8191&z,q=z>>>13,H=0|a[2],Y=8191&H,J=H>>>13,W=0|a[3],Z=8191&W,Q=W>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ce=8191&ae,ue=ae>>>13,le=0|a[8],fe=8191&le,pe=le>>>13,he=0|a[9],de=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(u+(n=Math.imul(f,K))|0)+((8191&(i=(i=Math.imul(f,V))+Math.imul(p,K)|0))<<13)|0;u=((o=Math.imul(p,V))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(d,K),i=(i=Math.imul(d,V))+Math.imul(m,K)|0,o=Math.imul(m,V);var ye=(u+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(p,G)|0))<<13)|0;u=((o=o+Math.imul(p,q)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,K),i=(i=Math.imul(y,V))+Math.imul(b,K)|0,o=Math.imul(b,V),n=n+Math.imul(d,G)|0,i=(i=i+Math.imul(d,q)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,q)|0;var be=(u+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(p,Y)|0))<<13)|0;u=((o=o+Math.imul(p,J)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(A,K),i=(i=Math.imul(A,V))+Math.imul(w,K)|0,o=Math.imul(w,V),n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(d,Y)|0,i=(i=i+Math.imul(d,J)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,J)|0;var ve=(u+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,Q)|0)+Math.imul(p,Z)|0))<<13)|0;u=((o=o+Math.imul(p,Q)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(k,K),i=(i=Math.imul(k,V))+Math.imul(S,K)|0,o=Math.imul(S,V),n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,q)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(d,Z)|0,i=(i=i+Math.imul(d,Q)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,Q)|0;var Ae=(u+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(p,$)|0))<<13)|0;u=((o=o+Math.imul(p,ee)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(x,K),i=(i=Math.imul(x,V))+Math.imul(C,K)|0,o=Math.imul(C,V),n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,q)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,q)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,J)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,J)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,Q)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,Q)|0,n=n+Math.imul(d,$)|0,i=(i=i+Math.imul(d,ee)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,ee)|0;var we=(u+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(p,re)|0))<<13)|0;u=((o=o+Math.imul(p,ne)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(B,K),i=(i=Math.imul(B,V))+Math.imul(R,K)|0,o=Math.imul(R,V),n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(C,G)|0,o=o+Math.imul(C,q)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,J)|0,n=n+Math.imul(A,Z)|0,i=(i=i+Math.imul(A,Q)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,Q)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(d,re)|0,i=(i=i+Math.imul(d,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0;var Ee=(u+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,se)|0)+Math.imul(p,oe)|0))<<13)|0;u=((o=o+Math.imul(p,se)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(N,K),i=(i=Math.imul(N,V))+Math.imul(P,K)|0,o=Math.imul(P,V),n=n+Math.imul(B,G)|0,i=(i=i+Math.imul(B,q)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,J)|0,n=n+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(S,Z)|0,o=o+Math.imul(S,Q)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(d,oe)|0,i=(i=i+Math.imul(d,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var ke=(u+(n=n+Math.imul(f,ce)|0)|0)+((8191&(i=(i=i+Math.imul(f,ue)|0)+Math.imul(p,ce)|0))<<13)|0;u=((o=o+Math.imul(p,ue)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(D,K),i=(i=Math.imul(D,V))+Math.imul(O,K)|0,o=Math.imul(O,V),n=n+Math.imul(N,G)|0,i=(i=i+Math.imul(N,q)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,q)|0,n=n+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,Q)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,Q)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(w,re)|0,o=o+Math.imul(w,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0,n=n+Math.imul(d,ce)|0,i=(i=i+Math.imul(d,ue)|0)+Math.imul(m,ce)|0,o=o+Math.imul(m,ue)|0;var Se=(u+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,pe)|0)+Math.imul(p,fe)|0))<<13)|0;u=((o=o+Math.imul(p,pe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,K),i=(i=Math.imul(U,V))+Math.imul(j,K)|0,o=Math.imul(j,V),n=n+Math.imul(D,G)|0,i=(i=i+Math.imul(D,q)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,q)|0,n=n+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,J)|0)+Math.imul(P,Y)|0,o=o+Math.imul(P,J)|0,n=n+Math.imul(B,Z)|0,i=(i=i+Math.imul(B,Q)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,Q)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(A,oe)|0,i=(i=i+Math.imul(A,se)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,se)|0,n=n+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,ue)|0)+Math.imul(b,ce)|0,o=o+Math.imul(b,ue)|0,n=n+Math.imul(d,fe)|0,i=(i=i+Math.imul(d,pe)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,pe)|0;var _e=(u+(n=n+Math.imul(f,de)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(p,de)|0))<<13)|0;u=((o=o+Math.imul(p,me)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(U,G),i=(i=Math.imul(U,q))+Math.imul(j,G)|0,o=Math.imul(j,q),n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,J)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,J)|0,n=n+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,Q)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,Q)|0,n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,se)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,se)|0,n=n+Math.imul(A,ce)|0,i=(i=i+Math.imul(A,ue)|0)+Math.imul(w,ce)|0,o=o+Math.imul(w,ue)|0,n=n+Math.imul(y,fe)|0,i=(i=i+Math.imul(y,pe)|0)+Math.imul(b,fe)|0,o=o+Math.imul(b,pe)|0;var xe=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(m,de)|0))<<13)|0;u=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(U,Y),i=(i=Math.imul(U,J))+Math.imul(j,Y)|0,o=Math.imul(j,J),n=n+Math.imul(D,Z)|0,i=(i=i+Math.imul(D,Q)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Q)|0,n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,se)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,se)|0,n=n+Math.imul(k,ce)|0,i=(i=i+Math.imul(k,ue)|0)+Math.imul(S,ce)|0,o=o+Math.imul(S,ue)|0,n=n+Math.imul(A,fe)|0,i=(i=i+Math.imul(A,pe)|0)+Math.imul(w,fe)|0,o=o+Math.imul(w,pe)|0;var Ce=(u+(n=n+Math.imul(y,de)|0)|0)+((8191&(i=(i=i+Math.imul(y,me)|0)+Math.imul(b,de)|0))<<13)|0;u=((o=o+Math.imul(b,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,Z),i=(i=Math.imul(U,Q))+Math.imul(j,Z)|0,o=Math.imul(j,Q),n=n+Math.imul(D,$)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,se)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,se)|0,n=n+Math.imul(x,ce)|0,i=(i=i+Math.imul(x,ue)|0)+Math.imul(C,ce)|0,o=o+Math.imul(C,ue)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,pe)|0)+Math.imul(S,fe)|0,o=o+Math.imul(S,pe)|0;var Ie=(u+(n=n+Math.imul(A,de)|0)|0)+((8191&(i=(i=i+Math.imul(A,me)|0)+Math.imul(w,de)|0))<<13)|0;u=((o=o+Math.imul(w,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(U,$),i=(i=Math.imul(U,ee))+Math.imul(j,$)|0,o=Math.imul(j,ee),n=n+Math.imul(D,re)|0,i=(i=i+Math.imul(D,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,se)|0,n=n+Math.imul(B,ce)|0,i=(i=i+Math.imul(B,ue)|0)+Math.imul(R,ce)|0,o=o+Math.imul(R,ue)|0,n=n+Math.imul(x,fe)|0,i=(i=i+Math.imul(x,pe)|0)+Math.imul(C,fe)|0,o=o+Math.imul(C,pe)|0;var Be=(u+(n=n+Math.imul(k,de)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(S,de)|0))<<13)|0;u=((o=o+Math.imul(S,me)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(U,re),i=(i=Math.imul(U,ne))+Math.imul(j,re)|0,o=Math.imul(j,ne),n=n+Math.imul(D,oe)|0,i=(i=i+Math.imul(D,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,n=n+Math.imul(N,ce)|0,i=(i=i+Math.imul(N,ue)|0)+Math.imul(P,ce)|0,o=o+Math.imul(P,ue)|0,n=n+Math.imul(B,fe)|0,i=(i=i+Math.imul(B,pe)|0)+Math.imul(R,fe)|0,o=o+Math.imul(R,pe)|0;var Re=(u+(n=n+Math.imul(x,de)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(C,de)|0))<<13)|0;u=((o=o+Math.imul(C,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(U,oe),i=(i=Math.imul(U,se))+Math.imul(j,oe)|0,o=Math.imul(j,se),n=n+Math.imul(D,ce)|0,i=(i=i+Math.imul(D,ue)|0)+Math.imul(O,ce)|0,o=o+Math.imul(O,ue)|0,n=n+Math.imul(N,fe)|0,i=(i=i+Math.imul(N,pe)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,pe)|0;var Te=(u+(n=n+Math.imul(B,de)|0)|0)+((8191&(i=(i=i+Math.imul(B,me)|0)+Math.imul(R,de)|0))<<13)|0;u=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,ce),i=(i=Math.imul(U,ue))+Math.imul(j,ce)|0,o=Math.imul(j,ue),n=n+Math.imul(D,fe)|0,i=(i=i+Math.imul(D,pe)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,pe)|0;var Ne=(u+(n=n+Math.imul(N,de)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(P,de)|0))<<13)|0;u=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(U,fe),i=(i=Math.imul(U,pe))+Math.imul(j,fe)|0,o=Math.imul(j,pe);var Pe=(u+(n=n+Math.imul(D,de)|0)|0)+((8191&(i=(i=i+Math.imul(D,me)|0)+Math.imul(O,de)|0))<<13)|0;u=((o=o+Math.imul(O,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Me=(u+(n=Math.imul(U,de))|0)+((8191&(i=(i=Math.imul(U,me))+Math.imul(j,de)|0))<<13)|0;return u=((o=Math.imul(j,me))+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,c[0]=ge,c[1]=ye,c[2]=be,c[3]=ve,c[4]=Ae,c[5]=we,c[6]=Ee,c[7]=ke,c[8]=Se,c[9]=_e,c[10]=xe,c[11]=Ce,c[12]=Ie,c[13]=Be,c[14]=Re,c[15]=Te,c[16]=Ne,c[17]=Pe,c[18]=Me,0!==u&&(c[19]=u,r.length++),r};function d(e,t,r){return(new m).mulp(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(h=p),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?h(this,e,t):r<63?p(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):d(this,e,t)},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},m.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==l||u>=i);u--){var f=0|this.words[u];this.words[u]=l<<26-o|f>>>o,l=f&a}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,c=n.length-i.length;if("mod"!==t){(a=new o(null)).length=c+1,a.words=new Array(a.length);for(var u=0;u=0;f--){var p=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(p=Math.min(p/s|0,67108863),n._ishlnsubmul(i,p,f);0!==n.negative;)p--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=p)}return a&&a.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),c=new o(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var l=r.clone(),f=t.clone();!t.isZero();){for(var p=0,h=1;0==(t.words[0]&h)&&p<26;++p,h<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(l),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var d=0,m=1;0==(r.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||c.isOdd())&&(a.iadd(l),c.isub(f)),a.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(c)):(r.isub(t),a.isub(i),c.isub(s))}return{a:a,b:c,gcd:r.iushln(u)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,l=1;0==(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var f=0,p=1;0==(r.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function A(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},i(b,y),b.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new v;else if("p192"===e)t=new A;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return g[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),c=a.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var f=this.pow(l,i),p=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),d=s;0!==h.cmp(a);){for(var m=h,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g=0;n--){for(var u=t.words[n],l=c-1;l>=0;l--){var f=u>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4===++a||0===n&&0===l)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}c=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new k(e)},i(k,E),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(50)(e))},function(e,t){},function(e,t,r){"use strict";const n=r(36),i=r(7);function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new o(e,t)},o.prototype._createNamed=function(e){let t;try{t=r(426).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){t=function(e){this._initNamed(e)}}return i(t,e),t.prototype._initNamed=function(t){e.call(this,t)},new t(this)},o.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n.decoders[e])),this.decoders[e]},o.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},o.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n.encoders[e])),this.encoders[e]},o.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},function(module,exports,__webpack_require__){var indexOf=__webpack_require__(427),Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in e)t.push(r);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r{if(t)return e(t);e(null,o.encode(r))})}}function l(e){if("function"!=typeof e)throw new Error("callback is required")}function f(e,r){if(t.isBuffer(e)&&(e=new Uint8Array(e)),!(e instanceof Uint8Array)||e.length!==r)throw new Error("Key must be a Uint8Array or Buffer of length "+r);return e}e.exports={Ed25519PublicKey:c,Ed25519PrivateKey:u,unmarshalEd25519PrivateKey:function(e,t){try{e=f(e,s.privateKeyLength+s.publicKeyLength)}catch(e){return t(e)}const r=e.slice(0,s.privateKeyLength),n=e.slice(s.privateKeyLength,e.length);t(null,new u(r,n))},unmarshalEd25519PublicKey:function(e){return e=f(e,s.publicKeyLength),new c(e)},generateKeyPair:function(e,t){void 0===t&&"function"==typeof e&&(t=e),s.generateKey((e,r)=>{if(e)return t(e);let n;try{n=new u(r.secretKey,r.publicKey)}catch(e){return void t(e)}t(null,n)})},generateKeyPairFromSeed:function(e,t,r){void 0===r&&"function"==typeof t&&(r=t),s.generateKeyFromSeed(e,(e,t)=>{if(e)return r(e);let n;try{n=new u(t.secretKey,t.publicKey)}catch(e){return void r(e)}r(null,n)})}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(157),i=r(17);t.publicKeyLength=n.sign.publicKeyLength,t.privateKeyLength=n.sign.secretKeyLength,t.generateKey=function(e){i(()=>{let t;try{t=n.sign.keyPair()}catch(t){return e(t)}e(null,t)})},t.generateKeyFromSeed=function(e,t){i(()=>{let r;try{r=n.sign.keyPair.fromSeed(e)}catch(e){return t(e)}t(null,r)})},t.hashAndSign=function(t,r,o){i(()=>{o(null,e.from(n.sign.detached(r,t)))})},t.hashAndVerify=function(e,t,r,o){i(()=>{let i;try{i=n.sign.detached.verify(r,t,e)}catch(e){return o(e)}o(null,i)})}}).call(this,r(0).Buffer)},function(e,t){},function(e,t,r){"use strict";const n=r(265),i=r(29),o=r(17),s="sha2-256";e.exports=(e=>{function t(e){if(!n.privateKeyVerify(e))throw new Error("Invalid private key")}return{generateKey:function(t){let r;do{r=e(32)}while(!n.privateKeyVerify(r));((e,r)=>o(()=>t(e,r)))(null,r)},privateKeyLength:32,hashAndSign:function(e,t,r){const a=(e,t)=>o(()=>r(e,t));i.digest(t,s,(t,r)=>{if(t)return a(t);try{const i=n.sign(r,e),o=n.signatureExport(i.signature);return a(null,o)}catch(t){a(t)}})},hashAndVerify:function(e,t,r,a){const c=(e,t)=>o(()=>a(e,t));i.digest(r,s,(r,i)=>{if(r)return c(r);try{t=n.signatureImport(t);const o=n.verify(i,t,e);return c(null,o)}catch(r){c(r)}})},compressPublicKey:function(e){if(!n.publicKeyVerify(e))throw new Error("Invalid public key");return n.publicKeyConvert(e,!0)},decompressPublicKey:function(e){return n.publicKeyConvert(e,!1)},validatePrivateKey:t,validatePublicKey:function(e){if(!n.publicKeyVerify(e))throw new Error("Invalid public key")},computePublicKey:function(e){return t(e),n.publicKeyCreate(e)}}})},function(e,t,r){"use strict";var n=r(441),i=r(442),o=r(228);function s(e,t){return void 0===e?t:(n.isBoolean(e,o.COMPRESSED_TYPE_INVALID),e)}e.exports=function(e){return{privateKeyVerify:function(t){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),32===t.length&&e.privateKeyVerify(t)},privateKeyExport:function(t,r){n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),r=s(r,!0);var a=e.privateKeyExport(t,r);return i.privateKeyExport(t,a,r)},privateKeyImport:function(t){if(n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),(t=i.privateKeyImport(t))&&32===t.length&&e.privateKeyVerify(t))return t;throw new Error(o.EC_PRIVATE_KEY_IMPORT_DER_FAIL)},privateKeyNegate:function(t){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),e.privateKeyNegate(t)},privateKeyModInverse:function(t){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),e.privateKeyModInverse(t)},privateKeyTweakAdd:function(t,r){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),e.privateKeyTweakAdd(t,r)},privateKeyTweakMul:function(t,r){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),e.privateKeyTweakMul(t,r)},publicKeyCreate:function(t,r){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),r=s(r,!0),e.publicKeyCreate(t,r)},publicKeyConvert:function(t,r){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),r=s(r,!0),e.publicKeyConvert(t,r)},publicKeyVerify:function(t){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),e.publicKeyVerify(t)},publicKeyTweakAdd:function(t,r,i){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),i=s(i,!0),e.publicKeyTweakAdd(t,r,i)},publicKeyTweakMul:function(t,r,i){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),i=s(i,!0),e.publicKeyTweakMul(t,r,i)},publicKeyCombine:function(t,r){n.isArray(t,o.EC_PUBLIC_KEYS_TYPE_INVALID),n.isLengthGTZero(t,o.EC_PUBLIC_KEYS_LENGTH_INVALID);for(var i=0;i=r)throw RangeError(n)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";var n=r(6).Buffer,i=r(443),o=n.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),s=n.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);t.privateKeyExport=function(e,t,r){var i=n.from(r?o:s);return e.copy(i,r?8:9),t.copy(i,r?181:214),i},t.privateKeyImport=function(e){var t=e.length,r=0;if(!(t2||t1?e[r+n-2]<<8:0);if(!(t<(r+=n)+i||t32||t1&&0===t[o]&&!(128&t[o+1]);--r,++o);for(var s=n.concat([n.from([0]),e.s]),a=33,c=0;a>1&&0===s[c]&&!(128&s[c+1]);--a,++c);return i.encode(t.slice(o),s.slice(c))},t.signatureImport=function(e){var t=n.alloc(32,0),r=n.alloc(32,0);try{var o=i.decode(e);if(33===o.r.length&&0===o.r[0]&&(o.r=o.r.slice(1)),o.r.length>32)throw new Error("R length is too long");if(33===o.s.length&&0===o.s[0]&&(o.s=o.s.slice(1)),o.s.length>32)throw new Error("S length is too long")}catch(e){return}return o.r.copy(t,32-o.r.length),o.s.copy(r,32-o.s.length),{r:t,s:r}},t.signatureImportLax=function(e){var t=n.alloc(32,0),r=n.alloc(32,0),i=e.length,o=0;if(48===e[o++]){var s=e[o++];if(!(128&s&&(o+=s-128)>i)&&2===e[o++]){var a=e[o++];if(128&a){if(o+(s=a-128)>i)return;for(;s>0&&0===e[o];o+=1,s-=1);for(a=0;s>0;o+=1,s-=1)a=(a<<8)+e[o]}if(!(a>i-o)){var c=o;if(o+=a,2===e[o++]){var u=e[o++];if(128&u){if(o+(s=u-128)>i)return;for(;s>0&&0===e[o];o+=1,s-=1);for(u=0;s>0;o+=1,s-=1)u=(u<<8)+e[o]}if(!(u>i-o)){var l=o;for(o+=u;a>0&&0===e[c];a-=1,c+=1);if(!(a>32)){var f=e.slice(c,c+a);for(f.copy(t,32-f.length);u>0&&0===e[l];u-=1,l+=1);if(!(u>32)){var p=e.slice(l,l+u);return p.copy(r,32-p.length),{r:t,s:r}}}}}}}}}},function(e,t,r){var n=r(6).Buffer;e.exports={check:function(e){if(e.length<8)return!1;if(e.length>72)return!1;if(48!==e[0])return!1;if(e[1]!==e.length-2)return!1;if(2!==e[2])return!1;var t=e[3];if(0===t)return!1;if(5+t>=e.length)return!1;if(2!==e[4+t])return!1;var r=e[5+t];return!(0===r||6+t+r!==e.length||128&e[4]||t>1&&0===e[4]&&!(128&e[5])||128&e[t+6]||r>1&&0===e[t+6]&&!(128&e[t+7]))},decode:function(e){if(e.length<8)throw new Error("DER sequence length is too short");if(e.length>72)throw new Error("DER sequence length is too long");if(48!==e[0])throw new Error("Expected DER sequence");if(e[1]!==e.length-2)throw new Error("DER sequence length is invalid");if(2!==e[2])throw new Error("Expected DER integer");var t=e[3];if(0===t)throw new Error("R length is zero");if(5+t>=e.length)throw new Error("R length is too long");if(2!==e[4+t])throw new Error("Expected DER integer (2)");var r=e[5+t];if(0===r)throw new Error("S length is zero");if(6+t+r!==e.length)throw new Error("S length is invalid");if(128&e[4])throw new Error("R value is negative");if(t>1&&0===e[4]&&!(128&e[5]))throw new Error("R value excessively padded");if(128&e[t+6])throw new Error("S value is negative");if(r>1&&0===e[t+6]&&!(128&e[t+7]))throw new Error("S value excessively padded");return{r:e.slice(4,4+t),s:e.slice(6+t)}},encode:function(e,t){var r=e.length,i=t.length;if(0===r)throw new Error("R length is zero");if(0===i)throw new Error("S length is zero");if(r>33)throw new Error("R length is too long");if(i>33)throw new Error("S length is too long");if(128&e[0])throw new Error("R value is negative");if(128&t[0])throw new Error("S value is negative");if(r>1&&0===e[0]&&!(128&e[1]))throw new Error("R value excessively padded");if(i>1&&0===t[0]&&!(128&t[1]))throw new Error("S value excessively padded");var o=n.allocUnsafe(6+r+i);return o[0]=48,o[1]=o.length-2,o[2]=2,o[3]=e.length,e.copy(o,4),o[4+r]=2,o[5+r]=t.length,t.copy(o,6+r),o}}},function(e,t,r){"use strict";var n=r(6).Buffer,i=r(445),o=r(450),s=r(228),a=r(113),c=r(233),u=r(456);t.privateKeyVerify=function(e){var t=a.fromBuffer(e);return!(t.isOverflow()||t.isZero())},t.privateKeyExport=function(e,t){var r=a.fromBuffer(e);if(r.isOverflow()||r.isZero())throw new Error(s.EC_PRIVATE_KEY_EXPORT_DER_FAIL);return u.mul(r).toPublicKey(t)},t.privateKeyNegate=function(e){var t=a.fromBuffer(e);return t.isZero()?n.alloc(32):(t.ucmp(a.n)>0&&t.isub(a.n),a.n.sub(t).toBuffer())},t.privateKeyModInverse=function(e){var t=a.fromBuffer(e);if(t.isOverflow()||t.isZero())throw new Error(s.EC_PRIVATE_KEY_RANGE_INVALID);return t.uinvm().toBuffer()},t.privateKeyTweakAdd=function(e,t){var r=a.fromBuffer(t);if(r.isOverflow())throw new Error(s.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);if(r.iadd(a.fromBuffer(e)),r.isOverflow()&&r.isub(a.n),r.isZero())throw new Error(s.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);return r.toBuffer()},t.privateKeyTweakMul=function(e,t){var r=a.fromBuffer(t);if(r.isOverflow()||r.isZero())throw new Error(s.EC_PRIVATE_KEY_TWEAK_MUL_FAIL);var n=a.fromBuffer(e);return r.umul(n).ureduce().toBuffer()},t.publicKeyCreate=function(e,t){var r=a.fromBuffer(e);if(r.isOverflow()||r.isZero())throw new Error(s.EC_PUBLIC_KEY_CREATE_FAIL);return u.mul(r).toPublicKey(t)},t.publicKeyConvert=function(e,t){var r=c.fromPublicKey(e);if(null===r)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);return r.toPublicKey(t)},t.publicKeyVerify=function(e){return null!==c.fromPublicKey(e)},t.publicKeyTweakAdd=function(e,t,r){var n=c.fromPublicKey(e);if(null===n)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);if((t=a.fromBuffer(t)).isOverflow())throw new Error(s.EC_PUBLIC_KEY_TWEAK_ADD_FAIL);var i=u.mul(t).add(n);if(i.inf)throw new Error(s.EC_PUBLIC_KEY_TWEAK_ADD_FAIL);return i.toPublicKey(r)},t.publicKeyTweakMul=function(e,t,r){var n=c.fromPublicKey(e);if(null===n)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);if((t=a.fromBuffer(t)).isOverflow()||t.isZero())throw new Error(s.EC_PUBLIC_KEY_TWEAK_MUL_FAIL);return n.mul(t).toPublicKey(r)},t.publicKeyCombine=function(e,t){for(var r=new Array(e.length),n=0;n=0)&&0===n.iadd(a.psn).redMul(d).ucmp(h.x)},t.recover=function(e,t,r,i){var o=a.fromBuffer(t.slice(0,32)),l=a.fromBuffer(t.slice(32,64));if(o.isOverflow()||l.isOverflow())throw new Error(s.ECDSA_SIGNATURE_PARSE_FAIL);do{if(o.isZero()||l.isZero())break;var f=o;if(r>>1){if(f.ucmp(a.psn)>=0)break;f=o.add(a.n)}var p=n.concat([n.from([2+(1&r)]),f.toBuffer()]),h=c.fromPublicKey(p);if(null===h)break;var d=o.uinvm(),m=a.n.sub(a.fromBuffer(e)).umul(d).ureduce(),g=l.umul(d).ureduce();return c.fromECJPoint(u.mulAdd(m,h,g)).toPublicKey(i)}while(0);throw new Error(s.ECDSA_RECOVER_FAIL)},t.ecdh=function(e,r){var n=t.ecdhUnsafe(e,r,!0);return i("sha256").update(n).digest()},t.ecdhUnsafe=function(e,t,r){var n=c.fromPublicKey(e);if(null===n)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);var i=a.fromBuffer(t);if(i.isOverflow()||i.isZero())throw new Error(s.ECDH_FAIL);return n.mul(i).toPublicKey(r)}},function(e,t,r){"use strict";var n=r(7),i=r(138),o=r(229),s=r(230),a=r(58);function c(e){a.call(this,"digest"),this._hash=e}n(c,a),c.prototype._update=function(e){this._hash.update(e)},c.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new c(s(e))}},function(e,t,r){var n=r(7),i=r(77),o=r(6).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function c(){this.init(),this._w=a,i.call(this,64,56)}function u(e){return e<<30|e>>>2}function l(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,c=0|this._e,f=0;f<16;++f)r[f]=e.readInt32BE(4*f);for(;f<80;++f)r[f]=r[f-3]^r[f-8]^r[f-14]^r[f-16];for(var p=0;p<80;++p){var h=~~(p/20),d=0|((t=n)<<5|t>>>27)+l(h,i,o,a)+c+r[p]+s[h];c=a,a=o,o=u(i),i=n,n=d}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},function(e,t,r){var n=r(7),i=r(77),o=r(6).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function c(){this.init(),this._w=a,i.call(this,64,56)}function u(e){return e<<5|e>>>27}function l(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,c=0|this._e,p=0;p<16;++p)r[p]=e.readInt32BE(4*p);for(;p<80;++p)r[p]=(t=r[p-3]^r[p-8]^r[p-14]^r[p-16])<<1|t>>>31;for(var h=0;h<80;++h){var d=~~(h/20),m=u(n)+f(d,i,o,a)+c+r[h]+s[d]|0;c=a,a=o,o=l(i),i=n,n=m}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},function(e,t,r){var n=r(7),i=r(231),o=r(77),s=r(6).Buffer,a=new Array(64);function c(){this.init(),this._w=a,o.call(this,64,56)}n(c,i),c.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},c.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=c},function(e,t,r){var n=r(7),i=r(232),o=r(77),s=r(6).Buffer,a=new Array(160);function c(){this.init(),this._w=a,o.call(this,128,112)}n(c,i),c.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},c.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=c},function(e,t,r){"use strict";(function(t){var n=r(451),i=r(454),o=new t(0),s=new t([0]),a=new t([1]);function c(e,t,r,n){var o=i[e];if(void 0===o)throw new Error("hash "+e+" is not supported");this._algo=e,this._securityStrength=o.securityStrength/8,this._outlen=o.outlen/8,this._reseedInterval=281474976710656,this._init(t,r,n)}c.prototype._update=function(e){var t=n(this._algo,this._K).update(this._V).update(s);e&&t.update(e),this._K=t.digest(),this._V=n(this._algo,this._K).update(this._V).digest(),e&&(this._K=n(this._algo,this._K).update(this._V).update(a).update(e).digest(),this._V=n(this._algo,this._K).update(this._V).digest())},c.prototype._init=function(e,r,n){if(e.lengththis._reseedInterval)throw new Error("Reseed is required");r&&0===r.length&&(r=void 0),r&&this._update(r);for(var i=new t(0);i.lengthr)?t=("rmd160"===e?new c:u(e)).update(t).digest():t.lengtha?t=e(t):t.length>>13,h=0|s[1],d=8191&h,m=h>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],A=8191&v,w=v>>>13,E=0|s[4],k=8191&E,S=E>>>13,_=0|s[5],x=8191&_,C=_>>>13,I=0|s[6],B=8191&I,R=I>>>13,T=0|s[7],N=8191&T,P=T>>>13,M=0|s[8],D=8191&M,O=M>>>13,L=0|s[9],U=8191&L,j=L>>>13,F=0|a[0],K=8191&F,V=F>>>13,z=0|a[1],G=8191&z,q=z>>>13,H=0|a[2],Y=8191&H,J=H>>>13,W=0|a[3],Z=8191&W,Q=W>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ce=8191&ae,ue=ae>>>13,le=0|a[8],fe=8191&le,pe=le>>>13,he=0|a[9],de=8191&he,me=he>>>13;r.length=19,n=Math.imul(f,K),i=Math.imul(f,V);var ge=u+n+((8191&(i+=Math.imul(p,K)))<<13);u=(o=Math.imul(p,V))+(i>>>13)+(ge>>>26),ge&=67108863,n=Math.imul(d,K),i=Math.imul(d,V),i+=Math.imul(m,K),o=Math.imul(m,V),n+=Math.imul(f,G),i+=Math.imul(f,q);var ye=u+n+((8191&(i+=Math.imul(p,G)))<<13);u=(o+=Math.imul(p,q))+(i>>>13)+(ye>>>26),ye&=67108863,n=Math.imul(y,K),i=Math.imul(y,V),i+=Math.imul(b,K),o=Math.imul(b,V),n+=Math.imul(d,G),i+=Math.imul(d,q),i+=Math.imul(m,G),o+=Math.imul(m,q),n+=Math.imul(f,Y),i+=Math.imul(f,J);var be=u+n+((8191&(i+=Math.imul(p,Y)))<<13);u=(o+=Math.imul(p,J))+(i>>>13)+(be>>>26),be&=67108863,n=Math.imul(A,K),i=Math.imul(A,V),i+=Math.imul(w,K),o=Math.imul(w,V),n+=Math.imul(y,G),i+=Math.imul(y,q),i+=Math.imul(b,G),o+=Math.imul(b,q),n+=Math.imul(d,Y),i+=Math.imul(d,J),i+=Math.imul(m,Y),o+=Math.imul(m,J),n+=Math.imul(f,Z),i+=Math.imul(f,Q);var ve=u+n+((8191&(i+=Math.imul(p,Z)))<<13);u=(o+=Math.imul(p,Q))+(i>>>13)+(ve>>>26),ve&=67108863,n=Math.imul(k,K),i=Math.imul(k,V),i+=Math.imul(S,K),o=Math.imul(S,V),n+=Math.imul(A,G),i+=Math.imul(A,q),i+=Math.imul(w,G),o+=Math.imul(w,q),n+=Math.imul(y,Y),i+=Math.imul(y,J),i+=Math.imul(b,Y),o+=Math.imul(b,J),n+=Math.imul(d,Z),i+=Math.imul(d,Q),i+=Math.imul(m,Z),o+=Math.imul(m,Q),n+=Math.imul(f,$),i+=Math.imul(f,ee);var Ae=u+n+((8191&(i+=Math.imul(p,$)))<<13);u=(o+=Math.imul(p,ee))+(i>>>13)+(Ae>>>26),Ae&=67108863,n=Math.imul(x,K),i=Math.imul(x,V),i+=Math.imul(C,K),o=Math.imul(C,V),n+=Math.imul(k,G),i+=Math.imul(k,q),i+=Math.imul(S,G),o+=Math.imul(S,q),n+=Math.imul(A,Y),i+=Math.imul(A,J),i+=Math.imul(w,Y),o+=Math.imul(w,J),n+=Math.imul(y,Z),i+=Math.imul(y,Q),i+=Math.imul(b,Z),o+=Math.imul(b,Q),n+=Math.imul(d,$),i+=Math.imul(d,ee),i+=Math.imul(m,$),o+=Math.imul(m,ee),n+=Math.imul(f,re),i+=Math.imul(f,ne);var we=u+n+((8191&(i+=Math.imul(p,re)))<<13);u=(o+=Math.imul(p,ne))+(i>>>13)+(we>>>26),we&=67108863,n=Math.imul(B,K),i=Math.imul(B,V),i+=Math.imul(R,K),o=Math.imul(R,V),n+=Math.imul(x,G),i+=Math.imul(x,q),i+=Math.imul(C,G),o+=Math.imul(C,q),n+=Math.imul(k,Y),i+=Math.imul(k,J),i+=Math.imul(S,Y),o+=Math.imul(S,J),n+=Math.imul(A,Z),i+=Math.imul(A,Q),i+=Math.imul(w,Z),o+=Math.imul(w,Q),n+=Math.imul(y,$),i+=Math.imul(y,ee),i+=Math.imul(b,$),o+=Math.imul(b,ee),n+=Math.imul(d,re),i+=Math.imul(d,ne),i+=Math.imul(m,re),o+=Math.imul(m,ne),n+=Math.imul(f,oe),i+=Math.imul(f,se);var Ee=u+n+((8191&(i+=Math.imul(p,oe)))<<13);u=(o+=Math.imul(p,se))+(i>>>13)+(Ee>>>26),Ee&=67108863,n=Math.imul(N,K),i=Math.imul(N,V),i+=Math.imul(P,K),o=Math.imul(P,V),n+=Math.imul(B,G),i+=Math.imul(B,q),i+=Math.imul(R,G),o+=Math.imul(R,q),n+=Math.imul(x,Y),i+=Math.imul(x,J),i+=Math.imul(C,Y),o+=Math.imul(C,J),n+=Math.imul(k,Z),i+=Math.imul(k,Q),i+=Math.imul(S,Z),o+=Math.imul(S,Q),n+=Math.imul(A,$),i+=Math.imul(A,ee),i+=Math.imul(w,$),o+=Math.imul(w,ee),n+=Math.imul(y,re),i+=Math.imul(y,ne),i+=Math.imul(b,re),o+=Math.imul(b,ne),n+=Math.imul(d,oe),i+=Math.imul(d,se),i+=Math.imul(m,oe),o+=Math.imul(m,se),n+=Math.imul(f,ce),i+=Math.imul(f,ue);var ke=u+n+((8191&(i+=Math.imul(p,ce)))<<13);u=(o+=Math.imul(p,ue))+(i>>>13)+(ke>>>26),ke&=67108863,n=Math.imul(D,K),i=Math.imul(D,V),i+=Math.imul(O,K),o=Math.imul(O,V),n+=Math.imul(N,G),i+=Math.imul(N,q),i+=Math.imul(P,G),o+=Math.imul(P,q),n+=Math.imul(B,Y),i+=Math.imul(B,J),i+=Math.imul(R,Y),o+=Math.imul(R,J),n+=Math.imul(x,Z),i+=Math.imul(x,Q),i+=Math.imul(C,Z),o+=Math.imul(C,Q),n+=Math.imul(k,$),i+=Math.imul(k,ee),i+=Math.imul(S,$),o+=Math.imul(S,ee),n+=Math.imul(A,re),i+=Math.imul(A,ne),i+=Math.imul(w,re),o+=Math.imul(w,ne),n+=Math.imul(y,oe),i+=Math.imul(y,se),i+=Math.imul(b,oe),o+=Math.imul(b,se),n+=Math.imul(d,ce),i+=Math.imul(d,ue),i+=Math.imul(m,ce),o+=Math.imul(m,ue),n+=Math.imul(f,fe),i+=Math.imul(f,pe);var Se=u+n+((8191&(i+=Math.imul(p,fe)))<<13);u=(o+=Math.imul(p,pe))+(i>>>13)+(Se>>>26),Se&=67108863,n=Math.imul(U,K),i=Math.imul(U,V),i+=Math.imul(j,K),o=Math.imul(j,V),n+=Math.imul(D,G),i+=Math.imul(D,q),i+=Math.imul(O,G),o+=Math.imul(O,q),n+=Math.imul(N,Y),i+=Math.imul(N,J),i+=Math.imul(P,Y),o+=Math.imul(P,J),n+=Math.imul(B,Z),i+=Math.imul(B,Q),i+=Math.imul(R,Z),o+=Math.imul(R,Q),n+=Math.imul(x,$),i+=Math.imul(x,ee),i+=Math.imul(C,$),o+=Math.imul(C,ee),n+=Math.imul(k,re),i+=Math.imul(k,ne),i+=Math.imul(S,re),o+=Math.imul(S,ne),n+=Math.imul(A,oe),i+=Math.imul(A,se),i+=Math.imul(w,oe),o+=Math.imul(w,se),n+=Math.imul(y,ce),i+=Math.imul(y,ue),i+=Math.imul(b,ce),o+=Math.imul(b,ue),n+=Math.imul(d,fe),i+=Math.imul(d,pe),i+=Math.imul(m,fe),o+=Math.imul(m,pe),n+=Math.imul(f,de),i+=Math.imul(f,me);var _e=u+n+((8191&(i+=Math.imul(p,de)))<<13);u=(o+=Math.imul(p,me))+(i>>>13)+(_e>>>26),_e&=67108863,n=Math.imul(U,G),i=Math.imul(U,q),i+=Math.imul(j,G),o=Math.imul(j,q),n+=Math.imul(D,Y),i+=Math.imul(D,J),i+=Math.imul(O,Y),o+=Math.imul(O,J),n+=Math.imul(N,Z),i+=Math.imul(N,Q),i+=Math.imul(P,Z),o+=Math.imul(P,Q),n+=Math.imul(B,$),i+=Math.imul(B,ee),i+=Math.imul(R,$),o+=Math.imul(R,ee),n+=Math.imul(x,re),i+=Math.imul(x,ne),i+=Math.imul(C,re),o+=Math.imul(C,ne),n+=Math.imul(k,oe),i+=Math.imul(k,se),i+=Math.imul(S,oe),o+=Math.imul(S,se),n+=Math.imul(A,ce),i+=Math.imul(A,ue),i+=Math.imul(w,ce),o+=Math.imul(w,ue),n+=Math.imul(y,fe),i+=Math.imul(y,pe),i+=Math.imul(b,fe),o+=Math.imul(b,pe),n+=Math.imul(d,de),i+=Math.imul(d,me);var xe=u+n+((8191&(i+=Math.imul(m,de)))<<13);u=(o+=Math.imul(m,me))+(i>>>13)+(xe>>>26),xe&=67108863,n=Math.imul(U,Y),i=Math.imul(U,J),i+=Math.imul(j,Y),o=Math.imul(j,J),n+=Math.imul(D,Z),i+=Math.imul(D,Q),i+=Math.imul(O,Z),o+=Math.imul(O,Q),n+=Math.imul(N,$),i+=Math.imul(N,ee),i+=Math.imul(P,$),o+=Math.imul(P,ee),n+=Math.imul(B,re),i+=Math.imul(B,ne),i+=Math.imul(R,re),o+=Math.imul(R,ne),n+=Math.imul(x,oe),i+=Math.imul(x,se),i+=Math.imul(C,oe),o+=Math.imul(C,se),n+=Math.imul(k,ce),i+=Math.imul(k,ue),i+=Math.imul(S,ce),o+=Math.imul(S,ue),n+=Math.imul(A,fe),i+=Math.imul(A,pe),i+=Math.imul(w,fe),o+=Math.imul(w,pe),n+=Math.imul(y,de),i+=Math.imul(y,me);var Ce=u+n+((8191&(i+=Math.imul(b,de)))<<13);u=(o+=Math.imul(b,me))+(i>>>13)+(Ce>>>26),Ce&=67108863,n=Math.imul(U,Z),i=Math.imul(U,Q),i+=Math.imul(j,Z),o=Math.imul(j,Q),n+=Math.imul(D,$),i+=Math.imul(D,ee),i+=Math.imul(O,$),o+=Math.imul(O,ee),n+=Math.imul(N,re),i+=Math.imul(N,ne),i+=Math.imul(P,re),o+=Math.imul(P,ne),n+=Math.imul(B,oe),i+=Math.imul(B,se),i+=Math.imul(R,oe),o+=Math.imul(R,se),n+=Math.imul(x,ce),i+=Math.imul(x,ue),i+=Math.imul(C,ce),o+=Math.imul(C,ue),n+=Math.imul(k,fe),i+=Math.imul(k,pe),i+=Math.imul(S,fe),o+=Math.imul(S,pe),n+=Math.imul(A,de),i+=Math.imul(A,me);var Ie=u+n+((8191&(i+=Math.imul(w,de)))<<13);u=(o+=Math.imul(w,me))+(i>>>13)+(Ie>>>26),Ie&=67108863,n=Math.imul(U,$),i=Math.imul(U,ee),i+=Math.imul(j,$),o=Math.imul(j,ee),n+=Math.imul(D,re),i+=Math.imul(D,ne),i+=Math.imul(O,re),o+=Math.imul(O,ne),n+=Math.imul(N,oe),i+=Math.imul(N,se),i+=Math.imul(P,oe),o+=Math.imul(P,se),n+=Math.imul(B,ce),i+=Math.imul(B,ue),i+=Math.imul(R,ce),o+=Math.imul(R,ue),n+=Math.imul(x,fe),i+=Math.imul(x,pe),i+=Math.imul(C,fe),o+=Math.imul(C,pe),n+=Math.imul(k,de),i+=Math.imul(k,me);var Be=u+n+((8191&(i+=Math.imul(S,de)))<<13);u=(o+=Math.imul(S,me))+(i>>>13)+(Be>>>26),Be&=67108863,n=Math.imul(U,re),i=Math.imul(U,ne),i+=Math.imul(j,re),o=Math.imul(j,ne),n+=Math.imul(D,oe),i+=Math.imul(D,se),i+=Math.imul(O,oe),o+=Math.imul(O,se),n+=Math.imul(N,ce),i+=Math.imul(N,ue),i+=Math.imul(P,ce),o+=Math.imul(P,ue),n+=Math.imul(B,fe),i+=Math.imul(B,pe),i+=Math.imul(R,fe),o+=Math.imul(R,pe),n+=Math.imul(x,de),i+=Math.imul(x,me);var Re=u+n+((8191&(i+=Math.imul(C,de)))<<13);u=(o+=Math.imul(C,me))+(i>>>13)+(Re>>>26),Re&=67108863,n=Math.imul(U,oe),i=Math.imul(U,se),i+=Math.imul(j,oe),o=Math.imul(j,se),n+=Math.imul(D,ce),i+=Math.imul(D,ue),i+=Math.imul(O,ce),o+=Math.imul(O,ue),n+=Math.imul(N,fe),i+=Math.imul(N,pe),i+=Math.imul(P,fe),o+=Math.imul(P,pe),n+=Math.imul(B,de),i+=Math.imul(B,me);var Te=u+n+((8191&(i+=Math.imul(R,de)))<<13);u=(o+=Math.imul(R,me))+(i>>>13)+(Te>>>26),Te&=67108863,n=Math.imul(U,ce),i=Math.imul(U,ue),i+=Math.imul(j,ce),o=Math.imul(j,ue),n+=Math.imul(D,fe),i+=Math.imul(D,pe),i+=Math.imul(O,fe),o+=Math.imul(O,pe),n+=Math.imul(N,de),i+=Math.imul(N,me);var Ne=u+n+((8191&(i+=Math.imul(P,de)))<<13);u=(o+=Math.imul(P,me))+(i>>>13)+(Ne>>>26),Ne&=67108863,n=Math.imul(U,fe),i=Math.imul(U,pe),i+=Math.imul(j,fe),o=Math.imul(j,pe),n+=Math.imul(D,de),i+=Math.imul(D,me);var Pe=u+n+((8191&(i+=Math.imul(O,de)))<<13);u=(o+=Math.imul(O,me))+(i>>>13)+(Pe>>>26),Pe&=67108863,n=Math.imul(U,de),i=Math.imul(U,me);var Me=u+n+((8191&(i+=Math.imul(j,de)))<<13);return u=(o=Math.imul(j,me))+(i>>>13)+(Me>>>26),Me&=67108863,c[0]=ge,c[1]=ye,c[2]=be,c[3]=ve,c[4]=Ae,c[5]=we,c[6]=Ee,c[7]=ke,c[8]=Se,c[9]=_e,c[10]=xe,c[11]=Ce,c[12]=Ie,c[13]=Be,c[14]=Re,c[15]=Te,c[16]=Ne,c[17]=Pe,c[18]=Me,0!==u&&(c[19]=u,r.length++),r}},function(e,t,r){"use strict";var n=r(6).Buffer,i=r(113),o=r(233),s=r(234);function a(){this.x=i.fromBuffer(n.from("79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798","hex")),this.y=i.fromBuffer(n.from("483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8","hex")),this.inf=!1,this._precompute()}a.prototype._precompute=function(){for(var e=new o(this.x,this.y),t=new Array(1+Math.ceil(64.25)),r=t[0]=e,n=1;n=u;f--)l=(l<<1)+i[f];c.push(l)}for(var p=new s(null,null,null),h=new s(null,null,null),d=a;d>0;d--){for(var m=0;m=0;l--){for(var f=0;l>=0&&(u[0]=0|a[0][l],u[1]=0|a[1][l],0===u[0]&&0===u[1]);++f,--l);if(l>=0&&(f+=1),c=c.dblp(f),l<0)break;for(var p=0;p<2;p++){var h,d=u[p];0!==d&&(d>0?h=o[p][d>>1]:d<0&&(h=o[p][-d>>1].neg()),c=void 0===h.z?c.mixedAdd(h):c.add(h))}}return c},e.exports=new a},function(e,t,r){"use strict";(function(t){const n=r(96),i=r(190),o={"AES-128":{ivSize:16,keySize:16},"AES-256":{ivSize:16,keySize:32},Blowfish:{ivSize:8,cipherKeySize:32}};e.exports=((e,r,s,a)=>{const c=o[e];if(!c)return a(new Error("unkown cipherType passed"));if(!r)return a(new Error("unkown hashType passed"));const u=c.keySize,l=c.ivSize,f=t.from("key expansion"),p=2*(l+u+20);i.create(r,s,(e,r)=>{if(e)return a(e);r.digest(f,(e,i)=>{if(e)return a(e);let o=[],s=0;n(()=>s{if(t)return e(t);let a=n.length;s+a>p&&(a=p-s),o.push(n),s+=a,r.digest(i,(t,r)=>{if(t)return e(t);i=r,e()})})},function(e){if(e)return a(e);const r=p/2,n=t.concat(o),i=n.slice(0,r),s=n.slice(r,p),c=e=>({iv:e.slice(0,l),cipherKey:e.slice(l,l+u),macKey:e.slice(l+u)});a(null,{k1:c(i),k2:c(s)})})})})})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(459);e.exports=((e,t)=>{n.generateEphmeralKeyPair(e,t)})},function(e,t,r){"use strict";(function(e){const n=r(135)(),i=r(134),o=r(36).bignum,s=r(226),a=s.toBase64,c=s.toBn,u={"P-256":256,"P-384":384,"P-521":521};t.generateEphmeralKeyPair=function(t,r){i(n.subtle.generateKey({name:"ECDH",namedCurve:t},!0,["deriveBits"]).then(r=>{const s=(s,c,l)=>{let f;"function"==typeof c&&(l=c,c=void 0),f=c?n.subtle.importKey("jwk",function(e,t){const r=p(e,t.public);return r.d=a(new o(t.private)),r}(t,c),{name:"ECDH",namedCurve:t},!1,["deriveBits"]):Promise.resolve(r.privateKey);const h=Promise.all([n.subtle.importKey("jwk",p(t,s),{name:"ECDH",namedCurve:t},!1,[]),f]);i(h.then(e=>n.subtle.deriveBits({name:"ECDH",namedCurve:t,public:e[0]},e[1],u[t])).then(t=>e.from(t)),l)};return n.subtle.exportKey("jwk",r.publicKey).then(e=>({key:f(e),genSharedKey:s}))}),r)};const l={"P-256":32,"P-384":48,"P-521":66};function f(t){const r=l[t.crv];return e.concat([e.from([4]),c(t.x).toArrayLike(e,"be",r),c(t.y).toArrayLike(e,"be",r)],1+2*r)}function p(t,r){const n=l[t];if(!r.slice(0,1).equals(e.from([4])))throw new Error("Invalid key format");const i=new o(r.slice(1,n+1)),s=new o(r.slice(1+n));return{kty:"EC",crv:t,x:a(i,n),y:a(s,n),ext:!0}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(75),i={sha1:"sha1","sha2-256":"sha256","sha2-512":"sha512"};e.exports=function(e,t,r,o,s){const a=i[s];if(!a)throw new Error(`Hash '${s}' is unknown or not supported`);const c=n.pkcs5.pbkdf2(e,t,r,o,a);return n.util.encode64(c)}},function(e,t,r){"use strict";(function(t){const n=r(73),i=r(66),o=r(462),s=r(143),a=r(18),c=r(27),u=r(19),l=new Error("Sorry, Not Implemented Yet."),f=u.proto(function(e){if(!(this instanceof f))return new f(e);if(null==e&&(e=""),e instanceof t)this.buffer=o.fromBuffer(e);else if("string"==typeof e||e instanceof String)this.buffer=o.fromString(e);else{if(!(e.buffer&&e.protos&&e.protoCodes))throw new Error("addr must be a string, Buffer, or another Multiaddr");this.buffer=o.fromBuffer(e.buffer)}},{className:"Multiaddr",symbolName:"@multiformats/js-multiaddr/multiaddr"});f.prototype.toString=function(){return o.bufferToString(this.buffer)},f.prototype.toOptions=function(){const e={},t=this.toString().split("/");return e.family="ip4"===t[1]?"ipv4":"ipv6",e.host=t[2],e.transport=t[3],e.port=t[4],e},f.prototype.inspect=function(){return""},f.prototype.protos=function(){return n(this.protoCodes(),function(e){return i(s(e))})},f.prototype.protoCodes=function(){const e=[],t=this.buffer;let r=0;for(;r{if(e[0]===s.names.ipfs.code)return!0})[0][1],c.decode(e)}catch(t){e=null}return e},f.prototype.equals=function(e){return this.buffer.equals(e.buffer)},f.prototype.nodeAddress=function(){if(!this.isThinWaistAddress())throw new Error('Multiaddr must be "thin waist" address for nodeAddress.');const e=this.protoCodes(),t=this.toString().split("/").slice(1);return{family:41===e[0]?"IPv6":"IPv4",address:t[1],port:t[3]}},f.fromNodeAddress=function(e,t){if(!e)throw new Error("requires node address object");if(!t)throw new Error("requires transport protocol");const r="IPv6"===e.family?"ip6":"ip4";return f("/"+[r,e.address,t,e.port].join("/"))},f.prototype.isThinWaistAddress=function(e){const t=(e||this).protos();return 2===t.length&&((4===t[0].code||41===t[0].code)&&(6===t[1].code||17===t[1].code))},f.prototype.fromStupidString=function(e){throw l},f.protocols=s,f.isName=function(e){return!!f.isMultiaddr(e)&&e.protos().some(e=>e.resolvable)},f.resolve=function(e,t){return f.isMultiaddr(e)&&f.isName(e)?t(new Error("not implemented yet")):t(new Error("not a valid name"))},e.exports=f}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(73),i=r(175),o=r(463),s=r(143),a=r(18);function c(e){const t=[],r=e.split("/").slice(1);if(1===r.length&&""===r[0])return[];for(let n=0;n=r.length)throw v("invalid address: "+e);t.push([i,r[n]])}else t.push([i])}return t}function u(e){const t=[];return n(e,function(e){const r=A(e);t.push(r.name),e.length>1&&t.push(e[1])}),"/"+t.join("/")}function l(e){return n(e,function(e){Array.isArray(e)||(e=[e]);const t=A(e);return e.length>1?[t.code,o.toBuffer(t.code,e[1])]:[t.code]})}function f(e){return n(e,function(e){const t=A(e);return e.length>1?[t.code,o.toString(t.code,e[1])]:[t.code]})}function p(e){return g(t.concat(n(e,function(e){const r=A(e);let n=t.from(a.encode(r.code));return e.length>1&&(n=t.concat([n,e[1]])),n})))}function h(e,t){if(e.size>0)return e.size/8;if(0===e.size)return 0;return a.decode(t)+a.decode.bytes}function d(e){const t=[];let r=0;for(;re.length)throw v("Invalid address buffer: "+e.toString("hex"));t.push([n,c])}return t}function m(e){return p(l(c(e=b(e))))}function g(e){const r=y(e);if(r)throw r;return t.from(e)}function y(e){try{d(e)}catch(e){return e}}function b(e){return"/"+i(e.trim().split("/")).join("/")}function v(e){return new Error("Error parsing address: "+e)}function A(e){return s(e[0])}e.exports={stringToStringTuples:c,stringTuplesToString:u,tuplesToStringTuples:f,stringTuplesToTuples:l,bufferToTuples:d,tuplesToBuffer:p,bufferToString:function(e){return u(f(d(e)))},stringToBuffer:m,fromString:function(e){return m(e)},fromBuffer:g,validateBuffer:y,isValidBuffer:function(e){return void 0===y(e)},cleanPath:b,ParseError:v,protoFromTuple:A,sizeForAddr:h}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(153),i=r(176),o=r(143),s=r(27),a=r(18);function c(e,r){return r instanceof t?c.toString(e,r):c.toBuffer(e,r)}function u(e){if(!e.isValid())throw new Error("invalid ip address");return n.toBuffer(e.address)}e.exports=c,c.toString=function(e,t){switch((e=o(e)).code){case 4:case 41:return n.toString(t);case 6:case 17:case 33:case 132:return function(e){return e.readUInt16BE(0)}(t);case 54:case 55:case 56:return function(e){const t=a.decode(e);if((e=e.slice(a.decode.bytes)).length!==t)throw new Error("inconsistent lengths");return e.toString()}(t);case 421:return function(e){const t=a.decode(e),r=e.slice(a.decode.bytes);if(r.length!==t)throw new Error("inconsistent lengths");return s.encode(r)}(t);default:return t.toString("hex")}},c.toBuffer=function(e,r){switch((e=o(e)).code){case 4:return u(new i.Address4(r));case 41:return u(new i.Address6(r));case 6:case 17:case 33:case 132:return function(e){const r=t.alloc(2);return r.writeUInt16BE(e,0),r}(parseInt(r,10));case 54:case 55:case 56:return function(e){const r=t.from(e),n=t.from(a.encode(r.length));return t.concat([n,r])}(r);case 421:return function(e){const r=t.from(s.decode(e)),n=t.from(a.encode(r.length));return t.concat([n,r])}(r);default:return t.from(r,"hex")}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(236).ensureMultiaddr,i=r(465);e.exports=class{constructor(e){this._multiaddrs=e||[],this._observedMultiaddrs=[]}add(e){e=n(e),this.has(e)||this._multiaddrs.push(e)}addSafe(e){e=n(e),this._observedMultiaddrs.some((t,r)=>{if(t.equals(e))return this.add(e),this._observedMultiaddrs.splice(r,1),!0})||this._observedMultiaddrs.push(e)}toArray(){return this._multiaddrs.slice()}get size(){return this._multiaddrs.length}forEach(e){return this._multiaddrs.forEach(e)}filterBy(e){return"object"!=typeof e||"function"!=typeof e.matches||"function"!=typeof e.partialMatch||"function"!=typeof e.toString?[]:this._multiaddrs.filter(t=>e.matches(t))}has(e){return e=n(e),this._multiaddrs.some(t=>t.equals(e))}delete(e){e=n(e),this._multiaddrs.some((t,r)=>{if(t.equals(e))return this._multiaddrs.splice(r,1),!0})}replace(e,t){Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]),e.forEach(e=>this.delete(e)),t.forEach(e=>this.add(e))}clear(){this._multiaddrs=[]}distinct(){return i(this._multiaddrs,e=>[e.toOptions().port,e.toOptions().transport].join())}}},function(e,t,r){(function(e,r){var n=200,i="Expected a function",o="__lodash_hash_undefined__",s=1,a=2,c=1/0,u=9007199254740991,l="[object Arguments]",f="[object Array]",p="[object Boolean]",h="[object Date]",d="[object Error]",m="[object Function]",g="[object GeneratorFunction]",y="[object Map]",b="[object Number]",v="[object Object]",A="[object RegExp]",w="[object Set]",E="[object String]",k="[object Symbol]",S="[object ArrayBuffer]",_="[object DataView]",x=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,C=/^\w*$/,I=/^\./,B=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,R=/\\(\\)?/g,T=/^\[object .+?Constructor\]$/,N=/^(?:0|[1-9]\d*)$/,P={};P["[object Float32Array]"]=P["[object Float64Array]"]=P["[object Int8Array]"]=P["[object Int16Array]"]=P["[object Int32Array]"]=P["[object Uint8Array]"]=P["[object Uint8ClampedArray]"]=P["[object Uint16Array]"]=P["[object Uint32Array]"]=!0,P[l]=P[f]=P[S]=P[p]=P[_]=P[h]=P[d]=P[m]=P[y]=P[b]=P[v]=P[A]=P[w]=P[E]=P["[object WeakMap]"]=!1;var M="object"==typeof e&&e&&e.Object===Object&&e,D="object"==typeof self&&self&&self.Object===Object&&self,O=M||D||Function("return this")(),L=t&&!t.nodeType&&t,U=L&&"object"==typeof r&&r&&!r.nodeType&&r,j=U&&U.exports===L&&M.process,F=function(){try{return j&&j.binding("util")}catch(e){}}(),K=F&&F.isTypedArray;function V(e,t){return!!(e?e.length:0)&&function(e,t,r){if(t!=t)return function(e,t,r,n){var i=e.length,o=r+(n?1:-1);for(;n?o--:++o-1}function z(e,t,r){for(var n=-1,i=e?e.length:0;++n-1},Ie.prototype.set=function(e,t){var r=this.__data__,n=Pe(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},Be.prototype.clear=function(){this.__data__={hash:new Ce,map:new(de||Ie),string:new Ce}},Be.prototype.delete=function(e){return ze(this,e).delete(e)},Be.prototype.get=function(e){return ze(this,e).get(e)},Be.prototype.has=function(e){return ze(this,e).has(e)},Be.prototype.set=function(e,t){return ze(this,e).set(e,t),this},Re.prototype.add=Re.prototype.push=function(e){return this.__data__.set(e,o),this},Re.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.clear=function(){this.__data__=new Ie},Te.prototype.delete=function(e){return this.__data__.delete(e)},Te.prototype.get=function(e){return this.__data__.get(e)},Te.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Ie){var i=r.__data__;if(!de||i.lengthu))return!1;var f=o.get(e);if(f&&o.get(t))return f==t;var p=-1,h=!0,d=i&s?new Re:void 0;for(o.set(e,t),o.set(t,e);++p-1&&e%1==0&&e-1&&e%1==0&&e<=u}function st(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function at(e){return!!e&&"object"==typeof e}function ct(e){return"symbol"==typeof e||at(e)&&se.call(e)==k}var ut=K?function(e){return function(t){return e(t)}}(K):function(e){return at(e)&&ot(e.length)&&!!P[se.call(e)]};function lt(e){return nt(e)?Ne(e):je(e)}function ft(e){return e}r.exports=function(e,t){return e&&e.length?function(e,t,r){var i=-1,o=V,s=e.length,a=!0,c=[],u=c;if(r)a=!1,o=z;else if(s>=n){var l=t?null:Ke(e);if(l)return W(l);a=!1,o=H,u=new Re}else u=t?[]:c;e:for(;++i"}toJSON(){return{id:this.toB58String(),privKey:u(this.marshalPrivKey()),pubKey:u(this.marshalPubKey())}}toHexString(){return i.toHexString(this.id)}toBytes(){return this.id}toB58String(){return this._idB58String}isEqual(e){if(n.isBuffer(e))return this.id.equals(e);if(e.id)return this.id.equals(e.id);throw new Error("not valid Id")}isValid(e){this.privKey&&this.privKey.public&&this.privKey.public.bytes&&n.isBuffer(this.pubKey.bytes)&&this.privKey.public.bytes.equals(this.pubKey.bytes)?e():e(new Error("Keys not match"))}}function u(e){if(e)return e.toString("base64")}(t=e.exports=c).create=function(e,t){"function"==typeof e&&(t=e,e={}),(e=e||{}).bits=e.bits||2048,a([t=>o.keys.generateKeyPair("RSA",e.bits,t),(e,t)=>e.public.hash((r,n)=>{t(r,n,e)})],(e,r,n)=>{if(e)return t(e);t(null,new c(r,n))})},t.createFromHexString=function(e){return new c(i.fromHexString(e))},t.createFromBytes=function(e){return new c(e)},t.createFromB58String=function(e){return new c(i.fromB58String(e))},t.createFromPubKey=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let r;try{let i=e;if("string"==typeof i&&(i=n.from(e,"base64")),!n.isBuffer(i))throw new Error("Supplied key is neither a base64 string nor a buffer");r=o.keys.unmarshalPublicKey(i)}catch(e){return t(e)}r.hash((e,n)=>{if(e)return t(e);t(null,new c(n,null,r))})},t.createFromPrivKey=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let r=e;try{if("string"==typeof r&&(r=n.from(e,"base64")),!n.isBuffer(r))throw new Error("Supplied key is neither a base64 string nor a buffer")}catch(e){return t(e)}a([e=>o.keys.unmarshalPrivateKey(r,e),(e,t)=>e.public.hash((r,n)=>{t(r,n,e)})],(e,r,n)=>{if(e)return t(e);t(null,new c(r,n,n.public))})},t.createFromJSON=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let r,s,u,l;try{r=i.fromB58String(e.id),s=e.privKey&&n.from(e.privKey,"base64"),u=e.pubKey&&n.from(e.pubKey,"base64"),l=u&&o.keys.unmarshalPublicKey(u)}catch(e){return t(e)}s?a([e=>o.keys.unmarshalPrivateKey(s,e),(e,t)=>e.public.hash((r,n)=>{t(r,n,e)}),(e,t,r)=>{l?l.hash((n,i)=>{r(n,e,t,i)}):r(null,e,t)}],(e,n,i,o)=>e?t(e):l&&!n.equals(o)?t(new Error("Public and private key do not match")):r&&!n.equals(r)?t(new Error("Id and private key do not match")):void t(null,new c(r,i,l))):t(null,new c(r,null,l))},t.isPeerId=function(e){return Boolean("object"==typeof e&&e._id&&e._idB58String)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(237),i=r(469),o=r(471);(t=e.exports).aes=i,t.hmac=n,t.keys=o,t.randomBytes=r(242),t.pbkdf2=r(482)},function(e,t,r){"use strict";e.exports={SHA1:20,SHA256:32,SHA512:64}},function(e,t,r){"use strict";const n=r(470),i={16:"aes-128-ctr",32:"aes-256-ctr"};t.create=function(e,t,r){const o=i[e.length];if(!o)return r(new Error("Invalid key length"));const s=n.createCipheriv(o,e,t),a=n.createDecipheriv(o,e,t);r(null,{encrypt(e,t){t(null,s.update(e))},decrypt(e,t){t(null,a.update(e))}})}},function(e,t,r){"use strict";const n=r(155);e.exports={createCipheriv:n.createCipheriv,createDecipheriv:n.createDecipheriv}},function(e,t,r){"use strict";(function(n){const i=r(25)(r(146)),o=r(75);t=e.exports;const s={rsa:r(472),ed25519:r(477),secp256k1:r(227)(i,r(242))};function a(e){return void 0!==s[e.toLowerCase()]}t.supportedKeys=s,t.keysPBM=i,t.keyStretcher=r(479),t.generateEphemeralKeyPair=r(480),t.generateKeyPair=((e,t,r)=>{let n=s[e.toLowerCase()];if(!n)return r(new Error("invalid or unsupported key type"));n.generateKeyPair(t,r)}),t.generateKeyPairFromSeed=((e,t,r,n)=>{let i=s[e.toLowerCase()];return i?"ed25519"!==e.toLowerCase()?n(new Error("Seed key derivation is unimplemented for RSA or secp256k1")):void i.generateKeyPairFromSeed(t,r,n):n(new Error("invalid or unsupported key type"))}),t.unmarshalPublicKey=(e=>{const t=i.PublicKey.decode(e),r=t.Data;switch(t.Type){case i.KeyType.RSA:return s.rsa.unmarshalRsaPublicKey(r);case i.KeyType.Ed25519:return s.ed25519.unmarshalEd25519PublicKey(r);case i.KeyType.Secp256k1:if(s.secp256k1)return s.secp256k1.unmarshalSecp256k1PublicKey(r);throw new Error("secp256k1 support requires libp2p-crypto-secp256k1 package");default:throw new Error("invalid or unsupported key type")}}),t.marshalPublicKey=((e,t)=>{if(!a(t=(t||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type");return e.bytes}),t.unmarshalPrivateKey=((e,t)=>{let r;try{r=i.PrivateKey.decode(e)}catch(e){return t(e)}const n=r.Data;switch(r.Type){case i.KeyType.RSA:return s.rsa.unmarshalRsaPrivateKey(n,t);case i.KeyType.Ed25519:return s.ed25519.unmarshalEd25519PrivateKey(n,t);case i.KeyType.Secp256k1:return s.secp256k1?s.secp256k1.unmarshalSecp256k1PrivateKey(n,t):t(new Error("secp256k1 support requires libp2p-crypto-secp256k1 package"));default:t(new Error("invalid or unsupported key type"))}}),t.marshalPrivateKey=((e,t)=>{if(!a(t=(t||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type");return e.bytes}),t.import=((e,t,r)=>{try{const i=o.pki.decryptRsaPrivateKey(e,t);if(null===i)throw new Error("Cannot read the key, most likely the password is wrong or not a RSA key");let a=o.asn1.toDer(o.pki.privateKeyToAsn1(i));return a=n.from(a.getBytes(),"binary"),s.rsa.unmarshalRsaPrivateKey(a,r)}catch(e){r(e)}})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(238),i=r(25),o=r(27),s=r(240),a=i(r(146)),c=r(75),u=r(17);class l{constructor(e){this._key=e}verify(e,t,r){p(r),s.hashAndVerify(this._key,t,e,r)}marshal(){return s.utils.jwkToPkix(this._key)}get bytes(){return a.PublicKey.encode({Type:a.KeyType.RSA,Data:this.marshal()})}encrypt(e){return this._key.encrypt(e,"RSAES-PKCS1-V1_5")}equals(e){return this.bytes.equals(e.bytes)}hash(e){p(e),n(this.bytes,"sha2-256",e)}}class f{constructor(e,t){this._key=e,this._publicKey=t}genSecret(){return s.getRandomValues(new Uint8Array(16))}sign(e,t){p(t),s.hashAndSign(this._key,e,t)}get public(){if(!this._publicKey)throw new Error("public key not provided");return new l(this._publicKey)}decrypt(e,t){s.decrypt(this._key,e,t)}marshal(){return s.utils.jwkToPkcs1(this._key)}get bytes(){return a.PrivateKey.encode({Type:a.KeyType.RSA,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){p(e),n(this.bytes,"sha2-256",e)}id(e){this.public.hash((t,r)=>{if(t)return e(t);e(null,o.encode(r))})}export(e,t,r){"function"==typeof t&&(r=t,t=e,e="pkcs-8"),p(r),u(()=>{let n=null,i=null;try{const r=new c.util.ByteBuffer(this.marshal()),o=c.asn1.fromDer(r),s=c.pki.privateKeyFromAsn1(o);if("pkcs-8"===e){const e={algorithm:"aes256",count:1e4,saltSize:16,prfAlgorithm:"sha512"};i=c.pki.encryptRsaPrivateKey(s,t,e)}else n=new Error(`Unknown export format '${e}'`)}catch(e){n=e}r(n,i)})}}function p(e){if("function"!=typeof e)throw new Error("callback is required")}e.exports={RsaPublicKey:l,RsaPrivateKey:f,unmarshalRsaPublicKey:function(e){const t=s.utils.pkixToJwk(e);return new l(t)},unmarshalRsaPrivateKey:function(e,t){const r=s.utils.pkcs1ToJwk(e);s.unmarshalPrivateKey(r,(e,r)=>{if(e)return t(e);t(null,new f(r.privateKey,r.publicKey))})},generateKeyPair:function(e,t){s.generateKey(e,(e,r)=>{if(e)return t(e);t(null,new f(r.privateKey,r.publicKey))})},fromJwk:function(e,t){s.unmarshalPrivateKey(e,(e,r)=>{if(e)return t(e);t(null,new f(r.privateKey,r.publicKey))})}}},function(e,t,r){"use strict";(function(t){const n=r(219),i=r(128),o=r(239),s=r(474),a=o.toCallback,c=o.toBuf,u=o.fromString,l=o.fromNumberTo32BitBuf;e.exports={sha1:s.sha1,sha2256:s.sha2256,sha2512:s.sha2512,sha3512:a(c(n.sha3_512)),sha3384:a(c(n.sha3_384)),sha3256:a(c(n.sha3_256)),sha3224:a(c(n.sha3_224)),shake128:a(c(n.shake_128,256)),shake256:a(c(n.shake_256,512)),keccak224:a(c(n.keccak_224)),keccak256:a(c(n.keccak_256)),keccak384:a(c(n.keccak_384)),keccak512:a(c(n.keccak_512)),murmur3128:a(c(u(i.x64.hash128))),murmur332:a(l(u(i.x86.hash32))),addBlake:r(475),dblSha2256:(e,r)=>{s.sha2256(e,(e,n)=>{e&&r(e),s.sha2256(t.from(n),r)})}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(129),i=function(){if(self.crypto)return self.crypto.subtle||self.crypto.webkitSubtle;if(self.msCrypto)return self.msCrypto.subtle}();function o(e){if(!i)throw new Error("Please use a browser with webcrypto support");return(r,o)=>{const s=i.digest({name:e},r);if("function"!=typeof s.then)return s.onerror=(()=>{o(new Error(`hashing data using ${e}`))}),void(s.oncomplete=(e=>{o(null,e.target.result)}));n(s.then(e=>t.from(new Uint8Array(e))),o)}}e.exports={sha1:function(e,t){o("SHA-1")(e,t)},sha2256:function(e,t){o("SHA-256")(e,t)},sha2512:function(e,t){o("SHA-512")(e,t)}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(130),i=r(239).toCallback,o={init:n.blake2bInit,update:n.blake2bUpdate,digest:n.blake2bFinal},s={init:n.blake2sInit,update:n.blake2sUpdate,digest:n.blake2sFinal},a=(e,r)=>i(n=>{const i=r.init(e,null);return r.update(i,n),t.from(r.digest(i))});e.exports=(e=>{for(let t=0;t<64;t++)e[45569+t]=a(t+1,o);for(let t=0;t<32;t++)e[45633+t]=a(t+1,s)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(36),i=r(241),o=i.toBase64,s=i.toBn,a=n.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}),c=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid({"1.2.840.113549.1.1.1":"rsa"}),this.key("none").optional().null_(),this.key("curve").optional().objid(),this.key("params").optional().seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()))}),u=n.define("RSAPublicKey",function(){this.seq().obj(this.key("algorithm").use(c),this.key("subjectPublicKey").bitstr())}),l=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});t.pkcs1ToJwk=function(e){const t=a.decode(e,"der");return{kty:"RSA",n:o(t.modulus),e:o(t.publicExponent),d:o(t.privateExponent),p:o(t.prime1),q:o(t.prime2),dp:o(t.exponent1),dq:o(t.exponent2),qi:o(t.coefficient),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkcs1=function(e){return a.encode({version:0,modulus:s(e.n),publicExponent:s(e.e),privateExponent:s(e.d),prime1:s(e.p),prime2:s(e.q),exponent1:s(e.dp),exponent2:s(e.dq),coefficient:s(e.qi)},"der")},t.pkixToJwk=function(e){const t=u.decode(e,"der"),r=l.decode(t.subjectPublicKey.data,"der");return{kty:"RSA",n:o(r.modulus),e:o(r.publicExponent),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkix=function(e){return u.encode({algorithm:{algorithm:"rsa",none:null},subjectPublicKey:{data:l.encode({modulus:s(e.n),publicExponent:s(e.e)},"der")}},"der")}},function(e,t,r){"use strict";(function(t){const n=r(238),i=r(25),o=r(27),s=r(478),a=i(r(146));class c{constructor(e){this._key=f(e,s.publicKeyLength)}verify(e,t,r){l(r),s.hashAndVerify(this._key,t,e,r)}marshal(){return t.from(this._key)}get bytes(){return a.PublicKey.encode({Type:a.KeyType.Ed25519,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){l(e),n(this.bytes,"sha2-256",e)}}class u{constructor(e,t){this._key=f(e,s.privateKeyLength),this._publicKey=f(t,s.publicKeyLength)}sign(e,t){l(t),s.hashAndSign(this._key,e,t)}get public(){if(!this._publicKey)throw new Error("public key not provided");return new c(this._publicKey)}marshal(){return t.concat([t.from(this._key),t.from(this._publicKey)])}get bytes(){return a.PrivateKey.encode({Type:a.KeyType.Ed25519,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){l(e),n(this.bytes,"sha2-256",e)}id(e){this.public.hash((t,r)=>{if(t)return e(t);e(null,o.encode(r))})}}function l(e){if("function"!=typeof e)throw new Error("callback is required")}function f(e,r){if(t.isBuffer(e)&&(e=new Uint8Array(e)),!(e instanceof Uint8Array)||e.length!==r)throw new Error("Key must be a Uint8Array or Buffer of length "+r);return e}e.exports={Ed25519PublicKey:c,Ed25519PrivateKey:u,unmarshalEd25519PrivateKey:function(e,t){try{e=f(e,s.privateKeyLength+s.publicKeyLength)}catch(e){return t(e)}const r=e.slice(0,s.privateKeyLength),n=e.slice(s.privateKeyLength,e.length);t(null,new u(r,n))},unmarshalEd25519PublicKey:function(e){return e=f(e,s.publicKeyLength),new c(e)},generateKeyPair:function(e,t){void 0===t&&"function"==typeof e&&(t=e),s.generateKey((e,r)=>{if(e)return t(e);let n;try{n=new u(r.secretKey,r.publicKey)}catch(e){return void t(e)}t(null,n)})},generateKeyPairFromSeed:function(e,t,r){void 0===r&&"function"==typeof t&&(r=t),s.generateKeyFromSeed(e,(e,t)=>{if(e)return r(e);let n;try{n=new u(t.secretKey,t.publicKey)}catch(e){return void r(e)}r(null,n)})}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(157),i=r(17);t.publicKeyLength=n.sign.publicKeyLength,t.privateKeyLength=n.sign.secretKeyLength,t.generateKey=function(e){i(()=>{let t;try{t=n.sign.keyPair()}catch(t){return e(t)}e(null,t)})},t.generateKeyFromSeed=function(e,t){i(()=>{let r;try{r=n.sign.keyPair.fromSeed(e)}catch(e){return t(e)}t(null,r)})},t.hashAndSign=function(t,r,o){i(()=>{o(null,e.from(n.sign.detached(r,t)))})},t.hashAndVerify=function(e,t,r,o){i(()=>{let i;try{i=n.sign.detached.verify(r,t,e)}catch(e){return o(e)}o(null,i)})}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(96),i=r(237),o={"AES-128":{ivSize:16,keySize:16},"AES-256":{ivSize:16,keySize:32},Blowfish:{ivSize:8,cipherKeySize:32}};e.exports=((e,r,s,a)=>{const c=o[e];if(!c)return a(new Error("unkown cipherType passed"));if(!r)return a(new Error("unkown hashType passed"));const u=c.keySize,l=c.ivSize,f=t.from("key expansion"),p=2*(l+u+20);i.create(r,s,(e,r)=>{if(e)return a(e);r.digest(f,(e,i)=>{if(e)return a(e);let o=[],s=0;n(()=>s{if(t)return e(t);let a=n.length;s+a>p&&(a=p-s),o.push(n),s+=a,r.digest(i,(t,r)=>{if(t)return e(t);i=r,e()})})},function(e){if(e)return a(e);const r=p/2,n=t.concat(o),i=n.slice(0,r),s=n.slice(r,p),c=e=>({iv:e.slice(0,l),cipherKey:e.slice(l,l+u),macKey:e.slice(l+u)});a(null,{k1:c(i),k2:c(s)})})})})})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(481);e.exports=((e,t)=>{n.generateEphmeralKeyPair(e,t)})},function(e,t,r){"use strict";(function(e){const n=r(145)(),i=r(144),o=r(36).bignum,s=r(241),a=s.toBase64,c=s.toBn,u={"P-256":256,"P-384":384,"P-521":521};t.generateEphmeralKeyPair=function(t,r){i(n.subtle.generateKey({name:"ECDH",namedCurve:t},!0,["deriveBits"]).then(r=>{const s=(s,c,l)=>{let f;"function"==typeof c&&(l=c,c=void 0),f=c?n.subtle.importKey("jwk",function(e,t){const r=p(e,t.public);return r.d=a(new o(t.private)),r}(t,c),{name:"ECDH",namedCurve:t},!1,["deriveBits"]):Promise.resolve(r.privateKey);const h=Promise.all([n.subtle.importKey("jwk",p(t,s),{name:"ECDH",namedCurve:t},!1,[]),f]);i(h.then(e=>n.subtle.deriveBits({name:"ECDH",namedCurve:t,public:e[0]},e[1],u[t])).then(t=>e.from(t)),l)};return n.subtle.exportKey("jwk",r.publicKey).then(e=>({key:f(e),genSharedKey:s}))}),r)};const l={"P-256":32,"P-384":48,"P-521":66};function f(t){const r=l[t.crv];return e.concat([e.from([4]),c(t.x).toArrayLike(e,"be",r),c(t.y).toArrayLike(e,"be",r)],1+2*r)}function p(t,r){const n=l[t];if(!r.slice(0,1).equals(e.from([4])))throw new Error("Invalid key format");const i=new o(r.slice(1,n+1)),s=new o(r.slice(1+n));return{kty:"EC",crv:t,x:a(i,n),y:a(s,n),ext:!0}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(75),i={sha1:"sha1","sha2-256":"sha256","sha2-512":"sha512"};e.exports=function(e,t,r,o,s){const a=i[s];if(!a)throw new Error(`Hash '${s}' is unknown or not supported`);const c=n.pkcs5.pbkdf2(e,t,r,o,a);return n.util.encode64(c)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return Object.assign((0,n.default)(e,t),(0,i.default)(e,t),(0,o.default)(e,t),(0,s.default)(e,t),(0,a.default)(e,t),(0,c.default)(e,t),(0,u.default)(e,t),(0,l.default)(e,t),(0,f.default)(e,t),(0,p.default)(e,t),(0,h.default)(e,t),(0,d.default)(e,t))};var n=m(r(484)),i=m(r(498)),o=m(r(499)),s=m(r(500)),a=m(r(501)),c=m(r(502)),u=m(r(503)),l=m(r(504)),f=m(r(505)),p=m(r(506)),h=m(r(507)),d=m(r(508));function m(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{add:(0,n.expose)("ipfs.files.add",(0,i.pre)(function(){for(var e=arguments.length,r=Array(e),n=0;ne?n(!0):void n(null,t++)}}},function(e,t,r){"use strict";e.exports=function(e){return e=e||Math.random,function(t,r){return t?r&&r(t):r(null,e())}}},function(e,t,r){"use strict";e.exports={drain:r(91),onEnd:r(266),log:r(490),find:r(491),reduce:r(122),collect:r(33),concat:r(492)}},function(e,t,r){"use strict";var n=r(91);e.exports=function(e){return n(function(e){console.log(e)},e)}},function(e,t,r){"use strict";function n(e){return e}var i=r(92),o=r(91);e.exports=function(e,t){var r=!1;return t?e=i(e)||n:(t=e,e=n),o(function(n){if(e(n))return r=!0,t(null,n),!1},function(e){r||t(!0===e?null:e,null)})}},function(e,t,r){"use strict";var n=r(122);e.exports=function(e){return n(function(e,t){return e+t},"",e)}},function(e,t,r){"use strict";e.exports={map:r(67),asyncMap:r(81),filter:r(52),filterNot:r(494),through:r(158),take:r(245),unique:r(246),nonUnique:r(495),flatten:r(159)}},function(e,t,r){"use strict";var n=r(244),i=r(52);e.exports=function(e){return e=n(e),i(function(t){return!e(t)})}},function(e,t,r){"use strict";var n=r(246);e.exports=function(e){return n(e,!0)}},function(e,t,r){const{caller:n}=r(1),{post:i}=r(2);e.exports=function(e,t){const r=i(n(e,t),t&&t.post);return(e,t)=>{e&&!0!==e&&(e=Object.assign({message:e.message,stack:void 0},e.output&&e.output.payload)),r(e).then(e=>t(e.end,e.data)).catch(t)}}},function(e,t,r){const{expose:n}=r(1),{post:i}=r(2);e.exports=function(e,t){return function(r){const o=n(e,i(e=>new Promise((t,n)=>{e&&!0!==e&&(e=Object.assign(new Error,e)),r(e,(e,r)=>{if(e)return!0===e?t({end:e}):n(e),o.close();t({end:e,data:r})})}),t&&t.post),t)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{cat:(0,n.expose)("ipfs.files.cat",(0,i.pre)((0,u.preBufferFromJson)(0),(0,c.preCidFromJson)(0),t.pre("files.cat"),(0,i.post)(function(){var t;return(t=e().files).cat.apply(t,arguments)},u.bufferToJson)),t),catPullStream:(0,n.expose)("ipfs.files.catPullStream",(0,i.pre)((0,u.preBufferFromJson)(0),(0,c.preCidFromJson)(0),t.pre("files.catPullStream"),(0,i.post)(function(){var t;return(t=e().files).catPullStream.apply(t,arguments)},function(e){return new Promise(function(r){var n=(0,a.default)();(0,o.default)(e,s.default.sink(n,Object.assign({},t,{post:function(e){return(0,u.isBuffer)(e.data)&&(e.data=(0,u.bufferToJson)(e.data)),e}}))),r((0,l.functionToJson)(n))})})),t)}};var n=r(1),i=r(2),o=f(r(16)),s=f(r(26)),a=f(r(30)),c=r(21),u=r(10),l=r(40);function f(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{cp:(0,n.expose)("ipfs.files.cp",(0,i.pre)(t.pre("files.cp"),(0,i.post)(function(){var t;return(t=e().files).cp.apply(t,arguments)},function(){return null})),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{flush:(0,n.expose)("ipfs.files.flush",(0,i.pre)(t.pre("files.flush"),(0,i.post)(function(){var t;return(t=e().files).flush.apply(t,arguments)},function(){return null})),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{get:(0,n.expose)("ipfs.files.get",(0,i.pre)((0,u.preBufferFromJson)(0),(0,c.preCidFromJson)(0),t.pre("files.get"),(0,i.post)(function(){var t;return(t=e().files).get.apply(t,arguments)},function(e){return e.map(function(e){return e.content&&(e.content=(0,u.bufferToJson)(e.content)),e})})),t),getPullStream:(0,n.expose)("ipfs.files.getPullStream",(0,i.pre)((0,u.preBufferFromJson)(0),(0,c.preCidFromJson)(0),t.pre("files.getPullStream"),(0,i.post)(function(){var t;return(t=e().files).getPullStream.apply(t,arguments)},function(e){return new Promise(function(r){var n=(0,a.default)();(0,o.default)(e,o.default.map(function(e){if(e.content){var r=(0,a.default)();(0,o.default)(e.content,s.default.sink(r,Object.assign({},t,{post:function(e){return(0,u.isBuffer)(e.data)&&(e.data=(0,u.bufferToJson)(e.data)),e}}))),e.content=(0,l.functionToJson)(r)}return e}),s.default.sink(n,t)),r((0,l.functionToJson)(n))})})),t)}};var n=r(1),i=r(2),o=f(r(16)),s=f(r(26)),a=f(r(30)),c=r(21),u=r(10),l=r(40);function f(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{ls:(0,n.expose)("ipfs.files.ls",(0,i.pre)(t.pre("files.ls"),function(){var t;return(t=e().files).ls.apply(t,arguments)}),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{mkdir:(0,n.expose)("ipfs.files.mkdir",(0,i.pre)(t.pre("files.mkdir"),(0,i.post)(function(){var t;return(t=e().files).mkdir.apply(t,arguments)},function(){return null})),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{mv:(0,n.expose)("ipfs.files.mv",(0,i.pre)(t.pre("files.mv"),(0,i.post)(function(){var t;return(t=e().files).mv.apply(t,arguments)},function(){return null})),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{read:(0,n.expose)("ipfs.files.read",(0,i.pre)(t.pre("files.read"),(0,i.post)(function(){var t;return(t=e().files).read.apply(t,arguments)},c.bufferToJson)),t),readPullStream:(0,n.expose)("ipfs.files.readPullStream",(0,i.pre)(t.pre("files.readPullStream"),(0,i.post)(function(){var t;return(t=e().files).readPullStream.apply(t,arguments)},function(e){return new Promise(function(r){var n=(0,o.default)();(0,s.default)(e,a.default.sink(n,Object.assign({},t,{post:function(e){return(0,c.isBuffer)(e.data)&&(e.data=(0,c.bufferToJson)(e.data)),e}}))),r((0,u.functionToJson)(n))})})),t)}};var n=r(1),i=r(2),o=l(r(30)),s=l(r(16)),a=l(r(26)),c=r(10),u=r(40);function l(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{rm:(0,n.expose)("ipfs.files.rm",(0,i.pre)(t.pre("files.rm"),(0,i.post)(function(){var t;return(t=e().files).rm.apply(t,arguments)},function(){return null})),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{stat:(0,n.expose)("ipfs.files.stat",(0,i.pre)(t.pre("files.stat"),function(){var t;return(t=e().files).stat.apply(t,arguments)}),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{write:(0,n.expose)("ipfs.files.write",(0,i.pre)((0,o.preBufferFromJson)(1),t.pre("files.write"),function(){var t;return(t=e().files).write.apply(t,arguments)}),t)}};var n=r(1),i=r(2),o=r(10)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{export:(0,n.expose)("ipfs.key.export",(0,i.pre)(t.pre("key.export"),function(){var t;return(t=e().key).export.apply(t,arguments)}),t),gen:(0,n.expose)("ipfs.key.gen",(0,i.pre)(t.pre("key.gen"),function(){var t;return(t=e().key).gen.apply(t,arguments)}),t),import:(0,n.expose)("ipfs.key.import",(0,i.pre)(t.pre("key.import"),function(){var t;return(t=e().key).import.apply(t,arguments)}),t),list:(0,n.expose)("ipfs.key.list",(0,i.pre)(t.pre("key.list"),function(){return e().key.list()}),t),rename:(0,n.expose)("ipfs.key.rename",(0,i.pre)(t.pre("key.rename"),function(){var t;return(t=e().key).rename.apply(t,arguments)}),t),rm:(0,n.expose)("ipfs.key.rm",(0,i.pre)(t.pre("key.rm"),function(){var t;return(t=e().key).rm.apply(t,arguments)}),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{ls:(0,n.expose)("ipfs.ls",(0,i.pre)((0,u.preBufferFromJson)(0),(0,c.preCidFromJson)(0),t.pre("ls"),function(){var t;return(t=e()).ls.apply(t,arguments)}),t),lsPullStream:(0,n.expose)("ipfs.lsPullStream",(0,i.pre)((0,u.preBufferFromJson)(0),(0,c.preCidFromJson)(0),t.pre("lsPullStream"),(0,i.post)(function(){var t;return(t=e()).lsPullStream.apply(t,arguments)},function(e){return new Promise(function(r){var n=(0,a.default)();(0,o.default)(e,s.default.sink(n,t)),r((0,l.functionToJson)(n))})})),t)}};var n=r(1),i=r(2),o=f(r(16)),s=f(r(26)),a=f(r(30)),c=r(21),u=r(10),l=r(40);function f(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{publish:(0,n.expose)("ipfs.name.publish",(0,i.pre)(t.pre("name.publish"),function(){var t;return(t=e().name).publish.apply(t,arguments)}),t),resolve:(0,n.expose)("ipfs.name.resolve",(0,i.pre)(t.pre("name.resolve"),function(){var t;return(t=e().name).resolve.apply(t,arguments)}),t)}};var n=r(1),i=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{new:(0,n.expose)("ipfs.object.new",(0,i.pre)(t.pre("object.new"),(0,i.post)(function(){var t;return(t=e().object).new.apply(t,arguments)},o.dagNodeToJson)),t),put:(0,n.expose)("ipfs.object.put",(0,i.pre)((0,o.preDagNodeFromJson)(0),(0,a.preBufferFromJson)(0),function(){for(var e=arguments.length,t=Array(e),r=0;r=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}e.exports=function(e,t){t=t||{};var u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var c=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*a;case"weeks":case"week":case"w":return c*s;case"days":case"day":case"d":return c*o;case"hours":case"hour":case"hrs":case"hr":case"h":return c*i;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?function(e){var t=Math.abs(e);if(t>=o)return c(e,t,o,"day");if(t>=i)return c(e,t,i,"hour");if(t>=n)return c(e,t,n,"minute");if(t>=r)return c(e,t,r,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=o)return Math.round(e/o)+"d";if(t>=i)return Math.round(e/i)+"h";if(t>=n)return Math.round(e/n)+"m";if(t>=r)return Math.round(e/r)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,r){"use strict";function n(e){return"/"===e[0]&&(e=e.substring(1)),e}function i(e){return e.endsWith("/")&&(e=e.substring(0,e.length-1)),e}function o(e){return e=i(e=n(e))}e.exports={cidArray:function(e){return"/"===e[e.length-1]&&(e=e.substring(0,e.length-1)),e.match(/^\/ip[fn]s\//)&&(e=e.substring(6)),e.match(/^ip[fn]s:\/\//)&&(e=e.substring(7)),e.split("/")},removeLeadingSlash:n,removeTrailingSlash:i,removeSlashFromBothEnds:o,joinURLParts:function(...e){return e=e.filter(e=>e.length>0),(e=[""].concat(e.map(e=>o(e)))).join("/")}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){((0,n.default)(e)?p:h)(e,(0,l.default)(t),r)};var n=f(r(248)),i=f(r(554)),o=f(r(597)),s=f(r(162)),a=f(r(51)),c=f(r(154)),u=f(r(105)),l=f(r(35));function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t,r){r=(0,c.default)(r||a.default);var n=0,o=0,s=e.length;function l(e,t){e?r(e):++o!==s&&t!==i.default||r(null)}for(0===s&&r(null);n>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*s+t),t.buildInt64=((e,r,i,s)=>{const a=t.buildInt32(e,r),c=t.buildInt32(i,s);return a>2097151?new n(a).times(o).plus(c):a*o+c}),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 o=i>>16&32768;const s=i>>23&255,a=8388607&i;if(s>=113&&s<=142)o+=(s-112<<10)+(a>>13);else{if(!(s>=103&&s<113))return!1;if(a&(1<<126-s)-1)return!1;o+=a+8388608>>126-s}return t.writeUInt16BE(o,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<{t(null,e)},e=>{t(e)})}},function(e,t,r){"use strict";e.exports=self.crypto||self.msCrypto},function(e,t,r){"use strict";const n=r(805);e.exports=function(e){if(!e||"number"!=typeof e)throw new Error("first argument must be a Number bigger than 0");return n(e)}},function(e,t,r){"use strict";function n(e){if("number"==typeof e){if(n.codes[e])return n.codes[e];throw new Error("no protocol with code: "+e)}if("string"==typeof e||e instanceof String){if(n.names[e])return n.names[e];throw new Error("no protocol with name: "+e)}throw new Error("invalid protocol id type: "+e)}const i=-1;function o(e,t,r,n,i){return{code:e,size:t,name:r,resolvable:Boolean(n),path:Boolean(i)}}n.lengthPrefixedVarSize=i,n.V=i,n.table=[[4,32,"ip4"],[6,16,"tcp"],[33,16,"dccp"],[41,128,"ip6"],[42,i,"ip6zone"],[53,i,"dns","resolvable"],[54,i,"dns4","resolvable"],[55,i,"dns6","resolvable"],[56,i,"dnsaddr","resolvable"],[132,16,"sctp"],[273,16,"udp"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[277,0,"p2p-stardust"],[290,0,"p2p-circuit"],[301,0,"udt"],[302,0,"utp"],[400,i,"unix",!1,"path"],[421,i,"p2p"],[421,i,"ipfs"],[443,0,"https"],[444,96,"onion"],[445,296,"onion3"],[446,i,"garlic64"],[460,0,"quic"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[480,0,"http"]],n.names={},n.codes={},n.table.map(e=>{const t=o.apply(null,e);n.codes[t.code]=t,n.names[t.name]=t}),n.object=o,e.exports=n},function(e,t,r){"use strict";(function(t){const n=r(9),i=r(49),o=r(44),s=r(55),a=r(282),c=r(22),u=r(249),l=r(5),f=r(116),p=r(15),h=r(122),d=r(829),m=r(830),g=r(832),y=r(840),b=r(842),v=r(843),A=r(854),w=r(878),E=r(879),k=l("repo"),S=Number.MAX_SAFE_INTEGER,_={memory:r(649),fs:r(649)},x=r(880).repoVersion;function C(e,t){p(e.query({}),h((e,t)=>e.plus(t.value.byteLength).plus(t.key._buf.byteLength),new f(0),t))}function I(e,t){return r=>{t(r&&!e(r)?r:null)}}function B(e){return I(e=>"Already open"===e.message,e)}e.exports=class{constructor(e,t){c.strictEqual(typeof e,"string","missing repoPath"),this.options=function(e){const t=Object.assign({},A,e);return t.storageBackends=Object.assign({},A.storageBackends,t.storageBackends),t.storageBackendOptions=Object.assign({},A.storageBackendOptions,t.storageBackendOptions),t}(t),this.closed=!0,this.path=e,this._locker=this._getLocker(),this.root=d.create("root",this.path,this.options),this.version=m(this.root),this.config=g(this.root),this.spec=y(this.root),this.apiAddr=b(this.root)}init(e,t){k("initializing at: %s",this.path),i([e=>this.root.open(B(e)),t=>this.config.set(function(e){return e.datastore=Object.assign({},w,a(e,"datastore",{})),e}(e),t),t=>this.spec.set(function(e){const t=Object.assign({},w.Spec,a(e,"datastore.Spec",{}));return{type:t.type,mounts:t.mounts.map(e=>({mountpoint:e.mountpoint,type:e.child.type,path:e.child.path,shardFunc:e.child.shardFunc}))}}(e),t),e=>this.version.set(x,e)],t)}open(e){this.closed?(k("opening at: %s",this.path),n([e=>this.root.open(B(e)),e=>this._isInitialized(e),e=>this._openLock(this.path,e),(e,t)=>{k("aquired repo.lock"),this.lockfile=e,t()},e=>{k("creating datastore"),this.datastore=d.create("datastore",u.join(this.path,"datastore"),this.options),k("creating blocks");const t=d.create("blocks",u.join(this.path,"blocks"),this.options);v(t,this.options.storageBackendOptions.blocks,e)},(e,t)=>{this.blocks=e,t()},e=>{k("creating keystore"),this.keys=d.create("keys",u.join(this.path,"keys"),this.options),e()},e=>{this.closed=!1,k("all opened"),e()}],t=>{t&&this.lockfile?this._closeLock(r=>{r?k("error removing lock",r):this.lockfile=null,e(t)}):e(t)})):t(()=>e(new Error("repo is already open")))}_getLocker(){return"string"==typeof this.options.lock?(c(_[this.options.lock],"Unknown lock type: "+this.options.lock),_[this.options.lock]):(c(this.options.lock,"No lock provided"),this.options.lock)}_openLock(e,t){this._locker.lock(e,(e,r)=>{if(e)return t(e,null);c.strictEqual(typeof r.close,"function","Locks must have a close method"),t(null,r)})}_closeLock(e){if(this.lockfile)return this.lockfile.close(e);e()}_isInitialized(e){k("init check"),o({config:e=>this.config.exists(e),spec:e=>this.spec.exists(e),version:e=>this.version.check(x,e)},(t,r)=>{if(k("init",t,r),t&&!r.config)return e(Object.assign(new Error("repo is not initialized yet"),{code:E.ERR_REPO_NOT_INITIALIZED,path:this.path}));e(t)})}close(e){if(this.closed)return e(new Error("repo is already closed"));k("closing at: %s",this.path),i([e=>this.apiAddr.delete(function(e){return I(e=>e&&(e.code===E.ERR_REPO_NOT_INITIALIZED||e.message.startsWith("ENOENT")),e)}(e)),e=>{s([this.blocks,this.keys,this.datastore],(e,t)=>e.close(t),e)},e=>{k("unlocking"),this.closed=!0,this._closeLock(e)},e=>{this.lockfile=null,e()}],t=>e(t))}exists(e){this.version.exists(e)}stat(e,t){"function"==typeof e&&(t=e,e={}),e=Object.assign({},{human:!1},e),o({storageMax:e=>this.config.get("Datastore.StorageMax",(t,r)=>{e(null,new f(t?S:r))}),version:e=>this.version.get(e),blocks:e=>this.blocks.query({},(t,r)=>{const n=new f((r=r||[]).length);let i=new f(0);r.forEach(e=>{i=i.plus(e.value.byteLength).plus(e.key._buf.byteLength)}),e(t,{count:n,size:i})}),datastore:e=>C(this.datastore,e),keys:e=>C(this.keys,e)},(r,n)=>{if(r)return t(r);let i=n.blocks.size.plus(n.datastore).plus(n.keys);e.human&&(i=i.div(1048576)),t(null,{repoPath:this.path,storageMax:n.storageMax,version:n.version,numObjects:n.blocks.count,repoSize:i})})}},e.exports.repoVersion=x,e.exports.errors=E}).call(this,r(31).setImmediate)},function(e,t,r){var n=r(623),i=r(624);e.exports=function(e,t,r){var o=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||n)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||i(s)}},function(e,t,r){"use strict";const n=r(16),i=r(147),o=r(249),s=r(261),a=r(565);t.asyncFilter=function(e){let t,r,n=!1;return function(i){return function o(s,a){if(r)return a(r);s?(r=s,i(s,n?()=>{n?t=a:a(s)}:a)):i(null,(i,s)=>{i?a(i):r?a(r):(n=!0,e(s,(e,i)=>{n=!1,r?(a(r),t(r)):e?o(e,a):i?a(null,s):o(null,a)}))})}}},t.asyncSort=function(e){const t=i(),r=n.collect((r,i)=>{if(r)return t.abort(r);e(i,(e,r)=>{if(e)return t.abort(e);t.resolve(n.values(i))})});return function(e){return r(e),t}},t.replaceStartWith=function(e,t){const r=new RegExp("^"+t);return e.replace(r,"")},t.tmpdir=(()=>o.join(s.tmpdir(),a()))},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){t.AbstractLevelDOWN=r(869),t.AbstractIterator=r(643),t.AbstractChainedBatch=r(644)},function(e,t,r){"use strict";(function(t){const n=r(13),i=r(39),o=r(47),s=r(42),a=r(896);class c{constructor(r,s,a){if(e.exports.isCID(r)){let e=r;return this.version=e.version,this.codec=e.codec,void(this.multihash=t.from(e.multihash))}if("string"==typeof r)if(i.isEncoded(r)){const e=i.decode(r);r=parseInt(e.slice(0,1).toString("hex"),16),s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=n.fromB58String(r),r=0;else if(t.isBuffer(r)){const e=r.slice(0,1),t=parseInt(e.toString("hex"),16);if(0===t||1===t){const e=r;r=t,s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=r,r=0}this.codec=s,this.version=r,this.multihash=a,c.validateCID(this)}get buffer(){let e=this._buffer;if(!e){if(0===this.version)e=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");e=t.concat([t.from("01","hex"),o.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:e})}return e}get prefix(){return t.concat([t.from(`0${this.version}`,"hex"),o.getCodeVarint(this.codec),n.prefix(this.multihash)])}toV0(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");const{name:e,length:t}=n.decode(this.multihash);if("sha2-256"!==e)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==t)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new u(0,this.codec,this.multihash)}toV1(){return new u(1,this.codec,this.multihash)}toBaseEncodedString(e){switch(e=e||"base58btc",this.version){case 0:if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");return n.toB58String(this.multihash);case 1:return i.encode(e,this.buffer).toString();default:throw new Error("Unsupported version")}}toString(e){return this.toBaseEncodedString(e)}toJSON(){return{codec:this.codec,version:this.version,hash:this.multihash}}equals(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}static validateCID(e){let t=a.checkCIDComponents(e);if(t)throw new Error(t)}}const u=r(19)(c,{className:"CID",symbolName:"@ipld/js-cid/CID"});u.codecs=s,e.exports=u}).call(this,r(0).Buffer)},function(e,t,r){"use strict";e.exports={maxProvidersPerRequest:3,providerRequestTimeout:1e4,hasBlockTimeout:15e3,provideTimeout:15e3,kMaxPriority:Math.pow(2,31)-1,rebroadcastDelay:1e4,maxListeners:1e3}},function(e,t,r){var n=r(948)("socket.io-parser"),i=r(166),o=r(951),s=r(667),a=r(668);function c(){}t.protocol=4,t.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],t.CONNECT=0,t.DISCONNECT=1,t.EVENT=2,t.ACK=3,t.ERROR=4,t.BINARY_EVENT=5,t.BINARY_ACK=6,t.Encoder=c,t.Decoder=f;var u=t.ERROR+'"encode error"';function l(e){var r=""+e.type;if(t.BINARY_EVENT!==e.type&&t.BINARY_ACK!==e.type||(r+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(r+=e.nsp+","),null!=e.id&&(r+=e.id),null!=e.data){var i=function(e){try{return JSON.stringify(e)}catch(e){return!1}}(e.data);if(!1===i)return u;r+=i}return n("encoded %j as %s",e,r),r}function f(){this.reconstructor=null}function p(e){this.reconPack=e,this.buffers=[]}function h(e){return{type:t.ERROR,data:"parser error: "+e}}c.prototype.encode=function(e,r){(n("encoding packet %j",e),t.BINARY_EVENT===e.type||t.BINARY_ACK===e.type)?function(e,t){o.removeBlobs(e,function(e){var r=o.deconstructPacket(e),n=l(r.packet),i=r.buffers;i.unshift(n),t(i)})}(e,r):r([l(e)])},i(f.prototype),f.prototype.add=function(e){var r;if("string"==typeof e)r=function(e){var r=0,i={type:Number(e.charAt(0))};if(null==t.types[i.type])return h("unknown packet type "+i.type);if(t.BINARY_EVENT===i.type||t.BINARY_ACK===i.type){for(var o="";"-"!==e.charAt(++r)&&(o+=e.charAt(r),r!=e.length););if(o!=Number(o)||"-"!==e.charAt(r))throw new Error("Illegal attachments");i.attachments=Number(o)}if("/"===e.charAt(r+1))for(i.nsp="";++r;){var a=e.charAt(r);if(","===a)break;if(i.nsp+=a,r===e.length)break}else i.nsp="/";var c=e.charAt(r+1);if(""!==c&&Number(c)==c){for(i.id="";++r;){var a=e.charAt(r);if(null==a||Number(a)!=a){--r;break}if(i.id+=e.charAt(r),r===e.length)break}i.id=Number(i.id)}if(e.charAt(++r)){var u=function(e){try{return JSON.parse(e)}catch(e){return!1}}(e.substr(r)),l=!1!==u&&(i.type===t.ERROR||s(u));if(!l)return h("invalid payload");i.data=u}return n("decoded %s as %j",e,i),i}(e),t.BINARY_EVENT===r.type||t.BINARY_ACK===r.type?(this.reconstructor=new p(r),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",r)):this.emit("decoded",r);else{if(!a(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(r=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,this.emit("decoded",r))}},f.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},p.prototype.takeBinaryData=function(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t=o.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null},p.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(e,t,r){var n=r(954);e.exports=function(e){var t=e.xdomain,r=e.xscheme,i=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!t||n))return new XMLHttpRequest}catch(e){}try{if("undefined"!=typeof XDomainRequest&&!r&&i)return new XDomainRequest}catch(e){}if(!t)try{return new(self[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}},function(e,t,r){var n=r(167),i=r(166);function o(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.forceNode=e.forceNode,this.isReactNative=e.isReactNative,this.extraHeaders=e.extraHeaders,this.localAddress=e.localAddress}e.exports=o,i(o.prototype),o.prototype.onError=function(e,t){var r=new Error(e);return r.type="TransportError",r.description=t,this.emit("error",r),this},o.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},o.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},o.prototype.send=function(e){if("open"!==this.readyState)throw new Error("Transport not open");this.write(e)},o.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},o.prototype.onData=function(e){var t=n.decodePacket(e,this.socket.binaryType);this.onPacket(t)},o.prototype.onPacket=function(e){this.emit("packet",e)},o.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(e,t,r){"use strict";(function(e){const n=r(29),i=r(65),o=r(15),s=r(37),a=r(33),c=r(68),u=r(44);t.exchanges=["P-256","P-384","P-521"],t.ciphers=["AES-256","AES-128"],t.hashes=["SHA256","SHA512"],t.theBest=((e,t,r)=>{let n,i;if(e<0)n=r,i=t;else{if(!(e>0))return t[0];n=t,i=r}for(let e of n)for(let t of i)if(e===t)return e;throw new Error("No algorithms in common!")}),t.makeMacAndCipher=((e,t)=>{u([t=>(function(e,t,r){c.hmac.create(e,t,r)})(e.hashT,e.keys.macKey,t),t=>(function(e,t,r,n){if("AES-128"===e||"AES-256"===e)return c.aes.create(r,t,n);n(new Error(`unrecognized cipher type: ${e}`))})(e.cipherT,e.keys.iv,e.keys.cipherKey,t)],(r,n)=>{if(r)return t(r);e.mac=n[0],e.cipher=n[1],t()})}),t.selectBest=((r,n,i)=>{t.digest(e.concat([n.pubKeyBytes,r.nonce]),(o,s)=>{if(o)return i(o);t.digest(e.concat([r.pubKeyBytes,n.nonce]),(o,a)=>{if(o)return i(o);const c=e.compare(s,a);if(0===c)return i(new Error("you are trying to talk to yourself"));i(null,{curveT:t.theBest(c,r.exchanges,n.exchanges),cipherT:t.theBest(c,r.ciphers,n.ciphers),hashT:t.theBest(c,r.hashes,n.hashes),order:c})})})}),t.digest=((e,t)=>{n.digest(e,"sha2-256",e.length,t)}),t.write=function(e,t,r){r=r||(()=>{}),o(s([t]),i.encode({fixed:!0,bytes:4}),a((t,n)=>{if(t)return r(t);e.shake.write(n[0]),r()}))},t.read=function(e,t){i.decodeFromReader(e,{fixed:!0,bytes:4},t)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(25),i=r(24),o=r(68),s=r(44),a=r(9),c=r(5),u=c("libp2p:secio");u.error=c("libp2p:secio:error");const l=n(r(1006)),f=r(574);t.createProposal=(e=>(e.proposal.out={rand:o.randomBytes(16),pubkey:e.key.local.public.bytes,exchanges:f.exchanges.join(","),ciphers:f.ciphers.join(","),hashes:f.hashes.join(",")},e.proposalEncoded.out=l.Propose.encode(e.proposal.out),e.proposalEncoded.out)),t.createExchange=((t,r)=>{o.keys.generateEphemeralKeyPair(t.protocols.local.curveT,(n,i)=>{if(n)return r(n);t.ephemeralKey.local=i.key,t.shared.generate=i.genSharedKey;const o=e.concat([t.proposalEncoded.out,t.proposalEncoded.in,t.ephemeralKey.local]);t.key.local.sign(o,(e,n)=>{if(e)return r(e);t.exchange.out={epubkey:t.ephemeralKey.local,signature:n},r(null,l.Exchange.encode(t.exchange.out))})})}),t.identify=((e,t,r)=>{u("1.1 identify"),e.proposalEncoded.in=t,e.proposal.in=l.Propose.decode(t);const n=e.proposal.in.pubkey;e.key.remote=o.keys.unmarshalPublicKey(n),i.createFromPubKey(n.toString("base64"),(t,n)=>{if(t)return r(t);if(e.id.remote){if(e.id.remote.toB58String()!==n.toB58String())return r(new Error("dialed to the wrong peer, Ids do not match"))}else e.id.remote=n;u("1.1 identify - %s - identified remote peer as %s",e.id.local.toB58String(),e.id.remote.toB58String()),r()})}),t.selectProtocols=((e,t)=>{u("1.2 selection");const r={pubKeyBytes:e.key.local.public.bytes,exchanges:f.exchanges,hashes:f.hashes,ciphers:f.ciphers,nonce:e.proposal.out.rand},n={pubKeyBytes:e.proposal.in.pubkey,exchanges:e.proposal.in.exchanges.split(","),hashes:e.proposal.in.hashes.split(","),ciphers:e.proposal.in.ciphers.split(","),nonce:e.proposal.in.rand};f.selectBest(r,n,(r,n)=>{if(r)return t(r);e.protocols.remote={order:n.order,curveT:n.curveT,cipherT:n.cipherT,hashT:n.hashT},e.protocols.local={order:n.order,curveT:n.curveT,cipherT:n.cipherT,hashT:n.hashT},t()})}),t.verify=((t,r,n)=>{u("2.1. verify"),t.exchange.in=l.Exchange.decode(r),t.ephemeralKey.remote=t.exchange.in.epubkey;const i=e.concat([t.proposalEncoded.in,t.proposalEncoded.out,t.ephemeralKey.remote]);t.key.remote.verify(i,t.exchange.in.signature,(e,t)=>e?n(e):t?(u("2.1. verify - signature verified"),void n()):n(new Error("Bad signature")))}),t.generateKeys=((e,t)=>{u("2.2. keys"),a([t=>e.shared.generate(e.exchange.in.epubkey,t),(t,r)=>{e.shared.secret=t,o.keys.keyStretcher(e.protocols.local.cipherT,e.protocols.local.hashT,e.shared.secret,r)},(t,r)=>{if(e.protocols.local.order>0)e.protocols.local.keys=t.k1,e.protocols.remote.keys=t.k2;else{if(!(e.protocols.local.order<0))return r(new Error("you are trying to talk to yourself"));e.protocols.local.keys=t.k2,e.protocols.remote.keys=t.k1}u("2.3. mac + cipher"),s([t=>f.makeMacAndCipher(e.protocols.local,t),t=>f.makeMacAndCipher(e.protocols.remote,t)],r)}],t)}),t.verifyNonce=((e,t)=>{const r=e.proposal.out.rand;if(!r.equals(t))throw new Error(`Failed to read our encrypted nonce: ${r.toString("hex")} != ${t.toString("hex")}`)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(13),i=r(39),o=r(47),s=r(42),a=r(1027);class c{constructor(r,s,a){if(e.exports.isCID(r)){let e=r;return this.version=e.version,this.codec=e.codec,void(this.multihash=t.from(e.multihash))}if("string"==typeof r)if(i.isEncoded(r)){const e=i.decode(r);r=parseInt(e.slice(0,1).toString("hex"),16),s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=n.fromB58String(r),r=0;else if(t.isBuffer(r)){const e=r.slice(0,1),t=parseInt(e.toString("hex"),16);if(0===t||1===t){const e=r;r=t,s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=r,r=0}this.codec=s,this.version=r,this.multihash=a,c.validateCID(this)}get buffer(){let e=this._buffer;if(!e){if(0===this.version)e=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");e=t.concat([t.from("01","hex"),o.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:e})}return e}get prefix(){return t.concat([t.from(`0${this.version}`,"hex"),o.getCodeVarint(this.codec),n.prefix(this.multihash)])}toV0(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");const{name:e,length:t}=n.decode(this.multihash);if("sha2-256"!==e)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==t)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new u(0,this.codec,this.multihash)}toV1(){return new u(1,this.codec,this.multihash)}toBaseEncodedString(e){switch(e=e||"base58btc",this.version){case 0:if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");return n.toB58String(this.multihash);case 1:return i.encode(e,this.buffer).toString();default:throw new Error("Unsupported version")}}toString(e){return this.toBaseEncodedString(e)}toJSON(){return{codec:this.codec,version:this.version,hash:this.multihash}}equals(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}static validateCID(e){let t=a.checkCIDComponents(e);if(t)throw new Error(t)}}const u=r(19)(c,{className:"CID",symbolName:"@ipld/js-cid/CID"});u.codecs=s,e.exports=u}).call(this,r(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,r,o,s){return e((0,n.default)(r),t,(0,i.default)(o),s)}};var n=o(r(551)),i=o(r(35));function o(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,r){"use strict";e.exports=r(1042)},function(e,t,r){"use strict";const n=r(37),i=r(33),o=r(97),s=r(15),a=r(65),c=r(150),u=r(5),l=u("libp2p:circuit:stream-handler");l.err=u("libp2p:circuit:error:stream-handler");e.exports=class{constructor(e,t,r,n){this.conn=e,this.stream=null,this.shake=null,this.timeout=t||6e4,this.maxLength=n||4096,"function"==typeof t&&(this.timeout=r||6e4),this.stream=c({timeout:this.timeout},t),this.shake=this.stream.handshake,s(this.stream,e,this.stream)}isValid(){return this.conn&&this.shake&&this.stream}read(e){if(!this.isValid())return e(new Error("handler is not in a valid state"));a.decodeFromReader(this.shake,{maxLength:this.maxLength},(t,r)=>t?(l.err(t),e(t)):e(null,r))}write(e,t){if(t=t||(()=>{}),!this.isValid())return t(new Error("handler is not in a valid state"));s(n([e]),a.encode(),i((e,r)=>{if(e)return l.err(e),this.shake.abort(e),t(e);r.forEach(e=>this.shake.write(e)),t()}))}getRawConn(){return this.conn}rest(){const e=this.shake.rest();return this.conn=null,this.stream=null,this.shake=null,e}close(){this.isValid()&&s(o(),this.rest())}}},function(e,t,r){"use strict";e.exports={relay:"/libp2p/circuit/relay/0.1.0"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r,a=null;t=t||n.default,(0,i.default)(e,function(e,t){(0,o.default)(e)(function(e,n){r=arguments.length>2?(0,s.default)(arguments,1):n,a=e,t(!e)})},function(){t(a,r)})};var n=a(r(51)),i=a(r(251)),o=a(r(35)),s=a(r(74));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,r){"use strict";e.exports={BLACK_LIST_TTL:3e5,BLACK_LIST_ATTEMPTS:5,DIAL_TIMEOUT:3e4,MAX_COLD_CALLS:50,MAX_PARALLEL_DIALS:100,QUARTER_HOUR:9e5,PRIORITY_HIGH:10,PRIORITY_LOW:20}},function(e,t,r){"use strict";(t=e.exports).multicodec="/ipfs/id/1.0.0",t.listener=r(1051),t.dialer=r(1052),t.message=r(584)},function(e,t,r){"use strict";const n=r(25);e.exports=n("\nmessage Identify {\n // protocolVersion determines compatibility between peers\n optional string protocolVersion = 5; // e.g. ipfs/1.0.0\n\n // agentVersion is like a UserAgent string in browsers, or client version in bittorrent\n // includes the client name and client.\n optional string agentVersion = 6; // e.g. go-ipfs/0.1.0\n\n // publicKey is this node's public key (which also gives its node.ID)\n // - may not need to be sent, as secure channel implies it has been sent.\n // - then again, if we change / disable secure channel, may still want it.\n optional bytes publicKey = 1;\n\n // listenAddrs are the multiaddrs the sender node listens for open connections on\n repeated bytes listenAddrs = 2;\n\n // oservedAddr is the multiaddr of the remote endpoint that the sender node perceives\n // this is useful information to convey to the other side, as it helps the remote endpoint\n // determine whether its connection to the local peer goes through NAT.\n optional bytes observedAddr = 4;\n\n repeated string protocols = 3;\n}\n").Identify},function(e,t,r){"use strict";const n=r(79).Connection,i=r(15);e.exports=((e,t,r,o)=>{const s=new Promise((e,t)=>{r.getPeerInfo((t,n)=>{if(!t&&n)return void e(n);const i=r.setPeerInfo;r.setPeerInfo=(t=>{i.call(r,t),e(t)})})}),a={source:i(r,o.incoming(e,t,s)),sink:i(o.outgoing(e,t,s),r)};return new n(a,r)})},function(e,t,r){"use strict";e.exports={PROTOCOL:"/ipfs/ping/1.0.0",PING_LENGTH:32}},function(e,t,r){var n=r(270),i=r(272),o="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||i(e)&&n(e)==o}},function(e,t,r){var n=r(1169);e.exports=function(e,t,r){r=void 0===r||r;var i,o=!1;return function(s){var a,c,u=0,l=0,f=0,p=[],h=!1,d=!1;function m(){if(a){var e=a;if(c)return a=null,e(c);if(Object.hasOwnProperty.call(p,l)){a=null;var r=p[l];delete p[l],l++,e(null,r),t&&g()}else l>=f&&d&&(a=null,e(d))}}var g=n(function(){if(h=!0,d)return m();o||t&&u-t>=l||(o=!0,s(i,function(t,n){if(o=!1,t)f=u,d=t,m();else{var i=u++;e(n,function(e,t){r?p[i]=t:p.push(t),e&&(c=e),m()}),d||g()}}))});return function(e,t){e?s(d=i=e,function(e){if(t)return t(e)}):(a=t,h||g(),m())}}}},function(e,t,r){"use strict";const n=r(259);e.exports=function(e){const t=e||100;var r=[];return n(function(e){for(r=r.concat(e);r.length>=t;){const e=t,n=r.slice(0,e);r=r.slice(e),this.queue(n)}},function(e){r.length&&(this.queue(r),r=[]),this.queue(null)})}},function(e,t,r){"use strict";e.exports=class{constructor(e,t){this._options=t||{},Object.assign(this,e)}}},function(e,t,r){"use strict";const n=r(1183),i=r(1184),o={bits:8};class s{constructor(e,t,r){if(this._options=Object.assign({},o,e),this._popCount=0,this._parent=t,this._posAtParent=r,!this._options.hashFn)throw new Error("please define an options.hashFn");this._options.hash||(this._options.hash=i(this._options.hashFn)),this._children=new n}static isBucket(e){return e instanceof s}async put(e,t){const r=await this._findNewBucketAndPos(e);await r.bucket._putAt(r,e,t)}async get(e){const t=await this._findChild(e);if(t)return t.value}async del(e){const t=await this._findPlace(e),r=t.bucket._at(t.pos);r&&r.key===e&&t.bucket._delAt(t.pos)}leafCount(){return this._children.compactArray().reduce((e,t)=>t instanceof s?e+t.leafCount():e+1,0)}childrenCount(){return this._children.length}onlyChild(){return this._children.get(0)}*eachLeafSeries(){const e=this._children.compactArray();for(const t of e)if(t instanceof s)for(const e of t.eachLeafSeries())yield e;else yield t}serialize(e,t){return t(this._children.reduce((r,n,i)=>(n&&(n instanceof s?r.push(n.serialize(e,t)):r.push(e(n,i))),r),[]))}async asyncTransform(e,t){return async function e(t,r,n){const i=[];for(const o of t._children.compactArray()){if(o instanceof s)await e(o,r,n);else{const e=await r(o);i.push({bitField:t._children.bitField(),children:e})}return n(i)}}(this,e,t)}toJSON(){return this.serialize(c,u)}prettyPrint(){return JSON.stringify(this.toJSON(),null," ")}tableSize(){return Math.pow(2,this._options.bits)}async _findChild(e){const t=await this._findPlace(e),r=t.bucket._at(t.pos);if(r&&r.key===e)return r}async _findPlace(e){const t=this._options.hash(e),r=await t.take(this._options.bits),n=this._children.get(r);return n instanceof s?n._findPlace(t):{bucket:this,pos:r,hash:t}}async _findNewBucketAndPos(e){const t=await this._findPlace(e),r=t.bucket._at(t.pos);if(r&&r.key!==e){const e=new s(this._options,t.bucket,t.pos);t.bucket._putObjectAt(t.pos,e);const n=await e._findPlace(r.hash);return n.bucket._putAt(n,r.key,r.value),e._findNewBucketAndPos(t.hash)}return t}_putAt(e,t,r){this._putObjectAt(e.pos,{key:t,value:r,hash:e.hash})}_putObjectAt(e,t){this._children.get(e)||this._popCount++,this._children.set(e,t)}_delAt(e){this._children.get(e)&&this._popCount--,this._children.unset(e),this._level()}_level(){if(this._parent&&this._popCount<=1)if(1===this._popCount){const e=this._children.find(a);if(!(e instanceof s)){const t=e.hash;t.untake(this._options.bits);const r={pos:this._posAtParent,hash:t};this._parent._putAt(r,e.key,e.value)}}else this._parent._delAt(this._posAtParent)}_at(e){return this._children.get(e)}}function a(e){return Boolean(e)}function c(e,t){return e.key}function u(e){return e}e.exports=s},function(e,t,r){"use strict";e.exports=((e="")=>(e.trim().match(/([^\\^\/]|\\\/)+/g)||[]).filter(Boolean))},function(e,t,r){"use strict";(function(t){const n=r(9),i=r(48),o=r(117),{loadNode:s,formatCid:a,toMfsPath:c,FILE_SEPARATOR:u,FILE_TYPES:l}=r(94),f=r(15),p=r(33),h=r(81),d=r(52),m=r(114),g=r(78),y=r(38),b={long:!1,cidBase:"base58btc"};e.exports=(e=>(function(r,v={}){"object"==typeof r&&(v=r,r=u),void 0===r&&(r=u),(v=Object.assign({},b,v)).long=v.l||v.long;const A=y.source();return n([t=>c(e,r,t),({mfsPath:t,depth:n},i)=>{f(o(t,e.ipld,{maxDepth:n}),p((s,a)=>{if(s)return i(s);if(a.length>1)return i(new Error(`Path ${r} had ${a.length} roots`));const c=a[0];if(!c)return i(new Error(`${r} does not exist`));if("dir"!==c.type)return i(null,m(c));let u=!0;return i(null,f(o(t,e.ipld,{maxDepth:n+1}),d(()=>!u||(u=!1,!1))))}))},(r,n)=>{n(null,f(r,h((r,n)=>{if(!v.long)return n(null,{name:r.name,type:0,size:0,hash:""});s(e,{cid:r.cid},(e,o)=>{if(e)return n(e);if(t.isBuffer(o.node))return n(null,{name:r.name,type:0,hash:a(r.cid,v.cidBase),size:o.node.length});const s=i.unmarshal(o.node.data);n(null,{name:r.name,type:l[s.type],hash:a(r.cid,v.cidBase),size:s.fileSize()||0})})})))}],(e,t)=>{if(e)return A.resolve(g(e));A.resolve(t)}),A}))}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(9),i=r(98),o=r(5)("ipfs:mfs:mkdir"),s=r(117),a=r(15),c=r(52),u=r(67),l=r(33),{createNode:f,toMfsPath:p,toPathComponents:h,updateMfsRoot:d,updateTree:m,FILE_SEPARATOR:g}=r(94),y={parents:!1,hashAlg:"sha2-256",cidVersion:0,shardSplitThreshold:1e3,format:"dag-pb",flush:!0};e.exports=(e=>(function(t,r,b){if("function"==typeof r&&(b=r,r={}),(r=Object.assign({},y,r)).parents=r.p||r.parents,r.cidVersion=r.cidVersion||0,!t)return b(new Error("no path given to Mkdir"));if((t=t.trim())===g)return b(r.parents?null:new Error(`cannot create directory '${g}': Already exists`));o(`Creating ${t}`);const v=h(t);n([r=>p(e,t,r),({mfsDirectory:t,mfsPath:r,root:n},i)=>{const o=h(r).slice(1);let f=0,p="";a(s(r,e.ipld,{fullPath:!0}),c(e=>e.name===o[f]&&(f++,!0)),u(e=>{const t=`${p}${p?"/":""}${o[e.depth]}`;if("dir"!==e.type)throw new Error(`cannot access ${t}: Not a directory`);return p=t,{cid:e.cid,name:e.name}}),l(i))},(t,o)=>{if(v.unshift("/"),t.length===v.length)return o(new Error("file already exists"));i(v.map((e,t)=>({part:e,index:t})),({part:i,index:o},s)=>t[o]?s(null,{name:i,...t[o]}):o===v.length-1||r.parents?void n([t=>f(e,"directory",r,t),({cid:e,node:t},r)=>{r(null,{cid:e,size:t.size,name:i})}],s):s(new Error("file does not exist")),o)},(t,n)=>m(e,t,r,n),({cid:t},r)=>d(e,t,r)],e=>{e&&e.message.includes("file already exists")&&r.parents&&(e=null),b(e)})}))},function(e,t,r){"use strict";const n=r(117),i=r(15),o=r(114),s=r(81),a=r(159),c=r(52),u=r(38),l=r(33),{toMfsPath:f}=r(94),p=r(5)("ipfs:mfs:read-pull-stream"),h={offset:0,length:void 0};e.exports=(e=>(function(t,r={}){(r=Object.assign({},h,r)).length=r.length||r.count,p(`Reading ${t}`);const d=u.source();return i(o(t),s((t,r)=>f(e,t,r)),s(({mfsPath:t,root:o},s)=>(p(`Exporting ${t}`),i(n(t,e.ipld,{offset:r.offset,length:r.length}),l(s)))),a(),c(),l((e,r)=>{if(e)return d.abort(e);if(!r||!r.length)return d.abort(new Error(`${t} does not exist`));const n=r[0];return"file"!==n.type?d.abort(new Error(`${t} was not a file`)):n.content?(p(`Got ${t} content`),void d.resolve(r[0].content)):d.abort(new Error(`Could not load content stream from ${t}`))})),d}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,a){a=(0,o.default)(a||i.default);var c=(0,s.default)(r);(0,n.default)(e,function(e,r,n){c(t,e,function(e,r){t=r,n(e)})},function(e){a(e,t)})};var n=a(r(269)),i=a(r(51)),o=a(r(154)),s=a(r(35));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,o){(0,n.default)(t)(e,(0,i.default)(r),o)};var n=o(r(551)),i=o(r(35));function o(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,r){(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.exports=r}).call(this,r(12))},function(e,t){var r=9007199254740991;e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,o){o=o||n.default,t=t||[];var s=[],a=0,c=(0,i.default)(r);e(t,function(e,t,r){var n=a++;c(e,function(e,t){s[n]=t,r(e)})},function(e){o(e,s)})};var n=o(r(51)),i=o(r(35));function o(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){(0,o.default)(e,function(){return!t.apply(this,arguments)},r)};var n,i=r(783),o=(n=i)&&n.__esModule?n:{default:n};e.exports=t.default},function(e,t){var r=t.once=function(e){return function(t,r){if(t)return r(t);if(null!=e){var n=e;e=null,r(null,n)}else r(!0)}};t.depthFirst=function(e,t){var n,i=[];return i.unshift(r(e)),function e(r,o){return i.length?n?o(n):void i[0](r,function(r,s){if(r){if(!0!==r){for(n=r,i.shift();i.length;)i.shift()(r,function(){});return o(r)}return i.shift(),e(null,o)}i.unshift(t(s)),o(r,s)}):o(!0)}},t.widthFirst=function(e,t){var n=[];return n.push(r(e)),function e(r,i){if(!n.length)return i(!0);n[0](r,function(r,o){if(r)return n.shift(),e(null,i);n.push(t(o)),i(r,o)})}},t.leafFirst=function(e,t){var n=[],i=[];return n.push(r(e)),function e(r,o){n[0](r,function(r,s){if(r)return n.shift(),i.length?o(null,i.shift()):o(!0);n.unshift(t(s)),i.unshift(s),e(null,o)})}}},function(e,t,r){"use strict";var n=Object.prototype.toString;e.exports=function(e){var t;return"[object Object]"===n.call(e)&&(null===(t=Object.getPrototypeOf(e))||t===Object.getPrototypeOf({}))}},function(e,t,r){"use strict";t.util=r(605),t.resolver=r(611)},function(e,t,r){"use strict";(function(n,i){const o=r(784),s=r(29),a=r(610),c=r(791),u=r(611),l=42;function f(e){return"string"==typeof e?e=new a(e).buffer:a.isCID(e)&&(e=e.buffer),new o.Tagged(l,n.concat([n.from("00","hex"),e]))}const p=new o.Decoder({tags:{[l]:e=>(e=e.slice(1),new a(e))}});(t=e.exports).serialize=((e,t)=>{let r;try{const s=function(e){let t;try{t=c(e)}catch(e){t=!1}if(t)throw new Error("The object passed has circular references");return function e(t){if(!t||n.isBuffer(t)||"string"==typeof t)return t;if(Array.isArray(t))return t.map(e);if(a.isCID(t))return f(t);const r=Object.keys(t);if(1===r.length&&"/"===r[0])return f(t["/"]);if(r.length>0){const n={};return r.forEach(r=>{"object"==typeof t[r]?n[r]=e(t[r]):n[r]=t[r]}),n}return t}(e)}(e);r=o.encode(s)}catch(e){return i(()=>t(e))}i(()=>t(null,r))}),t.deserialize=((e,t)=>{let r;try{r=p.decodeFirst(e)}catch(e){return i(()=>t(e))}i(()=>t(null,r))}),t.cid=((e,r,n)=>{"function"==typeof r&&(n=r,r={});const i=(r=r||{}).hashAlg||u.defaultHashAlg,o=r.hashLen,c=void 0===r.version?1:r.version;t.serialize(e,(e,t)=>{if(e)return n(e);s(t,i,o,(e,t)=>{if(e)return n(e);n(null,new a(c,u.multicodec,t))})})})}).call(this,r(0).Buffer,r(31).setImmediate)},function(e,t,r){"use strict";(function(t,n){const i=r(786),o=r(116),s=r(787),a=r(558),c=r(274),u=r(607),l=r(608),{URL:f}=r(275);class p{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=>c.NEG_ONE.minus(a.arrayBufferToBignumber(e)),4:e=>c.TEN.pow(e[0]).times(e[1]),5:e=>c.TWO.pow(e[0]).times(e[1]),32:e=>new f(e),35:e=>new RegExp(e)},e.tags),this.parser=s(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 ${e.length} elements`);switch(e.type){case c.PARENT.TAG:this._push(this.createTag(e.ref[0],e.ref[1]));break;case c.PARENT.BYTE_STRING:this._push(this.createByteString(e.ref,e.length));break;case c.PARENT.UTF8_STRING:this._push(this.createUtf8String(e.ref,e.length));break;case c.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 c.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 c.PARENT.ARRAY:this._push(this.createArray(e.ref,e.length))}this._currentParent&&this._currentParent.type===c.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 c.PARENT.ARRAY:case c.PARENT.BYTE_STRING:case c.PARENT.UTF8_STRING:r.length>-1?this._ref[this._ref.length-r.length]=e:this._ref.push(e),this._dec();break;case c.PARENT.OBJECT:null!=r.tmpKey?(this._ref[r.tmpKey]=e,r.tmpKey=null,this._dec()):(r.tmpKey=e,"string"!=typeof r.tmpKey&&(r.type=c.PARENT.MAP,r.ref=a.buildMap(r.ref)));break;case c.PARENT.MAP:null!=r.tmpKey?(this._ref.set(r.tmpKey,e),r.tmpKey=null,this._dec()):r.tmpKey=e;break;case c.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:c.PARENT.ARRAY,length:-1,ref:this._res,values:0,tmpKey:null}]}createTag(e,t){const r=this._knownTags[e];return r?r(t):new l(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,o,s,a,c){return i.read([e,t,r,n,o,s,a,c],0,!1,52,8)}createInt32Neg(e,t){return-1-a.buildInt32(e,t)}createInt64Neg(e,t,r,n){const i=a.buildInt32(e,t),s=a.buildInt32(r,n);return i>c.MAX_SAFE_HIGH?c.NEG_ONE.minus(new o(i).times(c.SHIFT32).plus(s)):-1-(i*c.SHIFT32+s)}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 u(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,o,s,a){this._push(this.createFloatDouble(e,t,r,n,i,o,s,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([],c.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:c.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:c.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:c.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({},c.PARENT.OBJECT,e):this._push(this.createObject({}))}_createArrayStartFixed(e){0!==e?this._createParent(new Array(e),c.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 p({size:e.length}).decodeFirst(e)}static decodeAll(e,r){return"string"==typeof e&&(e=t.from(e,r||"hex")),new p({size:e.length}).decodeAll(e)}}p.decodeFirst=p.decode,e.exports=p}).call(this,r(0).Buffer,r(12))},function(e,t,r){"use strict";const n=r(274),i=n.MT,o=n.SIMPLE,s=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 o.FALSE:return!1;case o.TRUE:return!0;case o.NULL:return t?null:s.NULL;case o.UNDEFINED:return t?void 0:s.UNDEFINED;case-1:if(!t)throw new Error("Invalid BREAK");return s.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`${this.tag}(${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(e){return t=e,this.err=t,this}}}e.exports=n},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,t=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?`${e.username}:${e.password}@`:"",r=e.auth?e.auth+"@":"",n=e.port?":"+e.port:"",i=e.protocol?e.protocol+"//":"",o=e.host||"",s=e.hostname||"",a=e.search||(e.query?"?"+e.query:""),c=e.hash||"",u=e.pathname||"";return`${i}${t||r}${o||s+n}${e.path||u+a}${c}`}}}},function(e,t,r){"use strict";(function(t){const n=r(13),i=r(39),o=r(47),s=r(42),a=r(790);class c{constructor(r,s,a){if(e.exports.isCID(r)){let e=r;return this.version=e.version,this.codec=e.codec,void(this.multihash=t.from(e.multihash))}if("string"==typeof r)if(i.isEncoded(r)){const e=i.decode(r);r=parseInt(e.slice(0,1).toString("hex"),16),s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=n.fromB58String(r),r=0;else if(t.isBuffer(r)){const e=r.slice(0,1),t=parseInt(e.toString("hex"),16);if(0===t||1===t){const e=r;r=t,s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=r,r=0}this.codec=s,this.version=r,this.multihash=a,c.validateCID(this)}get buffer(){let e=this._buffer;if(!e){if(0===this.version)e=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");e=t.concat([t.from("01","hex"),o.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:e})}return e}get prefix(){return t.concat([t.from(`0${this.version}`,"hex"),o.getCodeVarint(this.codec),n.prefix(this.multihash)])}toV0(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");const{name:e,length:t}=n.decode(this.multihash);if("sha2-256"!==e)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==t)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new u(0,this.codec,this.multihash)}toV1(){return new u(1,this.codec,this.multihash)}toBaseEncodedString(e){switch(e=e||"base58btc",this.version){case 0:if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");return n.toB58String(this.multihash);case 1:return i.encode(e,this.buffer).toString();default:throw new Error("Unsupported version")}}toString(e){return this.toBaseEncodedString(e)}toJSON(){return{codec:this.codec,version:this.version,hash:this.multihash}}equals(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}static validateCID(e){let t=a.checkCIDComponents(e);if(t)throw new Error(t)}}const u=r(19)(c,{className:"CID",symbolName:"@ipld/js-cid/CID"});u.codecs=s,e.exports=u}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(n){const i=r(605),o=r(793),s=r(610);(t=e.exports).multicodec="dag-cbor",t.defaultHashAlg="sha2-256",t.resolve=((e,t,r)=>{"function"==typeof t&&(r=t,t=void 0),i.deserialize(e,(e,i)=>{if(e)return r(e);if(!t||"/"===t)return r(null,{value:i,remainderPath:""});const s=t.split("/"),a=o(i).get(s);if(void 0!==a)return r(null,{value:a,remainderPath:""});let c;const u=s.length;for(let e=0;e{"function"==typeof t&&(r=t,t=void 0),t=t||{},i.deserialize(e,(e,t)=>{if(e)return r(e);const n=function(e,t){return t=t||"/",0===Object.keys(e).length?[]:o(e).reduce(function(e,r){s.isCID(r)&&this.update(void 0);const n=this.path.join(t);return""!==n&&e.push({path:n,value:r}),e},[])}(t).map(e=>e.path);r(null,n)})}),t.isLink=((e,r,n)=>{t.resolve(e,r,(e,t)=>e?n(e):t.remainderPath.length>0?n(new Error("path out of scope")):void(s.isCID(t.value)?n(null,t.value):n(null,!1)))})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(9),i=r(279),o=r(278);(t=e.exports).multicodec="dag-pb",t.defaultHashAlg="sha2-256",t.resolve=((e,t,r)=>{n([t=>o.deserialize(e,t),(e,n)=>{if(!t)return r(null,{value:e,remainderPath:""});const i=t.split("/");if("Links"===i[0]){let t="";if(!i[1])return n(null,{value:e.links.map(e=>e.toJSON()),remainderPath:""});const r={};e.links.forEach((e,t)=>{const n=e.toJSON();r[t]=r[n.name]={cid:n.cid,name:n.name,size:n.size}});let o=r[i[1]];"Hash"===i[2]?o={"/":o.cid}:"Tsize"===i[2]?o=o.size:"Name"===i[2]&&(o=o.name),n(null,{value:o,remainderPath:t=i.slice(3).join("/")})}else if("Data"===i[0])n(null,{value:e.data,remainderPath:""});else{const t={};e.links.forEach((e,r)=>{const n=e.toJSON();t[n.name]={cid:n.cid,name:n.name,size:n.size}});const r=t[i[0]];if(r)return n(null,{value:{"/":r.cid},remainderPath:i.slice(1).join("/")});n(new Error("path not available"))}}],r)}),t.tree=((e,t,r)=>{"function"==typeof t&&(r=t,t={}),t=t||{},o.deserialize(e,(e,t)=>{if(e)return r(e);const n=[];n.push("Links"),t.links.forEach((e,t)=>{n.push(`Links/${t}/Name`),n.push(`Links/${t}/Tsize`),n.push(`Links/${t}/Hash`)}),n.push("Data"),r(null,n)})}),t.isLink=((e,r,n)=>{t.resolve(e,r,(e,t)=>{if(e)return n(e);if(t.remainderPath.length>0)return n(new Error("path out of scope"));if("object"==typeof t.value&&t.value["/"]){let r;try{r=i.isCID(new i(t.value["/"]))}catch(e){r=!1}if(r)return n(null,t.value)}n(null,!1)})})},function(e,t,r){"use strict";const n=r(801),i=r(29);e.exports={resolver:{multicodec:"raw",defaultHashAlg:"sha2-256",resolve:(e,t,r)=>{r(null,{value:e,remainderPath:""})},tree:(e,t,r)=>{"function"==typeof t&&(r=t),r(null,[])}},util:{deserialize:(e,t)=>{t(null,e)},serialize:(e,t)=>{t(null,e)},cid:(e,t,r)=>{"function"==typeof t&&(r=t,t={});const o=(t=t||{}).hashAlg||"sha2-256",s=void 0===t.version?1:t.version;i(e,o,(e,t)=>{if(e)return r(e);r(null,new n(s,"raw",t))})}}}},function(e,t,r){"use strict";(function(n){const i=r(25)(r(559));r(43),r(95),r(119);const o=r(3);t=e.exports;const s={rsa:r(803),ed25519:r(807),secp256k1:r(809)(i,r(562))};function a(e){return void 0!==s[e.toLowerCase()]}t.supportedKeys=s,t.keysPBM=i,t.keyStretcher=r(811),t.generateEphemeralKeyPair=r(813),t.generateKeyPair=((e,t,r)=>{let n=s[e.toLowerCase()];if(!n)return r(new Error("invalid or unsupported key type"));n.generateKeyPair(t,r)}),t.generateKeyPairFromSeed=((e,t,r,n)=>{let i=s[e.toLowerCase()];return i?"ed25519"!==e.toLowerCase()?n(new Error("Seed key derivation is unimplemented for RSA or secp256k1")):void i.generateKeyPairFromSeed(t,r,n):n(new Error("invalid or unsupported key type"))}),t.unmarshalPublicKey=(e=>{const t=i.PublicKey.decode(e),r=t.Data;switch(t.Type){case i.KeyType.RSA:return s.rsa.unmarshalRsaPublicKey(r);case i.KeyType.Ed25519:return s.ed25519.unmarshalEd25519PublicKey(r);case i.KeyType.Secp256k1:if(s.secp256k1)return s.secp256k1.unmarshalSecp256k1PublicKey(r);throw new Error("secp256k1 support requires libp2p-crypto-secp256k1 package");default:throw new Error("invalid or unsupported key type")}}),t.marshalPublicKey=((e,t)=>{if(!a(t=(t||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type");return e.bytes}),t.unmarshalPrivateKey=((e,t)=>{let r;try{r=i.PrivateKey.decode(e)}catch(e){return t(e)}const n=r.Data;switch(r.Type){case i.KeyType.RSA:return s.rsa.unmarshalRsaPrivateKey(n,t);case i.KeyType.Ed25519:return s.ed25519.unmarshalEd25519PrivateKey(n,t);case i.KeyType.Secp256k1:return s.secp256k1?s.secp256k1.unmarshalSecp256k1PrivateKey(n,t):t(new Error("secp256k1 support requires libp2p-crypto-secp256k1 package"));default:t(new Error("invalid or unsupported key type"))}}),t.marshalPrivateKey=((e,t)=>{if(!a(t=(t||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type");return e.bytes}),t.import=((e,t,r)=>{try{const i=o.pki.decryptRsaPrivateKey(e,t);if(null===i)throw new Error("Cannot read the key, most likely the password is wrong or not a RSA key");let a=o.asn1.toDer(o.pki.privateKeyToAsn1(i));return a=n.from(a.getBytes(),"binary"),s.rsa.unmarshalRsaPrivateKey(a,r)}catch(e){r(e)}})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(36).bignum;t.toBase64=function(t,r){return t.toArrayLike(e,"be",r).toString("base64").replace(/(=*)$/,"").replace(/\+/g,"-").replace(/\//g,"_")},t.toBn=function(t){return new n(e.from(t,"base64"))}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(560),i=r(561),o=r(812),s={SHA1:"SHA-1",SHA256:"SHA-256",SHA512:"SHA-512"};t.create=function(t,r,a){const c=s[t];n(i.subtle.importKey("raw",r,{name:"HMAC",hash:{name:c}},!1,["sign"]).then(r=>({digest(t,o){((t,r,o)=>{n(i.subtle.sign({name:"HMAC"},t,r).then(t=>e.from(t)),o)})(r,t,o)},length:o[t]})),a)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(34);e.exports={ensureMultiaddr:function(e){return n.isMultiaddr(e)?e:n(e)}}},function(e,t,r){"use strict";(function(t){const n=r(27),i=r(24),o=r(46);function s(e){let r;if("string"==typeof e)r=e;else if(t.isBuffer(e))r=n.encode(e).toString();else if(i.isPeerId(e))r=e.toB58String();else{if(!o.isPeerInfo(e))throw new Error("not valid PeerId or PeerInfo, or B58Str");r=e.id.toB58String()}return r}e.exports=class{constructor(){this._peers={}}has(e){const t=s(e);return Boolean(this._peers[t])}put(e,t){const r=this._peers[e.id.toB58String()];if(!r||t)return this._peers[e.id.toB58String()]=e,e;e.multiaddrs.forEach(e=>r.multiaddrs.add(e));const n=e.isConnected();return n&&r.connect(n),e.protocols.forEach(e=>r.protocols.add(e)),!r.id.privKey&&e.id.privKey&&(r.id.privKey=e.id.privKey),!r.id.pubKey&&e.id.pubKey&&(r.id.pubKey=e.id.pubKey),r}get(e){const t=s(e),r=this._peers[t];if(r)return r;throw new Error("PeerInfo not found")}getAll(){return this._peers}getAllArray(){return Object.keys(this._peers).map(e=>this._peers[e])}getMultiaddrs(e){return this.get(e).multiaddrs.toArray()}remove(e){const t=s(e);this._peers[t]&&delete this._peers[t]}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";r.r(t),r.d(t,"struct",function(){return x}),r.d(t,"superstruct",function(){return _}),r.d(t,"isStruct",function(){return u}),r.d(t,"StructError",function(){return n});class n extends TypeError{static format(e){const{type:t,path:r,value:n}=e;return`Expected a value of type \`${t}\`${r.length?` for \`${r.join(".")}\``:""} but received \`${JSON.stringify(n)}\`.`}constructor(e){super(n.format(e));const{data:t,path:r,value:i,reason:o,type:s,errors:a=[]}=e;this.data=t,this.path=r,this.value=i,this.reason=o,this.type=s,this.errors=a,a.length||a.push(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack}}var i=Object.prototype.toString,o=function(e){if(void 0===e)return"undefined";if(null===e)return"null";var t=typeof e;if("boolean"===t)return"boolean";if("string"===t)return"string";if("number"===t)return"number";if("symbol"===t)return"symbol";if("function"===t)return"GeneratorFunction"===s(e)?"generatorfunction":"function";if(function(e){return Array.isArray?Array.isArray(e):e instanceof Array}(e))return"array";if(function(e){if(e.constructor&&"function"==typeof e.constructor.isBuffer)return e.constructor.isBuffer(e);return!1}(e))return"buffer";if(function(e){try{if("number"==typeof e.length&&"function"==typeof e.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(e))return"arguments";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";if(function(e){return e instanceof RegExp||"string"==typeof e.flags&&"boolean"==typeof e.ignoreCase&&"boolean"==typeof e.multiline&&"boolean"==typeof e.global}(e))return"regexp";switch(s(e)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(e){return"function"==typeof e.throw&&"function"==typeof e.return&&"function"==typeof e.next}(e))return"generator";switch(t=i.call(e)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")};function s(e){return e.constructor?e.constructor.name:null}const a="@@__STRUCT__@@",c="@@__KIND__@@";function u(e){return!(!e||!e[a])}function l(e,t){return"function"==typeof e?e(t):e}var f=Object.assign||function(e){for(var t=1;t1?A(e,t,r):g(e,t,r);case"function":return m(e,t,r);case"object":return y(e,t,r);case"string":{let n,i=!0;if(e.endsWith("?")&&(i=!1,e=e.slice(0,-1)),e.includes("|")){n=w(e.split(/\s*\|\s*/g),t,r)}else if(e.includes("&")){n=E(e.split(/\s*&\s*/g),t,r)}else n=v(e,t,r);return i||(n=b(n,void 0,r)),n}}throw new Error(`Invalid schema: ${e}`)}function d(e,t,r){if("array"!==o(e))throw new Error(`Invalid schema: ${e}`);const n=e.map(e=>{try{return JSON.stringify(e)}catch(t){return String(e)}}).join(" | ");return new p("enum",n,(r=l(t))=>e.includes(r)?[void 0,r]:[{data:r,path:[],value:r,type:n}])}function m(e,t,r){if("function"!==o(e))throw new Error(`Invalid schema: ${e}`);return new p("function","",(r=l(t),n)=>{const i=e(r,n);let s,a={path:[],reason:null};switch(o(i)){case"boolean":s=i;break;case"string":s=!1,a.reason=i;break;case"object":s=!1,a=f({},a,i);break;default:throw new Error(`Invalid result: ${i}`)}return s?[void 0,r]:[f({type:"",value:r,data:r},a)]})}function g(e,t,r){if("array"!==o(e)||1!==e.length)throw new Error(`Invalid schema: ${e}`);const n=v("array",void 0,r),i=h(e[0],void 0,r),s=`[${i.type}]`;return new p("list",s,(e=l(t))=>{const[r,o]=n.validate(e);if(r)return r.type=s,[r];e=o;const a=[],c=[];for(let t=0;t{r.path=[t].concat(r.path),r.data=e,a.push(r)}):c[t]=o}if(a.length){const e=a[0];return e.errors=a,[e]}return[void 0,c]})}function y(e,t,r){if("object"!==o(e))throw new Error(`Invalid schema: ${e}`);const n=v("object",void 0,r),i=[],s={};for(const t in e){i.push(t);const n=h(e[t],void 0,r);s[t]=n}const a=`{${i.join()}}`;return new p("object",a,(e=l(t))=>{const[r]=n.validate(e);if(r)return r.type=a,[r];const i=[],o={},c=Object.keys(e),u=Object.keys(s);if(new Set(c.concat(u)).forEach(r=>{let n=e[r];const a=s[r];if(void 0===n&&(n=l(t&&t[r],e)),!a){const t={data:e,path:[r],value:n};return void i.push(t)}const[c,u]=a.validate(n,e);c?(c.errors||[c]).forEach(t=>{t.path=[r].concat(t.path),t.data=e,i.push(t)}):(r in e||void 0!==u)&&(o[r]=u)}),i.length){const e=i[0];return e.errors=i,[e]}return[void 0,o]})}function b(e,t,r){return w([e,"undefined"],t,r)}function v(e,t,r){if("string"!==o(e))throw new Error(`Invalid schema: ${e}`);const{types:n}=r,i=n[e];if("function"!==o(i))throw new Error(`Invalid type: ${e}`);const s=m(i,t),a=e;return new p("scalar",a,e=>{const[t,r]=s.validate(e);return t?(t.type=a,[t]):[void 0,r]})}function A(e,t,r){if("array"!==o(e))throw new Error(`Invalid schema: ${e}`);const n=e.map(e=>h(e,void 0,r)),i=v("array",void 0,r),s=`[${n.map(e=>e.type).join()}]`;return new p("tuple",s,(e=l(t))=>{const[r]=i.validate(e);if(r)return r.type=s,[r];const o=[],a=[],c=Math.max(e.length,n.length);for(let t=0;t{r.path=[t].concat(r.path),r.data=e,a.push(r)}):o[t]=c}if(a.length){const e=a[0];return e.errors=a,[e]}return[void 0,o]})}function w(e,t,r){if("array"!==o(e))throw new Error(`Invalid schema: ${e}`);const n=e.map(e=>h(e,void 0,r)),i=n.map(e=>e.type).join(" | ");return new p("union",i,(e=l(t))=>{const r=[];for(const t of n){const[n,i]=t.validate(e);if(!n)return[void 0,i];r.push(n)}return r[0].type=i,r})}function E(e,t,r){if("array"!==o(e))throw new Error(`Invalid schema: ${e}`);const n=e.map(e=>h(e,void 0,r)),i=n.map(e=>e.type).join(" & ");return new p("intersection",i,(e=l(t))=>{let r=e;for(const e of n){const[t,n]=e.validate(r);if(t)return t.type=i,[t];r=n}return[void 0,r]})}const k={any:h,dict:function(e,t,r){if("array"!==o(e)||2!==e.length)throw new Error(`Invalid schema: ${e}`);const n=v("object",void 0,r),i=h(e[0],void 0,r),s=h(e[1],void 0,r),a=`dict<${i.type},${s.type}>`;return new p("dict",a,e=>{const r=l(t);e=r?f({},r,e):e;const[o]=n.validate(e);if(o)return o.type=a,[o];const c={},u=[];for(let t in e){const r=e[t],[n,o]=i.validate(t);if(n){(n.errors||[n]).forEach(r=>{r.path=[t].concat(r.path),r.data=e,u.push(r)});continue}t=o;const[a,l]=s.validate(r);a?(a.errors||[a]).forEach(r=>{r.path=[t].concat(r.path),r.data=e,u.push(r)}):c[t]=l}if(u.length){const e=u[0];return e.errors=u,[e]}return[void 0,c]})},enum:d,enums:function(e,t,r){return g([d(e,void 0)],t,r)},function:m,instance:function(e,t,r){const n=`instance<${e.name}>`;return new p("instance",n,(r=l(t))=>r instanceof e?[void 0,r]:[{data:r,path:[],value:r,type:n}])},interface:function(e,t,r){if("object"!==o(e))throw new Error(`Invalid schema: ${e}`);const n=[],i={};for(const t in e){n.push(t);const o=h(e[t],void 0,r);i[t]=o}const s=`{${n.join()}}`;return new p("interface",s,e=>{const r=l(t);e=r?f({},r,e):e;const n=[],o=e;for(const r in i){let s=e[r];const a=i[r];void 0===s&&(s=l(t&&t[r],e));const[c,u]=a.validate(s,e);c?(c.errors||[c]).forEach(t=>{t.path=[r].concat(t.path),t.data=e,n.push(t)}):(r in e||void 0!==u)&&(o[r]=u)}if(n.length){const e=n[0];return e.errors=n,[e]}return[void 0,o]})},lazy:function(e,t,r){if("function"!==o(e))throw new Error(`Invalid schema: ${e}`);let n,i;return n=new p("lazy","lazy...",t=>(i=e(),n.name=i.kind,n.type=i.type,n.validate=i.validate,n.validate(t)))},list:g,literal:function(e,t,r){const n=`literal: ${JSON.stringify(e)}`;return new p("literal",n,(r=l(t))=>r===e?[void 0,r]:[{data:r,path:[],value:r,type:n}])},object:y,optional:b,partial:function(e,t,r){if("object"!==o(e))throw new Error(`Invalid schema: ${e}`);const n=v("object",void 0,r),i=[],s={};for(const t in e){i.push(t);const n=h(e[t],void 0,r);s[t]=n}const a=`{${i.join()},...}`;return new p("partial",a,(e=l(t))=>{const[r]=n.validate(e);if(r)return r.type=a,[r];const i=[],o={};for(const r in s){let n=e[r];const a=s[r];void 0===n&&(n=l(t&&t[r],e));const[c,u]=a.validate(n,e);c?(c.errors||[c]).forEach(t=>{t.path=[r].concat(t.path),t.data=e,i.push(t)}):(r in e||void 0!==u)&&(o[r]=u)}if(i.length){const e=i[0];return e.errors=i,[e]}return[void 0,o]})},scalar:v,tuple:A,union:w,intersection:E,dynamic:function(e,t,r){if("function"!==o(e))throw new Error(`Invalid schema: ${e}`);return new p("dynamic","dynamic...",(r=l(t),n)=>{const i=e(r,n);if("function"!==o(i))throw new Error(`Invalid schema: ${i}`);const[s,a]=i.validate(r);return s?[s]:[void 0,a]})}},S={any:e=>void 0!==e};function _(e={}){const t=f({},S,e.types||{});function r(e,r,i={}){u(e)&&(e=e.schema);const o=k.any(e,r,f({},i,{types:t}));function s(e){if(this instanceof s)throw new Error("Invalid `new` keyword!");return s.assert(e)}return Object.defineProperty(s,a,{value:!0}),Object.defineProperty(s,c,{value:o}),s.kind=o.name,s.type=o.type,s.schema=e,s.defaults=r,s.options=i,s.assert=(e=>{const[t,r]=o.validate(e);if(t)throw new n(t);return r}),s.test=(e=>{const[t]=o.validate(e);return!t}),s.validate=(e=>{const[t,r]=o.validate(e);return t?[new n(t)]:[void 0,r]}),s}return Object.keys(k).forEach(e=>{const n=k[e];r[e]=((e,i,o)=>{return r(n(e,i,f({},o,{types:t})),i,o)})}),r}["arguments","array","boolean","buffer","error","float32array","float64array","function","generatorfunction","int16array","int32array","int8array","map","null","number","object","promise","regexp","set","string","symbol","uint16array","uint32array","uint8array","uint8clampedarray","undefined","weakmap","weakset"].forEach(e=>{S[e]=(t=>o(t)===e)}),S.date=(e=>"date"===o(e)&&!isNaN(e));const x=_()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){r=r||n.default;var a=(0,i.default)(t)?[]:{};e(t,function(e,t,r){(0,s.default)(e)(function(e,n){arguments.length>2&&(n=(0,o.default)(arguments,1)),a[t]=n,r(e)})},function(e){r(e,a)})};var n=a(r(51)),i=a(r(248)),o=a(r(74)),s=a(r(35));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,r,n){return e(t,n)}},e.exports=t.default},function(e,t,r){"use strict";(function(t){const n=r(565),i=r(19),o="/",s=t.from(o),a=s[0];class c{constructor(e,r){if("string"==typeof e?this._buf=t.from(e):t.isBuffer(e)&&(this._buf=e),null==r&&(r=!0),r&&this.clean(),0===this._buf.length||this._buf[0]!==a)throw new Error(`Invalid key: ${this.toString()}`)}toString(e){return this._buf.toString(e||"utf8")}toBuffer(){return this._buf}get[Symbol.toStringTag](){return`[Key ${this.toString()}]`}static withNamespaces(e){return new u(e.join(o))}static random(){return new u(n().replace(/-/g,""))}clean(){for(this._buf&&0!==this._buf.length||(this._buf=t.from(o)),this._buf[0]!==a&&(this._buf=t.concat([s,this._buf]));this._buf.length>1&&this._buf[this._buf.length-1]===a;)this._buf=this._buf.slice(0,-1)}less(e){const t=this.list(),r=e.list();for(let e=0;ei)return!1}return t.length>>((3&t)<<3)&255;return i}}},function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,i=r;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")}},function(e,t,r){"use strict";const n=r(20);e.exports.dbOpenFailedError=(e=>(e=e||new Error("Cannot open database"),n(e,"ERR_DB_OPEN_FAILED"))),e.exports.dbDeleteFailedError=(e=>(e=e||new Error("Delete failed"),n(e,"ERR_DB_DELETE_FAILED"))),e.exports.dbWriteFailedError=(e=>(e=e||new Error("Write failed"),n(e,"ERR_DB_WRITE_FAILED"))),e.exports.notFoundError=(e=>(e=e||new Error("Not Found"),n(e,"ERR_NOT_FOUND")))},function(e,t,r){"use strict";const n=r(284),i=r(844),o=r(846),s=r(848),a=r(849),c=r(627);t.KeytransformDatastore=n,t.ShardingDatastore=i,t.MountDatastore=o,t.TieredDatastore=s,t.NamespaceDatastore=a,t.shard=c},function(e,t,r){"use strict";const n=r(285),i=r(28).Key,o=r(845),s=t.PREFIX="/repo/flatfs/shard/",a=t.SHARDING_FN="SHARDING";t.README_FN="_README";class c{constructor(e){this.param=e}fun(e){throw new Error("implement me")}toString(){return`${s}v1/${this.name}/${this.param}`}}class u extends c{constructor(e){super(e),this._padding=n("",e,"_"),this.name="prefix"}fun(e){return(e+this._padding).slice(0,this.param)}}class l extends c{constructor(e){super(e),this._padding=n("",e,"_"),this.name="suffix"}fun(e){const t=this._padding+e;return t.slice(t.length-this.param)}}class f extends c{constructor(e){super(e),this._padding=n("",e+1,"_"),this.name="next-to-last"}fun(e){const t=this._padding+e,r=t.length-this.param-1;return t.slice(r,r+this.param)}}function p(e){if(0===(e=e.trim()).length)throw new Error("empty shard string");if(!e.startsWith(s))throw new Error(`invalid or no path prefix: ${e}`);const t=e.slice(s.length).split("/"),r=t[0];if("v1"!==r)throw new Error(`expect 'v1' version, got '${r}'`);const n=t[1];if(!t[2])throw new Error("missing param");const i=parseInt(t[2],10);switch(n){case"prefix":return new u(i);case"suffix":return new l(i);case"next-to-last":return new f(i);default:throw new Error(`unkown sharding function: ${n}`)}}t.readShardFun=((e,t,r)=>{const n=new i(e).child(new i(a));("function"==typeof t.getRaw?t.getRaw.bind(t):t.get.bind(t))(n,(e,t)=>{if(e)return r(e);let n;try{n=p((t||"").toString().trim())}catch(e){return r(e)}r(null,n)})}),t.readme=o,t.parseShardFun=p,t.Prefix=u,t.Suffix=l,t.NextToLast=f},function(e,t,r){"use strict";var n=function(e,t){return t||(t={}),e.split("").forEach(function(e,r){e in t||(t[e]=r)}),t},i={alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",charmap:{0:14,1:8}};i.charmap=n(i.alphabet,i.charmap);var o={alphabet:"0123456789ABCDEFGHJKMNPQRSTVWXYZ",charmap:{O:0,I:1,L:1}};o.charmap=n(o.alphabet,o.charmap);var s={alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",charmap:{}};function a(e){if(this.buf=[],this.shift=8,this.carry=0,e){switch(e.type){case"rfc4648":this.charmap=t.rfc4648.charmap;break;case"crockford":this.charmap=t.crockford.charmap;break;case"base32hex":this.charmap=t.base32hex.charmap;break;default:throw new Error("invalid type")}e.charmap&&(this.charmap=e.charmap)}}function c(e){if(this.buf="",this.shift=3,this.carry=0,e){switch(e.type){case"rfc4648":this.alphabet=t.rfc4648.alphabet;break;case"crockford":this.alphabet=t.crockford.alphabet;break;case"base32hex":this.alphabet=t.base32hex.alphabet;break;default:throw new Error("invalid type")}e.alphabet?this.alphabet=e.alphabet:e.lc&&(this.alphabet=this.alphabet.toLowerCase())}}s.charmap=n(s.alphabet,s.charmap),a.prototype.charmap=i.charmap,a.prototype.write=function(e){var t=this.charmap,r=this.buf,n=this.shift,i=this.carry;return e.toUpperCase().split("").forEach(function(e){if("="!=e){var o=255&t[e];(n-=5)>0?i|=o<>-n),i=o<<(n+=8)&255):(r.push(i|o),n=8,i=0)}}),this.shift=n,this.carry=i,this},a.prototype.finalize=function(e){return e&&this.write(e),8!==this.shift&&0!==this.carry&&(this.buf.push(this.carry),this.shift=8,this.carry=0),this.buf},c.prototype.alphabet=i.alphabet,c.prototype.write=function(e){var t,r,n,i=this.shift,o=this.carry;for(n=0;n>i,this.buf+=this.alphabet[31&t],i>5&&(t=r>>(i-=5),this.buf+=this.alphabet[31&t]),o=r<<(i=5-i),i=8-i;return this.shift=i,this.carry=o,this},c.prototype.finalize=function(e){return e&&this.write(e),3!==this.shift&&(this.buf+=this.alphabet[31&this.carry],this.shift=3,this.carry=0),this.buf},t.encode=function(e,t){return new c(t).finalize(e)},t.decode=function(e,t){return new a(t).finalize(e)},t.Decoder=a,t.Encoder=c,t.charmap=n,t.crockford=o,t.rfc4648=i,t.base32hex=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(r(850)),i=o(r(163));function o(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.default)(n.default),e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,n){((0,i.default)(t)?u:l)(e,t,(0,a.default)(r),n||s.default)};var n=c(r(631)),i=c(r(248)),o=c(r(851)),s=c(r(51)),a=c(r(35));function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t,r,n){var i=new Array(t.length);e(t,function(e,t,n){r(e,function(e,r){i[t]=!!r,n(e)})},function(e){if(e)return n(e);for(var r=[],o=0;o0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?w(e,s,t,!1):x(e,s)):w(e,s,t,!1))):n||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=E?e=E:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(_,e):_(e))}function _(e){h("emit readable"),e.emit("readable"),R(e)}function x(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(C,e,t))}function C(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;eo.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0===(e-=s)){s===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,s),0===(e-=s)){s===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function N(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(P,t,e))}function P(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function M(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?N(this):S(this),null;if(0===(e=k(e,t))&&t.ended)return 0===t.length&&N(this),null;var n,i=t.needReadable;return h("need readable",i),(0===t.length||t.length-e0?T(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&N(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,h("pipe count=%d opts=%j",o.pipesCount,t);var c=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?l:v;function u(t,n){h("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,h("cleanup"),e.removeListener("close",y),e.removeListener("finish",b),e.removeListener("drain",f),e.removeListener("error",g),e.removeListener("unpipe",u),r.removeListener("end",l),r.removeListener("end",v),r.removeListener("data",m),p=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function l(){h("onend"),e.end()}o.endEmitted?i.nextTick(c):r.once("end",c),e.on("unpipe",u);var f=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,R(e))}}(r);e.on("drain",f);var p=!1;var d=!1;function m(t){h("ondata"),d=!1,!1!==e.write(t)||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==M(o.pipes,e))&&!p&&(h("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function g(t){h("onerror",t),v(),e.removeListener("error",g),0===a(e,"error")&&e.emit("error",t)}function y(){e.removeListener("finish",b),v()}function b(){h("onfinish"),e.removeListener("close",y),v()}function v(){h("unpipe"),r.unpipe(e)}return r.on("data",m),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",g),e.once("close",y),e.once("finish",b),e.emit("pipe",r),o.flowing||(h("pipe resume"),r.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o-1?n:o.nextTick;b.WritableState=y;var u=r(64);u.inherits=r(7);var l={deprecate:r(287)},f=r(636),p=r(6).Buffer,h=i.Uint8Array||function(){};var d,m=r(637);function g(){}function y(e,t){a=a||r(164),e=e||{};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,u=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(u||0===u)?u:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===e.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(o.nextTick(i,n),o.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),S(e,t))}(e,r,n,t,i);else{var s=E(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||w(e,r),n?c(A,e,r,s,i):A(e,r,s,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function b(e){if(a=a||r(164),!(d.call(b,this)||this instanceof a))return new b(e);this._writableState=new y(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function v(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function A(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),S(e,t)}function w(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,c=!0;r;)i[a]=r,r.isBuf||(c=!1),r=r.next,a+=1;i.allBuffers=c,v(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,l=r.encoding,f=r.callback;if(v(e,t,!1,t.objectMode?1:u.length,u,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),S(e,t)})}function S(e,t){var r=E(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(k,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(b,f),y.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(y.prototype,"buffer",{get:l.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===b&&(e&&e._writableState instanceof y)}})):d=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,r){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=e,p.isBuffer(n)||n instanceof h);return a&&!p.isBuffer(e)&&(e=function(e){return p.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=g),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),o.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),o.nextTick(n,s),i=!1),i}(this,i,e,r))&&(i.pendingcb++,s=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=p.from(t,r));return t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var c=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,S(e,t),r&&(t.finished?o.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=m.destroy,b.prototype._undestroy=m.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(4),r(31).setImmediate,r(12))},function(e,t,r){"use strict";e.exports=s;var n=r(164),i=r(64);function o(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length{const r=e+"/repo.lock";o("locking %s",r),s[r]=!0;const n={close(e){s[r]&&delete s[r],i(e)}};i(()=>{t(null,n)})}),t.locked=((e,t)=>{const r=e+"/repo.lock";o("checking lock: %s");const n=s[r];i(()=>{t(null,n)})})},function(e,t,r){"use strict";e.exports=r(883)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return t},e.exports=t.default},function(e,t){e.exports=function(e,t,r){var n;return function(){if(!t)return e.apply(this,arguments);var i=this,o=arguments,s=r&&!n;return clearTimeout(n),n=setTimeout(function(){if(n=null,!s)return e.apply(i,o)},t),s?e.apply(this,arguments):void 0}}},function(e,t,r){"use strict";var n=r(905);function i(e){return"function"==typeof e}function o(e,t){return t?function(r,n){var i=setTimeout(function(){e(new Error("pull-reader: read exceeded timeout"),n)},t);e(r,function(e,t){clearTimeout(i),n(e,t)})}:e}e.exports=function(e){var t,r,s,a,c,u=[],l=!1,f=n();function p(){for(;u.length;)if(null==u[0].length&&f.has(1))u.shift().cb(null,f.get());else if(f.has(u[0].length)){var e=u.shift();e.cb(null,f.get(e.length))}else if(1==s&&u[0].length&&f.length 0 to the moving average constructor");let t,r,i=0,o=0,s=0,a={};return a.push=function(a,c){if(r){const u=1-n(-(a-r)/e),l=c-t;t=u*c+(1-u)*t,i=(1-u)*(i+l*(u*l)),o=Math.sqrt(i),s=t+u*l}else t=c;r=a},a.movingAverage=function(){return t},a.variance=function(){return i},a.deviation=function(){return o},a.forecast=function(){return s},a}},function(e,t,r){"use strict";const{createFromPrivKey:n}=r(24),i=r(49),o=r(911),s=r(20),a=r(5),c=a("ipfs:ipns");c.error=a("ipfs:ipns:error");const u=r(912),l=r(918),f=r(919),p=r(657),h=6e4;(e.exports=class{constructor(e,t,r,n,i){this.publisher=new u(e,t),this.republisher=new l(this.publisher,t,r,n,i),this.resolver=new f(e),this.cache=new o({max:1e3}),this.routing=e}publish(e,t,r,o){i([t=>n(e.bytes,t),n=>this.publisher.publishWithEOL(e,t,r,n)],(e,n)=>{if(e)return c.error(e),o(e);c(`IPNS value ${t} was published correctly`);const i=n[0].toB58String(),s=parseFloat(r),a=s{if(t)return c.error(t),r(t);c(`IPNS record from ${e} was resolved correctly`),r(null,{path:n})})}initializeKeyspace(e,t,r){this.publisher.publish(e,t,r)}}).path=p},function(e,t,r){"use strict";const n=r(281),i=r(5),o=i("ipfs:ipns:path");o.error=i("ipfs:ipns:path:error");e.exports={resolvePath:(e,t,r)=>{if(n.ipnsPath(t))return o(`resolve ipns path ${t}`),e._ipns.resolve(t,r);e.dag.get(t.substring("/ipfs/".length),(e,t)=>e?r(e):r(null,t))}}},function(e,t,r){"use strict";(function(t){const n=r(252),{fromB58String:i,toB58String:o}=r(13),s=r(921),a=r(19),c=r(20),u=r(5),l=u("ipfs:ipns:pubsub");l.error=u("ipfs:ipns:pubsub:error");e.exports=a(class{constructor(e,t,r){this._pubsub=e,this._subscriptions={},this._handleSubscriptionKey=this._handleSubscriptionKey.bind(this),this._pubsubDs=new s(e,t,r,n.validator,this._handleSubscriptionKey)}put(e,t,r){this._pubsubDs.put(e,t,r)}get(e,t){this._pubsubDs.get(e,(r,i)=>{if(e.slice(0,n.namespaceLength).toString()===n.namespace){const t=e.toString(),r=o(e.slice(n.namespaceLength));this._subscriptions[t]=r,l(`subscribed pubsub ${t}: ${r}`)}if(r)return t(r);t(null,i)})}_handleSubscriptionKey(e,t){const r=this._subscriptions[e];if(!r){const r=`key ${e} does not correspond to a subscription`;return l.error(r),t(c(new Error(r),"ERR_INVALID_KEY"))}let o;try{o=n.getIdKeys(i(r))}catch(e){return l.error(e),t(e)}t(null,o.routingKey.toBuffer())}getSubscriptions(e){return e(null,Object.values(this._subscriptions).filter(Boolean).map(e=>`${n.namespace}${e}`))}cancel(e,r){if("string"!=typeof e){const e="received subscription name is not valid";return l.error(e),r(c(new Error(e),"ERR_INVALID_SUBSCRIPTION_NAME"))}e.startsWith(n.namespace)&&(e=e.substring(n.namespaceLength));const i=Object.keys(this._subscriptions).find(t=>this._subscriptions[t]===e);if(!i)return r(null,{canceled:!1});try{const e=t.from(i);this._pubsubDs.unsubscribe(e)}catch(e){return r(e)}this._subscriptions[i]=void 0,l(`unsubscribed pubsub ${i}: ${e}`),r(null,{canceled:!0})}},{className:"IpnsPubsubDatastore",symbolName:"@js-ipfs/ipns/IpnsPubsubDatastore"})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const{Key:n}=r(28),{Record:i}=r(165),{encodeBase32:o}=r(661),s=r(20),a=r(5),c=a("ipfs:ipns:offline-datastore");c.error=a("ipfs:ipns:offline-datastore:error");e.exports=class{constructor(e){this._repo=e}put(e,r,n){if(!t.isBuffer(e)){const e="Offline datastore key must be a buffer";return c.error(e),n(s(new Error(e),"ERR_INVALID_KEY"))}if(!t.isBuffer(r)){const e="Offline datastore value must be a buffer";return c.error(e),n(s(new Error(e),"ERR_INVALID_VALUE"))}let o;try{o=this._routingKey(e)}catch(e){const t="Not possible to generate the routing key";return c.error(t),n(s(new Error(t),"ERR_GENERATING_ROUTING_KEY"))}const a=new i(e,r);this._repo.datastore.put(o,a.serialize(),n)}get(e,r){if(!t.isBuffer(e)){const e="Offline datastore key must be a buffer";return c.error(e),r(s(new Error(e),"ERR_INVALID_KEY"))}let n;try{n=this._routingKey(e)}catch(e){const t="Not possible to generate the routing key";return c.error(t),r(s(new Error(t),"ERR_GENERATING_ROUTING_KEY"))}this._repo.datastore.get(n,(e,t)=>{if(e)return r(e);let n;try{n=i.deserialize(t)}catch(e){return c.error(e),r(e)}r(null,n.value)})}_routingKey(e){return new n("/"+o(e),!1)}}}).call(this,r(0).Buffer)},function(e,t,r){var n=r(927);e.exports=function(e,t,r){for(var i=-1,o=[],s=r?t.length:0;(i=n(e,t))>-1;)o.push(e.slice(0,i+s)),e=e.slice(i+t.length,e.length);return o.push(e),o}},function(e,t,r){"use strict";const n=r(39),i=r(252);e.exports={encodeBase32:e=>{return n.encode("base32",e).slice(1).toString().toUpperCase()},validator:{func:(e,t,r)=>i.validator.validate(t,e,r)},selector:(e,t)=>i.validator.select(t[0],t[1])}},function(e,t,r){"use strict";const n=r(282),i=r(115),o=r(661);function s({datastore:e,peerInfo:t,peerBook:s,options:a,config:c}){const u={datastore:e,peerInfo:t,peerBook:s,config:{peerDiscovery:{mdns:{enabled:n(a,"config.Discovery.MDNS.Enabled",n(c,"Discovery.MDNS.Enabled",!0))},webRTCStar:{enabled:n(a,"config.Discovery.webRTCStar.Enabled",n(c,"Discovery.webRTCStar.Enabled",!0))},bootstrap:{list:n(a,"config.Bootstrap",n(c,"Bootstrap",[]))}},relay:{enabled:n(a,"relay.enabled",n(c,"relay.enabled",!0)),hop:{enabled:n(a,"relay.hop.enabled",n(c,"relay.hop.enabled",!1)),active:n(a,"relay.hop.active",n(c,"relay.hop.active",!1))}},dht:{kBucketSize:n(a,"dht.kBucketSize",20),enabled:!1,randomWalk:{enabled:!1},validators:{ipns:o.validator},selectors:{ipns:o.selector}},EXPERIMENTAL:{pubsub:n(a,"EXPERIMENTAL.pubsub",!1)}},connectionManager:n(a,"connectionManager",{maxPeers:n(c,"Swarm.ConnMgr.HighWater"),minPeers:n(c,"Swarm.ConnMgr.LowWater")})},l=i(u,n(a,"libp2p",{}));return new(r(933))(l)}e.exports=function(e,t){const r=e._options||{};t=t||{};const n="function"==typeof r.libp2p?r.libp2p:s,{datastore:i}=e._repo,o=e._peerInfo,a=e._peerInfoBook,c=n({options:r,config:t,datastore:i,peerInfo:o,peerBook:a});return c.on("stop",()=>{o.multiaddrs.clear()}),c.on("start",()=>{o.multiaddrs.forEach(t=>{e._print("Swarm listening on",t.toString())})}),c.on("peer:connect",e=>a.put(e)),c}},function(e,t,r){"use strict";const n=r(934),i=r(93),o=r(19),s=r(79).Connection,a=r(664),c=r(5)("libp2p:websockets:dialer"),u=r(943);e.exports=o(class{dial(e,t,r){"function"==typeof t&&(r=t,t={}),r=r||function(){};const i=a(e);c("dialing %s",i);const o=n(i,{binary:!0,onConnect:e=>{r(e)}}),u=new s(o);return u.getObservedAddrs=(t=>t(null,[e])),u.close=(e=>o.close(e)),u}createListener(e,t){return"function"==typeof e&&(t=e,e={}),u(e,t)}filter(e){return Array.isArray(e)||(e=[e]),e.filter(e=>!e.protoNames().includes("p2p-circuit")&&(e.protoNames().includes("ipfs")&&(e=e.decapsulate("ipfs")),i.WebSockets.matches(e)||i.WebSocketsSecure.matches(e)))}},{className:"WebSockets",symbolName:"@libp2p/js-libp2p-websockets/websockets"})},function(e,t,r){const n=r(34),i=(e,t)=>t,o={ip4:i,ip6:(e,t,r,n)=>1===n.length&&"ip6"===n[0].protocol?t:`[${t}]`,tcp:(e,t,r,n)=>n.some(e=>["http","https","ws","wss"].includes(e.protocol))?`${e}:${t}`:`tcp://${e}:${t}`,udp:(e,t)=>`udp://${e}:${t}`,dnsaddr:i,dns4:i,dns6:i,ipfs:(e,t)=>`${e}/ipfs/${t}`,p2p:(e,t)=>`${e}/p2p/${t}`,http:e=>`http://${e}`,https:e=>`https://${e}`,ws:e=>`ws://${e}`,wss:e=>`wss://${e}`,"p2p-websocket-star":e=>`${e}/p2p-websocket-star`,"p2p-webrtc-star":e=>`${e}/p2p-webrtc-star`,"p2p-webrtc-direct":e=>`${e}/p2p-webrtc-direct`};e.exports=(e=>n(e).stringTuples().map(e=>({protocol:n.protocols.codes[e[0]].name,content:e[1]})).reduce((e,t,r,n)=>{const i=o[t.protocol];if(!i)throw new Error(`Unsupported protocol ${t.protocol}`);return i(e,t.content,r,n)},""))},function(e,t,r){var n=r(945),i=r(571),o=r(669),s=r(291)("socket.io-client");e.exports=t=c;var a=t.managers={};function c(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i=n(e),c=i.source,u=i.id,l=i.path,f=a[u]&&l in a[u].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||f?(s("ignoring socket cache for %s",c),r=o(c,t)):(a[u]||(s("new io instance for %s",c),a[u]=o(c,t)),r=a[u]),i.query&&!t.query&&(t.query=i.query),r.socket(i.path,t)}t.protocol=i.protocol,t.connect=c,t.Manager=r(669),t.Socket=r(675)},function(e,t){var r=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,n=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function(e){var t=e,i=e.indexOf("["),o=e.indexOf("]");-1!=i&&-1!=o&&(e=e.substring(0,i)+e.substring(i,o).replace(/:/g,";")+e.substring(o,e.length));for(var s=r.exec(e||""),a={},c=14;c--;)a[n[c]]=s[c]||"";return-1!=i&&-1!=o&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){(function(t){e.exports=function(e){return r&&t.isBuffer(e)||n&&(e instanceof ArrayBuffer||i(e))};var r="function"==typeof t&&"function"==typeof t.isBuffer,n="function"==typeof ArrayBuffer,i=function(e){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer}}).call(this,r(0).Buffer)},function(e,t,r){var n=r(952),i=r(675),o=r(166),s=r(571),a=r(676),c=r(677),u=r(291)("socket.io-client:manager"),l=r(674),f=r(969),p=Object.prototype.hasOwnProperty;function h(e,t){if(!(this instanceof h))return new h(e,t);e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new f({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var r=t.parser||s;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this.autoConnect=!1!==t.autoConnect,this.autoConnect&&this.open()}e.exports=h,h.prototype.emitAll=function(){for(var e in this.emit.apply(this,arguments),this.nsps)p.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},h.prototype.updateSocketIds=function(){for(var e in this.nsps)p.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))},h.prototype.generateId=function(e){return("/"===e?"":e+"#")+this.engine.id},o(h.prototype),h.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},h.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},h.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},h.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},h.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},h.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},h.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},h.prototype.open=h.prototype.connect=function(e,t){if(u("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;u("opening %s",this.uri),this.engine=n(this.uri,this.opts);var r=this.engine,i=this;this.readyState="opening",this.skipReconnect=!1;var o=a(r,"open",function(){i.onopen(),e&&e()}),s=a(r,"error",function(t){if(u("connect_error"),i.cleanup(),i.readyState="closed",i.emitAll("connect_error",t),e){var r=new Error("Connection error");r.data=t,e(r)}else i.maybeReconnectOnOpen()});if(!1!==this._timeout){var c=this._timeout;u("connect attempt will timeout after %d",c);var l=setTimeout(function(){u("connect attempt timed out after %d",c),o.destroy(),r.close(),r.emit("error","timeout"),i.emitAll("connect_timeout",c)},c);this.subs.push({destroy:function(){clearTimeout(l)}})}return this.subs.push(o),this.subs.push(s),this},h.prototype.onopen=function(){u("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(a(e,"data",c(this,"ondata"))),this.subs.push(a(e,"ping",c(this,"onping"))),this.subs.push(a(e,"pong",c(this,"onpong"))),this.subs.push(a(e,"error",c(this,"onerror"))),this.subs.push(a(e,"close",c(this,"onclose"))),this.subs.push(a(this.decoder,"decoded",c(this,"ondecoded")))},h.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},h.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},h.prototype.ondata=function(e){this.decoder.add(e)},h.prototype.ondecoded=function(e){this.emit("packet",e)},h.prototype.onerror=function(e){u("error",e),this.emitAll("error",e)},h.prototype.socket=function(e,t){var r=this.nsps[e];if(!r){r=new i(this,e,t),this.nsps[e]=r;var n=this;r.on("connecting",o),r.on("connect",function(){r.id=n.generateId(e)}),this.autoConnect&&o()}function o(){~l(n.connecting,r)||n.connecting.push(r)}return r},h.prototype.destroy=function(e){var t=l(this.connecting,e);~t&&this.connecting.splice(t,1),this.connecting.length||this.close()},h.prototype.packet=function(e){u("writing packet %j",e);var t=this;e.query&&0===e.type&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,function(r){for(var n=0;n0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},h.prototype.cleanup=function(){u("cleanup");for(var e=this.subs.length,t=0;t=this._reconnectionAttempts)u("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();u("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var r=setTimeout(function(){e.skipReconnect||(u("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open(function(t){t?(u("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(u("reconnect success"),e.onreconnect())}))},t);this.subs.push({destroy:function(){clearTimeout(r)}})}},h.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},function(e,t,r){var n=r(572),i=r(955),o=r(965),s=r(966);t.polling=function(e){var t=!1,r=!1,s=!1!==e.jsonp;if("undefined"!=typeof location){var a="https:"===location.protocol,c=location.port;c||(c=a?443:80),t=e.hostname!==location.hostname||c!==e.port,r=e.secure!==a}if(e.xdomain=t,e.xscheme=r,"open"in new n(e)&&!e.forceJSONP)return new i(e);if(!s)throw new Error("JSONP disabled");return new o(e)},t.websocket=s},function(e,t,r){var n=r(573),i=r(292),o=r(167),s=r(293),a=r(673),c=r(294)("engine.io-client:polling");e.exports=l;var u=null!=new(r(572))({xdomain:!1}).responseType;function l(e){var t=e&&e.forceBase64;u&&!t||(this.supportsBinary=!1),n.call(this,e)}s(l,n),l.prototype.name="polling",l.prototype.doOpen=function(){this.poll()},l.prototype.pause=function(e){var t=this;function r(){c("paused"),t.readyState="paused",e()}if(this.readyState="pausing",this.polling||!this.writable){var n=0;this.polling&&(c("we are currently polling - waiting to pause"),n++,this.once("pollComplete",function(){c("pre-pause polling complete"),--n||r()})),this.writable||(c("we are currently writing - waiting to pause"),n++,this.once("drain",function(){c("pre-pause writing complete"),--n||r()}))}else r()},l.prototype.poll=function(){c("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},l.prototype.onData=function(e){var t=this;c("polling got data %s",e);o.decodePayload(e,this.socket.binaryType,function(e,r,n){if("opening"===t.readyState&&t.onOpen(),"close"===e.type)return t.onClose(),!1;t.onPacket(e)}),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():c('ignoring poll - transport state "%s"',this.readyState))},l.prototype.doClose=function(){var e=this;function t(){c("writing close packet"),e.write([{type:"close"}])}"open"===this.readyState?(c("transport open - closing"),t()):(c("transport not open - deferring close"),this.once("open",t))},l.prototype.write=function(e){var t=this;this.writable=!1;var r=function(){t.writable=!0,t.emit("drain")};o.encodePayload(e,this.supportsBinary,function(e){t.doWrite(e,r)})},l.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",r="";return!1!==this.timestampRequests&&(e[this.timestampParam]=a()),this.supportsBinary||e.sid||(e.b64=1),e=i.encode(e),this.port&&("https"===t&&443!==Number(this.port)||"http"===t&&80!==Number(this.port))&&(r=":"+this.port),e.length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+r+this.path+e}},function(e,t,r){(function(t){var n=r(957),i=Object.prototype.toString,o="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===i.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===i.call(File);e.exports=function e(r){if(!r||"object"!=typeof r)return!1;if(n(r)){for(var i=0,a=r.length;i0);return t}function l(){var e=u(+new Date);return e!==n?(a=0,n=e):e+"."+u(a++)}for(;co)throw new RangeError("requested too many random bytes");var r=s.allocUnsafe(e);if(e>0)if(e>i)for(var c=0;c0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?w(e,s,t,!1):x(e,s)):w(e,s,t,!1))):n||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=E?e=E:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(_,e):_(e))}function _(e){h("emit readable"),e.emit("readable"),R(e)}function x(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(C,e,t))}function C(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;eo.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0===(e-=s)){s===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,s),0===(e-=s)){s===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function N(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(P,t,e))}function P(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function M(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?N(this):S(this),null;if(0===(e=k(e,t))&&t.ended)return 0===t.length&&N(this),null;var n,i=t.needReadable;return h("need readable",i),(0===t.length||t.length-e0?T(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&N(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,h("pipe count=%d opts=%j",o.pipesCount,t);var c=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?l:v;function u(t,n){h("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,h("cleanup"),e.removeListener("close",y),e.removeListener("finish",b),e.removeListener("drain",f),e.removeListener("error",g),e.removeListener("unpipe",u),r.removeListener("end",l),r.removeListener("end",v),r.removeListener("data",m),p=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function l(){h("onend"),e.end()}o.endEmitted?i.nextTick(c):r.once("end",c),e.on("unpipe",u);var f=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,R(e))}}(r);e.on("drain",f);var p=!1;var d=!1;function m(t){h("ondata"),d=!1,!1!==e.write(t)||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==M(o.pipes,e))&&!p&&(h("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function g(t){h("onerror",t),v(),e.removeListener("error",g),0===a(e,"error")&&e.emit("error",t)}function y(){e.removeListener("finish",b),v()}function b(){h("onfinish"),e.removeListener("close",y),v()}function v(){h("unpipe"),r.unpipe(e)}return r.on("data",m),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",g),e.once("close",y),e.once("finish",b),e.emit("pipe",r),o.flowing||(h("pipe resume"),r.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o-1?n:o.nextTick;b.WritableState=y;var u=r(64);u.inherits=r(7);var l={deprecate:r(287)},f=r(680),p=r(6).Buffer,h=i.Uint8Array||function(){};var d,m=r(681);function g(){}function y(e,t){a=a||r(168),e=e||{};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,u=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(u||0===u)?u:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===e.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(o.nextTick(i,n),o.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),S(e,t))}(e,r,n,t,i);else{var s=E(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||w(e,r),n?c(A,e,r,s,i):A(e,r,s,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function b(e){if(a=a||r(168),!(d.call(b,this)||this instanceof a))return new b(e);this._writableState=new y(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function v(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function A(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),S(e,t)}function w(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,c=!0;r;)i[a]=r,r.isBuf||(c=!1),r=r.next,a+=1;i.allBuffers=c,v(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,l=r.encoding,f=r.callback;if(v(e,t,!1,t.objectMode?1:u.length,u,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),S(e,t)})}function S(e,t){var r=E(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(k,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(b,f),y.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(y.prototype,"buffer",{get:l.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===b&&(e&&e._writableState instanceof y)}})):d=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,r){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=e,p.isBuffer(n)||n instanceof h);return a&&!p.isBuffer(e)&&(e=function(e){return p.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=g),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),o.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),o.nextTick(n,s),i=!1),i}(this,i,e,r))&&(i.pendingcb++,s=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=p.from(t,r));return t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var c=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,S(e,t),r&&(t.finished?o.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=m.destroy,b.prototype._undestroy=m.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(4),r(31).setImmediate,r(12))},function(e,t,r){"use strict";e.exports=s;var n=r(168),i=r(64);function o(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length"string"==typeof e,object:e=>"object"==typeof e,multiaddr:e=>{if(c.string(e))try{return i(e),!0}catch(e){return!1}},function:e=>"function"==typeof e};function u(e,t){if(!Array.isArray(t))throw new Error("Data is not an array");e.forEach((e,r)=>{if(!c[e])throw console.error("Type %s does not exist",e),new Error("Type "+e+" does not exist");if(!c[e](t[r]))throw new Error("Data at index "+r+" is invalid for type "+e)})}(t=e.exports).cleanUrlSIO=function(e){const t=e.protos(),r=t[0].name,n=t[1].name,i=t[2].name,o=e.stringTuples(),s=o[1][1];if("tcp"!==n||"ws"!==i&&"wss"!==i)throw new Error("invalid multiaddr: "+e.toString());let a=o[0][1];"ip6"===r&&(a="["+a+"]");let c="ws"===i&&80===s||"wss"===i&&443===s?"":s;return("wss"===i?"https":"http")+"://"+a+(c?":"+c:"")},t.validate=u,t.Protocol=function(e){e||(e=(()=>{}));const t=this;t.requests={},t.addRequest=((e,r,n)=>{t.requests[e]={def:r,handle:n}}),t.handleSocket=(r=>{r.r={},Object.keys(t.requests).forEach(n=>{const i=t.requests[n];r.on(n,function(){const t=[...arguments];try{u(i.def,t),t.unshift(r),i.handle.apply(null,t)}catch(i){e(i),e("peer %s has sent invalid data for request %s",r.id||"",n,t)}})})})},t.getIdAndValidate=function(e,t,r){o.createFromPubKey(n.from(e,"hex"),(i,o)=>i?r(new Error("Crypto error")):o.toB58String()!==t?r(new Error("Id is not matching")):r(null,s.keys.unmarshalPublicKey(n.from(e,"hex"))))},t.validateMa=(e=>a.WebSocketStar.matches(i(e)))}).call(this,r(0).Buffer)},function(e,t,r){var n=r(984),i=r(565),o=i;o.v1=n,o.v4=i,e.exports=o},function(e,t,r){"use strict";(function(t,n){var i;e.exports=S,S.ReadableState=k;r(14).EventEmitter;var o=function(e,t){return e.listeners(t).length},s=r(687),a=r(0).Buffer,c=t.Uint8Array||function(){};var u,l=r(990);u=l&&l.debuglog?l.debuglog("stream"):function(){};var f,p,h=r(991),d=r(688),m=r(689).getHighWaterMark,g=r(253).codes,y=g.ERR_INVALID_ARG_TYPE,b=g.ERR_STREAM_PUSH_AFTER_EOF,v=g.ERR_METHOD_NOT_IMPLEMENTED,A=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,w=r(993).emitExperimentalWarning;r(7)(S,s);var E=["error","close","destroy","pause","resume"];function k(e,t,n){i=i||r(169),e=e||{},"boolean"!=typeof n&&(n=t instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",n),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=r(60).StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function S(e){if(i=i||r(169),!(this instanceof S))return new S(e);var t=this instanceof i;this._readableState=new k(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function _(e,t,r,n,i){u("readableAddChunk",t);var o,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?B(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,R(e)))}(e,s);else if(i||(o=function(e,t){var r;n=t,a.isBuffer(n)||n instanceof c||"string"==typeof t||void 0===t||e.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(s,t)),o)e.emit("error",o);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n)s.endEmitted?e.emit("error",new A):x(e,s,t,!0);else if(s.ended)e.emit("error",new b);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?x(e,s,t,!1):T(e,s)):x(e,s,t,!1)}else n||(s.reading=!1,T(e,s));return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=C?e=C:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function B(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(R,e))}function R(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||e.emit("readable"),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,O(e)}function T(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(N,e,t))}function N(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function M(e){u("readable nexttick read 0"),e.read(0)}function D(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),O(e),t.flowing&&!t.reading&&e.read(0)}function O(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function L(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function U(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(j,t,e))}function j(e,t){u("endReadableNT",e.endEmitted,e.length),e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function F(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?U(this):B(this),null;if(0===(e=I(e,t))&&t.ended)return 0===t.length&&U(this),null;var n,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e0?L(e,t):null)?(t.needReadable=!0,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&U(this)),null!==n&&this.emit("data",n),n},S.prototype._read=function(e){this.emit("error",new v("_read()"))},S.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,u("pipe count=%d opts=%j",i.pipesCount,t);var s=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?c:g;function a(t,n){u("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,u("cleanup"),e.removeListener("close",d),e.removeListener("finish",m),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",a),r.removeListener("end",c),r.removeListener("end",g),r.removeListener("data",p),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function c(){u("onend"),e.end()}i.endEmitted?n.nextTick(s):r.once("end",s),e.on("unpipe",a);var l=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,O(e))}}(r);e.on("drain",l);var f=!1;function p(t){u("ondata");var n=e.write(t);u("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==F(i.pipes,e))&&!f&&(u("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function h(t){u("onerror",t),g(),e.removeListener("error",h),0===o(e,"error")&&e.emit("error",t)}function d(){e.removeListener("finish",m),g()}function m(){u("onfinish"),e.removeListener("close",d),g()}function g(){u("unpipe"),r.unpipe(e)}return r.on("data",p),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",d),e.once("finish",m),e.emit("pipe",r),i.flowing||(u("pipe resume"),r.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,u("on readable",i.length,i.reading),i.length?B(this):i.reading||n.nextTick(M,this))),r},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(P,this),r},S.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(P,this),t},S.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(D,e,t))}(this,e)),e.paused=!1,this},S.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(e,t,r){r(new m("_write()"))},S.prototype._writev=null,S.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,R(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),S.prototype.destroy=f.destroy,S.prototype._undestroy=f.undestroy,S.prototype._destroy=function(e,t){t(e)}}).call(this,r(12),r(4))},function(e,t,r){"use strict";e.exports=l;var n=r(253).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,c=r(169);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length{e._log("queue:work"),this.execQuery(r,e,t,(t,r)=>n&&this.running?(e._log("queue:work:done",t,r),t?i(t):r&&r.queryComplete?(e._log("query:complete"),this.stop()):r&&r.pathComplete?s.stop():void i()):i())},e.concurrency),s={stop:e=>{n&&(i.kill(),n=!1,r(e))}};this.workers.push(s);const a=()=>{for(e._log("queue:fill");i.length()0;)i.push(t.peersToQuery.dequeue())};a(),i.error=(t=>{e._log.error("queue",t),s.stop(t)}),i.drain=(()=>{e._log("queue:drain"),s.stop()}),i.unsaturated=(()=>{e._log("queue:unsaturated"),a()}),i.buffer=0}execQuery(e,t,r,n){r.query(e,(e,o)=>{if(!this.running)return n();e?(r.run.errors.push(e),n()):o.pathComplete||o.queryComplete?(r.res=o,n(null,{pathComplete:o.pathComplete,queryComplete:o.queryComplete})):o.closerPeers&&o.closerPeers.length>0?i(o.closerPeers,(e,n)=>{if(t.dht._isSelf(e.id))return n();e=t.dht.peerBook.put(e),t.dht._peerDiscovered(e),f(e.id,t.dht,r,n)},n):n()})}}function f(e,t,r,n){const i=r.run;return t._isSelf(e)?n():i.peersSeen.has(e)?n():(i.peersSeen.add(e),void r.peersToQuery.enqueue(e,n))}e.exports=class{constructor(e,t,r){this.dht=e,this.key=t,this.makePath=r,this.concurrency=a.ALPHA,this._log=u.logger(this.dht.peerInfo.id,"query:"+s.toB58String(t))}run(e,t){if(!this.dht._queryManager.running)return this._log.error("Attempt to run query after shutdown"),t(null,{finalSet:new Set,paths:[]});if(0===e.length)return this._log.error("Running query with no peers"),t(null,{finalSet:new Set,paths:[]});const r={peersSeen:new Set,errors:[],paths:null},o=Math.min(a.DISJOINT_PATHS,e.length),s=[];for(let e=0;e{s[t%o].push(e)}),r.paths=s.map((e,t)=>({peers:e,run:r,query:this.makePath(t,o),peersToQuery:null})),this.dht._queryManager.queryStarted(this),this.workerManager=new l,i(r.paths,(e,t)=>{n([e=>c.fromKey(this.key,e),(t,r)=>{e.peersToQuery=t,i(e.peers,(t,r)=>f(t,this.dht,e,r),r)},t=>{this.workerManager.workerQueue(this,e,t)}],t)},(e,n)=>(this._log("query:done"),this.workerManager.stop(),e?t(e):r.errors.length===r.peersSeen.size?t(r.errors[0]):(r.res={finalSet:r.peersSeen,paths:[]},r.paths.forEach(e=>{e.res&&(e.res.pathComplete||e.res.queryComplete)&&(e.res.success=!0,r.res.paths.push(e.res))}),void t(null,r.res))))}stop(){this.workerManager&&this.workerManager.stop(),this.dht._queryManager.queryCompleted(this)}}},function(e,t){e.exports=function(e){if(!e)throw Error("hashlru must have a max value, of type number, greater than 0");var t=0,r=Object.create(null),n=Object.create(null);function i(i,o){r[i]=o,++t>=e&&(t=0,n=r,r=Object.create(null))}return{has:function(e){return void 0!==r[e]||void 0!==n[e]},remove:function(e){void 0!==r[e]&&(r[e]=void 0),void 0!==n[e]&&(n[e]=void 0)},get:function(e){var t=r[e];return void 0!==t?t:void 0!==(t=n[e])?(i(e,t),t):void 0},set:function(e,t){void 0!==r[e]?r[e]=t:i(e,t)},clear:function(){r=Object.create(null),n=Object.create(null)}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(r(577)),i=o(r(600));function o(e){return e&&e.__esModule?e:{default:e}}t.default=(0,n.default)(i.default),e.exports=t.default},function(e,t,r){"use strict";(function(t){const n=r(150),i=r(65),o=r(299).writeEncoded;e.exports=function(e,r,s){const a=n({timeout:6e4},r),c=a.handshake;return s("writing multicodec: "+e),o(c,t.from(e+"\n"),r),i.decodeFromReader(c,(t,n)=>{if(t)return r(t);const i=n.toString().slice(0,-1);if(i!==e)return r(new Error(`"${e}" not supported`),c.rest());s("received ack: "+i),r(null,c.rest())}),a}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";e.exports=function(e,t,r){r(null,e===t)}},function(e,t,r){"use strict";e.exports.PROTOCOL_ID="/multistream/1.0.0"},function(e,t,r){"use strict";const n=r(255),i=r(578),o=r(298),s=r(19),a=r(701),c=r(44),u=r(63),l=r(583),f=r(20),{msHandle:p,msSelect:h,identifyDialer:d}=r(702),m=r(585),{CONNECTION_FAILED:g,DIAL_SELF:y,INVALID_STATE_TRANSITION:b,NO_TRANSPORTS_REGISTERED:v,maybeUnexpectedEnd:A}=r(300);e.exports=s(class extends a{constructor({_switch:e,peerInfo:t,muxer:r,conn:i,type:o="out"}){super({_switch:e,name:`${o}:${e._peerInfo.id.toB58String().slice(0,8)}`}),this.theirPeerInfo=t,this.theirB58Id=this.theirPeerInfo.id.toB58String(),this.conn=i,this.muxer=r;let s="DISCONNECTED";this.muxer&&(s="MUXED"),this._state=n(s,{DISCONNECTED:{dial:"DIALING",disconnect:"DISCONNECTED",done:"DISCONNECTED"},DIALING:{abort:"ABORTED",done:"DIALED",error:"ERRORED",disconnect:"DISCONNECTING"},DIALED:{encrypt:"ENCRYPTING",privatize:"PRIVATIZING"},PRIVATIZING:{done:"PRIVATIZED",abort:"ABORTED",disconnect:"DISCONNECTING"},PRIVATIZED:{encrypt:"ENCRYPTING"},ENCRYPTING:{done:"ENCRYPTED",error:"ERRORED",disconnect:"DISCONNECTING"},ENCRYPTED:{upgrade:"UPGRADING",disconnect:"DISCONNECTING"},UPGRADING:{stop:"CONNECTED",done:"MUXED",error:"ERRORED",disconnect:"DISCONNECTING"},MUXED:{disconnect:"DISCONNECTING"},CONNECTED:{disconnect:"DISCONNECTING"},DISCONNECTING:{done:"DISCONNECTED",disconnect:"DISCONNECTING"},ABORTED:{},ERRORED:{disconnect:"DISCONNECTING"}}),this._state.on("DISCONNECTED",()=>this._onDisconnected()),this._state.on("DIALING",()=>this._onDialing()),this._state.on("DIALED",()=>this._onDialed()),this._state.on("PRIVATIZING",()=>this._onPrivatizing()),this._state.on("PRIVATIZED",()=>this._onPrivatized()),this._state.on("ENCRYPTING",()=>this._onEncrypting()),this._state.on("ENCRYPTED",()=>{this.log("successfully encrypted connection to %s",this.theirB58Id),this.emit("encrypted",this.conn)}),this._state.on("UPGRADING",()=>this._onUpgrading()),this._state.on("MUXED",()=>{this.log("successfully muxed connection to %s",this.theirB58Id),delete this.switch.conns[this.theirB58Id],this.emit("muxed",this.muxer)}),this._state.on("CONNECTED",()=>{this.log("unmuxed connection opened to %s",this.theirB58Id),this.emit("unmuxed",this.conn)}),this._state.on("DISCONNECTING",()=>this._onDisconnecting()),this._state.on("ABORTED",()=>this._onAborted()),this._state.on("ERRORED",()=>this._onErrored()),this._state.on("error",e=>this._onStateError(e))}dial(){return this.theirB58Id===this.ourPeerInfo.id.toB58String()?this.emit("error",y()):"DIALING"===this.getState()?this.log("attempted to dial while already dialing, ignoring"):void this._state("dial")}shake(e,t){return e?this.muxer&&this.muxer.newStream?this.muxer.newStream((r,n)=>{if(r)return t(r,null);this.log("created new stream to %s",this.theirB58Id),this._protocolHandshake(e,n,t)}):void this._protocolHandshake(e,this.conn,t):t(null,null)}upgrade(){this._state("upgrade")}_onDialing(){if(this.log("dialing %s",this.theirB58Id),!this.switch.hasTransports())return this.close(v());const e=this.switch.availableTransports(this.theirPeerInfo),t=Boolean(this.switch.transports[i.tag]);t&&!e.includes(i.tag)&&e.push(i.tag);const r=n=>{let o=n;if(!o)return t?this.close(g(`No available transports to dial peer ${this.theirB58Id}!`)):this.close(g(`Circuit not enabled and all transports failed to dial peer ${this.theirB58Id}!`));o===i.tag&&this.theirPeerInfo.multiaddrs.add(`/p2p-circuit/p2p/${this.theirB58Id}`),this.log("dialing transport %s",o),this.switch.transport.dial(o,this.theirPeerInfo,(t,n)=>{if(t)return this.emit("error:connection_attempt_failed",t),this.log(t),r(e.shift());this.conn=m(o,null,n,this.switch.observer),this._state("done")})};r(e.shift())}_onDialed(){this.log("successfully dialed %s",this.theirB58Id),this.emit("connected",this.conn)}_onDisconnecting(){this.log("disconnecting from %s",this.theirB58Id,Boolean(this.muxer)),delete this.switch.conns[this.theirB58Id];let e=[];if(this.muxer&&e.push(e=>{this.muxer.end(()=>{delete this.muxer,e()})}),this.conn){try{this.conn.source.abort()}catch(e){}delete this.conn}c(e,()=>{this._state("done")})}_onEncrypting(){const e=new o.Dialer;e.handle(this.conn,t=>{if(t)return this.close(A(t));this.log("selecting crypto %s to %s",this.switch.crypto.tag,this.theirB58Id),e.select(this.switch.crypto.tag,(e,t)=>{if(e)return this.close(A(e));const r=m(null,this.switch.crypto.tag,t,this.switch.observer),n=this.switch.crypto.encrypt(this.ourPeerInfo.id,r,this.theirPeerInfo.id,e=>{if(e)return this.close(e);this.conn=n,this.conn.setPeerInfo(this.theirPeerInfo),this._state("done")})})})}_onUpgrading(){const e=Object.keys(this.switch.muxers);if(this.log("upgrading connection to %s",this.theirB58Id),0===e.length)return this._state("stop");const t=new o.Dialer;t.handle(this.conn,r=>{if(r)return this._didUpgrade(r);const n=r=>{this.log("selecting %s",r),t.select(r,(t,i)=>{if(t)return 0===e.length?this._didUpgrade(t):n(e.shift());const o=m(null,r,i,this.switch.observer);this.muxer=this.switch.muxers[r].dialer(o),this.muxer.once("close",()=>{this.close()}),this.muxer.on("stream",e=>{this.log("new stream created via muxer to %s",this.theirB58Id),e.setPeerInfo(this.theirPeerInfo),this.switch.protocolMuxer(null)(e)}),this._didUpgrade(null),this.switch.identify&&this._identify((e,t)=>{if(e)return this.close(e);this.theirPeerInfo=this.switch._peerBook.put(t.peerInfo)})})};n(e.shift())})}_identify(e){if(!this.muxer)return u(e,f("The connection was already closed","ERR_CONNECTION_CLOSED"));this.muxer.newStream(async(t,r)=>{if(t)return e(t);const n=new o.Dialer;let i;try{await p(n,r);const o=await h(n,l.multicodec);i=await d(o,this.theirPeerInfo)}catch(t){return e(t)}e(null,i)})}_didUpgrade(e){if(e)return this.log("Error upgrading connection:",e),this.switch.conns[this.theirB58Id]=this,this.emit("error:upgrade_failed",e),this._state("stop");this._state("done")}_protocolHandshake(e,t,r){const n=new o.Dialer;n.handle(t,t=>{if(t)return r(t,null);n.select(e,(t,n)=>{if(t)return this.log("could not perform protocol handshake:",t),r(t,null);const i=m(null,e,n,this.switch.observer);this.log("successfully performed handshake of %s to %s",e,this.theirB58Id),this.emit("connection",i),r(null,i)})})}_onStateError(e){this.emit("error",b(e)),this.log(e)}},{className:"ConnectionFSM",symbolName:"libp2p-switch/ConnectionFSM"})},function(e,t,r){"use strict";const n=r(14).EventEmitter,i=r(5),o=r(19);e.exports=o(class extends n{constructor({_switch:e,name:t}){super(),this.switch=e,this.ourPeerInfo=this.switch._peerInfo,this.log=i(`libp2p:conn:${t}`),this.log.error=i(`libp2p:conn:${t}:error`)}close(e){"DISCONNECTING"!==this._state._state&&(this.log("closing connection to %s",this.theirB58Id),e&&this._events.error&&this.emit("error",e),this._state("disconnect"))}emit(e,...t){"error"!==e||this._events.error?super.emit(e,...t):this.log.error(...t)}getState(){return this._state._state}encrypt(){this._state("encrypt")}protect(){this._state("privatize")}upgrade(){this._state("upgrade")}_onDisconnected(){this.switch.connection.remove(this),this.log("disconnected from %s",this.theirB58Id),this.emit("close"),this.removeAllListeners()}_onPrivatized(){this.emit("private",this.conn)}_onPrivatizing(){if(!this.switch.protector)return this._state("done");this.conn=this.switch.protector.protect(this.conn,e=>{if(e)return this.close(e);this.log("successfully privatized conn to %s",this.theirB58Id),this.conn.setPeerInfo(this.theirPeerInfo),this._state("done")})}},{className:"BaseConnection",symbolName:"libp2p-switch/BaseConnection"})},function(e,t,r){"use strict";const n=r(583);e.exports.msHandle=((e,t)=>new Promise((r,n)=>{e.handle(t,e=>{if(e)return n(e);r()})})),e.exports.msSelect=((e,t)=>new Promise((r,n)=>{e.select(t,(e,t)=>{if(e)return n(e);r(t)})})),e.exports.identifyDialer=((e,t)=>new Promise((r,i)=>{n.dialer(e,t,(e,t,n)=>{if(e)return i(e);r({peerInfo:t,observedAddrs:n})})}))},function(e,t,r){"use strict";const n=r(17);e.exports={tag:"/plaintext/1.0.0",encrypt:(e,t,r,i)=>("function"==typeof r&&(i=r,r=void 0),n(()=>i()),t)}},function(e,t,r){"use strict";const n=r(24),i=r(46),o=r(34);e.exports=function(e,t){let r;if(i.isPeerInfo(e))return t.put(e);if(o.isMultiaddr(e)){const o=e.getPeerId();try{r=t.get(o)}catch(e){r=new i(n.createFromB58String(o))}return r.multiaddrs.add(e),r}if(n.isPeerId(e)){const r=e.toB58String();try{return t.get(r)}catch(e){throw new Error(`Couldnt get PeerInfo for ${r}`)}}throw new Error("peer type not recognized")}},function(e,t,r){"use strict";var n=r(1063);function i(e,t,r){var i=this;this._started=n(),this._rescheduled=0,this._scheduled=t,this._args=r,this._timer=setTimeout(function t(){i._rescheduled>0?(i._scheduled=i._rescheduled-(n()-i._started),i._timer=setTimeout(t,i._scheduled),i._rescheduled=0):e.apply(null,i._args)},t)}i.prototype.reschedule=function(e){var t=n();return!(t+e-(this._started+this._scheduled)<0)&&(this._started=t,this._rescheduled=e,!0)},i.prototype.clear=function(){clearTimeout(this._timer)},e.exports=function(){if("function"!=typeof arguments[0])throw new Error("callback needed");if("number"!=typeof arguments[1])throw new Error("timeout needed");var e;if(arguments.length>0){e=new Array(arguments.length-2);for(var t=0;t=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(i())}).call(this,r(4))},function(e,t,r){"use strict";t.messages={NOT_STARTED_YET:"The libp2p node is not started yet",DHT_DISABLED:"DHT is not available"},t.codes={DHT_DISABLED:"ERR_DHT_DISABLED",PUBSUB_NOT_STARTED:"ERR_PUBSUB_NOT_STARTED"}},function(e,t,r){"use strict";const n=r(1123);e.exports=function e(t){if(!(this instanceof e))return new e(t);t=t||{};const r=t.validity||30;const i=new Map;const o=n(()=>{i.forEach((e,t)=>{const n=e.validity||r,o=function(e){const t=(new Date).getTime()-e.getTime();return Math.floor(t/1e3)}(e.timestamp);o>n&&i.delete(t)})},200);this.put=((e,t,r)=>{this.has(e)||i.set(e,{value:t,timestamp:new Date,validity:r}),o()});this.get=(e=>{if(i.has(e))return i.get(e).value;throw new Error("key does not exist")});this.has=(e=>i.has(e))}},function(e,t,r){"use strict";const n=r(14),i=r(15),o=r(97),s=r(55),a=r(709),c=r(5),u=r(20),l=r(1124),f=r(711),p=r(63);e.exports=class extends n{constructor(e,t,r){super(),this.log=c(e),this.log.err=c(`${e}:error`),this.multicodec=t,this.libp2p=r,this.started=!1,this.topics=new Map,this.seenCache=new a,this.peers=new Map,this._dials=new Set,this._onConnection=this._onConnection.bind(this),this._dialPeer=this._dialPeer.bind(this)}_addPeer(e){const t=e.info.id.toB58String();let r=this.peers.get(t);return r||(this.log("new peer",t),this.peers.set(t,e),r=e,e.once("close",()=>this._removePeer(e))),++r._references,r}_removePeer(e){const t=e.info.id.toB58String();return this.log("remove",t,e._references),0==--e._references&&(this.log("delete peer",t),this.peers.delete(t)),e}_dialPeer(e,t){t=t||function(){};const r=e.id.toB58String(),n=this.peers.get(r);return n&&n.isConnected?p(()=>t()):this._dials.has(r)?(this.log("already dialing %s, ignoring dial attempt",r),p(()=>t())):(this._dials.add(r),this.log("dialing %s",r),void this.libp2p.dialProtocol(e,this.multicodec,(n,i)=>{this.log("dial to %s complete",r);const o=!this._dials.has(r);return this._dials.delete(r),n?(this.log.err(n),t()):o?(this.log("pubsub was stopped, not processing dial to %s",r),t()):void this._onDial(e,i,t)}))}_onDial(e,t,r){const n=e.id.toB58String();this.log("connected",n),this._addPeer(new l(e)).attachConnection(t),p(()=>r())}_onConnection(e,t){t.getPeerInfo((e,r)=>{if(e)return this.log.err("Failed to identify incomming conn",e),i(o(),t);const n=r.id.toB58String(),s=this._addPeer(new l(r));this._processConnection(n,t,s)})}_processConnection(e,t,r){throw u("_processConnection must be implemented by the subclass","ERR_NOT_IMPLEMENTED")}_onConnectionEnd(e,t,r){r&&"socket hang up"!==r.message&&this.log.err(r),this.log("connection ended",e,r?r.message:""),this._removePeer(t)}publish(e,t){throw u("publish must be implemented by the subclass","ERR_NOT_IMPLEMENTED")}subscribe(e){throw u("subscribe must be implemented by the subclass","ERR_NOT_IMPLEMENTED")}unsubscribe(e){throw u("unsubscribe must be implemented by the subclass","ERR_NOT_IMPLEMENTED")}start(e){if(this.started)return p(()=>e(new Error("already started")));this.log("starting"),this.libp2p.handle(this.multicodec,this._onConnection),this.libp2p.on("peer:connect",this._dialPeer);const t=Object.values(this.libp2p.peerBook.getAll());s(t,(e,t)=>this._dialPeer(e,t),t=>{p(()=>{this.log("started"),this.started=!0,e(t)})})}stop(e){if(!this.started)return p(()=>e(new Error("not started yet")));this.libp2p.unhandle(this.multicodec),this.libp2p.removeListener("peer:connect",this._dialPeer),this._dials=new Set,this.log("stopping"),s(this.peers.values(),(e,t)=>e.close(t),t=>{if(t)return e(t);this.log("stopped"),this.peers=new Map,this.started=!1,e()})}},e.exports.message=f},function(e,t,r){"use strict";const n=r(25),i=n(r(1125)),o=n(r(1126));(t=e.exports).rpc=i,t.td=o},function(e){e.exports={_from:"ipfs@0.35.0",_id:"ipfs@0.35.0",_inBundle:!1,_integrity:"sha512-79hxhXd4s+FzfYsgoMitAqekwg41+2iU5XZ0UgWONQoxQtTOX7bZGw7N6jws8l5NJpYqckv1MLSMsH/j4bDoZg==",_location:"/ipfs",_phantomChildren:{"class-is":"1.1.0",multibase:"0.6.0",multicodec:"0.5.0",multihashes:"0.4.14"},_requested:{type:"version",registry:!0,raw:"ipfs@0.35.0",name:"ipfs",escapedName:"ipfs",rawSpec:"0.35.0",saveSpec:null,fetchSpec:"0.35.0"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/ipfs/-/ipfs-0.35.0.tgz",_shasum:"7e8c43c567c24805cc10bd455552403ba3d372eb",_spec:"ipfs@0.35.0",_where:"/Users/vsantos/Work/Project/protocol-labs/repos/service-worker-gateway",bin:{jsipfs:"src/cli/bin.js"},browser:{"./src/core/components/init-assets.js":!1,"./src/core/runtime/add-from-fs-nodejs.js":"./src/core/runtime/add-from-fs-browser.js","./src/core/runtime/config-nodejs.js":"./src/core/runtime/config-browser.js","./src/core/runtime/dns-nodejs.js":"./src/core/runtime/dns-browser.js","./src/core/runtime/fetch-nodejs.js":"./src/core/runtime/fetch-browser.js","./src/core/runtime/libp2p-nodejs.js":"./src/core/runtime/libp2p-browser.js","./src/core/runtime/preload-nodejs.js":"./src/core/runtime/preload-browser.js","./src/core/runtime/repo-nodejs.js":"./src/core/runtime/repo-browser.js","./src/core/runtime/ipld-nodejs.js":"./src/core/runtime/ipld-browser.js","./test/utils/create-repo-nodejs.js":"./test/utils/create-repo-browser.js",stream:"readable-stream",joi:"joi-browser"},"browser-all-ipld-formats":{"./src/core/runtime/ipld-browser.js":"./src/core/runtime/ipld-browser-all.js"},bugs:{url:"https://github.com/ipfs/js-ipfs/issues"},bundleDependencies:!1,contributors:[{name:"0xflotus",email:"0xflotus@gmail.com"},{name:"A_A",email:"21040751+Otto-AA@users.noreply.github.com"},{name:"Alan Shaw",email:"alan.shaw@protocol.ai"},{name:"Alan Shaw",email:"alan@tableflip.io"},{name:"Alex North",email:"alex@alexnorth.me"},{name:"Alex Potsides",email:"alex@achingbrain.net"},{name:"Andrew Nesbitt",email:"andrewnez@gmail.com"},{name:"Andrew de Andrade",email:"andrew@deandrade.com.br"},{name:"André Cruz",email:"andremiguelcruz@msn.com"},{name:"Arkadiy Kukarkin",email:"parkan@users.noreply.github.com"},{name:"Arpit Agarwal",email:"93arpit@gmail.com"},{name:"Arpit Agarwal",email:"atvanguard@users.noreply.github.com"},{name:"Bernard Mordan",email:"bernard@tableflip.io"},{name:"Brian Vander Schaaf",email:"bvs330@gmail.com"},{name:"Bruno Zell",email:"bruno.zzell@gmail.com"},{name:"CHEVALAY JOSSELIN",email:"josselin54.chevalay@gmail.com"},{name:"Caio Gondim",email:"me@caiogondim.com"},{name:"Chance Hudson",email:"jchancehud@gmail.com"},{name:"Christian Couder",email:"chriscool@tuxfamily.org"},{name:"Dafeng",email:"dfguo.joe@gmail.com"},{name:"Dan Ordille",email:"dordille@gmail.com"},{name:"Daniel J. O'Quinn",email:"danieljoquinn@gmail.com"},{name:"Daniela Borges Matos de Carvalho",email:"alunassertiva@gmail.com"},{name:"David Dias",email:"daviddias.p@gmail.com"},{name:"David Gilbertson",email:"gilbertson.david@gmail.com"},{name:"David da Silva",email:"dasilvacontin@gmail.com"},{name:"Diogo Silva",email:"fsdiogo@gmail.com"},{name:"Dmitriy Ryajov",email:"dryajov@gmail.com"},{name:"Dzmitry Das",email:"dbachko@gmail.com"},{name:"Enrico Marino",email:"enrico.marino@email.com"},{name:"Faheel Ahmad",email:"faheel@live.in"},{name:"Felix Yan",email:"felixonmars@archlinux.org"},{name:"Francisco Baio Dias",email:"xicombd@gmail.com"},{name:"Francisco Baio Dias",email:"francisco@typeform.com"},{name:"Friedel Ziegelmayer",email:"dignifiedquire@gmail.com"},{name:"Gar",email:"gar+gh@danger.computer"},{name:"Georgios Rassias",email:"georassias@gmail.com"},{name:"Gorka Ludlow",email:"gorka@aquigorka.com"},{name:"Grant Herman",email:"grantlouisherman041@gmail.com"},{name:"Greenkeeper",email:"support@greenkeeper.io"},{name:"Haad",email:"haadcode@users.noreply.github.com"},{name:"Haoliang Yu",email:"haoliangyu@users.noreply.github.com"},{name:"Harsh Vakharia",email:"harshjv@users.noreply.github.com"},{name:"Henrique Dias",email:"hacdias@gmail.com"},{name:"Henry Rodrick",email:"moshisushi@gmail.com"},{name:"Heo Sangmin",email:"heo@mapiacompany.com"},{name:"Hugo Dias",email:"mail@hugodias.me"},{name:"Hugo Dias",email:"hugomrdias@gmail.com"},{name:"Irakli Gozalishvili",email:"contact@gozala.io"},{name:"Jacob Heun",email:"jacobheun@gmail.com"},{name:"Jacob Heun",email:"jake@andyet.net"},{name:"Jade Meskill",email:"jade.meskill@gmail.com"},{name:"Johannes Wikner",email:"johannes.wikner@gmail.com"},{name:"Jon Schlinkert",email:"dev@sellside.com"},{name:"Jonathan",email:"jkrone@vt.edu"},{name:"João Antunes",email:"j.goncalo.antunes@gmail.com"},{name:"João Santos",email:"joaosantos15@users.noreply.github.com"},{name:"Kevin Wang",email:"kevin@fossa.io"},{name:"Lars Gierth",email:"larsg@systemli.org"},{name:"Lukas Drgon",email:"lukas.drgon@gmail.com"},{name:"Maciej Krüger",email:"mkg20001@gmail.com"},{name:"Marcin Rataj",email:"lidel@lidel.org"},{name:"Marius Darila",email:"marius.darila@gmail.com"},{name:"Mat Kelly",email:"machawk1@gmail.com"},{name:"Michelle Lee",email:"michelle@protocol.ai"},{name:"Mikeal Rogers",email:"mikeal.rogers@gmail.com"},{name:"Mithgol",email:"getgit@mithgol.ru"},{name:"Molly",email:"momack2@users.noreply.github.com"},{name:"Mounish Sai",email:"pvsmounish@gmail.com"},{name:"My9Bot",email:"34904312+My9Bot@users.noreply.github.com"},{name:"Nitin Patel",email:"31539366+niinpatel@users.noreply.github.com"},{name:"Nuno Nogueira",email:"nunofmn@gmail.com"},{name:"Oli Evans",email:"oli@tableflip.io"},{name:"Oskar Nyberg",email:"oskar@oskarnyberg.com"},{name:"Pascal Precht",email:"pascal.precht@googlemail.com"},{name:"Pau Ramon Revilla",email:"masylum@gmail.com"},{name:"Paulo Rodrigues",email:"me@paulogr.com"},{name:"Pedro Teixeira",email:"i@pgte.me"},{name:"Portia Burton",email:"plburton@gmail.com"},{name:"Raoul Millais",email:"raoul@raoulmillais.com"},{name:"RasmusErik Voel Jensen",email:"github@solsort.com"},{name:"Richard Littauer",email:"richard.littauer@gmail.com"},{name:"Richard Schneider",email:"makaretu@gmail.com"},{name:"Rob Brackett",email:"rob@robbrackett.com"},{name:"Rod Keys",email:"rod@zokos.com"},{name:"Sangwon Hong",email:"qpakzk@gmail.com"},{name:"Sid Harder",email:"sideharder@gmail.com"},{name:"SidHarder",email:"softwarenavigator@gmail.com"},{name:"Stephen Whitmore",email:"stephen.whitmore@gmail.com"},{name:"Stephen Whitmore",email:"noffle@users.noreply.github.com"},{name:"Steven Allen",email:"steven@stebalien.com"},{name:"Terence Pae",email:"terencepae@gmail.com"},{name:"Uroš Jurglič",email:"jurglic@gmail.com"},{name:"Vasco Santos",email:"vasco.santos@ua.pt"},{name:"Vasco Santos",email:"vasco.santos@moxy.studio"},{name:"Volker Mische",email:"volker.mische@gmail.com"},{name:"Xiao Liang",email:"yxliang01@users.noreply.github.com"},{name:"Yahya",email:"ya7yaz@gmail.com"},{name:"Yole",email:"yole@ultiledger.io"},{name:"bitspill",email:"bitspill+github@bitspill.net"},{name:"datafatmunger",email:"jbg@peerparty.org"},{name:"dirkmc",email:"dirk@mccormick.cx"},{name:"haad",email:"haad@headbanggames.com"},{name:"jbenet",email:"juan@benet.ai"},{name:"jonahweissman",email:"19804455+jonahweissman@users.noreply.github.com"},{name:"kevingzhang",email:"kevin.zhang.canada@gmail.com"},{name:"kumavis",email:"kumavis@users.noreply.github.com"},{name:"nginnever",email:"ginneversource@gmail.com"},{name:"npmcdn-to-unpkg-bot",email:"npmcdn-to-unpkg-bot@users.noreply.github.com"},{name:"robbsolter",email:"35879806+robbsolter@users.noreply.github.com"},{name:"seungwon-kang",email:"ksw3894@gmail.com"},{name:"tcme",email:"hi@this-connect.me"},{name:"victorbjelkholm",email:"victorbjelkholm@gmail.com"},{name:"Łukasz Magiera",email:"magik6k@users.noreply.github.com"},{name:"Максим Ильин",email:"negamaxi@gmail.com"}],dependencies:{async:"^2.6.1","bignumber.js":"^8.0.2","binary-querystring":"~0.1.2",bl:"^3.0.0",boom:"^7.2.0",bs58:"^4.0.1",byteman:"^1.3.5","cid-tool":"~0.2.0",cids:"~0.5.8","class-is":"^1.1.0","datastore-core":"~0.6.0","datastore-pubsub":"~0.1.1",debug:"^4.1.0",dlv:"^1.1.2","err-code":"^1.1.2","file-type":"^10.2.0",fnv1a:"^1.0.1","fsm-event":"^2.1.0","get-folder-size":"^2.0.0",glob:"^7.1.3",hapi:"^18.0.0","hapi-pino":"^5.2.0","human-to-milliseconds":"^1.0.0","interface-datastore":"~0.6.0","ipfs-bitswap":"~0.23.0","ipfs-block":"~0.8.0","ipfs-block-service":"~0.15.1","ipfs-http-client":"^30.1.1","ipfs-http-response":"~0.2.1","ipfs-mfs":"~0.10.2","ipfs-multipart":"~0.1.0","ipfs-repo":"~0.26.1","ipfs-unixfs":"~0.1.16","ipfs-unixfs-exporter":"~0.36.1","ipfs-unixfs-importer":"~0.38.5",ipld:"~0.21.1","ipld-bitcoin":"~0.1.8","ipld-dag-cbor":"~0.13.1","ipld-dag-pb":"~0.15.3","ipld-ethereum":"^2.0.1","ipld-git":"~0.3.0","ipld-raw":"^2.0.1","ipld-zcash":"~0.1.6",ipns:"~0.5.0","is-ipfs":"~0.6.0","is-pull-stream":"~0.0.0","is-stream":"^1.1.0","iso-url":"~0.4.6",joi:"^14.3.0","just-flatten-it":"^2.1.0","just-safe-set":"^2.1.0",libp2p:"~0.25.0","libp2p-bootstrap":"~0.9.3","libp2p-crypto":"~0.16.0","libp2p-kad-dht":"~0.14.12","libp2p-keychain":"~0.4.1","libp2p-mdns":"~0.12.0","libp2p-mplex":"~0.8.4","libp2p-record":"~0.6.1","libp2p-secio":"~0.11.0","libp2p-tcp":"~0.13.0","libp2p-webrtc-star":"~0.15.5","libp2p-websocket-star-multi":"~0.4.0","libp2p-websockets":"~0.12.2",lodash:"^4.17.11",mafmt:"^6.0.2","merge-options":"^1.0.1","mime-types":"^2.1.21",mkdirp:"~0.5.1",multiaddr:"^6.0.0","multiaddr-to-uri":"^4.0.1",multibase:"~0.6.0",multicodec:"~0.5.0",multihashes:"~0.4.14","multihashing-async":"~0.5.1","node-fetch":"^2.3.0","peer-book":"~0.9.0","peer-id":"~0.12.0","peer-info":"~0.15.0",progress:"^2.0.1","prom-client":"^11.1.3","prometheus-gc-stats":"~0.6.0","promisify-es6":"^1.0.3",protons:"^1.0.1","pull-abortable":"^4.1.1","pull-cat":"^1.1.11","pull-defer":"~0.2.3","pull-file":"^1.1.0","pull-ndjson":"~0.1.1","pull-pushable":"^2.2.0","pull-sort":"^1.0.1","pull-stream":"^3.6.9","pull-stream-to-stream":"^1.3.4","readable-stream":"^3.1.1",receptacle:"^1.3.2","stream-to-pull-stream":"^1.7.3",superstruct:"~0.6.0","tar-stream":"^2.0.0",temp:"~0.9.0","update-notifier":"^2.5.0","uri-to-multiaddr":"^3.0.1",varint:"^5.0.0",yargs:"^13.2.2","yargs-promise":"^1.1.0"},deprecated:!1,description:"JavaScript implementation of the IPFS specification",devDependencies:{aegir:"^18.1.0",chai:"^4.2.0",delay:"^4.1.0","detect-node":"^2.0.4","dir-compare":"^1.4.0","dirty-chai":"^2.0.1",execa:"^1.0.0","form-data":"^2.3.3",hat:"0.0.3","interface-ipfs-core":"~0.99.1","ipfsd-ctl":"~0.42.0","libp2p-websocket-star":"~0.10.2",ncp:"^2.0.0",qs:"^6.5.2",rimraf:"^2.6.2",sinon:"^7.3.1","stream-to-promise":"^2.2.0"},engines:{node:">=10.0.0",npm:">=6.0.0"},homepage:"https://github.com/ipfs/js-ipfs#readme",keywords:["IPFS"],leadMaintainer:"Alan Shaw ",license:"MIT",main:"src/core/index.js",name:"ipfs",optionalDependencies:{"prom-client":"^11.1.3","prometheus-gc-stats":"~0.6.0"},repository:{type:"git",url:"git+https://github.com/ipfs/js-ipfs.git"},scripts:{benchmark:'echo "Error: no benchmarks yet" && exit 1',"benchmark:browser":'echo "Error: no benchmarks yet" && exit 1',"benchmark:node":'echo "Error: no benchmarks yet" && exit 1',"benchmark:node:core":'echo "Error: no benchmarks yet" && exit 1',"benchmark:node:http":'echo "Error: no benchmarks yet" && exit 1',build:"aegir build",lint:"aegir lint",release:"aegir release -t node -t browser","release-major":"aegir release --type major -t node -t browser","release-minor":"aegir release --type minor -t node -t browser",test:"aegir test -t node -t browser -t webworker --no-cors --timeout=10000","test:bootstrapers":"IPFS_TEST=bootstrapers aegir test -t browser -f test/bootstrapers.js --timeout=10000","test:browser":"aegir test -t browser --no-cors --timeout=10000","test:node":"aegir test -t node --timeout=10000","test:node:cli":"aegir test -t node -f test/cli/index.js --timeout=10000","test:node:core":"aegir test -t node -f test/core/**/*.js --timeout=10000","test:node:gateway":"aegir test -t node -f test/gateway/index.js --timeout=10000","test:node:http":"aegir test -t node -f test/http-api/index.js --timeout=10000","test:node:interface":"aegir test -t node -f test/core/interface.spec.js --timeout=10000","test:webworker":"aegir test -t webworker --no-cors --timeout=10000"},version:"0.35.0"}},function(e,t,r){"use strict";const n=r(23),i=r(564).repoVersion;e.exports=function(e){return{init:(e,t,r)=>{},version:n(t=>{e._repo._isInitialized(r=>{if(r){return[/Key not found in database \[\/version\]/,/ENOENT/,/repo is not initialized yet/].some(e=>e.test(r.message))?t(null,i):t(r)}e._repo.version.get(t)})}),gc:n((e,t)=>{"function"==typeof e&&(t=e,e={}),t(new Error("Not implemented"))}),stat:n((t,r)=>{"function"==typeof t&&(r=t,t={}),e._repo.stat(t,(e,t)=>{if(e)return r(e);r(null,{numObjects:t.numObjects,repoSize:t.repoSize,repoPath:t.repoPath,version:t.version.toString(),storageMax:t.storageMax})})}),path:()=>e._repo.path}}},function(e,t,r){"use strict";e.exports=(()=>({Addresses:{Swarm:[],API:"",Gateway:""},Discovery:{MDNS:{Enabled:!1,Interval:10},webRTCStar:{Enabled:!0}},Bootstrap:["/dns4/ams-1.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd","/dns4/lon-1.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLMeWqB7YGVLJN3pNLQpmmEk35v6wYtsMGLzSr5QBU3","/dns4/sfo-3.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLPppuBtQSGwKDZT2M73ULpjvfd3aZ6ha4oFGL1KrGM","/dns4/sgp-1.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu","/dns4/nyc-1.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLueR4xBeUbY9WZ9xGUUxunbKWcrNFTDAadQJmocnWm","/dns4/nyc-2.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64","/dns4/node0.preload.ipfs.io/tcp/443/wss/ipfs/QmZMxNdpMkewiVZLMRxaNxUeZpDUb34pWjZ1kZvsd16Zic","/dns4/node1.preload.ipfs.io/tcp/443/wss/ipfs/Qmbut9Ywz9YEDrz8ySBSgWyJk41Uvm2QJPhwDJzJyGFsD6"],Swarm:{ConnMgr:{LowWater:200,HighWater:500}}}))},function(e,t,r){"use strict";(function(t){const n=r(23),i=r(16),o=r(1156),s=r(160),a=r(161).isSource;e.exports=function(e){const r=n((r,n,c)=>{"function"==typeof n&&(c=n,n={}),n=n||{};const u=e=>t.isBuffer(e)||s.readable(e)||a(e),l=e=>u(e)||(e=>"object"==typeof e&&(e.content?u(e.content):Boolean(e.path)&&"string"==typeof e.path))(e);if(!(l(r)||Array.isArray(r)&&r.every(l)))return c(new Error("invalid input: expected buffer, readable stream, pull stream, object or array of objects"));i(i.values([r]),e.addPullStream(n),o((e,t)=>e.patht.path?-1:0),i.collect(c))});return function(){const e=Array.from(arguments);return 1===e.length&&a(e[0])&&e.push({}),r.apply(null,e)}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";e.exports=r(1163)},function(e,t){e.exports=function(e){var t,r,n;function i(e){return r=e,function(e,i){n?t=[e,i]:r(e,i)}}return i.pause=function(){n||(n=!0,e&&e(n))},i.resume=function(){if(n&&(n=!1,e&&e(n),t)){var i=t;t=null,r(i[0],i[1])}},i}},function(e,t,r){"use strict";(function(t){const n=r(13),i=r(39),o=r(47),s=r(42),a=r(1195);class c{constructor(r,s,a){if(e.exports.isCID(r)){let e=r;return this.version=e.version,this.codec=e.codec,void(this.multihash=t.from(e.multihash))}if("string"==typeof r)if(i.isEncoded(r)){const e=i.decode(r);r=parseInt(e.slice(0,1).toString("hex"),16),s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=n.fromB58String(r),r=0;else if(t.isBuffer(r)){const e=r.slice(0,1),t=parseInt(e.toString("hex"),16);if(0===t||1===t){const e=r;r=t,s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=r,r=0}this.codec=s,this.version=r,this.multihash=a,c.validateCID(this)}get buffer(){let e=this._buffer;if(!e){if(0===this.version)e=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");e=t.concat([t.from("01","hex"),o.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:e})}return e}get prefix(){return t.concat([t.from(`0${this.version}`,"hex"),o.getCodeVarint(this.codec),n.prefix(this.multihash)])}toV0(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");const{name:e,length:t}=n.decode(this.multihash);if("sha2-256"!==e)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==t)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new u(0,this.codec,this.multihash)}toV1(){return new u(1,this.codec,this.multihash)}toBaseEncodedString(e){switch(e=e||"base58btc",this.version){case 0:if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");return n.toB58String(this.multihash);case 1:return i.encode(e,this.buffer).toString();default:throw new Error("Unsupported version")}}toString(e){return this.toBaseEncodedString(e)}toJSON(){return{codec:this.codec,version:this.version,hash:this.multihash}}equals(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}static validateCID(e){let t=a.checkCIDComponents(e);if(t)throw new Error(t)}}const u=r(19)(c,{className:"CID",symbolName:"@ipld/js-cid/CID"});u.codecs=s,e.exports=u}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){e.exports=function(e,r,n,i){const o=r+e.length;return n>=o||i=r&&i=r&&n{if(!(t=Object.assign({},g,t)).parentCid)return r(new Error("No parent CID passed to addLink"));if(!o.isCID(t.parentCid))return r(new Error("Invalid CID passed to addLink"));if(!t.parent)return c("Loading parent node",t.parentCid.toBaseEncodedString()),s([r=>e.ipld.get(t.parentCid,r),(e,t)=>t(null,e.value),(r,n)=>y(e,{...t,parent:r},n)],r);if(!t.cid)return r(new Error("No child cid passed to addLink"));if(!t.name)return r(new Error("No child name passed to addLink"));if(o.isCID(t.cid)||(t.cid=new o(t.cid)),!t.size&&0!==t.size)return r(new Error("No child size passed to addLink"));return"hamt-sharded-directory"===u.unmarshal(t.parent.data).type?(c("Adding link to sharded directory"),A(e,t,r)):t.parent.links.length>=t.shardSplitThreshold?(c("Converting directory to sharded directory"),b(e,t,r)):(c(`Adding ${t.name} to regular directory`),void v(e,t,r))},b=(e,t,r)=>{h(e,t.parent.links.map(e=>({name:e.name,size:e.size,multihash:e.cid.buffer})).concat({name:t.name,size:t.size,multihash:t.cid.buffer}),{},(e,t)=>{e||c("Converted directory to sharded directory",t.cid.toBaseEncodedString()),r(e,t)})},v=(e,t,r)=>{s([e=>n.rmLink(t.parent,t.name,e),(e,r)=>n.addLink(e,new i(t.name,t.size,t.cid),r),(r,n)=>{e.ipld.put(r,{version:t.cidVersion,format:t.codec,hashAlg:t.hashAlg,hashOnly:!t.flush},(e,t)=>n(e,{node:r,cid:t}))}],r)},A=(e,t,r)=>w(e,t,(i,o)=>{if(i)return r(i);const{shard:a,path:c}=o;a.flush("",e.ipld,null,async(i,o)=>{if(i)return r(i);const a=t.parent.links.find(e=>e.name.substring(0,2)===c[0].prefix),u=o.node.links.find(e=>e.name.substring(0,2)===c[0].prefix);s([e=>{if(!a)return e(null,t.parent);n.rmLink(t.parent,a.name,e)},(e,t)=>n.addLink(e,u,t),(r,n)=>f(e,r.links,c[0].bucket,t,n)],r)})}),w=(e,t,r)=>{const n={name:t.name,cid:t.cid,size:t.size};p(t.parent.links,null,null,null,async(i,o)=>{if(i)return r(i);const s=new l({root:!0,dir:!0,parent:null,parentKey:null,path:"",dirty:!0,flat:!1});s._bucket=o;const u=await o._findNewBucketAndPos(n.name),f=E(u);f[0].node=t.parent;let h=0;a(()=>h{let r=f[h];h++;let i=r.node.links.find(e=>e.name.substring(0,2)===r.prefix);return i?i.name===`${r.prefix}${n.name}`?(c(`Link ${r.prefix}${n.name} will be replaced`),h=f.length,t(null,s)):i.name.length>2?(c(`Link ${i.name} will be replaced with a subshard`),h=f.length,t(null,s)):(c(`Found subshard ${r.prefix}`),void e.ipld.get(i.cid,(e,i)=>{if(e)return t(e);if(!f[h]){c(`Loaded new subshard ${r.prefix}`);const e=i.value;return p(e.links,o,r.bucket,parseInt(r.prefix,16),async r=>{if(r)return t(r);const i=await o._findNewBucketAndPos(n.name);return f.push({bucket:i.bucket,prefix:d(i.pos),node:e}),t(null,s)})}const a=f[h];m(i.value.links,a.bucket,o,e=>{a.node=i.value,t(e,s)})})):(c(`Link ${r.prefix}${n.name} will be added`),h=f.length,t(null,s))},(e,t)=>{if(e)return r(e);t.put(n.name,{size:n.size,multihash:n.cid.buffer},e=>{r(e,{shard:t,path:f})})})})},E=e=>{let t=e.bucket,r=e.pos,n=[{bucket:t,prefix:d(r)}];for(t=e.bucket._parent,r=e.bucket._posAtParent;t;)n.push({bucket:t,prefix:d(r)}),r=t._posAtParent,t=t._parent;return n.reverse(),n};e.exports=y},function(e,t,r){"use strict";(function(t){const{DAGNode:n}=r(54),i=r(9),o=r(96),s=r(49),a=r(591),c=r(306),u=r(5)("ipfs:mfs:core:utils:hamt-utils"),l=r(48),f=(e,t,r,n,i)=>{const o=new a({hashFn:c.hashFn,hash:r?r._options.hash:void 0},r,n);r&&r._putObjectAt(n,o),p(e,o,t,i)},p=(e,t,r,n)=>{Promise.all(e.map(e=>{if(2===e.name.length){const r=parseInt(e.name,16);return t._putObjectAt(r,new a({hashFn:c.hashFn},t,r)),Promise.resolve()}return(r||t).put(e.name.substring(2),{size:e.size,multihash:e.cid})})).then(()=>n(null,t),n)},h=e=>e.toString("16").toUpperCase().padStart(2,"0").substring(0,2);e.exports={generatePath:(e,t,r,n)=>{f(r.links,null,null,null,async(i,s)=>{if(i)return n(i);const a=await s._findNewBucketAndPos(t);let c=[{bucket:a.bucket,prefix:h(a.pos)}],l=a.bucket;for(;l!==s;)c.push({bucket:l,prefix:h(l._posAtParent)}),l=l._parent;c[c.length-1].node=r;let d=c.length;o(()=>d>0,r=>{const n=c[--d],i=n.node.links.filter(e=>e.name.substring(0,2)===n.prefix).pop();return i?i.name===`${n.prefix}${t}`?(u(`Link ${n.prefix}${t} will be replaced`),r(null,c)):(u(`Found subshard ${n.prefix}`),void e.ipld.get(i.cid,(e,i)=>{if(e)return r(e);if(!c[d-1]){u(`Loaded new subshard ${n.prefix}`);const e=i.value;return f(e.links,s,n.bucket,parseInt(n.prefix,16),async(n,i)=>{if(n)return r(n);const o=await s._findNewBucketAndPos(t);d++,c.unshift({bucket:o.bucket,prefix:h(o.pos),node:e}),r()})}const o=c[d-1];p(i.value.links,o.bucket,s,e=>{o.node=i.value,r(e)})})):(u(`Link ${n.prefix}${t} will be added`),r(null,c))},async(e,r)=>{await s.put(t,!0),n(e,{rootBucket:s,path:r})})})},updateHamtDirectory:(e,r,o,s,a)=>{i([e=>{const i=t.from(o._children.bitField().reverse()),s=new l("hamt-sharded-directory",i);s.fanout=o.tableSize(),s.hashType=c.hashFn.code,n.create(s.marshal(),r,e)},(t,r)=>{e.ipld.put(t,{version:s.cidVersion,format:s.codec,hashAlg:s.hashAlg,hashOnly:!s.flush},(e,n)=>r(e,{node:t,cid:n}))}],a)},recreateHamtLevel:f,addLinksToHamtBucket:p,toPrefix:h,createShard:(e,t,r,n)=>{const i=new c({root:!0,dir:!0,parent:null,parentKey:null,path:"",dirty:!0,flat:!1,...r}),o=t.map(e=>t=>{i.put(e.name,{size:e.size,multihash:e.multihash},t)});return s(o,t=>{if(t)return n(t);i.flush("",e.ipld,null,n)})}}}).call(this,r(0).Buffer)},function(e,t){e.exports={WORKER_REQUEST_READ_LOCK:"lock:worker:request-read",WORKER_RELEASE_READ_LOCK:"lock:worker:release-read",MASTER_GRANT_READ_LOCK:"lock:master:grant-read",WORKER_REQUEST_WRITE_LOCK:"lock:worker:request-write",WORKER_RELEASE_WRITE_LOCK:"lock:worker:release-write",MASTER_GRANT_WRITE_LOCK:"lock:master:grant-write"}},function(e,t){const r={},n=e=>{e.addEventListener("message",t=>{n.dispatchEvent("message",e,t)}),e.port&&e.port.addEventListener("message",t=>{n.dispatchEvent("message",e,t)})};n.addEventListener=((e,t)=>{r[e]||(r[e]=[]),r[e].push(t)}),n.removeEventListener=((e,t)=>{r[e]&&(r[e]=r[e].filter(e=>e===t))}),n.dispatchEvent=function(){const e=Array.prototype.slice.call(arguments),t=e.shift();r[t]&&r[t].forEach(t=>t.apply(null,e))},e.exports=n},function(e,t,r){"use strict";const{FILE_SEPARATOR:n}=r(308),i=r(725),o=r(9),s=r(44),a=r(592);e.exports=((e,t,r)=>{let c=Array.isArray(t);const u=Array.isArray(t)?t:[t];o([t=>{s({paths:e=>{let t;try{t=u.map(e=>{if(!(e=(e=(e||"").trim()).replace(/(\/\/+)/g,"/")))throw new Error("paths must not be empty");if(e.substring(0,1)!==n)throw new Error(`paths must start with a leading ${n}`);return e.substring(e.length-n.length)===n&&(e=e.substring(0,e.length-n.length)),a(e)})}catch(t){return e(t)}e(null,t)},root:t=>i(e,t)},t)},({paths:e,root:t},r)=>{r(null,e.map(e=>{if("ipfs"===e[0]){let r;return r=2===e.length?`${n}${e.join(n)}`:`${n}${e.slice(0,e.length-1).join(n)}`,{type:"ipfs",depth:e.length-2,mfsPath:`${n}${e.join(n)}`,mfsDirectory:r,root:t,parts:e,path:`${n}${e.join(n)}`,name:e[e.length-1]}}const r=`/ipfs/${t.toBaseEncodedString()}/${e.join(n)}`,i=`/ipfs/${t.toBaseEncodedString()}/${e.slice(0,e.length-1).join(n)}`;return{type:"mfs",depth:e.length,mfsDirectory:i,mfsPath:r,root:t,parts:e,path:`${n}${e.join(n)}`,name:e[e.length-1]}}))},(e,t)=>{if(c)return t(null,e);t(null,e[0])}],r)})},function(e,t,r){"use strict";const n=r(152),i=r(48),{DAGNode:o}=r(54),s=r(5)("ipfs:mfs:utils:with-mfs-root"),a=r(9),{MFS_ROOT_KEY:c}=r(308);e.exports=((e,t)=>{a([t=>e.repo.datastore.open(e=>t(e)),t=>{e.repo.datastore.get(c,(r,u)=>{if(r&&(r.notFound||"ERR_NOT_FOUND"===r.code))return s("Creating new MFS root"),a([e=>o.create(new i("directory").marshal(),e),(t,r)=>e.ipld.put(t,{version:0,hashAlg:"sha2-256",format:"dag-pb"},r),(t,r)=>e.repo.datastore.put(c,t.buffer,e=>r(e,t))],t);t(r,u?new n(u):null)})},(e,t)=>{s(`Fetched MFS root ${e.toBaseEncodedString()}`),t(null,e)}],t)})},function(e,t,r){"use strict";(function(t,n){var i=r(82);e.exports=v;var o,s=r(567);v.ReadableState=b;r(14).EventEmitter;var a=function(e,t){return e.listeners(t).length},c=r(727),u=r(6).Buffer,l=t.Uint8Array||function(){};var f=r(64);f.inherits=r(7);var p=r(1230),h=void 0;h=p&&p.debuglog?p.debuglog("stream"):function(){};var d,m=r(1231),g=r(728);f.inherits(v,c);var y=["error","close","destroy","pause","resume"];function b(e,t){e=e||{};var n=t instanceof(o=o||r(170));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,s=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=r(60).StringDecoder),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function v(e){if(o=o||r(170),!(this instanceof v))return new v(e);this._readableState=new b(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),c.call(this)}function A(e,t,r,n,i){var o,s=e._readableState;null===t?(s.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,S(e)}(e,s)):(i||(o=function(e,t){var r;n=t,u.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(s,t)),o?e.emit("error",o):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?w(e,s,t,!1):x(e,s)):w(e,s,t,!1))):n||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=E?e=E:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(_,e):_(e))}function _(e){h("emit readable"),e.emit("readable"),R(e)}function x(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(C,e,t))}function C(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;eo.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0===(e-=s)){s===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,s),0===(e-=s)){s===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function N(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(P,t,e))}function P(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function M(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?N(this):S(this),null;if(0===(e=k(e,t))&&t.ended)return 0===t.length&&N(this),null;var n,i=t.needReadable;return h("need readable",i),(0===t.length||t.length-e0?T(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&N(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,h("pipe count=%d opts=%j",o.pipesCount,t);var c=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?l:v;function u(t,n){h("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,h("cleanup"),e.removeListener("close",y),e.removeListener("finish",b),e.removeListener("drain",f),e.removeListener("error",g),e.removeListener("unpipe",u),r.removeListener("end",l),r.removeListener("end",v),r.removeListener("data",m),p=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function l(){h("onend"),e.end()}o.endEmitted?i.nextTick(c):r.once("end",c),e.on("unpipe",u);var f=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,R(e))}}(r);e.on("drain",f);var p=!1;var d=!1;function m(t){h("ondata"),d=!1,!1!==e.write(t)||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==M(o.pipes,e))&&!p&&(h("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function g(t){h("onerror",t),v(),e.removeListener("error",g),0===a(e,"error")&&e.emit("error",t)}function y(){e.removeListener("finish",b),v()}function b(){h("onfinish"),e.removeListener("close",y),v()}function v(){h("unpipe"),r.unpipe(e)}return r.on("data",m),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",g),e.once("close",y),e.once("finish",b),e.emit("pipe",r),o.flowing||(h("pipe resume"),r.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o-1?n:o.nextTick;b.WritableState=y;var u=r(64);u.inherits=r(7);var l={deprecate:r(287)},f=r(727),p=r(6).Buffer,h=i.Uint8Array||function(){};var d,m=r(728);function g(){}function y(e,t){a=a||r(170),e=e||{};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,u=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(u||0===u)?u:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===e.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(o.nextTick(i,n),o.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),S(e,t))}(e,r,n,t,i);else{var s=E(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||w(e,r),n?c(A,e,r,s,i):A(e,r,s,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function b(e){if(a=a||r(170),!(d.call(b,this)||this instanceof a))return new b(e);this._writableState=new y(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function v(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function A(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),S(e,t)}function w(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,c=!0;r;)i[a]=r,r.isBuf||(c=!1),r=r.next,a+=1;i.allBuffers=c,v(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,l=r.encoding,f=r.callback;if(v(e,t,!1,t.objectMode?1:u.length,u,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),S(e,t)})}function S(e,t){var r=E(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(k,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(b,f),y.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(y.prototype,"buffer",{get:l.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===b&&(e&&e._writableState instanceof y)}})):d=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,r){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=e,p.isBuffer(n)||n instanceof h);return a&&!p.isBuffer(e)&&(e=function(e){return p.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=g),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),o.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),o.nextTick(n,s),i=!1),i}(this,i,e,r))&&(i.pendingcb++,s=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=p.from(t,r));return t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var c=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,S(e,t),r&&(t.finished?o.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=m.destroy,b.prototype._undestroy=m.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(4),r(31).setImmediate,r(12))},function(e,t,r){"use strict";e.exports=s;var n=r(170),i=r(64);function o(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length"object"==typeof e).pop()||{});Array.isArray(t[0])&&(t=t[0]);const s=t.filter(e=>"string"==typeof e).map(e=>e.trim());n(e,s,(e,t)=>{i(e,{sources:t,options:o})})}},function(e,t,r){"use strict";const n=r(9),i=r(44),{addLink:o,updateTree:s,updateMfsRoot:a,toTrail:c,toSourcesAndDestination:u,toMfsPath:l}=r(94),f=r(309),p=r(594),h=r(5)("ipfs:mfs:cp"),d={parents:!1,flush:!0,format:"dag-pb",hashAlg:"sha2-256",shardSplitThreshold:1e3};e.exports=(e=>(function(){const t=Array.from(arguments),r=t.pop();n([r=>u(e,t,d,r),({sources:e,destination:t,options:r},n)=>e.length?t?(r.parents=r.p||r.parents,void n(null,{sources:e,destination:t,options:r})):n(new Error("Please supply a destination")):n(new Error("Please supply at least one source")),({sources:t,destination:r,options:n},i)=>c(e,r.mfsPath,n,(o,s)=>{if(o)return i(o);if(s.length===r.parts.length)return h("Destination does not exist"),1===t.length?(h("Only one source, copying to a file"),m(e,t.pop(),r,s,n,i)):(h("Multiple sources, copying to a directory"),g(e,t,r,s,n,i));if("dir"===s[s.length-1].type)return h("Destination is a directory"),g(e,t,r,s,n,i);i(new Error("directory already has entry by that name"))})],r)}));const m=(e,t,r,i,c,u)=>{n([r=>y(e,t,c,r),(t,s)=>{const a=i[i.length-1],c=t[t.length-1];n([t=>e.ipld.get(a.cid,t),(t,n)=>o(e,{parent:t.value,parentCid:a.cid,size:c.size,cid:c.cid,name:r.parts[r.parts.length-1]},n),({node:e,cid:t},r)=>{a.node=e,a.cid=t,a.size=e.size,r(null,i)}],s)},(t,r)=>s(e,t,c,r),({cid:t},r)=>a(e,t,r)],e=>u(e))},g=(e,t,r,u,d,m)=>{n([t=>{if(u.length!==r.parts.length+1)return h("Making destination directory",r.path),n([t=>p(e)(r.path,d,t),t=>l(e,r.path,t),(t,n)=>{c(e,(r=t).mfsPath,d,n)}],(e,r)=>{if(e)return t(e);u=r,t()});t()},r=>i(t.map(t=>r=>y(e,t,d,r)),r),(c,l)=>{n([n=>{i(t.map(t=>n=>{f(e)(`${r.path}/${t.name}`,d,e=>{if(e)return e.message.includes("does not exist")?n():n(e);n(new Error("directory already has entry by that name"))})}),e=>n(e))},r=>{const i=u[u.length-1];n([t=>e.ipld.get(i.cid,t),(e,t)=>t(null,{cid:i.cid,node:e.value})].concat(c.map((r,n)=>(i,s)=>{const a=r[r.length-1];h(`Adding ${t[n].name} to ${i.cid.toBaseEncodedString()}`),o(e,{parent:i.node,parentCid:i.cid,size:a.size,cid:a.cid,name:t[n].name},(e,t)=>{if(e)return s(e);h(`New directory hash ${t.cid.toBaseEncodedString()}`),s(e,t)})})),r)},({node:e,cid:t},r)=>{const n=u[u.length-1];n.node=e,n.cid=t,n.size=e.size,r(null,u)},(t,r)=>s(e,t,d,r),({cid:t},r)=>a(e,t,r)],l)}],e=>m(e))},y=(e,t,r,n)=>{c(e,t.mfsPath,r,(e,r)=>e?n(e):"ipfs"===t.type?n(null,r):r.length!==t.parts.length+1?n(new Error(`${t.path} does not exist`)):void n(null,r))}},function(e,t,r){"use strict";const n=r(9),i=r(49),{updateTree:o,updateMfsRoot:s,toSources:a,removeLink:c,toMfsPath:u,toTrail:l,FILE_SEPARATOR:f}=r(94),p={recursive:!1,cidVersion:0,hashAlg:"sha2-256",format:"dag-pb"};e.exports=(e=>(function(){const t=Array.from(arguments),r=t.pop();n([r=>a(e,t,p,r),({sources:t,options:r},n)=>{if(!t.length)return n(new Error("Please supply at least one path to remove"));i(t.map(t=>n=>h(e,t.path,r,n)),e=>n(e))}],r)}));const h=(e,t,r,i)=>{if(t===f)return i(new Error("Cannot delete root"));n([r=>u(e,t,r),({mfsPath:t,parts:n},i)=>l(e,t,r,(e,r)=>i(e,{mfsPath:t,parts:n,trail:r})),({trail:i},o)=>{const s=i.pop(),a=i[i.length-1];return a?"dir"!==s.type||r.recursive?void n([t=>c(e,{parentCid:a.cid,name:s.name},t),({cid:e},t)=>{a.cid=e,t(null,i)}],o):o(new Error(`${t} is a directory, use -r to remove directories`)):o(new Error(`${t} does not exist`))},(t,n)=>o(e,t,r,n),({cid:t},r)=>s(e,t,r)],i)}},function(e,t,r){"use strict";const n=r(258).OFFLINE_ERROR,i=r(23),o=r(17),s=r(116),a=r(69),c=r(24),u=r(20);function l(e,t){return Array.from(e).map(e=>({"/":e[1].cid.toBaseEncodedString()}))}e.exports=function(e){return{wantlist:i((t,r)=>{if("function"==typeof t&&(r=t,t=null),!e.isOnline())return o(()=>r(new Error(n)));let i;if(t){try{t=c.createFromB58String(t)}catch(e){t=null}if(!t)return o(()=>r(new Error("Invalid peerId")));i=e._bitswap.wantlistForPeer(t)}else i=e._bitswap.getWantlist();o(()=>r(null,{Keys:l(i)}))}),stat:i(t=>{if(!e.isOnline())return o(()=>t(new Error(n)));const r=e._bitswap.stat().snapshot;o(()=>{t(null,{provideBufLen:parseInt(r.providesBufferLength.toString()),blocksReceived:new s(r.blocksReceived),wantlist:l(e._bitswap.getWantlist()),peers:e._bitswap.peers().map(e=>e.toB58String()),dupBlksReceived:new s(r.dupBlksReceived),dupDataReceived:new s(r.dupDataReceived),dataReceived:new s(r.dataReceived),blocksSent:new s(r.blocksSent),dataSent:new s(r.dataSent)})})}),unwant:i((t,r)=>{if(!e.isOnline())return o(()=>r(new Error(n)));Array.isArray(t)||(t=[t]);try{t=t.map(e=>a.isCID(e)?e:new a(e))}catch(e){return o(()=>r(u(e,"ERR_INVALID_CID")))}o(()=>r(null,e._bitswap.unwant(t)))})}}},function(e,t,r){"use strict";const n=r(23),i=/^((\d+(\.\d+)*)(ns|ms|us|µs|m|s|h))+$/,o=/((\d+(\.\d+)*)(ns|ms|us|µs|m|s|h))/g,s=/(ns|ms|us|µs|m|s|h)/g,a={ns:1e-6,us:.001,"µs":.001,ms:1,s:1e3,m:6e4,h:36e5};e.exports=n(function(e,t){return"string"!=typeof e?t(new Error("the first argument must be a string")):i.test(e)?void t(null,e.match(o).reduce((e,t)=>e+function(e){let t=e.match(s)[0];return e=e.substring(0,e.length-t.length),parseFloat(e)*a[t]}(t),0)):t(new Error("invalid time"))})},function(e,t,r){"use strict";r(737)},function(e,t,r){"use strict";const{createProxyServer:n}=r(310),{getResponse:i}=r(738),{get:o,set:s}=r(774),a=r(775),c=r(1270),u=e=>`${e.getFullYear()}/${e.getMonth()}/${e.getDate()}`,l=e=>`${e.getHours()}:${e.getMinutes()}:${e.getSeconds()}`;let f;self.addEventListener("fetch",e=>{const t=e.request.url,r=t.startsWith(`${self.location.origin}/ipfs/`),n=t.startsWith(`${self.location.origin}/stats`);if(r||n)if(n)e.respondWith((()=>a.get().then(e=>Promise.all([e.id(),e.repo.stat(),o("fetched-cids"),o("start-date-time")]).then(([e,t,r=[],n={}])=>new Response(c.render(e,t,r,n),{status:200,statusText:"OK",headers:{"Content-Type":"text/html"}})).catch(e=>new Response(e.toString()))))());else{const r=t.match(/(\/ipfs\/.*?)(#|\?|$)/)[1];e.respondWith((e=>a.get().then(t=>Promise.all([i(t,e),o("fetched-cids")]).then(([t,r=[]])=>{const n=new Date;return r.push({cid:e.split("/ipfs/")[1],date:u(n),time:l(n)}),s("fetched-cids",r).then(()=>t)}).catch(e=>new Response(e.toString()))))(r))}}),self.addEventListener("install",e=>{e.waitUntil(self.skipWaiting())}),self.addEventListener("activate",e=>{a.get().then(e=>{f=e;const t=new Date;s("fetched-cids",[]),s("start-date-time",{date:u(t),time:l(t)})}).catch(e=>console.err(e)),e.waitUntil(self.clients.claim())}),n(()=>f,{addListener:self.addEventListener&&self.addEventListener.bind(self),removeListener:self.removeEventListener&&self.removeEventListener.bind(self),postMessage(e){self.clients.matchAll().then(t=>{t.forEach(t=>t.postMessage(e))})}})},function(e,t,r){"use strict";const n=r(80),i=r(739),o=r(741),s=r(556),a=r(769),c=(e=200,t="OK",r={})=>({status:e,statusText:t,headers:r});e.exports={getResponse:(e,t)=>{return new Promise((r,u)=>{t.endsWith("/")&&r(Response.redirect(s.removeTrailingSlash(t))),o.cid(e,t).then(o=>{const s=e.catReadableStream(o.cid),u=new n.PassThrough({highWaterMark:1});s.pipe(u),s.once("error",e=>{e&&r(new Response(e.toString(),c(500,"Error fetching the file")))});let l=!1;s.on("data",e=>{if(l)return;l=!0;const n=a(t,e);"undefined"==typeof Blob?r(n?new Response(u,c(200,"OK",{"Content-Type":n})):new Response(u,c())):i(u,(e,t)=>{e&&r(new Response(e.toString(),c(500,"Error fetching the file"))),r(n?new Response(t,c(200,"OK",{"Content-Type":n})):new Response(t,c()))})})}).catch(n=>{r(((e,t,r)=>{if(r){const n=r.toString();return new Promise((i,a)=>{switch(!0){case"Error: This dag node is a directory"===n:o.directory(e,t,r.cid).then(e=>{"string"==typeof e&&i(new Response(e,c(200,"OK",{"Content-Type":"text/html"}))),i(Response.redirect(s.joinURLParts(t,e[0].name)))}).catch(e=>{i(new Response(n,c(500,e.toString())))});break;case n.startsWith("Error: no link named"):i(new Response(n,c(404,n)));break;case n.startsWith("Error: multihash length inconsistent"):case n.startsWith("Error: Non-base58 character"):i(new Response(n,c(400,n)));break;default:i(new Response(n,c(500,n)))}})}})(e,t,n))})})},resolver:o}},function(e,t,r){var n=r(53);e.exports=function e(t,r,i){if("function"==typeof r)return e(t,null,r);i=n(i);var o=[];t.on("data",function(e){o.push(e)}).on("end",function(){var e=r?new Blob(o,{type:r}):new Blob(o);i(null,e)}).on("error",i)}},function(e,t){e.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");Object.keys(t).forEach(function(e){n[e]=t[e]});return n;function n(){for(var e=new Array(arguments.length),r=0;r{r=new s(r),e.object.get(r.buffer,(e,r)=>{if(e)return n(e);const i=function(e){const t=["index.html","index.htm","index.shtml"];let r=e.filter(e=>-1!==t.indexOf(e.name));return r.length?r:e.filter(e=>e.name.length>2&&-1!==t.indexOf(e.name.substring(2)))}(r.links);return i.length?n(null,i):n(null,l.render(t,r.links))})}),h=i((e,t,r)=>{const i=f.cidArray(t);let c,l=i.shift();o(i,l,(t,r,i)=>{try{c=new s(t)}catch(e){return i(e)}u("memo: ",t),u("item: ",r),e.dag.get(c,(e,o)=>{if(e)return i(e);const a=o.value;let c;const u=r;try{for(let t of a.links)if(t.name===u){try{c=new s(t.cid)}catch(e){c=new s(n.toB58String(t.multihash))}break}}catch(e){return i(e)}if(!c){const e=new Error(`no link named "${u}" under ${t}`);return e.parentDagNode=t,e.missingLinkName=u,i(e)}i(null,c)})},(t,n)=>{if(t)return r(t);try{n=new s(n)}catch(t){return r(t)}"raw"===n.codec&&r(null,{cid:n}),e.dag.get(n,(e,t)=>{if(e)return r(e);try{let i=a.unmarshal(t.value.data);if("directory"===i.type||"hamt-sharded-directory"===i.type){let e=new Error("This dag node is a directory");return e.cid=e.fileName=n,e.dagDirType=i.type,r(e)}}catch(e){return r(e)}r(null,{cid:n})})})}),d=i((e,t,r)=>{h(e,t).then(e=>{r(null,{multihash:n.toB58String(e.cid.multihash)})}).catch(e=>{r(e)})});e.exports={directory:p,cid:h,multihash:d}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,n.default)(e))return function(e){var t=-1,r=e.length;return function(){return++t-1&&e%1==0&&e{if("%%"===r)return r;a++;const o=n.formatters[i];if("function"==typeof o){const n=e[a];r=o.call(t,n),e.splice(a,1),a--}return r}),n.formatArgs.call(t,e),(t.log||n.log).apply(t,e)}return s.namespace=e,s.enabled=n.enabled(e),s.useColors=n.useColors(),s.color=t(e),s.destroy=i,s.extend=o,"function"==typeof n.init&&n.init(s),n.instances.push(s),s}function i(){const e=n.instances.indexOf(this);return-1!==e&&(n.instances.splice(e,1),!0)}function o(e,t){const r=n(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return n.debug=n,n.default=n,n.coerce=function(e){return e instanceof Error?e.stack||e.message:e},n.disable=function(){const e=[...n.names.map(s),...n.skips.map(s).map(e=>"-"+e)].join(",");return n.enable(""),e},n.enable=function(e){let t;n.save(e),n.names=[],n.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(t=0;t{n[t]=e[t]}),n.instances=[],n.names=[],n.skips=[],n.formatters={},n.selectColor=t,n.enable(n.load()),n}},function(e,t,r){"use strict";const n=r(767),i=r(768),o=r(556);function s(e,t){return`\n \n \n \n \n \n \n \n ${function(e,t){return t.map(t=>{let r=['
 
',`${t.name}`,n(t.size)];return`${r=r.map(e=>``).join("")}`}).join("")}(e,t)}\n \n
\n
 
\n
\n ..\n
${e}
\n `}e.exports.render=function(e,t){return`\n \n \n \n \n ${e}\n \n \n \n \n
\n
\n
\n
\n Index of ${e}\n
\n ${s(e,t)}\n
\n
\n \n \n `}},function(e,t,r){"use strict";(function(t){ /** * filesize * @@ -78,50 +86,36 @@ e.exports=function(){"use strict";var e=function(e,r){return t(e.slice(),r)};fun * @license BSD-3-Clause * @version 3.6.1 */ -!function(t){var r=/^(b|B)$/,n={iec:{bits:["b","Kib","Mib","Gib","Tib","Pib","Eib","Zib","Yib"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["b","Kb","Mb","Gb","Tb","Pb","Eb","Zb","Yb"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},i={iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]};function o(e){var t,o,s,a,c,u,f,l,h,p,d,g,b,m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},y=[],v=0,w=void 0,A=void 0;if(isNaN(e))throw new Error("Invalid arguments");return o=!0===m.bits,h=!0===m.unix,t=m.base||2,l=void 0!==m.round?m.round:h?1:2,p=void 0!==m.separator&&m.separator||"",d=void 0!==m.spacer?m.spacer:h?"":" ",b=m.symbols||m.suffixes||{},g=2===t&&m.standard||"jedec",f=m.output||"string",a=!0===m.fullform,c=m.fullforms instanceof Array?m.fullforms:[],w=void 0!==m.exponent?m.exponent:-1,s=t>2?1e3:1024,(u=(A=Number(e))<0)&&(A=-A),(-1===w||isNaN(w))&&(w=Math.floor(Math.log(A)/Math.log(s)))<0&&(w=0),w>8&&(w=8),0===A?(y[0]=0,y[1]=h?"":n[g][o?"bits":"bytes"][w]):(v=A/(2===t?Math.pow(2,10*w):Math.pow(1e3,w)),o&&(v*=8)>=s&&w<8&&(v/=s,w++),y[0]=Number(v.toFixed(w>0?l:0)),y[1]=10===t&&1===w?o?"kb":"kB":n[g][o?"bits":"bytes"][w],h&&(y[1]="jedec"===g?y[1].charAt(0):w>0?y[1].replace(/B$/,""):y[1],r.test(y[1])&&(y[0]=Math.floor(y[0]),y[1]=""))),u&&(y[0]=-y[0]),y[1]=b[y[1]]||y[1],"array"===f?y:"exponent"===f?w:"object"===f?{value:y[0],suffix:y[1],symbol:y[1]}:(a&&(y[1]=c[w]?c[w]:i[g][w]+(o?"bit":"byte")+(1===y[0]?"":"s")),p.length>0&&(y[0]=y[0].toString().replace(".",p)),y.join(d))}o.partial=function(e){return function(t){return o(t,e)}},e.exports=o}("undefined"!=typeof window&&window)}).call(this,r(12))},function(e,t,r){"use strict";const n=r(143);e.exports=class{constructor(e){this._repo=e,this._bitswap=null}setExchange(e){this._bitswap=e}unsetExchange(){this._bitswap=null}hasExchange(){return null!=this._bitswap}put(e,t){this.hasExchange()?this._bitswap.put(e,t):this._repo.blocks.put(e,t)}putMany(e,t){this.hasExchange()?this._bitswap.putMany(e,t):this._repo.blocks.putMany(e,t)}get(e,t){this.hasExchange()?this._bitswap.get(e,t):this._repo.blocks.get(e,t)}getMany(e,t){Array.isArray(e)?this.hasExchange()?this._bitswap.getMany(e,t):n(e,(e,t)=>this._repo.blocks.get(e,t),t):t(new Error("first arg must be an array of cids"))}delete(e,t){this._repo.blocks.delete(e,t)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,o){o=o||n.default,t=t||[];var s=[],a=0,c=(0,i.default)(r);e(t,function(e,t,r){var n=a++;c(e,function(e,t){s[n]=t,r(e)})},function(e){o(e,s)})};var n=o(r(70)),i=o(r(49));function o(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){(0,o.default)(e,function(){return!t.apply(this,arguments)},r)};var n,i=r(1047),o=(n=i)&&n.__esModule?n:{default:n};e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){r=r||n.default;var a=(0,i.default)(t)?[]:{};e(t,function(e,t,r){(0,s.default)(e)(function(e,n){arguments.length>2&&(n=(0,o.default)(arguments,1)),a[t]=n,r(e)})},function(e){r(e,a)})};var n=a(r(70)),i=a(r(152)),o=a(r(92)),s=a(r(49));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,r,n){return e(t,n)}},e.exports=t.default},function(e,t,r){"use strict";(function(t){const n=r(625),i=r(26),o="/",s=t.from(o),a=s[0];class c{constructor(e,r){if("string"==typeof e?this._buf=t.from(e):t.isBuffer(e)&&(this._buf=e),null==r&&(r=!0),r&&this.clean(),0===this._buf.length||this._buf[0]!==a)throw new Error(`Invalid key: ${this.toString()}`)}toString(e){return this._buf.toString(e||"utf8")}toBuffer(){return this._buf}get[Symbol.toStringTag](){return`[Key ${this.toString()}]`}static withNamespaces(e){return new u(e.join(o))}static random(){return new u(n().replace(/-/g,""))}clean(){for(this._buf&&0!==this._buf.length||(this._buf=t.from(o)),this._buf[0]!==a&&(this._buf=t.concat([s,this._buf]));this._buf.length>1&&this._buf[this._buf.length-1]===a;)this._buf=this._buf.slice(0,-1)}less(e){const t=this.list(),r=e.list();for(let e=0;ei)return!1}return t.length>>((3&t)<<3)&255;return i}}},function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,i=r;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")}},function(e,t,r){"use strict";const n=r(36);e.exports.dbOpenFailedError=(e=>(e=e||new Error("Cannot open database"),n(e,"ERR_DB_OPEN_FAILED"))),e.exports.dbDeleteFailedError=(e=>(e=e||new Error("Delete failed"),n(e,"ERR_DB_DELETE_FAILED"))),e.exports.dbWriteFailedError=(e=>(e=e||new Error("Write failed"),n(e,"ERR_DB_WRITE_FAILED"))),e.exports.notFoundError=(e=>(e=e||new Error("Not Found"),n(e,"ERR_NOT_FOUND")))},function(e,t,r){(function(t){var r="Expected a function",n="__lodash_hash_undefined__",i=1/0,o=9007199254740991,s="[object Function]",a="[object GeneratorFunction]",c="[object Symbol]",u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,f=/^\w*$/,l=/^\./,h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,d=/^\[object .+?Constructor\]$/,g=/^(?:0|[1-9]\d*)$/,b="object"==typeof t&&t&&t.Object===Object&&t,m="object"==typeof self&&self&&self.Object===Object&&self,y=b||m||Function("return this")();var v,w=Array.prototype,A=Function.prototype,_=Object.prototype,S=y["__core-js_shared__"],E=(v=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+v:"",k=A.toString,x=_.hasOwnProperty,C=_.toString,I=RegExp("^"+k.call(x).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),B=y.Symbol,T=w.splice,R=H(y,"Map"),P=H(Object,"create"),O=B?B.prototype:void 0,M=O?O.toString:void 0;function N(e){var t=-1,r=e?e.length:0;for(this.clear();++t-1&&e%1==0&&e-1},D.prototype.set=function(e,t){var r=this.__data__,n=j(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},K.prototype.clear=function(){this.__data__={hash:new N,map:new(R||D),string:new N}},K.prototype.delete=function(e){return z(this,e).delete(e)},K.prototype.get=function(e){return z(this,e).get(e)},K.prototype.has=function(e){return z(this,e).has(e)},K.prototype.set=function(e,t){return z(this,e).set(e,t),this};var V=W(function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(Q(e))return M?M.call(e):"";var t=e+"";return"0"==t&&1/e==-i?"-0":t}(t);var r=[];return l.test(e)&&r.push(""),e.replace(h,function(e,t,n,i){r.push(n?i.replace(p,"$1"):t||e)}),r});function G(e){if("string"==typeof e||Q(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}function W(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(r);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s),s};return n.cache=new(W.Cache||K),n}function Y(e,t){return e===t||e!=e&&t!=t}W.Cache=K;var J=Array.isArray;function Z(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Q(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&C.call(e)==c}e.exports=function(e,t,r){return null==e?e:L(e,t,r)}}).call(this,r(12))},function(e,t,r){(function(t){var r="Expected a function",n="__lodash_hash_undefined__",i=1/0,o=9007199254740991,s="[object Arguments]",a="[object Function]",c="[object GeneratorFunction]",u="[object Symbol]",f=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,h=/^\./,p=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,d=/\\(\\)?/g,g=/^\[object .+?Constructor\]$/,b=/^(?:0|[1-9]\d*)$/,m="object"==typeof t&&t&&t.Object===Object&&t,y="object"==typeof self&&self&&self.Object===Object&&self,v=m||y||Function("return this")();var w,A=Array.prototype,_=Function.prototype,S=Object.prototype,E=v["__core-js_shared__"],k=(w=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||""))?"Symbol(src)_1."+w:"",x=_.toString,C=S.hasOwnProperty,I=S.toString,B=RegExp("^"+x.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),T=v.Symbol,R=S.propertyIsEnumerable,P=A.splice,O=q(v,"Map"),M=q(Object,"create"),N=T?T.prototype:void 0,D=N?N.toString:void 0;function K(e){var t=-1,r=e?e.length:0;for(this.clear();++t-1&&e%1==0&&e-1},U.prototype.set=function(e,t){var r=this.__data__,n=F(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},j.prototype.clear=function(){this.__data__={hash:new K,map:new(O||U),string:new K}},j.prototype.delete=function(e){return H(this,e).delete(e)},j.prototype.get=function(e){return H(this,e).get(e)},j.prototype.has=function(e){return H(this,e).has(e)},j.prototype.set=function(e,t){return H(this,e).set(e,t),this};var G=Y(function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(ee(e))return D?D.call(e):"";var t=e+"";return"0"==t&&1/e==-i?"-0":t}(t);var r=[];return h.test(e)&&r.push(""),e.replace(p,function(e,t,n,i){r.push(n?i.replace(d,"$1"):t||e)}),r});function W(e){if("string"==typeof e||ee(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}function Y(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(r);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s),s};return n.cache=new(Y.Cache||j),n}Y.Cache=j;var J=Array.isArray;function Z(e){var t=X(e)?I.call(e):"";return t==a||t==c}function Q(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function X(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function $(e){return!!e&&"object"==typeof e}function ee(e){return"symbol"==typeof e||$(e)&&I.call(e)==u}e.exports=function(e,t){return null!=e&&V(e,t,L)}}).call(this,r(12))},function(e,t,r){"use strict";const n=r(752);e.exports=((e,t)=>{if(!n(e))throw new TypeError("Expected a plain object");if("function"==typeof(t=t||{}))throw new TypeError("Specify the compare function as an option instead");const r=t.deep,i=[],o=[],s=e=>{const a=i.indexOf(e);if(-1!==a)return o[a];const c={},u=Object.keys(e).sort(t.compare);i.push(e),o.push(c);for(let t=0;t{const n=new i(e).child(new i(a));("function"==typeof t.getRaw?t.getRaw.bind(t):t.get.bind(t))(n,(e,t)=>{if(e)return r(e);let n;try{n=h((t||"").toString().trim())}catch(e){return r(e)}r(null,n)})}),t.readme=o,t.parseShardFun=h,t.Prefix=u,t.Suffix=f,t.NextToLast=l},function(e,t,r){"use strict";var n=function(e,t){return t||(t={}),e.split("").forEach(function(e,r){e in t||(t[e]=r)}),t},i={alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",charmap:{0:14,1:8}};i.charmap=n(i.alphabet,i.charmap);var o={alphabet:"0123456789ABCDEFGHJKMNPQRSTVWXYZ",charmap:{O:0,I:1,L:1}};o.charmap=n(o.alphabet,o.charmap);var s={alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",charmap:{}};function a(e){if(this.buf=[],this.shift=8,this.carry=0,e){switch(e.type){case"rfc4648":this.charmap=t.rfc4648.charmap;break;case"crockford":this.charmap=t.crockford.charmap;break;case"base32hex":this.charmap=t.base32hex.charmap;break;default:throw new Error("invalid type")}e.charmap&&(this.charmap=e.charmap)}}function c(e){if(this.buf="",this.shift=3,this.carry=0,e){switch(e.type){case"rfc4648":this.alphabet=t.rfc4648.alphabet;break;case"crockford":this.alphabet=t.crockford.alphabet;break;case"base32hex":this.alphabet=t.base32hex.alphabet;break;default:throw new Error("invalid type")}e.alphabet?this.alphabet=e.alphabet:e.lc&&(this.alphabet=this.alphabet.toLowerCase())}}s.charmap=n(s.alphabet,s.charmap),a.prototype.charmap=i.charmap,a.prototype.write=function(e){var t=this.charmap,r=this.buf,n=this.shift,i=this.carry;return e.toUpperCase().split("").forEach(function(e){if("="!=e){var o=255&t[e];(n-=5)>0?i|=o<>-n),i=o<<(n+=8)&255):(r.push(i|o),n=8,i=0)}}),this.shift=n,this.carry=i,this},a.prototype.finalize=function(e){return e&&this.write(e),8!==this.shift&&0!==this.carry&&(this.buf.push(this.carry),this.shift=8,this.carry=0),this.buf},c.prototype.alphabet=i.alphabet,c.prototype.write=function(e){var t,r,n,i=this.shift,o=this.carry;for(n=0;n>i,this.buf+=this.alphabet[31&t],i>5&&(t=r>>(i-=5),this.buf+=this.alphabet[31&t]),o=r<<(i=5-i),i=8-i;return this.shift=i,this.carry=o,this},c.prototype.finalize=function(e){return e&&this.write(e),3!==this.shift&&(this.buf+=this.alphabet[31&this.carry],this.shift=3,this.carry=0),this.buf},t.encode=function(e,t){return new c(t).finalize(e)},t.decode=function(e,t){return new a(t).finalize(e)},t.Decoder=a,t.Encoder=c,t.charmap=n,t.crockford=o,t.rfc4648=i,t.base32hex=s},function(e,t,r){t.AbstractLevelDOWN=r(1075),t.AbstractIterator=r(756),t.AbstractChainedBatch=r(757)},function(e,t,r){(function(t){function r(e){this.db=e,this._ended=!1,this._nexting=!1}r.prototype.next=function(e){var r=this;if("function"!=typeof e)throw new Error("next() requires a callback argument");return r._ended?(t.nextTick(e,new Error("cannot call next() after end()")),r):r._nexting?(t.nextTick(e,new Error("cannot call next() before previous next() has completed")),r):(r._nexting=!0,r._next(function(){r._nexting=!1,e.apply(null,arguments)}),r)},r.prototype._next=function(e){t.nextTick(e)},r.prototype.end=function(e){if("function"!=typeof e)throw new Error("end() requires a callback argument");if(this._ended)return t.nextTick(e,new Error("end() already called on iterator"));this._ended=!0,this._end(e)},r.prototype._end=function(e){t.nextTick(e)},e.exports=r}).call(this,r(6))},function(e,t,r){(function(t){function r(e){this._db=e,this._operations=[],this._written=!1}r.prototype._serializeKey=function(e){return this._db._serializeKey(e)},r.prototype._serializeValue=function(e){return this._db._serializeValue(e)},r.prototype._checkWritten=function(){if(this._written)throw new Error("write() already called on this batch")},r.prototype.put=function(e,t){this._checkWritten();var r=this._db._checkKey(e,"key");if(r)throw r;return e=this._serializeKey(e),t=this._serializeValue(t),this._put(e,t),this},r.prototype._put=function(e,t){this._operations.push({type:"put",key:e,value:t})},r.prototype.del=function(e){this._checkWritten();var t=this._db._checkKey(e,"key");if(t)throw t;return e=this._serializeKey(e),this._del(e),this},r.prototype._del=function(e){this._operations.push({type:"del",key:e})},r.prototype.clear=function(){return this._checkWritten(),this._operations=[],this._clear(),this},r.prototype._clear=function(){},r.prototype.write=function(e,r){if(this._checkWritten(),"function"==typeof e&&(r=e),"function"!=typeof r)throw new Error("write() requires a callback argument");return"object"!=typeof e&&(e={}),this._written=!0,"function"==typeof this._write?this._write(r):"function"==typeof this._db._batch?this._db._batch(this._operations,e,r):void t.nextTick(r)},e.exports=r}).call(this,r(6))},function(e,t,r){"use strict";(function(t,n){var i=r(75);e.exports=v;var o,s=r(336);v.ReadableState=y;r(23).EventEmitter;var a=function(e,t){return e.listeners(t).length},c=r(759),u=r(3).Buffer,f=t.Uint8Array||function(){};var l=r(53);l.inherits=r(4);var h=r(1079),p=void 0;p=h&&h.debuglog?h.debuglog("stream"):function(){};var d,g=r(1080),b=r(760);l.inherits(v,c);var m=["error","close","destroy","pause","resume"];function y(e,t){e=e||{};var n=t instanceof(o=o||r(201));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,s=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=r(52).StringDecoder),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function v(e){if(o=o||r(201),!(this instanceof v))return new v(e);this._readableState=new y(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),c.call(this)}function w(e,t,r,n,i){var o,s=e._readableState;null===t?(s.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,E(e)}(e,s)):(i||(o=function(e,t){var r;n=t,u.isBuffer(n)||n instanceof f||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(s,t)),o?e.emit("error",o):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):A(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?A(e,s,t,!1):x(e,s)):A(e,s,t,!1))):n||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=_?e=_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function E(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(k,e):k(e))}function k(e){p("emit readable"),e.emit("readable"),T(e)}function x(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(C,e,t))}function C(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;eo.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0===(e-=s)){s===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,s),0===(e-=s)){s===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(O,t,e))}function O(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function M(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):E(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&P(this),null;var n,i=t.needReadable;return p("need readable",i),(0===t.length||t.length-e0?R(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&P(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,t);var c=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?f:v;function u(t,n){p("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,p("cleanup"),e.removeListener("close",m),e.removeListener("finish",y),e.removeListener("drain",l),e.removeListener("error",b),e.removeListener("unpipe",u),r.removeListener("end",f),r.removeListener("end",v),r.removeListener("data",g),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function f(){p("onend"),e.end()}o.endEmitted?i.nextTick(c):r.once("end",c),e.on("unpipe",u);var l=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,T(e))}}(r);e.on("drain",l);var h=!1;var d=!1;function g(t){p("ondata"),d=!1,!1!==e.write(t)||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==M(o.pipes,e))&&!h&&(p("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function b(t){p("onerror",t),v(),e.removeListener("error",b),0===a(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",y),v()}function y(){p("onfinish"),e.removeListener("close",m),v()}function v(){p("unpipe"),r.unpipe(e)}return r.on("data",g),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",b),e.once("close",m),e.once("finish",y),e.emit("pipe",r),o.flowing||(p("pipe resume"),r.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o-1?n:o.nextTick;y.WritableState=m;var u=r(53);u.inherits=r(4);var f={deprecate:r(202)},l=r(759),h=r(3).Buffer,p=i.Uint8Array||function(){};var d,g=r(760);function b(){}function m(e,t){a=a||r(201),e=e||{};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,u=e.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(u||0===u)?u:f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(o.nextTick(i,n),o.nextTick(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),E(e,t))}(e,r,n,t,i);else{var s=_(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||A(e,r),n?c(w,e,r,s,i):w(e,r,s,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function y(e){if(a=a||r(201),!(d.call(y,this)||this instanceof a))return new y(e);this._writableState=new m(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function v(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function A(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,c=!0;r;)i[a]=r,r.isBuf||(c=!1),r=r.next,a+=1;i.allBuffers=c,v(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,l=r.callback;if(v(e,t,!1,t.objectMode?1:u.length,u,f,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function _(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)})}function E(e,t){var r=_(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(y,l),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===y&&(e&&e._writableState instanceof m)}})):d=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,r){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=e,h.isBuffer(n)||n instanceof p);return a&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=b),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),o.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),o.nextTick(n,s),i=!1),i}(this,i,e,r))&&(i.pendingcb++,s=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,r));return t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var c=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?o.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=g.destroy,y.prototype._undestroy=g.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(6),r(35).setImmediate,r(12))},function(e,t,r){"use strict";e.exports=s;var n=r(201),i=r(53);function o(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length{const r=e+"/repo.lock";o("locking %s",r),s[r]=!0;const n={close(e){s[r]&&delete s[r],i(e)}};i(()=>{t(null,n)})}),t.locked=((e,t)=>{const r=e+"/repo.lock";o("checking lock: %s");const n=s[r];i(()=>{t(null,n)})})},function(e,t){var r=t.once=function(e){return function(t,r){if(t)return r(t);if(null!=e){var n=e;e=null,r(null,n)}else r(!0)}};t.depthFirst=function(e,t){var n,i=[];return i.unshift(r(e)),function e(r,o){return i.length?n?o(n):void i[0](r,function(r,s){if(r){if(!0!==r){for(n=r,i.shift();i.length;)i.shift()(r,function(){});return o(r)}return i.shift(),e(null,o)}i.unshift(t(s)),o(r,s)}):o(!0)}},t.widthFirst=function(e,t){var n=[];return n.push(r(e)),function e(r,i){if(!n.length)return i(!0);n[0](r,function(r,o){if(r)return n.shift(),e(null,i);n.push(t(o)),i(r,o)})}},t.leafFirst=function(e,t){var n=[],i=[];return n.push(r(e)),function e(r,o){n[0](r,function(r,s){if(r)return n.shift(),i.length?o(null,i.shift()):o(!0);n.unshift(t(s)),i.unshift(s),e(null,o)})}}},function(e,t,r){"use strict";(function(n){const i=r(1101),o=r(63),s=r(16),a=r(10),c=r(7),u=r(1111),f=r(778),l=42;function h(e){return"string"==typeof e?e=new s(e).buffer:s.isCID(e)&&(e=e.buffer),new i.Tagged(l,n.concat([n.from("00","hex"),e]))}const p=new i.Decoder({tags:{[l]:e=>(e=e.slice(1),new s(e))}});(t=e.exports).serialize=((e,t)=>{let r;try{const o=function(e){let t;try{t=u(e)}catch(e){t=!1}if(t)throw new Error("The object passed has circular references");return function e(t){if(!t||n.isBuffer(t)||"string"==typeof t)return t;if(Array.isArray(t))return t.map(e);if(s.isCID(t))return h(t);const r=Object.keys(t);if(1===r.length&&"/"===r[0])return h(t["/"]);if(r.length>0){let n={};return r.forEach(r=>{"object"==typeof t[r]?n[r]=e(t[r]):n[r]=t[r]}),n}return t}(e)}(e);r=i.encode(o)}catch(e){return c(()=>t(e))}c(()=>t(null,r))}),t.deserialize=((e,t)=>{let r;try{r=p.decodeFirst(e)}catch(e){return c(()=>t(e))}c(()=>t(null,r))}),t.cid=((e,r,n)=>{"function"==typeof r&&(n=r,r={});const i=(r=r||{}).hashAlg||f.defaultHashAlg,c=void 0===r.version?1:r.version;a([r=>t.serialize(e,r),(e,t)=>o(e,i,t),(e,t)=>t(null,new s(c,f.multicodec,e))],n)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t,n){const i=r(1103),o=r(337),s=r(1104),a=r(631),c=r(338),u=r(776),f=r(777),l=r(290);class h{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=>c.NEG_ONE.minus(a.arrayBufferToBignumber(e)),4:e=>c.TEN.pow(e[0]).times(e[1]),5:e=>c.TWO.pow(e[0]).times(e[1]),32:e=>l.parse(e),35:e=>new RegExp(e)},e.tags),this.parser=s(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 ${e.length} elements`);switch(e.type){case c.PARENT.TAG:this._push(this.createTag(e.ref[0],e.ref[1]));break;case c.PARENT.BYTE_STRING:this._push(this.createByteString(e.ref,e.length));break;case c.PARENT.UTF8_STRING:this._push(this.createUtf8String(e.ref,e.length));break;case c.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 c.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 c.PARENT.ARRAY:this._push(this.createArray(e.ref,e.length))}this._currentParent&&this._currentParent.type===c.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 c.PARENT.ARRAY:case c.PARENT.BYTE_STRING:case c.PARENT.UTF8_STRING:r.length>-1?this._ref[this._ref.length-r.length]=e:this._ref.push(e),this._dec();break;case c.PARENT.OBJECT:null!=r.tmpKey?(this._ref[r.tmpKey]=e,r.tmpKey=null,this._dec()):(r.tmpKey=e,"string"!=typeof r.tmpKey&&(r.type=c.PARENT.MAP,r.ref=a.buildMap(r.ref)));break;case c.PARENT.MAP:null!=r.tmpKey?(this._ref.set(r.tmpKey,e),r.tmpKey=null,this._dec()):r.tmpKey=e;break;case c.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:c.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,o,s,a,c){return i.read([e,t,r,n,o,s,a,c],0,!1,52,8)}createInt32Neg(e,t){return-1-a.buildInt32(e,t)}createInt64Neg(e,t,r,n){const i=a.buildInt32(e,t),s=a.buildInt32(r,n);return i>c.MAX_SAFE_HIGH?c.NEG_ONE.minus(new o(i).times(c.SHIFT32).plus(s)):-1-(i*c.SHIFT32+s)}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 u(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,o,s,a){this._push(this.createFloatDouble(e,t,r,n,i,o,s,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([],c.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:c.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:c.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:c.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({},c.PARENT.OBJECT,e):this._push(this.createObject({}))}_createArrayStartFixed(e){0!==e?this._createParent(new Array(e),c.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 h({size:e.length}).decodeFirst(e)}static decodeAll(e,r){return"string"==typeof e&&(e=t.from(e,r||"hex")),new h({size:e.length}).decodeAll(e)}}h.decodeFirst=h.decode,e.exports=h}).call(this,r(0).Buffer,r(12))},function(e,t,r){"use strict";const n=r(338),i=n.MT,o=n.SIMPLE,s=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 o.FALSE:return!1;case o.TRUE:return!0;case o.NULL:return t?null:s.NULL;case o.UNDEFINED:return t?void 0:s.UNDEFINED;case-1:if(!t)throw new Error("Invalid BREAK");return s.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`${this.tag}(${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(e){return t=e,this.err=t,this}}}e.exports=n},function(e,t,r){"use strict";(function(n){const i=r(774),o=r(779),s=r(16);(t=e.exports).multicodec="dag-cbor",t.defaultHashAlg="sha2-256",t.resolve=((e,t,r)=>{"function"==typeof t&&(r=t,t=void 0),i.deserialize(e,(e,i)=>{if(e)return r(e);if(!t||"/"===t)return r(null,{value:i,remainderPath:""});const s=t.split("/"),a=o(i).get(s);if(void 0!==a)return r(null,{value:a,remainderPath:""});let c,u=s.length;for(let e=0;e{"function"==typeof t&&(r=t,t=void 0),t=t||{},i.deserialize(e,(e,t)=>{if(e)return r(e);const n=function(e,t){return t=t||"/",0===Object.keys(e).length?[]:o(e).reduce(function(e,r){s.isCID(r)&&this.update(void 0);const n=this.path.join(t);return""!==n&&e.push({path:n,value:r}),e},[])}(t).map(e=>e.path);r(null,n)})}),t.isLink=((e,r,n)=>{t.resolve(e,r,(e,t)=>e?n(e):t.remainderPath.length>0?n(new Error("path out of scope")):void(s.isCID(t.value)?n(null,t.value):n(null,!1)))})}).call(this,r(0).Buffer)},function(e,t){var r=e.exports=function(e){return new n(e)};function n(e){this.value=e}function i(e,t,r){var n=[],i=[],a=!0;return function e(l){var h=r?o(l):l,p={},d=!0,g={node:h,node_:l,path:[].concat(n),parent:i[i.length-1],parents:i,key:n.slice(-1)[0],isRoot:0===n.length,level:n.length,circular:null,update:function(e,t){g.isRoot||(g.parent.node[g.key]=e),g.node=e,t&&(d=!1)},delete:function(e){delete g.parent.node[g.key],e&&(d=!1)},remove:function(e){c(g.parent.node)?g.parent.node.splice(g.key,1):delete g.parent.node[g.key],e&&(d=!1)},keys:null,before:function(e){p.before=e},after:function(e){p.after=e},pre:function(e){p.pre=e},post:function(e){p.post=e},stop:function(){a=!1},block:function(){d=!1}};if(!a)return g;function b(){if("object"==typeof g.node&&null!==g.node){g.keys&&g.node_===g.node||(g.keys=s(g.node)),g.isLeaf=0==g.keys.length;for(var e=0;e{n([t=>o.deserialize(e,t),(e,n)=>{if(!t)return r(null,{value:e,remainderPath:""});const i=t.split("/");if("Links"===i[0]){let t="";if(!i[1])return n(null,{value:e.links.map(e=>e.toJSON()),remainderPath:""});const r={};e.links.forEach((e,t)=>{const n=e.toJSON();r[t]=r[n.name]={cid:n.cid,name:n.name,size:n.size}});let o=r[i[1]];"Hash"===i[2]?o={"/":o.cid}:"Tsize"===i[2]?o=o.size:"Name"===i[2]&&(o=o.name),n(null,{value:o,remainderPath:t=i.slice(3).join("/")})}else if("Data"===i[0])n(null,{value:e.data,remainderPath:""});else{const t={};e.links.forEach((e,r)=>{const n=e.toJSON();t[n.name]={cid:n.cid,name:n.name,size:n.size}});const r=t[i[0]];if(r)return n(null,{value:{"/":r.cid},remainderPath:i.slice(1).join("/")});n(new Error("path not available"))}}],r)}),t.tree=((e,t,r)=>{"function"==typeof t&&(r=t,t={}),t=t||{},o.deserialize(e,(e,t)=>{if(e)return r(e);const n=[];n.push("Links"),t.links.forEach((e,t)=>{n.push(`Links/${t}/Name`),n.push(`Links/${t}/Tsize`),n.push(`Links/${t}/Hash`)}),n.push("Data"),r(null,n)})}),t.isLink=((e,r,n)=>{t.resolve(e,r,(e,t)=>{if(e)return n(e);if(t.remainderPath.length>0)return n(new Error("path out of scope"));if("object"==typeof t.value&&t.value["/"]){let r;try{r=i.isCID(new i(t.value["/"]))}catch(e){r=!1}if(r)return n(null,t.value)}n(null,!1)})})},function(e,t,r){"use strict";(function(e){const n=r(632),i=r(633)(),o=r(1121),s={SHA1:"SHA-1",SHA256:"SHA-256",SHA512:"SHA-512"};t.create=function(t,r,a){const c=s[t];n(i.subtle.importKey("raw",r,{name:"HMAC",hash:{name:c}},!1,["sign"]).then(r=>({digest(t,o){((t,r,o)=>{n(i.subtle.sign({name:"HMAC"},t,r).then(t=>e.from(t)),o)})(r,t,o)},length:o[t]})),a)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(24),i=r(1126);function o(e,t,r,i){if("function"==typeof r&&(i=r,r=void 0),!i)throw new Error("Missing callback");o.digest(e,t,r,(e,o)=>{if(e)return i(e);i(null,n.encode(o,t,r))})}e.exports=o,o.Buffer=t,o.multihash=n,o.digest=function(e,t,r,n){if("function"==typeof r&&(n=r,r=void 0),!n)throw new Error("Missing callback");let i,s=n;r&&(s=((e,t)=>{if(e)return n(e);n(null,t.slice(0,r))}));try{i=o.createHash(t)}catch(e){return s(e)}i(e,s)},o.createHash=function(e){if(e=n.coerceCode(e),!o.functions[e])throw new Error("multihash function "+e+" not yet supported");return o.functions[e]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(7);t.toCallback=(e=>(function(t,r){const i=(e,t)=>n(()=>{r(e,t)});let o;try{o=e(t)}catch(e){return void i(e)}i(null,o)})),t.toBuf=((t,r)=>n=>{let i=t(n,r);return e.from(i,"hex")}),t.fromString=((t,r)=>n=>{const i=e.isBuffer(n)?n.toString():n;return t(i,r)}),t.fromNumberTo32BitBuf=((t,r)=>n=>{let i=t(n,r);const o=new Array(4);for(let e=0;e<4;e++)o[e]=255&i,i>>=8;return e.from(o)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(632),i=r(633)();function o(e){return Promise.all([i.subtle.exportKey("jwk",e.privateKey),i.subtle.exportKey("jwk",e.publicKey)])}t.utils=r(1129),t.generateKey=function(e,t){n(i.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(o).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.unmarshalPrivateKey=function(e,t){const r=i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);var s;n(Promise.all([r,(s=e,i.subtle.importKey("jwk",{kty:s.kty,n:s.n,e:s.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]))]).then(e=>o({privateKey:e[0],publicKey:e[1]})).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.getRandomValues=function(t){return e.from(i.getRandomValues(t))},t.hashAndSign=function(t,r,o){n(i.subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]).then(e=>i.subtle.sign({name:"RSASSA-PKCS1-v1_5"},e,Uint8Array.from(r))).then(t=>e.from(t)),o)},t.hashAndVerify=function(e,t,r,o){n(i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]).then(e=>i.subtle.verify({name:"RSASSA-PKCS1-v1_5"},e,t,r)),o)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(21).bignum;t.toBase64=function(t,r){return t.toArrayLike(e,"be",r).toString("base64").replace(/(=*)$/,"").replace(/\+/g,"-").replace(/\//g,"_")},t.toBn=function(t){return new n(e.from(t,"base64"))}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(784);e.exports=function(e){if(!e||"number"!=typeof e)throw new Error("first argument must be a Number bigger than 0");return n.getRandomValues(new Uint8Array(e))}},function(e,t,r){"use strict";const n=r(1136);e.exports={ensureMultiaddr:function(e){return n.isMultiaddr(e)?e:n(e)}}},function(e,t,r){"use strict";(function(e){const n=r(636),i=r(637)(),o=r(1140),s={SHA1:"SHA-1",SHA256:"SHA-256",SHA512:"SHA-512"};t.create=function(t,r,a){const c=s[t];n(i.subtle.importKey("raw",r,{name:"HMAC",hash:{name:c}},!1,["sign"]).then(r=>({digest(t,o){((t,r,o)=>{n(i.subtle.sign({name:"HMAC"},t,r).then(t=>e.from(t)),o)})(r,t,o)},length:o[t]})),a)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(636),i=r(637)();function o(e){return Promise.all([i.subtle.exportKey("jwk",e.privateKey),i.subtle.exportKey("jwk",e.publicKey)])}t.utils=r(1145),t.generateKey=function(e,t){n(i.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(o).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.unmarshalPrivateKey=function(e,t){const r=i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);var s;n(Promise.all([r,(s=e,i.subtle.importKey("jwk",{kty:s.kty,n:s.n,e:s.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]))]).then(e=>o({privateKey:e[0],publicKey:e[1]})).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.getRandomValues=function(t){return e.from(i.getRandomValues(t))},t.hashAndSign=function(t,r,o){n(i.subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]).then(e=>i.subtle.sign({name:"RSASSA-PKCS1-v1_5"},e,Uint8Array.from(r))).then(t=>e.from(t)),o)},t.hashAndVerify=function(e,t,r,o){n(i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]).then(e=>i.subtle.verify({name:"RSASSA-PKCS1-v1_5"},e,t,r)),o)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(21).bignum;t.toBase64=function(t,r){return t.toArrayLike(e,"be",r).toString("base64").replace(/(=*)$/,"").replace(/\+/g,"-").replace(/\//g,"_")},t.toBn=function(t){return new n(e.from(t,"base64"))}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(789);e.exports=function(e){if(!e||"number"!=typeof e)throw new Error("first argument must be a Number bigger than 0");return n.getRandomValues(new Uint8Array(e))}},function(e,t,r){var n;n=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.i=function(e){return e},r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get: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=32)}([function(e,t,r){"use strict";(function(e,n){var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=r(17),s=r(15),a=r(37),c=r(16),u=r(18),f={};t.clone=function(r,n){if("object"!==(void 0===r?"undefined":i(r))||null===r)return r;var o=(n=n||new Map).get(r);if(o)return o;var s=void 0,a=!1;if(Array.isArray(r))s=[],a=!0;else if(e.isBuffer(r))s=e.from(r);else if(r instanceof Date)s=new Date(r.getTime());else if(r instanceof RegExp)s=new RegExp(r);else{var c=Object.getPrototypeOf(r);c&&c.isImmutable?s=r:(s=Object.create(c),a=!0)}if(n.set(r,s),a)for(var u=Object.getOwnPropertyNames(r),f=0;f1||!n.part&&!l[k])return!1;return(!n.only||!f)&&E},t.flatten=function(e,r){for(var n=r||[],i=0;i1?r-1:0),i=1;i\?@\[\]\^`\{\|\}~\"\\]*$/.test(e),"Bad attribute value ("+e+")"),e.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')},t.escapeHtml=function(e){return u.escapeHtml(e)},t.escapeJavaScript=function(e){return u.escapeJavaScript(e)},t.escapeJson=function(e){return u.escapeJson(e)},t.once=function(e){if(e._hoekOnce)return e;var t=!1,r=function(){if(!t){t=!0;for(var r=arguments.length,n=Array(r),i=0;i1;)g[d=h.shift()]||(g[d]={}),g=g[d];g[d=h.shift()]=t.reach(e,p,n)}return c},t.uniqueFilename=function(e,t){t=t?"."!==t[0]?"."+t:t:"",e=a.resolve(e);var r=[Date.now(),n.pid,s.randomBytes(8).toString("hex")].join("-")+t;return a.join(e,r)},t.stringify=function(){try{for(var e=arguments.length,t=Array(e),r=0;r4&&void 0!==arguments[4]?arguments[4]:this._flags;return c.create(e,t,r,n,i)},e.prototype.createOverrideError=function(e,t,r,n,i,o){return c.create(e,t,r,n,this._flags,i,o)},e.prototype.checkOptions=function(e){var t=r(21).options.validate(e);if(t.error)throw new Error(t.error.details[0].message)},e.prototype.clone=function(){var e=Object.create(Object.getPrototypeOf(this));e.isJoi=!0,e._currentJoi=this._currentJoi,e._type=this._type,e._settings=this._settings,e._baseType=this._baseType,e._valids=this._valids.slice(),e._invalids=this._invalids.slice(),e._tests=this._tests.slice(),e._refs=this._refs.slice(),e._flags=o.clone(this._flags),e._description=this._description,e._unit=this._unit,e._notes=this._notes.slice(),e._tags=this._tags.slice(),e._examples=this._examples.slice(),e._meta=this._meta.slice(),e._inner={};for(var t=Object.keys(this._inner),r=0;r=0?p[d[m]]={key:m,schema:p[d[m]].schema.concat(h[b].schema)}:p.push(h[b])}}else t._inner[f]=t._inner[f].concat(h);else t._inner[f]=h.slice()}}return t},e.prototype._test=function(e,t,r,n){var i=this.clone();return i._tests.push({func:r,name:e,arg:t,options:n}),i},e.prototype.options=function(e){o.assert(!e.context,"Cannot override context"),this.checkOptions(e);var t=this.clone();return t._settings=s.concat(t._settings,e),t},e.prototype.strict=function(e){var t=this.clone(),r=void 0!==e&&!e;return t._settings=s.concat(t._settings,{convert:r}),t},e.prototype.raw=function(e){var t=void 0===e||e;if(this._flags.raw===t)return this;var r=this.clone();return r._flags.raw=t,r},e.prototype.error=function(e){o.assert(e&&(e instanceof Error||"function"==typeof e),"Must provide a valid Error object or a function");var t=this.clone();return t._flags.error=e,t},e.prototype.allow=function(){for(var e=arguments.length,t=Array(e),r=0;r0,"description must be provided when default value is a function"));var r=this.clone();return r._flags.default=e,a.push(r._refs,e),r},e.prototype.empty=function(e){var t=this.clone();return void 0===e?delete t._flags.empty:t._flags.empty=f.schema(this._currentJoi,e),t},e.prototype.when=function(e,t){o.assert(t&&"object"===(void 0===t?"undefined":n(t)),"Invalid options"),o.assert(void 0!==t.then||void 0!==t.otherwise,'options must have at least one of "then" or "otherwise"');var i=t.hasOwnProperty("then")?this.concat(f.schema(this._currentJoi,t.then)):void 0,s=t.hasOwnProperty("otherwise")?this.concat(f.schema(this._currentJoi,t.otherwise)):void 0;u=u||r(10);var a={then:i,otherwise:s};Object.prototype.hasOwnProperty.call(t,"is")&&(a.is=t.is);var c=u.when(e,a);return c._flags.presence="ignore",c._baseType=this,c},e.prototype.description=function(e){o.assert(e&&"string"==typeof e,"Description must be a non-empty string");var t=this.clone();return t._description=e,t},e.prototype.notes=function(e){o.assert(e&&("string"==typeof e||Array.isArray(e)),"Notes must be a non-empty string or array");var t=this.clone();return t._notes=t._notes.concat(e),t},e.prototype.tags=function(e){o.assert(e&&("string"==typeof e||Array.isArray(e)),"Tags must be a non-empty string or array");var t=this.clone();return t._tags=t._tags.concat(e),t},e.prototype.meta=function(e){o.assert(void 0!==e,"Meta cannot be undefined");var t=this.clone();return t._meta=t._meta.concat(e),t},e.prototype.example=function(){o.assert(1===arguments.length,"Missing example");var e=arguments.length<=0?void 0:arguments[0],t=this.clone();return t._examples.push(e),t},e.prototype.unit=function(e){o.assert(e&&"string"==typeof e,"Unit name must be a non-empty string");var t=this.clone();return t._unit=e,t},e.prototype._prepareEmptyValue=function(e){return"string"==typeof e&&this._flags.trim?e.trim():e},e.prototype._validate=function(e,t,r,n){var i=this,u=e;t=t||{key:"",path:[],parent:null,reference:n},this._settings&&(r=s.concat(r,this._settings));var f=[],h=function(){var n=void 0;if(void 0!==e)n=i._flags.raw?u:e;else if(r.noDefaults)n=e;else if(a.isRef(i._flags.default))n=i._flags.default(t.parent,r);else if("function"!=typeof i._flags.default||i._flags.func&&!i._flags.default.description)n=o.clone(i._flags.default);else{var s=void 0;null!==t.parent&&i._flags.default.length>0&&(s=[o.clone(t.parent),r]);var c=l._try(i._flags.default,s);n=c.value,c.error&&f.push(i.createError("any.default",{error:c.error},t,r))}if(f.length&&"function"==typeof i._flags.error){var h=i._flags.error.call(i,f);f="string"==typeof h?[i.createOverrideError("override",{reason:f},t,r,h)]:[].concat(h).map(function(e){return e instanceof Error?e:i.createOverrideError(e.type||"override",e.context,t,r,e.message,e.template)})}return{value:i._flags.strip?void 0:n,finalValue:n,errors:f.length?f:null}};if(this._coerce){var p=this._coerce.call(this,e,t,r);if(p.errors)return e=p.value,f=f.concat(p.errors),h();e=p.value}this._flags.empty&&!this._flags.empty._validate(this._prepareEmptyValue(e),null,l.defaults).errors&&(e=void 0);var d=this._flags.presence||r.presence;if("optional"===d){if(void 0===e){if(!(this._flags.hasOwnProperty("default")&&void 0===this._flags.default)||"object"!==this._type)return h();e={}}}else{if("required"===d&&void 0===e)return f.push(this.createError("any.required",null,t,r)),h();if("forbidden"===d)return void 0===e?h():(f.push(this.createError("any.unknown",null,t,r)),h())}if(this._valids.has(e,t,r,this._flags.insensitive))return h();if(this._invalids.has(e,t,r,this._flags.insensitive)&&(f.push(this.createError(""===e?"any.empty":"any.invalid",{value:e,invalids:this._invalids.values({stripUndefined:!0})},t,r)),r.abortEarly||void 0===e))return h();if(this._base){var g=this._base.call(this,e,t,r);if(g.errors)return e=g.value,f=f.concat(g.errors),h();if(g.value!==e){if(e=g.value,this._valids.has(e,t,r,this._flags.insensitive))return h();if(this._invalids.has(e,t,r,this._flags.insensitive)&&(f.push(this.createError(""===e?"any.empty":"any.invalid",{value:e,invalids:this._invalids.values({stripUndefined:!0})},t,r)),r.abortEarly))return h()}}if(this._flags.allowOnly&&(f.push(this.createError("any.allowOnly",{value:e,valids:this._valids.values({stripUndefined:!0})},t,r)),r.abortEarly))return h();for(var b=0;b - * @license MIT - */ -var n=r(33),i=r(34),o=r(35);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function d(e,t){if(c.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 F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return L(e).length;default:if(n)return F(e).length;t=(""+t).toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function b(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=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){var o,s=1,a=e.length,c=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;s=2,a/=2,c/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var f=-1;for(o=r;oa&&(r=a-c),o=r;o>=0;o--){for(var l=!0,h=0;hi&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function E(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function k(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+l<=r)switch(l){case 1:u<128&&(f=u);break;case 2:128==(192&(o=e[i+1]))&&(c=(31&u)<<6|63&o)>127&&(f=c);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(c=(15&u)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(f=c);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(f=c)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(e){var t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);var r="",n=0;for(;nthis.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 B(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return C(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},c.prototype.compare=function(e,t,r,n,i){if(!c.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 o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(o,s),u=this.slice(n,i),f=e.slice(t,r),l=0;li)&&(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 o=!1;;)switch(n){case"hex":return y(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":return w(this,e,t,r);case"latin1":case"binary":return A(this,e,t,r);case"base64":return _(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function C(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,r,n,i,o){if(!c.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 O(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function M(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function N(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(e,t,r,n,o){return o||N(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function K(e,t,r,n,o){return o||N(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.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},c.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||R(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||R(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||P(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);P(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);P(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,r){return D(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return D(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return K(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return K(this,e,t,!1,r)},c.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(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.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;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function L(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).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(t,r(5))},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(0),o=r(1);t.schema=function(e,t){return null!=t&&"object"===(void 0===t?"undefined":n(t))?t.isJoi?t:Array.isArray(t)?e.alternatives().try(t):t instanceof RegExp?e.string().regex(t):t instanceof Date?e.date().valid(t):e.object().keys(t):"string"==typeof t?e.string().valid(t):"number"==typeof t?e.number().valid(t):"boolean"==typeof t?e.boolean().valid(t):o.isRef(t)?e.valid(t):(i.assert(null===t,"Invalid schema content:",t),e.valid(null))},t.ref=function(e){return o.isRef(e)?e:o.create(e)}},function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var i=r(0),o=r(20),s={annotations:Symbol("joi-annotations"),stringify:function(e,r){var i=void 0===e?"undefined":n(e);if(null===e)return"null";if("string"===i)return e;if(e instanceof t.Err||"function"===i||"symbol"===i)return e.toString();if("object"===i){if(Array.isArray(e)){for(var o="",a=0;a2&&"!"===t[0]&&"!"===t[1];if(u&&(t=t.slice(2)),!c&&!u){var f=i.reach(r,"key");t="string"==typeof f?f+t:i.reach(o.errors,"key")+t}return t.replace(/\{\{(\!?)([^}]+)\}\}/g,function(t,r,o){var a=i.reach(e.context,o),c=s.stringify(a,n);return r&&e.options.escapeHtml?i.escapeHtml(c):c})},e}(),t.create=function(e,r,n,i,o,s,a){return new t.Err(e,r,n,i,o,s,a)},t.process=function(e,t){if(!e||!e.length)return null;var r="",n=[],i=function e(t,i){for(var o=0;o0){var o=t.indexOf(this);~o?(t.length=o+1,e.length=o+1,e[o]=r):(t.push(this),e.push(r)),~t.indexOf(i)&&(i=function(r,n){return t[0]===n?"[Circular ~]":"[Circular ~."+e.slice(0,t.indexOf(n)).join(".")+"]"}.call(this,r,i))}else t.push(i);if(i){var a=i[s.annotations];if(a){if(Array.isArray(i)){for(var c=[],u=0;u=0;--c)for(var u=c+1,f=this.details[c],l=f.path,h=a,p=0;;++p){var d=l[p];if(h.isImmutable&&(h=h.clone()),!(p+11)for(var r=1;r0,"You need to provide at least one extension"),this.assert(d,t.extensionsSchema);var g=Object.create(this.any());n(g,this);for(var b=function(r){var u=d[r];"function"==typeof u&&(u=u(g)),e.assert(u,t.extensionSchema);var p=(u.base||e.any()).clone(),b=p.constructor,m=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r,i,o,s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this));return u.base&&n(s,p),s._type=u.name,u.language&&(s._settings=l.concat(s._settings,{language:(r={},i=u.name,o=u.language,i in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o,r)})),s}return i(t,e),t}(b);if(u.coerce&&(m.prototype._coerce=function(e,t,r){if(b.prototype._coerce){var n=b.prototype._coerce.call(this,e,t,r);if(n.errors)return n;e=n.value}var i=u.coerce.call(this,e,t,r);return i instanceof c.Err?{value:e,errors:i}:{value:i}}),u.pre&&(m.prototype._base=function(e,t,r){if(b.prototype._base){var n=b.prototype._base.call(this,e,t,r);if(n.errors)return n;e=n.value}var i=u.pre.call(this,e,t,r);return i instanceof c.Err?{value:e,errors:i}:{value:i}}),u.rules)for(var y=function(t){var r=u.rules[t],n=r.params?r.params instanceof s?r.params._inner.children.map(function(e){return e.key}):Object.keys(r.params):[],i=r.params?a.schema(e,r.params):null;m.prototype[r.name]=function(){for(var e=arguments.length,t=Array(e),a=0;an.length)throw new Error("Unexpected number of arguments");for(var c=!1,u={},l=0;l0&&void 0!==arguments[0]?arguments[0]:"javascript",t=["javascript","unix"];if(a.assert(t.includes(e),'"type" must be one of "'+t.join('", "')+'"'),this._flags.timestamp===e)return this;var r=this.clone();return r._flags.timestamp=e,r._flags.multiplier="unix"===e?1e3:1,r},t.prototype._isIsoDate=function(e){return c.isoDate.test(e)},t}(o),c.compare=function(e,t){return function(r){var n="now"===r,i=s.isRef(r);return n||i||(r=c.Date.toDate(r)),a.assert(r,"Invalid date format"),this._test(e,r,function(o,s,a){var u=void 0;if(n)u=Date.now();else if(i){if(!(u=c.Date.toDate(r(s.reference||s.parent,a))))return this.createError("date.ref",{ref:r.key},s,a);u=u.getTime()}else u=r.getTime();return t(o.getTime(),u)?o:this.createError("date."+e,{limit:new Date(u)},s,a)})}},c.Date.prototype.min=c.compare("min",function(e,t){return e>=t}),c.Date.prototype.max=c.compare("max",function(e,t){return e<=t}),c.Date.prototype.greater=c.compare("greater",function(e,t){return e>t}),c.Date.prototype.less=c.compare("less",function(e,t){return e=0,"limit must be a positive integer"),this._test("length",e,function(t,r,n){return Object.keys(t).length===e?t:this.createError("object.length",{limit:e},r,n)})},t.prototype.min=function(e){return o.assert(Number.isSafeInteger(e)&&e>=0,"limit must be a positive integer"),this._test("min",e,function(t,r,n){return Object.keys(t).length>=e?t:this.createError("object.min",{limit:e},r,n)})},t.prototype.max=function(e){return o.assert(Number.isSafeInteger(e)&&e>=0,"limit must be a positive integer"),this._test("max",e,function(t,r,n){return Object.keys(t).length<=e?t:this.createError("object.max",{limit:e},r,n)})},t.prototype.pattern=function(e,t){var r=e instanceof RegExp;o.assert(r||e instanceof a,"pattern must be a regex or schema"),o.assert(void 0!==t,"Invalid rule"),r&&(e=new RegExp(e.source,e.ignoreCase?"i":void 0));try{t=u.schema(this._currentJoi,t)}catch(e){throw e.hasOwnProperty("path")&&(e.message=e.message+"("+e.path+")"),e}var n=this.clone();return r?n._inner.patterns.push({regex:e,rule:t}):n._inner.patterns.push({schema:e,rule:t}),n},t.prototype.schema=function(){return this._test("schema",null,function(e,t,r){return e instanceof a?e:this.createError("object.schema",null,t,r)})},t.prototype.with=function(e,t){return o.assert(2===arguments.length,"Invalid number of arguments, expected 2."),this._dependency("with",e,t)},t.prototype.without=function(e,t){return o.assert(2===arguments.length,"Invalid number of arguments, expected 2."),this._dependency("without",e,t)},t.prototype.xor=function(){for(var e=arguments.length,t=Array(e),r=0;r0,"expected at least one children");var i=f.groupChildren(e),s=void 0;if(""in i?(s=this[t].apply(this,r),delete i[""]):s=this.clone(),s._inner.children){n=n?n+".":"";for(var a=0;a0&&(t.renames=o.clone(this._inner.renames)),t},t.prototype.assert=function(e,t,r){e=u.ref(e),o.assert(e.isContext||e.depth>1,"Cannot use assertions for root level references - use direct key rules instead"),r=r||"pass the assertion test";try{t=u.schema(this._currentJoi,t)}catch(e){throw e.hasOwnProperty("path")&&(e.message=e.message+"("+e.path+")"),e}var n=e.path[e.path.length-1],i=e.path.join(".");return this._test("assert",{schema:t,ref:e},function(s,a,c){if(!t._validate(e(s),null,c,s).errors)return s;var u=o.merge({},a);return u.key=n,u.path=e.path,this.createError("object.assert",{ref:i,message:r},u,c)})},t.prototype.type=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.name;o.assert("function"==typeof e,"type must be a constructor function");var r={name:t,ctor:e};return this._test("type",r,function(t,n,i){return t instanceof e?t:this.createError("object.type",{type:r.name},n,i)})},t}(a),f.safeParse=function(e){try{return JSON.parse(e)}catch(e){}return e},f.renameDefaults={alias:!1,multiple:!1,override:!1},f.groupChildren=function(e){e.sort();for(var t={},r=0;r=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),c=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&t._extend(n,r),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),f(n,e,n.depth)}function c(e,t){var r=a.styles[t];return r?"["+a.colors[r][0]+"m"+e+"["+a.colors[r][1]+"m":e}function u(e,t){return e}function f(e,r,n){if(e.customInspect&&r&&S(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return m(i)||(i=f(e,i,n)),i}var o=function(e,t){if(y(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(b(t))return e.stylize(""+t,"number");if(d(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,r);if(o)return o;var s=Object.keys(r),a=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),_(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(S(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(v(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(A(r))return e.stylize(Date.prototype.toString.call(r),"date");if(_(r))return l(r)}var u,w="",E=!1,k=["{","}"];(p(r)&&(E=!0,k=["[","]"]),S(r))&&(w=" [Function"+(r.name?": "+r.name:"")+"]");return v(r)&&(w=" "+RegExp.prototype.toString.call(r)),A(r)&&(w=" "+Date.prototype.toUTCString.call(r)),_(r)&&(w=" "+l(r)),0!==s.length||E&&0!=r.length?n<0?v(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),u=E?function(e,t,r,n,i){for(var o=[],s=0,a=t.length;s=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(u,w,k)):k[0]+w+k[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,i,o){var s,a,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),C(n,i)||(s="["+i+"]"),a||(e.seen.indexOf(c.value)<0?(a=g(r)?f(e,c.value,null):f(e,c.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n")):a=e.stylize("[Circular]","special")),y(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function p(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function g(e){return null===e}function b(e){return"number"==typeof e}function m(e){return"string"==typeof e}function y(e){return void 0===e}function v(e){return w(e)&&"[object RegExp]"===E(e)}function w(e){return"object"==typeof e&&null!==e}function A(e){return w(e)&&"[object Date]"===E(e)}function _(e){return w(e)&&("[object Error]"===E(e)||e instanceof Error)}function S(e){return"function"==typeof e}function E(e){return Object.prototype.toString.call(e)}function k(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(y(o)&&(o=n.env.NODE_DEBUG||""),e=e.toUpperCase(),!s[e])if(new RegExp("\\b"+e+"\\b","i").test(o)){var r=n.pid;s[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else s[e]=function(){};return s[e]},t.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=d,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=b,t.isString=m,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=y,t.isRegExp=v,t.isObject=w,t.isDate=A,t.isError=_,t.isFunction=S,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(40);var x=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(e=new Date,r=[k(e.getHours()),k(e.getMinutes()),k(e.getSeconds())].join(":"),[e.getDate(),x[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(39),t._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(t,r(5),r(7))},function(e,t,r){"use strict";(function(t){ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -function n(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i=0;u--)if(f[u]!==l[u])return!1;for(u=f.length-1;u>=0;u--)if(c=f[u],!y(e[c],t[c],r,n))return!1;return!0}(e,t,r,s))}return r?e===t:e==t}function v(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function A(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&b(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!e&&i&&!r;if((!e&&o.isError(i)&&s&&w(i,r)||a)&&b(i,r,"Got unwanted exception"+n),e&&i&&r&&!w(i,r)||!e&&i)throw i}l.AssertionError=function(e){var t;this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=d(g((t=this).actual),128)+" "+t.operator+" "+d(g(t.expected),128),this.generatedMessage=!0);var r=e.stackStartFunction||b;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var i=n.stack,o=p(r),s=i.indexOf("\n"+o);if(s>=0){var a=i.indexOf("\n",s+1);i=i.substring(a+1)}this.stack=i}}},o.inherits(l.AssertionError,Error),l.fail=b,l.ok=m,l.equal=function(e,t,r){e!=t&&b(e,t,r,"==",l.equal)},l.notEqual=function(e,t,r){e==t&&b(e,t,r,"!=",l.notEqual)},l.deepEqual=function(e,t,r){y(e,t,!1)||b(e,t,r,"deepEqual",l.deepEqual)},l.deepStrictEqual=function(e,t,r){y(e,t,!0)||b(e,t,r,"deepStrictEqual",l.deepStrictEqual)},l.notDeepEqual=function(e,t,r){y(e,t,!1)&&b(e,t,r,"notDeepEqual",l.notDeepEqual)},l.notDeepStrictEqual=function e(t,r,n){y(t,r,!0)&&b(t,r,n,"notDeepStrictEqual",e)},l.strictEqual=function(e,t,r){e!==t&&b(e,t,r,"===",l.strictEqual)},l.notStrictEqual=function(e,t,r){e===t&&b(e,t,r,"!==",l.notStrictEqual)},l.throws=function(e,t,r){A(!0,e,t,r)},l.doesNotThrow=function(e,t,r){A(!1,e,t,r)},l.ifError=function(e){if(e)throw e};var _=Object.keys||function(e){var t=[];for(var r in e)s.call(e,r)&&t.push(r);return t}}).call(t,r(5))},function(e,t,r){"use strict";(function(e){var r={};t.escapeJavaScript=function(e){if(!e)return"";for(var t="",n=0;n&\u2028\u2029]/g,function(e){return 60===(t=e.charCodeAt(0))?"\\u003c":62===t?"\\u003e":38===t?"\\u0026":8232===t?"\\u2028":"\\u2029"})},r.escapeJavaScriptChar=function(t){if(t>=256)return"\\u"+r.padLeft(""+t,4);var n=e.from(String.fromCharCode(t),"ascii").toString("hex");return"\\x"+r.padLeft(n,2)},r.escapeHtmlChar=function(t){var n=r.namedHtml[t];if(void 0!==n)return n;if(t>=256)return"&#"+t+";";var i=e.from(String.fromCharCode(t),"ascii").toString("hex");return"&#x"+r.padLeft(i,2)+";"},r.padLeft=function(e,t){for(;e.length=97||t>=65&&t<=90||t>=48&&t<=57||32===t||46===t||44===t||45===t||58===t||95===t)&&(e[t]=null);return e}()}).call(t,r(3).Buffer)},function(e,t,r){"use strict";(function(e){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(38),o={hasOwn:Object.prototype.hasOwnProperty,indexOf:Array.prototype.indexOf,defaultThreshold:16,maxIPv6Groups:8,categories:{valid:1,dnsWarn:7,rfc5321:15,cfws:31,deprecated:63,rfc5322:127,error:255},diagnoses:{valid:0,rfc5321TLD:9,rfc5321TLDNumeric:10,rfc5321QuotedString:11,rfc5321AddressLiteral:12,cfwsComment:17,cfwsFWS:18,undesiredNonAscii:25,deprecatedLocalPart:33,deprecatedFWS:34,deprecatedQTEXT:35,deprecatedQP:36,deprecatedComment:37,deprecatedCTEXT:38,deprecatedIPv6:39,deprecatedCFWSNearAt:49,rfc5322Domain:65,rfc5322TooLong:66,rfc5322LocalTooLong:67,rfc5322DomainTooLong:68,rfc5322LabelTooLong:69,rfc5322DomainLiteral:70,rfc5322DomainLiteralOBSDText:71,rfc5322IPv6GroupCount:72,rfc5322IPv62x2xColon:73,rfc5322IPv6BadCharacter:74,rfc5322IPv6MaxGroups:75,rfc5322IPv6ColonStart:76,rfc5322IPv6ColonEnd:77,errExpectingDTEXT:129,errNoLocalPart:130,errNoDomain:131,errConsecutiveDots:132,errATEXTAfterCFWS:133,errATEXTAfterQS:134,errATEXTAfterDomainLiteral:135,errExpectingQPair:136,errExpectingATEXT:137,errExpectingQTEXT:138,errExpectingCTEXT:139,errBackslashEnd:140,errDotStart:141,errDotEnd:142,errDomainHyphenStart:143,errDomainHyphenEnd:144,errUnclosedQuotedString:145,errUnclosedComment:146,errUnclosedDomainLiteral:147,errFWSCRLFx2:148,errFWSCRLFEnd:149,errCRNoLF:150,errUnknownTLD:160,errDomainTooShort:161},components:{localpart:0,domain:1,literal:2,contextComment:3,contextFWS:4,contextQuotedString:5,contextQuotedPair:6}};o.specials=function(){var e=new Array(256);e.fill(!1);for(var t=0;t<'()<>[]:;@\\,."'.length;++t)e['()<>[]:;@\\,."'.codePointAt(t)]=!0;return function(t){return e[t]}}(),o.c0Controls=function(){var e=new Array(256);e.fill(!1);for(var t=0;t<33;++t)e[t]=!0;return function(t){return e[t]}}(),o.c1Controls=function(){var e=new Array(256);e.fill(!1);for(var t=127;t<160;++t)e[t]=!0;return function(t){return e[t]}}(),o.regex={ipV4:/\b(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipV6:/^[a-fA-F\d]{0,4}$/},o.normalizeSupportsNul="\0"==="\0".normalize("NFC"),o.nulNormalize=function(e){return e.split("\0").map(function(e){return e.normalize("NFC")}).join("\0")},o.normalize=function(e){return!o.normalizeSupportsNul&&e.indexOf("\0")>=0?o.nulNormalize(e):e.normalize("NFC")},o.checkIpV6=function(e){return e.every(function(e){return o.regex.ipV6.test(e)})},o.validDomain=function(e,t){return t.tldBlacklist?Array.isArray(t.tldBlacklist)?-1===o.indexOf.call(t.tldBlacklist,e):!o.hasOwn.call(t.tldBlacklist,e):Array.isArray(t.tldWhitelist)?-1!==o.indexOf.call(t.tldWhitelist,e):o.hasOwn.call(t.tldWhitelist,e)},t.validate=o.validate=function(t,r,s){r=r||{},t=o.normalize(t),"function"==typeof r&&(s=r,r={}),"function"!=typeof s&&(s=null);var a=void 0,c=void 0;if("number"==typeof r.errorLevel?(a=!0,c=r.errorLevel):(a=!!r.errorLevel,c=o.diagnoses.valid),r.tldWhitelist)if("string"==typeof r.tldWhitelist)r.tldWhitelist=[r.tldWhitelist];else if("object"!==n(r.tldWhitelist))throw new TypeError("expected array or object tldWhitelist");if(r.tldBlacklist)if("string"==typeof r.tldBlacklist)r.tldBlacklist=[r.tldBlacklist];else if("object"!==n(r.tldBlacklist))throw new TypeError("expected array or object tldBlacklist");if(r.minDomainAtoms&&(r.minDomainAtoms!==(0|+r.minDomainAtoms)||r.minDomainAtoms<0))throw new TypeError("expected positive integer minDomainAtoms");var u=o.diagnoses.valid,f=function(e){e>u&&(u=e)};!(void 0===r.allowUnicode||!!r.allowUnicode)&&/[^\x00-\x7f]/.test(t)&&f(o.diagnoses.undesiredNonAscii);for(var l={now:o.components.localpart,prev:o.components.localpart,stack:[o.components.localpart]},h="",p={local:"",domain:""},d={locals:[""],domains:[""]},g=0,b=0,m=0,y=void 0,v=!1,w=!1,A=t.length,_=void 0,S=0;S64?f(o.diagnoses.rfc5322LocalTooLong):l.prev!==o.components.contextComment&&l.prev!==o.components.contextFWS||f(o.diagnoses.deprecatedCFWSNearAt),l.now=o.components.domain,l.stack[0]=o.components.domain,g=0,b=0,w=!1;break;default:if(w)switch(l.prev){case o.components.contextComment:case o.components.contextFWS:f(o.diagnoses.errATEXTAfterCFWS);break;case o.components.contextQuotedString:f(o.diagnoses.errATEXTAfterQS);break;default:throw new Error("more atext found where none is allowed, but unrecognized prev context: "+l.prev)}else l.prev=l.now,y=_.codePointAt(0),(o.specials(y)||o.c0Controls(y)||o.c1Controls(y))&&f(o.diagnoses.errExpectingATEXT),p.local+=_,d.locals[g]+=_,b+=e.byteLength(_,"utf8")}break;case o.components.domain:switch(_){case"(":0===b?f(0===g?o.diagnoses.deprecatedCFWSNearAt:o.diagnoses.deprecatedComment):(w=!0,f(o.diagnoses.cfwsComment)),l.stack.push(l.now),l.now=o.components.contextComment;break;case".":var E=i.encode(d.domains[g]).length;0===b?f(0===g?o.diagnoses.errDotStart:o.diagnoses.errConsecutiveDots):v?f(o.diagnoses.errDomainHyphenEnd):E>63&&f(o.diagnoses.rfc5322LabelTooLong),w=!1,b=0,++g,d.domains[g]="",p.domain+=_;break;case"[":0===p.domain.length?(w=!0,b+=e.byteLength(_,"utf8"),l.stack.push(l.now),l.now=o.components.literal,p.domain+=_,d.domains[g]+=_,p.literal=""):f(o.diagnoses.errExpectingATEXT);break;case"\r":if(A===++S||"\n"!==t[S]){f(o.diagnoses.errCRNoLF);break}case" ":case"\t":0===b?f(0===g?o.diagnoses.deprecatedCFWSNearAt:o.diagnoses.deprecatedFWS):(f(o.diagnoses.cfwsFWS),w=!0),l.stack.push(l.now),l.now=o.components.contextFWS,h=_;break;default:if(w)switch(l.prev){case o.components.contextComment:case o.components.contextFWS:f(o.diagnoses.errATEXTAfterCFWS);break;case o.components.literal:f(o.diagnoses.errATEXTAfterDomainLiteral);break;default:throw new Error("more atext found where none is allowed, but unrecognized prev context: "+l.prev)}y=_.codePointAt(0),v=!1,o.specials(y)||o.c0Controls(y)||o.c1Controls(y)?f(o.diagnoses.errExpectingATEXT):"-"===_?(0===b&&f(o.diagnoses.errDomainHyphenStart),v=!0):(y<48||y>122&&y<192||y>57&&y<65||y>90&&y<97)&&f(o.diagnoses.rfc5322Domain),p.domain+=_,d.domains[g]+=_,b+=e.byteLength(_,"utf8")}break;case o.components.literal:switch(_){case"]":if(uB?f(o.diagnoses.rfc5322IPv6MaxGroups):T.length===B&&f(o.diagnoses.deprecatedIPv6)):T.length!==B&&f(o.diagnoses.rfc5322IPv6GroupCount),":"===I[0]&&":"!==I[1]?f(o.diagnoses.rfc5322IPv6ColonStart):":"===I[I.length-1]&&":"!==I[I.length-2]?f(o.diagnoses.rfc5322IPv6ColonEnd):o.checkIpV6(T)?f(o.diagnoses.rfc5321AddressLiteral):f(o.diagnoses.rfc5322IPv6BadCharacter)}}else f(o.diagnoses.rfc5322DomainLiteral);p.domain+=_,d.domains[g]+=_,b+=e.byteLength(_,"utf8"),l.prev=l.now,l.now=l.stack.pop();break;case"\\":f(o.diagnoses.rfc5322DomainLiteralOBSDText),l.stack.push(l.now),l.now=o.components.contextQuotedPair;break;case"\r":if(A===++S||"\n"!==t[S]){f(o.diagnoses.errCRNoLF);break}case" ":case"\t":f(o.diagnoses.cfwsFWS),l.stack.push(l.now),l.now=o.components.contextFWS,h=_;break;default:if(127!==(y=_.codePointAt(0))&&o.c1Controls(y)||0===y||"["===_){f(o.diagnoses.errExpectingDTEXT);break}(o.c0Controls(y)||127===y)&&f(o.diagnoses.rfc5322DomainLiteralOBSDText),p.literal+=_,p.domain+=_,d.domains[g]+=_,b+=e.byteLength(_,"utf8")}break;case o.components.contextQuotedString:switch(_){case"\\":l.stack.push(l.now),l.now=o.components.contextQuotedPair;break;case"\r":if(A===++S||"\n"!==t[S]){f(o.diagnoses.errCRNoLF);break}case"\t":p.local+=" ",d.locals[g]+=" ",b+=e.byteLength(_,"utf8"),f(o.diagnoses.cfwsFWS),l.stack.push(l.now),l.now=o.components.contextFWS,h=_;break;case'"':p.local+=_,d.locals[g]+=_,b+=e.byteLength(_,"utf8"),l.prev=l.now,l.now=l.stack.pop();break;default:127!==(y=_.codePointAt(0))&&o.c1Controls(y)||0===y||10===y?f(o.diagnoses.errExpectingQTEXT):(o.c0Controls(y)||127===y)&&f(o.diagnoses.deprecatedQTEXT),p.local+=_,d.locals[g]+=_,b+=e.byteLength(_,"utf8")}break;case o.components.contextQuotedPair:127!==(y=_.codePointAt(0))&&o.c1Controls(y)?f(o.diagnoses.errExpectingQPair):(y<31&&9!==y||127===y)&&f(o.diagnoses.deprecatedQP),l.prev=l.now,l.now=l.stack.pop();var R="\\"+_;switch(l.now){case o.components.contextComment:break;case o.components.contextQuotedString:p.local+=R,d.locals[g]+=R,b+=2;break;case o.components.literal:p.domain+=R,d.domains[g]+=R,b+=2;break;default:throw new Error("quoted pair logic invoked in an invalid context: "+l.now)}break;case o.components.contextComment:switch(_){case"(":l.stack.push(l.now),l.now=o.components.contextComment;break;case")":l.prev=l.now,l.now=l.stack.pop();break;case"\\":l.stack.push(l.now),l.now=o.components.contextQuotedPair;break;case"\r":if(A===++S||"\n"!==t[S]){f(o.diagnoses.errCRNoLF);break}case" ":case"\t":f(o.diagnoses.cfwsFWS),l.stack.push(l.now),l.now=o.components.contextFWS,h=_;break;default:if(0===(y=_.codePointAt(0))||10===y||127!==y&&o.c1Controls(y)){f(o.diagnoses.errExpectingCTEXT);break}(o.c0Controls(y)||127===y)&&f(o.diagnoses.deprecatedCTEXT)}break;case o.components.contextFWS:if("\r"===h){if("\r"===_){f(o.diagnoses.errFWSCRLFx2);break}++m>1?f(o.diagnoses.deprecatedFWS):m=1}switch(_){case"\r":A!==++S&&"\n"===t[S]||f(o.diagnoses.errCRNoLF);break;case" ":case"\t":break;default:"\r"===h&&f(o.diagnoses.errFWSCRLFEnd),m=0,l.prev=l.now,l.now=l.stack.pop(),--S}h=_;break;default:throw new Error("unknown context: "+l.now)}if(u>o.categories.rfc5322)break}if(u255)f(o.diagnoses.rfc5322DomainTooLong);else if(e.byteLength(p.local,"utf8")+P+1>254)f(o.diagnoses.rfc5322TooLong);else if(b>63)f(o.diagnoses.rfc5322LabelTooLong);else if(r.minDomainAtoms&&d.domains.length0){var m=a.shift();if((g=m._validate(h,d,n)).errors){if(i.push(this.createError("array.ordered",{pos:l,reason:g.errors,value:h},{key:r.key,path:d.path},n)),n.abortEarly)return i}else if(m._flags.strip)u.fastSplice(e,l),--l,--f;else{if(!this._flags.sparse&&void 0===g.value){if(i.push(this.createError("array.sparse",null,{key:r.key,path:d.path,pos:l},n)),n.abortEarly)return i;continue}e[l]=g.value}continue}if(!this._inner.items.length){if(i.push(this.createError("array.orderedLength",{pos:l,limit:this._inner.ordereds.length},{key:r.key,path:d.path},n)),n.abortEarly)return i;continue}}for(var y=[],v=s.length,w=0;w=0||t,"limit must be a positive integer or reference"),this._test("min",e,function(r,n,i){var o=void 0;if(t){if(o=e(n.reference||n.parent,i),!(Number.isSafeInteger(o)&&o>=0))return this.createError("array.ref",{ref:e.key},n,i)}else o=e;return r.length>=o?r:this.createError("array.min",{limit:e,value:r},n,i)})},t.prototype.max=function(e){var t=a.isRef(e);return c.assert(Number.isSafeInteger(e)&&e>=0||t,"limit must be a positive integer or reference"),this._test("max",e,function(r,n,i){var o=void 0;if(t){if(o=e(n.reference||n.parent,i),!(Number.isSafeInteger(o)&&o>=0))return this.createError("array.ref",{ref:e.key},n,i)}else o=e;return r.length<=o?r:this.createError("array.max",{limit:e,value:r},n,i)})},t.prototype.length=function(e){var t=a.isRef(e);return c.assert(Number.isSafeInteger(e)&&e>=0||t,"limit must be a positive integer or reference"),this._test("length",e,function(r,n,i){var o=void 0;if(t){if(o=e(n.reference||n.parent,i),!(Number.isSafeInteger(o)&&o>=0))return this.createError("array.ref",{ref:e.key},n,i)}else o=e;return r.length===o?r:this.createError("array.length",{limit:e,value:r},n,i)})},t.prototype.unique=function(e){c.assert(void 0===e||"function"==typeof e||"string"==typeof e,"comparator must be a function or a string");var t={};return"string"==typeof e?t.path=e:"function"==typeof e&&(t.comparator=e),this._test("unique",t,function(e,r,i){for(var o={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),object:new Map,function:new Map,custom:new Map},s=t.comparator||c.deepEqual,a=0;a=0,"limit must be a positive integer"),this._test("min",e,function(t,r,n){return t.length>=e?t:this.createError("binary.min",{limit:e,value:t},r,n)})},r.prototype.max=function(e){return o.assert(Number.isSafeInteger(e)&&e>=0,"limit must be a positive integer"),this._test("max",e,function(t,r,n){return t.length<=e?t:this.createError("binary.max",{limit:e,value:t},r,n)})},r.prototype.length=function(e){return o.assert(Number.isSafeInteger(e)&&e>=0,"limit must be a positive integer"),this._test("length",e,function(t,r,n){return t.length===e?t:this.createError("binary.length",{limit:e,value:t},r,n)})},r}(i),e.exports=new s.Binary}).call(t,r(3).Buffer)},function(e,t,r){"use strict";function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n=0,"n must be a positive integer"),this._test("arity",e,function(t,r,n){return t.length===e?t:this.createError("function.arity",{n:e},r,n)})},t.prototype.minArity=function(e){return i.assert(Number.isSafeInteger(e)&&e>0,"n must be a strict positive integer"),this._test("minArity",e,function(t,r,n){return t.length>=e?t:this.createError("function.minArity",{n:e},r,n)})},t.prototype.maxArity=function(e){return i.assert(Number.isSafeInteger(e)&&e>=0,"n must be a positive integer"),this._test("maxArity",e,function(t,r,n){return t.length<=e?t:this.createError("function.maxArity",{n:e},r,n)})},t.prototype.ref=function(){return this._test("ref",null,function(e,t,r){return s.isRef(e)?e:this.createError("function.ref",null,t,r)})},t.prototype.class=function(){return this._test("class",null,function(e,t,r){return/^\s*class\s/.test(e.toString())?e:this.createError("function.class",null,t,r)})},t}(o.constructor),e.exports=new a.Func},function(e,t,r){"use strict";function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n0,"multiple must be greater than 0")),this._test("multiple",e,function(r,n,i){var o=t?e(n.reference||n.parent,i):e;return!t||"number"==typeof o&&isFinite(o)?r%o==0?r:this.createError("number.multiple",{multiple:e,value:r},n,i):this.createError("number.ref",{ref:e.key},n,i)})},t.prototype.integer=function(){return this._test("integer",void 0,function(e,t,r){return Number.isSafeInteger(e)?e:this.createError("number.integer",{value:e},t,r)})},t.prototype.negative=function(){return this._test("negative",void 0,function(e,t,r){return e<0?e:this.createError("number.negative",{value:e},t,r)})},t.prototype.positive=function(){return this._test("positive",void 0,function(e,t,r){return e>0?e:this.createError("number.positive",{value:e},t,r)})},t.prototype.precision=function(e){s.assert(Number.isSafeInteger(e),"limit must be an integer"),s.assert(!("precision"in this._flags),"precision already set");var t=this._test("precision",e,function(t,r,n){var i=t.toString().match(a.precisionRx);return Math.max((i[1]?i[1].length:0)-(i[2]?parseInt(i[2],10):0),0)<=e?t:this.createError("number.precision",{limit:e,value:t},r,n)});return t._flags.precision=e,t},t.prototype.port=function(){return this._test("port",void 0,function(e,t,r){return!Number.isSafeInteger(e)||e<0||e>65535?this.createError("number.port",{value:e},t,r):e})},t}(i),a.compare=function(e,t){return function(r){var n=o.isRef(r),i="number"==typeof r&&!isNaN(r);return s.assert(i||n,"limit must be a number or reference"),this._test(e,r,function(i,o,s){var a=void 0;if(n){if("number"!=typeof(a=r(o.reference||o.parent,s))||isNaN(a))return this.createError("number.ref",{ref:r.key},o,s)}else a=r;return t(i,a)?i:this.createError("number."+e,{limit:a,value:i},o,s)})}},a.Number.prototype.min=a.compare("min",function(e,t){return e>=t}),a.Number.prototype.max=a.compare("max",function(e,t){return e<=t}),a.Number.prototype.greater=a.compare("greater",function(e,t){return e>t}),a.Number.prototype.less=a.compare("less",function(e,t){return e9),o^=3}return i%10==0&&i>0?e:this.createError("string.creditCard",{value:e},t,r)})},t.prototype.regex=function(e,t){s.assert(e instanceof RegExp,"pattern must be a RegExp");var r={pattern:new RegExp(e.source,e.ignoreCase?"i":void 0)};"string"==typeof t?r.name=t:"object"===(void 0===t?"undefined":n(t))&&(r.invert=!!t.invert,t.name&&(r.name=t.name));var i=["string.regex",r.invert?".invert":"",r.name?".name":".base"].join("");return this._test("regex",r,function(e,t,n){return r.pattern.test(e)^r.invert?e:this.createError(i,{name:r.name,pattern:r.pattern,value:e},t,n)})},t.prototype.alphanum=function(){return this._test("alphanum",void 0,function(e,t,r){return/^[a-zA-Z0-9]+$/.test(e)?e:this.createError("string.alphanum",{value:e},t,r)})},t.prototype.token=function(){return this._test("token",void 0,function(e,t,r){return/^\w+$/.test(e)?e:this.createError("string.token",{value:e},t,r)})},t.prototype.email=function(e){return e&&(s.assert("object"===(void 0===e?"undefined":n(e)),"email options must be an object"),s.assert(void 0===e.checkDNS,"checkDNS option is not supported"),s.assert(void 0===e.tldWhitelist||"object"===n(e.tldWhitelist),"tldWhitelist must be an array or object"),s.assert(void 0===e.minDomainAtoms||Number.isSafeInteger(e.minDomainAtoms)&&e.minDomainAtoms>0,"minDomainAtoms must be a positive integer"),s.assert(void 0===e.errorLevel||"boolean"==typeof e.errorLevel||Number.isSafeInteger(e.errorLevel)&&e.errorLevel>=0,"errorLevel must be a non-negative integer or boolean")),this._test("email",e,function(t,n,i){a=a||r(19);try{var o=a.validate(t,e);if(!0===o||0===o)return t}catch(e){}return this.createError("string.email",{value:t},n,i)})},t.prototype.ip=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=p.ipRegex;s.assert("object"===(void 0===e?"undefined":n(e)),"options must be an object"),e.cidr?(s.assert("string"==typeof e.cidr,"cidr must be a string"),e.cidr=e.cidr.toLowerCase(),s.assert(s.contain(p.cidrPresences,e.cidr),"cidr must be one of "+p.cidrPresences.join(", ")),e.version||"optional"===e.cidr||(t=h.createIpRegex(["ipv4","ipv6","ipvfuture"],e.cidr))):e.cidr="optional";var r=void 0;if(e.version){Array.isArray(e.version)||(e.version=[e.version]),s.assert(e.version.length>=1,"version must have at least 1 version specified"),r=[];for(var i=0;i=1,"scheme must have at least 1 scheme specified");for(var a=0;a=1,"version must have at least 1 valid version specified");for(var r=new Set,n=0;n0&&void 0!==arguments[0]?arguments[0]:{};s.assert("object"===(void 0===e?"undefined":n(e)),"hex options must be an object"),s.assert(void 0===e.byteAligned||"boolean"==typeof e.byteAligned,"byteAligned must be boolean");var t=!0===e.byteAligned,r=/^[a-f0-9]+$/i,i=this._test("hex",r,function(e,n,i){return r.test(e)?t&&e.length%2!=0?this.createError("string.hexAlign",{value:e},n,i):e:this.createError("string.hex",{value:e},n,i)});return t&&(i._flags.byteAligned=!0),i},t.prototype.base64=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s.assert("object"===(void 0===e?"undefined":n(e)),"base64 options must be an object"),s.assert(void 0===e.paddingRequired||"boolean"==typeof e.paddingRequired,"paddingRequired must be boolean");var t=(!1===e.paddingRequired?e.paddingRequired:e.paddingRequired||!0)?/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/:/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/;return this._test("base64",t,function(e,r,n){return t.test(e)?e:this.createError("string.base64",{value:e},r,n)})},t.prototype.hostname=function(){var e=/^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/;return this._test("hostname",void 0,function(t,r,n){return t.length<=255&&e.test(t)||o.isIPv6(t)?t:this.createError("string.hostname",{value:t},r,n)})},t.prototype.normalize=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"NFC";s.assert(s.contain(p.normalizationForms,e),"normalization form must be one of "+p.normalizationForms.join(", "));var t=this._test("normalize",e,function(t,r,n){return n.convert||t===t.normalize(e)?t:this.createError("string.normalize",{value:t,form:e},r,n)});return t._flags.normalize=e,t},t.prototype.lowercase=function(){var e=this._test("lowercase",void 0,function(e,t,r){return r.convert||e===e.toLocaleLowerCase()?e:this.createError("string.lowercase",{value:e},t,r)});return e._flags.case="lower",e},t.prototype.uppercase=function(){var e=this._test("uppercase",void 0,function(e,t,r){return r.convert||e===e.toLocaleUpperCase()?e:this.createError("string.uppercase",{value:e},t,r)});return e._flags.case="upper",e},t.prototype.trim=function(){var e=this._test("trim",void 0,function(e,t,r){return r.convert||e===e.trim()?e:this.createError("string.trim",{value:e},t,r)});return e._flags.trim=!0,e},t.prototype.replace=function(e,t){"string"==typeof e&&(e=new RegExp(s.escapeRegex(e),"g")),s.assert(e instanceof RegExp,"pattern must be a RegExp"),s.assert("string"==typeof t,"replacement must be a String");var r=this.clone();return r._inner.replacements||(r._inner.replacements=[]),r._inner.replacements.push({pattern:e,replacement:t}),r},t.prototype.truncate=function(e){var t=void 0===e||!!e;if(this._flags.truncate===t)return this;var r=this.clone();return r._flags.truncate=t,r},t}(c),p.compare=function(e,r){return function(n,i){var o=u.isRef(n);return s.assert(Number.isSafeInteger(n)&&n>=0||o,"limit must be a positive integer or reference"),s.assert(!i||t.isEncoding(i),"Invalid encoding:",i),this._test(e,n,function(t,s,a){var c=void 0;if(o){if(c=n(s.reference||s.parent,a),!Number.isSafeInteger(c))return this.createError("string.ref",{ref:n.key},s,a)}else c=n;return r(t,c,i)?t:this.createError("string."+e,{limit:c,value:t,encoding:i},s,a)})}},p.String.prototype.min=p.compare("min",function(e,r,n){return(n?t.byteLength(e,n):e.length)>=r}),p.String.prototype.max=p.compare("max",function(e,r,n){return(n?t.byteLength(e,n):e.length)<=r}),p.String.prototype.length=p.compare("length",function(e,r,n){return(n?t.byteLength(e,n):e.length)===r}),p.String.prototype.uuid=p.String.prototype.guid,e.exports=new p.String}).call(t,r(3).Buffer)},function(e,t,r){"use strict";var n=r(14),i={Ip:{cidrs:{ipv4:{required:"\\/(?:"+n.ipv4Cidr+")",optional:"(?:\\/(?:"+n.ipv4Cidr+"))?",forbidden:""},ipv6:{required:"\\/"+n.ipv6Cidr,optional:"(?:\\/"+n.ipv6Cidr+")?",forbidden:""},ipvfuture:{required:"\\/"+n.ipv6Cidr,optional:"(?:\\/"+n.ipv6Cidr+")?",forbidden:""}},versions:{ipv4:n.IPv4address,ipv6:n.IPv6address,ipvfuture:n.IPvFuture}}};i.Ip.createIpRegex=function(e,t){for(var r=void 0,n=0;n0?c-4:c;var f=0;for(t=0;t>16&255,a[f++]=n>>8&255,a[f++]=255&n;2===s?(n=i[e.charCodeAt(t)]<<2|i[e.charCodeAt(t+1)]>>4,a[f++]=255&n):1===s&&(n=i[e.charCodeAt(t)]<<10|i[e.charCodeAt(t+1)]<<4|i[e.charCodeAt(t+2)]>>2,a[f++]=n>>8&255,a[f++]=255&n);return a},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o="",s=[],a=0,c=r-i;ac?c:a+16383));1===i?(t=e[r-1],o+=n[t>>2],o+=n[t<<4&63],o+="=="):2===i&&(t=(e[r-2]<<8)+e[r-1],o+=n[t>>10],o+=n[t>>4&63],o+=n[t<<2&63],o+="=");return s.push(o),s.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function f(e,t,r){for(var i,o,s=[],a=t;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,c=(1<>1,f=-7,l=r?i-1:0,h=r?-1:1,p=e[t+l];for(l+=h,o=p&(1<<-f)-1,p>>=-f,f+=a;f>0;o=256*o+e[t+l],l+=h,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+e[t+l],l+=h,f-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=u}return(p?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,c,u=8*o-i-1,f=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+l>=1?h/c:h*Math.pow(2,1-l))*c>=2&&(s++,c/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(t*c-1)*Math.pow(2,i),s+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;e[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;e[r+p]=255&s,p+=d,s/=256,u-=8);e[r+p-d]|=128*g}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t){e.exports={_args:[["joi@13.4.0","/Users/jeff/projects/joi-browser"]],_development:!0,_from:"joi@13.4.0",_id:"joi@13.4.0",_inBundle:!1,_integrity:"sha512-JuK4GjEu6j7zr9FuVe2MAseZ6si/8/HaY0qMAejfDFHp7jcH4OKE937mIHM5VT4xDS0q7lpQbszbxKV9rm0yUg==",_location:"/joi",_phantomChildren:{},_requested:{type:"version",registry:!0,raw:"joi@13.4.0",name:"joi",escapedName:"joi",rawSpec:"13.4.0",saveSpec:null,fetchSpec:"13.4.0"},_requiredBy:["#DEV:/"],_resolved:"https://registry.npmjs.org/joi/-/joi-13.4.0.tgz",_spec:"13.4.0",_where:"/Users/jeff/projects/joi-browser",bugs:{url:"https://github.com/hapijs/joi/issues"},dependencies:{hoek:"5.x.x",isemail:"3.x.x",topo:"3.x.x"},description:"Object schema validation",devDependencies:{code:"5.x.x",hapitoc:"1.x.x",lab:"15.x.x"},engines:{node:">=8.9.0"},homepage:"https://github.com/hapijs/joi",keywords:["hapi","schema","validation"],license:"BSD-3-Clause",main:"lib/index.js",name:"joi",repository:{type:"git",url:"git://github.com/hapijs/joi.git"},scripts:{test:"lab -t 100 -a code -L","test-cov-html":"lab -r html -o coverage.html -a code","test-debug":"lab -a code",toc:"hapitoc",version:"npm run toc && git add API.md README.md"},version:"13.4.0"}},function(e,t,r){(function(e){function r(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}var n=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(e){return n.exec(e).slice(1)};function o(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n=-1&&!n;i--){var s=i>=0?arguments[i]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,n="/"===s.charAt(0))}return(n?"/":"")+(t=r(o(t.split("/"),function(e){return!!e}),!n).join("/"))||"."},t.normalize=function(e){var n=t.isAbsolute(e),i="/"===s(e,-1);return(e=r(o(e.split("/"),function(e){return!!e}),!n).join("/"))||n||(e="."),e&&i&&(e+="/"),(n?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(o(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},t.relative=function(e,r){function n(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=t.resolve(e).substr(1),r=t.resolve(r).substr(1);for(var i=n(e.split("/")),o=n(r.split("/")),s=Math.min(i.length,o.length),a=s,c=0;c= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=u-f,_=Math.floor,S=String.fromCharCode;function E(e){throw new RangeError(w[e])}function k(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function x(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+k((e=e.replace(v,".")).split("."),t).join(".")}function C(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(t+=S((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=S(e)}).join("")}function B(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function T(e,t,r){var n=0;for(e=r?_(e/p):e>>1,e+=_(e/t);e>A*l>>1;n+=u)e=_(e/A);return _(n+(A+1)*e/(e+h))}function R(e){var t,r,n,i,o,s,a,h,p,m,y,v=[],w=e.length,A=0,S=g,k=d;for((r=e.lastIndexOf(b))<0&&(r=0),n=0;n=128&&E("not-basic"),v.push(e.charCodeAt(n));for(i=r>0?r+1:0;i=w&&E("invalid-input"),((h=(y=e.charCodeAt(i++))-48<10?y-22:y-65<26?y-65:y-97<26?y-97:u)>=u||h>_((c-A)/s))&&E("overflow"),A+=h*s,!(h<(p=a<=k?f:a>=k+l?l:a-k));a+=u)s>_(c/(m=u-p))&&E("overflow"),s*=m;k=T(A-o,t=v.length+1,0==o),_(A/t)>c-S&&E("overflow"),S+=_(A/t),A%=t,v.splice(A++,0,S)}return I(v)}function P(e){var t,r,n,i,o,s,a,h,p,m,y,v,w,A,k,x=[];for(v=(e=C(e)).length,t=g,r=0,o=d,s=0;s=t&&y_((c-r)/(w=n+1))&&E("overflow"),r+=(a-t)*w,t=a,s=0;sc&&E("overflow"),y==t){for(h=r,p=u;!(h<(m=p<=o?f:p>=o+l?l:p-o));p+=u)k=h-m,A=u-m,x.push(S(B(m+k%A,0))),h=_(k/A);x.push(S(B(h,0))),o=T(r,w,n==i),r=0,++n}++r,++t}return x.join("")}a={version:"1.4.1",ucs2:{decode:C,encode:I},decode:R,encode:P,toASCII:function(e){return x(e,function(e){return y.test(e)?"xn--"+P(e):e})},toUnicode:function(e){return x(e,function(e){return m.test(e)?R(e.slice(4).toLowerCase()):e})}},void 0===(i=function(){return a}.call(t,r,t,e))||(e.exports=i)}()}).call(t,r(41)(e),r(5))},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}}])},e.exports=n()},function(e,t,r){"use strict";const n=r(11),i=r(7),o=n("repo:lock"),s={};t.lock=((e,t)=>{const r=e+"/repo.lock";o("locking %s",r),s[r]=!0;const n={close(e){s[r]&&delete s[r],i(e)}};i(()=>{t(null,n)})}),t.locked=((e,t)=>{const r=e+"/repo.lock";o("checking lock: %s");const n=s[r];i(()=>{t(null,n)})})},function(e,t,r){"use strict";e.exports=r(1174)},function(e,t,r){var n=r(642)(r(199),"Map");e.exports=n},function(e,t,r){var n=r(1197),i=r(1204),o=r(1206),s=r(1207),a=r(1208);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t({digest(t,o){((t,r,o)=>{n(i.subtle.sign({name:"HMAC"},t,r).then(t=>e.from(t)),o)})(r,t,o)},length:o[t]})),a)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(24),i=r(1240);function o(e,t,r,i){if("function"==typeof r&&(i=r,r=void 0),!i)throw new Error("Missing callback");o.digest(e,t,r,(e,o)=>{if(e)return i(e);i(null,n.encode(o,t,r))})}e.exports=o,o.Buffer=t,o.multihash=n,o.digest=function(e,t,r,n){if("function"==typeof r&&(n=r,r=void 0),!n)throw new Error("Missing callback");let i,s=n;r&&(s=((e,t)=>{if(e)return n(e);n(null,t.slice(0,r))}));try{i=o.createHash(t)}catch(e){return s(e)}i(e,s)},o.createHash=function(e){if(e=n.coerceCode(e),!o.functions[e])throw new Error("multihash function "+e+" not yet supported");return o.functions[e]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(7);t.toCallback=(e=>(function(t,r){const i=(e,t)=>n(()=>{r(e,t)});let o;try{o=e(t)}catch(e){return void i(e)}i(null,o)})),t.toBuf=((t,r)=>n=>{let i=t(n,r);return e.from(i,"hex")}),t.fromString=((t,r)=>n=>{const i=e.isBuffer(n)?n.toString():n;return t(i,r)}),t.fromNumberTo32BitBuf=((t,r)=>n=>{let i=t(n,r);const o=new Array(4);for(let e=0;e<4;e++)o[e]=255&i,i>>=8;return e.from(o)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(644),i=r(645)();function o(e){return Promise.all([i.subtle.exportKey("jwk",e.privateKey),i.subtle.exportKey("jwk",e.publicKey)])}t.utils=r(1243),t.generateKey=function(e,t){n(i.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(o).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.unmarshalPrivateKey=function(e,t){const r=i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);var s;n(Promise.all([r,(s=e,i.subtle.importKey("jwk",{kty:s.kty,n:s.n,e:s.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]))]).then(e=>o({privateKey:e[0],publicKey:e[1]})).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.getRandomValues=function(t){return e.from(i.getRandomValues(t))},t.hashAndSign=function(t,r,o){n(i.subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]).then(e=>i.subtle.sign({name:"RSASSA-PKCS1-v1_5"},e,Uint8Array.from(r))).then(t=>e.from(t)),o)},t.hashAndVerify=function(e,t,r,o){n(i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]).then(e=>i.subtle.verify({name:"RSASSA-PKCS1-v1_5"},e,t,r)),o)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(21).bignum;t.toBase64=function(t,r){return t.toArrayLike(e,"be",r).toString("base64").replace(/(=*)$/,"").replace(/\+/g,"-").replace(/\//g,"_")},t.toBn=function(t){return new n(e.from(t,"base64"))}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(806);e.exports=function(e){if(!e||"number"!=typeof e)throw new Error("first argument must be a Number bigger than 0");return n.getRandomValues(new Uint8Array(e))}},function(e,t,r){var n=r(198),i=r(105),o=r(181),s="[object String]";e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&n(e)==s}},function(e,t,r){(function(t){var r="Expected a function",n=NaN,i="[object Symbol]",o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt,f="object"==typeof t&&t&&t.Object===Object&&t,l="object"==typeof self&&self&&self.Object===Object&&self,h=f||l||Function("return this")(),p=Object.prototype.toString,d=Math.max,g=Math.min,b=function(){return h.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&p.call(e)==i}(e))return n;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var r=a.test(e);return r||c.test(e)?u(e.slice(2),r?2:8):s.test(e)?n:+e}e.exports=function(e,t,n){var i,o,s,a,c,u,f=0,l=!1,h=!1,p=!0;if("function"!=typeof e)throw new TypeError(r);function v(t){var r=i,n=o;return i=o=void 0,f=t,a=e.apply(n,r)}function w(e){var r=e-u;return void 0===u||r>=t||r<0||h&&e-f>=s}function A(){var e=b();if(w(e))return _(e);c=setTimeout(A,function(e){var r=t-(e-u);return h?g(r,s-(e-f)):r}(e))}function _(e){return c=void 0,p&&i?v(e):(i=o=void 0,a)}function S(){var e=b(),r=w(e);if(i=arguments,o=this,u=e,r){if(void 0===c)return function(e){return f=e,c=setTimeout(A,t),l?v(e):a}(u);if(h)return c=setTimeout(A,t),v(u)}return void 0===c&&(c=setTimeout(A,t)),a}return t=y(t)||0,m(n)&&(l=!!n.leading,s=(h="maxWait"in n)?d(y(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p),S.cancel=function(){void 0!==c&&clearTimeout(c),f=0,i=u=o=c=void 0},S.flush=function(){return void 0===c?a:_(b())},S}}).call(this,r(12))},function(e,t,r){"use strict";var n=r(1272);function i(e){return"function"==typeof e}function o(e,t){return t?function(r,n){var i=setTimeout(function(){e(new Error("pull-reader: read exceeded timeout"),n)},t);e(r,function(e,t){clearTimeout(i),n(e,t)})}:e}e.exports=function(e){var t,r,s,a,c,u=[],f=!1,l=n();function h(){for(;u.length;)if(null==u[0].length&&l.has(1))u.shift().cb(null,l.get());else if(l.has(u[0].length)){var e=u.shift();e.cb(null,l.get(e.length))}else if(1==s&&u[0].length&&l.length 0 to the moving average constructor");let t,r,i=0,o=0,s=0,a={};return a.push=function(a,c){if(r){const u=1-n(-(a-r)/e),f=c-t;t=u*c+(1-u)*t,i=(1-u)*(i+f*(u*f)),o=Math.sqrt(i),s=t+u*f}else t=c;r=a},a.movingAverage=function(){return t},a.variance=function(){return i},a.deviation=function(){return o},a.forecast=function(){return s},a}},function(e,t,r){"use strict";const{createFromPrivKey:n}=r(41),i=r(61),o=r(1291),s=r(36),a=r(11),c=a("jsipfs:ipns");c.error=a("jsipfs:ipns:error");const u=r(1292),f=r(1300),l=r(1301),h=r(815),p=6e4;(e.exports=class{constructor(e,t,r,n,i){this.publisher=new u(e,t),this.republisher=new f(this.publisher,t,r,n,i),this.resolver=new l(e),this.cache=new o({max:1e3}),this.routing=e}publish(e,t,r,o){i([t=>n(e.bytes,t),n=>this.publisher.publishWithEOL(e,t,r,n)],(e,n)=>{if(e)return c.error(e),o(e);c(`IPNS value ${t} was published correctly`);const i=n[0].toB58String(),s=parseFloat(r),a=s{if(t)return c.error(t),r(t);c(`IPNS record from ${e} was resolved correctly`),r(null,{path:n})})}initializeKeyspace(e,t,r){this.publisher.publish(e,t,r)}}).path=h},function(e,t,r){"use strict";const n=r(344),i=r(11),o=i("jsipfs:ipns:path");o.error=i("jsipfs:ipns:path:error");e.exports={resolvePath:(e,t,r)=>{if(n.ipnsPath(t))return o(`resolve ipns path ${t}`),e._ipns.resolve(t,r);e.dag.get(t.substring("/ipfs/".length),(e,t)=>e?r(e):r(null,t))}}},function(e,t,r){"use strict";(function(t){const n=r(293),{fromB58String:i,toB58String:o}=r(24),s=r(1302),a=r(26),c=r(36),u=r(11),f=u("jsipfs:ipns:pubsub");f.error=u("jsipfs:ipns:pubsub:error");e.exports=a(class{constructor(e,t,r){this._pubsub=e,this._subscriptions={},this._handleSubscriptionKey=this._handleSubscriptionKey.bind(this),this._pubsubDs=new s(e,t,r,n.validator,this._handleSubscriptionKey)}put(e,t,r){this._pubsubDs.put(e,t,r)}get(e,t){this._pubsubDs.get(e,(r,i)=>{if(e.slice(0,n.namespaceLength).toString()===n.namespace){const t=e.toString(),r=o(e.slice(n.namespaceLength));this._subscriptions[t]=r,f(`subscribed pubsub ${t}: ${r}`)}if(r)return t(r);t(null,i)})}_handleSubscriptionKey(e,t){const r=this._subscriptions[e];if(!r){const r=`key ${e} does not correspond to a subscription`;return f.error(r),t(c(new Error(r),"ERR_INVALID_KEY"))}let o;try{o=n.getIdKeys(i(r))}catch(e){return f.error(e),t(e)}t(null,o.routingKey.toBuffer())}getSubscriptions(e){return e(null,Object.values(this._subscriptions).filter(Boolean).map(e=>`${n.namespace}${e}`))}cancel(e,r){if("string"!=typeof e){const e="received subscription name is not valid";return f.error(e),r(c(new Error(e),"ERR_INVALID_SUBSCRIPTION_NAME"))}e.startsWith(n.namespace)&&(e=e.substring(n.namespaceLength));const i=Object.keys(this._subscriptions).find(t=>this._subscriptions[t]===e);if(!i)return r(null,{canceled:!1});try{const e=t.from(i);this._pubsubDs.unsubscribe(e)}catch(e){return r(e)}this._subscriptions[i]=void 0,f(`unsubscribed pubsub ${i}: ${e}`),r(null,{canceled:!0})}},{className:"IpnsPubsubDatastore",symbolName:"@js-ipfs/ipns/IpnsPubsubDatastore"})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const{Key:n}=r(34),{Record:i}=r(1304),{encodeBase32:o}=r(820),s=r(36),a=r(11),c=a("jsipfs:ipns:offline-datastore");c.error=a("jsipfs:ipns:offline-datastore:error");e.exports=class{constructor(e){this._repo=e}put(e,r,n){if(!t.isBuffer(e)){const e="Offline datastore key must be a buffer";return c.error(e),n(s(new Error(e),"ERR_INVALID_KEY"))}if(!t.isBuffer(r)){const e="Offline datastore value must be a buffer";return c.error(e),n(s(new Error(e),"ERR_INVALID_VALUE"))}let o;try{o=this._routingKey(e)}catch(e){const t="Not possible to generate the routing key";return c.error(t),n(s(new Error(t),"ERR_GENERATING_ROUTING_KEY"))}const a=new i(e,r);this._repo.datastore.put(o,a.serialize(),n)}get(e,r){if(!t.isBuffer(e)){const e="Offline datastore key must be a buffer";return c.error(e),r(s(new Error(e),"ERR_INVALID_KEY"))}let n;try{n=this._routingKey(e)}catch(e){const t="Not possible to generate the routing key";return c.error(t),r(s(new Error(t),"ERR_GENERATING_ROUTING_KEY"))}this._repo.datastore.get(n,(e,t)=>{if(e)return r(e);let n;try{n=i.deserialize(t)}catch(e){return c.error(e),r(e)}r(null,n.value)})}_routingKey(e){return new n("/"+o(e),!1)}}}).call(this,r(0).Buffer)},function(e,t,r){var n=r(1309);e.exports=function(e,t,r){for(var i=-1,o=[],s=r?t.length:0;(i=n(e,t))>-1;)o.push(e.slice(0,i+s)),e=e.slice(i+t.length,e.length);return o.push(e),o}},function(e,t,r){"use strict";(function(e){const n=r(7);t.toCallback=(e=>(function(t,r){const i=(e,t)=>n(()=>{r(e,t)});let o;try{o=e(t)}catch(e){return void i(e)}i(null,o)})),t.toBuf=((t,r)=>n=>{let i=t(n,r);return e.from(i,"hex")}),t.fromString=((t,r)=>n=>{const i=e.isBuffer(n)?n.toString():n;return t(i,r)}),t.fromNumberTo32BitBuf=((t,r)=>n=>{let i=t(n,r);const o=new Array(4);for(let e=0;e<4;e++)o[e]=255&i,i>>=8;return e.from(o)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(147),i=r(293);e.exports={encodeBase32:e=>{return n.encode("base32",e).slice(1).toString().toUpperCase()},validator:{func:(e,t,r)=>i.validator.validate(t,e,r)},selector:(e,t)=>i.validator.select(t[0],t[1])}},function(e){e.exports={_from:"ipfs@0.34.0-rc.0",_id:"ipfs@0.34.0-rc.0",_inBundle:!1,_integrity:"sha512-EPeyCE050ZpZbSSR9j+t5nCKQxwGgGBIU46bgkkEb7JCdMJ1VsZOtq0IlJuOmNjSOyFWx+Q/406toSPkOVvHpA==",_location:"/ipfs",_phantomChildren:{inherits:"2.0.3",string_decoder:"1.1.1","util-deprecate":"1.0.2"},_requested:{type:"version",registry:!0,raw:"ipfs@0.34.0-rc.0",name:"ipfs",escapedName:"ipfs",rawSpec:"0.34.0-rc.0",saveSpec:null,fetchSpec:"0.34.0-rc.0"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/ipfs/-/ipfs-0.34.0-rc.0.tgz",_shasum:"f68c9ac75de6224ab7316b844fe8da8a866367fb",_spec:"ipfs@0.34.0-rc.0",_where:"/Users/vsantos/Work/Project/protocol-labs/repos/service-worker-gateway",bin:{jsipfs:"src/cli/bin.js"},browser:{"./src/core/components/init-assets.js":!1,"./src/core/runtime/add-from-fs-nodejs.js":"./src/core/runtime/add-from-fs-browser.js","./src/core/runtime/config-nodejs.js":"./src/core/runtime/config-browser.js","./src/core/runtime/dns-nodejs.js":"./src/core/runtime/dns-browser.js","./src/core/runtime/fetch-nodejs.js":"./src/core/runtime/fetch-browser.js","./src/core/runtime/libp2p-nodejs.js":"./src/core/runtime/libp2p-browser.js","./src/core/runtime/preload-nodejs.js":"./src/core/runtime/preload-browser.js","./src/core/runtime/repo-nodejs.js":"./src/core/runtime/repo-browser.js","./test/utils/create-repo-nodejs.js":"./test/utils/create-repo-browser.js",stream:"readable-stream",joi:"joi-browser"},bugs:{url:"https://github.com/ipfs/js-ipfs/issues"},bundleDependencies:!1,contributors:[{name:"0xflotus",email:"0xflotus@gmail.com"},{name:"A_A",email:"21040751+Otto-AA@users.noreply.github.com"},{name:"Alan Shaw",email:"alan.shaw@protocol.ai"},{name:"Alan Shaw",email:"alan@tableflip.io"},{name:"Alex Potsides",email:"alex@achingbrain.net"},{name:"Andrew de Andrade",email:"andrew@deandrade.com.br"},{name:"André Cruz",email:"andremiguelcruz@msn.com"},{name:"Arkadiy Kukarkin",email:"parkan@users.noreply.github.com"},{name:"Arpit Agarwal",email:"93arpit@gmail.com"},{name:"Arpit Agarwal",email:"atvanguard@users.noreply.github.com"},{name:"Bernard Mordan",email:"bernard@tableflip.io"},{name:"Brian Vander Schaaf",email:"bvs330@gmail.com"},{name:"Bruno Zell",email:"bruno.zzell@gmail.com"},{name:"CHEVALAY JOSSELIN",email:"josselin54.chevalay@gmail.com"},{name:"Caio Gondim",email:"me@caiogondim.com"},{name:"Christian Couder",email:"chriscool@tuxfamily.org"},{name:"Dafeng",email:"dfguo.joe@gmail.com"},{name:"Dan Ordille",email:"dordille@gmail.com"},{name:"Daniel J. O'Quinn",email:"danieljoquinn@gmail.com"},{name:"Daniela Borges Matos de Carvalho",email:"alunassertiva@gmail.com"},{name:"David Dias",email:"daviddias.p@gmail.com"},{name:"David Gilbertson",email:"gilbertson.david@gmail.com"},{name:"David da Silva",email:"dasilvacontin@gmail.com"},{name:"Diogo Silva",email:"fsdiogo@gmail.com"},{name:"Dmitriy Ryajov",email:"dryajov@gmail.com"},{name:"Dzmitry Das",email:"dbachko@gmail.com"},{name:"Enrico Marino",email:"enrico.marino@email.com"},{name:"Faheel Ahmad",email:"faheel@live.in"},{name:"Felix Yan",email:"felixonmars@archlinux.org"},{name:"Francisco Baio Dias",email:"xicombd@gmail.com"},{name:"Francisco Baio Dias",email:"francisco@typeform.com"},{name:"Friedel Ziegelmayer",email:"dignifiedquire@gmail.com"},{name:"Gar",email:"gar+gh@danger.computer"},{name:"Georgios Rassias",email:"georassias@gmail.com"},{name:"Gorka Ludlow",email:"gorka@aquigorka.com"},{name:"Greenkeeper",email:"support@greenkeeper.io"},{name:"Haad",email:"haadcode@users.noreply.github.com"},{name:"Haoliang Yu",email:"haoliangyu@users.noreply.github.com"},{name:"Harsh Vakharia",email:"harshjv@users.noreply.github.com"},{name:"Henrique Dias",email:"hacdias@gmail.com"},{name:"Henry Rodrick",email:"moshisushi@gmail.com"},{name:"Heo Sangmin",email:"heo@mapiacompany.com"},{name:"Hugo Dias",email:"mail@hugodias.me"},{name:"Hugo Dias",email:"hugomrdias@gmail.com"},{name:"Jacob Heun",email:"jacobheun@gmail.com"},{name:"Jacob Heun",email:"jake@andyet.net"},{name:"Jade Meskill",email:"jade.meskill@gmail.com"},{name:"Johannes Wikner",email:"johannes.wikner@gmail.com"},{name:"Jon Schlinkert",email:"dev@sellside.com"},{name:"Jonathan",email:"jkrone@vt.edu"},{name:"João Antunes",email:"j.goncalo.antunes@gmail.com"},{name:"João Santos",email:"joaosantos15@users.noreply.github.com"},{name:"Kevin Wang",email:"kevin@fossa.io"},{name:"Lars Gierth",email:"larsg@systemli.org"},{name:"Lukas Drgon",email:"lukas.drgon@gmail.com"},{name:"Maciej Krüger",email:"mkg20001@gmail.com"},{name:"Marcin Rataj",email:"lidel@lidel.org"},{name:"Marius Darila",email:"marius.darila@gmail.com"},{name:"Mat Kelly",email:"machawk1@gmail.com"},{name:"Michelle Lee",email:"michelle@protocol.ai"},{name:"Mikeal Rogers",email:"mikeal.rogers@gmail.com"},{name:"Mithgol",email:"getgit@mithgol.ru"},{name:"Molly",email:"momack2@users.noreply.github.com"},{name:"My9Bot",email:"34904312+My9Bot@users.noreply.github.com"},{name:"Nuno Nogueira",email:"nunofmn@gmail.com"},{name:"Oli Evans",email:"oli@tableflip.io"},{name:"Oskar Nyberg",email:"oskar@oskarnyberg.com"},{name:"Pascal Precht",email:"pascal.precht@googlemail.com"},{name:"Pau Ramon Revilla",email:"masylum@gmail.com"},{name:"Paulo Rodrigues",email:"me@paulogr.com"},{name:"Pedro Teixeira",email:"i@pgte.me"},{name:"Portia Burton",email:"plburton@gmail.com"},{name:"Raoul Millais",email:"raoul@raoulmillais.com"},{name:"RasmusErik Voel Jensen",email:"github@solsort.com"},{name:"Richard Littauer",email:"richard.littauer@gmail.com"},{name:"Richard Schneider",email:"makaretu@gmail.com"},{name:"Rob Brackett",email:"rob@robbrackett.com"},{name:"Rod Keys",email:"rod@zokos.com"},{name:"Sangwon Hong",email:"qpakzk@gmail.com"},{name:"Sid Harder",email:"sideharder@gmail.com"},{name:"SidHarder",email:"softwarenavigator@gmail.com"},{name:"Stephen Whitmore",email:"stephen.whitmore@gmail.com"},{name:"Stephen Whitmore",email:"noffle@users.noreply.github.com"},{name:"Terence Pae",email:"terencepae@gmail.com"},{name:"Uroš Jurglič",email:"jurglic@gmail.com"},{name:"Vasco Santos",email:"vasco.santos@ua.pt"},{name:"Vasco Santos",email:"vasco.santos@moxy.studio"},{name:"Volker Mische",email:"volker.mische@gmail.com"},{name:"Xiao Liang",email:"yxliang01@users.noreply.github.com"},{name:"Yahya",email:"ya7yaz@gmail.com"},{name:"Yole",email:"yole@ultiledger.io"},{name:"bitspill",email:"bitspill+github@bitspill.net"},{name:"datafatmunger",email:"jbg@peerparty.org"},{name:"haad",email:"haad@headbanggames.com"},{name:"jbenet",email:"juan@benet.ai"},{name:"jonahweissman",email:"19804455+jonahweissman@users.noreply.github.com"},{name:"kevingzhang",email:"kevin.zhang.canada@gmail.com"},{name:"kumavis",email:"kumavis@users.noreply.github.com"},{name:"nginnever",email:"ginneversource@gmail.com"},{name:"npmcdn-to-unpkg-bot",email:"npmcdn-to-unpkg-bot@users.noreply.github.com"},{name:"robbsolter",email:"35879806+robbsolter@users.noreply.github.com"},{name:"seungwon-kang",email:"ksw3894@gmail.com"},{name:"tcme",email:"hi@this-connect.me"},{name:"victorbjelkholm",email:"victorbjelkholm@gmail.com"},{name:"Łukasz Magiera",email:"magik6k@users.noreply.github.com"},{name:"Максим Ильин",email:"negamaxi@gmail.com"}],dependencies:{"@nodeutils/defaults-deep":"^1.1.0",async:"^2.6.1","big.js":"^5.2.2","binary-querystring":"~0.1.2",bl:"^2.1.2",boom:"^7.2.0",bs58:"^4.0.1",byteman:"^1.3.5","cid-tool":"~0.2.0",cids:"~0.5.5","class-is":"^1.1.0","datastore-core":"~0.6.0","datastore-pubsub":"~0.1.1",debug:"^4.1.0","err-code":"^1.1.2","file-type":"^10.2.0",fnv1a:"^1.0.1","fsm-event":"^2.1.0","get-folder-size":"^2.0.0",glob:"^7.1.3",hapi:"^16.6.2","hapi-set-header":"^1.0.2",hoek:"^6.1.2","human-to-milliseconds":"^1.0.0","interface-datastore":"~0.6.0","ipfs-bitswap":"~0.21.0","ipfs-block":"~0.8.0","ipfs-block-service":"~0.15.1","ipfs-http-client":"^28.1.0","ipfs-http-response":"~0.2.1","ipfs-mfs":"~0.8.0","ipfs-multipart":"~0.1.0","ipfs-repo":"~0.26.0","ipfs-unixfs":"~0.1.16","ipfs-unixfs-engine":"~0.35.3",ipld:"~0.20.1","ipld-bitcoin":"~0.1.8","ipld-dag-pb":"~0.15.0","ipld-ethereum":"^2.0.1","ipld-git":"~0.2.2","ipld-zcash":"~0.1.6",ipns:"~0.4.3","is-ipfs":"~0.4.8","is-pull-stream":"~0.0.0","is-stream":"^1.1.0",joi:"^14.3.0","joi-browser":"^13.4.0","joi-multiaddr":"^3.0.0",libp2p:"~0.24.1","libp2p-bootstrap":"~0.9.3","libp2p-crypto":"~0.14.1","libp2p-kad-dht":"~0.12.1","libp2p-keychain":"~0.3.3","libp2p-mdns":"~0.12.0","libp2p-mplex":"~0.8.4","libp2p-record":"~0.6.1","libp2p-secio":"~0.10.1","libp2p-tcp":"~0.13.0","libp2p-webrtc-star":"~0.15.5","libp2p-websocket-star":"~0.10.0","libp2p-websockets":"~0.12.0",lodash:"^4.17.11",mafmt:"^6.0.2","mime-types":"^2.1.21",mkdirp:"~0.5.1",multiaddr:"^6.0.0","multiaddr-to-uri":"^4.0.0",multibase:"~0.6.0",multihashes:"~0.4.14","multihashing-async":"~0.5.1","node-fetch":"^2.3.0",once:"^1.4.0","peer-book":"~0.9.0","peer-id":"~0.12.0","peer-info":"~0.15.0",progress:"^2.0.1","prom-client":"^11.1.3","prometheus-gc-stats":"~0.6.0","promisify-es6":"^1.0.3",protons:"^1.0.1","pull-abortable":"^4.1.1","pull-cat":"^1.1.11","pull-defer":"~0.2.3","pull-file":"^1.1.0","pull-ndjson":"~0.1.1","pull-pushable":"^2.2.0","pull-sort":"^1.0.1","pull-stream":"^3.6.9","pull-stream-to-stream":"^1.3.4",pump:"^3.0.0","read-pkg-up":"^4.0.0","readable-stream":"3.0.6",receptacle:"^1.3.2","stream-to-pull-stream":"^1.7.2","tar-stream":"^1.6.2",temp:"~0.8.3","update-notifier":"^2.5.0",varint:"^5.0.0",yargs:"^12.0.5","yargs-promise":"^1.1.0"},deprecated:!1,description:"JavaScript implementation of the IPFS specification",devDependencies:{aegir:"^17.0.1",chai:"^4.2.0",delay:"^4.1.0","detect-node":"^2.0.4","dir-compare":"^1.4.0","dirty-chai":"^2.0.1",execa:"^1.0.0","form-data":"^2.3.3",hat:"0.0.3","interface-ipfs-core":"~0.92.0","ipfsd-ctl":"~0.40.1",ncp:"^2.0.0",qs:"^6.5.2",rimraf:"^2.6.2",sinon:"^7.1.1","stream-to-promise":"^2.2.0"},engines:{node:">=10.0.0",npm:">=6.0.0"},homepage:"https://github.com/ipfs/js-ipfs#readme",keywords:["IPFS"],leadMaintainer:"Alan Shaw ",license:"MIT",main:"src/core/index.js",name:"ipfs",optionalDependencies:{"prom-client":"^11.1.3","prometheus-gc-stats":"~0.6.0"},repository:{type:"git",url:"git+https://github.com/ipfs/js-ipfs.git"},scripts:{benchmark:'echo "Error: no benchmarks yet" && exit 1',"benchmark:browser":'echo "Error: no benchmarks yet" && exit 1',"benchmark:node":'echo "Error: no benchmarks yet" && exit 1',"benchmark:node:core":'echo "Error: no benchmarks yet" && exit 1',"benchmark:node:http":'echo "Error: no benchmarks yet" && exit 1',build:"aegir build",coverage:"aegir coverage","coverage-publish":"aegir-coverage publish","dep-check":"npx dependency-check package.json './test/**/*.js' './src/**/*.js'",lint:"aegir lint",release:"aegir release -t node -t browser","release-major":"aegir release --type major -t node -t browser","release-minor":"aegir release --type minor -t node -t browser",test:"aegir test -t node -t browser -t webworker --no-cors --timeout=10000","test:bootstrapers":"IPFS_TEST=bootstrapers aegir test -t browser -f test/bootstrapers.js --timeout=10000","test:browser":"aegir test -t browser --no-cors --timeout=10000","test:node":"aegir test -t node --timeout=10000","test:node:cli":"aegir test -t node -f test/cli/index.js --timeout=10000","test:node:core":"aegir test -t node -f test/core/**/*.js --timeout=10000","test:node:gateway":"aegir test -t node -f test/gateway/index.js --timeout=10000","test:node:http":"aegir test -t node -f test/http-api/index.js --timeout=10000","test:node:interface":"aegir test -t node -f test/core/interface.spec.js --timeout=10000","test:webworker":"aegir test -t webworker --no-cors --timeout=10000"},version:"0.34.0-rc.0"}},function(e,t,r){"use strict";const n=r(29),i=r(641).repoVersion;e.exports=function(e){return{init:(e,t,r)=>{},version:n(t=>{e._repo._isInitialized(r=>{if(r){return[/Key not found in database \[\/version\]/,/ENOENT/,/repo is not initialized yet/].some(e=>e.test(r.message))?t(null,i):t(r)}e._repo.version.get(t)})}),gc:n((e,t)=>{"function"==typeof e&&(t=e,e={}),t(new Error("Not implemented"))}),stat:n((t,r)=>{"function"==typeof t&&(r=t,t={}),e._repo.stat(t,(e,t)=>{if(e)return r(e);r(null,{numObjects:t.numObjects,repoSize:t.repoSize,repoPath:t.repoPath,version:t.version.toString(),storageMax:t.storageMax})})}),path:()=>e._repo.path}}},function(e,t,r){"use strict";e.exports=(()=>({Addresses:{Swarm:[],API:"",Gateway:""},Discovery:{MDNS:{Enabled:!1,Interval:10},webRTCStar:{Enabled:!0}},Bootstrap:["/dns4/ams-1.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd","/dns4/lon-1.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLMeWqB7YGVLJN3pNLQpmmEk35v6wYtsMGLzSr5QBU3","/dns4/sfo-3.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLPppuBtQSGwKDZT2M73ULpjvfd3aZ6ha4oFGL1KrGM","/dns4/sgp-1.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu","/dns4/nyc-1.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLueR4xBeUbY9WZ9xGUUxunbKWcrNFTDAadQJmocnWm","/dns4/nyc-2.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64","/dns4/node0.preload.ipfs.io/tcp/443/wss/ipfs/QmZMxNdpMkewiVZLMRxaNxUeZpDUb34pWjZ1kZvsd16Zic","/dns4/node1.preload.ipfs.io/tcp/443/wss/ipfs/Qmbut9Ywz9YEDrz8ySBSgWyJk41Uvm2QJPhwDJzJyGFsD6"]}))},function(e,t,r){"use strict";const n=r(1336),i=r(144),o=r(26),s=r(1345),a=r(89).Connection,c=r(1347),u=r(11)("libp2p:websockets:dialer"),f=r(1348);e.exports=o(class{dial(e,t,r){"function"==typeof t&&(r=t,t={}),r=r||function(){};const i=c(e);u("dialing %s",i);const o=n(i,{binary:!0,onConnect:e=>{r(e)}}),s=new a(o);return s.getObservedAddrs=(t=>t(null,[e])),s.close=(e=>o.close(e)),s}createListener(e,t){return"function"==typeof e&&(t=e,e={}),f(e,t)}filter(e){return Array.isArray(e)||(e=[e]),e.filter(e=>!s(e.protoNames(),"p2p-circuit")&&(s(e.protoNames(),"ipfs")&&(e=e.decapsulate("ipfs")),i.WebSockets.matches(e)||i.WebSocketsSecure.matches(e)))}},{className:"WebSockets",symbolName:"@libp2p/js-libp2p-websockets/websockets"})},function(e,t,r){"use strict";(function(t){const n=r(15),i=r(31),o=r(1350),s=r(649),a=r(5),c=r(9),u=r(26),f=new Error("Sorry, Not Implemented Yet."),l=u.proto(function(e){if(!(this instanceof l))return new l(e);if(null==e&&(e=""),e instanceof t)this.buffer=o.fromBuffer(e);else if("string"==typeof e||e instanceof String){if(e.length>0&&"/"!==e.charAt(0))throw new Error(`multiaddr "${e}" must start with a "/"`);this.buffer=o.fromString(e)}else{if(!(e.buffer&&e.protos&&e.protoCodes))throw new Error("addr must be a string, Buffer, or another Multiaddr");this.buffer=o.fromBuffer(e.buffer)}},{className:"Multiaddr",symbolName:"@multiformats/js-multiaddr/multiaddr"});l.prototype.toString=function(){return o.bufferToString(this.buffer)},l.prototype.toOptions=function(){const e={},t=this.toString().split("/");return e.family="ip4"===t[1]?"ipv4":"ipv6",e.host=t[2],e.transport=t[3],e.port=t[4],e},l.prototype.inspect=function(){return""},l.prototype.protos=function(){return n(this.protoCodes(),function(e){return i(s(e))})},l.prototype.protoCodes=function(){const e=[],t=this.buffer;let r=0;for(;r{if(e[0]===s.names.ipfs.code)return!0})[0][1],c.decode(e)}catch(t){e=null}return e},l.prototype.equals=function(e){return this.buffer.equals(e.buffer)},l.prototype.nodeAddress=function(){const e=this.protoCodes(),t=this.protoNames(),r=this.toString().split("/").slice(1);if(r.length<4)throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6}/{address}/{tcp, udp}/{port}".');if(4!==e[0]&&41!==e[0]&&54!==e[0]&&55!==e[0])throw new Error(`no protocol with name: "'${t[0]}'". Must have a valid family name: "{ip4, ip6, dns4, dns6}".`);if("tcp"!==r[2]&&"udp"!==r[2])throw new Error(`no protocol with name: "'${t[1]}'". Must have a valid transport protocol: "{tcp, udp}".`);return{family:41===e[0]||55===e[0]?6:4,address:r[1],port:r[3]}},l.fromNodeAddress=function(e,t){if(!e)throw new Error("requires node address object");if(!t)throw new Error("requires transport protocol");const r="IPv6"===e.family?"ip6":"ip4";return l("/"+[r,e.address,t,e.port].join("/"))},l.prototype.isThinWaistAddress=function(e){const t=(e||this).protos();return 2===t.length&&((4===t[0].code||41===t[0].code)&&(6===t[1].code||17===t[1].code))},l.prototype.fromStupidString=function(e){throw f},l.protocols=s,l.isName=function(e){return!!l.isMultiaddr(e)&&e.protos().some(e=>e.resolvable)},l.resolve=function(e,t){return l.isMultiaddr(e)&&l.isName(e)?t(new Error("not implemented yet")):t(new Error("not a valid name"))},e.exports=l}).call(this,r(0).Buffer)},function(e,t,r){var n=r(1352),i=r(650),o=r(830),s=r(355)("socket.io-client");e.exports=t=c;var a=t.managers={};function c(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i=n(e),c=i.source,u=i.id,f=i.path,l=a[u]&&f in a[u].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||l?(s("ignoring socket cache for %s",c),r=o(c,t)):(a[u]||(s("new io instance for %s",c),a[u]=o(c,t)),r=a[u]),i.query&&!t.query&&(t.query=i.query),r.socket(i.path,t)}t.protocol=i.protocol,t.connect=c,t.Manager=r(830),t.Socket=r(836)},function(e,t){var r=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,n=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function(e){var t=e,i=e.indexOf("["),o=e.indexOf("]");-1!=i&&-1!=o&&(e=e.substring(0,i)+e.substring(i,o).replace(/:/g,";")+e.substring(o,e.length));for(var s=r.exec(e||""),a={},c=14;c--;)a[n[c]]=s[c]||"";return-1!=i&&-1!=o&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){(function(t){e.exports=function(e){return r&&t.isBuffer(e)||n&&(e instanceof ArrayBuffer||i(e))};var r="function"==typeof t&&"function"==typeof t.isBuffer,n="function"==typeof ArrayBuffer,i=function(e){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer}}).call(this,r(0).Buffer)},function(e,t,r){var n=r(1359),i=r(836),o=r(204),s=r(650),a=r(837),c=r(838),u=r(355)("socket.io-client:manager"),f=r(835),l=r(1376),h=Object.prototype.hasOwnProperty;function p(e,t){if(!(this instanceof p))return new p(e,t);e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new l({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var r=t.parser||s;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this.autoConnect=!1!==t.autoConnect,this.autoConnect&&this.open()}e.exports=p,p.prototype.emitAll=function(){for(var e in this.emit.apply(this,arguments),this.nsps)h.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},p.prototype.updateSocketIds=function(){for(var e in this.nsps)h.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))},p.prototype.generateId=function(e){return("/"===e?"":e+"#")+this.engine.id},o(p.prototype),p.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},p.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},p.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},p.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},p.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},p.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},p.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},p.prototype.open=p.prototype.connect=function(e,t){if(u("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;u("opening %s",this.uri),this.engine=n(this.uri,this.opts);var r=this.engine,i=this;this.readyState="opening",this.skipReconnect=!1;var o=a(r,"open",function(){i.onopen(),e&&e()}),s=a(r,"error",function(t){if(u("connect_error"),i.cleanup(),i.readyState="closed",i.emitAll("connect_error",t),e){var r=new Error("Connection error");r.data=t,e(r)}else i.maybeReconnectOnOpen()});if(!1!==this._timeout){var c=this._timeout;u("connect attempt will timeout after %d",c);var f=setTimeout(function(){u("connect attempt timed out after %d",c),o.destroy(),r.close(),r.emit("error","timeout"),i.emitAll("connect_timeout",c)},c);this.subs.push({destroy:function(){clearTimeout(f)}})}return this.subs.push(o),this.subs.push(s),this},p.prototype.onopen=function(){u("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(a(e,"data",c(this,"ondata"))),this.subs.push(a(e,"ping",c(this,"onping"))),this.subs.push(a(e,"pong",c(this,"onpong"))),this.subs.push(a(e,"error",c(this,"onerror"))),this.subs.push(a(e,"close",c(this,"onclose"))),this.subs.push(a(this.decoder,"decoded",c(this,"ondecoded")))},p.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},p.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},p.prototype.ondata=function(e){this.decoder.add(e)},p.prototype.ondecoded=function(e){this.emit("packet",e)},p.prototype.onerror=function(e){u("error",e),this.emitAll("error",e)},p.prototype.socket=function(e,t){var r=this.nsps[e];if(!r){r=new i(this,e,t),this.nsps[e]=r;var n=this;r.on("connecting",o),r.on("connect",function(){r.id=n.generateId(e)}),this.autoConnect&&o()}function o(){~f(n.connecting,r)||n.connecting.push(r)}return r},p.prototype.destroy=function(e){var t=f(this.connecting,e);~t&&this.connecting.splice(t,1),this.connecting.length||this.close()},p.prototype.packet=function(e){u("writing packet %j",e);var t=this;e.query&&0===e.type&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,function(r){for(var n=0;n0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},p.prototype.cleanup=function(){u("cleanup");for(var e=this.subs.length,t=0;t=this._reconnectionAttempts)u("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();u("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var r=setTimeout(function(){e.skipReconnect||(u("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open(function(t){t?(u("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(u("reconnect success"),e.onreconnect())}))},t);this.subs.push({destroy:function(){clearTimeout(r)}})}},p.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},function(e,t,r){var n=r(651),i=r(1362),o=r(1372),s=r(1373);t.polling=function(e){var t=!1,r=!1,s=!1!==e.jsonp;if("undefined"!=typeof location){var a="https:"===location.protocol,c=location.port;c||(c=a?443:80),t=e.hostname!==location.hostname||c!==e.port,r=e.secure!==a}if(e.xdomain=t,e.xscheme=r,"open"in new n(e)&&!e.forceJSONP)return new i(e);if(!s)throw new Error("JSONP disabled");return new o(e)},t.websocket=s},function(e,t,r){var n=r(652),i=r(356),o=r(205),s=r(357),a=r(834),c=r(358)("engine.io-client:polling");e.exports=f;var u=null!=new(r(651))({xdomain:!1}).responseType;function f(e){var t=e&&e.forceBase64;u&&!t||(this.supportsBinary=!1),n.call(this,e)}s(f,n),f.prototype.name="polling",f.prototype.doOpen=function(){this.poll()},f.prototype.pause=function(e){var t=this;function r(){c("paused"),t.readyState="paused",e()}if(this.readyState="pausing",this.polling||!this.writable){var n=0;this.polling&&(c("we are currently polling - waiting to pause"),n++,this.once("pollComplete",function(){c("pre-pause polling complete"),--n||r()})),this.writable||(c("we are currently writing - waiting to pause"),n++,this.once("drain",function(){c("pre-pause writing complete"),--n||r()}))}else r()},f.prototype.poll=function(){c("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},f.prototype.onData=function(e){var t=this;c("polling got data %s",e);o.decodePayload(e,this.socket.binaryType,function(e,r,n){if("opening"===t.readyState&&t.onOpen(),"close"===e.type)return t.onClose(),!1;t.onPacket(e)}),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():c('ignoring poll - transport state "%s"',this.readyState))},f.prototype.doClose=function(){var e=this;function t(){c("writing close packet"),e.write([{type:"close"}])}"open"===this.readyState?(c("transport open - closing"),t()):(c("transport not open - deferring close"),this.once("open",t))},f.prototype.write=function(e){var t=this;this.writable=!1;var r=function(){t.writable=!0,t.emit("drain")};o.encodePayload(e,this.supportsBinary,function(e){t.doWrite(e,r)})},f.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",r="";return!1!==this.timestampRequests&&(e[this.timestampParam]=a()),this.supportsBinary||e.sid||(e.b64=1),e=i.encode(e),this.port&&("https"===t&&443!==Number(this.port)||"http"===t&&80!==Number(this.port))&&(r=":"+this.port),e.length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+r+this.path+e}},function(e,t,r){(function(t){var n=r(1364),i=Object.prototype.toString,o="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===i.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===i.call(File);e.exports=function e(r){if(!r||"object"!=typeof r)return!1;if(n(r)){for(var i=0,a=r.length;i0);return t}function f(){var e=u(+new Date);return e!==n?(a=0,n=e):e+"."+u(a++)}for(;c65536)throw new Error("requested too many random bytes");var s=new t.Uint8Array(e);e>0&&o.getRandomValues(s);var a=i.from(s.buffer);if("function"==typeof r)return n.nextTick(function(){r(null,a)});return a}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,r(12),r(6))},function(e,t,r){"use strict";(function(t,n){var i=r(75);e.exports=v;var o,s=r(336);v.ReadableState=y;r(23).EventEmitter;var a=function(e,t){return e.listeners(t).length},c=r(841),u=r(3).Buffer,f=t.Uint8Array||function(){};var l=r(53);l.inherits=r(4);var h=r(1380),p=void 0;p=h&&h.debuglog?h.debuglog("stream"):function(){};var d,g=r(1381),b=r(842);l.inherits(v,c);var m=["error","close","destroy","pause","resume"];function y(e,t){e=e||{};var n=t instanceof(o=o||r(206));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,s=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=r(52).StringDecoder),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function v(e){if(o=o||r(206),!(this instanceof v))return new v(e);this._readableState=new y(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),c.call(this)}function w(e,t,r,n,i){var o,s=e._readableState;null===t?(s.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,E(e)}(e,s)):(i||(o=function(e,t){var r;n=t,u.isBuffer(n)||n instanceof f||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(s,t)),o?e.emit("error",o):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):A(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?A(e,s,t,!1):x(e,s)):A(e,s,t,!1))):n||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=_?e=_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function E(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(k,e):k(e))}function k(e){p("emit readable"),e.emit("readable"),T(e)}function x(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(C,e,t))}function C(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;eo.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0===(e-=s)){s===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,s),0===(e-=s)){s===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(O,t,e))}function O(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function M(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):E(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&P(this),null;var n,i=t.needReadable;return p("need readable",i),(0===t.length||t.length-e0?R(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&P(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,t);var c=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?f:v;function u(t,n){p("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,p("cleanup"),e.removeListener("close",m),e.removeListener("finish",y),e.removeListener("drain",l),e.removeListener("error",b),e.removeListener("unpipe",u),r.removeListener("end",f),r.removeListener("end",v),r.removeListener("data",g),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function f(){p("onend"),e.end()}o.endEmitted?i.nextTick(c):r.once("end",c),e.on("unpipe",u);var l=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,T(e))}}(r);e.on("drain",l);var h=!1;var d=!1;function g(t){p("ondata"),d=!1,!1!==e.write(t)||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==M(o.pipes,e))&&!h&&(p("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function b(t){p("onerror",t),v(),e.removeListener("error",b),0===a(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",y),v()}function y(){p("onfinish"),e.removeListener("close",m),v()}function v(){p("unpipe"),r.unpipe(e)}return r.on("data",g),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",b),e.once("close",m),e.once("finish",y),e.emit("pipe",r),o.flowing||(p("pipe resume"),r.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o-1?n:o.nextTick;y.WritableState=m;var u=r(53);u.inherits=r(4);var f={deprecate:r(202)},l=r(841),h=r(3).Buffer,p=i.Uint8Array||function(){};var d,g=r(842);function b(){}function m(e,t){a=a||r(206),e=e||{};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,u=e.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(u||0===u)?u:f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(o.nextTick(i,n),o.nextTick(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),E(e,t))}(e,r,n,t,i);else{var s=_(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||A(e,r),n?c(w,e,r,s,i):w(e,r,s,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function y(e){if(a=a||r(206),!(d.call(y,this)||this instanceof a))return new y(e);this._writableState=new m(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function v(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function A(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,c=!0;r;)i[a]=r,r.isBuf||(c=!1),r=r.next,a+=1;i.allBuffers=c,v(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,l=r.callback;if(v(e,t,!1,t.objectMode?1:u.length,u,f,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function _(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)})}function E(e,t){var r=_(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(y,l),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===y&&(e&&e._writableState instanceof m)}})):d=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,r){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=e,h.isBuffer(n)||n instanceof p);return a&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=b),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),o.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),o.nextTick(n,s),i=!1),i}(this,i,e,r))&&(i.pendingcb++,s=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,r));return t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var c=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?o.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=g.destroy,y.prototype._undestroy=g.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(6),r(35).setImmediate,r(12))},function(e,t,r){"use strict";e.exports=s;var n=r(206),i=r(53);function o(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length({digest(t,o){((t,r,o)=>{n(i.subtle.sign({name:"HMAC"},t,r).then(t=>e.from(t)),o)})(r,t,o)},length:o[t]})),a)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(24),i=r(1392);function o(e,t,r,i){if("function"==typeof r&&(i=r,r=void 0),!i)throw new Error("Missing callback");o.digest(e,t,r,(e,o)=>{if(e)return i(e);i(null,n.encode(o,t,r))})}e.exports=o,o.Buffer=t,o.multihash=n,o.digest=function(e,t,r,n){if("function"==typeof r&&(n=r,r=void 0),!n)throw new Error("Missing callback");let i,s=n;r&&(s=((e,t)=>{if(e)return n(e);n(null,t.slice(0,r))}));try{i=o.createHash(t)}catch(e){return s(e)}i(e,s)},o.createHash=function(e){if(e=n.coerceCode(e),!o.functions[e])throw new Error("multihash function "+e+" not yet supported");return o.functions[e]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(7);t.toCallback=(e=>(function(t,r){const i=(e,t)=>n(()=>{r(e,t)});let o;try{o=e(t)}catch(e){return void i(e)}i(null,o)})),t.toBuf=((t,r)=>n=>{let i=t(n,r);return e.from(i,"hex")}),t.fromString=((t,r)=>n=>{const i=e.isBuffer(n)?n.toString():n;return t(i,r)}),t.fromNumberTo32BitBuf=((t,r)=>n=>{let i=t(n,r);const o=new Array(4);for(let e=0;e<4;e++)o[e]=255&i,i>>=8;return e.from(o)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(653),i=r(654)();function o(e){return Promise.all([i.subtle.exportKey("jwk",e.privateKey),i.subtle.exportKey("jwk",e.publicKey)])}t.utils=r(1395),t.generateKey=function(e,t){n(i.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(o).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.unmarshalPrivateKey=function(e,t){const r=i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);var s;n(Promise.all([r,(s=e,i.subtle.importKey("jwk",{kty:s.kty,n:s.n,e:s.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]))]).then(e=>o({privateKey:e[0],publicKey:e[1]})).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.getRandomValues=function(t){return e.from(i.getRandomValues(t))},t.hashAndSign=function(t,r,o){n(i.subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]).then(e=>i.subtle.sign({name:"RSASSA-PKCS1-v1_5"},e,Uint8Array.from(r))).then(t=>e.from(t)),o)},t.hashAndVerify=function(e,t,r,o){n(i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]).then(e=>i.subtle.verify({name:"RSASSA-PKCS1-v1_5"},e,t,r)),o)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(21).bignum;t.toBase64=function(t,r){return t.toArrayLike(e,"be",r).toString("base64").replace(/(=*)$/,"").replace(/\+/g,"-").replace(/\//g,"_")},t.toBn=function(t){return new n(e.from(t,"base64"))}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(848);e.exports=function(e){if(!e||"number"!=typeof e)throw new Error("first argument must be a Number bigger than 0");return n.getRandomValues(new Uint8Array(e))}},function(e,t,r){"use strict";const n=r(1402);e.exports={ensureMultiaddr:function(e){return n.isMultiaddr(e)?e:n(e)}}},function(e,t,r){"use strict";(function(e){const n=r(659),i=r(660)(),o=r(1414),s={SHA1:"SHA-1",SHA256:"SHA-256",SHA512:"SHA-512"};t.create=function(t,r,a){const c=s[t];n(i.subtle.importKey("raw",r,{name:"HMAC",hash:{name:c}},!1,["sign"]).then(r=>({digest(t,o){((t,r,o)=>{n(i.subtle.sign({name:"HMAC"},t,r).then(t=>e.from(t)),o)})(r,t,o)},length:o[t]})),a)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(24),i=r(1419);function o(e,t,r,i){if("function"==typeof r&&(i=r,r=void 0),!i)throw new Error("Missing callback");o.digest(e,t,r,(e,o)=>{if(e)return i(e);i(null,n.encode(o,t,r))})}e.exports=o,o.Buffer=t,o.multihash=n,o.digest=function(e,t,r,n){if("function"==typeof r&&(n=r,r=void 0),!n)throw new Error("Missing callback");let i,s=n;r&&(s=((e,t)=>{if(e)return n(e);n(null,t.slice(0,r))}));try{i=o.createHash(t)}catch(e){return s(e)}i(e,s)},o.createHash=function(e){if(e=n.coerceCode(e),!o.functions[e])throw new Error("multihash function "+e+" not yet supported");return o.functions[e]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(7);t.toCallback=(e=>(function(t,r){const i=(e,t)=>n(()=>{r(e,t)});let o;try{o=e(t)}catch(e){return void i(e)}i(null,o)})),t.toBuf=((t,r)=>n=>{let i=t(n,r);return e.from(i,"hex")}),t.fromString=((t,r)=>n=>{const i=e.isBuffer(n)?n.toString():n;return t(i,r)}),t.fromNumberTo32BitBuf=((t,r)=>n=>{let i=t(n,r);const o=new Array(4);for(let e=0;e<4;e++)o[e]=255&i,i>>=8;return e.from(o)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(659),i=r(660)();function o(e){return Promise.all([i.subtle.exportKey("jwk",e.privateKey),i.subtle.exportKey("jwk",e.publicKey)])}t.utils=r(1422),t.generateKey=function(e,t){n(i.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(o).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.unmarshalPrivateKey=function(e,t){const r=i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);var s;n(Promise.all([r,(s=e,i.subtle.importKey("jwk",{kty:s.kty,n:s.n,e:s.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]))]).then(e=>o({privateKey:e[0],publicKey:e[1]})).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.getRandomValues=function(t){return e.from(i.getRandomValues(t))},t.hashAndSign=function(t,r,o){n(i.subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]).then(e=>i.subtle.sign({name:"RSASSA-PKCS1-v1_5"},e,Uint8Array.from(r))).then(t=>e.from(t)),o)},t.hashAndVerify=function(e,t,r,o){n(i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]).then(e=>i.subtle.verify({name:"RSASSA-PKCS1-v1_5"},e,t,r)),o)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(21).bignum;t.toBase64=function(t,r){return t.toArrayLike(e,"be",r).toString("base64").replace(/(=*)$/,"").replace(/\+/g,"-").replace(/\//g,"_")},t.toBn=function(t){return new n(e.from(t,"base64"))}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(855);e.exports=function(e){if(!e||"number"!=typeof e)throw new Error("first argument must be a Number bigger than 0");return n.getRandomValues(new Uint8Array(e))}},function(e,t,r){"use strict";const n=r(1429);e.exports={ensureMultiaddr:function(e){return n.isMultiaddr(e)?e:n(e)}}},function(e,t,r){"use strict";(function(n){const i=r(657),o=r(41),s=r(115),a=r(144);const c={string:e=>"string"==typeof e,object:e=>"object"==typeof e,multiaddr:e=>{if(c.string(e))try{return i(e),!0}catch(e){return!1}},function:e=>"function"==typeof e};function u(e,t){if(!Array.isArray(t))throw new Error("Data is not an array");e.forEach((e,r)=>{if(!c[e])throw console.error("Type %s does not exist",e),new Error("Type "+e+" does not exist");if(!c[e](t[r]))throw new Error("Data at index "+r+" is invalid for type "+e)})}(t=e.exports).cleanUrlSIO=function(e){const t=e.protos(),r=t[0].name,n=t[1].name,i=t[2].name,o=e.stringTuples(),s=o[1][1];if("tcp"!==n||"ws"!==i&&"wss"!==i)throw new Error("invalid multiaddr: "+e.toString());let a=o[0][1];"ip6"===r&&(a="["+a+"]");let c="ws"===i&&80===s||"wss"===i&&443===s?"":s;return("wss"===i?"https":"http")+"://"+a+(c?":"+c:"")},t.validate=u,t.Protocol=function(e){e||(e=(()=>{}));const t=this;t.requests={},t.addRequest=((e,r,n)=>{t.requests[e]={def:r,handle:n}}),t.handleSocket=(r=>{r.r={},Object.keys(t.requests).forEach(n=>{const i=t.requests[n];r.on(n,function(){const t=[...arguments];try{u(i.def,t),t.unshift(r),i.handle.apply(null,t)}catch(i){e(i),e("peer %s has sent invalid data for request %s",r.id||"",n,t)}})})})},t.getIdAndValidate=function(e,t,r){o.createFromPubKey(n.from(e,"hex"),(i,o)=>i?r(new Error("Crypto error")):o.toB58String()!==t?r(new Error("Id is not matching")):r(null,s.keys.unmarshalPublicKey(n.from(e,"hex"))))},t.validateMa=(e=>a.WebSocketStar.matches(i(e)))}).call(this,r(0).Buffer)},function(e,t,r){var n=r(1436),i=r(625),o=i;o.v1=n,o.v4=i,e.exports=o},function(e,t,r){(t=e.exports=r(862)).Stream=t,t.Readable=t,t.Writable=r(866),t.Duplex=r(207),t.Transform=r(867),t.PassThrough=r(1448)},function(e,t,r){"use strict";(function(t,n){var i;e.exports=E,E.ReadableState=S;r(23).EventEmitter;var o=function(e,t){return e.listeners(t).length},s=r(863),a=r(0).Buffer,c=t.Uint8Array||function(){};var u,f=r(1442);u=f&&f.debuglog?f.debuglog("stream"):function(){};var l,h,p=r(1443),d=r(864),g=r(865).getHighWaterMark,b=r(294).codes,m=b.ERR_INVALID_ARG_TYPE,y=b.ERR_STREAM_PUSH_AFTER_EOF,v=b.ERR_METHOD_NOT_IMPLEMENTED,w=b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,A=r(1445).emitExperimentalWarning;r(4)(E,s);var _=["error","close","destroy","pause","resume"];function S(e,t,n){i=i||r(207),e=e||{},"boolean"!=typeof n&&(n=t instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.emitClose=!1!==e.emitClose,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(l||(l=r(52).StringDecoder),this.decoder=new l(e.encoding),this.encoding=e.encoding)}function E(e){if(i=i||r(207),!(this instanceof E))return new E(e);var t=this instanceof i;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function k(e,t,r,n,i){u("readableAddChunk",t);var o,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?B(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,T(e)))}(e,s);else if(i||(o=function(e,t){var r;n=t,a.isBuffer(n)||n instanceof c||"string"==typeof t||void 0===t||e.objectMode||(r=new m("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(s,t)),o)e.emit("error",o);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n)s.endEmitted?e.emit("error",new w):x(e,s,t,!0);else if(s.ended)e.emit("error",new y);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?x(e,s,t,!1):R(e,s)):x(e,s,t,!1)}else n||(s.reading=!1,R(e,s));return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=C?e=C:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function B(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(T,e))}function T(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||e.emit("readable"),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,D(e)}function R(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(P,e,t))}function P(e,t){for(var r=t.length;!t.reading&&!t.ended&&t.length0,e.listenerCount("data")>0&&e.resume()}function M(e){u("readable nexttick read 0"),e.read(0)}function N(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),D(e),t.flowing&&!t.reading&&e.read(0)}function D(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function K(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function U(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(j,t,e))}function j(e,t){u("endReadableNT",e.endEmitted,e.length),e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function F(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?U(this):B(this),null;if(0===(e=I(e,t))&&t.ended)return 0===t.length&&U(this),null;var n,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e0?K(e,t):null)?(t.needReadable=!0,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&U(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(e){this.emit("error",new v("_read()"))},E.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,u("pipe count=%d opts=%j",i.pipesCount,t);var s=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?c:b;function a(t,n){u("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,u("cleanup"),e.removeListener("close",d),e.removeListener("finish",g),e.removeListener("drain",f),e.removeListener("error",p),e.removeListener("unpipe",a),r.removeListener("end",c),r.removeListener("end",b),r.removeListener("data",h),l=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function c(){u("onend"),e.end()}i.endEmitted?n.nextTick(s):r.once("end",s),e.on("unpipe",a);var f=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,D(e))}}(r);e.on("drain",f);var l=!1;function h(t){u("ondata");var n=e.write(t);u("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==F(i.pipes,e))&&!l&&(u("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function p(t){u("onerror",t),b(),e.removeListener("error",p),0===o(e,"error")&&e.emit("error",t)}function d(){e.removeListener("finish",g),b()}function g(){u("onfinish"),e.removeListener("close",d),b()}function b(){u("unpipe"),r.unpipe(e)}return r.on("data",h),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",p),e.once("close",d),e.once("finish",g),e.emit("pipe",r),i.flowing||(u("pipe resume"),r.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,u("on readable",i.length,i.reading),i.length?B(this):i.reading||n.nextTick(M,this))),r},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(O,this),r},E.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(O,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(N,e,t))}(this,e)),this},E.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this},E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<_.length;o++)e.on(_[o],this.emit.bind(this,_[o]));return this._read=function(t){u("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(E.prototype[Symbol.asyncIterator]=function(){return A("Readable[Symbol.asyncIterator]"),void 0===h&&(h=r(1446)),h(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),E._fromList=K,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}})}).call(this,r(12),r(6))},function(e,t,r){e.exports=r(23).EventEmitter},function(e,t,r){"use strict";(function(t){function r(e,t){i(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,o){var s=this,a=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return a||c?(o?o(e):!e||this._writableState&&this._writableState.errorEmitted||t.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!o&&e?(t.nextTick(r,s,e),s._writableState&&(s._writableState.errorEmitted=!0)):o?(t.nextTick(n,s),o(e)):t.nextTick(n,s)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}}).call(this,r(6))},function(e,t,r){"use strict";var n=r(294).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},function(e,t,r){"use strict";(function(t,n){function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var o;e.exports=E,E.WritableState=S;var s={deprecate:r(202)},a=r(863),c=r(0).Buffer,u=t.Uint8Array||function(){};var f,l=r(864),h=r(865).getHighWaterMark,p=r(294).codes,d=p.ERR_INVALID_ARG_TYPE,g=p.ERR_METHOD_NOT_IMPLEMENTED,b=p.ERR_MULTIPLE_CALLBACK,m=p.ERR_STREAM_CANNOT_PIPE,y=p.ERR_STREAM_DESTROYED,v=p.ERR_STREAM_NULL_VALUES,w=p.ERR_STREAM_WRITE_AFTER_END,A=p.ERR_UNKNOWN_ENCODING;function _(){}function S(e,t,s){o=o||r(207),e=e||{},"boolean"!=typeof s&&(s=t instanceof o),this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=h(this,e,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new b;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,o){--t.pendingcb,r?(n.nextTick(o,i),n.nextTick(T,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(o(i),e._writableState.errorEmitted=!0,e.emit("error",i),T(e,t))}(e,r,i,t,o);else{var s=I(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||C(e,r),i?n.nextTick(x,e,r,s,o):x(e,r,s,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function E(e){var t=this instanceof(o=o||r(207));if(!t&&!f.call(E,this))return new E(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),a.call(this)}function k(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function x(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),T(e,t)}function C(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=new Array(n),s=t.corkedRequestsFree;s.entry=r;for(var a=0,c=!0;r;)o[a]=r,r.isBuf||(c=!1),r=r.next,a+=1;o.allBuffers=c,k(e,t,!0,t.length,o,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,l=r.callback;if(k(e,t,!1,t.objectMode?1:u.length,u,f,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function I(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function B(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),T(e,t)})}function T(e,t){var r=I(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,n.nextTick(B,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}r(4)(E,a),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(f=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(e){return!!f.call(this,e)||this===E&&(e&&e._writableState instanceof S)}})):f=function(e){return e instanceof this},E.prototype.pipe=function(){this.emit("error",new m)},E.prototype.write=function(e,t,r){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=e,c.isBuffer(i)||i instanceof u);return a&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=_),o.ending?function(e,t){var r=new w;e.emit("error",r),n.nextTick(t,r)}(this,r):(a||function(e,t,r,i){var o;return null===r?o=new v:"string"==typeof r||t.objectMode||(o=new d("chunk",["string","Buffer"],r)),!o||(e.emit("error",o),n.nextTick(i,o),!1)}(this,o,e,r))&&(o.pendingcb++,s=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,r));return t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length-1))throw new A(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,r){r(new g("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,T(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=l.destroy,E.prototype._undestroy=l.undestroy,E.prototype._destroy=function(e,t){t(e)}}).call(this,r(12),r(6))},function(e,t,r){"use strict";e.exports=f;var n=r(294).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,c=r(207);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):A(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?A(e,s,t,!1):x(e,s)):A(e,s,t,!1))):n||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=_?e=_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function E(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(k,e):k(e))}function k(e){p("emit readable"),e.emit("readable"),T(e)}function x(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(C,e,t))}function C(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;eo.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0===(e-=s)){s===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,s),0===(e-=s)){s===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(O,t,e))}function O(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function M(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):E(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&P(this),null;var n,i=t.needReadable;return p("need readable",i),(0===t.length||t.length-e0?R(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&P(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,t);var c=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?f:v;function u(t,n){p("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,p("cleanup"),e.removeListener("close",m),e.removeListener("finish",y),e.removeListener("drain",l),e.removeListener("error",b),e.removeListener("unpipe",u),r.removeListener("end",f),r.removeListener("end",v),r.removeListener("data",g),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function f(){p("onend"),e.end()}o.endEmitted?i.nextTick(c):r.once("end",c),e.on("unpipe",u);var l=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,T(e))}}(r);e.on("drain",l);var h=!1;var d=!1;function g(t){p("ondata"),d=!1,!1!==e.write(t)||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==M(o.pipes,e))&&!h&&(p("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function b(t){p("onerror",t),v(),e.removeListener("error",b),0===a(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",y),v()}function y(){p("onfinish"),e.removeListener("close",m),v()}function v(){p("unpipe"),r.unpipe(e)}return r.on("data",g),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",b),e.once("close",m),e.once("finish",y),e.emit("pipe",r),o.flowing||(p("pipe resume"),r.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o-1?n:o.nextTick;y.WritableState=m;var u=r(53);u.inherits=r(4);var f={deprecate:r(202)},l=r(869),h=r(3).Buffer,p=i.Uint8Array||function(){};var d,g=r(870);function b(){}function m(e,t){a=a||r(208),e=e||{};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,u=e.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(u||0===u)?u:f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(o.nextTick(i,n),o.nextTick(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),E(e,t))}(e,r,n,t,i);else{var s=_(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||A(e,r),n?c(w,e,r,s,i):w(e,r,s,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function y(e){if(a=a||r(208),!(d.call(y,this)||this instanceof a))return new y(e);this._writableState=new m(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function v(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function A(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,c=!0;r;)i[a]=r,r.isBuf||(c=!1),r=r.next,a+=1;i.allBuffers=c,v(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,l=r.callback;if(v(e,t,!1,t.objectMode?1:u.length,u,f,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function _(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)})}function E(e,t){var r=_(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(y,l),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===y&&(e&&e._writableState instanceof m)}})):d=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,r){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=e,h.isBuffer(n)||n instanceof p);return a&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=b),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),o.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),o.nextTick(n,s),i=!1),i}(this,i,e,r))&&(i.pendingcb++,s=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,r));return t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var c=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?o.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=g.destroy,y.prototype._undestroy=g.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(6),r(35).setImmediate,r(12))},function(e,t,r){"use strict";e.exports=s;var n=r(208),i=r(53);function o(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length({digest(t,o){((t,r,o)=>{n(i.subtle.sign({name:"HMAC"},t,r).then(t=>e.from(t)),o)})(r,t,o)},length:o[t]})),a)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(24),i=r(1470);function o(e,t,r,i){if("function"==typeof r&&(i=r,r=void 0),!i)throw new Error("Missing callback");o.digest(e,t,r,(e,o)=>{if(e)return i(e);i(null,n.encode(o,t,r))})}e.exports=o,o.Buffer=t,o.multihash=n,o.digest=function(e,t,r,n){if("function"==typeof r&&(n=r,r=void 0),!n)throw new Error("Missing callback");let i,s=n;r&&(s=((e,t)=>{if(e)return n(e);n(null,t.slice(0,r))}));try{i=o.createHash(t)}catch(e){return s(e)}i(e,s)},o.createHash=function(e){if(e=n.coerceCode(e),!o.functions[e])throw new Error("multihash function "+e+" not yet supported");return o.functions[e]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(7);t.toCallback=(e=>(function(t,r){const i=(e,t)=>n(()=>{r(e,t)});let o;try{o=e(t)}catch(e){return void i(e)}i(null,o)})),t.toBuf=((t,r)=>n=>{let i=t(n,r);return e.from(i,"hex")}),t.fromString=((t,r)=>n=>{const i=e.isBuffer(n)?n.toString():n;return t(i,r)}),t.fromNumberTo32BitBuf=((t,r)=>n=>{let i=t(n,r);const o=new Array(4);for(let e=0;e<4;e++)o[e]=255&i,i>>=8;return e.from(o)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(663),i=r(664)();function o(e){return Promise.all([i.subtle.exportKey("jwk",e.privateKey),i.subtle.exportKey("jwk",e.publicKey)])}t.utils=r(1473),t.generateKey=function(e,t){n(i.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(o).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.unmarshalPrivateKey=function(e,t){const r=i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);var s;n(Promise.all([r,(s=e,i.subtle.importKey("jwk",{kty:s.kty,n:s.n,e:s.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]))]).then(e=>o({privateKey:e[0],publicKey:e[1]})).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.getRandomValues=function(t){return e.from(i.getRandomValues(t))},t.hashAndSign=function(t,r,o){n(i.subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]).then(e=>i.subtle.sign({name:"RSASSA-PKCS1-v1_5"},e,Uint8Array.from(r))).then(t=>e.from(t)),o)},t.hashAndVerify=function(e,t,r,o){n(i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]).then(e=>i.subtle.verify({name:"RSASSA-PKCS1-v1_5"},e,t,r)),o)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(21).bignum;t.toBase64=function(t,r){return t.toArrayLike(e,"be",r).toString("base64").replace(/(=*)$/,"").replace(/\+/g,"-").replace(/\//g,"_")},t.toBn=function(t){return new n(e.from(t,"base64"))}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(878);e.exports=function(e){if(!e||"number"!=typeof e)throw new Error("first argument must be a Number bigger than 0");return n.getRandomValues(new Uint8Array(e))}},function(e,t,r){"use strict";const n=r(1480);e.exports={ensureMultiaddr:function(e){return n.isMultiaddr(e)?e:n(e)}}},function(e,t,r){"use strict";(function(e){const n=r(669),i=r(670)(),o=r(1495),s={SHA1:"SHA-1",SHA256:"SHA-256",SHA512:"SHA-512"};t.create=function(t,r,a){const c=s[t];n(i.subtle.importKey("raw",r,{name:"HMAC",hash:{name:c}},!1,["sign"]).then(r=>({digest(t,o){((t,r,o)=>{n(i.subtle.sign({name:"HMAC"},t,r).then(t=>e.from(t)),o)})(r,t,o)},length:o[t]})),a)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(24),i=r(1500);function o(e,t,r,i){if("function"==typeof r&&(i=r,r=void 0),!i)throw new Error("Missing callback");o.digest(e,t,r,(e,o)=>{if(e)return i(e);i(null,n.encode(o,t,r))})}e.exports=o,o.Buffer=t,o.multihash=n,o.digest=function(e,t,r,n){if("function"==typeof r&&(n=r,r=void 0),!n)throw new Error("Missing callback");let i,s=n;r&&(s=((e,t)=>{if(e)return n(e);n(null,t.slice(0,r))}));try{i=o.createHash(t)}catch(e){return s(e)}i(e,s)},o.createHash=function(e){if(e=n.coerceCode(e),!o.functions[e])throw new Error("multihash function "+e+" not yet supported");return o.functions[e]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(7);t.toCallback=(e=>(function(t,r){const i=(e,t)=>n(()=>{r(e,t)});let o;try{o=e(t)}catch(e){return void i(e)}i(null,o)})),t.toBuf=((t,r)=>n=>{let i=t(n,r);return e.from(i,"hex")}),t.fromString=((t,r)=>n=>{const i=e.isBuffer(n)?n.toString():n;return t(i,r)}),t.fromNumberTo32BitBuf=((t,r)=>n=>{let i=t(n,r);const o=new Array(4);for(let e=0;e<4;e++)o[e]=255&i,i>>=8;return e.from(o)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(669),i=r(670)();function o(e){return Promise.all([i.subtle.exportKey("jwk",e.privateKey),i.subtle.exportKey("jwk",e.publicKey)])}t.utils=r(1503),t.generateKey=function(e,t){n(i.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(o).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.unmarshalPrivateKey=function(e,t){const r=i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);var s;n(Promise.all([r,(s=e,i.subtle.importKey("jwk",{kty:s.kty,n:s.n,e:s.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]))]).then(e=>o({privateKey:e[0],publicKey:e[1]})).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.getRandomValues=function(t){return e.from(i.getRandomValues(t))},t.hashAndSign=function(t,r,o){n(i.subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]).then(e=>i.subtle.sign({name:"RSASSA-PKCS1-v1_5"},e,Uint8Array.from(r))).then(t=>e.from(t)),o)},t.hashAndVerify=function(e,t,r,o){n(i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]).then(e=>i.subtle.verify({name:"RSASSA-PKCS1-v1_5"},e,t,r)),o)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(21).bignum;t.toBase64=function(t,r){return t.toArrayLike(e,"be",r).toString("base64").replace(/(=*)$/,"").replace(/\+/g,"-").replace(/\//g,"_")},t.toBn=function(t){return new n(e.from(t,"base64"))}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(885);e.exports=function(e){if(!e||"number"!=typeof e)throw new Error("first argument must be a Number bigger than 0");return n.getRandomValues(new Uint8Array(e))}},function(e,t,r){"use strict";const n=r(1510);e.exports={ensureMultiaddr:function(e){return n.isMultiaddr(e)?e:n(e)}}},function(e,t,r){"use strict";const n=r(890),i=r(1522),o=r(1524);(t=e.exports).aes=i,t.hmac=n,t.keys=o,t.randomBytes=r(895),t.pbkdf2=r(1535)},function(e,t,r){"use strict";(function(e){const n=r(674),i=r(675)(),o=r(1521),s={SHA1:"SHA-1",SHA256:"SHA-256",SHA512:"SHA-512"};t.create=function(t,r,a){const c=s[t];n(i.subtle.importKey("raw",r,{name:"HMAC",hash:{name:c}},!1,["sign"]).then(r=>({digest(t,o){((t,r,o)=>{n(i.subtle.sign({name:"HMAC"},t,r).then(t=>e.from(t)),o)})(r,t,o)},length:o[t]})),a)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(24),i=r(1526);function o(e,t,r,i){if("function"==typeof r&&(i=r,r=void 0),!i)throw new Error("Missing callback");o.digest(e,t,r,(e,o)=>{if(e)return i(e);i(null,n.encode(o,t,r))})}e.exports=o,o.Buffer=t,o.multihash=n,o.digest=function(e,t,r,n){if("function"==typeof r&&(n=r,r=void 0),!n)throw new Error("Missing callback");let i,s=n;r&&(s=((e,t)=>{if(e)return n(e);n(null,t.slice(0,r))}));try{i=o.createHash(t)}catch(e){return s(e)}i(e,s)},o.createHash=function(e){if(e=n.coerceCode(e),!o.functions[e])throw new Error("multihash function "+e+" not yet supported");return o.functions[e]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(7);t.toCallback=(e=>(function(t,r){const i=(e,t)=>n(()=>{r(e,t)});let o;try{o=e(t)}catch(e){return void i(e)}i(null,o)})),t.toBuf=((t,r)=>n=>{let i=t(n,r);return e.from(i,"hex")}),t.fromString=((t,r)=>n=>{const i=e.isBuffer(n)?n.toString():n;return t(i,r)}),t.fromNumberTo32BitBuf=((t,r)=>n=>{let i=t(n,r);const o=new Array(4);for(let e=0;e<4;e++)o[e]=255&i,i>>=8;return e.from(o)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(674),i=r(675)();function o(e){return Promise.all([i.subtle.exportKey("jwk",e.privateKey),i.subtle.exportKey("jwk",e.publicKey)])}t.utils=r(1529),t.generateKey=function(e,t){n(i.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(o).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.unmarshalPrivateKey=function(e,t){const r=i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);var s;n(Promise.all([r,(s=e,i.subtle.importKey("jwk",{kty:s.kty,n:s.n,e:s.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]))]).then(e=>o({privateKey:e[0],publicKey:e[1]})).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.getRandomValues=function(t){return e.from(i.getRandomValues(t))},t.hashAndSign=function(t,r,o){n(i.subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]).then(e=>i.subtle.sign({name:"RSASSA-PKCS1-v1_5"},e,Uint8Array.from(r))).then(t=>e.from(t)),o)},t.hashAndVerify=function(e,t,r,o){n(i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]).then(e=>i.subtle.verify({name:"RSASSA-PKCS1-v1_5"},e,t,r)),o)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(21).bignum;t.toBase64=function(t,r){return t.toArrayLike(e,"be",r).toString("base64").replace(/(=*)$/,"").replace(/\+/g,"-").replace(/\//g,"_")},t.toBn=function(t){return new n(e.from(t,"base64"))}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(893);e.exports=function(e){if(!e||"number"!=typeof e)throw new Error("first argument must be a Number bigger than 0");return n.getRandomValues(new Uint8Array(e))}},function(e,t,r){"use strict";const n=r(1536),i=r(897).ensureMultiaddr,o=r(1540),s=r(20);class a{constructor(e){s(e,"Missing peerId. Use Peer.create(cb) to create one"),this.id=e,this.multiaddrs=new o,this.protocols=new Set,this._connectedMultiaddr=void 0}connect(e){if(e=i(e),!this.multiaddrs.has(e)&&e.toString()!==`/ipfs/${this.id.toB58String()}`)throw new Error("can't be connected to missing multiaddr from set");this._connectedMultiaddr=e}disconnect(){this._connectedMultiaddr=void 0}isConnected(){return this._connectedMultiaddr}}a.create=((e,t)=>{if("function"==typeof e)return t=e,e=null,void n.create((e,r)=>{if(e)return t(e);t(null,new a(r))});"function"==typeof e.toJSON?t(null,new a(e)):n.createFromJSON(e,(e,r)=>t(e,new a(r)))}),a.isPeerInfo=(e=>Boolean("object"==typeof e&&e.id&&e.multiaddrs)),e.exports=a},function(e,t,r){"use strict";const n=r(1537);e.exports={ensureMultiaddr:function(e){return n.isMultiaddr(e)?e:n(e)}}},function(e,t,r){"use strict";(function(e){const n=r(679),i=r(680)(),o=r(1553),s={SHA1:"SHA-1",SHA256:"SHA-256",SHA512:"SHA-512"};t.create=function(t,r,a){const c=s[t];n(i.subtle.importKey("raw",r,{name:"HMAC",hash:{name:c}},!1,["sign"]).then(r=>({digest(t,o){((t,r,o)=>{n(i.subtle.sign({name:"HMAC"},t,r).then(t=>e.from(t)),o)})(r,t,o)},length:o[t]})),a)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(24),i=r(1558);function o(e,t,r,i){if("function"==typeof r&&(i=r,r=void 0),!i)throw new Error("Missing callback");o.digest(e,t,r,(e,o)=>{if(e)return i(e);i(null,n.encode(o,t,r))})}e.exports=o,o.Buffer=t,o.multihash=n,o.digest=function(e,t,r,n){if("function"==typeof r&&(n=r,r=void 0),!n)throw new Error("Missing callback");let i,s=n;r&&(s=((e,t)=>{if(e)return n(e);n(null,t.slice(0,r))}));try{i=o.createHash(t)}catch(e){return s(e)}i(e,s)},o.createHash=function(e){if(e=n.coerceCode(e),!o.functions[e])throw new Error("multihash function "+e+" not yet supported");return o.functions[e]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(7);t.toCallback=(e=>(function(t,r){const i=(e,t)=>n(()=>{r(e,t)});let o;try{o=e(t)}catch(e){return void i(e)}i(null,o)})),t.toBuf=((t,r)=>n=>{let i=t(n,r);return e.from(i,"hex")}),t.fromString=((t,r)=>n=>{const i=e.isBuffer(n)?n.toString():n;return t(i,r)}),t.fromNumberTo32BitBuf=((t,r)=>n=>{let i=t(n,r);const o=new Array(4);for(let e=0;e<4;e++)o[e]=255&i,i>>=8;return e.from(o)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(679),i=r(680)();function o(e){return Promise.all([i.subtle.exportKey("jwk",e.privateKey),i.subtle.exportKey("jwk",e.publicKey)])}t.utils=r(1561),t.generateKey=function(e,t){n(i.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(o).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.unmarshalPrivateKey=function(e,t){const r=i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);var s;n(Promise.all([r,(s=e,i.subtle.importKey("jwk",{kty:s.kty,n:s.n,e:s.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]))]).then(e=>o({privateKey:e[0],publicKey:e[1]})).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.getRandomValues=function(t){return e.from(i.getRandomValues(t))},t.hashAndSign=function(t,r,o){n(i.subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]).then(e=>i.subtle.sign({name:"RSASSA-PKCS1-v1_5"},e,Uint8Array.from(r))).then(t=>e.from(t)),o)},t.hashAndVerify=function(e,t,r,o){n(i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]).then(e=>i.subtle.verify({name:"RSASSA-PKCS1-v1_5"},e,t,r)),o)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(21).bignum;t.toBase64=function(t,r){return t.toArrayLike(e,"be",r).toString("base64").replace(/(=*)$/,"").replace(/\+/g,"-").replace(/\//g,"_")},t.toBn=function(t){return new n(e.from(t,"base64"))}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(901);e.exports=function(e){if(!e||"number"!=typeof e)throw new Error("first argument must be a Number bigger than 0");return n.getRandomValues(new Uint8Array(e))}},function(e,t,r){"use strict";const n=r(1568);e.exports={ensureMultiaddr:function(e){return n.isMultiaddr(e)?e:n(e)}}},function(e,t,r){(function(t){var r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",o="[object Null]",s="[object Proxy]",a="[object Undefined]",c="object"==typeof t&&t&&t.Object===Object&&t,u="object"==typeof self&&self&&self.Object===Object&&self,f=c||u||Function("return this")(),l=Object.prototype,h=l.hasOwnProperty,p=l.toString,d=f.Symbol,g=d?d.toStringTag:void 0;function b(e){return null==e?void 0===e?a:o:g&&g in Object(e)?function(e){var t=h.call(e,g),r=e[g];try{e[g]=void 0;var n=!0}catch(e){}var i=p.call(e);n&&(t?e[g]=r:delete e[g]);return i}(e):function(e){return p.call(e)}(e)}e.exports=function(e){if(!function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}(e))return!1;var t=b(e);return t==n||t==i||t==r||t==s}}).call(this,r(12))},function(e,t,r){"use strict";(function(t){const n=r(183),i=r(95),o=r(362).writeEncoded;e.exports=function(e,r,s){const a=n({timeout:6e4},r),c=a.handshake;return s("writing multicodec: "+e),o(c,t.from(e+"\n"),r),i.decodeFromReader(c,(t,n)=>{if(t)return r(t);const i=n.toString().slice(0,-1);if(i!==e)return r(new Error(`"${e}" not supported`),c.rest());s("received ack: "+i),r(null,c.rest())}),a}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=s(r(684)),i=s(r(329)),o=s(r(351));function s(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.default)((0,n.default)(Boolean,o.default)),e.exports=t.default},function(e,t,r){"use strict";e.exports=function(e,t,r){r(null,e===t)}},function(e,t,r){"use strict";e.exports.PROTOCOL_ID="/multistream/1.0.0"},function(e,t,r){"use strict";const n=r(295),i=r(911),o=r(361),s=r(26),a=r(919),c=r(693),u=r(920);e.exports=s(class extends a{constructor({_switch:e,peerInfo:t,muxer:r,conn:i,type:o="out"}){super({_switch:e,name:`${o}:${e._peerInfo.id.toB58String().slice(0,8)}`}),this.theirPeerInfo=t,this.theirB58Id=this.theirPeerInfo.id.toB58String(),this.conn=i,this.muxer=r;let s="DISCONNECTED";this.muxer&&(s="MUXED"),this._state=n(s,{DISCONNECTED:{dial:"DIALING",disconnect:"DISCONNECTED",done:"DISCONNECTED"},DIALING:{abort:"ABORTED",done:"DIALED",error:"ERRORED",disconnect:"DISCONNECTING"},DIALED:{encrypt:"ENCRYPTING",privatize:"PRIVATIZING"},PRIVATIZING:{done:"PRIVATIZED",abort:"ABORTED",disconnect:"DISCONNECTING"},PRIVATIZED:{encrypt:"ENCRYPTING"},ENCRYPTING:{done:"ENCRYPTED",error:"ERRORED",disconnect:"DISCONNECTING"},ENCRYPTED:{upgrade:"UPGRADING",disconnect:"DISCONNECTING"},UPGRADING:{stop:"CONNECTED",done:"MUXED",error:"ERRORED"},MUXED:{disconnect:"DISCONNECTING"},CONNECTED:{disconnect:"DISCONNECTING"},DISCONNECTING:{done:"DISCONNECTED",disconnect:"DISCONNECTING"},ABORTED:{},ERRORED:{disconnect:"DISCONNECTING"}}),this._state.on("DISCONNECTED",()=>this._onDisconnected()),this._state.on("DIALING",()=>this._onDialing()),this._state.on("DIALED",()=>this._onDialed()),this._state.on("PRIVATIZING",()=>this._onPrivatizing()),this._state.on("PRIVATIZED",()=>this._onPrivatized()),this._state.on("ENCRYPTING",()=>this._onEncrypting()),this._state.on("ENCRYPTED",()=>{this.log(`successfully encrypted connection to ${this.theirB58Id}`),this.emit("encrypted",this.conn)}),this._state.on("UPGRADING",()=>this._onUpgrading()),this._state.on("MUXED",()=>{this.log(`successfully muxed connection to ${this.theirB58Id}`),delete this.switch.conns[this.theirB58Id],this.emit("muxed",this.muxer)}),this._state.on("CONNECTED",()=>{this.log(`unmuxed connection opened to ${this.theirB58Id}`),this.emit("unmuxed",this.conn)}),this._state.on("DISCONNECTING",()=>this._onDisconnecting()),this._state.on("ABORTED",()=>this._onAborted()),this._state.on("ERRORED",()=>this._onErrored()),this._state.on("error",e=>this._onStateError(e))}dial(){return this.theirB58Id===this.ourPeerInfo.id.toB58String()?this.emit("error",u.DIAL_SELF()):"DIALING"===this.getState()?this.log("attempted to dial while already dialing, ignoring"):void this._state("dial")}shake(e,t){return e?this.muxer&&this.muxer.newStream?this.muxer.newStream((r,n)=>{if(r)return t(r,null);this.log(`created new stream to ${this.theirB58Id}`),this._protocolHandshake(e,n,t)}):void this._protocolHandshake(e,this.conn,t):t(null,null)}upgrade(){this._state("upgrade")}_onDialing(){if(this.log(`dialing ${this.theirB58Id}`),!this.switch.hasTransports())return this.close(u.NO_TRANSPORTS_REGISTERED());const e=this.switch.availableTransports(this.theirPeerInfo),t=Boolean(this.switch.transports[i.tag]);let r=!1;const n=o=>{let s=o;if(!s){if(!t)return this.close(u.CONNECTION_FAILED(new Error(`Circuit not enabled and all transports failed to dial peer ${this.theirB58Id}!`)));if(r)return this.close(u.CONNECTION_FAILED(new Error(`No available transports to dial peer ${this.theirB58Id}!`)));this.log("Falling back to dialing over circuit"),this.theirPeerInfo.multiaddrs.add(`/p2p-circuit/ipfs/${this.theirB58Id}`),r=!0,s=i.tag}this.log(`dialing transport ${s}`),this.switch.transport.dial(s,this.theirPeerInfo,(t,r)=>{if(t)return this.emit("error:connection_attempt_failed",t.errors||[t]),this.log(t),n(e.shift());this.conn=c(s,null,r,this.switch.observer),this._state("done")})};n(e.shift())}_onDialed(){this.log(`successfully dialed ${this.theirB58Id}`),this.emit("connected",this.conn)}_onDisconnecting(){this.log(`disconnecting from ${this.theirB58Id}`),this.theirPeerInfo&&this.theirPeerInfo.disconnect(),this.muxer&&this.muxer.end(),this.switch.connection.remove(this),delete this.switch.conns[this.theirB58Id],delete this.muxer,this.conn?this.conn.source(!0,()=>{this._state("done"),this.switch.emit("peer-mux-closed",this.theirPeerInfo),delete this.conn}):(this._state("done"),this.switch.emit("peer-mux-closed",this.theirPeerInfo))}_onEncrypting(){const e=new o.Dialer;e.handle(this.conn,t=>{if(t)return this.close(u.maybeUnexpectedEnd(t));this.log("selecting crypto %s to %s",this.switch.crypto.tag,this.theirB58Id),e.select(this.switch.crypto.tag,(e,t)=>{if(e)return this.close(u.maybeUnexpectedEnd(e));const r=c(null,this.switch.crypto.tag,t,this.switch.observer);this.conn=this.switch.crypto.encrypt(this.ourPeerInfo.id,r,this.theirPeerInfo.id,e=>{if(e)return this.close(e);this.conn.setPeerInfo(this.theirPeerInfo),this._state("done")})})})}_onUpgrading(){const e=Object.keys(this.switch.muxers);if(this.log(`upgrading connection to ${this.theirB58Id}`),0===e.length)return this._state("stop");const t=new o.Dialer;t.handle(this.conn,r=>{if(r)return this._didUpgrade(r);const n=r=>{this.log("selecting %s",r),t.select(r,(t,i)=>{if(t)return 0===e.length?this._didUpgrade(t):n(e.shift());const o=c(null,r,i,this.switch.observer);this.muxer=this.switch.muxers[r].dialer(o),this.switch.connection.add(this),this.muxer.once("close",()=>{this.close()}),this.muxer.on("stream",e=>{this.log(`new stream created via muxer to ${this.theirB58Id}`),e.setPeerInfo(this.theirPeerInfo),this.switch.protocolMuxer(null)(e)}),this.switch.emit("peer-mux-established",this.theirPeerInfo),this._didUpgrade(null)})};n(e.shift())})}_didUpgrade(e){if(e)return this.log("Error upgrading connection:",e),this.switch.conns[this.theirB58Id]=this,this.emit("error:upgrade_failed",e),this._state("stop");this._state("done")}_protocolHandshake(e,t,r){const n=new o.Dialer;n.handle(t,t=>{if(t)return r(t,null);n.select(e,(t,n)=>{if(t)return this.log("could not perform protocol handshake: ",t),r(t,null);const i=c(null,e,n,this.switch.observer);this.log(`successfully performed handshake of ${e} to ${this.theirB58Id}`),this.emit("connection",i),r(null,i)})})}_onStateError(e){this.emit("error",u.INVALID_STATE_TRANSITION(e)),this.log(e)}},{className:"ConnectionFSM",symbolName:"libp2p-switch/ConnectionFSM"})},function(e,t,r){"use strict";e.exports=r(1583)},function(e,t,r){"use strict";(function(e){const n=r(687),i=r(688)(),o=r(1589),s={SHA1:"SHA-1",SHA256:"SHA-256",SHA512:"SHA-512"};t.create=function(t,r,a){const c=s[t];n(i.subtle.importKey("raw",r,{name:"HMAC",hash:{name:c}},!1,["sign"]).then(r=>({digest(t,o){((t,r,o)=>{n(i.subtle.sign({name:"HMAC"},t,r).then(t=>e.from(t)),o)})(r,t,o)},length:o[t]})),a)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(24),i=r(1594);function o(e,t,r,i){if("function"==typeof r&&(i=r,r=void 0),!i)throw new Error("Missing callback");o.digest(e,t,r,(e,o)=>{if(e)return i(e);i(null,n.encode(o,t,r))})}e.exports=o,o.Buffer=t,o.multihash=n,o.digest=function(e,t,r,n){if("function"==typeof r&&(n=r,r=void 0),!n)throw new Error("Missing callback");let i,s=n;r&&(s=((e,t)=>{if(e)return n(e);n(null,t.slice(0,r))}));try{i=o.createHash(t)}catch(e){return s(e)}i(e,s)},o.createHash=function(e){if(e=n.coerceCode(e),!o.functions[e])throw new Error("multihash function "+e+" not yet supported");return o.functions[e]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(7);t.toCallback=(e=>(function(t,r){const i=(e,t)=>n(()=>{r(e,t)});let o;try{o=e(t)}catch(e){return void i(e)}i(null,o)})),t.toBuf=((t,r)=>n=>{let i=t(n,r);return e.from(i,"hex")}),t.fromString=((t,r)=>n=>{const i=e.isBuffer(n)?n.toString():n;return t(i,r)}),t.fromNumberTo32BitBuf=((t,r)=>n=>{let i=t(n,r);const o=new Array(4);for(let e=0;e<4;e++)o[e]=255&i,i>>=8;return e.from(o)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(687),i=r(688)();function o(e){return Promise.all([i.subtle.exportKey("jwk",e.privateKey),i.subtle.exportKey("jwk",e.publicKey)])}t.utils=r(1597),t.generateKey=function(e,t){n(i.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(o).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.unmarshalPrivateKey=function(e,t){const r=i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);var s;n(Promise.all([r,(s=e,i.subtle.importKey("jwk",{kty:s.kty,n:s.n,e:s.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]))]).then(e=>o({privateKey:e[0],publicKey:e[1]})).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.getRandomValues=function(t){return e.from(i.getRandomValues(t))},t.hashAndSign=function(t,r,o){n(i.subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]).then(e=>i.subtle.sign({name:"RSASSA-PKCS1-v1_5"},e,Uint8Array.from(r))).then(t=>e.from(t)),o)},t.hashAndVerify=function(e,t,r,o){n(i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]).then(e=>i.subtle.verify({name:"RSASSA-PKCS1-v1_5"},e,t,r)),o)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(21).bignum;t.toBase64=function(t,r){return t.toArrayLike(e,"be",r).toString("base64").replace(/(=*)$/,"").replace(/\+/g,"-").replace(/\//g,"_")},t.toBn=function(t){return new n(e.from(t,"base64"))}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(915);e.exports=function(e){if(!e||"number"!=typeof e)throw new Error("first argument must be a Number bigger than 0");return n.getRandomValues(new Uint8Array(e))}},function(e,t,r){"use strict";const n=r(1604);e.exports={ensureMultiaddr:function(e){return n.isMultiaddr(e)?e:n(e)}}},function(e,t,r){"use strict";const n=r(23).EventEmitter,i=r(11),o=r(26);e.exports=o(class extends n{constructor({_switch:e,name:t}){super(),this.switch=e,this.ourPeerInfo=this.switch._peerInfo,this.log=i(`libp2p:conn:${t}`),this.log.error=i(`libp2p:conn:${t}:error`)}close(e){this.log(`closing connection to ${this.theirB58Id}`),e&&this._events.error&&this.emit("error",e),this._state("disconnect")}emit(e,...t){"error"!==e||this._events.error?super.emit(e,...t):this.log.error(...t)}getState(){return this._state._state}encrypt(){this._state("encrypt")}protect(){this._state("privatize")}upgrade(){this._state("upgrade")}_onDisconnected(){this.log(`disconnected from ${this.theirB58Id}`),this.emit("close"),this.removeAllListeners()}_onPrivatized(){this.log("successfully privatized incoming connection"),this.emit("private",this.conn)}_onPrivatizing(){if(!this.switch.protector)return this._state("done");this.conn=this.switch.protector.protect(this.conn,e=>{if(e)return this.close(e);this.log(`successfully privatized conn to ${this.theirB58Id}`),this.conn.setPeerInfo(this.theirPeerInfo),this._state("done")})}},{className:"BaseConnection",symbolName:"libp2p-switch/BaseConnection"})},function(e,t,r){"use strict";const n=r(36);e.exports.PROTECTOR_REQUIRED="No protector provided with private network enforced",e.exports.CONNECTION_FAILED=(e=>n(e,"CONNECTION_FAILED")),e.exports.DIAL_SELF=(()=>n(new Error("A node cannot dial itself"),"DIAL_SELF")),e.exports.NO_TRANSPORTS_REGISTERED=(()=>n(new Error("No transports registered, dial not possible"),"NO_TRANSPORTS_REGISTERED")),e.exports.UNEXPECTED_END=(()=>n(new Error("Unexpected end of input from reader."),"UNEXPECTED_END")),e.exports.INVALID_STATE_TRANSITION=(e=>n(e,"INVALID_STATE_TRANSITION")),e.exports.maybeUnexpectedEnd=(t=>!0===t?e.exports.UNEXPECTED_END():t)},function(e,t,r){"use strict";const n=r(7);e.exports={tag:"/plaintext/1.0.0",encrypt:(e,t,r,i)=>("function"==typeof r&&(i=r,r=void 0),n(()=>i()),t)}},function(e,t,r){"use strict";const n=r(41),i=r(343),o=r(345);e.exports=function(e,t){let r;if(i.isPeerInfo(e))return e;if(o.isMultiaddr(e)){const o=e.getPeerId();try{r=t.get(o)}catch(e){r=new i(n.createFromB58String(o))}return r.multiaddrs.add(e),r}if(n.isPeerId(e)){const r=e.toB58String();try{return t.get(r)}catch(e){throw new Error("Couldnt get PeerInfo")}}throw new Error("peer type not recognized")}},function(e,t,r){(function(n){function i(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG),e}(t=e.exports=r(1630)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),!r)return;var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,n)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=i,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(i())}).call(this,r(6))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r,a=null;t=t||n.default,(0,i.default)(e,function(e,t){(0,o.default)(e)(function(e,n){r=arguments.length>2?(0,s.default)(arguments,1):n,a=e,t(!e)})},function(){t(a,r)})};var n=a(r(70)),i=a(r(292)),o=a(r(49)),s=a(r(92));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,r){var n=r(1643),i=r(733);e.exports=function(e){return null==e?[]:n(e,i(e))}},function(e,t,r){"use strict";const n=r(19),i=n(r(1645)),o=n(r(1646));(t=e.exports).rpc=i,t.td=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,r,o,s){return e((0,n.default)(r),t,(0,i.default)(o),s)}};var n=o(r(620)),i=o(r(49));function o(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,r){"use strict";(function(t){const n=r(29),i=r(14),o=r(1667),s=r(196),a=r(197).isSource,c=r(809);e.exports=function(e){const r=n((r,n,u)=>{"function"==typeof n&&(u=n,n={}),n=n||{};const f=e=>t.isBuffer(e)||s.readable(e)||a(e),l=e=>f(e)||(e=>"object"==typeof e&&(e.content?f(e.content):Boolean(e.path)&&c(e.path)))(e);if(!(l(r)||Array.isArray(r)&&r.every(l)))return u(new Error("invalid input: expected buffer, readable stream, pull stream, object or array of objects"));i(i.values([r]),e.addPullStream(n),o((e,t)=>e.patht.path?-1:0),i.collect(u))});return function(){const e=Array.from(arguments);return 1===e.length&&a(e[0])&&e.push({}),r.apply(null,e)}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";e.exports=r(1674)},function(e,t){e.exports=function(e){var t,r,n;function i(e){return r=e,function(e,i){n?t=[e,i]:r(e,i)}}return i.pause=function(){n||(n=!0,e&&e(n))},i.resume=function(){if(n&&(n=!1,e&&e(n),t)){var i=t;t=null,r(i[0],i[1])}},i}},function(e,t,r){var n=r(1701);e.exports=function(e,t,r){r=void 0===r||r;var i,o=!1;return function(s){var a,c,u=0,f=0,l=0,h=[],p=!1,d=!1;function g(){if(a){var e=a;if(c)return a=null,e(c);if(Object.hasOwnProperty.call(h,f)){a=null;var r=h[f];delete h[f],f++,e(null,r),t&&b()}else f>=l&&d&&(a=null,e(d))}}var b=n(function(){if(p=!0,d)return g();o||t&&u-t>=f||(o=!0,s(i,function(t,n){if(o=!1,t)l=u,d=t,g();else{var i=u++;e(n,function(e,t){r?h[i]=t:h.push(t),e&&(c=e),g()}),d||b()}}))});return function(e,t){e?s(d=i=e,function(e){if(t)return t(e)}):(a=t,p||b(),g())}}}},function(e,t,r){"use strict";(function(t){e.exports=function(e,r,n,i){const o=r+e.length;return n>=o||i=r&&i=r&&n0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n)s.endEmitted?e.emit("error",new y):x(e,s,t,!0);else if(s.ended)e.emit("error",new b);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?x(e,s,t,!1):R(e,s)):x(e,s,t,!1)}else n||(s.reading=!1,R(e,s));return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=C?e=C:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function B(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(T,e))}function T(e){var t=e._readableState;f("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||e.emit("readable"),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,D(e)}function R(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(P,e,t))}function P(e,t){for(var r=t.length;!t.reading&&!t.ended&&t.length0,e.listenerCount("data")>0&&e.resume()}function M(e){f("readable nexttick read 0"),e.read(0)}function N(e,t){f("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),D(e),t.flowing&&!t.reading&&e.read(0)}function D(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function K(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function U(e){var t=e._readableState;f("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(j,t,e))}function j(e,t){f("endReadableNT",e.endEmitted,e.length),e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function F(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?U(this):B(this),null;if(0===(e=I(e,t))&&t.ended)return 0===t.length&&U(this),null;var n,i=t.needReadable;return f("need readable",i),(0===t.length||t.length-e0?K(e,t):null)?(t.needReadable=!0,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&U(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(e){this.emit("error",new m("_read()"))},E.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,f("pipe count=%d opts=%j",i.pipesCount,t);var s=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?c:b;function a(t,n){f("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,f("cleanup"),e.removeListener("close",d),e.removeListener("finish",g),e.removeListener("drain",u),e.removeListener("error",p),e.removeListener("unpipe",a),r.removeListener("end",c),r.removeListener("end",b),r.removeListener("data",h),l=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}function c(){f("onend"),e.end()}i.endEmitted?n.nextTick(s):r.once("end",s),e.on("unpipe",a);var u=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,D(e))}}(r);e.on("drain",u);var l=!1;function h(t){f("ondata");var n=e.write(t);f("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==F(i.pipes,e))&&!l&&(f("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function p(t){f("onerror",t),b(),e.removeListener("error",p),0===o(e,"error")&&e.emit("error",t)}function d(){e.removeListener("finish",g),b()}function g(){f("onfinish"),e.removeListener("close",d),b()}function b(){f("unpipe"),r.unpipe(e)}return r.on("data",h),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",p),e.once("close",d),e.once("finish",g),e.emit("pipe",r),i.flowing||(f("pipe resume"),r.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,f("on readable",i.length,i.reading),i.length?B(this):i.reading||n.nextTick(M,this))),r},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(O,this),r},E.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(O,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(N,e,t))}(this,e)),this},E.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",function(){if(f("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){(f("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<_.length;o++)e.on(_[o],this.emit.bind(this,_[o]));return this._read=function(t){f("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(E.prototype[Symbol.asyncIterator]=function(){return v("Readable[Symbol.asyncIterator]"),void 0===A&&(A=r(1713)),new A(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),E._fromList=K,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}})}).call(this,r(12),r(6))},function(e,t,r){e.exports=r(23).EventEmitter},function(e,t,r){"use strict";(function(t){function r(e,t){i(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,o){var s=this,a=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return a||c?(o?o(e):!e||this._writableState&&this._writableState.errorEmitted||t.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!o&&e?(t.nextTick(r,s,e),s._writableState&&(s._writableState.errorEmitted=!0)):o?(t.nextTick(n,s),o(e)):t.nextTick(n,s)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}}).call(this,r(6))},function(e,t,r){"use strict";var n=r(368).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=o){if(!Number.isInteger(o)||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},function(e,t,r){"use strict";(function(t,n){function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var o;e.exports=E,E.WritableState=S;var s={deprecate:r(202)},a=r(934),c=r(0).Buffer,u=t.Uint8Array||function(){};var f,l=r(935),h=r(936).getHighWaterMark,p=r(368).codes,d=p.ERR_INVALID_ARG_TYPE,g=p.ERR_METHOD_NOT_IMPLEMENTED,b=p.ERR_MULTIPLE_CALLBACK,m=p.ERR_STREAM_CANNOT_PIPE,y=p.ERR_STREAM_DESTROYED,v=p.ERR_STREAM_NULL_VALUES,w=p.ERR_STREAM_WRITE_AFTER_END,A=p.ERR_UNKNOWN_ENCODING;function _(){}function S(e,t,s){o=o||r(209),e=e||{},"boolean"!=typeof s&&(s=t instanceof o),this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=h(this,e,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new b;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,o){--t.pendingcb,r?(n.nextTick(o,i),n.nextTick(T,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(o(i),e._writableState.errorEmitted=!0,e.emit("error",i),T(e,t))}(e,r,i,t,o);else{var s=I(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||C(e,r),i?n.nextTick(x,e,r,s,o):x(e,r,s,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function E(e){var t=this instanceof(o=o||r(209));if(!t&&!f.call(E,this))return new E(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),a.call(this)}function k(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function x(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),T(e,t)}function C(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=new Array(n),s=t.corkedRequestsFree;s.entry=r;for(var a=0,c=!0;r;)o[a]=r,r.isBuf||(c=!1),r=r.next,a+=1;o.allBuffers=c,k(e,t,!0,t.length,o,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,l=r.callback;if(k(e,t,!1,t.objectMode?1:u.length,u,f,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function I(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function B(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),T(e,t)})}function T(e,t){var r=I(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,n.nextTick(B,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}r(4)(E,a),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(f=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(e){return!!f.call(this,e)||this===E&&(e&&e._writableState instanceof S)}})):f=function(e){return e instanceof this},E.prototype.pipe=function(){this.emit("error",new m)},E.prototype.write=function(e,t,r){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=e,c.isBuffer(i)||i instanceof u);return a&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=_),o.ending?function(e,t){var r=new w;e.emit("error",r),n.nextTick(t,r)}(this,r):(a||function(e,t,r,i){var o;return null===r?o=new v:"string"==typeof r||t.objectMode||(o=new d("chunk",["string","Buffer"],r)),!o||(e.emit("error",o),n.nextTick(i,o),!1)}(this,o,e,r))&&(o.pendingcb++,s=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,r));return t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length-1))throw new A(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,r){r(new g("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,T(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=l.destroy,E.prototype._undestroy=l.undestroy,E.prototype._destroy=function(e,t){t(e)}}).call(this,r(12),r(6))},function(e,t,r){"use strict";e.exports=f;var n=r(368).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,c=r(209);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length{if(!(t=Object.assign({},p,t)).parentCid)return r(new Error("No parent CID passed to addLink"));if(!o.isCID(t.parentCid))return r(new Error("Invalid CID passed to addLink"));if(!t.parent)return u("Loading parent node",t.parentCid.toBaseEncodedString()),s([r=>e.ipld.get(t.parentCid,r),(e,t)=>t(null,e.value),(r,n)=>d(e,{...t,parent:r},n)],r);if(!t.cid)return r(new Error("No child cid passed to addLink"));if(!t.name)return r(new Error("No child name passed to addLink"));if(o.isCID(t.cid)||(t.cid=new o(t.cid)),!t.size&&0!==t.size)return r(new Error("No child size passed to addLink"));return"hamt-sharded-directory"===f.unmarshal(t.parent.data).type?(u("Adding link to sharded directory"),m(e,t,r)):t.parent.links.length>=t.shardSplitThreshold?(u("Converting directory to sharded directory"),g(e,t,r)):(u(`Adding ${t.name} to regular directory`),void b(e,t,r))},g=(e,t,r)=>{v(e,t.parent.links.map(e=>({name:e.name,size:e.size,multihash:e.cid.buffer})).concat({name:t.name,size:t.size,multihash:t.cid.buffer}),{},(e,t)=>{e||u("Converted directory to sharded directory",t.cid.toBaseEncodedString()),r(e,t)})},b=(e,t,r)=>{s([e=>n.rmLink(t.parent,t.name,e),(e,r)=>n.addLink(e,new i(t.name,t.size,t.cid),r),(r,n)=>{e.ipld.put(r,{version:t.cidVersion,format:t.codec,hashAlg:t.hashAlg,hashOnly:!t.flush},(e,t)=>n(e,{node:r,cid:t}))}],r)},m=(e,t,r)=>s([r=>l(e,t.name,t.parent,r),({rootBucket:r,path:n},i)=>{y(e,n,{name:t.name,cid:t.cid,size:t.size},t,(e,t={})=>i(e,{rootBucket:r,...t}))},({rootBucket:r,node:n},i)=>h(e,n.links,r,t,i)],r),y=(e,t,r,n,i)=>{const{bucket:o,prefix:a,node:c}=t.pop(),f=c.links.find(e=>e.name.substring(0,2)===a&&e.name!==`${a}${r.name}`);return s([i=>f&&f.name.length>2?(u(`Converting existing file ${f.name} into sub-shard for ${r.name}`),s([t=>v(e,[{name:f.name.substring(2),size:f.size,multihash:f.cid.buffer},{name:r.name,size:r.size,multihash:r.cid.buffer}],{},t),({node:{links:[t]}},r)=>e.ipld.get(t.cid,(e,n)=>{r(e,{cid:t.cid,node:n&&n.value})}),(t,r)=>w(e,o,c,f.name,t.node,t.cid,a,n,r)],i)):f&&2===f.name.length?(u(`Descending into sub-shard ${f.name} for ${r.name}`),s([i=>y(e,t,r,n,i),(t,r)=>w(e,o,c,f.name,t.node,t.cid,a,n,r)],i)):(u("Adding or replacing file",a+r.name),void w(e,o,c,a+r.name,r,r.cid,a+r.name,n,i))],i)},v=(e,t,r,n)=>{const i=new a({root:!0,dir:!0,parent:null,parentKey:null,path:"",dirty:!0,flat:!1,...r}),o=t.map(e=>t=>{i.put(e.name,{size:e.size,multihash:e.multihash},t)});return c(o,t=>{if(t)return n(t);i.flush("",e.ipld,null,n)})},w=(e,t,r,o,a,c,u,f,l)=>{s([e=>n.rmLink(r,o,e),(e,t)=>n.addLink(e,new i(u,a.size,c),t),(r,n)=>h(e,r.links,t,f,n)],l)};e.exports=d},function(e,t,r){"use strict";(function(t){const{DAGNode:n}=r(86),i=r(10),o=r(64),s=r(698),a=r(366),c=r(11)("ipfs:mfs:core:utils:hamt-utils"),u=r(68),f=(e,t,r,n,i)=>{const o=new s({hashFn:a.hashFn,hash:r?r._options.hash:void 0},r,n);r&&r._putObjectAt(n,o),l(e,o,t,i)},l=(e,t,r,n)=>{Promise.all(e.map(e=>{if(2===e.name.length){const r=parseInt(e.name,16);return t._putObjectAt(r,new s({hashFn:a.hashFn},t,r)),Promise.resolve()}return(r||t).put(e.name.substring(2),!0)})).catch(e=>{n(e),n=null}).then(()=>n&&n(null,t))},h=e=>e.toString("16").toUpperCase().padStart(2,"0").substring(0,2);e.exports={generatePath:(e,t,r,n)=>{f(r.links,null,null,null,async(i,s)=>{if(i)return n(i);const a=await s._findNewBucketAndPos(t);let u=[{bucket:a.bucket,prefix:h(a.pos)}],p=a.bucket;for(;p!==s;)u.push({bucket:p,prefix:h(p._posAtParent)}),p=p._parent;u[u.length-1].node=r;let d=u.length;o(()=>d>0,r=>{const n=u[--d],i=n.node.links.filter(e=>e.name.substring(0,2)===n.prefix).pop();return i?i.name===`${n.prefix}${t}`?(c(`Link ${n.prefix}${t} will be replaced`),r(null,u)):(c(`Found subshard ${n.prefix}`),void e.ipld.get(i.cid,(e,i)=>{if(e)return r(e);if(!u[d-1]){c(`Loaded new subshard ${n.prefix}`);const e=i.value;return f(e.links,s,n.bucket,parseInt(n.prefix,16),async(n,i)=>{if(n)return r(n);const o=await s._findNewBucketAndPos(t);d++,u.unshift({bucket:o.bucket,prefix:h(o.pos),node:e}),r()})}const o=u[d-1];l(i.value.links,o.bucket,s,e=>{o.node=i.value,r(e)})})):(c(`Link ${n.prefix}${t} will be added`),r(null,u))},async(e,r)=>{await s.put(t,!0),n(e,{rootBucket:s,path:r})})})},updateHamtDirectory:(e,r,o,s,c)=>{i([e=>{const i=t.from(o._children.bitField().reverse()),s=new u("hamt-sharded-directory",i);s.fanout=o.tableSize(),s.hashType=a.hashFn.code,n.create(s.marshal(),r,e)},(t,r)=>{e.ipld.put(t,{version:s.cidVersion,format:s.codec,hashAlg:s.hashAlg,hashOnly:!s.flush},(e,n)=>r(e,{node:t,cid:n}))}],c)},recreateHamtLevel:f,addLinksToHamtBucket:l,toPrefix:h}}).call(this,r(0).Buffer)},function(e,t){e.exports={WORKER_REQUEST_READ_LOCK:"lock:worker:request-read",WORKER_RELEASE_READ_LOCK:"lock:worker:release-read",MASTER_GRANT_READ_LOCK:"lock:master:grant-read",WORKER_REQUEST_WRITE_LOCK:"lock:worker:request-write",WORKER_RELEASE_WRITE_LOCK:"lock:worker:release-write",MASTER_GRANT_WRITE_LOCK:"lock:master:grant-write"}},function(e,t){const r={},n=e=>{e.addEventListener("message",t=>{n.dispatchEvent("message",e,t)}),e.port&&e.port.addEventListener("message",t=>{n.dispatchEvent("message",e,t)})};n.addEventListener=((e,t)=>{r[e]||(r[e]=[]),r[e].push(t)}),n.removeEventListener=((e,t)=>{r[e]&&(r[e]=r[e].filter(e=>e===t))}),n.dispatchEvent=function(){const e=Array.prototype.slice.call(arguments),t=e.shift();r[t]&&r[t].forEach(t=>t.apply(null,e))},e.exports=n},function(e,t,r){"use strict";const{FILE_SEPARATOR:n}=r(369),i=r(944),o=r(10),s=r(74),a=r(699);e.exports=((e,t,r)=>{let c=Array.isArray(t);const u=Array.isArray(t)?t:[t];o([t=>{s({paths:e=>{let t;try{t=u.map(e=>{if(!(e=(e=(e||"").trim()).replace(/(\/\/+)/g,"/")))throw new Error("paths must not be empty");if(e.substring(0,1)!==n)throw new Error(`paths must start with a leading ${n}`);return e.substring(e.length-n.length)===n&&(e=e.substring(0,e.length-n.length)),a(e)})}catch(t){return e(t)}e(null,t)},root:t=>i(e,t)},t)},({paths:e,root:t},r)=>{r(null,e.map(e=>{if("ipfs"===e[0]){let r;return r=2===e.length?`${n}${e.join(n)}`:`${n}${e.slice(0,e.length-1).join(n)}`,{type:"ipfs",depth:e.length-2,mfsPath:`${n}${e.join(n)}`,mfsDirectory:r,root:t,parts:e,path:`${n}${e.join(n)}`,name:e[e.length-1]}}const r=`/ipfs/${t.toBaseEncodedString()}/${e.join(n)}`,i=`/ipfs/${t.toBaseEncodedString()}/${e.slice(0,e.length-1).join(n)}`;return{type:"mfs",depth:e.length,mfsDirectory:i,mfsPath:r,root:t,parts:e,path:`${n}${e.join(n)}`,name:e[e.length-1]}}))},(e,t)=>{if(c)return t(null,e);t(null,e[0])}],r)})},function(e,t,r){"use strict";const n=r(16),i=r(68),{DAGNode:o}=r(86),s=r(11)("ipfs:mfs:utils:with-mfs-root"),a=r(10),{MFS_ROOT_KEY:c}=r(369);e.exports=((e,t)=>{a([t=>e.repo.datastore.open(e=>t(e)),t=>{e.repo.datastore.get(c,(r,u)=>{if(r&&(r.notFound||"ERR_NOT_FOUND"===r.code))return s("Creating new MFS root"),a([e=>o.create(new i("directory").marshal(),e),(t,r)=>e.ipld.put(t,{version:0,hashAlg:"sha2-256",format:"dag-pb"},r),(t,r)=>e.repo.datastore.put(c,t.buffer,e=>r(e,t))],t);t(r,u?new n(u):null)})},(e,t)=>{s(`Fetched MFS root ${e.toBaseEncodedString()}`),t(null,e)}],t)})},function(e,t,r){"use strict";(function(t,n){var i=r(75);e.exports=v;var o,s=r(336);v.ReadableState=y;r(23).EventEmitter;var a=function(e,t){return e.listeners(t).length},c=r(946),u=r(3).Buffer,f=t.Uint8Array||function(){};var l=r(53);l.inherits=r(4);var h=r(1744),p=void 0;p=h&&h.debuglog?h.debuglog("stream"):function(){};var d,g=r(1745),b=r(947);l.inherits(v,c);var m=["error","close","destroy","pause","resume"];function y(e,t){e=e||{};var n=t instanceof(o=o||r(210));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,s=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=r(52).StringDecoder),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function v(e){if(o=o||r(210),!(this instanceof v))return new v(e);this._readableState=new y(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),c.call(this)}function w(e,t,r,n,i){var o,s=e._readableState;null===t?(s.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,E(e)}(e,s)):(i||(o=function(e,t){var r;n=t,u.isBuffer(n)||n instanceof f||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(s,t)),o?e.emit("error",o):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):A(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?A(e,s,t,!1):x(e,s)):A(e,s,t,!1))):n||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=_?e=_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function E(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(k,e):k(e))}function k(e){p("emit readable"),e.emit("readable"),T(e)}function x(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(C,e,t))}function C(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;eo.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0===(e-=s)){s===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,s),0===(e-=s)){s===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(O,t,e))}function O(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function M(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):E(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&P(this),null;var n,i=t.needReadable;return p("need readable",i),(0===t.length||t.length-e0?R(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&P(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,t);var c=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?f:v;function u(t,n){p("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,p("cleanup"),e.removeListener("close",m),e.removeListener("finish",y),e.removeListener("drain",l),e.removeListener("error",b),e.removeListener("unpipe",u),r.removeListener("end",f),r.removeListener("end",v),r.removeListener("data",g),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function f(){p("onend"),e.end()}o.endEmitted?i.nextTick(c):r.once("end",c),e.on("unpipe",u);var l=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,T(e))}}(r);e.on("drain",l);var h=!1;var d=!1;function g(t){p("ondata"),d=!1,!1!==e.write(t)||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==M(o.pipes,e))&&!h&&(p("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function b(t){p("onerror",t),v(),e.removeListener("error",b),0===a(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",y),v()}function y(){p("onfinish"),e.removeListener("close",m),v()}function v(){p("unpipe"),r.unpipe(e)}return r.on("data",g),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",b),e.once("close",m),e.once("finish",y),e.emit("pipe",r),o.flowing||(p("pipe resume"),r.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o-1?n:o.nextTick;y.WritableState=m;var u=r(53);u.inherits=r(4);var f={deprecate:r(202)},l=r(946),h=r(3).Buffer,p=i.Uint8Array||function(){};var d,g=r(947);function b(){}function m(e,t){a=a||r(210),e=e||{};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,u=e.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(u||0===u)?u:f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(o.nextTick(i,n),o.nextTick(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),E(e,t))}(e,r,n,t,i);else{var s=_(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||A(e,r),n?c(w,e,r,s,i):w(e,r,s,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function y(e){if(a=a||r(210),!(d.call(y,this)||this instanceof a))return new y(e);this._writableState=new m(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function v(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function A(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,c=!0;r;)i[a]=r,r.isBuf||(c=!1),r=r.next,a+=1;i.allBuffers=c,v(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,l=r.callback;if(v(e,t,!1,t.objectMode?1:u.length,u,f,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function _(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)})}function E(e,t){var r=_(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(y,l),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===y&&(e&&e._writableState instanceof m)}})):d=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,r){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=e,h.isBuffer(n)||n instanceof p);return a&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=b),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),o.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),o.nextTick(n,s),i=!1),i}(this,i,e,r))&&(i.pendingcb++,s=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,r));return t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var c=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?o.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=g.destroy,y.prototype._undestroy=g.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(6),r(35).setImmediate,r(12))},function(e,t,r){"use strict";e.exports=s;var n=r(210),i=r(53);function o(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length"object"==typeof e).pop()||{});Array.isArray(t[0])&&(t=t[0]);const s=t.filter(e=>"string"==typeof e).map(e=>e.trim());n(e,s,(e,t)=>{i(e,{sources:t,options:o})})}},function(e,t,r){"use strict";const n=r(10),i=r(74),{addLink:o,updateTree:s,updateMfsRoot:a,toTrail:c,toSourcesAndDestination:u,toMfsPath:f}=r(116),l=r(370),h=r(701),p=r(11)("ipfs:mfs:cp"),d={parents:!1,flush:!0,format:"dag-pb",hashAlg:"sha2-256",shardSplitThreshold:1e3};e.exports=(e=>(function(){const t=Array.from(arguments),r=t.pop();n([r=>u(e,t,d,r),({sources:e,destination:t,options:r},n)=>e.length?t?(r.parents=r.p||r.parents,void n(null,{sources:e,destination:t,options:r})):n(new Error("Please supply a destination")):n(new Error("Please supply at least one source")),({sources:t,destination:r,options:n},i)=>c(e,r.mfsPath,n,(o,s)=>{if(o)return i(o);if(s.length===r.parts.length)return p("Destination does not exist"),1===t.length?(p("Only one source, copying to a file"),g(e,t.pop(),r,s,n,i)):(p("Multiple sources, copying to a directory"),b(e,t,r,s,n,i));if("dir"===s[s.length-1].type)return p("Destination is a directory"),b(e,t,r,s,n,i);i(new Error("directory already has entry by that name"))})],r)}));const g=(e,t,r,i,c,u)=>{n([r=>m(e,t,c,r),(t,s)=>{const a=i[i.length-1],c=t[t.length-1];n([t=>e.ipld.get(a.cid,t),(t,n)=>o(e,{parent:t.value,parentCid:a.cid,size:c.size,cid:c.cid,name:r.parts[r.parts.length-1]},n),({node:e,cid:t},r)=>{a.node=e,a.cid=t,a.size=e.size,r(null,i)}],s)},(t,r)=>s(e,t,c,r),({cid:t},r)=>a(e,t,r)],e=>u(e))},b=(e,t,r,u,d,g)=>{n([t=>{if(u.length!==r.parts.length+1)return p("Making destination directory",r.path),n([t=>h(e)(r.path,d,t),t=>f(e,r.path,t),(t,n)=>{c(e,(r=t).mfsPath,d,n)}],(e,r)=>{if(e)return t(e);u=r,t()});t()},r=>i(t.map(t=>r=>m(e,t,d,r)),r),(c,f)=>{n([n=>{i(t.map(t=>n=>{l(e)(`${r.path}/${t.name}`,d,e=>{if(e)return e.message.includes("does not exist")?n():n(e);n(new Error("directory already has entry by that name"))})}),e=>n(e))},r=>{const i=u[u.length-1];n([t=>e.ipld.get(i.cid,t),(e,t)=>t(null,{cid:i.cid,node:e.value})].concat(c.map((r,n)=>(i,s)=>{const a=r[r.length-1];p(`Adding ${t[n].name} to ${i.cid.toBaseEncodedString()}`),o(e,{parent:i.node,parentCid:i.cid,size:a.size,cid:a.cid,name:t[n].name},(e,t)=>{if(e)return s(e);p(`New directory hash ${t.cid.toBaseEncodedString()}`),s(e,t)})})),r)},({node:e,cid:t},r)=>{const n=u[u.length-1];n.node=e,n.cid=t,n.size=e.size,r(null,u)},(t,r)=>s(e,t,d,r),({cid:t},r)=>a(e,t,r)],f)}],e=>g(e))},m=(e,t,r,n)=>{c(e,t.mfsPath,r,(e,r)=>e?n(e):"ipfs"===t.type?n(null,r):r.length!==t.parts.length+1?n(new Error(`${t.path} does not exist`)):void n(null,r))}},function(e,t,r){"use strict";const n=r(10),i=r(61),{updateTree:o,updateMfsRoot:s,toSources:a,removeLink:c,toMfsPath:u,toTrail:f,FILE_SEPARATOR:l}=r(116),h={recursive:!1,cidVersion:0,hashAlg:"sha2-256",format:"dag-pb"};e.exports=(e=>(function(){const t=Array.from(arguments),r=t.pop();n([r=>a(e,t,h,r),({sources:t,options:r},n)=>{if(!t.length)return n(new Error("Please supply at least one path to remove"));i(t.map(t=>n=>p(e,t.path,r,n)),e=>n(e))}],r)}));const p=(e,t,r,i)=>{if(t===l)return i(new Error("Cannot delete root"));n([r=>u(e,t,r),({mfsPath:t,parts:n},i)=>f(e,t,r,(e,r)=>i(e,{mfsPath:t,parts:n,trail:r})),({trail:i},o)=>{const s=i.pop(),a=i[i.length-1];return a?"dir"!==s.type||r.recursive?void n([t=>c(e,{parentCid:a.cid,name:s.name},t),({cid:e},t)=>{a.cid=e,t(null,i)}],o):o(new Error(`${t} is a directory, use -r to remove directories`)):o(new Error(`${t} does not exist`))},(t,n)=>o(e,t,r,n),({cid:t},r)=>s(e,t,r)],i)}},function(e,t,r){"use strict";const n=r(299).OFFLINE_ERROR,i=r(29),o=r(7),s=r(121),a=r(16),c=r(41),u=r(36);function f(e,t){return Array.from(e).map(e=>({"/":e[1].cid.toBaseEncodedString()}))}e.exports=function(e){return{wantlist:i((t,r)=>{if("function"==typeof t&&(r=t,t=null),!e.isOnline())return o(()=>r(new Error(n)));let i;if(t){try{t=c.createFromB58String(t)}catch(e){t=null}if(!t)return o(()=>r(new Error("Invalid peerId")));i=e._bitswap.wantlistForPeer(t)}else i=e._bitswap.getWantlist();o(()=>r(null,{Keys:f(i)}))}),stat:i(t=>{if(!e.isOnline())return o(()=>t(new Error(n)));const r=e._bitswap.stat().snapshot;o(()=>{t(null,{provideBufLen:parseInt(r.providesBufferLength.toString()),blocksReceived:new s(r.blocksReceived),wantlist:f(e._bitswap.getWantlist()),peers:e._bitswap.peers().map(e=>e.toB58String()),dupBlksReceived:new s(r.dupBlksReceived),dupDataReceived:new s(r.dupDataReceived),dataReceived:new s(r.dataReceived),blocksSent:new s(r.blocksSent),dataSent:new s(r.dataSent)})})}),unwant:i((t,r)=>{if(!e.isOnline())return o(()=>r(new Error(n)));Array.isArray(t)||(t=[t]);try{t=t.map(e=>a.isCID(e)?e:new a(e))}catch(e){return o(()=>r(u(e,"ERR_INVALID_CID")))}o(()=>r(null,e._bitswap.unwant(t)))})}}},function(e,t,r){"use strict";const n=r(29),i=/^((\d+(\.\d+)*)(ns|ms|us|µs|m|s|h))+$/,o=/((\d+(\.\d+)*)(ns|ms|us|µs|m|s|h))/g,s=/(ns|ms|us|µs|m|s|h)/g,a={ns:1e-6,us:.001,"µs":.001,ms:1,s:1e3,m:6e4,h:36e5};e.exports=n(function(e,t){return"string"!=typeof e?t(new Error("the first argument must be a string")):i.test(e)?void t(null,e.match(o).reduce((e,t)=>e+function(e){let t=e.match(s)[0];return e=e.substring(0,e.length-t.length),parseFloat(e)*a[t]}(t),0)):t(new Error("invalid time"))})},function(e,t,r){"use strict";const n=r(1786).Block,i=r(16),o=r(24),s=r(63),a=r(10);e.exports={hashToCid:e=>{const t=r(704).defaultHashAlg,n=o.encode(e,t);return new i(1,"bitcoin-block",n)},BITCOIN_BLOCK_HEADER_SIZE:80,cid:(e,t,n)=>{"function"==typeof t&&(n=t,t={});const o=(t=t||{}).hashAlg||r(704).defaultHashAlg,c=void 0===t.version?1:t.version;a([t=>{try{s(e.toBuffer(!0),o,t)}catch(e){t(e)}},(e,t)=>t(null,new i(c,"bitcoin-block",e))],n)},deserialize:(e,t)=>{if(80!==e.length)return t(new Error("Bitcoin block header needs to be 80 bytes"));t(null,n.fromBuffer(e))},serialize:(e,t)=>{let r,n=null;try{r=e.toBuffer(!0)}catch(e){n=e}finally{t(n,r)}}}},function(e,t,r){"use strict";var n=t;function i(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",r=0;r>8,s=255&i;o?r.push(o,s):r.push(s)}return r},n.zero2=i,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}},function(e,t,r){"use strict";var n=r(123).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function s(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?s(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=s,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},function(e,t,r){"use strict";var n=r(123),i=r(301),o=r(957),s=r(122),a=n.sum32,c=n.sum32_4,u=n.sum32_5,f=o.ch32,l=o.maj32,h=o.s0_256,p=o.s1_256,d=o.g0_256,g=o.g1_256,b=i.BlockHash,m=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function y(){if(!(this instanceof y))return new y;b.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}n.inherits(y,b),e.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;nt)throw new TypeError("Script number overflow");if(r&&0==(127&e[n-1])&&(n<=1||0==(128&e[n-2])))throw new Error("Non-minimally encoded script number");if(5===n){const t=e.readUInt32LE(0),r=e.readUInt8(4);return 128&r?-(4294967296*(-129&r)+t):4294967296*r+t}let i=0;for(var o=0;o2147483647?5:e>8388607?4:e>32767?3:e>127?2:e>0?1:0}(t),i=n.allocUnsafe(r),o=e<0;for(var s=0;s>=8;return 128&i[r-1]?i.writeUInt8(o?128:0,r-1):o&&(i[r-1]|=128),i}}},function(e,t,r){"use strict";var n=r(3).Buffer,i=9007199254740991;function o(e){if(e<0||e>i||e%1!=0)throw new RangeError("value out of range")}function s(e){return o(e),e<253?1:e<=65535?3:e<=4294967295?5:9}e.exports={encode:function e(t,r,i){if(o(t),r||(r=n.allocUnsafe(s(t))),!n.isBuffer(r))throw new TypeError("buffer must be a Buffer instance");return i||(i=0),t<253?(r.writeUInt8(t,i),e.bytes=1):t<=65535?(r.writeUInt8(253,i),r.writeUInt16LE(t,i+1),e.bytes=3):t<=4294967295?(r.writeUInt8(254,i),r.writeUInt32LE(t,i+1),e.bytes=5):(r.writeUInt8(255,i),r.writeUInt32LE(t>>>0,i+1),r.writeUInt32LE(t/4294967296|0,i+5),e.bytes=9),r},decode:function e(t,r){if(!n.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");r||(r=0);var i=t.readUInt8(r);if(i<253)return e.bytes=1,i;if(253===i)return e.bytes=3,t.readUInt16LE(r+1);if(254===i)return e.bytes=5,t.readUInt32LE(r+1);e.bytes=9;var s=t.readUInt32LE(r+1),a=4294967296*t.readUInt32LE(r+5)+s;return o(a),a},encodingLength:s}},function(e,t,r){const n=r(185),i=r(839),o=r(65),s=r(124),a=r(964),c=r(117),u=o.maybe(o.compile({compressed:s.maybe(s.Boolean),network:s.maybe(s.Network)}));function f(e,t,r){r=r||{},this.compressed=void 0===r.compressed||r.compressed,this.network=r.network||c.bitcoin,this.__d=e||null,this.__Q=null,t&&(this.__Q=n.pointCompress(t,this.compressed))}function l(e,t){if(o(s.Buffer256bit,e),!n.isPrivate(e))throw new TypeError("Private key not in range [1, n)");return o(u,t),new f(e,null,t)}Object.defineProperty(f.prototype,"privateKey",{enumerable:!1,get:function(){return this.__d}}),Object.defineProperty(f.prototype,"publicKey",{get:function(){return this.__Q||(this.__Q=n.pointFromScalar(this.__d,this.compressed)),this.__Q}}),f.prototype.toWIF=function(){if(!this.__d)throw new Error("Missing private key");return a.encode(this.network.wif,this.__d,this.compressed)},f.prototype.sign=function(e){if(!this.__d)throw new Error("Missing private key");return n.sign(e,this.__d)},f.prototype.verify=function(e,t){return n.verify(e,this.publicKey,t)},e.exports={makeRandom:function(e){o(u,e);const t=(e=e||{}).rng||i;let r;do{r=t(32),o(s.Buffer256bit,r)}while(!n.isPrivate(r));return l(r,e)},fromPrivateKey:l,fromPublicKey:function(e,t){return o(n.isPoint,e),o(u,t),new f(null,e,t)},fromWIF:function(e,t){const r=a.decode(e),n=r.version;if(s.Array(t)){if(!(t=t.filter(function(e){return n===e.wif}).pop()))throw new Error("Unknown network version")}else if(t=t||c.bitcoin,n!==t.wif)throw new Error("Invalid network version");return l(r.privateKey,{compressed:r.compressed,network:t})}}},function(e,t,r){(function(t){var n=r(302);function i(e,t){if(void 0!==t&&e[0]!==t)throw new Error("Invalid network version");if(33===e.length)return{version:e[0],privateKey:e.slice(1,33),compressed:!1};if(34!==e.length)throw new Error("Invalid WIF length");if(1!==e[33])throw new Error("Invalid compression flag");return{version:e[0],privateKey:e.slice(1,33),compressed:!0}}function o(e,r,n){var i=new t(n?34:33);return i.writeUInt8(e,0),r.copy(i,1),n&&(i[33]=1),i}e.exports={decode:function(e,t){return i(n.decode(e),t)},decodeRaw:i,encode:function(e,t,r){return"number"==typeof e?n.encode(o(e,t,r)):n.encode(o(e.version,e.privateKey,e.compressed))},encodeRaw:o}}).call(this,r(0).Buffer)},function(e,t,r){const n=r(3).Buffer,i=r(708),o=r(302),s=r(38),a=r(117),c=r(65),u=r(124),f=r(709);function l(e){const t=o.decode(e);if(t.length<21)throw new TypeError(e+" is too short");if(t.length>21)throw new TypeError(e+" is too long");return{version:t.readUInt8(0),hash:t.slice(1)}}function h(e){const t=i.decode(e),r=i.fromWords(t.words.slice(1));return{version:t.words[0],prefix:t.prefix,data:n.from(r)}}e.exports={fromBase58Check:l,fromBech32:h,fromOutputScript:function(e,t){t=t||a.bitcoin;try{return f.p2pkh({output:e,network:t}).address}catch(e){}try{return f.p2sh({output:e,network:t}).address}catch(e){}try{return f.p2wpkh({output:e,network:t}).address}catch(e){}try{return f.p2wsh({output:e,network:t}).address}catch(e){}throw new Error(s.toASM(e)+" has no matching Address")},toBase58Check:function(e,t){c(u.tuple(u.Hash160bit,u.UInt8),arguments);const r=n.allocUnsafe(21);return r.writeUInt8(t,0),e.copy(r,1),o.encode(r)},toBech32:function(e,t,r){const n=i.toWords(e);return n.unshift(t),i.encode(r,n)},toOutputScript:function(e,t){let r;t=t||a.bitcoin;try{r=l(e)}catch(e){}if(r){if(r.version===t.pubKeyHash)return f.p2pkh({hash:r.hash}).output;if(r.version===t.scriptHash)return f.p2sh({hash:r.hash}).output}else{try{r=h(e)}catch(e){}if(r){if(r.prefix!==t.bech32)throw new Error(e+" has an invalid prefix");if(0===r.version){if(20===r.data.length)return f.p2wpkh({hash:r.data}).output;if(32===r.data.length)return f.p2wsh({hash:r.data}).output}}}throw new Error(e+" has no matching Script")}}},function(e,t,r){const n=r(38),i=r(48);function o(e){const t=n.compile(e);return 22===t.length&&t[0]===i.OP_0&&20===t[1]}o.toJSON=function(){return"Witness pubKeyHash output"},e.exports={check:o}},function(e,t,r){const n=r(38),i=r(48);function o(e){const t=n.compile(e);return 34===t.length&&t[0]===i.OP_0&&32===t[1]}o.toJSON=function(){return"Witness scriptHash output"},e.exports={check:o}},function(e,t,r){"use strict";(function(t){const n=r(1846),i=r(304),o=r(305),s=r(1857);e.exports=o("eth-account-snapshot",n,function(e,r,n){const o=[];o.push({path:"storage",value:{"/":i("eth-storage-trie",e.stateRoot).toBaseEncodedString()}}),s.equals(e.codeHash)?o.push({path:"code",value:t.from("")}):o.push({path:"code",value:{"/":i("raw",e.codeHash).toBaseEncodedString()}});o.push({path:"stateRoot",value:e.stateRoot}),o.push({path:"codeHash",value:e.codeHash}),o.push({path:"nonce",value:e.nonce}),o.push({path:"balance",value:e.balance}),o.push({path:"isEmpty",value:e.isEmpty()}),o.push({path:"isContract",value:e.isContract()}),n(null,o)})}).call(this,r(0).Buffer)},function(e,t){e.exports=function(e){if("string"!=typeof e)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof e+", while checking isHexPrefixed.");return"0x"===e.slice(0,2)}},function(e,t){e.exports=function(e){return function(t,r,n){e(t,r,(e,t)=>e?n(e):t.remainderPath.length>0?n(new Error("path out of scope")):void("object"==typeof t.value&&t.value["/"]?n(null,t.value):n(null,!1)))}}},function(e,t,r){const n=r(972),i=r(192);e.exports=function(e,t){return{deserialize:i(e=>new t(e)),serialize:i(e=>e.serialize()),cid:i((t,r)=>n(e,t,r))}}},function(e,t,r){"use strict";const n=r(304);e.exports=function(e,t,r){const i=t.hash();return n(e,i,r)}},function(e,t,r){"use strict";const n=r(974),i=r(304),o=r(305);e.exports=o("eth-block",n,function(e,t,r){const n=[];n.push({path:"parent",value:{"/":i("eth-block",e.parentHash).toBaseEncodedString()}}),n.push({path:"ommers",value:{"/":i("eth-block-list",e.uncleHash).toBaseEncodedString()}}),n.push({path:"transactions",value:{"/":i("eth-tx-trie",e.transactionsTrie).toBaseEncodedString()}}),n.push({path:"transactionReceipts",value:{"/":i("eth-tx-receipt-trie",e.receiptTrie).toBaseEncodedString()}}),n.push({path:"state",value:{"/":i("eth-state-trie",e.stateRoot).toBaseEncodedString()}}),n.push({path:"parentHash",value:e.parentHash}),n.push({path:"ommerHash",value:e.uncleHash}),n.push({path:"transactionTrieRoot",value:e.transactionsTrie}),n.push({path:"transactionReceiptTrieRoot",value:e.receiptTrie}),n.push({path:"stateRoot",value:e.stateRoot}),n.push({path:"authorAddress",value:e.coinbase}),n.push({path:"bloom",value:e.bloom}),n.push({path:"difficulty",value:e.difficulty}),n.push({path:"number",value:e.number}),n.push({path:"gasLimit",value:e.gasLimit}),n.push({path:"gasUsed",value:e.gasUsed}),n.push({path:"timestamp",value:e.timestamp}),n.push({path:"extraData",value:e.extraData}),n.push({path:"mixHash",value:e.mixHash}),n.push({path:"nonce",value:e.nonce}),r(null,n)})},function(e,t,r){(function(t){const n=r(1858),i=r(372),o=i.BN;var s=e.exports=function(e,r){if((r=r||{}).common){if(r.chain)throw new Error("Instantiation with both opts.common and opts.chain parameter not allowed!");this._common=r.common}else{let e=r.chain?r.chain:"mainnet",t=r.hardfork?r.hardfork:null;this._common=new n(e,t)}var o=[{name:"parentHash",length:32,default:i.zeros(32)},{name:"uncleHash",default:i.SHA3_RLP_ARRAY},{name:"coinbase",length:20,default:i.zeros(20)},{name:"stateRoot",length:32,default:i.zeros(32)},{name:"transactionsTrie",length:32,default:i.SHA3_RLP},{name:"receiptTrie",length:32,default:i.SHA3_RLP},{name:"bloom",default:i.zeros(256)},{name:"difficulty",default:new t([])},{name:"number",default:i.intToBuffer(115e4)},{name:"gasLimit",default:new t("ffffffffffffff","hex")},{name:"gasUsed",empty:!0,default:new t([])},{name:"timestamp",default:new t([])},{name:"extraData",allowZero:!0,empty:!0,default:new t([])},{name:"mixHash",default:i.zeros(32)},{name:"nonce",default:i.zeros(8)}];i.defineProperties(this,o,e)};s.prototype.canonicalDifficulty=function(e){const t=this._common.hardfork()||this._common.activeHardfork(i.bufferToInt(this.number)),r=new o(this.timestamp),n=new o(e.header.timestamp),s=new o(e.header.difficulty),a=new o(this._common.param("pow","minimumDifficulty",t));var c,u,f,l=s.div(new o(this._common.param("pow","difficultyBoundDivisor",t))),h=new o(this.number);if(this._common.hardforkGteHardfork(t,"byzantium")){var p=e.header.uncleHash.equals(i.SHA3_RLP_ARRAY)?1:2;c=r.sub(n).idivn(9).ineg().iaddn(p),1===(u=new o(-99)).cmp(c)&&(c=u),f=s.add(l.mul(c))}this._common.hardforkGteHardfork(t,"constantinople")?(h.isubn(5e6),h.ltn(0)&&(h=new o(0))):this._common.hardforkGteHardfork(t,"byzantium")?(h.isubn(3e6),h.ltn(0)&&(h=new o(0))):this._common.hardforkGteHardfork(t,"homestead")?(c=r.sub(n).idivn(10).ineg().iaddn(1),1===(u=new o(-99)).cmp(c)&&(c=u),f=s.add(l.mul(c))):f=1===n.addn(this._common.param("pow","durationLimit",t)).cmp(r)?l.add(s):s.sub(l);var d=h.idivn(1e5).isubn(2);return d.isNeg()||f.iadd(new o(2).pow(d)),-1===f.cmp(a)&&(f=a),f},s.prototype.validateDifficulty=function(e){return 0===this.canonicalDifficulty(e).cmp(new o(this.difficulty))},s.prototype.validateGasLimit=function(e){const t=new o(e.header.gasLimit),r=new o(this.gasLimit),n=this._common.hardfork()?this._common.hardfork():this._common.activeHardfork(this.number),i=t.div(new o(this._common.param("gasConfig","gasLimitBoundDivisor",n))),s=t.add(i),a=t.sub(i);return r.lt(s)&&r.gt(a)&&r.gte(this._common.param("gasConfig","minGasLimit",n))},s.prototype.validate=function(e,t,r){var n=this;if(2===arguments.length&&(r=t,t=!1),this.isGenesis())return r();e.getBlock(n.parentHash,function(e,s){if(e)return r("could not find parent block");if(n.parentBlock=s,0!==new o(n.number).cmp(new o(s.header.number).iaddn(1)))return r("invalid number");if(t){var a=t.sub(new o(s.header.number));if(-1!==a.cmpn(8)||1!==a.cmpn(1))return r("uncle block has a parent that is too old or to young")}if(!n.validateDifficulty(s))return r("invalid Difficulty");if(!n.validateGasLimit(s))return r("invalid gas limit");if(i.bufferToInt(s.header.number)+1!==i.bufferToInt(n.number))return r("invalid heigth");if(i.bufferToInt(n.timestamp)<=i.bufferToInt(s.header.timestamp))return r("invalid timestamp");const c=n._common.hardfork()?n._common.hardfork():n._common.activeHardfork(t);if(n.extraData.length>n._common.param("vm","maxExtraDataSize",c))return r("invalid amount of extra data");r()})},s.prototype.hash=function(){return i.rlphash(this.raw)},s.prototype.isGenesis=function(){return""===this.number.toString("hex")},s.prototype.setGenesisParams=function(){this.timestamp=this._common.genesis().timestamp,this.gasLimit=this._common.genesis().gasLimit,this.difficulty=this._common.genesis().difficulty,this.extraData=this._common.genesis().extraData,this.nonce=this._common.genesis().nonce,this.stateRoot=this._common.genesis().stateRoot,this.number=new t([])}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(1879),i=r(305);e.exports=i("eth-tx",n,function(e,t,r){const n=[];n.push({path:"nonce",value:e.nonce}),n.push({path:"gasPrice",value:e.gasPrice}),n.push({path:"gasLimit",value:e.gasLimit}),n.push({path:"toAddress",value:e.to}),n.push({path:"value",value:e.value}),n.push({path:"data",value:e.data}),n.push({path:"v",value:e.v}),n.push({path:"r",value:e.r}),n.push({path:"s",value:e.s}),n.push({path:"fromAddress",value:e.from}),n.push({path:"signature",value:[e.v,e.r,e.s]}),n.push({path:"isContractPublish",value:e.toCreationAddress()}),r(null,n)})},function(e,t,r){"use strict";(function(n){const i=r(7),o=r(10),s=r(63),a=r(16),c=r(977),u=r(373),f=r(1884),l=r(1885),h=r(1886);(t=e.exports).serialize=((e,t)=>{if(null!==e)if(n.isBuffer(e))"blob"===e.slice(0,4).toString()?i(()=>t(null,e)):i(()=>t(new Error("unexpected dagNode passed to serialize"),null));else switch(e.gitType){case"commit":f.serialize(e,t);break;case"tag":l.serialize(e,t);break;default:h.serialize(e,t)}else i(()=>t(new Error("dagNode passed to serialize was null"),null))}),t.deserialize=((e,t)=>{let r=u.find(e,0),n=e.slice(0,r).toString().match(/([^ ]+) (\d+)/);if(n)switch(n[1]){case"blob":t(null,e);break;case"commit":f.deserialize(e.slice(r+1),t);break;case"tag":l.deserialize(e.slice(r+1),t);break;case"tree":h.deserialize(e.slice(r+1),t);break;default:i(()=>t(new Error("unknown object type "+n[1]),null))}else i(()=>t(new Error("invalid object header"),null))}),t.cid=((e,r,n)=>{"function"==typeof r&&(n=r,r={});const i=(r=r||{}).hashAlg||c.defaultHashAlg,u=void 0===r.version?1:r.version;o([r=>t.serialize(e,r),(e,t)=>s(e,i,t),(e,t)=>t(null,new a(u,c.multicodec,e))],n)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(n){const i=r(976),o=r(779);(t=e.exports).multicodec="git-raw",t.defaultHashAlg="sha1";const s=["original","name","email","date"];t.resolve=((e,t,r)=>{"function"==typeof t&&(r=t,t=void 0),i.deserialize(e,(e,i)=>{if(e)return r(e);if(!t||"/"===t)return r(null,{value:i,remainderPath:""});if(n.isBuffer(i))return r(null,{value:i,remainderPath:t});const s=t.split("/"),a=o(i).get(s);if(a)return r(null,{value:a,remainderPath:""});let c,u=s.length;for(let e=0;e{"function"==typeof t&&(r=t,t=void 0),t=t||{},i.deserialize(e,(e,t)=>{if(e)return r(e);if(n.isBuffer(t))return r(null,[]);let i=[];switch(t.gitType){case"commit":i=(i=(i=(i=["message","tree"]).concat(s.map(e=>"author/"+e))).concat(s.map(e=>"committer/"+e))).concat(t.parents.map((e,t)=>"parents/"+t)),t.encoding&&i.push("encoding");break;case"tag":i=["object","type","tag","message"],t.tagger&&(i=i.concat(s.map(e=>"tagger/"+e)));break;default:Object.keys(t).forEach(e=>{i.push(e),i.push(e+"/hash"),i.push(e+"/mode")})}r(null,i)})}),t.isLink=((e,r,n)=>{t.resolve(e,r,(e,t)=>e?n(e):t.remainderPath.length>0?n(new Error("path out of scope")):void("object"==typeof t.value&&t.value["/"]?n(null,t.value):n(null,!1)))})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(1888).BlockHeader,i=r(16),o=r(24),s=r(63),a=r(10);e.exports={hashToCid:e=>{const t=r(714).defaultHashAlg,n=o.encode(e,t);return new i(1,"zcash-block",n)},ZCASH_BLOCK_HEADER_SIZE:1487,cid:(e,t,n)=>{"function"==typeof t&&(n=t,t={});const o=(t=t||{}).hashAlg||r(714).defaultHashAlg,c=void 0===t.version?1:t.version;a([t=>{try{s(e.toBuffer(),o,t)}catch(e){t(e)}},(e,t)=>t(null,new i(c,"zcash-block",e))],n)},deserialize:(e,t)=>{if(1487!==e.length)return t(new Error("Zcash block header needs to be 1487 bytes"));t(null,n.fromBuffer(e))},serialize:(e,t)=>{let r,n=null;try{r=e.toBuffer()}catch(e){n=e}finally{t(n,r)}}}},function(e,t,r){"use strict";(function(t){var n=r(69),i=r(211),o=r(119),s=r(127),a=r(383),c=r(87),u=r(40),f=r(30),l=r(32),h=function e(t){if(!(this instanceof e))return new e(t);t&&this.set(t)};h.prototype.set=function(e){return this.hashbuf=e.hashbuf||this.hashbuf,this.endian=e.endian||this.endian,this.privkey=e.privkey||this.privkey,this.pubkey=e.pubkey||(this.privkey?this.privkey.publicKey:this.pubkey),this.sig=e.sig||this.sig,this.k=e.k||this.k,this.verified=e.verified||this.verified,this},h.prototype.privkey2pubkey=function(){this.pubkey=this.privkey.toPublicKey()},h.prototype.calci=function(){for(var e=0;e<4;e++){var t;this.sig.i=e;try{t=this.toPublicKey()}catch(e){console.error(e);continue}if(t.point.eq(this.pubkey.point))return this.sig.compressed=this.pubkey.compressed,this}throw this.sig.i=void 0,new Error("Unable to find valid recovery factor")},h.fromString=function(e){var t=JSON.parse(e);return new h(t)},h.prototype.randomK=function(){var e,t=i.getN();do{e=n.fromBuffer(a.getRandomBuffer(32))}while(!e.lt(t)||!e.gt(n.Zero));return this.k=e,this},h.prototype.deterministicK=function(e){f.isUndefined(e)&&(e=0);var r=new t(32);r.fill(1);var o=new t(32);o.fill(0);var s=this.privkey.bn.toBuffer({size:32}),a="little"===this.endian?u.reverse(this.hashbuf):this.hashbuf;o=c.sha256hmac(t.concat([r,new t([0]),s,a]),o),r=c.sha256hmac(r,o),o=c.sha256hmac(t.concat([r,new t([1]),s,a]),o),r=c.sha256hmac(r,o),r=c.sha256hmac(r,o);for(var l=n.fromBuffer(r),h=i.getN(),p=0;p>1,u=i.getN(),f=i.getG(),h=c?r.add(u):r,p=i.fromX(a,h);if(!p.mul(u).isInfinity())throw new Error("nR is not a valid curve point");var d=t.neg().mod(u),g=r.invm(u),b=p.mul(o).add(f.mul(d)).mul(g);return s.fromPoint(b,this.sig.compressed)},h.prototype.sigError=function(){if(!u.isBuffer(this.hashbuf)||32!==this.hashbuf.length)return"hashbuf must be a 32 byte buffer";var e=this.sig.r,t=this.sig.s;if(!(e.gt(n.Zero)&&e.lt(i.getN())&&t.gt(n.Zero)&&t.lt(i.getN())))return"r and s not in range";var r=n.fromBuffer(this.hashbuf,this.endian?{endian:this.endian}:void 0),o=i.getN(),s=t.invm(o),a=s.mul(r).mod(o),c=s.mul(e).mod(o),f=i.getG().mulAdd(a,this.pubkey.point,c);return f.isInfinity()?"p is infinity":0!==f.getX().mod(o).cmp(e)&&"Invalid signature"},h.toLowS=function(e){return e.gt(n.fromBuffer(new t("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex")))&&(e=i.getN().sub(e)),e},h.prototype._findSignature=function(e,t){var r,o,s,a=i.getN(),c=i.getG(),u=0;do{(!this.k||u>0)&&this.deterministicK(u),u++,r=this.k,o=c.mul(r).x.mod(a),s=r.invm(a).mul(t.add(e.mul(o))).mod(a)}while(o.cmp(n.Zero)<=0||s.cmp(n.Zero)<=0);return{s:s=h.toLowS(s),r:o}},h.prototype.sign=function(){var e=this.hashbuf,t=this.privkey,r=t.bn;l.checkState(e&&t&&r,new Error("invalid parameters")),l.checkState(u.isBuffer(e)&&32===e.length,new Error("hashbuf must be a 32 byte buffer"));var i=n.fromBuffer(e,this.endian?{endian:this.endian}:void 0),s=this._findSignature(r,i);return s.compressed=this.pubkey.compressed,this.sig=new o(s),this},h.prototype.signRandomK=function(){return this.randomK(),this.sign()},h.prototype.toString=function(){var e={};return this.hashbuf&&(e.hashbuf=this.hashbuf.toString("hex")),this.privkey&&(e.privkey=this.privkey.toString()),this.pubkey&&(e.pubkey=this.pubkey.toString()),this.sig&&(e.sig=this.sig.toString()),this.k&&(e.k=this.k.toString()),JSON.stringify(e)},h.prototype.verify=function(){return this.sigError()?this.verified=!1:this.verified=!0,this},h.sign=function(e,t,r){return h().set({hashbuf:e,endian:r,privkey:t}).sign().sig},h.verify=function(e,t,r,n){return h().set({hashbuf:e,endian:n,sig:t,pubkey:r}).verify().verified},e.exports=h}).call(this,r(0).Buffer)},function(e,t,r){"use strict";var n=r(27).Buffer,i=r(66).Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(22)(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},function(e,t,r){var n=r(22),i=r(213),o=r(27).Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function c(){this.init(),this._w=a,i.call(this,64,56)}function u(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function l(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function h(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function p(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(c,i),c.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,c=0|this._e,d=0|this._f,g=0|this._g,b=0|this._h,m=0;m<16;++m)r[m]=e.readInt32BE(4*m);for(;m<64;++m)r[m]=0|(((t=r[m-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[m-7]+p(r[m-15])+r[m-16];for(var y=0;y<64;++y){var v=b+h(c)+u(c,d,g)+s[y]+r[y]|0,w=l(n)+f(n,i,o)|0;b=g,g=d,d=c,c=a+v|0,a=o,o=i,i=n,n=v+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=c+this._e|0,this._f=d+this._f|0,this._g=g+this._g|0,this._h=b+this._h|0},c.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=c},function(e,t,r){var n=r(22),i=r(213),o=r(27).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function c(){this.init(),this._w=a,i.call(this,128,112)}function u(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function l(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function h(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function m(e,t){return e>>>0>>0?1:0}n(c,i),c.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},c.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,c=0|this._fh,y=0|this._gh,v=0|this._hh,w=0|this._al,A=0|this._bl,_=0|this._cl,S=0|this._dl,E=0|this._el,k=0|this._fl,x=0|this._gl,C=0|this._hl,I=0;I<32;I+=2)t[I]=e.readInt32BE(4*I),t[I+1]=e.readInt32BE(4*I+4);for(;I<160;I+=2){var B=t[I-30],T=t[I-30+1],R=p(B,T),P=d(T,B),O=g(B=t[I-4],T=t[I-4+1]),M=b(T,B),N=t[I-14],D=t[I-14+1],K=t[I-32],U=t[I-32+1],j=P+D|0,F=R+N+m(j,P)|0;F=(F=F+O+m(j=j+M|0,M)|0)+K+m(j=j+U|0,U)|0,t[I]=F,t[I+1]=j}for(var L=0;L<160;L+=2){F=t[L],j=t[L+1];var z=f(r,n,i),H=f(w,A,_),q=l(r,w),V=l(w,r),G=h(a,E),W=h(E,a),Y=s[L],J=s[L+1],Z=u(a,c,y),Q=u(E,k,x),X=C+W|0,$=v+G+m(X,C)|0;$=($=($=$+Z+m(X=X+Q|0,Q)|0)+Y+m(X=X+J|0,J)|0)+F+m(X=X+j|0,j)|0;var ee=V+H|0,te=q+z+m(ee,V)|0;v=y,C=x,y=c,x=k,c=a,k=E,a=o+$+m(E=S+X|0,S)|0,o=i,S=_,i=n,_=A,n=r,A=w,r=$+te+m(w=X+ee|0,X)|0}this._al=this._al+w|0,this._bl=this._bl+A|0,this._cl=this._cl+_|0,this._dl=this._dl+S|0,this._el=this._el+E|0,this._fl=this._fl+k|0,this._gl=this._gl+x|0,this._hl=this._hl+C|0,this._ah=this._ah+r+m(this._al,w)|0,this._bh=this._bh+n+m(this._bl,A)|0,this._ch=this._ch+i+m(this._cl,_)|0,this._dh=this._dh+o+m(this._dl,S)|0,this._eh=this._eh+a+m(this._el,E)|0,this._fh=this._fh+c+m(this._fl,k)|0,this._gh=this._gh+y+m(this._gl,x)|0,this._hh=this._hh+v+m(this._hl,C)|0},c.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=c},function(e,t,r){"use strict";var n=r(22),i=r(1898),o=r(155),s=r(27).Buffer,a=r(984),c=r(717),u=r(718),f=s.alloc(128);function l(e,t){o.call(this,"digest"),"string"==typeof t&&(t=s.from(t));var r="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>r)?t=("rmd160"===e?new c:u(e)).update(t).digest():t.lengthr||o!=o)throw new TypeError("Bad key length")}}).call(this,r(0).Buffer)},function(e,t,r){(function(t){var r;t.browser?r="utf-8":r=parseInt(t.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary";e.exports=r}).call(this,r(6))},function(e,t,r){var n=r(984),i=r(717),o=r(718),s=r(987),a=r(988),c=r(27).Buffer,u=c.alloc(128),f={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function l(e,t,r){var s=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new i).update(e).digest()}:"md5"===e?n:function(t){return o(e).update(t).digest()}}(e),a="sha512"===e||"sha384"===e?128:64;t.length>a?t=s(t):t.lengthe;)r.ishrn(1);if(r.isEven()&&r.iadd(a),r.testn(1)||r.iadd(c),t.cmp(c)){if(!t.cmp(u))for(;r.mod(f).cmp(l);)r.iadd(p)}else for(;r.mod(o).cmp(h);)r.iadd(p);if(b(d=r.shrn(1))&&b(r)&&m(d)&&m(r)&&s.test(d)&&s.test(r))return r}}},function(e,t,r){var n=r(54),i=r(997);function o(e){this.rand=e||new i.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},o.prototype.test=function(e,t,r){var i=e.bitLength(),o=n.mont(e),s=new n(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var a=e.subn(1),c=0;!a.testn(c);c++);for(var u=e.shrn(c),f=a.toRed(o);t>0;t--){var l=this._randrange(new n(2),a);r&&r(l);var h=l.toRed(o).redPow(u);if(0!==h.cmp(s)&&0!==h.cmp(f)){for(var p=1;p0;t--){var f=this._randrange(new n(2),s),l=e.gcd(f);if(0!==l.cmpn(1))return l;var h=f.toRed(i).redPow(c);if(0!==h.cmp(o)&&0!==h.cmp(u)){for(var p=1;p>8,s=255&i;o?r.push(o,s):r.push(s)}return r},n.zero2=i,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}},function(e,t,r){"use strict";var n=r(126).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function s(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?s(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=s,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},function(e,t,r){"use strict";var n=r(126),i=r(308),o=r(999),s=r(101),a=n.sum32,c=n.sum32_4,u=n.sum32_5,f=o.ch32,l=o.maj32,h=o.s0_256,p=o.s1_256,d=o.g0_256,g=o.g1_256,b=i.BlockHash,m=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function y(){if(!(this instanceof y))return new y;b.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}n.inherits(y,b),e.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n>6],i=0==(32&r);if(31==(31&r)){var o=r;for(r=0;128==(128&o);){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:a.tag[r]}}function l(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var o=0;o=31)return n.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=a.tagClassByName[r||"universal"]<<6}(e,t,r,this.reporter);if(n.length<128)return(o=new i(2))[0]=s,o[1]=n.length,this._createEncoderBuffer([o,n]);for(var c=1,u=n.length;u>=256;u>>=8)c++;(o=new i(2+c))[0]=s,o[1]=128|c;u=1+c;for(var f=n.length;f>0;u--,f>>=8)o[u]=255&f;return this._createEncoderBuffer([o,n])},u.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new i(2*e.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var o=0;for(n=0;n=128;s>>=7)o++}var a=new i(o),c=a.length-1;for(n=e.length-1;n>=0;n--){s=e[n];for(a[c--]=127&s;(s>>=7)>0;)a[c--]=128|127&s}return this._createEncoderBuffer(a)},u.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[f(n.getFullYear()),f(n.getUTCMonth()+1),f(n.getUTCDate()),f(n.getUTCHours()),f(n.getUTCMinutes()),f(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[f(n.getFullYear()%100),f(n.getUTCMonth()+1),f(n.getUTCDate()),f(n.getUTCHours()),f(n.getUTCMinutes()),f(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new i(r)}if(i.isBuffer(e)){var n=e.length;0===e.length&&n++;var o=new i(n);return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);n=1;for(var s=e;s>=256;s>>=8)n++;for(s=(o=new Array(n)).length-1;s>=0;s--)o[s]=255&e,e>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new i(o))},u.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},u.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},u.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n>8,i[r]&=255;for(;a;)i.push(255&a),a>>=8}for(t=0;"1"===e[t]&&t0&&s0&&s0&&(i=n?i+" "+e.buf.toString("hex"):i+" "+e.len+" 0x"+e.buf.toString("hex"));else if(void 0!==a.reverseMap[r])i=i+" "+a(r).toString();else{var o=r.toString(16);o.length%2!=0&&(o="0"+o),i=n?i+" "+o:i+" 0x"+o}return i},m.prototype.toASM=function(){for(var e="",t=0;t"},m.prototype.isPublicKeyHashOut=function(){return!(5!==this.chunks.length||this.chunks[0].opcodenum!==a.OP_DUP||this.chunks[1].opcodenum!==a.OP_HASH160||!this.chunks[2].buf||20!==this.chunks[2].buf.length||this.chunks[3].opcodenum!==a.OP_EQUALVERIFY||this.chunks[4].opcodenum!==a.OP_CHECKSIG)},m.prototype.isPublicKeyHashIn=function(){if(2===this.chunks.length){var e=this.chunks[0].buf,t=this.chunks[1].buf;if(e&&e.length&&48===e[0]&&t&&t.length){var r=t[0];if((4===r||6===r||7===r)&&65===t.length)return!0;if((3===r||2===r)&&33===t.length)return!0}}return!1},m.prototype.getPublicKey=function(){return l.checkState(this.isPublicKeyOut(),"Can't retreive PublicKey from a non-PK output"),this.chunks[0].buf},m.prototype.getPublicKeyHash=function(){return l.checkState(this.isPublicKeyHashOut(),"Can't retrieve PublicKeyHash from a non-PKH output"),this.chunks[2].buf},m.prototype.isPublicKeyOut=function(){if(2===this.chunks.length&&this.chunks[0].buf&&this.chunks[0].buf.length&&this.chunks[1].opcodenum===a.OP_CHECKSIG){var e=this.chunks[0].buf,t=e[0],r=!1;if((4!==t&&6!==t&&7!==t||65!==e.length)&&(3!==t&&2!==t||33!==e.length)||(r=!0),r)return c.isValid(e)}return!1},m.prototype.isPublicKeyIn=function(){if(1===this.chunks.length){var e=this.chunks[0].buf;if(e&&e.length&&48===e[0])return!0}return!1},m.prototype.isScriptHashOut=function(){var e=this.toBuffer();return 23===e.length&&e[0]===a.OP_HASH160&&20===e[1]&&e[e.length-1]===a.OP_EQUAL},m.prototype.isScriptHashIn=function(){if(this.chunks.length<=1)return!1;var e,t=this.chunks[this.chunks.length-1].buf;if(!t)return!1;try{e=m.fromBuffer(t)}catch(e){if(e instanceof p.Script.InvalidBuffer)return!1;throw e}return e.classify()!==m.types.UNKNOWN},m.prototype.isMultisigOut=function(){return this.chunks.length>3&&a.isSmallIntOp(this.chunks[0].opcodenum)&&this.chunks.slice(1,this.chunks.length-2).every(function(e){return e.buf&&g.isBuffer(e.buf)})&&a.isSmallIntOp(this.chunks[this.chunks.length-2].opcodenum)&&this.chunks[this.chunks.length-1].opcodenum===a.OP_CHECKMULTISIG},m.prototype.isMultisigIn=function(){return this.chunks.length>=2&&0===this.chunks[0].opcodenum&&this.chunks.slice(1,this.chunks.length).every(function(e){return e.buf&&g.isBuffer(e.buf)&&u.isTxDER(e.buf)})},m.prototype.isDataOut=function(){return this.chunks.length>=1&&this.chunks[0].opcodenum===a.OP_RETURN&&(1===this.chunks.length||2===this.chunks.length&&this.chunks[1].buf&&this.chunks[1].buf.length<=m.OP_RETURN_STANDARD_SIZE&&this.chunks[1].length===this.chunks.len)},m.prototype.getData=function(){if(this.isDataOut()||this.isScriptHashOut())return h.isUndefined(this.chunks[1])?new t(0):new t(this.chunks[1].buf);if(this.isPublicKeyHashOut())return new t(this.chunks[2].buf);throw new Error("Unrecognized script type to get data from")},m.prototype.isPushOnly=function(){return h.every(this.chunks,function(e){return e.opcodenum<=a.OP_16})},(m.types={}).UNKNOWN="Unknown",m.types.PUBKEY_OUT="Pay to public key",m.types.PUBKEY_IN="Spend from public key",m.types.PUBKEYHASH_OUT="Pay to public key hash",m.types.PUBKEYHASH_IN="Spend from public key hash",m.types.SCRIPTHASH_OUT="Pay to script hash",m.types.SCRIPTHASH_IN="Spend from script hash",m.types.MULTISIG_OUT="Pay to multisig",m.types.MULTISIG_IN="Spend from multisig",m.types.DATA_OUT="Data push",m.OP_RETURN_STANDARD_SIZE=80,m.prototype.classify=function(){if(this._isInput)return this.classifyInput();if(this._isOutput)return this.classifyOutput();var e=this.classifyOutput();return e!=m.types.UNKNOWN?e:this.classifyInput()},(m.outputIdentifiers={}).PUBKEY_OUT=m.prototype.isPublicKeyOut,m.outputIdentifiers.PUBKEYHASH_OUT=m.prototype.isPublicKeyHashOut,m.outputIdentifiers.MULTISIG_OUT=m.prototype.isMultisigOut,m.outputIdentifiers.SCRIPTHASH_OUT=m.prototype.isScriptHashOut,m.outputIdentifiers.DATA_OUT=m.prototype.isDataOut,m.prototype.classifyOutput=function(){for(var e in m.outputIdentifiers)if(m.outputIdentifiers[e].bind(this)())return m.types[e];return m.types.UNKNOWN},(m.inputIdentifiers={}).PUBKEY_IN=m.prototype.isPublicKeyIn,m.inputIdentifiers.PUBKEYHASH_IN=m.prototype.isPublicKeyHashIn,m.inputIdentifiers.MULTISIG_IN=m.prototype.isMultisigIn,m.inputIdentifiers.SCRIPTHASH_IN=m.prototype.isScriptHashIn,m.prototype.classifyInput=function(){for(var e in m.inputIdentifiers)if(m.inputIdentifiers[e].bind(this)())return m.types[e];return m.types.UNKNOWN},m.prototype.isStandard=function(){return this.classify()!==m.types.UNKNOWN},m.prototype.prepend=function(e){return this._addByType(e,!0),this},m.prototype.equals=function(e){if(l.checkState(e instanceof m,"Must provide another script"),this.chunks.length!==e.chunks.length)return!1;var t;for(t=0;t=0&&n=1&&r[0]<=16?n===a.OP_1+(r[0]-1):1===r.length&&129===r[0]?n===a.OP_1NEGATE:r.length<=75?n===r.length:r.length<=255?n===a.OP_PUSHDATA1:!(r.length<=65535)||n===a.OP_PUSHDATA2)},m.prototype._decodeOP_N=function(e){if(e===a.OP_0)return 0;if(e>=a.OP_1&&e<=a.OP_16)return e-(a.OP_1-1);throw new Error("Invalid opcode: "+JSON.stringify(e))},m.prototype.getSignatureOperationsCount=function(e){e=!!h.isUndefined(e)||e;var t=this,r=0,n=a.OP_INVALIDOPCODE;return h.each(t.chunks,function(i){var o=i.opcodenum;o==a.OP_CHECKSIG||o==a.OP_CHECKSIGVERIFY?r++:o!=a.OP_CHECKMULTISIG&&o!=a.OP_CHECKMULTISIGVERIFY||(e&&n>=a.OP_1&&n<=a.OP_16?r+=t._decodeOP_N(n):r+=20),n=o}),r},e.exports=m}).call(this,r(0).Buffer)},function(e,t,r){"use strict";var n=r(30),i=r(32),o=r(62),s=r(120),a=r(189),c=r(727);function u(e){if(!(this instanceof u))return new u(e);i.checkArgument(n.isObject(e),"Must provide an object from where to extract data");var t=e.address?new a(e.address):void 0,r=e.txid?e.txid:e.txId;if(!r||!o.isHexaString(r)||r.length>64)throw new Error("Invalid TXID in object",e);var f=n.isUndefined(e.vout)?e.outputIndex:e.vout;if(!n.isNumber(f))throw new Error("Invalid outputIndex, received "+f);i.checkArgument(!n.isUndefined(e.scriptPubKey)||!n.isUndefined(e.script),"Must provide the scriptPubKey for that output!");var l=new s(e.scriptPubKey||e.script);i.checkArgument(!n.isUndefined(e.amount)||!n.isUndefined(e.satoshis),"Must provide an amount for the output");var h=n.isUndefined(e.amount)?e.satoshis:new c.fromBTC(e.amount).toSatoshis();i.checkArgument(n.isNumber(h),"Amount must be a number"),o.defineImmutable(this,{address:t,txId:r,outputIndex:f,script:l,satoshis:h})}u.prototype.inspect=function(){return""},u.prototype.toString=function(){return this.txId+":"+this.outputIndex},u.fromObject=function(e){return new u(e)},u.prototype.toObject=u.prototype.toJSON=function(){return{address:this.address?this.address.toString():void 0,txid:this.txId,vout:this.outputIndex,scriptPubKey:this.script.toBuffer().toString("hex"),amount:c.fromSatoshis(this.satoshis).toBTC()}},e.exports=u},function(e,t,r){"use strict";(function(t){var n=r(30),i=r(384),o=r(40),s=r(156),a=r(102),c=r(87),u=(r(62),r(382)),f=r(32);function l(e){if(!(this instanceof l))return new l(e);var t={};if(o.isBuffer(e))t=l._fromBufferReader(s(e));else{if(!n.isObject(e))throw new TypeError("Unrecognized argument for MerkleBlock");t={header:e.header instanceof i?e.header:i.fromObject(e.header),numTransactions:e.numTransactions,hashes:e.hashes,flags:e.flags}}return n.extend(this,t),this._flagBitsUsed=0,this._hashesUsed=0,this}l.fromBuffer=function(e){return l.fromBufferReader(s(e))},l.fromBufferReader=function(e){return new l(l._fromBufferReader(e))},l.prototype.toBuffer=function(){return this.toBufferWriter().concat()},l.prototype.toBufferWriter=function(e){e||(e=new a),e.write(this.header.toBuffer()),e.writeUInt32LE(this.numTransactions),e.writeVarintNum(this.hashes.length);for(var r=0;rthis.numTransactions)return!1;if(8*this.flags.length8*this.flags.length)return null;var i=this.flags[n.flagBitsUsed>>3]>>>(7&n.flagBitsUsed++)&1;if(0!==e&&i){var o=this._traverseMerkleTree(e-1,2*r,n),s=o;return 2*r+1=this.hashes.length)return null;var a=this.hashes[n.hashesUsed++];return 0===e&&i&&n.txs.push(a),new t(a,"hex")},l.prototype._calcTreeWidth=function(e){return this.numTransactions+(1<>e},l.prototype._calcTreeHeight=function(){for(var e=0;this._calcTreeWidth(e)>1;)e++;return e},l.prototype.hasTransaction=function(e){f.checkArgument(!n.isUndefined(e),"tx cannot be undefined"),f.checkArgument(e instanceof u||"string"==typeof e,'Invalid tx given, tx must be a "string" or "Transaction"');var r=e;e instanceof u&&(r=o.reverse(new t(e.id,"hex")).toString("hex"));var i=[],s=this._calcTreeHeight();return this._traverseMerkleTree(s,0,{txs:i}),-1!==i.indexOf(r)},l._fromBufferReader=function(e){f.checkState(!e.finished(),"No merkleblock data received");var t={};t.header=i.fromBufferReader(e),t.numTransactions=e.readUInt32LE();var r=e.readVarintNum();t.hashes=[];for(var n=0;n=0&&e=w.Hardened||t,e64)throw new m.InvalidEntropyArgument.TooMuchEntropy(e);var n=f.sha512hmac(e,new i.Buffer("Bitcoin seed"));return new w({network:l.get(r)||l.defaultNetwork,depth:0,parentFingerPrint:0,childIndex:0,privateKey:n.slice(0,32),chainCode:n.slice(32,64)})},w.prototype._calcHDPublicKey=function(){if(!this._hdPublicKey){var e=r(1015);this._hdPublicKey=new e(this)}},w.prototype._buildFromBuffers=function(e){w._validateBufferArguments(e),v.defineImmutable(this,{_buffers:e});var r=[e.version,e.depth,e.parentFingerPrint,e.childIndex,e.chainCode,y.emptyBuffer(1),e.privateKey],n=i.Buffer.concat(r);if(e.checksum&&e.checksum.length){if(e.checksum.toString()!==u.checksum(n).toString())throw new b.InvalidB58Checksum(n)}else e.checksum=u.checksum(n);var o,s=l.get(y.integerFromBuffer(e.version));o=u.encode(i.Buffer.concat(r)),e.xprivkey=new t(o);var c=new d(a.fromBuffer(e.privateKey),s),h=c.toPublicKey(),p=w.ParentFingerPrintSize,g=f.sha256ripemd160(h.toBuffer()).slice(0,p);return v.defineImmutable(this,{xprivkey:o,network:s,depth:y.integerFromSingleByteBuffer(e.depth),privateKey:c,publicKey:h,fingerPrint:g}),this._hdPublicKey=null,Object.defineProperty(this,"hdPublicKey",{configurable:!1,enumerable:!0,get:function(){return this._calcHDPublicKey(),this._hdPublicKey}}),Object.defineProperty(this,"xpubkey",{configurable:!1,enumerable:!0,get:function(){return this._calcHDPublicKey(),this._hdPublicKey.xpubkey}}),this},w._validateBufferArguments=function(e){var t=function(t,r){var i=e[t];n(y.isBuffer(i),t+" argument is not a buffer"),n(i.length===r,t+" has not the expected size: found "+i.length+", expected "+r)};t("version",w.VersionSize),t("depth",w.DepthSize),t("parentFingerPrint",w.ParentFingerPrintSize),t("childIndex",w.ChildIndexSize),t("chainCode",w.ChainCodeSize),t("privateKey",w.PrivateKeySize),e.checksum&&e.checksum.length&&t("checksum",w.CheckSumSize)},w.prototype.toString=function(){return this.xprivkey},w.prototype.inspect=function(){return""},w.prototype.toObject=w.prototype.toJSON=function(){return{network:l.get(y.integerFromBuffer(this._buffers.version),"xprivkey").name,depth:y.integerFromSingleByteBuffer(this._buffers.depth),fingerPrint:y.integerFromBuffer(this.fingerPrint),parentFingerPrint:y.integerFromBuffer(this._buffers.parentFingerPrint),childIndex:y.integerFromBuffer(this._buffers.childIndex),chainCode:y.bufferToHex(this._buffers.chainCode),privateKey:this.privateKey.toBuffer().toString("hex"),checksum:y.integerFromBuffer(this._buffers.checksum),xprivkey:this.xprivkey}},w.fromBuffer=function(e){return new w(e.toString())},w.prototype.toBuffer=function(){return y.copy(this._buffers.xprivkey)},w.DefaultDepth=0,w.DefaultFingerprint=0,w.DefaultChildIndex=0,w.Hardened=2147483648,w.MaxIndex=2*w.Hardened,w.RootElementAlias=["m","M","m'","M'"],w.VersionSize=4,w.DepthSize=1,w.ParentFingerPrintSize=4,w.ChildIndexSize=4,w.ChainCodeSize=32,w.PrivateKeySize=32,w.CheckSumSize=4,w.DataLength=78,w.SerializedByteSize=82,w.VersionStart=0,w.VersionEnd=w.VersionStart+w.VersionSize,w.DepthStart=w.VersionEnd,w.DepthEnd=w.DepthStart+w.DepthSize,w.ParentFingerPrintStart=w.DepthEnd,w.ParentFingerPrintEnd=w.ParentFingerPrintStart+w.ParentFingerPrintSize,w.ChildIndexStart=w.ParentFingerPrintEnd,w.ChildIndexEnd=w.ChildIndexStart+w.ChildIndexSize,w.ChainCodeStart=w.ChildIndexEnd,w.ChainCodeEnd=w.ChainCodeStart+w.ChainCodeSize,w.PrivateKeyStart=w.ChainCodeEnd+1,w.PrivateKeyEnd=w.PrivateKeyStart+w.PrivateKeySize,w.ChecksumStart=w.PrivateKeyEnd,w.ChecksumEnd=w.ChecksumStart+w.CheckSumSize,n(w.ChecksumEnd===w.SerializedByteSize),e.exports=w}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){var n=r(30),i=r(32),o=r(69),s=r(381),a=r(311),c=r(87),u=r(1014),f=r(728),l=r(188),h=r(211),p=r(127),d=r(118),g=d,b=d.HDPublicKey,m=r(20),y=r(62),v=r(40);function w(e){if(e instanceof w)return e;if(!(this instanceof w))return new w(e);if(e){if(n.isString(e)||v.isBuffer(e)){var t=w.getSerializedError(e);if(t){if(v.isBuffer(e)&&!w.getSerializedError(e.toString()))return this._buildFromSerialized(e.toString());if(t instanceof b.ArgumentIsPrivateExtended)return new u(e).hdPublicKey;throw t}return this._buildFromSerialized(e)}if(n.isObject(e))return e instanceof u?this._buildFromPrivate(e):this._buildFromObject(e);throw new b.UnrecognizedArgument(e)}throw new b.MustSupplyArgument}w.isValidPath=function(e){if(n.isString(e)){var t=u._getDerivationIndexes(e);return null!==t&&n.all(t,w.isValidPath)}return!!n.isNumber(e)&&(e>=0&&e=w.Hardened||t)throw new b.InvalidIndexCantDeriveHardened;if(e<0)throw new b.InvalidPath(e);var r=f.get(this.xpubkey,e,!1);if(r)return r;var n=v.integerAsBuffer(e),i=v.concat([this.publicKey.toBuffer(),n]),s=c.sha512hmac(i,this._buffers.chainCode),a=o.fromBuffer(s.slice(0,32),{size:32}),u=s.slice(32,64),l=p.fromPoint(h.getG().mul(a).add(this.publicKey.point)),d=new w({network:this.network,depth:this.depth+1,parentFingerPrint:this.fingerPrint,childIndex:e,chainCode:u,publicKey:l});return f.set(this.xpubkey,e,!1,d),d},w.prototype._deriveFromString=function(e){if(n.contains(e,"'"))throw new b.InvalidIndexCantDeriveHardened;if(!w.isValidPath(e))throw new b.InvalidPath(e);return u._getDerivationIndexes(e).reduce(function(e,t){return e._deriveWithNumber(t)},this)},w.isValidSerialized=function(e,t){return n.isNull(w.getSerializedError(e,t))},w.getSerializedError=function(e,t){if(!n.isString(e)&&!v.isBuffer(e))return new b.UnrecognizedArgument("expected buffer or string");if(!s.validCharacters(e))return new g.InvalidB58Char("(unknown)",e);try{e=a.decode(e)}catch(t){return new g.InvalidB58Checksum(e)}if(e.length!==w.DataSize)return new b.InvalidLength(e);if(!n.isUndefined(t)){var r=w._validateNetwork(e,t);if(r)return r}var i=v.integerFromBuffer(e.slice(0,4));return i===l.livenet.xprivkey||i===l.testnet.xprivkey?new b.ArgumentIsPrivateExtended:null},w._validateNetwork=function(e,t){var r=l.get(t);if(!r)return new g.InvalidNetworkArgument(t);var n=e.slice(w.VersionStart,w.VersionEnd);return v.integerFromBuffer(n)!==r.xpubkey?new g.InvalidNetwork(n):null},w.prototype._buildFromPrivate=function(e){var t=n.clone(e._buffers),r=h.getG().mul(o.fromBuffer(t.privateKey));return t.publicKey=h.pointToCompressed(r),t.version=v.integerAsBuffer(l.get(v.integerFromBuffer(t.version)).xpubkey),t.privateKey=void 0,t.checksum=void 0,t.xprivkey=void 0,this._buildFromBuffers(t)},w.prototype._buildFromObject=function(e){var t={version:e.network?v.integerAsBuffer(l.get(e.network).xpubkey):e.version,depth:n.isNumber(e.depth)?v.integerAsSingleByteBuffer(e.depth):e.depth,parentFingerPrint:n.isNumber(e.parentFingerPrint)?v.integerAsBuffer(e.parentFingerPrint):e.parentFingerPrint,childIndex:n.isNumber(e.childIndex)?v.integerAsBuffer(e.childIndex):e.childIndex,chainCode:n.isString(e.chainCode)?v.hexToBuffer(e.chainCode):e.chainCode,publicKey:n.isString(e.publicKey)?v.hexToBuffer(e.publicKey):v.isBuffer(e.publicKey)?e.publicKey:e.publicKey.toBuffer(),checksum:n.isNumber(e.checksum)?v.integerAsBuffer(e.checksum):e.checksum};return this._buildFromBuffers(t)},w.prototype._buildFromSerialized=function(e){var t=a.decode(e),r={version:t.slice(w.VersionStart,w.VersionEnd),depth:t.slice(w.DepthStart,w.DepthEnd),parentFingerPrint:t.slice(w.ParentFingerPrintStart,w.ParentFingerPrintEnd),childIndex:t.slice(w.ChildIndexStart,w.ChildIndexEnd),chainCode:t.slice(w.ChainCodeStart,w.ChainCodeEnd),publicKey:t.slice(w.PublicKeyStart,w.PublicKeyEnd),checksum:t.slice(w.ChecksumStart,w.ChecksumEnd),xpubkey:e};return this._buildFromBuffers(r)},w.prototype._buildFromBuffers=function(e){w._validateBufferArguments(e),y.defineImmutable(this,{_buffers:e});var r=[e.version,e.depth,e.parentFingerPrint,e.childIndex,e.chainCode,e.publicKey],n=v.concat(r),i=a.checksum(n);if(e.checksum&&e.checksum.length){if(e.checksum.toString("hex")!==i.toString("hex"))throw new g.InvalidB58Checksum(n,i)}else e.checksum=i;var o,s=l.get(v.integerFromBuffer(e.version));o=a.encode(v.concat(r)),e.xpubkey=new t(o);var u=new p(e.publicKey,{network:s}),f=w.ParentFingerPrintSize,h=c.sha256ripemd160(u.toBuffer()).slice(0,f);return y.defineImmutable(this,{xpubkey:o,network:s,depth:v.integerFromSingleByteBuffer(e.depth),publicKey:u,fingerPrint:h}),this},w._validateBufferArguments=function(e){var t=function(t,r){var n=e[t];m(v.isBuffer(n),t+" argument is not a buffer, it's "+typeof n),m(n.length===r,t+" has not the expected size: found "+n.length+", expected "+r)};t("version",w.VersionSize),t("depth",w.DepthSize),t("parentFingerPrint",w.ParentFingerPrintSize),t("childIndex",w.ChildIndexSize),t("chainCode",w.ChainCodeSize),t("publicKey",w.PublicKeySize),e.checksum&&e.checksum.length&&t("checksum",w.CheckSumSize)},w.fromString=function(e){return i.checkArgument(n.isString(e),"No valid string was provided"),new w(e)},w.fromObject=function(e){return i.checkArgument(n.isObject(e),"No valid argument was provided"),new w(e)},w.prototype.toString=function(){return this.xpubkey},w.prototype.inspect=function(){return""},w.prototype.toObject=w.prototype.toJSON=function(){return{network:l.get(v.integerFromBuffer(this._buffers.version)).name,depth:v.integerFromSingleByteBuffer(this._buffers.depth),fingerPrint:v.integerFromBuffer(this.fingerPrint),parentFingerPrint:v.integerFromBuffer(this._buffers.parentFingerPrint),childIndex:v.integerFromBuffer(this._buffers.childIndex),chainCode:v.bufferToHex(this._buffers.chainCode),publicKey:this.publicKey.toString(),checksum:v.integerFromBuffer(this._buffers.checksum),xpubkey:this.xpubkey}},w.fromBuffer=function(e){return new w(e)},w.prototype.toBuffer=function(){return v.copy(this._buffers.xpubkey)},w.Hardened=2147483648,w.RootElementAlias=["m","M"],w.VersionSize=4,w.DepthSize=1,w.ParentFingerPrintSize=4,w.ChildIndexSize=4,w.ChainCodeSize=32,w.PublicKeySize=33,w.CheckSumSize=4,w.DataSize=78,w.SerializedByteSize=82,w.VersionStart=0,w.VersionEnd=w.VersionStart+w.VersionSize,w.DepthStart=w.VersionEnd,w.DepthEnd=w.DepthStart+w.DepthSize,w.ParentFingerPrintStart=w.DepthEnd,w.ParentFingerPrintEnd=w.ParentFingerPrintStart+w.ParentFingerPrintSize,w.ChildIndexStart=w.ParentFingerPrintEnd,w.ChildIndexEnd=w.ChildIndexStart+w.ChildIndexSize,w.ChainCodeStart=w.ChildIndexEnd,w.ChainCodeEnd=w.ChainCodeStart+w.ChainCodeSize,w.PublicKeyStart=w.ChainCodeEnd,w.PublicKeyEnd=w.PublicKeyStart+w.PublicKeySize,w.ChecksumStart=w.PublicKeyEnd,w.ChecksumEnd=w.ChecksumStart+w.CheckSumSize,m(w.PublicKeyEnd===w.DataSize),m(w.ChecksumEnd===w.SerializedByteSize),e.exports=w}).call(this,r(0).Buffer)},function(e,t,r){"use strict";r(1017)},function(e,t,r){"use strict";const{createProxyServer:n}=r(385),{getResponse:i}=r(1018),{get:o,set:s}=r(1043),a=r(1044),c=r(1992),u=e=>`${e.getFullYear()}/${e.getMonth()}/${e.getDate()}`,f=e=>`${e.getHours()}:${e.getMinutes()}:${e.getSeconds()}`;let l;self.addEventListener("fetch",e=>{const t=e.request.url,r=t.startsWith(`${self.location.origin}/ipfs/`),n=t.startsWith(`${self.location.origin}/stats`);if(r||n)if(n)e.respondWith((()=>a.get().then(e=>Promise.all([e.id(),e.repo.stat(),o("fetched-cids"),o("start-date-time")]).then(([e,t,r=[],n={}])=>new Response(c.render(e,t,r,n),{status:200,statusText:"OK",headers:{"Content-Type":"text/html"}})).catch(e=>new Response(e.toString()))))());else{const r=t.match(/(\/ipfs\/.*?)(#|\?|$)/)[1];e.respondWith((e=>a.get().then(t=>Promise.all([i(t,e),o("fetched-cids")]).then(([t,r=[]])=>{const n=new Date;return r.push({cid:e.split("/ipfs/")[1],date:u(n),time:f(n)}),s("fetched-cids",r).then(()=>t)}).catch(e=>new Response(e.toString()))))(r))}}),self.addEventListener("install",e=>{e.waitUntil(self.skipWaiting())}),self.addEventListener("activate",e=>{a.get().then(e=>{l=e;const t=new Date;s("fetched-cids",[]),s("start-date-time",{date:u(t),time:f(t)})}).catch(e=>console.err(e)),e.waitUntil(self.clients.claim())}),n(()=>l,{addListener:self.addEventListener&&self.addEventListener.bind(self),removeListener:self.removeEventListener&&self.removeEventListener.bind(self),postMessage(e){self.clients.matchAll().then(t=>{t.forEach(t=>t.postMessage(e))})}})},function(e,t,r){"use strict";const n=r(66),i=r(1019),o=r(1021),s=r(624),a=r(1038),c=(e=200,t="OK",r={})=>({status:e,statusText:t,headers:r});e.exports={getResponse:(e,t)=>{return new Promise((r,u)=>{t.endsWith("/")&&r(Response.redirect(s.removeTrailingSlash(t))),o.cid(e,t).then(o=>{const s=e.catReadableStream(o.cid),u=new n.PassThrough({highWaterMark:1});s.pipe(u),s.once("error",e=>{e&&r(new Response(e.toString(),c(500,"Error fetching the file")))});let f=!1;s.on("data",e=>{if(f)return;f=!0;const n=a(t,e);"undefined"==typeof Blob?r(n?new Response(u,c(200,"OK",{"Content-Type":n})):new Response(u,c())):i(u,(e,t)=>{e&&r(new Response(e.toString(),c(500,"Error fetching the file"))),r(n?new Response(t,c(200,"OK",{"Content-Type":n})):new Response(t,c()))})})}).catch(n=>{r(((e,t,r)=>{if(r){const n=r.toString();return new Promise((i,a)=>{switch(!0){case"Error: This dag node is a directory"===n:o.directory(e,t,r.cid).then(e=>{"string"==typeof e&&i(new Response(e,c(200,"OK",{"Content-Type":"text/html"}))),i(Response.redirect(s.joinURLParts(t,e[0].name)))}).catch(e=>{i(new Response(n,c(500,e.toString())))});break;case n.startsWith("Error: no link named"):i(new Response(n,c(404,n)));break;case n.startsWith("Error: multihash length inconsistent"):case n.startsWith("Error: Non-base58 character"):i(new Response(n,c(400,n)));break;default:i(new Response(n,c(500,n)))}})}})(e,t,n))})})},resolver:o}},function(e,t,r){var n=r(88);e.exports=function e(t,r,i){if("function"==typeof r)return e(t,null,r);i=n(i);var o=[];t.on("data",function(e){o.push(e)}).on("end",function(){var e=r?new Blob(o,{type:r}):new Blob(o);i(null,e)}).on("error",i)}},function(e,t){e.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");Object.keys(t).forEach(function(e){n[e]=t[e]});return n;function n(){for(var e=new Array(arguments.length),r=0;r{r=new s(r),e.object.get(r.buffer,(e,r)=>{if(e)return n(e);const i=function(e){const t=["index.html","index.htm","index.shtml"];let r=e.filter(e=>-1!==t.indexOf(e.name));return r.length?r:e.filter(e=>e.name.length>2&&-1!==t.indexOf(e.name.substring(2)))}(r.links);return i.length?n(null,i):n(null,f.render(t,r.links))})}),p=i((e,t,r)=>{const i=l.cidArray(t);let c,f=i.shift();o(i,f,(t,r,i)=>{try{c=new s(t)}catch(e){return i(e)}u("memo: ",t),u("item: ",r),e.dag.get(c,(e,o)=>{if(e)return i(e);const a=o.value;let c;const u=r;try{for(let t of a.links)if(t.name===u){try{c=new s(t.cid)}catch(e){c=new s(n.toB58String(t.multihash))}break}}catch(e){return i(e)}if(!c){const e=new Error(`no link named "${u}" under ${t}`);return e.parentDagNode=t,e.missingLinkName=u,i(e)}i(null,c)})},(t,n)=>{if(t)return r(t);try{n=new s(n)}catch(t){return r(t)}"raw"===n.codec&&r(null,{cid:n}),e.dag.get(n,(e,t)=>{if(e)return r(e);try{let i=a.unmarshal(t.value.data);if("directory"===i.type||"hamt-sharded-directory"===i.type){let e=new Error("This dag node is a directory");return e.cid=e.fileName=n,e.dagDirType=i.type,r(e)}}catch(e){return r(e)}r(null,{cid:n})})})}),d=i((e,t,r)=>{p(e,t).then(e=>{r(null,{multihash:n.toB58String(e.cid.multihash)})}).catch(e=>{r(e)})});e.exports={directory:h,cid:p,multihash:d}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,n.default)(e))return function(e){var t=-1,r=e.length;return function(){return++t{if("%%"===r)return r;a++;const o=n.formatters[i];if("function"==typeof o){const n=e[a];r=o.call(t,n),e.splice(a,1),a--}return r}),n.formatArgs.call(t,e),(t.log||n.log).apply(t,e)}return s.namespace=e,s.enabled=n.enabled(e),s.useColors=n.useColors(),s.color=t(e),s.destroy=i,s.extend=o,"function"==typeof n.init&&n.init(s),n.instances.push(s),s}function i(){const e=n.instances.indexOf(this);return-1!==e&&(n.instances.splice(e,1),!0)}function o(e,t){return n(this.namespace+(void 0===t?":":t)+e)}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return n.debug=n,n.default=n,n.coerce=function(e){return e instanceof Error?e.stack||e.message:e},n.disable=function(){const e=[...n.names.map(s),...n.skips.map(s).map(e=>"-"+e)].join(",");return n.enable(""),e},n.enable=function(e){let t;n.save(e),n.names=[],n.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(t=0;t{n[t]=e[t]}),n.instances=[],n.names=[],n.skips=[],n.formatters={},n.selectColor=t,n.enable(n.load()),n}},function(e,t,r){"use strict";const n=r(739),i=r(1037),o=r(624);function s(e,t){return`\n \n \n \n \n \n \n \n ${function(e,t){return t.map(t=>{let r=['
 
',`${t.name}`,n(t.size)];return`${r=r.map(e=>``).join("")}`}).join("")}(e,t)}\n \n
\n
 
\n
\n ..\n
${e}
\n `}e.exports.render=function(e,t){return`\n \n \n \n \n ${e}\n \n \n \n \n
\n
\n
\n
\n Index of ${e}\n
\n ${s(e,t)}\n
\n
\n \n \n `}},function(e,t,r){"use strict";e.exports="html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a{background-color:transparent}a:active,a:hover{outline:0}strong{font-weight:700}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}table{border-spacing:0;border-collapse:collapse}td{padding:0} @media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:\" (\" attr(href) \")\"}tr{page-break-inside:avoid}.table{border-collapse:collapse!important}.table td{background-color:#fff!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.row{margin-right:-15px;margin-left:-15px}.col-xs-12,.col-xs-2{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-12,.col-xs-2{float:left}.col-xs-12{width:100%}.col-xs-2{width:16.66666667%}table{background-color:transparent}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table{margin-bottom:0}.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child{border-bottom-right-radius:3px}.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.row:after,.row:before{display:table;content:\" \"}.row:after{clear:both}@-ms-viewport{width:device-width}.ipfs-_blank{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAWBJREFUeNqEUj1LxEAQnd1MVA4lyIEWx6UIKEGUExGsbC3tLfwJ/hT/g7VlCnubqxXBwg/Q4hQP/LhKL5nZuBsvuGfW5MGyuzM7jzdvVuR5DgYnZ+f99ai7Vt5t9K9unu4HLweI3qWYxI6PDosdy0fhcntxO44CcOBzPA7mfEyuHwf7ntQk4jcnywOxIlfxOCNYaLVgb6cXbkTdhJXq2SIlNMC0xIqhHczDbi8OVzpLSUa0WebRfmigLHqj1EcPZnwf7gbDIrYVRyEinurj6jTBHyI7pqVrFQqEbt6TEmZ9v1NRAJNC1xTYxIQh/MmRUlmFQE3qWOW1nqB2TWk1/3tgJV0waVvkFIEeZbHq4ElyKzAmEXOx6gnEVJuWBzmkRJBRPYGZBDsVaOlpSgVJE2yVaAe/0kx/3azBRO0VsbMFZE3CDSZKweZfYIVg+DZ6v7h9GDVOwZPw/PoxKu/fAgwALbDAXf7DdQkAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-_page{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmhJREFUeNpsUztv01AYPfdhOy/XTZ80VV1VoCqlA2zQqUgwMEErWBALv4GJDfEDmOEHsFTqVCTExAiiSI2QEKJKESVFFBWo04TESRzfy2c7LY/kLtf2d8+555zvM9NaI1ora5svby9OnbUEBxgDlIKiWjXQeLy19/X17sEtcPY2rtHS96/Hu0RvXXLz+cUzM87zShsI29DpHCYt4E6Box4IZzTnbDx7V74GjhOSfwgE0H2638K9h08A3iHGVbjTw7g6YmAyw/BgecHNGGJjvfQhIfmfIFDAXJpjuugi7djIFVI4P0plctgJQ0xnFe5eOO02OwEp2VkhSCnC8WOCdqgwnzFx4/IyppwRVN+XYXsecqZA1pB48ekAnw9/4GZx3L04N/GoTwEjX4cNH5vlPfjtAIYp8cWrQutxrC5Mod3VsXVTMFSqtaE+gl9dhaUxE2tXZiF7nYiiatJ3v5s8R/1yOCNLOuwjkELiTbmC9dJHpIaGASsDkoFQGJQwHWMcHWJYOmUj1OjvQotuytt5nHMLEGkCyx6QU384jwkUAd2sxJbS/QShZtg/8rHzzQOzSaFhxQrA6YgQMQHojCUlgnCAAvKFBoXXaHfArSCZDE0gyWJgFIKmvUFKO4MUNIk2a4+hODtDUVuJ/J732AKS6ZtImdTyAQQB3bZN8l9t75IFh0JMUdVKsohsUPqRgnka0tYgggYpCHkKGTsHI5NOMojB4iTICCepvX53AIEfQta1iUCmoTiBmdEri2RgddKFhuJoqb/af/yw/d3zTNM6UkaOfis62aUgddAbnz+rXuPY+Vnzjt9/CzAAbmLjCrfBiRgAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-aac{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnhJREFUeNp0Uk1PE0EYftruVlvAUkhVEPoBcsEoLRJBY01MPHjCs3cvogcT/4qJJN5NvHhoohcOnPw4YEGIkCh+oLGBKm3Z7nZ3dme2vjOhTcjiJJvZzPvOM8/HG2q325Dr3kLp7Y1ibpIxjs4KhQBZfvV6s7K5Vb0bjeof5ZlcGysP1a51mifODybvzE8mzCbrAoTDIThMoGXZiZ4YSiurf+Z1XeuCqJ7Oj+sK3jQcNAmg8xkGQ71mYejcAB49vpmeuzJccl0+dUj6KIAvfHCPg3N+uAv4vg9BOxcCmfEzuP/genpmeqhEMgude10Jwm+DuUIyUdTlqu2byoMfX/dRermBeExHsTiWNi3+lMpzRwDki8zxCIATmzbevfmClukiP5NFhJgwkjeRTeLShdOoVJqnAgwkgCAZ6+UdLC9twjQZ8pdzioFkZBHY3q6B3l4dJEEEPOCeD4cYVH7Xsf15F+FImC775INAJBJSkVoWo0QY9YqgiR4ZZzRaGBkdwK3bFxGLRZUfB3Rm2x4x9CGtsUxH9QYkKICDFuLxKAozGZwdTqBRs2FbLlXbiPdECMCHadj/AaDXZNFqedCIvnRcS4UpRo7+hC5zUmw8Ope9wUFinvpmZ7NKt2RTmB4hKZo6n8qP4Oq1HBkKlVYAQBrUlziB0XQSif4YmQhksgNIJk9iaLhPaV9b/Um+uJSCdzyDbGZQRSkvjo+n4JNxubGUSsCj+ZCpODYjkGMAND2k7exUsfhkCd+29yguB88Wl7FW/o6tT7/gcXqAgGv7hhx1LWBireHVn79YP6ChQ3njb/eFlfWqGqT3H3ZlGIhGI2i2UO/U/wkwAAmoalcxlNA1AAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-ai{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAk5JREFUeNpsU01vElEUPTPzZqBAQaSFQiJYUmlKYhoTF41L3Tbu/Q/+AvsX3Bp/gPsuWLrqyqQ7TUxMtAvF1tYGoXwNw7wv7zwYgtKX3Lw379575p5z77O01ohW+/DVh8zj7aYKhflGdG9ZsGwLNydffgVfr19YHvsEa+Zu/nxndob5StQK+dyzvZzyw/gKlmMj7IygFM+xvNcanp4/t5dAomXHBy2UUBOO2MAl/B9/cPb6PULuoHx0WM0e3GvpUOxD3wZAJWutZqYUYmqpSg5OMgH3YQObL59W0/ullpryR3HegkKEqiWBSGV4R3vQ7sIhScTZFTpHx3A215B5sluVY/WWMg7+ATB/lcLsKpTonHzD+OMFEuTz8ikkt9Kwt9YJZB38cpBdoQAZJdLvCGByfoPB6Xdk90pYy6Xg3c/DaWwArg09DaG5lCsUFN0pckZAojdC8m4auBqaALuSgez7VB1RtDSUWOQvUaBLFUzJBMJ2DwmPgd1Jwm0WoSgJfjDvrTKxtwAIyEkAOQ5hU//Zdg5uowDlUNMnwZLW0sSuUuACYhwQRwFvJxupCjEYUUccOkoaKmdOlZnY1TkgAcXAhxhOwLsDsHoN3u4O5JTDfVCH6I9nfjId3gIgSUATFJk/hVevGtOMwS0XwQ3AzB/FrlKg8Q27I2javVoZrFgwD4qVipAEyMlnaFArzaj/D0DiMXlJAFQyK2r8fnMMRZp4lQ1MaSL5tU/1kqAkMCh2tYI+7+kh70cjPbr4bEZ51jZr8TJnB9PJXpz3V4ABAPOQVJn2Q60GAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-aiff{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAohJREFUeNpkU9tqE1EUXZmZpE3aTBLbJFPTtFURtSCthr7UCyKKFJ/9An3og6Ag/oXfoUj7og9asCBYKT6UIPHaWtpq7NU2aZK5z5wZ9xxMpMwZDuewz9prr32ZiO/7CNaDx3OLt6fOjBqGg/aKRCIInp8+KzfKH7fudnVF58nE16el+/yU2mBFSWZKpWJKVc0OgUBo02K4NDmU6o75Mx+Wdu9IUXFeiOA/pn1xHeYaugVDdzpbp91qGlAKGTx8dC19/Wpxhjnsxj/RRwk85hGJC9d1O6fneWAuoztDYSSLe9OT6SuXB2ccx73Z9uukwDwfls1g0xZIY/Ad/Gnyt/XVfbyYrSDRE8PExHB6/8B6QuaxIwRBFMt0iIAiMx+LCys8jfGJEUik2WpZOD2SQf9oDtVqQwopCAiY66FS/om3b75CVS2MlU7AJ2WiJBCZjZ2dJuRkDJZFwFAR7UCBja3fNfxY2YEoCtRCj9em3Tpds6FpJseGCBxS0GgYGBzqw62p84gnYnAI2CSbSbPhEpFAaE2zODaUAlWWwDoS5DheGqbWpVE/0CmqCY9qkEyINBceb2uADRNQ8bSWAVVzIFKomCQim+0luS4yKYlsHlRyZo7EsSEC23K5vAsXh/H92zZkuRvxeBS5nEx2yp2KqhxPoV5TYS/8CtdApylM9sZQKKSQzyeRTseRV2QoAzIYY8jme5DN9fI0dQoUIjANGydP9VM7PZw9p/AiBpNYrdbw/t0yTJqRtdU9UrfJCUMpSJIgbWzsYe51BcViHzLHeqCRqhZ1YX1tFwNfZBxS9O3NWkAcHqR606k/n/3coKAoV/Y7vQ/OYCZevlrmv3c0GsFh06u3/f4KMABvSWfDHmbK2gAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-avi{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAm1JREFUeNpsU8tu00AUPXZcN0nzTpq2KQ3pAwkIAnWHqCoeexBb+AQ+ABZ8A2s+AIkdm266QUJIFWKBkHg1KpRHi5omJGkbJ3bGHj+4M1EQrTvSyGPPueeec++1EgQBxHp+/9mbyuriRZdxjJaiKBD3W+u1+p9a856max+gDO8ebT+WT20Ezi9NZi/crqadvn2MQBAGfpCOpqNru2937vxPIpY6Onjccx3Twck9MBiSU0ncfHirXFmZX3Md9wqCUwiEVN/zaQfHt0vfbBe5uQyuPVgpl5Zn11ybL4/i/lkICOw5niQRGQShoiqI6Bo43W2ub8n3hRtLZT7gTynk6gkCX9gAOxpAnxhHZDwC1/aI1EViJolu/QhKRMHZ1UX0Gr1USIEn5FPWHy+/wTokkrQOq2vBaHZBN4hmY9Jwfr4An/teiEB45ZZDwDiMhoExT0N+sYDCuUkkplLIlXP4/XEXdo+RUhdhBSSfUwtVTUG8MIHK9QVqI7D/uY6vr2pwmCPrkz+Tk9gwARWQ9WxppbXZhNnpw+ya4A5HZi6L4lIR8WyCcL6sTZiAWjWgAmpxkn5+kqTamK6WkCwmERmLDLvjB0ML9ikWXPLFuozYOap3L8HYN6DHdbS/d5CeTVBndBz87FCBLYkNTyIjBQemnIEsSY5lYrK1+UoWcToLMjEHAyIQ2BCBSx/NVh+ZUhrqmEqBebS3WyhdLg0zt/ugAaIklsSGLHCLa6zDMGhZ2HjyGsnpFPqNHnY2fmHv3R5SMymYbROszSQ2ROAY9qHiofvlxSc5xsKKqqnY3diRE9h4X5d/pzg7lnM4ivsrwADe9Wg/CQJgFAAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-bmp{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmZJREFUeNp0U+1rUlEY/13v9YV0vq2wttI5CdpL9aEGBZUDv0df668I6n+or0UQ/RuuD0EgVDAZrsKF4AR1a6COKW5qXvXec27PuVeda3bgcF6e8/ye5/d7niMZhgExnK9fbTrm5pbBGMZDkgCyq+VyhTUaT6Eo2ZHJePPWXJXRhez3B1yxmM/QdctXUSCgtV4Py4CvY3cky4e1x5DlLCaGbbzjXDcousG5OQe5HPRSCQPK4PpsEM/XH4WvhS4noeu3JwHGGRiULhsMoKZS4I0GtEIB9mgULJGA0+9DPBpBT7sffvf1W/Lg6OgJufw8C0CRGEXWazUwiiyFQjA8bsjVKjaJzovMD/Q5gxyJhG2cvyeXe2cAuADQNGBmBvLaGuTFRaDfh31lBTWi9pumjbK0B4JQul3vOQpM8JdskOLrdCvDcDjAsjtg5TIkoiKLaokMNR2cnZbqNAMycqG7XbHKR2fMzwO/dsxSwu0BiBJsNsv2LwAJAJCI5ux2gXYbqNetcz5PoORI1cDS0n8AxGW7A+zvEYBKZ2ZlcsEtJLbedMjePBaCTQMghx45ulyWkzxMVUQ2RMQhLfFO16YAqCrixPnm6iqKrRb2W23EfF4cUNSrHg90cr7hDyB33MTnSmUKALVs4uIlROjxg+AsPhGVl3fuIl2tIOB0Ya91gkOi9mxhAal0ekork1ic/kGLBORMxy2K1qS9V1ZQbNThIj2EGh+2tsyOnSai8r1UxMNIBB+LRTTULr4Uds0K1tU/uOLxIrmbNz8XXSrnASSpubG9fbKRyVh1n/zSw29t9oC1b47MfwUYAAUsLiWr4QUJAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-c{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAcxJREFUeNqEUk1rE0EYfmZnkgoJCaGNCehuJTalhJZSUZB66a0HwXsP/Qn+FM+9+hty0LNYCr2I7UVLIW0Fc0hpQpSS7O7MrO9MspuvVV8YMnk/nn2e5x0WRRFMvP/w6WSz5jbi/9NxfP693Wp3DrJCnMW5d28P7a+IE15lufR8o1ZEStwPhkWHsWbrZ+eNEPxsuubEF6m0TBv2Q4liPofXuzveulttSqW2UwH+GjqC0horpSL2njU89+FyMwjlTlxOJMTa9ZQHzDQIjgwdom9zLzfXPc75kbnOAswBJTlC2XrqQRMLxhi442DgB4UFBhgPpm3B5pgBHNUUxQKAHs8pHf3TEuFMetM9IKr/i2mWMwC0SnuSFTG2YKyppwKYVdGO7TFhzBqGIenVeLCUtfURgErucx5ECKREKBU4d3B718PHz6cICGT/1Qs8qpQtGOdyhtGEARWDQFqQJSeDL98u4VbLaKw9IRAJPwjtoJGlVAoDQ800+fRFTTYXcjlcXN2g++s36p5Lzzlve1iEROa8BGH1EbrSAeqrjxEqicHQt8/YSDHMpaNs7wJAp9vvfb287idboAVkRAa5fBYXP9rxO4Mgf0xvPPdHgAEA8OoGd40i1j0AAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-cpp{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAfJJREFUeNqEUs9PE0EU/mZ2WgqpXX+QIDFdalVslh8NlAOQaOKFAwfvHvwT/FM8e/U/MOnBmwcj8WD0ACEGghIkbU0baaEthe3OTJ0ZWV26q37JZt68ee/b9733yGAwgMbL12/fz+azbnAPY2Nrt7Zfqz9JMrYZ+J4/e2pOFjiciRvXlgp5GzHonXk2o6S8V6k/TjBrM/xGA4MLyeOSPZ8jkx7D+uqCU3Amy1yIYizB36AlCSkwfjWDR4uu40yMl/s+XwjeWThQQ4Z6QNSnSkYykcDXasP4lmfvOZTSF9q8TDBEFPbN5bOqCglCCCxK0TvvZyIV4CIxbgpC+4gm/PUmFCIE8iJPyME/e8Lon9j4HvyHYLjKSwRCSEUgf9+15mFbx8QS6CZJMzJ9SlBCwX3fJDLG4PX7ykcwkmQmJtpEhWa7g1dvNlSwjwelebz7tAXLolh0p/Fxe9fErK2WDFGEgKjxfNjegX0lDTc/heNuF99/HGEslcKXwyoazWNDdlCr6+DoJgrBzdI0T9rYO6yg2zszMlaKM3Dv5OBzbuyZuzm1B16U4Nzz2f3cFOx0Gq12F9cztpExncsqYoaHpSIKtx0zJdVIFpHQ6py29muNk1uTN829o/6SHEnh80HFaE6NjmLnWxUJy1LyTltB3k8BBgBeEeQTiWRskAAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-css{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAk1JREFUeNpsUktvUlEQ/u5DoCLl/RAKKKUvWmIxjYntQtcu3LvwJ/hTXLt16coFC2PsojEaMKZtCqFaTdGmjbS0CG3By+vei3OOBSGXSU7uzNyZ78z3zRF6vR6YvXzzPrMUCyf68bB9zO+VfpROn5hkOdfPPX/2lH/lfiLidztX5mN2jLGG0rKLENIE8liWpdzwP7HvqJqujmvudFU4bFY8Wk1FZsOBtKppd8YCDNu77CZevd3gflfTUFcUhP0ePLibiIR9rjSBpgwAfe4dVcV6dhtep4PH5msylGYLrzeybErcT85FYiH/CyPAf74gObC2vMhzsiRhPhpC6eQUM+EA1pJzILEnjRSuJsju7MJqsUCSRei6Dp3yXqcdGlHZ/rLPazQWGCn8+6YW4pAkEW0SjzUzanWlCa/LgcR0lNfovTEi6lcIkzesnM/R8RlN0INGp3h4DHoDsE5YRvQyiKiRSMzikRAOS2WoqoZWu41K7RwzlOOAVDMMMHhIGvFlRxJFrKYW0ep0IYgC3SDh4b1lTJjNfENsrazOAMAw680mPuW+8lFno1P4XDigRhOiwQAyJK7TbsNS/PaA7giAIAhYz2yRgBIfsVA8wIetPG6FAqhdNrC5u0f+TUyHgyMTDDToEt/ftQsEvW4EPG5OZcrvw0mlimarTXkPfpXPcNlQoGtjACgpryQXsPNtH/nvRXqBJpoKHMzGNkNB0Odls7LNyAYKpUq1dt1iuvB7fRDp9kr9D1xOFwkpoksXusmXaZWFn0coV89r/b6/AgwAkUENaQaRxswAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-dat{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAfVJREFUeNqMU01PE1EUPe/Na0uptmlASg3MoiZgCA3hQ8PHAjbqwsS9C3+CP8W1W/+BSReyYUPwI4QAVkAgUEgIbVIg1FZb2pl5b3zv2cHBjsaTTOa+e989OffcGeK6LhTevFv+OJoZHPHOfrz/sl86KpWfhxnLe7lXL1/oN/MSZqonOXU/k0AA6lfNhEFIrlAsP2PMyPtr1AscLpyg5pbtIHErhqez4+awmc45nI8FEvwNaiQuBHqTcSxMjJhmX0/Osp1xr878FxWEzwMinxAzEA4xFIpnOjedHTKpYbxW4U2CP4j8uWxmUKsghMCgFI2mFe9QgHZj0Ba4yhFF+KvGJToIRLuPC/efnjD6+26wB1Lq/xgbSCBXKeWJG/OTdky8cWTdT3C9RmWSGk2XCLlWo4xTNbfN5qh7PpXM72GjZeHt0gpq9QbmH4whGb+NpU/reDQ7hcWVVXxvXOHxzCQopQEKXKEbL6o1ZIcy+LC5g62DY2zsHeC0fA4zndIrHOjvg2XbAQRSfsuy9XxC2qzi/H5B6/68W0AsGkW0KyJPBLbDO0fg3JX/CUM81i0bD6WKe6j9qOPJ3EMcF0tSNsFA6g6alqW+VtZBUL78Vtk+Oqne7U9rs5qOQCjSheJFBeFIFOfVujSUYu3rIc4uqxWv76cAAwCwbvRb3SgYxQAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-dmg{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAn9JREFUeNpsU01rE1EUPe9lkk47yWTStCmtNhFSWxos2EXVhSsRcasuxYV05V8Qf4DgD/AvCK5EV1oFI7iUBqmCNdDvppq2mWSSzEzy3vPOpFFq+uDNfR/3nnvueXeYUgrBWH1/9/NE7k5BKRnuRcfF2qdnmJq9DeF9tQ+2isuMsxXGWHh/a1mEVsPJSI5fSU3OPEj291IIlN49RXz0KqzEQjIeZS/L5Y/3wPGhDxIM/i/A7fZWgVG0t5EaG0ZUa0JGM8gvPrZmLt58QYwv91mfAqCIE0sAqgumBFITGQzpUYhuF0KfRa7waDyXXXolpVrsh/0tgSLDr5I+wUZo1UHCSkAficPzY6juFSmbRPrC/azjq+fkcO00gAqoU7B0ETKkfWbuCTjTYeq5oESAauexcTScX+ZACWFm0YQSLZKhHdr67+/wW0e0dgjYo3sCEXXybYtBDVSHLp2es3IpsILS24c42lkBg6DzRjgRzCDZ/xr0GNRJwwYiWgzt+hYMawleu0V3wbkT+kUirOc7IGJAz68R/Qak1BAlx3hqASPGBJRXpXOv58dkz3eAgQoOm4hyj57NgZm0MHvpBmK6QdUdg/DAg9cRkhicBSDaKJdeo1bdxmR2DtWDDUxl51HZ+QHTysD3XdQO95Gfv06aeGcAdBrY3Chi8lwO3768QWX7J5q1XWyVSxgajiOXLyBG2hzurRKV9lmt7ISNkkjo6HhNyjoK+2gXRsKE57ZIE2ot10Z1fz0Ue4ABVw3NMjnW14rInh8jTYywoTg3EOFpOM4mXNfH9PQUfGlrAwBOs3I8ljbtuMWhRWzIIPrkn+GcYcgIWEowbZ+0qB334/4IMADESjqbnHbH0gAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-doc{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAppJREFUeNpsU79PFEEU/mZ39vZu77g7DokcP04BBSUmiEKCSCxs7Ei00JAYO2NlTKyMrX+CJhaGwopSQ0dMtFEsbDRBgiZEQIF4IHcg+2t2Z8eZ5QDlnM1mZ9+8973vfe8NEUJArfSNhzPG0VIfeIiDRSDkw1cWVt3N8rhG6SdSO2Gvn8dfuueqZwuNZqk3Jxg7iNcIfBbgXD6ZC8u5qffzX8eoYeyDxC77uygKhcouovgVUQj1H4YB2ovNuD9+tTTU0zMVBmG/+C8AIYh8F361DL/yE5HnADKYlVdg6MDAmW7cuz5WGuw+PsWDYGAvbL8ECFUt4K7/AHd/I9c7BLaxinD2Ld5Zo7g78RLuRhlBS2cpWbGfStfhfwCEpK0nUjCbWuGsLciSOELPhkq/YgdY3l6HsLfRcLYf+pHNbH0JigEPkLAyMsiEJ7NrqQzM1i7wyhoMZqOhvQs6Z0ovXgdAJACRoulEg5HOwrOroKk0zOY2BDtVpTF0CU6kLkQJXa+BNEoG0lMSsBBKQXWNQktmoGcaYeSaQCIVWOvUYQAiWZFQtk5mSMoSzEILtBrTfEcviC5bwVwQmoh96wA0ic5dB57ngeoaTIPCdb34zDITYNLOOIeVSsW+dQC+7+NSWx6jJ4tY/rWNV7PfcGv0tBoPTM7M4eKJVgx2FTE9u4QPS6x+kHzfw/mOAjarW2hJG3hy8zIceweuY+PRtREMdzbjzcd5WBqPB6xeRGUMGRzHjWvMmxQ7tiOF1JBN6FiTd6Sy9RuFbHpX7MMMqOD088Ii+op5OUAO7jyeRGfBwrF8Cg8mXuDL4neMXzgFwhwZz+hf7a9d5yu3Z6DTPjVQIY9k7erO7Y63Lvc8ErEeyq6JaM6efjai4v4IMABI0DEPqPKkigAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-dotx{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAndJREFUeNpsU01rE1EUPTPzJk0y+WhMStW2qdVWxUVEQUF0I+4ELQiC7lz4N9z0T+hG9wrdZKUgLqulhrbSag1CKpT0g7RpYjqZmffle5NEKdMHlzfvvXvPPffcO4aUEno9f3Vt4dTp+BXOe+fB0u/NbVpv7h89NU1j1TCM8H7+xY9wJwPHZMbOjRadLAvE/2gToJTiTPx89k+OlVd/LT+0TPIPpO/SzyQk40xCMxBSZ9Z3CoAx5DOjeHT7SbE0XSpzwa8OWB9jINELolQg8AR0EgUKn1PIlIWpkUt4cPNxkTOU12trs8p95RiAXpqaztqou8q6SKQJJmZSqGwsodFsIJk1kcyLYv7IeafcLx4HUNkFF4jFTExMZ0B9DrfD4HUEusYhWs4GPEJg5wly/tBYRIOeDhpEwlS34xcyajdQr3UwOT2MlJOEBRuGNHWp9AQRVXDfQiFV/U5GBSiQ5p6ngBEa5z3fiIhC6g6IMDBwOdoHPkYnHPVyhN0tF7E4QSpr94CEOKELffq+y9Bq+DCJ7rWBoQQBVbPR2O6G4OlsLASJMtCZfQqm0NP5IVWnamdAkUxbyuIYtD7wWegb0YAzAVMkkI6NwPM9xEwHloyDGAmk7AKS9rAS0FKOdugbYeAHPu7OPEM+MY7q3hIKqTFQHmC3XcONc/fxdfMDrk/ew/edzyhvvTmBAddocVRqH3Frahau56qpZDho7+PnTgXffi/gbHYmLEvPSIQBp5JU62sYz13G609zKBXvoOMdYn2zgm7Xg2MVML/4Eu3uPgxhk2gXmNl8v/i2pcXTP8tKdTEcbWLZqDQXwu/l6pfwbEnSGsT9FWAA4mdHv2/9YJ4AAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-dwg{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAoFJREFUeNpsU0tPE2EUPfOg006hD4rQh8WgbCSwkKgbF2owujaCiQsXxpX+D6MmbtXEsHCLmIAbE6NLo8YlGIxREIshIqVl+mQ6j8/zFVCb4UtuZua795577rl3FCEE5Bl79vPd5LHYiOP7cH1AUWi85ytmvlas1bJ9E5ryBntH3BpuP/X9i7ovkluuiE8N9SDepaLpCcRCCqa/VDCaMuIjSWP25Upl6n+QDoCz6Yh7KKzh3sI2LuUimPtRRyaqodj0MDloYiITSTi+mH29Wu0AUf9CsZPJoW5czJl48LmCc5kIKo5Al67B9gUGYxrun+5NnMlFZ+GKiQADj2a7AquseLIvjMv5KMaSBu4sWVir+3i8VIVKYSby0UTdFU8Znu8AYBHQgVOJEN5uOXi4UsdawwU0FSf6TaSoyw6DRvukPkgGWpDKy4F8a3jImCrqFDFn6rhKPR4VGnhvOTAY3WLcjifcQAsqRfhUc/Gq1MKNbBh9nIAMDjEppocxs9HCMktfGTCwP/oOBkUKNk/qF3pDYC6Ktk8RfWzyaaoKrqdDaBDwya8W1m0/CPCR3kFy7CcnmWQRUJqcRJFUKtTnPCeR71LwoeYF92CYyVnCFZpCTrRtCv5to2St8SOrKxiPqEEA4fkYT+mI0rdoeUiH1XZVuQPpsIKqw2QmfifTsnOABiWySlH9uU0Hh2MqjsZV5LtpPSoGeN9rKnhBX7ehoOSLIIPfnGONXGMMWN7xUfVldYDbjM3mrh5HCDgS17DhHgDQcIU+XbBxnDTn1x1UuQcJ9iv7l5Q5e1zLGri92EDJFnoAgHtcfr6wbbVXUqq193+0z97n3UJt1+d51n7aHwEGAAHXJoAuZNlzAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-dxf{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAo5JREFUeNpsU0trE1EYPfNMmtdoH2kDNmJbaVFcaBVFpAsREQpFwY0bu3HjQnTj1mVd+ANcuC3qQixmry6E0kWFVIQ+bKy2tbFJm3emyXTujGca+4DkwsedfLnn3POd77uS67rw1vC79ek7fZEzpu3AYUqS9tKQGZPLpa3VXP0uFCmJ/8t9OLC3q/uJbcs5bkIybvdHoMsSbLKENRmvU2WcNnTjRFD7ML1WGSPJHI6sA4KRWMAWVDPxLYex3iCmfpuIh1QsFSyMxQO4GvXHHwOJ6XWSyIck8v6HQsnjAxFc7vTj2VwBg4aG78VdBHQFCk+dbVcxMdwev9gTSEC455sIBOu2KLsoJFzqasP9vjCeDBlYqzn4VXXwarGKZN7Crd5QfLDT/7KpBM84c9fFUFjFp2wdk6smflRsKKqMa7EgfJJ3Ac2OKlit2pEmBTQfngdpnupoU7BUtRGiiTe7fXiRqmK+KuDn6TpvYogmBRJcrOwIJLIWxmM+dOsyLKryQAaJpjJ1/AxrGO3SqdZt7kKZJrzJWBg5piHENuY8vV6e0UOye1TyftvC5l+gZB8SHJTwpSx4q4JeTUKaxhXoR57h7Rn+3iFolJ3xvPhab6HgJG/pJ7jsNP4sUX+jZiCgEsWd/DjH5IrSYpBUAr0yHpzSoXKOP25a6OBhndh0zcX1qIYM2RIbu6i0KiHD5B/GTMHG03kTGpEL7H80wHFOWwhqDZ+SpkBOtCDYJDhZE4gRcKNbYynAqbCMbXpwpVPFbEng0aKJGbYzK1p4wIegLlcEPmdt+DjXbzcsxFlCynRwwVAwW6hjqeg0Zt521SYCWCJvbe0Un29UDx7Hgrs3IEitHXkw3jOv2fl92D8BBgAJeyqBh90ENQAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-eps{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmlJREFUeNp0U01vElEUPfMFCEVArdoSqEA0KV246UJdUJM2Lo2JK/9FjXu3utJqTNz4D9worrsQExbFpAFT0TYp0CZ8pIAiyMfMvBnvm2Foa9uX3Lw7c98979x77hNM0wRf7ufPsq7Z2SQYw2QJAkDxQalUZa3WI8hy3gmZr15bu+z8kILBkCeRCJi6bufKMji0NhwiCQR6iitdatTvQ5LyOLLEiWcYukm3m4Zhmbq1BX13FyoxuH7xAlbvpqKRK1fT0PWbRwEmDEyiy1QVg/V1GO02tO1tKLEY2PIy3KEAlmJRDLXb0TeZL+n9g4MHlLJ5HIBuYnSzXq+DlcsQLk/D9Hoh1WrIUjlPcpsYGQzS3LWoaBhvKeXWMQCDA1D9pt8PaXERUjwOjEZQFhZQp9L2yERiqYRCkPt/z58ogTGqHQLE1BLgUmC6XGD5AlipBIFKkbhanKHGYLBDqQ4ZED0OAbfLlo8OIxwGvhVgyTHlA3xkomjH/gegBgDURMv6faDbBZpN+/tHkUApkdTA/PwZAPxntwdUyjYA/+ZMqJHjLgM9iv/6zRt2GgMaIE21aVIjnSm0DGPfmhzyde0UAE2Dj+p7urKCPvkZku9eJILOSMUnkvVhIo7GYIB3xSKYdhoA1erXGVKXpvFxZwdBonnD68PQ7YEwM4O4xwMPxc8RYE87g4FIcz+kvfmnA0YzIJIy77/m0OCqsTkkCTysKPjJG3viLei63Gm3kCO6UWqcMejjxecMPmxsoFKtYop6UNirYL9Wtc5OHqzznIXHq1na7OfMJROcK8a6O7MjW7nfzZdrd7jzT4ABACh3NGsh3GcdAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-exe{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAo1JREFUeNp0k8tPE1EUxr+ZzvRJO62lUAQaKIQ0FVJFjBBdoIkrDDHuXJi4NnHtX+HCjW408Q/QmHTRaCRRohIJifgiiBICTQu29mHfnc7MHc+MlECKdxZz595zf+c737nD6boOYzxJLC6Nhwej7e/24HkO779s7G6mMjcEwfKZ21+/d+em+RbagaFev28qEpZwzKg3ZckqCPH1nfS8hScIdyhBe6JqTG3PfyTTeLrwFhvbKdy9/xi5QglXL0yGJsKDccZY7LDIAwWHpSferWBh+RN8ni4UylVER8MY6PHj0uSpUK0hxzfTmWsUtnoEwO3rer64jEyxim6/Hy67DXaHExvJX3jw7CX8XjfORUdDlOohhU4fAVjILCPbm9V1yIqK2FgYt+ZmsZcv4lH8Nb5upXD7+hVMjIRQa8qeDg8UTYPU5cTcxSk4nS709XTD53ZhpD+IYMAPj+TBz93fZiz5oHV4AP1fGdlyHZIkIZkrI7GyhnK9CZXy+Aig6p1+HQAY003AcF8AVtGGfLWG9XTO4MLZ5cL0WAixoT4zVmPHADSiMo3hzHA/xgeDWFjbNg8H3A7kKnX0koEcPdTu/ylgRGZgOjNv38zoSXC8BZJDRKOlwGEV0VJVGM0y4joAPO1spXbx6sNHeD1uRIYGUCxVSRlDt1fC8rfvcDnsmJ+dOaLgoAs6AVLZPJJ7WdhEkUyT8GJpBflSBcVKDTvpDBw2GzQqQT1OgaZqUOhtFQUTUKnVTVWNpgy51YLVKph7sqKYkA4A1ScEfT66vm5kC3+ofh6Xz59FQ5bpkvE4QW3M5Apoyorhl9ABIKnFgNdTOh2NkJG6WSf9eRBJtmFwLDJmriUzeaOkYvvcXwEGAIVNH6cDA1DkAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-flv{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmtJREFUeNpsUl1PE0EUPbssLYUCXdpaC9gWoSTgAyFigiRGY+KjvuuTr/4A44MP/gx/gMYfwIsan0RjIjGiJIZgSIGFIoXSD0t3Z3dnd70zpITazuZmJzP3nnvumaMEQQCx3jx69SV3a3KWMxetpSgKxP3m242Do43SQy2k/YRydvds67n8a63k+FRSn7l/bdg5tdsAuM3he/5weDC8vLdqPLgIIpba2niux52mg//DqlsYSg3iztO7mczN3DJ3+ByCLgCBH4hOFEF7cDpzPCRyOpaeLGXSc2PL3HbnW3XaRQCPEgWI2MsRVAVqrwbX9bHxbhOKpiJ/bzpDOr2k68V2BtRNzMtqDEqPejY/4zSGjb54BM0mQ8k4xsDoIMauXxnqYOD7PmwScP31d0SS/eAuh1lrolFpIBQNQw2pqJdqsAlIceB1AJCIkkE/FZskXDQVRXw6IYHiE0nBEcaPXSSvJnGwWkQXAE4acAhbxPMJpOdHweoMhc9b2F8zwKizbdlyPLVH7QLg+JKBYzoorxzjz3oRzUoToaEw9KyO8XQW5AE5jrFT6AbAYVVNxCZ0Ka3So+DSTAoDiej5ywTySbls1OEDobhFlMcXxrHw+AbINEjNXgb7y6BndLhk8cRkHHbD7g4gEhiJFxsdhrDqaamBaDKKerGGSKwPI9kR9EZCaNA5ubE7A5s8IFhsrxQkgJhZoa/06xC5xRz2v+3BOjFlbqcGlquxsondT9vY+2pAJdeZR6fI355CgQCN2A4O1w7gkQ7cdLUOAKdhV6uFSv3kd/n8mT68eC8dKWLnY4FsfeZQh7nVVt0/AQYAsf5g+SvepeQAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-gif{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmVJREFUeNp0U0tPE1EU/trplAqlL0laiw40xASByEJIZFGVnSvj1j+gWxNXJq7VrbrwF7h10cSNhMRHojEuACVBKmH6SJQyJeXRxzzv9dyZPiCtN5lMe8853znf953xcc4hztDzZ1+C6fQMHAfd4/MBFG+p6h/n4OAeAoGNToi/eOm+A50LKRaLh6amoty2vVpZdotNXccMEK3LwZxa2bsDSdrAqePv/mLM5tSdMwYBYqyvw9zdhUn/L59P4OGtG8qlZCoH254/DdCdQBCxqZu+ugqnWoW9swN5ehp2NotgIo6bGQWGtaS8+vQ5V9a0u5S+1gfABEilAqdUgm98HDwUQkDT8JXoPPq+BoM5kCYmFT9jryn1+hkAt7heBx8dhbSwACmTAUwTgdlZ/CVKJaLnI1GD8TikZiPSR8Gxib8chH95mZTxgwWHwH7+gFMswqcokIRbjMO2HDCnZ1VvArpjEmnKZc8+cZJJYGsLsMiZ8AgwEqaY6Mb6RQR33JFhGECzCRyfAFXNu9v+RVNRZWIMuDJNuYMAaDycUFGhCOgtuAtFVDA83G5A8TrFDw+F5QMAxAKJJxz2xnW3RPJGbm+rCyjotZetH4DGzaSSeDA3h4Zl4R0JOEZWTpIzF4n/m995bNdqZwB6m0gFft3Ak6vz+KYWwFsGlqIxXItEcDt1ARMEtKdVgZb+fwA0G2C2hXM0ZTZNRcSf0b1pmXi7uYnjI+Lfanm5fRQsK8BIxKcrK7i/uIgP+Tw+FlREqHN5fx/vyU4uHBE6UO4gDWqk/JFaLuMxcXeFk6TuJ90V0HOk1in7J8AAjmgkPfjU+isAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-h{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAbRJREFUeNqMUk1Lw0AQnf0woK0ttVqp0hwqVCl+UBERT94F7x78Cf4Uz179DT14F8WbYHtRkBYRLNqDtdaPZLObuLs1NGlXcWDJZGbey+x7QUEQgIqT07PL5WKhHL5H46J+22q22vsWpbWwdnR4oJ80LNiz2czGUjENhvj4ctIE4Wrj8XmPUlKL9nCYcOFzE9j1OKSTCdjdrtiLdr7KhVgzEvwW6krC92E6k4Kd9bJt57JV5vFK2KfRQRV+RAMkzxglYI1RaDy2dW1rpWRjQo5VGicYIorWVooFvQVCCAjG8Omw1MgG8AM0uSBUDSnCfk/IGCHwf3DCD/7UhOLBrFkDuep/hDUSSCv1iYo4rIfqGwmUSNJjfYbBcQKhZw0aBMA4B48LwBhBt/cON80HmM9NQ6fXg/Wlku4TwmNWDzaQqzHG+0PSKod5cH5Vh2RiAhYKc8DlV1UPSyuFMGygVlMg1/P6BC6DqXQK8jNZDXAYA1f21V34wMXYFaiyVw0rJyzLgs3VMkxOjGtix/V0XWChZ0cI2i/dzvXdfTd0Qf91BMPrhyNzgKfOmxaWypqaDXHfAgwAtCL8XOfF47gAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-hpp{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAehJREFUeNqEUk1v00AUHK/XKf1yZdESVRBXjRSRFqMQVBA5Ic5I3DnwE/gpnLnyG3LgXglx4UDDLZS0RWkDLiRxSusk9u6GXSembmLgWZbX7+2bnZl92mg0goo3b3ffO/ncdvyfjHef6q2Dlvs8Q2ktzr16+SL60jhhZ69bO8X8ClLC7w9XdKJVG8fuM0r1WrJG4gXjgqU1D0MGc2kBTytl+7a9XmWcl1IB/hZKEhccq5aJJ/e3bTu7Wg1CVo7rNLlRhUh4oMnXoDoyhoHGyWmUe+QUbELIa7W8CjAFlMzdzeckCwFN06ATAn8QmDMMMGlMuwWucpoCHNe4jBkAMenjYvRPTyi53JvuwX8AplleAeBcRFrH6rXIxLim9I/pi3QA1RhKaYxdjkN8IwalCMIwWs9ljMkh0wzk+9M7w179C3LZNXxve2h+c3Hu91HeKmD/6zHOLnw83ilB1/V0CeqU3Q81LC/O41b2Btx2N2JVP2riR8eTUxmi0TzBwrKZMsqMoz8MsDh/DWuWhUBKURLKxQIeOMWoptYPnS1c+INZBkwISomOSsmBZS7B+3WOzZvrKGzkMAiGqNy7g+LmRkRfekBnANy2163PZXrSbrQ6vch19Xz8fPDHyL39QzkHBKedXjfu+y3AAGU37INBJto1AAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-html{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmBJREFUeNqEUktPE1EU/mY605a+hhZTBNKRDApNrWIRA4nEBUZdmCgLNi4MK5f+FNdu3bFv1J1EXODCR1JJSMTwpqUP6NiCpe10Zjz3hj5Mm3iSybl37jnf+c53jmDbNpi9eb+6Ftcisea909bWNzNb6dwzSXKkhIt/r14+515qBqmDA8HpqKagh53XaopblpIbe+knDpFAhPab2Dw0TKvRK7lmNODzePBgZlK9oUWSpmVNdpIU8T+jaMsyMaD4MDcZVa+NhJMN00w0n6V2nN3yQgdHWZag+LzYPTomIAtT0THVtPGanmb/BbjwLFkvn2IttYGYplKyDzsHh7gdmyAWfh5zVq0Guhg4RAHFUhmfvq3j134aXo8bd+ITnMFOOovU5jbGRoZwNxFn1cxuAIcDW/sZDjA/c4u+BNxOJyxqaenpI3z88gMfPn9Hv98HQZS6RazW6kjExvFi8TGdDSy/W0Emf4LS6R8sv11BmfzSwkPcm74Jo9Ei0GZgmkw8QCOao8OXcaz/5vSZnPdnp3ApqBBLkWJE0Ci7ASzbIhCLLQ1E0iOkBDh9NpUgiUejo8oNuJwyn0YPABtn51UYFFivG3yBGCNZkuDtc/MW+ZQI3OrYpBaARCKufk3B5XIiWyhiL5ODp8+FfFHH+KiKSqWKUL8fC/NznGlPBmz+24dZjKnD0CJDcMoyW0SqXuMtHBFw7rhIAD1ErNUNafxKBNevapwu65NpEQ4FqXIA+RMd6VwBP3cPSERb6gLIFIq61+UqGWaFdcrVt/lmAuWjAi2aiMFwmOYuIJ/N6M28vwIMAMoNDyg4rcU9AAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-ics{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAhRJREFUeNqEUkFPE0EU/mZ2dra7bLNpi2AxQFKalkJrohICiYkXPagXrx78Df4K48GDBzmQePLMhUODNxQ5ciEkJVqDtJGmMWrCATRbd2ecoS5u3aovmezsvu9973vfPiKlhI4XL7c2r5YL81LIELEghLA3u/udxmHnPmfGW/Wuv+LpwwdneRYBx7PeWK0wOYYhcXxyckGV1fdbnbuMsXcklqPRJQxFMKz4RxDCtVO4s3xlRjWoB0FYjlQPEEBieChwKCRGMx5uLtaKs1P5ei8IKlGa/YkXMXYtlTEDlsnw/mMXhBJcqxSK6vlcpa4PEpCooUyIqs5M6hG1o2CUwqA091cFcYLf/sjzcX75EiQIojI9779CTYR4jwTBf+r7GAwh0AxCiL6JMT/04vQ79u8aI2O/7Jzg69o6Go8ewycUahtBpADhHKLnK/eVbkMdtROWIv80NQ2sPhncA9Htwn+9hZG0rY6DzFwJl+7dhs0ZstUy8rduwPS/wd/ehmi3kwq4zTHiWUgXp+EuL8FvNvFl5Rn4xAS86iyI2kY3n0Mv48ByrOQmancdi8I0Kcj3U5iuA29xAelKCUHrEIayzltagG2E4IwkFaQgSC6lYI09iN0d8It5uNV5nG5sgJdKYC0G8WoTOZvBISFNEBxnsuzD3GX4vfDsszzqAu0jkJQDedCGbB6AWg54pYbPo+NGVPdTgAEAqQq70PytIL0AAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-iso{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAjlJREFUeNp0kstrU0EUxr/k5qbJzdPYpGkpsUJoA2q1oLjTdiGiIC5cuXHlxv9BEOrStTvBnQvRrSAIsejCrlqpsURq2hCJNQ+TNLm5uc/x3MmzJh34mDNnvvnNzOE4GGOwx8+t9XQkfn0VE0Y5/7Z+kHm+dvOhtd3P9c/xwNZh7nWaMYtNUmX/Fct/vlN7/8J5aRRgyzm8xzpRDjGE2aVH4VTqdnoUYg/XkEhmy+Cx3DhA5tMzdFolvg5Mx3Fx9SmH0JIg79Zo3j4GADMIokJTKtjbfAKXU4Y/2NvSfyH75TFOxa9Cmr0XnlPFl5ReOQ6wNMDsoFX6AElqQlNV1KsOuNwS/AGFjEUIDhmn5+/DMM16/9igBowAzFKIswPJr6MjlxFP3sV04gaP7RzMPe6xvWM1gNUBM2UKYlBau3QghGphg29J3gDlLLilWNdD3gkvIIDRhD9yGe2mCV0V4HFXuCxT5Dlv8Dz3sIkAs03FalDxBMQSt9BRBMhNncuO7dyU28c9tnf8C/Q0ZtR4GImeQSj8APLRH772BWcgiFODffCv/t8H9tO0v3RjV7VqkeeXLlzDfvYjj88uXhl4JwIsrYxmLY/M1gYclIvGE9jZfNPrSCD3/QgLyeWTADV6wW9AryIcCkB0u1Aq/oCPumlufoF72vIheaLDr4wCLIOqrYnULA14PSoqpSJEAUilZrD77Sv3LK+cI0+Be8cAbbmAOrob0agtD491LYfkoqvnyZLsWRkA/gkwABL4S3L78XYyAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-java{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAjxJREFUeNp8U01v00AUnNiOEyepQyhQobRBSlVIoRCBEPTAjQsSEneE+An8FM5cuXLNoQduIAE3qopKNJAIIppA2jrOR93aa6/N8yZuUxyxkrXr3ffmzczbTQRBgHC83nj3ca28dD36nx6fvnzrNNrdp4oibyUmey9fPBezEgWVFuYLdyvlPGaMY4fl1aRS+9pqP5ElAkmcnknRwuO+Nyt5u/ETYfyj9WrpZnmpxn2/Ok1Swn/GvtnH5k4TLue4kNfxoFoprRQv1TzOb8cAIu3+ZD7oD/Hm7XuxzqRUNDtdkuLiTmW5tFxceBXlnXgQTAORSMt2oGezUJJJrK9dFWdEH7Ik4dB29LiESeUEJXd7/dAT3L+1ivlCHr8NEzutXTBvbJPPSdO/AH5wysChwM/1HzCGlmAzOrKxu2eCud6Z2Jke2MwThpUXL6Nn2ZAVFTlNw70bK0iRnGAq9qwHtOmTRpsx1NsHyKRVnNPnoMoK9kc2BjbD4vk5JGV5NkBoEPM4FFnCteJFWOS4ntHEfphQyKaFTWFLw704AJ26ZFx/ZEEi3YyY0O1Dmr4EKTUHA8hUnS6siI0DEHLYog+b28RCRuNXR/iQUpPUEQ+NVht6Lodnjx+GXYgDSFRnq97Ed2pXSlXhUSeGhxYc5sKlNXM5DGLR2TMwfZVPAIi+otGNWy1fEZUKeo4qc4ysI+F8VksLIJfYcD9QYgB/DNPMptWBlsnBIS86xmDMTBo/PWd0LB6VZfdEbJT3V4ABAA5HIzlv9dtdAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-jpg{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmlJREFUeNpsU8luUlEY/s4dmMpkWxRopGJNNbiwhk1tItbGtXHr0hcwmvgOdWld6Bu4coXumtREE3ZKu8FgOlC1kIoXtC3jPfdc/8PUIpzkBM7wf+f/hsts24YczuerGUc0moBlYTAYA+i8sbdXtAzjITRtq39kr73s/Gr9DTUYPOeamwvYnHdrdR0SnDebuCbswJGqpX+Uf92Hqm7hzFAG/4TgNr1uCwEJ0trcBC8U0Kb1/PQkHt9JxSLnL6TB+Y2zAIMOJBGLXmtsbEAYBsx8HnqCGKVScAX8uHf5EpqmGXv18VO6VDEe0PXsKABN8+AAgiabmYFNNJTDQ2RUFc8+Z9G0OPR4PKYwvKari0MAgiY/OQGCAajhMNR4nDZMaInrKBGl70SPMScck1NQG3X/CAWLE3/dAWV5hRRVIJxOWNksrP19sFgMqqAebUGYHMI6teq0A9oTVAhqu2sfbYYjsL7lCZ3683gA70T3TK7/B4BNoO020GwB9TpwfAz8LgMtWn/NkV8EHgoB81c7nYwCyBZlEVkHcqMTKFnkmehJTOPvEfCnKi0fAyADJKfXC/h83TaZTJjaa5lANLpOFqAXtlEAorAwO9u5syT5UxLfU0e3o1FMu1x4u7ODYq02BKAMAVSrSNLrK1MhLPj8mNF0vFm+C1ZvwKBwXXE4AGn1WAASazESwUW3BzUSMeJ2o1Aq4sPurvQYSRLwlhRR6mSaYyi0WlpAJrFRx3ouh5/lMt5lv8BLwXp0M4lSpYL17e2uK5wP6lj/c2ZPn2RI+YT8fDvqoyegVLyfG5kBKaQQOfvF2pLc+ifAABiQH3PEc1i/AAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-js{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RUQ5ODY5Q0NGMTE4MTFFMTlDRjlDN0VBQTY3QTk0MTEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RUQ5ODY5Q0RGMTE4MTFFMTlDRjlDN0VBQTY3QTk0MTEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpFRDk4NjlDQUYxMTgxMUUxOUNGOUM3RUFBNjdBOTQxMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpFRDk4NjlDQkYxMTgxMUUxOUNGOUM3RUFBNjdBOTQxMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PoT8zQ8AAAJdSURBVHjadFNbTxNREP52t7S0bktbKFAvTUVaw60YqkExUTD6oD74qC/yD/wp/gh885XEEI0RAyYQUiMpIBGMkYR6o23abi+73e2uc04v1LROMtnZPTPffvPNHMGyLDB7sbJ2ciUSli3U35smkK9t7x9v7n2dD/g8KUkUwWqeP3vKz23NxJGzgwOx0RC6mSgIo+WKuvP56MeUzy2nJEk8PWsGJVVTuhWbpgmHw47FB7d98Wg4mVWK52o1sxOg3Va3PmFp+Q2PdUquaFUM9/vw+O6cP3bxwm46Xwh1ALR3/vL1e+hGjcc9koScUsTSq3coVDQsXJ3wzo5HEs3clgZNMTVdx1T0Ep7cn6//QRQwMhzA6uZHLD5cIFEFSKIU+G8LK+tb0KsGZKcTJoEyP08AbpcLy6sbPKdQrigdAGaDwWxsDH1uGbliCYIgcM8WFPg8Mq5Pjzdyu4jYbCE44EepXMHuwXe+A8x3KKYxYsjvbUzmlPGpBmYdgI1oYjSMbL4Ao1YXMkcM2Dd2xnbAamPQAqg1GORLZdycmYTdJqFKk2DPR3fmwI4zBDrg9RADqxPAbPBif2WTSB584/3/TGegEOit+DRcvQ4OZJi1LgwIQKVCg2i6nb1I7H3Br3QWqT9pBAP9uDY5xjdSM3RqxeoUkfVnEOW8UkLykERTNXjkM7h3Iw6NNvHw6JjuhAhVrba0+QeALozcI9nQR0VvNxJc/ZmxCNGvIBQcpDG6udA22kyW29HC72wu8yG579ZoiSYuR/ly2+y9CA4NceWLmo717T1i5ULqJNtapL8CDACskxPFZRxLwQAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-key{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAlZJREFUeNpsU11PE0EUPbM7u/2AtJUWU6qiiSYYo5EmmPDCD9AH46sx8cEnja/+CB989z+Y+MKPgMiDsYQACcbaWBBogYD92t2Zud7ZlQZsbzKZ3bl3zj3n3IwgItjYeDO3MlWme0bjUth8e8/fO2tHzx3XqUEk50uft+Ndnhdmc3SlfNPkVZT8Cy600DoIISvVfKYtlvfX1p66XmoIYsMZdjJQWvEFbbsC/S5g2QhSkKUK7rx6OzvzqLpsovAhaAxA3DUBQn2TUFsl7KwTfm4Z9DoO5LW7uPXi9Wxpfn7ZKF09vyPxX2iWcNRkKGZz0mQWKoNs8AVB6x1yRY2pYnc2LLofuXTxMgAlmlXIfngCxNxEzM+DPv6NQa2BygLgZyX6JT83ngHTN5GAL0WSoUQkSQnXkyBh/k0GegTAaldM20sTKvet+yyhIZApECamL0jUSe3oFChx3TopM4TeEQP2gc6BgGIwb4KGNXRhCkMGxgg2kJeybRiZM45D8W61qEAknSmpHStBhywu0nFVupSCTAcM4ECwqapv+NQ6LS9JGALoMIIoPYDjZiEL1xHtbyO39AQUDaA7R1AH23DSeSA4hv5RG/VAhxomPYP8sw9A4TaC9iHkjUWmrtGvbyC18BLe3GP0m3WW4I5hEBEnPIStXzyuFIxb4EkMEJ79Qa/xHbKxCdM7xeCwzUZOjgEwnuzt7qLz6T3cySmQP43uzjeIiTJM6io6W19B/NLCKMVGCzkCoLR/0lrfOI2fNy/huKC1FTsK/rbGNeMRC8dHpHByfu+vAAMAL/0jvAVZQl0AAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-less{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjZERjZENTJGMTE4MTFFMUIwOEVERjQ5MTZEMkVBREUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjZERjZENTNGMTE4MTFFMUIwOEVERjQ5MTZEMkVBREUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpGNkRGNkQ1MEYxMTgxMUUxQjA4RURGNDkxNkQyRUFERSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNkRGNkQ1MUYxMTgxMUUxQjA4RURGNDkxNkQyRUFERSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pl1w97IAAAJhSURBVHjahJNLbxJRFMf/wPAIMIxMkUI7tS0VYqlGDLGhjdKkqyZ24cJFN925de+XcONHaHRj4k7TND6SGo1VWwmp2kSLhlqMDbQ87gzPYcY7k4GgoJ6bmdw598zvnvM/95pUVYVma+svcovx8yMnFZHAMJPJBJfDzq5vpX6+/vD5qo/z7DOMBdo/d26t6jFMJ3iY51jBz4M+LP6wxEw40Gy23qYzB3HO7fpmpZCOmfEfa7Xb4NxOrC4lvbPToe2yKE3K1PdPwNOtHdx79ESfq4qKkijB5/XgevIyHxEC24USmewDqD2ABxubaLRkfW6zMqjWGlh7/ByyAtxYnOPnL0Q2+gGGmKRaw8zUBJaTiS5QOO1FJnuIAM8hciaIWHgi8NcSNt+loVDY8JBXh2ojJAR1HbTSNFMUpV8Dxcjg0nSYBrtBxdLbqI1iheCUh9XXNGurAwCdEkb9QyBSFam9TDfoPZ1LUg1BH28IiwEARTVAQOzcFKRaHZpLoa9avY6L1Gfs0c32t4PU6W2lWsV8LAorw0Cs1nXftYWE3qZGqwWHzYp2zzlgetuolVFvtiDLbRRKFTAWCxx2G/KlMtXFhWPqOzsWHJwBx7rxKv2R7mwFz3lw9/5DLC/M4Us2RwV0g3U58XJnF7dvrsBOoX0Abbej/DFKRMKI30fTVGC32WA2m5H9cQQvhYi0vE/7Wdgczn6ARA9QPBrBszcp/XvpyqxebzQ0Tlsq6llxLhe9bD4cFMr9XdjLHpLv+SLGBYHAYiVu1kNOpAaRTWbCejgiw0zGhFGSK1aw+zXbvfK/BBgAPwADAs5GpGsAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-logo{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAEACAYAAAAjlcdmAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAABCZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIgogICAgICAgICAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgICAgICAgICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyI+CiAgICAgICAgIDx0aWZmOlJlc29sdXRpb25Vbml0PjI8L3RpZmY6UmVzb2x1dGlvblVuaXQ+CiAgICAgICAgIDx0aWZmOkNvbXByZXNzaW9uPjU8L3RpZmY6Q29tcHJlc3Npb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjcyPC90aWZmOlhSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj43MjwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjY0MDwvZXhpZjpQaXhlbFhEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOkNvbG9yU3BhY2U+MTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MjU2PC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgICAgPGRjOnN1YmplY3Q+CiAgICAgICAgICAgIDxyZGY6QmFnLz4KICAgICAgICAgPC9kYzpzdWJqZWN0PgogICAgICAgICA8eG1wOk1vZGlmeURhdGU+MjAxNTowMjoxNiAwMDowMjo4ODwveG1wOk1vZGlmeURhdGU+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+UGl4ZWxtYXRvciAzLjMuMTwveG1wOkNyZWF0b3JUb29sPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KqqO/2AAAQABJREFUeAHtnQecXFXZ/+/W2dmd7Uk2mx469sJfQJHXKKCiiA2UEl+KRiyI8NrA8oIVeVVQEAERUQRRwAIIhmIihBAg1JhGetmS7X1nZ2d2/7/f3b2whE323LlT7sz8Dp+Hu5m559xzv/fO3N+c85znybNUcpLAWauePqpr544HRqLRorzR0ZP+fsYnHspJEDppERABERABEchBAnk5eM45fcpL1q2r3/3E6uuLSoIfiEaG8gmjoDgwOtCy57G6N7z2tFsXLdqd04B08iIgAiIgAiKQAwQkAHPgIvMUl6xeXdqyZdvFI9GRr+QV5JdEw2FrdGTEPvu8/HyrsKTEGhmORsNdHTcuPPrI/7nhiCMGcgSNTlMEREAEREAEco6ABGAOXPJP3P2Pk/vaO64vKiuto/DDtO+kZ51fWGgLwXBXV/fo4MCFSy84/7eT7qgXRUAEREAEREAEMpqABGBGX779d/6c5zcc2vTUqlsDlRVvgfDLGxke3n+F8Xfzi4qswkDA6mtu3lw6ve7Uu0/7+LNGFbWTCIiACIiACIhARhCQAMyIy+Suk+euXVvT8NiqnxaVlS3Oy8sriA0NWaOjo64aQT2rACIQ08Qjvbt33z9v0bH//fsjj2x31Yh2FgEREAEREAER8CUBCUBfXpb4OgU/v6LmDVu+NBIbvrSgpCQUGxy0oN/ia2y8Vj78AwuCQWu4r28o3Nl15UHvOuY78A80G0r0dGRVFgEREAEREAERSBYBCcBkkU1xu6c9tPz4ru1bfxOoqJwbxYif6XSvaTedaeGB1pZ2a9T64gNf/NztpnW1nwiIgAiIgAiIgL8ISAD663q47s2StWvn7Vz5xB8ClZXHjEQieTH6+bmc7jU+KKeF4R9IMdjb2PCf0LSaj9+9ePFG4/raUQREQAREQAREwBcEJAB9cRncd+KMVasq2tdu+GFRcfGSvMLCItvPz+N0r2kvGDbG9g+MDsf6W1r/XP+Oo8679aijekzraz8REAEREAEREIH0EpAATC//uI7+kdvvOCMSDl9dWFpabfv5xWJxteO1Un5Bge0fGOnp6Y90tH/z4a995ede21R9ERABERABERCB5BOQAEw+44Qd4VMrn3rznv+8cGtJZeXhsUgk4X5+8XaUU8IFxcUMG7O7qDiw+J+f+8zyeNtSPREQAREQAREQgeQTkABMPmPPR/j0mjV1u1c99euSUOgDsZGRfPj6uQ7r4rkTUzTAsDH5EIFYNTza07D78eqF8z/xl499TGnlpuCmt0VABERABEQgHQQkANNB3fCYZ23bVtL80CNfLygq+EZhSeAV6dsMm0j5bk5aueH+wWhvY+OvDzzzExfdvHBhOOUd0QFFQAREQAREQAT2SUACcJ9o0vvGR+74y8nhru7ri8vL62IRhHXZR/q2VPTSHt1Dmjh7hbHhAZlWrqA4YA12dHRHerv/Z/nXv/obw6raTQREQAREQAREIMkEJACTDNht82c9u+7gpiceu72kpubNI0NDeTEKP8OwLhRcpbU1tlCD8GIWD7eHf9X+hQgCHZpZbwXKy63Bzk6rf0+zRf9Do8KwMRCCnBru3d2wpShUfurSz57zjFFd7SQCIiACIiACIpA0AhKASUPrruHPvfBC9eZHHvt5oLLq9PyC/AKKLFMBl19QaAWn1VpldTPt8Cw8cqSv1xpoabGGenrcLxaBcCuC8AvWTkO70yyO5jmFo5H9zc3WYFu7NRKDODUodtgYiMCRaGyke8f2B+a86fWL/3jSSW0GVbWLCIiACIiACIhAEghIACYBqpsm37VsWWFw244v51l5lyJ3b1ksHIawMgzrAqFWUlVthWbNsopKSyc9bBTtDXV3WQjVYkUHwxgdxOgdRxRRd2LJY0gXrOZFH6yS6hqrOBSy+Nq+yvDAgNXX2GiFuzqNRyjtsDElJexLpG9P8y8K3nH0xcsXLTJTkfvqiF4XAREQAREQARFwTeCVKsB1dVXwQuCUfyw9vmfXrt+UVFfNdRvWhYIvVD8LYq36VWJuX31iejja6CRTyhzlo+1P9L2qXbQTxrRwX1OjRUFoWpywMf179rSPRqNffPiiC5RWzhSe9hMBERABERCBBBCQAEwARLdNnPfcxtnbVi6/vaS29h0QZK7St1E8lc2YYZXOqHvF1KzbPiRyfy5QGWjZY/Vjytk4BzH9A3EuFJ09O3euDZaWf/S+Ly55MZH9UlsiIAIiIAIiIAKTE5AAnJxLUl49Z8WG8oYXll9RWBY6t6CouIj+dKZ+fvSjK4U/XmldnVVYEkxK/7w2Gg0PWgN79lgDbW2uzouLV2JD4ZHeXTv/PveI48669USllfN6LVRfBERABERABPZHQAJwf3QS917eib+7ZcnIcOzHxaGySqzuNffzQx8CFRX2dG8xtplQ6G/IaWEuQDEt9A/MDwTgU9gzONje8qNHv3nx91EXzooqIiACIiACIiACiSYgAZhoonu1d9pDy4/u3LLpFqzuPZBx9IynSNFOIRZM2H5+NTUWRwAzqXBkM4xQNBSCXIhiWmz/QEwNI9zMntFo7NMP/8+X7zWtq/1EQAREQAREQATMCEgAmnFyvddZT66d2bBq2c3B6TNOgBjKs2PnTbL4YrKG6RdXBh+/Uvj6URBlcqHgZTiafvgIGgezpn8gwsZA9I52b9n8dKBy+qkPnP+ZbZnMQX0XAREQAREQAT8RkABM8NVYsnp16c7VT19aECy9AH5+xW7i+THjBkOwhOrrrcJ9hHVJcHdT1lyUYWOamrBqGAGqDYWwEz8wOhSO9e3aeethJ77/czcccYT5cuOUnZ0OJAIiIAIiIAKZRUACMIHX66SbbzktGo1ejRh6tXZYFxfp24pD5Yjnh4wblVUJ7JH/mmJMwr7GJjtQtWnvOCLKEcFwR2f/QEvztx699DtXmdbVfiIgAiIgAiIgAq8mIAH4aiauX1n8+OOHNz25+k9Yofv6keFoHH5+9VZJTW3G+fm5BjVeYcw/sN0eEXTrH5hfhLAx27bvyCuwzlj2ta89Fm8fVE8EREAEREAEcpmABKCHq79k48Zp25Y+dC3y9n4MmTXy6e9mGtaFo1qM5VeGsC78OxcLfQIRDNqOIWjqH8hpYfpFYhqZ/oGPVB9y0Ol3n3ZaYy7y0zmLgAiIgAiIQLwEJADjIHf+ffcFXtzV8LXCQMnFsCB81IyFH1OwBZG9g6t7s83PLw6UdpUx/8BGaxBZRew0dQYNUQiCvRUZ6B9G/MBfv/ltR1x09YknDhlU1S4iIAIiIAIikPMEJABd3gIn3/ank4Z6em8IVFfNjA1FsLJ12LiF4rKQVVY/087fu3cuXuNGsnVHppVDXuH+pmYr0t9nfJb5hUVWQaCYK427w+1tX4F/4I3GlbWjCIiACIiACOQoAQlAwwv/6ec3LNz56LI7g9Onv3kkgvRtFH6Gq1m5gKFs5kxk8pjuLteuYd+yabfRWAyZRFqt/uZmyw6dY3JyDBsDIWj7B+7YsTUvr+CUf33twmdMqmofERABERABEchFAhKAU1z1Jau3VG57fOnPiysrzoTIKHAT1oXZLYIQfRR/FIEq5gTImSJwEGJwBKLQpDhhY2LDkZHubdsfqK4/cPE9nz29zaSu9hEBERABERCBXCIgAbiPq33ppaP5T9Tf+CUrP/97xeUVoZjL9G0lVVW2n19RKLSPI+hlEwLDfX12NpFwV5fJ7vY+FN4FSCs31NU51NfYeNVx+f97yaWX5o0YN6AdRUAEREAERCDLCUgATnKBT7rttmPCHd1/wJTtfIwmuQrrUlRWZoUw4seAzvLzmwRuPC/RPxABpPswIjjc32/cwlhauWKrt2F3W39r83lPXH75XcaVtaMIiIAIiIAIZDEBCcAJF3fJunX1m5Y+dFvZ9On/BTB5zN3rys+vDn5+0+XnNwFpQv+0/QNb4R+4x6V/4FjYGKtr29Y1RYGiU5Z9/esbE9oxNSYCIiACIiACGUZAAhAXjOnbtqxcdUWgvGIJQosUxSJDxmFd6HcWRBBnpm8rKCnJsMufmd2NhcN2EOnBjnZX16mgOGBFBwdGunZs/+u0+XPPvvvcc3szk4B6LQIiIAIiIALeCBR4q575tY//+TWLe/e0PlhaO+1YjPbZizxMR/0CFRVW5fwF9iKPXA3mnI47gKxLEEsRKfcwPR+x6J85ZcE0MoNNY1o4L1RX/5pwd+8Fta95TbTh8ZXKJjIlPO0gAiIgAiKQbQRydgTwlAcffH3H2o13lM2YfihXmTKLh2kpxEgfV/YGa6flTPo2Uzap3o+ZVwbb2+wVw67TymGxSPeOnU2Rwd7Fj3/3uw+nuu86ngiIgAiIgAiki0DOCcDFzz8/o/Hh5TeVTp/xfis/jvRt02eMpW+DX5mKfwhQwNtp5Vpb7JE+k569lFZuZHS0c9OLq/OCxZ9ccfHFW03qah8REAEREAERyGQCOSMA4edXtO2xVZcVlZdfhBG8QCzCvL2G8eUQaBj5frG6t17p23x+t9tp5ZqbrHBHB2byR416m5ePsDHFRdbwwECsa8uWP7z+Yx/+zA1HHGE+JGx0FO0kAiIgAiIgAv4hkBMC8H3X/OojsdHR6xCUeQZHilylb4OfWWjWbCtQWemfq6aeTElgqLvb6mtssCKII2hamFaOoWNQr7d/186Ln7jqZ780rav9REAEREAERCCTCGS1ADzz6acPavj3o3eUz6x/0wh8xWw/P8NRIdvPb0adhdRv8vPLpDt6Ql9t/0CGjWnZYxn7B2K0lyIwH6u7O7du2R6NRs54/NJLV05oVn+KgAiIgAiIQMYTyEoBeO7atTXb7n/gV2XTZ3w8r6gw3136tkKrdAbStyGmH4WASuYTGPMPbLYGWphWLmp0Qk5auZHh6GjHpo2PlNRUnfGviy5qMKqsnURABERABETA5wSyLAzMaN67r6r9eri17e5gbe2bsLrXOJhzHkZ+gvDzq1ywAPl7sboXK0RVsoMAr2WgohJWYTGYNOMITlnGw8bk5eflIcbjAux/fs1hh09vWLnin5Z12ZTVtYMIiIAIiIAI+JlA1owAvu9XN7w3OjT0m9K6utmM92ZP9xqSZzy5MizwKKmuQo2sQWJ49rm2G9PKdSFsTJM7/0BOCyP+YO+unV3IL3zhU1f97OZcI6fzFQEREAERyB4CGa92zl6zZu72pQ/+OVQ/60hcljxO95oGci4oLrbj+SHnr0b8sueeNjoTO61cG/wDkV/YvmdMamGUmPcM76/OzZtehFfpJ1ZeeulzJlW1jwiIgAiIgAj4iUDGCsBTVq4Mtjy68qpQXd05SPFV6CZ9Wz6mBDnNSz+/gkDAT9dDfUkxAWYRYW7hwbY2+AcahgXCAhGmlYuFB0da16+/LzIcXvzcVVd1pbjrOpwIiIAIiIAIxE0gIx3d3vXTqz4ba29fCgH3dozG2Is8TEf9SqqqrIoFCy0Egran9OImp4pZQYDTuoHKKqu4HP6B0WGz1cLj/oGom1c+e84hxSUlX64+9LBA06rHl2UFFJ2ECIiACIhA1hPIqBHAD/7ud0eHu7pvDU6rW8ggzm78/AqDQQvTxPZCDwtTeSoi8CoCEHaDCCDd19RoRQcHX/X2vl7ganEGk+7dvaNtoLlpyZNXXvnXfe2r10VABERABETADwQyQgl9es2auq1LH7qtrK5uEQK05Y0wi8foiBE/288PU72c8uVoj4oITEWAi4g4JcypYVP/wLy8fCsf2UQsTCN3bt68ZnRk+JTHvv/9jVMdS++LgAiIgAiIQDoI+HoK+JS1a4tnzFlwOUb9bi+pqT0IU3R5fDjDC39KVozjVgrRV4npXk778t8qImBCgPcKV4YHcN8gX+DYtDBGB/dfRu0QM/xFVVo3s64oWPq56gMOPrz+/e+9v2n5cqWV2z88vSsCIiACIpBiAr4VgO/5yZVnDO1qeDg0a9Z7MGVbwJEY09yuAfhzVSyYPxbMWaN+Kb6lsudwHDEuqaq2ikJlFkedudBoqsJ7lD9SMPKcXzFv3usKorELaw8+ONr45BOPTVVX74uACIiACIhAqgj4bgr45D//7TW9u7beFZo567ARPkyRu9d0gQfTt4UYz6+2ViN+qbqDcuQ4TCsXbm+3+hA/0HVaOficdm3b0tTX3HrmM9dc9a8cQabTFAEREAER8DEB3wjAL6xfX7vmrr/8unz23JPzMXpC4ceHrkkpgBN+KXL2liJ3r9K3mRDTPvES4H05gNzCA8gxHOOPE4PCKWXelxjFHm1du2ZVdHTktGd/+tMdBlW1iwiIgAiIgAgkhUDaBeApf/5zQeumbT8orZv+5cLSsgAfsG7isZVUV9ure7nKV0UEUkWAq4S5Wjjc2Wn8Q4XxJykEw50d0faNG2+2wgOff/qGG8xUZKpOTMcRAREQARHICQJp9QF8z49//PGBgcFl5XPmnmDlFyCYs7mfX3Go3KqcvwDir16jfjlxq/rrJCnkSqprrKKyMis2FDFaLez4BxaWluZXzp//FtzzF9YcsHCw6emnV/nr7NQbERABERCBbCeQlhHAT/zjH4c0Pf+fOyvnzXs9AdtTaVOushy7FMzcEZrJsC5I36aVvdl+f2bE+dFVYRBp5fqYVg6ZRYwK/ALpusDSvmHjrkhX26dWX3PNcvsF/U8EREAEREAEkkwgpQLwrGefrdp239Jfl82q/yhSabny8xtL3zbdFn/wEUwyFjUvAu4JjGAEmyKQYtCNGwNHE6ORodGOtWtXRoeHTn/65z/f6f7oqiECIiACIiAC5gRSNgV8zPd/+I1IR9fdZfX1b7RGRvPcrO6lnx+ne7nQIw9+VCoi4EcCvDcDlZUWwxCNxKJmq4Ux8j2K4NEFBQV55XPnzisOlp1fPn9BffPqp+7z4zmqTyIgAiIgAtlBIOkjgMf9389OjlmjvwrNml3PqTJb+Bmyo38VffwYi03p2wyhaTd/EICwC3d1YqFIkzXc32/cJ44G0rWhe9vWnv7dDd94+rpf/sq4snYUAREQAREQAUMCSROAn/z3v+c2Pb7qbxVz4OyOo3B6zDSQM/38ypC+jZk8NOJneCW1my8JcHRvwEkrZ+gfmAf/QNvNAclH2jeu2963p/mTL9xwwxO+PEF1SgREQAREICMJJFwALlm9unT9/UuvR0Dm0zCCN5bBwzCeHwkWIZxL9cEHWwWBkowEqk6LwGQEuMK9H6OBA60txj+EOBLIXNaRvr7RtvVrl0faWj/5wi23tEzWvl4TAREQgWwjgEEjrpQLwSgICmH0AeOWr/Nv5oZlKC1uY+NbrsTrww9phdgCiP2VhArAd/7gRxeWVFR+L1hbW8Z0WGN5e/d3+Fe/F6ypsaoOPOjVb+gVEcgCAgO7d1ndEIJuClPS0QZaWiJtGzdc+9yvfnmhm/raVwREQAT8SAACj+JuOqweNhd2IGwWbNq4wf/LqoCVwij48seNf1O/MFvERKMQDMO6YR2wVlgbrB22FcYFdo2wVgjELmxzuiREAB500klvmX30MX+pXLBgPlc/uvHz25u+BODeRPTvbCIwiAwiXdu3xXVK9A/kavj2jRs6Nt/z97P2PPPMPXE1pEoiIAIikGICEHsUb/Nhh8DeMm6vxZYCsBwWgCW7UCD2wCgOd8H+A3sGtha2FaKQQjFnCodSPZfaw17zVMW8+fmMgWbq5+f5oGpABDKQgJfPB39YjWJkvebgQ2sWvPu4v0MA8ot0cwZiyJgu43oxxdC3YHNgHGnwa2HfIuPGKTA+6HphdBngCAhHO/jQ2wNrx4OO02UqIpBUAvj8UNi9AfZu2HtgFHwc3UtXoeapGTdONS4a78ggts3o73psGZh/JewFfE44gpi1JSECsOaQQ/Pp42RZ8Fr3XBIyKOm5F2pABJJCwDDg+b6OTQHJz1rNoYfxg1K2r/38/DrOgX3nQ6EC5kZUcQSBX9TP44s5Vf499DU6FcaHRSYXCsIBGKfGGnENOB22CfYMbANsB5hy6iwjCvo/Dx3laJKb+ycjzs1DJ/n52IPr+KKHNjxXxbXh9OzbYPzcnADjZ6cY5ufCH3oLx+1EbPkDaTfO5TFsH4Q9Aq78zGRVSYgAZHiXvIJEiD98mqOp+l7Pquuok8kAApG+XjtItPeuInbg2MKqxHzovHfIbQsUVQxvcwTMzTlQOPJL+FhYKhfDGKZ3Qa/8W/hdT8FNo6/VkTCndOKPnXjYcaX5Q7An8LDb6bzp0+3Z6Nc3YW7uH5+eSsK6xc/HzbAlCWvRRUO4f+qw+4dhn4AdDcvklZwUsfPH7XRs23B+j2L7V9iD+Hw0Y5vxJSECMJEUIr29iIG2zULAaKuwJJPvn0RSUVuZTICuEf3NWAGMcDDjwi2TTydRfed3D4Wg25IKPyG3fcr0/eloT3sjjOKhZVwM/g1//xMPu0Zs/Vb4gI7n/vHbeSS6PykfxR0XfotxIrx3Dk70CfmkPU5bf2Tc+GPpbvz9B9iT+Hxk7I8Q3wlAgMWDstUKd3dZZTNmWKUz6uwVkACtIgIZRcCOAYhFH/17kCPYdpHIqO4nu7Pxfmlqyi/ZV8ayZuAQJ43bLnwnc7HRrXjQrUz+oY2PEO/9Y3yADN2Rfp8pKbgvuIL307DPw7JV+E3Gch5e/CLsXNiD4MDZjIfw+aCbRUYV+gz4stDhvbehwWrfsN4abNfIiS8vkjo1OQFmAenssDpe3Gj17Nop8Tc5Jb2aGQQ4XcwH/MN40N0J+6/M6HbO9rIvFWeO+4BuGP+AXQnLJfE3ES/9Bj8Eu5cGJidMfDMT/vatAHTgRQcHra6tW63OTS9akW76L6uIgH8JMO1b5+ZNsM0M4OzfjqpnIuCOAP1xPgZ7YFwIvtVdde2dIgL9yTwOrn0l7Aoc458wikCVsfiE7wWIf4DNn2CvyxQovpsC3he4oZ4ei/6BCDIN/8BZ8g/cFyi9nhYCdqYP+PkNws+PsTBVRCBLCRTjvCgEj8OD7ufYXo2pL4aZUfEHgaQJQFzvg3CK18He449T9V0vqKe48nkd7D++690kHfL9CODEPuMGtB3pOzAtTKd6+lipiEA6CfAe7N+zx3ZV4FbiL51XQ8dOIYFKHOs7sKX4Xn5nCo+rQ+2fwOD+347vXVzjd6MmR/0k/vaPcABvc2o8I4pvBCB+RRoDi8E/sGfXLtvHKtzZiXryBzaGpx0TRmAILgm2n9/OHRZX+poW3utu7nfTdrWfCKSBADM63A2B8FmY+Zd4GjqaI4dMuADEdT0R7O6AHZgjDL2c5mpUfsFLA6ms65spYD4QC5DmagTxzWgmhT5WkS2brZKqKiuEaeGisoyMi2tyqtrHRwSiAwNWH/L5cqEHvhyNe+YIP9ZxU8/4ANpRBNJDoAqH5UrIw3Fffw33ObMCqKSeAL+MEjoFjOvJEb+bYcyeka7C+4kjazSutOXUH43nWwSjjuGWVgpLZ/y4v2bS/e8bAUjRx4ciRWB+fr4Vw9Sa0UMSdTgKGIGPYHDadKusrs4qCChUGD4EKgkmwJXpDOkygNAuI0jJZloc4cf9TX/cmLat/UTAJwQ4+ncBrADf2xfhnldE/9RfGIqihAlAXMcj0d4fYNNTcCo9OMZO2BbYtvG/d2PL1IVMY8jzcgQgR4icUSLOYk4UgBwFYn9njm9nYMuRywWw2bA6GP1Yk1E4HXl/MhpOVpu+EYA8QQq+KB6sFIAUgvy3IwynAkDfKz6cOSpTVjfTKp0+HdlJCqaqpvdFYEoCDN4c7mi3R/2i4fCU+0/cwRF/vJdpKiKQ5QQYHy2Ce/3ruPfNfyVlOZQUnR4F4GAijoXrV4t2roVRSCWjUMytgT0Oe3T8b6axoxBMeMH5cFSQfqv1sMNgb4FxJfuhsFmwRLgvrEA7m2AZU3wlAB1qFH20iUKQI4ImhasxGXuNQjA0a5YVqOTshIoIxEeAoYf6mhqtIaxAd1MmCj+N+rkhl3X77sAZcfQiEQ+YqeDwFy+/02kcCQnB0jEdchGOy/P+BUwltQQ8j7xCLPE++hGMIinRhbmn74b9HbYB35PuflHH2Zvx4/BYHFF8Dnb7+HlytPBw2FGwd8LeBKNIjKf8BcdxRibjqZ/yOr4UgA4FRwhyNLCwsNAWhaYPU/oHdm7aNBY2ZibSygUZs1FFBMwIcKSvH8JvsL3d1cidhJ8Z3xzZiw+Dz8Eeg6VCAPIYnBLjA5y+UMz7Ow22YNw42sGH3QEwisNklsvwgH0Gn4cVyTxInG1zlIbTdWSVTaUHJ0PzWk5BA5/22she9Zfh3xxRvB/3BH8Qpb2gHxxVah63ZbhfL8ffHA1kHuPjYf8FOwRm8tltwn4PwzKqpFwA8gFZXF5u8QFrmh6Lo3+s59Y/EBfUDhsT7uqyU8oxtVx+Ef1EVURgcgL07Rto2WP1t7RY9PkzLbw/aSymP1KctvPg8lBaU2PHtuTiEtPRbqe+tr4mMID7IhEP5YScJL4Ty9HQbNjbYcxc8A7YHFiiC6dersHxjsf5tya6cY/tfQ31l3psw2/V+eVDHxNPI2q4Xrxul8BMRA92m7Ksxx7fhd2F+8D8C3XKZhO/A/pHfg2wO2njLI7E3yfD+Fk5ELavsgz1d+3rTb++nlIBWBgoscrnzLZKqmusKMJm2CMsHVhJieneqQouRvz+gXio9zU2jE0LYzSwBA9bPnRVROAlAri/uJiI073DWOXrpuCDb4s/3qM0NyWAH0OhWbOt4goO1sA7OVRu9ezeZUWQUcRtW26Oq31TRsBXXzS4V+nLsGHcbsI9xumuD8DOhB0LS9SDH01Zb4R9GfZN/sNHZRgcEuIr56NzSlRXzkFDr09AY/wi/DXsW2Dttx8ARqeHfndhR/5QYKzLWmw5KngGbBGMLhZOoYC5y/lHJm1T8uXEVbnls2dbtYcdBvEFjnhgFpaUWJULD7BqDj7ECow//EzAcXSFC0VYnBFBk3rcx04rt208rVyvb36Um3Zf+yWJgO0uwPRtWza7En/4grD9VNkt3pduBFtRSdCqXrjQqjn0sJfEH9sphCDka5Xz5ln5cHtQEYFkEsA93AS7Ecfgw+3DsOWwRBbGB3xtIhtMQFuJFLkJ6I4/mhj/MXB+AnrDX9Bfgp2Heysjxd/eDHAe7bDb8fqHYPyh9AsYp49ZdsIesf/KsP8l/QlTBN+7mkMOtfKLiydFw5GPajz0wkih1YfsHqarLJ1pYS4UcesfqLRyk16KnHsxNhTGPddsp28zGYV2AOGLIO7p3kL8GCpDOsMgVqrn7Uvg4Z4Ozqiz3Rci4z92nGNrKwLJIIB7mtNzDOj8T2w5CsRRu0RMDXPk5Kto9xwcY+qpHuyskjYCnOpc4PHoFH+fx7X+ncd2fFkd58WRzWdouKeZCvECWB9eb8M240rSBWABRvr2Jf4cWoBnBRG2JVBViVAuLYizBv8rgwcfLoDtL8X6zmgghSFfn6pwnwGIzjBWeYbwMObxNeIyFbXseJ/31mBbK9IJNlvMKuOm8F6j8f4xuc+ctnlvMTRRGYRdAX4MTXWHjo5iRNGprK0IpIgA7u0IDnUd7u1/Y3st7F0wr+XjaOBq2NNeG1L95BDA9eYIzSc9tk6Bz/A/WSn+9maD89yK1y4Au6TrqL2Pnah/+6rj+UXF8BGcAx/B6rHQG1i8YfKQ5T57xw80daSnoz99rgYR5y1UD/9A+CdyilolOwkwPFBfozc/PzeLPCgWA3tlqpGwy857K5vOCvftenyvfgTn9EvY6R7Pjf5SZ8MkAD2CTGL1t6JtLnjwUm5GZd4vOVXwWRnzScvAs/aVAHT4MaVb9UEHW0NdnVYvH9ZwiDcpfDDT4gkbQ8f/zi1bkFau3SpDWrniULKjJJickfZJFAHeQ1zgwRXh+FVh3CwFHI0/MtwIPx6A93E5Y1FWVRsfTzuKgF8I4L7vwn3/WfSHo0McxfNSPoS2vo82Hb8pL22pbuIJMN9viYdmORr2TVxf8y9XDwdT1cQQ8KUAdE6ND87i8gpM1WK6bs8eK4aVwybFi38gBQJ9BIPTptlTw5zCVslcArEIVps377HvoVHDYOI8W4o+Gotb4cdFT0xJWIrUhMpGYyPU/zKUAD4DfRBun0f3D4C9xcNpzEXdd8Nu89CGqiaBAK4vdcAxHpv+Ce4ViXuPEFNd3dcCkDD4AGVqN04L80FO3y2mfZuq4KZ+hX8gH+Z8kPP1qQoXBAwgDtwQwoLw2PIPnIqY/97nNeS9wkUepj8cnLPgwiIW3ism98tL9XCv2vmoZ9LPL+C8rK0IZDQBfHe24nPAcC73wbxMjXCUSQLQf3cDF/swQHi8ZSMq3h5vZdVLHwHfC0AHDR+oFQiNEaytwVRekx2zzXlvf1s+wOP1D+QCgZf8AzGVZ/sH7u9ges8XBOg60NfUbEX6el31hz8SaG6FHw/CHyj0IS0q8/J8dNVd7SwCKSOAz8Wj+Fz8HgfkaGC85Ui0UYu22uNtQPWSQuANaLXOQ8t34pp2eqivqmkikDEC0OHDByz9A8MIIO0maC9H/2hx+wdu3mwLQPp0FZaWOt3R1kcEovDjtP38MHJLEWdaKPporON2urcI90IIPqMMLq4iAllOgLHPPgFjaJd4yjxUOgT2eDyVVSdpBF7voWX6Zd3job6qppFAxglAhxUfuIFKhI3BVC1TdyU7rRyPyxWkEfoHTp82Fs4Dvl4q6SfAldycsu/HfWASPsjpsSP8+G+KPzeikaFcShHShekF5efnENU2mwng87IRnxFmRoh3VTAXkzA7iASgv24U+nfGW7agIjPLqGQggYwVgGTNBy+n3YIQgxz5GWxvT35auVjUjh8X7oB/IHy95Oifvruefn72SDADiA+6y+zkiD+3wo8pBIMI5MxRPy72UBGBHCPwZ5wv48WNOcq6P/nXua+iGskigO8/Xsf5Htp/Ad+l3R7qq2oaCWS0AHS48UFcuWAhhGCtLQS5itekONPCdPrn1DDFgGn8QK4u7dm50xYgIeQXDsAHTCV1BDgSS9Fveq2dnk0Ufm6ne5mykMLPydvrtKmtCOQQAcby42rPWXGe88H4nsXHUOFC4uSX6GoVaHC2h0Y3eairqmkmkBUC0GHIB3MN0soNjgf7NR0VcoRgPP6Bdh5Z5JAtQciakPwDnUuRtC2vaT9G/OzR3hT5+RUinSGvbVBBwpN2XdVwxhBoQk/XwuIVgDNRl07UZsFdsaNKUgmUo3UvK9cY/08lQwlklQC0rwGc+TkSGKhgWrlm2zfM1C/MiR9IIchRQf6bo4JTFe5D0TnU22P7BpbCLyy/qGiqanrfBQFeQ/p6Mh6k6fV0mo87rAvTt+FaMhSQ0gQ6NLXNZQIYuYvh+24dGBwfJ4cq1KuESQDGCTDB1eiXSYu3ILK+SqYSyD4BOH4l+MAunz3HHrXpw4gRfcVMxVy8YWMoTHobG8bTyo2tDKXPmIoXAqO4dgzr4i19m8m1d3rJaWIuMuLUvlZ8O1S0FYGXCNDxP97CtHA0FX8QoPiL15mZoyMS8v64jnH1ImsFoEODD/CqAw60hmqn2SIi0msWG87LtHA0HLa6tm21Am1t9tShfMacq+Fu+1L6NoR1cVMo4GgUfW79/IrhQkA/P64wVxEBEZiUAKeB4y1BVKSp+IOAlxFACsBhf5yGehEPgawXgA4UPtD5cB+EKOPUMEWaSXGmhTmNWIhRRUcYmtTllHDkxV571WgZR5PgS6YyNQFm7rCn71tbjVZ1Oy16EX6FSPlnZ31BCkCN2jpEtRWBSQl4GfUpQIs0FX8QoAaId5qK9ZQr1R/XMa5e5IwAJB0+2OnTZaeVo38gBIaJPxlHkhwhGI9/4ABEJ3MM2/lhETtO/mST36vM1ctrYud9xiprN8WTn9/06WN+fvLbdINc++YugQGcOvNxxiPkmGA7p547Pr9NOIIXhcU7DazwFz6/wPvrXk5+ELlAo3zOXPh5IWwMfPbChlOMFIKe/AMbxo5lZ45g2BhMU6qMEeA16IefX6Tf3eDCxFE/N35+PKqdvm3WbIvZPFREQASMCVD8Tb06bvLmWG9k8rf0ahoIOAIw3kMviLei6qWfQE4KQAc7H/xpSSvHsDHKHWtfhmGmb3Mhwp1rN1H4ufXzU/o2h6K2IhAXAY78xfvrleKPAlLFHwQ4mkuL1+n5Tf44DfUiHgI5LQAdYE5auYFWpBNDmBG3aeUc/0DTsDE8Lke8hrq7rdLx6cdcyyoxEonYrAfazKbhnWvlCD/+263wY/o2exp+utK3OTy1FYE4CDDGVbx+YxKAcQBPYhWusKPVx3mMt2DmpQbfyx1x1le1NBKQAByHz7RyXKhRgmC/TqDhEfikTVX29g/kvylMTKYjmcqMgpNisGzmzJxIK8dzHuxox3Qv0rcZLsRxroEj/sjWhK9TLx/XlunbeH1zTWg7DLQVgQQS4Gq2eEcAI6irlaMJvBgem+pD/RbYa+Js5wDUezvs3jjrq1oaCUgA7gWfAqFi/gKrhGFjMDXJUTqTQkESr38gRxzttHLIZVyG3MYUodlYhrq7EIqnyTINxeMwmCj83I76cfV3CH5+xSEvwe6dnmgrAiIAAl4+TJxudOfoK+RJI4Dv1hE8uzbiAO+K8yAcCT4HbdzHtuJsQ9XSREACcB/gKRhqDj7EHp1zE4SYAoUWV1o5LICIbB73D8yixQlM30bhx5E/DN3tg/irX/Yi/F7y89Nim1eD1Ssi4I0A88fGWyj+KAJV/ENgNbryWQ/deR/qLoI97KENVU0DAQnA/UEfzwjBQM5MQzbQ0mLFhs1mL+ING8PucEqYo2Sl0xieBGFj4LuWiWUErMisH+xMwu045+gIP/7b7YhfAVZ4M9RPqcLtODi1FYFEE6jz0CAFoEYAPQBMQtXn0SYD48Yb048uAd/HKOBqfHebTZkl4STUpHsCEoAGzBi3j9OInJrlSFYYI1mc8p2qcB9OC1PQcESQ/6agMalLwWSnsEOOYfqu0YeNfoqZUOjnx9R7HDlNlZ8fGTOsTwhT6Aq4nQl3ifqYwQTmeuh7M+q6C/Lp4WCqakRgHfZaD3uz0d6T73QUXr4cz7Yv4rt4auf5ydvQqykmIAHoAjiFRdUBByCtXK29UGSop8eotiMEuVqYQtCZJjapHEVWjO4d2+3p03L6smE00s+FI5cUfqa+k865UMDRHJHsvG6yDYAJRbLSt5nQ0j4iED8BfD75K/Sg+FuwduFzPvWvZw8HUFV3BHA9+nFdH0ItLwKQBz0P1oa2/hdtyh+QRHxeJADjuEAUGhQdg1i04WaUyxF+cfkHQlh1vLhxPH7gLIs5jv1UONLX39yMVHtI32YwOur0naKPxjpup3uZvo1BtTk6qqDaDlFtRSCpBGag9QM9HGGbh7qqmjwCf0XT58PinQZ2evYt/FGJ7/NL8L3OFcYqPiYgARjvxYFoCSJvLMUgfdwGkcIs2f6BFEmDmFrlyGMZfNzo68asJsaFIgtTy1x1bPvkOUIN58JpbsbJs9PU4d+mhe0wfdsAUuuZnr/Tdrzp2+jnF2T8RPr5uTl/58DaioAIxEvgjag4O97KqMcVpyr+I/AUuvRv2HsT0DUKycPwvLoIIvA/CWhPTSSJgASgR7B2WrnZc6wg08ph6pO+bxRqUxXus3fYGDf+gb0IUcNVtXZauZoaO8/xvo45jNXFnJKN9PZYXJHL+Ib005tYmCeZ8fI4zV1cXmEL26Kysom7vPJv9D8M/8Q+jPqxfTdl4qifCSunbdZj0G6es/z8HCraikBKCZyIo8UbBLoXdV9MaW91MCMC+G6N4rv4eux8HCwRzubHo51laPP/sP012mewaRWfEZAATNAFGfMPPNAasvMLM6et2ei3My0cl38gpl27tm21AuNCsLi8/OWzgUAb6um2V+FyxHBvwffyjmN/8f0YDSt3uT/FLKe5OcoYqKh8xRTrcF/fWPo2wxiJzrEmCj+3073FZSEsxJllBaqqnOa0FQERSCEBPMyn4XAUgPGW3ahIU/EngX+gWw/C3peg7vF++THsdNw7V2P7VzwDlDEkQXAT0YwEYCIoTmiDAoVCbLC9zfaJ4yIOk+KM/jlp5RxhaFLXHt2DaAsibEwIGUWQJ8Pqa+AIYfyfNXslb1eXFYYFOeqGUU4KOGYuYcq8qQTlxH57EX6FCMzNLClBBObOlFXQE89df4tAFhH4AM7Fi//fc/guUJgQn94QuDYRCLUfoHvHwhLpZE63gRthX0H7f8D2b7B1ON7UU2XYUSV5BCQAk8CWQoVx6AJV1WPxA+EjZ/vcTXEsfDisifEDKZwcYThFVXvamcKM07IsJsebqk3nfcfvkAstGNvPTYnXz4++iMyTTI70TVQRARFIHwF8N3FxwGc89kCBgj0CTHZ1PHNW4FpfheNckoRjHYY2vw/7Bmw5jnMvto/ANuG4UWxVUkxAAjCJwClcyufMHYsfCJ+9MKdMIfKmKhSCe/sHUhialEQKv4nHc9suxSuN50IzLqhTMp6+bb8+iMYNakcREIEEEPgw2jjaQzsc+XvcQ31VTR0BTtseA+NIYDIKUwl+cNzoK/UcnhErsF0JWwPbLUEICikoEoApgEwhU420ckOYTuXiDdNFE840cDxhY1JwWpMeYqLwY//dFHJirEP5+bmhpn1FILkE8HBmcnKOCMW7+IMdfAKmBSAk4fOC7/AeXPMl6OZ9sAOS3F2KQYpNGgsXi/wHx38S21WwF2A70CczXyrsrGJOQALQnJXnPR3/QCc9GsOxmBRnWtjxD+S/8QExqZqyfRzhxwO6FX4cKXXC2sjPL2WXTAcSAVMCl2HH15vuvI/9/oTvCE3z7QOO317GtdqIZ8zZ6NedsOkp7F81jvXOceNhuXJ8wwRB+Dz+vQX9Uz5p0vFYJAA9AnRbnQKnDOnKSqqr7VRvDCZtsqCCgs8Rgm7Tyrnto9v9HfHHPtJMC0PPMIhzCFk8ChDUWUUERMBfBPB55kjQeR57tQv1/+mxDVVPMQF8rz+C638GDnsLzEv+Zy89Z2iL/zduX8B2ELYZ/eIIIV0KnoXRh5BCUcUlAQlAl8AStTsFT+WChbYAYn5h09RpFFiOfyBHBE19AxPV773bYR/YJ7ejfgygzby9jDmoIgIi4D8C4w//n6FnXp8Tf8ADutF/Z6geTUUA1+1B3AefxH6/hS2Yav8UvB/EMTgaTTsXxqnh7ejjU9hyyvgZ2Ab0m1PJKlMQ8PrBnqJ5vT0VAQqgGoSNCXd02rH3hgfMRrbdCq6p+hHv+277UYQUdmPBqznSnxfvYVVPBEQgSQTwMOVz4cuw78G8Ds23oI3fwFQylADE1HLcEyei+9fDOD3rpxJAZw4dtzOxZZiKBvR3Nbb0O+V2HawV52E+PYUKuVAkAH1xlccyXBQj8PIA0srRR9BtWjVfnMZ+OsH0bQwqzbAudrq5/eyrt0RABNJDAA/O1+LI34V9NEE9+C0evFsS1JaaSRMBXMP1uDdOxuG/D2M4oKI0dWWqw7JfC8bt49jGYHtgz6D/HCG0VxrjfNrwd84XCUAf3QIURiGsgi0ZzyYSRoYP3LQ+6qH7ruCDZp8Ps3gUys/PPUDVEIEUEMD3zCE4DKfUzoExg0MiyiY0cmUiGkpwG5n9pZpgGKbN4buc06pfwL3yILY/gL3GtG4a9yvAsWeN2wexpSDkCCHF4MOw5bDNODd3IStQKRuKBKAPryKFUtUBB1hDtTVIuYa0cki9lomlODSevq2yKhO7rz6LQFYTwEMwhBM8CkYfL47uJEr4oSmkI8JoER6sHH3xWykbP3eKg0wv9KMZBOeUhUnBsf4Gfo/huBfAPgtL5H2D5pJaeM3njdup2PbAHsf53IvtfTi3rdjmTJEA9PGlDkA40UdwsI1p5Zos07Ry6T6lsfRt9UhNh/RtWCSiIgIikH4CeMjx4ceQHm+CHQc7HvY6WDI+pLej3T/C/Fh+gU79EJaM8071+fKa/gTGXLspKxBKrTjYt3BP/QlbCkG6DNCxO9MKVyG+d9z+F+dzP/7mfbsc58gVx1ldJAB9fnkpoOg7V4Icw/3wDWS6N7dZOVJ1imPp22Ygpt8MKx+x/VREQARsp/SUYsBDjN/rAVgtbDZsLoyi7y2wN8IY0iOZK7DWo/2v4AFKh3w/Fp4/LVtK2oQXrvEaQPw07rkrsV0CoxCcA8vEwpHMxTAuJuGo4HXY3oNz7MI2K4sEYIZcVgqq8jlzbCHYvXWLNTyUshF/I0JFgYBVecCBVhGmfVVEQARsAhRZ38CDZOc4D/oZ0eiHNHHrvL73ltOozmv8e6KxbUfo8dcWBR99LSgGaBQ49H0qg9ExPlWlAwf6PB6ajak6oI5j3yNpxYDrvRYduAD3+o+x/TCMbgWM3+d1FTmaSHnhZ+vt4/bCuLj9M87RLERHyrsb/wElAONnl5aaFFjFCBvjNwHIPkn8peWW0EH9S4APkg/4t3sJ71kfWlyCB+XyhLesBjOCwLjwvxai6QZ0+K0w3v/vhTFuXxCWaeUN6PBvYRzl/BHO7x+ZdgL76282+EDs7/yy8r0RH64M9mOfsvLi66REwJ8EKP6+gAfkXf7snnqVSgK4D6KwJ2DfwXHfOW4XYXs3bBcs09ICvgN9/jtE4K9h8/F3VhSNAGbFZdRJiIAIiEDaCOzGkT+Dh/0/09YDHdi3BHBfRNC5p8ftSggo+qYeDuMUMada3wabBfO7HuGCm0/DjsM5XILz+iP+zujid+AZDVedFwEREIEsJ/AUzu+zeBg+m+XnqdNLEAHcK+1oasW4OYKQMQUpBI+GURj6WRAuQP9+DxHIhVWX4Xwy1jdQAhBXMNMK8+/6rfixT35jpP6IQBYR4BTeNTDG+uMDXUUE4iIwfv88iso0Jj/gCCEF4ZEwRxDW428/6RX25WuwQ9HfczP1M+AnoGCpYkKgACtu/Vb82Ce/MVJ/RCBLCDCLAoVfVjnEZ8m1yfjTmEQQMjzLZIKQU7LpLiejA+UQgf+Nfu9Od2fcHl8C0C0xH+xfFCq3cLP5Jk0c+8I+qYiACGQ1gQ04u5/BbsNnvj+rz1Qn5xsCuNfa0JlHxo3Pven4e29BOBOvpUsQvhvHvg39+hj62oq/M6ZIAGbMpXq5o4XBoB1oOeaTWICMUcg+qYiACGQdAcYhXAm7CcaguHwYq4hA2giMi6x/owM0CsIZ2EwUhEfg36kWhFzpfAP6shj944r4jCgSgBlxmV7ZSWbcCFRUICuIP35ssC/sk4oIiEDWENiGM1kKuwv2KB5qQ1lzZtl3IqkM9O07erg3W9Ap2nIIMMbe5Ajha2FcYXwsjIKwBpbswgDYl8K+kuwDJap9PbUTRTLF7ZRU1/hGALIvKiIgAhlNIIzeb4I9BrsPthIP1mxd3PE3nN9mWLqmDHHohBWew4qEtZbhDeGeZbYcRxAugyC8HP+eC2Mcvw/A3gPjiGGyyhdwTOYRvjdZB0hkuxKAiaSZwraKkRGkqKzMGu5PrysO+8C+qIiACGQMAaai64Ftgf0H9jjsSdgmPLjS+4WCTqSg/Arn+UAKjqNDpJkArjPv9e3jdivEGYM4vw92OuwYWKJDajD13RU4zpM4NoWor4sEoK8vz747l1dQYIVm1ltdyAuMm23fOybxHdzgdh/YFxUREIFXEaD/3G9gHEljbl7m6OVwOcNcVMHoOMsl/fwe5oeIxiksr4UhWmgRWBdsF2w3rAHGkS8u5qD424PPcC5O7TJ3skoOEsD9vgOnfT2emb/F9r9gn4N9CJbIhxiDXLPdy2C+LhKAvr48++9coLraClRVWeHOzv3vmKR3eWz2QUUERGCfBG7GQ4eLKOyCBw+/cylAOFJQBuPy+dLxv7l1jO9xHxr3p00UiBR3wzBnSyFHsUfrhfXBOMpH8dmHPnBfFREQARDA54GfmwfxeXwI2+NhF8PeBUtUOQ9t/wHH4Q8t3xYJQN9emqk7hpvLqpg7z4oODlrRMF14UlcKS0rsY7MPKiIgAvsk8Iqgnfi8OKNzA6jRsc9aekMERCDpBPB55PTZAxBrK7D9POxbsEqY18JVyGfD2J5vS6Lnv317otnaMQZgrly40MovSt1CMB6Lx1Tw52y9q3ReIiACIpA7BCAEB2A/wRlzOnhjgs78FAhLX6+QlABM0JVOZzPFCMJcdcABKRGBFH88Fo+pIgIiIAIiIALZQgAi8BGcC7N7rEnAOR2CNk5IQDtJa0ICMGloU9twoKLSqj7gwKSOynHEj8fgsVREQAREQAREINsIQARyBPB0GBdPeS0Uk74tEoC+vTTuO1aMgMw1Bx9iBcoTPzrHNtk2j6EiAiIgAiIgAtlKACKQ4ZHOh3FxlZdyJKaBkxl30EvfEh4Dx1NnVNk7AaZkq4ZQq5g3zyoofoX/eVyNsw22xTaV7i0uhKokAiIgAiKQYQQgAv+OLv/OY7fnof6bPbaRtOoaAUwa2vQ1zLh8ZXUzrdrDD7dKpzErTnyldNo0uw22pVh/8TFULREQAREQgYwlcAV63uKh9wzddISH+kmtKgGYVLzpbbyguNgqnT6dMY9cd4R1gqjLNlREQAREQAREINcI4DnIOH63ejzvN3isn7TqEoBJQ+v/hvPz8y2aigiIgAiIgAiIwKQEbserjNsZbzkUfoAM7O67oqe/7y5JYjuUniRxiT0HtSYCIiACIiACaSLwHI77godjcxFI/L5YHg48VVUJwKkI6X0REAEREAEREIGcJIBpYKaNe8TDyTNumi9jp0kAeriqqioCIiACIiACIpD1BJ7ycIbM5z3HQ/2kVZUATBpaNSwCIiACIiACIpAFBDbjHOL1A6TOkgDMgptApyACIiACIiACIpBbBNpxup0eTjnkoW7SqmoEMGlo1bAIiIAIiIAIiEAWEOjBOdDiLbXxVkxmPQnAZNJV2yIgAiIgAiIgAplOgAtBaPGWafFWTGY9CcBk0lXbIiACIiACIiACmU5gBCcQ83ASrO+7IgHou0uiDomACIiACIiACPiIALUS07rFW/bEWzGZ9SQAk0lXbYuACIiACIiACGQ6gSKcAC3ewkUkvisSgL67JOqQCIiACIiACIiAjwgE0JdiD/2JN4SMh0NOXVUCcGpG2kMEREAEREAERCB3CVTg1L1k8/Cygjhp1CUAk4ZWDYuACIiACIiACGQBgSqcA0VgPIWrh3fFUzHZdSQAk01Y7YuACIiACIiACGQygdnoPKeB4yldqNQST8Vk15EATDZhtS8CIiACIiACIpDJBF7vofPMINLhoX7SqkoAJg2tGhYBERABERABEcgCAm/2cA6tqNvroX7SqkoAJg2tGhYBERABERABEchkAqOjo0zj9gYP57AxLy8v6qF+0qpKACYNrRoWAREQAREQARHIcAJvQf8P8HAOT3qom9SqEoBJxavGRUAEREAEREAEMpjAieh7vFlAhlD3Ob+euwSgX6+M+iUCIiACIiACIpA2Apj+nYmDf8RDBxj+ZbOH+kmtKgGYVLxqXAREQAREQAREIEMJfAz9nu+h70/B/8+XK4B5ThKAHq6sqoqACIiACIiACGQfAYz+TcdZne/xzP7msX5Sq0sAJhWvGhcBERABERCBzCAA0ZMHky4Yu1xfxuZQD1duJ+o+4qF+0qvqQicdsQ4gAiIgAiIgAhlB4BD08u8QgYth5RnR4yR0Euf+HjTrdfRvGaZ/m5PQvYQ1KQGYMJRqSAREQAREQAQymsD70fsPwn4PexRC6AJYXUafkcvO43znoco1MC8CmKt/b4b5ukgA+vryqHO5SiDP4n8qIiACIpAaAhA+xTjSRycc7Y34+yrY43jvCthbYfGGQ5nQrH//xPnVo3e3wg7z2MuHUH+FxzaSXj3pAjA2NGSNDA8n/UR0ABHIJgKxobA1Eotl0ynpXBmX9xkAAByGSURBVERABPxNgILviEm6uBCvfRX2KOyfEEnnwBgeJasKzulAnNCfYMd4PDF+cV/j1+wfE8+tcOI/kvH38MCA1b5xgxWaOdMK1k6zrDyNaySDs9rMDgKj0WFrYM8eq7+11Yrph1N2XFSdhQhkBoEPo5vB/XSV7x03bjsgmDjK9Q/YCogd5rvN2IJz4XldCzs4ASdxP9r4VwLaSXoTSReAPIPo4KDVtW2bFe7stMrnzLUKg/u7x5J+zjqACPiSQKSnx+rZtdPijyYVERABEUgVAQgg+rud5OJ4jI137rhtR32ODlIMctsEQTiKre8L+j0DnfwK7HOwUAI6zJh/38b5RxLQVtKbSIkAdM4i3NVlP9zK58wZGw103tBWBHKcwGBjo9XT3KRp3xy/D3T6IpAmAkfjuIfHeewFqEdbDGuCrYGwegzbFbAXIIbasPVVQf8Y4+80GIWfV3+/ief2E5zvcxNf8PPfKRWABBGLRKzu7dut0diIVTqD4ltFBHKYwOio1bd7l9WHaV98KeUwCJ26CIhAGgkw40Ui9AAXUdBOgPELjVPFL2D7PIzb/8A4QtiNbUoL+sGpxzfBmNqNdhAskWUZGrs6kQ0mu61EXHDXfRwdGbGnunATWMHpFOIqIpB7BOgN29fQIPGXe5deZywCviEAYcQwL+9NQof4Fbdg3D403n4ftrtwzE3YboTtgG0b39KPsB8WhjbwtAIO7XOBayWMo0wUfVzYcSSMC1242jnRZSsaPA/95vllTEmLACQdisDunTusgkCxVVzB66QiArlFINzWBvHXrJG/3LrsOlsR8BuBRejQ/BR1in52nGree7p5EK9xqpjWBQHXhW07jKKQ2zBsCEbfOm5pFIlFsBJYAFYF44gSVyjPhTGe3ywYj5nM0onGz4X4ezGZB0lG22kTgDyZsZHAXVbNoWVWfmFau5IMtmpTBPZJIBYOW92Y+h3BDyEVERABEUgHAQgtjtKdko5j73VMTs9StNEyqXDE7wsQf8szqdNOX5MeB9A50L62XPHYj1EQFRHIGQLw9ett2K0wLzlzwXWiIuBbAlwAcbxve+fvjnHF71kQf3/0dzf33bu0C0B2baClxQ4Vs+9u6h0RyB4Ckb5eOyRS9pyRzkQERCBDCXAq9YkM7Xs6u92Eg58O8XdXOjvh9di+EIAj0ag12JbRcSS9XgfVzyEC4c4u+f3l0PXWqYqAXwlAwHDxwgdhn4I949d++qxfDHHzQbBb6rN+ue6OLwQge80YgRSCKiKQzQR4jw91079ZRQREQATSTwBCZgh2C3rybthnYE+mv1e+7AEXnVwD+xB4ZYVY9o0AjMIpPtLb68urrk6JQKII8B7nva4iAiIgAn4iAFHTDbsRfaIQ/Cjs7zCGZVEZi194GvicD6PvX1YU3whA0pQAzIp7SiexHwK6x/cDR2+JgAiknQAETj/sr7APozPHwn4AWwvLxZAFFHuXwd4NHndgm1XFV7FXomGGAlIRgewloHs8e6+tzkwEso0ARA+nOp9BuJgrsD0a9iEYVw0fCPPVABL6k8jCeIR3wq4BA4rfrCy+EoBMEzcai1l5BQVZCVsnldsEeG/zHlcRAREQgUwiABHUg/5y0cNSiMEabN8KY7q398AOhiU72DIOkZKyHUe5DfY7nHPGBXZ2SyghAjAvnz8EGE+Sqf88FMRHw81lt+ShFVUVAV8S4L2NGzwBfcuzxj5zGf1RKYoTBOvxyyaVJd6+8osxm0dJUnkN9j6Wl1ECXZO9abr4N4QRp0UfpOE7jVk4mNWDadbeBaMwnA1jYOdMKQxBsgz2V9hynF/OBCZOiABs37h+tO5Nb80bGcYIXkIecJly36ifIpBaAvhysvKLiq09z62hkhxI7dETdjT2/XkYV9XRTAsf3Lthw6YVErAf+/c0jCMgbvpKkUqfKS35BoQklJ1ok9fFTegI54cDBYxKAgjg+4gr2p4dt+vw/Gde10Nhbx63N2C7EFYNC8D8ULiwZTuM8Q8fhT2C89iKbc6VhAjAtnVr3xasmXZn5YIF80cwzTUyHO/3s/P5zLnroBPOGQLx3+P5RUVWPtwj2jdu6Njx8ENnA9mmTMSGL1t+QZyNh0VcMFA/EcOoRuhwLD4sTo+nr6nsp9HJZNFOYHsDrsmv4zklXZd4qJnVAdtu7MkwMnYoGVwjjtTWw+bCFsKYeWT+uDFPL/P3crSwFJbokVn+YGNoEfrzbYGth62DPQPbgL7ys53TJa4v4H0Re+cPfnRhSUXl94K1tWWMd+Y2rl9BcbE17TWvxQhHvDMu++pZ7r4e6euzOjasn3RkNt+euscwxST5aPHhsGoOO8wqDpXnLrwEnzl/GOHHkms/QObJpiFjTqRt44Zrn/vVLy9McNfUnAiIgAiklADEIUcLOTJIEUi/wtpx42sVMPoVUhg6ApHCgIKSRrE4NG4chaRzNfPytsP2wDiN6/zdOC5M8ZLKRAIJFYBseMnq1aXr7196fWhm/WlFZWUF9sKOSQTGxE5M/Lt0+nQrNGu2RTGo4p2ABKB3hologZ+DvsYGa6DVPOMN/fz4OcA1HG1bv3Z5pK31ky/ccktLIvqjNkRABERABHKbQMIFoIPzk//+99zGFSvvKp87/4j8/Ly8GKeFDf0DCwIBKzRzphWcNt1xdnea1dYlAQlAl8ASvPsofvwwzWFfc7MVG+IPVoOC0dcCjIKPxEYwertu60Bn+2nPX3edPaViUFu7iIAIiIAIiMCUBJImAJ0jL/rB5R/ILwncVFY/a4Zb/8DiUMgK1c+yAlUcKU56V50uZ9VWAjBdl3PUGurqtvqaGjmCZ9wJx8+vZ+eO3s4NG772/M03XWdcWTuKgAiIgAiIgCEBzqUntWz/10Ob/nvp0T/bcE9vLK+g8OiiUKgwDyOBmP+f8ricNgt3dljRwUGrIFCsaeEpib16BzIcbKMP7KsL/fxYJrsWfC84bRqY+2Xh1qv779dXhvv7rN5du+wpX/I3KVzckY+R76GurmjLM0/fFAg8duwTV/1Vo34m8LSPCIiACIiAawIpHVY769lnqzbfe/9vKmbP+TAEXT6d4jlFZlL4gKR/YFndTCtf/oEmyOx9NAJojMrzjiMQe/17mm0/P452mxT6+XHULzoUGW1bu2ZVNDxw2rO//OUOk7raRwREQAREQATiJZBSAeh08iO3/+Xwrt3b/lJeP/uwEYwE2mFjDEYEWb8QoyRl8g90UE65lQCcEpHnHRw/v374+UVd+PnZ070Yae3curmpb3fT4mev/+XDnjujBkRABERABETAgEBaBKDTr3f9+CdnFAZLf1E6rbZmJIr4gVGGBzMrDE8SmgX/wEr6B6rsi4AE4L7IJOb1oW74+TXSz4/hpsxKfiHi+RUWcGHIQNfmTZc9c+01V5jV1F4iIAIiIAIikBgCaRWAPAWEjSnatPTBH5TMqLsAYWOKORroZvqspLraXihSGGSoIJW9CUgA7k0kMf+mXyoXeIQ7O125MXDUL9LbG+tYv+722EDfkqdvuCFTs3kkBqRaEQEREAERSAuBtAtA56whBKe9+NCym0Oz6t+PxSKu/AMZMoP+gaUz6hRE2gE6vpUA3AuIx3/yB8pAyx7bz88ObWTQnuPnNxKLjnasX/+0BT+/x6+8crNBVe0iAiIgAiIgAkkh4BsB6JzdB2+5/Y39zQ1/Lp81+xDbP9BwFSXrF5aUIH5gvVVSW6v4geNAJQCdO8vbln5+4fZ2TNs2WdEwA8+bFS5YQhhMq3PL5ub+5pazn7n2F/80q6m9REAEREAERCB5BHwnAJ1TffePf7K4sLT05yXTplXb08JILWdaAuUVVtmseitQIf9ACUDTu2bf+w31dFv9jU3WUG/Pvnfa6x07fRtGpvubmgbh5/fdp6+95vK9dtE/RUAEREAERCBtBHwrAEnkrGXLSnY8/dxP4Oe3pCgYLGKYjcny1k5Gj9NuyEkM/8B6xBAsmWyXnHhNAjD+yxwbCsPPr8kaxMifcbgihnXBqN9wf/9Ix6ZNdxdasU89dsUV5itE4u+uaoqACIiACIiAMQFfC0DnLD69Zk3dlvv/+SdkEzk2L78gbySC+IGjZvEDmUuVYWNKp8/IyWlhCUDnLjLfUuwNtLZYDOtiGsg5L4/Cr8gajUWtzk0vroV4PGXVFVesNz+q9hQBERABERCB1BHICAHo4Hj/jTe+Y6in99ayuvr5fEjb8QOdN6fYMq0cg0hz1bA1ngFjiipZ8bYEoIvLiFiUXNXLYM7kZlq4spcjzj07t7f3Nzact/rqq+80rav9REAEREAERCAdBDJKADqAjr38ii8Eq6ouD1RVh+xpYRf+gSVVVXbYGKSkc5rL6q0EoNnlHYbgs8O6dHWZVcBetp8fRpjDbW2R1g3rf/bsNb+42LiydhQBERABERCBNBLISAFIXuesWFG+7cmnrg7W1J5RWFxSGIsMmftpIa0c89xyRLAAmUWyuUgA7v/qxpC5gyN+zJfsJv4kcyQjbdsIVvc+VDgSO/PRH/2odf9H0rsiIAIiIAIi4B8CGSsAHYRnr1kzd/v9D9xZNmv2/8uzRvPs2GyGaeVywT9QAtC5U165jcfPj64DjDnJ26tz84ubR0aipz7+ve89+8qW9S8REAEREAER8D+BjBeADuITrr32/daIdVOwdvrMGFLKufUPDM2anZVp5SQAnTvk5e1Y+rYG135+BUjh1tfU0NO9c/uFq6+66qaXW9RfIiACIiACIpBZBLJGABL7u5YtKyx8fs03ikpDlxSVh4K2f2AsZnRF8jC6U1JTY4eNQX5iozqZsJME4MtXKTo4YId1CXd0YBQPw3gGJR/uAgzrMtTVFe3etvXGkve/9/zlixaZB6U0OIZ2EQEREAEREIFUE8gqAejAO3ft2pot9y29PjRjxkfzCt2llaNjP0PGlNVlR1o5CUDLHg3u38P0bS3WiOGCoZfSt0WRvm3jxhWBytDpy7/+9d3OPaatCIiACIiACGQygawUgM4FOX3VqoObVqy8E2nl3sAA0va0sOHID9PKMX5gsHZaRscPzGUBSD+/wfY2O56fcfo2jAQzrEs+wrp0bH5xZ3Q4cvqq733vMeee0lYEREAEREAEsoFAVgtA5wKdcM2vPplXUPDLQFVVzchwFKNAw85bU26Ly8vtsDGBysxMK5erAtD282tqtCK95kk48uHjl19UaA22tvZ379j+7Sd/+n9XTnmDaAcREAEREAERyEACOSEAeV3O37QpsO7u+74bqK78cmFJsJgZHjhCZFLoH8iRQI4IFgaDJlV8s0+uCcDo4KA94seRP1M/P073ckX48EB/rPPFTbcf9v4TPn3zokVh31xEdUQEREAEREAEEkwgZwSgw23x88/P2P3Aw78rq69/L4Qd0spBCBpOCzMESOmMOtgMOwiw06aft7kiAOnbN9DSAttj2aGADC4KhT0XeOD6j3Zu3PjMaHHBJ1Z++9tbDKpqFxEQAREQARHIaAI5JwCdq3XKPfe8rXvH7ttKamsPpHhwEzamqLQUo4H1WDVcjdBw+U6TvtxmuwBkTuhwB9K3NTdhBG/A+BrYfn5Y8NPXsLsl0tdz7opLL73XuLJ2FAEREAEREIEMJ5CzAtC5bidce/0ShPq4oriisnJkOGK8SpT1AxWVVmjWLIt+gn4t2SwA6d/X19hoDfV0G+O307cVIX1bR3u4Z9fOy1dd/sPLjCtrRxEQAREQARHIEgI5LwB5HZesbizd/MgdPw1UV51bFCgpcuUfCP+x0mnTMSJYh7RyJb67LbJRAMaGwhjxQ1iXtlZzP07Hz29wYKRry9Z7qmYe+qn7v3Rmj+8umDokAiIgAiIgAikgIAE4AfKSdevqtyx98M+ldfXvQGJY92nlkFu4dPp0CyuOJ7Sa3j+zSQCOIqj3QGurnbuXIt2owM+PvpuI5WN1bdm8rqAw72PLL7lkg1Fd7SQCIiACIiACWUpAAnCSC3vyrX86brCz46bgtGlzuaDAlX9gWZkdNqakqgqiI/14s0IAYpFOuKsLWTwareH+/kmu2OQv0c+P4q+voaED2T++9NgPvnvr5HvqVREQAREQARHILQL+GaryEfeNf7lz6+K33fvzHfmP9iCA9DHFZWVcKmq0Wphicaiz0xpG2rFCTAkzvEg6C0fKBtvaJu0CV8GyTLYKmu9BAKP/gUnrpupFCr6enTusfog/01E/pm9jIO9IT0+ka/OmKxdFLz7hlu+9+4VU9VnHEQEREAEREAG/E0j/EJXPCS1ZvaVyyyP3XoPVwqdhNKnAjX8ghUiQ/oFIK1cQSI+QytQRwNjQEKZ690C8tmI23jCf87ifXzQSGe3esuWhiunzzrj/S+e0+vwWU/dEQAREQAREIOUEJAANkZ/z1AsH7Fr16F3IE/xGZBPJizGbiGn8QIwCMog0F4uk2j8w0wSg7ecH0dff3Gw84sep9gJm8SgssLp37tiWN5J3yrKLv/K04aXVbiIgAiIgAiKQcwQkAF1e8pN+e8uHI0Ph6+DjVxeLwD/QTVq5spCFANRWKv0DM0YAjvv59Tc1WZH+PuOrwvRtBcVFDALdgxRuX13xvUtvMK6sHUVABERABEQgRwn4O4qxDy/KPWcv/tsh82bPxyKRSyH+woXBUiwwNcNIYdO5ZbPVtXWLq6DFPsSQ0C4xgDOZkI2p+CNzskdImGjb+rXXHXbQwhkSfwm9LGpMBERABEQgiwloBNDDxT1706bpDUsfuqmkuuZELKTI52igaX5hBiRmyJgyhI7hatVkFT+PAHLBTP+eZju0C7OxmBQKP476Ydp3tGf7ticC9TNOfeCcc3aZ1NU+IiACIiACIiACYwQkABNwJ5z56BNvbHnhuduRGu4wt2nluFKY/oFccWs6kuimy34UgBTJXJlMP78ogjqblpfStzU2Nlgjo5/611cv/JdpXe0nAiIgAiIgAiLwMgEJwJdZeP7rA7++6cyR0ZFfIK1cNVcLm45q8cBMJxeCf2CgEvEDE1j8JgCHuhnPD35+SONmWjhaynA6SN820N/U/G1M9f7MtK72EwEREAEREAEReDUBCcBXM/H0ypLVq0t3PPHUdwtD5V+CaCliOBPTaWHG3iupqbFCM+utwtJST/1wKvtFAEbh59fX3AQR1zFp3EGnvxO3HBFl+BwwjPVs33r74R/8wJIbjjhiYOI++lsEREAEREAERMA9AQlA98yManzquedmN69cdUtJVfW74B+YZwcxNgwbwxGvshl1ViniB/JvLyXdApCjoAOI59ffssd8RJRhXTDiB0E82rNr5wtFleWnPHjeeZu8cFBdERABERABERCBlwlIAL7MIil/nXrfA+/o2bHt94GqmgMYO9BVWjmscrXDxmBU0Mna4baT6RKAzC7C0T6GdWFWFNNip2/DIo/+5qYWjPwtWfaNr/7dtK72EwEREAEREAERMCMgAWjGyeteee+78befQyM/Ki4LVYxEhoyzW/DA9AukfyD9BN2WdAhA+vfRz4/+fqaFWVPykXYu3N0VHtjT/OMV//vty1B31LS+9hMBERABERABETAnIAFozsrznues2FC++/nlPw1UVZ2dl5dfGIMQNPYPhD9cKVYKlyJsDPPcmpZUCsBoOIzpXoR1wQpfN+fFfMOjsehI17Zt98487G2fuuPU47tNz0/7iYAIiIAIiIAIuCcgAeiemeca57z44gEND/7rDyW1046KDUfy7NXChv6ByEds5xYuhY+gSVq5VAhAO30bfPyYuzeG2H5GBX5+9upeTPf27NqxIThr5qn3nXnmGqO62kkEREAEREAERMATAQlAT/i8Vf74HXe/v7+n8zfFobL62BDDxhiKJxy2CKuEQ/WzrJLqagZF3mdHhvv6rPYN6yddeev4FdJfb+/C92oOO9wqDoX2fuvlf9PPr7MT072NrjKb2OnbAsXWYGdnV7Sj+0v/uuQrt7zcqP4SAREQAREQARFINoF9K4dkH1nt2wTOWraspHVHw/9AcH2zIFAc5DSq6fQphR9WGVuhWbNsQTgZ0qGuLqtz86ZJBeBk+7/0GgXgQQdbmK5+6aWJfzB9W19joxXu6oSn3qsF5MR9nb/t9G2Yvh4eGBzGaOGvFh51xNdvXrTIPBK005C2IiACIiACIiACnghIAHrCl7jKTCvX+PC/rg5UVJ6CIb18ho0xFYKcSg3W1iKjSL0dPoW9Yl2Kvz4kzRgeHIyro0XBIMTlbFsEOllK2C+s0LUG29uNw7rY8fwQ1mUUSrFnx/ZltW9+05l/ed/7muLqlCqJgAiIgAiIgAh4JiAB6BlhYhs4+5lnXtOw6qlbg9Nq34hp4Tw3YWMYNLkMsQMLse1vacEq3MSspQhUViIu4QykbRsa8/PD1rTYYV2K6ee3a1tJZfnp93/mM6tM62o/ERABERABERCB5BCQAEwOV8+tnvzHP38k0tt3XXFl5YwY8uW6SStH/73J/Pq8dMptm/YCD+Q5Dre19mCa+Kv//ubFN3g5vuqKgAiIgAiIgAgkjoAEYOJYJrylU1auDA5u3PQdzOtemF9UGKAQNJ0WTnhnDBscS99WYmGqODrQ1PD7acce88U73v72+OagDY+p3URABERABERABNwRkAB0xyste5+1du3MxkdX/iZYUfG+kZHRfISOMV54kbIOY9SxoAjp2/KRvm33rifLF8w79Z5TT92ZsuPrQCIgAiIgAiIgAsYEJACNUaV/x9MfffSt7Rs23hqsrD6U/nhu/AOT2Xv6+dHvsHdPU0N+nvXfD37xiw8n83hqWwREQAREQAREwBsBCUBv/FJfe3Q076Q/3blkNBy+vCAYrIohbMxILJb6fuCITN9WwLAuvb0DA91dP1x+0Zd/iNA0ZjFh0tJjHVQEREAEREAERIAEJAAz9D44Y9Wqis71G3+EtHBL8kbzCqMu0sp5PWU7nh/Tt43GRnoaG/4y+53HnHvrUUf1eG1X9UVABERABERABFJDQAIwNZyTdpSznl13cPMTj/0uUF19FKaE8+xUbIaBmV13yvbzK7JTuPU17F5fVj/3k3ef/vEXXLejCiIgAiIgAiIgAmklIAGYVvyJO/ip997/3t6mhhuLK6vnxJLgH2jH84Of32DLno6RyPD5D110wW2J671aEgEREAEREAERSCUBCcBU0k7ysZasXl3U+J8NF46OjnynMFhaFg0Peg4bY0/3lgSt4b7eyEBb2y8OOW7RJTcccYR50uIkn7OaFwEREAEREAERcE9AAtA9M9/XOHft2prGx578ZXFF+SmjsVhBjP6BLqeFGfi5AH5+Vn7+aO+uXQ/P/H9vPu2Pixa1+f7k1UEREAEREAEREIEpCUgATokoc3dY/Pzzr2t54qlbSiqr30QRaBo2Zix9W8Dqa2rcWjyt+oz7zzxT6dsy9zZQz0VABERABETgVQQkAF+FJPte+Ohdfzt9qLf3F4XBYK3tHxiNTnqSY+nbAtZQT09ftK/3kocuvODqSXfUiyIgAiIgAiIgAhlNQAIwoy+feedPWbY2FN75zLes/KIv5xcWBKIT0srZfn7I24sVxNHBlqbf17z1fRfcsei1feata08REAEREAEREIFMIiABmElXKwF9XbJuXf3Oxx6/KVBeeQJEYD6bLAiUjPY17n6y9uADT73jpJOUvi0BnNWECIiACIiACPiZgASgn69OEvt2+qOPHzfQ3Hg3FokUxqKxT9x75ml/TeLh1LQIiIAIiIAIiICPCPx/9LZZ0UZyLiQAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-mid{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnhJREFUeNpsU01PE1EUPdOZKWUotKUKFLEWkQ1EASGGxGBi4sIVrt27IixN/Cn+CxfVnQsXJiz8IAoqRBGEaMUUWzofnXkz781436QDkjKTyXuZe96595x3rxJFEeTzaKW6dmdpfIoxjuRRFECGn7/4Utvarj/syWgflU5s891qvGoJePJasfBgeSpnW+yEIJVS4DEBx3FzGT2qfvh0tJxOE4mCU0yy8X3BLdODRQTJZ5oMzYaD0UuDePzkbnnx1mjV9/lMp+izBKEIwQMOzvnJGoYhhBDgFKtMjmBl9XZ54WapSjLnknMnEkQYgflCVhKXLt+/dRMy2d5OHdVnPoxeHUtLV8u2w5/S78UzBJwLMC8gAsosIqy9/ga37WNmvgKVKmEkb7JSwI3pIdRq1kBXBZJAUKkb6wd49fIzbJthdn6cIhE0XUWbyP4cmshmdZAE0eUBD6gCN0DtZwM7Xw+RUlVEJCui7CmyPaS94zC06ZMedREERNA6djBWHsS9+9fRS3p9AraOXbhELMlUQju2G2O7JAQENk0XhpHG3MIVlEZzaDbdOKO8jWy/TraGsMmL4L8KTgnIfcfy4JBWeQNp0j10MQtB4EJOg6qFMI/bEH3pGNtF4LOAjHMxO1dGvW4jXzDi7Iw60TB0jJRyONhv4MdunbDneMA6BMPDA6iMFzExcQH9AxkUiwby+QzevtnF2OU8lBT1i8fOa2UO1/FwdGTHE2STHM/14+vlPOz0RxibKPfn9AHXZHBzYx866ZdTKkuVndhHuqenS1h/v4ffvxqyvbUuAtPizZ0Dp7X1fTs+FA9cMnWd4ZG90NOjomVFzeTcPwEGACDGeYddZX86AAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-mp3{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnxJREFUeNp0U89PE0EU/ra7XWxpSsFYIbVQf9REFBHkYBRIPJh4wrN3DsZ4MPGP8b/wUCIHEw5EY0w04o9ILcREGmwVgaXbbXdnd2bXNxPahGyczebtzrz3ve99740WRRHkWn5cebu4cH6SMY7e0jRAHr9c3WxsVvcemmbys9yT6+uHJ8oaPefypdPDD5Ymh5w26wMkEho8JtDtuEOZFCrvN/4uJZNGH0T59D58X/C27aFNAL3Xthmsww5GCyN4+uzu+OLtQsUPxPQx6ZMAoQjBAw7O+bEVCMMQgqygs+LFs1h+dGd8bna0QmXO9OL6JYgwAvOFZKKoy3V44CgNfv7Yx8oLH+lUEgvzF8Ydhz+n41snAGRG5gUEwClzhHdvttFxfNyYK0EnJozKK5eGcf1qHo1GOxtjwI+pfvm4g/W1qtJgerYE2SXJSIL9+W0jk0mCShAxDXgQKgbNXxZq35vQKCiKQkSUXdc1+gcch1FHGPmKuIgBCdc66qJQHMG9+1NIpUylxxHtuW6gEiTIu+N4yjdWgty0yTmdNjFzcwKjY0MU7MLt+IjoSad16FoIx3b/A0DZ7FYXnsdpAjUMDOjI5zPgfoBsRodhhGhZHfBBU/nGAGRtxWIOg5lT2NtrI5dL0SB5KJzLodloqXaOEatPGztKq5gG3S5DNjuAK5NjKJfPYKI0okBkSdemCiSgS/rkQNLSePtxBj4LSCwfFtE0krqqX7ZVMnu9XlMXy2l7ME0dzA3iANQyY6vWxC61UY41zTyNcYh6/QCNXQvzi5dR39nHVq1BUyuMGAARsF6tbbe4iKD1r7Om5iFBdmW1SsDflLiuB6sX90+AAQDHAW7dW0YnzgAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-mp4{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnBJREFUeNpsk99r01AUx79psrTrujVtbceabnZs4DYRHSoMh6Dgq77rn+AfoA/+If4Bok+C0CfxVRDBh+I2NqZzrpS1DVvbtU3SJPcm8SSlsJlecsn9dT73nO85V/B9H0H78OLdt/LDlQ1uMYybIAgI9n99OWxoe83nkiz9hDDae330JvxL48O51Xxm/enNtKPbVwAh0Ec6kYpXat9Pnl2GBC02HrjM5Y7h4P8+7FtIFVJ49OrxUnl7ucIdfhv+BIDv+fBcj7p/tXMPrs2RXVTw4OX2UnFTrXCbbY7tpMsA13FDSDAOQ4gJEGUJLs0PPh9CkESsPrmxxEz2lra3rnpAt3G6adgdQhBpmeLkFodNmsjpOPoXBrQTDcmFFNS7i3MRDzzPCw/vva8ikU+COQxm14BBhvJcHLGpGPTOAJxxeLbrRgAkYujBdH4G5oWJWXUW19YL4XqunAMFhnq1BqWYgaY1MAHASQOiU96zKzkU76mwehaOvx6h9uMv7KFN3RopL4oTAI4HRh4wSl399xla+00YbR3yrIzM9SzSqgJJnoKcklGrH08CcJjnBtLLCsSEGGpSWJvHtDKNoFippsJ0ulIsDDUCCATMlBQkNuahEyiZTcLsmFBKaQxaOk53TlHeKkM70AjAooCghBOk9sKtIvqtPqS4FBaRnJSRX8tj2DOh3lFB5Qw2ZNFK5LRo6w4sKt2ggAzywidAMN/9uIPSZglBLDO5FF3mRD3wHE9qVRvoHrUpfn+UEQK0/7ShtwboHJ6jdH8RZxSC57hSVETb7e5/2u0FxqPHJow+8iZ4lYY2QGu3idhIxO7Y7p8AAwALCGZKEPBGCgAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-mpg{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnxJREFUeNpsU0tPE1EU/ubRdlqmnUBboa0UeUQDiUGCC1+JmrhxoXt/gBvXJi74If4AV0Y3sNKF0YUaICqoIfjgVShEiGF4tDOdO/fOeOaSKtie5GZu7pzz3e/c7ztKGIaI4vn9p+/P3h4e4a6Pv6EoQBDiy7P5rc1P1Xt6XP8M5ejXo6UJ+dWbuemeTGdpvNdiNe9YvQLe4Bi4PmTpRmyq8m71rp74BxKF2twIHvAo+f/l1T2Yp0zceHizfOZa/xRnfBRhG4CQqAYioBWeXDyA8Di6ei1ceXC1XBwrTXHPH2vW6ccBBBMI6BsSUEQzakGL6xB0tvjyBxRNxdCtc2Xf8R9TyaWTDOg2TjfVdw6hqIoE9B2GxkEDWlLH7s4ette2kSp0oDRezrQwCIIA3oGHr0/mKMmE53qo23W4+w5S+Q5ohob9X3tgHgO8ULQACC7gMx9mKQP30EW6mEHpYi8xcJEdzMucjfkKcrTfmqmiFYBxCF/Id+gayKJwoQjHdrA5v4HK7Cq44KjZNWpagaqp7QACks0H9znW365ia24DzoEDozOJbH8eVtGShXHTwNracnsG7q6LzsEuaAlNPm9h7DSSVjLyCMkppDI+GS2StQWA1RlKo0X56n2X+6QHkmkDakxF9WMVqWyK+s/BrthYfvWz1Ug+zUDcjMPMm0h3pxEjFma3CbIuCud7oMc0LL1ZgmElpGJtW3B+15HIGNITrMYIlOH7i0U41NrInREylYbu4R5qQbQBaAh95fVKZCnpQCnb9DrWZyrRERS6NDeUw+yHaXh7rt4C4B8y+9vkwn7kwKNRpDoa9aiFKBYnF+RcREqQ2e1m3R8BBgAy9kz9ysCE6QAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-odf{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAi5JREFUeNp0UktrU0EU/mbu3FfE1KRRUpWYheALNBURUVy7cy9UkO6KW/+Lbt0IPsFui4gLBbUqFaUuXETUKCYa0jS5yZ2ZO557b5MmTXpgmDPnfOc7jznMGINYPi0de5UvmpORxpjE/kbNqW005DVu8TWw1H758ZfkFgNgJmtyxSPRjJIj0QTW/RDiYGXGb7Dl32/eXrVsd0gSCx9miqC0ooCdp69g5Q/h6OLN0ty5ynIkwzMwUwh2FwMdcbDiCZQXlkqFCpEoPT/wih1YjLInANcD+/Ua9bu3wJlGvrBZCmet2+S6ME5g4oGlZ9A/I70XCDhhDexPNTFmswJBwcnuXkF86VSNZxVu0ukLSGnBcqlnN4HoCQIaIuIv7LUooMOgQ7q75LAAb59B9gCBHSKgqemRr94mMKmD24CfM8nb7THYGQNLpAkUkcb66JyGBFFEWRVL57gFEH5qj8Lxwca2qS3EZaugmzAw24dR/XQgwtsCSBjPIdWbUoE2UJLBnV8Ac/ciWHsK9/glWLnD6K2vgPszsOdOQdfeQ1c/ThKoTgDn9A3KUED/52d45xchZsvorD6Bf/Z60riV3Q9Z/0bbGU1uopYGkfERSQ3VbsMwl0qlqoIARmSoPYXWy0dor79LfBMEEd8jGs/uQ3Yl7PJFNFbuEXiV2riCf88fovXhBbo/vqP3t02/ZYmJFqTkzY160Go9uEMbFK8hR/NrdXtFuUVmnmySVGgO4v4LMAAjRgmO+SJJiQAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-ods{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAetJREFUeNqMUj1IHEEU/i7u7Z23e8tGgneGQPw3hZDkkhQiSuwMQREba4uUgpVlCrvEQhurkCoWqcQQ0oTAaYKNqJygGEwgHCSB6Knn7eXcdX/GmdHVPWYFP3gw78173/vmvYkQQsAwNvckq96UnyIEh7/d4t7uUd/8y+85P+bXSX4grkhI6nJYPW7LrXpBK2YxiSoShhu4Buq1NPofDeqdrZ3Z4cl7D4J3UtA5VyVAlmJoru9Af2ZAp1lcCQ3nqgiuKmbY3l/BH+MnHM9GVLP0Ww3KNA33CQoQQnL834Fj74PUGkANEIkCSSsa8gQqgYTIcB0PVsXB318GInRiCVWCkpRFAs+j5gKlA4t29Ggh4d0t04FKt9PQqF4UFgumSEA8ApeaElilWbYRVy/lsns/N1QBkxtENF4jxPxcgcB1CZVOrvMteK5IQDtJJIGh++PcX9iYwWjXK37+vP0WdYk0Ht99jtX8JywWFkQChw4tc+cZcvlF7rMze+ubbxN40fMalRMDP/6twaiUeK7wlZ0TD0a5hLTWxo2d45KKprqHKJslTsy209s2wnMFBTYNZjc/oLt9gPvLOx+hxVJIKS2YW5pCbSyJTGMK775O8VyBwDJd2LTDl/X5i8v3S7NVw9vJb51tITDEUwEGANCx2/rXEEFFAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-odt{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAepJREFUeNqMkz1II1EQx/+7Ca6JkqyYiJ8cKEpAQbBQFDm0sVOsFBS9wt5KOTgEG5twxVlZ+XEnKNiIghYKxx5nwEpIIXaiSAgKGmMi0d23u8+3T7OaZJEMLG9mmPnN/w1vBUopLPNNhRWXHOyDg0nx82TiJtZPlPVoNpftc2cTotcHtxx06kdXpSQ/BvzKESZzIDmAz6y+NojOjpDMZiqRPIgNoFyWM8DrKUV7axO+gcp4g7AzmquAdVNqOgL2z2I4id1B0wgeygOyt/rLL5buLwAIDgA9dY+L+DkuDQOCrkMgBsRglcMOqAGwIstMg8AkGsuZMNUMRMkLqE+QGloglvlA7uIOAKvZajR0qJkUj/XHe0BTIclVKKlrfKsj9qA8gA6wqSJzPaXlr7ky//tdLEUfawsBjExUFGVWbT7AxSa42H2LMfODmvd3wKb7RAMLYwM8nts8xJ/pEe7/3PmP2eGv3D+9usb35W0bINoA7RmjXSHsH0f5Z/mUSZ0Ir2JmsBtD80s8/rGyzWsLFTD5yUQCbfUBHl9d38LvkdDTXIuHVBo0k+bbt06qO+yAPGXwe/cA4wO9PN44jKDG70GougIzi2tQ00ms7/3lpwnBBgjZ37Kkd1Shht5XzBIFl/ufFtniT/lFgAEAU//g6kvdGBMAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-otp{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAcJJREFUeNqMkssvA1EUxr+ZjkdbrfFKVD12ErYSRELY2fkH+BMsLcQaSwsrSzZi47EjJEQkEhYkFlhYSVtFpdqOqpk717l3jKZmiC+5mZlzv/s795wzCuccQncz3YeRBj4KHz0/RrOZe2NsZPP20o255zQ3EAxzEAC+6uzTw13G4TFQAakA/CWtIYbY0KBOrx7IvwDQqlHV1o3YxKTOvyAUvfQCfqmA3e4ikyS/zRAKvOot7eoSHEgZIHrCfQAfBqBaKQQDKScQAExd8emBANg+2U2CvNMkkgSqBmrCxFB8mujeoJBWwEqARcssKTAJEGrmaGrjqK1zvNknH4BtyxKl2VUpRxmj5W+x73q9AEaZrR/ND1EJluIpS3i9JQiA+a+hSq8HwJjTsLrRaWitPTCOlhEZn5N75sM1qigmlN+dB3u++Qao5W4TtbEXXIsiszGL4PA00itTsu6XnQWo0TjMTAJqfMDx/ryBJcaVzSNSH4fW0Q+rkIf5rsjRiid7yyN7uoXS3Zn0egE0NiORAN9bQ017D1Lri7CLlP2EDr3Rf7C/itzV2bfXA/igLDaRixfngFhSCooH2xVPCWBlwKcAAwBX1suA6te+hAAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-ots{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAfZJREFUeNqMUk1rE1EUPS8zmabJdDKB2glEwY9ExJYiBUEQpV25qgtBXfgbpEtXuujKf+AfEKRddOdOGHClbYVCvyKWaijT2mhjphk7Sd7Me76ZONp0EsiBYWbOvfe88+69hHOOAE9f3zTVnDKNHvhlsfqPw/rM0ovyWsRFdXJEpDIyRnSlVz0KSkmvabaJeXSJBEhgAJzTDNybmtUnS5Pmg/lrN07H5NM/f13FoMgpXDSuhiIiK3Qi6LUugX7FAbaPPsJqfIHHKCStqRsXVFPQuZgD9BBxjikSiRq41AAkgCQBzVf0+BWEBX7GBm0xgHHUqk1UbBuEcIydzyCZlOI9YEGuDxwduCCitS3Xh3viCZ4jrcq4PJ6DLHd67tjtuAAXib54dCPVEfQ5XIcik/0/2iDeOYz3ceCxrisMi904y0XiMQFfkB7lg6xFHwFxEqUMV0anUNBLWKm8xd3i4zBWOzmASx0UsiW831mA59Xjm+h7HCOygduXHqJatzA7Poey9QnXjTuoVD/j/sRcmDOWLgqnLC5A2wwST+Pn8T629lahSCo291bwu9XA7vcy3m2+gTaUR14thrk9BXasbdiOjSe3nmPpwys0xSi/HpbDd3bIQC6dx/q3ZbRb/j8BEi3Po5cTJpHI9CBNDEa++GyDBN9/BBgAwfDlCVUQaNAAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-ott{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAdFJREFUeNqMU89r02AYfpJ0iVm7EqhVOxw7dDBEdpiCE1RoEZRddvUgbIex/Rs7eehppyF4LOzQu4MxwYp0HgShIuwwUVSCVtl0s13afl+SzzcpyZYmyF74eN583/s+PO+PSEIIeJZdrtQVI19Cgmk/Ph39bpllXq82g7sgLxVcyKNZpIx8Uj5u5zSjc9Gov8ZihCRC8D+7On4JczevGeTGSEIC4ctKJtB1DTPXi1iCCEkIm1EFlC2Em0iwtWfinXkIzjiO0jljtDC5TtflGIGUQMB+mfja/oPv2Rx9MMjpMdJxOXyXTwkcwIkewfqQ1QtQNB385zcI14FrtQexsSb6SRysZ4Fbf+F6eHwATc9gJGNAm5iCTL5n/LCVRGADNoeaGoHqyaXj5gqQlTODovcwNk5Aj6wXqV8eCo7EDhMonEHpW+dZC7gUG98D3geo7vkb01h9cAvPdt76OGy1xntUd3bjUxAk3+l2sHJ/FgtrT0MUJNfDSm0bjQ/72Hzxxo+NK+h3B7XRNO4UrwymQtMIkdTBU0m+sBOayLsn8Ka78mQDjx/e87HXPkb1+UsfP37+AmZ1fP/suknBb6nefVQXjl06TxMlJfWKNWr+Kv8TYAAkUueexJF47QAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-pdf{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmhJREFUeNp0U0trU0EYPTP35qYxaW6TlDapNKWGbgo2FkF8rARB6rboXusf0F/hyq2U4krFqugqSBeuAyL4SERBstHa0iR9JKZJ7mvu+M0tqZGkH3x8987jzDnnm2FSSqh4ns0VU1ybFzj674Wa3uWiWbfsFQb+jrGj8Xvbm0HlvYVRxhJprpmTlGmum+OMm5uNPZNbtjk3l82ey8++8oW4Jv/H/wdA456g2kvH99FyHNiuAz2dwflbN8YW8zMK5Go/CMfQkAhpGsyQgRCtlpE4jIULyC9fHzu7MPPEl/5ib6WOE0JJNRiHHg6j86mMjw/2gG4bkbY4PW4Yj2j64skA5FTHdaEMPiAJszt1sK0d4suJmY4k0+IDDGRfqmh0u5gejQc+fG8eYCIahRQCEfgQnIuhEkgtONE+dGxYxEDj1DhiEycZ+1YXdUpHCqTMJIYyEES5aXXQsi2kYlGEia5GtHVKn+amPBeCutPgfLALPuVu+xDVPw2EQyFEjHDghbpYNm1yKVVnYjTOerepn4E6XQmLGSPkPkOXWATMSDcjQEkAaqOu6+i/rccALtFL53LI3r0Nq1ZD4/MXZJaWYFer+PXiJc6s3IEgY3+uPYZHTAcAHM+DTE8gnM1CSyaCulv+GrRy8uYyElcu4XfhLVpkpNtn/DGA5Uu0abFH36WnzzCayWAkmYJvWeCkfb9SwY+NDbSoOx4bYqJF8rZqVRRXV/HhzWtUSmWwmWl0RmN4v76OUqGASrmMOkntSHF8MOs954dT08W248wzYsJDOujRBAaqqikTpRo/qqd0/dv97c3Lat9fAQYA4z8bX9nTsb8AAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-php{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAhNJREFUeNqMkltrE0EUx//ZbDaXNrvZzdIkbYOXGgxYQlCK2IIY6EufxGdB8Av44AdR8AP44JOPBR+Ego0PClUKTTXQSmkTYtOkmubSJrQ1e3H2yJSEJNIDs3PmP+f89pyZcdm2DcdWvn7LzkxFHmCIra7nm9ulg8yLZ09yXON55Dgjt1PM2iPs0+aW/frdh8bzV2/SvQBnCLiEqcFxLKSSodlrU9leiGPihWePBkgeEZO6ShC2dCAZNuf6ADb+ldQ5PUPx4BCFcgXfdwq4Ph1Dtd5CZi4Nw7SQiMdCXkl6yVIy/QBWgcU+yx/XsLK2cdHndqlK/lZxH/OpJO7fnsWY3z/YAq+g0TmHpoUH2vB5PXi8RD9Fo10aAmDJTgWyIuOupmK38rsPcOvqJO33XWEvwLJsmKxHRVEwf/MKWl/yUMf8mIloWN8rw+sP0D6PHQmYuzGNgCRiMZVA17IQV4OIaTI8buH/AJMFd02Tkp05PO4jnWvc57EDAINt7u1X8Pb9KgI+Lxbv3cFR8xjx6AQ+b+Txs/qL9KePlih2CMBCq92hg2qzt1AoV7H5YxdhdqhHzRbgcpFeqdUplpvQW4FhmAixZ/sws4BoWCM/qmsE5XqE3dDQCrqGAYWdejqZgK6GUD8+IV9VghBFN1RZJv3sT5diBwC15gncggCPJKF0WCPN8dun55jQdVpz3Ynl9leAAQAJhiGatD9AOgAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-png{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmtJREFUeNpsU9tOE1EUXXPp0CAUWmJbC04xBANNTF+kKhG8fID6aqL/gPEj9E0lIf6Dj30HL03wxQtVIC0QKrWxNG1Dk9Z2Oj1zxn1m0oIZTnIyZ8/ee+211z5Hsm0bYg29fLGpxWIJWBYGS5IA8ncKhT9Wvf4Yqprtu+w3q85X7f9QxseD/pmZMZsxN9fnc5JNw0ACGGv6tPSvyvEDKEoWZ5Y8OHHObKpucw4B0t3agnl4CJPs2YkQVu4s61ORaBqMJc8CDBiIRhhVM9bXYdVqYAcH8M3NgS0tQQsFcfdKHEbvlr6WyaR/V6uPKPy7B4DT7lUq4MUipMlJ2MPDUKtVfKZ2nn/5BoNbkONxXeb8LYXe/A9AJLNWCxgdhZJagDI9DZg9qIkEytRSkdqTSFQtGILSbgc8LViM+tc0yPfukzIyOJ359k9YR0eQdB2KmBbpwXoM3Dod1SkD+scpEapCI5DdpsJhIJcjajQZagcjI+5oLe4VkeQnyiZgdIH2X6BJ7dSqQLfrggjw0AQwP+/GegCIHppNoFAgEMO1RZKo7BQgRi3yN05cnwdA0BQMAgF3C6pnbuNg92M9AFT1diSCh6kb+FGvo2MxnBB9ocZxp4Mns1cde213B81e7xwAcl4jkaa0IUSjUdLJwkL0Ej6VSvArCt7l81iku6GrKnYEU89VJlSJRmR0Dax+fI9suYxSo4HlWIw6M3FBlnD9YhiXabyOsOeIqG7TzDeIYo6EDGp+ZPb2kKKqH8h+mkxiI5/D1/19J3bwYPvPWXq2skkiJVxesqt0XzghpKM8nRVV2Lv2q9eLIvSfAAMAaacnllcFBmYAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-ppt{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAkhJREFUeNpsU11rE0EUPTM7ySZpmzT9DNamWAtFfSiCigr+AxF9zKtv/hvf/Aki+FEi6ov4ItWHPGiwiBUKoUqqTUJImmR3M7Mz3t0kNe1m4LIwc+65595zlxljEJzdR5uf5nLmsvZx6gSvtd9W9bjhF7jg5dH9nRc/wq8YXaTSJptb0xklx7IZoKUEz1zJ2DUU69/37vFYrDxegJ9U0lC+AoIIVGg9CL+vIObP48KDQn7x0sWiVnJrnEDg7KGk+i/Ac4iUM/R7BsmrSSxtXMfa3X7el8+Kjf3KfUJ+iRJQw4w0Tc8BRyWGRAZY3rBR/VlC+XED2ayDhZyXl03+hNA3TxNQshlGLAnE44zCIL1goXZwiMNvB1i6zbC0KuAsxNITWwgNMYPeLVJiFEO9ArjHAivrAjNzBr4f4vwIgdGD4YUACsZCE8AtYGWT5jCsGQw5wEYJzP/pj5RwYTA1b07eQmfZ8P0sgdaM2FlYwWkMgMpl6NQAO33GKM0wsQWflkh1uqGVmVWblsiDkQyqxwfag35SqcktaEWTUTHYNx4iGU/C29+BvX4Lpu/C7zYgFjegSY63WySsHyXwpYHU00ieu0bAOuJbBTArBkiXKiaAmTzcvRJUV9E8rOgqBwqlY8ASs/AadbRLb8CzeTjVClqft6FdB17tL7yeCbFRBYoLr6vR/PiSEl5BZJaBD0/R2nkOZqfQ2fsKt+0SEQ+GLSIEUvJm+6jbah2+pS2aon+4g/afd4SYJVuA7vvXdC/IHQtSoTnK+yfAAIEaId1m+vudAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-psd{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAqxJREFUeNpsU01ME0EYfbtdKKWGtoItRWgJHApCBE2I0YuoiSaaeDJeOJh41YN3TfTixcRwMfEk8eDJGA+Eg0YTTRRMg02KKFooCBbTlkJLS7f7P+u3K9Xo8iWT3Zn55s173/uGM00TVlwZfzJztD92iKO5ouvQGQPHcQDN380vlDPr65fdLj4Oa41i9sFt+ytgN7o7woGOrqgvvpLBaF8vWj1NUAwGTVNRM3mf5vU/zaU+XySQuTqIFXz9hxmGLkoS7r+YxvVnrzGzlgXPDOzUZPT4m3Dt/KlIuH9oUjXYEHZZ/wOgGQZi4TZcGI5hLb+FO++TSOSKcLtcMA0dI0EPrp4+HtnfG5skiUecDGwQE2MjAwiGWlFVNDz+tIyCokJhPKYSX7Gdz2I01hOJdnY9rJ/7UwPGTEiqjtbmJtw4MYx78S/4Wa3h5UoOYwPdIOp2Xi/t18rlFgcDw6o+ydiWVRwOBnCpL0oOAMmNEhLZIgSeoxwGSWcERon/M9DoBknTIdNQNAMnO4PIVGpIFXcwndlA2OtGc4MAxml27p4AIulWSIa9QVadiYSoJxhqBJivKgh5ad3k9gaw6JdlDaqq7q5wINY4F22HaLHSDZQkBW72O9cBYFEviBIURQH7a7MN0uDisUW12ZZcaGlmdq4DwCqeTo1zNtZuW7hUqGIw7MNqSUS2ImNsKEpSdEwt5lGhfQdAkQBEoub3NNrDJfAIeBuRrcrY5xGQ2RFJAjl00I8PCckJUCB9q1URBnk38XEJEuk41tmGwZAf66s1VOh2keqwoUnYpFxHH4iKIixkN3HzVQKP3iQR/5GDKMuYmE3h+fx3MHqh1sMafztHLuiCg0FAk0uFdLqcpGY5QEXbTC/j7mIaVjc18DxufUtBJ/vcggs+3ijVz/0SYABsJHPUtu/OYwAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-py{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAlVJREFUeNpsUktvEmEUPTPzTUFmgJK2UqXQFG3pA6OBLrQxamJcaYwuu3Dp0l9iXLvVtRuDpgt3JIYaTVSaxtRHsJq2xEJBHgXmifebMhECXzKZme+ee+65516h2+2Cn2cb2VwyHl12//vP2/zOQaF4uD7GWN69e/LogfNm7kUsPBFaXYwHMeK0OlpQEJApHJTuykzK98dE98O0bLM/UNgr4v32Dj1fwSQRt9dSsfmZcMa0rIv9ODaqYrPVxuPnL1Cu1aEbJu7fvIZUIo4bqeVYRzcyv/8c3SPYpwECt/dmu4ON3Ed4TymI+hQc1ZqoE+F+uQLDsnHlwkKMscJTgl4eJOi9fxZLePNhGx6ZQRRFqH4VjZaGSv0Y6cQcJLpra0ZguIWegqDiw7lYBBZV6xiGk9DQDLzK5bEyF4Hi9VLMsoYI7J6Es5PjeHjnOl5ubqHaaJGBEkzbxplQAKIgDmBHekDTgI+qKKqKLvNApgmEgyquLs1CoFn2Y4cIeLJpkjoCLkWnUSIF3JxISIUsCjAoxhWNJLBIJs3YeXj/08oYZkOKY65HllE/bkMmY504YUd40HUq2JSSyW6iVPmLiXE/ZMYQCU+hXK3h1toqdNN0sEObyKtqtDQ6kXDwcadDS2TBryp4nX2HxXjsJK6bDnZIAZem6Tp5YMMmicn5OC4lztNWtvB9cg+hQABtWjKL2jH/T3GgBcYDXEE6mcDM6SlaJAGMWkivLBC54ZgniZaDHSI4rNSqn7/t1vgkGJPwZXffSeCjk2iUWz9+nSTQN8e6ef8EGAClUi/qoiOc3wAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-qt{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnVJREFUeNpsU8tu00AUPU5sp41NkzRxpfSZqi0VIIQqEEJUZYXECvbwCWxYsuBD+ABUFrDrCnWBQEJdIWigBSr6pqRJ1ebhxrE9M7aZmSrQ4o505fHMnXPPPWdGiaIIYrx89GKpNDdxmXkU3aEoCsT+z8W1Sm21+jCpJctQTvaerj+TX7WbnJ+0cpfuX8mQtn8GgJ4AZtIFY2Hz3foDVRcgyt+cRHcS0IARh+D/8G0PpmVi7smd0dLs+AIjwTVEiANEYYQwCHlEZyJgIQKfoX84g9uPZ0cHZ4YWmE9nuufU0wABCSSImMsWEgqSuoqA/39/swZFTWLy7vQo7dDnfPvWWQa8GuOV3IYLJXmyzDzG2/ChZ3pwbHdQ267BKJoYuj7SF2MQhiF8LuDK/Gf0DKTBKINz1IbTbEMzU1ANDW7LAfEIQKIgBsBFlAx6LYOz6MAcvoDCtAVGGPKlAiIu/F55F33FDA6W93EOAOMaMOl7biKPwRtD8Foetj5sYPfTDtxjl1f3Ubo5jkQieQ4ACSUD2iE4XDpAdbUiW9D7UsiN9WNkZgxajwbd0LGzt3keAJPUc1N5SVeENT0Ao2BKV6QzwlZeRBSKAYhe3aYHcZWn7l1EfjyPypcK9LQGa8qCvW9j9+MvaasQOHaRhGWdhsNLR8hwodYWf6B4tYjDjSOovRqq32rSYq/lytw4A77o1V2ERiAtzY5kkUrrsH+3QF2KY87ArTtQuQ6nAf4x6FCV1D001+vYersBM2vA4y1Rm2D7/Rac/TZIw4d/6MrcGAPf9htN0miJh7Lyuoyvr8rQeP9iVJcrSKgJ+TrFcyYebXTP/RFgAFQobmIOBxbsAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-rar{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnpJREFUeNpsUktPE1EU/u68OgylZXi0hZACQU1LEKKCMcat7jTRnQsXxsQtv4E/4M74P1iriUaNCw1FgxpjCJQKKAU60+m8mJnrmSll4XCTc8+959zz3e88GOcc8aq9evChOHl/lvMoubvWX/z4+BwTlbvw7bXdg8b7h6LE1gGW+O88CRMt4XTlR6/rYxce5Xv3jlHH19fPkBu+gWy5mlcFb3Wn/umeKOEMJF5C7xCFbtA9dRXjFoYKGiTRAlPGUV1aKU9O3VwNQ74A8DQAIZxqAuAhBPIMFYpQVAVB4CPSZjEzv1weH5tbDQN+JQ2Abu488mnzIbAAA3o/VK2PwDJo7r5Fy7ZRuvi4PFS6+qIXdVYD8Jg6BUcuOD8BozSLlRWyicgVKkTMQWwUlFF0Ooe5FIPk57BD7G0SiywyjD8bCDyHsOkeeeR3SUxEkROmU6BfQYFJMHfhWXV8efkUrb13VPMTsrcTQSzxZ/+n0GVA6EGbSGdgG9vo15fg2nFgbO8k70SRdd+mahDT81vUxTZRlJBRMsjq89C0EXCvSf7TIBZ136YZUJEiE7LgJ2dN01BZuE0dkIhxE7KcQTK1QUj+cwAEyrPZ+IydzRoyah+mLy2isbWBweESJEnB9q+1RM9Ub9GQOWkABg8HjRr2d9Yh0hTlBlRsfn+D4vg0BvUC9rZqECUJuk7Tzr1zahCYlB6HJAREPwfbbMBzLBzsbUKVI0qBgQkc+SxgWUYaIAqOpKwKXJ6bgGlaaDV/YvHaFNrtDsKTfVSrJeqIg/bRNwjclFIALeP3saybhu8SC4VBHwnhBXXIKocYRXD9QzBi4Xgchmkd9+L+CTAAMqwy+ZzluBgAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-rb{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAixJREFUeNqEUktvElEU/mag5f2yJhXLwxIt0kiqsVEXujP+A925cu1Pce3WtXVtYuJCF7KtTY0NrVQIpRVKeXTkMcO9F8+9ZVooJJ5kcmbmfOe733fO1YbDIWS8+/g1dycVX7W/xyO3vdsuVKqvnE7HZ230783rlyo7bVBicSGyfjsVwozomVbIPe/c+FmsPHfoRKJd1HT7hXHBZjVbA4aA14NnD9bC2VR8gwuxPi5Sx39Cp+M0XUP0ahhP1jLhW7HFD4zze3b93ILtXYyyVKlR8/5hFbnvO9gtlrGSjOF+OpXkYviWyo8mCS4R6bqO4p86vm3v4fC4DrPfw4unj1XN6JvBaQtjChzUXK43sVU4wNFJA43Tv/B73edQwTmfIhAjCVL6UdPAj1IVFSKhCdAcAI9rnjBiAjtBYEu3GEeh1sKJ0YXR68sVIujzIhzwY8DEBHZqiLRKkicQDfvABxaiQTc4Y/C65pCOXwcjcmlvJgHtlwi4epYifiQWgmoLZwPW6HQG07LgcOgKO0UglAKOTt/E+09fwAiUWU7QAE9xUK3jbvomsispZVHMVEDSZdHo9rCZ/4VIMKAu0XGjpU7d2S8hk0pCELHEzrjKnCQOYJoD+Dxu1RyiwUm5LaMDo9NFt2cqDLvY4oQFp/QpfT/MrmI5FkWebt+NpWto0j2QmQkOjZ9hpwhqjXZzM/+7LU+cc7lRrjXh8/lVLRK5ovLWXglOsiOxdt8/AQYAzv8qbmu6vgEAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-rtf{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAe5JREFUeNqEU01PE0EYfnZmd5FSvgLYFuwWt9EgHyEaox68eDJevHvwJ/hTPHv1N/QgZ2NC4g3kUAQKFKGhjVKqRrvbnRlnht262FHfy+y8877PPM8z71pCCKh4/ebt+rJfXEz26Vjf2mnsN5rPKKWbVpx7+eK5Xu2kyMtNTd5d8MdhiJ9BOO7atFI9ajy1UyAqSPIRMR6ZmoNehNHMMB7fX/UWvEKFMbYKE8DfQnAhwRmmJkbx6M6S5+WmK2Evup2c9yUk2nnKA0XVcSiGXAe1k5beP1i+4RFCXqnPywB/AKVzK34RjHNYlgVKCH50w7EBBogbTa/AVM5SgBdn0gc2AMDjPsbFPz2xye9asweS6n+NTbG8BCCfUtLjff2WoVnVpAH6z6hMUtJE3EykYfpF4vUiL3QNS7FMeSAQRBHW3r1Hq91B+VoBQRji4+ExFsvz6Hz7jm7Yw5OH92AcJKW9G4SoHhzhy/lXbB98Qmm2oCXN5WawsV2TACEoJXqwTKOsb3BtR2ucmZxANpPB8JUhyPnHWDaDpfJ1eZFALzJJ4MKO5MEtv4TSXB7V/br8iQLMz+almRZWbvoo5q9qRlxwewCgeXbe3qrVO5ZkUD/9jJGRLPaOm6COi92TU1DbxYe9umRD0DrrtJO+XwIMABWp9nS+FgaoAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-sass{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDNDMTBBM0JGMTE5MTFFMTg3N0NFOTIyMTQ2QzhBNkQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDNDMTBBM0NGMTE5MTFFMTg3N0NFOTIyMTQ2QzhBNkQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowM0MxMEEzOUYxMTkxMUUxODc3Q0U5MjIxNDZDOEE2RCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowM0MxMEEzQUYxMTkxMUUxODc3Q0U5MjIxNDZDOEE2RCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Po72XUcAAAJcSURBVHjahFJdTxNBFD1bykc/ttvdtttWGgI0bYrUgDZoNYqRJ014kMRXHvwB/hQTH/wFhMREJfFBQxBjhMRIFEQSCAlQxKYGggiU3e3HbnfX2bFt1EU9k9m9mblz5p4zlzFNExYmpue/jmTSZw5PZAl1MAwDT0c7O72wvPdudeNakPNtOZ0tsM7cvzdOc5yN5LDAsTFRAJks/kC2PxFRVe39Si6f4byez62EpAEH/gNN18F53Ri/Ocxf7OtdLMpKT42s/ZPg1cISJp/P0tg0TBzLCoK8D7eHh4RkLLJ4cCz12AjMXwgez8yhqtVo3NbqRKlcxcSL16gZwJ2Ry8KVc8kZO0HdTKlURn+8G6PD2SZhLMQj96WAiMAh2RXFYKI78lcJcx9WYBCycICnpNbojUWpD5Y0C4Zh2D0w6hWc70uQZC+IWfQZrXF0IsHvY+meBd08haAhoVMMQFJKWF7PNZM+klhRyogGhbqxOIXAMOtEwGAqDqVcgbVkkE+5UsEAWavf0az2t0ZqvK2qabh6IU3joizDwTgwej1LdVfJXkdbK8mt2QkayO99A0/0trQ46I1lVcX+UREhnsP34yLp1AD1xibBMuntpzU8mJyi3Tc1O4+l9U06n7x8Q/8PHz1DrrALt8tlr0CrkbJMHTop9Sk5sLa1g8L+ARJdnShKClY3tunN69t5iGLYTlCtakjFY7gxNABdN3B37BaqqoYT8pyX0in4ORbRkIA46YlDRbUTbBZ2Jb/Pw4qiKFnapcpPo9pdbrg8DjAOBsFgELJmsGs7eWkkc5bu/xBgAHkWC6UPADTOAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-scss{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RkM4QjYyNDVGMTE4MTFFMTlBREZCNDNEM0ExMTk0MUIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RkM4QjYyNDZGMTE4MTFFMTlBREZCNDNEM0ExMTk0MUIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpGQzhCNjI0M0YxMTgxMUUxOUFERkI0M0QzQTExOTQxQiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGQzhCNjI0NEYxMTgxMUUxOUFERkI0M0QzQTExOTQxQiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pkf1yeMAAAJbSURBVHjahFNdTxNBFD0tLULpB91uodVWPmorUIxo0VSiNSExMYYHE33l0Ud/in+C+OSjYgjRGDBRCKJIUkIEWi0WKlja0ul22+5219lJ26gLeiezuXvn7rnnnrlrUFUVms3Mvd2bjIyezRVLBA0zGAzo6jhjm1te+7EU37rFO+w7JlMbtG+ePJ5mOaZmci/nsPl6ONBtw18WDQc9tZq0sp7YjTisXV/NFKRpRvzHpHodDqsF03djzuvDg6vHJWFAprF/Arxe/oins6+YryoqCiUBvNOO+7FrXMjnWc0WyIAOQP0N4Nn8IqqSzPx2swllsYqZl28gK8DDyRvcxKXQvB6gISYpiwgH+jEVi7YAfW4nEqk0PJwDofNejAX7Pae2sPhhHQoF63U5Gai2Bn1epoPWmmaKoug1UBoMrgwHabIVVCx2jdrKFwm67TZ2plldPQGg2cK5HheIUMbaZqKV9In6giDCy3MNYXECgKI2gICxoQAEsQItpNCHWKngMo01arTY/jFIzbutShJuXh1Fm9FImYiM7tTtKOtbO+toN9Nc+fQ5SGUOIVYl7HzPIH2YRZ0y2KZ+sVzBHn2v1mpMGx0DTaR3nzfwfGEJdybGkdo/wEigDyvxLzg4yiESvojZhfd49OAeLJ2degaSLIPOO6vwgiYaaRErTRREEdn8MeJbSVZ5M7nLdNExqFLaQwEfFfACQn1+HBWKSKb3MT4Sgstuh9vVDa+bQ4DORE6o6RlspzMk9TOPfr+fiLJCLFYr3TZSKNcI7+aJwWQmPM+TkqRg49tu65f/JcAAMwMas6WUKd8AAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-sql{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAh5JREFUeNp8kctrE1EUxr+ZyXMkoa1NBROaSkpTBE23PhZ25cql2y5duvAPUdGFS1FxIRRBXZlFQ9GVdDENIhGJxkDsw2mneZnM83ruNZlOmNoDhzlzz3d/9zv3Sowx8Ch/qlYK2XM3cEJsbH0+qjV/rd6/u6aN18b7RMFT+9aosP/Ex+0ae/puw7j36PlKEMAzctKJ3aGFamMHjV0d+wcGitkMrpWWp6hVIciEk2MAOwbUWjosx0UiFoWqJpGMx5DNzODq5aIPoa82AWBg/lyKLMH1PMp/a9XvLXLzG1cuFlBaWpiKxaIPSLY6CaC93ggQjyiQZRkeQSzLRovGaPciWLt5faSWEBoh6KBvOhiaNga0+Y9pwaFxvu7rfp8F5pWDt+qNMp2IijHGwddWCvN+33/CoAOP5nVdT9SdoQ1JkggiQ6Yvr7V60+9z7akA2gfH9cRF8hO5F5Ve4lQAF9uuK+qFsylkzsQxrcaQm04hdWkR83Mzfp9rQ3fAFzu9Ph6+WMfjl6/pGBdb2jbKmx8QlRjWy5vkyhUZBPgOeGNHN9AbDLGUz6He2hVj3Ll9C8/evsdgaMK0HV8bcmDTU0UUBYXcedR+NLGnH0I3jvDk1Rsy46FP4C/1BtrdntCGHNiOAzWZgEKQ5Qt5lIqLojbaXSQTcRy2OwT4SZqk0IYAOgkVWUE+lxX/zb0DpFNpkTzmZmfFtzewhHYcfwUYAMZmVaZQlLFHAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-tga{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnxJREFUeNp0U89PE0EU/ra725K22ILRGipb22pMG6JcSEQTbUIwnozxpBcvepeEP0KPogcT/wlNT17kIKbEmChFUYKGVtL0R2gLtNCl3Z1Z3+zSAlonmezOe/O+973vvZEsy4JYnqdPMu6RkSQYQ29JEkB+PZcrslrtPhQl23VZc8/tr9I1yMHg0EA8HrBM04lVFAhoY38fSSDQVN3pfKV8G7KcxZHl6v1xblqU3eLc3p2VFZjr6+gQgwsnhzGTuq6Nhs6kYZqXjwL0GFhEl3U60OfnwWs1GGtrUKNRsKkpeIIBpKIRtI1J7cX7hXRhc/MOhXw5DkCZGG2zXAajzFIoBMvng1ypIKOqmP30GW3OIEcimovzlxRy5RgAFwDEAIODkCcmIMdiQLsNdWwMZdJlg8pzEUt1aBhKq3XinxKYqF9yQbqRIqsMy+0Gyy47bKgUWXSLtDENE5wdtuqQATm50F1VnPbRGeEw8HXZbiV8fsDvI9ldju9vADAyihLEbrWAZhOoVp3z6iqBUiB1A4nEfwCEsbkL/M4TgE5n5jDx+oTEzp1d8m9tC8H6MaAB0imzx0NU/WKUYE+loEyawDBo2ui6TGfT6ANAxrvx87gYCGCxXEKVJvCWFsG3eh1vN/J4OD6Od4UC8o0G3TX7TGLHwI9iEQmvF9X6Fh7F4/iYy+GcLOMSlfEgGsP0qdNOmX0BiGKpVkV1bw/1nW2b/gCpf1PTcI+Y7eg6ps+G4bG4PR99SjAVo9HE4q+fKNE0vl5awuSohjeijbRefVjAtUgEQRK7Yhi9OKn7nKWZxxlSPWl3QwgnaIrW8QMhD542vUbx/W49m7sq4v4IMABOqi3Ej7bAEAAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-tgz{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnhJREFUeNpsU1trE0EYPbMzSTfdtInFtkkpiaXVWou2FRUEn/so6JugL/oH/Af+B1988if40jcFERQURNBSQdDWlLQN2lsue8neZsZvc7FoOrDszM75znfOmVmmtUYyvry++36yfOeS1qqzDtvH2P76ApPlW3Drb2sHex/uccHWAdbZX30kO2+B3siN3zhTnHuQ66+95i423jzFzOVljBdKOZNHazvVT7e5wF+SZBj9iZJ+3J11mbW2kR8T4LwFli5i4fqTUvnczTUp9RLtDhKgJx0q4dEwWAxrREKICHEsoYYXMXvlcWmquLgmY71yCkG/c0AkARgLMZpnMDMpGNzEYe0dGp6HwvmHpbHC1Wf9MnFCkHQOyYEPzSJwQ2B65Tm5NZG3Fshim6wbMNJn4bpHowMKtIqo2COgR2IcAptwjvcgo6i77igjEmVDqbY8xQJ1VwRULhiBI6+G9Zf3cbTziuzIDkmHSNqECTFgQScEcYuc2NA8TcdYwXD+GkK/TYVN+u72WrIudiAD8o6oAR2RRCmQMjis3CIy1iSpPySCXhFTXeyAgh4BR+JVw8pauLi0Cp4yCX9A90FQhnSBYtnF/k+Q+HYam9itfIZB3QvT8zj8XSW5EhNTs9ivbSLwPUzPLNPJBIMEKnaQYg6aB9+RGR5F5VsNgnNKXMI1NdJGG5WfHzFVLJ7k8c8xUngpVodlDSGbFYj8Y4yMpOG09lHf3yIFPzA3fwHZTAQVtU4JUTeFDrdgDdlI8wAz5Qy2KxswReI7QODZcOr0ZH3q2hIDBI7zq16tuk3FNPxAI4wN+pkoccYoE4YJU5EdUtM4Qst26v26PwIMAKj3P/2YUKgYAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-tiff{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmRJREFUeNp0UktPE1EU/qYzHWstlrYJNcWUElyUJsaNGh9B0g1Lo0v9Ey78EbrVxBhXuHShm25YGBJRQpAYBDEWpaEPEhksdVpbyjzveO4MfZDCTWbauefc736PIziOA77OPH2yJCcSGdg2uksQAKofFou/7VrtASRpvVNynj13f6XOhjg8HAlMTIQdy/LO+v3uYUPTkAHCTb+cK+0pdyGK6+hbvu4/xiyHbncYAwfR19ZgbG/DoO9LsSgeTd9JXoxfyMG2rvQDdBlwIZauQ5ufh12twioU4E+nYU1NIRCNIDs+Bt28mXzx8VNuZ796j9q/DgAwomwqClilAmF0FE4wCInAlkjO4y+r0JgNX2os6XPYS2q/cQyAcQatFjA0BPH6NYipccAwIGUy2CVJFZInkKlyJAqx3T4/IMGmJkeWIWSz5KgI5pdhb3yDXS5DSCYh8rTID8s0wexeVD0GtMd85KkkefFxUfE47M1NokbJkByEQl6tL+ouAI+MUwbFhnYbaJKc/Sqg0x4H4eDRGDA56fUOABA9/GsCpaIHwr8FOhQ823O5RfW66tUGADhNy3RNRDjcN41HLxdQ8J6jYTsOQLfOJBK4f+s2/uoathoNGKT1MtFeVHZxdWTEZfEq/wMKl3rCJOIzTV6ADs2R5ulYDDNkYjp0DhrF+zCVgkw31+v1UxjQZkNV0SADd2o1MIuc9gmY+/kLxb0/UFoHePd9A1qzeUoKpilx9xcLWzgg+u/zeVfuQqkM9bCN1ysrWKXxdtPgvScwUAm58XZ52W16QyPtifRUzi588GbEi1ztHPsvwAC4uC9qhnsZvwAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-txt{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAeJJREFUeNp8UrtOG1EQPfsyXiyzBguIJSyChZBBEFCKpKHLo6egpErNn8CHgH8gkZIiTSIXLhJAWCgkoMgRMSiRBSK29z4y9+I1d/HCrFb3MTPnnjkzlpQSynY+fP70fGF2gQuByCz6lfdd9Uurfvrrjes6762eb3tzQ69uFJwPsqOPC+MBEmxxphi4tlU5OGmsOzaBWLc+O9oIIVhScidkyGZ8vH62nHtSKlaI4cse6TjAfSaFBBcco0EWqyvzubmpyQrj/FXk75cQaSEMeMXU8xykPA/Hjd/6/LRcyjEpt2i7HAe4A2TeLZWKUOJaVLxj27j813EHGKCXaAJExu/4BOdiAED08riQD2riOrexyRoYc3CvsAbLGAAjZga7vgZG23WMCdBvoxKJc36TRBlMiaa2JByjNqqD8qkYc1pjDK7abey+/YhrWlfKswhpiCR96aEU9o5+QE3g2ovVWDm2Sc22bBQm8vrVpbkS9r+doPr1EOWZaQ0yFoxg2PcREosEAI4uvZhJpzFMP+cSXRbq+043RManez+tNWKMI6GN0g0Z04HFR+NoNC/0yx717efZOSbzY3AcR4Op2AGA5p/W31r9e0vNgSrh9OwCrpeCkqvZuqTybnpRqx/r2CjvvwADAJC/7lzAzQmwAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-wav{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAApFJREFUeNpsU1tPE0EYPXtpKbX0wqUQKVQMFdIXQBNCQBs06KP+B8ODGh+Mf4b/4IsGE54kxhcMBrkp7YOQgBRvSKG73fvsrt8Otoask0xmd+b7zpxzvm8E3/cRjPkniyulW0NFy2JoDkEAguOlpXJ9p3L8MBqVl4O9YHxae8pXuRlcGO7KPLhfTDVUqwUgigJMy4Whm6lEXHjxYf3XnByRN0QB/2KaH7btMlUxoRJAcyqKhdOaht7+DJ49n+2cvTnwynXcsb+kLwJ4rgfmMDDGWqvneXCZS9ND7mov5h9ND85M9y86Dpto5rUkuJ4Py3YDJpy6QGJPayqB+Njf+43XL220t0cwOZkfrNXsBUqZugDA6CbLdAiAwaek1ZU9LmP8Rh6S78GsGxjOp9FdzKJaVZIhBgGASzK21w/wbrnCk8euX+EMAjaaZuPHdwUdHVFYluuGPGCORwwYjg5rqOwccRk+3Ux0IEvntmsNG4ZmUayL/wAwKHUNfZfTKN0ZRaw9Cof8qJ/pMAyHy5KkAMTksSEJtnMenM7EMVMawbejMzJRh67bXEYiIXEAVTW50SEAhzqwfqrBcXx4VOhYm4RsNgHbsJFOyZTsQ1MN+hcohoUlkFiMT+TQFpMwXOjGpXgE+XwGk1N5pFJtKNCequgYGupCRBbCDOp0KBJc4VoP3dyBONW8uydBgBHUThqQKCk3mEZ/LoUG+RBioJO7VarAwEAntjYPiUUW9Hh4b2R7k9j98hN37xWx8fGAt3eIAdVMLn+uUv+b2KReSCZjZJiB9bV9jIz2ofr1BKvvd7G9dRC80lae0HzOt+cWVnrSKDrMJykifwNBpCgE/UAllEXufmDu8Zlffvvm8XSQ90eAAQA0pF7c08o4PAAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-xls{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmxJREFUeNpsU0trFEEQ/mamZ3Y2+0zIC2MmITEkUYgERFQErx5E8KTi1b/h79A/4SW3nCNeYggBYZVEMU/y3N3Z7M7OTD/G6lk2ruw20zRdU/XV91VVG0mSQK/3n1a/jky6d6Xs3G8WXS+Pw5N6LXjLLGuna/78oZKerGsYKtrDE16uJGL1L9gEOOcYd2dL1fNwrbL//aXN7J1efPMmkUqEFAk0A0VZNbFEaQCBscIkXj975y3NLq9xye8PBkAniHOFph+j2eC4rsdoB4LsFubGl/Hq8RtvYWpxTQi52o1jvWiGYaRZL0/auDgOkC/Z8BYL2Pqxidp1FZkhoDxpeaXA/Ujuj/4HoOxKKjiOiek7RUShRNQWaNYFQuMafrYCxiw4ozZKfqbYJ0EvRdl1DQyyTs8XCNTA6UELMwvDyLpZWIZNNlNLlQOK2LMJRJ+5AkuZ1S7CFFzJzk56GnUjQWlYkqCoBWFbonEVYcLLA4dNnB624GQsDBWIgfZJEgxkoChzSFWvn4VpQemDm2VwXQsXJwF1h6c+gxlQ5jgSiEUEt0wdIe7tMES+nEG2aCLiJMOIIWIr9e0DEELAMUrwRuchVAyTKimUwO75Jm6VF3Bv7imOaj+xd7UFKVS/BPJF1b/E4tgTrE49J60O5kceoNqowiuuYKa8ghHXA48U9MT2AQgyRvTThE30bQiaSGa4yLMJNFo+Dq/2cHt4CYlwyFf2S6BHwwrMw/avDbR5C1k7h1YQ4KH3Amf+AcZyEbZPv9CItzQD1l9EbtYOjv74v/d3O9RMPTDrsEwGIWN8q2yk7XNYRs9JrRv3V4ABADSGR6eQ0/NQAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-xlsx{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmlJREFUeNpsU8tqFEEUPVXdPY/ueWZIoiYZiSYKYhJc6EbduHOhgijo3t/wH1z6B0JAhOyMILhxo4kJGk1ASTAxwWF0Mpp5dHc9vFUzYwidaoqmq+8959xzbzGtNcx69PTS26ETmQtS9r4Hy/xv7MW7jV+th5yzVcaYPX/++It9u4NAv+CVR6tBUUTqMJsDcRzjZOZM8W9ZLKx+/XDb4e5/kH5In0lpIYWGUaC0YTZnBCAEKoVR3L36oDo7NbsglZwbqD6iQKOXFMcKUVfBkBAoQhlD5xxMDp/HrSv3q1JgYW3z0x0KXzkCYJaRZljru23aHWTzLiamAyytv0O9UYdf5PArqlppBfMUfu4oALErqZBKcUxMFRCHEp0DgW5Lo4N9NIN1dF0XXsVFOUyPJTzo+WBANDidjp8tgHGG3c0DnJ4uIRf4cOCBaW5KjY8xkZL72xpJ9QcFz5bVqHUJGHZL2YtNmKi06YCyiVFb4s/vEKMTAf1p4edOG6mMi1zR6wEpdUwX+vLDtkCzHoK7ptcM6ayLmGajvtex4PliyoIkFRjmUEASelB2rXQRSfjUCT9PlWpmW21iTGzCAyEkUixPRqXhe2V4zKczbdmybgkpJ0cGOuA6Y2MTCsKoi5HsNK7N3MN+uwYaWbxYfoLLkzdxcew6lrYWaZhm8PHHG3zffp1UwJSHz9vvkU8PodbcQYYYS5lxYkxTkGdVDQdV1Js1qPgYD6JIuIE7gsXVefIhIuM05k7dwMbeMmh87a18ufIMaVYyprrJLgje2Nr+1tzYXANnDnr3zRhHj37Vvy2wpXHtNAd5/wQYAD6WMuT2CwoVAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-xml{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAilJREFUeNqMks1PE0EYxh+g3W2t1G0sEqyISynUFJsSOShNwCamiYZED3LgIkcuxoN/iCZePZiYGD2aGD+i0F5KMChxlVaakAK2ykcAt+WzdLu7zkxo3WZL4pu8mXfmeeY3885ug67roPFh5nvc62m9hjoR+5LMp7MrkYf370qVtco+VtCUFpbj+jGR+JbWn76OyQ8ePwsZATQb8R/hanZgINgj9IqeuBFCw1Kt9OMBnNWCs24XwkG/QKYUEiGjVAPQof/rq0783pShET3ULQo8xz0iS5FaANmrHQH2DoqY+DSLSz6RzecWlnD9ymU47LYjd4O5BXqDTG4FM3NpTEkpdJ5rw0AowLRMbhUfp58gTOaD/UHmNQPI6YmvKWRX1zESHUJ/oBs2nmPa+Mgw0ZIM3tZyGoJwygzQNB2jNyJIZX7iB0lpPoM70UGmPX8zCU+rG8NDVxHwdiC5mKsPUFUN/gvtLLf39sFzVqaN3YrC6TjBauqhXhNA1TQoqloV7Da+pjZq1FsXUCamF29j6LvYhf3iISamZ3Fv9DZevouhRzzPfOG+3hpA9U9UyioOlTJ7pFeTCQS6RGzIebyf+oz5pSzWtmSW1EO9phvQ00slBRt/8qR3DoWdXbiczUiTzd52D+tdLmyTB14mx1rMAKVcRpEATjrsuElee/HXGmnFRyBOGD30C/nEDjNgs7CDpsYmnHG3YPegBCvHs9oYfm8nG9dJa5X4K8AAQzQX4KSN3wcAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-yml{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAdxJREFUeNqMUl1rE0EUPbM7m5Y0Zptu21AwWwhYpfSDFh+kvvRd8N0Hf4I/xWdf/Q158F0QoQ+CVsFKaLSQpt/dpmvztTOzzky6cetOpWcZZvbO3MO5514SxzEU3r57/3GpWllM/tP4sL3TarROXuSo/SWJvX71Uu80Cfhlr/T4UdWFAVfdnmsTUtvdP35OUyQKVnJgXDBTcj9icAsTeLax7j/052qM81UjwW1QJXEhMF0qYnN90fdnvdogYmvJPU0/VBApD4hcDrWRcyikfB17srzgW7b9Rh1vEvxDlI4tVytaBSEEtmWh0xsUMwpwnWjqAlcxogiHd1wiQyCu87iI/+sJtf6+NXsgpd7FWCMB50KvkYMGMbLdZgLlfj+K9K4+FnFQ2x7WntIs50AbmiGwLILt+k+EvzvSNIHzdigdJ/AmXQRhiHv5POSwYmG+cqPVo0HqDxj8uTK2vn1Hfa+JmdIkvtZ/4fOPXU3WPDpFeNWVyUKryCiIGMN4zsH98gym3CIcOTwT+XHdXrdQQHAZotE8kBPpSqPNHtBOr48HUmLOcXRJT9dWNMGYJFby91pHOAvaykSaITg+bwefdhrteDRTMSwyrFCgI88E056Hy+4Ah2cXQZL3R4ABALUe7fqXWFN6AAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-zip{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAm9JREFUeNpsk0tv00AUhc+MY6dOmgeFJg1FoVVpUWlFC0s2IFF1jxBbhKj4BSxYdscPYcEmQmIDq0gsERIViy4TpD7VFzF1Ho5je2a4thOqNhlp5Mz4zudzzp0wpRTC8fPrk0/TC6+fDtYicLH97T1Kc2vQDcs+rH3eUAxVznn0fn1DRM8E+iOdv5ct3XmZG6yVlNj6solUbgVTt0q5FGtX6vXqC6VklTE+KAO/OODHSIQPRQpsXC+kkEz2ELA0ystv84tLzyucsbWByisAGf+QAS2CCDRRLMJMmxC+i8C4jdLCm/zM7OOKFGptcO6/BTpJ0yeQB0Y+mfKQuZZG0jQgeRbW8Xdomobs9LN8scc+UPHNy4Dwq8IljotIIQEm59/RoSyM1CKkXKZNBm7kIVgyM6wgAnSgRK9vqQfHPiMFDHqyFVsLR9Cm0o4YzoAASrSjCelQfRPb1Vc4qn0EY5L2W9GEaBLcxQgFHpGbkMIDJ69e+wjJ8VXqRgKid0r7ftQdxkRs9SqA2kgAm14SSIQh9uhuLGPMnKJs/5KquL1x0N0RCsizigoDaLqBdHoMiyvrlBsHVx1wphD4BCewoqxGKKDwAgtOy8JufYuk+5golGGaGZwc1sIGoDz3AOPZSVLaHgVwydoJDM1H4DbQODughB3YpOD44HfoHgnu4e7So0uAi0stHLJ3Aud8B9bpHu6vPoSu9TtDl6tUuoFiIYOgu0+158MKmOxomtyD3Qi/3MTR7i8K0EDG1GHO5DE3X4DvNahZlJOwEkOATvdPc2//hx3mXJ5lFJaF8K8bStd0YGfnOJbMGex21x6c+yfAAOlIPDJzr7cLAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}\n.narrow {width: 0px;}\n.padding { margin: 100px;}\n#header {\n background: #000;\n}\n#logo {\n height: 25px;\n margin: 10px;\n}\n.ipfs-icon {\n width:16px;\n}\n"},function(e,t,r){"use strict";const n=r(1039),i=r(1040);e.exports=((e,t)=>{let r;e.endsWith(".svg")||(r=n(t));const o=i.lookup(r?r.ext:e);return i.contentType(o)})},function(e,t,r){"use strict";const n=e=>[...e].map(e=>e.charCodeAt(0)),i=n("META-INF/mozilla.rsa"),o=n("[Content_Types].xml"),s=n("_rels/.rels");e.exports=(e=>{const t=e instanceof Uint8Array?e:new Uint8Array(e);if(!(t&&t.length>1))return null;const r=(e,r)=>{r=Object.assign({offset:0},r);for(let n=0;nr(n(e),t);if(r([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(r([137,80,78,71,13,10,26,10]))return{ext:"png",mime:"image/png"};if(r([71,73,70]))return{ext:"gif",mime:"image/gif"};if(r([87,69,66,80],{offset:8}))return{ext:"webp",mime:"image/webp"};if(r([70,76,73,70]))return{ext:"flif",mime:"image/flif"};if((r([73,73,42,0])||r([77,77,0,42]))&&r([67,82],{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(r([73,73,42,0])||r([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(r([66,77]))return{ext:"bmp",mime:"image/bmp"};if(r([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(r([56,66,80,83]))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(r([80,75,3,4])){if(r([109,105,109,101,116,121,112,101,97,112,112,108,105,99,97,116,105,111,110,47,101,112,117,98,43,122,105,112],{offset:30}))return{ext:"epub",mime:"application/epub+zip"};if(r(i,{offset:30}))return{ext:"xpi",mime:"application/x-xpinstall"};if(a("mimetypeapplication/vnd.oasis.opendocument.text",{offset:30}))return{ext:"odt",mime:"application/vnd.oasis.opendocument.text"};if(a("mimetypeapplication/vnd.oasis.opendocument.spreadsheet",{offset:30}))return{ext:"ods",mime:"application/vnd.oasis.opendocument.spreadsheet"};if(a("mimetypeapplication/vnd.oasis.opendocument.presentation",{offset:30}))return{ext:"odp",mime:"application/vnd.oasis.opendocument.presentation"};if(r(o,{offset:30})||r(s,{offset:30})){const e=e=>e.findIndex((e,t,r)=>80===r[t]&&75===r[t+1]&&3===r[t+2]&&4===r[t+3]),r=e(t.subarray(4,2004));if(-1!==r){const n=e(t.subarray(r+8,r+8+1e3));if(-1!==n){const e=8+r+n+30;if(a("word/",{offset:e}))return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};if(a("ppt/",{offset:e}))return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};if(a("xl/",{offset:e}))return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}}}}}if(r([80,75])&&(3===t[2]||5===t[2]||7===t[2])&&(4===t[3]||6===t[3]||8===t[3]))return{ext:"zip",mime:"application/zip"};if(r([117,115,116,97,114],{offset:257}))return{ext:"tar",mime:"application/x-tar"};if(r([82,97,114,33,26,7])&&(0===t[6]||1===t[6]))return{ext:"rar",mime:"application/x-rar-compressed"};if(r([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(r([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(r([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(r([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(r([51,103,112,53])||r([0,0,0])&&r([102,116,121,112],{offset:4})&&(r([109,112,52,49],{offset:8})||r([109,112,52,50],{offset:8})||r([105,115,111,109],{offset:8})||r([105,115,111,50],{offset:8})||r([109,109,112,52],{offset:8})||r([77,52,86],{offset:8})||r([100,97,115,104],{offset:8})))return{ext:"mp4",mime:"video/mp4"};if(r([77,84,104,100]))return{ext:"mid",mime:"audio/midi"};if(r([26,69,223,163])){const e=t.subarray(4,4100),r=e.findIndex((e,t,r)=>66===r[t]&&130===r[t+1]);if(-1!==r){const t=r+3,n=r=>[...r].every((r,n)=>e[t+n]===r.charCodeAt(0));if(n("matroska"))return{ext:"mkv",mime:"video/x-matroska"};if(n("webm"))return{ext:"webm",mime:"video/webm"}}}if(r([0,0,0,20,102,116,121,112,113,116,32,32])||r([102,114,101,101],{offset:4})||r([102,116,121,112,113,116,32,32],{offset:4})||r([109,100,97,116],{offset:4})||r([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(r([82,73,70,70])){if(r([65,86,73],{offset:8}))return{ext:"avi",mime:"video/x-msvideo"};if(r([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/x-wav"};if(r([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(r([48,38,178,117,142,102,207,17,166,217]))return{ext:"wmv",mime:"video/x-ms-wmv"};if(r([0,0,1,186])||r([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(r([102,116,121,112,51,103],{offset:4}))return{ext:"3gp",mime:"video/3gpp"};for(let e=0;e<2&&e1&&void 0!==arguments[1]?arguments[1]:{},b=[],v=0,A=void 0,w=void 0;if(isNaN(e))throw new Error("Invalid arguments");return o=!0===y.bits,p=!0===y.unix,t=y.base||2,f=void 0!==y.round?y.round:p?1:2,h=void 0!==y.separator&&y.separator||"",d=void 0!==y.spacer?y.spacer:p?"":" ",g=y.symbols||y.suffixes||{},m=2===t&&y.standard||"jedec",l=y.output||"string",a=!0===y.fullform,c=y.fullforms instanceof Array?y.fullforms:[],A=void 0!==y.exponent?y.exponent:-1,s=t>2?1e3:1024,(u=(w=Number(e))<0)&&(w=-w),(-1===A||isNaN(A))&&(A=Math.floor(Math.log(w)/Math.log(s)))<0&&(A=0),A>8&&(A=8),0===w?(b[0]=0,b[1]=p?"":n[m][o?"bits":"bytes"][A]):(v=w/(2===t?Math.pow(2,10*A):Math.pow(1e3,A)),o&&(v*=8)>=s&&A<8&&(v/=s,A++),b[0]=Number(v.toFixed(A>0?f:0)),b[1]=10===t&&1===A?o?"kb":"kB":n[m][o?"bits":"bytes"][A],p&&(b[1]="jedec"===m?b[1].charAt(0):A>0?b[1].replace(/B$/,""):b[1],r.test(b[1])&&(b[0]=Math.floor(b[0]),b[1]=""))),u&&(b[0]=-b[0]),b[1]=g[b[1]]||b[1],"array"===l?b:"exponent"===l?A:"object"===l?{value:b[0],suffix:b[1],symbol:b[1]}:(a&&(b[1]=c[A]?c[A]:i[m][A]+(o?"bit":"byte")+(1===b[0]?"":"s")),h.length>0&&(b[0]=b[0].toString().replace(".",h)),b.join(d))}o.partial=function(e){return function(t){return o(t,e)}},e.exports=o}("undefined"!=typeof window&&window)}).call(this,r(12))},function(e,t,r){"use strict";e.exports="html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a{background-color:transparent}a:active,a:hover{outline:0}strong{font-weight:700}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}table{border-spacing:0;border-collapse:collapse}td{padding:0} @media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:\" (\" attr(href) \")\"}tr{page-break-inside:avoid}.table{border-collapse:collapse!important}.table td{background-color:#fff!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.row{margin-right:-15px;margin-left:-15px}.col-xs-12,.col-xs-2{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-12,.col-xs-2{float:left}.col-xs-12{width:100%}.col-xs-2{width:16.66666667%}table{background-color:transparent}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table{margin-bottom:0}.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child{border-bottom-right-radius:3px}.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.row:after,.row:before{display:table;content:\" \"}.row:after{clear:both}@-ms-viewport{width:device-width}.ipfs-_blank{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAWBJREFUeNqEUj1LxEAQnd1MVA4lyIEWx6UIKEGUExGsbC3tLfwJ/hT/g7VlCnubqxXBwg/Q4hQP/LhKL5nZuBsvuGfW5MGyuzM7jzdvVuR5DgYnZ+f99ai7Vt5t9K9unu4HLweI3qWYxI6PDosdy0fhcntxO44CcOBzPA7mfEyuHwf7ntQk4jcnywOxIlfxOCNYaLVgb6cXbkTdhJXq2SIlNMC0xIqhHczDbi8OVzpLSUa0WebRfmigLHqj1EcPZnwf7gbDIrYVRyEinurj6jTBHyI7pqVrFQqEbt6TEmZ9v1NRAJNC1xTYxIQh/MmRUlmFQE3qWOW1nqB2TWk1/3tgJV0waVvkFIEeZbHq4ElyKzAmEXOx6gnEVJuWBzmkRJBRPYGZBDsVaOlpSgVJE2yVaAe/0kx/3azBRO0VsbMFZE3CDSZKweZfYIVg+DZ6v7h9GDVOwZPw/PoxKu/fAgwALbDAXf7DdQkAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-_page{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmhJREFUeNpsUztv01AYPfdhOy/XTZ80VV1VoCqlA2zQqUgwMEErWBALv4GJDfEDmOEHsFTqVCTExAiiSI2QEKJKESVFFBWo04TESRzfy2c7LY/kLtf2d8+555zvM9NaI1ora5svby9OnbUEBxgDlIKiWjXQeLy19/X17sEtcPY2rtHS96/Hu0RvXXLz+cUzM87zShsI29DpHCYt4E6Box4IZzTnbDx7V74GjhOSfwgE0H2638K9h08A3iHGVbjTw7g6YmAyw/BgecHNGGJjvfQhIfmfIFDAXJpjuugi7djIFVI4P0plctgJQ0xnFe5eOO02OwEp2VkhSCnC8WOCdqgwnzFx4/IyppwRVN+XYXsecqZA1pB48ekAnw9/4GZx3L04N/GoTwEjX4cNH5vlPfjtAIYp8cWrQutxrC5Mod3VsXVTMFSqtaE+gl9dhaUxE2tXZiF7nYiiatJ3v5s8R/1yOCNLOuwjkELiTbmC9dJHpIaGASsDkoFQGJQwHWMcHWJYOmUj1OjvQotuytt5nHMLEGkCyx6QU384jwkUAd2sxJbS/QShZtg/8rHzzQOzSaFhxQrA6YgQMQHojCUlgnCAAvKFBoXXaHfArSCZDE0gyWJgFIKmvUFKO4MUNIk2a4+hODtDUVuJ/J732AKS6ZtImdTyAQQB3bZN8l9t75IFh0JMUdVKsohsUPqRgnka0tYgggYpCHkKGTsHI5NOMojB4iTICCepvX53AIEfQta1iUCmoTiBmdEri2RgddKFhuJoqb/af/yw/d3zTNM6UkaOfis62aUgddAbnz+rXuPY+Vnzjt9/CzAAbmLjCrfBiRgAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-aac{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnhJREFUeNp0Uk1PE0EYftruVlvAUkhVEPoBcsEoLRJBY01MPHjCs3cvogcT/4qJJN5NvHhoohcOnPw4YEGIkCh+oLGBKm3Z7nZ3dme2vjOhTcjiJJvZzPvOM8/HG2q325Dr3kLp7Y1ibpIxjs4KhQBZfvV6s7K5Vb0bjeof5ZlcGysP1a51mifODybvzE8mzCbrAoTDIThMoGXZiZ4YSiurf+Z1XeuCqJ7Oj+sK3jQcNAmg8xkGQ71mYejcAB49vpmeuzJccl0+dUj6KIAvfHCPg3N+uAv4vg9BOxcCmfEzuP/genpmeqhEMgude10Jwm+DuUIyUdTlqu2byoMfX/dRermBeExHsTiWNi3+lMpzRwDki8zxCIATmzbevfmClukiP5NFhJgwkjeRTeLShdOoVJqnAgwkgCAZ6+UdLC9twjQZ8pdzioFkZBHY3q6B3l4dJEEEPOCeD4cYVH7Xsf15F+FImC775INAJBJSkVoWo0QY9YqgiR4ZZzRaGBkdwK3bFxGLRZUfB3Rm2x4x9CGtsUxH9QYkKICDFuLxKAozGZwdTqBRs2FbLlXbiPdECMCHadj/AaDXZNFqedCIvnRcS4UpRo7+hC5zUmw8Ope9wUFinvpmZ7NKt2RTmB4hKZo6n8qP4Oq1HBkKlVYAQBrUlziB0XQSif4YmQhksgNIJk9iaLhPaV9b/Um+uJSCdzyDbGZQRSkvjo+n4JNxubGUSsCj+ZCpODYjkGMAND2k7exUsfhkCd+29yguB88Wl7FW/o6tT7/gcXqAgGv7hhx1LWBireHVn79YP6ChQ3njb/eFlfWqGqT3H3ZlGIhGI2i2UO/U/wkwAAmoalcxlNA1AAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-ai{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAk5JREFUeNpsU01vElEUPTPzZqBAQaSFQiJYUmlKYhoTF41L3Tbu/Q/+AvsX3Bp/gPsuWLrqyqQ7TUxMtAvF1tYGoXwNw7wv7zwYgtKX3Lw379575p5z77O01ohW+/DVh8zj7aYKhflGdG9ZsGwLNydffgVfr19YHvsEa+Zu/nxndob5StQK+dyzvZzyw/gKlmMj7IygFM+xvNcanp4/t5dAomXHBy2UUBOO2MAl/B9/cPb6PULuoHx0WM0e3GvpUOxD3wZAJWutZqYUYmqpSg5OMgH3YQObL59W0/ullpryR3HegkKEqiWBSGV4R3vQ7sIhScTZFTpHx3A215B5sluVY/WWMg7+ATB/lcLsKpTonHzD+OMFEuTz8ikkt9Kwt9YJZB38cpBdoQAZJdLvCGByfoPB6Xdk90pYy6Xg3c/DaWwArg09DaG5lCsUFN0pckZAojdC8m4auBqaALuSgez7VB1RtDSUWOQvUaBLFUzJBMJ2DwmPgd1Jwm0WoSgJfjDvrTKxtwAIyEkAOQ5hU//Zdg5uowDlUNMnwZLW0sSuUuACYhwQRwFvJxupCjEYUUccOkoaKmdOlZnY1TkgAcXAhxhOwLsDsHoN3u4O5JTDfVCH6I9nfjId3gIgSUATFJk/hVevGtOMwS0XwQ3AzB/FrlKg8Q27I2javVoZrFgwD4qVipAEyMlnaFArzaj/D0DiMXlJAFQyK2r8fnMMRZp4lQ1MaSL5tU/1kqAkMCh2tYI+7+kh70cjPbr4bEZ51jZr8TJnB9PJXpz3V4ABAPOQVJn2Q60GAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-aiff{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAohJREFUeNpkU9tqE1EUXZmZpE3aTBLbJFPTtFURtSCthr7UCyKKFJ/9An3og6Ag/oXfoUj7og9asCBYKT6UIPHaWtpq7NU2aZK5z5wZ9xxMpMwZDuewz9prr32ZiO/7CNaDx3OLt6fOjBqGg/aKRCIInp8+KzfKH7fudnVF58nE16el+/yU2mBFSWZKpWJKVc0OgUBo02K4NDmU6o75Mx+Wdu9IUXFeiOA/pn1xHeYaugVDdzpbp91qGlAKGTx8dC19/Wpxhjnsxj/RRwk85hGJC9d1O6fneWAuoztDYSSLe9OT6SuXB2ccx73Z9uukwDwfls1g0xZIY/Ad/Gnyt/XVfbyYrSDRE8PExHB6/8B6QuaxIwRBFMt0iIAiMx+LCys8jfGJEUik2WpZOD2SQf9oDtVqQwopCAiY66FS/om3b75CVS2MlU7AJ2WiJBCZjZ2dJuRkDJZFwFAR7UCBja3fNfxY2YEoCtRCj9em3Tpds6FpJseGCBxS0GgYGBzqw62p84gnYnAI2CSbSbPhEpFAaE2zODaUAlWWwDoS5DheGqbWpVE/0CmqCY9qkEyINBceb2uADRNQ8bSWAVVzIFKomCQim+0luS4yKYlsHlRyZo7EsSEC23K5vAsXh/H92zZkuRvxeBS5nEx2yp2KqhxPoV5TYS/8CtdApylM9sZQKKSQzyeRTseRV2QoAzIYY8jme5DN9fI0dQoUIjANGydP9VM7PZw9p/AiBpNYrdbw/t0yTJqRtdU9UrfJCUMpSJIgbWzsYe51BcViHzLHeqCRqhZ1YX1tFwNfZBxS9O3NWkAcHqR606k/n/3coKAoV/Y7vQ/OYCZevlrmv3c0GsFh06u3/f4KMABvSWfDHmbK2gAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-avi{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAm1JREFUeNpsU8tu00AUPXZcN0nzTpq2KQ3pAwkIAnWHqCoeexBb+AQ+ABZ8A2s+AIkdm266QUJIFWKBkHg1KpRHi5omJGkbJ3bGHj+4M1EQrTvSyGPPueeec++1EgQBxHp+/9mbyuriRZdxjJaiKBD3W+u1+p9a856max+gDO8ebT+WT20Ezi9NZi/crqadvn2MQBAGfpCOpqNru2937vxPIpY6Onjccx3Twck9MBiSU0ncfHirXFmZX3Md9wqCUwiEVN/zaQfHt0vfbBe5uQyuPVgpl5Zn11ybL4/i/lkICOw5niQRGQShoiqI6Bo43W2ub8n3hRtLZT7gTynk6gkCX9gAOxpAnxhHZDwC1/aI1EViJolu/QhKRMHZ1UX0Gr1USIEn5FPWHy+/wTokkrQOq2vBaHZBN4hmY9Jwfr4An/teiEB45ZZDwDiMhoExT0N+sYDCuUkkplLIlXP4/XEXdo+RUhdhBSSfUwtVTUG8MIHK9QVqI7D/uY6vr2pwmCPrkz+Tk9gwARWQ9WxppbXZhNnpw+ya4A5HZi6L4lIR8WyCcL6sTZiAWjWgAmpxkn5+kqTamK6WkCwmERmLDLvjB0ML9ikWXPLFuozYOap3L8HYN6DHdbS/d5CeTVBndBz87FCBLYkNTyIjBQemnIEsSY5lYrK1+UoWcToLMjEHAyIQ2BCBSx/NVh+ZUhrqmEqBebS3WyhdLg0zt/ugAaIklsSGLHCLa6zDMGhZ2HjyGsnpFPqNHnY2fmHv3R5SMymYbROszSQ2ROAY9qHiofvlxSc5xsKKqqnY3diRE9h4X5d/pzg7lnM4ivsrwADe9Wg/CQJgFAAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-bmp{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmZJREFUeNp0U+1rUlEY/13v9YV0vq2wttI5CdpL9aEGBZUDv0df668I6n+or0UQ/RuuD0EgVDAZrsKF4AR1a6COKW5qXvXec27PuVeda3bgcF6e8/ye5/d7niMZhgExnK9fbTrm5pbBGMZDkgCyq+VyhTUaT6Eo2ZHJePPWXJXRhez3B1yxmM/QdctXUSCgtV4Py4CvY3cky4e1x5DlLCaGbbzjXDcousG5OQe5HPRSCQPK4PpsEM/XH4WvhS4noeu3JwHGGRiULhsMoKZS4I0GtEIB9mgULJGA0+9DPBpBT7sffvf1W/Lg6OgJufw8C0CRGEXWazUwiiyFQjA8bsjVKjaJzovMD/Q5gxyJhG2cvyeXe2cAuADQNGBmBvLaGuTFRaDfh31lBTWi9pumjbK0B4JQul3vOQpM8JdskOLrdCvDcDjAsjtg5TIkoiKLaokMNR2cnZbqNAMycqG7XbHKR2fMzwO/dsxSwu0BiBJsNsv2LwAJAJCI5ux2gXYbqNetcz5PoORI1cDS0n8AxGW7A+zvEYBKZ2ZlcsEtJLbedMjePBaCTQMghx45ulyWkzxMVUQ2RMQhLfFO16YAqCrixPnm6iqKrRb2W23EfF4cUNSrHg90cr7hDyB33MTnSmUKALVs4uIlROjxg+AsPhGVl3fuIl2tIOB0Ya91gkOi9mxhAal0ekork1ic/kGLBORMxy2K1qS9V1ZQbNThIj2EGh+2tsyOnSai8r1UxMNIBB+LRTTULr4Uds0K1tU/uOLxIrmbNz8XXSrnASSpubG9fbKRyVh1n/zSw29t9oC1b47MfwUYAAUsLiWr4QUJAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-c{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAcxJREFUeNqEUk1rE0EYfmZnkgoJCaGNCehuJTalhJZSUZB66a0HwXsP/Qn+FM+9+hty0LNYCr2I7UVLIW0Fc0hpQpSS7O7MrO9MspuvVV8YMnk/nn2e5x0WRRFMvP/w6WSz5jbi/9NxfP693Wp3DrJCnMW5d28P7a+IE15lufR8o1ZEStwPhkWHsWbrZ+eNEPxsuubEF6m0TBv2Q4liPofXuzveulttSqW2UwH+GjqC0horpSL2njU89+FyMwjlTlxOJMTa9ZQHzDQIjgwdom9zLzfXPc75kbnOAswBJTlC2XrqQRMLxhi442DgB4UFBhgPpm3B5pgBHNUUxQKAHs8pHf3TEuFMetM9IKr/i2mWMwC0SnuSFTG2YKyppwKYVdGO7TFhzBqGIenVeLCUtfURgErucx5ECKREKBU4d3B718PHz6cICGT/1Qs8qpQtGOdyhtGEARWDQFqQJSeDL98u4VbLaKw9IRAJPwjtoJGlVAoDQ800+fRFTTYXcjlcXN2g++s36p5Lzzlve1iEROa8BGH1EbrSAeqrjxEqicHQt8/YSDHMpaNs7wJAp9vvfb287idboAVkRAa5fBYXP9rxO4Mgf0xvPPdHgAEA8OoGd40i1j0AAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-cpp{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAfJJREFUeNqEUs9PE0EU/mZ2WgqpXX+QIDFdalVslh8NlAOQaOKFAwfvHvwT/FM8e/U/MOnBmwcj8WD0ACEGghIkbU0baaEthe3OTJ0ZWV26q37JZt68ee/b9733yGAwgMbL12/fz+azbnAPY2Nrt7Zfqz9JMrYZ+J4/e2pOFjiciRvXlgp5GzHonXk2o6S8V6k/TjBrM/xGA4MLyeOSPZ8jkx7D+uqCU3Amy1yIYizB36AlCSkwfjWDR4uu40yMl/s+XwjeWThQQ4Z6QNSnSkYykcDXasP4lmfvOZTSF9q8TDBEFPbN5bOqCglCCCxK0TvvZyIV4CIxbgpC+4gm/PUmFCIE8iJPyME/e8Lon9j4HvyHYLjKSwRCSEUgf9+15mFbx8QS6CZJMzJ9SlBCwX3fJDLG4PX7ykcwkmQmJtpEhWa7g1dvNlSwjwelebz7tAXLolh0p/Fxe9fErK2WDFGEgKjxfNjegX0lDTc/heNuF99/HGEslcKXwyoazWNDdlCr6+DoJgrBzdI0T9rYO6yg2zszMlaKM3Dv5OBzbuyZuzm1B16U4Nzz2f3cFOx0Gq12F9cztpExncsqYoaHpSIKtx0zJdVIFpHQ6py29muNk1uTN829o/6SHEnh80HFaE6NjmLnWxUJy1LyTltB3k8BBgBeEeQTiWRskAAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-css{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAk1JREFUeNpsUktvUlEQ/u5DoCLl/RAKKKUvWmIxjYntQtcu3LvwJ/hTXLt16coFC2PsojEaMKZtCqFaTdGmjbS0CG3By+vei3OOBSGXSU7uzNyZ78z3zRF6vR6YvXzzPrMUCyf68bB9zO+VfpROn5hkOdfPPX/2lH/lfiLidztX5mN2jLGG0rKLENIE8liWpdzwP7HvqJqujmvudFU4bFY8Wk1FZsOBtKppd8YCDNu77CZevd3gflfTUFcUhP0ePLibiIR9rjSBpgwAfe4dVcV6dhtep4PH5msylGYLrzeybErcT85FYiH/CyPAf74gObC2vMhzsiRhPhpC6eQUM+EA1pJzILEnjRSuJsju7MJqsUCSRei6Dp3yXqcdGlHZ/rLPazQWGCn8+6YW4pAkEW0SjzUzanWlCa/LgcR0lNfovTEi6lcIkzesnM/R8RlN0INGp3h4DHoDsE5YRvQyiKiRSMzikRAOS2WoqoZWu41K7RwzlOOAVDMMMHhIGvFlRxJFrKYW0ep0IYgC3SDh4b1lTJjNfENsrazOAMAw680mPuW+8lFno1P4XDigRhOiwQAyJK7TbsNS/PaA7giAIAhYz2yRgBIfsVA8wIetPG6FAqhdNrC5u0f+TUyHgyMTDDToEt/ftQsEvW4EPG5OZcrvw0mlimarTXkPfpXPcNlQoGtjACgpryQXsPNtH/nvRXqBJpoKHMzGNkNB0Odls7LNyAYKpUq1dt1iuvB7fRDp9kr9D1xOFwkpoksXusmXaZWFn0coV89r/b6/AgwAkUENaQaRxswAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-dat{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAfVJREFUeNqMU01PE1EUPe/Na0uptmlASg3MoiZgCA3hQ8PHAjbqwsS9C3+CP8W1W/+BSReyYUPwI4QAVkAgUEgIbVIg1FZb2pl5b3zv2cHBjsaTTOa+e989OffcGeK6LhTevFv+OJoZHPHOfrz/sl86KpWfhxnLe7lXL1/oN/MSZqonOXU/k0AA6lfNhEFIrlAsP2PMyPtr1AscLpyg5pbtIHErhqez4+awmc45nI8FEvwNaiQuBHqTcSxMjJhmX0/Osp1xr878FxWEzwMinxAzEA4xFIpnOjedHTKpYbxW4U2CP4j8uWxmUKsghMCgFI2mFe9QgHZj0Ba4yhFF+KvGJToIRLuPC/efnjD6+26wB1Lq/xgbSCBXKeWJG/OTdky8cWTdT3C9RmWSGk2XCLlWo4xTNbfN5qh7PpXM72GjZeHt0gpq9QbmH4whGb+NpU/reDQ7hcWVVXxvXOHxzCQopQEKXKEbL6o1ZIcy+LC5g62DY2zsHeC0fA4zndIrHOjvg2XbAQRSfsuy9XxC2qzi/H5B6/68W0AsGkW0KyJPBLbDO0fg3JX/CUM81i0bD6WKe6j9qOPJ3EMcF0tSNsFA6g6alqW+VtZBUL78Vtk+Oqne7U9rs5qOQCjSheJFBeFIFOfVujSUYu3rIc4uqxWv76cAAwCwbvRb3SgYxQAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-dmg{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAn9JREFUeNpsU01rE1EUPe9lkk47yWTStCmtNhFSWxos2EXVhSsRcasuxYV05V8Qf4DgD/AvCK5EV1oFI7iUBqmCNdDvppq2mWSSzEzy3vPOpFFq+uDNfR/3nnvueXeYUgrBWH1/9/NE7k5BKRnuRcfF2qdnmJq9DeF9tQ+2isuMsxXGWHh/a1mEVsPJSI5fSU3OPEj291IIlN49RXz0KqzEQjIeZS/L5Y/3wPGhDxIM/i/A7fZWgVG0t5EaG0ZUa0JGM8gvPrZmLt58QYwv91mfAqCIE0sAqgumBFITGQzpUYhuF0KfRa7waDyXXXolpVrsh/0tgSLDr5I+wUZo1UHCSkAficPzY6juFSmbRPrC/azjq+fkcO00gAqoU7B0ETKkfWbuCTjTYeq5oESAauexcTScX+ZACWFm0YQSLZKhHdr67+/wW0e0dgjYo3sCEXXybYtBDVSHLp2es3IpsILS24c42lkBg6DzRjgRzCDZ/xr0GNRJwwYiWgzt+hYMawleu0V3wbkT+kUirOc7IGJAz68R/Qak1BAlx3hqASPGBJRXpXOv58dkz3eAgQoOm4hyj57NgZm0MHvpBmK6QdUdg/DAg9cRkhicBSDaKJdeo1bdxmR2DtWDDUxl51HZ+QHTysD3XdQO95Gfv06aeGcAdBrY3Chi8lwO3768QWX7J5q1XWyVSxgajiOXLyBG2hzurRKV9lmt7ISNkkjo6HhNyjoK+2gXRsKE57ZIE2ot10Z1fz0Ue4ABVw3NMjnW14rInh8jTYywoTg3EOFpOM4mXNfH9PQUfGlrAwBOs3I8ljbtuMWhRWzIIPrkn+GcYcgIWEowbZ+0qB334/4IMADESjqbnHbH0gAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-doc{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAppJREFUeNpsU79PFEEU/mZ39vZu77g7DokcP04BBSUmiEKCSCxs7Ei00JAYO2NlTKyMrX+CJhaGwopSQ0dMtFEsbDRBgiZEQIF4IHcg+2t2Z8eZ5QDlnM1mZ9+8973vfe8NEUJArfSNhzPG0VIfeIiDRSDkw1cWVt3N8rhG6SdSO2Gvn8dfuueqZwuNZqk3Jxg7iNcIfBbgXD6ZC8u5qffzX8eoYeyDxC77uygKhcouovgVUQj1H4YB2ovNuD9+tTTU0zMVBmG/+C8AIYh8F361DL/yE5HnADKYlVdg6MDAmW7cuz5WGuw+PsWDYGAvbL8ECFUt4K7/AHd/I9c7BLaxinD2Ld5Zo7g78RLuRhlBS2cpWbGfStfhfwCEpK0nUjCbWuGsLciSOELPhkq/YgdY3l6HsLfRcLYf+pHNbH0JigEPkLAyMsiEJ7NrqQzM1i7wyhoMZqOhvQs6Z0ovXgdAJACRoulEg5HOwrOroKk0zOY2BDtVpTF0CU6kLkQJXa+BNEoG0lMSsBBKQXWNQktmoGcaYeSaQCIVWOvUYQAiWZFQtk5mSMoSzEILtBrTfEcviC5bwVwQmoh96wA0ic5dB57ngeoaTIPCdb34zDITYNLOOIeVSsW+dQC+7+NSWx6jJ4tY/rWNV7PfcGv0tBoPTM7M4eKJVgx2FTE9u4QPS6x+kHzfw/mOAjarW2hJG3hy8zIceweuY+PRtREMdzbjzcd5WBqPB6xeRGUMGRzHjWvMmxQ7tiOF1JBN6FiTd6Sy9RuFbHpX7MMMqOD088Ii+op5OUAO7jyeRGfBwrF8Cg8mXuDL4neMXzgFwhwZz+hf7a9d5yu3Z6DTPjVQIY9k7erO7Y63Lvc8ErEeyq6JaM6efjai4v4IMABI0DEPqPKkigAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-dotx{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAndJREFUeNpsU01rE1EUPTPzJk0y+WhMStW2qdVWxUVEQUF0I+4ELQiC7lz4N9z0T+hG9wrdZKUgLqulhrbSag1CKpT0g7RpYjqZmffle5NEKdMHlzfvvXvPPffcO4aUEno9f3Vt4dTp+BXOe+fB0u/NbVpv7h89NU1j1TCM8H7+xY9wJwPHZMbOjRadLAvE/2gToJTiTPx89k+OlVd/LT+0TPIPpO/SzyQk40xCMxBSZ9Z3CoAx5DOjeHT7SbE0XSpzwa8OWB9jINELolQg8AR0EgUKn1PIlIWpkUt4cPNxkTOU12trs8p95RiAXpqaztqou8q6SKQJJmZSqGwsodFsIJk1kcyLYv7IeafcLx4HUNkFF4jFTExMZ0B9DrfD4HUEusYhWs4GPEJg5wly/tBYRIOeDhpEwlS34xcyajdQr3UwOT2MlJOEBRuGNHWp9AQRVXDfQiFV/U5GBSiQ5p6ngBEa5z3fiIhC6g6IMDBwOdoHPkYnHPVyhN0tF7E4QSpr94CEOKELffq+y9Bq+DCJ7rWBoQQBVbPR2O6G4OlsLASJMtCZfQqm0NP5IVWnamdAkUxbyuIYtD7wWegb0YAzAVMkkI6NwPM9xEwHloyDGAmk7AKS9rAS0FKOdugbYeAHPu7OPEM+MY7q3hIKqTFQHmC3XcONc/fxdfMDrk/ew/edzyhvvTmBAddocVRqH3Frahau56qpZDho7+PnTgXffi/gbHYmLEvPSIQBp5JU62sYz13G609zKBXvoOMdYn2zgm7Xg2MVML/4Eu3uPgxhk2gXmNl8v/i2pcXTP8tKdTEcbWLZqDQXwu/l6pfwbEnSGsT9FWAA4mdHv2/9YJ4AAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-dwg{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAoFJREFUeNpsU0tPE2EUPfOg006hD4rQh8WgbCSwkKgbF2owujaCiQsXxpX+D6MmbtXEsHCLmIAbE6NLo8YlGIxREIshIqVl+mQ6j8/zFVCb4UtuZua795577rl3FCEE5Bl79vPd5LHYiOP7cH1AUWi85ytmvlas1bJ9E5ryBntH3BpuP/X9i7ovkluuiE8N9SDepaLpCcRCCqa/VDCaMuIjSWP25Upl6n+QDoCz6Yh7KKzh3sI2LuUimPtRRyaqodj0MDloYiITSTi+mH29Wu0AUf9CsZPJoW5czJl48LmCc5kIKo5Al67B9gUGYxrun+5NnMlFZ+GKiQADj2a7AquseLIvjMv5KMaSBu4sWVir+3i8VIVKYSby0UTdFU8Znu8AYBHQgVOJEN5uOXi4UsdawwU0FSf6TaSoyw6DRvukPkgGWpDKy4F8a3jImCrqFDFn6rhKPR4VGnhvOTAY3WLcjifcQAsqRfhUc/Gq1MKNbBh9nIAMDjEppocxs9HCMktfGTCwP/oOBkUKNk/qF3pDYC6Ktk8RfWzyaaoKrqdDaBDwya8W1m0/CPCR3kFy7CcnmWQRUJqcRJFUKtTnPCeR71LwoeYF92CYyVnCFZpCTrRtCv5to2St8SOrKxiPqEEA4fkYT+mI0rdoeUiH1XZVuQPpsIKqw2QmfifTsnOABiWySlH9uU0Hh2MqjsZV5LtpPSoGeN9rKnhBX7ehoOSLIIPfnGONXGMMWN7xUfVldYDbjM3mrh5HCDgS17DhHgDQcIU+XbBxnDTn1x1UuQcJ9iv7l5Q5e1zLGri92EDJFnoAgHtcfr6wbbVXUqq193+0z97n3UJt1+d51n7aHwEGAAHXJoAuZNlzAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-dxf{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAo5JREFUeNpsU0trE1EYPfNMmtdoH2kDNmJbaVFcaBVFpAsREQpFwY0bu3HjQnTj1mVd+ANcuC3qQixmry6E0kWFVIQ+bKy2tbFJm3emyXTujGca+4DkwsedfLnn3POd77uS67rw1vC79ek7fZEzpu3AYUqS9tKQGZPLpa3VXP0uFCmJ/8t9OLC3q/uJbcs5bkIybvdHoMsSbLKENRmvU2WcNnTjRFD7ML1WGSPJHI6sA4KRWMAWVDPxLYex3iCmfpuIh1QsFSyMxQO4GvXHHwOJ6XWSyIck8v6HQsnjAxFc7vTj2VwBg4aG78VdBHQFCk+dbVcxMdwev9gTSEC455sIBOu2KLsoJFzqasP9vjCeDBlYqzn4VXXwarGKZN7Crd5QfLDT/7KpBM84c9fFUFjFp2wdk6smflRsKKqMa7EgfJJ3Ac2OKlit2pEmBTQfngdpnupoU7BUtRGiiTe7fXiRqmK+KuDn6TpvYogmBRJcrOwIJLIWxmM+dOsyLKryQAaJpjJ1/AxrGO3SqdZt7kKZJrzJWBg5piHENuY8vV6e0UOye1TyftvC5l+gZB8SHJTwpSx4q4JeTUKaxhXoR57h7Rn+3iFolJ3xvPhab6HgJG/pJ7jsNP4sUX+jZiCgEsWd/DjH5IrSYpBUAr0yHpzSoXKOP25a6OBhndh0zcX1qIYM2RIbu6i0KiHD5B/GTMHG03kTGpEL7H80wHFOWwhqDZ+SpkBOtCDYJDhZE4gRcKNbYynAqbCMbXpwpVPFbEng0aKJGbYzK1p4wIegLlcEPmdt+DjXbzcsxFlCynRwwVAwW6hjqeg0Zt521SYCWCJvbe0Un29UDx7Hgrs3IEitHXkw3jOv2fl92D8BBgAJeyqBh90ENQAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-eps{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmlJREFUeNp0U01vElEUPfMFCEVArdoSqEA0KV246UJdUJM2Lo2JK/9FjXu3utJqTNz4D9worrsQExbFpAFT0TYp0CZ8pIAiyMfMvBnvm2Foa9uX3Lw7c98979x77hNM0wRf7ufPsq7Z2SQYw2QJAkDxQalUZa3WI8hy3gmZr15bu+z8kILBkCeRCJi6bufKMji0NhwiCQR6iitdatTvQ5LyOLLEiWcYukm3m4Zhmbq1BX13FyoxuH7xAlbvpqKRK1fT0PWbRwEmDEyiy1QVg/V1GO02tO1tKLEY2PIy3KEAlmJRDLXb0TeZL+n9g4MHlLJ5HIBuYnSzXq+DlcsQLk/D9Hoh1WrIUjlPcpsYGQzS3LWoaBhvKeXWMQCDA1D9pt8PaXERUjwOjEZQFhZQp9L2yERiqYRCkPt/z58ogTGqHQLE1BLgUmC6XGD5AlipBIFKkbhanKHGYLBDqQ4ZED0OAbfLlo8OIxwGvhVgyTHlA3xkomjH/gegBgDURMv6faDbBZpN+/tHkUApkdTA/PwZAPxntwdUyjYA/+ZMqJHjLgM9iv/6zRt2GgMaIE21aVIjnSm0DGPfmhzyde0UAE2Dj+p7urKCPvkZku9eJILOSMUnkvVhIo7GYIB3xSKYdhoA1erXGVKXpvFxZwdBonnD68PQ7YEwM4O4xwMPxc8RYE87g4FIcz+kvfmnA0YzIJIy77/m0OCqsTkkCTysKPjJG3viLei63Gm3kCO6UWqcMejjxecMPmxsoFKtYop6UNirYL9Wtc5OHqzznIXHq1na7OfMJROcK8a6O7MjW7nfzZdrd7jzT4ABACh3NGsh3GcdAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-exe{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAo1JREFUeNp0k8tPE1EUxr+ZzvRJO62lUAQaKIQ0FVJFjBBdoIkrDDHuXJi4NnHtX+HCjW408Q/QmHTRaCRRohIJifgiiBICTQu29mHfnc7MHc+MlECKdxZz595zf+c737nD6boOYzxJLC6Nhwej7e/24HkO779s7G6mMjcEwfKZ21+/d+em+RbagaFev28qEpZwzKg3ZckqCPH1nfS8hScIdyhBe6JqTG3PfyTTeLrwFhvbKdy9/xi5QglXL0yGJsKDccZY7LDIAwWHpSferWBh+RN8ni4UylVER8MY6PHj0uSpUK0hxzfTmWsUtnoEwO3rer64jEyxim6/Hy67DXaHExvJX3jw7CX8XjfORUdDlOohhU4fAVjILCPbm9V1yIqK2FgYt+ZmsZcv4lH8Nb5upXD7+hVMjIRQa8qeDg8UTYPU5cTcxSk4nS709XTD53ZhpD+IYMAPj+TBz93fZiz5oHV4AP1fGdlyHZIkIZkrI7GyhnK9CZXy+Aig6p1+HQAY003AcF8AVtGGfLWG9XTO4MLZ5cL0WAixoT4zVmPHADSiMo3hzHA/xgeDWFjbNg8H3A7kKnX0koEcPdTu/ylgRGZgOjNv38zoSXC8BZJDRKOlwGEV0VJVGM0y4joAPO1spXbx6sNHeD1uRIYGUCxVSRlDt1fC8rfvcDnsmJ+dOaLgoAs6AVLZPJJ7WdhEkUyT8GJpBflSBcVKDTvpDBw2GzQqQT1OgaZqUOhtFQUTUKnVTVWNpgy51YLVKph7sqKYkA4A1ScEfT66vm5kC3+ofh6Xz59FQ5bpkvE4QW3M5Apoyorhl9ABIKnFgNdTOh2NkJG6WSf9eRBJtmFwLDJmriUzeaOkYvvcXwEGAIVNH6cDA1DkAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-flv{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmtJREFUeNpsUl1PE0EUPbssLYUCXdpaC9gWoSTgAyFigiRGY+KjvuuTr/4A44MP/gx/gMYfwIsan0RjIjGiJIZgSIGFIoXSD0t3Z3dnd70zpITazuZmJzP3nnvumaMEQQCx3jx69SV3a3KWMxetpSgKxP3m242Do43SQy2k/YRydvds67n8a63k+FRSn7l/bdg5tdsAuM3he/5weDC8vLdqPLgIIpba2niux52mg//DqlsYSg3iztO7mczN3DJ3+ByCLgCBH4hOFEF7cDpzPCRyOpaeLGXSc2PL3HbnW3XaRQCPEgWI2MsRVAVqrwbX9bHxbhOKpiJ/bzpDOr2k68V2BtRNzMtqDEqPejY/4zSGjb54BM0mQ8k4xsDoIMauXxnqYOD7PmwScP31d0SS/eAuh1lrolFpIBQNQw2pqJdqsAlIceB1AJCIkkE/FZskXDQVRXw6IYHiE0nBEcaPXSSvJnGwWkQXAE4acAhbxPMJpOdHweoMhc9b2F8zwKizbdlyPLVH7QLg+JKBYzoorxzjz3oRzUoToaEw9KyO8XQW5AE5jrFT6AbAYVVNxCZ0Ka3So+DSTAoDiej5ywTySbls1OEDobhFlMcXxrHw+AbINEjNXgb7y6BndLhk8cRkHHbD7g4gEhiJFxsdhrDqaamBaDKKerGGSKwPI9kR9EZCaNA5ubE7A5s8IFhsrxQkgJhZoa/06xC5xRz2v+3BOjFlbqcGlquxsondT9vY+2pAJdeZR6fI355CgQCN2A4O1w7gkQ7cdLUOAKdhV6uFSv3kd/n8mT68eC8dKWLnY4FsfeZQh7nVVt0/AQYAsf5g+SvepeQAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-gif{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmVJREFUeNp0U0tPE1EU/trplAqlL0laiw40xASByEJIZFGVnSvj1j+gWxNXJq7VrbrwF7h10cSNhMRHojEuACVBKmH6SJQyJeXRxzzv9dyZPiCtN5lMe8853znf953xcc4hztDzZ1+C6fQMHAfd4/MBFG+p6h/n4OAeAoGNToi/eOm+A50LKRaLh6amoty2vVpZdotNXccMEK3LwZxa2bsDSdrAqePv/mLM5tSdMwYBYqyvw9zdhUn/L59P4OGtG8qlZCoH254/DdCdQBCxqZu+ugqnWoW9swN5ehp2NotgIo6bGQWGtaS8+vQ5V9a0u5S+1gfABEilAqdUgm98HDwUQkDT8JXoPPq+BoM5kCYmFT9jryn1+hkAt7heBx8dhbSwACmTAUwTgdlZ/CVKJaLnI1GD8TikZiPSR8Gxib8chH95mZTxgwWHwH7+gFMswqcokIRbjMO2HDCnZ1VvArpjEmnKZc8+cZJJYGsLsMiZ8AgwEqaY6Mb6RQR33JFhGECzCRyfAFXNu9v+RVNRZWIMuDJNuYMAaDycUFGhCOgtuAtFVDA83G5A8TrFDw+F5QMAxAKJJxz2xnW3RPJGbm+rCyjotZetH4DGzaSSeDA3h4Zl4R0JOEZWTpIzF4n/m995bNdqZwB6m0gFft3Ak6vz+KYWwFsGlqIxXItEcDt1ARMEtKdVgZb+fwA0G2C2hXM0ZTZNRcSf0b1pmXi7uYnjI+Lfanm5fRQsK8BIxKcrK7i/uIgP+Tw+FlREqHN5fx/vyU4uHBE6UO4gDWqk/JFaLuMxcXeFk6TuJ90V0HOk1in7J8AAjmgkPfjU+isAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-h{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAbRJREFUeNqMUk1Lw0AQnf0woK0ttVqp0hwqVCl+UBERT94F7x78Cf4Uz179DT14F8WbYHtRkBYRLNqDtdaPZLObuLs1NGlXcWDJZGbey+x7QUEQgIqT07PL5WKhHL5H46J+22q22vsWpbWwdnR4oJ80LNiz2czGUjENhvj4ctIE4Wrj8XmPUlKL9nCYcOFzE9j1OKSTCdjdrtiLdr7KhVgzEvwW6krC92E6k4Kd9bJt57JV5vFK2KfRQRV+RAMkzxglYI1RaDy2dW1rpWRjQo5VGicYIorWVooFvQVCCAjG8Omw1MgG8AM0uSBUDSnCfk/IGCHwf3DCD/7UhOLBrFkDuep/hDUSSCv1iYo4rIfqGwmUSNJjfYbBcQKhZw0aBMA4B48LwBhBt/cON80HmM9NQ6fXg/Wlku4TwmNWDzaQqzHG+0PSKod5cH5Vh2RiAhYKc8DlV1UPSyuFMGygVlMg1/P6BC6DqXQK8jNZDXAYA1f21V34wMXYFaiyVw0rJyzLgs3VMkxOjGtix/V0XWChZ0cI2i/dzvXdfTd0Qf91BMPrhyNzgKfOmxaWypqaDXHfAgwAtCL8XOfF47gAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-hpp{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAehJREFUeNqEUk1v00AUHK/XKf1yZdESVRBXjRSRFqMQVBA5Ic5I3DnwE/gpnLnyG3LgXglx4UDDLZS0RWkDLiRxSusk9u6GXSembmLgWZbX7+2bnZl92mg0goo3b3ffO/ncdvyfjHef6q2Dlvs8Q2ktzr16+SL60jhhZ69bO8X8ClLC7w9XdKJVG8fuM0r1WrJG4gXjgqU1D0MGc2kBTytl+7a9XmWcl1IB/hZKEhccq5aJJ/e3bTu7Wg1CVo7rNLlRhUh4oMnXoDoyhoHGyWmUe+QUbELIa7W8CjAFlMzdzeckCwFN06ATAn8QmDMMMGlMuwWucpoCHNe4jBkAMenjYvRPTyi53JvuwX8AplleAeBcRFrH6rXIxLim9I/pi3QA1RhKaYxdjkN8IwalCMIwWs9ljMkh0wzk+9M7w179C3LZNXxve2h+c3Hu91HeKmD/6zHOLnw83ilB1/V0CeqU3Q81LC/O41b2Btx2N2JVP2riR8eTUxmi0TzBwrKZMsqMoz8MsDh/DWuWhUBKURLKxQIeOMWoptYPnS1c+INZBkwISomOSsmBZS7B+3WOzZvrKGzkMAiGqNy7g+LmRkRfekBnANy2163PZXrSbrQ6vch19Xz8fPDHyL39QzkHBKedXjfu+y3AAGU37INBJto1AAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-html{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmBJREFUeNqEUktPE1EU/mY605a+hhZTBNKRDApNrWIRA4nEBUZdmCgLNi4MK5f+FNdu3bFv1J1EXODCR1JJSMTwpqUP6NiCpe10Zjz3hj5Mm3iSybl37jnf+c53jmDbNpi9eb+6Ftcisea909bWNzNb6dwzSXKkhIt/r14+515qBqmDA8HpqKagh53XaopblpIbe+knDpFAhPab2Dw0TKvRK7lmNODzePBgZlK9oUWSpmVNdpIU8T+jaMsyMaD4MDcZVa+NhJMN00w0n6V2nN3yQgdHWZag+LzYPTomIAtT0THVtPGanmb/BbjwLFkvn2IttYGYplKyDzsHh7gdmyAWfh5zVq0Guhg4RAHFUhmfvq3j134aXo8bd+ITnMFOOovU5jbGRoZwNxFn1cxuAIcDW/sZDjA/c4u+BNxOJyxqaenpI3z88gMfPn9Hv98HQZS6RazW6kjExvFi8TGdDSy/W0Emf4LS6R8sv11BmfzSwkPcm74Jo9Ei0GZgmkw8QCOao8OXcaz/5vSZnPdnp3ApqBBLkWJE0Ci7ASzbIhCLLQ1E0iOkBDh9NpUgiUejo8oNuJwyn0YPABtn51UYFFivG3yBGCNZkuDtc/MW+ZQI3OrYpBaARCKufk3B5XIiWyhiL5ODp8+FfFHH+KiKSqWKUL8fC/NznGlPBmz+24dZjKnD0CJDcMoyW0SqXuMtHBFw7rhIAD1ErNUNafxKBNevapwu65NpEQ4FqXIA+RMd6VwBP3cPSERb6gLIFIq61+UqGWaFdcrVt/lmAuWjAi2aiMFwmOYuIJ/N6M28vwIMAMoNDyg4rcU9AAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-ics{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAhRJREFUeNqEUkFPE0EU/mZ2dra7bLNpi2AxQFKalkJrohICiYkXPagXrx78Df4K48GDBzmQePLMhUODNxQ5ciEkJVqDtJGmMWrCATRbd2ecoS5u3aovmezsvu9973vfPiKlhI4XL7c2r5YL81LIELEghLA3u/udxmHnPmfGW/Wuv+LpwwdneRYBx7PeWK0wOYYhcXxyckGV1fdbnbuMsXcklqPRJQxFMKz4RxDCtVO4s3xlRjWoB0FYjlQPEEBieChwKCRGMx5uLtaKs1P5ei8IKlGa/YkXMXYtlTEDlsnw/mMXhBJcqxSK6vlcpa4PEpCooUyIqs5M6hG1o2CUwqA091cFcYLf/sjzcX75EiQIojI9779CTYR4jwTBf+r7GAwh0AxCiL6JMT/04vQ79u8aI2O/7Jzg69o6Go8ewycUahtBpADhHKLnK/eVbkMdtROWIv80NQ2sPhncA9Htwn+9hZG0rY6DzFwJl+7dhs0ZstUy8rduwPS/wd/ehmi3kwq4zTHiWUgXp+EuL8FvNvFl5Rn4xAS86iyI2kY3n0Mv48ByrOQmancdi8I0Kcj3U5iuA29xAelKCUHrEIayzltagG2E4IwkFaQgSC6lYI09iN0d8It5uNV5nG5sgJdKYC0G8WoTOZvBISFNEBxnsuzD3GX4vfDsszzqAu0jkJQDedCGbB6AWg54pYbPo+NGVPdTgAEAqQq70PytIL0AAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-iso{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAjlJREFUeNp0kstrU0EUxr/k5qbJzdPYpGkpsUJoA2q1oLjTdiGiIC5cuXHlxv9BEOrStTvBnQvRrSAIsejCrlqpsURq2hCJNQ+TNLm5uc/x3MmzJh34mDNnvvnNzOE4GGOwx8+t9XQkfn0VE0Y5/7Z+kHm+dvOhtd3P9c/xwNZh7nWaMYtNUmX/Fct/vlN7/8J5aRRgyzm8xzpRDjGE2aVH4VTqdnoUYg/XkEhmy+Cx3DhA5tMzdFolvg5Mx3Fx9SmH0JIg79Zo3j4GADMIokJTKtjbfAKXU4Y/2NvSfyH75TFOxa9Cmr0XnlPFl5ReOQ6wNMDsoFX6AElqQlNV1KsOuNwS/AGFjEUIDhmn5+/DMM16/9igBowAzFKIswPJr6MjlxFP3sV04gaP7RzMPe6xvWM1gNUBM2UKYlBau3QghGphg29J3gDlLLilWNdD3gkvIIDRhD9yGe2mCV0V4HFXuCxT5Dlv8Dz3sIkAs03FalDxBMQSt9BRBMhNncuO7dyU28c9tnf8C/Q0ZtR4GImeQSj8APLRH772BWcgiFODffCv/t8H9tO0v3RjV7VqkeeXLlzDfvYjj88uXhl4JwIsrYxmLY/M1gYclIvGE9jZfNPrSCD3/QgLyeWTADV6wW9AryIcCkB0u1Aq/oCPumlufoF72vIheaLDr4wCLIOqrYnULA14PSoqpSJEAUilZrD77Sv3LK+cI0+Be8cAbbmAOrob0agtD491LYfkoqvnyZLsWRkA/gkwABL4S3L78XYyAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-java{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAjxJREFUeNp8U01v00AUnNiOEyepQyhQobRBSlVIoRCBEPTAjQsSEneE+An8FM5cuXLNoQduIAE3qopKNJAIIppA2jrOR93aa6/N8yZuUxyxkrXr3ffmzczbTQRBgHC83nj3ca28dD36nx6fvnzrNNrdp4oibyUmey9fPBezEgWVFuYLdyvlPGaMY4fl1aRS+9pqP5ElAkmcnknRwuO+Nyt5u/ETYfyj9WrpZnmpxn2/Ok1Swn/GvtnH5k4TLue4kNfxoFoprRQv1TzOb8cAIu3+ZD7oD/Hm7XuxzqRUNDtdkuLiTmW5tFxceBXlnXgQTAORSMt2oGezUJJJrK9dFWdEH7Ik4dB29LiESeUEJXd7/dAT3L+1ivlCHr8NEzutXTBvbJPPSdO/AH5wysChwM/1HzCGlmAzOrKxu2eCud6Z2Jke2MwThpUXL6Nn2ZAVFTlNw70bK0iRnGAq9qwHtOmTRpsx1NsHyKRVnNPnoMoK9kc2BjbD4vk5JGV5NkBoEPM4FFnCteJFWOS4ntHEfphQyKaFTWFLw704AJ26ZFx/ZEEi3YyY0O1Dmr4EKTUHA8hUnS6siI0DEHLYog+b28RCRuNXR/iQUpPUEQ+NVht6Lodnjx+GXYgDSFRnq97Ed2pXSlXhUSeGhxYc5sKlNXM5DGLR2TMwfZVPAIi+otGNWy1fEZUKeo4qc4ysI+F8VksLIJfYcD9QYgB/DNPMptWBlsnBIS86xmDMTBo/PWd0LB6VZfdEbJT3V4ABAA5HIzlv9dtdAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-jpg{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmlJREFUeNpsU8luUlEY/s4dmMpkWxRopGJNNbiwhk1tItbGtXHr0hcwmvgOdWld6Bu4coXumtREE3ZKu8FgOlC1kIoXtC3jPfdc/8PUIpzkBM7wf+f/hsts24YczuerGUc0moBlYTAYA+i8sbdXtAzjITRtq39kr73s/Gr9DTUYPOeamwvYnHdrdR0SnDebuCbswJGqpX+Uf92Hqm7hzFAG/4TgNr1uCwEJ0trcBC8U0Kb1/PQkHt9JxSLnL6TB+Y2zAIMOJBGLXmtsbEAYBsx8HnqCGKVScAX8uHf5EpqmGXv18VO6VDEe0PXsKABN8+AAgiabmYFNNJTDQ2RUFc8+Z9G0OPR4PKYwvKari0MAgiY/OQGCAajhMNR4nDZMaInrKBGl70SPMScck1NQG3X/CAWLE3/dAWV5hRRVIJxOWNksrP19sFgMqqAebUGYHMI6teq0A9oTVAhqu2sfbYYjsL7lCZ3683gA70T3TK7/B4BNoO020GwB9TpwfAz8LgMtWn/NkV8EHgoB81c7nYwCyBZlEVkHcqMTKFnkmehJTOPvEfCnKi0fAyADJKfXC/h83TaZTJjaa5lANLpOFqAXtlEAorAwO9u5syT5UxLfU0e3o1FMu1x4u7ODYq02BKAMAVSrSNLrK1MhLPj8mNF0vFm+C1ZvwKBwXXE4AGn1WAASazESwUW3BzUSMeJ2o1Aq4sPurvQYSRLwlhRR6mSaYyi0WlpAJrFRx3ouh5/lMt5lv8BLwXp0M4lSpYL17e2uK5wP6lj/c2ZPn2RI+YT8fDvqoyegVLyfG5kBKaQQOfvF2pLc+ifAABiQH3PEc1i/AAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-js{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RUQ5ODY5Q0NGMTE4MTFFMTlDRjlDN0VBQTY3QTk0MTEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RUQ5ODY5Q0RGMTE4MTFFMTlDRjlDN0VBQTY3QTk0MTEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpFRDk4NjlDQUYxMTgxMUUxOUNGOUM3RUFBNjdBOTQxMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpFRDk4NjlDQkYxMTgxMUUxOUNGOUM3RUFBNjdBOTQxMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PoT8zQ8AAAJdSURBVHjadFNbTxNREP52t7S0bktbKFAvTUVaw60YqkExUTD6oD74qC/yD/wp/gh885XEEI0RAyYQUiMpIBGMkYR6o23abi+73e2uc04v1LROMtnZPTPffvPNHMGyLDB7sbJ2ciUSli3U35smkK9t7x9v7n2dD/g8KUkUwWqeP3vKz23NxJGzgwOx0RC6mSgIo+WKuvP56MeUzy2nJEk8PWsGJVVTuhWbpgmHw47FB7d98Wg4mVWK52o1sxOg3Va3PmFp+Q2PdUquaFUM9/vw+O6cP3bxwm46Xwh1ALR3/vL1e+hGjcc9koScUsTSq3coVDQsXJ3wzo5HEs3clgZNMTVdx1T0Ep7cn6//QRQwMhzA6uZHLD5cIFEFSKIU+G8LK+tb0KsGZKcTJoEyP08AbpcLy6sbPKdQrigdAGaDwWxsDH1uGbliCYIgcM8WFPg8Mq5Pjzdyu4jYbCE44EepXMHuwXe+A8x3KKYxYsjvbUzmlPGpBmYdgI1oYjSMbL4Ao1YXMkcM2Dd2xnbAamPQAqg1GORLZdycmYTdJqFKk2DPR3fmwI4zBDrg9RADqxPAbPBif2WTSB584/3/TGegEOit+DRcvQ4OZJi1LgwIQKVCg2i6nb1I7H3Br3QWqT9pBAP9uDY5xjdSM3RqxeoUkfVnEOW8UkLykERTNXjkM7h3Iw6NNvHw6JjuhAhVrba0+QeALozcI9nQR0VvNxJc/ZmxCNGvIBQcpDG6udA22kyW29HC72wu8yG579ZoiSYuR/ly2+y9CA4NceWLmo717T1i5ULqJNtapL8CDACskxPFZRxLwQAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-key{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAlZJREFUeNpsU11PE0EUPbM7u/2AtJUWU6qiiSYYo5EmmPDCD9AH46sx8cEnja/+CB989z+Y+MKPgMiDsYQACcbaWBBogYD92t2Zud7ZlQZsbzKZ3bl3zj3n3IwgItjYeDO3MlWme0bjUth8e8/fO2tHzx3XqUEk50uft+Ndnhdmc3SlfNPkVZT8Cy600DoIISvVfKYtlvfX1p66XmoIYsMZdjJQWvEFbbsC/S5g2QhSkKUK7rx6OzvzqLpsovAhaAxA3DUBQn2TUFsl7KwTfm4Z9DoO5LW7uPXi9Wxpfn7ZKF09vyPxX2iWcNRkKGZz0mQWKoNs8AVB6x1yRY2pYnc2LLofuXTxMgAlmlXIfngCxNxEzM+DPv6NQa2BygLgZyX6JT83ngHTN5GAL0WSoUQkSQnXkyBh/k0GegTAaldM20sTKvet+yyhIZApECamL0jUSe3oFChx3TopM4TeEQP2gc6BgGIwb4KGNXRhCkMGxgg2kJeybRiZM45D8W61qEAknSmpHStBhywu0nFVupSCTAcM4ECwqapv+NQ6LS9JGALoMIIoPYDjZiEL1xHtbyO39AQUDaA7R1AH23DSeSA4hv5RG/VAhxomPYP8sw9A4TaC9iHkjUWmrtGvbyC18BLe3GP0m3WW4I5hEBEnPIStXzyuFIxb4EkMEJ79Qa/xHbKxCdM7xeCwzUZOjgEwnuzt7qLz6T3cySmQP43uzjeIiTJM6io6W19B/NLCKMVGCzkCoLR/0lrfOI2fNy/huKC1FTsK/rbGNeMRC8dHpHByfu+vAAMAL/0jvAVZQl0AAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-less{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjZERjZENTJGMTE4MTFFMUIwOEVERjQ5MTZEMkVBREUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjZERjZENTNGMTE4MTFFMUIwOEVERjQ5MTZEMkVBREUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpGNkRGNkQ1MEYxMTgxMUUxQjA4RURGNDkxNkQyRUFERSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNkRGNkQ1MUYxMTgxMUUxQjA4RURGNDkxNkQyRUFERSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pl1w97IAAAJhSURBVHjahJNLbxJRFMf/wPAIMIxMkUI7tS0VYqlGDLGhjdKkqyZ24cJFN925de+XcONHaHRj4k7TND6SGo1VWwmp2kSLhlqMDbQ87gzPYcY7k4GgoJ6bmdw598zvnvM/95pUVYVma+svcovx8yMnFZHAMJPJBJfDzq5vpX6+/vD5qo/z7DOMBdo/d26t6jFMJ3iY51jBz4M+LP6wxEw40Gy23qYzB3HO7fpmpZCOmfEfa7Xb4NxOrC4lvbPToe2yKE3K1PdPwNOtHdx79ESfq4qKkijB5/XgevIyHxEC24USmewDqD2ABxubaLRkfW6zMqjWGlh7/ByyAtxYnOPnL0Q2+gGGmKRaw8zUBJaTiS5QOO1FJnuIAM8hciaIWHgi8NcSNt+loVDY8JBXh2ojJAR1HbTSNFMUpV8Dxcjg0nSYBrtBxdLbqI1iheCUh9XXNGurAwCdEkb9QyBSFam9TDfoPZ1LUg1BH28IiwEARTVAQOzcFKRaHZpLoa9avY6L1Gfs0c32t4PU6W2lWsV8LAorw0Cs1nXftYWE3qZGqwWHzYp2zzlgetuolVFvtiDLbRRKFTAWCxx2G/KlMtXFhWPqOzsWHJwBx7rxKv2R7mwFz3lw9/5DLC/M4Us2RwV0g3U58XJnF7dvrsBOoX0Abbej/DFKRMKI30fTVGC32WA2m5H9cQQvhYi0vE/7Wdgczn6ARA9QPBrBszcp/XvpyqxebzQ0Tlsq6llxLhe9bD4cFMr9XdjLHpLv+SLGBYHAYiVu1kNOpAaRTWbCejgiw0zGhFGSK1aw+zXbvfK/BBgAPwADAs5GpGsAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-logo{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAEACAYAAAAjlcdmAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAABCZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIgogICAgICAgICAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgICAgICAgICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyI+CiAgICAgICAgIDx0aWZmOlJlc29sdXRpb25Vbml0PjI8L3RpZmY6UmVzb2x1dGlvblVuaXQ+CiAgICAgICAgIDx0aWZmOkNvbXByZXNzaW9uPjU8L3RpZmY6Q29tcHJlc3Npb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjcyPC90aWZmOlhSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj43MjwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjY0MDwvZXhpZjpQaXhlbFhEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOkNvbG9yU3BhY2U+MTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MjU2PC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgICAgPGRjOnN1YmplY3Q+CiAgICAgICAgICAgIDxyZGY6QmFnLz4KICAgICAgICAgPC9kYzpzdWJqZWN0PgogICAgICAgICA8eG1wOk1vZGlmeURhdGU+MjAxNTowMjoxNiAwMDowMjo4ODwveG1wOk1vZGlmeURhdGU+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+UGl4ZWxtYXRvciAzLjMuMTwveG1wOkNyZWF0b3JUb29sPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KqqO/2AAAQABJREFUeAHtnQecXFXZ/+/W2dmd7Uk2mx469sJfQJHXKKCiiA2UEl+KRiyI8NrA8oIVeVVQEAERUQRRwAIIhmIihBAg1JhGetmS7X1nZ2d2/7/f3b2whE323LlT7sz8Dp+Hu5m559xzv/fO3N+c85znybNUcpLAWauePqpr544HRqLRorzR0ZP+fsYnHspJEDppERABERABEchBAnk5eM45fcpL1q2r3/3E6uuLSoIfiEaG8gmjoDgwOtCy57G6N7z2tFsXLdqd04B08iIgAiIgAiKQAwQkAHPgIvMUl6xeXdqyZdvFI9GRr+QV5JdEw2FrdGTEPvu8/HyrsKTEGhmORsNdHTcuPPrI/7nhiCMGcgSNTlMEREAEREAEco6ABGAOXPJP3P2Pk/vaO64vKiuto/DDtO+kZ51fWGgLwXBXV/fo4MCFSy84/7eT7qgXRUAEREAEREAEMpqABGBGX779d/6c5zcc2vTUqlsDlRVvgfDLGxke3n+F8Xfzi4qswkDA6mtu3lw6ve7Uu0/7+LNGFbWTCIiACIiACIhARhCQAMyIy+Suk+euXVvT8NiqnxaVlS3Oy8sriA0NWaOjo64aQT2rACIQ08Qjvbt33z9v0bH//fsjj2x31Yh2FgEREAEREAER8CUBCUBfXpb4OgU/v6LmDVu+NBIbvrSgpCQUGxy0oN/ia2y8Vj78AwuCQWu4r28o3Nl15UHvOuY78A80G0r0dGRVFgEREAEREAERSBYBCcBkkU1xu6c9tPz4ru1bfxOoqJwbxYif6XSvaTedaeGB1pZ2a9T64gNf/NztpnW1nwiIgAiIgAiIgL8ISAD663q47s2StWvn7Vz5xB8ClZXHjEQieTH6+bmc7jU+KKeF4R9IMdjb2PCf0LSaj9+9ePFG4/raUQREQAREQAREwBcEJAB9cRncd+KMVasq2tdu+GFRcfGSvMLCItvPz+N0r2kvGDbG9g+MDsf6W1r/XP+Oo8679aijekzraz8REAEREAEREIH0EpAATC//uI7+kdvvOCMSDl9dWFpabfv5xWJxteO1Un5Bge0fGOnp6Y90tH/z4a995ede21R9ERABERABERCB5BOQAEw+44Qd4VMrn3rznv+8cGtJZeXhsUgk4X5+8XaUU8IFxcUMG7O7qDiw+J+f+8zyeNtSPREQAREQAREQgeQTkABMPmPPR/j0mjV1u1c99euSUOgDsZGRfPj6uQ7r4rkTUzTAsDH5EIFYNTza07D78eqF8z/xl499TGnlpuCmt0VABERABEQgHQQkANNB3fCYZ23bVtL80CNfLygq+EZhSeAV6dsMm0j5bk5aueH+wWhvY+OvDzzzExfdvHBhOOUd0QFFQAREQAREQAT2SUACcJ9o0vvGR+74y8nhru7ri8vL62IRhHXZR/q2VPTSHt1Dmjh7hbHhAZlWrqA4YA12dHRHerv/Z/nXv/obw6raTQREQAREQAREIMkEJACTDNht82c9u+7gpiceu72kpubNI0NDeTEKP8OwLhRcpbU1tlCD8GIWD7eHf9X+hQgCHZpZbwXKy63Bzk6rf0+zRf9Do8KwMRCCnBru3d2wpShUfurSz57zjFFd7SQCIiACIiACIpA0AhKASUPrruHPvfBC9eZHHvt5oLLq9PyC/AKKLFMBl19QaAWn1VpldTPt8Cw8cqSv1xpoabGGenrcLxaBcCuC8AvWTkO70yyO5jmFo5H9zc3WYFu7NRKDODUodtgYiMCRaGyke8f2B+a86fWL/3jSSW0GVbWLCIiACIiACIhAEghIACYBqpsm37VsWWFw244v51l5lyJ3b1ksHIawMgzrAqFWUlVthWbNsopKSyc9bBTtDXV3WQjVYkUHwxgdxOgdRxRRd2LJY0gXrOZFH6yS6hqrOBSy+Nq+yvDAgNXX2GiFuzqNRyjtsDElJexLpG9P8y8K3nH0xcsXLTJTkfvqiF4XAREQAREQARFwTeCVKsB1dVXwQuCUfyw9vmfXrt+UVFfNdRvWhYIvVD8LYq36VWJuX31iejja6CRTyhzlo+1P9L2qXbQTxrRwX1OjRUFoWpywMf179rSPRqNffPiiC5RWzhSe9hMBERABERCBBBCQAEwARLdNnPfcxtnbVi6/vaS29h0QZK7St1E8lc2YYZXOqHvF1KzbPiRyfy5QGWjZY/Vjytk4BzH9A3EuFJ09O3euDZaWf/S+Ly55MZH9UlsiIAIiIAIiIAKTE5AAnJxLUl49Z8WG8oYXll9RWBY6t6CouIj+dKZ+fvSjK4U/XmldnVVYEkxK/7w2Gg0PWgN79lgDbW2uzouLV2JD4ZHeXTv/PveI48669USllfN6LVRfBERABERABPZHQAJwf3QS917eib+7ZcnIcOzHxaGySqzuNffzQx8CFRX2dG8xtplQ6G/IaWEuQDEt9A/MDwTgU9gzONje8qNHv3nx91EXzooqIiACIiACIiACiSYgAZhoonu1d9pDy4/u3LLpFqzuPZBx9IynSNFOIRZM2H5+NTUWRwAzqXBkM4xQNBSCXIhiWmz/QEwNI9zMntFo7NMP/8+X7zWtq/1EQAREQAREQATMCEgAmnFyvddZT66d2bBq2c3B6TNOgBjKs2PnTbL4YrKG6RdXBh+/Uvj6URBlcqHgZTiafvgIGgezpn8gwsZA9I52b9n8dKBy+qkPnP+ZbZnMQX0XAREQAREQAT8RkABM8NVYsnp16c7VT19aECy9AH5+xW7i+THjBkOwhOrrrcJ9hHVJcHdT1lyUYWOamrBqGAGqDYWwEz8wOhSO9e3aeethJ77/czcccYT5cuOUnZ0OJAIiIAIiIAKZRUACMIHX66SbbzktGo1ejRh6tXZYFxfp24pD5Yjnh4wblVUJ7JH/mmJMwr7GJjtQtWnvOCLKEcFwR2f/QEvztx699DtXmdbVfiIgAiIgAiIgAq8mIAH4aiauX1n8+OOHNz25+k9Yofv6keFoHH5+9VZJTW3G+fm5BjVeYcw/sN0eEXTrH5hfhLAx27bvyCuwzlj2ta89Fm8fVE8EREAEREAEcpmABKCHq79k48Zp25Y+dC3y9n4MmTXy6e9mGtaFo1qM5VeGsC78OxcLfQIRDNqOIWjqH8hpYfpFYhqZ/oGPVB9y0Ol3n3ZaYy7y0zmLgAiIgAiIQLwEJADjIHf+ffcFXtzV8LXCQMnFsCB81IyFH1OwBZG9g6t7s83PLw6UdpUx/8BGaxBZRew0dQYNUQiCvRUZ6B9G/MBfv/ltR1x09YknDhlU1S4iIAIiIAIikPMEJABd3gIn3/ank4Z6em8IVFfNjA1FsLJ12LiF4rKQVVY/087fu3cuXuNGsnVHppVDXuH+pmYr0t9nfJb5hUVWQaCYK427w+1tX4F/4I3GlbWjCIiACIiACOQoAQlAwwv/6ec3LNz56LI7g9Onv3kkgvRtFH6Gq1m5gKFs5kxk8pjuLteuYd+yabfRWAyZRFqt/uZmyw6dY3JyDBsDIWj7B+7YsTUvr+CUf33twmdMqmofERABERABEchFAhKAU1z1Jau3VG57fOnPiysrzoTIKHAT1oXZLYIQfRR/FIEq5gTImSJwEGJwBKLQpDhhY2LDkZHubdsfqK4/cPE9nz29zaSu9hEBERABERCBXCIgAbiPq33ppaP5T9Tf+CUrP/97xeUVoZjL9G0lVVW2n19RKLSPI+hlEwLDfX12NpFwV5fJ7vY+FN4FSCs31NU51NfYeNVx+f97yaWX5o0YN6AdRUAEREAERCDLCUgATnKBT7rttmPCHd1/wJTtfIwmuQrrUlRWZoUw4seAzvLzmwRuPC/RPxABpPswIjjc32/cwlhauWKrt2F3W39r83lPXH75XcaVtaMIiIAIiIAIZDEBCcAJF3fJunX1m5Y+dFvZ9On/BTB5zN3rys+vDn5+0+XnNwFpQv+0/QNb4R+4x6V/4FjYGKtr29Y1RYGiU5Z9/esbE9oxNSYCIiACIiACGUZAAhAXjOnbtqxcdUWgvGIJQosUxSJDxmFd6HcWRBBnpm8rKCnJsMufmd2NhcN2EOnBjnZX16mgOGBFBwdGunZs/+u0+XPPvvvcc3szk4B6LQIiIAIiIALeCBR4q575tY//+TWLe/e0PlhaO+1YjPbZizxMR/0CFRVW5fwF9iKPXA3mnI47gKxLEEsRKfcwPR+x6J85ZcE0MoNNY1o4L1RX/5pwd+8Fta95TbTh8ZXKJjIlPO0gAiIgAiKQbQRydgTwlAcffH3H2o13lM2YfihXmTKLh2kpxEgfV/YGa6flTPo2Uzap3o+ZVwbb2+wVw67TymGxSPeOnU2Rwd7Fj3/3uw+nuu86ngiIgAiIgAiki0DOCcDFzz8/o/Hh5TeVTp/xfis/jvRt02eMpW+DX5mKfwhQwNtp5Vpb7JE+k569lFZuZHS0c9OLq/OCxZ9ccfHFW03qah8REAEREAERyGQCOSMA4edXtO2xVZcVlZdfhBG8QCzCvL2G8eUQaBj5frG6t17p23x+t9tp5ZqbrHBHB2byR416m5ePsDHFRdbwwECsa8uWP7z+Yx/+zA1HHGE+JGx0FO0kAiIgAiIgAv4hkBMC8H3X/OojsdHR6xCUeQZHilylb4OfWWjWbCtQWemfq6aeTElgqLvb6mtssCKII2hamFaOoWNQr7d/186Ln7jqZ780rav9REAEREAERCCTCGS1ADzz6acPavj3o3eUz6x/0wh8xWw/P8NRIdvPb0adhdRv8vPLpDt6Ql9t/0CGjWnZYxn7B2K0lyIwH6u7O7du2R6NRs54/NJLV05oVn+KgAiIgAiIQMYTyEoBeO7atTXb7n/gV2XTZ3w8r6gw3136tkKrdAbStyGmH4WASuYTGPMPbLYGWphWLmp0Qk5auZHh6GjHpo2PlNRUnfGviy5qMKqsnURABERABETA5wSyLAzMaN67r6r9eri17e5gbe2bsLrXOJhzHkZ+gvDzq1ywAPl7sboXK0RVsoMAr2WgohJWYTGYNOMITlnGw8bk5eflIcbjAux/fs1hh09vWLnin5Z12ZTVtYMIiIAIiIAI+JlA1owAvu9XN7w3OjT0m9K6utmM92ZP9xqSZzy5MizwKKmuQo2sQWJ49rm2G9PKdSFsTJM7/0BOCyP+YO+unV3IL3zhU1f97OZcI6fzFQEREAERyB4CGa92zl6zZu72pQ/+OVQ/60hcljxO95oGci4oLrbj+SHnr0b8sueeNjoTO61cG/wDkV/YvmdMamGUmPcM76/OzZtehFfpJ1ZeeulzJlW1jwiIgAiIgAj4iUDGCsBTVq4Mtjy68qpQXd05SPFV6CZ9Wz6mBDnNSz+/gkDAT9dDfUkxAWYRYW7hwbY2+AcahgXCAhGmlYuFB0da16+/LzIcXvzcVVd1pbjrOpwIiIAIiIAIxE0gIx3d3vXTqz4ba29fCgH3dozG2Is8TEf9SqqqrIoFCy0Egran9OImp4pZQYDTuoHKKqu4HP6B0WGz1cLj/oGom1c+e84hxSUlX64+9LBA06rHl2UFFJ2ECIiACIhA1hPIqBHAD/7ud0eHu7pvDU6rW8ggzm78/AqDQQvTxPZCDwtTeSoi8CoCEHaDCCDd19RoRQcHX/X2vl7ganEGk+7dvaNtoLlpyZNXXvnXfe2r10VABERABETADwQyQgl9es2auq1LH7qtrK5uEQK05Y0wi8foiBE/288PU72c8uVoj4oITEWAi4g4JcypYVP/wLy8fCsf2UQsTCN3bt68ZnRk+JTHvv/9jVMdS++LgAiIgAiIQDoI+HoK+JS1a4tnzFlwOUb9bi+pqT0IU3R5fDjDC39KVozjVgrRV4npXk778t8qImBCgPcKV4YHcN8gX+DYtDBGB/dfRu0QM/xFVVo3s64oWPq56gMOPrz+/e+9v2n5cqWV2z88vSsCIiACIpBiAr4VgO/5yZVnDO1qeDg0a9Z7MGVbwJEY09yuAfhzVSyYPxbMWaN+Kb6lsudwHDEuqaq2ikJlFkedudBoqsJ7lD9SMPKcXzFv3usKorELaw8+ONr45BOPTVVX74uACIiACIhAqgj4bgr45D//7TW9u7beFZo567ARPkyRu9d0gQfTt4UYz6+2ViN+qbqDcuQ4TCsXbm+3+hA/0HVaOficdm3b0tTX3HrmM9dc9a8cQabTFAEREAER8DEB3wjAL6xfX7vmrr/8unz23JPzMXpC4ceHrkkpgBN+KXL2liJ3r9K3mRDTPvES4H05gNzCA8gxHOOPE4PCKWXelxjFHm1du2ZVdHTktGd/+tMdBlW1iwiIgAiIgAgkhUDaBeApf/5zQeumbT8orZv+5cLSsgAfsG7isZVUV9ure7nKV0UEUkWAq4S5Wjjc2Wn8Q4XxJykEw50d0faNG2+2wgOff/qGG8xUZKpOTMcRAREQARHICQJp9QF8z49//PGBgcFl5XPmnmDlFyCYs7mfX3Go3KqcvwDir16jfjlxq/rrJCnkSqprrKKyMis2FDFaLez4BxaWluZXzp//FtzzF9YcsHCw6emnV/nr7NQbERABERCBbCeQlhHAT/zjH4c0Pf+fOyvnzXs9AdtTaVOushy7FMzcEZrJsC5I36aVvdl+f2bE+dFVYRBp5fqYVg6ZRYwK/ALpusDSvmHjrkhX26dWX3PNcvsF/U8EREAEREAEkkwgpQLwrGefrdp239Jfl82q/yhSabny8xtL3zbdFn/wEUwyFjUvAu4JjGAEmyKQYtCNGwNHE6ORodGOtWtXRoeHTn/65z/f6f7oqiECIiACIiAC5gRSNgV8zPd/+I1IR9fdZfX1b7RGRvPcrO6lnx+ne7nQIw9+VCoi4EcCvDcDlZUWwxCNxKJmq4Ux8j2K4NEFBQV55XPnzisOlp1fPn9BffPqp+7z4zmqTyIgAiIgAtlBIOkjgMf9389OjlmjvwrNml3PqTJb+Bmyo38VffwYi03p2wyhaTd/EICwC3d1YqFIkzXc32/cJ44G0rWhe9vWnv7dDd94+rpf/sq4snYUAREQAREQAUMCSROAn/z3v+c2Pb7qbxVz4OyOo3B6zDSQM/38ypC+jZk8NOJneCW1my8JcHRvwEkrZ+gfmAf/QNvNAclH2jeu2963p/mTL9xwwxO+PEF1SgREQAREICMJJFwALlm9unT9/UuvR0Dm0zCCN5bBwzCeHwkWIZxL9cEHWwWBkowEqk6LwGQEuMK9H6OBA60txj+EOBLIXNaRvr7RtvVrl0faWj/5wi23tEzWvl4TAREQgWwjgEEjrpQLwSgICmH0AeOWr/Nv5oZlKC1uY+NbrsTrww9phdgCiP2VhArAd/7gRxeWVFR+L1hbW8Z0WGN5e/d3+Fe/F6ypsaoOPOjVb+gVEcgCAgO7d1ndEIJuClPS0QZaWiJtGzdc+9yvfnmhm/raVwREQAT8SAACj+JuOqweNhd2IGwWbNq4wf/LqoCVwij48seNf1O/MFvERKMQDMO6YR2wVlgbrB22FcYFdo2wVgjELmxzuiREAB500klvmX30MX+pXLBgPlc/uvHz25u+BODeRPTvbCIwiAwiXdu3xXVK9A/kavj2jRs6Nt/z97P2PPPMPXE1pEoiIAIikGICEHsUb/Nhh8DeMm6vxZYCsBwWgCW7UCD2wCgOd8H+A3sGtha2FaKQQjFnCodSPZfaw17zVMW8+fmMgWbq5+f5oGpABDKQgJfPB39YjWJkvebgQ2sWvPu4v0MA8ot0cwZiyJgu43oxxdC3YHNgHGnwa2HfIuPGKTA+6HphdBngCAhHO/jQ2wNrx4OO02UqIpBUAvj8UNi9AfZu2HtgFHwc3UtXoeapGTdONS4a78ggts3o73psGZh/JewFfE44gpi1JSECsOaQQ/Pp42RZ8Fr3XBIyKOm5F2pABJJCwDDg+b6OTQHJz1rNoYfxg1K2r/38/DrOgX3nQ6EC5kZUcQSBX9TP44s5Vf499DU6FcaHRSYXCsIBGKfGGnENOB22CfYMbANsB5hy6iwjCvo/Dx3laJKb+ycjzs1DJ/n52IPr+KKHNjxXxbXh9OzbYPzcnADjZ6cY5ufCH3oLx+1EbPkDaTfO5TFsH4Q9Aq78zGRVSYgAZHiXvIJEiD98mqOp+l7Pquuok8kAApG+XjtItPeuInbg2MKqxHzovHfIbQsUVQxvcwTMzTlQOPJL+FhYKhfDGKZ3Qa/8W/hdT8FNo6/VkTCndOKPnXjYcaX5Q7An8LDb6bzp0+3Z6Nc3YW7uH5+eSsK6xc/HzbAlCWvRRUO4f+qw+4dhn4AdDcvklZwUsfPH7XRs23B+j2L7V9iD+Hw0Y5vxJSECMJEUIr29iIG2zULAaKuwJJPvn0RSUVuZTICuEf3NWAGMcDDjwi2TTydRfed3D4Wg25IKPyG3fcr0/eloT3sjjOKhZVwM/g1//xMPu0Zs/Vb4gI7n/vHbeSS6PykfxR0XfotxIrx3Dk70CfmkPU5bf2Tc+GPpbvz9B9iT+Hxk7I8Q3wlAgMWDstUKd3dZZTNmWKUz6uwVkACtIgIZRcCOAYhFH/17kCPYdpHIqO4nu7Pxfmlqyi/ZV8ayZuAQJ43bLnwnc7HRrXjQrUz+oY2PEO/9Y3yADN2Rfp8pKbgvuIL307DPw7JV+E3Gch5e/CLsXNiD4MDZjIfw+aCbRUYV+gz4stDhvbehwWrfsN4abNfIiS8vkjo1OQFmAenssDpe3Gj17Nop8Tc5Jb2aGQQ4XcwH/MN40N0J+6/M6HbO9rIvFWeO+4BuGP+AXQnLJfE3ES/9Bj8Eu5cGJidMfDMT/vatAHTgRQcHra6tW63OTS9akW76L6uIgH8JMO1b5+ZNsM0M4OzfjqpnIuCOAP1xPgZ7YFwIvtVdde2dIgL9yTwOrn0l7Aoc458wikCVsfiE7wWIf4DNn2CvyxQovpsC3he4oZ4ei/6BCDIN/8BZ8g/cFyi9nhYCdqYP+PkNws+PsTBVRCBLCRTjvCgEj8OD7ufYXo2pL4aZUfEHgaQJQFzvg3CK18He449T9V0vqKe48nkd7D++690kHfL9CODEPuMGtB3pOzAtTKd6+lipiEA6CfAe7N+zx3ZV4FbiL51XQ8dOIYFKHOs7sKX4Xn5nCo+rQ+2fwOD+347vXVzjd6MmR/0k/vaPcABvc2o8I4pvBCB+RRoDi8E/sGfXLtvHKtzZiXryBzaGpx0TRmAILgm2n9/OHRZX+poW3utu7nfTdrWfCKSBADM63A2B8FmY+Zd4GjqaI4dMuADEdT0R7O6AHZgjDL2c5mpUfsFLA6ms65spYD4QC5DmagTxzWgmhT5WkS2brZKqKiuEaeGisoyMi2tyqtrHRwSiAwNWH/L5cqEHvhyNe+YIP9ZxU8/4ANpRBNJDoAqH5UrIw3Fffw33ObMCqKSeAL+MEjoFjOvJEb+bYcyeka7C+4kjazSutOXUH43nWwSjjuGWVgpLZ/y4v2bS/e8bAUjRx4ciRWB+fr4Vw9Sa0UMSdTgKGIGPYHDadKusrs4qCChUGD4EKgkmwJXpDOkygNAuI0jJZloc4cf9TX/cmLat/UTAJwQ4+ncBrADf2xfhnldE/9RfGIqihAlAXMcj0d4fYNNTcCo9OMZO2BbYtvG/d2PL1IVMY8jzcgQgR4icUSLOYk4UgBwFYn9njm9nYMuRywWw2bA6GP1Yk1E4HXl/MhpOVpu+EYA8QQq+KB6sFIAUgvy3IwynAkDfKz6cOSpTVjfTKp0+HdlJCqaqpvdFYEoCDN4c7mi3R/2i4fCU+0/cwRF/vJdpKiKQ5QQYHy2Ce/3ruPfNfyVlOZQUnR4F4GAijoXrV4t2roVRSCWjUMytgT0Oe3T8b6axoxBMeMH5cFSQfqv1sMNgb4FxJfuhsFmwRLgvrEA7m2AZU3wlAB1qFH20iUKQI4ImhasxGXuNQjA0a5YVqOTshIoIxEeAoYf6mhqtIaxAd1MmCj+N+rkhl3X77sAZcfQiEQ+YqeDwFy+/02kcCQnB0jEdchGOy/P+BUwltQQ8j7xCLPE++hGMIinRhbmn74b9HbYB35PuflHH2Zvx4/BYHFF8Dnb7+HlytPBw2FGwd8LeBKNIjKf8BcdxRibjqZ/yOr4UgA4FRwhyNLCwsNAWhaYPU/oHdm7aNBY2ZibSygUZs1FFBMwIcKSvH8JvsL3d1cidhJ8Z3xzZiw+Dz8Eeg6VCAPIYnBLjA5y+UMz7Ow22YNw42sGH3QEwisNklsvwgH0Gn4cVyTxInG1zlIbTdWSVTaUHJ0PzWk5BA5/22she9Zfh3xxRvB/3BH8Qpb2gHxxVah63ZbhfL8ffHA1kHuPjYf8FOwRm8tltwn4PwzKqpFwA8gFZXF5u8QFrmh6Lo3+s59Y/EBfUDhsT7uqyU8oxtVx+Ef1EVURgcgL07Rto2WP1t7RY9PkzLbw/aSymP1KctvPg8lBaU2PHtuTiEtPRbqe+tr4mMID7IhEP5YScJL4Ty9HQbNjbYcxc8A7YHFiiC6dersHxjsf5tya6cY/tfQ31l3psw2/V+eVDHxNPI2q4Xrxul8BMRA92m7Ksxx7fhd2F+8D8C3XKZhO/A/pHfg2wO2njLI7E3yfD+Fk5ELavsgz1d+3rTb++nlIBWBgoscrnzLZKqmusKMJm2CMsHVhJieneqQouRvz+gXio9zU2jE0LYzSwBA9bPnRVROAlAri/uJiI073DWOXrpuCDb4s/3qM0NyWAH0OhWbOt4goO1sA7OVRu9ezeZUWQUcRtW26Oq31TRsBXXzS4V+nLsGHcbsI9xumuD8DOhB0LS9SDH01Zb4R9GfZN/sNHZRgcEuIr56NzSlRXzkFDr09AY/wi/DXsW2Dttx8ARqeHfndhR/5QYKzLWmw5KngGbBGMLhZOoYC5y/lHJm1T8uXEVbnls2dbtYcdBvEFjnhgFpaUWJULD7BqDj7ECow//EzAcXSFC0VYnBFBk3rcx04rt208rVyvb36Um3Zf+yWJgO0uwPRtWza7En/4grD9VNkt3pduBFtRSdCqXrjQqjn0sJfEH9sphCDka5Xz5ln5cHtQEYFkEsA93AS7Ecfgw+3DsOWwRBbGB3xtIhtMQFuJFLkJ6I4/mhj/MXB+AnrDX9Bfgp2Heysjxd/eDHAe7bDb8fqHYPyh9AsYp49ZdsIesf/KsP8l/QlTBN+7mkMOtfKLiydFw5GPajz0wkih1YfsHqarLJ1pYS4UcesfqLRyk16KnHsxNhTGPddsp28zGYV2AOGLIO7p3kL8GCpDOsMgVqrn7Uvg4Z4Ozqiz3Rci4z92nGNrKwLJIIB7mtNzDOj8T2w5CsRRu0RMDXPk5Kto9xwcY+qpHuyskjYCnOpc4PHoFH+fx7X+ncd2fFkd58WRzWdouKeZCvECWB9eb8M240rSBWABRvr2Jf4cWoBnBRG2JVBViVAuLYizBv8rgwcfLoDtL8X6zmgghSFfn6pwnwGIzjBWeYbwMObxNeIyFbXseJ/31mBbK9IJNlvMKuOm8F6j8f4xuc+ctnlvMTRRGYRdAX4MTXWHjo5iRNGprK0IpIgA7u0IDnUd7u1/Y3st7F0wr+XjaOBq2NNeG1L95BDA9eYIzSc9tk6Bz/A/WSn+9maD89yK1y4Au6TrqL2Pnah/+6rj+UXF8BGcAx/B6rHQG1i8YfKQ5T57xw80daSnoz99rgYR5y1UD/9A+CdyilolOwkwPFBfozc/PzeLPCgWA3tlqpGwy857K5vOCvftenyvfgTn9EvY6R7Pjf5SZ8MkAD2CTGL1t6JtLnjwUm5GZd4vOVXwWRnzScvAs/aVAHT4MaVb9UEHW0NdnVYvH9ZwiDcpfDDT4gkbQ8f/zi1bkFau3SpDWrniULKjJJickfZJFAHeQ1zgwRXh+FVh3CwFHI0/MtwIPx6A93E5Y1FWVRsfTzuKgF8I4L7vwn3/WfSHo0McxfNSPoS2vo82Hb8pL22pbuIJMN9viYdmORr2TVxf8y9XDwdT1cQQ8KUAdE6ND87i8gpM1WK6bs8eK4aVwybFi38gBQJ9BIPTptlTw5zCVslcArEIVps377HvoVHDYOI8W4o+Gotb4cdFT0xJWIrUhMpGYyPU/zKUAD4DfRBun0f3D4C9xcNpzEXdd8Nu89CGqiaBAK4vdcAxHpv+Ce4ViXuPEFNd3dcCkDD4AGVqN04L80FO3y2mfZuq4KZ+hX8gH+Z8kPP1qQoXBAwgDtwQwoLw2PIPnIqY/97nNeS9wkUepj8cnLPgwiIW3ism98tL9XCv2vmoZ9LPL+C8rK0IZDQBfHe24nPAcC73wbxMjXCUSQLQf3cDF/swQHi8ZSMq3h5vZdVLHwHfC0AHDR+oFQiNEaytwVRekx2zzXlvf1s+wOP1D+QCgZf8AzGVZ/sH7u9ges8XBOg60NfUbEX6el31hz8SaG6FHw/CHyj0IS0q8/J8dNVd7SwCKSOAz8Wj+Fz8HgfkaGC85Ui0UYu22uNtQPWSQuANaLXOQ8t34pp2eqivqmkikDEC0OHDByz9A8MIIO0maC9H/2hx+wdu3mwLQPp0FZaWOt3R1kcEovDjtP38MHJLEWdaKPporON2urcI90IIPqMMLq4iAllOgLHPPgFjaJd4yjxUOgT2eDyVVSdpBF7voWX6Zd3job6qppFAxglAhxUfuIFKhI3BVC1TdyU7rRyPyxWkEfoHTp82Fs4Dvl4q6SfAldycsu/HfWASPsjpsSP8+G+KPzeikaFcShHShekF5efnENU2mwng87IRnxFmRoh3VTAXkzA7iASgv24U+nfGW7agIjPLqGQggYwVgGTNBy+n3YIQgxz5GWxvT35auVjUjh8X7oB/IHy95Oifvruefn72SDADiA+6y+zkiD+3wo8pBIMI5MxRPy72UBGBHCPwZ5wv48WNOcq6P/nXua+iGskigO8/Xsf5Htp/Ad+l3R7qq2oaCWS0AHS48UFcuWAhhGCtLQS5itekONPCdPrn1DDFgGn8QK4u7dm50xYgIeQXDsAHTCV1BDgSS9Fveq2dnk0Ufm6ne5mykMLPydvrtKmtCOQQAcby42rPWXGe88H4nsXHUOFC4uSX6GoVaHC2h0Y3eairqmkmkBUC0GHIB3MN0soNjgf7NR0VcoRgPP6Bdh5Z5JAtQciakPwDnUuRtC2vaT9G/OzR3hT5+RUinSGvbVBBwpN2XdVwxhBoQk/XwuIVgDNRl07UZsFdsaNKUgmUo3UvK9cY/08lQwlklQC0rwGc+TkSGKhgWrlm2zfM1C/MiR9IIchRQf6bo4JTFe5D0TnU22P7BpbCLyy/qGiqanrfBQFeQ/p6Mh6k6fV0mo87rAvTt+FaMhSQ0gQ6NLXNZQIYuYvh+24dGBwfJ4cq1KuESQDGCTDB1eiXSYu3ILK+SqYSyD4BOH4l+MAunz3HHrXpw4gRfcVMxVy8YWMoTHobG8bTyo2tDKXPmIoXAqO4dgzr4i19m8m1d3rJaWIuMuLUvlZ8O1S0FYGXCNDxP97CtHA0FX8QoPiL15mZoyMS8v64jnH1ImsFoEODD/CqAw60hmqn2SIi0msWG87LtHA0HLa6tm21Am1t9tShfMacq+Fu+1L6NoR1cVMo4GgUfW79/IrhQkA/P64wVxEBEZiUAKeB4y1BVKSp+IOAlxFACsBhf5yGehEPgawXgA4UPtD5cB+EKOPUMEWaSXGmhTmNWIhRRUcYmtTllHDkxV571WgZR5PgS6YyNQFm7rCn71tbjVZ1Oy16EX6FSPlnZ31BCkCN2jpEtRWBSQl4GfUpQIs0FX8QoAaId5qK9ZQr1R/XMa5e5IwAJB0+2OnTZaeVo38gBIaJPxlHkhwhGI9/4ABEJ3MM2/lhETtO/mST36vM1ctrYud9xiprN8WTn9/06WN+fvLbdINc++YugQGcOvNxxiPkmGA7p547Pr9NOIIXhcU7DazwFz6/wPvrXk5+ELlAo3zOXPh5IWwMfPbChlOMFIKe/AMbxo5lZ45g2BhMU6qMEeA16IefX6Tf3eDCxFE/N35+PKqdvm3WbIvZPFREQASMCVD8Tb06bvLmWG9k8rf0ahoIOAIw3kMviLei6qWfQE4KQAc7H/xpSSvHsDHKHWtfhmGmb3Mhwp1rN1H4ufXzU/o2h6K2IhAXAY78xfvrleKPAlLFHwQ4mkuL1+n5Tf44DfUiHgI5LQAdYE5auYFWpBNDmBG3aeUc/0DTsDE8Lke8hrq7rdLx6cdcyyoxEonYrAfazKbhnWvlCD/+263wY/o2exp+utK3OTy1FYE4CDDGVbx+YxKAcQBPYhWusKPVx3mMt2DmpQbfyx1x1le1NBKQAByHz7RyXKhRgmC/TqDhEfikTVX29g/kvylMTKYjmcqMgpNisGzmzJxIK8dzHuxox3Qv0rcZLsRxroEj/sjWhK9TLx/XlunbeH1zTWg7DLQVgQQS4Gq2eEcAI6irlaMJvBgem+pD/RbYa+Js5wDUezvs3jjrq1oaCUgA7gWfAqFi/gKrhGFjMDXJUTqTQkESr38gRxzttHLIZVyG3MYUodlYhrq7EIqnyTINxeMwmCj83I76cfV3CH5+xSEvwe6dnmgrAiIAAl4+TJxudOfoK+RJI4Dv1hE8uzbiAO+K8yAcCT4HbdzHtuJsQ9XSREACcB/gKRhqDj7EHp1zE4SYAoUWV1o5LICIbB73D8yixQlM30bhx5E/DN3tg/irX/Yi/F7y89Nim1eD1Ssi4I0A88fGWyj+KAJV/ENgNbryWQ/deR/qLoI97KENVU0DAQnA/UEfzwjBQM5MQzbQ0mLFhs1mL+ING8PucEqYo2Sl0xieBGFj4LuWiWUErMisH+xMwu045+gIP/7b7YhfAVZ4M9RPqcLtODi1FYFEE6jz0CAFoEYAPQBMQtXn0SYD48Yb048uAd/HKOBqfHebTZkl4STUpHsCEoAGzBi3j9OInJrlSFYYI1mc8p2qcB9OC1PQcESQ/6agMalLwWSnsEOOYfqu0YeNfoqZUOjnx9R7HDlNlZ8fGTOsTwhT6Aq4nQl3ifqYwQTmeuh7M+q6C/Lp4WCqakRgHfZaD3uz0d6T73QUXr4cz7Yv4rt4auf5ydvQqykmIAHoAjiFRdUBByCtXK29UGSop8eotiMEuVqYQtCZJjapHEVWjO4d2+3p03L6smE00s+FI5cUfqa+k865UMDRHJHsvG6yDYAJRbLSt5nQ0j4iED8BfD75K/Sg+FuwduFzPvWvZw8HUFV3BHA9+nFdH0ItLwKQBz0P1oa2/hdtyh+QRHxeJADjuEAUGhQdg1i04WaUyxF+cfkHQlh1vLhxPH7gLIs5jv1UONLX39yMVHtI32YwOur0naKPxjpup3uZvo1BtTk6qqDaDlFtRSCpBGag9QM9HGGbh7qqmjwCf0XT58PinQZ2evYt/FGJ7/NL8L3OFcYqPiYgARjvxYFoCSJvLMUgfdwGkcIs2f6BFEmDmFrlyGMZfNzo68asJsaFIgtTy1x1bPvkOUIN58JpbsbJs9PU4d+mhe0wfdsAUuuZnr/Tdrzp2+jnF2T8RPr5uTl/58DaioAIxEvgjag4O97KqMcVpyr+I/AUuvRv2HsT0DUKycPwvLoIIvA/CWhPTSSJgASgR7B2WrnZc6wg08ph6pO+bxRqUxXus3fYGDf+gb0IUcNVtXZauZoaO8/xvo45jNXFnJKN9PZYXJHL+Ib005tYmCeZ8fI4zV1cXmEL26Kysom7vPJv9D8M/8Q+jPqxfTdl4qifCSunbdZj0G6es/z8HCraikBKCZyIo8UbBLoXdV9MaW91MCMC+G6N4rv4eux8HCwRzubHo51laPP/sP012mewaRWfEZAATNAFGfMPPNAasvMLM6et2ei3My0cl38gpl27tm21AuNCsLi8/OWzgUAb6um2V+FyxHBvwffyjmN/8f0YDSt3uT/FLKe5OcoYqKh8xRTrcF/fWPo2wxiJzrEmCj+3073FZSEsxJllBaqqnOa0FQERSCEBPMyn4XAUgPGW3ahIU/EngX+gWw/C3peg7vF++THsdNw7V2P7VzwDlDEkQXAT0YwEYCIoTmiDAoVCbLC9zfaJ4yIOk+KM/jlp5RxhaFLXHt2DaAsibEwIGUWQJ8Pqa+AIYfyfNXslb1eXFYYFOeqGUU4KOGYuYcq8qQTlxH57EX6FCMzNLClBBObOlFXQE89df4tAFhH4AM7Fi//fc/guUJgQn94QuDYRCLUfoHvHwhLpZE63gRthX0H7f8D2b7B1ON7UU2XYUSV5BCQAk8CWQoVx6AJV1WPxA+EjZ/vcTXEsfDisifEDKZwcYThFVXvamcKM07IsJsebqk3nfcfvkAstGNvPTYnXz4++iMyTTI70TVQRARFIHwF8N3FxwGc89kCBgj0CTHZ1PHNW4FpfheNckoRjHYY2vw/7Bmw5jnMvto/ANuG4UWxVUkxAAjCJwClcyufMHYsfCJ+9MKdMIfKmKhSCe/sHUhialEQKv4nHc9suxSuN50IzLqhTMp6+bb8+iMYNakcREIEEEPgw2jjaQzsc+XvcQ31VTR0BTtseA+NIYDIKUwl+cNzoK/UcnhErsF0JWwPbLUEICikoEoApgEwhU420ckOYTuXiDdNFE840cDxhY1JwWpMeYqLwY//dFHJirEP5+bmhpn1FILkE8HBmcnKOCMW7+IMdfAKmBSAk4fOC7/AeXPMl6OZ9sAOS3F2KQYpNGgsXi/wHx38S21WwF2A70CczXyrsrGJOQALQnJXnPR3/QCc9GsOxmBRnWtjxD+S/8QExqZqyfRzhxwO6FX4cKXXC2sjPL2WXTAcSAVMCl2HH15vuvI/9/oTvCE3z7QOO317GtdqIZ8zZ6NedsOkp7F81jvXOceNhuXJ8wwRB+Dz+vQX9Uz5p0vFYJAA9AnRbnQKnDOnKSqqr7VRvDCZtsqCCgs8Rgm7Tyrnto9v9HfHHPtJMC0PPMIhzCFk8ChDUWUUERMBfBPB55kjQeR57tQv1/+mxDVVPMQF8rz+C638GDnsLzEv+Zy89Z2iL/zduX8B2ELYZ/eIIIV0KnoXRh5BCUcUlAQlAl8AStTsFT+WChbYAYn5h09RpFFiOfyBHBE19AxPV773bYR/YJ7ejfgygzby9jDmoIgIi4D8C4w//n6FnXp8Tf8ADutF/Z6geTUUA1+1B3AefxH6/hS2Yav8UvB/EMTgaTTsXxqnh7ejjU9hyyvgZ2Ab0m1PJKlMQ8PrBnqJ5vT0VAQqgGoSNCXd02rH3hgfMRrbdCq6p+hHv+277UYQUdmPBqznSnxfvYVVPBEQgSQTwMOVz4cuw78G8Ds23oI3fwFQylADE1HLcEyei+9fDOD3rpxJAZw4dtzOxZZiKBvR3Nbb0O+V2HawV52E+PYUKuVAkAH1xlccyXBQj8PIA0srRR9BtWjVfnMZ+OsH0bQwqzbAudrq5/eyrt0RABNJDAA/O1+LI34V9NEE9+C0evFsS1JaaSRMBXMP1uDdOxuG/D2M4oKI0dWWqw7JfC8bt49jGYHtgz6D/HCG0VxrjfNrwd84XCUAf3QIURiGsgi0ZzyYSRoYP3LQ+6qH7ruCDZp8Ps3gUys/PPUDVEIEUEMD3zCE4DKfUzoExg0MiyiY0cmUiGkpwG5n9pZpgGKbN4buc06pfwL3yILY/gL3GtG4a9yvAsWeN2wexpSDkCCHF4MOw5bDNODd3IStQKRuKBKAPryKFUtUBB1hDtTVIuYa0cki9lomlODSevq2yKhO7rz6LQFYTwEMwhBM8CkYfL47uJEr4oSmkI8JoER6sHH3xWykbP3eKg0wv9KMZBOeUhUnBsf4Gfo/huBfAPgtL5H2D5pJaeM3njdup2PbAHsf53IvtfTi3rdjmTJEA9PGlDkA40UdwsI1p5Zos07Ry6T6lsfRt9UhNh/RtWCSiIgIikH4CeMjx4ceQHm+CHQc7HvY6WDI+pLej3T/C/Fh+gU79EJaM8071+fKa/gTGXLspKxBKrTjYt3BP/QlbCkG6DNCxO9MKVyG+d9z+F+dzP/7mfbsc58gVx1ldJAB9fnkpoOg7V4Icw/3wDWS6N7dZOVJ1imPp22Ygpt8MKx+x/VREQARsp/SUYsBDjN/rAVgtbDZsLoyi7y2wN8IY0iOZK7DWo/2v4AFKh3w/Fp4/LVtK2oQXrvEaQPw07rkrsV0CoxCcA8vEwpHMxTAuJuGo4HXY3oNz7MI2K4sEYIZcVgqq8jlzbCHYvXWLNTyUshF/I0JFgYBVecCBVhGmfVVEQARsAhRZ38CDZOc4D/oZ0eiHNHHrvL73ltOozmv8e6KxbUfo8dcWBR99LSgGaBQ49H0qg9ExPlWlAwf6PB6ajak6oI5j3yNpxYDrvRYduAD3+o+x/TCMbgWM3+d1FTmaSHnhZ+vt4/bCuLj9M87RLERHyrsb/wElAONnl5aaFFjFCBvjNwHIPkn8peWW0EH9S4APkg/4t3sJ71kfWlyCB+XyhLesBjOCwLjwvxai6QZ0+K0w3v/vhTFuXxCWaeUN6PBvYRzl/BHO7x+ZdgL76282+EDs7/yy8r0RH64M9mOfsvLi66REwJ8EKP6+gAfkXf7snnqVSgK4D6KwJ2DfwXHfOW4XYXs3bBcs09ICvgN9/jtE4K9h8/F3VhSNAGbFZdRJiIAIiEDaCOzGkT+Dh/0/09YDHdi3BHBfRNC5p8ftSggo+qYeDuMUMada3wabBfO7HuGCm0/DjsM5XILz+iP+zujid+AZDVedFwEREIEsJ/AUzu+zeBg+m+XnqdNLEAHcK+1oasW4OYKQMQUpBI+GURj6WRAuQP9+DxHIhVWX4Xwy1jdQAhBXMNMK8+/6rfixT35jpP6IQBYR4BTeNTDG+uMDXUUE4iIwfv88iso0Jj/gCCEF4ZEwRxDW428/6RX25WuwQ9HfczP1M+AnoGCpYkKgACtu/Vb82Ce/MVJ/RCBLCDCLAoVfVjnEZ8m1yfjTmEQQMjzLZIKQU7LpLiejA+UQgf+Nfu9Od2fcHl8C0C0xH+xfFCq3cLP5Jk0c+8I+qYiACGQ1gQ04u5/BbsNnvj+rz1Qn5xsCuNfa0JlHxo3Pven4e29BOBOvpUsQvhvHvg39+hj62oq/M6ZIAGbMpXq5o4XBoB1oOeaTWICMUcg+qYiACGQdAcYhXAm7CcaguHwYq4hA2giMi6x/owM0CsIZ2EwUhEfg36kWhFzpfAP6shj944r4jCgSgBlxmV7ZSWbcCFRUICuIP35ssC/sk4oIiEDWENiGM1kKuwv2KB5qQ1lzZtl3IqkM9O07erg3W9Ap2nIIMMbe5Ajha2FcYXwsjIKwBpbswgDYl8K+kuwDJap9PbUTRTLF7ZRU1/hGALIvKiIgAhlNIIzeb4I9BrsPthIP1mxd3PE3nN9mWLqmDHHohBWew4qEtZbhDeGeZbYcRxAugyC8HP+eC2Mcvw/A3gPjiGGyyhdwTOYRvjdZB0hkuxKAiaSZwraKkRGkqKzMGu5PrysO+8C+qIiACGQMAaai64Ftgf0H9jjsSdgmPLjS+4WCTqSg/Arn+UAKjqNDpJkArjPv9e3jdivEGYM4vw92OuwYWKJDajD13RU4zpM4NoWor4sEoK8vz747l1dQYIVm1ltdyAuMm23fOybxHdzgdh/YFxUREIFXEaD/3G9gHEljbl7m6OVwOcNcVMHoOMsl/fwe5oeIxiksr4UhWmgRWBdsF2w3rAHGkS8u5qD424PPcC5O7TJ3skoOEsD9vgOnfT2emb/F9r9gn4N9CJbIhxiDXLPdy2C+LhKAvr48++9coLraClRVWeHOzv3vmKR3eWz2QUUERGCfBG7GQ4eLKOyCBw+/cylAOFJQBuPy+dLxv7l1jO9xHxr3p00UiBR3wzBnSyFHsUfrhfXBOMpH8dmHPnBfFREQARDA54GfmwfxeXwI2+NhF8PeBUtUOQ9t/wHH4Q8t3xYJQN9emqk7hpvLqpg7z4oODlrRMF14UlcKS0rsY7MPKiIgAvsk8Iqgnfi8OKNzA6jRsc9aekMERCDpBPB55PTZAxBrK7D9POxbsEqY18JVyGfD2J5vS6Lnv317otnaMQZgrly40MovSt1CMB6Lx1Tw52y9q3ReIiACIpA7BCAEB2A/wRlzOnhjgs78FAhLX6+QlABM0JVOZzPFCMJcdcABKRGBFH88Fo+pIgIiIAIiIALZQgAi8BGcC7N7rEnAOR2CNk5IQDtJa0ICMGloU9twoKLSqj7gwKSOynHEj8fgsVREQAREQAREINsIQARyBPB0GBdPeS0Uk74tEoC+vTTuO1aMgMw1Bx9iBcoTPzrHNtk2j6EiAiIgAiIgAtlKACKQ4ZHOh3FxlZdyJKaBkxl30EvfEh4Dx1NnVNk7AaZkq4ZQq5g3zyoofoX/eVyNsw22xTaV7i0uhKokAiIgAiKQYQQgAv+OLv/OY7fnof6bPbaRtOoaAUwa2vQ1zLh8ZXUzrdrDD7dKpzErTnyldNo0uw22pVh/8TFULREQAREQgYwlcAV63uKh9wzddISH+kmtKgGYVLzpbbyguNgqnT6dMY9cd4R1gqjLNlREQAREQAREINcI4DnIOH63ejzvN3isn7TqEoBJQ+v/hvPz8y2aigiIgAiIgAiIwKQEbserjNsZbzkUfoAM7O67oqe/7y5JYjuUniRxiT0HtSYCIiACIiACaSLwHI77godjcxFI/L5YHg48VVUJwKkI6X0REAEREAEREIGcJIBpYKaNe8TDyTNumi9jp0kAeriqqioCIiACIiACIpD1BJ7ycIbM5z3HQ/2kVZUATBpaNSwCIiACIiACIpAFBDbjHOL1A6TOkgDMgptApyACIiACIiACIpBbBNpxup0eTjnkoW7SqmoEMGlo1bAIiIAIiIAIiEAWEOjBOdDiLbXxVkxmPQnAZNJV2yIgAiIgAiIgAplOgAtBaPGWafFWTGY9CcBk0lXbIiACIiACIiACmU5gBCcQ83ASrO+7IgHou0uiDomACIiACIiACPiIALUS07rFW/bEWzGZ9SQAk0lXbYuACIiACIiACGQ6gSKcAC3ewkUkvisSgL67JOqQCIiACIiACIiAjwgE0JdiD/2JN4SMh0NOXVUCcGpG2kMEREAEREAERCB3CVTg1L1k8/Cygjhp1CUAk4ZWDYuACIiACIiACGQBgSqcA0VgPIWrh3fFUzHZdSQAk01Y7YuACIiACIiACGQygdnoPKeB4yldqNQST8Vk15EATDZhtS8CIiACIiACIpDJBF7vofPMINLhoX7SqkoAJg2tGhYBERABERABEcgCAm/2cA6tqNvroX7SqkoAJg2tGhYBERABERABEchkAqOjo0zj9gYP57AxLy8v6qF+0qpKACYNrRoWAREQAREQARHIcAJvQf8P8HAOT3qom9SqEoBJxavGRUAEREAEREAEMpjAieh7vFlAhlD3Ob+euwSgX6+M+iUCIiACIiACIpA2Apj+nYmDf8RDBxj+ZbOH+kmtKgGYVLxqXAREQAREQAREIEMJfAz9nu+h70/B/8+XK4B5ThKAHq6sqoqACIiACIiACGQfAYz+TcdZne/xzP7msX5Sq0sAJhWvGhcBERABERCBzCAA0ZMHky4Yu1xfxuZQD1duJ+o+4qF+0qvqQicdsQ4gAiIgAiIgAhlB4BD08u8QgYth5RnR4yR0Euf+HjTrdfRvGaZ/m5PQvYQ1KQGYMJRqSAREQAREQAQymsD70fsPwn4PexRC6AJYXUafkcvO43znoco1MC8CmKt/b4b5ukgA+vryqHO5SiDP4n8qIiACIpAaAhA+xTjSRycc7Y34+yrY43jvCthbYfGGQ5nQrH//xPnVo3e3wg7z2MuHUH+FxzaSXj3pAjA2NGSNDA8n/UR0ABHIJgKxobA1Eotl0ynpXBmX9xkAAByGSURBVERABPxNgILviEm6uBCvfRX2KOyfEEnnwBgeJasKzulAnNCfYMd4PDF+cV/j1+wfE8+tcOI/kvH38MCA1b5xgxWaOdMK1k6zrDyNaySDs9rMDgKj0WFrYM8eq7+11Yrph1N2XFSdhQhkBoEPo5vB/XSV7x03bjsgmDjK9Q/YCogd5rvN2IJz4XldCzs4ASdxP9r4VwLaSXoTSReAPIPo4KDVtW2bFe7stMrnzLUKg/u7x5J+zjqACPiSQKSnx+rZtdPijyYVERABEUgVAQgg+rud5OJ4jI137rhtR32ODlIMctsEQTiKre8L+j0DnfwK7HOwUAI6zJh/38b5RxLQVtKbSIkAdM4i3NVlP9zK58wZGw103tBWBHKcwGBjo9XT3KRp3xy/D3T6IpAmAkfjuIfHeewFqEdbDGuCrYGwegzbFbAXIIbasPVVQf8Y4+80GIWfV3+/ief2E5zvcxNf8PPfKRWABBGLRKzu7dut0diIVTqD4ltFBHKYwOio1bd7l9WHaV98KeUwCJ26CIhAGgkw40Ui9AAXUdBOgPELjVPFL2D7PIzb/8A4QtiNbUoL+sGpxzfBmNqNdhAskWUZGrs6kQ0mu61EXHDXfRwdGbGnunATWMHpFOIqIpB7BOgN29fQIPGXe5deZywCviEAYcQwL+9NQof4Fbdg3D403n4ftrtwzE3YboTtgG0b39KPsB8WhjbwtAIO7XOBayWMo0wUfVzYcSSMC1242jnRZSsaPA/95vllTEmLACQdisDunTusgkCxVVzB66QiArlFINzWBvHXrJG/3LrsOlsR8BuBRejQ/BR1in52nGree7p5EK9xqpjWBQHXhW07jKKQ2zBsCEbfOm5pFIlFsBJYAFYF44gSVyjPhTGe3ywYj5nM0onGz4X4ezGZB0lG22kTgDyZsZHAXVbNoWVWfmFau5IMtmpTBPZJIBYOW92Y+h3BDyEVERABEUgHAQgtjtKdko5j73VMTs9StNEyqXDE7wsQf8szqdNOX5MeB9A50L62XPHYj1EQFRHIGQLw9ett2K0wLzlzwXWiIuBbAlwAcbxve+fvjnHF71kQf3/0dzf33bu0C0B2baClxQ4Vs+9u6h0RyB4Ckb5eOyRS9pyRzkQERCBDCXAq9YkM7Xs6u92Eg58O8XdXOjvh9di+EIAj0ag12JbRcSS9XgfVzyEC4c4u+f3l0PXWqYqAXwlAwHDxwgdhn4I949d++qxfDHHzQbBb6rN+ue6OLwQge80YgRSCKiKQzQR4jw91079ZRQREQATSTwBCZgh2C3rybthnYE+mv1e+7AEXnVwD+xB4ZYVY9o0AjMIpPtLb68urrk6JQKII8B7nva4iAiIgAn4iAFHTDbsRfaIQ/Cjs7zCGZVEZi194GvicD6PvX1YU3whA0pQAzIp7SiexHwK6x/cDR2+JgAiknQAETj/sr7APozPHwn4AWwvLxZAFFHuXwd4NHndgm1XFV7FXomGGAlIRgewloHs8e6+tzkwEso0ARA+nOp9BuJgrsD0a9iEYVw0fCPPVABL6k8jCeIR3wq4BA4rfrCy+EoBMEzcai1l5BQVZCVsnldsEeG/zHlcRAREQgUwiABHUg/5y0cNSiMEabN8KY7q398AOhiU72DIOkZKyHUe5DfY7nHPGBXZ2SyghAjAvnz8EGE+Sqf88FMRHw81lt+ShFVUVAV8S4L2NGzwBfcuzxj5zGf1RKYoTBOvxyyaVJd6+8osxm0dJUnkN9j6Wl1ECXZO9abr4N4QRp0UfpOE7jVk4mNWDadbeBaMwnA1jYOdMKQxBsgz2V9hynF/OBCZOiABs37h+tO5Nb80bGcYIXkIecJly36ifIpBaAvhysvKLiq09z62hkhxI7dETdjT2/XkYV9XRTAsf3Lthw6YVErAf+/c0jCMgbvpKkUqfKS35BoQklJ1ok9fFTegI54cDBYxKAgjg+4gr2p4dt+vw/Gde10Nhbx63N2C7EFYNC8D8ULiwZTuM8Q8fhT2C89iKbc6VhAjAtnVr3xasmXZn5YIF80cwzTUyHO/3s/P5zLnroBPOGQLx3+P5RUVWPtwj2jdu6Njx8ENnA9mmTMSGL1t+QZyNh0VcMFA/EcOoRuhwLD4sTo+nr6nsp9HJZNFOYHsDrsmv4zklXZd4qJnVAdtu7MkwMnYoGVwjjtTWw+bCFsKYeWT+uDFPL/P3crSwFJbokVn+YGNoEfrzbYGth62DPQPbgL7ys53TJa4v4H0Re+cPfnRhSUXl94K1tWWMd+Y2rl9BcbE17TWvxQhHvDMu++pZ7r4e6euzOjasn3RkNt+euscwxST5aPHhsGoOO8wqDpXnLrwEnzl/GOHHkms/QObJpiFjTqRt44Zrn/vVLy9McNfUnAiIgAiklADEIUcLOTJIEUi/wtpx42sVMPoVUhg6ApHCgIKSRrE4NG4chaRzNfPytsP2wDiN6/zdOC5M8ZLKRAIJFYBseMnq1aXr7196fWhm/WlFZWUF9sKOSQTGxE5M/Lt0+nQrNGu2RTGo4p2ABKB3hologZ+DvsYGa6DVPOMN/fz4OcA1HG1bv3Z5pK31ky/ccktLIvqjNkRABERABHKbQMIFoIPzk//+99zGFSvvKp87/4j8/Ly8GKeFDf0DCwIBKzRzphWcNt1xdnea1dYlAQlAl8ASvPsofvwwzWFfc7MVG+IPVoOC0dcCjIKPxEYwertu60Bn+2nPX3edPaViUFu7iIAIiIAIiMCUBJImAJ0jL/rB5R/ILwncVFY/a4Zb/8DiUMgK1c+yAlUcKU56V50uZ9VWAjBdl3PUGurqtvqaGjmCZ9wJx8+vZ+eO3s4NG772/M03XWdcWTuKgAiIgAiIgCEBzqUntWz/10Ob/nvp0T/bcE9vLK+g8OiiUKgwDyOBmP+f8ricNgt3dljRwUGrIFCsaeEpib16BzIcbKMP7KsL/fxYJrsWfC84bRqY+2Xh1qv779dXhvv7rN5du+wpX/I3KVzckY+R76GurmjLM0/fFAg8duwTV/1Vo34m8LSPCIiACIiAawIpHVY769lnqzbfe/9vKmbP+TAEXT6d4jlFZlL4gKR/YFndTCtf/oEmyOx9NAJojMrzjiMQe/17mm0/P452mxT6+XHULzoUGW1bu2ZVNDxw2rO//OUOk7raRwREQAREQATiJZBSAeh08iO3/+Xwrt3b/lJeP/uwEYwE2mFjDEYEWb8QoyRl8g90UE65lQCcEpHnHRw/v374+UVd+PnZ070Yae3curmpb3fT4mev/+XDnjujBkRABERABETAgEBaBKDTr3f9+CdnFAZLf1E6rbZmJIr4gVGGBzMrDE8SmgX/wEr6B6rsi4AE4L7IJOb1oW74+TXSz4/hpsxKfiHi+RUWcGHIQNfmTZc9c+01V5jV1F4iIAIiIAIikBgCaRWAPAWEjSnatPTBH5TMqLsAYWOKORroZvqspLraXihSGGSoIJW9CUgA7k0kMf+mXyoXeIQ7O125MXDUL9LbG+tYv+722EDfkqdvuCFTs3kkBqRaEQEREAERSAuBtAtA56whBKe9+NCym0Oz6t+PxSKu/AMZMoP+gaUz6hRE2gE6vpUA3AuIx3/yB8pAyx7bz88ObWTQnuPnNxKLjnasX/+0BT+/x6+8crNBVe0iAiIgAiIgAkkh4BsB6JzdB2+5/Y39zQ1/Lp81+xDbP9BwFSXrF5aUIH5gvVVSW6v4geNAJQCdO8vbln5+4fZ2TNs2WdEwA8+bFS5YQhhMq3PL5ub+5pazn7n2F/80q6m9REAEREAERCB5BHwnAJ1TffePf7K4sLT05yXTplXb08JILWdaAuUVVtmseitQIf9ACUDTu2bf+w31dFv9jU3WUG/Pvnfa6x07fRtGpvubmgbh5/fdp6+95vK9dtE/RUAEREAERCBtBHwrAEnkrGXLSnY8/dxP4Oe3pCgYLGKYjcny1k5Gj9NuyEkM/8B6xBAsmWyXnHhNAjD+yxwbCsPPr8kaxMifcbgihnXBqN9wf/9Ix6ZNdxdasU89dsUV5itE4u+uaoqACIiACIiAMQFfC0DnLD69Zk3dlvv/+SdkEzk2L78gbySC+IGjZvEDmUuVYWNKp8/IyWlhCUDnLjLfUuwNtLZYDOtiGsg5L4/Cr8gajUWtzk0vroV4PGXVFVesNz+q9hQBERABERCB1BHICAHo4Hj/jTe+Y6in99ayuvr5fEjb8QOdN6fYMq0cg0hz1bA1ngFjiipZ8bYEoIvLiFiUXNXLYM7kZlq4spcjzj07t7f3Nzact/rqq+80rav9REAEREAERCAdBDJKADqAjr38ii8Eq6ouD1RVh+xpYRf+gSVVVXbYGKSkc5rL6q0EoNnlHYbgs8O6dHWZVcBetp8fRpjDbW2R1g3rf/bsNb+42LiydhQBERABERCBNBLISAFIXuesWFG+7cmnrg7W1J5RWFxSGIsMmftpIa0c89xyRLAAmUWyuUgA7v/qxpC5gyN+zJfsJv4kcyQjbdsIVvc+VDgSO/PRH/2odf9H0rsiIAIiIAIi4B8CGSsAHYRnr1kzd/v9D9xZNmv2/8uzRvPs2GyGaeVywT9QAtC5U165jcfPj64DjDnJ26tz84ubR0aipz7+ve89+8qW9S8REAEREAER8D+BjBeADuITrr32/daIdVOwdvrMGFLKufUPDM2anZVp5SQAnTvk5e1Y+rYG135+BUjh1tfU0NO9c/uFq6+66qaXW9RfIiACIiACIpBZBLJGABL7u5YtKyx8fs03ikpDlxSVh4K2f2AsZnRF8jC6U1JTY4eNQX5iozqZsJME4MtXKTo4YId1CXd0YBQPw3gGJR/uAgzrMtTVFe3etvXGkve/9/zlixaZB6U0OIZ2EQEREAEREIFUE8gqAejAO3ft2pot9y29PjRjxkfzCt2llaNjP0PGlNVlR1o5CUDLHg3u38P0bS3WiOGCoZfSt0WRvm3jxhWBytDpy7/+9d3OPaatCIiACIiACGQygawUgM4FOX3VqoObVqy8E2nl3sAA0va0sOHID9PKMX5gsHZaRscPzGUBSD+/wfY2O56fcfo2jAQzrEs+wrp0bH5xZ3Q4cvqq733vMeee0lYEREAEREAEsoFAVgtA5wKdcM2vPplXUPDLQFVVzchwFKNAw85bU26Ly8vtsDGBysxMK5erAtD282tqtCK95kk48uHjl19UaA22tvZ379j+7Sd/+n9XTnmDaAcREAEREAERyEACOSEAeV3O37QpsO7u+74bqK78cmFJsJgZHjhCZFLoH8iRQI4IFgaDJlV8s0+uCcDo4KA94seRP1M/P073ckX48EB/rPPFTbcf9v4TPn3zokVh31xEdUQEREAEREAEEkwgZwSgw23x88/P2P3Aw78rq69/L4Qd0spBCBpOCzMESOmMOtgMOwiw06aft7kiAOnbN9DSAttj2aGADC4KhT0XeOD6j3Zu3PjMaHHBJ1Z++9tbDKpqFxEQAREQARHIaAI5JwCdq3XKPfe8rXvH7ttKamsPpHhwEzamqLQUo4H1WDVcjdBw+U6TvtxmuwBkTuhwB9K3NTdhBG/A+BrYfn5Y8NPXsLsl0tdz7opLL73XuLJ2FAEREAEREIEMJ5CzAtC5bidce/0ShPq4oriisnJkOGK8SpT1AxWVVmjWLIt+gn4t2SwA6d/X19hoDfV0G+O307cVIX1bR3u4Z9fOy1dd/sPLjCtrRxEQAREQARHIEgI5LwB5HZesbizd/MgdPw1UV51bFCgpcuUfCP+x0mnTMSJYh7RyJb67LbJRAMaGwhjxQ1iXtlZzP07Hz29wYKRry9Z7qmYe+qn7v3Rmj+8umDokAiIgAiIgAikgIAE4AfKSdevqtyx98M+ldfXvQGJY92nlkFu4dPp0CyuOJ7Sa3j+zSQCOIqj3QGurnbuXIt2owM+PvpuI5WN1bdm8rqAw72PLL7lkg1Fd7SQCIiACIiACWUpAAnCSC3vyrX86brCz46bgtGlzuaDAlX9gWZkdNqakqgqiI/14s0IAYpFOuKsLWTwareH+/kmu2OQv0c+P4q+voaED2T++9NgPvnvr5HvqVREQAREQARHILQL+GaryEfeNf7lz6+K33fvzHfmP9iCA9DHFZWVcKmq0Wphicaiz0xpG2rFCTAkzvEg6C0fKBtvaJu0CV8GyTLYKmu9BAKP/gUnrpupFCr6enTusfog/01E/pm9jIO9IT0+ka/OmKxdFLz7hlu+9+4VU9VnHEQEREAEREAG/E0j/EJXPCS1ZvaVyyyP3XoPVwqdhNKnAjX8ghUiQ/oFIK1cQSI+QytQRwNjQEKZ690C8tmI23jCf87ifXzQSGe3esuWhiunzzrj/S+e0+vwWU/dEQAREQAREIOUEJAANkZ/z1AsH7Fr16F3IE/xGZBPJizGbiGn8QIwCMog0F4uk2j8w0wSg7ecH0dff3Gw84sep9gJm8SgssLp37tiWN5J3yrKLv/K04aXVbiIgAiIgAiKQcwQkAF1e8pN+e8uHI0Ph6+DjVxeLwD/QTVq5spCFANRWKv0DM0YAjvv59Tc1WZH+PuOrwvRtBcVFDALdgxRuX13xvUtvMK6sHUVABERABEQgRwn4O4qxDy/KPWcv/tsh82bPxyKRSyH+woXBUiwwNcNIYdO5ZbPVtXWLq6DFPsSQ0C4xgDOZkI2p+CNzskdImGjb+rXXHXbQwhkSfwm9LGpMBERABEQgiwloBNDDxT1706bpDUsfuqmkuuZELKTI52igaX5hBiRmyJgyhI7hatVkFT+PAHLBTP+eZju0C7OxmBQKP476Ydp3tGf7ticC9TNOfeCcc3aZ1NU+IiACIiACIiACYwQkABNwJ5z56BNvbHnhuduRGu4wt2nluFKY/oFccWs6kuimy34UgBTJXJlMP78ogjqblpfStzU2Nlgjo5/611cv/JdpXe0nAiIgAiIgAiLwMgEJwJdZeP7rA7++6cyR0ZFfIK1cNVcLm45q8cBMJxeCf2CgEvEDE1j8JgCHuhnPD35+SONmWjhaynA6SN820N/U/G1M9f7MtK72EwEREAEREAEReDUBCcBXM/H0ypLVq0t3PPHUdwtD5V+CaCliOBPTaWHG3iupqbFCM+utwtJST/1wKvtFAEbh59fX3AQR1zFp3EGnvxO3HBFl+BwwjPVs33r74R/8wJIbjjhiYOI++lsEREAEREAERMA9AQlA98yManzquedmN69cdUtJVfW74B+YZwcxNgwbwxGvshl1ViniB/JvLyXdApCjoAOI59ffssd8RJRhXTDiB0E82rNr5wtFleWnPHjeeZu8cFBdERABERABERCBlwlIAL7MIil/nXrfA+/o2bHt94GqmgMYO9BVWjmscrXDxmBU0Mna4baT6RKAzC7C0T6GdWFWFNNip2/DIo/+5qYWjPwtWfaNr/7dtK72EwEREAEREAERMCMgAWjGyeteee+78befQyM/Ki4LVYxEhoyzW/DA9AukfyD9BN2WdAhA+vfRz4/+fqaFWVPykXYu3N0VHtjT/OMV//vty1B31LS+9hMBERABERABETAnIAFozsrznues2FC++/nlPw1UVZ2dl5dfGIMQNPYPhD9cKVYKlyJsDPPcmpZUCsBoOIzpXoR1wQpfN+fFfMOjsehI17Zt98487G2fuuPU47tNz0/7iYAIiIAIiIAIuCcgAeiemeca57z44gEND/7rDyW1046KDUfy7NXChv6ByEds5xYuhY+gSVq5VAhAO30bfPyYuzeG2H5GBX5+9upeTPf27NqxIThr5qn3nXnmGqO62kkEREAEREAERMATAQlAT/i8Vf74HXe/v7+n8zfFobL62BDDxhiKJxy2CKuEQ/WzrJLqagZF3mdHhvv6rPYN6yddeev4FdJfb+/C92oOO9wqDoX2fuvlf9PPr7MT072NrjKb2OnbAsXWYGdnV7Sj+0v/uuQrt7zcqP4SAREQAREQARFINoF9K4dkH1nt2wTOWraspHVHw/9AcH2zIFAc5DSq6fQphR9WGVuhWbNsQTgZ0qGuLqtz86ZJBeBk+7/0GgXgQQdbmK5+6aWJfzB9W19joxXu6oSn3qsF5MR9nb/t9G2Yvh4eGBzGaOGvFh51xNdvXrTIPBK005C2IiACIiACIiACnghIAHrCl7jKTCvX+PC/rg5UVJ6CIb18ho0xFYKcSg3W1iKjSL0dPoW9Yl2Kvz4kzRgeHIyro0XBIMTlbFsEOllK2C+s0LUG29uNw7rY8fwQ1mUUSrFnx/ZltW9+05l/ed/7muLqlCqJgAiIgAiIgAh4JiAB6BlhYhs4+5lnXtOw6qlbg9Nq34hp4Tw3YWMYNLkMsQMLse1vacEq3MSspQhUViIu4QykbRsa8/PD1rTYYV2K6ee3a1tJZfnp93/mM6tM62o/ERABERABERCB5BCQAEwOV8+tnvzHP38k0tt3XXFl5YwY8uW6SStH/73J/Pq8dMptm/YCD+Q5Dre19mCa+Kv//ubFN3g5vuqKgAiIgAiIgAgkjoAEYOJYJrylU1auDA5u3PQdzOtemF9UGKAQNJ0WTnhnDBscS99WYmGqODrQ1PD7acce88U73v72+OagDY+p3URABERABERABNwRkAB0xyste5+1du3MxkdX/iZYUfG+kZHRfISOMV54kbIOY9SxoAjp2/KRvm33rifLF8w79Z5TT92ZsuPrQCIgAiIgAiIgAsYEJACNUaV/x9MfffSt7Rs23hqsrD6U/nhu/AOT2Xv6+dHvsHdPU0N+nvXfD37xiw8n83hqWwREQAREQAREwBsBCUBv/FJfe3Q076Q/3blkNBy+vCAYrIohbMxILJb6fuCITN9WwLAuvb0DA91dP1x+0Zd/iNA0ZjFh0tJjHVQEREAEREAERIAEJAAz9D44Y9Wqis71G3+EtHBL8kbzCqMu0sp5PWU7nh/Tt43GRnoaG/4y+53HnHvrUUf1eG1X9UVABERABERABFJDQAIwNZyTdpSznl13cPMTj/0uUF19FKaE8+xUbIaBmV13yvbzK7JTuPU17F5fVj/3k3ef/vEXXLejCiIgAiIgAiIgAmklIAGYVvyJO/ip997/3t6mhhuLK6vnxJLgH2jH84Of32DLno6RyPD5D110wW2J671aEgEREAEREAERSCUBCcBU0k7ysZasXl3U+J8NF46OjnynMFhaFg0Peg4bY0/3lgSt4b7eyEBb2y8OOW7RJTcccYR50uIkn7OaFwEREAEREAERcE9AAtA9M9/XOHft2prGx578ZXFF+SmjsVhBjP6BLqeFGfi5AH5+Vn7+aO+uXQ/P/H9vPu2Pixa1+f7k1UEREAEREAEREIEpCUgATokoc3dY/Pzzr2t54qlbSiqr30QRaBo2Zix9W8Dqa2rcWjyt+oz7zzxT6dsy9zZQz0VABERABETgVQQkAF+FJPte+Ohdfzt9qLf3F4XBYK3tHxiNTnqSY+nbAtZQT09ftK/3kocuvODqSXfUiyIgAiIgAiIgAhlNQAIwoy+feedPWbY2FN75zLes/KIv5xcWBKIT0srZfn7I24sVxNHBlqbf17z1fRfcsei1feata08REAEREAEREIFMIiABmElXKwF9XbJuXf3Oxx6/KVBeeQJEYD6bLAiUjPY17n6y9uADT73jpJOUvi0BnNWECIiACIiACPiZgASgn69OEvt2+qOPHzfQ3Hg3FokUxqKxT9x75ml/TeLh1LQIiIAIiIAIiICPCPx/9LZZ0UZyLiQAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-mid{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnhJREFUeNpsU01PE1EUPdOZKWUotKUKFLEWkQ1EASGGxGBi4sIVrt27IixN/Cn+CxfVnQsXJiz8IAoqRBGEaMUUWzofnXkz781436QDkjKTyXuZe96595x3rxJFEeTzaKW6dmdpfIoxjuRRFECGn7/4Utvarj/syWgflU5s891qvGoJePJasfBgeSpnW+yEIJVS4DEBx3FzGT2qfvh0tJxOE4mCU0yy8X3BLdODRQTJZ5oMzYaD0UuDePzkbnnx1mjV9/lMp+izBKEIwQMOzvnJGoYhhBDgFKtMjmBl9XZ54WapSjLnknMnEkQYgflCVhKXLt+/dRMy2d5OHdVnPoxeHUtLV8u2w5/S78UzBJwLMC8gAsosIqy9/ga37WNmvgKVKmEkb7JSwI3pIdRq1kBXBZJAUKkb6wd49fIzbJthdn6cIhE0XUWbyP4cmshmdZAE0eUBD6gCN0DtZwM7Xw+RUlVEJCui7CmyPaS94zC06ZMedREERNA6djBWHsS9+9fRS3p9AraOXbhELMlUQju2G2O7JAQENk0XhpHG3MIVlEZzaDbdOKO8jWy/TraGsMmL4L8KTgnIfcfy4JBWeQNp0j10MQtB4EJOg6qFMI/bEH3pGNtF4LOAjHMxO1dGvW4jXzDi7Iw60TB0jJRyONhv4MdunbDneMA6BMPDA6iMFzExcQH9AxkUiwby+QzevtnF2OU8lBT1i8fOa2UO1/FwdGTHE2STHM/14+vlPOz0RxibKPfn9AHXZHBzYx866ZdTKkuVndhHuqenS1h/v4ffvxqyvbUuAtPizZ0Dp7X1fTs+FA9cMnWd4ZG90NOjomVFzeTcPwEGACDGeYddZX86AAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-mp3{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnxJREFUeNp0U89PE0EU/ra7XWxpSsFYIbVQf9REFBHkYBRIPJh4wrN3DsZ4MPGP8b/wUCIHEw5EY0w04o9ILcREGmwVgaXbbXdnd2bXNxPahGyczebtzrz3ve99740WRRHkWn5cebu4cH6SMY7e0jRAHr9c3WxsVvcemmbys9yT6+uHJ8oaPefypdPDD5Ymh5w26wMkEho8JtDtuEOZFCrvN/4uJZNGH0T59D58X/C27aFNAL3Xthmsww5GCyN4+uzu+OLtQsUPxPQx6ZMAoQjBAw7O+bEVCMMQgqygs+LFs1h+dGd8bna0QmXO9OL6JYgwAvOFZKKoy3V44CgNfv7Yx8oLH+lUEgvzF8Ydhz+n41snAGRG5gUEwClzhHdvttFxfNyYK0EnJozKK5eGcf1qHo1GOxtjwI+pfvm4g/W1qtJgerYE2SXJSIL9+W0jk0mCShAxDXgQKgbNXxZq35vQKCiKQkSUXdc1+gcch1FHGPmKuIgBCdc66qJQHMG9+1NIpUylxxHtuW6gEiTIu+N4yjdWgty0yTmdNjFzcwKjY0MU7MLt+IjoSad16FoIx3b/A0DZ7FYXnsdpAjUMDOjI5zPgfoBsRodhhGhZHfBBU/nGAGRtxWIOg5lT2NtrI5dL0SB5KJzLodloqXaOEatPGztKq5gG3S5DNjuAK5NjKJfPYKI0okBkSdemCiSgS/rkQNLSePtxBj4LSCwfFtE0krqqX7ZVMnu9XlMXy2l7ME0dzA3iANQyY6vWxC61UY41zTyNcYh6/QCNXQvzi5dR39nHVq1BUyuMGAARsF6tbbe4iKD1r7Om5iFBdmW1SsDflLiuB6sX90+AAQDHAW7dW0YnzgAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-mp4{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnBJREFUeNpsk99r01AUx79psrTrujVtbceabnZs4DYRHSoMh6Dgq77rn+AfoA/+If4Bok+C0CfxVRDBh+I2NqZzrpS1DVvbtU3SJPcm8SSlsJlecsn9dT73nO85V/B9H0H78OLdt/LDlQ1uMYybIAgI9n99OWxoe83nkiz9hDDae330JvxL48O51Xxm/enNtKPbVwAh0Ec6kYpXat9Pnl2GBC02HrjM5Y7h4P8+7FtIFVJ49OrxUnl7ucIdfhv+BIDv+fBcj7p/tXMPrs2RXVTw4OX2UnFTrXCbbY7tpMsA13FDSDAOQ4gJEGUJLs0PPh9CkESsPrmxxEz2lra3rnpAt3G6adgdQhBpmeLkFodNmsjpOPoXBrQTDcmFFNS7i3MRDzzPCw/vva8ikU+COQxm14BBhvJcHLGpGPTOAJxxeLbrRgAkYujBdH4G5oWJWXUW19YL4XqunAMFhnq1BqWYgaY1MAHASQOiU96zKzkU76mwehaOvx6h9uMv7KFN3RopL4oTAI4HRh4wSl399xla+00YbR3yrIzM9SzSqgJJnoKcklGrH08CcJjnBtLLCsSEGGpSWJvHtDKNoFippsJ0ulIsDDUCCATMlBQkNuahEyiZTcLsmFBKaQxaOk53TlHeKkM70AjAooCghBOk9sKtIvqtPqS4FBaRnJSRX8tj2DOh3lFB5Qw2ZNFK5LRo6w4sKt2ggAzywidAMN/9uIPSZglBLDO5FF3mRD3wHE9qVRvoHrUpfn+UEQK0/7ShtwboHJ6jdH8RZxSC57hSVETb7e5/2u0FxqPHJow+8iZ4lYY2QGu3idhIxO7Y7p8AAwALCGZKEPBGCgAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-mpg{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnxJREFUeNpsU0tPE1EU/ubRdlqmnUBboa0UeUQDiUGCC1+JmrhxoXt/gBvXJi74If4AV0Y3sNKF0YUaICqoIfjgVShEiGF4tDOdO/fOeOaSKtie5GZu7pzz3e/c7ztKGIaI4vn9p+/P3h4e4a6Pv6EoQBDiy7P5rc1P1Xt6XP8M5ejXo6UJ+dWbuemeTGdpvNdiNe9YvQLe4Bi4PmTpRmyq8m71rp74BxKF2twIHvAo+f/l1T2Yp0zceHizfOZa/xRnfBRhG4CQqAYioBWeXDyA8Di6ei1ceXC1XBwrTXHPH2vW6ccBBBMI6BsSUEQzakGL6xB0tvjyBxRNxdCtc2Xf8R9TyaWTDOg2TjfVdw6hqIoE9B2GxkEDWlLH7s4ette2kSp0oDRezrQwCIIA3oGHr0/mKMmE53qo23W4+w5S+Q5ohob9X3tgHgO8ULQACC7gMx9mKQP30EW6mEHpYi8xcJEdzMucjfkKcrTfmqmiFYBxCF/Id+gayKJwoQjHdrA5v4HK7Cq44KjZNWpagaqp7QACks0H9znW365ia24DzoEDozOJbH8eVtGShXHTwNracnsG7q6LzsEuaAlNPm9h7DSSVjLyCMkppDI+GS2StQWA1RlKo0X56n2X+6QHkmkDakxF9WMVqWyK+s/BrthYfvWz1Ug+zUDcjMPMm0h3pxEjFma3CbIuCud7oMc0LL1ZgmElpGJtW3B+15HIGNITrMYIlOH7i0U41NrInREylYbu4R5qQbQBaAh95fVKZCnpQCnb9DrWZyrRERS6NDeUw+yHaXh7rt4C4B8y+9vkwn7kwKNRpDoa9aiFKBYnF+RcREqQ2e1m3R8BBgAy9kz9ysCE6QAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-odf{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAi5JREFUeNp0UktrU0EU/mbu3FfE1KRRUpWYheALNBURUVy7cy9UkO6KW/+Lbt0IPsFui4gLBbUqFaUuXETUKCYa0jS5yZ2ZO557b5MmTXpgmDPnfOc7jznMGINYPi0de5UvmpORxpjE/kbNqW005DVu8TWw1H758ZfkFgNgJmtyxSPRjJIj0QTW/RDiYGXGb7Dl32/eXrVsd0gSCx9miqC0ooCdp69g5Q/h6OLN0ty5ynIkwzMwUwh2FwMdcbDiCZQXlkqFCpEoPT/wih1YjLInANcD+/Ua9bu3wJlGvrBZCmet2+S6ME5g4oGlZ9A/I70XCDhhDexPNTFmswJBwcnuXkF86VSNZxVu0ukLSGnBcqlnN4HoCQIaIuIv7LUooMOgQ7q75LAAb59B9gCBHSKgqemRr94mMKmD24CfM8nb7THYGQNLpAkUkcb66JyGBFFEWRVL57gFEH5qj8Lxwca2qS3EZaugmzAw24dR/XQgwtsCSBjPIdWbUoE2UJLBnV8Ac/ciWHsK9/glWLnD6K2vgPszsOdOQdfeQ1c/ThKoTgDn9A3KUED/52d45xchZsvorD6Bf/Z60riV3Q9Z/0bbGU1uopYGkfERSQ3VbsMwl0qlqoIARmSoPYXWy0dor79LfBMEEd8jGs/uQ3Yl7PJFNFbuEXiV2riCf88fovXhBbo/vqP3t02/ZYmJFqTkzY160Go9uEMbFK8hR/NrdXtFuUVmnmySVGgO4v4LMAAjRgmO+SJJiQAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-ods{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAetJREFUeNqMUj1IHEEU/i7u7Z23e8tGgneGQPw3hZDkkhQiSuwMQREba4uUgpVlCrvEQhurkCoWqcQQ0oTAaYKNqJygGEwgHCSB6Knn7eXcdX/GmdHVPWYFP3gw78173/vmvYkQQsAwNvckq96UnyIEh7/d4t7uUd/8y+85P+bXSX4grkhI6nJYPW7LrXpBK2YxiSoShhu4Buq1NPofDeqdrZ3Z4cl7D4J3UtA5VyVAlmJoru9Af2ZAp1lcCQ3nqgiuKmbY3l/BH+MnHM9GVLP0Ww3KNA33CQoQQnL834Fj74PUGkANEIkCSSsa8gQqgYTIcB0PVsXB318GInRiCVWCkpRFAs+j5gKlA4t29Ggh4d0t04FKt9PQqF4UFgumSEA8ApeaElilWbYRVy/lsns/N1QBkxtENF4jxPxcgcB1CZVOrvMteK5IQDtJJIGh++PcX9iYwWjXK37+vP0WdYk0Ht99jtX8JywWFkQChw4tc+cZcvlF7rMze+ubbxN40fMalRMDP/6twaiUeK7wlZ0TD0a5hLTWxo2d45KKprqHKJslTsy209s2wnMFBTYNZjc/oLt9gPvLOx+hxVJIKS2YW5pCbSyJTGMK775O8VyBwDJd2LTDl/X5i8v3S7NVw9vJb51tITDEUwEGANCx2/rXEEFFAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-odt{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAepJREFUeNqMkz1II1EQx/+7Ca6JkqyYiJ8cKEpAQbBQFDm0sVOsFBS9wt5KOTgEG5twxVlZ+XEnKNiIghYKxx5nwEpIIXaiSAgKGmMi0d23u8+3T7OaZJEMLG9mmPnN/w1vBUopLPNNhRWXHOyDg0nx82TiJtZPlPVoNpftc2cTotcHtxx06kdXpSQ/BvzKESZzIDmAz6y+NojOjpDMZiqRPIgNoFyWM8DrKUV7axO+gcp4g7AzmquAdVNqOgL2z2I4id1B0wgeygOyt/rLL5buLwAIDgA9dY+L+DkuDQOCrkMgBsRglcMOqAGwIstMg8AkGsuZMNUMRMkLqE+QGloglvlA7uIOAKvZajR0qJkUj/XHe0BTIclVKKlrfKsj9qA8gA6wqSJzPaXlr7ky//tdLEUfawsBjExUFGVWbT7AxSa42H2LMfODmvd3wKb7RAMLYwM8nts8xJ/pEe7/3PmP2eGv3D+9usb35W0bINoA7RmjXSHsH0f5Z/mUSZ0Ir2JmsBtD80s8/rGyzWsLFTD5yUQCbfUBHl9d38LvkdDTXIuHVBo0k+bbt06qO+yAPGXwe/cA4wO9PN44jKDG70GougIzi2tQ00ms7/3lpwnBBgjZ37Kkd1Shht5XzBIFl/ufFtniT/lFgAEAU//g6kvdGBMAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-otp{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAcJJREFUeNqMkssvA1EUxr+ZjkdbrfFKVD12ErYSRELY2fkH+BMsLcQaSwsrSzZi47EjJEQkEhYkFlhYSVtFpdqOqpk717l3jKZmiC+5mZlzv/s795wzCuccQncz3YeRBj4KHz0/RrOZe2NsZPP20o255zQ3EAxzEAC+6uzTw13G4TFQAakA/CWtIYbY0KBOrx7IvwDQqlHV1o3YxKTOvyAUvfQCfqmA3e4ikyS/zRAKvOot7eoSHEgZIHrCfQAfBqBaKQQDKScQAExd8emBANg+2U2CvNMkkgSqBmrCxFB8mujeoJBWwEqARcssKTAJEGrmaGrjqK1zvNknH4BtyxKl2VUpRxmj5W+x73q9AEaZrR/ND1EJluIpS3i9JQiA+a+hSq8HwJjTsLrRaWitPTCOlhEZn5N75sM1qigmlN+dB3u++Qao5W4TtbEXXIsiszGL4PA00itTsu6XnQWo0TjMTAJqfMDx/ryBJcaVzSNSH4fW0Q+rkIf5rsjRiid7yyN7uoXS3Zn0egE0NiORAN9bQ017D1Lri7CLlP2EDr3Rf7C/itzV2bfXA/igLDaRixfngFhSCooH2xVPCWBlwKcAAwBX1suA6te+hAAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-ots{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAfZJREFUeNqMUk1rE1EUPS8zmabJdDKB2glEwY9ExJYiBUEQpV25qgtBXfgbpEtXuujKf+AfEKRddOdOGHClbYVCvyKWaijT2mhjphk7Sd7Me76ZONp0EsiBYWbOvfe88+69hHOOAE9f3zTVnDKNHvhlsfqPw/rM0ovyWsRFdXJEpDIyRnSlVz0KSkmvabaJeXSJBEhgAJzTDNybmtUnS5Pmg/lrN07H5NM/f13FoMgpXDSuhiIiK3Qi6LUugX7FAbaPPsJqfIHHKCStqRsXVFPQuZgD9BBxjikSiRq41AAkgCQBzVf0+BWEBX7GBm0xgHHUqk1UbBuEcIydzyCZlOI9YEGuDxwduCCitS3Xh3viCZ4jrcq4PJ6DLHd67tjtuAAXib54dCPVEfQ5XIcik/0/2iDeOYz3ceCxrisMi904y0XiMQFfkB7lg6xFHwFxEqUMV0anUNBLWKm8xd3i4zBWOzmASx0UsiW831mA59Xjm+h7HCOygduXHqJatzA7Poey9QnXjTuoVD/j/sRcmDOWLgqnLC5A2wwST+Pn8T629lahSCo291bwu9XA7vcy3m2+gTaUR14thrk9BXasbdiOjSe3nmPpwys0xSi/HpbDd3bIQC6dx/q3ZbRb/j8BEi3Po5cTJpHI9CBNDEa++GyDBN9/BBgAwfDlCVUQaNAAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-ott{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAdFJREFUeNqMU89r02AYfpJ0iVm7EqhVOxw7dDBEdpiCE1RoEZRddvUgbIex/Rs7eehppyF4LOzQu4MxwYp0HgShIuwwUVSCVtl0s13afl+SzzcpyZYmyF74eN583/s+PO+PSEIIeJZdrtQVI19Cgmk/Ph39bpllXq82g7sgLxVcyKNZpIx8Uj5u5zSjc9Gov8ZihCRC8D+7On4JczevGeTGSEIC4ctKJtB1DTPXi1iCCEkIm1EFlC2Em0iwtWfinXkIzjiO0jljtDC5TtflGIGUQMB+mfja/oPv2Rx9MMjpMdJxOXyXTwkcwIkewfqQ1QtQNB385zcI14FrtQexsSb6SRysZ4Fbf+F6eHwATc9gJGNAm5iCTL5n/LCVRGADNoeaGoHqyaXj5gqQlTODovcwNk5Aj6wXqV8eCo7EDhMonEHpW+dZC7gUG98D3geo7vkb01h9cAvPdt76OGy1xntUd3bjUxAk3+l2sHJ/FgtrT0MUJNfDSm0bjQ/72Hzxxo+NK+h3B7XRNO4UrwymQtMIkdTBU0m+sBOayLsn8Ka78mQDjx/e87HXPkb1+UsfP37+AmZ1fP/suknBb6nefVQXjl06TxMlJfWKNWr+Kv8TYAAkUueexJF47QAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-pdf{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmhJREFUeNp0U0trU0EYPTP35qYxaW6TlDapNKWGbgo2FkF8rARB6rboXusf0F/hyq2U4krFqugqSBeuAyL4SERBstHa0iR9JKZJ7mvu+M0tqZGkH3x8987jzDnnm2FSSqh4ns0VU1ybFzj674Wa3uWiWbfsFQb+jrGj8Xvbm0HlvYVRxhJprpmTlGmum+OMm5uNPZNbtjk3l82ey8++8oW4Jv/H/wdA456g2kvH99FyHNiuAz2dwflbN8YW8zMK5Go/CMfQkAhpGsyQgRCtlpE4jIULyC9fHzu7MPPEl/5ib6WOE0JJNRiHHg6j86mMjw/2gG4bkbY4PW4Yj2j64skA5FTHdaEMPiAJszt1sK0d4suJmY4k0+IDDGRfqmh0u5gejQc+fG8eYCIahRQCEfgQnIuhEkgtONE+dGxYxEDj1DhiEycZ+1YXdUpHCqTMJIYyEES5aXXQsi2kYlGEia5GtHVKn+amPBeCutPgfLALPuVu+xDVPw2EQyFEjHDghbpYNm1yKVVnYjTOerepn4E6XQmLGSPkPkOXWATMSDcjQEkAaqOu6+i/rccALtFL53LI3r0Nq1ZD4/MXZJaWYFer+PXiJc6s3IEgY3+uPYZHTAcAHM+DTE8gnM1CSyaCulv+GrRy8uYyElcu4XfhLVpkpNtn/DGA5Uu0abFH36WnzzCayWAkmYJvWeCkfb9SwY+NDbSoOx4bYqJF8rZqVRRXV/HhzWtUSmWwmWl0RmN4v76OUqGASrmMOkntSHF8MOs954dT08W248wzYsJDOujRBAaqqikTpRo/qqd0/dv97c3Lat9fAQYA4z8bX9nTsb8AAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-php{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAhNJREFUeNqMkltrE0EUx//ZbDaXNrvZzdIkbYOXGgxYQlCK2IIY6EufxGdB8Av44AdR8AP44JOPBR+Ego0PClUKTTXQSmkTYtOkmubSJrQ1e3H2yJSEJNIDs3PmP+f89pyZcdm2DcdWvn7LzkxFHmCIra7nm9ulg8yLZ09yXON55Dgjt1PM2iPs0+aW/frdh8bzV2/SvQBnCLiEqcFxLKSSodlrU9leiGPihWePBkgeEZO6ShC2dCAZNuf6ADb+ldQ5PUPx4BCFcgXfdwq4Ph1Dtd5CZi4Nw7SQiMdCXkl6yVIy/QBWgcU+yx/XsLK2cdHndqlK/lZxH/OpJO7fnsWY3z/YAq+g0TmHpoUH2vB5PXi8RD9Fo10aAmDJTgWyIuOupmK38rsPcOvqJO33XWEvwLJsmKxHRVEwf/MKWl/yUMf8mIloWN8rw+sP0D6PHQmYuzGNgCRiMZVA17IQV4OIaTI8buH/AJMFd02Tkp05PO4jnWvc57EDAINt7u1X8Pb9KgI+Lxbv3cFR8xjx6AQ+b+Txs/qL9KePlih2CMBCq92hg2qzt1AoV7H5YxdhdqhHzRbgcpFeqdUplpvQW4FhmAixZ/sws4BoWCM/qmsE5XqE3dDQCrqGAYWdejqZgK6GUD8+IV9VghBFN1RZJv3sT5diBwC15gncggCPJKF0WCPN8dun55jQdVpz3Ynl9leAAQAJhiGatD9AOgAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-png{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmtJREFUeNpsU9tOE1EUXXPp0CAUWmJbC04xBANNTF+kKhG8fID6aqL/gPEj9E0lIf6Dj30HL03wxQtVIC0QKrWxNG1Dk9Z2Oj1zxn1m0oIZTnIyZ8/ee+211z5Hsm0bYg29fLGpxWIJWBYGS5IA8ncKhT9Wvf4Yqprtu+w3q85X7f9QxseD/pmZMZsxN9fnc5JNw0ACGGv6tPSvyvEDKEoWZ5Y8OHHObKpucw4B0t3agnl4CJPs2YkQVu4s61ORaBqMJc8CDBiIRhhVM9bXYdVqYAcH8M3NgS0tQQsFcfdKHEbvlr6WyaR/V6uPKPy7B4DT7lUq4MUipMlJ2MPDUKtVfKZ2nn/5BoNbkONxXeb8LYXe/A9AJLNWCxgdhZJagDI9DZg9qIkEytRSkdqTSFQtGILSbgc8LViM+tc0yPfukzIyOJ359k9YR0eQdB2KmBbpwXoM3Dod1SkD+scpEapCI5DdpsJhIJcjajQZagcjI+5oLe4VkeQnyiZgdIH2X6BJ7dSqQLfrggjw0AQwP+/GegCIHppNoFAgEMO1RZKo7BQgRi3yN05cnwdA0BQMAgF3C6pnbuNg92M9AFT1diSCh6kb+FGvo2MxnBB9ocZxp4Mns1cde213B81e7xwAcl4jkaa0IUSjUdLJwkL0Ej6VSvArCt7l81iku6GrKnYEU89VJlSJRmR0Dax+fI9suYxSo4HlWIw6M3FBlnD9YhiXabyOsOeIqG7TzDeIYo6EDGp+ZPb2kKKqH8h+mkxiI5/D1/19J3bwYPvPWXq2skkiJVxesqt0XzghpKM8nRVV2Lv2q9eLIvSfAAMAaacnllcFBmYAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-ppt{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAkhJREFUeNpsU11rE0EUPTM7ySZpmzT9DNamWAtFfSiCigr+AxF9zKtv/hvf/Aki+FEi6ov4ItWHPGiwiBUKoUqqTUJImmR3M7Mz3t0kNe1m4LIwc+65595zlxljEJzdR5uf5nLmsvZx6gSvtd9W9bjhF7jg5dH9nRc/wq8YXaTSJptb0xklx7IZoKUEz1zJ2DUU69/37vFYrDxegJ9U0lC+AoIIVGg9CL+vIObP48KDQn7x0sWiVnJrnEDg7KGk+i/Ac4iUM/R7BsmrSSxtXMfa3X7el8+Kjf3KfUJ+iRJQw4w0Tc8BRyWGRAZY3rBR/VlC+XED2ayDhZyXl03+hNA3TxNQshlGLAnE44zCIL1goXZwiMNvB1i6zbC0KuAsxNITWwgNMYPeLVJiFEO9ArjHAivrAjNzBr4f4vwIgdGD4YUACsZCE8AtYGWT5jCsGQw5wEYJzP/pj5RwYTA1b07eQmfZ8P0sgdaM2FlYwWkMgMpl6NQAO33GKM0wsQWflkh1uqGVmVWblsiDkQyqxwfag35SqcktaEWTUTHYNx4iGU/C29+BvX4Lpu/C7zYgFjegSY63WySsHyXwpYHU00ieu0bAOuJbBTArBkiXKiaAmTzcvRJUV9E8rOgqBwqlY8ASs/AadbRLb8CzeTjVClqft6FdB17tL7yeCbFRBYoLr6vR/PiSEl5BZJaBD0/R2nkOZqfQ2fsKt+0SEQ+GLSIEUvJm+6jbah2+pS2aon+4g/afd4SYJVuA7vvXdC/IHQtSoTnK+yfAAIEaId1m+vudAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-psd{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAqxJREFUeNpsU01ME0EYfbtdKKWGtoItRWgJHApCBE2I0YuoiSaaeDJeOJh41YN3TfTixcRwMfEk8eDJGA+Eg0YTTRRMg02KKFooCBbTlkJLS7f7P+u3K9Xo8iWT3Zn55s173/uGM00TVlwZfzJztD92iKO5ouvQGQPHcQDN380vlDPr65fdLj4Oa41i9sFt+ytgN7o7woGOrqgvvpLBaF8vWj1NUAwGTVNRM3mf5vU/zaU+XySQuTqIFXz9hxmGLkoS7r+YxvVnrzGzlgXPDOzUZPT4m3Dt/KlIuH9oUjXYEHZZ/wOgGQZi4TZcGI5hLb+FO++TSOSKcLtcMA0dI0EPrp4+HtnfG5skiUecDGwQE2MjAwiGWlFVNDz+tIyCokJhPKYSX7Gdz2I01hOJdnY9rJ/7UwPGTEiqjtbmJtw4MYx78S/4Wa3h5UoOYwPdIOp2Xi/t18rlFgcDw6o+ydiWVRwOBnCpL0oOAMmNEhLZIgSeoxwGSWcERon/M9DoBknTIdNQNAMnO4PIVGpIFXcwndlA2OtGc4MAxml27p4AIulWSIa9QVadiYSoJxhqBJivKgh5ad3k9gaw6JdlDaqq7q5wINY4F22HaLHSDZQkBW72O9cBYFEviBIURQH7a7MN0uDisUW12ZZcaGlmdq4DwCqeTo1zNtZuW7hUqGIw7MNqSUS2ImNsKEpSdEwt5lGhfQdAkQBEoub3NNrDJfAIeBuRrcrY5xGQ2RFJAjl00I8PCckJUCB9q1URBnk38XEJEuk41tmGwZAf66s1VOh2keqwoUnYpFxHH4iKIixkN3HzVQKP3iQR/5GDKMuYmE3h+fx3MHqh1sMafztHLuiCg0FAk0uFdLqcpGY5QEXbTC/j7mIaVjc18DxufUtBJ/vcggs+3ijVz/0SYABsJHPUtu/OYwAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-py{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAlVJREFUeNpsUktvEmEUPTPzTUFmgJK2UqXQFG3pA6OBLrQxamJcaYwuu3Dp0l9iXLvVtRuDpgt3JIYaTVSaxtRHsJq2xEJBHgXmifebMhECXzKZme+ee+65516h2+2Cn2cb2VwyHl12//vP2/zOQaF4uD7GWN69e/LogfNm7kUsPBFaXYwHMeK0OlpQEJApHJTuykzK98dE98O0bLM/UNgr4v32Dj1fwSQRt9dSsfmZcMa0rIv9ODaqYrPVxuPnL1Cu1aEbJu7fvIZUIo4bqeVYRzcyv/8c3SPYpwECt/dmu4ON3Ed4TymI+hQc1ZqoE+F+uQLDsnHlwkKMscJTgl4eJOi9fxZLePNhGx6ZQRRFqH4VjZaGSv0Y6cQcJLpra0ZguIWegqDiw7lYBBZV6xiGk9DQDLzK5bEyF4Hi9VLMsoYI7J6Es5PjeHjnOl5ubqHaaJGBEkzbxplQAKIgDmBHekDTgI+qKKqKLvNApgmEgyquLs1CoFn2Y4cIeLJpkjoCLkWnUSIF3JxISIUsCjAoxhWNJLBIJs3YeXj/08oYZkOKY65HllE/bkMmY504YUd40HUq2JSSyW6iVPmLiXE/ZMYQCU+hXK3h1toqdNN0sEObyKtqtDQ6kXDwcadDS2TBryp4nX2HxXjsJK6bDnZIAZem6Tp5YMMmicn5OC4lztNWtvB9cg+hQABtWjKL2jH/T3GgBcYDXEE6mcDM6SlaJAGMWkivLBC54ZgniZaDHSI4rNSqn7/t1vgkGJPwZXffSeCjk2iUWz9+nSTQN8e6ef8EGAClUi/qoiOc3wAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-qt{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnVJREFUeNpsU8tu00AUPU5sp41NkzRxpfSZqi0VIIQqEEJUZYXECvbwCWxYsuBD+ABUFrDrCnWBQEJdIWigBSr6pqRJ1ebhxrE9M7aZmSrQ4o505fHMnXPPPWdGiaIIYrx89GKpNDdxmXkU3aEoCsT+z8W1Sm21+jCpJctQTvaerj+TX7WbnJ+0cpfuX8mQtn8GgJ4AZtIFY2Hz3foDVRcgyt+cRHcS0IARh+D/8G0PpmVi7smd0dLs+AIjwTVEiANEYYQwCHlEZyJgIQKfoX84g9uPZ0cHZ4YWmE9nuufU0wABCSSImMsWEgqSuoqA/39/swZFTWLy7vQo7dDnfPvWWQa8GuOV3IYLJXmyzDzG2/ChZ3pwbHdQ267BKJoYuj7SF2MQhiF8LuDK/Gf0DKTBKINz1IbTbEMzU1ANDW7LAfEIQKIgBsBFlAx6LYOz6MAcvoDCtAVGGPKlAiIu/F55F33FDA6W93EOAOMaMOl7biKPwRtD8Foetj5sYPfTDtxjl1f3Ubo5jkQieQ4ACSUD2iE4XDpAdbUiW9D7UsiN9WNkZgxajwbd0LGzt3keAJPUc1N5SVeENT0Ao2BKV6QzwlZeRBSKAYhe3aYHcZWn7l1EfjyPypcK9LQGa8qCvW9j9+MvaasQOHaRhGWdhsNLR8hwodYWf6B4tYjDjSOovRqq32rSYq/lytw4A77o1V2ERiAtzY5kkUrrsH+3QF2KY87ArTtQuQ6nAf4x6FCV1D001+vYersBM2vA4y1Rm2D7/Rac/TZIw4d/6MrcGAPf9htN0miJh7Lyuoyvr8rQeP9iVJcrSKgJ+TrFcyYebXTP/RFgAFQobmIOBxbsAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-rar{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnpJREFUeNpsUktPE1EU/u68OgylZXi0hZACQU1LEKKCMcat7jTRnQsXxsQtv4E/4M74P1iriUaNCw1FgxpjCJQKKAU60+m8mJnrmSll4XCTc8+959zz3e88GOcc8aq9evChOHl/lvMoubvWX/z4+BwTlbvw7bXdg8b7h6LE1gGW+O88CRMt4XTlR6/rYxce5Xv3jlHH19fPkBu+gWy5mlcFb3Wn/umeKOEMJF5C7xCFbtA9dRXjFoYKGiTRAlPGUV1aKU9O3VwNQ74A8DQAIZxqAuAhBPIMFYpQVAVB4CPSZjEzv1weH5tbDQN+JQ2Abu488mnzIbAAA3o/VK2PwDJo7r5Fy7ZRuvi4PFS6+qIXdVYD8Jg6BUcuOD8BozSLlRWyicgVKkTMQWwUlFF0Ooe5FIPk57BD7G0SiywyjD8bCDyHsOkeeeR3SUxEkROmU6BfQYFJMHfhWXV8efkUrb13VPMTsrcTQSzxZ/+n0GVA6EGbSGdgG9vo15fg2nFgbO8k70SRdd+mahDT81vUxTZRlJBRMsjq89C0EXCvSf7TIBZ136YZUJEiE7LgJ2dN01BZuE0dkIhxE7KcQTK1QUj+cwAEyrPZ+IydzRoyah+mLy2isbWBweESJEnB9q+1RM9Ub9GQOWkABg8HjRr2d9Yh0hTlBlRsfn+D4vg0BvUC9rZqECUJuk7Tzr1zahCYlB6HJAREPwfbbMBzLBzsbUKVI0qBgQkc+SxgWUYaIAqOpKwKXJ6bgGlaaDV/YvHaFNrtDsKTfVSrJeqIg/bRNwjclFIALeP3saybhu8SC4VBHwnhBXXIKocYRXD9QzBi4Xgchmkd9+L+CTAAMqwy+ZzluBgAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-rb{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAixJREFUeNqEUktvElEU/mag5f2yJhXLwxIt0kiqsVEXujP+A925cu1Pce3WtXVtYuJCF7KtTY0NrVQIpRVKeXTkMcO9F8+9ZVooJJ5kcmbmfOe733fO1YbDIWS8+/g1dycVX7W/xyO3vdsuVKqvnE7HZ230783rlyo7bVBicSGyfjsVwozomVbIPe/c+FmsPHfoRKJd1HT7hXHBZjVbA4aA14NnD9bC2VR8gwuxPi5Sx39Cp+M0XUP0ahhP1jLhW7HFD4zze3b93ILtXYyyVKlR8/5hFbnvO9gtlrGSjOF+OpXkYviWyo8mCS4R6bqO4p86vm3v4fC4DrPfw4unj1XN6JvBaQtjChzUXK43sVU4wNFJA43Tv/B73edQwTmfIhAjCVL6UdPAj1IVFSKhCdAcAI9rnjBiAjtBYEu3GEeh1sKJ0YXR68sVIujzIhzwY8DEBHZqiLRKkicQDfvABxaiQTc4Y/C65pCOXwcjcmlvJgHtlwi4epYifiQWgmoLZwPW6HQG07LgcOgKO0UglAKOTt/E+09fwAiUWU7QAE9xUK3jbvomsispZVHMVEDSZdHo9rCZ/4VIMKAu0XGjpU7d2S8hk0pCELHEzrjKnCQOYJoD+Dxu1RyiwUm5LaMDo9NFt2cqDLvY4oQFp/QpfT/MrmI5FkWebt+NpWto0j2QmQkOjZ9hpwhqjXZzM/+7LU+cc7lRrjXh8/lVLRK5ovLWXglOsiOxdt8/AQYAzv8qbmu6vgEAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-rtf{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAe5JREFUeNqEU01PE0EYfnZmd5FSvgLYFuwWt9EgHyEaox68eDJevHvwJ/hTPHv1N/QgZ2NC4g3kUAQKFKGhjVKqRrvbnRlnht262FHfy+y8877PPM8z71pCCKh4/ebt+rJfXEz26Vjf2mnsN5rPKKWbVpx7+eK5Xu2kyMtNTd5d8MdhiJ9BOO7atFI9ajy1UyAqSPIRMR6ZmoNehNHMMB7fX/UWvEKFMbYKE8DfQnAhwRmmJkbx6M6S5+WmK2Evup2c9yUk2nnKA0XVcSiGXAe1k5beP1i+4RFCXqnPywB/AKVzK34RjHNYlgVKCH50w7EBBogbTa/AVM5SgBdn0gc2AMDjPsbFPz2xye9asweS6n+NTbG8BCCfUtLjff2WoVnVpAH6z6hMUtJE3EykYfpF4vUiL3QNS7FMeSAQRBHW3r1Hq91B+VoBQRji4+ExFsvz6Hz7jm7Yw5OH92AcJKW9G4SoHhzhy/lXbB98Qmm2oCXN5WawsV2TACEoJXqwTKOsb3BtR2ucmZxANpPB8JUhyPnHWDaDpfJ1eZFALzJJ4MKO5MEtv4TSXB7V/br8iQLMz+almRZWbvoo5q9qRlxwewCgeXbe3qrVO5ZkUD/9jJGRLPaOm6COi92TU1DbxYe9umRD0DrrtJO+XwIMABWp9nS+FgaoAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-sass{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDNDMTBBM0JGMTE5MTFFMTg3N0NFOTIyMTQ2QzhBNkQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDNDMTBBM0NGMTE5MTFFMTg3N0NFOTIyMTQ2QzhBNkQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowM0MxMEEzOUYxMTkxMUUxODc3Q0U5MjIxNDZDOEE2RCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowM0MxMEEzQUYxMTkxMUUxODc3Q0U5MjIxNDZDOEE2RCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Po72XUcAAAJcSURBVHjahFJdTxNBFD1bykc/ttvdtttWGgI0bYrUgDZoNYqRJ014kMRXHvwB/hQTH/wFhMREJfFBQxBjhMRIFEQSCAlQxKYGggiU3e3HbnfX2bFt1EU9k9m9mblz5p4zlzFNExYmpue/jmTSZw5PZAl1MAwDT0c7O72wvPdudeNakPNtOZ0tsM7cvzdOc5yN5LDAsTFRAJks/kC2PxFRVe39Si6f4byez62EpAEH/gNN18F53Ri/Ocxf7OtdLMpKT42s/ZPg1cISJp/P0tg0TBzLCoK8D7eHh4RkLLJ4cCz12AjMXwgez8yhqtVo3NbqRKlcxcSL16gZwJ2Ry8KVc8kZO0HdTKlURn+8G6PD2SZhLMQj96WAiMAh2RXFYKI78lcJcx9WYBCycICnpNbojUWpD5Y0C4Zh2D0w6hWc70uQZC+IWfQZrXF0IsHvY+meBd08haAhoVMMQFJKWF7PNZM+klhRyogGhbqxOIXAMOtEwGAqDqVcgbVkkE+5UsEAWavf0az2t0ZqvK2qabh6IU3joizDwTgwej1LdVfJXkdbK8mt2QkayO99A0/0trQ46I1lVcX+UREhnsP34yLp1AD1xibBMuntpzU8mJyi3Tc1O4+l9U06n7x8Q/8PHz1DrrALt8tlr0CrkbJMHTop9Sk5sLa1g8L+ARJdnShKClY3tunN69t5iGLYTlCtakjFY7gxNABdN3B37BaqqoYT8pyX0in4ORbRkIA46YlDRbUTbBZ2Jb/Pw4qiKFnapcpPo9pdbrg8DjAOBsFgELJmsGs7eWkkc5bu/xBgAHkWC6UPADTOAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-scss{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RkM4QjYyNDVGMTE4MTFFMTlBREZCNDNEM0ExMTk0MUIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RkM4QjYyNDZGMTE4MTFFMTlBREZCNDNEM0ExMTk0MUIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpGQzhCNjI0M0YxMTgxMUUxOUFERkI0M0QzQTExOTQxQiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGQzhCNjI0NEYxMTgxMUUxOUFERkI0M0QzQTExOTQxQiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pkf1yeMAAAJbSURBVHjahFNdTxNBFD0tLULpB91uodVWPmorUIxo0VSiNSExMYYHE33l0Ud/in+C+OSjYgjRGDBRCKJIUkIEWi0WKlja0ul22+5219lJ26gLeiezuXvn7rnnnrlrUFUVms3Mvd2bjIyezRVLBA0zGAzo6jhjm1te+7EU37rFO+w7JlMbtG+ePJ5mOaZmci/nsPl6ONBtw18WDQc9tZq0sp7YjTisXV/NFKRpRvzHpHodDqsF03djzuvDg6vHJWFAprF/Arxe/oins6+YryoqCiUBvNOO+7FrXMjnWc0WyIAOQP0N4Nn8IqqSzPx2swllsYqZl28gK8DDyRvcxKXQvB6gISYpiwgH+jEVi7YAfW4nEqk0PJwDofNejAX7Pae2sPhhHQoF63U5Gai2Bn1epoPWmmaKoug1UBoMrgwHabIVVCx2jdrKFwm67TZ2plldPQGg2cK5HheIUMbaZqKV9In6giDCy3MNYXECgKI2gICxoQAEsQItpNCHWKngMo01arTY/jFIzbutShJuXh1Fm9FImYiM7tTtKOtbO+toN9Nc+fQ5SGUOIVYl7HzPIH2YRZ0y2KZ+sVzBHn2v1mpMGx0DTaR3nzfwfGEJdybGkdo/wEigDyvxLzg4yiESvojZhfd49OAeLJ2degaSLIPOO6vwgiYaaRErTRREEdn8MeJbSVZ5M7nLdNExqFLaQwEfFfACQn1+HBWKSKb3MT4Sgstuh9vVDa+bQ4DORE6o6RlspzMk9TOPfr+fiLJCLFYr3TZSKNcI7+aJwWQmPM+TkqRg49tu65f/JcAAMwMas6WUKd8AAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-sql{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAh5JREFUeNp8kctrE1EUxr+ZyXMkoa1NBROaSkpTBE23PhZ25cql2y5duvAPUdGFS1FxIRRBXZlFQ9GVdDENIhGJxkDsw2mneZnM83ruNZlOmNoDhzlzz3d/9zv3Sowx8Ch/qlYK2XM3cEJsbH0+qjV/rd6/u6aN18b7RMFT+9aosP/Ex+0ae/puw7j36PlKEMAzctKJ3aGFamMHjV0d+wcGitkMrpWWp6hVIciEk2MAOwbUWjosx0UiFoWqJpGMx5DNzODq5aIPoa82AWBg/lyKLMH1PMp/a9XvLXLzG1cuFlBaWpiKxaIPSLY6CaC93ggQjyiQZRkeQSzLRovGaPciWLt5faSWEBoh6KBvOhiaNga0+Y9pwaFxvu7rfp8F5pWDt+qNMp2IijHGwddWCvN+33/CoAOP5nVdT9SdoQ1JkggiQ6Yvr7V60+9z7akA2gfH9cRF8hO5F5Ve4lQAF9uuK+qFsylkzsQxrcaQm04hdWkR83Mzfp9rQ3fAFzu9Ph6+WMfjl6/pGBdb2jbKmx8QlRjWy5vkyhUZBPgOeGNHN9AbDLGUz6He2hVj3Ll9C8/evsdgaMK0HV8bcmDTU0UUBYXcedR+NLGnH0I3jvDk1Rsy46FP4C/1BtrdntCGHNiOAzWZgEKQ5Qt5lIqLojbaXSQTcRy2OwT4SZqk0IYAOgkVWUE+lxX/zb0DpFNpkTzmZmfFtzewhHYcfwUYAMZmVaZQlLFHAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-tga{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnxJREFUeNp0U89PE0EU/ra725K22ILRGipb22pMG6JcSEQTbUIwnozxpBcvepeEP0KPogcT/wlNT17kIKbEmChFUYKGVtL0R2gLtNCl3Z1Z3+zSAlonmezOe/O+973vvZEsy4JYnqdPMu6RkSQYQ29JEkB+PZcrslrtPhQl23VZc8/tr9I1yMHg0EA8HrBM04lVFAhoY38fSSDQVN3pfKV8G7KcxZHl6v1xblqU3eLc3p2VFZjr6+gQgwsnhzGTuq6Nhs6kYZqXjwL0GFhEl3U60OfnwWs1GGtrUKNRsKkpeIIBpKIRtI1J7cX7hXRhc/MOhXw5DkCZGG2zXAajzFIoBMvng1ypIKOqmP30GW3OIEcimovzlxRy5RgAFwDEAIODkCcmIMdiQLsNdWwMZdJlg8pzEUt1aBhKq3XinxKYqF9yQbqRIqsMy+0Gyy47bKgUWXSLtDENE5wdtuqQATm50F1VnPbRGeEw8HXZbiV8fsDvI9ldju9vADAyihLEbrWAZhOoVp3z6iqBUiB1A4nEfwCEsbkL/M4TgE5n5jDx+oTEzp1d8m9tC8H6MaAB0imzx0NU/WKUYE+loEyawDBo2ui6TGfT6ANAxrvx87gYCGCxXEKVJvCWFsG3eh1vN/J4OD6Od4UC8o0G3TX7TGLHwI9iEQmvF9X6Fh7F4/iYy+GcLOMSlfEgGsP0qdNOmX0BiGKpVkV1bw/1nW2b/gCpf1PTcI+Y7eg6ps+G4bG4PR99SjAVo9HE4q+fKNE0vl5awuSohjeijbRefVjAtUgEQRK7Yhi9OKn7nKWZxxlSPWl3QwgnaIrW8QMhD542vUbx/W49m7sq4v4IMABOqi3Ej7bAEAAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-tgz{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnhJREFUeNpsU1trE0EYPbMzSTfdtInFtkkpiaXVWou2FRUEn/so6JugL/oH/Af+B1988if40jcFERQURNBSQdDWlLQN2lsue8neZsZvc7FoOrDszM75znfOmVmmtUYyvry++36yfOeS1qqzDtvH2P76ApPlW3Drb2sHex/uccHWAdbZX30kO2+B3siN3zhTnHuQ66+95i423jzFzOVljBdKOZNHazvVT7e5wF+SZBj9iZJ+3J11mbW2kR8T4LwFli5i4fqTUvnczTUp9RLtDhKgJx0q4dEwWAxrREKICHEsoYYXMXvlcWmquLgmY71yCkG/c0AkARgLMZpnMDMpGNzEYe0dGp6HwvmHpbHC1Wf9MnFCkHQOyYEPzSJwQ2B65Tm5NZG3Fshim6wbMNJn4bpHowMKtIqo2COgR2IcAptwjvcgo6i77igjEmVDqbY8xQJ1VwRULhiBI6+G9Zf3cbTziuzIDkmHSNqECTFgQScEcYuc2NA8TcdYwXD+GkK/TYVN+u72WrIudiAD8o6oAR2RRCmQMjis3CIy1iSpPySCXhFTXeyAgh4BR+JVw8pauLi0Cp4yCX9A90FQhnSBYtnF/k+Q+HYam9itfIZB3QvT8zj8XSW5EhNTs9ivbSLwPUzPLNPJBIMEKnaQYg6aB9+RGR5F5VsNgnNKXMI1NdJGG5WfHzFVLJ7k8c8xUngpVodlDSGbFYj8Y4yMpOG09lHf3yIFPzA3fwHZTAQVtU4JUTeFDrdgDdlI8wAz5Qy2KxswReI7QODZcOr0ZH3q2hIDBI7zq16tuk3FNPxAI4wN+pkoccYoE4YJU5EdUtM4Qst26v26PwIMAKj3P/2YUKgYAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-tiff{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmRJREFUeNp0UktPE1EU/qYzHWstlrYJNcWUElyUJsaNGh9B0g1Lo0v9Ey78EbrVxBhXuHShm25YGBJRQpAYBDEWpaEPEhksdVpbyjzveO4MfZDCTWbauefc736PIziOA77OPH2yJCcSGdg2uksQAKofFou/7VrtASRpvVNynj13f6XOhjg8HAlMTIQdy/LO+v3uYUPTkAHCTb+cK+0pdyGK6+hbvu4/xiyHbncYAwfR19ZgbG/DoO9LsSgeTd9JXoxfyMG2rvQDdBlwIZauQ5ufh12twioU4E+nYU1NIRCNIDs+Bt28mXzx8VNuZ796j9q/DgAwomwqClilAmF0FE4wCInAlkjO4y+r0JgNX2os6XPYS2q/cQyAcQatFjA0BPH6NYipccAwIGUy2CVJFZInkKlyJAqx3T4/IMGmJkeWIWSz5KgI5pdhb3yDXS5DSCYh8rTID8s0wexeVD0GtMd85KkkefFxUfE47M1NokbJkByEQl6tL+ouAI+MUwbFhnYbaJKc/Sqg0x4H4eDRGDA56fUOABA9/GsCpaIHwr8FOhQ823O5RfW66tUGADhNy3RNRDjcN41HLxdQ8J6jYTsOQLfOJBK4f+s2/uoathoNGKT1MtFeVHZxdWTEZfEq/wMKl3rCJOIzTV6ADs2R5ulYDDNkYjp0DhrF+zCVgkw31+v1UxjQZkNV0SADd2o1MIuc9gmY+/kLxb0/UFoHePd9A1qzeUoKpilx9xcLWzgg+u/zeVfuQqkM9bCN1ysrWKXxdtPgvScwUAm58XZ52W16QyPtifRUzi588GbEi1ztHPsvwAC4uC9qhnsZvwAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-txt{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAeJJREFUeNp8UrtOG1EQPfsyXiyzBguIJSyChZBBEFCKpKHLo6egpErNn8CHgH8gkZIiTSIXLhJAWCgkoMgRMSiRBSK29z4y9+I1d/HCrFb3MTPnnjkzlpQSynY+fP70fGF2gQuByCz6lfdd9Uurfvrrjes6762eb3tzQ69uFJwPsqOPC+MBEmxxphi4tlU5OGmsOzaBWLc+O9oIIVhScidkyGZ8vH62nHtSKlaI4cse6TjAfSaFBBcco0EWqyvzubmpyQrj/FXk75cQaSEMeMXU8xykPA/Hjd/6/LRcyjEpt2i7HAe4A2TeLZWKUOJaVLxj27j813EHGKCXaAJExu/4BOdiAED08riQD2riOrexyRoYc3CvsAbLGAAjZga7vgZG23WMCdBvoxKJc36TRBlMiaa2JByjNqqD8qkYc1pjDK7abey+/YhrWlfKswhpiCR96aEU9o5+QE3g2ovVWDm2Sc22bBQm8vrVpbkS9r+doPr1EOWZaQ0yFoxg2PcREosEAI4uvZhJpzFMP+cSXRbq+043RManez+tNWKMI6GN0g0Z04HFR+NoNC/0yx717efZOSbzY3AcR4Op2AGA5p/W31r9e0vNgSrh9OwCrpeCkqvZuqTybnpRqx/r2CjvvwADAJC/7lzAzQmwAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-wav{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAApFJREFUeNpsU1tPE0EYPXtpKbX0wqUQKVQMFdIXQBNCQBs06KP+B8ODGh+Mf4b/4IsGE54kxhcMBrkp7YOQgBRvSKG73fvsrt8Otoask0xmd+b7zpxzvm8E3/cRjPkniyulW0NFy2JoDkEAguOlpXJ9p3L8MBqVl4O9YHxae8pXuRlcGO7KPLhfTDVUqwUgigJMy4Whm6lEXHjxYf3XnByRN0QB/2KaH7btMlUxoRJAcyqKhdOaht7+DJ49n+2cvTnwynXcsb+kLwJ4rgfmMDDGWqvneXCZS9ND7mov5h9ND85M9y86Dpto5rUkuJ4Py3YDJpy6QGJPayqB+Njf+43XL220t0cwOZkfrNXsBUqZugDA6CbLdAiAwaek1ZU9LmP8Rh6S78GsGxjOp9FdzKJaVZIhBgGASzK21w/wbrnCk8euX+EMAjaaZuPHdwUdHVFYluuGPGCORwwYjg5rqOwccRk+3Ux0IEvntmsNG4ZmUayL/wAwKHUNfZfTKN0ZRaw9Cof8qJ/pMAyHy5KkAMTksSEJtnMenM7EMVMawbejMzJRh67bXEYiIXEAVTW50SEAhzqwfqrBcXx4VOhYm4RsNgHbsJFOyZTsQ1MN+hcohoUlkFiMT+TQFpMwXOjGpXgE+XwGk1N5pFJtKNCequgYGupCRBbCDOp0KBJc4VoP3dyBONW8uydBgBHUThqQKCk3mEZ/LoUG+RBioJO7VarAwEAntjYPiUUW9Hh4b2R7k9j98hN37xWx8fGAt3eIAdVMLn+uUv+b2KReSCZjZJiB9bV9jIz2ofr1BKvvd7G9dRC80lae0HzOt+cWVnrSKDrMJykifwNBpCgE/UAllEXufmDu8Zlffvvm8XSQ90eAAQA0pF7c08o4PAAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-size:contain}.ipfs-xls{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmxJREFUeNpsU0trFEEQ/mamZ3Y2+0zIC2MmITEkUYgERFQErx5E8KTi1b/h79A/4SW3nCNeYggBYZVEMU/y3N3Z7M7OTD/G6lk2ruw20zRdU/XV91VVG0mSQK/3n1a/jky6d6Xs3G8WXS+Pw5N6LXjLLGuna/78oZKerGsYKtrDE16uJGL1L9gEOOcYd2dL1fNwrbL//aXN7J1efPMmkUqEFAk0A0VZNbFEaQCBscIkXj975y3NLq9xye8PBkAniHOFph+j2eC4rsdoB4LsFubGl/Hq8RtvYWpxTQi52o1jvWiGYaRZL0/auDgOkC/Z8BYL2Pqxidp1FZkhoDxpeaXA/Ujuj/4HoOxKKjiOiek7RUShRNQWaNYFQuMafrYCxiw4ozZKfqbYJ0EvRdl1DQyyTs8XCNTA6UELMwvDyLpZWIZNNlNLlQOK2LMJRJ+5AkuZ1S7CFFzJzk56GnUjQWlYkqCoBWFbonEVYcLLA4dNnB624GQsDBWIgfZJEgxkoChzSFWvn4VpQemDm2VwXQsXJwF1h6c+gxlQ5jgSiEUEt0wdIe7tMES+nEG2aCLiJMOIIWIr9e0DEELAMUrwRuchVAyTKimUwO75Jm6VF3Bv7imOaj+xd7UFKVS/BPJF1b/E4tgTrE49J60O5kceoNqowiuuYKa8ghHXA48U9MT2AQgyRvTThE30bQiaSGa4yLMJNFo+Dq/2cHt4CYlwyFf2S6BHwwrMw/avDbR5C1k7h1YQ4KH3Amf+AcZyEbZPv9CItzQD1l9EbtYOjv74v/d3O9RMPTDrsEwGIWN8q2yk7XNYRs9JrRv3V4ABADSGR6eQ0/NQAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-xlsx{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmlJREFUeNpsU8tqFEEUPVXdPY/ueWZIoiYZiSYKYhJc6EbduHOhgijo3t/wH1z6B0JAhOyMILhxo4kJGk1ASTAxwWF0Mpp5dHc9vFUzYwidaoqmq+8959xzbzGtNcx69PTS26ETmQtS9r4Hy/xv7MW7jV+th5yzVcaYPX/++It9u4NAv+CVR6tBUUTqMJsDcRzjZOZM8W9ZLKx+/XDb4e5/kH5In0lpIYWGUaC0YTZnBCAEKoVR3L36oDo7NbsglZwbqD6iQKOXFMcKUVfBkBAoQhlD5xxMDp/HrSv3q1JgYW3z0x0KXzkCYJaRZljru23aHWTzLiamAyytv0O9UYdf5PArqlppBfMUfu4oALErqZBKcUxMFRCHEp0DgW5Lo4N9NIN1dF0XXsVFOUyPJTzo+WBANDidjp8tgHGG3c0DnJ4uIRf4cOCBaW5KjY8xkZL72xpJ9QcFz5bVqHUJGHZL2YtNmKi06YCyiVFb4s/vEKMTAf1p4edOG6mMi1zR6wEpdUwX+vLDtkCzHoK7ptcM6ayLmGajvtex4PliyoIkFRjmUEASelB2rXQRSfjUCT9PlWpmW21iTGzCAyEkUixPRqXhe2V4zKczbdmybgkpJ0cGOuA6Y2MTCsKoi5HsNK7N3MN+uwYaWbxYfoLLkzdxcew6lrYWaZhm8PHHG3zffp1UwJSHz9vvkU8PodbcQYYYS5lxYkxTkGdVDQdV1Js1qPgYD6JIuIE7gsXVefIhIuM05k7dwMbeMmh87a18ufIMaVYyprrJLgje2Nr+1tzYXANnDnr3zRhHj37Vvy2wpXHtNAd5/wQYAD6WMuT2CwoVAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-xml{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAilJREFUeNqMks1PE0EYxh+g3W2t1G0sEqyISynUFJsSOShNwCamiYZED3LgIkcuxoN/iCZePZiYGD2aGD+i0F5KMChxlVaakAK2ykcAt+WzdLu7zkxo3WZL4pu8mXfmeeY3885ug67roPFh5nvc62m9hjoR+5LMp7MrkYf370qVtco+VtCUFpbj+jGR+JbWn76OyQ8ePwsZATQb8R/hanZgINgj9IqeuBFCw1Kt9OMBnNWCs24XwkG/QKYUEiGjVAPQof/rq0783pShET3ULQo8xz0iS5FaANmrHQH2DoqY+DSLSz6RzecWlnD9ymU47LYjd4O5BXqDTG4FM3NpTEkpdJ5rw0AowLRMbhUfp58gTOaD/UHmNQPI6YmvKWRX1zESHUJ/oBs2nmPa+Mgw0ZIM3tZyGoJwygzQNB2jNyJIZX7iB0lpPoM70UGmPX8zCU+rG8NDVxHwdiC5mKsPUFUN/gvtLLf39sFzVqaN3YrC6TjBauqhXhNA1TQoqloV7Da+pjZq1FsXUCamF29j6LvYhf3iISamZ3Fv9DZevouhRzzPfOG+3hpA9U9UyioOlTJ7pFeTCQS6RGzIebyf+oz5pSzWtmSW1EO9phvQ00slBRt/8qR3DoWdXbiczUiTzd52D+tdLmyTB14mx1rMAKVcRpEATjrsuElee/HXGmnFRyBOGD30C/nEDjNgs7CDpsYmnHG3YPegBCvHs9oYfm8nG9dJa5X4K8AAQzQX4KSN3wcAAAAASUVORK5CYII=');background-repeat:no-repeat;background-size:contain}.ipfs-yml{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAdxJREFUeNqMUl1rE0EUPbM7m5Y0Zptu21AwWwhYpfSDFh+kvvRd8N0Hf4I/xWdf/Q158F0QoQ+CVsFKaLSQpt/dpmvztTOzzky6cetOpWcZZvbO3MO5514SxzEU3r57/3GpWllM/tP4sL3TarROXuSo/SWJvX71Uu80Cfhlr/T4UdWFAVfdnmsTUtvdP35OUyQKVnJgXDBTcj9icAsTeLax7j/052qM81UjwW1QJXEhMF0qYnN90fdnvdogYmvJPU0/VBApD4hcDrWRcyikfB17srzgW7b9Rh1vEvxDlI4tVytaBSEEtmWh0xsUMwpwnWjqAlcxogiHd1wiQyCu87iI/+sJtf6+NXsgpd7FWCMB50KvkYMGMbLdZgLlfj+K9K4+FnFQ2x7WntIs50AbmiGwLILt+k+EvzvSNIHzdigdJ/AmXQRhiHv5POSwYmG+cqPVo0HqDxj8uTK2vn1Hfa+JmdIkvtZ/4fOPXU3WPDpFeNWVyUKryCiIGMN4zsH98gym3CIcOTwT+XHdXrdQQHAZotE8kBPpSqPNHtBOr48HUmLOcXRJT9dWNMGYJFby91pHOAvaykSaITg+bwefdhrteDRTMSwyrFCgI88E056Hy+4Ah2cXQZL3R4ABALUe7fqXWFN6AAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}.ipfs-zip{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAm9JREFUeNpsk0tv00AUhc+MY6dOmgeFJg1FoVVpUWlFC0s2IFF1jxBbhKj4BSxYdscPYcEmQmIDq0gsERIViy4TpD7VFzF1Ho5je2a4thOqNhlp5Mz4zudzzp0wpRTC8fPrk0/TC6+fDtYicLH97T1Kc2vQDcs+rH3eUAxVznn0fn1DRM8E+iOdv5ct3XmZG6yVlNj6solUbgVTt0q5FGtX6vXqC6VklTE+KAO/OODHSIQPRQpsXC+kkEz2ELA0ystv84tLzyucsbWByisAGf+QAS2CCDRRLMJMmxC+i8C4jdLCm/zM7OOKFGptcO6/BTpJ0yeQB0Y+mfKQuZZG0jQgeRbW8Xdomobs9LN8scc+UPHNy4Dwq8IljotIIQEm59/RoSyM1CKkXKZNBm7kIVgyM6wgAnSgRK9vqQfHPiMFDHqyFVsLR9Cm0o4YzoAASrSjCelQfRPb1Vc4qn0EY5L2W9GEaBLcxQgFHpGbkMIDJ69e+wjJ8VXqRgKid0r7ftQdxkRs9SqA2kgAm14SSIQh9uhuLGPMnKJs/5KquL1x0N0RCsizigoDaLqBdHoMiyvrlBsHVx1wphD4BCewoqxGKKDwAgtOy8JufYuk+5golGGaGZwc1sIGoDz3AOPZSVLaHgVwydoJDM1H4DbQODughB3YpOD44HfoHgnu4e7So0uAi0stHLJ3Aud8B9bpHu6vPoSu9TtDl6tUuoFiIYOgu0+158MKmOxomtyD3Qi/3MTR7i8K0EDG1GHO5DE3X4DvNahZlJOwEkOATvdPc2//hx3mXJ5lFJaF8K8bStd0YGfnOJbMGex21x6c+yfAAOlIPDJzr7cLAAAAAElFTkSuQmCC');background-repeat:no-repeat;background-size:contain}\n.narrow {width: 0px;}\n.padding { margin: 100px;}\n#header {\n background: #000;\n}\n#logo {\n height: 25px;\n margin: 10px;\n}\n.ipfs-icon {\n width:16px;\n}\n"},function(e,t,r){"use strict";const n=r(770),i=r(771);e.exports=((e,t)=>{let r;e.endsWith(".svg")||(r=n(t));const o=i.lookup(r?r.ext:e);return i.contentType(o)})},function(e,t,r){"use strict";const n=e=>[...e].map(e=>e.charCodeAt(0)),i=n("META-INF/mozilla.rsa"),o=n("[Content_Types].xml"),s=n("_rels/.rels");e.exports=(e=>{const t=e instanceof Uint8Array?e:new Uint8Array(e);if(!(t&&t.length>1))return null;const r=(e,r)=>{r=Object.assign({offset:0},r);for(let n=0;nr(n(e),t);if(r([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(r([137,80,78,71,13,10,26,10]))return{ext:"png",mime:"image/png"};if(r([71,73,70]))return{ext:"gif",mime:"image/gif"};if(r([87,69,66,80],{offset:8}))return{ext:"webp",mime:"image/webp"};if(r([70,76,73,70]))return{ext:"flif",mime:"image/flif"};if((r([73,73,42,0])||r([77,77,0,42]))&&r([67,82],{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(r([73,73,42,0])||r([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(r([66,77]))return{ext:"bmp",mime:"image/bmp"};if(r([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(r([56,66,80,83]))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(r([80,75,3,4])){if(r([109,105,109,101,116,121,112,101,97,112,112,108,105,99,97,116,105,111,110,47,101,112,117,98,43,122,105,112],{offset:30}))return{ext:"epub",mime:"application/epub+zip"};if(r(i,{offset:30}))return{ext:"xpi",mime:"application/x-xpinstall"};if(a("mimetypeapplication/vnd.oasis.opendocument.text",{offset:30}))return{ext:"odt",mime:"application/vnd.oasis.opendocument.text"};if(a("mimetypeapplication/vnd.oasis.opendocument.spreadsheet",{offset:30}))return{ext:"ods",mime:"application/vnd.oasis.opendocument.spreadsheet"};if(a("mimetypeapplication/vnd.oasis.opendocument.presentation",{offset:30}))return{ext:"odp",mime:"application/vnd.oasis.opendocument.presentation"};if(r(o,{offset:30})||r(s,{offset:30})){const e=e=>e.findIndex((e,t,r)=>80===r[t]&&75===r[t+1]&&3===r[t+2]&&4===r[t+3]),r=e(t.subarray(4,2004));if(-1!==r){const n=e(t.subarray(r+8,r+8+1e3));if(-1!==n){const e=8+r+n+30;if(a("word/",{offset:e}))return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};if(a("ppt/",{offset:e}))return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};if(a("xl/",{offset:e}))return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}}}}}if(r([80,75])&&(3===t[2]||5===t[2]||7===t[2])&&(4===t[3]||6===t[3]||8===t[3]))return{ext:"zip",mime:"application/zip"};if(r([117,115,116,97,114],{offset:257}))return{ext:"tar",mime:"application/x-tar"};if(r([82,97,114,33,26,7])&&(0===t[6]||1===t[6]))return{ext:"rar",mime:"application/x-rar-compressed"};if(r([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(r([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(r([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(r([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(r([51,103,112,53])||r([0,0,0])&&r([102,116,121,112],{offset:4})&&(r([109,112,52,49],{offset:8})||r([109,112,52,50],{offset:8})||r([105,115,111,109],{offset:8})||r([105,115,111,50],{offset:8})||r([109,109,112,52],{offset:8})||r([77,52,86],{offset:8})||r([100,97,115,104],{offset:8})))return{ext:"mp4",mime:"video/mp4"};if(r([77,84,104,100]))return{ext:"mid",mime:"audio/midi"};if(r([26,69,223,163])){const e=t.subarray(4,4100),r=e.findIndex((e,t,r)=>66===r[t]&&130===r[t+1]);if(-1!==r){const t=r+3,n=r=>[...r].every((r,n)=>e[t+n]===r.charCodeAt(0));if(n("matroska"))return{ext:"mkv",mime:"video/x-matroska"};if(n("webm"))return{ext:"webm",mime:"video/webm"}}}if(r([0,0,0,20,102,116,121,112,113,116,32,32])||r([102,114,101,101],{offset:4})||r([102,116,121,112,113,116,32,32],{offset:4})||r([109,100,97,116],{offset:4})||r([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(r([82,73,70,70])){if(r([65,86,73],{offset:8}))return{ext:"avi",mime:"video/x-msvideo"};if(r([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/x-wav"};if(r([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(r([48,38,178,117,142,102,207,17,166,217]))return{ext:"wmv",mime:"video/x-ms-wmv"};if(r([0,0,1,186])||r([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(r([102,116,121,112,51,103],{offset:4}))return{ext:"3gp",mime:"video/3gpp"};for(let e=0;e<2&&ef||u===f&&"application/"===i[c].substr(0,12)))continue}i[c]=e}}})},function(e,t,r){ + */var n,i,o,s=r(772),a=r(249).extname,c=/^\s*([^;\s]*)(?:;|\s|$)/,u=/^text\//i;function l(e){if(!e||"string"!=typeof e)return!1;var t=c.exec(e),r=t&&s[t[1].toLowerCase()];return r&&r.charset?r.charset:!(!t||!u.test(t[1]))&&"UTF-8"}t.charset=l,t.charsets={lookup:l},t.contentType=function(e){if(!e||"string"!=typeof e)return!1;var r=-1===e.indexOf("/")?t.lookup(e):e;if(!r)return!1;if(-1===r.indexOf("charset")){var n=t.charset(r);n&&(r+="; charset="+n.toLowerCase())}return r},t.extension=function(e){if(!e||"string"!=typeof e)return!1;var r=c.exec(e),n=r&&t.extensions[r[1].toLowerCase()];if(!n||!n.length)return!1;return n[0]},t.extensions=Object.create(null),t.lookup=function(e){if(!e||"string"!=typeof e)return!1;var r=a("x."+e).toLowerCase().substr(1);if(!r)return!1;return t.types[r]||!1},t.types=Object.create(null),n=t.extensions,i=t.types,o=["nginx","apache",void 0,"iana"],Object.keys(s).forEach(function(e){var t=s[e],r=t.extensions;if(r&&r.length){n[e]=r;for(var a=0;al||u===l&&"application/"===i[c].substr(0,12)))continue}i[c]=e}}})},function(e,t,r){ /*! * mime-db * Copyright(c) 2014 Jonathan Ong * MIT Licensed */ -e.exports=r(1042)},function(e){e.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/cbor":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["ecma","es"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0},"application/fhir+json":{source:"iana",compressible:!0},"application/fhir+xml":{source:"iana",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mmt-usd+xml":{source:"iana",compressible:!0},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",compressible:!0},"application/msc-mixer+xml":{source:"iana",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana"},"application/n-triples":{source:"iana"},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana"},"application/news-groupinfo":{source:"iana"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana"},"application/nss":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p2p-overlay+xml":{source:"iana",compressible:!0},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana"},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",compressible:!0},"application/pidf-diff+xml":{source:"iana",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0},"application/route-s-tsid+xml":{source:"iana",compressible:!0},"application/route-usd+xml":{source:"iana",compressible:!0},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana"},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana"},"application/ttml+xml":{source:"iana",compressible:!0},"application/tve-trigger":{source:"iana"},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0},"application/urc-targetdesc+xml":{source:"iana",compressible:!0},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["keynote"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana"},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana"},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",compressible:!0},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"apache",extensions:["der","crt","pem"]},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0},"application/xcap-caps+xml":{source:"iana",compressible:!0},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana"},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana"},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tone":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana"},"image/avcs":{source:"iana"},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/stl":{source:"iana"},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana"},"model/vnd.parasolid.transmit.binary":{source:"iana"},"model/vnd.parasolid.transmit.text":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.usdz+zip":{source:"iana",compressible:!1},"model/vnd.valve.source.compiled-map":{source:"iana"},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana"},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana"},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana",compressible:!1},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fwdred":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shex":{extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana"},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vp8":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}},function(e,t,r){"use strict";r.r(t),r.d(t,"Store",function(){return n}),r.d(t,"get",function(){return s}),r.d(t,"set",function(){return a}),r.d(t,"del",function(){return c}),r.d(t,"clear",function(){return u}),r.d(t,"keys",function(){return f});class n{constructor(e="keyval-store",t="keyval"){this.storeName=t,this._dbp=new Promise((r,n)=>{const i=indexedDB.open(e,1);i.onerror=(()=>n(i.error)),i.onsuccess=(()=>r(i.result)),i.onupgradeneeded=(()=>{i.result.createObjectStore(t)})})}_withIDBStore(e,t){return this._dbp.then(r=>new Promise((n,i)=>{const o=r.transaction(this.storeName,e);o.oncomplete=(()=>n()),o.onabort=o.onerror=(()=>i(o.error)),t(o.objectStore(this.storeName))}))}}let i;function o(){return i||(i=new n),i}function s(e,t=o()){let r;return t._withIDBStore("readonly",t=>{r=t.get(e)}).then(()=>r.result)}function a(e,t,r=o()){return r._withIDBStore("readwrite",r=>{r.put(t,e)})}function c(e,t=o()){return t._withIDBStore("readwrite",t=>{t.delete(e)})}function u(e=o()){return e._withIDBStore("readwrite",e=>{e.clear()})}function f(e=o()){const t=[];return e._withIDBStore("readonly",e=>{(e.openKeyCursor||e.openCursor).call(e).onsuccess=function(){this.result&&(t.push(this.result.key),this.result.continue())}}).then(()=>t)}},function(e,t,r){"use strict";const n=r(1045);let i;const o=()=>new Promise(e=>{(i=new n).on("error",e=>{console.log(new Error("js-ipfs node errored",e))}),i.on("ready",()=>{e(i)})});e.exports={get:()=>new Promise(e=>{if(!i)return o().then(t=>e(t));e(i)}),start:o}},function(e,t,r){"use strict";(function(t){const n=r(740),i=r(1046),o=r(41),s=r(343),a=r(115),c=r(344),u=r(345),f=r(24),l=r(1154),h=r(147),p=r(16),d=r(11),g=r(291),b=r(23),m=r(1156),y=r(1161),v=r(1172),w=r(1776),A=r(1777),_=r(1784),S={get"bitcoin-block"(){return r(1785)},get"eth-account-snapshot"(){return r(187).ethAccountSnapshot},get"eth-block"(){return r(187).ethBlock},get"eth-block-list"(){return r(187).ethBlockList},get"eth-state-trie"(){return r(187).ethStateTrie},get"eth-storage-trie"(){return r(187).ethStorageTrie},get"eth-tx"(){return r(187).ethTx},get"eth-tx-trie"(){return r(187).ethTxTrie},get"git-raw"(){return r(1882)},get"zcash-block"(){return r(1887)}};class E extends b{constructor(e){super();e=m.validate(e||{}),this._options=g(e,{init:!0,start:!0,EXPERIMENTAL:{},preload:{enabled:!0,addresses:["/dnsaddr/node0.preload.ipfs.io/https","/dnsaddr/node1.preload.ipfs.io/https"]}}),!1===e.init&&(this._options.init=!1),!1!==e.start&&(this._options.start=!0),"string"==typeof e.repo||void 0===e.repo?this._repo=w(e.repo):this._repo=e.repo,this.log=d("jsipfs"),this.log.err=d("jsipfs:err"),this.types={Buffer:t,PeerId:o,PeerInfo:s,multiaddr:u,multibase:h,multihash:f,CID:p},this._peerInfoBook=new l,this._peerInfo=void 0,this._libp2pNode=void 0,this._bitswap=void 0,this._blockService=new n(this._repo),this._ipld=new i({blockService:this._blockService,loadFormat:(e,t)=>{if(this.log("Loading IPLD format",e),S[e])return t(null,S[e]);t(new Error(`Missing IPLD format "${e}"`))}}),this._preload=A(this),this._mfsPreload=_(this),this._ipns=void 0,this._print=this._options.silent?this.log:console.log,this.init=v.init(this),this.preStart=v.preStart(this),this.start=v.start(this),this.stop=v.stop(this),this.shutdown=this.stop,this.isOnline=v.isOnline(this),Object.assign(this,v.filesRegular(this)),this.version=v.version(this),this.id=v.id(this),this.repo=v.repo(this),this.bootstrap=v.bootstrap(this),this.config=v.config(this),this.block=v.block(this),this.object=v.object(this),this.dag=v.dag(this),this.files=v.filesMFS(this),this.libp2p=v.libp2p(this),this.swarm=v.swarm(this),this.name=v.name(this),this.bitswap=v.bitswap(this),this.pin=v.pin(this),this.ping=v.ping(this),this.pingPullStream=v.pingPullStream(this),this.pingReadableStream=v.pingReadableStream(this),this.pubsub=v.pubsub(this),this.dht=v.dht(this),this.dns=v.dns(this),this.key=v.key(this),this.stats=v.stats(this),this.resolve=v.resolve(this),this._options.EXPERIMENTAL.pubsub&&this.log("EXPERIMENTAL pubsub is enabled"),this._options.EXPERIMENTAL.ipnsPubsub&&(this._options.EXPERIMENTAL.pubsub||(this.log("EXPERIMENTAL pubsub is enabled to use IPNS pubsub"),this._options.EXPERIMENTAL.pubsub=!0),this.log("EXPERIMENTAL IPNS pubsub is enabled")),this._options.EXPERIMENTAL.sharding&&this.log("EXPERIMENTAL sharding is enabled"),this._options.EXPERIMENTAL.dht&&this.log("EXPERIMENTAL Kademlia DHT is enabled"),this.state=r(1991)(this),this.util={crypto:a,isIPFS:c},y(this)}}(e.exports=E).createNode=(e=>new E(e))}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(331),i=r(14),o=r(16),s=r(742),a=r(1048),c=r(740),u=r(200).join,f=r(200).sep,l=r(47).source,h=r(773),p=r(143),d=r(61),g=r(10),b=r(34).MemoryDatastore,m=r(1099),y=r(1100),v=r(86),w=r(1119);function A(){}class _{constructor(e){const t=m(_.defaultOptions,e);if(!t.blockService)throw new Error("Missing blockservice");this.bs=t.blockService,this.resolvers={},this.support={},this.support.add=((e,t,r)=>{if(this.resolvers[e])throw new Error('Resolver already exists for codec "'+e+'"');this.resolvers[e]={resolver:t,util:r}}),this.support.load=t.loadFormat||((e,t)=>{t(new Error(`No resolver found for codec "${e}"`))}),this.support.rm=(e=>{this.resolvers[e]&&delete this.resolvers[e]});for(const e of t.formats){const{resolver:t,util:r}=e,n=t.multicodec;this.support.add(n,t,r)}}get(e,t,r,n){if("function"==typeof t&&(n=t,t=void 0),"function"==typeof r&&(n=r,r={}),"string"==typeof t&&(t=u("/",t).substr(1).split(f).join("/")),""===t||!t)return this._get(e,(t,r)=>{if(t)return n(t);n(null,{value:r,remainderPath:"",cid:e})});let i;s(r=>{this._getFormat(e.codec,(n,o)=>{if(n)return r(n);this.bs.get(e,(e,n)=>{if(e)return r(e);o.resolver.resolve(n.data,t,(e,n)=>{if(e)return r(e);i=n.value,t=n.remainderPath,r()})})})},()=>{const n=!t||""===t||"/"===t,o=i&&!_._maybeCID(i);return n&&o||r.localResolve?(e=_._maybeCID(i)||e,!0):((i=_._maybeCID(i))&&(e=i),!1)},(r,o)=>r?n(r):n(null,{value:i,remainderPath:t,cid:e}))}getStream(e,t,r){const n=l();return this.get(e,t,r,(e,t)=>{if(e)return n.resolve(i.error(e));n.resolve(i.values([t]))}),n}getMany(e,t){if(!Array.isArray(e))return t(new Error("Argument must be an array of CIDs"));this.bs.getMany(e,(e,r)=>{if(e)return t(e);p(r,(e,t)=>{this._getFormat(e.cid.codec,(r,n)=>{if(r)return t(r);n.util.deserialize(e.data,t)})},t)})}put(e,r,n){return"function"==typeof r?(n=r,t(()=>n(new Error("IPLDResolver.put requires options")))):(n=n||A,r.cid&&o.isCID(r.cid)?r.onlyHash?t(()=>n(null,r.cid)):this._put(r.cid,e,n):void this._getFormat(r.format,(t,i)=>{if(t)return n(t);i.util.cid(e,r,(t,i)=>t?n(t):r.onlyHash?n(null,i):void this._put(i,e,n))}))}treeStream(e,t,r){let n;return"object"==typeof t&&(r=t,t=void 0),(r=r||{}).recursive||(n=l(),g([t=>this._getFormat(e.codec,t),(t,r)=>this.bs.get(e,(e,n)=>{if(e)return r(e);r(null,t,n)}),(e,t,r)=>e.resolver.tree(t.data,r)],(e,t)=>{if(e)return n.abort(e),n;n.resolve(i.values(t))})),r.recursive&&(n=i(h.widthFirst({basePath:null,cid:e},e=>{if("string"==typeof e)return i.empty();const t=l(),r=e.cid;return g([e=>this._getFormat(r.codec,e),(e,t)=>this.bs.get(r,(r,n)=>{if(r)return t(r);t(null,e,n)}),(e,t,r)=>e.resolver.tree(t.data,(n,i)=>{if(n)return r(n);p(i,(r,n)=>{e.resolver.isLink(t.data,r,(e,t)=>{if(e)return n(e);n(null,{path:r,link:t})})},r)})],(r,n)=>{if(r)return t.abort(r),t;t.resolve(i.values(n.map(t=>{const r=e.basePath?e.basePath+"/"+t.path:t.path;return t.link?{basePath:r,cid:_._maybeCID(t.link)}:r})))}),t}),i.map(e=>"string"==typeof e?e:e.basePath),i.filter(Boolean))),t?i(n,i.map(e=>{if(0===e.indexOf(t))return e=e.slice(t.length+1)}),i.filter(Boolean)):n}remove(e,t){this.bs.delete(e,t)}_get(e,t){g([t=>this._getFormat(e.codec,t),(t,r)=>this.bs.get(e,(e,n)=>{if(e)return r(e);r(null,t,n)}),(e,t,r)=>{e.util.deserialize(t.data,(e,t)=>{if(e)return r(e);r(null,t)})}],t)}_getFormat(e,t){if(this.resolvers[e])return t(null,this.resolvers[e]);this.support.load(e,(r,n)=>{if(r)return t(r);this.resolvers[e]=n,t(null,n)})}_put(e,t,r){r=r||A,g([t=>this._getFormat(e.codec,t),(e,r)=>e.util.serialize(t,r),(t,r)=>this.bs.put(new n(t,e),r)],t=>{if(t)return r(t);r(null,e)})}static _maybeCID(e){return o.isCID(e)?e:e&&void 0!==e["/"]?new o(e["/"]):null}}_.defaultOptions={formats:[y,v,w]},_.inMemory=function(e){const t=new a("in-memory",{storageBackends:{root:b,blocks:b,datastore:b},lock:"memory"}),r=new c(t);d([e=>t.init({},e),e=>t.open(e)],t=>{if(t)return e(t);e(null,new _({blockService:r}))})},e.exports=_}).call(this,r(35).setImmediate)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){r=(0,o.default)(r||n.default);var a=(0,s.default)(e),c=function(e){if(e)return r(e);var n=(0,i.default)(arguments,1);if(t.apply(this,n))return a(c);r.apply(null,[null].concat(n))};a(c)};var n=a(r(70)),i=a(r(92)),o=a(r(133)),s=a(r(49));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,r){"use strict";(function(t){const n=r(10),i=r(61),o=r(74),s=r(85),a=r(332),c=r(20),u=r(200),f=r(11),l=r(121),h=r(14),p=r(1049),d=r(1050),g=r(1052),b=r(1059),m=r(1060),y=r(1061),v=r(1072),w=r(1096),A=r(1097),_=f("repo"),S=Number.MAX_SAFE_INTEGER,E={memory:r(772),fs:r(772)},k=r(1098).repoVersion;function x(e,t){h(e.query({}),h.reduce((e,t)=>e.plus(t.value.byteLength).plus(t.key._buf.byteLength),new l(0),t))}function C(e,t){return r=>{t(r&&!e(r)?r:null)}}function I(e){return C(e=>"Already open"===e.message,e)}e.exports=class{constructor(e,t){c.equal(typeof e,"string","missing repoPath"),this.options=function(e){const t=Object.assign({},v,e);return t.storageBackends=Object.assign({},v.storageBackends,t.storageBackends),t.storageBackendOptions=Object.assign({},v.storageBackendOptions,t.storageBackendOptions),t}(t),this.closed=!0,this.path=e,this._locker=this._getLocker(),this.root=p.create("root",this.path,this.options),this.version=d(this.root),this.config=g(this.root),this.spec=b(this.root),this.apiAddr=m(this.root)}init(e,t){_("initializing at: %s",this.path),i([e=>this.root.open(I(e)),t=>this.config.set(function(e){return e.datastore=Object.assign({},w,a(e,"datastore",{})),e}(e),t),t=>this.spec.set(function(e){const t=Object.assign({},w.Spec,a(e,"datastore.Spec",{}));return{type:t.type,mounts:t.mounts.map(e=>({mountpoint:e.mountpoint,type:e.child.type,path:e.child.path,shardFunc:e.child.shardFunc}))}}(e),t),e=>this.version.set(k,e)],t)}open(e){this.closed?(_("opening at: %s",this.path),n([e=>this.root.open(I(e)),e=>this._isInitialized(e),e=>this._openLock(this.path,e),(e,t)=>{_("aquired repo.lock"),this.lockfile=e,t()},e=>{_("creating datastore"),this.datastore=p.create("datastore",u.join(this.path,"datastore"),this.options),_("creating blocks");const t=p.create("blocks",u.join(this.path,"blocks"),this.options);y(t,this.options.storageBackendOptions.blocks,e)},(e,t)=>{this.blocks=e,t()},e=>{_("creating keystore"),this.keys=p.create("keys",u.join(this.path,"keys"),this.options),e()},e=>{this.closed=!1,_("all opened"),e()}],t=>{t&&this.lockfile?this._closeLock(r=>{r?_("error removing lock",r):this.lockfile=null,e(t)}):e(t)})):t(()=>e(new Error("repo is already open")))}_getLocker(){return"string"==typeof this.options.lock?(c(E[this.options.lock],"Unknown lock type: "+this.options.lock),E[this.options.lock]):(c(this.options.lock,"No lock provided"),this.options.lock)}_openLock(e,t){this._locker.lock(e,(e,r)=>{if(e)return t(e,null);c.equal(typeof r.close,"function","Locks must have a close method"),t(null,r)})}_closeLock(e){if(this.lockfile)return this.lockfile.close(e);e()}_isInitialized(e){_("init check"),o({config:e=>this.config.exists(e),spec:e=>this.spec.exists(e),version:e=>this.version.check(k,e)},(t,r)=>{if(_("init",t,r),t&&!r.config)return e(Object.assign(new Error("repo is not initialized yet"),{code:A.ERR_REPO_NOT_INITIALIZED,path:this.path}));e(t)})}close(e){if(this.closed)return e(new Error("repo is already closed"));_("closing at: %s",this.path),i([e=>this.apiAddr.delete(function(e){return C(e=>e&&(e.code===A.ERR_REPO_NOT_INITIALIZED||e.message.startsWith("ENOENT")),e)}(e)),e=>{s([this.blocks,this.keys,this.datastore],(e,t)=>e.close(t),e)},e=>{_("unlocking"),this.closed=!0,this._closeLock(e)},e=>{this.lockfile=null,e()}],t=>e(t))}exists(e){this.version.exists(e)}stat(e,t){"function"==typeof e&&(t=e,e={}),e=Object.assign({},{human:!1},e),o({storageMax:e=>this.config.get("Datastore.StorageMax",(t,r)=>{e(null,new l(t?S:r))}),version:e=>this.version.get(e),blocks:e=>this.blocks.query({},(t,r)=>{const n=new l((r=r||[]).length);let i=new l(0);r.forEach(e=>{i=i.plus(e.value.byteLength).plus(e.key._buf.byteLength)}),e(t,{count:n,size:i})}),datastore:e=>x(this.datastore,e),keys:e=>x(this.keys,e)},(r,n)=>{if(r)return t(r);let i=n.blocks.size.plus(n.datastore).plus(n.keys);e.human&&(i=i.div(1048576)),t(null,{repoPath:this.path,storageMax:n.storageMax,version:n.version,numObjects:n.blocks.count,repoSize:i})})}},e.exports.repoVersion=k,e.exports.errors=A}).call(this,r(35).setImmediate)},function(e,t,r){"use strict";t.create=function(e,t,r){return new(0,r.storageBackends[e])(t,Object.assign({},r.storageBackendOptions[e]||{}))}},function(e,t,r){"use strict";(function(t){const n=r(34).Key,i=r(11)("repo:version"),o=new n("version");e.exports=(e=>({exists(t){e.has(o,t)},get(t){e.get(o,(e,r)=>{if(e)return t(e);t(null,parseInt(r.toString().trim(),10))})},set(r,n){e.put(o,t.from(String(r)),n)},check(e,t){this.get((r,n)=>{if(r)return t(r);if(i("comparing version: %s and %s",n,e),n!==e&&!(6===n&&7===e||6===e&&7===n))return t(new Error(`ipfs repo needs migration: expected version v${e}, found version v${n}`));t()})}}))}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(14),i=r(7),o=r(626).asyncFilter,s=r(626).asyncSort,a=r(745),c=r(748);e.exports=class{constructor(){this.data={}}open(e){i(e)}put(e,t,r){this.data[e.toString()]=t,i(r)}get(e,t){this.has(e,(r,n)=>r?t(r):n?void t(null,this.data[e.toString()]):t(c.notFoundError()))}has(e,t){i(()=>{t(null,void 0!==this.data[e.toString()])})}delete(e,t){delete this.data[e.toString()],i(()=>{t()})}batch(){let e=[],t=[];return{put(t,r){e.push([t,r])},delete(e){t.push(e)},commit:r=>{e.forEach(e=>{this.data[e[0].toString()]=e[1]}),e=[],t.forEach(e=>{delete this.data[e.toString()]}),t=[],i(r)}}}query(e){let t=[n.keys(this.data),n.map(e=>({key:new a(e),value:this.data[e]}))],r=[];if(null!=e.prefix){const t=e.prefix;r.push((e,r)=>r(null,e.key.toString().startsWith(t)))}if(null!=e.filters&&(r=r.concat(e.filters)),t=t.concat(r.map(e=>o(e))),null!=e.orders&&(t=t.concat(e.orders.map(e=>s(e)))),null!=e.offset){let r=0;t.push(n.filter(()=>r++>=e.offset))}return null!=e.limit&&t.push(n.take(e.limit)),!0===e.keysOnly&&t.push(n.map(e=>({key:e.key}))),n.apply(null,t)}close(e){i(e)}}},function(e,t,r){"use strict";const n=r(34).Key,i=r(333),o=r(10),s=r(332),a=r(749),c=r(750),u=r(3).Buffer,f=new n("config");e.exports=(e=>{const t=i(function(e,t){const i=e.key,s=e.value;i?o([e=>r.get(e),(e,t)=>t(null,a(e,i,s)),n],t):n(s,t)},1),r={get(t,r){"function"==typeof t&&(r=t,t=void 0),t||(t=void 0),e.get(f,(e,n)=>{if(e)return r(e);let i;try{i=JSON.parse(n.toString())}catch(e){return r(e)}if(void 0!==t&&!c(i,t))return r(new Error("Key "+t+" does not exist in config"));const o=void 0!==t?s(i,t):i;r(null,o)})},set(e,r,n){if("function"==typeof r)n=r,r=e,e=void 0;else if(!e||"string"!=typeof e)return n(new Error("Invalid key type"));if(void 0===r||u.isBuffer(r))return n(new Error("Invalid value type"));t.push({key:e,value:r},n)},exists(t){e.has(f,t)}};return r;function n(t,r){const n=u.from(JSON.stringify(t,null,2));e.put(f,n,r)}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){if(null==t)t=1;else if(0===t)throw new Error("Concurrency must not be zero");var f=(0,u.default)(e),l=0,h=[],p=!1;function d(e,t,r){if(null!=r&&"function"!=typeof r)throw new Error("task callback must be a function");if(m.started=!0,(0,i.default)(e)||(e=[e]),0===e.length&&m.idle())return(0,a.default)(function(){m.drain()});for(var n=0,s=e.length;n0&&h.splice(s,1),o.callback.apply(o,arguments),null!=t&&m.error(t,o.data)}l<=m.concurrency-m.buffer&&m.unsaturated(),m.idle()&&m.drain(),m.process()}}var b=!1,m={_tasks:new c.default,concurrency:t,payload:r,saturated:o.default,unsaturated:o.default,buffer:t/4,empty:o.default,drain:o.default,error:o.default,started:!1,paused:!1,push:function(e,t){d(e,!1,t)},kill:function(){m.drain=o.default,m._tasks.empty()},unshift:function(e,t){d(e,!0,t)},remove:function(e){m._tasks.remove(e)},process:function(){if(!b){for(b=!0;!m.paused&&l({exists(t){e.has(o,t)},get(t){e.get(o,(e,r)=>{if(e)return t(e);t(null,JSON.parse(r.toString()))})},set(r,n){e.put(o,t.from(JSON.stringify(i(r,{deep:!0}))),n)}}))}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(34).Key,i=r(3).Buffer,o=new n("api");e.exports=(e=>({get(t){e.get(o,(e,r)=>t(e,r&&r.toString()))},set(t,r){e.put(o,i.from(t.toString()),r)},delete(t){e.delete(o,t)}}))},function(e,t,r){"use strict";const n=r(627),i=n.ShardingDatastore,o=r(34).Key,s=r(754),a=r(1068),c=r(7),u=r(628),f=r(16),l=r(14),h=e=>(e=>{const t=new s.Encoder;return new o("/"+t.write(e).finalize(),!1)})(e.buffer);e.exports=((e,t,r)=>{!function(e,t,r){if(t.sharding){const t=new n.shard.NextToLast(2);i.createOrOpen(e,t,r)}else c(()=>r(null,e))}(e,t,(e,t)=>{if(e)return r(e);r(null,function(e){return{query(t,r){l(e.query(t),l.collect(r))},get(t,r){if(!f.isCID(t))return c(()=>{r(new Error("Not a valid cid"))});const n=h(t);e.get(n,(e,n)=>{if(e)return r(e);r(null,new a(n,t))})},put(t,r){if(!a.isBlock(t))return c(()=>{r(new Error("invalid block"))});const n=h(t.cid);e.has(n,(i,o)=>i?r(i):o?r():void e.put(n,t.data,r))},putMany(t,r){const n=t.map(e=>({key:h(e.cid),block:e})),i=e.batch();u(n,(t,r)=>e.has(t.key,r),(e,t)=>{if(e)return r(e);t.forEach(e=>{i.put(e.key,e.block.data)}),i.commit(r)})},has(t,r){if(!f.isCID(t))return c(()=>{r(new Error("Not a valid cid"))});e.has(h(t),r)},delete(t,r){if(!f.isCID(t))return c(()=>{r(new Error("Not a valid cid"))});e.delete(h(t),r)},close(t){e.close(t)}}}(t))})})},function(e,t,r){"use strict";(function(t){const n=r(10),i=r(74),o=r(34).Key,s=r(753),a=r(334),c=new o(s.SHARDING_FN),u=new o(s.README_FN);class f{constructor(e,t){this.child=new a(e,{convert:this._convertKey.bind(this),invert:this._invertKey.bind(this)}),this.shard=t}open(e){this.child.open(e)}_convertKey(e){const t=e.toString();return t===c.toString()||t===u.toString()?e:new o(this.shard.fun(t)).child(e)}_invertKey(e){const t=e.toString();return t===c.toString()||t===u.toString()?e:o.withNamespaces(e.list().slice(1))}static createOrOpen(e,t,r){f.create(e,t,t=>{if(t&&"datastore exists"!==t.message)return r(t);f.open(e,r)})}static open(e,t){n([t=>s.readShardFun("/",e,t),(t,r)=>{r(null,new f(e,t))}],t)}static create(e,r,n){e.has(c,(o,a)=>{if(o)return n(o);if(!a){const o="function"==typeof e.putRaw?e.putRaw.bind(e):e.put.bind(e);return i([e=>o(c,t.from(r.toString()+"\n"),e),e=>o(u,t.from(s.readme),e)],e=>n(e))}s.readShardFun("/",e,(e,t)=>{if(e)return n(e);const i=(t||"").toString(),o=r.toString();if(i!==o)return n(new Error(`specified fun ${o} does not match repo shard fun ${i}`));n(new Error("datastore exists"))})})}put(e,t,r){this.child.put(e,t,r)}get(e,t){this.child.get(e,t)}has(e,t){this.child.has(e,t)}delete(e,t){this.child.delete(e,t)}batch(){return this.child.batch()}query(e){const t={keysOnly:e.keysOnly,offset:e.offset,limit:e.limit,filters:[(e,t)=>t(null,e.key.toString()!==c.toString()),(e,t)=>t(null,e.key.toString()!==u.toString())]};if(null!=e.prefix&&t.filters.push((t,r)=>{r(null,this._invertKey(t.key).toString().startsWith(e.prefix))}),null!=e.filters){const r=e.filters.map(e=>(t,r)=>{e(Object.assign({},t,{key:this._invertKey(t.key)}),r)});t.filters=t.filters.concat(r)}return null!=e.orders&&(t.orders=e.orders.map(e=>(t,r)=>{t.forEach(e=>{e.key=this._invertKey(e.key)}),e(t,(e,t)=>{if(e)return r(e);t.forEach(e=>{e.key=this._convertKey(e.key)}),r(null,t)})})),this.child.query(t)}close(e){this.child.close(e)}}e.exports=f}).call(this,r(0).Buffer)},function(e,t,r){"use strict";e.exports="This is a repository of IPLD objects. Each IPLD object is in a single file,\nnamed .data. Where is the\n\"base32\" encoding of the CID (as specified in\nhttps://github.com/multiformats/multibase) without the 'B' prefix.\nAll the object files are placed in a tree of directories, based on a\nfunction of the CID. This is a form of sharding similar to\nthe objects directory in git repositories. Previously, we used\nprefixes, we now use the next-to-last two charters.\n func NextToLast(base32cid string) {\n nextToLastLen := 2\n offset := len(base32cid) - nextToLastLen - 1\n return str[offset : offset+nextToLastLen]\n }\nFor example, an object with a base58 CIDv1 of\n zb2rhYSxw4ZjuzgCnWSt19Q94ERaeFhu9uSqRgjSdx9bsgM6f\nhas a base32 CIDv1 of\n BAFKREIA22FLID5AJ2KU7URG47MDLROZIH6YF2KALU2PWEFPVI37YLKRSCA\nand will be placed at\n SC/AFKREIA22FLID5AJ2KU7URG47MDLROZIH6YF2KALU2PWEFPVI37YLKRSCA.data\nwith 'SC' being the last-to-next two characters and the 'B' at the\nbeginning of the CIDv1 string is the multibase prefix that is not\nstored in the filename.\n"},function(e,t,r){"use strict";const n=r(85),i=r(1065),o=r(14),s=r(34).Key,a=r(34).Errors,c=r(34).utils,u=c.asyncFilter,f=c.asyncSort,l=c.replaceStartWith,h=r(334);e.exports=class{constructor(e){this.mounts=e.slice()}open(e){n(this.mounts,(e,t)=>{e.datastore.open(t)},e)}_lookup(e){for(let t of this.mounts)if(t.prefix.toString()===e.toString()||t.prefix.isAncestorOf(e)){const r=l(e.toString(),t.prefix.toString());return{datastore:t.datastore,mountpoint:t.prefix,rest:new s(r)}}}put(e,t,r){const n=this._lookup(e);if(null==n)return r(a.dbWriteFailedError(new Error("No datastore mounted for this key")));n.datastore.put(n.rest,t,r)}get(e,t){const r=this._lookup(e);if(null==r)return t(a.notFoundError(new Error("No datastore mounted for this key")));r.datastore.get(r.rest,t)}has(e,t){const r=this._lookup(e);null!=r?r.datastore.has(r.rest,t):t(null,!1)}delete(e,t){const r=this._lookup(e);if(null==r)return t(a.dbDeleteFailedError(new Error("No datastore mounted for this key")));r.datastore.delete(r.rest,t)}close(e){n(this.mounts,(e,t)=>{e.datastore.close(t)},e)}batch(){const e={},t=t=>{const r=this._lookup(t);if(null==r)throw new Error("No datastore mounted for this key");const n=r.mountpoint.toString();return null==e[n]&&(e[n]=r.datastore.batch()),{batch:e[n],rest:r.rest}};return{put:(e,r)=>{const n=t(e);n.batch.put(n.rest,r)},delete:e=>{const r=t(e);r.batch.delete(r.rest)},commit:t=>{n(Object.keys(e),(t,r)=>{e[t].commit(r)},t)}}}query(e){const t=this.mounts.map(t=>{const r=new h(t.datastore,{convert:e=>{throw new Error("should never be called")},invert:e=>t.prefix.child(e)});let n;return null!=e.prefix&&(n=l(e.prefix,t.prefix.toString())),r.query({prefix:n,filters:e.filters,keysOnly:e.keysOnly})});let r=[i(t)];if(null!=e.filters&&(r=r.concat(e.filters.map(e=>u(e)))),null!=e.orders&&(r=r.concat(e.orders.map(e=>f(e)))),null!=e.offset){let t=0;r.push(o.filter(()=>t++>=e.offset))}return null!=e.limit&&r.push(o.take(e.limit)),o.apply(null,r)}}},function(e,t){e.exports=function(e){var t,r,n=!!e,i=(e||[]).map(s),o=0;function s(e){return{ready:!1,reading:!1,ended:!1,read:e,data:null}}function a(){if(r){!function(){var e=i.length;for(;e--;)i[e].ended&&i.splice(e,1)}();var e=i.length,s=r;if(0===e&&(t||n))return r=null,void s(t||!0);for(var a=0;ai.length)throw new Error("this should never happen");if(!(r.reading||r.ended||r.ready)){r.reading=!0;var n=!0;r.read(t,function e(i,o){r.data=o,r.ready=!0,r.reading=!1,!0===i||t?r.ended=!0:i&&(t=r.ended=i),t&&!i&&r.read(t,e),n||a()}),n=!1}}(i[e]);a()}function u(e,n){t=t||e,r=n,c()}return u.add=function(e){if(!e)return n=!0,c();i.push(s(e)),c()},u.cap=function(e){u.add(null)},u}},function(e,t,r){"use strict";const n=r(85),i=r(64),o=r(34).Errors;e.exports=class{constructor(e){this.stores=e.slice()}open(e){n(this.stores,(e,t)=>{e.open(t)},t=>{if(t)return e(o.dbOpenFailedError());e()})}put(e,t,r){n(this.stores,(r,n)=>{r.put(e,t,n)},e=>{if(e)return r(o.dbWriteFailedError());r()})}get(e,t){const r=this.stores.length;let n=!1,s=0;i(()=>!n&&s{this.stores[s++].get(e,(e,r)=>{if(null==e)return n=!0,t(null,r);t()})},(e,r)=>{if(e||!r)return t(o.notFoundError());t(null,r)})}has(e,t){const r=this.stores.length;let n=!1,o=0;i(()=>!n&&o{this.stores[o++].has(e,(e,r)=>{if(null==e)return n=!0,t(null,r);t()})},t)}delete(e,t){n(this.stores,(t,r)=>{t.delete(e,r)},e=>{if(e)return t(o.dbDeleteFailedError());t()})}close(e){n(this.stores,(e,t)=>{e.close(t)},e)}batch(){const e=this.stores.map(e=>e.batch());return{put:(t,r)=>{e.forEach(e=>e.put(t,r))},delete:t=>{e.forEach(e=>e.delete(t))},commit:t=>{n(e,(e,t)=>{e.commit(t)},t)}}}query(e){return this.stores[this.stores.length-1].query(e)}}},function(e,t,r){"use strict";const n=r(34).Key,i=r(334);e.exports=class extends i{constructor(e,t){super(e,{convert:e=>t.child(e),invert(e){if("/"===t.toString())return e;if(!t.isAncestorOf(e))throw new Error(`Expected prefix: (${t.toString()}) in key: ${e.toString()}`);return new n(e.toString().slice(t.toString().length),!1)}}),this.prefix=t}query(e){return e.prefix&&"/"!==this.prefix.toString()?super.query(Object.assign({},e,{prefix:this.prefix.child(new n(e.prefix)).toString()})):super.query(e)}}},function(e,t,r){"use strict";(function(t){const n=r(16),i=r(26);e.exports=i(class{constructor(e,r){if(!e||!t.isBuffer(e))throw new Error("first argument must be a buffer");if(!r||!n.isCID(r))throw new Error("second argument must be a CID");this._data=e,this._cid=r}get data(){return this._data}set data(e){throw new Error("Tried to change an immutable block")}get cid(){return this._cid}set cid(e){throw new Error("Tried to change an immutable block")}},{className:"Block",symbolName:"@ipfs/js-ipfs-block/block"})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,n){(0,o.default)(e,t,function(e,t){r(e,function(e,r){t(e,!r)})},n)};var n,i=r(1070),o=(n=i)&&n.__esModule?n:{default:n};e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,n){((0,i.default)(t)?u:f)(e,t,(0,a.default)(r),n||s.default)};var n=c(r(629)),i=c(r(152)),o=c(r(1071)),s=c(r(70)),a=c(r(49));function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t,r,n){var i=new Array(t.length);e(t,function(e,t,n){r(e,function(e,r){i[t]=!!r,n(e)})},function(e){if(e)return n(e);for(var r=[],o=0;o0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,o=n.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,r=o,i=a,t.copy(r,i),a+=s.data.length,s=s.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,r){"use strict";e.exports=o;var n=r(762),i=r(53);function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}i.inherits=r(4),i.inherits(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){var n=r(763).WriteError,i=r(765);function o(e){this._levelup=e,this.batch=e.db.batch(),this.ops=[],this.length=0}o.prototype.put=function(e,t){try{this.batch.put(e,t)}catch(e){throw new n(e)}return this.ops.push({type:"put",key:e,value:t}),this.length++,this},o.prototype.del=function(e){try{this.batch.del(e)}catch(e){throw new n(e)}return this.ops.push({type:"del",key:e}),this.length++,this},o.prototype.clear=function(){try{this.batch.clear()}catch(e){throw new n(e)}return this.ops=[],this.length=0,this},o.prototype.write=function(e){var t,r=this._levelup,o=this.ops;e||(t=(e=i()).promise);try{this.batch.write(function(t){if(t)return e(new n(t));r.emit("batch",o),e()})}catch(e){throw new n(e)}return t},e.exports=o},function(e,t,r){var n=r(1085);function i(e,t,r){t&&"string"!=typeof t&&(t=t.message||t.name),n(this,{type:e,name:e,cause:"string"!=typeof t?t:r,message:t},"ewr")}function o(e,t){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),i.call(this,"CustomError",e,t)}o.prototype=new Error,e.exports=function(e){var t=function(t,r){return function(e,t,r){var n=function(r,o){i.call(this,t,r,o),"FilesystemError"==t&&(this.code=this.cause.code,this.path=this.cause.path,this.errno=this.cause.errno,this.message=(e.errno[this.cause.errno]?e.errno[this.cause.errno].description:this.cause.message)+(this.cause.path?" ["+this.cause.path+"]":"")),Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,n)};return n.prototype=r?new r:new o,n}(e,t,r)};return{CustomError:o,FilesystemError:t("FilesystemError"),createError:t}}},function(e,t,r){ +e.exports=r(773)},function(e){e.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/cbor":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["ecma","es"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0},"application/fhir+json":{source:"iana",compressible:!0},"application/fhir+xml":{source:"iana",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mmt-usd+xml":{source:"iana",compressible:!0},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",compressible:!0},"application/msc-mixer+xml":{source:"iana",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana"},"application/news-groupinfo":{source:"iana"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana"},"application/nss":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p2p-overlay+xml":{source:"iana",compressible:!0},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana"},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",compressible:!0},"application/pidf-diff+xml":{source:"iana",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0},"application/route-s-tsid+xml":{source:"iana",compressible:!0},"application/route-usd+xml":{source:"iana",compressible:!0},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana"},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana"},"application/ttml+xml":{source:"iana",compressible:!0},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0},"application/urc-targetdesc+xml":{source:"iana",compressible:!0},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["keynote"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana"},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana"},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",compressible:!0},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"apache",extensions:["der","crt","pem"]},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0},"application/xcap-caps+xml":{source:"iana",compressible:!0},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana"},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana"},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tone":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana"},"image/avcs":{source:"iana"},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/stl":{source:"iana"},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana"},"model/vnd.parasolid.transmit.binary":{source:"iana"},"model/vnd.parasolid.transmit.text":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.usdz+zip":{source:"iana",compressible:!1},"model/vnd.valve.source.compiled-map":{source:"iana"},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana"},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana"},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana",compressible:!1},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fwdred":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shex":{extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana"},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vp8":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}},function(e,t,r){"use strict";r.r(t),r.d(t,"Store",function(){return n}),r.d(t,"get",function(){return s}),r.d(t,"set",function(){return a}),r.d(t,"del",function(){return c}),r.d(t,"clear",function(){return u}),r.d(t,"keys",function(){return l});class n{constructor(e="keyval-store",t="keyval"){this.storeName=t,this._dbp=new Promise((r,n)=>{const i=indexedDB.open(e,1);i.onerror=(()=>n(i.error)),i.onsuccess=(()=>r(i.result)),i.onupgradeneeded=(()=>{i.result.createObjectStore(t)})})}_withIDBStore(e,t){return this._dbp.then(r=>new Promise((n,i)=>{const o=r.transaction(this.storeName,e);o.oncomplete=(()=>n()),o.onabort=o.onerror=(()=>i(o.error)),t(o.objectStore(this.storeName))}))}}let i;function o(){return i||(i=new n),i}function s(e,t=o()){let r;return t._withIDBStore("readonly",t=>{r=t.get(e)}).then(()=>r.result)}function a(e,t,r=o()){return r._withIDBStore("readwrite",r=>{r.put(t,e)})}function c(e,t=o()){return t._withIDBStore("readwrite",t=>{t.delete(e)})}function u(e=o()){return e._withIDBStore("readwrite",e=>{e.clear()})}function l(e=o()){const t=[];return e._withIDBStore("readonly",e=>{(e.openKeyCursor||e.openCursor).call(e).onsuccess=function(){this.result&&(t.push(this.result.key),this.result.continue())}}).then(()=>t)}},function(e,t,r){"use strict";const n=r(776);let i;const o=()=>new Promise(e=>{(i=new n).on("error",e=>{console.log(e.toString())}),i.on("ready",()=>{e(i)})});e.exports={get:()=>new Promise(e=>{if(!i)return o().then(t=>e(t));e(i)}),start:o}},function(e,t,r){"use strict";(function(t){const n=r(777),i=r(778),o=r(24),s=r(46),a=r(68),c=r(281),u=r(34),l=r(13),f=r(618),p=r(39),h=r(47),d=r(29),m=r(69),g=r(5),y=r(115),b=r(14),v=r(827),A=r(828),w=r(881),E=r(1262),k=r(1263),S=r(1267),_=r(1268);class x extends b{constructor(e){super();e=v.validate(e||{}),this._options=y({init:!0,start:!0,EXPERIMENTAL:{},preload:{enabled:!0,addresses:["/dnsaddr/node0.preload.ipfs.io/https","/dnsaddr/node1.preload.ipfs.io/https"]}},e),!1===e.init&&(this._options.init=!1),!1!==e.start&&(this._options.start=!0),"string"==typeof e.repo||void 0===e.repo?this._repo=E(e.repo):this._repo=e.repo,this.log=g("ipfs"),this.log.err=g("ipfs:err"),this._peerInfoBook=new f,this._peerInfo=void 0,this._bitswap=void 0,this._blockService=new n(this._repo),this._ipld=new i(_(this._blockService,this._options.ipld,this.log)),this._preload=k(this),this._mfsPreload=S(this),this._ipns=void 0,this._print=this._options.silent?this.log:console.log,this.init=w.init(this),this.preStart=w.preStart(this),this.start=w.start(this),this.stop=w.stop(this),this.shutdown=this.stop,this.isOnline=w.isOnline(this),Object.assign(this,w.filesRegular(this)),this.version=w.version(this),this.id=w.id(this),this.repo=w.repo(this),this.bootstrap=w.bootstrap(this),this.config=w.config(this),this.block=w.block(this),this.object=w.object(this),this.dag=w.dag(this),this.files=w.filesMFS(this),this.libp2p=null,this.swarm=w.swarm(this),this.name=w.name(this),this.bitswap=w.bitswap(this),this.pin=w.pin(this),this.ping=w.ping(this),this.pingPullStream=w.pingPullStream(this),this.pingReadableStream=w.pingReadableStream(this),this.pubsub=w.pubsub(this),this.dht=w.dht(this),this.dns=w.dns(this),this.key=w.key(this),this.stats=w.stats(this),this.resolve=w.resolve(this),this._options.EXPERIMENTAL.pubsub&&this.log("EXPERIMENTAL pubsub is enabled"),this._options.EXPERIMENTAL.ipnsPubsub&&(this._options.EXPERIMENTAL.pubsub||(this.log("EXPERIMENTAL pubsub is enabled to use IPNS pubsub"),this._options.EXPERIMENTAL.pubsub=!0),this.log("EXPERIMENTAL IPNS pubsub is enabled")),this._options.EXPERIMENTAL.sharding&&this.log("EXPERIMENTAL sharding is enabled"),this.state=r(1269)(this),A(this)}}e.exports=x;const C=t;Object.assign(e.exports,{crypto:a,isIPFS:c,Buffer:C,CID:m,multiaddr:u,multibase:p,multihash:l,multihashing:d,multicodec:h,PeerId:o,PeerInfo:s}),e.exports.createNode=(e=>new x(e))}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(98);e.exports=class{constructor(e){this._repo=e,this._bitswap=null}setExchange(e){this._bitswap=e}unsetExchange(){this._bitswap=null}hasExchange(){return null!=this._bitswap}put(e,t){this.hasExchange()?this._bitswap.put(e,t):this._repo.blocks.put(e,t)}putMany(e,t){this.hasExchange()?this._bitswap.putMany(e,t):this._repo.blocks.putMany(e,t)}get(e,t){this.hasExchange()?this._bitswap.get(e,t):this._repo.blocks.get(e,t)}getMany(e,t){Array.isArray(e)?this.hasExchange()?this._bitswap.getMany(e,t):n(e,(e,t)=>this._repo.blocks.get(e,t),t):t(new Error("first arg must be an array of cids"))}delete(e,t){this._repo.blocks.delete(e,t)}}},function(e,t,r){"use strict";(function(t){const n=r(273),i=r(16),o=r(781),s=r(601),a=r(249).join,c=r(249).sep,u=r(38).source,l=r(602),f=r(98),p=r(9),h=r(115),d=r(604),m=r(54),g=r(613);function y(){}class b{constructor(e){const t=h(b.defaultOptions,e);if(!t.blockService)throw new Error("Missing blockservice");this.bs=t.blockService,this.resolvers={},this.support={},this.support.add=((e,t,r)=>{if(this.resolvers[e])throw new Error('Resolver already exists for codec "'+e+'"');this.resolvers[e]={resolver:t,util:r}}),this.support.load=t.loadFormat||((e,t)=>{t(new Error(`No resolver found for codec "${e}"`))}),this.support.rm=(e=>{this.resolvers[e]&&delete this.resolvers[e]});for(const e of t.formats){const{resolver:t,util:r}=e,n=t.multicodec;this.support.add(n,t,r)}}get(e,t,r,n){if("function"==typeof t&&(n=t,t=void 0),"function"==typeof r&&(n=r,r={}),"string"==typeof t&&(t=a("/",t).substr(1).split(c).join("/")),""===t||!t)return this._get(e,(t,r)=>{if(t)return n(t);n(null,{value:r,remainderPath:"",cid:e})});let i;s(r=>{this._getFormat(e.codec,(n,o)=>{if(n)return r(n);this.bs.get(e,(e,n)=>{if(e)return r(e);o.resolver.resolve(n.data,t,(e,n)=>{if(e)return r(e);i=n.value,t=n.remainderPath,r()})})})},()=>{const n=!t||""===t||"/"===t,o=i&&!b._maybeCID(i);return n&&o||r.localResolve?(e=b._maybeCID(i)||e,!0):((i=b._maybeCID(i))&&(e=i),!1)},(r,o)=>r?n(r):n(null,{value:i,remainderPath:t,cid:e}))}getStream(e,t,r){const n=u();return this.get(e,t,r,(e,t)=>{if(e)return n.resolve(i.error(e));n.resolve(i.values([t]))}),n}getMany(e,t){if(!Array.isArray(e))return t(new Error("Argument must be an array of CIDs"));this.bs.getMany(e,(e,r)=>{if(e)return t(e);f(r,(e,t)=>{this._getFormat(e.cid.codec,(r,n)=>{if(r)return t(r);n.util.deserialize(e.data,t)})},t)})}put(e,r,n){return"function"==typeof r?(n=r,t(()=>n(new Error("IPLDResolver.put requires options")))):(n=n||y,r.cid&&o.isCID(r.cid)?r.onlyHash?t(()=>n(null,r.cid)):this._put(r.cid,e,n):void this._getFormat(r.format,(t,i)=>{if(t)return n(t);i.util.cid(e,r,(t,i)=>t?n(t):r.onlyHash?n(null,i):void this._put(i,e,n))}))}treeStream(e,t,r){let n;return"object"==typeof t&&(r=t,t=void 0),(r=r||{}).recursive||(n=u(),p([t=>this._getFormat(e.codec,t),(t,r)=>this.bs.get(e,(e,n)=>{if(e)return r(e);r(null,t,n)}),(e,t,r)=>e.resolver.tree(t.data,r)],(e,t)=>{if(e)return n.abort(e),n;n.resolve(i.values(t))})),r.recursive&&(n=i(l.widthFirst({basePath:null,cid:e},e=>{if("string"==typeof e)return i.empty();const t=u(),r=e.cid;return p([e=>this._getFormat(r.codec,e),(e,t)=>this.bs.get(r,(r,n)=>{if(r)return t(r);t(null,e,n)}),(e,t,r)=>e.resolver.tree(t.data,(n,i)=>{if(n)return r(n);f(i,(r,n)=>{e.resolver.isLink(t.data,r,(e,t)=>{if(e)return n(e);n(null,{path:r,link:t})})},r)})],(r,n)=>{if(r)return t.abort(r),t;t.resolve(i.values(n.map(t=>{const r=e.basePath?e.basePath+"/"+t.path:t.path;return t.link?{basePath:r,cid:b._maybeCID(t.link)}:r})))}),t}),i.map(e=>"string"==typeof e?e:e.basePath),i.filter(Boolean))),t?i(n,i.map(e=>{if(0===e.indexOf(t))return e=e.slice(t.length+1)}),i.filter(Boolean)):n}remove(e,t){this.bs.delete(e,t)}_get(e,t){p([t=>this._getFormat(e.codec,t),(t,r)=>this.bs.get(e,(e,n)=>{if(e)return r(e);r(null,t,n)}),(e,t,r)=>{e.util.deserialize(t.data,(e,t)=>{if(e)return r(e);r(null,t)})}],t)}_getFormat(e,t){if(this.resolvers[e])return t(null,this.resolvers[e]);this.support.load(e,(r,n)=>{if(r)return t(r);this.resolvers[e]=n,t(null,n)})}_put(e,t,r){r=r||y,p([t=>this._getFormat(e.codec,t),(e,r)=>e.util.serialize(t,r),(t,r)=>this.bs.put(new n(t,e),r)],t=>{if(t)return r(t);r(null,e)})}static _maybeCID(e){return o.isCID(e)?e:e&&void 0!==e["/"]?new o(e["/"]):null}}b.defaultOptions={formats:[d,m,g]},e.exports=b}).call(this,r(31).setImmediate)},function(e,t,r){"use strict";(function(t){const n=r(13),i=r(39),o=r(47),s=r(42),a=r(780);class c{constructor(r,s,a){if(e.exports.isCID(r)){let e=r;return this.version=e.version,this.codec=e.codec,void(this.multihash=t.from(e.multihash))}if("string"==typeof r)if(i.isEncoded(r)){const e=i.decode(r);r=parseInt(e.slice(0,1).toString("hex"),16),s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=n.fromB58String(r),r=0;else if(t.isBuffer(r)){const e=r.slice(0,1),t=parseInt(e.toString("hex"),16);if(0===t||1===t){const e=r;r=t,s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=r,r=0}this.codec=s,this.version=r,this.multihash=a,c.validateCID(this)}get buffer(){let e=this._buffer;if(!e){if(0===this.version)e=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");e=t.concat([t.from("01","hex"),o.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:e})}return e}get prefix(){return t.concat([t.from(`0${this.version}`,"hex"),o.getCodeVarint(this.codec),n.prefix(this.multihash)])}toV0(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");const{name:e,length:t}=n.decode(this.multihash);if("sha2-256"!==e)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==t)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new u(0,this.codec,this.multihash)}toV1(){return new u(1,this.codec,this.multihash)}toBaseEncodedString(e){switch(e=e||"base58btc",this.version){case 0:if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");return n.toB58String(this.multihash);case 1:return i.encode(e,this.buffer).toString();default:throw new Error("Unsupported version")}}toString(e){return this.toBaseEncodedString(e)}toJSON(){return{codec:this.codec,version:this.version,hash:this.multihash}}equals(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}static validateCID(e){let t=a.checkCIDComponents(e);if(t)throw new Error(t)}}const u=r(19)(c,{className:"CID",symbolName:"@ipld/js-cid/CID"});u.codecs=s,e.exports=u}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(13);var i={checkCIDComponents:function(e){if(null==e)return"null values are not valid CIDs";if(0!==e.version&&1!==e.version)return"Invalid version, must be a number equal to 1 or 0";if("string"!=typeof e.codec)return"codec must be string";if(!t.isBuffer(e.multihash))return"multihash must be a Buffer";try{n.validate(e.multihash)}catch(e){let t=e.message;return t||(t="Multihash validation failed"),t}}};e.exports=i}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(13),i=r(39),o=r(47),s=r(42),a=r(782);class c{constructor(r,s,a){if(e.exports.isCID(r)){let e=r;return this.version=e.version,this.codec=e.codec,void(this.multihash=t.from(e.multihash))}if("string"==typeof r)if(i.isEncoded(r)){const e=i.decode(r);r=parseInt(e.slice(0,1).toString("hex"),16),s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=n.fromB58String(r),r=0;else if(t.isBuffer(r)){const e=r.slice(0,1),t=parseInt(e.toString("hex"),16);if(0===t||1===t){const e=r;r=t,s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=r,r=0}this.codec=s,this.version=r,this.multihash=a,c.validateCID(this)}get buffer(){let e=this._buffer;if(!e){if(0===this.version)e=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");e=t.concat([t.from("01","hex"),o.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:e})}return e}get prefix(){return t.concat([t.from(`0${this.version}`,"hex"),o.getCodeVarint(this.codec),n.prefix(this.multihash)])}toV0(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");const{name:e,length:t}=n.decode(this.multihash);if("sha2-256"!==e)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==t)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new u(0,this.codec,this.multihash)}toV1(){return new u(1,this.codec,this.multihash)}toBaseEncodedString(e){switch(e=e||"base58btc",this.version){case 0:if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");return n.toB58String(this.multihash);case 1:return i.encode(e,this.buffer).toString();default:throw new Error("Unsupported version")}}toString(e){return this.toBaseEncodedString(e)}toJSON(){return{codec:this.codec,version:this.version,hash:this.multihash}}equals(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}static validateCID(e){let t=a.checkCIDComponents(e);if(t)throw new Error(t)}}const u=r(19)(c,{className:"CID",symbolName:"@ipld/js-cid/CID"});u.codecs=s,e.exports=u}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(13);var i={checkCIDComponents:function(e){if(null==e)return"null values are not valid CIDs";if(0!==e.version&&1!==e.version)return"Invalid version, must be a number equal to 1 or 0";if("string"!=typeof e.codec)return"codec must be string";if(!t.isBuffer(e.multihash))return"multihash must be a Buffer";try{n.validate(e.multihash)}catch(e){let t=e.message;return t||(t="Multihash validation failed"),t}}};e.exports=i}).call(this,r(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){r=(0,o.default)(r||n.default);var a=(0,s.default)(e),c=function(e){if(e)return r(e);var n=(0,i.default)(arguments,1);if(t.apply(this,n))return a(c);r.apply(null,[null].concat(n))};a(c)};var n=a(r(51)),i=a(r(74)),o=a(r(105)),s=a(r(35));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,r){"use strict";t.Diagnose=r(785),t.Decoder=r(606),t.Encoder=r(789),t.Simple=r(607),t.Tagged=r(608),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(606),i=r(558);class o extends n{createTag(e,t){return`${e}(${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":`${t}_1`}createFloatSingle(e,t,r,n){return`${super.createFloatSingle(e,t,r,n)}_2`}createFloatDouble(e,t,r,n,i,o,s,a){return`${super.createFloatDouble(e,t,r,n,i,o,s,a)}_3`}createByteString(e,t){const r=e.join(", ");return-1===t?`(_ ${r})`:`h'${r}`}createByteStringFromHeap(e,r){return`h'${t.from(super.createByteStringFromHeap(e,r)).toString("hex")}'`}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(${e})`}createArray(e,t){const r=super.createArray(e,t);return-1===t?`[_ ${r.join(", ")}]`:`[${r.join(", ")}]`}createMap(e,t){const r=super.createMap(e),n=Array.from(r.keys()).reduce(s(r),"");return-1===t?`{_ ${n}}`:`{${n}}`}createObject(e,t){const r=super.createObject(e),n=Object.keys(r).reduce(s(r),"");return-1===t?`{_ ${n}}`:`{${n}}`}createUtf8String(e,t){const r=e.join(", ");return-1===t?`(_ ${r})`:`"${r}"`}createUtf8StringFromHeap(e,r){return`"${t.from(super.createUtf8StringFromHeap(e,r)).toString("utf8")}"`}static diagnose(e,r){return"string"==typeof e&&(e=t.from(e,r||"hex")),(new o).decodeFirst(e)}}function s(e){return(t,r)=>t?`${t}, ${r}: ${e[r]}`:`${r}: ${e[r]}`}e.exports=o}).call(this,r(0).Buffer)},function(e,t){t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,c=(1<>1,l=-7,f=r?i-1:0,p=r?-1:1,h=e[t+f];for(f+=p,o=h&(1<<-l)-1,h>>=-l,l+=a;l>0;o=256*o+e[t+f],f+=p,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+e[t+f],f+=p,l-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),o-=u}return(h?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,c,u=8*o-i-1,l=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+f>=1?p/c:p*Math.pow(2,1-f))*c>=2&&(s++,c/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*c-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+h]=255&a,h+=d,a/=256,i-=8);for(s=s<0;e[r+h]=255&s,h+=d,s/=256,u-=8);e[r+h-d]|=128*m}},function(e,t){e.exports=function(e,t,r){"use asm";var n=new e.Uint8Array(r);var i=t.pushInt;var o=t.pushInt32;var s=t.pushInt32Neg;var a=t.pushInt64;var c=t.pushInt64Neg;var u=t.pushFloat;var l=t.pushFloatSingle;var f=t.pushFloatDouble;var p=t.pushTrue;var h=t.pushFalse;var d=t.pushUndefined;var m=t.pushNull;var g=t.pushInfinity;var y=t.pushInfinityNeg;var b=t.pushNaN;var v=t.pushNaNNeg;var A=t.pushArrayStart;var w=t.pushArrayStartFixed;var E=t.pushArrayStartFixed32;var k=t.pushArrayStartFixed64;var S=t.pushObjectStart;var _=t.pushObjectStartFixed;var x=t.pushObjectStartFixed32;var C=t.pushObjectStartFixed64;var I=t.pushByteString;var B=t.pushByteStringStart;var R=t.pushUtf8String;var T=t.pushUtf8StringStart;var N=t.pushSimpleUnassigned;var P=t.pushTagStart;var M=t.pushTagStart4;var D=t.pushTagStart8;var O=t.pushTagUnassigned;var L=t.pushBreak;var U=e.Math.pow;var j=0;var F=0;var K=0;function V(e){e=e|0;j=0;F=e;while((j|0)<(F|0)){K=Ze[n[j]&255](n[j]|0)|0;if((K|0)>0){break}}return K|0}function z(e){e=e|0;if(((j|0)+(e|0)|0)<(F|0)){return 0}return 1}function G(e){e=e|0;return n[e|0]<<8|n[e+1|0]|0}function q(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 H(e){e=e|0;i(e|0);j=j+1|0;return 0}function Y(e){e=e|0;if(z(1)|0){return 1}i(n[j+1|0]|0);j=j+2|0;return 0}function J(e){e=e|0;if(z(2)|0){return 1}i(G(j+1|0)|0);j=j+3|0;return 0}function W(e){e=e|0;if(z(4)|0){return 1}o(G(j+1|0)|0,G(j+3|0)|0);j=j+5|0;return 0}function Z(e){e=e|0;if(z(8)|0){return 1}a(G(j+1|0)|0,G(j+3|0)|0,G(j+5|0)|0,G(j+7|0)|0);j=j+9|0;return 0}function Q(e){e=e|0;i(-1-(e-32|0)|0);j=j+1|0;return 0}function X(e){e=e|0;if(z(1)|0){return 1}i(-1-(n[j+1|0]|0)|0);j=j+2|0;return 0}function $(e){e=e|0;var t=0;if(z(2)|0){return 1}t=G(j+1|0)|0;i(-1-(t|0)|0);j=j+3|0;return 0}function ee(e){e=e|0;if(z(4)|0){return 1}s(G(j+1|0)|0,G(j+3|0)|0);j=j+5|0;return 0}function te(e){e=e|0;if(z(8)|0){return 1}c(G(j+1|0)|0,G(j+3|0)|0,G(j+5|0)|0,G(j+7|0)|0);j=j+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=j+1|0;r=(j+1|0)+(n|0)|0;I(t|0,r|0);j=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[j+1|0]|0;t=j+2|0;r=(j+2|0)+(i|0)|0;if(z(i+1|0)|0){return 1}I(t|0,r|0);j=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=G(j+1|0)|0;t=j+3|0;r=(j+3|0)+(n|0)|0;if(z(n+2|0)|0){return 1}I(t|0,r|0);j=r|0;return 0}function oe(e){e=e|0;var t=0;var r=0;var n=0;if(z(4)|0){return 1}n=q(j+1|0)|0;t=j+5|0;r=(j+5|0)+(n|0)|0;if(z(n+4|0)|0){return 1}I(t|0,r|0);j=r|0;return 0}function se(e){e=e|0;return 1}function ae(e){e=e|0;B();j=j+1|0;return 0}function ce(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=j+1|0;r=(j+1|0)+(n|0)|0;R(t|0,r|0);j=r|0;return 0}function ue(e){e=e|0;var t=0;var r=0;var i=0;if(z(1)|0){return 1}i=n[j+1|0]|0;t=j+2|0;r=(j+2|0)+(i|0)|0;if(z(i+1|0)|0){return 1}R(t|0,r|0);j=r|0;return 0}function le(e){e=e|0;var t=0;var r=0;var n=0;if(z(2)|0){return 1}n=G(j+1|0)|0;t=j+3|0;r=(j+3|0)+(n|0)|0;if(z(n+2|0)|0){return 1}R(t|0,r|0);j=r|0;return 0}function fe(e){e=e|0;var t=0;var r=0;var n=0;if(z(4)|0){return 1}n=q(j+1|0)|0;t=j+5|0;r=(j+5|0)+(n|0)|0;if(z(n+4|0)|0){return 1}R(t|0,r|0);j=r|0;return 0}function pe(e){e=e|0;return 1}function he(e){e=e|0;T();j=j+1|0;return 0}function de(e){e=e|0;w(e-128|0);j=j+1|0;return 0}function me(e){e=e|0;if(z(1)|0){return 1}w(n[j+1|0]|0);j=j+2|0;return 0}function ge(e){e=e|0;if(z(2)|0){return 1}w(G(j+1|0)|0);j=j+3|0;return 0}function ye(e){e=e|0;if(z(4)|0){return 1}E(G(j+1|0)|0,G(j+3|0)|0);j=j+5|0;return 0}function be(e){e=e|0;if(z(8)|0){return 1}k(G(j+1|0)|0,G(j+3|0)|0,G(j+5|0)|0,G(j+7|0)|0);j=j+9|0;return 0}function ve(e){e=e|0;A();j=j+1|0;return 0}function Ae(e){e=e|0;var t=0;t=e-160|0;if(z(t|0)|0){return 1}_(t|0);j=j+1|0;return 0}function we(e){e=e|0;if(z(1)|0){return 1}_(n[j+1|0]|0);j=j+2|0;return 0}function Ee(e){e=e|0;if(z(2)|0){return 1}_(G(j+1|0)|0);j=j+3|0;return 0}function ke(e){e=e|0;if(z(4)|0){return 1}x(G(j+1|0)|0,G(j+3|0)|0);j=j+5|0;return 0}function Se(e){e=e|0;if(z(8)|0){return 1}C(G(j+1|0)|0,G(j+3|0)|0,G(j+5|0)|0,G(j+7|0)|0);j=j+9|0;return 0}function _e(e){e=e|0;S();j=j+1|0;return 0}function xe(e){e=e|0;P(e-192|0|0);j=j+1|0;return 0}function Ce(e){e|0;P(e|0);j=j+1|0;return 0}function Ie(e){e|0;P(e|0);j=j+1|0;return 0}function Be(e){e|0;P(e|0);j=j+1|0;return 0}function Re(e){e|0;P(e|0);j=j+1|0;return 0}function Te(e){e=e|0;P(e-192|0|0);j=j+1|0;return 0}function Ne(e){e|0;P(e|0);j=j+1|0;return 0}function Pe(e){e|0;P(e|0);j=j+1|0;return 0}function Me(e){e|0;P(e|0);j=j+1|0;return 0}function De(e){e=e|0;if(z(1)|0){return 1}P(n[j+1|0]|0);j=j+2|0;return 0}function Oe(e){e=e|0;if(z(2)|0){return 1}P(G(j+1|0)|0);j=j+3|0;return 0}function Le(e){e=e|0;if(z(4)|0){return 1}M(G(j+1|0)|0,G(j+3|0)|0);j=j+5|0;return 0}function Ue(e){e=e|0;if(z(8)|0){return 1}D(G(j+1|0)|0,G(j+3|0)|0,G(j+5|0)|0,G(j+7|0)|0);j=j+9|0;return 0}function je(e){e=e|0;N((e|0)-224|0);j=j+1|0;return 0}function Fe(e){e=e|0;h();j=j+1|0;return 0}function Ke(e){e=e|0;p();j=j+1|0;return 0}function Ve(e){e=e|0;m();j=j+1|0;return 0}function ze(e){e=e|0;d();j=j+1|0;return 0}function Ge(e){e=e|0;if(z(1)|0){return 1}N(n[j+1|0]|0);j=j+2|0;return 0}function qe(e){e=e|0;var t=0;var r=0;var i=1.0;var o=0.0;var s=0.0;var a=0.0;if(z(2)|0){return 1}t=n[j+1|0]|0;r=n[j+2|0]|0;if((t|0)&0x80){i=-1.0}o=+(((t|0)&0x7C)>>2);s=+(((t|0)&0x03)<<8|r);if(+o==0.0){u(+(+i*+5.9604644775390625e-8*+s))}else if(+o==31.0){if(+i==1.0){if(+s>0.0){b()}else{g()}}else{if(+s>0.0){v()}else{y()}}}else{u(+(+i*U(+2,+(+o-25.0))*+(1024.0+s)))}j=j+3|0;return 0}function He(e){e=e|0;if(z(4)|0){return 1}l(n[j+1|0]|0,n[j+2|0]|0,n[j+3|0]|0,n[j+4|0]|0);j=j+5|0;return 0}function Ye(e){e=e|0;if(z(8)|0){return 1}f(n[j+1|0]|0,n[j+2|0]|0,n[j+3|0]|0,n[j+4|0]|0,n[j+5|0]|0,n[j+6|0]|0,n[j+7|0]|0,n[j+8|0]|0);j=j+9|0;return 0}function Je(e){e=e|0;return 1}function We(e){e=e|0;L();j=j+1|0;return 0}var Ze=[H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,Y,J,W,Z,Je,Je,Je,Je,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,X,$,ee,te,Je,Je,Je,Je,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,oe,se,Je,Je,Je,ae,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ue,le,fe,pe,Je,Je,Je,he,de,de,de,de,de,de,de,de,de,de,de,de,de,de,de,de,de,de,de,de,de,de,de,de,me,ge,ye,be,Je,Je,Je,ve,Ae,Ae,Ae,Ae,Ae,Ae,Ae,Ae,Ae,Ae,Ae,Ae,Ae,Ae,Ae,Ae,Ae,Ae,Ae,Ae,Ae,Ae,Ae,Ae,we,Ee,ke,Se,Je,Je,Je,_e,xe,xe,xe,xe,xe,xe,Te,Te,Te,Te,Te,Te,Te,Te,Te,Te,Te,Te,Te,Te,Te,Te,Te,Te,De,Oe,Le,Ue,Je,Je,Je,Je,je,je,je,je,je,je,je,je,je,je,je,je,je,je,je,je,je,je,je,je,Fe,Ke,Ve,ze,Ge,qe,He,Ye,Je,Je,Je,We];return{parse:V}}},function(e,t,r){"use strict";const{URLWithLegacySupport:n,format:i}=r(609);e.exports=((e,t={},r={},o)=>{let s,a=t.protocol?t.protocol.replace(":",""):"http";a=(r[a]||o||a)+":";try{s=new n(e)}catch(e){s={}}const c=Object.assign({},t,{protocol:a||s.protocol,host:t.host||s.host});return new n(e,i(c)).toString()})},function(e,t,r){"use strict";(function(t){const{URL:n}=r(275),i=r(116),o=r(558),s=r(274),a=s.MT,c=s.NUMBYTES,u=s.SHIFT32,l=s.SYMS,f=s.TAG,p=s.MT.SIMPLE_FLOAT<<5|s.NUMBYTES.TWO,h=s.MT.SIMPLE_FLOAT<<5|s.NUMBYTES.FOUR,d=s.MT.SIMPLE_FLOAT<<5|s.NUMBYTES.EIGHT,m=s.MT.SIMPLE_FLOAT<<5|s.SIMPLE.TRUE,g=s.MT.SIMPLE_FLOAT<<5|s.SIMPLE.FALSE,y=s.MT.SIMPLE_FLOAT<<5|s.SIMPLE.UNDEFINED,b=s.MT.SIMPLE_FLOAT<<5|s.SIMPLE.NULL,v=new i("0x20000000000000"),A=t.from("f97e00","hex"),w=t.from("f9fc00","hex"),E=t.from("f97c00","hex");class k{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 e=0;e[t,e[t]]))}_pushRawMap(e,t){t=t.map(function(e){return e[0]=k.encode(e[0]),e}).sort(o.keySorter);for(var r=0;r{if(e)return r(e);n.push(t),u(l,n,r)})}},function(e,t,r){"use strict";(function(t){const n=r(280),i=n.cloneLinks,o=n.cloneData,s=r(277),a=r(279);e.exports=function(e,r,n){const c=o(e);let u=i(e);if("string"==typeof r)u=u.filter(e=>e.name!==r);else{if(!t.isBuffer(r)&&!a.isCID(r))return n(new Error("second arg needs to be a name or CID"),null);u=u.filter(e=>!e.cid.equals(r))}s(c,u,n)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(13),i=r(39),o=r(47),s=r(42),a=r(802);class c{constructor(r,s,a){if(e.exports.isCID(r)){let e=r;return this.version=e.version,this.codec=e.codec,void(this.multihash=t.from(e.multihash))}if("string"==typeof r)if(i.isEncoded(r)){const e=i.decode(r);r=parseInt(e.slice(0,1).toString("hex"),16),s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=n.fromB58String(r),r=0;else if(t.isBuffer(r)){const e=r.slice(0,1),t=parseInt(e.toString("hex"),16);if(0===t||1===t){const e=r;r=t,s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=r,r=0}this.codec=s,this.version=r,this.multihash=a,c.validateCID(this)}get buffer(){let e=this._buffer;if(!e){if(0===this.version)e=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");e=t.concat([t.from("01","hex"),o.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:e})}return e}get prefix(){return t.concat([t.from(`0${this.version}`,"hex"),o.getCodeVarint(this.codec),n.prefix(this.multihash)])}toV0(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");const{name:e,length:t}=n.decode(this.multihash);if("sha2-256"!==e)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==t)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new u(0,this.codec,this.multihash)}toV1(){return new u(1,this.codec,this.multihash)}toBaseEncodedString(e){switch(e=e||"base58btc",this.version){case 0:if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");return n.toB58String(this.multihash);case 1:return i.encode(e,this.buffer).toString();default:throw new Error("Unsupported version")}}toString(e){return this.toBaseEncodedString(e)}toJSON(){return{codec:this.codec,version:this.version,hash:this.multihash}}equals(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}static validateCID(e){let t=a.checkCIDComponents(e);if(t)throw new Error(t)}}const u=r(19)(c,{className:"CID",symbolName:"@ipld/js-cid/CID"});u.codecs=s,e.exports=u}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(13);var i={checkCIDComponents:function(e){if(null==e)return"null values are not valid CIDs";if(0!==e.version&&1!==e.version)return"Invalid version, must be a number equal to 1 or 0";if("string"!=typeof e.codec)return"codec must be string";if(!t.isBuffer(e.multihash))return"multihash must be a Buffer";try{n.validate(e.multihash)}catch(e){let t=e.message;return t||(t="Multihash validation failed"),t}}};e.exports=i}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(29),i=r(25),o=r(27),s=r(63),a=r(804),c=i(r(559));r(156),r(119);const u=r(3);class l{constructor(e){this._key=e}verify(e,t,r){p(r),a.hashAndVerify(this._key,t,e,r)}marshal(){return a.utils.jwkToPkix(this._key)}get bytes(){return c.PublicKey.encode({Type:c.KeyType.RSA,Data:this.marshal()})}encrypt(e){return this._key.encrypt(e,"RSAES-PKCS1-V1_5")}equals(e){return this.bytes.equals(e.bytes)}hash(e){p(e),n(this.bytes,"sha2-256",e)}}class f{constructor(e,t){this._key=e,this._publicKey=t}genSecret(){return a.getRandomValues(16)}sign(e,t){p(t),a.hashAndSign(this._key,e,t)}get public(){if(!this._publicKey)throw new Error("public key not provided");return new l(this._publicKey)}decrypt(e,t){a.decrypt(this._key,e,t)}marshal(){return a.utils.jwkToPkcs1(this._key)}get bytes(){return c.PrivateKey.encode({Type:c.KeyType.RSA,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){p(e),n(this.bytes,"sha2-256",e)}id(e){this.public.hash((t,r)=>{if(t)return e(t);e(null,o.encode(r))})}export(e,t,r){"function"==typeof t&&(r=t,t=e,e="pkcs-8"),p(r),s(()=>{let n=null,i=null;try{const r=new u.util.ByteBuffer(this.marshal()),o=u.asn1.fromDer(r),s=u.pki.privateKeyFromAsn1(o);if("pkcs-8"===e){const e={algorithm:"aes256",count:1e4,saltSize:16,prfAlgorithm:"sha512"};i=u.pki.encryptRsaPrivateKey(s,t,e)}else n=new Error(`Unknown export format '${e}'`)}catch(e){n=e}r(n,i)})}}function p(e){if("function"!=typeof e)throw new Error("callback is required")}e.exports={RsaPublicKey:l,RsaPrivateKey:f,unmarshalRsaPublicKey:function(e){const t=a.utils.pkixToJwk(e);return new l(t)},unmarshalRsaPrivateKey:function(e,t){const r=a.utils.pkcs1ToJwk(e);a.unmarshalPrivateKey(r,(e,r)=>{if(e)return t(e);t(null,new f(r.privateKey,r.publicKey))})},generateKeyPair:function(e,t){a.generateKey(e,(e,r)=>{if(e)return t(e);t(null,new f(r.privateKey,r.publicKey))})},fromJwk:function(e,t){a.unmarshalPrivateKey(e,(e,r)=>{if(e)return t(e);t(null,new f(r.privateKey,r.publicKey))})}}},function(e,t,r){"use strict";(function(e){const n=r(560),i=r(561),o=r(562);function s(e){return Promise.all([i.subtle.exportKey("jwk",e.privateKey),i.subtle.exportKey("jwk",e.publicKey)])}t.utils=r(806),t.generateKey=function(e,t){n(i.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(s).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.unmarshalPrivateKey=function(e,t){const r=i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);var o;n(Promise.all([r,(o=e,i.subtle.importKey("jwk",{kty:o.kty,n:o.n,e:o.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]))]).then(e=>s({privateKey:e[0],publicKey:e[1]})).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.getRandomValues=o,t.hashAndSign=function(t,r,o){n(i.subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]).then(e=>i.subtle.sign({name:"RSASSA-PKCS1-v1_5"},e,Uint8Array.from(r))).then(t=>e.from(t)),o)},t.hashAndVerify=function(e,t,r,o){n(i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]).then(e=>i.subtle.verify({name:"RSASSA-PKCS1-v1_5"},e,t,r)),o)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t,r){const n=t.crypto||t.msCrypto,i=65536;n&&n.getRandomValues?e.exports=function(e){const t=new Uint8Array(e);let o=0;if(e>0)if(e>i)for(;ot?n.getRandomValues(t.subarray(o,t-o)):(n.getRandomValues(t.subarray(o,o+i)),o+=i);else n.getRandomValues(t);return r.from(t)}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,r(12),r(0).Buffer)},function(e,t,r){"use strict";const n=r(36),i=r(615),o=i.toBase64,s=i.toBn,a=n.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}),c=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid({"1.2.840.113549.1.1.1":"rsa"}),this.key("none").optional().null_(),this.key("curve").optional().objid(),this.key("params").optional().seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()))}),u=n.define("RSAPublicKey",function(){this.seq().obj(this.key("algorithm").use(c),this.key("subjectPublicKey").bitstr())}),l=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});t.pkcs1ToJwk=function(e){const t=a.decode(e,"der");return{kty:"RSA",n:o(t.modulus),e:o(t.publicExponent),d:o(t.privateExponent),p:o(t.prime1),q:o(t.prime2),dp:o(t.exponent1),dq:o(t.exponent2),qi:o(t.coefficient),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkcs1=function(e){return a.encode({version:0,modulus:s(e.n),publicExponent:s(e.e),privateExponent:s(e.d),prime1:s(e.p),prime2:s(e.q),exponent1:s(e.dp),exponent2:s(e.dq),coefficient:s(e.qi)},"der")},t.pkixToJwk=function(e){const t=u.decode(e,"der"),r=l.decode(t.subjectPublicKey.data,"der");return{kty:"RSA",n:o(r.modulus),e:o(r.publicExponent),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkix=function(e){return u.encode({algorithm:{algorithm:"rsa",none:null},subjectPublicKey:{data:l.encode({modulus:s(e.n),publicExponent:s(e.e)},"der")}},"der")}},function(e,t,r){"use strict";(function(t){const n=r(29),i=r(25),o=r(27),s=r(808),a=i(r(559));class c{constructor(e){this._key=f(e,s.publicKeyLength)}verify(e,t,r){l(r),s.hashAndVerify(this._key,t,e,r)}marshal(){return t.from(this._key)}get bytes(){return a.PublicKey.encode({Type:a.KeyType.Ed25519,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){l(e),n(this.bytes,"sha2-256",e)}}class u{constructor(e,t){this._key=f(e,s.privateKeyLength),this._publicKey=f(t,s.publicKeyLength)}sign(e,t){l(t),s.hashAndSign(this._key,e,t)}get public(){if(!this._publicKey)throw new Error("public key not provided");return new c(this._publicKey)}marshal(){return t.concat([t.from(this._key),t.from(this._publicKey)])}get bytes(){return a.PrivateKey.encode({Type:a.KeyType.Ed25519,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){l(e),n(this.bytes,"sha2-256",e)}id(e){this.public.hash((t,r)=>{if(t)return e(t);e(null,o.encode(r))})}}function l(e){if("function"!=typeof e)throw new Error("callback is required")}function f(e,r){if(t.isBuffer(e)&&(e=new Uint8Array(e)),!(e instanceof Uint8Array)||e.length!==r)throw new Error("Key must be a Uint8Array or Buffer of length "+r);return e}e.exports={Ed25519PublicKey:c,Ed25519PrivateKey:u,unmarshalEd25519PrivateKey:function(e,t){try{e=f(e,s.privateKeyLength+s.publicKeyLength)}catch(e){return t(e)}const r=e.slice(0,s.privateKeyLength),n=e.slice(s.privateKeyLength,e.length);t(null,new u(r,n))},unmarshalEd25519PublicKey:function(e){return e=f(e,s.publicKeyLength),new c(e)},generateKeyPair:function(e,t){void 0===t&&"function"==typeof e&&(t=e),s.generateKey((e,r)=>{if(e)return t(e);let n;try{n=new u(r.secretKey,r.publicKey)}catch(e){return void t(e)}t(null,n)})},generateKeyPairFromSeed:function(e,t,r){void 0===r&&"function"==typeof t&&(r=t),s.generateKeyFromSeed(e,(e,t)=>{if(e)return r(e);let n;try{n=new u(t.secretKey,t.publicKey)}catch(e){return void r(e)}r(null,n)})}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(157),i=r(63);t.publicKeyLength=n.sign.publicKeyLength,t.privateKeyLength=n.sign.secretKeyLength,t.generateKey=function(e){i(()=>{let t;try{t=n.sign.keyPair()}catch(t){return e(t)}e(null,t)})},t.generateKeyFromSeed=function(e,t){i(()=>{let r;try{r=n.sign.keyPair.fromSeed(e)}catch(e){return t(e)}t(null,r)})},t.hashAndSign=function(t,r,o){i(()=>{o(null,e.from(n.sign.detached(r,t)))})},t.hashAndVerify=function(e,t,r,o){i(()=>{let i;try{i=n.sign.detached.verify(r,t,e)}catch(e){return o(e)}o(null,i)})}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(27),i=r(29);e.exports=((e,t,o)=>{o=o||r(810)(t);class s{constructor(e){o.validatePublicKey(e),this._key=e}verify(e,t,r){c(r),o.hashAndVerify(this._key,t,e,r)}marshal(){return o.compressPublicKey(this._key)}get bytes(){return e.PublicKey.encode({Type:e.KeyType.Secp256k1,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){c(e),i(this.bytes,"sha2-256",e)}}class a{constructor(e,t){this._key=e,this._publicKey=t||o.computePublicKey(e),o.validatePrivateKey(this._key),o.validatePublicKey(this._publicKey)}sign(e,t){c(t),o.hashAndSign(this._key,e,t)}get public(){return new s(this._publicKey)}marshal(){return this._key}get bytes(){return e.PrivateKey.encode({Type:e.KeyType.Secp256k1,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){c(e),i(this.bytes,"sha2-256",e)}id(e){this.public.hash((t,r)=>{if(t)return e(t);e(null,n.encode(r))})}}function c(e){if("function"!=typeof e)throw new Error("callback is required")}return{Secp256k1PublicKey:s,Secp256k1PrivateKey:a,unmarshalSecp256k1PrivateKey:function(e,t){t(null,new a(e),null)},unmarshalSecp256k1PublicKey:function(e){return new s(e)},generateKeyPair:function(e,t){void 0===t&&"function"==typeof e&&(t=e),c(t),o.generateKey((e,r)=>{if(e)return t(e);let n;try{n=new a(r)}catch(e){return t(e)}t(null,n)})}}})},function(e,t,r){"use strict";const n=r(265),i=r(29),o=r(17),s="sha2-256";e.exports=(e=>{function t(e){if(!n.privateKeyVerify(e))throw new Error("Invalid private key")}return{generateKey:function(t){let r;do{r=e(32)}while(!n.privateKeyVerify(r));((e,r)=>o(()=>t(e,r)))(null,r)},privateKeyLength:32,hashAndSign:function(e,t,r){const a=(e,t)=>o(()=>r(e,t));i.digest(t,s,(t,r)=>{if(t)return a(t);try{const i=n.sign(r,e),o=n.signatureExport(i.signature);return a(null,o)}catch(t){a(t)}})},hashAndVerify:function(e,t,r,a){const c=(e,t)=>o(()=>a(e,t));i.digest(r,s,(r,i)=>{if(r)return c(r);try{t=n.signatureImport(t);const o=n.verify(i,t,e);return c(null,o)}catch(r){c(r)}})},compressPublicKey:function(e){if(!n.publicKeyVerify(e))throw new Error("Invalid public key");return n.publicKeyConvert(e,!0)},decompressPublicKey:function(e){return n.publicKeyConvert(e,!1)},validatePrivateKey:t,validatePublicKey:function(e){if(!n.publicKeyVerify(e))throw new Error("Invalid public key")},computePublicKey:function(e){return t(e),n.publicKeyCreate(e)}}})},function(e,t,r){"use strict";(function(t){const n=r(96),i=r(616),o={"AES-128":{ivSize:16,keySize:16},"AES-256":{ivSize:16,keySize:32},Blowfish:{ivSize:8,cipherKeySize:32}};e.exports=((e,r,s,a)=>{const c=o[e];if(!c)return a(new Error("unkown cipherType passed"));if(!r)return a(new Error("unkown hashType passed"));const u=c.keySize,l=c.ivSize,f=t.from("key expansion"),p=2*(l+u+20);i.create(r,s,(e,r)=>{if(e)return a(e);r.digest(f,(e,i)=>{if(e)return a(e);let o=[],s=0;n(()=>s{if(t)return e(t);let a=n.length;s+a>p&&(a=p-s),o.push(n),s+=a,r.digest(i,(t,r)=>{if(t)return e(t);i=r,e()})})},function(e){if(e)return a(e);const r=p/2,n=t.concat(o),i=n.slice(0,r),s=n.slice(r,p),c=e=>({iv:e.slice(0,l),cipherKey:e.slice(l,l+u),macKey:e.slice(l+u)});a(null,{k1:c(i),k2:c(s)})})})})})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";e.exports={SHA1:20,SHA256:32,SHA512:64}},function(e,t,r){"use strict";const n=r(814);e.exports=((e,t)=>{n.generateEphmeralKeyPair(e,t)})},function(e,t,r){"use strict";(function(e){const n=r(561),i=r(560),o=r(36).bignum,s=r(615),a=s.toBase64,c=s.toBn,u={"P-256":256,"P-384":384,"P-521":521};t.generateEphmeralKeyPair=function(t,r){i(n.subtle.generateKey({name:"ECDH",namedCurve:t},!0,["deriveBits"]).then(r=>{const s=(s,c,l)=>{let f;"function"==typeof c&&(l=c,c=void 0),f=c?n.subtle.importKey("jwk",function(e,t){const r=p(e,t.public);return r.d=a(new o(t.private)),r}(t,c),{name:"ECDH",namedCurve:t},!1,["deriveBits"]):Promise.resolve(r.privateKey);const h=Promise.all([n.subtle.importKey("jwk",p(t,s),{name:"ECDH",namedCurve:t},!1,[]),f]);i(h.then(e=>n.subtle.deriveBits({name:"ECDH",namedCurve:t,public:e[0]},e[1],u[t])).then(t=>e.from(t)),l)};return n.subtle.exportKey("jwk",r.publicKey).then(e=>({key:f(e),genSharedKey:s}))}),r)};const l={"P-256":32,"P-384":48,"P-521":66};function f(t){const r=l[t.crv];return e.concat([e.from([4]),c(t.x).toArrayLike(e,"be",r),c(t.y).toArrayLike(e,"be",r)],1+2*r)}function p(t,r){const n=l[t];if(!r.slice(0,1).equals(e.from([4])))throw new Error("Invalid key format");const i=new o(r.slice(1,n+1)),s=new o(r.slice(1+n));return{kty:"EC",crv:t,x:a(i,n),y:a(s,n),ext:!0}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(816),i=r(563),o=r(18);function s(e){const t=[],r=e.split("/").slice(1);if(1===r.length&&""===r[0])return[];for(let n=0;n=r.length)throw y("invalid address: "+e);if(s.path){t.push([o,g(r.slice(n).join("/"))]);break}t.push([o,r[n]])}else t.push([o])}return t}function a(e){const t=[];return e.map(e=>{const r=b(e);t.push(r.name),e.length>1&&t.push(e[1])}),g(t.join("/"))}function c(e){return e.map(e=>{Array.isArray(e)||(e=[e]);const t=b(e);return e.length>1?[t.code,n.toBuffer(t.code,e[1])]:[t.code]})}function u(e){return e.map(e=>{const t=b(e);return e.length>1?[t.code,n.toString(t.code,e[1])]:[t.code]})}function l(e){return d(t.concat(e.map(e=>{const r=b(e);let n=t.from(o.encode(r.code));return e.length>1&&(n=t.concat([n,e[1]])),n})))}function f(e,t){if(e.size>0)return e.size/8;if(0===e.size)return 0;return o.decode(t)+o.decode.bytes}function p(e){const t=[];let r=0;for(;re.length)throw y("Invalid address buffer: "+e.toString("hex"));t.push([n,c])}return t}function h(e){return l(c(s(e=g(e))))}function d(e){const r=m(e);if(r)throw r;return t.from(e)}function m(e){try{p(e)}catch(e){return e}}function g(e){return"/"+e.trim().split("/").filter(e=>e).join("/")}function y(e){return new Error("Error parsing address: "+e)}function b(e){return i(e[0])}e.exports={stringToStringTuples:s,stringTuplesToString:a,tuplesToStringTuples:u,stringTuplesToTuples:c,bufferToTuples:p,tuplesToBuffer:l,bufferToString:function(e){return a(u(p(e)))},stringToBuffer:h,fromString:function(e){return h(e)},fromBuffer:d,validateBuffer:m,isValidBuffer:function(e){return void 0===m(e)},cleanPath:g,ParseError:y,protoFromTuple:b,sizeForAddr:f}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(153),i=r(817),o=r(563),s=r(27),a=r(18);function c(e,r){return r instanceof t?c.toString(e,r):c.toBuffer(e,r)}function u(e){if(!i(e))throw new Error("invalid ip address");return n.toBuffer(e)}e.exports=c,c.toString=function(e,t){switch((e=o(e)).code){case 4:case 41:return function(e){const t=n.toString(e);if(!i(t))throw new Error("invalid ip address");return t}(t);case 6:case 273:case 33:case 132:return function(e){return e.readUInt16BE(0)}(t);case 53:case 54:case 55:case 56:case 400:return function(e){const t=a.decode(e);if((e=e.slice(a.decode.bytes)).length!==t)throw new Error("inconsistent lengths");return e.toString()}(t);case 421:return function(e){const t=a.decode(e),r=e.slice(a.decode.bytes);if(r.length!==t)throw new Error("inconsistent lengths");return s.encode(r)}(t);default:return t.toString("hex")}},c.toBuffer=function(e,r){switch((e=o(e)).code){case 4:case 41:return u(r);case 6:case 273:case 33:case 132:return function(e){const r=t.alloc(2);return r.writeUInt16BE(e,0),r}(parseInt(r,10));case 53:case 54:case 55:case 56:case 400:return function(e){const r=t.from(e),n=t.from(a.encode(r.length));return t.concat([n,r])}(r);case 421:return function(e){const r=t.from(s.decode(e)),n=t.from(a.encode(r.length));return t.concat([n,r])}(r);default:return t.from(r,"hex")}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(818),i=e.exports=(e=>n({exact:!0}).test(e));i.v4=(e=>n.v4({exact:!0}).test(e)),i.v6=(e=>n.v6({exact:!0}).test(e))},function(e,t,r){"use strict";const n="(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])(?:\\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])){3}",i="[0-9a-fA-F]{1,4}",o=`\n(\n(?:${i}:){7}(?:${i}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:${i}:){6}(?:${n}|:${i}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:${i}:){5}(?::${n}|(:${i}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:${i}:){4}(?:(:${i}){0,1}:${n}|(:${i}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:${i}:){3}(?:(:${i}){0,2}:${n}|(:${i}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:${i}:){2}(?:(:${i}){0,3}:${n}|(:${i}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:${i}:){1}(?:(:${i}){0,4}:${n}|(:${i}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::((?::${i}){0,5}:${n}|(?::${i}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(%[0-9a-zA-Z]{1,})? // %eth0 %1\n`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),s=e.exports=(e=>e&&e.exact?new RegExp(`(?:^${n}$)|(?:^${o}$)`):new RegExp(`(?:${n})|(?:${o})`,"g"));s.v4=(e=>e&&e.exact?new RegExp(`^${n}$`):new RegExp(n,"g")),s.v6=(e=>e&&e.exact?new RegExp(`^${o}$`):new RegExp(o,"g"))},function(e,t,r){"use strict";const{ensureMultiaddr:n}=r(617),i=r(820);e.exports=class{constructor(e){this._multiaddrs=e||[],this._observedMultiaddrs=[]}add(e){e=n(e),this.has(e)||this._multiaddrs.push(e)}addSafe(e){e=n(e),this._observedMultiaddrs.some((t,r)=>{if(t.equals(e))return this.add(e),this._observedMultiaddrs.splice(r,1),!0})||this._observedMultiaddrs.push(e)}toArray(){return this._multiaddrs.slice()}get size(){return this._multiaddrs.length}forEach(e){return this._multiaddrs.forEach(e)}filterBy(e){return"object"!=typeof e||"function"!=typeof e.matches||"function"!=typeof e.partialMatch||"function"!=typeof e.toString?[]:this._multiaddrs.filter(t=>e.matches(t))}has(e){return e=n(e),this._multiaddrs.some(t=>t.equals(e))}delete(e){e=n(e),this._multiaddrs.some((t,r)=>{if(t.equals(e))return this._multiaddrs.splice(r,1),!0})}replace(e,t){Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]),e.forEach(e=>this.delete(e)),t.forEach(e=>this.add(e))}clear(){this._multiaddrs=[]}distinct(){return i(this._multiaddrs,e=>[e.toOptions().port,e.toOptions().transport].join())}}},function(e,t,r){"use strict";e.exports=function(e,t){var r=[],n={};if("function"!=typeof t){var i=t;t=function(e){return e[i]}}return e.forEach(function(e){var i=t(e);n[i]||(n[i]=!0,r.push(e))}),r}},function(e,t,r){"use strict";const n=r(822),i={16:"aes-128-ctr",32:"aes-256-ctr"};t.create=function(e,t,r){const o=i[e.length];if(!o)return r(new Error("Invalid key length"));const s=n.createCipheriv(o,e,t),a=n.createDecipheriv(o,e,t);r(null,{encrypt(e,t){t(null,s.update(e))},decrypt(e,t){t(null,a.update(e))}})}},function(e,t,r){"use strict";const n=r(155);e.exports={createCipheriv:n.createCipheriv,createDecipheriv:n.createDecipheriv}},function(e,t,r){"use strict";const n=r(120),i=r(8),o={sha1:"sha1","sha2-256":"sha256","sha2-512":"sha512"};e.exports=function(e,t,r,s,a){const c=o[a];if(!c)throw new Error(`Hash '${a}' is unknown or not supported`);const u=n(e,t,r,s,c);return i.encode64(u)}},function(e,t,r){"use strict";(function(t){const n=r(13),i=r(39),o=r(47),s=r(42),a=r(825);class c{constructor(r,s,a){if(e.exports.isCID(r)){let e=r;return this.version=e.version,this.codec=e.codec,void(this.multihash=t.from(e.multihash))}if("string"==typeof r)if(i.isEncoded(r)){const e=i.decode(r);r=parseInt(e.slice(0,1).toString("hex"),16),s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=n.fromB58String(r),r=0;else if(t.isBuffer(r)){const e=r.slice(0,1),t=parseInt(e.toString("hex"),16);if(0===t||1===t){const e=r;r=t,s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=r,r=0}this.codec=s,this.version=r,this.multihash=a,c.validateCID(this)}get buffer(){let e=this._buffer;if(!e){if(0===this.version)e=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");e=t.concat([t.from("01","hex"),o.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:e})}return e}get prefix(){return t.concat([t.from(`0${this.version}`,"hex"),o.getCodeVarint(this.codec),n.prefix(this.multihash)])}toV0(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");const{name:e,length:t}=n.decode(this.multihash);if("sha2-256"!==e)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==t)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new u(0,this.codec,this.multihash)}toV1(){return new u(1,this.codec,this.multihash)}toBaseEncodedString(e){switch(e=e||"base58btc",this.version){case 0:if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");return n.toB58String(this.multihash);case 1:return i.encode(e,this.buffer).toString();default:throw new Error("Unsupported version")}}toString(e){return this.toBaseEncodedString(e)}toJSON(){return{codec:this.codec,version:this.version,hash:this.multihash}}equals(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}static validateCID(e){let t=a.checkCIDComponents(e);if(t)throw new Error(t)}}const u=r(19)(c,{className:"CID",symbolName:"@ipld/js-cid/CID"});u.codecs=s,e.exports=u}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(13);var i={checkCIDComponents:function(e){if(null==e)return"null values are not valid CIDs";if(0!==e.version&&1!==e.version)return"Invalid version, must be a number equal to 1 or 0";if("string"!=typeof e.codec)return"codec must be string";if(!t.isBuffer(e.multihash))return"multihash must be a Buffer";try{n.validate(e.multihash)}catch(e){let t=e.message;return t||(t="Multihash validation failed"),t}}};e.exports=i}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(13);var i={checkCIDComponents:function(e){if(null==e)return"null values are not valid CIDs";if(0!==e.version&&1!==e.version)return"Invalid version, must be a number equal to 1 or 0";if("string"!=typeof e.codec)return"codec must be string";if(!t.isBuffer(e.multihash))return"multihash must be a Buffer";try{n.validate(e.multihash)}catch(e){let t=e.message;return t||(t="Multihash validation failed"),t}}};e.exports=i}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(34),i=r(93),{struct:o,superstruct:s}=r(619),{optional:a,union:c}=o,u=s({types:{multiaddr:e=>{if(null===e)return`multiaddr invalid, value must be a string, Buffer, or another Multiaddr got ${e}`;try{n(e)}catch(e){return`multiaddr invalid, ${e.message}`}return!0},"multiaddr-ipfs":e=>!!i.IPFS.matches(e)||"multiaddr IPFS invalid"}}),l=u({repo:a(u("object|string")),repoOwner:"boolean?",preload:u({enabled:"boolean?",addresses:a(u(["multiaddr"])),interval:"number?"},{enabled:!0,interval:3e4}),init:a(c(["boolean",u({bits:"number?",emptyRepo:"boolean?",privateKey:a(u("object|string")),pass:"string?"})])),start:"boolean?",offline:"boolean?",pass:"string?",silent:"boolean?",relay:"object?",EXPERIMENTAL:a(u({pubsub:"boolean?",ipnsPubsub:"boolean?",sharding:"boolean?",dht:"boolean?"})),connectionManager:"object?",config:a(u({API:"object?",Addresses:a(u({Swarm:a(u(["multiaddr"])),API:"multiaddr?",Gateway:"multiaddr"})),Discovery:a(u({MDNS:a(u({Enabled:"boolean?",Interval:"number?"})),webRTCStar:a(u({Enabled:"boolean?"}))})),Bootstrap:a(u(["multiaddr-ipfs"]))})),libp2p:a(c(["function","object"]))},{repoOwner:!0});e.exports={validate:e=>{const[t,r]=l.validate(e);if(t)throw t;return r}}},function(e,t,r){"use strict";const n=r(9),i=r(564).errors;e.exports=(e=>{e.log("booting");const t=e._options,r=t.init,o=t.start;n([t=>{if(!e._repo.closed)return t(null,!0);e._repo.open((e,r)=>(function(e){if(!e)return!1;if(e.code===i.ERR_REPO_NOT_INITIALIZED)return!0;if(e.message.match(/not found/)||e.message.match(/ENOENT/)||e.message.match(/No value/))return!0;return!1})(e)?t(null,!1):e?t(e):void t(null,!0))},(n,i)=>{if(n)return e.init({repo:e._repo},e=>{if(e)return i(Object.assign(e,{emitted:!0}));i()});if(r){const r=Object.assign({bits:2048,pass:e._options.pass},"object"==typeof t.init?t.init:{});return e.init(r,e=>{if(e)return i(Object.assign(e,{emitted:!0}));i()})}i()},t=>{if(!o)return t();e.start(e=>{if(e)return t(Object.assign(e,{emitted:!0}));t()})}],t=>{t?t.emitted||e.emit("error",t):(e.log("booted"),e.emit("ready"))})})},function(e,t,r){"use strict";t.create=function(e,t,r){return new(0,r.storageBackends[e])(t,Object.assign({},r.storageBackendOptions[e]||{}))}},function(e,t,r){"use strict";(function(t){const n=r(28).Key,i=r(5)("repo:version"),o=new n("version");e.exports=(e=>({exists(t){e.has(o,t)},get(t){e.get(o,(e,r)=>{if(e)return t(e);t(null,parseInt(r.toString().trim(),10))})},set(r,n){e.put(o,t.from(String(r)),n)},check(e,t){this.get((r,n)=>{if(r)return t(r);if(i("comparing version: %s and %s",n,e),n!==e&&!(6===n&&7===e||6===e&&7===n))return t(new Error(`ipfs repo needs migration: expected version v${e}, found version v${n}`));t()})}}))}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(16),i=r(17),o=r(566).asyncFilter,s=r(566).asyncSort,a=r(622),c=r(625);e.exports=class{constructor(){this.data={}}open(e){i(e)}put(e,t,r){this.data[e.toString()]=t,i(r)}get(e,t){this.has(e,(r,n)=>r?t(r):n?void t(null,this.data[e.toString()]):t(c.notFoundError()))}has(e,t){i(()=>{t(null,void 0!==this.data[e.toString()])})}delete(e,t){delete this.data[e.toString()],i(()=>{t()})}batch(){let e=[],t=[];return{put(t,r){e.push([t,r])},delete(e){t.push(e)},commit:r=>{e.forEach(e=>{this.data[e[0].toString()]=e[1]}),e=[],t.forEach(e=>{delete this.data[e.toString()]}),t=[],i(r)}}}query(e){let t=[n.keys(this.data),n.map(e=>({key:new a(e),value:this.data[e]}))],r=[];if(null!=e.prefix){const t=e.prefix;r.push((e,r)=>r(null,e.key.toString().startsWith(t)))}if(null!=e.filters&&(r=r.concat(e.filters)),t=t.concat(r.map(e=>o(e))),null!=e.orders&&(t=t.concat(e.orders.map(e=>s(e)))),null!=e.offset){let r=0;t.push(n.filter(()=>r++>=e.offset))}return null!=e.limit&&t.push(n.take(e.limit)),!0===e.keysOnly&&t.push(n.map(e=>({key:e.key}))),n.apply(null,t)}close(e){i(e)}}},function(e,t,r){"use strict";const n=r(28).Key,i=r(283),o=r(9),s=r(282),a=r(839),c=r(0).Buffer,u=new n("config");e.exports=(e=>{const t=i(function(e,t){const i=e.key,s=e.value;i?o([e=>r.get(e),(e,t)=>{a(e,i,s),t(null,e)},n],t):n(s,t)},1),r={get(t,r){"function"==typeof t&&(r=t,t=void 0),t||(t=void 0),e.get(u,(e,n)=>{if(e)return r(e);let i;try{i=JSON.parse(n.toString())}catch(e){return r(e)}if(void 0===t)return r(null,i);if("string"!=typeof t)return r(new Error("Key "+t+" must be a string."));const o=s(i,t,null);if(null===o)return r(new Error("Key "+t+" does not exist in config."));r(null,o)})},set(e,r,n){if("function"==typeof r)n=r,r=e,e=void 0;else if(!e||"string"!=typeof e)return n(new Error("Invalid key type"));if(void 0===r||c.isBuffer(r))return n(new Error("Invalid value type"));t.push({key:e,value:r},n)},exists(t){e.has(u,t)}};return r;function n(t,r){const n=c.from(JSON.stringify(t,null,2));e.put(u,n,r)}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){if(null==t)t=1;else if(0===t)throw new Error("Concurrency must not be zero");var l=(0,u.default)(e),f=0,p=[],h=!1;function d(e,t,r){if(null!=r&&"function"!=typeof r)throw new Error("task callback must be a function");if(y.started=!0,(0,i.default)(e)||(e=[e]),0===e.length&&y.idle())return(0,a.default)(function(){y.drain()});for(var n=0,s=e.length;n0&&p.splice(s,1),o.callback.apply(o,arguments),null!=t&&y.error(t,o.data)}f<=y.concurrency-y.buffer&&y.unsaturated(),y.idle()&&y.drain(),y.process()}}var g=!1,y={_tasks:new c.default,concurrency:t,payload:r,saturated:o.default,unsaturated:o.default,buffer:t/4,empty:o.default,drain:o.default,error:o.default,started:!1,paused:!1,push:function(e,t){d(e,!1,t)},kill:function(){y.drain=o.default,y._tasks.empty()},unshift:function(e,t){d(e,!0,t)},remove:function(e){y._tasks.remove(e)},process:function(){if(!g){for(g=!0;!y.paused&&f({exists(t){e.has(o,t)},get(t){e.get(o,(e,r)=>{if(e)return t(e);t(null,JSON.parse(r.toString()))})},set(r,n){e.put(o,t.from(JSON.stringify(i(r,{deep:!0}))),n)}}))}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(603);e.exports=((e,t)=>{if(!n(e))throw new TypeError("Expected a plain object");if("function"==typeof(t=t||{}))throw new TypeError("Specify the compare function as an option instead");const r=t.deep,i=[],o=[],s=e=>{const a=i.indexOf(e);if(-1!==a)return o[a];const c={},u=Object.keys(e).sort(t.compare);i.push(e),o.push(c);for(let t=0;t({get(t){e.get(n,(e,r)=>t(e,r&&r.toString()))},set(r,i){e.put(n,t.from(r.toString()),i)},delete(t){e.delete(n,t)}}))}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(626),i=n.ShardingDatastore,o=r(28).Key,s=r(628),a=r(273),c=r(17),u=r(629),l=r(852),f=r(15),p=r(33),h=e=>(e=>{const t=new s.Encoder;return new o("/"+t.write(e).finalize(),!1)})(e.buffer);function d(e){try{return 0===e.version?e.toV1():e.toV0()}catch(e){return null}}e.exports=((e,t,r)=>{!function(e,t,r){if(t.sharding){const t=new n.shard.NextToLast(2);i.createOrOpen(e,t,r)}else c(()=>r(null,e))}(e,t,(e,t)=>{if(e)return r(e);r(null,function(e){return{query(t,r){f(e.query(t),p(r))},get(t,r){if(!l.isCID(t))return c(()=>{r(new Error("Not a valid cid"))});const n=h(t);e.get(n,(i,o)=>{if(i){if("ERR_NOT_FOUND"===i.code){const o=d(t);if(!o)return r(i);const s=h(o);return e.get(s,(i,o)=>{if(i)return r(i);e.put(n,o,e=>{if(e)return r(e);r(null,new a(o,t))})})}return r(i)}r(null,new a(o,t))})},put(t,r){if(!a.isBlock(t))return c(()=>{r(new Error("invalid block"))});const n=h(t.cid);e.has(n,(i,o)=>i?r(i):o?r():void e.put(n,t.data,r))},putMany(t,r){const n=t.map(e=>({key:h(e.cid),block:e})),i=e.batch();u(n,(t,r)=>e.has(t.key,r),(e,t)=>{if(e)return r(e);t.forEach(e=>{i.put(e.key,e.block.data)}),i.commit(r)})},has(t,r){if(!l.isCID(t))return c(()=>{r(new Error("Not a valid cid"))});e.has(h(t),(n,i)=>{if(n)return r(n);if(i)return r(null,!0);const o=d(t);if(!o)return r(null,!1);e.has(h(o),r)})},delete(t,r){if(!l.isCID(t))return c(()=>{r(new Error("Not a valid cid"))});e.delete(h(t),r)},close(t){e.close(t)}}}(t))})})},function(e,t,r){"use strict";(function(t){const n=r(9),i=r(44),o=r(28).Key,s=r(627),a=r(284),c=new o(s.SHARDING_FN),u=new o(s.README_FN);class l{constructor(e,t){this.child=new a(e,{convert:this._convertKey.bind(this),invert:this._invertKey.bind(this)}),this.shard=t}open(e){this.child.open(e)}_convertKey(e){const t=e.toString();return t===c.toString()||t===u.toString()?e:new o(this.shard.fun(t)).child(e)}_invertKey(e){const t=e.toString();return t===c.toString()||t===u.toString()?e:o.withNamespaces(e.list().slice(1))}static createOrOpen(e,t,r){l.create(e,t,t=>{if(t&&"datastore exists"!==t.message)return r(t);l.open(e,r)})}static open(e,t){n([t=>s.readShardFun("/",e,t),(t,r)=>{r(null,new l(e,t))}],t)}static create(e,r,n){e.has(c,(o,a)=>{if(o)return n(o);if(!a){const o="function"==typeof e.putRaw?e.putRaw.bind(e):e.put.bind(e);return i([e=>o(c,t.from(r.toString()+"\n"),e),e=>o(u,t.from(s.readme),e)],e=>n(e))}s.readShardFun("/",e,(e,t)=>{if(e)return n(e);const i=(t||"").toString(),o=r.toString();if(i!==o)return n(new Error(`specified fun ${o} does not match repo shard fun ${i}`));n(new Error("datastore exists"))})})}put(e,t,r){this.child.put(e,t,r)}get(e,t){this.child.get(e,t)}has(e,t){this.child.has(e,t)}delete(e,t){this.child.delete(e,t)}batch(){return this.child.batch()}query(e){const t={keysOnly:e.keysOnly,offset:e.offset,limit:e.limit,filters:[(e,t)=>t(null,e.key.toString()!==c.toString()),(e,t)=>t(null,e.key.toString()!==u.toString())]};if(null!=e.prefix&&t.filters.push((t,r)=>{r(null,this._invertKey(t.key).toString().startsWith(e.prefix))}),null!=e.filters){const r=e.filters.map(e=>(t,r)=>{e(Object.assign({},t,{key:this._invertKey(t.key)}),r)});t.filters=t.filters.concat(r)}return null!=e.orders&&(t.orders=e.orders.map(e=>(t,r)=>{t.forEach(e=>{e.key=this._invertKey(e.key)}),e(t,(e,t)=>{if(e)return r(e);t.forEach(e=>{e.key=this._convertKey(e.key)}),r(null,t)})})),this.child.query(t)}close(e){this.child.close(e)}}e.exports=l}).call(this,r(0).Buffer)},function(e,t,r){"use strict";e.exports="This is a repository of IPLD objects. Each IPLD object is in a single file,\nnamed .data. Where is the\n\"base32\" encoding of the CID (as specified in\nhttps://github.com/multiformats/multibase) without the 'B' prefix.\nAll the object files are placed in a tree of directories, based on a\nfunction of the CID. This is a form of sharding similar to\nthe objects directory in git repositories. Previously, we used\nprefixes, we now use the next-to-last two charters.\n func NextToLast(base32cid string) {\n nextToLastLen := 2\n offset := len(base32cid) - nextToLastLen - 1\n return str[offset : offset+nextToLastLen]\n }\nFor example, an object with a base58 CIDv1 of\n zb2rhYSxw4ZjuzgCnWSt19Q94ERaeFhu9uSqRgjSdx9bsgM6f\nhas a base32 CIDv1 of\n BAFKREIA22FLID5AJ2KU7URG47MDLROZIH6YF2KALU2PWEFPVI37YLKRSCA\nand will be placed at\n SC/AFKREIA22FLID5AJ2KU7URG47MDLROZIH6YF2KALU2PWEFPVI37YLKRSCA.data\nwith 'SC' being the last-to-next two characters and the 'B' at the\nbeginning of the CIDv1 string is the multibase prefix that is not\nstored in the filename.\n"},function(e,t,r){"use strict";const n=r(55),i=r(847),o=r(16),s=r(28).Key,a=r(28).Errors,c=r(28).utils,u=c.asyncFilter,l=c.asyncSort,f=c.replaceStartWith,p=r(284);e.exports=class{constructor(e){this.mounts=e.slice()}open(e){n(this.mounts,(e,t)=>{e.datastore.open(t)},e)}_lookup(e){for(let t of this.mounts)if(t.prefix.toString()===e.toString()||t.prefix.isAncestorOf(e)){const r=f(e.toString(),t.prefix.toString());return{datastore:t.datastore,mountpoint:t.prefix,rest:new s(r)}}}put(e,t,r){const n=this._lookup(e);if(null==n)return r(a.dbWriteFailedError(new Error("No datastore mounted for this key")));n.datastore.put(n.rest,t,r)}get(e,t){const r=this._lookup(e);if(null==r)return t(a.notFoundError(new Error("No datastore mounted for this key")));r.datastore.get(r.rest,t)}has(e,t){const r=this._lookup(e);null!=r?r.datastore.has(r.rest,t):t(null,!1)}delete(e,t){const r=this._lookup(e);if(null==r)return t(a.dbDeleteFailedError(new Error("No datastore mounted for this key")));r.datastore.delete(r.rest,t)}close(e){n(this.mounts,(e,t)=>{e.datastore.close(t)},e)}batch(){const e={},t=t=>{const r=this._lookup(t);if(null==r)throw new Error("No datastore mounted for this key");const n=r.mountpoint.toString();return null==e[n]&&(e[n]=r.datastore.batch()),{batch:e[n],rest:r.rest}};return{put:(e,r)=>{const n=t(e);n.batch.put(n.rest,r)},delete:e=>{const r=t(e);r.batch.delete(r.rest)},commit:t=>{n(Object.keys(e),(t,r)=>{e[t].commit(r)},t)}}}query(e){const t=this.mounts.map(t=>{const r=new p(t.datastore,{convert:e=>{throw new Error("should never be called")},invert:e=>t.prefix.child(e)});let n;return null!=e.prefix&&(n=f(e.prefix,t.prefix.toString())),r.query({prefix:n,filters:e.filters,keysOnly:e.keysOnly})});let r=[i(t)];if(null!=e.filters&&(r=r.concat(e.filters.map(e=>u(e)))),null!=e.orders&&(r=r.concat(e.orders.map(e=>l(e)))),null!=e.offset){let t=0;r.push(o.filter(()=>t++>=e.offset))}return null!=e.limit&&r.push(o.take(e.limit)),o.apply(null,r)}}},function(e,t){e.exports=function(e){var t,r,n=!!e,i=(e||[]).map(s),o=0;function s(e){return{ready:!1,reading:!1,ended:!1,read:e,data:null}}function a(){if(r){!function(){var e=i.length;for(;e--;)i[e].ended&&i.splice(e,1)}();var e=i.length,s=r;if(0===e&&(t||n))return r=null,void s(t||!0);for(var a=0;ai.length)throw new Error("this should never happen");if(!(r.reading||r.ended||r.ready)){r.reading=!0;var n=!0;r.read(t,function e(i,o){r.data=o,r.ready=!0,r.reading=!1,!0===i||t?r.ended=!0:i&&(t=r.ended=i),t&&!i&&r.read(t,e),n||a()}),n=!1}}(i[e]);a()}function u(e,n){t=t||e,r=n,c()}return u.add=function(e){if(!e)return n=!0,c();i.push(s(e)),c()},u.cap=function(e){u.add(null)},u}},function(e,t,r){"use strict";const n=r(55),i=r(96),o=r(28).Errors;e.exports=class{constructor(e){this.stores=e.slice()}open(e){n(this.stores,(e,t)=>{e.open(t)},t=>{if(t)return e(o.dbOpenFailedError());e()})}put(e,t,r){n(this.stores,(r,n)=>{r.put(e,t,n)},e=>{if(e)return r(o.dbWriteFailedError());r()})}get(e,t){const r=this.stores.length;let n=!1,s=0;i(()=>!n&&s{this.stores[s++].get(e,(e,r)=>{if(null==e)return n=!0,t(null,r);t()})},(e,r)=>{if(e||!r)return t(o.notFoundError());t(null,r)})}has(e,t){const r=this.stores.length;let n=!1,o=0;i(()=>!n&&o{this.stores[o++].has(e,(e,r)=>{if(null==e)return n=!0,t(null,r);t()})},t)}delete(e,t){n(this.stores,(t,r)=>{t.delete(e,r)},e=>{if(e)return t(o.dbDeleteFailedError());t()})}close(e){n(this.stores,(e,t)=>{e.close(t)},e)}batch(){const e=this.stores.map(e=>e.batch());return{put:(t,r)=>{e.forEach(e=>e.put(t,r))},delete:t=>{e.forEach(e=>e.delete(t))},commit:t=>{n(e,(e,t)=>{e.commit(t)},t)}}}query(e){return this.stores[this.stores.length-1].query(e)}}},function(e,t,r){"use strict";const n=r(28).Key,i=r(284);e.exports=class extends i{constructor(e,t){super(e,{convert:e=>t.child(e),invert(e){if("/"===t.toString())return e;if(!t.isAncestorOf(e))throw new Error(`Expected prefix: (${t.toString()}) in key: ${e.toString()}`);return new n(e.toString().slice(t.toString().length),!1)}}),this.prefix=t}query(e){return e.prefix&&"/"!==this.prefix.toString()?super.query(Object.assign({},e,{prefix:this.prefix.child(new n(e.prefix)).toString()})):super.query(e)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,n){(0,o.default)(e,t,function(e,t){r(e,function(e,r){t(e,!r)})},n)};var n,i=r(630),o=(n=i)&&n.__esModule?n:{default:n};e.exports=t.default},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,r){"use strict";(function(t){const n=r(13),i=r(39),o=r(47),s=r(42),a=r(853);class c{constructor(r,s,a){if(e.exports.isCID(r)){let e=r;return this.version=e.version,this.codec=e.codec,void(this.multihash=t.from(e.multihash))}if("string"==typeof r)if(i.isEncoded(r)){const e=i.decode(r);r=parseInt(e.slice(0,1).toString("hex"),16),s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=n.fromB58String(r),r=0;else if(t.isBuffer(r)){const e=r.slice(0,1),t=parseInt(e.toString("hex"),16);if(0===t||1===t){const e=r;r=t,s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=r,r=0}this.codec=s,this.version=r,this.multihash=a,c.validateCID(this)}get buffer(){let e=this._buffer;if(!e){if(0===this.version)e=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");e=t.concat([t.from("01","hex"),o.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:e})}return e}get prefix(){return t.concat([t.from(`0${this.version}`,"hex"),o.getCodeVarint(this.codec),n.prefix(this.multihash)])}toV0(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");const{name:e,length:t}=n.decode(this.multihash);if("sha2-256"!==e)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==t)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new u(0,this.codec,this.multihash)}toV1(){return new u(1,this.codec,this.multihash)}toBaseEncodedString(e){switch(e=e||"base58btc",this.version){case 0:if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");return n.toB58String(this.multihash);case 1:return i.encode(e,this.buffer).toString();default:throw new Error("Unsupported version")}}toString(e){return this.toBaseEncodedString(e)}toJSON(){return{codec:this.codec,version:this.version,hash:this.multihash}}equals(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}static validateCID(e){let t=a.checkCIDComponents(e);if(t)throw new Error(t)}}const u=r(19)(c,{className:"CID",symbolName:"@ipld/js-cid/CID"});u.codecs=s,e.exports=u}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(13);var i={checkCIDComponents:function(e){if(null==e)return"null values are not valid CIDs";if(0!==e.version&&1!==e.version)return"Invalid version, must be a number equal to 1 or 0";if("string"!=typeof e.codec)return"codec must be string";if(!t.isBuffer(e.multihash))return"multihash must be a Buffer";try{n.validate(e.multihash)}catch(e){let t=e.message;return t||(t="Multihash validation failed"),t}}};e.exports=i}).call(this,r(0).Buffer)},function(e,t,r){"use strict";e.exports={lock:"memory",storageBackends:{root:r(286),blocks:r(286),keys:r(286),datastore:r(286)},storageBackendOptions:{root:{extension:""},blocks:{sharding:!1},keys:{sharding:!1}}}},function(e,t,r){(function(t){var n=r(14).EventEmitter,i=r(103).inherits,o=r(66),s=r(856),a=r(859),c=r(865),u=r(640),l=r(22),f=r(642),p=u.WriteError,h=u.ReadError,d=u.NotFoundError,m=u.OpenError,g=u.InitializationError;function y(e,r,i){if(!(this instanceof y))return new y(e,r,i);var o;if(n.call(this),this.setMaxListeners(1/0),"function"==typeof r&&(i=r,r={}),r=r||{},!e||"object"!=typeof e){if(o=new g("First argument must be an abstract-leveldown compliant store"),"function"==typeof i)return t.nextTick(i,o);throw o}l.equal(typeof e.status,"string",".status required, old abstract-leveldown"),this.options=v(r),this._db=e,this.db=new s(e),this.open(i)}function b(e,t){return"function"==typeof e?e:t}function v(e){return"object"==typeof e&&null!==e?e:{}}function A(e,r){if(!e._isOpening()&&!e.isOpen())return t.nextTick(r,new h("Database is not open")),!0}y.prototype.emit=n.prototype.emit,y.prototype.once=n.prototype.once,i(y,n),y.prototype.open=function(e){var r,n=this;return e||(r=(e=f()).promise),this.isOpen()?(t.nextTick(e,null,n),r):this._isOpening()?(this.once("open",function(){e(null,n)}),r):(this.emit("opening"),this.db.open(this.options,function(t){if(t)return e(new m(t));n.db=n._db,e(null,n),n.emit("open"),n.emit("ready")}),r)},y.prototype.close=function(e){var r,n=this;return e||(r=(e=f()).promise),this.isOpen()?(this.db.close(function(){n.emit("closed"),e.apply(null,arguments)}),this.emit("closing"),this.db=new s(this._db)):this.isClosed()?t.nextTick(e):"closing"===this.db.status?this.once("closed",e):this._isOpening()&&this.once("open",function(){n.close(e)}),r},y.prototype.isOpen=function(){return"open"===this.db.status},y.prototype._isOpening=function(){return"opening"===this.db.status},y.prototype.isClosed=function(){return/^clos|new/.test(this.db.status)},y.prototype.get=function(e,t,r){if(null==e)throw new h("get() requires a key argument");var n;return(r=b(t,r))||(n=(r=f()).promise),A(this,r)?n:(t=v(t),this.db.get(e,t,function(t,n){if(t)return t=/notfound/i.test(t)||t.notFound?new d("Key not found in database ["+e+"]",t):new h(t),r(t);r(null,n)}),n)},y.prototype.put=function(e,t,r,n){if(null==e)throw new p("put() requires a key argument");var i,o=this;return(n=b(r,n))||(i=(n=f()).promise),A(this,n)?i:(r=v(r),this.db.put(e,t,r,function(r){if(r)return n(new p(r));o.emit("put",e,t),n()}),i)},y.prototype.del=function(e,t,r){if(null==e)throw new p("del() requires a key argument");var n,i=this;return(r=b(t,r))||(n=(r=f()).promise),A(this,r)?n:(t=v(t),this.db.del(e,t,function(t){if(t)return r(new p(t));i.emit("del",e),r()}),n)},y.prototype.batch=function(e,t,r){if(!arguments.length)return new c(this);if(!Array.isArray(e))throw new p("batch() requires an array argument");var n,i=this;return(r=b(t,r))||(n=(r=f()).promise),A(this,r)?n:(t=v(t),e=e.map(function(e){return e.type||void 0===e.key||void 0===e.value||(e.type="put"),e}),this.db.batch(e,t,function(t){if(t)return r(new p(t));i.emit("batch",e),r()}),n)},y.prototype.readStream=y.prototype.createReadStream=function(e){return"number"!=typeof(e=o({keys:!0,values:!0},e)).limit&&(e.limit=-1),new a(this.db.iterator(e),e)},y.prototype.keyStream=y.prototype.createKeyStream=function(e){return this.createReadStream(o(e,{keys:!0,values:!1}))},y.prototype.valueStream=y.prototype.createValueStream=function(e){return this.createReadStream(o(e,{keys:!1,values:!0}))},y.prototype.toString=function(){return"LevelUP"},y.errors=u,e.exports=y.default=y}).call(this,r(4))},function(e,t,r){var n=r(103),i=r(632).AbstractLevelDOWN,o=r(858),s="put get del batch".split(" ");function a(e){i.call(this,""),this._db=e,this._operations=[],this._iterators=[],c(this)}function c(e){s.forEach(function(t){e["_"+t]=function(){this._operations.push({method:t,args:arguments})}}),"function"==typeof e._db.approximateSize&&(e.approximateSize=function(){this._operations.push({method:"approximateSize",args:arguments})}),e._iterator=function(e){var t=new o(e);return this._iterators.push(t),t}}n.inherits(a,i),a.prototype._open=function(e,t){var r=this;this._db.open(e,function(e){if(e)return t(e);r._operations.forEach(function(e){r._db[e.method].apply(r._db,e.args)}),r._operations=[],r._iterators.forEach(function(e){e.setDb(r._db)}),r._iterators=[],function(e){s.concat("iterator").forEach(function(t){e["_"+t]=function(){return this._db[t].apply(this._db,arguments)}}),e._db.approximateSize&&(e.approximateSize=function(){return this._db.approximateSize.apply(this._db,arguments)})}(r),t()})},a.prototype._close=function(e){var t=this;this._db.close(function(r){if(r)return e(r);c(t),e()})},a.prototype._serializeKey=function(e){return e},a.prototype._serializeValue=function(e){return e},e.exports=a,e.exports.DeferredIterator=o},function(e,t,r){(function(t,n){const i=r(66),o=r(633),s=r(634),a=Object.prototype.hasOwnProperty,c="start end gt gte lt lte".split(" ");function u(e){if(!arguments.length||void 0===e)throw new Error("constructor requires at least a location argument");if("string"!=typeof e)throw new Error("constructor requires a location string argument");this.location=e,this.status="new"}function l(e){return-1!==c.indexOf(e)}u.prototype.open=function(e,t){var r=this,n=this.status;if("function"==typeof e&&(t=e),"function"!=typeof t)throw new Error("open() requires a callback argument");"object"!=typeof e&&(e={}),e.createIfMissing=!1!==e.createIfMissing,e.errorIfExists=!!e.errorIfExists,this.status="opening",this._open(e,function(e){if(e)return r.status=n,t(e);r.status="open",t()})},u.prototype._open=function(e,r){t.nextTick(r)},u.prototype.close=function(e){var t=this,r=this.status;if("function"!=typeof e)throw new Error("close() requires a callback argument");this.status="closing",this._close(function(n){if(n)return t.status=r,e(n);t.status="closed",e()})},u.prototype._close=function(e){t.nextTick(e)},u.prototype.get=function(e,r,n){if("function"==typeof r&&(n=r),"function"!=typeof n)throw new Error("get() requires a callback argument");var i=this._checkKey(e,"key");if(i)return t.nextTick(n,i);e=this._serializeKey(e),"object"!=typeof r&&(r={}),r.asBuffer=!1!==r.asBuffer,this._get(e,r,n)},u.prototype._get=function(e,r,n){t.nextTick(function(){n(new Error("NotFound"))})},u.prototype.put=function(e,r,n,i){if("function"==typeof n&&(i=n),"function"!=typeof i)throw new Error("put() requires a callback argument");var o=this._checkKey(e,"key");if(o)return t.nextTick(i,o);e=this._serializeKey(e),r=this._serializeValue(r),"object"!=typeof n&&(n={}),this._put(e,r,n,i)},u.prototype._put=function(e,r,n,i){t.nextTick(i)},u.prototype.del=function(e,r,n){if("function"==typeof r&&(n=r),"function"!=typeof n)throw new Error("del() requires a callback argument");var i=this._checkKey(e,"key");if(i)return t.nextTick(n,i);e=this._serializeKey(e),"object"!=typeof r&&(r={}),this._del(e,r,n)},u.prototype._del=function(e,r,n){t.nextTick(n)},u.prototype.batch=function(e,r,n){if(!arguments.length)return this._chainedBatch();if("function"==typeof r&&(n=r),"function"==typeof e&&(n=e),"function"!=typeof n)throw new Error("batch(array) requires a callback argument");if(!Array.isArray(e))return t.nextTick(n,new Error("batch(array) requires an array argument"));r&&"object"==typeof r||(r={});for(var o=new Array(e.length),s=0;s0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,o=n.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,r=o,i=a,t.copy(r,i),a+=s.data.length,s=s.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,r){"use strict";e.exports=o;var n=r(639),i=r(64);function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}i.inherits=r(7),i.inherits(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){var n=r(640).WriteError,i=r(642);function o(e){this._levelup=e,this.batch=e.db.batch(),this.ops=[],this.length=0}o.prototype.put=function(e,t){try{this.batch.put(e,t)}catch(e){throw new n(e)}return this.ops.push({type:"put",key:e,value:t}),this.length++,this},o.prototype.del=function(e){try{this.batch.del(e)}catch(e){throw new n(e)}return this.ops.push({type:"del",key:e}),this.length++,this},o.prototype.clear=function(){try{this.batch.clear()}catch(e){throw new n(e)}return this.ops=[],this.length=0,this},o.prototype.write=function(e){var t,r=this._levelup,o=this.ops;e||(t=(e=i()).promise);try{this.batch.write(function(t){if(t)return e(new n(t));r.emit("batch",o),e()})}catch(e){throw new n(e)}return t},e.exports=o},function(e,t,r){var n=r(867);function i(e,t,r){t&&"string"!=typeof t&&(t=t.message||t.name),n(this,{type:e,name:e,cause:"string"!=typeof t?t:r,message:t},"ewr")}function o(e,t){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),i.call(this,"CustomError",e,t)}o.prototype=new Error,e.exports=function(e){var t=function(t,r){return function(e,t,r){var n=function(r,o){i.call(this,t,r,o),"FilesystemError"==t&&(this.code=this.cause.code,this.path=this.cause.path,this.errno=this.cause.errno,this.message=(e.errno[this.cause.errno]?e.errno[this.cause.errno].description:this.cause.message)+(this.cause.path?" ["+this.cause.path+"]":"")),Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,n)};return n.prototype=r?new r:new o,n}(e,t,r)};return{CustomError:o,FilesystemError:t("FilesystemError"),createError:t}}},function(e,t,r){ /*! * prr * (c) 2013 Rod Vagg * https://github.com/rvagg/prr * License: MIT */ -var n,i;n=this,i=function(){var e="function"==typeof Object.defineProperty?function(e,t,r){return Object.defineProperty(e,t,r),e}:function(e,t,r){return e[t]=r.value,e};return function(t,r,n,i){var o;if(i=function(e,t){var r="object"==typeof t,n=!r&&"string"==typeof t,i=function(e){return r?!!t[e]:!!n&&t.indexOf(e[0])>-1};return{enumerable:i("enumerable"),configurable:i("configurable"),writable:i("writable"),value:e}}(n,i),"object"==typeof r){for(o in r)Object.hasOwnProperty.call(r,o)&&(i.value=r[o],e(t,o,i));return t}return e(t,r,i)}},e.exports?e.exports=i():n.prr=i()},function(e,t,r){"use strict";var n=r(630).AbstractLevelDOWN,i=r(630).AbstractChainedBatch,o=r(630).AbstractIterator,s=r(4),a=r(31),c=r(1088),u=r(1090).EncodingError;function f(e,t){if(!(this instanceof f))return new f(e,t);n.call(this,""),void 0===(t=t||{}).keyEncoding&&(t.keyEncoding="utf8"),void 0===t.valueEncoding&&(t.valueEncoding="utf8"),this.db=e,this.codec=new c(t)}function l(e,t){o.call(this,e),this.codec=e.codec,this.keys=t.keys,this.values=t.values,this.opts=this.codec.encodeLtgt(t),this.it=e.db.iterator(this.opts)}function h(e,t){i.call(this,e),this.codec=e.codec,this.batch=e.db.batch()}e.exports=f.default=f,s(f,n),f.prototype._serializeKey=f.prototype._serializeValue=function(e){return e},f.prototype._open=function(e,t){this.db.open(e,t)},f.prototype._close=function(e){this.db.close(e)},f.prototype._put=function(e,t,r,n){e=this.codec.encodeKey(e,r),t=this.codec.encodeValue(t,r),this.db.put(e,t,r,n)},f.prototype._get=function(e,t,r){var n=this;e=this.codec.encodeKey(e,t),t.asBuffer=this.codec.valueAsBuffer(t),this.db.get(e,t,function(e,i){if(e)return r(e);try{i=n.codec.decodeValue(i,t)}catch(e){return r(new u(e))}r(null,i)})},f.prototype._del=function(e,t,r){e=this.codec.encodeKey(e,t),this.db.del(e,t,r)},f.prototype._chainedBatch=function(){return new h(this)},f.prototype._batch=function(e,t,r){e=this.codec.encodeBatch(e,t),this.db.batch(e,t,r)},f.prototype._iterator=function(e){return e.keyAsBuffer=this.codec.keyAsBuffer(e),e.valueAsBuffer=this.codec.valueAsBuffer(e),new l(this,e)},f.prototype._setupIteratorOptions=function(e){return(e=a(e)).reverse=!!e.reverse,e.keys=!1!==e.keys,e.values=!1!==e.values,e.limit="limit"in e?e.limit:-1,e.keyAsBuffer=!1!==e.keyAsBuffer,e.valueAsBuffer=!1!==e.valueAsBuffer,e},f.prototype.approximateSize=function(e,t,r,n){return this.db.approximateSize(e,t,r,n)},s(l,o),l.prototype._next=function(e){var t=this;this.it.next(function(r,n,i){if(r)return e(r);try{n=t.keys&&void 0!==n?t.codec.decodeKey(n,t.opts):void 0,i=t.values&&void 0!==i?t.codec.decodeValue(i,t.opts):void 0}catch(r){return e(new u(r))}e(null,n,i)})},l.prototype._end=function(e){this.it.end(e)},s(h,i),h.prototype._put=function(e,t){e=this.codec.encodeKey(e),t=this.codec.encodeValue(t),this.batch.put(e,t)},h.prototype._del=function(e){e=this.codec.encodeKey(e),this.batch.del(e)},h.prototype._clear=function(){this.batch.clear()},h.prototype._write=function(e,t){this.batch.write(e,t)}},function(e,t,r){(function(t,n){var i=r(31),o=r(766),s=r(767),a=Object.prototype.hasOwnProperty,c="start end gt gte lt lte".split(" ");function u(e){if(!arguments.length||void 0===e)throw new Error("constructor requires at least a location argument");if("string"!=typeof e)throw new Error("constructor requires a location string argument");this.location=e,this.status="new"}function f(e){return-1!==c.indexOf(e)}u.prototype.open=function(e,t){var r=this,n=this.status;if("function"==typeof e&&(t=e),"function"!=typeof t)throw new Error("open() requires a callback argument");"object"!=typeof e&&(e={}),e.createIfMissing=!1!==e.createIfMissing,e.errorIfExists=!!e.errorIfExists,this.status="opening",this._open(e,function(e){if(e)return r.status=n,t(e);r.status="open",t()})},u.prototype._open=function(e,r){t.nextTick(r)},u.prototype.close=function(e){var t=this,r=this.status;if("function"!=typeof e)throw new Error("close() requires a callback argument");this.status="closing",this._close(function(n){if(n)return t.status=r,e(n);t.status="closed",e()})},u.prototype._close=function(e){t.nextTick(e)},u.prototype.get=function(e,r,n){if("function"==typeof r&&(n=r),"function"!=typeof n)throw new Error("get() requires a callback argument");var i=this._checkKey(e,"key");if(i)return t.nextTick(n,i);e=this._serializeKey(e),"object"!=typeof r&&(r={}),r.asBuffer=!1!==r.asBuffer,this._get(e,r,n)},u.prototype._get=function(e,r,n){t.nextTick(function(){n(new Error("NotFound"))})},u.prototype.put=function(e,r,n,i){if("function"==typeof n&&(i=n),"function"!=typeof i)throw new Error("put() requires a callback argument");var o=this._checkKey(e,"key");if(o)return t.nextTick(i,o);e=this._serializeKey(e),r=this._serializeValue(r),"object"!=typeof n&&(n={}),this._put(e,r,n,i)},u.prototype._put=function(e,r,n,i){t.nextTick(i)},u.prototype.del=function(e,r,n){if("function"==typeof r&&(n=r),"function"!=typeof n)throw new Error("del() requires a callback argument");var i=this._checkKey(e,"key");if(i)return t.nextTick(n,i);e=this._serializeKey(e),"object"!=typeof r&&(r={}),this._del(e,r,n)},u.prototype._del=function(e,r,n){t.nextTick(n)},u.prototype.batch=function(e,r,n){if(!arguments.length)return this._chainedBatch();if("function"==typeof r&&(n=r),"function"==typeof e&&(n=e),"function"!=typeof n)throw new Error("batch(array) requires a callback argument");if(!Array.isArray(e))return t.nextTick(n,new Error("batch(array) requires an array argument"));r&&"object"==typeof r||(r={});for(var o=new Array(e.length),s=0;s-1?t.encodeKey(e[n],e):e[n]}),r},i.prototype.createStreamDecoder=function(e){var t=this;return e.keys&&e.values?function(r,n){return{key:t.decodeKey(r,e),value:t.decodeValue(n,e)}}:e.keys?function(r){return t.decodeKey(r,e)}:e.values?function(r,n){return t.decodeValue(n,e)}:function(){}},i.prototype.keyAsBuffer=function(e){return this._keyEncoding(e).buffer},i.prototype.valueAsBuffer=function(e){return this._valueEncoding(e).buffer}},function(e,t,r){(function(e){t.utf8=t["utf-8"]={encode:function(e){return n(e)?e:String(e)},decode:r,buffer:!1,type:"utf8"},t.json={encode:JSON.stringify,decode:JSON.parse,buffer:!1,type:"json"},t.binary={encode:function(t){return n(t)?t:e.from(t)},decode:r,buffer:!0,type:"binary"},t.none={encode:r,decode:r,buffer:!1,type:"id"},t.id=t.none;function r(e){return e}function n(t){return null==t||e.isBuffer(t)}["hex","ascii","base64","ucs2","ucs-2","utf16le","utf-16le"].forEach(function(r){t[r]={encode:function(t){return n(t)?t:e.from(t,r)},decode:function(e){return e.toString(r)},buffer:!0,type:r}})}).call(this,r(0).Buffer)},function(e,t,r){var n=r(764).create,i=n("LevelUPError"),o=n("NotFoundError",i);o.prototype.notFound=!0,o.prototype.status=404,e.exports={LevelUPError:i,InitializationError:n("InitializationError",i),OpenError:n("OpenError",i),ReadError:n("ReadError",i),WriteError:n("WriteError",i),NotFoundError:o,EncodingError:n("EncodingError",i)}},function(e,t,r){(function(t,n){e.exports=c;var i=r(768).AbstractLevelDOWN,o=r(149),s=r(1093),a=r(31);function c(e){if(!(this instanceof c))return new c(e);i.call(this,e)}o.inherits(c,i),c.prototype._open=function(e,t){var r=this;if(this._idbOpts=a({storeName:this.location,keyEncoding:"none",valueEncoding:"none"},e),this._idbOpts.idb)i(this._idbOpts.idb);else{var n=indexedDB.open(this.location);n.onerror=function(e){t(e.target.error)},n.onsuccess=function(){i(n.result)}}function i(n){r._db=n;var i=r._db.objectStoreNames.contains(r._idbOpts.storeName);if(e.errorIfExists&&i)return r._db.close(),void t(new Error("store already exists"));if(!e.createIfMissing&&!i)return r._db.close(),void t(new Error("store does not exist"));if(e.createIfMissing&&!i){r._db.close();var o=indexedDB.open(r.location,r._db.version+1);return o.onerror=function(e){t(e.target.error)},o.onupgradeneeded=function(){o.result.createObjectStore(r._idbOpts.storeName,r._idbOpts)},void(o.onsuccess=function(){r._db=o.result,t(null,r)})}t(null,r)}},c.prototype._get=function(e,r,n){r=a(this._idbOpts,r);var i=e;"binary"!==r.keyEncoding||Array.isArray(e)||(e=Array.prototype.slice.call(e));var o=this._db.transaction(this._idbOpts.storeName),s=o.objectStore(this._idbOpts.storeName).openCursor(IDBKeyRange.only(e));o.onabort=function(){n(o.error)},s.onsuccess=function(){var e=s.result;if(e){var o=e.value;if(o instanceof Uint8Array&&(o=new t(o)),"binary"!==r.valueEncoding||t.isBuffer(o)||(o=new t(o)),r.asBuffer&&!t.isBuffer(o))if(null==o)o=new t(0);else if("string"==typeof o)o=new t(o);else if("boolean"==typeof o)o=new t(String(o));else if("number"==typeof o)o=new t(String(o));else if(Array.isArray(o))o=new t(String(o));else{if(!(o instanceof Uint8Array))return void n(new TypeError("can't coerce `"+o.constructor.name+"` into a Buffer"));o=new t(o)}n(null,o,i)}else n(new Error("NotFound"))}},c.prototype._del=function(e,t,r){"binary"!==(t=a(this._idbOpts,t)).keyEncoding||Array.isArray(e)||(e=Array.prototype.slice.call(e));var n="readwrite";!0===t.sync&&(n="readwriteflush");var i=this._db.transaction(this._idbOpts.storeName,n);i.objectStore(this._idbOpts.storeName).delete(e);i.onabort=function(){r(i.error)},i.oncomplete=function(){r()}},c.prototype._put=function(e,t,r,n){"binary"!==(r=a(this._idbOpts,r)).keyEncoding||Array.isArray(e)||(e=Array.prototype.slice.call(e));var i="readwrite";!0===r.sync&&(i="readwriteflush");var o=this._db.transaction(this._idbOpts.storeName,i);o.objectStore(this._idbOpts.storeName).put(t,e);o.onabort=function(){n(o.error)},o.oncomplete=function(){n()}},c.prototype._iterator=function(e){return new s(this,e)},c.prototype._batch=function(e,t,r){if(0===e.length)return n.nextTick(r);var i="readwrite";!0===t.sync&&(i="readwriteflush");var o=this._db.transaction(this._idbOpts.storeName,i),s=o.objectStore(this._idbOpts.storeName);o.onabort=function(){r(o.error)},o.oncomplete=function(){r()},e.forEach(function(e){"binary"!==a(t,e).keyEncoding||Array.isArray(e.key)||(e.key=Array.prototype.slice.call(e.key)),"del"===e.type?s.delete(e.key):s.put(e.value,e.key)})},c.prototype._close=function(e){this._db.close(),n.nextTick(e)},c.prototype._approximateSize=function(e,t,r){var i=new Error("Not implemented");if(!r)throw i;n.nextTick(function(){r(i)})},c.destroy=function(e,t){var r;if(null!=e&&"object"==typeof e)r=a({location:e.location,storeName:e.location},e._idbOpts);else{if("string"!=typeof e)throw new TypeError("location must be a string or an object");r={location:e,storeName:e}}if("string"!=typeof r.location)throw new TypeError("location must be a string");if("string"!=typeof r.storeName)throw new TypeError("db.storeName must be a string");var n=indexedDB.open(r.location);n.onerror=function(e){t(e.target.error)},n.onsuccess=function(){var e=n.result;function i(e){var r=indexedDB.deleteDatabase(e);r.onerror=function(e){t(e.target.error)},r.onsuccess=function(){t()}}if(e.close(),0!==e.objectStoreNames.length)if(e.objectStoreNames.contains(r.storeName)){var o=indexedDB.open(r.location,e.version+1);o.onerror=function(e){t(e.target.error)},o.onupgradeneeded=function(){(e=o.result).deleteObjectStore(r.storeName)},o.onsuccess=function(){(e=o.result).close(),0===e.objectStoreNames.length?i(r.location):t()}}else t();else i(r.location)}}}).call(this,r(0).Buffer,r(6))},function(e,t,r){var n=r(769);e.exports=function(e){return!(!e||"object"!=typeof e)&&Object.keys(n.prototype).filter(function(e){return"_"!=e[0]&&"approximateSize"!=e}).every(function(t){return"function"==typeof e[t]})}},function(e,t,r){(function(t,n){var i=r(149),o=r(768).AbstractIterator,s=r(1094),a=r(1095),c=r(66),u=r(31),f=c.Writable;function l(e,t){if(this._db=e._db,this._idbOpts=e._idbOpts,o.call(this,e),this._options=u({snapshot:!0},this._idbOpts,t),this._limit=this._options.limit,null!=this._limit&&-1!==this._limit||(this._limit=1/0),"number"!=typeof this._limit)throw new TypeError("options.limit must be a number");0!==this._limit&&(this._count=0,this._startCursor(this._options))}e.exports=l,i.inherits(l,o),l.prototype._startCursor=function(e){e=u(this._options,e);var t=this,r=null,n=s.lowerBound(e),i=s.upperBound(e),o=s.lowerBoundExclusive(e),c=s.upperBoundExclusive(e),l=e.reverse?"prev":"next";if(n&&("binary"!==e.keyEncoding||Array.isArray(n)||(n=Array.prototype.slice.call(n))),i&&("binary"!==e.keyEncoding||Array.isArray(i)||(i=Array.prototype.slice.call(i))),n&&i)try{r=IDBKeyRange.bound(n,i,o,c)}catch(e){return void(this._keyRangeError=!0)}else n?r=IDBKeyRange.lowerBound(n,o):i&&(r=IDBKeyRange.upperBound(i,c));this._reader=a(this._db,this._idbOpts.storeName,u(e,{range:r,direction:l})),this._reader.on("error",function(e){var r=t._callback;t._callback=!1,r?r(e):t._readNext=function(t){t(e)}}),this._reader.pipe(new f({objectMode:!0,write:function(e,r,n){if(t._count++>=t._limit)return t._reader.pause(),t._reader.unpipe(this),n(),void this.end();var i=t._callback;t._callback=!1,i?t._processItem(e,function(e,t,r){n(e),i(e,t,r)}):t._readNext=function(r){t._processItem(e,function(e,t,i){n(e),r(e,t,i)})}}})).on("finish",function(){var e=t._callback;t._callback=!1,e?e():t._readNext=function(e){e()}})},l.prototype._processItem=function(e,r){if("function"!=typeof r)throw new TypeError("cb must be a function");var n=e.key,i=e.value;if(i instanceof Uint8Array&&(i=new t(i)),"binary"===this._options.keyEncoding&&Array.isArray(n)&&(n=new t(n)),"binary"!==this._options.valueEncoding||t.isBuffer(i)||(i=new t(i)),this._options.keyAsBuffer&&!t.isBuffer(n))if(null==n)n=new t(0);else if("string"==typeof n)n=new t(n);else if("boolean"==typeof n)n=new t(String(n));else if("number"==typeof n)n=new t(String(n));else if(Array.isArray(n))n=new t(String(n));else{if(!(n instanceof Uint8Array))throw new TypeError("can't coerce `"+n.constructor.name+"` into a Buffer");n=new t(n)}if(this._options.valueAsBuffer&&!t.isBuffer(i))if(null==i)i=new t(0);else if("string"==typeof i)i=new t(i);else if("boolean"==typeof i)i=new t(String(i));else if("number"==typeof i)i=new t(String(i));else if(Array.isArray(i))i=new t(String(i));else{if(!(i instanceof Uint8Array))throw new TypeError("can't coerce `"+i.constructor.name+"` into a Buffer");i=new t(i)}r(null,n,i)},l.prototype._next=function(e){if(this._callback)throw new Error("callback already exists");if(this._keyRangeError||0===this._limit)e();else{var t=this._readNext;this._readNext=!1,t?n.nextTick(function(){t(e)}):this._callback=e}}}).call(this,r(0).Buffer,r(6))},function(e,t,r){(function(e){function r(e){return void 0!==e&&""!==e}function n(e,t){return Object.hasOwnProperty.call(e,t)}function i(e,t){return Object.hasOwnProperty.call(e,t)&&t}t.compare=function(t,r){if(e.isBuffer(t)){for(var n=Math.min(t.length,r.length),i=0;ir?1:0};var o=t.lowerBoundKey=function(e){return i(e,"gt")||i(e,"gte")||i(e,"min")||(e.reverse?i(e,"end"):i(e,"start"))||void 0},s=t.lowerBound=function(e,t){var r=o(e);return r?e[r]:t},a=t.lowerBoundInclusive=function(e){return!n(e,"gt")},c=t.upperBoundInclusive=function(e){return!n(e,"lt")},u=t.lowerBoundExclusive=function(e){return!a(e)},f=t.upperBoundExclusive=function(e){return!c(e)},l=t.upperBoundKey=function(e){return i(e,"lt")||i(e,"lte")||i(e,"max")||(e.reverse?i(e,"start"):i(e,"end"))||void 0},h=t.upperBound=function(e,t){var r=l(e);return r?e[r]:t};function p(e){return e}t.start=function(e,t){return e.reverse?h(e,t):s(e,t)},t.end=function(e,t){return e.reverse?s(e,t):h(e,t)},t.startInclusive=function(e){return e.reverse?c(e):a(e)},t.endInclusive=function(e){return e.reverse?a(e):c(e)},t.toLtgt=function(e,r,i,o,s){r=r||{},i=i||p;var a=arguments.length>3,c=t.lowerBoundKey(e),u=t.upperBoundKey(e);return c?"gt"===c?r.gt=i(e.gt,!1):r.gte=i(e[c],!1):a&&(r.gte=i(o,!1)),u?"lt"===u?r.lt=i(e.lt,!0):r.lte=i(e[u],!0):a&&(r.lte=i(s,!0)),null!=e.reverse&&(r.reverse=!!e.reverse),n(r,"max")&&delete r.max,n(r,"min")&&delete r.min,n(r,"start")&&delete r.start,n(r,"end")&&delete r.end,r},t.contains=function(e,n,i){i=i||t.compare;var o=s(e);if(r(o)&&((a=i(n,o))<0||0===a&&u(e)))return!1;var a,c=h(e);if(r(c)&&((a=i(n,c))>0||0===a&&f(e)))return!1;return!0},t.filter=function(e,r){return function(n){return t.contains(e,n,r)}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";var n=r(66),i=r(31);e.exports=function(e,t,r){if("object"!=typeof e)throw new TypeError("db must be an object");if("string"!=typeof t)throw new TypeError("storeName must be a string");if(null==r&&(r={}),"object"!=typeof r)throw new TypeError("opts must be an object");var o=new n.Transform(i(r,{objectMode:!0,transform:function(e,t,r){r(null,e)}}));r=i({snapshot:!1},r);var s=null;return o._cursorsOpened=0,function n(){var i,a,c,u,f,l=r.direction||"next",h=r.range||{};i=h.lower,a=h.upper,c=!!h.lowerOpen,u=!!h.upperOpen,s&&("next"===l?(c=!0,i=s):(u=!0,a=s)),i&&a?f=IDBKeyRange.bound(i,a,c,u):i?f=IDBKeyRange.lowerBound(i,c):a&&(f=IDBKeyRange.upperBound(a,u));var p=e.transaction(t,"readonly"),d=p.objectStore(t);o._cursorsOpened++;var g=d.openCursor(f,r.direction);function b(e){try{e.continue()}catch(e){"TransactionInactiveError"!==e.name||r.snapshot?o.emit("error",e):n()}}g.onsuccess=function(){var e=g.result;if(e){s=e.key;var t=o.write({key:e.key,value:e.value});r.snapshot||t?b(e):o.once("drain",function(){b(e)})}else o.end()},p.onabort=function(){o.emit("error",p.error)},p.onerror=function(){o.emit("error",p.error)}}(),o}},function(e,t,r){"use strict";e.exports={Spec:{type:"mount",mounts:[{mountpoint:"/blocks",type:"measure",prefix:"flatfs.datastore",child:{type:"flatfs",path:"blocks",sync:!0,shardFunc:"/repo/flatfs/shard/v1/next-to-last/2"}},{mountpoint:"/",type:"measure",prefix:"leveldb.datastore",child:{type:"levelds",path:"datastore",compression:"none"}}]}}},function(e,t,r){"use strict";t.ERR_REPO_NOT_INITIALIZED="ERR_REPO_NOT_INITIALIZED"},function(e,t,r){"use strict";e.exports={repoVersion:7}},function(e,t,r){"use strict";const n=r(752),i=Object.prototype.hasOwnProperty,o=Object.propertyIsEnumerable,s=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0}),a=this,c={concatArrays:!1},u=e=>{const t=[];for(const r in e)i.call(e,r)&&t.push(r);if(Object.getOwnPropertySymbols){const r=Object.getOwnPropertySymbols(e);for(let n=0;n{s(t,r,f(e[r]))}),t}(e):n(e)?function(e){const t=null===Object.getPrototypeOf(e)?Object.create(null):{};return u(e).forEach(r=>{s(t,r,f(e[r]))}),t}(e):e}const l=(e,t,r,n)=>(r.forEach(r=>{r in e&&e[r]!==Object.getPrototypeOf(e)?s(e,r,p(e[r],t[r],n)):s(e,r,f(t[r]))}),e),h=(e,t,r)=>{let n=e.slice(0,0),o=0;return[e,t].forEach(t=>{const a=[];for(let r=0;r-1===a.indexOf(e)),r)}),n};function p(e,t,r){return r.concatArrays&&Array.isArray(e)&&Array.isArray(t)?h(e,t,r):n(t)&&n(e)?l(e,t,u(t),r):f(t)}e.exports=function(){const e=p(f(c),this!==a&&this||{},c);let t={foobar:{}};for(let r=0;rt?`${t}, ${r}: ${e[r]}`:`${r}: ${e[r]}`}e.exports=o}).call(this,r(0).Buffer)},function(e,t){t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,c=(1<>1,f=-7,l=r?i-1:0,h=r?-1:1,p=e[t+l];for(l+=h,o=p&(1<<-f)-1,p>>=-f,f+=a;f>0;o=256*o+e[t+l],l+=h,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+e[t+l],l+=h,f-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=u}return(p?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,c,u=8*o-i-1,f=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+l>=1?h/c:h*Math.pow(2,1-l))*c>=2&&(s++,c/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(t*c-1)*Math.pow(2,i),s+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;e[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;e[r+p]=255&s,p+=d,s/=256,u-=8);e[r+p-d]|=128*g}},function(e,t){e.exports=function(e,t,r){"use asm";var n=new e.Uint8Array(r);var i=t.pushInt;var o=t.pushInt32;var s=t.pushInt32Neg;var a=t.pushInt64;var c=t.pushInt64Neg;var u=t.pushFloat;var f=t.pushFloatSingle;var l=t.pushFloatDouble;var h=t.pushTrue;var p=t.pushFalse;var d=t.pushUndefined;var g=t.pushNull;var b=t.pushInfinity;var m=t.pushInfinityNeg;var y=t.pushNaN;var v=t.pushNaNNeg;var w=t.pushArrayStart;var A=t.pushArrayStartFixed;var _=t.pushArrayStartFixed32;var S=t.pushArrayStartFixed64;var E=t.pushObjectStart;var k=t.pushObjectStartFixed;var x=t.pushObjectStartFixed32;var C=t.pushObjectStartFixed64;var I=t.pushByteString;var B=t.pushByteStringStart;var T=t.pushUtf8String;var R=t.pushUtf8StringStart;var P=t.pushSimpleUnassigned;var O=t.pushTagStart;var M=t.pushTagStart4;var N=t.pushTagStart8;var D=t.pushTagUnassigned;var K=t.pushBreak;var U=e.Math.pow;var j=0;var F=0;var L=0;function z(e){e=e|0;j=0;F=e;while((j|0)<(F|0)){L=Ze[n[j]&255](n[j]|0)|0;if((L|0)>0){break}}return L|0}function H(e){e=e|0;if(((j|0)+(e|0)|0)<(F|0)){return 0}return 1}function q(e){e=e|0;return n[e|0]<<8|n[e+1|0]|0}function V(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 G(e){e=e|0;i(e|0);j=j+1|0;return 0}function W(e){e=e|0;if(H(1)|0){return 1}i(n[j+1|0]|0);j=j+2|0;return 0}function Y(e){e=e|0;if(H(2)|0){return 1}i(q(j+1|0)|0);j=j+3|0;return 0}function J(e){e=e|0;if(H(4)|0){return 1}o(q(j+1|0)|0,q(j+3|0)|0);j=j+5|0;return 0}function Z(e){e=e|0;if(H(8)|0){return 1}a(q(j+1|0)|0,q(j+3|0)|0,q(j+5|0)|0,q(j+7|0)|0);j=j+9|0;return 0}function Q(e){e=e|0;i(-1-(e-32|0)|0);j=j+1|0;return 0}function X(e){e=e|0;if(H(1)|0){return 1}i(-1-(n[j+1|0]|0)|0);j=j+2|0;return 0}function $(e){e=e|0;var t=0;if(H(2)|0){return 1}t=q(j+1|0)|0;i(-1-(t|0)|0);j=j+3|0;return 0}function ee(e){e=e|0;if(H(4)|0){return 1}s(q(j+1|0)|0,q(j+3|0)|0);j=j+5|0;return 0}function te(e){e=e|0;if(H(8)|0){return 1}c(q(j+1|0)|0,q(j+3|0)|0,q(j+5|0)|0,q(j+7|0)|0);j=j+9|0;return 0}function re(e){e=e|0;var t=0;var r=0;var n=0;n=e-64|0;if(H(n|0)|0){return 1}t=j+1|0;r=(j+1|0)+(n|0)|0;I(t|0,r|0);j=r|0;return 0}function ne(e){e=e|0;var t=0;var r=0;var i=0;if(H(1)|0){return 1}i=n[j+1|0]|0;t=j+2|0;r=(j+2|0)+(i|0)|0;if(H(i+1|0)|0){return 1}I(t|0,r|0);j=r|0;return 0}function ie(e){e=e|0;var t=0;var r=0;var n=0;if(H(2)|0){return 1}n=q(j+1|0)|0;t=j+3|0;r=(j+3|0)+(n|0)|0;if(H(n+2|0)|0){return 1}I(t|0,r|0);j=r|0;return 0}function oe(e){e=e|0;var t=0;var r=0;var n=0;if(H(4)|0){return 1}n=V(j+1|0)|0;t=j+5|0;r=(j+5|0)+(n|0)|0;if(H(n+4|0)|0){return 1}I(t|0,r|0);j=r|0;return 0}function se(e){e=e|0;return 1}function ae(e){e=e|0;B();j=j+1|0;return 0}function ce(e){e=e|0;var t=0;var r=0;var n=0;n=e-96|0;if(H(n|0)|0){return 1}t=j+1|0;r=(j+1|0)+(n|0)|0;T(t|0,r|0);j=r|0;return 0}function ue(e){e=e|0;var t=0;var r=0;var i=0;if(H(1)|0){return 1}i=n[j+1|0]|0;t=j+2|0;r=(j+2|0)+(i|0)|0;if(H(i+1|0)|0){return 1}T(t|0,r|0);j=r|0;return 0}function fe(e){e=e|0;var t=0;var r=0;var n=0;if(H(2)|0){return 1}n=q(j+1|0)|0;t=j+3|0;r=(j+3|0)+(n|0)|0;if(H(n+2|0)|0){return 1}T(t|0,r|0);j=r|0;return 0}function le(e){e=e|0;var t=0;var r=0;var n=0;if(H(4)|0){return 1}n=V(j+1|0)|0;t=j+5|0;r=(j+5|0)+(n|0)|0;if(H(n+4|0)|0){return 1}T(t|0,r|0);j=r|0;return 0}function he(e){e=e|0;return 1}function pe(e){e=e|0;R();j=j+1|0;return 0}function de(e){e=e|0;A(e-128|0);j=j+1|0;return 0}function ge(e){e=e|0;if(H(1)|0){return 1}A(n[j+1|0]|0);j=j+2|0;return 0}function be(e){e=e|0;if(H(2)|0){return 1}A(q(j+1|0)|0);j=j+3|0;return 0}function me(e){e=e|0;if(H(4)|0){return 1}_(q(j+1|0)|0,q(j+3|0)|0);j=j+5|0;return 0}function ye(e){e=e|0;if(H(8)|0){return 1}S(q(j+1|0)|0,q(j+3|0)|0,q(j+5|0)|0,q(j+7|0)|0);j=j+9|0;return 0}function ve(e){e=e|0;w();j=j+1|0;return 0}function we(e){e=e|0;var t=0;t=e-160|0;if(H(t|0)|0){return 1}k(t|0);j=j+1|0;return 0}function Ae(e){e=e|0;if(H(1)|0){return 1}k(n[j+1|0]|0);j=j+2|0;return 0}function _e(e){e=e|0;if(H(2)|0){return 1}k(q(j+1|0)|0);j=j+3|0;return 0}function Se(e){e=e|0;if(H(4)|0){return 1}x(q(j+1|0)|0,q(j+3|0)|0);j=j+5|0;return 0}function Ee(e){e=e|0;if(H(8)|0){return 1}C(q(j+1|0)|0,q(j+3|0)|0,q(j+5|0)|0,q(j+7|0)|0);j=j+9|0;return 0}function ke(e){e=e|0;E();j=j+1|0;return 0}function xe(e){e=e|0;O(e-192|0|0);j=j+1|0;return 0}function Ce(e){e|0;O(e|0);j=j+1|0;return 0}function Ie(e){e|0;O(e|0);j=j+1|0;return 0}function Be(e){e|0;O(e|0);j=j+1|0;return 0}function Te(e){e|0;O(e|0);j=j+1|0;return 0}function Re(e){e=e|0;O(e-192|0|0);j=j+1|0;return 0}function Pe(e){e|0;O(e|0);j=j+1|0;return 0}function Oe(e){e|0;O(e|0);j=j+1|0;return 0}function Me(e){e|0;O(e|0);j=j+1|0;return 0}function Ne(e){e=e|0;if(H(1)|0){return 1}O(n[j+1|0]|0);j=j+2|0;return 0}function De(e){e=e|0;if(H(2)|0){return 1}O(q(j+1|0)|0);j=j+3|0;return 0}function Ke(e){e=e|0;if(H(4)|0){return 1}M(q(j+1|0)|0,q(j+3|0)|0);j=j+5|0;return 0}function Ue(e){e=e|0;if(H(8)|0){return 1}N(q(j+1|0)|0,q(j+3|0)|0,q(j+5|0)|0,q(j+7|0)|0);j=j+9|0;return 0}function je(e){e=e|0;P((e|0)-224|0);j=j+1|0;return 0}function Fe(e){e=e|0;p();j=j+1|0;return 0}function Le(e){e=e|0;h();j=j+1|0;return 0}function ze(e){e=e|0;g();j=j+1|0;return 0}function He(e){e=e|0;d();j=j+1|0;return 0}function qe(e){e=e|0;if(H(1)|0){return 1}P(n[j+1|0]|0);j=j+2|0;return 0}function Ve(e){e=e|0;var t=0;var r=0;var i=1.0;var o=0.0;var s=0.0;var a=0.0;if(H(2)|0){return 1}t=n[j+1|0]|0;r=n[j+2|0]|0;if((t|0)&0x80){i=-1.0}o=+(((t|0)&0x7C)>>2);s=+(((t|0)&0x03)<<8|r);if(+o==0.0){u(+(+i*+5.9604644775390625e-8*+s))}else if(+o==31.0){if(+i==1.0){if(+s>0.0){y()}else{b()}}else{if(+s>0.0){v()}else{m()}}}else{u(+(+i*U(+2,+(+o-25.0))*+(1024.0+s)))}j=j+3|0;return 0}function Ge(e){e=e|0;if(H(4)|0){return 1}f(n[j+1|0]|0,n[j+2|0]|0,n[j+3|0]|0,n[j+4|0]|0);j=j+5|0;return 0}function We(e){e=e|0;if(H(8)|0){return 1}l(n[j+1|0]|0,n[j+2|0]|0,n[j+3|0]|0,n[j+4|0]|0,n[j+5|0]|0,n[j+6|0]|0,n[j+7|0]|0,n[j+8|0]|0);j=j+9|0;return 0}function Ye(e){e=e|0;return 1}function Je(e){e=e|0;K();j=j+1|0;return 0}var Ze=[G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,W,Y,J,Z,Ye,Ye,Ye,Ye,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,X,$,ee,te,Ye,Ye,Ye,Ye,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,oe,se,Ye,Ye,Ye,ae,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ce,ue,fe,le,he,Ye,Ye,Ye,pe,de,de,de,de,de,de,de,de,de,de,de,de,de,de,de,de,de,de,de,de,de,de,de,de,ge,be,me,ye,Ye,Ye,Ye,ve,we,we,we,we,we,we,we,we,we,we,we,we,we,we,we,we,we,we,we,we,we,we,we,we,Ae,_e,Se,Ee,Ye,Ye,Ye,ke,xe,xe,xe,xe,xe,xe,Re,Re,Re,Re,Re,Re,Re,Re,Re,Re,Re,Re,Re,Re,Re,Re,Re,Re,Ne,De,Ke,Ue,Ye,Ye,Ye,Ye,je,je,je,je,je,je,je,je,je,je,je,je,je,je,je,je,je,je,je,je,Fe,Le,ze,He,qe,Ve,Ge,We,Ye,Ye,Ye,Je];return{parse:z}}},function(e,t,r){(function(e,n){var i;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){t&&t.nodeType,e&&e.nodeType;var s="object"==typeof n&&n;s.global!==s&&s.window!==s&&s.self;var a,c=2147483647,u=36,f=1,l=26,h=38,p=700,d=72,g=128,b="-",m=/^xn--/,y=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=u-f,_=Math.floor,S=String.fromCharCode;function E(e){throw new RangeError(w[e])}function k(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function x(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+k((e=e.replace(v,".")).split("."),t).join(".")}function C(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(t+=S((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=S(e)}).join("")}function B(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function T(e,t,r){var n=0;for(e=r?_(e/p):e>>1,e+=_(e/t);e>A*l>>1;n+=u)e=_(e/A);return _(n+(A+1)*e/(e+h))}function R(e){var t,r,n,i,o,s,a,h,p,m,y,v=[],w=e.length,A=0,S=g,k=d;for((r=e.lastIndexOf(b))<0&&(r=0),n=0;n=128&&E("not-basic"),v.push(e.charCodeAt(n));for(i=r>0?r+1:0;i=w&&E("invalid-input"),((h=(y=e.charCodeAt(i++))-48<10?y-22:y-65<26?y-65:y-97<26?y-97:u)>=u||h>_((c-A)/s))&&E("overflow"),A+=h*s,!(h<(p=a<=k?f:a>=k+l?l:a-k));a+=u)s>_(c/(m=u-p))&&E("overflow"),s*=m;k=T(A-o,t=v.length+1,0==o),_(A/t)>c-S&&E("overflow"),S+=_(A/t),A%=t,v.splice(A++,0,S)}return I(v)}function P(e){var t,r,n,i,o,s,a,h,p,m,y,v,w,A,k,x=[];for(v=(e=C(e)).length,t=g,r=0,o=d,s=0;s=t&&y_((c-r)/(w=n+1))&&E("overflow"),r+=(a-t)*w,t=a,s=0;sc&&E("overflow"),y==t){for(h=r,p=u;!(h<(m=p<=o?f:p>=o+l?l:p-o));p+=u)k=h-m,A=u-m,x.push(S(B(m+k%A,0))),h=_(k/A);x.push(S(B(h,0))),o=T(r,w,n==i),r=0,++n}++r,++t}return x.join("")}a={version:"1.4.1",ucs2:{decode:C,encode:I},decode:R,encode:P,toASCII:function(e){return x(e,function(e){return y.test(e)?"xn--"+P(e):e})},toUnicode:function(e){return x(e,function(e){return m.test(e)?R(e.slice(4).toLowerCase()):e})}},void 0===(i=function(){return a}.call(t,r,t,e))||(e.exports=i)}()}).call(this,r(39)(e),r(12))},function(e,t,r){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,r){"use strict";t.decode=t.parse=r(1108),t.encode=t.stringify=r(1109)},function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,r,o){t=t||"&",r=r||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var c=1e3;o&&"number"==typeof o.maxKeys&&(c=o.maxKeys);var u=e.length;c>0&&u>c&&(u=c);for(var f=0;f=0?(l=g.substr(0,b),h=g.substr(b+1)):(l=g,h=""),p=decodeURIComponent(l),d=decodeURIComponent(h),n(s,p)?i(s[p])?s[p].push(d):s[p]=[s[p],d]:s[p]=d}return s};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,r){"use strict";var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,a){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?o(s(e),function(s){var a=encodeURIComponent(n(s))+r;return i(e[s])?o(e[s],function(e){return a+encodeURIComponent(n(e))}).join(t):a+encodeURIComponent(n(e[s]))}).join(t):a?encodeURIComponent(n(a))+r+encodeURIComponent(n(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n[t,e[t]]))}_pushRawMap(e,t){t=t.map(function(e){return e[0]=S.encode(e[0]),e}).sort(o.keySorter);for(var r=0;r{if(e)return r(e);n.push(t),u(f,n,r)})}},function(e,t,r){"use strict";(function(t){const n=r(342),i=n.cloneLinks,o=n.cloneData,s=r(340),a=r(16);e.exports=function(e,r,n){const c=o(e);let u=i(e);if("string"==typeof r)u=u.filter(e=>e.name!==r);else{if(!t.isBuffer(r)&&!a.isCID(r))return n(new Error("second arg needs to be a name or CID"),null);u=u.filter(e=>!e.cid.equals(r))}s(c,u,n)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(16),i=r(63);e.exports={resolver:{multicodec:"raw",defaultHashAlg:"sha2-256",resolve:(e,t,r)=>{r(null,{value:e,remainderPath:""})},tree:(e,t,r)=>{"function"==typeof t&&(r=t),r(null,[])}},util:{deserialize:(e,t)=>{t(null,e)},serialize:(e,t)=>{t(null,e)},cid:(e,t,r)=>{"function"==typeof t&&(r=t,t={});const o=(t=t||{}).hashAlg||"sha2-256",s=void 0===t.version?1:t.version;i(e,o,(e,t)=>{if(e)return r(e);r(null,new n(s,"raw",t))})}}}},function(e,t,r){"use strict";const n=r(781),i=r(1122),o=r(1124);(t=e.exports).aes=i,t.hmac=n,t.keys=o,t.randomBytes=r(786),t.pbkdf2=r(1135)},function(e,t,r){"use strict";e.exports={SHA1:20,SHA256:32,SHA512:64}},function(e,t,r){"use strict";const n=r(1123),i={16:"aes-128-ctr",32:"aes-256-ctr"};t.create=function(e,t,r){const o=i[e.length];if(!o)return r(new Error("Invalid key length"));const s=n.createCipheriv(o,e,t),a=n.createDecipheriv(o,e,t);r(null,{encrypt(e,t){t(null,s.update(e))},decrypt(e,t){t(null,a.update(e))}})}},function(e,t,r){"use strict";const n=r(78);e.exports={createCipheriv:n.createCipheriv,createDecipheriv:n.createDecipheriv}},function(e,t,r){"use strict";(function(n){const i=r(19)(r(634)),o=r(25);t=e.exports;const s={rsa:r(1125),ed25519:r(1130),secp256k1:r(84)(i,r(786))};function a(e){return void 0!==s[e.toLowerCase()]}t.supportedKeys=s,t.keysPBM=i,t.keyStretcher=r(1132),t.generateEphemeralKeyPair=r(1133),t.generateKeyPair=((e,t,r)=>{let n=s[e.toLowerCase()];if(!n)return r(new Error("invalid or unsupported key type"));n.generateKeyPair(t,r)}),t.generateKeyPairFromSeed=((e,t,r,n)=>{let i=s[e.toLowerCase()];return i?"ed25519"!==e.toLowerCase()?n(new Error("Seed key derivation is unimplemented for RSA or secp256k1")):void i.generateKeyPairFromSeed(t,r,n):n(new Error("invalid or unsupported key type"))}),t.unmarshalPublicKey=(e=>{const t=i.PublicKey.decode(e),r=t.Data;switch(t.Type){case i.KeyType.RSA:return s.rsa.unmarshalRsaPublicKey(r);case i.KeyType.Ed25519:return s.ed25519.unmarshalEd25519PublicKey(r);case i.KeyType.Secp256k1:if(s.secp256k1)return s.secp256k1.unmarshalSecp256k1PublicKey(r);throw new Error("secp256k1 support requires libp2p-crypto-secp256k1 package");default:throw new Error("invalid or unsupported key type")}}),t.marshalPublicKey=((e,t)=>{if(!a(t=(t||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type");return e.bytes}),t.unmarshalPrivateKey=((e,t)=>{let r;try{r=i.PrivateKey.decode(e)}catch(e){return t(e)}const n=r.Data;switch(r.Type){case i.KeyType.RSA:return s.rsa.unmarshalRsaPrivateKey(n,t);case i.KeyType.Ed25519:return s.ed25519.unmarshalEd25519PrivateKey(n,t);case i.KeyType.Secp256k1:return s.secp256k1?s.secp256k1.unmarshalSecp256k1PrivateKey(n,t):t(new Error("secp256k1 support requires libp2p-crypto-secp256k1 package"));default:t(new Error("invalid or unsupported key type"))}}),t.marshalPrivateKey=((e,t)=>{if(!a(t=(t||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type");return e.bytes}),t.import=((e,t,r)=>{try{const i=o.pki.decryptRsaPrivateKey(e,t);if(null===i)throw new Error("Cannot read the key, most likely the password is wrong or not a RSA key");let a=o.asn1.toDer(o.pki.privateKeyToAsn1(i));return a=n.from(a.getBytes(),"binary"),s.rsa.unmarshalRsaPrivateKey(a,r)}catch(e){r(e)}})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(782),i=r(19),o=r(9),s=r(784),a=i(r(634)),c=r(25),u=r(7);class f{constructor(e){this._key=e}verify(e,t,r){h(r),s.hashAndVerify(this._key,t,e,r)}marshal(){return s.utils.jwkToPkix(this._key)}get bytes(){return a.PublicKey.encode({Type:a.KeyType.RSA,Data:this.marshal()})}encrypt(e){return this._key.encrypt(e,"RSAES-PKCS1-V1_5")}equals(e){return this.bytes.equals(e.bytes)}hash(e){h(e),n(this.bytes,"sha2-256",e)}}class l{constructor(e,t){this._key=e,this._publicKey=t}genSecret(){return s.getRandomValues(new Uint8Array(16))}sign(e,t){h(t),s.hashAndSign(this._key,e,t)}get public(){if(!this._publicKey)throw new Error("public key not provided");return new f(this._publicKey)}decrypt(e,t){s.decrypt(this._key,e,t)}marshal(){return s.utils.jwkToPkcs1(this._key)}get bytes(){return a.PrivateKey.encode({Type:a.KeyType.RSA,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){h(e),n(this.bytes,"sha2-256",e)}id(e){this.public.hash((t,r)=>{if(t)return e(t);e(null,o.encode(r))})}export(e,t,r){"function"==typeof t&&(r=t,t=e,e="pkcs-8"),h(r),u(()=>{let n=null,i=null;try{const r=new c.util.ByteBuffer(this.marshal()),o=c.asn1.fromDer(r),s=c.pki.privateKeyFromAsn1(o);if("pkcs-8"===e){const e={algorithm:"aes256",count:1e4,saltSize:16,prfAlgorithm:"sha512"};i=c.pki.encryptRsaPrivateKey(s,t,e)}else n=new Error(`Unknown export format '${e}'`)}catch(e){n=e}r(n,i)})}}function h(e){if("function"!=typeof e)throw new Error("callback is required")}e.exports={RsaPublicKey:f,RsaPrivateKey:l,unmarshalRsaPublicKey:function(e){const t=s.utils.pkixToJwk(e);return new f(t)},unmarshalRsaPrivateKey:function(e,t){const r=s.utils.pkcs1ToJwk(e);s.unmarshalPrivateKey(r,(e,r)=>{if(e)return t(e);t(null,new l(r.privateKey,r.publicKey))})},generateKeyPair:function(e,t){s.generateKey(e,(e,r)=>{if(e)return t(e);t(null,new l(r.privateKey,r.publicKey))})},fromJwk:function(e,t){s.unmarshalPrivateKey(e,(e,r)=>{if(e)return t(e);t(null,new l(r.privateKey,r.publicKey))})}}},function(e,t,r){"use strict";(function(t){const n=r(55),i=r(56),o=r(783),s=r(1127),a=o.toCallback,c=o.toBuf,u=o.fromString,f=o.fromNumberTo32BitBuf;e.exports={sha1:s.sha1,sha2256:s.sha2256,sha2512:s.sha2512,sha3512:a(c(n.sha3_512)),sha3384:a(c(n.sha3_384)),sha3256:a(c(n.sha3_256)),sha3224:a(c(n.sha3_224)),shake128:a(c(n.shake_128,256)),shake256:a(c(n.shake_256,512)),keccak224:a(c(n.keccak_224)),keccak256:a(c(n.keccak_256)),keccak384:a(c(n.keccak_384)),keccak512:a(c(n.keccak_512)),murmur3128:a(c(u(i.x64.hash128))),murmur332:a(f(u(i.x86.hash32))),addBlake:r(1128),dblSha2256:(e,r)=>{s.sha2256(e,(e,n)=>{e&&r(e),s.sha2256(t.from(n),r)})}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(57),i=function(){if(self.crypto)return self.crypto.subtle||self.crypto.webkitSubtle;if(self.msCrypto)return self.msCrypto.subtle}();function o(e){if(!i)throw new Error("Please use a browser with webcrypto support");return(r,o)=>{const s=i.digest({name:e},r);if("function"!=typeof s.then)return s.onerror=(()=>{o(new Error(`hashing data using ${e}`))}),void(s.oncomplete=(e=>{o(null,e.target.result)}));n(s.then(e=>t.from(new Uint8Array(e))),o)}}e.exports={sha1:function(e,t){o("SHA-1")(e,t)},sha2256:function(e,t){o("SHA-256")(e,t)},sha2512:function(e,t){o("SHA-512")(e,t)}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(58),i=r(783).toCallback,o={init:n.blake2bInit,update:n.blake2bUpdate,digest:n.blake2bFinal},s={init:n.blake2sInit,update:n.blake2sUpdate,digest:n.blake2sFinal},a=(e,r)=>i(n=>{const i=r.init(e,null);return r.update(i,n),t.from(r.digest(i))});e.exports=(e=>{for(let t=0;t<64;t++)e[45569+t]=a(t+1,o);for(let t=0;t<32;t++)e[45633+t]=a(t+1,s)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(21),i=r(785),o=i.toBase64,s=i.toBn,a=n.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}),c=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid({"1.2.840.113549.1.1.1":"rsa"}),this.key("none").optional().null_(),this.key("curve").optional().objid(),this.key("params").optional().seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()))}),u=n.define("RSAPublicKey",function(){this.seq().obj(this.key("algorithm").use(c),this.key("subjectPublicKey").bitstr())}),f=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});t.pkcs1ToJwk=function(e){const t=a.decode(e,"der");return{kty:"RSA",n:o(t.modulus),e:o(t.publicExponent),d:o(t.privateExponent),p:o(t.prime1),q:o(t.prime2),dp:o(t.exponent1),dq:o(t.exponent2),qi:o(t.coefficient),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkcs1=function(e){return a.encode({version:0,modulus:s(e.n),publicExponent:s(e.e),privateExponent:s(e.d),prime1:s(e.p),prime2:s(e.q),exponent1:s(e.dp),exponent2:s(e.dq),coefficient:s(e.qi)},"der")},t.pkixToJwk=function(e){const t=u.decode(e,"der"),r=f.decode(t.subjectPublicKey.data,"der");return{kty:"RSA",n:o(r.modulus),e:o(r.publicExponent),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkix=function(e){return u.encode({algorithm:{algorithm:"rsa",none:null},subjectPublicKey:{data:f.encode({modulus:s(e.n),publicExponent:s(e.e)},"der")}},"der")}},function(e,t,r){"use strict";(function(t){const n=r(782),i=r(19),o=r(9),s=r(1131),a=i(r(634));class c{constructor(e){this._key=l(e,s.publicKeyLength)}verify(e,t,r){f(r),s.hashAndVerify(this._key,t,e,r)}marshal(){return t.from(this._key)}get bytes(){return a.PublicKey.encode({Type:a.KeyType.Ed25519,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){f(e),n(this.bytes,"sha2-256",e)}}class u{constructor(e,t){this._key=l(e,s.privateKeyLength),this._publicKey=l(t,s.publicKeyLength)}sign(e,t){f(t),s.hashAndSign(this._key,e,t)}get public(){if(!this._publicKey)throw new Error("public key not provided");return new c(this._publicKey)}marshal(){return t.concat([t.from(this._key),t.from(this._publicKey)])}get bytes(){return a.PrivateKey.encode({Type:a.KeyType.Ed25519,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){f(e),n(this.bytes,"sha2-256",e)}id(e){this.public.hash((t,r)=>{if(t)return e(t);e(null,o.encode(r))})}}function f(e){if("function"!=typeof e)throw new Error("callback is required")}function l(e,r){if(t.isBuffer(e)&&(e=new Uint8Array(e)),!(e instanceof Uint8Array)||e.length!==r)throw new Error("Key must be a Uint8Array or Buffer of length "+r);return e}e.exports={Ed25519PublicKey:c,Ed25519PrivateKey:u,unmarshalEd25519PrivateKey:function(e,t){try{e=l(e,s.privateKeyLength+s.publicKeyLength)}catch(e){return t(e)}const r=e.slice(0,s.privateKeyLength),n=e.slice(s.privateKeyLength,e.length);t(null,new u(r,n))},unmarshalEd25519PublicKey:function(e){return e=l(e,s.publicKeyLength),new c(e)},generateKeyPair:function(e,t){void 0===t&&"function"==typeof e&&(t=e),s.generateKey((e,r)=>{if(e)return t(e);let n;try{n=new u(r.secretKey,r.publicKey)}catch(e){return void t(e)}t(null,n)})},generateKeyPairFromSeed:function(e,t,r){void 0===r&&"function"==typeof t&&(r=t),s.generateKeyFromSeed(e,(e,t)=>{if(e)return r(e);let n;try{n=new u(t.secretKey,t.publicKey)}catch(e){return void r(e)}r(null,n)})}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(83),i=r(7);t.publicKeyLength=n.sign.publicKeyLength,t.privateKeyLength=n.sign.secretKeyLength,t.generateKey=function(e){i(()=>{let t;try{t=n.sign.keyPair()}catch(t){return e(t)}e(null,t)})},t.generateKeyFromSeed=function(e,t){i(()=>{let r;try{r=n.sign.keyPair.fromSeed(e)}catch(e){return t(e)}t(null,r)})},t.hashAndSign=function(t,r,o){i(()=>{o(null,e.from(n.sign.detached(r,t)))})},t.hashAndVerify=function(e,t,r,o){i(()=>{let i;try{i=n.sign.detached.verify(r,t,e)}catch(e){return o(e)}o(null,i)})}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(64),i=r(781),o={"AES-128":{ivSize:16,keySize:16},"AES-256":{ivSize:16,keySize:32},Blowfish:{ivSize:8,cipherKeySize:32}};e.exports=((e,r,s,a)=>{const c=o[e];if(!c)return a(new Error("unkown cipherType passed"));if(!r)return a(new Error("unkown hashType passed"));const u=c.keySize,f=c.ivSize,l=t.from("key expansion"),h=2*(f+u+20);i.create(r,s,(e,r)=>{if(e)return a(e);r.digest(l,(e,i)=>{if(e)return a(e);let o=[],s=0;n(()=>s{if(t)return e(t);let a=n.length;s+a>h&&(a=h-s),o.push(n),s+=a,r.digest(i,(t,r)=>{if(t)return e(t);i=r,e()})})},function(e){if(e)return a(e);const r=h/2,n=t.concat(o),i=n.slice(0,r),s=n.slice(r,h),c=e=>({iv:e.slice(0,f),cipherKey:e.slice(f,f+u),macKey:e.slice(f+u)});a(null,{k1:c(i),k2:c(s)})})})})})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(1134);e.exports=((e,t)=>{n.generateEphmeralKeyPair(e,t)})},function(e,t,r){"use strict";(function(e){const n=r(633)(),i=r(632),o=r(21).bignum,s=r(785),a=s.toBase64,c=s.toBn,u={"P-256":256,"P-384":384,"P-521":521};t.generateEphmeralKeyPair=function(t,r){i(n.subtle.generateKey({name:"ECDH",namedCurve:t},!0,["deriveBits"]).then(r=>{const s=(s,c,f)=>{let l;"function"==typeof c&&(f=c,c=void 0),l=c?n.subtle.importKey("jwk",function(e,t){const r=h(e,t.public);return r.d=a(new o(t.private)),r}(t,c),{name:"ECDH",namedCurve:t},!1,["deriveBits"]):Promise.resolve(r.privateKey);const p=Promise.all([n.subtle.importKey("jwk",h(t,s),{name:"ECDH",namedCurve:t},!1,[]),l]);i(p.then(e=>n.subtle.deriveBits({name:"ECDH",namedCurve:t,public:e[0]},e[1],u[t])).then(t=>e.from(t)),f)};return n.subtle.exportKey("jwk",r.publicKey).then(e=>({key:l(e),genSharedKey:s}))}),r)};const f={"P-256":32,"P-384":48,"P-521":66};function l(t){const r=f[t.crv];return e.concat([e.from([4]),c(t.x).toArrayLike(e,"be",r),c(t.y).toArrayLike(e,"be",r)],1+2*r)}function h(t,r){const n=f[t];if(!r.slice(0,1).equals(e.from([4])))throw new Error("Invalid key format");const i=new o(r.slice(1,n+1)),s=new o(r.slice(1+n));return{kty:"EC",crv:t,x:a(i,n),y:a(s,n),ext:!0}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(25),i={sha1:"sha1","sha2-256":"sha256","sha2-512":"sha512"};e.exports=function(e,t,r,o,s){const a=i[s];if(!a)throw new Error(`Hash '${s}' is unknown or not supported`);const c=n.pkcs5.pbkdf2(e,t,r,o,a);return n.util.encode64(c)}},function(e,t,r){"use strict";(function(t){const n=r(15),i=r(31),o=r(1137),s=r(635),a=r(5),c=r(9),u=r(26),f=new Error("Sorry, Not Implemented Yet."),l=u.proto(function(e){if(!(this instanceof l))return new l(e);if(null==e&&(e=""),e instanceof t)this.buffer=o.fromBuffer(e);else if("string"==typeof e||e instanceof String){if(e.length>0&&"/"!==e.charAt(0))throw new Error(`multiaddr "${e}" must start with a "/"`);this.buffer=o.fromString(e)}else{if(!(e.buffer&&e.protos&&e.protoCodes))throw new Error("addr must be a string, Buffer, or another Multiaddr");this.buffer=o.fromBuffer(e.buffer)}},{className:"Multiaddr",symbolName:"@multiformats/js-multiaddr/multiaddr"});l.prototype.toString=function(){return o.bufferToString(this.buffer)},l.prototype.toOptions=function(){const e={},t=this.toString().split("/");return e.family="ip4"===t[1]?"ipv4":"ipv6",e.host=t[2],e.transport=t[3],e.port=t[4],e},l.prototype.inspect=function(){return""},l.prototype.protos=function(){return n(this.protoCodes(),function(e){return i(s(e))})},l.prototype.protoCodes=function(){const e=[],t=this.buffer;let r=0;for(;r{if(e[0]===s.names.ipfs.code)return!0})[0][1],c.decode(e)}catch(t){e=null}return e},l.prototype.equals=function(e){return this.buffer.equals(e.buffer)},l.prototype.nodeAddress=function(){const e=this.protoCodes(),t=this.protoNames(),r=this.toString().split("/").slice(1);if(r.length<4)throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6}/{address}/{tcp, udp}/{port}".');if(4!==e[0]&&41!==e[0]&&54!==e[0]&&55!==e[0])throw new Error(`no protocol with name: "'${t[0]}'". Must have a valid family name: "{ip4, ip6, dns4, dns6}".`);if("tcp"!==r[2]&&"udp"!==r[2])throw new Error(`no protocol with name: "'${t[1]}'". Must have a valid transport protocol: "{tcp, udp}".`);return{family:41===e[0]||55===e[0]?6:4,address:r[1],port:r[3]}},l.fromNodeAddress=function(e,t){if(!e)throw new Error("requires node address object");if(!t)throw new Error("requires transport protocol");const r="IPv6"===e.family?"ip6":"ip4";return l("/"+[r,e.address,t,e.port].join("/"))},l.prototype.isThinWaistAddress=function(e){const t=(e||this).protos();return 2===t.length&&((4===t[0].code||41===t[0].code)&&(6===t[1].code||17===t[1].code))},l.prototype.fromStupidString=function(e){throw f},l.protocols=s,l.isName=function(e){return!!l.isMultiaddr(e)&&e.protos().some(e=>e.resolvable)},l.resolve=function(e,t){return l.isMultiaddr(e)&&l.isName(e)?t(new Error("not implemented yet")):t(new Error("not a valid name"))},e.exports=l}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(15),i=r(44),o=r(1138),s=r(635),a=r(5);function c(e){const t=[],r=e.split("/").slice(1);if(1===r.length&&""===r[0])return[];for(let n=0;n=r.length)throw v("invalid address: "+e);t.push([i,r[n]])}else t.push([i])}return t}function u(e){const t=[];return n(e,function(e){const r=w(e);t.push(r.name),e.length>1&&t.push(e[1])}),"/"+t.join("/")}function f(e){return n(e,function(e){Array.isArray(e)||(e=[e]);const t=w(e);return e.length>1?[t.code,o.toBuffer(t.code,e[1])]:[t.code]})}function l(e){return n(e,function(e){const t=w(e);return e.length>1?[t.code,o.toString(t.code,e[1])]:[t.code]})}function h(e){return b(t.concat(n(e,function(e){const r=w(e);let n=t.from(a.encode(r.code));return e.length>1&&(n=t.concat([n,e[1]])),n})))}function p(e,t){if(e.size>0)return e.size/8;if(0===e.size)return 0;return a.decode(t)+a.decode.bytes}function d(e){const t=[];let r=0;for(;re.length)throw v("Invalid address buffer: "+e.toString("hex"));t.push([n,c])}return t}function g(e){return h(f(c(e=y(e))))}function b(e){const r=m(e);if(r)throw r;return t.from(e)}function m(e){try{d(e)}catch(e){return e}}function y(e){return"/"+i(e.trim().split("/")).join("/")}function v(e){return new Error("Error parsing address: "+e)}function w(e){return s(e[0])}e.exports={stringToStringTuples:c,stringTuplesToString:u,tuplesToStringTuples:l,stringTuplesToTuples:f,bufferToTuples:d,tuplesToBuffer:h,bufferToString:function(e){return u(l(d(e)))},stringToBuffer:g,fromString:function(e){return g(e)},fromBuffer:b,validateBuffer:m,isValidBuffer:function(e){return void 0===m(e)},cleanPath:y,ParseError:v,protoFromTuple:w,sizeForAddr:p}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(45),i=r(46),o=r(635),s=r(9),a=r(5);function c(e,r){return r instanceof t?c.toString(e,r):c.toBuffer(e,r)}function u(e){if(!e.isValid())throw new Error("invalid ip address");return n.toBuffer(e.address)}e.exports=c,c.toString=function(e,t){switch((e=o(e)).code){case 4:case 41:return n.toString(t);case 6:case 17:case 33:case 132:return function(e){return e.readUInt16BE(0)}(t);case 54:case 55:case 56:return function(e){const t=a.decode(e);if((e=e.slice(a.decode.bytes)).length!==t)throw new Error("inconsistent lengths");return e.toString()}(t);case 421:return function(e){const t=a.decode(e),r=e.slice(a.decode.bytes);if(r.length!==t)throw new Error("inconsistent lengths");return s.encode(r)}(t);default:return t.toString("hex")}},c.toBuffer=function(e,r){switch((e=o(e)).code){case 4:return u(new i.Address4(r));case 41:return u(new i.Address6(r));case 6:case 17:case 33:case 132:return function(e){const r=t.alloc(2);return r.writeUInt16BE(e,0),r}(parseInt(r,10));case 54:case 55:case 56:return function(e){const r=t.from(e),n=t.from(a.encode(r.length));return t.concat([n,r])}(r);case 421:return function(e){const r=t.from(s.decode(e)),n=t.from(a.encode(r.length));return t.concat([n,r])}(r);default:return t.from(r,"hex")}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(787).ensureMultiaddr,i=r(112);e.exports=class{constructor(e){this._multiaddrs=e||[],this._observedMultiaddrs=[]}add(e){e=n(e),this.has(e)||this._multiaddrs.push(e)}addSafe(e){e=n(e),this._observedMultiaddrs.some((t,r)=>{if(t.equals(e))return this.add(e),this._observedMultiaddrs.splice(r,1),!0})||this._observedMultiaddrs.push(e)}toArray(){return this._multiaddrs.slice()}get size(){return this._multiaddrs.length}forEach(e){return this._multiaddrs.forEach(e)}filterBy(e){return"object"!=typeof e||"function"!=typeof e.matches||"function"!=typeof e.partialMatch||"function"!=typeof e.toString?[]:this._multiaddrs.filter(t=>e.matches(t))}has(e){return e=n(e),this._multiaddrs.some(t=>t.equals(e))}delete(e){e=n(e),this._multiaddrs.some((t,r)=>{if(t.equals(e))return this._multiaddrs.splice(r,1),!0})}replace(e,t){Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]),e.forEach(e=>this.delete(e)),t.forEach(e=>this.add(e))}clear(){this._multiaddrs=[]}distinct(){return i(this._multiaddrs,e=>[e.toOptions().port,e.toOptions().transport].join())}}},function(e,t,r){"use strict";e.exports={SHA1:20,SHA256:32,SHA512:64}},function(e,t,r){"use strict";const n=r(1142),i={16:"aes-128-ctr",32:"aes-256-ctr"};t.create=function(e,t,r){const o=i[e.length];if(!o)return r(new Error("Invalid key length"));const s=n.createCipheriv(o,e,t),a=n.createDecipheriv(o,e,t);r(null,{encrypt(e,t){t(null,s.update(e))},decrypt(e,t){t(null,a.update(e))}})}},function(e,t,r){"use strict";const n=r(78);e.exports={createCipheriv:n.createCipheriv,createDecipheriv:n.createDecipheriv}},function(e,t,r){"use strict";(function(n){const i=r(19)(r(638)),o=r(25);t=e.exports;const s={rsa:r(1144),ed25519:r(1146),secp256k1:r(84)(i,r(791))};function a(e){return void 0!==s[e.toLowerCase()]}t.supportedKeys=s,t.keysPBM=i,t.keyStretcher=r(1148),t.generateEphemeralKeyPair=r(1149),t.generateKeyPair=((e,t,r)=>{let n=s[e.toLowerCase()];if(!n)return r(new Error("invalid or unsupported key type"));n.generateKeyPair(t,r)}),t.generateKeyPairFromSeed=((e,t,r,n)=>{let i=s[e.toLowerCase()];return i?"ed25519"!==e.toLowerCase()?n(new Error("Seed key derivation is unimplemented for RSA or secp256k1")):void i.generateKeyPairFromSeed(t,r,n):n(new Error("invalid or unsupported key type"))}),t.unmarshalPublicKey=(e=>{const t=i.PublicKey.decode(e),r=t.Data;switch(t.Type){case i.KeyType.RSA:return s.rsa.unmarshalRsaPublicKey(r);case i.KeyType.Ed25519:return s.ed25519.unmarshalEd25519PublicKey(r);case i.KeyType.Secp256k1:if(s.secp256k1)return s.secp256k1.unmarshalSecp256k1PublicKey(r);throw new Error("secp256k1 support requires libp2p-crypto-secp256k1 package");default:throw new Error("invalid or unsupported key type")}}),t.marshalPublicKey=((e,t)=>{if(!a(t=(t||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type");return e.bytes}),t.unmarshalPrivateKey=((e,t)=>{let r;try{r=i.PrivateKey.decode(e)}catch(e){return t(e)}const n=r.Data;switch(r.Type){case i.KeyType.RSA:return s.rsa.unmarshalRsaPrivateKey(n,t);case i.KeyType.Ed25519:return s.ed25519.unmarshalEd25519PrivateKey(n,t);case i.KeyType.Secp256k1:return s.secp256k1?s.secp256k1.unmarshalSecp256k1PrivateKey(n,t):t(new Error("secp256k1 support requires libp2p-crypto-secp256k1 package"));default:t(new Error("invalid or unsupported key type"))}}),t.marshalPrivateKey=((e,t)=>{if(!a(t=(t||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type");return e.bytes}),t.import=((e,t,r)=>{try{const i=o.pki.decryptRsaPrivateKey(e,t);if(null===i)throw new Error("Cannot read the key, most likely the password is wrong or not a RSA key");let a=o.asn1.toDer(o.pki.privateKeyToAsn1(i));return a=n.from(a.getBytes(),"binary"),s.rsa.unmarshalRsaPrivateKey(a,r)}catch(e){r(e)}})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(63),i=r(19),o=r(9),s=r(789),a=i(r(638)),c=r(25),u=r(7);class f{constructor(e){this._key=e}verify(e,t,r){h(r),s.hashAndVerify(this._key,t,e,r)}marshal(){return s.utils.jwkToPkix(this._key)}get bytes(){return a.PublicKey.encode({Type:a.KeyType.RSA,Data:this.marshal()})}encrypt(e){return this._key.encrypt(e,"RSAES-PKCS1-V1_5")}equals(e){return this.bytes.equals(e.bytes)}hash(e){h(e),n(this.bytes,"sha2-256",e)}}class l{constructor(e,t){this._key=e,this._publicKey=t}genSecret(){return s.getRandomValues(new Uint8Array(16))}sign(e,t){h(t),s.hashAndSign(this._key,e,t)}get public(){if(!this._publicKey)throw new Error("public key not provided");return new f(this._publicKey)}decrypt(e,t){s.decrypt(this._key,e,t)}marshal(){return s.utils.jwkToPkcs1(this._key)}get bytes(){return a.PrivateKey.encode({Type:a.KeyType.RSA,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){h(e),n(this.bytes,"sha2-256",e)}id(e){this.public.hash((t,r)=>{if(t)return e(t);e(null,o.encode(r))})}export(e,t,r){"function"==typeof t&&(r=t,t=e,e="pkcs-8"),h(r),u(()=>{let n=null,i=null;try{const r=new c.util.ByteBuffer(this.marshal()),o=c.asn1.fromDer(r),s=c.pki.privateKeyFromAsn1(o);if("pkcs-8"===e){const e={algorithm:"aes256",count:1e4,saltSize:16,prfAlgorithm:"sha512"};i=c.pki.encryptRsaPrivateKey(s,t,e)}else n=new Error(`Unknown export format '${e}'`)}catch(e){n=e}r(n,i)})}}function h(e){if("function"!=typeof e)throw new Error("callback is required")}e.exports={RsaPublicKey:f,RsaPrivateKey:l,unmarshalRsaPublicKey:function(e){const t=s.utils.pkixToJwk(e);return new f(t)},unmarshalRsaPrivateKey:function(e,t){const r=s.utils.pkcs1ToJwk(e);s.unmarshalPrivateKey(r,(e,r)=>{if(e)return t(e);t(null,new l(r.privateKey,r.publicKey))})},generateKeyPair:function(e,t){s.generateKey(e,(e,r)=>{if(e)return t(e);t(null,new l(r.privateKey,r.publicKey))})},fromJwk:function(e,t){s.unmarshalPrivateKey(e,(e,r)=>{if(e)return t(e);t(null,new l(r.privateKey,r.publicKey))})}}},function(e,t,r){"use strict";const n=r(21),i=r(790),o=i.toBase64,s=i.toBn,a=n.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}),c=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid({"1.2.840.113549.1.1.1":"rsa"}),this.key("none").optional().null_(),this.key("curve").optional().objid(),this.key("params").optional().seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()))}),u=n.define("RSAPublicKey",function(){this.seq().obj(this.key("algorithm").use(c),this.key("subjectPublicKey").bitstr())}),f=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});t.pkcs1ToJwk=function(e){const t=a.decode(e,"der");return{kty:"RSA",n:o(t.modulus),e:o(t.publicExponent),d:o(t.privateExponent),p:o(t.prime1),q:o(t.prime2),dp:o(t.exponent1),dq:o(t.exponent2),qi:o(t.coefficient),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkcs1=function(e){return a.encode({version:0,modulus:s(e.n),publicExponent:s(e.e),privateExponent:s(e.d),prime1:s(e.p),prime2:s(e.q),exponent1:s(e.dp),exponent2:s(e.dq),coefficient:s(e.qi)},"der")},t.pkixToJwk=function(e){const t=u.decode(e,"der"),r=f.decode(t.subjectPublicKey.data,"der");return{kty:"RSA",n:o(r.modulus),e:o(r.publicExponent),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkix=function(e){return u.encode({algorithm:{algorithm:"rsa",none:null},subjectPublicKey:{data:f.encode({modulus:s(e.n),publicExponent:s(e.e)},"der")}},"der")}},function(e,t,r){"use strict";(function(t){const n=r(63),i=r(19),o=r(9),s=r(1147),a=i(r(638));class c{constructor(e){this._key=l(e,s.publicKeyLength)}verify(e,t,r){f(r),s.hashAndVerify(this._key,t,e,r)}marshal(){return t.from(this._key)}get bytes(){return a.PublicKey.encode({Type:a.KeyType.Ed25519,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){f(e),n(this.bytes,"sha2-256",e)}}class u{constructor(e,t){this._key=l(e,s.privateKeyLength),this._publicKey=l(t,s.publicKeyLength)}sign(e,t){f(t),s.hashAndSign(this._key,e,t)}get public(){if(!this._publicKey)throw new Error("public key not provided");return new c(this._publicKey)}marshal(){return t.concat([t.from(this._key),t.from(this._publicKey)])}get bytes(){return a.PrivateKey.encode({Type:a.KeyType.Ed25519,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){f(e),n(this.bytes,"sha2-256",e)}id(e){this.public.hash((t,r)=>{if(t)return e(t);e(null,o.encode(r))})}}function f(e){if("function"!=typeof e)throw new Error("callback is required")}function l(e,r){if(t.isBuffer(e)&&(e=new Uint8Array(e)),!(e instanceof Uint8Array)||e.length!==r)throw new Error("Key must be a Uint8Array or Buffer of length "+r);return e}e.exports={Ed25519PublicKey:c,Ed25519PrivateKey:u,unmarshalEd25519PrivateKey:function(e,t){try{e=l(e,s.privateKeyLength+s.publicKeyLength)}catch(e){return t(e)}const r=e.slice(0,s.privateKeyLength),n=e.slice(s.privateKeyLength,e.length);t(null,new u(r,n))},unmarshalEd25519PublicKey:function(e){return e=l(e,s.publicKeyLength),new c(e)},generateKeyPair:function(e,t){void 0===t&&"function"==typeof e&&(t=e),s.generateKey((e,r)=>{if(e)return t(e);let n;try{n=new u(r.secretKey,r.publicKey)}catch(e){return void t(e)}t(null,n)})},generateKeyPairFromSeed:function(e,t,r){void 0===r&&"function"==typeof t&&(r=t),s.generateKeyFromSeed(e,(e,t)=>{if(e)return r(e);let n;try{n=new u(t.secretKey,t.publicKey)}catch(e){return void r(e)}r(null,n)})}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(83),i=r(7);t.publicKeyLength=n.sign.publicKeyLength,t.privateKeyLength=n.sign.secretKeyLength,t.generateKey=function(e){i(()=>{let t;try{t=n.sign.keyPair()}catch(t){return e(t)}e(null,t)})},t.generateKeyFromSeed=function(e,t){i(()=>{let r;try{r=n.sign.keyPair.fromSeed(e)}catch(e){return t(e)}t(null,r)})},t.hashAndSign=function(t,r,o){i(()=>{o(null,e.from(n.sign.detached(r,t)))})},t.hashAndVerify=function(e,t,r,o){i(()=>{let i;try{i=n.sign.detached.verify(r,t,e)}catch(e){return o(e)}o(null,i)})}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(64),i=r(788),o={"AES-128":{ivSize:16,keySize:16},"AES-256":{ivSize:16,keySize:32},Blowfish:{ivSize:8,cipherKeySize:32}};e.exports=((e,r,s,a)=>{const c=o[e];if(!c)return a(new Error("unkown cipherType passed"));if(!r)return a(new Error("unkown hashType passed"));const u=c.keySize,f=c.ivSize,l=t.from("key expansion"),h=2*(f+u+20);i.create(r,s,(e,r)=>{if(e)return a(e);r.digest(l,(e,i)=>{if(e)return a(e);let o=[],s=0;n(()=>s{if(t)return e(t);let a=n.length;s+a>h&&(a=h-s),o.push(n),s+=a,r.digest(i,(t,r)=>{if(t)return e(t);i=r,e()})})},function(e){if(e)return a(e);const r=h/2,n=t.concat(o),i=n.slice(0,r),s=n.slice(r,h),c=e=>({iv:e.slice(0,f),cipherKey:e.slice(f,f+u),macKey:e.slice(f+u)});a(null,{k1:c(i),k2:c(s)})})})})})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(1150);e.exports=((e,t)=>{n.generateEphmeralKeyPair(e,t)})},function(e,t,r){"use strict";(function(e){const n=r(637)(),i=r(636),o=r(21).bignum,s=r(790),a=s.toBase64,c=s.toBn,u={"P-256":256,"P-384":384,"P-521":521};t.generateEphmeralKeyPair=function(t,r){i(n.subtle.generateKey({name:"ECDH",namedCurve:t},!0,["deriveBits"]).then(r=>{const s=(s,c,f)=>{let l;"function"==typeof c&&(f=c,c=void 0),l=c?n.subtle.importKey("jwk",function(e,t){const r=h(e,t.public);return r.d=a(new o(t.private)),r}(t,c),{name:"ECDH",namedCurve:t},!1,["deriveBits"]):Promise.resolve(r.privateKey);const p=Promise.all([n.subtle.importKey("jwk",h(t,s),{name:"ECDH",namedCurve:t},!1,[]),l]);i(p.then(e=>n.subtle.deriveBits({name:"ECDH",namedCurve:t,public:e[0]},e[1],u[t])).then(t=>e.from(t)),f)};return n.subtle.exportKey("jwk",r.publicKey).then(e=>({key:l(e),genSharedKey:s}))}),r)};const f={"P-256":32,"P-384":48,"P-521":66};function l(t){const r=f[t.crv];return e.concat([e.from([4]),c(t.x).toArrayLike(e,"be",r),c(t.y).toArrayLike(e,"be",r)],1+2*r)}function h(t,r){const n=f[t];if(!r.slice(0,1).equals(e.from([4])))throw new Error("Invalid key format");const i=new o(r.slice(1,n+1)),s=new o(r.slice(1+n));return{kty:"EC",crv:t,x:a(i,n),y:a(s,n),ext:!0}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(25),i={sha1:"sha1","sha2-256":"sha256","sha2-512":"sha512"};e.exports=function(e,t,r,o,s){const a=i[s];if(!a)throw new Error(`Hash '${s}' is unknown or not supported`);const c=n.pkcs5.pbkdf2(e,t,r,o,a);return n.util.encode64(c)}},function(e,t,r){"use strict";(function(t){const n=r(15),i=r(44),o=r(1153),s=r(639),a=r(5);function c(e){const t=[],r=e.split("/").slice(1);if(1===r.length&&""===r[0])return[];for(let n=0;n=r.length)throw v("invalid address: "+e);t.push([i,r[n]])}else t.push([i])}return t}function u(e){const t=[];return n(e,function(e){const r=w(e);t.push(r.name),e.length>1&&t.push(e[1])}),"/"+t.join("/")}function f(e){return n(e,function(e){Array.isArray(e)||(e=[e]);const t=w(e);return e.length>1?[t.code,o.toBuffer(t.code,e[1])]:[t.code]})}function l(e){return n(e,function(e){const t=w(e);return e.length>1?[t.code,o.toString(t.code,e[1])]:[t.code]})}function h(e){return b(t.concat(n(e,function(e){const r=w(e);let n=t.from(a.encode(r.code));return e.length>1&&(n=t.concat([n,e[1]])),n})))}function p(e,t){if(e.size>0)return e.size/8;if(0===e.size)return 0;return a.decode(t)+a.decode.bytes}function d(e){const t=[];let r=0;for(;re.length)throw v("Invalid address buffer: "+e.toString("hex"));t.push([n,c])}return t}function g(e){return h(f(c(e=y(e))))}function b(e){const r=m(e);if(r)throw r;return t.from(e)}function m(e){try{d(e)}catch(e){return e}}function y(e){return"/"+i(e.trim().split("/")).join("/")}function v(e){return new Error("Error parsing address: "+e)}function w(e){return s(e[0])}e.exports={stringToStringTuples:c,stringTuplesToString:u,tuplesToStringTuples:l,stringTuplesToTuples:f,bufferToTuples:d,tuplesToBuffer:h,bufferToString:function(e){return u(l(d(e)))},stringToBuffer:g,fromString:function(e){return g(e)},fromBuffer:b,validateBuffer:m,isValidBuffer:function(e){return void 0===m(e)},cleanPath:y,ParseError:v,protoFromTuple:w,sizeForAddr:p}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(45),i=r(46),o=r(639),s=r(9),a=r(5);function c(e,r){return r instanceof t?c.toString(e,r):c.toBuffer(e,r)}function u(e){if(!e.isValid())throw new Error("invalid ip address");return n.toBuffer(e.address)}e.exports=c,c.toString=function(e,t){switch((e=o(e)).code){case 4:case 41:return n.toString(t);case 6:case 273:case 33:case 132:return function(e){return e.readUInt16BE(0)}(t);case 54:case 55:case 56:return function(e){const t=a.decode(e);if((e=e.slice(a.decode.bytes)).length!==t)throw new Error("inconsistent lengths");return e.toString()}(t);case 421:return function(e){const t=a.decode(e),r=e.slice(a.decode.bytes);if(r.length!==t)throw new Error("inconsistent lengths");return s.encode(r)}(t);default:return t.toString("hex")}},c.toBuffer=function(e,r){switch((e=o(e)).code){case 4:return u(new i.Address4(r));case 41:return u(new i.Address6(r));case 6:case 273:case 33:case 132:return function(e){const r=t.alloc(2);return r.writeUInt16BE(e,0),r}(parseInt(r,10));case 54:case 55:case 56:return function(e){const r=t.from(e),n=t.from(a.encode(r.length));return t.concat([n,r])}(r);case 421:return function(e){const r=t.from(s.decode(e)),n=t.from(a.encode(r.length));return t.concat([n,r])}(r);default:return t.from(r,"hex")}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(9),i=r(41),o=r(343);function s(e){let r;if("string"==typeof e)r=e;else if(t.isBuffer(e))r=n.encode(e).toString();else if(i.isPeerId(e))r=e.toB58String();else{if(!o.isPeerInfo(e))throw new Error("not valid PeerId or PeerInfo, or B58Str");r=e.id.toB58String()}return r}e.exports=class{constructor(){this._peers={}}has(e){const t=s(e);return Boolean(this._peers[t])}put(e,t){const r=this._peers[e.id.toB58String()];if(!r||t)return this._peers[e.id.toB58String()]=e,e;e.multiaddrs.forEach(e=>r.multiaddrs.add(e));const n=e.isConnected();return n&&r.connect(n),e.protocols.forEach(e=>r.protocols.add(e)),!r.id.privKey&&e.id.privKey&&(r.id.privKey=e.id.privKey),!r.id.pubKey&&e.id.pubKey&&(r.id.pubKey=e.id.pubKey),r}get(e){const t=s(e),r=this._peers[t];if(r)return r;throw new Error("PeerInfo not found")}getAll(){return this._peers}getAllArray(){return Object.keys(this._peers).map(e=>this._peers[e])}getMultiaddrs(e){return this.get(e).multiaddrs.toArray()}remove(e){const t=s(e);this._peers[t]&&delete this._peers[t]}}}).call(this,r(0).Buffer)},function(e,t,r){(function(e,n){var i; +var n,i;n=this,i=function(){var e="function"==typeof Object.defineProperty?function(e,t,r){return Object.defineProperty(e,t,r),e}:function(e,t,r){return e[t]=r.value,e};return function(t,r,n,i){var o;if(i=function(e,t){var r="object"==typeof t,n=!r&&"string"==typeof t,i=function(e){return r?!!t[e]:!!n&&t.indexOf(e[0])>-1};return{enumerable:i("enumerable"),configurable:i("configurable"),writable:i("writable"),value:e}}(n,i),"object"==typeof r){for(o in r)Object.hasOwnProperty.call(r,o)&&(i.value=r[o],e(t,o,i));return t}return e(t,r,i)}},e.exports?e.exports=i():n.prr=i()},function(e,t,r){"use strict";var n=r(568).AbstractLevelDOWN,i=r(568).AbstractChainedBatch,o=r(568).AbstractIterator,s=r(7),a=r(66),c=r(870),u=r(872).EncodingError;function l(e,t){if(!(this instanceof l))return new l(e,t);n.call(this,""),void 0===(t=t||{}).keyEncoding&&(t.keyEncoding="utf8"),void 0===t.valueEncoding&&(t.valueEncoding="utf8"),this.db=e,this.codec=new c(t)}function f(e,t){o.call(this,e),this.codec=e.codec,this.keys=t.keys,this.values=t.values,this.opts=this.codec.encodeLtgt(t),this.it=e.db.iterator(this.opts)}function p(e,t){i.call(this,e),this.codec=e.codec,this.batch=e.db.batch()}e.exports=l.default=l,s(l,n),l.prototype._serializeKey=l.prototype._serializeValue=function(e){return e},l.prototype._open=function(e,t){this.db.open(e,t)},l.prototype._close=function(e){this.db.close(e)},l.prototype._put=function(e,t,r,n){e=this.codec.encodeKey(e,r),t=this.codec.encodeValue(t,r),this.db.put(e,t,r,n)},l.prototype._get=function(e,t,r){var n=this;e=this.codec.encodeKey(e,t),t.asBuffer=this.codec.valueAsBuffer(t),this.db.get(e,t,function(e,i){if(e)return r(e);try{i=n.codec.decodeValue(i,t)}catch(e){return r(new u(e))}r(null,i)})},l.prototype._del=function(e,t,r){e=this.codec.encodeKey(e,t),this.db.del(e,t,r)},l.prototype._chainedBatch=function(){return new p(this)},l.prototype._batch=function(e,t,r){e=this.codec.encodeBatch(e,t),this.db.batch(e,t,r)},l.prototype._iterator=function(e){return e.keyAsBuffer=this.codec.keyAsBuffer(e),e.valueAsBuffer=this.codec.valueAsBuffer(e),new f(this,e)},l.prototype._setupIteratorOptions=function(e){return(e=a(e)).reverse=!!e.reverse,e.keys=!1!==e.keys,e.values=!1!==e.values,e.limit="limit"in e?e.limit:-1,e.keyAsBuffer=!1!==e.keyAsBuffer,e.valueAsBuffer=!1!==e.valueAsBuffer,e},l.prototype.approximateSize=function(e,t,r,n){return this.db.approximateSize(e,t,r,n)},s(f,o),f.prototype._next=function(e){var t=this;this.it.next(function(r,n,i){if(r)return e(r);try{n=t.keys&&void 0!==n?t.codec.decodeKey(n,t.opts):void 0,i=t.values&&void 0!==i?t.codec.decodeValue(i,t.opts):void 0}catch(r){return e(new u(r))}e(null,n,i)})},f.prototype._end=function(e){this.it.end(e)},s(p,i),p.prototype._put=function(e,t){e=this.codec.encodeKey(e),t=this.codec.encodeValue(t),this.batch.put(e,t)},p.prototype._del=function(e){e=this.codec.encodeKey(e),this.batch.del(e)},p.prototype._clear=function(){this.batch.clear()},p.prototype._write=function(e,t){this.batch.write(e,t)}},function(e,t,r){(function(t,n){var i=r(66),o=r(643),s=r(644),a=Object.prototype.hasOwnProperty,c="start end gt gte lt lte".split(" ");function u(e){if(!arguments.length||void 0===e)throw new Error("constructor requires at least a location argument");if("string"!=typeof e)throw new Error("constructor requires a location string argument");this.location=e,this.status="new"}function l(e){return-1!==c.indexOf(e)}u.prototype.open=function(e,t){var r=this,n=this.status;if("function"==typeof e&&(t=e),"function"!=typeof t)throw new Error("open() requires a callback argument");"object"!=typeof e&&(e={}),e.createIfMissing=!1!==e.createIfMissing,e.errorIfExists=!!e.errorIfExists,this.status="opening",this._open(e,function(e){if(e)return r.status=n,t(e);r.status="open",t()})},u.prototype._open=function(e,r){t.nextTick(r)},u.prototype.close=function(e){var t=this,r=this.status;if("function"!=typeof e)throw new Error("close() requires a callback argument");this.status="closing",this._close(function(n){if(n)return t.status=r,e(n);t.status="closed",e()})},u.prototype._close=function(e){t.nextTick(e)},u.prototype.get=function(e,r,n){if("function"==typeof r&&(n=r),"function"!=typeof n)throw new Error("get() requires a callback argument");var i=this._checkKey(e,"key");if(i)return t.nextTick(n,i);e=this._serializeKey(e),"object"!=typeof r&&(r={}),r.asBuffer=!1!==r.asBuffer,this._get(e,r,n)},u.prototype._get=function(e,r,n){t.nextTick(function(){n(new Error("NotFound"))})},u.prototype.put=function(e,r,n,i){if("function"==typeof n&&(i=n),"function"!=typeof i)throw new Error("put() requires a callback argument");var o=this._checkKey(e,"key");if(o)return t.nextTick(i,o);e=this._serializeKey(e),r=this._serializeValue(r),"object"!=typeof n&&(n={}),this._put(e,r,n,i)},u.prototype._put=function(e,r,n,i){t.nextTick(i)},u.prototype.del=function(e,r,n){if("function"==typeof r&&(n=r),"function"!=typeof n)throw new Error("del() requires a callback argument");var i=this._checkKey(e,"key");if(i)return t.nextTick(n,i);e=this._serializeKey(e),"object"!=typeof r&&(r={}),this._del(e,r,n)},u.prototype._del=function(e,r,n){t.nextTick(n)},u.prototype.batch=function(e,r,n){if(!arguments.length)return this._chainedBatch();if("function"==typeof r&&(n=r),"function"==typeof e&&(n=e),"function"!=typeof n)throw new Error("batch(array) requires a callback argument");if(!Array.isArray(e))return t.nextTick(n,new Error("batch(array) requires an array argument"));r&&"object"==typeof r||(r={});for(var o=new Array(e.length),s=0;s-1?t.encodeKey(e[n],e):e[n]}),r},i.prototype.createStreamDecoder=function(e){var t=this;return e.keys&&e.values?function(r,n){return{key:t.decodeKey(r,e),value:t.decodeValue(n,e)}}:e.keys?function(r){return t.decodeKey(r,e)}:e.values?function(r,n){return t.decodeValue(n,e)}:function(){}},i.prototype.keyAsBuffer=function(e){return this._keyEncoding(e).buffer},i.prototype.valueAsBuffer=function(e){return this._valueEncoding(e).buffer}},function(e,t,r){(function(e){t.utf8=t["utf-8"]={encode:function(e){return n(e)?e:String(e)},decode:r,buffer:!1,type:"utf8"},t.json={encode:JSON.stringify,decode:JSON.parse,buffer:!1,type:"json"},t.binary={encode:function(t){return n(t)?t:e.from(t)},decode:r,buffer:!0,type:"binary"},t.none={encode:r,decode:r,buffer:!1,type:"id"},t.id=t.none;function r(e){return e}function n(t){return null==t||e.isBuffer(t)}["hex","ascii","base64","ucs2","ucs-2","utf16le","utf-16le"].forEach(function(r){t[r]={encode:function(t){return n(t)?t:e.from(t,r)},decode:function(e){return e.toString(r)},buffer:!0,type:r}})}).call(this,r(0).Buffer)},function(e,t,r){var n=r(641).create,i=n("LevelUPError"),o=n("NotFoundError",i);o.prototype.notFound=!0,o.prototype.status=404,e.exports={LevelUPError:i,InitializationError:n("InitializationError",i),OpenError:n("OpenError",i),ReadError:n("ReadError",i),WriteError:n("WriteError",i),NotFoundError:o,EncodingError:n("EncodingError",i)}},function(e,t,r){(function(t,n){e.exports=c;var i=r(645).AbstractLevelDOWN,o=r(103),s=r(875),a=r(66);function c(e){if(!(this instanceof c))return new c(e);i.call(this,e)}o.inherits(c,i),c.prototype._open=function(e,t){var r=this;if(this._idbOpts=a({storeName:this.location,keyEncoding:"none",valueEncoding:"none"},e),this._idbOpts.idb)i(this._idbOpts.idb);else{var n=indexedDB.open(this.location);n.onerror=function(e){t(e.target.error)},n.onsuccess=function(){i(n.result)}}function i(n){r._db=n;var i=r._db.objectStoreNames.contains(r._idbOpts.storeName);if(e.errorIfExists&&i)return r._db.close(),void t(new Error("store already exists"));if(!e.createIfMissing&&!i)return r._db.close(),void t(new Error("store does not exist"));if(e.createIfMissing&&!i){r._db.close();var o=indexedDB.open(r.location,r._db.version+1);return o.onerror=function(e){t(e.target.error)},o.onupgradeneeded=function(){o.result.createObjectStore(r._idbOpts.storeName,r._idbOpts)},void(o.onsuccess=function(){r._db=o.result,t(null,r)})}t(null,r)}},c.prototype._get=function(e,r,n){r=a(this._idbOpts,r);var i=e;"binary"!==r.keyEncoding||Array.isArray(e)||(e=Array.prototype.slice.call(e));var o=this._db.transaction(this._idbOpts.storeName),s=o.objectStore(this._idbOpts.storeName).openCursor(IDBKeyRange.only(e));o.onabort=function(){n(o.error)},s.onsuccess=function(){var e=s.result;if(e){var o=e.value;if(o instanceof Uint8Array&&(o=new t(o)),"binary"!==r.valueEncoding||t.isBuffer(o)||(o=new t(o)),r.asBuffer&&!t.isBuffer(o))if(null==o)o=new t(0);else if("string"==typeof o)o=new t(o);else if("boolean"==typeof o)o=new t(String(o));else if("number"==typeof o)o=new t(String(o));else if(Array.isArray(o))o=new t(String(o));else{if(!(o instanceof Uint8Array))return void n(new TypeError("can't coerce `"+o.constructor.name+"` into a Buffer"));o=new t(o)}n(null,o,i)}else n(new Error("NotFound"))}},c.prototype._del=function(e,t,r){"binary"!==(t=a(this._idbOpts,t)).keyEncoding||Array.isArray(e)||(e=Array.prototype.slice.call(e));var n="readwrite";!0===t.sync&&(n="readwriteflush");var i=this._db.transaction(this._idbOpts.storeName,n);i.objectStore(this._idbOpts.storeName).delete(e);i.onabort=function(){r(i.error)},i.oncomplete=function(){r()}},c.prototype._put=function(e,t,r,n){"binary"!==(r=a(this._idbOpts,r)).keyEncoding||Array.isArray(e)||(e=Array.prototype.slice.call(e));var i="readwrite";!0===r.sync&&(i="readwriteflush");var o=this._db.transaction(this._idbOpts.storeName,i);o.objectStore(this._idbOpts.storeName).put(t,e);o.onabort=function(){n(o.error)},o.oncomplete=function(){n()}},c.prototype._iterator=function(e){return new s(this,e)},c.prototype._batch=function(e,t,r){if(0===e.length)return n.nextTick(r);var i="readwrite";!0===t.sync&&(i="readwriteflush");var o=this._db.transaction(this._idbOpts.storeName,i),s=o.objectStore(this._idbOpts.storeName);o.onabort=function(){r(o.error)},o.oncomplete=function(){r()},e.forEach(function(e){"binary"!==a(t,e).keyEncoding||Array.isArray(e.key)||(e.key=Array.prototype.slice.call(e.key)),"del"===e.type?s.delete(e.key):s.put(e.value,e.key)})},c.prototype._close=function(e){this._db.close(),n.nextTick(e)},c.prototype._approximateSize=function(e,t,r){var i=new Error("Not implemented");if(!r)throw i;n.nextTick(function(){r(i)})},c.destroy=function(e,t){var r;if(null!=e&&"object"==typeof e)r=a({location:e.location,storeName:e.location},e._idbOpts);else{if("string"!=typeof e)throw new TypeError("location must be a string or an object");r={location:e,storeName:e}}if("string"!=typeof r.location)throw new TypeError("location must be a string");if("string"!=typeof r.storeName)throw new TypeError("db.storeName must be a string");var n=indexedDB.open(r.location);n.onerror=function(e){t(e.target.error)},n.onsuccess=function(){var e=n.result;function i(e){var r=indexedDB.deleteDatabase(e);r.onerror=function(e){t(e.target.error)},r.onsuccess=function(){t()}}if(e.close(),0!==e.objectStoreNames.length)if(e.objectStoreNames.contains(r.storeName)){var o=indexedDB.open(r.location,e.version+1);o.onerror=function(e){t(e.target.error)},o.onupgradeneeded=function(){(e=o.result).deleteObjectStore(r.storeName)},o.onsuccess=function(){(e=o.result).close(),0===e.objectStoreNames.length?i(r.location):t()}}else t();else i(r.location)}}}).call(this,r(0).Buffer,r(4))},function(e,t,r){var n=r(646);e.exports=function(e){return!(!e||"object"!=typeof e)&&Object.keys(n.prototype).filter(function(e){return"_"!=e[0]&&"approximateSize"!=e}).every(function(t){return"function"==typeof e[t]})}},function(e,t,r){(function(t,n){var i=r(103),o=r(645).AbstractIterator,s=r(876),a=r(877),c=r(80),u=r(66),l=c.Writable;function f(e,t){if(this._db=e._db,this._idbOpts=e._idbOpts,o.call(this,e),this._options=u({snapshot:!0},this._idbOpts,t),this._limit=this._options.limit,null!=this._limit&&-1!==this._limit||(this._limit=1/0),"number"!=typeof this._limit)throw new TypeError("options.limit must be a number");0!==this._limit&&(this._count=0,this._startCursor(this._options))}e.exports=f,i.inherits(f,o),f.prototype._startCursor=function(e){e=u(this._options,e);var t=this,r=null,n=s.lowerBound(e),i=s.upperBound(e),o=s.lowerBoundExclusive(e),c=s.upperBoundExclusive(e),f=e.reverse?"prev":"next";if(n&&("binary"!==e.keyEncoding||Array.isArray(n)||(n=Array.prototype.slice.call(n))),i&&("binary"!==e.keyEncoding||Array.isArray(i)||(i=Array.prototype.slice.call(i))),n&&i)try{r=IDBKeyRange.bound(n,i,o,c)}catch(e){return void(this._keyRangeError=!0)}else n?r=IDBKeyRange.lowerBound(n,o):i&&(r=IDBKeyRange.upperBound(i,c));this._reader=a(this._db,this._idbOpts.storeName,u(e,{range:r,direction:f})),this._reader.on("error",function(e){var r=t._callback;t._callback=!1,r?r(e):t._readNext=function(t){t(e)}}),this._reader.pipe(new l({objectMode:!0,write:function(e,r,n){if(t._count++>=t._limit)return t._reader.pause(),t._reader.unpipe(this),n(),void this.end();var i=t._callback;t._callback=!1,i?t._processItem(e,function(e,t,r){n(e),i(e,t,r)}):t._readNext=function(r){t._processItem(e,function(e,t,i){n(e),r(e,t,i)})}}})).on("finish",function(){var e=t._callback;t._callback=!1,e?e():t._readNext=function(e){e()}})},f.prototype._processItem=function(e,r){if("function"!=typeof r)throw new TypeError("cb must be a function");var n=e.key,i=e.value;if(i instanceof Uint8Array&&(i=new t(i)),"binary"===this._options.keyEncoding&&Array.isArray(n)&&(n=new t(n)),"binary"!==this._options.valueEncoding||t.isBuffer(i)||(i=new t(i)),this._options.keyAsBuffer&&!t.isBuffer(n))if(null==n)n=new t(0);else if("string"==typeof n)n=new t(n);else if("boolean"==typeof n)n=new t(String(n));else if("number"==typeof n)n=new t(String(n));else if(Array.isArray(n))n=new t(String(n));else{if(!(n instanceof Uint8Array))throw new TypeError("can't coerce `"+n.constructor.name+"` into a Buffer");n=new t(n)}if(this._options.valueAsBuffer&&!t.isBuffer(i))if(null==i)i=new t(0);else if("string"==typeof i)i=new t(i);else if("boolean"==typeof i)i=new t(String(i));else if("number"==typeof i)i=new t(String(i));else if(Array.isArray(i))i=new t(String(i));else{if(!(i instanceof Uint8Array))throw new TypeError("can't coerce `"+i.constructor.name+"` into a Buffer");i=new t(i)}r(null,n,i)},f.prototype._next=function(e){if(this._callback)throw new Error("callback already exists");if(this._keyRangeError||0===this._limit)e();else{var t=this._readNext;this._readNext=!1,t?n.nextTick(function(){t(e)}):this._callback=e}}}).call(this,r(0).Buffer,r(4))},function(e,t,r){(function(e){function r(e){return void 0!==e&&""!==e}function n(e,t){return Object.hasOwnProperty.call(e,t)}function i(e,t){return Object.hasOwnProperty.call(e,t)&&t}t.compare=function(t,r){if(e.isBuffer(t)){for(var n=Math.min(t.length,r.length),i=0;ir?1:0};var o=t.lowerBoundKey=function(e){return i(e,"gt")||i(e,"gte")||i(e,"min")||(e.reverse?i(e,"end"):i(e,"start"))||void 0},s=t.lowerBound=function(e,t){var r=o(e);return r?e[r]:t},a=t.lowerBoundInclusive=function(e){return!n(e,"gt")},c=t.upperBoundInclusive=function(e){return!n(e,"lt")},u=t.lowerBoundExclusive=function(e){return!a(e)},l=t.upperBoundExclusive=function(e){return!c(e)},f=t.upperBoundKey=function(e){return i(e,"lt")||i(e,"lte")||i(e,"max")||(e.reverse?i(e,"start"):i(e,"end"))||void 0},p=t.upperBound=function(e,t){var r=f(e);return r?e[r]:t};function h(e){return e}t.start=function(e,t){return e.reverse?p(e,t):s(e,t)},t.end=function(e,t){return e.reverse?s(e,t):p(e,t)},t.startInclusive=function(e){return e.reverse?c(e):a(e)},t.endInclusive=function(e){return e.reverse?a(e):c(e)},t.toLtgt=function(e,r,i,o,s){r=r||{},i=i||h;var a=arguments.length>3,c=t.lowerBoundKey(e),u=t.upperBoundKey(e);return c?"gt"===c?r.gt=i(e.gt,!1):r.gte=i(e[c],!1):a&&(r.gte=i(o,!1)),u?"lt"===u?r.lt=i(e.lt,!0):r.lte=i(e[u],!0):a&&(r.lte=i(s,!0)),null!=e.reverse&&(r.reverse=!!e.reverse),n(r,"max")&&delete r.max,n(r,"min")&&delete r.min,n(r,"start")&&delete r.start,n(r,"end")&&delete r.end,r},t.contains=function(e,n,i){i=i||t.compare;var o=s(e);if(r(o)&&((a=i(n,o))<0||0===a&&u(e)))return!1;var a,c=p(e);if(r(c)&&((a=i(n,c))>0||0===a&&l(e)))return!1;return!0},t.filter=function(e,r){return function(n){return t.contains(e,n,r)}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";var n=r(80),i=r(66);e.exports=function(e,t,r){if("object"!=typeof e)throw new TypeError("db must be an object");if("string"!=typeof t)throw new TypeError("storeName must be a string");if(null==r&&(r={}),"object"!=typeof r)throw new TypeError("opts must be an object");var o=new n.Transform(i(r,{objectMode:!0,transform:function(e,t,r){r(null,e)}}));r=i({snapshot:!1},r);var s=null;return o._cursorsOpened=0,function n(){var i,a,c,u,l,f=r.direction||"next",p=r.range||{};i=p.lower,a=p.upper,c=!!p.lowerOpen,u=!!p.upperOpen,s&&("next"===f?(c=!0,i=s):(u=!0,a=s)),i&&a?l=IDBKeyRange.bound(i,a,c,u):i?l=IDBKeyRange.lowerBound(i,c):a&&(l=IDBKeyRange.upperBound(a,u));var h=e.transaction(t,"readonly"),d=h.objectStore(t);o._cursorsOpened++;var m=d.openCursor(l,r.direction);function g(e){try{e.continue()}catch(e){"TransactionInactiveError"!==e.name||r.snapshot?o.emit("error",e):n()}}m.onsuccess=function(){var e=m.result;if(e){s=e.key;var t=o.write({key:e.key,value:e.value});r.snapshot||t?g(e):o.once("drain",function(){g(e)})}else o.end()},h.onabort=function(){o.emit("error",h.error)},h.onerror=function(){o.emit("error",h.error)}}(),o}},function(e,t,r){"use strict";e.exports={Spec:{type:"mount",mounts:[{mountpoint:"/blocks",type:"measure",prefix:"flatfs.datastore",child:{type:"flatfs",path:"blocks",sync:!0,shardFunc:"/repo/flatfs/shard/v1/next-to-last/2"}},{mountpoint:"/",type:"measure",prefix:"leveldb.datastore",child:{type:"levelds",path:"datastore",compression:"none"}}]}}},function(e,t,r){"use strict";t.ERR_REPO_NOT_INITIALIZED="ERR_REPO_NOT_INITIALIZED"},function(e,t,r){"use strict";e.exports={repoVersion:7}},function(e,t,r){"use strict";t.preStart=r(882),t.start=r(892),t.stop=r(1131),t.isOnline=r(1132),t.version=r(1133),t.id=r(1134),t.repo=r(713),t.init=r(1135),t.bootstrap=r(1137),t.config=r(1138),t.block=r(1139),t.object=r(1140),t.dag=r(1141),t.libp2p=r(662),t.swarm=r(1143),t.ping=r(1144),t.pingPullStream=r(1145),t.pingReadableStream=r(1146),t.pin=r(1147),t.filesRegular=r(1155),t.filesMFS=r(1209),t.bitswap=r(734),t.pubsub=r(1250),t.dht=r(1251),t.dns=r(1254),t.key=r(1256),t.stats=r(1257),t.resolve=r(1258),t.name=r(1260)},function(e,t,r){"use strict";const n=r(24),i=r(46),o=r(34),s=r(9),a=r(650),c=r(115),u=r(891);e.exports=function(e){return t=>{e.log("pre-start");const r=e._options.pass;s([t=>e._repo.config.get(t),(t,r)=>{if(!e._options.config)return r(null,t);t=c(t,e._options.config),e.config.replace(t,e=>{if(e)return r(e);r(null,t)})},(t,r)=>{if(t.Keychain)return r(null,t);t.Keychain=a.generateOptions(),e.config.set("Keychain",t.Keychain,n=>{e.log("using default keychain options"),r(n,t)})},(t,n)=>{if(e._keychain);else if(r){const n=Object.assign({passPhrase:r},t.Keychain);e._keychain=new a(e._repo.keys,n),e.log("keychain constructed")}else e._keychain=new u,e.log("no keychain, use --pass");n(null,t)},(e,t)=>{const r=e.Identity.PrivKey;n.createFromPrivKey(r,(r,n)=>{t(r,e,n)})},(t,n,i)=>{if(!r)return i(null,t,n);e._keychain.findKeyByName("self",r=>{if(r)return e.log('Creating "self" key'),e._keychain.importPeer("self",n,e=>i(e,t,n));i(null,t,n)})},(t,r,n)=>{e.log("peer created"),e._peerInfo=new i(r),t.Addresses&&t.Addresses.Swarm&&t.Addresses.Swarm.forEach(t=>{let r=o(t);r.getPeerId()&&(r=r.encapsulate("/ipfs/"+e._peerInfo.id.toB58String())),e._peerInfo.multiaddrs.add(r)}),n()},t=>e.pin._load(t)],t)}}},function(e,t,r){"use strict";const n=r(884),i=r(115),o=r(68),s=r(28),a=r(33),c=r(15),u=r(888),l="/pkcs8/",f="/info/",p={minKeyLength:14,minSaltLength:16,minIterationCount:1e3},h={dek:{keyLength:64,iterationCount:1e4,salt:"you should override this value with a crypto secure random number",hash:"sha2-512"}};function d(e){return!!e&&("string"==typeof e&&e===n(e.trim()))}function m(e,t){const r=800*Math.random()+200;"string"==typeof t&&(t=new Error(t)),setTimeout(e,r,t,null)}function g(e){return new s.Key(l+e)}function y(e){return new s.Key(f+e)}e.exports=class{constructor(e,t){if(!e)throw new Error("store is required");this.store=e;const r=i(h,t);if(!r.passPhrase||r.passPhrase.length<20)throw new Error("passPhrase must be least 20 characters");if(r.dek.keyLengthn})}get cms(){return new u(this)}static generateOptions(){const e=Object.assign({},h),t=3*Math.ceil(p.minSaltLength/3);return e.dek.salt=o.randomBytes(t).toString("base64"),e}static get options(){return h}createKey(e,t,r,n){const i=this;if(!d(e)||"self"===e)return m(n,`Invalid key name '${e}'`);if("string"!=typeof t)return m(n,`Invalid key type '${t}'`);if(!Number.isSafeInteger(r))return m(n,`Invalid key size '${r}'`);const s=g(e);i.store.has(s,(a,c)=>{if(a)return m(n,a);if(c)return m(n,`Key '${e}' already exists`);switch(t.toLowerCase()){case"rsa":if(r<2048)return m(n,`Invalid RSA key size ${r}`)}o.keys.generateKeyPair(t,r,(t,r)=>{if(t)return m(n,t);r.id((t,o)=>{if(t)return m(n,t);r.export(this._(),(t,r)=>{if(t)return m(n,t);const a={name:e,id:o},c=i.store.batch();c.put(s,r),c.put(y(e),JSON.stringify(a)),c.commit(e=>{if(e)return m(n,e);n(null,a)})})})})})}listKeys(e){const t={prefix:f};c(this.store.query(t),a((t,r)=>{if(t)return m(e,t);const n=r.map(e=>JSON.parse(e.value));e(null,n)}))}findKeyById(e,t){this.listKeys((r,n)=>{if(r)return m(t,r);const i=n.find(t=>t.id===e);t(null,i)})}findKeyByName(e,t){if(!d(e))return m(t,`Invalid key name '${e}'`);const r=y(e);this.store.get(r,(r,n)=>{if(r)return m(t,`Key '${e}' does not exist. ${r.message}`);t(null,JSON.parse(n.toString()))})}removeKey(e,t){const r=this;if(!d(e)||"self"===e)return m(t,`Invalid key name '${e}'`);const n=g(e);r.findKeyByName(e,(i,o)=>{if(i)return m(t,i);const s=r.store.batch();s.delete(n),s.delete(y(e)),s.commit(e=>{if(e)return m(t,e);t(null,o)})})}renameKey(e,t,r){const n=this;if(!d(e)||"self"===e)return m(r,`Invalid old key name '${e}'`);if(!d(t)||"self"===t)return m(r,`Invalid new key name '${t}'`);const i=g(e),o=g(t),s=y(e),a=y(t);this.store.get(i,(c,u)=>{if(c)return m(r,`Key '${e}' does not exist. ${c.message}`);const l=u.toString();n.store.has(o,(e,c)=>e?m(r,e):c?m(r,`Key '${t}' already exists`):void n.store.get(s,(e,c)=>{if(e)return m(r,e);const u=JSON.parse(c.toString());u.name=t;const f=n.store.batch();f.put(o,l),f.put(a,JSON.stringify(u)),f.delete(i),f.delete(s),f.commit(e=>{if(e)return m(r,e);r(null,u)})}))})}exportKey(e,t,r){if(!d(e))return m(r,`Invalid key name '${e}'`);if(!t)return m(r,"Password is required");const n=g(e);this.store.get(n,(n,i)=>{if(n)return m(r,`Key '${e}' does not exist. ${n.message}`);const s=i.toString();o.keys.import(s,this._(),(e,n)=>{if(e)return m(r,e);n.export(t,r)})})}importKey(e,t,r,n){const i=this;if(!d(e)||"self"===e)return m(n,`Invalid key name '${e}'`);if(!t)return m(n,"PEM encoded key is required");const s=g(e);i.store.has(s,(a,c)=>a?m(n,a):c?m(n,`Key '${e}' already exists`):void o.keys.import(t,r,(t,r)=>{if(t)return m(n,"Cannot read the key, most likely the password is wrong");r.id((t,o)=>{if(t)return m(n,t);r.export(this._(),(t,r)=>{if(t)return m(n,t);const a={name:e,id:o},c=i.store.batch();c.put(s,r),c.put(y(e),JSON.stringify(a)),c.commit(e=>{if(e)return m(n,e);n(null,a)})})})}))}importPeer(e,t,r){const n=this;if(!d(e))return m(r,`Invalid key name '${e}'`);if(!t||!t.privKey)return m(r,"Peer.privKey is required");const i=t.privKey,o=g(e);n.store.has(o,(t,s)=>t?m(r,t):s?m(r,`Key '${e}' already exists`):void i.id((t,s)=>{if(t)return m(r,t);i.export(this._(),(t,i)=>{if(t)return m(r,t);const a={name:e,id:s},c=n.store.batch();c.put(o,i),c.put(y(e),JSON.stringify(a)),c.commit(e=>{if(e)return m(r,e);r(null,a)})})}))}_getPrivateKey(e,t){if(!d(e))return m(t,`Invalid key name '${e}'`);this.store.get(g(e),(r,n)=>{if(r)return m(t,`Key '${e}' does not exist. ${r.message}`);t(null,n.toString())})}}},function(e,t,r){"use strict";var n=r(885),i=/[\/\?<>\\:\*\|":]/g,o=/[\x00-\x1f\x80-\x9f]/g,s=/^\.+$/,a=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,c=/[\. ]+$/;function u(e,t){var r=e.replace(i,t).replace(o,t).replace(s,t).replace(a,t).replace(c,t);return n(r,255)}e.exports=function(e,t){var r=t&&t.replacement||"",n=u(e,r);return""===r?n:u(n,"")}},function(e,t,r){"use strict";var n=r(886),i=r(887);e.exports=n.bind(null,i)},function(e,t,r){"use strict";function n(e){return e>=55296&&e<=56319}function i(e){return e>=56320&&e<=57343}e.exports=function(e,t,r){if("string"!=typeof t)throw new Error("Input must be string");for(var o,s,a=t.length,c=0,u=0;ur)return t.slice(0,u-s.length+1)}return t}},function(e,t,r){"use strict";function n(e){return e>=55296&&e<=56319}function i(e){return e>=56320&&e<=57343}e.exports=function(e){if("string"!=typeof e)throw new Error("Input must be string");for(var t=e.length,r=0,o=null,s=null,a=0;a=128&&o<=2047?r+=2:o>=2048&&o<=65535&&(r+=3),s=o;return r}},function(e,t,r){"use strict";(function(t){const n=r(17),i=r(49),o=r(889),s=r(9);r(264),r(119);const a=r(3),c=r(890);e.exports=class{constructor(e){if(!e)throw new Error("keychain is required");this.keychain=e}encrypt(e,r,o){const s=this,u=(e,t)=>n(()=>o(e,t));if(!t.isBuffer(r))return u(new Error("Plain data must be a Buffer"));i([t=>s.keychain.findKeyByName(e,t),t=>s.keychain._getPrivateKey(e,t)],(e,n)=>{if(e)return u(e);let i=n[0],l=n[1];try{const n=a.pki.decryptRsaPrivateKey(l,s.keychain._());c.certificateForKey(i,n,(e,n)=>{if(e)return o(e);const i=a.pkcs7.createEnvelopedData();i.addRecipient(n),i.content=a.util.createBuffer(r),i.encrypt();const s=a.asn1.toDer(i.toAsn1()).getBytes();u(null,t.from(s,"binary"))})}catch(e){u(e)}})}decrypt(e,r){const i=(e,t)=>n(()=>r(e,t));if(!t.isBuffer(e))return i(new Error("CMS data is required"));const c=this;let u;try{const t=a.util.createBuffer(e.toString("binary")),r=a.asn1.fromDer(t);u=a.pkcs7.messageFromAsn1(r)}catch(e){return i(new Error("Invalid CMS: "+e.message))}const l=u.recipients.filter(e=>e.issuer.find(e=>"O"===e.shortName&&"ipfs"===e.value)).filter(e=>e.issuer.find(e=>"CN"===e.shortName)).map(e=>({recipient:e,keyId:e.issuer.find(e=>"CN"===e.shortName).value}));o(l,(e,t)=>c.keychain.findKeyById(e.keyId,(e,r)=>t(null,!e&&r)),(e,r)=>{if(e)return i(e);if(!r){const t=l.map(e=>e.keyId);return(e=new Error("Decryption needs one of the key(s): "+t.join(", "))).missingKeys=t,i(e)}s([e=>c.keychain.findKeyById(r.keyId,e),(e,t)=>c.keychain._getPrivateKey(e.name,t)],(e,n)=>{if(e)return i(e);const o=a.pki.decryptRsaPrivateKey(n,c.keychain._());u.decrypt(r.recipient,o),i(null,t.from(u.content.getBytes(),"binary"))})})}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(r(288)),i=a(r(250)),o=a(r(163)),s=a(r(651));function a(e){return e&&e.__esModule?e:{default:e}}t.default=(0,o.default)((0,i.default)(n.default,s.default)),e.exports=t.default},function(e,t,r){"use strict";r(121);const n=r(3).pki;e.exports.certificateForKey=((e,t,r)=>{const i=n.setRsaPublicKey(t.n,t.e),o=n.createCertificate();o.publicKey=i,o.serialNumber="01",o.validity.notBefore=new Date,o.validity.notAfter=new Date,o.validity.notAfter.setFullYear(o.validity.notBefore.getFullYear()+10);const s=[{name:"organizationName",value:"ipfs"},{shortName:"OU",value:"keystore"},{name:"commonName",value:e.id}];return o.setSubject(s),o.setIssuer(s),o.setExtensions([{name:"basicConstraints",cA:!0},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},{name:"extKeyUsage",serverAuth:!0,clientAuth:!0,codeSigning:!0,emailProtection:!0,timeStamping:!0},{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0,sslCA:!0,emailCA:!0,objCA:!0}]),o.sign(t),r(null,o)})},function(e,t,r){"use strict";function n(){throw new Error("Key management requires '--pass ...' option")}e.exports=class{static get options(){n()}static generateOptions(){n()}createKey(){n()}listKeys(){n()}findKeyById(){n()}findKeyByName(){n()}renameKey(){n()}removeKey(){n()}exportKey(){n()}importKey(){n()}importPeer(){n()}get cms(){n()}}},function(e,t,r){"use strict";const n=r(49),i=r(893),o=r(17),s=r(23),a=r(656),c=r(920),u=r(662);e.exports=(e=>s(t=>{const r=r=>{if(r)return o(()=>e.emit("error",r)),t(r);e.state.started(),o(()=>e.emit("start")),t()};if("stopped"!==e.state.state())return r(new Error(`Not able to start from state: ${e.state.state()}`));e.log("starting"),e.state.start(),n([t=>{e._repo.closed?e._repo.open(t):t()},t=>{e._repo.config.get((r,n)=>{if(r)return t(r);const i=u(e,n);i.start(r=>{if(r)return t(r);e.libp2p=i,t()})})},t=>{const r=c(e);e._ipns=new a(r,e._repo.datastore,e._peerInfo,e._keychain,e._options),e._bitswap=new i(e.libp2p,e._repo.blocks,{statsEnabled:!0}),e._bitswap.start(),e._blockService.setExchange(e._bitswap),e._preload.start(),e._ipns.republisher.start(),e._mfsPreload.start(t)}],r)}))},function(e,t,r){"use strict";const n=r(9),i=r(629),o=r(55),s=r(49),a=r(98),c=r(63),u=r(894),l=r(902),f=r(906),p=r(908),h=r(149).logger,d=r(909),m={statsEnabled:!1,statsComputeThrottleTimeout:1e3,statsComputeThrottleMaxQueueSize:1e3},g=["blocksReceived","dataReceived","dupBlksReceived","dupDataReceived","blocksSent","dataSent","providesBufferLength","wantListLength","peerCount"];e.exports=class{constructor(e,t,r){this._libp2p=e,this._log=h(this.peerInfo.id),this._options=Object.assign({},m,r),this._stats=new d(g,{enabled:this._options.statsEnabled,computeThrottleTimeout:this._options.statsComputeThrottleTimeout,computeThrottleMaxQueueSize:this._options.statsComputeThrottleMaxQueueSize}),this.network=new l(e,this,{},this._stats),this.blockstore=t,this.engine=new f(this.peerInfo.id,t,this.network,this._stats),this.wm=new u(this.peerInfo.id,this.network,this._stats),this.notifications=new p(this.peerInfo.id)}get peerInfo(){return this._libp2p.peerInfo}_receiveMessage(e,t,r){this.engine.messageReceived(e,t,n=>{if(n&&this._log("failed to receive message",t),0===t.blocks.size)return r();const i=Array.from(t.blocks.values()),s=i.filter(e=>this.wm.wantlist.contains(e.cid)).map(e=>e.cid);this.wm.cancelWants(s),o(i,(t,r)=>this._handleReceivedBlock(e,t,r),r)})}_handleReceivedBlock(e,t,r){this._log("received block"),n([e=>this.blockstore.has(t.cid,e),(r,n)=>{if(this._updateReceiveCounters(e.toB58String(),t,r),r)return c(n);this._putBlock(t,n)}],r)}_updateReceiveCounters(e,t,r){this._stats.push(e,"blocksReceived",1),this._stats.push(e,"dataReceived",t.data.length),r&&(this._stats.push(e,"dupBlksReceived",1),this._stats.push(e,"dupDataReceived",t.data.length))}_receiveError(e){this._log.error("ReceiveError: %s",e.message)}_onPeerConnected(e){this.wm.connected(e)}_onPeerDisconnected(e){this.wm.disconnected(e),this.engine.peerDisconnected(e),this._stats.disconnected(e)}_putBlock(e,t){this.blockstore.put(e,r=>{if(r)return t(r);this.notifications.hasBlock(e),this.network.provide(e.cid,e=>{e&&this._log.error("Failed to provide: %s",e.message)}),this.engine.receivedBlocks([e.cid]),t()})}enableStats(){this._stats.enable()}disableStats(){this._stats.disable()}wantlistForPeer(e){return this.engine.wantlistForPeer(e)}ledgerForPeer(e){return this.engine.ledgerForPeer(e)}get(e,t){this.getMany([e],(e,r)=>{if(e)return t(e);r&&r.length>0?t(null,r[0]):t()})}getMany(e,t){let r=e.length;const i=[];let o=!1;const s=(e,t)=>{i.push(e),this.notifications.wantBlock(e,r=>{this.wm.cancelWants([e]),t(null,r)},()=>{this.wm.cancelWants([e]),t(null,void 0)}),r||this.wm.wantBlocks(i)};a(e,(t,a)=>{n([e=>this.blockstore.has(t,e),(n,a)=>{if(r--,n)return r||this.wm.wantBlocks(i),this.blockstore.get(t,a);o||(o=!0,this.network.findAndConnect(e[0],e=>{e&&this._log.error(e)})),s(t,a)}],a)},t)}unwant(e){Array.isArray(e)||(e=[e]),this.wm.unwantBlocks(e),e.forEach(e=>this.notifications.unwantBlock(e))}cancelWants(e){Array.isArray(e)||(e=[e]),this.wm.cancelWants(e)}put(e,t){this._log("putting block"),n([t=>this.blockstore.has(e.cid,t),(t,r)=>{if(t)return c(r);this._putBlock(e,r)}],t)}putMany(e,t){n([t=>i(e,(e,t)=>{this.blockstore.has(e.cid,t)},t),(e,t)=>this.blockstore.putMany(e,r=>{if(r)return t(r);e.forEach(e=>{this.notifications.hasBlock(e),this.engine.receivedBlocks([e.cid]),this.network.provide(e.cid,e=>{e&&this._log.error("Failed to provide: %s",e.message)})}),t()})],t)}getWantlist(){return this.wm.wantlist.entries()}peers(){return this.engine.peers()}stat(){return this._stats}start(e){s([e=>this.wm.start(e),e=>this.network.start(e),e=>this.engine.start(e)],e)}stop(e){this._stats.stop(),s([e=>this.wm.stop(e),e=>this.network.stop(e),e=>this.engine.stop(e)],e)}}},function(e,t,r){"use strict";const n=r(63),i=r(289),o=r(290),s=r(570),a=r(901),c=r(149).logger;e.exports=class{constructor(e,t,r){this.peers=new Map,this.wantlist=new o(r),this.network=t,this._stats=r,this._peerId=e,this._log=c(e,"want")}_addEntries(e,t,r){const n=e.map((e,r)=>new i.Entry(e,s.kMaxPriority-r,t));n.forEach(e=>{e.cancel?r?this.wantlist.removeForce(e.cid):this.wantlist.remove(e.cid):(this._log("adding to wl"),this.wantlist.add(e.cid,e.priority))});for(let e of this.peers.values())e.addEntries(n)}_startPeerHandler(e){let t=this.peers.get(e.toB58String());if(t)return void t.refcnt++;t=new a(this._peerId,e,this.network);const r=new i(!0);for(let e of this.wantlist.entries())r.addEntry(e[1].cid,e[1].priority);return t.addMessage(r),this.peers.set(e.toB58String(),t),t}_stopPeerHandler(e){const t=this.peers.get(e.toB58String());t&&(t.refcnt--,t.refcnt>0||this.peers.delete(e.toB58String()))}wantBlocks(e){this._addEntries(e,!1)}unwantBlocks(e){this._log("unwant blocks: %s",e.length),this._addEntries(e,!0,!0)}cancelWants(e){this._log("cancel wants: %s",e.length),this._addEntries(e,!0)}connectedPeers(){return Array.from(this.peers.keys())}connected(e){this._startPeerHandler(e)}disconnected(e){this._stopPeerHandler(e)}start(e){this.timer=setInterval(()=>{this._log("resend full-wantlist");const e=new i(!0);this.wantlist.forEach(t=>{e.addEntry(t.cid,t.priority)}),this.peers.forEach(t=>t.addMessage(e))},6e4),n(()=>e())}stop(e){this.peers.forEach(e=>this.disconnected(e.peerId)),clearInterval(this.timer),n(()=>e())}}},function(e,t,r){(function(e,r){var n=200,i="__lodash_hash_undefined__",o=1,s=2,a=9007199254740991,c="[object Arguments]",u="[object Array]",l="[object Boolean]",f="[object Date]",p="[object Error]",h="[object Function]",d="[object GeneratorFunction]",m="[object Map]",g="[object Number]",y="[object Object]",b="[object RegExp]",v="[object Set]",A="[object String]",w="[object Symbol]",E="[object ArrayBuffer]",k="[object DataView]",S=/^\[object .+?Constructor\]$/,_=/^(?:0|[1-9]\d*)$/,x={};x["[object Float32Array]"]=x["[object Float64Array]"]=x["[object Int8Array]"]=x["[object Int16Array]"]=x["[object Int32Array]"]=x["[object Uint8Array]"]=x["[object Uint8ClampedArray]"]=x["[object Uint16Array]"]=x["[object Uint32Array]"]=!0,x[c]=x[u]=x[E]=x[l]=x[k]=x[f]=x[p]=x[h]=x[m]=x[g]=x[y]=x[b]=x[v]=x[A]=x["[object WeakMap]"]=!1;var C="object"==typeof e&&e&&e.Object===Object&&e,I="object"==typeof self&&self&&self.Object===Object&&self,B=C||I||Function("return this")(),R=t&&!t.nodeType&&t,T=R&&"object"==typeof r&&r&&!r.nodeType&&r,N=T&&T.exports===R&&C.process,P=function(){try{return N&&N.binding("util")}catch(e){}}(),M=P&&P.isTypedArray;function D(e,t){for(var r=-1,n=e?e.length:0;++ru))return!1;var f=a.get(e);if(f&&a.get(t))return f==t;var p=-1,h=!0,d=i&o?new be:void 0;for(a.set(e,t),a.set(t,e);++p-1},ge.prototype.set=function(e,t){var r=this.__data__,n=we(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},ye.prototype.clear=function(){this.__data__={hash:new me,map:new(ne||ge),string:new me}},ye.prototype.delete=function(e){return xe(this,e).delete(e)},ye.prototype.get=function(e){return xe(this,e).get(e)},ye.prototype.has=function(e){return xe(this,e).has(e)},ye.prototype.set=function(e,t){return xe(this,e).set(e,t),this},be.prototype.add=be.prototype.push=function(e){return this.__data__.set(e,i),this},be.prototype.has=function(e){return this.__data__.has(e)},ve.prototype.clear=function(){this.__data__=new ge},ve.prototype.delete=function(e){return this.__data__.delete(e)},ve.prototype.get=function(e){return this.__data__.get(e)},ve.prototype.has=function(e){return this.__data__.has(e)},ve.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ge){var i=r.__data__;if(!ne||i.length-1&&e%1==0&&e-1&&e%1==0&&e<=a}function Oe(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Le(e){return!!e&&"object"==typeof e}var Ue=M?function(e){return function(t){return e(t)}}(M):function(e){return Le(e)&&De(e.length)&&!!x[W.call(e)]};function je(e){return Pe(e)?Ae(e):Se(e)}r.exports=function(e,t,r){var n=(r="function"==typeof r?r:void 0)?r(e,t):void 0;return void 0===n?Ee(e,t,r):!!n}}).call(this,r(12),r(50)(e))},function(e,t,r){"use strict";(function(t){const n=r(13);var i={checkCIDComponents:function(e){if(null==e)return"null values are not valid CIDs";if(0!==e.version&&1!==e.version)return"Invalid version, must be a number equal to 1 or 0";if("string"!=typeof e.codec)return"codec must be string";if(!t.isBuffer(e.multihash))return"multihash must be a Buffer";try{n.validate(e.multihash)}catch(e){let t=e.message;return t||(t="Multihash validation failed"),t}}};e.exports=i}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(18);e.exports=(e=>{if(!t.isBuffer(e))throw new Error("arg needs to be a buffer");let r=[];for(;e.length>0;){const t=n.decode(e);r.push(t),e=e.slice(n.decode.bytes)}return r})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";e.exports="\n message Message {\n message Wantlist {\n message Entry {\n // changed from string to bytes, it makes a difference in JavaScript\n optional bytes block = 1; // the block cid (cidV0 in bitswap 1.0.0, cidV1 in bitswap 1.1.0)\n optional int32 priority = 2; // the priority (normalized). default to 1\n optional bool cancel = 3; // whether this revokes an entry\n }\n\n repeated Entry entries = 1; // a list of wantlist entries\n optional bool full = 2; // whether this is the full wantlist. default to false\n }\n\n message Block {\n optional bytes prefix = 1; // CID prefix (cid version, multicodec and multihash prefix (type + length)\n optional bytes data = 2;\n }\n\n optional Wantlist wantlist = 1;\n repeated bytes blocks = 2; // used to send Blocks in bitswap 1.0.0\n repeated Block payload = 3; // used to send Blocks in bitswap 1.1.0\n }\n"},function(e,t,r){"use strict";const n=r(290).Entry,i=r(569),o=r(22);e.exports=class{constructor(e,t,r){o(i.isCID(e),"needs valid cid"),this.entry=new n(e,t),this.cancel=Boolean(r)}get cid(){return this.entry.cid}set cid(e){this.entry.cid=e}get priority(){return this.entry.priority}set priority(e){this.entry.priority=e}get[Symbol.toStringTag](){return`BitswapMessageEntry ${this.cid.toBaseEncodedString()} `}equals(e){return this.cancel===e.cancel&&this.entry.equals(e.entry)}}},function(e,t,r){"use strict";const n=r(22),i=r(569);e.exports=class{constructor(e,t){n(i.isCID(e),"must be valid CID"),this._refCounter=1,this.cid=e,this.priority=t||1}inc(){this._refCounter+=1}dec(){this._refCounter=Math.max(0,this._refCounter-1)}hasRefs(){return this._refCounter>0}get[Symbol.toStringTag](){return`WantlistEntry `}equals(e){return this._refCounter===e._refCounter&&this.cid.equals(e.cid)&&this.priority===e.priority}}},function(e,t,r){"use strict";const n=r(652),i=r(289),o=r(149).logger;e.exports=class{constructor(e,t,r){this.peerId=t,this.network=r,this.refcnt=1,this._entries=[],this._log=o(e,"msgqueue",t.toB58String().slice(0,8)),this.sendEntries=n(this._sendEntries.bind(this),200)}addMessage(e){e.empty||this.send(e)}addEntries(e){this._entries=this._entries.concat(e),this.sendEntries()}_sendEntries(){if(!this._entries.length)return;const e=new i(!1);this._entries.forEach(t=>{t.cancel?e.cancel(t.cid):e.addEntry(t.cid,t.priority)}),this._entries=[],this.addMessage(e)}send(e){this.network.connectTo(this.peerId,t=>{t?this._log.error("cant connect to peer %s: %s",this.peerId.toB58String(),t.message):(this._log("sending message"),this.network.sendMessage(this.peerId,e,e=>{e&&this._log.error("send error: %s",e.message)}))})}}},function(e,t,r){"use strict";const n=r(65),i=r(16),o=r(9),s=r(55),a=r(63),c=r(289),u=r(570),l=r(149).logger,f="/ipfs/bitswap/1.0.0",p="/ipfs/bitswap/1.1.0";e.exports=class{constructor(e,t,r,n){this._log=l(e.peerInfo.id,"network"),r=r||{},this.libp2p=e,this.bitswap=t,this.b100Only=r.b100Only||!1,this._stats=n,this._running=!1}start(e){this._running=!0,this._onPeerConnect=this._onPeerConnect.bind(this),this._onPeerDisconnect=this._onPeerDisconnect.bind(this),this._onConnection=this._onConnection.bind(this),this.libp2p.handle(f,this._onConnection),this.b100Only||this.libp2p.handle(p,this._onConnection),this.libp2p.on("peer:connect",this._onPeerConnect),this.libp2p.on("peer:disconnect",this._onPeerDisconnect),this.libp2p.peerBook.getAllArray().filter(e=>e.isConnected()).forEach(e=>this._onPeerConnect(e)),a(()=>e())}stop(e){this._running=!1,this.libp2p.unhandle(f),this.b100Only||this.libp2p.unhandle(p),this.libp2p.removeListener("peer:connect",this._onPeerConnect),this.libp2p.removeListener("peer:disconnect",this._onPeerDisconnect),a(()=>e())}_onConnection(e,t){this._running&&(this._log("incomming new bitswap connection: %s",e),i(t,n.decode(),i.asyncMap((e,t)=>c.deserialize(e,t)),i.asyncMap((e,r)=>{t.getPeerInfo((t,n)=>{if(t)return r(t);this.bitswap._receiveMessage(n.id,e,r)})}),i.onEnd(e=>{this._log("ending connection"),e&&this.bitswap._receiveError(e)})))}_onPeerConnect(e){this._running&&this.bitswap._onPeerConnected(e.id)}_onPeerDisconnect(e){this._running&&this.bitswap._onPeerDisconnected(e.id)}findProviders(e,t,r){this.libp2p.contentRouting.findProviders(e,{maxTimeout:u.providerRequestTimeout,maxNumProviders:t},r)}findAndConnect(e,t){o([t=>this.findProviders(e,u.maxProvidersPerRequest,t),(e,t)=>{this._log("connecting to providers",e.map(e=>e.id.toB58String())),s(e,(e,t)=>this.connectTo(e,t))}],t)}provide(e,t){this.libp2p.contentRouting.provide(e,t)}sendMessage(e,t,r){if(!this._running)return r(new Error("network isn't running"));const o=e.toB58String()?e.toB58String():e.id.toB58String();this._log("sendMessage to %s",o,t),this._dialPeer(e,(o,s,a)=>{if(o)return r(o);let c;switch(a){case f:c=t.serializeToBitswap100();break;case p:c=t.serializeToBitswap110();break;default:return r(new Error("Unkown protocol: "+a))}!function(e,t,r){i(i.values([t]),n.encode(),e,i.onEnd(r))}(s,c,e=>{e&&this._log.error(e)}),r(),this._updateSentStats(e,t.blocks)})}connectTo(e,t){if(!this._running)return t(new Error("network isn't running"));this.libp2p.dial(e,t)}_dialPeer(e,t){this.libp2p.dialProtocol(e,p,(r,n)=>{r?this.libp2p.dialProtocol(e,f,(e,r)=>{if(e)return t(e);t(null,r,f)}):t(null,n,p)})}_updateSentStats(e,t){const r=e.toB58String();this._stats&&(t.forEach(e=>this._stats.push(r,"dataSent",e.data.length)),this._stats.push(r,"blocksSent",t.size))}}},function(e,t,r){"use strict";const n=r(6).Buffer;e.exports=function(e){e=Object.assign({fixed:!1},e||{});const t=r(18);let i=e.fixed?null:o(),s=0,a=!1,c=!0;return r=>(u,l)=>{if(u&&(a=u),a)return l(a);r(null,(r,u)=>{if(r&&(a=r),a&&!c)return l(a);if(c=!1,!a&&!n.isBuffer(u))return a=new Error("data must be a buffer"),l(a);const f=a?0:u.length;let p;if(e.fixed?(p=n.alloc(4)).writeInt32BE(f,0):(t.encode(f,i,s),s+=t.encode.bytes,p=i.slice(s-t.encode.bytes,s),i.length-s<100&&(i=o(),s=0)),a)return l(null,p);l(null,n.concat([p,u],(e.fixed?4:t.encode.bytes)+f))})}};const i=10240;function o(){return n.alloc(i)}},function(e,t,r){"use strict";const n=r(18),i=r(653),o=r(6).Buffer,s=r(83);t.decode=function(e){let t=new i,r=s(e=>{t.abort(e)});return n=>{return t(n),function n(){let i=!0;let o=!1;const s=(e,t)=>{o=!0,e?(r.end(e),i=!1):(r.push(t),i||n())};for(;i;)o=!1,u(t,e,s),o||(i=!1)}(),r}},t.decodeFromReader=function(e,t,r){"function"==typeof t&&(r=t,t={});u(e,t,function(e,t){if(e)return r(!0===e?new Error("Unexpected end of input from reader."):e);r(null,t)})};const a=e=>!(128&e),c=4194304;function u(e,t,r){(t=Object.assign({fixed:!1,maxLength:c},t||{})).fixed?function(e,t,r){e.read(4,(n,i)=>{if(n)return r(n);const o=i.readInt32BE(0);if(o>t)return r(new Error("size longer than max permitted length of "+t+"!"));l(e,o,r)})}(e,t.maxLength,r):function(e,t,r){let i=[];0===i.length&&function s(){e.read(1,(c,u)=>{if(c)return r(c);if(i.push(u),u&&!a(u[0]))return void s();const f=n.decode(o.concat(i));return f>t?r(new Error("size longer than max permitted length of "+t+"!")):f<=0?r(!0):void l(e,f,(e,t)=>e?r(e):(i=[],t.length{if(e)return r(e);r(null,t)})}},function(e,t,r){(function(t){e.exports=function(){var e=[],r=0;return{length:r,data:this,add:function(n){if(!t.isBuffer(n))throw new Error("data must be a buffer, was: "+JSON.stringify(n));return this.length=r+=n.length,e.push(n),this},has:function(e){return null==e?r>0:r>=e},get:function(n){var i;if(null==n||n===r){r=0;var o=e;return e=[],1==o.length?o[0]:t.concat(o)}if(e.length>1&&n<=(i=e[0].length)){var s=e[0].slice(0,n);return n===i?e.shift():e[0]=e[0].slice(n,i),r-=n,s}if(ne+t.data.byteLength,0){if(a--,o.push(t),(n+=t.data.byteLength)>=g||0===a){n=0;const t=o.slice();o=[],this._sendSafeBlocks(e,t,e=>{e&&this._log("sendblock error: %s",e.message),r()})}else s(r)},r)}_sendSafeBlocks(e,t,r){const n=new u(!1);t.forEach(e=>n.addBlock(e)),this.network.sendMessage(e,n,r)}_processTasks(){if(!this._running||!this._tasks.length)return;const e=this._tasks;this._tasks=[];const t=e.map(e=>e.entry).map(e=>e.cid),r=m((e,t)=>e.equals(t),t),i=h(e=>e.target.toB58String(),e);o([e=>a(r,(e,t)=>{this.blockstore.get(e,t)},e),(e,r)=>n(Object.values(i),(r,n)=>{const i=r[0].target,o=t.map(t=>e.find(e=>e.cid.equals(t)));this._sendBlocks(i,o,e=>{e?this._log.error("should never happen: ",e):o.forEach(e=>this.messageSent(i,e)),n()})},r)],e=>{this._tasks=[],e&&this._log.error(e)})}wantlistForPeer(e){const t=e.toB58String();return this.ledgerMap.has(t)?this.ledgerMap.get(t).wantlist.sortedEntries():new Map}ledgerForPeer(e){const t=e.toB58String(),r=this.ledgerMap.get(t);return r?{peer:r.partner.toPrint(),value:r.debtRatio(),sent:r.accounting.bytesSent,recv:r.accounting.bytesRecv,exchanged:r.exchangeCount}:null}peers(){return Array.from(this.ledgerMap.values()).map(e=>e.partner)}receivedBlocks(e){e.length&&(this.ledgerMap.forEach(t=>{e.map(e=>t.wantlistContains(e)).filter(Boolean).forEach(e=>{this._tasks.push({entry:e,target:t.partner})})}),this._outbox())}messageReceived(e,t,r){const n=this._findOrCreate(e);if(t.empty)return s(r);if(t.full&&(n.wantlist=new l),this._processBlocks(t.blocks,n),0===t.wantlist.size)return s(r);let i=[],o=[];t.wantlist.forEach(e=>{e.cancel?(n.cancelWant(e.cid),i.push(e)):(n.wants(e.cid,e.priority),o.push(e))}),this._cancelWants(n,e,i),this._addWants(n,e,o,r)}_cancelWants(e,t,r){const n=t.toB58String();this._tasks=d((e,t)=>{const r=e.target.toB58String()===n,i=e.entry.cid.equals(t.cid);return r&&i},this._tasks,r)}_addWants(e,t,r,i){n(r,(e,r)=>{this.blockstore.has(e.cid,(n,i)=>{n?this._log.error("failed existence check"):i&&this._tasks.push({entry:e.entry,target:t}),r()})},()=>{this._outbox(),i()})}_processBlocks(e,t,r){const n=[];e.forEach((e,r)=>{this._log("got block (%s bytes)",e.data.length),t.receivedBytes(e.data.length),n.push(e.cid)}),this.receivedBlocks(n)}messageSent(e,t){const r=this._findOrCreate(e);r.sentBytes(t?t.data.length:0),t&&t.cid&&r.wantlist.remove(t.cid)}numBytesSentTo(e){return this._findOrCreate(e).accounting.bytesSent}numBytesReceivedFrom(e){return this._findOrCreate(e).accounting.bytesRecv}peerDisconnected(e){}_findOrCreate(e){const t=e.toB58String();if(this.ledgerMap.has(t))return this.ledgerMap.get(t);const r=new f(e);return this.ledgerMap.set(t,r),this._stats&&this._stats.push(t,"peerCount",1),r}start(e){this._running=!0,s(()=>e())}stop(e){this._running=!1,s(()=>e())}}},function(e,t,r){"use strict";const n=r(290);e.exports=class{constructor(e){this.partner=e,this.wantlist=new n,this.exchangeCount=0,this.sentToPeer=new Map,this.accounting={bytesSent:0,bytesRecv:0}}sentBytes(e){this.exchangeCount++,this.lastExchange=(new Date).getTime(),this.accounting.bytesSent+=e}receivedBytes(e){this.exchangeCount++,this.lastExchange=(new Date).getTime(),this.accounting.bytesRecv+=e}wants(e,t){this.wantlist.add(e,t)}cancelWant(e){this.wantlist.remove(e)}wantlistContains(e){return this.wantlist.contains(e)}debtRatio(){return this.accounting.bytesSent/(this.accounting.bytesRecv+1)}}},function(e,t,r){"use strict";const n=r(14).EventEmitter,i=r(570),o=r(149).logger,s=e=>`unwant:${e}`,a=e=>`block:${e}`;e.exports=class extends n{constructor(e){super(),this.setMaxListeners(i.maxListeners),this._log=o(e,"notif"),this._unwantListeners={},this._blockListeners={}}hasBlock(e){const t=`block:${e.cid.buffer.toString()}`;this._log(t),this.emit(t,e)}wantBlock(e,t,r){const n=e.buffer.toString();this._log(`wantBlock:${n}`),this._unwantListeners[n]=(()=>{this._log(`manual unwant: ${n}`),this._cleanup(n),r()}),this._blockListeners[n]=(e=>{this._cleanup(n),t(e)}),this.once(s(n),this._unwantListeners[n]),this.once(a(n),this._blockListeners[n])}unwantBlock(e){const t=`unwant:${e.buffer.toString()}`;this._log(t),this.emit(t)}_cleanup(e){this._unwantListeners[e]&&(this.removeListener(s(e),this._unwantListeners[e]),delete this._unwantListeners[e]),this._blockListeners[e]&&(this.removeListener(a(e),this._blockListeners[e]),delete this._blockListeners[e])}}},function(e,t,r){"use strict";const n=r(14),i=r(910),o={movingAverageIntervals:[6e4,3e5,9e5]};e.exports=class extends n{constructor(e,t){super();const r=Object.assign({},o,t);if("number"!=typeof r.computeThrottleTimeout)throw new Error("need computeThrottleTimeout");if("number"!=typeof r.computeThrottleMaxQueueSize)throw new Error("need computeThrottleMaxQueueSize");this._initialCounters=e,this._options=r,this._enabled=this._options.enabled,this._global=new i(e,r),this._global.on("update",e=>this.emit("update",e)),this._peers=new Map}enable(){this._enabled=!0,this._options.enabled=!0,this._global.enable()}disable(){this._enabled=!1,this._options.enabled=!1,this._global.disable()}stop(){this._enabled=!1,this._global.stop();for(let e of this._peers)e[1].stop()}get snapshot(){return this._global.snapshot}get movingAverages(){return this._global.movingAverages}forPeer(e){return e.toB58String&&(e=e.toB58String()),this._peers.get(e)}push(e,t,r){if(this._enabled&&(this._global.push(t,r),e)){let n=this._peers.get(e);n||(n=new i(this._initialCounters,this._options),this._peers.set(e,n)),n.push(t,r)}}disconnected(e){const t=e.toB58String(),r=this._peers.get(t);r&&(r.stop(),this._peers.delete(t))}}},function(e,t,r){"use strict";const n=r(14),i=r(116),o=r(655);e.exports=class extends n{constructor(e,t){super(),this._options=t,this._queue=[],this._stats={},this._frequencyLastTime=Date.now(),this._frequencyAccumulators={},this._movingAverages={},this._update=this._update.bind(this),e.forEach(e=>{this._stats[e]=i(0),this._movingAverages[e]={},this._options.movingAverageIntervals.forEach(t=>{(this._movingAverages[e][t]=o(t)).push(this._frequencyLastTime,0)})}),this._enabled=this._options.enabled}enable(){this._enabled=!0}disable(){this._disabled=!0}stop(){this._timeout&&clearTimeout(this._timeout)}get snapshot(){return Object.assign({},this._stats)}get movingAverages(){return Object.assign({},this._movingAverages)}push(e,t){this._enabled&&(this._queue.push([e,t,Date.now()]),this._resetComputeTimeout())}_resetComputeTimeout(){this._timeout&&clearTimeout(this._timeout),this._timeout=setTimeout(this._update,this._nextTimeout())}_nextTimeout(){const e=this._queue.length/this._options.computeThrottleMaxQueueSize;return Math.max(this._options.computeThrottleTimeout*(1-e),0)}_update(){if(this._timeout=null,this._queue.length){let e;for(;this._queue.length;){const t=e=this._queue.shift();this._applyOp(t)}this._updateFrequency(e[2]),this.emit("update",this._stats)}}_updateFrequency(e){const t=e-this._frequencyLastTime;Object.keys(this._stats).forEach(r=>{this._updateFrequencyFor(r,t,e)}),this._frequencyLastTime=e}_updateFrequencyFor(e,t,r){const n=this._frequencyAccumulators[e]||0;this._frequencyAccumulators[e]=0;const i=n/t*1e3;let s=this._movingAverages[e];s||(s=this._movingAverages[e]={}),this._options.movingAverageIntervals.forEach(e=>{let t=s[e];t||(t=s[e]=o(e)),t.push(r,i)})}_applyOp(e){const t=e[0],r=e[1];if("number"!=typeof r)throw new Error("invalid increment number:",r);let n;n=this._stats.hasOwnProperty(t)?this._stats[t]:this._stats[t]=i(0),this._stats[t]=n.plus(r),this._frequencyAccumulators[t]||(this._frequencyAccumulators[t]=0),this._frequencyAccumulators[t]+=r}}},function(e,t,r){"use strict";e.exports=s;var n=r(555),i=s.prototype,o=new Date%1e9;function s(e){e=e||{},this.id=e.id||(1e9*Math.random()>>>0)+o++,this.max=e.max||1/0,this.items=e.items||[],this._lookup={},this.size=this.items.length,this.lastModified=new Date(e.lastModified||new Date);for(var t,r,n=this.items.length;n--;)t=this.items[n],r=new Date(t.expires)-new Date,this._lookup[t.key]=t,r>0?this.expire(t.key,r):r<=0&&this.delete(t.key)}i.has=function(e){return e in this._lookup},i.get=function(e){if(!this.has(e))return null;var t=this._lookup[e];return t.refresh&&this.expire(e,t.refresh),this.items.splice(this.items.indexOf(t),1),this.items.push(t),t.value},i.meta=function(e){if(!this.has(e))return null;var t=this._lookup[e];return"meta"in t?t.meta:null},i.set=function(e,t,r){var n=this._lookup[e],i=this._lookup[e]={key:e,value:t};return this.lastModified=new Date,n?(clearTimeout(n.timeout),this.items.splice(this.items.indexOf(n),1,i)):(this.size>=this.max&&this.delete(this.items[0].key),this.items.push(i),this.size++),r&&("ttl"in r&&this.expire(e,r.ttl),"meta"in r&&(i.meta=r.meta),r.refresh&&(i.refresh=r.ttl)),this},i.delete=function(e){var t=this._lookup[e];return!!t&&(this.lastModified=new Date,this.items.splice(this.items.indexOf(t),1),clearTimeout(t.timeout),delete this._lookup[e],this.size--,this)},i.expire=function(e,t){var r=t||0,i=this._lookup[e];if(!i)return this;if("string"==typeof r&&(r=n(t)),"number"!=typeof r)throw new TypeError("Expiration time must be a string or number.");return clearTimeout(i.timeout),i.timeout=setTimeout(this.delete.bind(this,i.key),r),i.expires=Number(new Date)+r,this},i.clear=function(){for(var e=this.items.length;e--;)this.delete(this.items[e].key);return this},i.toJSON=function(){for(var e,t=new Array(this.items.length),r=t.length;r--;)e=this.items[r],t[r]={key:e.key,meta:e.meta,value:e.value,expires:e.expires,refresh:e.refresh};return{id:this.id,max:isFinite(this.max)?this.max:void 0,lastModified:this.lastModified,items:t}}},function(e,t,r){"use strict";const n=r(24),{Key:i}=r(28),o=r(49),s=r(20),a=r(5),c=a("ipfs:ipns:publisher");c.error=a("ipfs:ipns:publisher:error");const u=r(252),l=36e5;e.exports=class{constructor(e,t){this._routing=e,this._datastore=t}publishWithEOL(e,t,r,i){if(!e||!e.bytes){const e="one or more of the provided parameters are not defined";return c.error(e),i(s(new Error(e),"ERR_UNDEFINED_PARAMETER"))}n.createFromPrivKey(e.bytes,(n,o)=>{if(n)return i(n);this._updateOrCreateRecord(e,t,r,o,(e,t)=>{if(e)return i(e);this._putRecordToRouting(t,o,i)})})}publish(e,t,r){this.publishWithEOL(e,t,l,r)}_putRecordToRouting(e,t,r){if(!n.isPeerId(t)){const e="peerId received is not valid";return c.error(e),r(s(new Error(e),"ERR_INVALID_PEER_ID"))}const i=t._pubKey;u.embedPublicKey(i,e,(n,s)=>{if(n)return r(n);let a;try{a=u.getIdKeys(t.toBytes())}catch(n){return c.error(n),r(n)}o([r=>this._publishEntry(a.routingKey,s||e,t,r),e=>this._publishPublicKey(a.routingPubKey,i,t,e)],t=>{if(t)return c.error(t),r(t);r(null,s||e)})})}_publishEntry(e,t,r,n){if(!i.isKey(e)){const e="datastore key does not have a valid format";return c.error(e),n(s(new Error(e),"ERR_INVALID_DATASTORE_KEY"))}let o;try{o=u.marshal(t)}catch(e){return c.error(e),n(e)}this._routing.put(e.toBuffer(),o,(t,r)=>{if(t){const t=`ipns record for ${e.toString()} could not be stored in the routing`;return c.error(t),n(s(new Error(t),"ERR_PUTTING_TO_ROUTING"))}c(`ipns record for ${e.toString()} was stored in the routing`),n(null,r)})}_publishPublicKey(e,t,r,n){if(!i.isKey(e)){const e="datastore key does not have a valid format";return c.error(e),n(s(new Error(e),"ERR_INVALID_DATASTORE_KEY"))}if(!t||!t.bytes){const e="one or more of the provided parameters are not defined";return c.error(e),n(s(new Error(e),"ERR_UNDEFINED_PARAMETER"))}this._routing.put(e.toBuffer(),t.bytes,(t,r)=>{if(t){const t=`public key for ${e.toString()} could not be stored in the routing`;return c.error(t),n(s(new Error(t),"ERR_PUTTING_TO_ROUTING"))}c(`public key for ${e.toString()} was stored in the routing`),n(null,r)})}_getPublished(e,t,r){if(!n.isPeerId(e)){const e="peerId received is not valid";return c.error(e),r(s(new Error(e),"ERR_INVALID_PEER_ID"))}const i=!1!==(t=t||{}).checkRouting;this._datastore.get(u.getLocalKey(e.id),(t,n)=>{if(t){if("ERR_NOT_FOUND"!==t.code){const t=`unexpected error getting the ipns record ${e.id} from datastore`;return c.error(t),r(s(new Error(t),"ERR_UNEXPECTED_DATASTORE_RESPONSE"))}if(!i)return r(s(t));let n;try{n=u.getIdKeys(e.toBytes())}catch(t){return c.error(t),r(t)}this._routing.get(n.routingKey.toBuffer(),(e,t)=>{if(e)return r(e);this._unmarshalData(t,r)})}else this._unmarshalData(n,r)})}_unmarshalData(e,t){let r;try{r=u.unmarshal(e)}catch(e){return c.error(e),t(s(e,"ERR_INVALID_RECORD_DATA"))}t(null,r)}_updateOrCreateRecord(e,t,r,i,o){if(!n.isPeerId(i)){const e="peerId received is not valid";return c.error(e),o(s(new Error(e),"ERR_INVALID_PEER_ID"))}this._getPublished(i,{checkRouting:!0},(n,a)=>{if(n&&"ERR_NOT_FOUND"!==n.code){const e=`unexpected error when determining the last published IPNS record for ${i.id}`;return c.error(e),o(s(new Error(e),"ERR_DETERMINING_PUBLISHED_RECORD"))}let l=0;a&&void 0!==a.sequence&&(l=a.value.toString()!==t?a.sequence+1:a.sequence),u.create(e,t,l,r,(e,r)=>{if(e){const e=`ipns record for ${t} could not be created`;return c.error(e),o(s(new Error(e),"ERR_CREATING_IPNS_RECORD"))}const n=u.marshal(r);this._datastore.put(u.getLocalKey(i.id),n,(e,n)=>{if(e){const e=`ipns record for ${t} could not be stored in the datastore`;return c.error(e),o(s(new Error(e),"ERR_STORING_IN_DATASTORE"))}c(`ipns record for ${t} was stored in the datastore`),o(null,r)})})})}}},function(e,t){e.exports=function(e,t,r){var n,i;switch(r=r||{},t){case"RFC3548":case"RFC4648":n="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",i=!0;break;case"RFC4648-HEX":n="0123456789ABCDEFGHIJKLMNOPQRSTUV",i=!0;break;case"Crockford":n="0123456789ABCDEFGHJKMNPQRSTVWXYZ",i=!1;break;default:throw new Error("Unknown base32 variant: "+t)}for(var o=void 0!==r.padding?r.padding:i,s=e.byteLength,a=new Uint8Array(e),c=0,u=0,l="",f=0;f=5;)l+=n[u>>>c-5&31],c-=5;if(c>0&&(l+=n[u<<5-c&31]),o)for(;l.length%8!=0;)l+="=";return l}},function(e,t,r){ /** - * @license - * Lodash - * Copyright JS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(){var o,s=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",u="__lodash_hash_undefined__",f=500,l="__lodash_placeholder__",h=1,p=2,d=4,g=1,b=2,m=1,y=2,v=4,w=8,A=16,_=32,S=64,E=128,k=256,x=512,C=30,I="...",B=800,T=16,R=1,P=2,O=1/0,M=9007199254740991,N=1.7976931348623157e308,D=NaN,K=4294967295,U=K-1,j=K>>>1,F=[["ary",E],["bind",m],["bindKey",y],["curry",w],["curryRight",A],["flip",x],["partial",_],["partialRight",S],["rearg",k]],L="[object Arguments]",z="[object Array]",H="[object AsyncFunction]",q="[object Boolean]",V="[object Date]",G="[object DOMException]",W="[object Error]",Y="[object Function]",J="[object GeneratorFunction]",Z="[object Map]",Q="[object Number]",X="[object Null]",$="[object Object]",ee="[object Proxy]",te="[object RegExp]",re="[object Set]",ne="[object String]",ie="[object Symbol]",oe="[object Undefined]",se="[object WeakMap]",ae="[object WeakSet]",ce="[object ArrayBuffer]",ue="[object DataView]",fe="[object Float32Array]",le="[object Float64Array]",he="[object Int8Array]",pe="[object Int16Array]",de="[object Int32Array]",ge="[object Uint8Array]",be="[object Uint8ClampedArray]",me="[object Uint16Array]",ye="[object Uint32Array]",ve=/\b__p \+= '';/g,we=/\b(__p \+=) '' \+/g,Ae=/(__e\(.*?\)|\b__t\)) \+\n'';/g,_e=/&(?:amp|lt|gt|quot|#39);/g,Se=/[&<>"']/g,Ee=RegExp(_e.source),ke=RegExp(Se.source),xe=/<%-([\s\S]+?)%>/g,Ce=/<%([\s\S]+?)%>/g,Ie=/<%=([\s\S]+?)%>/g,Be=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Te=/^\w*$/,Re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pe=/[\\^$.*+?()[\]{}|]/g,Oe=RegExp(Pe.source),Me=/^\s+|\s+$/g,Ne=/^\s+/,De=/\s+$/,Ke=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ue=/\{\n\/\* \[wrapped with (.+)\] \*/,je=/,? & /,Fe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Le=/\\(\\)?/g,ze=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,He=/\w*$/,qe=/^[-+]0x[0-9a-f]+$/i,Ve=/^0b[01]+$/i,Ge=/^\[object .+?Constructor\]$/,We=/^0o[0-7]+$/i,Ye=/^(?:0|[1-9]\d*)$/,Je=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ze=/($^)/,Qe=/['\n\r\u2028\u2029\\]/g,Xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",$e="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",et="[\\ud800-\\udfff]",tt="["+$e+"]",rt="["+Xe+"]",nt="\\d+",it="[\\u2700-\\u27bf]",ot="[a-z\\xdf-\\xf6\\xf8-\\xff]",st="[^\\ud800-\\udfff"+$e+nt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",at="\\ud83c[\\udffb-\\udfff]",ct="[^\\ud800-\\udfff]",ut="(?:\\ud83c[\\udde6-\\uddff]){2}",ft="[\\ud800-\\udbff][\\udc00-\\udfff]",lt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",ht="(?:"+ot+"|"+st+")",pt="(?:"+lt+"|"+st+")",dt="(?:"+rt+"|"+at+")"+"?",gt="[\\ufe0e\\ufe0f]?"+dt+("(?:\\u200d(?:"+[ct,ut,ft].join("|")+")[\\ufe0e\\ufe0f]?"+dt+")*"),bt="(?:"+[it,ut,ft].join("|")+")"+gt,mt="(?:"+[ct+rt+"?",rt,ut,ft,et].join("|")+")",yt=RegExp("['’]","g"),vt=RegExp(rt,"g"),wt=RegExp(at+"(?="+at+")|"+mt+gt,"g"),At=RegExp([lt+"?"+ot+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[tt,lt,"$"].join("|")+")",pt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[tt,lt+ht,"$"].join("|")+")",lt+"?"+ht+"+(?:['’](?:d|ll|m|re|s|t|ve))?",lt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",nt,bt].join("|"),"g"),_t=RegExp("[\\u200d\\ud800-\\udfff"+Xe+"\\ufe0e\\ufe0f]"),St=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Et=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],kt=-1,xt={};xt[fe]=xt[le]=xt[he]=xt[pe]=xt[de]=xt[ge]=xt[be]=xt[me]=xt[ye]=!0,xt[L]=xt[z]=xt[ce]=xt[q]=xt[ue]=xt[V]=xt[W]=xt[Y]=xt[Z]=xt[Q]=xt[$]=xt[te]=xt[re]=xt[ne]=xt[se]=!1;var Ct={};Ct[L]=Ct[z]=Ct[ce]=Ct[ue]=Ct[q]=Ct[V]=Ct[fe]=Ct[le]=Ct[he]=Ct[pe]=Ct[de]=Ct[Z]=Ct[Q]=Ct[$]=Ct[te]=Ct[re]=Ct[ne]=Ct[ie]=Ct[ge]=Ct[be]=Ct[me]=Ct[ye]=!0,Ct[W]=Ct[Y]=Ct[se]=!1;var It={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Bt=parseFloat,Tt=parseInt,Rt="object"==typeof e&&e&&e.Object===Object&&e,Pt="object"==typeof self&&self&&self.Object===Object&&self,Ot=Rt||Pt||Function("return this")(),Mt=t&&!t.nodeType&&t,Nt=Mt&&"object"==typeof n&&n&&!n.nodeType&&n,Dt=Nt&&Nt.exports===Mt,Kt=Dt&&Rt.process,Ut=function(){try{var e=Nt&&Nt.require&&Nt.require("util").types;return e||Kt&&Kt.binding&&Kt.binding("util")}catch(e){}}(),jt=Ut&&Ut.isArrayBuffer,Ft=Ut&&Ut.isDate,Lt=Ut&&Ut.isMap,zt=Ut&&Ut.isRegExp,Ht=Ut&&Ut.isSet,qt=Ut&&Ut.isTypedArray;function Vt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Gt(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i-1}function Xt(e,t,r){for(var n=-1,i=null==e?0:e.length;++n-1;);return r}function wr(e,t){for(var r=e.length;r--&&ar(t,e[r],0)>-1;);return r}var Ar=hr({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),_r=hr({"&":"&","<":"<",">":">",'"':""","'":"'"});function Sr(e){return"\\"+It[e]}function Er(e){return _t.test(e)}function kr(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function xr(e,t){return function(r){return e(t(r))}}function Cr(e,t){for(var r=-1,n=e.length,i=0,o=[];++r",""":'"',"'":"'"});var Or=function e(t){var r,n=(t=null==t?Ot:Or.defaults(Ot.Object(),t,Or.pick(Ot,Et))).Array,i=t.Date,Xe=t.Error,$e=t.Function,et=t.Math,tt=t.Object,rt=t.RegExp,nt=t.String,it=t.TypeError,ot=n.prototype,st=$e.prototype,at=tt.prototype,ct=t["__core-js_shared__"],ut=st.toString,ft=at.hasOwnProperty,lt=0,ht=(r=/[^.]+$/.exec(ct&&ct.keys&&ct.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",pt=at.toString,dt=ut.call(tt),gt=Ot._,bt=rt("^"+ut.call(ft).replace(Pe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt=Dt?t.Buffer:o,wt=t.Symbol,_t=t.Uint8Array,It=mt?mt.allocUnsafe:o,Rt=xr(tt.getPrototypeOf,tt),Pt=tt.create,Mt=at.propertyIsEnumerable,Nt=ot.splice,Kt=wt?wt.isConcatSpreadable:o,Ut=wt?wt.iterator:o,ir=wt?wt.toStringTag:o,hr=function(){try{var e=jo(tt,"defineProperty");return e({},"",{}),e}catch(e){}}(),Mr=t.clearTimeout!==Ot.clearTimeout&&t.clearTimeout,Nr=i&&i.now!==Ot.Date.now&&i.now,Dr=t.setTimeout!==Ot.setTimeout&&t.setTimeout,Kr=et.ceil,Ur=et.floor,jr=tt.getOwnPropertySymbols,Fr=mt?mt.isBuffer:o,Lr=t.isFinite,zr=ot.join,Hr=xr(tt.keys,tt),qr=et.max,Vr=et.min,Gr=i.now,Wr=t.parseInt,Yr=et.random,Jr=ot.reverse,Zr=jo(t,"DataView"),Qr=jo(t,"Map"),Xr=jo(t,"Promise"),$r=jo(t,"Set"),en=jo(t,"WeakMap"),tn=jo(tt,"create"),rn=en&&new en,nn={},on=ls(Zr),sn=ls(Qr),an=ls(Xr),cn=ls($r),un=ls(en),fn=wt?wt.prototype:o,ln=fn?fn.valueOf:o,hn=fn?fn.toString:o;function pn(e){if(Ia(e)&&!ma(e)&&!(e instanceof mn)){if(e instanceof bn)return e;if(ft.call(e,"__wrapped__"))return hs(e)}return new bn(e)}var dn=function(){function e(){}return function(t){if(!Ca(t))return{};if(Pt)return Pt(t);e.prototype=t;var r=new e;return e.prototype=o,r}}();function gn(){}function bn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function mn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=K,this.__views__=[]}function yn(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function Nn(e,t,r,n,i,s){var a,c=t&h,u=t&p,f=t&d;if(r&&(a=i?r(e,n,i,s):r(e)),a!==o)return a;if(!Ca(e))return e;var l=ma(e);if(l){if(a=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&ft.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!c)return ro(e,a)}else{var g=zo(e),b=g==Y||g==J;if(Aa(e))return Zi(e,c);if(g==$||g==L||b&&!i){if(a=u||b?{}:qo(e),!c)return u?function(e,t){return no(e,Lo(e),t)}(e,function(e,t){return e&&no(t,oc(t),e)}(a,e)):function(e,t){return no(e,Fo(e),t)}(e,Rn(a,e))}else{if(!Ct[g])return i?e:{};a=function(e,t,r){var n,i,o,s=e.constructor;switch(t){case ce:return Qi(e);case q:case V:return new s(+e);case ue:return function(e,t){var r=t?Qi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case fe:case le:case he:case pe:case de:case ge:case be:case me:case ye:return Xi(e,r);case Z:return new s;case Q:case ne:return new s(e);case te:return(o=new(i=e).constructor(i.source,He.exec(i))).lastIndex=i.lastIndex,o;case re:return new s;case ie:return n=e,ln?tt(ln.call(n)):{}}}(e,g,c)}}s||(s=new _n);var m=s.get(e);if(m)return m;if(s.set(e,a),Oa(e))return e.forEach(function(n){a.add(Nn(n,t,r,n,e,s))}),a;if(Ba(e))return e.forEach(function(n,i){a.set(i,Nn(n,t,r,i,e,s))}),a;var y=l?o:(f?u?Po:Ro:u?oc:ic)(e);return Wt(y||e,function(n,i){y&&(n=e[i=n]),In(a,i,Nn(n,t,r,i,e,s))}),a}function Dn(e,t,r){var n=r.length;if(null==e)return!n;for(e=tt(e);n--;){var i=r[n],s=t[i],a=e[i];if(a===o&&!(i in e)||!s(a))return!1}return!0}function Kn(e,t,r){if("function"!=typeof e)throw new it(c);return is(function(){e.apply(o,r)},t)}function Un(e,t,r,n){var i=-1,o=Qt,a=!0,c=e.length,u=[],f=t.length;if(!c)return u;r&&(t=$t(t,br(r))),n?(o=Xt,a=!1):t.length>=s&&(o=yr,a=!1,t=new An(t));e:for(;++i-1},vn.prototype.set=function(e,t){var r=this.__data__,n=Bn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},wn.prototype.clear=function(){this.size=0,this.__data__={hash:new yn,map:new(Qr||vn),string:new yn}},wn.prototype.delete=function(e){var t=Ko(this,e).delete(e);return this.size-=t?1:0,t},wn.prototype.get=function(e){return Ko(this,e).get(e)},wn.prototype.has=function(e){return Ko(this,e).has(e)},wn.prototype.set=function(e,t){var r=Ko(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},An.prototype.add=An.prototype.push=function(e){return this.__data__.set(e,u),this},An.prototype.has=function(e){return this.__data__.has(e)},_n.prototype.clear=function(){this.__data__=new vn,this.size=0},_n.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},_n.prototype.get=function(e){return this.__data__.get(e)},_n.prototype.has=function(e){return this.__data__.has(e)},_n.prototype.set=function(e,t){var r=this.__data__;if(r instanceof vn){var n=r.__data__;if(!Qr||n.length0&&r(a)?t>1?qn(a,t-1,r,n,i):er(i,a):n||(i[i.length]=a)}return i}var Vn=ao(),Gn=ao(!0);function Wn(e,t){return e&&Vn(e,t,ic)}function Yn(e,t){return e&&Gn(e,t,ic)}function Jn(e,t){return Zt(t,function(t){return Ea(e[t])})}function Zn(e,t){for(var r=0,n=(t=Gi(t,e)).length;null!=e&&rt}function ei(e,t){return null!=e&&ft.call(e,t)}function ti(e,t){return null!=e&&t in tt(e)}function ri(e,t,r){for(var i=r?Xt:Qt,s=e[0].length,a=e.length,c=a,u=n(a),f=1/0,l=[];c--;){var h=e[c];c&&t&&(h=$t(h,br(t))),f=Vr(h.length,f),u[c]=!r&&(t||s>=120&&h.length>=120)?new An(c&&h):o}h=e[0];var p=-1,d=u[0];e:for(;++p=a)return c;var u=r[n];return c*("desc"==u?-1:1)}}return e.index-t.index}(e,t,r)})}function yi(e,t,r){for(var n=-1,i=t.length,o={};++n-1;)a!==e&&Nt.call(a,c,1),Nt.call(e,c,1);return e}function wi(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;Go(i)?Nt.call(e,i,1):Ui(e,i)}}return e}function Ai(e,t){return e+Ur(Yr()*(t-e+1))}function _i(e,t){var r="";if(!e||t<1||t>M)return r;do{t%2&&(r+=e),(t=Ur(t/2))&&(e+=e)}while(t);return r}function Si(e,t){return os(es(e,t,Tc),e+"")}function Ei(e){return En(pc(e))}function ki(e,t){var r=pc(e);return cs(r,Mn(t,0,r.length))}function xi(e,t,r,n){if(!Ca(e))return e;for(var i=-1,s=(t=Gi(t,e)).length,a=s-1,c=e;null!=c&&++io?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=n(o);++i>>1,s=e[o];null!==s&&!Na(s)&&(r?s<=t:s=s){var f=t?null:So(e);if(f)return Ir(f);a=!1,i=yr,u=new An}else u=t?[]:c;e:for(;++n=n?e:Ti(e,t,r)}var Ji=Mr||function(e){return Ot.clearTimeout(e)};function Zi(e,t){if(t)return e.slice();var r=e.length,n=It?It(r):new e.constructor(r);return e.copy(n),n}function Qi(e){var t=new e.constructor(e.byteLength);return new _t(t).set(new _t(e)),t}function Xi(e,t){var r=t?Qi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function $i(e,t){if(e!==t){var r=e!==o,n=null===e,i=e==e,s=Na(e),a=t!==o,c=null===t,u=t==t,f=Na(t);if(!c&&!f&&!s&&e>t||s&&a&&u&&!c&&!f||n&&a&&u||!r&&u||!i)return 1;if(!n&&!s&&!f&&e1?r[i-1]:o,a=i>2?r[2]:o;for(s=e.length>3&&"function"==typeof s?(i--,s):o,a&&Wo(r[0],r[1],a)&&(s=i<3?o:s,i=1),t=tt(t);++n-1?i[s?t[a]:a]:o}}function ho(e){return To(function(t){var r=t.length,n=r,i=bn.prototype.thru;for(e&&t.reverse();n--;){var s=t[n];if("function"!=typeof s)throw new it(c);if(i&&!a&&"wrapper"==Mo(s))var a=new bn([],!0)}for(n=a?n:r;++n1&&w.reverse(),h&&fc))return!1;var f=s.get(e);if(f&&s.get(t))return f==t;var l=-1,h=!0,p=r&b?new An:o;for(s.set(e,t),s.set(t,e);++l-1&&e%1==0&&e1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(Ke,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Wt(F,function(r){var n="_."+r[0];t&r[1]&&!Qt(e,n)&&e.push(n)}),e.sort()}(function(e){var t=e.match(Ue);return t?t[1].split(je):[]}(n),r)))}function as(e){var t=0,r=0;return function(){var n=Gr(),i=T-(n-r);if(r=n,i>0){if(++t>=B)return arguments[0]}else t=0;return e.apply(o,arguments)}}function cs(e,t){var r=-1,n=e.length,i=n-1;for(t=t===o?n:t;++r1?e[t-1]:o;return r="function"==typeof r?(e.pop(),r):o,Ps(e,r)});function js(e){var t=pn(e);return t.__chain__=!0,t}function Fs(e,t){return t(e)}var Ls=To(function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,i=function(t){return On(t,e)};return!(t>1||this.__actions__.length)&&n instanceof mn&&Go(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:Fs,args:[i],thisArg:o}),new bn(n,this.__chain__).thru(function(e){return t&&!e.length&&e.push(o),e})):this.thru(i)});var zs=io(function(e,t,r){ft.call(e,r)?++e[r]:Pn(e,r,1)});var Hs=lo(bs),qs=lo(ms);function Vs(e,t){return(ma(e)?Wt:jn)(e,Do(t,3))}function Gs(e,t){return(ma(e)?Yt:Fn)(e,Do(t,3))}var Ws=io(function(e,t,r){ft.call(e,r)?e[r].push(t):Pn(e,r,[t])});var Ys=Si(function(e,t,r){var i=-1,o="function"==typeof t,s=va(e)?n(e.length):[];return jn(e,function(e){s[++i]=o?Vt(t,e,r):ni(e,t,r)}),s}),Js=io(function(e,t,r){Pn(e,r,t)});function Zs(e,t){return(ma(e)?$t:hi)(e,Do(t,3))}var Qs=io(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]});var Xs=Si(function(e,t){if(null==e)return[];var r=t.length;return r>1&&Wo(e,t[0],t[1])?t=[]:r>2&&Wo(t[0],t[1],t[2])&&(t=[t[0]]),mi(e,qn(t,1),[])}),$s=Nr||function(){return Ot.Date.now()};function ea(e,t,r){return t=r?o:t,t=e&&null==t?e.length:t,ko(e,E,o,o,o,o,t)}function ta(e,t){var r;if("function"!=typeof t)throw new it(c);return e=La(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=o),r}}var ra=Si(function(e,t,r){var n=m;if(r.length){var i=Cr(r,No(ra));n|=_}return ko(e,n,t,r,i)}),na=Si(function(e,t,r){var n=m|y;if(r.length){var i=Cr(r,No(na));n|=_}return ko(t,n,e,r,i)});function ia(e,t,r){var n,i,s,a,u,f,l=0,h=!1,p=!1,d=!0;if("function"!=typeof e)throw new it(c);function g(t){var r=n,s=i;return n=i=o,l=t,a=e.apply(s,r)}function b(e){var r=e-f;return f===o||r>=t||r<0||p&&e-l>=s}function m(){var e=$s();if(b(e))return y(e);u=is(m,function(e){var r=t-(e-f);return p?Vr(r,s-(e-l)):r}(e))}function y(e){return u=o,d&&n?g(e):(n=i=o,a)}function v(){var e=$s(),r=b(e);if(n=arguments,i=this,f=e,r){if(u===o)return function(e){return l=e,u=is(m,t),h?g(e):a}(f);if(p)return u=is(m,t),g(f)}return u===o&&(u=is(m,t)),a}return t=Ha(t)||0,Ca(r)&&(h=!!r.leading,s=(p="maxWait"in r)?qr(Ha(r.maxWait)||0,t):s,d="trailing"in r?!!r.trailing:d),v.cancel=function(){u!==o&&Ji(u),l=0,n=f=i=u=o},v.flush=function(){return u===o?a:y($s())},v}var oa=Si(function(e,t){return Kn(e,1,t)}),sa=Si(function(e,t,r){return Kn(e,Ha(t)||0,r)});function aa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new it(c);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(aa.Cache||wn),r}function ca(e){if("function"!=typeof e)throw new it(c);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}aa.Cache=wn;var ua=Wi(function(e,t){var r=(t=1==t.length&&ma(t[0])?$t(t[0],br(Do())):$t(qn(t,1),br(Do()))).length;return Si(function(n){for(var i=-1,o=Vr(n.length,r);++i=t}),ba=ii(function(){return arguments}())?ii:function(e){return Ia(e)&&ft.call(e,"callee")&&!Mt.call(e,"callee")},ma=n.isArray,ya=jt?br(jt):function(e){return Ia(e)&&Xn(e)==ce};function va(e){return null!=e&&xa(e.length)&&!Ea(e)}function wa(e){return Ia(e)&&va(e)}var Aa=Fr||Hc,_a=Ft?br(Ft):function(e){return Ia(e)&&Xn(e)==V};function Sa(e){if(!Ia(e))return!1;var t=Xn(e);return t==W||t==G||"string"==typeof e.message&&"string"==typeof e.name&&!Ra(e)}function Ea(e){if(!Ca(e))return!1;var t=Xn(e);return t==Y||t==J||t==H||t==ee}function ka(e){return"number"==typeof e&&e==La(e)}function xa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=M}function Ca(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ia(e){return null!=e&&"object"==typeof e}var Ba=Lt?br(Lt):function(e){return Ia(e)&&zo(e)==Z};function Ta(e){return"number"==typeof e||Ia(e)&&Xn(e)==Q}function Ra(e){if(!Ia(e)||Xn(e)!=$)return!1;var t=Rt(e);if(null===t)return!0;var r=ft.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ut.call(r)==dt}var Pa=zt?br(zt):function(e){return Ia(e)&&Xn(e)==te};var Oa=Ht?br(Ht):function(e){return Ia(e)&&zo(e)==re};function Ma(e){return"string"==typeof e||!ma(e)&&Ia(e)&&Xn(e)==ne}function Na(e){return"symbol"==typeof e||Ia(e)&&Xn(e)==ie}var Da=qt?br(qt):function(e){return Ia(e)&&xa(e.length)&&!!xt[Xn(e)]};var Ka=wo(li),Ua=wo(function(e,t){return e<=t});function ja(e){if(!e)return[];if(va(e))return Ma(e)?Rr(e):ro(e);if(Ut&&e[Ut])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Ut]());var t=zo(e);return(t==Z?kr:t==re?Ir:pc)(e)}function Fa(e){return e?(e=Ha(e))===O||e===-O?(e<0?-1:1)*N:e==e?e:0:0===e?e:0}function La(e){var t=Fa(e),r=t%1;return t==t?r?t-r:t:0}function za(e){return e?Mn(La(e),0,K):0}function Ha(e){if("number"==typeof e)return e;if(Na(e))return D;if(Ca(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ca(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Me,"");var r=Ve.test(e);return r||We.test(e)?Tt(e.slice(2),r?2:8):qe.test(e)?D:+e}function qa(e){return no(e,oc(e))}function Va(e){return null==e?"":Di(e)}var Ga=oo(function(e,t){if(Qo(t)||va(t))no(t,ic(t),e);else for(var r in t)ft.call(t,r)&&In(e,r,t[r])}),Wa=oo(function(e,t){no(t,oc(t),e)}),Ya=oo(function(e,t,r,n){no(t,oc(t),e,n)}),Ja=oo(function(e,t,r,n){no(t,ic(t),e,n)}),Za=To(On);var Qa=Si(function(e,t){e=tt(e);var r=-1,n=t.length,i=n>2?t[2]:o;for(i&&Wo(t[0],t[1],i)&&(n=1);++r1),t}),no(e,Po(e),r),n&&(r=Nn(r,h|p|d,Io));for(var i=t.length;i--;)Ui(r,t[i]);return r});var uc=To(function(e,t){return null==e?{}:function(e,t){return yi(e,t,function(t,r){return ec(e,r)})}(e,t)});function fc(e,t){if(null==e)return{};var r=$t(Po(e),function(e){return[e]});return t=Do(t),yi(e,r,function(e,r){return t(e,r[0])})}var lc=Eo(ic),hc=Eo(oc);function pc(e){return null==e?[]:mr(e,ic(e))}var dc=uo(function(e,t,r){return t=t.toLowerCase(),e+(r?gc(t):t)});function gc(e){return Sc(Va(e).toLowerCase())}function bc(e){return(e=Va(e))&&e.replace(Je,Ar).replace(vt,"")}var mc=uo(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()}),yc=uo(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()}),vc=co("toLowerCase");var wc=uo(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()});var Ac=uo(function(e,t,r){return e+(r?" ":"")+Sc(t)});var _c=uo(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),Sc=co("toUpperCase");function Ec(e,t,r){return e=Va(e),(t=r?o:t)===o?function(e){return St.test(e)}(e)?function(e){return e.match(At)||[]}(e):function(e){return e.match(Fe)||[]}(e):e.match(t)||[]}var kc=Si(function(e,t){try{return Vt(e,o,t)}catch(e){return Sa(e)?e:new Xe(e)}}),xc=To(function(e,t){return Wt(t,function(t){t=fs(t),Pn(e,t,ra(e[t],e))}),e});function Cc(e){return function(){return e}}var Ic=ho(),Bc=ho(!0);function Tc(e){return e}function Rc(e){return ci("function"==typeof e?e:Nn(e,h))}var Pc=Si(function(e,t){return function(r){return ni(r,e,t)}}),Oc=Si(function(e,t){return function(r){return ni(e,r,t)}});function Mc(e,t,r){var n=ic(t),i=Jn(t,n);null!=r||Ca(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=Jn(t,ic(t)));var o=!(Ca(r)&&"chain"in r&&!r.chain),s=Ea(e);return Wt(i,function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__);return(r.__actions__=ro(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,er([this.value()],arguments))})}),e}function Nc(){}var Dc=mo($t),Kc=mo(Jt),Uc=mo(nr);function jc(e){return Yo(e)?lr(fs(e)):function(e){return function(t){return Zn(t,e)}}(e)}var Fc=vo(),Lc=vo(!0);function zc(){return[]}function Hc(){return!1}var qc=bo(function(e,t){return e+t},0),Vc=_o("ceil"),Gc=bo(function(e,t){return e/t},1),Wc=_o("floor");var Yc,Jc=bo(function(e,t){return e*t},1),Zc=_o("round"),Qc=bo(function(e,t){return e-t},0);return pn.after=function(e,t){if("function"!=typeof t)throw new it(c);return e=La(e),function(){if(--e<1)return t.apply(this,arguments)}},pn.ary=ea,pn.assign=Ga,pn.assignIn=Wa,pn.assignInWith=Ya,pn.assignWith=Ja,pn.at=Za,pn.before=ta,pn.bind=ra,pn.bindAll=xc,pn.bindKey=na,pn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return ma(e)?e:[e]},pn.chain=js,pn.chunk=function(e,t,r){t=(r?Wo(e,t,r):t===o)?1:qr(La(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var s=0,a=0,c=n(Kr(i/t));si?0:i+r),(n=n===o||n>i?i:La(n))<0&&(n+=i),n=r>n?0:za(n);r>>0)?(e=Va(e))&&("string"==typeof t||null!=t&&!Pa(t))&&!(t=Di(t))&&Er(e)?Yi(Rr(e),0,r):e.split(t,r):[]},pn.spread=function(e,t){if("function"!=typeof e)throw new it(c);return t=null==t?0:qr(La(t),0),Si(function(r){var n=r[t],i=Yi(r,0,t);return n&&er(i,n),Vt(e,this,i)})},pn.tail=function(e){var t=null==e?0:e.length;return t?Ti(e,1,t):[]},pn.take=function(e,t,r){return e&&e.length?Ti(e,0,(t=r||t===o?1:La(t))<0?0:t):[]},pn.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?Ti(e,(t=n-(t=r||t===o?1:La(t)))<0?0:t,n):[]},pn.takeRightWhile=function(e,t){return e&&e.length?Fi(e,Do(t,3),!1,!0):[]},pn.takeWhile=function(e,t){return e&&e.length?Fi(e,Do(t,3)):[]},pn.tap=function(e,t){return t(e),e},pn.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new it(c);return Ca(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),ia(e,t,{leading:n,maxWait:t,trailing:i})},pn.thru=Fs,pn.toArray=ja,pn.toPairs=lc,pn.toPairsIn=hc,pn.toPath=function(e){return ma(e)?$t(e,fs):Na(e)?[e]:ro(us(Va(e)))},pn.toPlainObject=qa,pn.transform=function(e,t,r){var n=ma(e),i=n||Aa(e)||Da(e);if(t=Do(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:Ca(e)&&Ea(o)?dn(Rt(e)):{}}return(i?Wt:Wn)(e,function(e,n,i){return t(r,e,n,i)}),r},pn.unary=function(e){return ea(e,1)},pn.union=Is,pn.unionBy=Bs,pn.unionWith=Ts,pn.uniq=function(e){return e&&e.length?Ki(e):[]},pn.uniqBy=function(e,t){return e&&e.length?Ki(e,Do(t,2)):[]},pn.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?Ki(e,o,t):[]},pn.unset=function(e,t){return null==e||Ui(e,t)},pn.unzip=Rs,pn.unzipWith=Ps,pn.update=function(e,t,r){return null==e?e:ji(e,t,Vi(r))},pn.updateWith=function(e,t,r,n){return n="function"==typeof n?n:o,null==e?e:ji(e,t,Vi(r),n)},pn.values=pc,pn.valuesIn=function(e){return null==e?[]:mr(e,oc(e))},pn.without=Os,pn.words=Ec,pn.wrap=function(e,t){return fa(Vi(t),e)},pn.xor=Ms,pn.xorBy=Ns,pn.xorWith=Ds,pn.zip=Ks,pn.zipObject=function(e,t){return Hi(e||[],t||[],In)},pn.zipObjectDeep=function(e,t){return Hi(e||[],t||[],xi)},pn.zipWith=Us,pn.entries=lc,pn.entriesIn=hc,pn.extend=Wa,pn.extendWith=Ya,Mc(pn,pn),pn.add=qc,pn.attempt=kc,pn.camelCase=dc,pn.capitalize=gc,pn.ceil=Vc,pn.clamp=function(e,t,r){return r===o&&(r=t,t=o),r!==o&&(r=(r=Ha(r))==r?r:0),t!==o&&(t=(t=Ha(t))==t?t:0),Mn(Ha(e),t,r)},pn.clone=function(e){return Nn(e,d)},pn.cloneDeep=function(e){return Nn(e,h|d)},pn.cloneDeepWith=function(e,t){return Nn(e,h|d,t="function"==typeof t?t:o)},pn.cloneWith=function(e,t){return Nn(e,d,t="function"==typeof t?t:o)},pn.conformsTo=function(e,t){return null==t||Dn(e,t,ic(t))},pn.deburr=bc,pn.defaultTo=function(e,t){return null==e||e!=e?t:e},pn.divide=Gc,pn.endsWith=function(e,t,r){e=Va(e),t=Di(t);var n=e.length,i=r=r===o?n:Mn(La(r),0,n);return(r-=t.length)>=0&&e.slice(r,i)==t},pn.eq=pa,pn.escape=function(e){return(e=Va(e))&&ke.test(e)?e.replace(Se,_r):e},pn.escapeRegExp=function(e){return(e=Va(e))&&Oe.test(e)?e.replace(Pe,"\\$&"):e},pn.every=function(e,t,r){var n=ma(e)?Jt:Ln;return r&&Wo(e,t,r)&&(t=o),n(e,Do(t,3))},pn.find=Hs,pn.findIndex=bs,pn.findKey=function(e,t){return or(e,Do(t,3),Wn)},pn.findLast=qs,pn.findLastIndex=ms,pn.findLastKey=function(e,t){return or(e,Do(t,3),Yn)},pn.floor=Wc,pn.forEach=Vs,pn.forEachRight=Gs,pn.forIn=function(e,t){return null==e?e:Vn(e,Do(t,3),oc)},pn.forInRight=function(e,t){return null==e?e:Gn(e,Do(t,3),oc)},pn.forOwn=function(e,t){return e&&Wn(e,Do(t,3))},pn.forOwnRight=function(e,t){return e&&Yn(e,Do(t,3))},pn.get=$a,pn.gt=da,pn.gte=ga,pn.has=function(e,t){return null!=e&&Ho(e,t,ei)},pn.hasIn=ec,pn.head=vs,pn.identity=Tc,pn.includes=function(e,t,r,n){e=va(e)?e:pc(e),r=r&&!n?La(r):0;var i=e.length;return r<0&&(r=qr(i+r,0)),Ma(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&ar(e,t,r)>-1},pn.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:La(r);return i<0&&(i=qr(n+i,0)),ar(e,t,i)},pn.inRange=function(e,t,r){return t=Fa(t),r===o?(r=t,t=0):r=Fa(r),function(e,t,r){return e>=Vr(t,r)&&e=-M&&e<=M},pn.isSet=Oa,pn.isString=Ma,pn.isSymbol=Na,pn.isTypedArray=Da,pn.isUndefined=function(e){return e===o},pn.isWeakMap=function(e){return Ia(e)&&zo(e)==se},pn.isWeakSet=function(e){return Ia(e)&&Xn(e)==ae},pn.join=function(e,t){return null==e?"":zr.call(e,t)},pn.kebabCase=mc,pn.last=Ss,pn.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n;return r!==o&&(i=(i=La(r))<0?qr(n+i,0):Vr(i,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,i):sr(e,ur,i,!0)},pn.lowerCase=yc,pn.lowerFirst=vc,pn.lt=Ka,pn.lte=Ua,pn.max=function(e){return e&&e.length?zn(e,Tc,$n):o},pn.maxBy=function(e,t){return e&&e.length?zn(e,Do(t,2),$n):o},pn.mean=function(e){return fr(e,Tc)},pn.meanBy=function(e,t){return fr(e,Do(t,2))},pn.min=function(e){return e&&e.length?zn(e,Tc,li):o},pn.minBy=function(e,t){return e&&e.length?zn(e,Do(t,2),li):o},pn.stubArray=zc,pn.stubFalse=Hc,pn.stubObject=function(){return{}},pn.stubString=function(){return""},pn.stubTrue=function(){return!0},pn.multiply=Jc,pn.nth=function(e,t){return e&&e.length?bi(e,La(t)):o},pn.noConflict=function(){return Ot._===this&&(Ot._=gt),this},pn.noop=Nc,pn.now=$s,pn.pad=function(e,t,r){e=Va(e);var n=(t=La(t))?Tr(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return yo(Ur(i),r)+e+yo(Kr(i),r)},pn.padEnd=function(e,t,r){e=Va(e);var n=(t=La(t))?Tr(e):0;return t&&nt){var n=e;e=t,t=n}if(r||e%1||t%1){var i=Yr();return Vr(e+i*(t-e+Bt("1e-"+((i+"").length-1))),t)}return Ai(e,t)},pn.reduce=function(e,t,r){var n=ma(e)?tr:pr,i=arguments.length<3;return n(e,Do(t,4),r,i,jn)},pn.reduceRight=function(e,t,r){var n=ma(e)?rr:pr,i=arguments.length<3;return n(e,Do(t,4),r,i,Fn)},pn.repeat=function(e,t,r){return t=(r?Wo(e,t,r):t===o)?1:La(t),_i(Va(e),t)},pn.replace=function(){var e=arguments,t=Va(e[0]);return e.length<3?t:t.replace(e[1],e[2])},pn.result=function(e,t,r){var n=-1,i=(t=Gi(t,e)).length;for(i||(i=1,e=o);++nM)return[];var r=K,n=Vr(e,K);t=Do(t),e-=K;for(var i=gr(n,t);++r=s)return e;var c=r-Tr(n);if(c<1)return n;var u=a?Yi(a,0,c).join(""):e.slice(0,c);if(i===o)return u+n;if(a&&(c+=u.length-c),Pa(i)){if(e.slice(c).search(i)){var f,l=u;for(i.global||(i=rt(i.source,Va(He.exec(i))+"g")),i.lastIndex=0;f=i.exec(l);)var h=f.index;u=u.slice(0,h===o?c:h)}}else if(e.indexOf(Di(i),c)!=c){var p=u.lastIndexOf(i);p>-1&&(u=u.slice(0,p))}return u+n},pn.unescape=function(e){return(e=Va(e))&&Ee.test(e)?e.replace(_e,Pr):e},pn.uniqueId=function(e){var t=++lt;return Va(e)+t},pn.upperCase=_c,pn.upperFirst=Sc,pn.each=Vs,pn.eachRight=Gs,pn.first=vs,Mc(pn,(Yc={},Wn(pn,function(e,t){ft.call(pn.prototype,t)||(Yc[t]=e)}),Yc),{chain:!1}),pn.VERSION="4.17.11",Wt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){pn[e].placeholder=pn}),Wt(["drop","take"],function(e,t){mn.prototype[e]=function(r){r=r===o?1:qr(La(r),0);var n=this.__filtered__&&!t?new mn(this):this.clone();return n.__filtered__?n.__takeCount__=Vr(r,n.__takeCount__):n.__views__.push({size:Vr(r,K),type:e+(n.__dir__<0?"Right":"")}),n},mn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Wt(["filter","map","takeWhile"],function(e,t){var r=t+1,n=r==R||3==r;mn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Do(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}}),Wt(["head","last"],function(e,t){var r="take"+(t?"Right":"");mn.prototype[e]=function(){return this[r](1).value()[0]}}),Wt(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right");mn.prototype[e]=function(){return this.__filtered__?new mn(this):this[r](1)}}),mn.prototype.compact=function(){return this.filter(Tc)},mn.prototype.find=function(e){return this.filter(e).head()},mn.prototype.findLast=function(e){return this.reverse().find(e)},mn.prototype.invokeMap=Si(function(e,t){return"function"==typeof e?new mn(this):this.map(function(r){return ni(r,e,t)})}),mn.prototype.reject=function(e){return this.filter(ca(Do(e)))},mn.prototype.slice=function(e,t){e=La(e);var r=this;return r.__filtered__&&(e>0||t<0)?new mn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==o&&(r=(t=La(t))<0?r.dropRight(-t):r.take(t-e)),r)},mn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},mn.prototype.toArray=function(){return this.take(K)},Wn(mn.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),i=pn[n?"take"+("last"==t?"Right":""):t],s=n||/^find/.test(t);i&&(pn.prototype[t]=function(){var t=this.__wrapped__,a=n?[1]:arguments,c=t instanceof mn,u=a[0],f=c||ma(t),l=function(e){var t=i.apply(pn,er([e],a));return n&&h?t[0]:t};f&&r&&"function"==typeof u&&1!=u.length&&(c=f=!1);var h=this.__chain__,p=!!this.__actions__.length,d=s&&!h,g=c&&!p;if(!s&&f){t=g?t:new mn(this);var b=e.apply(t,a);return b.__actions__.push({func:Fs,args:[l],thisArg:o}),new bn(b,h)}return d&&g?e.apply(this,a):(b=this.thru(l),d?n?b.value()[0]:b.value():b)})}),Wt(["pop","push","shift","sort","splice","unshift"],function(e){var t=ot[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);pn.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(ma(i)?i:[],e)}return this[r](function(r){return t.apply(ma(r)?r:[],e)})}}),Wn(mn.prototype,function(e,t){var r=pn[t];if(r){var n=r.name+"";(nn[n]||(nn[n]=[])).push({name:t,func:r})}}),nn[po(o,y).name]=[{name:"wrapper",func:o}],mn.prototype.clone=function(){var e=new mn(this.__wrapped__);return e.__actions__=ro(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=ro(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=ro(this.__views__),e},mn.prototype.reverse=function(){if(this.__filtered__){var e=new mn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},mn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=ma(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},pn.prototype.plant=function(e){for(var t,r=this;r instanceof gn;){var n=hs(r);n.__index__=0,n.__values__=o,t?i.__wrapped__=n:t=n;var i=n;r=r.__wrapped__}return i.__wrapped__=e,t},pn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof mn){var t=e;return this.__actions__.length&&(t=new mn(this)),(t=t.reverse()).__actions__.push({func:Fs,args:[Cs],thisArg:o}),new bn(t,this.__chain__)}return this.thru(Cs)},pn.prototype.toJSON=pn.prototype.valueOf=pn.prototype.value=function(){return Li(this.__wrapped__,this.__actions__)},pn.prototype.first=pn.prototype.head,Ut&&(pn.prototype[Ut]=function(){return this}),pn}();Ot._=Or,(i=function(){return Or}.call(t,r,t,n))===o||(n.exports=i)}).call(this)}).call(this,r(12),r(39)(e))},function(e,t,r){"use strict";const n=r(792).extend(r(1157)),i=n.object().keys({repo:n.alternatives().try(n.object(),n.string()).allow(null),repoOwner:n.boolean().default(!0),preload:n.object().keys({enabled:n.boolean().default(!0),addresses:n.array().items(n.multiaddr().options({convert:!1})),interval:n.number().integer().default(3e4)}).allow(null),init:n.alternatives().try(n.boolean(),n.object().keys({bits:n.number().integer()})).allow(null),start:n.boolean(),local:n.boolean(),pass:n.string().allow(""),relay:n.object().keys({enabled:n.boolean(),hop:n.object().keys({enabled:n.boolean(),active:n.boolean()}).allow(null)}).allow(null),EXPERIMENTAL:n.object().keys({pubsub:n.boolean(),ipnsPubsub:n.boolean(),sharding:n.boolean(),dht:n.boolean()}).allow(null),connectionManager:n.object().allow(null),config:n.object().keys({Addresses:n.object().keys({Swarm:n.array().items(n.multiaddr().options({convert:!1})),API:n.multiaddr().options({convert:!1}),Gateway:n.multiaddr().options({convert:!1})}).allow(null),Discovery:n.object().keys({MDNS:n.object().keys({Enabled:n.boolean(),Interval:n.number().integer()}).allow(null),webRTCStar:n.object().keys({Enabled:n.boolean()}).allow(null)}).allow(null),Bootstrap:n.array().items(n.multiaddr().IPFS().options({convert:!1}))}).allow(null),libp2p:n.alternatives().try(n.func(),n.object().keys({modules:n.object().allow(null)})).allow(null)}).options({allowUnknown:!0});e.exports.validate=(e=>n.attempt(e,i))},function(e,t,r){const n=r(1158),i=r(144);e.exports={name:"multiaddr",language:{invalid:"{{message}}",fmt:"must be in {{fmt}} format"},pre(e,t,r){if(null==e)return this.createError("multiaddr.invalid",{v:e,message:"addr must be a string, Buffer, or another Multiaddr"},t,r);let i;try{i=n(e)}catch(n){return this.createError("multiaddr.invalid",{v:e,message:n.message},t,r)}return r.convert?i:e},rules:Object.keys(i).map(e=>({name:e,validate(t,r,n,o){return i[e].matches(r)?r:this.createError("multiaddr.fmt",{v:r,fmt:e},n,o)}}))}},function(e,t,r){"use strict";(function(t){const n=r(15),i=r(31),o=r(1159),s=r(640),a=r(5),c=r(9),u=r(26),f=new Error("Sorry, Not Implemented Yet."),l=u.proto(function(e){if(!(this instanceof l))return new l(e);if(null==e&&(e=""),e instanceof t)this.buffer=o.fromBuffer(e);else if("string"==typeof e||e instanceof String){if(e.length>0&&"/"!==e.charAt(0))throw new Error(`multiaddr "${e}" must start with a "/"`);this.buffer=o.fromString(e)}else{if(!(e.buffer&&e.protos&&e.protoCodes))throw new Error("addr must be a string, Buffer, or another Multiaddr");this.buffer=o.fromBuffer(e.buffer)}},{className:"Multiaddr",symbolName:"@multiformats/js-multiaddr/multiaddr"});l.prototype.toString=function(){return o.bufferToString(this.buffer)},l.prototype.toOptions=function(){const e={},t=this.toString().split("/");return e.family="ip4"===t[1]?"ipv4":"ipv6",e.host=t[2],e.transport=t[3],e.port=t[4],e},l.prototype.inspect=function(){return""},l.prototype.protos=function(){return n(this.protoCodes(),function(e){return i(s(e))})},l.prototype.protoCodes=function(){const e=[],t=this.buffer;let r=0;for(;r{if(e[0]===s.names.ipfs.code)return!0})[0][1],c.decode(e)}catch(t){e=null}return e},l.prototype.equals=function(e){return this.buffer.equals(e.buffer)},l.prototype.nodeAddress=function(){const e=this.protoCodes(),t=this.protoNames(),r=this.toString().split("/").slice(1);if(r.length<4)throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6}/{address}/{tcp, udp}/{port}".');if(4!==e[0]&&41!==e[0]&&54!==e[0]&&55!==e[0])throw new Error(`no protocol with name: "'${t[0]}'". Must have a valid family name: "{ip4, ip6, dns4, dns6}".`);if("tcp"!==r[2]&&"udp"!==r[2])throw new Error(`no protocol with name: "'${t[1]}'". Must have a valid transport protocol: "{tcp, udp}".`);return{family:41===e[0]||55===e[0]?6:4,address:r[1],port:r[3]}},l.fromNodeAddress=function(e,t){if(!e)throw new Error("requires node address object");if(!t)throw new Error("requires transport protocol");const r="IPv6"===e.family?"ip6":"ip4";return l("/"+[r,e.address,t,e.port].join("/"))},l.prototype.isThinWaistAddress=function(e){const t=(e||this).protos();return 2===t.length&&((4===t[0].code||41===t[0].code)&&(6===t[1].code||17===t[1].code))},l.prototype.fromStupidString=function(e){throw f},l.protocols=s,l.isName=function(e){return!!l.isMultiaddr(e)&&e.protos().some(e=>e.resolvable)},l.resolve=function(e,t){return l.isMultiaddr(e)&&l.isName(e)?t(new Error("not implemented yet")):t(new Error("not a valid name"))},e.exports=l}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(15),i=r(44),o=r(1160),s=r(640),a=r(5);function c(e){const t=[],r=e.split("/").slice(1);if(1===r.length&&""===r[0])return[];for(let n=0;n=r.length)throw v("invalid address: "+e);t.push([i,r[n]])}else t.push([i])}return t}function u(e){const t=[];return n(e,function(e){const r=w(e);t.push(r.name),e.length>1&&t.push(e[1])}),"/"+t.join("/")}function f(e){return n(e,function(e){Array.isArray(e)||(e=[e]);const t=w(e);return e.length>1?[t.code,o.toBuffer(t.code,e[1])]:[t.code]})}function l(e){return n(e,function(e){const t=w(e);return e.length>1?[t.code,o.toString(t.code,e[1])]:[t.code]})}function h(e){return b(t.concat(n(e,function(e){const r=w(e);let n=t.from(a.encode(r.code));return e.length>1&&(n=t.concat([n,e[1]])),n})))}function p(e,t){if(e.size>0)return e.size/8;if(0===e.size)return 0;return a.decode(t)+a.decode.bytes}function d(e){const t=[];let r=0;for(;re.length)throw v("Invalid address buffer: "+e.toString("hex"));t.push([n,c])}return t}function g(e){return h(f(c(e=y(e))))}function b(e){const r=m(e);if(r)throw r;return t.from(e)}function m(e){try{d(e)}catch(e){return e}}function y(e){return"/"+i(e.trim().split("/")).join("/")}function v(e){return new Error("Error parsing address: "+e)}function w(e){return s(e[0])}e.exports={stringToStringTuples:c,stringTuplesToString:u,tuplesToStringTuples:l,stringTuplesToTuples:f,bufferToTuples:d,tuplesToBuffer:h,bufferToString:function(e){return u(l(d(e)))},stringToBuffer:g,fromString:function(e){return g(e)},fromBuffer:b,validateBuffer:m,isValidBuffer:function(e){return void 0===m(e)},cleanPath:y,ParseError:v,protoFromTuple:w,sizeForAddr:p}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(45),i=r(46),o=r(640),s=r(9),a=r(5);function c(e,r){return r instanceof t?c.toString(e,r):c.toBuffer(e,r)}function u(e){if(!e.isValid())throw new Error("invalid ip address");return n.toBuffer(e.address)}e.exports=c,c.toString=function(e,t){switch((e=o(e)).code){case 4:case 41:return n.toString(t);case 6:case 17:case 33:case 132:return function(e){return e.readUInt16BE(0)}(t);case 54:case 55:case 56:return function(e){const t=a.decode(e);if((e=e.slice(a.decode.bytes)).length!==t)throw new Error("inconsistent lengths");return e.toString()}(t);case 421:return function(e){const t=a.decode(e),r=e.slice(a.decode.bytes);if(r.length!==t)throw new Error("inconsistent lengths");return s.encode(r)}(t);default:return t.toString("hex")}},c.toBuffer=function(e,r){switch((e=o(e)).code){case 4:return u(new i.Address4(r));case 41:return u(new i.Address6(r));case 6:case 17:case 33:case 132:return function(e){const r=t.alloc(2);return r.writeUInt16BE(e,0),r}(parseInt(r,10));case 54:case 55:case 56:return function(e){const r=t.from(e),n=t.from(a.encode(r.length));return t.concat([n,r])}(r);case 421:return function(e){const r=t.from(s.decode(e)),n=t.from(a.encode(r.length));return t.concat([n,r])}(r);default:return t.from(r,"hex")}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(10),i=r(641).errors;e.exports=(e=>{e.log("booting");const t=e._options,r=t.init,o=t.start;n([t=>{if(!e._repo.closed)return t(null,!0);e._repo.open((e,r)=>(function(e){if(!e)return!1;if(e.code===i.ERR_REPO_NOT_INITIALIZED)return!0;if(e.message.match(/not found/)||e.message.match(/ENOENT/)||e.message.match(/No value/))return!0;return!1})(e)?t(null,!1):e?t(e):void t(null,!0))},(n,i)=>{if(n)return e.init({repo:e._repo},e=>{if(e)return i(Object.assign(e,{emitted:!0}));i()});if(r){const r=Object.assign({bits:2048,pass:e._options.pass},"object"==typeof t.init?t.init:{});return e.init(r,e=>{if(e)return i(Object.assign(e,{emitted:!0}));i()})}i()},t=>{if(!o)return t();e.start(e=>{if(e)return t(Object.assign(e,{emitted:!0}));t()})}],t=>{t?t.emitted||e.emit("error",t):(e.log("booted"),e.emit("ready"))})})},function(e,t,r){"use strict";t.create=function(e,t,r){return new(0,r.storageBackends[e])(t,Object.assign({},r.storageBackendOptions[e]||{}))}},function(e,t,r){"use strict";(function(t){const n=r(34).Key,i=r(11)("repo:version"),o=new n("version");e.exports=(e=>({exists(t){e.has(o,t)},get(t){e.get(o,(e,r)=>{if(e)return t(e);t(null,parseInt(r.toString().trim(),10))})},set(r,n){e.put(o,t.from(String(r)),n)},check(e,t){this.get((r,n)=>{if(r)return t(r);if(i("comparing version: %s and %s",n,e),n!==e&&!(6===n&&7===e||6===e&&7===n))return t(new Error(`ipfs repo needs migration: expected version v${e}, found version v${n}`));t()})}}))}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(34).Key,i=r(333),o=r(10),s=r(332),a=r(749),c=r(750),u=r(3).Buffer,f=new n("config");e.exports=(e=>{const t=i(function(e,t){const i=e.key,s=e.value;i?o([e=>r.get(e),(e,t)=>t(null,a(e,i,s)),n],t):n(s,t)},1),r={get(t,r){"function"==typeof t&&(r=t,t=void 0),t||(t=void 0),e.get(f,(e,n)=>{if(e)return r(e);let i;try{i=JSON.parse(n.toString())}catch(e){return r(e)}if(void 0!==t&&!c(i,t))return r(new Error("Key "+t+" does not exist in config"));const o=void 0!==t?s(i,t):i;r(null,o)})},set(e,r,n){if("function"==typeof r)n=r,r=e,e=void 0;else if(!e||"string"!=typeof e)return n(new Error("Invalid key type"));if(void 0===r||u.isBuffer(r))return n(new Error("Invalid value type"));t.push({key:e,value:r},n)},exists(t){e.has(f,t)}};return r;function n(t,r){const n=u.from(JSON.stringify(t,null,2));e.put(f,n,r)}})},function(e,t,r){"use strict";(function(t){const n=r(34).Key,i=r(751),o=new n("datastore_spec");e.exports=(e=>({exists(t){e.has(o,t)},get(t){e.get(o,(e,r)=>{if(e)return t(e);t(null,JSON.parse(r.toString()))})},set(r,n){e.put(o,t.from(JSON.stringify(i(r,{deep:!0}))),n)}}))}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(34).Key,i=r(3).Buffer,o=new n("api");e.exports=(e=>({get(t){e.get(o,(e,r)=>t(e,r&&r.toString()))},set(t,r){e.put(o,i.from(t.toString()),r)},delete(t){e.delete(o,t)}}))},function(e,t,r){"use strict";const n=r(627),i=n.ShardingDatastore,o=r(34).Key,s=r(754),a=r(331),c=r(7),u=r(628),f=r(16),l=r(14),h=e=>(e=>{const t=new s.Encoder;return new o("/"+t.write(e).finalize(),!1)})(e.buffer);function p(e){try{return 0===e.version?e.toV1():e.toV0()}catch(e){return null}}e.exports=((e,t,r)=>{!function(e,t,r){if(t.sharding){const t=new n.shard.NextToLast(2);i.createOrOpen(e,t,r)}else c(()=>r(null,e))}(e,t,(e,t)=>{if(e)return r(e);r(null,function(e){return{query(t,r){l(e.query(t),l.collect(r))},get(t,r){if(!f.isCID(t))return c(()=>{r(new Error("Not a valid cid"))});const n=h(t);e.get(n,(i,o)=>{if(i){if("ERR_NOT_FOUND"===i.code){const o=p(t);if(!o)return r(i);const s=h(o);return e.get(s,(i,o)=>{if(i)return r(i);e.put(n,o,e=>{if(e)return r(e);r(null,new a(o,t))})})}return r(i)}r(null,new a(o,t))})},put(t,r){if(!a.isBlock(t))return c(()=>{r(new Error("invalid block"))});const n=h(t.cid);e.has(n,(i,o)=>i?r(i):o?r():void e.put(n,t.data,r))},putMany(t,r){const n=t.map(e=>({key:h(e.cid),block:e})),i=e.batch();u(n,(t,r)=>e.has(t.key,r),(e,t)=>{if(e)return r(e);t.forEach(e=>{i.put(e.key,e.block.data)}),i.commit(r)})},has(t,r){if(!f.isCID(t))return c(()=>{r(new Error("Not a valid cid"))});e.has(h(t),(n,i)=>{if(n)return r(n);if(i)return r(null,!0);const o=p(t);if(!o)return r(null,!1);e.has(h(o),r)})},delete(t,r){if(!f.isCID(t))return c(()=>{r(new Error("Not a valid cid"))});e.delete(h(t),r)},close(t){e.close(t)}}}(t))})})},function(e,t,r){"use strict";e.exports={lock:"memory",storageBackends:{root:r(153),blocks:r(153),keys:r(153),datastore:r(153)},storageBackendOptions:{root:{extension:""},blocks:{sharding:!1},keys:{sharding:!1}}}},function(e,t,r){"use strict";e.exports={Spec:{type:"mount",mounts:[{mountpoint:"/blocks",type:"measure",prefix:"flatfs.datastore",child:{type:"flatfs",path:"blocks",sync:!0,shardFunc:"/repo/flatfs/shard/v1/next-to-last/2"}},{mountpoint:"/",type:"measure",prefix:"leveldb.datastore",child:{type:"levelds",path:"datastore",compression:"none"}}]}}},function(e,t,r){"use strict";t.ERR_REPO_NOT_INITIALIZED="ERR_REPO_NOT_INITIALIZED"},function(e,t,r){"use strict";e.exports={repoVersion:7}},function(e,t,r){"use strict";t.preStart=r(1173),t.start=r(1259),t.stop=r(1319),t.isOnline=r(1320),t.version=r(1321),t.id=r(1322),t.repo=r(822),t.init=r(1323),t.bootstrap=r(1325),t.config=r(1326),t.block=r(1327),t.object=r(1328),t.dag=r(1329),t.libp2p=r(1334),t.swarm=r(1654),t.ping=r(1655),t.pingPullStream=r(1656),t.pingReadableStream=r(1657),t.pin=r(1658),t.filesRegular=r(1666),t.filesMFS=r(1724),t.bitswap=r(953),t.pubsub=r(1764),t.dht=r(1765),t.dns=r(1768),t.key=r(1770),t.stats=r(1771),t.resolve=r(1772),t.name=r(1774)},function(e,t,r){"use strict";const n=r(41),i=r(343),o=r(345),s=r(10),a=r(794),c=r(291),u=r(1258);e.exports=function(e){return t=>{e.log("pre-start");const r=e._options.pass;s([t=>e._repo.config.get(t),(t,r)=>{if(!e._options.config)return r(null,t);t=c(e._options.config,t),e.config.replace(t,e=>{if(e)return r(e);r(null,t)})},(t,r)=>{if(t.Keychain)return r(null,t);t.Keychain=a.generateOptions(),e.config.set("Keychain",t.Keychain,n=>{e.log("using default keychain options"),r(n,t)})},(t,n)=>{if(e._keychain) ;else if(r){const n=Object.assign({passPhrase:r},t.Keychain);e._keychain=new a(e._repo.keys,n),e.log("keychain constructed")}else e._keychain=new u,e.log("no keychain, use --pass");n(null,t)},(e,t)=>{const r=e.Identity.PrivKey;n.createFromPrivKey(r,(r,n)=>{t(r,e,n)})},(t,n,i)=>{if(!r)return i(null,t,n);e._keychain.findKeyByName("self",r=>{if(r)return e.log('Creating "self" key'),e._keychain.importPeer("self",n,e=>i(e,t,n));i(null,t,n)})},(t,r,n)=>{e.log("peer created"),e._peerInfo=new i(r),t.Addresses&&t.Addresses.Swarm&&t.Addresses.Swarm.forEach(t=>{let r=o(t);r.getPeerId()&&(r=r.encapsulate("/ipfs/"+e._peerInfo.id.toB58String())),e._peerInfo.multiaddrs.add(r)}),n()},t=>e.pin._load(t)],t)}}},function(e,t,r){"use strict";const n=r(1175),i=r(1179),o=r(1234),s=r(34),a=r(14),c=r(809),u=r(1250),f=r(1255),l="/pkcs8/",h="/info/",p={minKeyLength:14,minSaltLength:16,minIterationCount:1e3},d={dek:{keyLength:64,iterationCount:1e4,salt:"you should override this value with a crypto secure random number",hash:"sha2-512"}};function g(e){return!!e&&(!!c(e)&&e===n(e.trim()))}function b(e,t){const r=800*Math.random()+200;"string"==typeof t&&(t=new Error(t)),setTimeout(e,r,t,null)}function m(e){return new s.Key(l+e)}function y(e){return new s.Key(h+e)}e.exports=class{constructor(e,t){if(!e)throw new Error("store is required");this.store=e;const r={};if(i(r,d,t),!r.passPhrase||r.passPhrase.length<20)throw new Error("passPhrase must be least 20 characters");if(r.dek.keyLengthn})}get cms(){return new f(this)}static generateOptions(){const e=Object.assign({},d),t=3*Math.ceil(p.minSaltLength/3);return e.dek.salt=o.randomBytes(t).toString("base64"),e}static get options(){return d}createKey(e,t,r,n){const i=this;if(!g(e)||"self"===e)return b(n,`Invalid key name '${e}'`);if(!c(t))return b(n,`Invalid key type '${t}'`);if(!u(r))return b(n,`Invalid key size '${r}'`);const s=m(e);i.store.has(s,(a,c)=>{if(a)return b(n,a);if(c)return b(n,`Key '${e}' already exists`);switch(t.toLowerCase()){case"rsa":if(r<2048)return b(n,`Invalid RSA key size ${r}`)}o.keys.generateKeyPair(t,r,(t,r)=>{if(t)return b(n,t);r.id((t,o)=>{if(t)return b(n,t);r.export(this._(),(t,r)=>{if(t)return b(n,t);const a={name:e,id:o},c=i.store.batch();c.put(s,r),c.put(y(e),JSON.stringify(a)),c.commit(e=>{if(e)return b(n,e);n(null,a)})})})})})}listKeys(e){const t={prefix:h};a(this.store.query(t),a.collect((t,r)=>{if(t)return b(e,t);const n=r.map(e=>JSON.parse(e.value));e(null,n)}))}findKeyById(e,t){this.listKeys((r,n)=>{if(r)return b(t,r);const i=n.find(t=>t.id===e);t(null,i)})}findKeyByName(e,t){if(!g(e))return b(t,`Invalid key name '${e}'`);const r=y(e);this.store.get(r,(r,n)=>{if(r)return b(t,`Key '${e}' does not exist. ${r.message}`);t(null,JSON.parse(n.toString()))})}removeKey(e,t){const r=this;if(!g(e)||"self"===e)return b(t,`Invalid key name '${e}'`);const n=m(e);r.findKeyByName(e,(i,o)=>{if(i)return b(t,i);const s=r.store.batch();s.delete(n),s.delete(y(e)),s.commit(e=>{if(e)return b(t,e);t(null,o)})})}renameKey(e,t,r){const n=this;if(!g(e)||"self"===e)return b(r,`Invalid old key name '${e}'`);if(!g(t)||"self"===t)return b(r,`Invalid new key name '${t}'`);const i=m(e),o=m(t),s=y(e),a=y(t);this.store.get(i,(c,u)=>{if(c)return b(r,`Key '${e}' does not exist. ${c.message}`);const f=u.toString();n.store.has(o,(e,c)=>e?b(r,e):c?b(r,`Key '${t}' already exists`):void n.store.get(s,(e,c)=>{if(e)return b(r,e);const u=JSON.parse(c.toString());u.name=t;const l=n.store.batch();l.put(o,f),l.put(a,JSON.stringify(u)),l.delete(i),l.delete(s),l.commit(e=>{if(e)return b(r,e);r(null,u)})}))})}exportKey(e,t,r){if(!g(e))return b(r,`Invalid key name '${e}'`);if(!t)return b(r,"Password is required");const n=m(e);this.store.get(n,(n,i)=>{if(n)return b(r,`Key '${e}' does not exist. ${n.message}`);const s=i.toString();o.keys.import(s,this._(),(e,n)=>{if(e)return b(r,e);n.export(t,r)})})}importKey(e,t,r,n){const i=this;if(!g(e)||"self"===e)return b(n,`Invalid key name '${e}'`);if(!t)return b(n,"PEM encoded key is required");const s=m(e);i.store.has(s,(a,c)=>a?b(n,a):c?b(n,`Key '${e}' already exists`):void o.keys.import(t,r,(t,r)=>{if(t)return b(n,"Cannot read the key, most likely the password is wrong");r.id((t,o)=>{if(t)return b(n,t);r.export(this._(),(t,r)=>{if(t)return b(n,t);const a={name:e,id:o},c=i.store.batch();c.put(s,r),c.put(y(e),JSON.stringify(a)),c.commit(e=>{if(e)return b(n,e);n(null,a)})})})}))}importPeer(e,t,r){const n=this;if(!g(e))return b(r,`Invalid key name '${e}'`);if(!t||!t.privKey)return b(r,"Peer.privKey is required");const i=t.privKey,o=m(e);n.store.has(o,(t,s)=>t?b(r,t):s?b(r,`Key '${e}' already exists`):void i.id((t,s)=>{if(t)return b(r,t);i.export(this._(),(t,i)=>{if(t)return b(r,t);const a={name:e,id:s},c=n.store.batch();c.put(o,i),c.put(y(e),JSON.stringify(a)),c.commit(e=>{if(e)return b(r,e);r(null,a)})})}))}_getPrivateKey(e,t){if(!g(e))return b(t,`Invalid key name '${e}'`);this.store.get(m(e),(r,n)=>{if(r)return b(t,`Key '${e}' does not exist. ${r.message}`);t(null,n.toString())})}}},function(e,t,r){"use strict";var n=r(1176),i=/[\/\?<>\\:\*\|":]/g,o=/[\x00-\x1f\x80-\x9f]/g,s=/^\.+$/,a=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,c=/[\. ]+$/;function u(e,t){var r=e.replace(i,t).replace(o,t).replace(s,t).replace(a,t).replace(c,t);return n(r,255)}e.exports=function(e,t){var r=t&&t.replacement||"",n=u(e,r);return""===r?n:u(n,"")}},function(e,t,r){"use strict";var n=r(1177),i=r(1178);e.exports=n.bind(null,i)},function(e,t,r){"use strict";function n(e){return e>=55296&&e<=56319}function i(e){return e>=56320&&e<=57343}e.exports=function(e,t,r){if("string"!=typeof t)throw new Error("Input must be string");for(var o,s,a=t.length,c=0,u=0;ur)return t.slice(0,u-s.length+1)}return t}},function(e,t,r){"use strict";function n(e){return e>=55296&&e<=56319}function i(e){return e>=56320&&e<=57343}e.exports=function(e){if("string"!=typeof e)throw new Error("Input must be string");for(var t=e.length,r=0,o=null,s=null,a=0;a=128&&o<=2047?r+=2:o>=2048&&o<=65535&&(r+=3),s=o;return r}},function(e,t,r){var n=r(1180),i=r(1226)(function(e,t,r){n(e,t,r)});e.exports=i},function(e,t,r){var n=r(1181),i=r(797),o=r(1209),s=r(1211),a=r(106),c=r(801),u=r(800);e.exports=function e(t,r,f,l,h){t!==r&&o(r,function(o,c){if(a(o))h||(h=new n),s(t,r,c,f,e,l,h);else{var p=l?l(u(t,c),o,c+"",t,r,h):void 0;void 0===p&&(p=o),i(t,c,p)}},c)}},function(e,t,r){var n=r(346),i=r(1187),o=r(1188),s=r(1189),a=r(1190),c=r(1191);function u(e){var t=this.__data__=new n(e);this.size=t.size}u.prototype.clear=i,u.prototype.delete=o,u.prototype.get=s,u.prototype.has=a,u.prototype.set=c,e.exports=u},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,r){var n=r(347),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0||(r==t.length-1?t.pop():i.call(t,r,1),--this.size,0))}},function(e,t,r){var n=r(347);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},function(e,t,r){var n=r(347);e.exports=function(e){return n(this.__data__,e)>-1}},function(e,t,r){var n=r(347);e.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},function(e,t,r){var n=r(346);e.exports=function(){this.__data__=new n,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,r){var n=r(346),i=r(795),o=r(796),s=200;e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!i||a.length1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(s=e.length>3&&"function"==typeof s?(o--,s):void 0,a&&i(r[0],r[1],a)&&(s=o<3?void 0:s,o=1),t=Object(t);++n0){if(++t>=r)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,r){var n=r(348),i=r(152),o=r(736),s=r(106);e.exports=function(e,t,r){if(!s(r))return!1;var a=typeof t;return!!("number"==a?i(r)&&o(t,r.length):"string"==a&&t in r)&&n(r[t],e)}},function(e,t,r){"use strict";const n=r(803),i=r(1236),o=r(1238);(t=e.exports).aes=i,t.hmac=n,t.keys=o,t.randomBytes=r(808),t.pbkdf2=r(1249)},function(e,t,r){"use strict";e.exports={SHA1:20,SHA256:32,SHA512:64}},function(e,t,r){"use strict";const n=r(1237),i={16:"aes-128-ctr",32:"aes-256-ctr"};t.create=function(e,t,r){const o=i[e.length];if(!o)return r(new Error("Invalid key length"));const s=n.createCipheriv(o,e,t),a=n.createDecipheriv(o,e,t);r(null,{encrypt(e,t){t(null,s.update(e))},decrypt(e,t){t(null,a.update(e))}})}},function(e,t,r){"use strict";const n=r(78);e.exports={createCipheriv:n.createCipheriv,createDecipheriv:n.createDecipheriv}},function(e,t,r){"use strict";(function(n){const i=r(19)(r(646)),o=r(25);t=e.exports;const s={rsa:r(1239),ed25519:r(1244),secp256k1:r(84)(i,r(808))};function a(e){return void 0!==s[e.toLowerCase()]}t.supportedKeys=s,t.keysPBM=i,t.keyStretcher=r(1246),t.generateEphemeralKeyPair=r(1247),t.generateKeyPair=((e,t,r)=>{let n=s[e.toLowerCase()];if(!n)return r(new Error("invalid or unsupported key type"));n.generateKeyPair(t,r)}),t.generateKeyPairFromSeed=((e,t,r,n)=>{let i=s[e.toLowerCase()];return i?"ed25519"!==e.toLowerCase()?n(new Error("Seed key derivation is unimplemented for RSA or secp256k1")):void i.generateKeyPairFromSeed(t,r,n):n(new Error("invalid or unsupported key type"))}),t.unmarshalPublicKey=(e=>{const t=i.PublicKey.decode(e),r=t.Data;switch(t.Type){case i.KeyType.RSA:return s.rsa.unmarshalRsaPublicKey(r);case i.KeyType.Ed25519:return s.ed25519.unmarshalEd25519PublicKey(r);case i.KeyType.Secp256k1:if(s.secp256k1)return s.secp256k1.unmarshalSecp256k1PublicKey(r);throw new Error("secp256k1 support requires libp2p-crypto-secp256k1 package");default:throw new Error("invalid or unsupported key type")}}),t.marshalPublicKey=((e,t)=>{if(!a(t=(t||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type");return e.bytes}),t.unmarshalPrivateKey=((e,t)=>{let r;try{r=i.PrivateKey.decode(e)}catch(e){return t(e)}const n=r.Data;switch(r.Type){case i.KeyType.RSA:return s.rsa.unmarshalRsaPrivateKey(n,t);case i.KeyType.Ed25519:return s.ed25519.unmarshalEd25519PrivateKey(n,t);case i.KeyType.Secp256k1:return s.secp256k1?s.secp256k1.unmarshalSecp256k1PrivateKey(n,t):t(new Error("secp256k1 support requires libp2p-crypto-secp256k1 package"));default:t(new Error("invalid or unsupported key type"))}}),t.marshalPrivateKey=((e,t)=>{if(!a(t=(t||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type");return e.bytes}),t.import=((e,t,r)=>{try{const i=o.pki.decryptRsaPrivateKey(e,t);if(null===i)throw new Error("Cannot read the key, most likely the password is wrong or not a RSA key");let a=o.asn1.toDer(o.pki.privateKeyToAsn1(i));return a=n.from(a.getBytes(),"binary"),s.rsa.unmarshalRsaPrivateKey(a,r)}catch(e){r(e)}})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(804),i=r(19),o=r(9),s=r(806),a=i(r(646)),c=r(25),u=r(7);class f{constructor(e){this._key=e}verify(e,t,r){h(r),s.hashAndVerify(this._key,t,e,r)}marshal(){return s.utils.jwkToPkix(this._key)}get bytes(){return a.PublicKey.encode({Type:a.KeyType.RSA,Data:this.marshal()})}encrypt(e){return this._key.encrypt(e,"RSAES-PKCS1-V1_5")}equals(e){return this.bytes.equals(e.bytes)}hash(e){h(e),n(this.bytes,"sha2-256",e)}}class l{constructor(e,t){this._key=e,this._publicKey=t}genSecret(){return s.getRandomValues(new Uint8Array(16))}sign(e,t){h(t),s.hashAndSign(this._key,e,t)}get public(){if(!this._publicKey)throw new Error("public key not provided");return new f(this._publicKey)}decrypt(e,t){s.decrypt(this._key,e,t)}marshal(){return s.utils.jwkToPkcs1(this._key)}get bytes(){return a.PrivateKey.encode({Type:a.KeyType.RSA,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){h(e),n(this.bytes,"sha2-256",e)}id(e){this.public.hash((t,r)=>{if(t)return e(t);e(null,o.encode(r))})}export(e,t,r){"function"==typeof t&&(r=t,t=e,e="pkcs-8"),h(r),u(()=>{let n=null,i=null;try{const r=new c.util.ByteBuffer(this.marshal()),o=c.asn1.fromDer(r),s=c.pki.privateKeyFromAsn1(o);if("pkcs-8"===e){const e={algorithm:"aes256",count:1e4,saltSize:16,prfAlgorithm:"sha512"};i=c.pki.encryptRsaPrivateKey(s,t,e)}else n=new Error(`Unknown export format '${e}'`)}catch(e){n=e}r(n,i)})}}function h(e){if("function"!=typeof e)throw new Error("callback is required")}e.exports={RsaPublicKey:f,RsaPrivateKey:l,unmarshalRsaPublicKey:function(e){const t=s.utils.pkixToJwk(e);return new f(t)},unmarshalRsaPrivateKey:function(e,t){const r=s.utils.pkcs1ToJwk(e);s.unmarshalPrivateKey(r,(e,r)=>{if(e)return t(e);t(null,new l(r.privateKey,r.publicKey))})},generateKeyPair:function(e,t){s.generateKey(e,(e,r)=>{if(e)return t(e);t(null,new l(r.privateKey,r.publicKey))})},fromJwk:function(e,t){s.unmarshalPrivateKey(e,(e,r)=>{if(e)return t(e);t(null,new l(r.privateKey,r.publicKey))})}}},function(e,t,r){"use strict";(function(t){const n=r(55),i=r(56),o=r(805),s=r(1241),a=o.toCallback,c=o.toBuf,u=o.fromString,f=o.fromNumberTo32BitBuf;e.exports={sha1:s.sha1,sha2256:s.sha2256,sha2512:s.sha2512,sha3512:a(c(n.sha3_512)),sha3384:a(c(n.sha3_384)),sha3256:a(c(n.sha3_256)),sha3224:a(c(n.sha3_224)),shake128:a(c(n.shake_128,256)),shake256:a(c(n.shake_256,512)),keccak224:a(c(n.keccak_224)),keccak256:a(c(n.keccak_256)),keccak384:a(c(n.keccak_384)),keccak512:a(c(n.keccak_512)),murmur3128:a(c(u(i.x64.hash128))),murmur332:a(f(u(i.x86.hash32))),addBlake:r(1242),dblSha2256:(e,r)=>{s.sha2256(e,(e,n)=>{e&&r(e),s.sha2256(t.from(n),r)})}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(57),i=function(){if(self.crypto)return self.crypto.subtle||self.crypto.webkitSubtle;if(self.msCrypto)return self.msCrypto.subtle}();function o(e){if(!i)throw new Error("Please use a browser with webcrypto support");return(r,o)=>{const s=i.digest({name:e},r);if("function"!=typeof s.then)return s.onerror=(()=>{o(new Error(`hashing data using ${e}`))}),void(s.oncomplete=(e=>{o(null,e.target.result)}));n(s.then(e=>t.from(new Uint8Array(e))),o)}}e.exports={sha1:function(e,t){o("SHA-1")(e,t)},sha2256:function(e,t){o("SHA-256")(e,t)},sha2512:function(e,t){o("SHA-512")(e,t)}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(58),i=r(805).toCallback,o={init:n.blake2bInit,update:n.blake2bUpdate,digest:n.blake2bFinal},s={init:n.blake2sInit,update:n.blake2sUpdate,digest:n.blake2sFinal},a=(e,r)=>i(n=>{const i=r.init(e,null);return r.update(i,n),t.from(r.digest(i))});e.exports=(e=>{for(let t=0;t<64;t++)e[45569+t]=a(t+1,o);for(let t=0;t<32;t++)e[45633+t]=a(t+1,s)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(21),i=r(807),o=i.toBase64,s=i.toBn,a=n.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}),c=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid({"1.2.840.113549.1.1.1":"rsa"}),this.key("none").optional().null_(),this.key("curve").optional().objid(),this.key("params").optional().seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()))}),u=n.define("RSAPublicKey",function(){this.seq().obj(this.key("algorithm").use(c),this.key("subjectPublicKey").bitstr())}),f=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});t.pkcs1ToJwk=function(e){const t=a.decode(e,"der");return{kty:"RSA",n:o(t.modulus),e:o(t.publicExponent),d:o(t.privateExponent),p:o(t.prime1),q:o(t.prime2),dp:o(t.exponent1),dq:o(t.exponent2),qi:o(t.coefficient),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkcs1=function(e){return a.encode({version:0,modulus:s(e.n),publicExponent:s(e.e),privateExponent:s(e.d),prime1:s(e.p),prime2:s(e.q),exponent1:s(e.dp),exponent2:s(e.dq),coefficient:s(e.qi)},"der")},t.pkixToJwk=function(e){const t=u.decode(e,"der"),r=f.decode(t.subjectPublicKey.data,"der");return{kty:"RSA",n:o(r.modulus),e:o(r.publicExponent),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkix=function(e){return u.encode({algorithm:{algorithm:"rsa",none:null},subjectPublicKey:{data:f.encode({modulus:s(e.n),publicExponent:s(e.e)},"der")}},"der")}},function(e,t,r){"use strict";(function(t){const n=r(804),i=r(19),o=r(9),s=r(1245),a=i(r(646));class c{constructor(e){this._key=l(e,s.publicKeyLength)}verify(e,t,r){f(r),s.hashAndVerify(this._key,t,e,r)}marshal(){return t.from(this._key)}get bytes(){return a.PublicKey.encode({Type:a.KeyType.Ed25519,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){f(e),n(this.bytes,"sha2-256",e)}}class u{constructor(e,t){this._key=l(e,s.privateKeyLength),this._publicKey=l(t,s.publicKeyLength)}sign(e,t){f(t),s.hashAndSign(this._key,e,t)}get public(){if(!this._publicKey)throw new Error("public key not provided");return new c(this._publicKey)}marshal(){return t.concat([t.from(this._key),t.from(this._publicKey)])}get bytes(){return a.PrivateKey.encode({Type:a.KeyType.Ed25519,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){f(e),n(this.bytes,"sha2-256",e)}id(e){this.public.hash((t,r)=>{if(t)return e(t);e(null,o.encode(r))})}}function f(e){if("function"!=typeof e)throw new Error("callback is required")}function l(e,r){if(t.isBuffer(e)&&(e=new Uint8Array(e)),!(e instanceof Uint8Array)||e.length!==r)throw new Error("Key must be a Uint8Array or Buffer of length "+r);return e}e.exports={Ed25519PublicKey:c,Ed25519PrivateKey:u,unmarshalEd25519PrivateKey:function(e,t){try{e=l(e,s.privateKeyLength+s.publicKeyLength)}catch(e){return t(e)}const r=e.slice(0,s.privateKeyLength),n=e.slice(s.privateKeyLength,e.length);t(null,new u(r,n))},unmarshalEd25519PublicKey:function(e){return e=l(e,s.publicKeyLength),new c(e)},generateKeyPair:function(e,t){void 0===t&&"function"==typeof e&&(t=e),s.generateKey((e,r)=>{if(e)return t(e);let n;try{n=new u(r.secretKey,r.publicKey)}catch(e){return void t(e)}t(null,n)})},generateKeyPairFromSeed:function(e,t,r){void 0===r&&"function"==typeof t&&(r=t),s.generateKeyFromSeed(e,(e,t)=>{if(e)return r(e);let n;try{n=new u(t.secretKey,t.publicKey)}catch(e){return void r(e)}r(null,n)})}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(e){const n=r(83),i=r(7);t.publicKeyLength=n.sign.publicKeyLength,t.privateKeyLength=n.sign.secretKeyLength,t.generateKey=function(e){i(()=>{let t;try{t=n.sign.keyPair()}catch(t){return e(t)}e(null,t)})},t.generateKeyFromSeed=function(e,t){i(()=>{let r;try{r=n.sign.keyPair.fromSeed(e)}catch(e){return t(e)}t(null,r)})},t.hashAndSign=function(t,r,o){i(()=>{o(null,e.from(n.sign.detached(r,t)))})},t.hashAndVerify=function(e,t,r,o){i(()=>{let i;try{i=n.sign.detached.verify(r,t,e)}catch(e){return o(e)}o(null,i)})}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(64),i=r(803),o={"AES-128":{ivSize:16,keySize:16},"AES-256":{ivSize:16,keySize:32},Blowfish:{ivSize:8,cipherKeySize:32}};e.exports=((e,r,s,a)=>{const c=o[e];if(!c)return a(new Error("unkown cipherType passed"));if(!r)return a(new Error("unkown hashType passed"));const u=c.keySize,f=c.ivSize,l=t.from("key expansion"),h=2*(f+u+20);i.create(r,s,(e,r)=>{if(e)return a(e);r.digest(l,(e,i)=>{if(e)return a(e);let o=[],s=0;n(()=>s{if(t)return e(t);let a=n.length;s+a>h&&(a=h-s),o.push(n),s+=a,r.digest(i,(t,r)=>{if(t)return e(t);i=r,e()})})},function(e){if(e)return a(e);const r=h/2,n=t.concat(o),i=n.slice(0,r),s=n.slice(r,h),c=e=>({iv:e.slice(0,f),cipherKey:e.slice(f,f+u),macKey:e.slice(f+u)});a(null,{k1:c(i),k2:c(s)})})})})})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(1248);e.exports=((e,t)=>{n.generateEphmeralKeyPair(e,t)})},function(e,t,r){"use strict";(function(e){const n=r(645)(),i=r(644),o=r(21).bignum,s=r(807),a=s.toBase64,c=s.toBn,u={"P-256":256,"P-384":384,"P-521":521};t.generateEphmeralKeyPair=function(t,r){i(n.subtle.generateKey({name:"ECDH",namedCurve:t},!0,["deriveBits"]).then(r=>{const s=(s,c,f)=>{let l;"function"==typeof c&&(f=c,c=void 0),l=c?n.subtle.importKey("jwk",function(e,t){const r=h(e,t.public);return r.d=a(new o(t.private)),r}(t,c),{name:"ECDH",namedCurve:t},!1,["deriveBits"]):Promise.resolve(r.privateKey);const p=Promise.all([n.subtle.importKey("jwk",h(t,s),{name:"ECDH",namedCurve:t},!1,[]),l]);i(p.then(e=>n.subtle.deriveBits({name:"ECDH",namedCurve:t,public:e[0]},e[1],u[t])).then(t=>e.from(t)),f)};return n.subtle.exportKey("jwk",r.publicKey).then(e=>({key:l(e),genSharedKey:s}))}),r)};const f={"P-256":32,"P-384":48,"P-521":66};function l(t){const r=f[t.crv];return e.concat([e.from([4]),c(t.x).toArrayLike(e,"be",r),c(t.y).toArrayLike(e,"be",r)],1+2*r)}function h(t,r){const n=f[t];if(!r.slice(0,1).equals(e.from([4])))throw new Error("Invalid key format");const i=new o(r.slice(1,n+1)),s=new o(r.slice(1+n));return{kty:"EC",crv:t,x:a(i,n),y:a(s,n),ext:!0}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(25),i={sha1:"sha1","sha2-256":"sha256","sha2-512":"sha512"};e.exports=function(e,t,r,o,s){const a=i[s];if(!a)throw new Error(`Hash '${s}' is unknown or not supported`);const c=n.pkcs5.pbkdf2(e,t,r,o,a);return n.util.encode64(c)}},function(e,t,r){var n=r(1251),i=9007199254740991;e.exports=function(e){return n(e)&&e>=-i&&e<=i}},function(e,t,r){var n=r(1252);e.exports=function(e){return"number"==typeof e&&e==n(e)}},function(e,t,r){var n=r(1253);e.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},function(e,t,r){var n=r(1254),i=1/0,o=1.7976931348623157e308;e.exports=function(e){return e?(e=n(e))===i||e===-i?(e<0?-1:1)*o:e==e?e:0:0===e?e:0}},function(e,t,r){var n=r(106),i=r(352),o=NaN,s=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,u=/^0o[0-7]+$/i,f=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return o;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var r=c.test(e);return r||u.test(e)?f(e.slice(2),r?2:8):a.test(e)?o:+e}},function(e,t,r){"use strict";(function(t){const n=r(1256),i=r(25),o=r(1257);e.exports=class{constructor(e){if(!e)throw new Error("keychain is required");this.keychain=e}encrypt(e,r,s){const a=this,c=(e,t)=>n.setImmediate(()=>s(e,t));if(!t.isBuffer(r))return c(new Error("Plain data must be a Buffer"));n.series([t=>a.keychain.findKeyByName(e,t),t=>a.keychain._getPrivateKey(e,t)],(e,n)=>{if(e)return c(e);let u=n[0],f=n[1];try{const n=i.pki.decryptRsaPrivateKey(f,a.keychain._());o.certificateForKey(u,n,(e,n)=>{if(e)return s(e);const o=i.pkcs7.createEnvelopedData();o.addRecipient(n),o.content=i.util.createBuffer(r),o.encrypt();const a=i.asn1.toDer(o.toAsn1()).getBytes();c(null,t.from(a,"binary"))})}catch(e){c(e)}})}decrypt(e,r){const o=(e,t)=>n.setImmediate(()=>r(e,t));if(!t.isBuffer(e))return o(new Error("CMS data is required"));const s=this;let a;try{const t=i.util.createBuffer(e.toString("binary")),r=i.asn1.fromDer(t);a=i.pkcs7.messageFromAsn1(r)}catch(e){return o(new Error("Invalid CMS: "+e.message))}const c=a.recipients.filter(e=>e.issuer.find(e=>"O"===e.shortName&&"ipfs"===e.value)).filter(e=>e.issuer.find(e=>"CN"===e.shortName)).map(e=>({recipient:e,keyId:e.issuer.find(e=>"CN"===e.shortName).value}));n.detect(c,(e,t)=>s.keychain.findKeyById(e.keyId,(e,r)=>t(null,!e&&r)),(e,r)=>{if(e)return o(e);if(!r){const t=c.map(e=>e.keyId);return(e=new Error("Decryption needs one of the key(s): "+t.join(", "))).missingKeys=t,o(e)}n.waterfall([e=>s.keychain.findKeyById(r.keyId,e),(e,t)=>s.keychain._getPrivateKey(e.name,t)],(e,n)=>{if(e)return o(e);const c=i.pki.decryptRsaPrivateKey(n,s.keychain._());a.decrypt(r.recipient,c),o(null,t.from(a.content.getBytes(),"binary"))})})}}}).call(this,r(0).Buffer)},function(e,t,r){(function(e,r,n,i){(function(t){"use strict";function o(e,t){t|=0;for(var r=Math.max(e.length-t,0),n=Array(r),i=0;i-1&&e%1==0&&e<=U}function F(e){return null!=e&&j(e.length)&&!function(e){if(!c(e))return!1;var t=O(e);return t==N||t==D||t==M||t==K}(e)}var L={};function z(){}function H(e){return function(){if(null!==e){var t=e;e=null,t.apply(this,arguments)}}}var q="function"==typeof Symbol&&Symbol.iterator,V=function(e){return q&&e[q]&&e[q]()};function G(e){return null!=e&&"object"==typeof e}var W="[object Arguments]";function Y(e){return G(e)&&O(e)==W}var J=Object.prototype,Z=J.hasOwnProperty,Q=J.propertyIsEnumerable,X=Y(function(){return arguments}())?Y:function(e){return G(e)&&Z.call(e,"callee")&&!Q.call(e,"callee")},$=Array.isArray,ee="object"==typeof t&&t&&!t.nodeType&&t,te=ee&&"object"==typeof i&&i&&!i.nodeType&&i,re=te&&te.exports===ee?S.Buffer:void 0,ne=(re?re.isBuffer:void 0)||function(){return!1},ie=9007199254740991,oe=/^(?:0|[1-9]\d*)$/;function se(e,t){var r=typeof e;return!!(t=null==t?ie:t)&&("number"==r||"symbol"!=r&&oe.test(e))&&e>-1&&e%1==0&&e2&&(n=o(arguments,1)),t){var u={};Le(i,function(e,t){u[t]=e}),u[e]=n,a=!0,c=Object.create(null),r(t,u)}else i[e]=n,Ue(c[e]||[],function(e){e()}),p()});s++;var u=v(t[t.length-1]);t.length>1?u(i,n):u(n)}(e,t)})}function p(){if(0===u.length&&0===s)return r(null,i);for(;u.length&&s=0&&r.push(n)}),r}Le(e,function(t,r){if(!$(t))return h(r,[t]),void f.push(r);var n=t.slice(0,t.length-1),i=n.length;if(0===i)return h(r,t),void f.push(r);l[r]=i,Ue(n,function(o){if(!e[o])throw new Error("async.auto task `"+r+"` has a non-existent dependency `"+o+"` in "+n.join(", "));!function(e,t){var r=c[e];r||(r=c[e]=[]);r.push(t)}(o,function(){0===--i&&h(r,t)})})}),function(){var e,t=0;for(;f.length;)e=f.pop(),t++,Ue(d(e),function(e){0==--l[e]&&f.push(e)});if(t!==n)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),p()};function Ve(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r=n?e:function(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n-1;);return r}(i,o),function(e,t){for(var r=e.length;r--&&He(t,e[r],0)>-1;);return r}(i,o)+1).join("")}var ht=/^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m,pt=/,/,dt=/(=.+)?(\s*)$/,gt=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;function bt(e,t){var r={};Le(e,function(e,t){var n,i,o=y(e),s=!o&&1===e.length||o&&0===e.length;if($(e))n=e.slice(0,-1),e=e[e.length-1],r[t]=n.concat(n.length>0?a:e);else if(s)r[t]=e;else{if(n=i=(i=(i=(i=(i=e).toString().replace(gt,"")).match(ht)[2].replace(" ",""))?i.split(pt):[]).map(function(e){return lt(e.replace(dt,""))}),0===e.length&&!o&&0===n.length)throw new Error("autoInject task functions require explicit parameters.");o||n.pop(),r[t]=n.concat(a)}function a(t,r){var i=Ve(n,function(e){return t[e]});i.push(r),v(e).apply(null,i)}}),qe(r,t)}function mt(){this.head=this.tail=null,this.length=0}function yt(e,t){e.length=1,e.head=e.tail=t}function vt(e,t,r){if(null==t)t=1;else if(0===t)throw new Error("Concurrency must not be zero");var n=v(e),i=0,o=[],s=!1;function a(e,t,r){if(null!=r&&"function"!=typeof r)throw new Error("task callback must be a function");if(f.started=!0,$(e)||(e=[e]),0===e.length&&f.idle())return p(function(){f.drain()});for(var n=0,i=e.length;n0&&o.splice(a,1),s.callback.apply(s,arguments),null!=t&&f.error(t,s.data)}i<=f.concurrency-f.buffer&&f.unsaturated(),f.idle()&&f.drain(),f.process()}}var u=!1,f={_tasks:new mt,concurrency:t,payload:r,saturated:z,unsaturated:z,buffer:t/4,empty:z,drain:z,error:z,started:!1,paused:!1,push:function(e,t){a(e,!1,t)},kill:function(){f.drain=z,f._tasks.empty()},unshift:function(e,t){a(e,!0,t)},remove:function(e){f._tasks.remove(e)},process:function(){if(!u){for(u=!0;!f.paused&&i2&&(i=o(arguments,1)),n[t]=i,r(e)})},function(e){r(e,n)})}function br(e,t){gr(Be,e,t)}function mr(e,t,r){gr(Ee(t),e,r)}var yr=function(e,t){var r=v(e);return vt(function(e,t){r(e[0],t)},t,1)},vr=function(e,t){var r=yr(e,t);return r.push=function(e,t,n){if(null==n&&(n=z),"function"!=typeof n)throw new Error("task callback must be a function");if(r.started=!0,$(e)||(e=[e]),0===e.length)return p(function(){r.drain()});t=t||0;for(var i=r._tasks.head;i&&t>=i.priority;)i=i.next;for(var o=0,s=e.length;on?1:0}Pe(e,function(e,t){n(e,function(r,n){if(r)return t(r);t(null,{value:e,criteria:n})})},function(e,t){if(e)return r(e);r(null,Ve(t.sort(i),Qt("value")))})}function Dr(e,t,r){var n=v(e);return a(function(i,o){var s,a=!1;i.push(function(){a||(o.apply(null,arguments),clearTimeout(s))}),s=setTimeout(function(){var t=e.name||"anonymous",n=new Error('Callback function "'+t+'" timed out.');n.code="ETIMEDOUT",r&&(n.info=r),a=!0,o(n)},t),n.apply(null,i)})}var Kr=Math.ceil,Ur=Math.max;function jr(e,t,r,n){var i=v(r);Ne(function(e,t,r,n){for(var i=-1,o=Ur(Kr((t-e)/(r||1)),0),s=Array(o);o--;)s[n?o:++i]=e,e+=r;return s}(0,e,1),t,i,n)}var Fr=xe(jr,1/0),Lr=xe(jr,1);function zr(e,t,r,n){arguments.length<=3&&(n=r,r=t,t=$(e)?[]:{}),n=H(n||z);var i=v(r);Be(e,function(e,r,n){i(t,e,r,n)},function(e){n(e,t)})}function Hr(e,t){var r,n=null;t=t||z,Vt(e,function(e,t){v(e)(function(e,i){r=arguments.length>2?o(arguments,1):i,n=e,t(!e)})},function(){t(n,r)})}function qr(e){return function(){return(e.unmemoized||e).apply(null,arguments)}}function Vr(e,t,r){r=Se(r||z);var n=v(t);if(!e())return r(null);var i=function(t){if(t)return r(t);if(e())return n(i);var s=o(arguments,1);r.apply(null,[null].concat(s))};n(i)}function Gr(e,t,r){Vr(function(){return!e.apply(this,arguments)},t,r)}var Wr=function(e,t){if(t=H(t||z),!$(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var r=0;function n(t){var n=v(e[r++]);t.push(Se(i)),n.apply(null,t)}function i(i){if(i||r===e.length)return t.apply(null,arguments);n(o(arguments,1))}n([])},Yr={apply:s,applyEach:Oe,applyEachSeries:Ke,asyncify:d,auto:qe,autoInject:bt,cargo:wt,compose:Et,concat:Ct,concatLimit:xt,concatSeries:It,constant:Bt,detect:Ot,detectLimit:Mt,detectSeries:Nt,dir:Kt,doDuring:Ut,doUntil:Ft,doWhilst:jt,during:Lt,each:Ht,eachLimit:qt,eachOf:Be,eachOfLimit:ke,eachOfSeries:At,eachSeries:Vt,ensureAsync:Gt,every:Yt,everyLimit:Jt,everySeries:Zt,filter:tr,filterLimit:rr,filterSeries:nr,forever:ir,groupBy:sr,groupByLimit:or,groupBySeries:ar,log:cr,map:Pe,mapLimit:Ne,mapSeries:De,mapValues:fr,mapValuesLimit:ur,mapValuesSeries:lr,memoize:pr,nextTick:dr,parallel:br,parallelLimit:mr,priorityQueue:vr,queue:yr,race:wr,reduce:_t,reduceRight:Ar,reflect:_r,reflectAll:Sr,reject:kr,rejectLimit:xr,rejectSeries:Cr,retry:Br,retryable:Tr,seq:St,series:Rr,setImmediate:p,some:Pr,someLimit:Or,someSeries:Mr,sortBy:Nr,timeout:Dr,times:Fr,timesLimit:jr,timesSeries:Lr,transform:zr,tryEach:Hr,unmemoize:qr,until:Gr,waterfall:Wr,whilst:Vr,all:Yt,allLimit:Jt,allSeries:Zt,any:Pr,anyLimit:Or,anySeries:Mr,find:Ot,findLimit:Mt,findSeries:Nt,forEach:Ht,forEachSeries:Vt,forEachLimit:qt,forEachOf:Be,forEachOfSeries:At,forEachOfLimit:ke,inject:_t,foldl:_t,foldr:Ar,select:tr,selectLimit:rr,selectSeries:nr,wrapSync:d};t.default=Yr,t.apply=s,t.applyEach=Oe,t.applyEachSeries=Ke,t.asyncify=d,t.auto=qe,t.autoInject=bt,t.cargo=wt,t.compose=Et,t.concat=Ct,t.concatLimit=xt,t.concatSeries=It,t.constant=Bt,t.detect=Ot,t.detectLimit=Mt,t.detectSeries=Nt,t.dir=Kt,t.doDuring=Ut,t.doUntil=Ft,t.doWhilst=jt,t.during=Lt,t.each=Ht,t.eachLimit=qt,t.eachOf=Be,t.eachOfLimit=ke,t.eachOfSeries=At,t.eachSeries=Vt,t.ensureAsync=Gt,t.every=Yt,t.everyLimit=Jt,t.everySeries=Zt,t.filter=tr,t.filterLimit=rr,t.filterSeries=nr,t.forever=ir,t.groupBy=sr,t.groupByLimit=or,t.groupBySeries=ar,t.log=cr,t.map=Pe,t.mapLimit=Ne,t.mapSeries=De,t.mapValues=fr,t.mapValuesLimit=ur,t.mapValuesSeries=lr,t.memoize=pr,t.nextTick=dr,t.parallel=br,t.parallelLimit=mr,t.priorityQueue=vr,t.queue=yr,t.race=wr,t.reduce=_t,t.reduceRight=Ar,t.reflect=_r,t.reflectAll=Sr,t.reject=kr,t.rejectLimit=xr,t.rejectSeries=Cr,t.retry=Br,t.retryable=Tr,t.seq=St,t.series=Rr,t.setImmediate=p,t.some=Pr,t.someLimit=Or,t.someSeries=Mr,t.sortBy=Nr,t.timeout=Dr,t.times=Fr,t.timesLimit=jr,t.timesSeries=Lr,t.transform=zr,t.tryEach=Hr,t.unmemoize=qr,t.until=Gr,t.waterfall=Wr,t.whilst=Vr,t.all=Yt,t.allLimit=Jt,t.allSeries=Zt,t.any=Pr,t.anyLimit=Or,t.anySeries=Mr,t.find=Ot,t.findLimit=Mt,t.findSeries=Nt,t.forEach=Ht,t.forEachSeries=Vt,t.forEachLimit=qt,t.forEachOf=Be,t.forEachOfSeries=At,t.forEachOfLimit=ke,t.inject=_t,t.foldl=_t,t.foldr=Ar,t.select=tr,t.selectLimit=rr,t.selectSeries=nr,t.wrapSync=d,Object.defineProperty(t,"__esModule",{value:!0})})(t)}).call(this,r(35).setImmediate,r(6),r(12),r(39)(e))},function(e,t,r){"use strict";const n=r(25).pki;e.exports.certificateForKey=((e,t,r)=>{const i=n.setRsaPublicKey(t.n,t.e),o=n.createCertificate();o.publicKey=i,o.serialNumber="01",o.validity.notBefore=new Date,o.validity.notAfter=new Date,o.validity.notAfter.setFullYear(o.validity.notBefore.getFullYear()+10);const s=[{name:"organizationName",value:"ipfs"},{shortName:"OU",value:"keystore"},{name:"commonName",value:e.id}];return o.setSubject(s),o.setIssuer(s),o.setExtensions([{name:"basicConstraints",cA:!0},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},{name:"extKeyUsage",serverAuth:!0,clientAuth:!0,codeSigning:!0,emailProtection:!0,timeStamping:!0},{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0,sslCA:!0,emailCA:!0,objCA:!0}]),o.sign(t),r(null,o)})},function(e,t,r){"use strict";function n(){throw new Error("Key management requires '--pass ...' option")}e.exports=class{static get options(){n()}static generateOptions(){n()}createKey(){n()}listKeys(){n()}findKeyById(){n()}findKeyByName(){n()}renameKey(){n()}removeKey(){n()}exportKey(){n()}importKey(){n()}importPeer(){n()}get cms(){n()}}},function(e,t,r){"use strict";const n=r(61),i=r(1260),o=r(648),s=r(7),a=r(29),{TieredDatastore:c}=r(627),u=r(814),f=r(816),l=r(817);e.exports=(e=>a(t=>{const r=r=>{if(r)return s(()=>e.emit("error",r)),t(r);e.state.started(),s(()=>e.emit("start")),t()};if("stopped"!==e.state.state())return r(new Error(`Not able to start from state: ${e.state.state()}`));e.log("starting"),e.state.start(),n([t=>{e._repo.closed?e._repo.open(t):t()},t=>e.libp2p.start(t),t=>{const r=[];let n;if(o(e._options,"EXPERIMENTAL.ipnsPubsub",!1)){const t=e._libp2pNode.pubsub,i=e._repo.datastore,o=e._peerInfo.id;n=new f(t,i,o),r.push(n)}if(o(e._options,"EXPERIMENTAL.dht",!1)&&!e._options.local)r.push(e._libp2pNode.dht);else{const t=new l(e._repo);r.push(t)}const s=new c(r);e._ipns=new u(s,e._repo.datastore,e._peerInfo,e._keychain,e._options),e._bitswap=new i(e._libp2pNode,e._repo.blocks,{statsEnabled:!0}),e._bitswap.start(),e._blockService.setExchange(e._bitswap),e._preload.start(),e._ipns.republisher.start(),e._mfsPreload.start(t)}],r)}))},function(e,t,r){"use strict";const n=r(10),i=r(628),o=r(85),s=r(61),a=r(143),c=r(1261),u=r(1269),f=r(1273),l=r(1279),h=r(203).logger,p=r(1280),d={statsEnabled:!1,statsComputeThrottleTimeout:1e3,statsComputeThrottleMaxQueueSize:1e3},g=["blocksReceived","dataReceived","dupBlksReceived","dupDataReceived","blocksSent","dataSent","providesBufferLength","wantListLength","peerCount"];e.exports=class{constructor(e,t,r){this._libp2p=e,this._log=h(this.peerInfo.id),this._options=Object.assign({},d,r),this._stats=new p(g,{enabled:this._options.statsEnabled,computeThrottleTimeout:this._options.statsComputeThrottleTimeout,computeThrottleMaxQueueSize:this._options.statsComputeThrottleMaxQueueSize}),this.network=new u(e,this,{},this._stats),this.blockstore=t,this.engine=new f(this.peerInfo.id,t,this.network,this._stats),this.wm=new c(this.peerInfo.id,this.network,this._stats),this.notifications=new l(this.peerInfo.id)}get peerInfo(){return this._libp2p.peerInfo}_receiveMessage(e,t,r){this.engine.messageReceived(e,t,n=>{if(n&&this._log("failed to receive message",t),0===t.blocks.size)return r();const i=Array.from(t.blocks.values()),s=i.filter(e=>this.wm.wantlist.contains(e.cid)).map(e=>e.cid);this.wm.cancelWants(s),o(i,(t,r)=>this._handleReceivedBlock(e,t,r),r)})}_handleReceivedBlock(e,t,r){this._log("received block"),n([e=>this.blockstore.has(t.cid,e),(r,n)=>{if(this._updateReceiveCounters(e.toB58String(),t,r),r)return n();this._putBlock(t,n)}],r)}_updateReceiveCounters(e,t,r){this._stats.push(e,"blocksReceived",1),this._stats.push(e,"dataReceived",t.data.length),r&&(this._stats.push(e,"dupBlksReceived",1),this._stats.push(e,"dupDataReceived",t.data.length))}_receiveError(e){this._log.error("ReceiveError: %s",e.message)}_onPeerConnected(e){this.wm.connected(e)}_onPeerDisconnected(e){this.wm.disconnected(e),this.engine.peerDisconnected(e),this._stats.disconnected(e)}_putBlock(e,t){this.blockstore.put(e,r=>{if(r)return t(r);this.notifications.hasBlock(e),this.network.provide(e.cid,e=>{e&&this._log.error("Failed to provide: %s",e.message)}),this.engine.receivedBlocks([e.cid]),t()})}enableStats(){this._stats.enable()}disableStats(){this._stats.disable()}wantlistForPeer(e){return this.engine.wantlistForPeer(e)}ledgerForPeer(e){return this.engine.ledgerForPeer(e)}get(e,t){this.getMany([e],(e,r)=>{if(e)return t(e);r&&r.length>0?t(null,r[0]):t()})}getMany(e,t){let r=e.length;const i=[];let o=!1;const s=(e,t)=>{i.push(e),this.notifications.wantBlock(e,r=>{this.wm.cancelWants([e]),t(null,r)},()=>{this.wm.cancelWants([e]),t(null,void 0)}),r||this.wm.wantBlocks(i)};a(e,(t,a)=>{n([e=>this.blockstore.has(t,e),(n,a)=>{if(r--,n)return r||this.wm.wantBlocks(i),this.blockstore.get(t,a);o||(o=!0,this.network.findAndConnect(e[0],e=>{e&&this._log.error(e)})),s(t,a)}],a)},t)}unwant(e){Array.isArray(e)||(e=[e]),this.wm.unwantBlocks(e),e.forEach(e=>this.notifications.unwantBlock(e))}cancelWants(e){Array.isArray(e)||(e=[e]),this.wm.cancelWants(e)}put(e,t){this._log("putting block"),n([t=>this.blockstore.has(e.cid,t),(t,r)=>{if(t)return r();this._putBlock(e,r)}],t)}putMany(e,t){n([t=>i(e,(e,t)=>{this.blockstore.has(e.cid,t)},t),(e,t)=>this.blockstore.putMany(e,r=>{if(r)return t(r);e.forEach(e=>{this.notifications.hasBlock(e),this.engine.receivedBlocks([e.cid]),this.network.provide(e.cid,e=>{e&&this._log.error("Failed to provide: %s",e.message)})}),t()})],t)}getWantlist(){return this.wm.wantlist.entries()}peers(){return this.engine.peers()}stat(){return this._stats}start(e){s([e=>this.wm.start(e),e=>this.network.start(e),e=>this.engine.start(e)],e)}stop(e){this._stats.stop(),s([e=>this.wm.stop(e),e=>this.network.stop(e),e=>this.engine.stop(e)],e)}}},function(e,t,r){"use strict";const n=r(7),i=r(353),o=r(354),s=r(647),a=r(1268),c=r(203).logger;e.exports=class{constructor(e,t,r){this.peers=new Map,this.wantlist=new o(r),this.network=t,this._stats=r,this._peerId=e,this._log=c(e,"want")}_addEntries(e,t,r){const n=e.map((e,r)=>new i.Entry(e,s.kMaxPriority-r,t));n.forEach(e=>{e.cancel?r?this.wantlist.removeForce(e.cid):this.wantlist.remove(e.cid):(this._log("adding to wl"),this.wantlist.add(e.cid,e.priority))});for(let e of this.peers.values())e.addEntries(n)}_startPeerHandler(e){let t=this.peers.get(e.toB58String());if(t)return void t.refcnt++;t=new a(this._peerId,e,this.network);const r=new i(!0);for(let e of this.wantlist.entries())r.addEntry(e[1].cid,e[1].priority);return t.addMessage(r),this.peers.set(e.toB58String(),t),t}_stopPeerHandler(e){const t=this.peers.get(e.toB58String());t&&(t.refcnt--,t.refcnt>0||this.peers.delete(e.toB58String()))}wantBlocks(e){this._addEntries(e,!1)}unwantBlocks(e){this._log("unwant blocks: %s",e.length),this._addEntries(e,!0,!0)}cancelWants(e){this._log("cancel wants: %s",e.length),this._addEntries(e,!0)}connectedPeers(){return Array.from(this.peers.keys())}connected(e){this._startPeerHandler(e)}disconnected(e){this._stopPeerHandler(e)}start(e){this.timer=setInterval(()=>{this._log("resend full-wantlist");const e=new i(!0);this.wantlist.forEach(t=>{e.addEntry(t.cid,t.priority)}),this.peers.forEach(t=>t.addMessage(e))},6e4),n(()=>e())}stop(e){this.peers.forEach(e=>this.disconnected(e.peerId)),clearInterval(this.timer),n(()=>e())}}},function(e,t,r){(function(e,r){var n=200,i="__lodash_hash_undefined__",o=1,s=2,a=9007199254740991,c="[object Arguments]",u="[object Array]",f="[object Boolean]",l="[object Date]",h="[object Error]",p="[object Function]",d="[object GeneratorFunction]",g="[object Map]",b="[object Number]",m="[object Object]",y="[object RegExp]",v="[object Set]",w="[object String]",A="[object Symbol]",_="[object ArrayBuffer]",S="[object DataView]",E=/^\[object .+?Constructor\]$/,k=/^(?:0|[1-9]\d*)$/,x={};x["[object Float32Array]"]=x["[object Float64Array]"]=x["[object Int8Array]"]=x["[object Int16Array]"]=x["[object Int32Array]"]=x["[object Uint8Array]"]=x["[object Uint8ClampedArray]"]=x["[object Uint16Array]"]=x["[object Uint32Array]"]=!0,x[c]=x[u]=x[_]=x[f]=x[S]=x[l]=x[h]=x[p]=x[g]=x[b]=x[m]=x[y]=x[v]=x[w]=x["[object WeakMap]"]=!1;var C="object"==typeof e&&e&&e.Object===Object&&e,I="object"==typeof self&&self&&self.Object===Object&&self,B=C||I||Function("return this")(),T=t&&!t.nodeType&&t,R=T&&"object"==typeof r&&r&&!r.nodeType&&r,P=R&&R.exports===T&&C.process,O=function(){try{return P&&P.binding("util")}catch(e){}}(),M=O&&O.isTypedArray;function N(e,t){for(var r=-1,n=e?e.length:0;++ru))return!1;var l=a.get(e);if(l&&a.get(t))return l==t;var h=-1,p=!0,d=i&o?new ye:void 0;for(a.set(e,t),a.set(t,e);++h-1},be.prototype.set=function(e,t){var r=this.__data__,n=Ae(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},me.prototype.clear=function(){this.__data__={hash:new ge,map:new(ne||be),string:new ge}},me.prototype.delete=function(e){return xe(this,e).delete(e)},me.prototype.get=function(e){return xe(this,e).get(e)},me.prototype.has=function(e){return xe(this,e).has(e)},me.prototype.set=function(e,t){return xe(this,e).set(e,t),this},ye.prototype.add=ye.prototype.push=function(e){return this.__data__.set(e,i),this},ye.prototype.has=function(e){return this.__data__.has(e)},ve.prototype.clear=function(){this.__data__=new be},ve.prototype.delete=function(e){return this.__data__.delete(e)},ve.prototype.get=function(e){return this.__data__.get(e)},ve.prototype.has=function(e){return this.__data__.has(e)},ve.prototype.set=function(e,t){var r=this.__data__;if(r instanceof be){var i=r.__data__;if(!ne||i.length-1&&e%1==0&&e-1&&e%1==0&&e<=a}function De(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ke(e){return!!e&&"object"==typeof e}var Ue=M?function(e){return function(t){return e(t)}}(M):function(e){return Ke(e)&&Ne(e.length)&&!!x[J.call(e)]};function je(e){return Oe(e)?we(e):Ee(e)}r.exports=function(e,t,r){var n=(r="function"==typeof r?r:void 0)?r(e,t):void 0;return void 0===n?_e(e,t,r):!!n}}).call(this,r(12),r(39)(e))},function(e,t,r){"use strict";(function(t){const n=r(5);e.exports=(e=>{if(!t.isBuffer(e))throw new Error("arg needs to be a buffer");let r=[];for(;e.length>0;){const t=n.decode(e);r.push(t),e=e.slice(n.decode.bytes)}return r})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";e.exports="\n message Message {\n message Wantlist {\n message Entry {\n // changed from string to bytes, it makes a difference in JavaScript\n optional bytes block = 1; // the block cid (cidV0 in bitswap 1.0.0, cidV1 in bitswap 1.1.0)\n optional int32 priority = 2; // the priority (normalized). default to 1\n optional bool cancel = 3; // whether this revokes an entry\n }\n\n repeated Entry entries = 1; // a list of wantlist entries\n optional bool full = 2; // whether this is the full wantlist. default to false\n }\n\n message Block {\n optional bytes prefix = 1; // CID prefix (cid version, multicodec and multihash prefix (type + length)\n optional bytes data = 2;\n }\n\n optional Wantlist wantlist = 1;\n repeated bytes blocks = 2; // used to send Blocks in bitswap 1.0.0\n repeated Block payload = 3; // used to send Blocks in bitswap 1.1.0\n }\n"},function(e,t,r){"use strict";const n=r(354).Entry,i=r(16),o=r(20);e.exports=class{constructor(e,t,r){o(i.isCID(e),"needs valid cid"),this.entry=new n(e,t),this.cancel=Boolean(r)}get cid(){return this.entry.cid}set cid(e){this.entry.cid=e}get priority(){return this.entry.priority}set priority(e){this.entry.priority=e}get[Symbol.toStringTag](){return`BitswapMessageEntry ${this.cid.toBaseEncodedString()} `}equals(e){return this.cancel===e.cancel&&this.entry.equals(e.entry)}}},function(e,t,r){(function(e,r){var n=200,i="Expected a function",o="__lodash_hash_undefined__",s=1,a=2,c=1/0,u=9007199254740991,f="[object Arguments]",l="[object Array]",h="[object Boolean]",p="[object Date]",d="[object Error]",g="[object Function]",b="[object GeneratorFunction]",m="[object Map]",y="[object Number]",v="[object Object]",w="[object RegExp]",A="[object Set]",_="[object String]",S="[object Symbol]",E="[object ArrayBuffer]",k="[object DataView]",x=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,C=/^\w*$/,I=/^\./,B=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,T=/\\(\\)?/g,R=/^\[object .+?Constructor\]$/,P=/^(?:0|[1-9]\d*)$/,O={};O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O[f]=O[l]=O[E]=O[h]=O[k]=O[p]=O[d]=O[g]=O[m]=O[y]=O[v]=O[w]=O[A]=O[_]=O["[object WeakMap]"]=!1;var M="object"==typeof e&&e&&e.Object===Object&&e,N="object"==typeof self&&self&&self.Object===Object&&self,D=M||N||Function("return this")(),K=t&&!t.nodeType&&t,U=K&&"object"==typeof r&&r&&!r.nodeType&&r,j=U&&U.exports===K&&M.process,F=function(){try{return j&&j.binding("util")}catch(e){}}(),L=F&&F.isTypedArray;function z(e,t){for(var r=-1,n=e?e.length:0,i=Array(n);++r-1},Be.prototype.set=function(e,t){var r=this.__data__,n=Me(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},Te.prototype.clear=function(){this.__data__={hash:new Ie,map:new(ge||Be),string:new Ie}},Te.prototype.delete=function(e){return Je(this,e).delete(e)},Te.prototype.get=function(e){return Je(this,e).get(e)},Te.prototype.has=function(e){return Je(this,e).has(e)},Te.prototype.set=function(e,t){return Je(this,e).set(e,t),this},Re.prototype.add=Re.prototype.push=function(e){return this.__data__.set(e,o),this},Re.prototype.has=function(e){return this.__data__.has(e)},Pe.prototype.clear=function(){this.__data__=new Be},Pe.prototype.delete=function(e){return this.__data__.delete(e)},Pe.prototype.get=function(e){return this.__data__.get(e)},Pe.prototype.has=function(e){return this.__data__.has(e)},Pe.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Be){var i=r.__data__;if(!ge||i.length=a)return c;var u=r[n];return c*("desc"==u?-1:1)}}return e.index-t.index}(e,t,r)})}function Ge(e){return lt(e)?e:it(e)}function We(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=e==e,o=mt(e),s=void 0!==t,a=null===t,c=t==t,u=mt(t);if(!a&&!u&&!o&&e>t||o&&s&&c&&!a&&!u||n&&s&&c||!r&&c||!i)return 1;if(!n&&!o&&!u&&eu))return!1;var l=o.get(e);if(l&&o.get(t))return l==t;var h=-1,p=!0,d=i&s?new Re:void 0;for(o.set(e,t),o.set(t,e);++h-1&&e%1==0&&e1&&et(e,t[0],t[1])?t=[]:r>2&&et(t[0],t[1],t[2])&&(t=[t[0]]),Ve(e,function e(t,r,n,i,o){var s=-1,a=t.length;for(n||(n=Xe),o||(o=[]);++s0&&n(c)?r>1?e(c,r-1,n,i,o):H(o,c):i||(o[o.length]=c)}return o}(t,1),[])});function ct(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(i);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s),s};return r.cache=new(ct.Cache||Te),r}function ut(e,t){return e===t||e!=e&&t!=t}function ft(e){return function(e){return bt(e)&&ht(e)}(e)&&ie.call(e,"callee")&&(!ue.call(e,"callee")||oe.call(e)==f)}ct.Cache=Te;var lt=Array.isArray;function ht(e){return null!=e&&dt(e.length)&&!pt(e)}function pt(e){var t=gt(e)?oe.call(e):"";return t==g||t==b}function dt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=u}function gt(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function bt(e){return!!e&&"object"==typeof e}function mt(e){return"symbol"==typeof e||bt(e)&&oe.call(e)==S}var yt=L?V(L):function(e){return bt(e)&&dt(e.length)&&!!O[oe.call(e)]};function vt(e){return ht(e)?Oe(e):qe(e)}function wt(e){return e}r.exports=at}).call(this,r(12),r(39)(e))},function(e,t,r){"use strict";const n=r(20),i=r(16);e.exports=class{constructor(e,t){n(i.isCID(e),"must be valid CID"),this._refCounter=1,this.cid=e,this.priority=t||1}inc(){this._refCounter+=1}dec(){this._refCounter=Math.max(0,this._refCounter-1)}hasRefs(){return this._refCounter>0}get[Symbol.toStringTag](){return`WantlistEntry `}equals(e){return this._refCounter===e._refCounter&&this.cid.equals(e.cid)&&this.priority===e.priority}}},function(e,t,r){"use strict";const n=r(810),i=r(353),o=r(203).logger;e.exports=class{constructor(e,t,r){this.peerId=t,this.network=r,this.refcnt=1,this._entries=[],this._log=o(e,"msgqueue",t.toB58String().slice(0,8)),this.sendEntries=n(this._sendEntries.bind(this),200)}addMessage(e){e.empty||this.send(e)}addEntries(e){this._entries=this._entries.concat(e),this.sendEntries()}_sendEntries(){if(!this._entries.length)return;const e=new i(!1);this._entries.forEach(t=>{t.cancel?e.cancel(t.cid):e.addEntry(t.cid,t.priority)}),this._entries=[],this.addMessage(e)}send(e){this.network.connectTo(this.peerId,t=>{t?this._log.error("cant connect to peer %s: %s",this.peerId.toB58String(),t.message):(this._log("sending message"),this.network.sendMessage(this.peerId,e,e=>{e&&this._log.error("send error: %s",e.message)}))})}}},function(e,t,r){"use strict";const n=r(95),i=r(14),o=r(10),s=r(85),a=r(7),c=r(353),u=r(647),f=r(203).logger,l="/ipfs/bitswap/1.0.0",h="/ipfs/bitswap/1.1.0";e.exports=class{constructor(e,t,r,n){this._log=f(e.peerInfo.id,"network"),r=r||{},this.libp2p=e,this.bitswap=t,this.b100Only=r.b100Only||!1,this._stats=n,this._running=!1}start(e){this._running=!0,this._onPeerConnect=this._onPeerConnect.bind(this),this._onPeerDisconnect=this._onPeerDisconnect.bind(this),this._onConnection=this._onConnection.bind(this),this.libp2p.handle(l,this._onConnection),this.b100Only||this.libp2p.handle(h,this._onConnection),this.libp2p.on("peer:connect",this._onPeerConnect),this.libp2p.on("peer:disconnect",this._onPeerDisconnect),this.libp2p.peerBook.getAllArray().filter(e=>e.isConnected()).forEach(e=>this._onPeerConnect(e)),a(()=>e())}stop(e){this._running=!1,this.libp2p.unhandle(l),this.b100Only||this.libp2p.unhandle(h),this.libp2p.removeListener("peer:connect",this._onPeerConnect),this.libp2p.removeListener("peer:disconnect",this._onPeerDisconnect),a(()=>e())}_onConnection(e,t){this._running&&(this._log("incomming new bitswap connection: %s",e),i(t,n.decode(),i.asyncMap((e,t)=>c.deserialize(e,t)),i.asyncMap((e,r)=>{t.getPeerInfo((t,n)=>{if(t)return r(t);this.bitswap._receiveMessage(n.id,e,r)})}),i.onEnd(e=>{this._log("ending connection"),e&&this.bitswap._receiveError(e)})))}_onPeerConnect(e){this._running&&this.bitswap._onPeerConnected(e.id)}_onPeerDisconnect(e){this._running&&this.bitswap._onPeerDisconnected(e.id)}findProviders(e,t,r){this.libp2p.contentRouting.findProviders(e,{maxTimeout:u.providerRequestTimeout,maxNumProviders:t},r)}findAndConnect(e,t){o([t=>this.findProviders(e,u.maxProvidersPerRequest,t),(e,t)=>{this._log("connecting to providers",e.map(e=>e.id.toB58String())),s(e,(e,t)=>this.connectTo(e,t))}],t)}provide(e,t){this.libp2p.contentRouting.provide(e,t)}sendMessage(e,t,r){if(!this._running)return r(new Error("network isn't running"));const o=e.toB58String()?e.toB58String():e.id.toB58String();this._log("sendMessage to %s",o,t),this._dialPeer(e,(o,s,a)=>{if(o)return r(o);let c;switch(a){case l:c=t.serializeToBitswap100();break;case h:c=t.serializeToBitswap110();break;default:return r(new Error("Unkown protocol: "+a))}!function(e,t,r){i(i.values([t]),n.encode(),e,i.onEnd(r))}(s,c,e=>{e&&this._log.error(e)}),r(),this._updateSentStats(e,t.blocks)})}connectTo(e,t){if(!this._running)return t(new Error("network isn't running"));this.libp2p.dial(e,t)}_dialPeer(e,t){this.libp2p.dialProtocol(e,h,(r,n)=>{r?this.libp2p.dialProtocol(e,l,(e,r)=>{if(e)return t(e);t(null,r,l)}):t(null,n,h)})}_updateSentStats(e,t){const r=e.toB58String();this._stats&&(t.forEach(e=>this._stats.push(r,"dataSent",e.data.length)),this._stats.push(r,"blocksSent",t.size))}}},function(e,t,r){"use strict";const n=r(3).Buffer;e.exports=function(e){e=Object.assign({fixed:!1},e||{});const t=r(5);let i=e.fixed?null:o(),s=0,a=!1;return r=>(c,u)=>{if(c&&(a=c),a)return u(a);r(null,(r,c)=>{if(r&&(a=r),a)return u(a);if(!n.isBuffer(c))return a=new Error("data must be a buffer"),u(a);let f;e.fixed?(f=n.alloc(4)).writeInt32BE(c.length,0):(t.encode(c.length,i,s),s+=t.encode.bytes,f=i.slice(s-t.encode.bytes,s),i.length-s<100&&(i=o(),s=0)),u(null,n.concat([f,c]))})}};const i=10240;function o(){return n.alloc(i)}},function(e,t,r){"use strict";const n=r(5),i=r(811),o=r(3).Buffer,s=r(100);t.decode=function(e){let t=new i,r=s(e=>{t.abort(e)});return n=>{return t(n),function n(){u(t,e,(e,t)=>{if(e)return r.end(e);r.push(t),n()})}(),r}},t.decodeFromReader=function(e,t,r){"function"==typeof t&&(r=t,t={});u(e,t,function(e,t){if(e)return r(!0===e?new Error("Unexpected end of input from reader."):e);r(null,t)})};const a=e=>!(128&e),c=4194304;function u(e,t,r){(t=Object.assign({fixed:!1,maxLength:c},t||{})).fixed?function(e,t,r){e.read(4,(n,i)=>{if(n)return r(n);const o=i.readInt32BE(0);if(o>t)return r(new Error("size longer than max permitted length of "+t+"!"));f(e,o,r)})}(e,t.maxLength,r):function(e,t,r){let i=[];0===i.length&&function s(){e.read(1,(c,u)=>{if(c)return r(c);if(i.push(u),u&&!a(u[0]))return void s();const l=n.decode(o.concat(i));if(l>t)return r(new Error("size longer than max permitted length of "+t+"!"));f(e,l,(e,t)=>e?r(e):(i=[],t.length{if(e)return r(e);r(null,t)})}},function(e,t,r){(function(t){e.exports=function(){var e=[],r=0;return{length:r,data:this,add:function(n){if(!t.isBuffer(n))throw new Error("data must be a buffer, was: "+JSON.stringify(n));return this.length=r+=n.length,e.push(n),this},has:function(e){return null==e?r>0:r>=e},get:function(n){var i;if(null==n||n===r){r=0;var o=e;return e=[],1==o.length?o[0]:t.concat(o)}if(e.length>1&&n<=(i=e[0].length)){var s=e[0].slice(0,n);return n===i?e.shift():e[0]=e[0].slice(n,i),r-=n,s}if(ne+t.data.byteLength,0){if(s--,o.push(t),(n+=t.data.byteLength)>=y||0===s){n=0;const t=o.slice();o=[],this._sendSafeBlocks(e,t,e=>{e&&this._log("sendblock error: %s",e.message),r()})}else r()},r)}_sendSafeBlocks(e,t,r){const n=new d(!1);t.forEach(e=>n.addBlock(e)),this.network.sendMessage(e,n,r)}_processTasks(){if(!this._running||!this._tasks.length)return;const e=this._tasks;this._tasks=[];const t=e.map(e=>e.entry).map(e=>e.cid),r=u(t,(e,t)=>e.equals(t)),i=h(e,e=>e.target.toB58String());o([e=>a(r,(e,t)=>{this.blockstore.get(e,t)},e),(e,r)=>n(l(i),(r,n)=>{const i=r[0].target,o=t.map(t=>f(e,e=>e.cid.equals(t)));this._sendBlocks(i,o,e=>{e?this._log.error("should never happen: ",e):o.forEach(e=>this.messageSent(i,e)),n()})})],e=>{this._tasks=[],e&&this._log.error(e)})}wantlistForPeer(e){const t=e.toB58String();return this.ledgerMap.has(t)?this.ledgerMap.get(t).wantlist.sortedEntries():new Map}ledgerForPeer(e){const t=e.toB58String(),r=this.ledgerMap.get(t);return r?{peer:r.partner.toPrint(),value:r.debtRatio(),sent:r.accounting.bytesSent,recv:r.accounting.bytesRecv,exchanged:r.exchangeCount}:null}peers(){return Array.from(this.ledgerMap.values()).map(e=>e.partner)}receivedBlocks(e){e.length&&(this.ledgerMap.forEach(t=>{e.map(e=>t.wantlistContains(e)).filter(Boolean).forEach(e=>{this._tasks.push({entry:e,target:t.partner})})}),this._outbox())}messageReceived(e,t,r){const n=this._findOrCreate(e);if(t.empty)return r();if(t.full&&(n.wantlist=new g),this._processBlocks(t.blocks,n),0===t.wantlist.size)return r();let i=[],o=[];t.wantlist.forEach(e=>{e.cancel?(n.cancelWant(e.cid),i.push(e)):(n.wants(e.cid,e.priority),o.push(e))}),this._cancelWants(n,e,i),this._addWants(n,e,o,r)}_cancelWants(e,t,r){const n=t.toB58String();p(this._tasks,r,(e,t)=>{const r=e.target.toB58String()===n,i=e.entry.cid.equals(t.cid);return r&&i})}_addWants(e,t,r,i){n(r,(e,r)=>{this.blockstore.has(e.cid,(n,i)=>{n?this._log.error("failed existence check"):i&&this._tasks.push({entry:e.entry,target:t}),r()})},()=>{this._outbox(),i()})}_processBlocks(e,t,r){const n=[];e.forEach((e,r)=>{this._log("got block (%s bytes)",e.data.length),t.receivedBytes(e.data.length),n.push(e.cid)}),this.receivedBlocks(n)}messageSent(e,t){const r=this._findOrCreate(e);r.sentBytes(t?t.data.length:0),t&&t.cid&&r.wantlist.remove(t.cid)}numBytesSentTo(e){return this._findOrCreate(e).accounting.bytesSent}numBytesReceivedFrom(e){return this._findOrCreate(e).accounting.bytesRecv}peerDisconnected(e){}_findOrCreate(e){const t=e.toB58String();if(this.ledgerMap.has(t))return this.ledgerMap.get(t);const r=new b(e);return this.ledgerMap.set(t,r),this._stats&&this._stats.push(t,"peerCount",1),r}start(e){this._running=!0,s(()=>e())}stop(e){this._running=!1,s(()=>e())}}},function(e,t,r){(function(t){var r=200,n="__lodash_hash_undefined__",i="[object Function]",o="[object GeneratorFunction]",s=/^\[object .+?Constructor\]$/,a="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,u=a||c||Function("return this")();function f(e,t){return!!(e?e.length:0)&&function(e,t,r){if(t!=t)return function(e,t,r,n){var i=e.length,o=r+(n?1:-1);for(;n?o--:++o-1}function l(e,t,r){for(var n=-1,i=e?e.length:0;++n-1},T.prototype.set=function(e,t){var r=this.__data__,n=O(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},R.prototype.clear=function(){this.__data__={hash:new B,map:new(x||T),string:new B}},R.prototype.delete=function(e){return D(this,e).delete(e)},R.prototype.get=function(e){return D(this,e).get(e)},R.prototype.has=function(e){return D(this,e).has(e)},R.prototype.set=function(e,t){return D(this,e).set(e,t),this},P.prototype.add=P.prototype.push=function(e){return this.__data__.set(e,n),this},P.prototype.has=function(e){return this.__data__.has(e)};var N=C&&1/d(new C([,-0]))[1]==1/0?function(e){return new C(e)}:function(){};function D(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function K(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return M(r)?r:void 0}function U(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e,t){return e&&e.length?function(e,t,n){var i=-1,o=f,s=e.length,a=!0,c=[],u=c;if(n)a=!1,o=l;else if(s>=r){var h=t?null:N(e);if(h)return d(h);a=!1,o=p,u=new P}else u=t?[]:c;e:for(;++i-1&&e%1==0&&e-1&&e%1==0&&e<=r}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?h.call(e):"";return t==i||t==o}(e)}e.exports=function(e){return e?a(e,function(e){return v(e)?g(e):b(e)}(e)):[]}},function(e,t,r){(function(e,r){var n=200,i="Expected a function",o="__lodash_hash_undefined__",s=1,a=2,c=1/0,u=9007199254740991,f="[object Arguments]",l="[object Array]",h="[object Boolean]",p="[object Date]",d="[object Error]",g="[object Function]",b="[object GeneratorFunction]",m="[object Map]",y="[object Number]",v="[object Object]",w="[object RegExp]",A="[object Set]",_="[object String]",S="[object Symbol]",E="[object ArrayBuffer]",k="[object DataView]",x=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,C=/^\w*$/,I=/^\./,B=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,T=/\\(\\)?/g,R=/^\[object .+?Constructor\]$/,P=/^(?:0|[1-9]\d*)$/,O={};O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O[f]=O[l]=O[E]=O[h]=O[k]=O[p]=O[d]=O[g]=O[m]=O[y]=O[v]=O[w]=O[A]=O[_]=O["[object WeakMap]"]=!1;var M="object"==typeof e&&e&&e.Object===Object&&e,N="object"==typeof self&&self&&self.Object===Object&&self,D=M||N||Function("return this")(),K=t&&!t.nodeType&&t,U=K&&"object"==typeof r&&r&&!r.nodeType&&r,j=U&&U.exports===K&&M.process,F=function(){try{return j&&j.binding("util")}catch(e){}}(),L=F&&F.isTypedArray;function z(e,t,r,n){for(var i=-1,o=e?e.length:0;++i-1},ke.prototype.set=function(e,t){var r=this.__data__,n=Te(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},xe.prototype.clear=function(){this.__data__={hash:new Ee,map:new(le||ke),string:new Ee}},xe.prototype.delete=function(e){return qe(this,e).delete(e)},xe.prototype.get=function(e){return qe(this,e).get(e)},xe.prototype.has=function(e){return qe(this,e).has(e)},xe.prototype.set=function(e,t){return qe(this,e).set(e,t),this},Ce.prototype.add=Ce.prototype.push=function(e){return this.__data__.set(e,o),this},Ce.prototype.has=function(e){return this.__data__.has(e)},Ie.prototype.clear=function(){this.__data__=new ke},Ie.prototype.delete=function(e){return this.__data__.delete(e)},Ie.prototype.get=function(e){return this.__data__.get(e)},Ie.prototype.has=function(e){return this.__data__.has(e)},Ie.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ke){var i=r.__data__;if(!le||i.lengthu))return!1;var l=o.get(e);if(l&&o.get(t))return l==t;var h=-1,p=!0,d=i&s?new Ce:void 0;for(o.set(e,t),o.set(t,e);++h-1&&e%1==0&&e-1&&e%1==0&&e<=u}function ft(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function lt(e){return!!e&&"object"==typeof e}function ht(e){return"symbol"==typeof e||lt(e)&&ne.call(e)==S}var pt=L?function(e){return function(t){return e(t)}}(L):function(e){return lt(e)&&ut(e.length)&&!!O[ne.call(e)]};function dt(e){return at(e)?Be(e):Le(e)}function gt(e){return e}r.exports=rt}).call(this,r(12),r(39)(e))},function(e,t){function r(e,t,r){if(t!=t)return function(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o-1;)l!==e&&o.call(l,h,1),o.call(e,h,1);return e}e.exports=function(e,t,r){return e&&e.length&&t&&t.length?s(e,t,void 0,r):e}},function(e,t,r){"use strict";const n=r(354);e.exports=class{constructor(e){this.partner=e,this.wantlist=new n,this.exchangeCount=0,this.sentToPeer=new Map,this.accounting={bytesSent:0,bytesRecv:0}}sentBytes(e){this.exchangeCount++,this.lastExchange=(new Date).getTime(),this.accounting.bytesSent+=e}receivedBytes(e){this.exchangeCount++,this.lastExchange=(new Date).getTime(),this.accounting.bytesRecv+=e}wants(e,t){this.wantlist.add(e,t)}cancelWant(e){this.wantlist.remove(e)}wantlistContains(e){return this.wantlist.contains(e)}debtRatio(){return this.accounting.bytesSent/(this.accounting.bytesRecv+1)}}},function(e,t,r){"use strict";const n=r(23).EventEmitter,i=r(647),o=r(203).logger,s=e=>`unwant:${e}`,a=e=>`block:${e}`;e.exports=class extends n{constructor(e){super(),this.setMaxListeners(i.maxListeners),this._log=o(e,"notif"),this._unwantListeners={},this._blockListeners={}}hasBlock(e){const t=`block:${e.cid.buffer.toString()}`;this._log(t),this.emit(t,e)}wantBlock(e,t,r){const n=e.buffer.toString();this._log(`wantBlock:${n}`),this._unwantListeners[n]=(()=>{this._log(`manual unwant: ${n}`),this._cleanup(n),r()}),this._blockListeners[n]=(e=>{this._cleanup(n),t(e)}),this.once(s(n),this._unwantListeners[n]),this.once(a(n),this._blockListeners[n])}unwantBlock(e){const t=`unwant:${e.buffer.toString()}`;this._log(t),this.emit(t)}_cleanup(e){this._unwantListeners[e]&&(this.removeListener(s(e),this._unwantListeners[e]),delete this._unwantListeners[e]),this._blockListeners[e]&&(this.removeListener(a(e),this._blockListeners[e]),delete this._blockListeners[e])}}},function(e,t,r){"use strict";const n=r(23),i=r(1281),o={movingAverageIntervals:[6e4,3e5,9e5]};e.exports=class extends n{constructor(e,t){super();const r=Object.assign({},o,t);if("number"!=typeof r.computeThrottleTimeout)throw new Error("need computeThrottleTimeout");if("number"!=typeof r.computeThrottleMaxQueueSize)throw new Error("need computeThrottleMaxQueueSize");this._initialCounters=e,this._options=r,this._enabled=this._options.enabled,this._global=new i(e,r),this._global.on("update",e=>this.emit("update",e)),this._peers=new Map}enable(){this._enabled=!0,this._options.enabled=!0,this._global.enable()}disable(){this._enabled=!1,this._options.enabled=!1,this._global.disable()}stop(){this._enabled=!1,this._global.stop();for(let e of this._peers)e[1].stop()}get snapshot(){return this._global.snapshot}get movingAverages(){return this._global.movingAverages}forPeer(e){return e.toB58String&&(e=e.toB58String()),this._peers.get(e)}push(e,t,r){if(this._enabled&&(this._global.push(t,r),e)){let n=this._peers.get(e);n||(n=new i(this._initialCounters,this._options),this._peers.set(e,n)),n.push(t,r)}}disconnected(e){const t=e.toB58String(),r=this._peers.get(t);r&&(r.stop(),this._peers.delete(t))}}},function(e,t,r){"use strict";const n=r(23),i=r(121),o=r(813);e.exports=class extends n{constructor(e,t){super(),this._options=t,this._queue=[],this._stats={},this._frequencyLastTime=Date.now(),this._frequencyAccumulators={},this._movingAverages={},this._update=this._update.bind(this),e.forEach(e=>{this._stats[e]=i(0),this._movingAverages[e]={},this._options.movingAverageIntervals.forEach(t=>{(this._movingAverages[e][t]=o(t)).push(this._frequencyLastTime,0)})}),this._enabled=this._options.enabled}enable(){this._enabled=!0}disable(){this._disabled=!0}stop(){this._timeout&&clearTimeout(this._timeout)}get snapshot(){return Object.assign({},this._stats)}get movingAverages(){return Object.assign({},this._movingAverages)}push(e,t){this._enabled&&(this._queue.push([e,t,Date.now()]),this._resetComputeTimeout())}_resetComputeTimeout(){this._timeout&&clearTimeout(this._timeout),this._timeout=setTimeout(this._update,this._nextTimeout())}_nextTimeout(){const e=this._queue.length/this._options.computeThrottleMaxQueueSize;return Math.max(this._options.computeThrottleTimeout*(1-e),0)}_update(){if(this._timeout=null,this._queue.length){let e;for(;this._queue.length;){const t=e=this._queue.shift();this._applyOp(t)}this._updateFrequency(e[2]),this.emit("update",this._stats)}}_updateFrequency(e){const t=e-this._frequencyLastTime;Object.keys(this._stats).forEach(r=>{this._updateFrequencyFor(r,t,e)}),this._frequencyLastTime=e}_updateFrequencyFor(e,t,r){const n=this._frequencyAccumulators[e]||0;this._frequencyAccumulators[e]=0;const i=n/t*1e3;let s=this._movingAverages[e];s||(s=this._movingAverages[e]={}),this._options.movingAverageIntervals.forEach(e=>{let t=s[e];t||(t=s[e]=o(e)),t.push(r,i)})}_applyOp(e){const t=e[0],r=e[1];if("number"!=typeof r)throw new Error("invalid increment number:",r);let n;n=this._stats.hasOwnProperty(t)?this._stats[t]:this._stats[t]=i(0),this._stats[t]=n.plus(r),this._frequencyAccumulators[t]||(this._frequencyAccumulators[t]=0),this._frequencyAccumulators[t]+=r}}},function(e,t,r){var n=r(1283),i=r(1290);e.exports=function(e,t){for(var r=0,o=(t=n(t,e)).length;null!=e&&r>>0)+o++,this.max=e.max||1/0,this.items=e.items||[],this._lookup={},this.size=this.items.length,this.lastModified=new Date(e.lastModified||new Date);for(var t,r,n=this.items.length;n--;)t=this.items[n],r=new Date(t.expires)-new Date,this._lookup[t.key]=t,r>0?this.expire(t.key,r):r<=0&&this.delete(t.key)}i.has=function(e){return e in this._lookup},i.get=function(e){if(!this.has(e))return null;var t=this._lookup[e];return t.refresh&&this.expire(e,t.refresh),this.items.splice(this.items.indexOf(t),1),this.items.push(t),t.value},i.meta=function(e){if(!this.has(e))return null;var t=this._lookup[e];return"meta"in t?t.meta:null},i.set=function(e,t,r){var n=this._lookup[e],i=this._lookup[e]={key:e,value:t};return this.lastModified=new Date,n?(clearTimeout(n.timeout),this.items.splice(this.items.indexOf(n),1,i)):(this.size>=this.max&&this.delete(this.items[0].key),this.items.push(i),this.size++),r&&("ttl"in r&&this.expire(e,r.ttl),"meta"in r&&(i.meta=r.meta),r.refresh&&(i.refresh=r.ttl)),this},i.delete=function(e){var t=this._lookup[e];return!!t&&(this.lastModified=new Date,this.items.splice(this.items.indexOf(t),1),clearTimeout(t.timeout),delete this._lookup[e],this.size--,this)},i.expire=function(e,t){var r=t||0,i=this._lookup[e];if(!i)return this;if("string"==typeof r&&(r=n(t)),"number"!=typeof r)throw new TypeError("Expiration time must be a string or number.");return clearTimeout(i.timeout),i.timeout=setTimeout(this.delete.bind(this,i.key),r),i.expires=Number(new Date)+r,this},i.clear=function(){for(var e=this.items.length;e--;)this.delete(this.items[e].key);return this},i.toJSON=function(){for(var e,t=new Array(this.items.length),r=t.length;r--;)e=this.items[r],t[r]={key:e.key,meta:e.meta,value:e.value,expires:e.expires,refresh:e.refresh};return{id:this.id,max:isFinite(this.max)?this.max:void 0,lastModified:this.lastModified,items:t}}},function(e,t,r){"use strict";const n=r(41),{Key:i}=r(34),o=r(61),s=r(36),a=r(11),c=a("jsipfs:ipns:publisher");c.error=a("jsipfs:ipns:publisher:error");const u=r(293),f=36e5;e.exports=class{constructor(e,t){this._routing=e,this._datastore=t}publishWithEOL(e,t,r,i){if(!e||!e.bytes){const e="one or more of the provided parameters are not defined";return c.error(e),i(s(new Error(e),"ERR_UNDEFINED_PARAMETER"))}n.createFromPrivKey(e.bytes,(n,o)=>{if(n)return i(n);this._updateOrCreateRecord(e,t,r,o,(e,t)=>{if(e)return i(e);this._putRecordToRouting(t,o,i)})})}publish(e,t,r){this.publishWithEOL(e,t,f,r)}_putRecordToRouting(e,t,r){if(!n.isPeerId(t)){const e="peerId received is not valid";return c.error(e),r(s(new Error(e),"ERR_INVALID_PEER_ID"))}const i=t._pubKey;u.embedPublicKey(i,e,(n,s)=>{if(n)return r(n);let a;try{a=u.getIdKeys(t.toBytes())}catch(n){return c.error(n),r(n)}o([r=>this._publishEntry(a.routingKey,s||e,t,r),e=>this._publishPublicKey(a.routingPubKey,i,t,e)],t=>{if(t)return c.error(t),r(t);r(null,s||e)})})}_publishEntry(e,t,r,n){if(!i.isKey(e)){const e="datastore key does not have a valid format";return c.error(e),n(s(new Error(e),"ERR_INVALID_DATASTORE_KEY"))}let o;try{o=u.marshal(t)}catch(e){return c.error(e),n(e)}this._routing.put(e.toBuffer(),o,(t,r)=>{if(t){const t=`ipns record for ${e.toString()} could not be stored in the routing`;return c.error(t),n(s(new Error(t),"ERR_PUTTING_TO_ROUTING"))}c(`ipns record for ${e.toString()} was stored in the routing`),n(null,r)})}_publishPublicKey(e,t,r,n){if(!i.isKey(e)){const e="datastore key does not have a valid format";return c.error(e),n(s(new Error(e),"ERR_INVALID_DATASTORE_KEY"))}if(!t||!t.bytes){const e="one or more of the provided parameters are not defined";return c.error(e),n(s(new Error(e),"ERR_UNDEFINED_PARAMETER"))}this._routing.put(e.toBuffer(),t.bytes,(t,r)=>{if(t){const t=`public key for ${e.toString()} could not be stored in the routing`;return c.error(t),n(s(new Error(t),"ERR_PUTTING_TO_ROUTING"))}c(`public key for ${e.toString()} was stored in the routing`),n(null,r)})}_getPublished(e,t,r){if(!n.isPeerId(e)){const e="peerId received is not valid";return c.error(e),r(s(new Error(e),"ERR_INVALID_PEER_ID"))}const i=!1!==(t=t||{}).checkRouting;this._datastore.get(u.getLocalKey(e.id),(t,n)=>{if(t){if("ERR_NOT_FOUND"!==t.code){const t=`unexpected error getting the ipns record ${e.id} from datastore`;return c.error(t),r(s(new Error(t),"ERR_UNEXPECTED_DATASTORE_RESPONSE"))}if(!i)return r(s(t));let n;try{n=u.getIdKeys(e.toBytes())}catch(t){return c.error(t),r(t)}this._routing.get(n.routingKey.toBuffer(),(e,t)=>{if(e)return r(e);this._unmarshalData(t,r)})}else this._unmarshalData(n,r)})}_unmarshalData(e,t){let r;try{r=u.unmarshal(e)}catch(e){return c.error(e),t(s(e,"ERR_INVALID_RECORD_DATA"))}t(null,r)}_updateOrCreateRecord(e,t,r,i,o){if(!n.isPeerId(i)){const e="peerId received is not valid";return c.error(e),o(s(new Error(e),"ERR_INVALID_PEER_ID"))}this._getPublished(i,{checkRouting:!0},(n,a)=>{if(n&&"ERR_NOT_FOUND"!==n.code){const e=`unexpected error when determining the last published IPNS record for ${i.id}`;return c.error(e),o(s(new Error(e),"ERR_DETERMINING_PUBLISHED_RECORD"))}let f=0;a&&void 0!==a.sequence&&(f=a.value.toString()!==t?a.sequence+1:a.sequence),u.create(e,t,f,r,(e,r)=>{if(e){const e=`ipns record for ${t} could not be created`;return c.error(e),o(s(new Error(e),"ERR_CREATING_IPNS_RECORD"))}const n=u.marshal(r);this._datastore.put(u.getLocalKey(i.id),n,(e,n)=>{if(e){const e=`ipns record for ${t} could not be stored in the datastore`;return c.error(e),o(s(new Error(e),"ERR_STORING_IN_DATASTORE"))}c(`ipns record for ${t} was stored in the datastore`),o(null,r)})})})}}},function(e,t){e.exports=function(e,t,r){var n,i;switch(r=r||{},t){case"RFC3548":case"RFC4648":n="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",i=!0;break;case"RFC4648-HEX":n="0123456789ABCDEFGHIJKLMNOPQRSTUV",i=!0;break;case"Crockford":n="0123456789ABCDEFGHJKMNPQRSTVWXYZ",i=!1;break;default:throw new Error("Unknown base32 variant: "+t)}for(var o=void 0!==r.padding?r.padding:i,s=e.byteLength,a=new Uint8Array(e),c=0,u=0,f="",l=0;l=5;)f+=n[u>>>c-5&31],c-=5;if(c>0&&(f+=n[u<<5-c&31]),o)for(;f.length%8!=0;)f+="=";return f}},function(e,t,r){var n,i,o;i=[t,r(1295),r(1995),r(1296)],void 0===(o="function"==typeof(n=function(e,t,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=s(t),o=s(n);function s(e){return e&&e.__esModule?e:{default:e}}var a,c,u,f,l,h,p=function(){function e(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return 0===t?e:R((r?"0":"")+e+(r?"":"0"),t-1,r)}function P(e){var t=""+e;return t.length<=y?t.indexOf(".")>-1?(t=e.toFixed(3),new i.default(t.replace(".","")+"000")):new i.default(t):new i.default(t.slice(0,y))}function O(e){return/^(-)?\d+$/.test(""+e)}function M(e){var t=e.toNumber();return t%4==0&&t%100!=0||t%400==0}function N(e){return M(e)?366:365}function D(e,t){var r=M(e)?B:I;return r[t.toNumber()]}function K(e){return void 0!==e}var U=["getFullYear","getYear","getMonth","getDate","getDay","getHours","getMinutes","getSeconds","getMilliseconds","getUTCFullYear","getUTCYear","getUTCMonth","getUTCDate","getUTCDay","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","toDateString","toLocaleDateString","toLocaleString","toTimeString","toLocaleTimeString","toISOString","getTimezoneOffset"],j=(a=(0,r.decorate)((0,o.default)(100)),c=(0,r.decorate)((0,o.default)(250)),u=(0,r.decorate)((0,o.default)(100)),f=(0,r.deprecate)("Use toUTCString() instead"),(0,r.autobind)((d((h=function(){function e(t,r,n,i,o,s,a,c){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"string"==typeof t)this._full=O(t)?P(t):P(new g(t).valueOf()*m);else if(0===arguments.length)this._full=P((new g).valueOf()*m);else if(1===arguments.length)if(t instanceof e)this._full=t._full;else if(t instanceof g)this._full=P(t.valueOf()*m);else{if("number"!=typeof t)throw Error("Input not of any type that can be converted to a date");var u=m;(""+t).indexOf(".")>-1&&(u=1),this._full=P(t*u)}else{var f=void 0;f="boolean"==typeof t?g.UTC(r,n||0,i||0,o||0,s||0,a||0,c||0):new g(t,r,n||0,i||0,o||0,s||0,a||0),this._full=P(f.valueOf()*m)}if(this._setupFunctions(),this.proxy=new Proxy(this,{get:function(e,t){if(t in e)return e[t];if(U.indexOf(t)>-1)return e._date[t].bind(e._date);var r=e._buildSetFunction.bind(e,e);switch(t){case"setUTCNanoseconds":case"setNanoseconds":return r("setNanoseconds",["nanosecond"],e.proxy.getUTCNanoseconds,C,function(){},!1);case"setUTCMicroseconds":case"setMicroseconds":return r("setMicoseconds",["microsecond","nanosecond"],e.proxy.getUTCMicroseconds,x,e.proxy.setUTCNanoseconds,!1);case"setUTCMilliseconds":case"setMilliseconds":return r("setMilliseconds",["millisecond","microsecond","nanosecond"],e.proxy.getUTCMilliseconds,k,e.proxy.setUTCMicroseconds,!1);case"setUTCSeconds":return r("setUTCSeconds",["second","millisecond","microsecond","nanosecond"],e.proxy.getUTCSeconds,E,e.proxy.setUTCMilliseconds,!0);case"setSeconds":return r("setSeconds",["second","millisecond","microsecond","nanosecond"],e.proxy.getSeconds,E,e.proxy.setMilliseconds,!1);case"setUTCMinutes":return r("setUTCMinutes",["minute","second","millisecond","microsecond","nanosecond"],e.proxy.getUTCMinutes,S,e.proxy.setUTCSeconds,!0);case"setMinutes":return r("setMinutes",["minute","second","millisecond","microsecond","nanosecond"],e.proxy.getMinutes,S,e.proxy.setSeconds,!1);case"setUTCHours":return r("setUTCHours",["hour","minute","second","millisecond","microsecond","nanosecond"],e.proxy.getUTCHours,_,e.proxy.setUTCMinutes,!0);case"setHours":return r("setHours",["hour","minute","second","millisecond","microsecond","nanosecond"],e.proxy.getHours,_,e.proxy.setMinutes,!1);case"setUTCDate":return r("setUTCDate",["day"],e.proxy.getUTCDate,A,function(){},!0);case"setDate":return r("setDate",["day"],e.proxy.getDate,A,function(){},!1);case"setUTCMonth":return r("setUTCMonth",["month","day"],e.proxy.getUTCMonth,w,e.proxy.setUTCDate,!0);case"setMonth":return r("setMonth",["month","day"],e.proxy.getMonth,w,e.proxy.setDate,!1);case"setUTCFullYear":return r("setUTCFullYear",["year","month","day"],e.proxy.getUTCFullYear,v,e.proxy.setUTCMonth,!0);case"setFullYear":return r("setFullYear",["year","month","day"],e.proxy.getFullYear,v,e.proxy.setMonth,!1)}}}),"string"==typeof t&&b.test(t)&&t.indexOf(".")>-1){var l=t.match(b);if(void 0!==l[1]){var h=R(d=l[1].replace(".",""),9-(""+d).length),p=parseInt(h,10);p>0&&(this.proxy.setMilliseconds(Math.floor(p/m)),p%=m),p>0&&(this.proxy.setMicroseconds(Math.floor(p/1e3)),p%=1e3),p>0&&this.proxy.setNanoseconds(Math.floor(p))}}var d;return this.proxy}return p(e,[{key:"_buildSetFunction",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(){},s=arguments.length>6&&void 0!==arguments[6]&&arguments[6];function a(){for(var a=arguments.length,c=Array(a),u=0;u3&&void 0!==arguments[3]?arguments[3]:0,o=t[i],s=n[i];if("number"!=typeof o||!O(o))throw new Error("Parameter "+s+" value for "+r+" has to be an integer.");n.length>i&&K(t[i+1])&&e(t,r,n,i+1)}(c,t,r);var f=n();if(f!==c[0]){if(f1&&!K(c[1]))&&e._setupFunctions.call(e)}return c.length>1&&K(c[1])&&(c.shift(),o.apply(e,c)),n()}return Object.defineProperty(a,"name",{value:t,writable:!1}),a.bind(e)}},{key:"_setupFunctions",value:function(){this._date=new g(this.valueOf())}},{key:"_getDaysBetween",value:function(e,t,r){if(e.eq(t))return new i.default(0);for(var n=new i.default(0),o=e.lt(t)?1:-1,s=new i.default(e);!s.eq(t);){var a=r(s);n=n.plus(a),s=s.plus(o)}return n.times(o)}},{key:"_getFullYear",value:function(e){return e?this.proxy.getUTCFullYear():this.proxy.getFullYear()}},{key:"_getDate",value:function(e){return e?this.proxy.getUTCDate():this.proxy.getDate()}},{key:"_getMonth",value:function(e){return e?this.proxy.getUTCMonth():this.proxy.getMonth()}},{key:"_getDays",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new i.default(this._getFullYear(t)),n=new i.default(e),o=new i.default(this._getDate(t)).minus(1);if(e>=12){var s=n.dividedToIntegerBy(12),a=new i.default(r),c=a.plus(s);o=this._getDaysBetween(a,c,N),n=n.plus(s.times(12).times(n.lessThan(0)?1:-1))}var u=new i.default(this._getMonth(t)),f=u.plus(n);return f.greaterThan(11)&&(f=u.minus(n)),f.lessThan(u)?o.plus(this._getDaysBetween(f,u,D.bind(null,r))):o.plus(this._getDaysBetween(u,f,D.bind(null,r)))}},{key:"_getValue",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=new i.default(r);switch(t){case v:return e._getValue(e,w,o.times(12),n);case w:return e._getValue(e,A,e._getDays(o,n),n);case A:return e._getValue(e,_,o.times(24),n);case _:return e._getValue(e,S,o.times(60),n);case S:return e._getValue(e,E,o.times(60),n);case E:return e._getValue(e,k,o.times(1e3),n);case k:return e._getValue(e,x,o.times(1e3),n);case x:return e._getValue(e,C,o.times(1e3),n);case C:default:return o}}},{key:"getTime",value:function(){return this._full.toString()}},{key:"valueOf",value:function(){return this._full.dividedBy(m).truncated().toNumber()}},{key:"valueOfWithMicro",value:function(){return parseFloat(this.valueOf()+"."+T(this.proxy.getMicroseconds()),10)}},{key:"valueOfWithNano",value:function(){return""+this.valueOfWithMicro().toFixed(3)+T(this.proxy.getNanoseconds())}},{key:"getMicroseconds",value:function(){return this._full.minus(this.valueOf()*m).dividedBy(1e3).truncated().toNumber()}},{key:"getUTCMicroseconds",value:function(){return this.proxy.getMicroseconds()}},{key:"getNanoseconds",value:function(){return this._full.minus(this.valueOf()*m).minus(1e3*this.proxy.getMicroseconds()).truncated().toNumber()}},{key:"getUTCNanoseconds",value:function(){return this.proxy.getNanoseconds()}},{key:"setTime",value:function(e){return this._full=P(e),this._setupFunctions(),e}},{key:"setUTCTime",value:function(e){return this.proxy.setTime(e)}},{key:"_toString",value:function(e){var t=this._date[e]().split(" GMT"),r=this.proxy.getMilliseconds(),n=this.proxy.getMicroseconds(),i=this.proxy.getNanoseconds();return t[0]+="."+T(r)+T(n)+T(i),t.join(" GMT")}},{key:"toString",value:function(){return this._toString("toString")}},{key:"toUTCString",value:function(){return this._toString("toUTCString")}},{key:"toISOStringFull",value:function(){var e=this.proxy.getMicroseconds(),t=this.proxy.getNanoseconds();return this._date.toISOString().replace("Z",""+T(e)+T(t)+"Z")}},{key:"toGMTString",value:function(){return this.toUTCString()}}],[{key:"now",value:function(){return(new e).valueOf()}},{key:"parse",value:function(){return g.parse.apply(g,arguments)}},{key:"UTC",value:function(){for(var t=arguments.length,r=Array(t),n=0;n0||e===t?t:t-1}function w(e){for(var t,r,n=1,i=e.length,o=e[0]+"";nu^r?1:-1;for(a=(c=i.length)<(u=o.length)?c:u,s=0;so[s]^r?1:-1;return c==u?0:c>u^r?1:-1}function _(e,t,r){return(e=C(e))>=t&&e<=r}function S(e){return"[object Array]"==Object.prototype.toString.call(e)}function E(e,t,r){for(var n,i,o=[0],s=0,a=e.length;sr-1&&(null==o[n+1]&&(o[n+1]=0),o[n+1]+=o[n]/r|0,o[n]%=r)}return o.reverse()}function k(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function x(e,t){var r,n;if(t<0){for(n="0.";++t;n+="0");e=n+e}else if(++t>(r=e.length)){for(n="0",t-=r;--t;n+="0");e+=n}else t15&&$(P,l,e),a=!1):p.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1,f=Y(f,10,t,p.s)}else{if(e instanceof W)return p.s=e.s,p.e=e.e,p.c=(e=e.c)?e.slice():e,void(P=0);if((a="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(i=0,o=e;o>=10;o/=10,i++);return p.e=i,p.c=[e],void(P=0)}f=e+""}else{if(!s.test(f=e+""))return n(p,f,a);p.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1}}for((i=f.indexOf("."))>-1&&(f=f.replace(".","")),(o=f.search(/e/i))>0?(i<0&&(i=o),i+=+f.slice(o+1),f=f.substring(0,o)):i<0&&(i=f.length),o=0;48===f.charCodeAt(o);o++);for(u=f.length;48===f.charCodeAt(--u););if(f=f.slice(o,u+1))if(u=f.length,a&&L&&u>15&&(e>g||e!==c(e))&&$(P,l,p.s*e),(i=i-o-1)>F)p.c=p.e=null;else if(i=0&&(a=V,V=0,e=e.replace(".",""),u=(l=new W(n)).pow(e.length-p),V=a,l.c=E(x(w(u.c),u.e),10,t),l.e=l.c.length),s=a=(f=E(e,n,t)).length;0==f[--a];f.pop());if(!f[0])return"0";if(p<0?--s:(u.c=f,u.e=s,u.s=i,f=(u=r(u,l,d,g,t)).c,c=u.r,s=u.e),p=f[o=s+d+1],a=t/2,c=c||o<0||null!=f[o+1],c=g<4?(null!=p||c)&&(0==g||g==(u.s<0?3:2)):p>a||p==a&&(4==g||c||6==g&&1&f[o-1]||g==(u.s<0?8:7)),o<1||!f[0])e=c?x("1",-d):"0";else{if(f.length=o,c)for(--t;++f[--o]>t;)f[o]=0,o||(++s,f=[1].concat(f));for(a=f.length;!f[--a];);for(p=0,e="";p<=a;e+=h.charAt(f[p++]));e=x(e,s)}return e}function J(e,t,r,n){var i,o,s,a,c;if(r=null!=r&&z(r,0,8,n,f)?0|r:D,!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)c=w(e.c),c=19==n||24==n&&s<=K?k(c,s):x(c,s);else if(o=(e=ee(new W(e),t,r)).e,a=(c=w(e.c)).length,19==n||24==n&&(t<=o||o<=K)){for(;aa){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=o-a)>0)for(o+1==a&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function Z(e,t){var r,n,i=0;for(S(e[0])&&(e=e[0]),r=new W(e[0]);++ir||e!=C(e))&&$(n,(i||"decimal places")+(er?" out of range":" not an integer"),e),!0}function X(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*d-1)>F?e.c=e.e=null:r=10;u/=10,i++);if((o=t-i)<0)o+=d,s=t,h=(f=g[l=0])/m[i-s-1]%10|0;else if((l=a((o+1)/d))>=g.length){if(!n)break e;for(;g.length<=l;g.push(0));f=h=0,i=1,s=(o%=d)-d+1}else{for(f=u=g[l],i=1;u>=10;u/=10,i++);h=(s=(o%=d)-d+i)<0?0:f/m[i-s-1]%10|0}if(n=n||t<0||null!=g[l+1]||(s<0?f:f%m[i-s-1]),n=r<4?(h||n)&&(0==r||r==(e.s<0?3:2)):h>5||5==h&&(4==r||n||6==r&&(o>0?s>0?f/m[i-s]:0:g[l-1])%10&1||r==(e.s<0?8:7)),t<1||!g[0])return g.length=0,n?(t-=e.e+1,g[0]=m[(d-t%d)%d],e.e=-t||0):g[0]=e.e=0,e;if(0==o?(g.length=l,u=1,l--):(g.length=l+1,u=m[d-o],g[l]=s>0?c(f/m[i-s]%m[s])*u:0),n)for(;;){if(0==l){for(o=1,s=g[0];s>=10;s/=10,o++);for(s=g[0]+=u,u=1;s>=10;s/=10,u++);o!=u&&(e.e++,g[0]==p&&(g[0]=1));break}if(g[l]+=u,g[l]!=p)break;g[l--]=0,u=1}for(o=g.length;0===g[--o];g.pop());}e.e>F?e.c=e.e=null:e.er)return null!=(e=i[r++])};return s(t="DECIMAL_PLACES")&&z(e,0,y,2,t)&&(N=0|e),n[t]=N,s(t="ROUNDING_MODE")&&z(e,0,8,2,t)&&(D=0|e),n[t]=D,s(t="EXPONENTIAL_AT")&&(S(e)?z(e[0],-y,0,2,t)&&z(e[1],0,y,2,t)&&(K=0|e[0],U=0|e[1]):z(e,-y,y,2,t)&&(K=-(U=0|(e<0?-e:e)))),n[t]=[K,U],s(t="RANGE")&&(S(e)?z(e[0],-y,-1,2,t)&&z(e[1],1,y,2,t)&&(j=0|e[0],F=0|e[1]):z(e,-y,y,2,t)&&(0|e?j=-(F=0|(e<0?-e:e)):L&&$(2,t+" cannot be zero",e))),n[t]=[j,F],s(t="ERRORS")&&(e===!!e||1===e||0===e?(P=0,z=(L=!!e)?Q:_):L&&$(2,t+u,e)),n[t]=L,s(t="CRYPTO")&&(!0===e||!1===e||1===e||0===e?e?!(e="undefined"==typeof crypto)&&crypto&&(crypto.getRandomValues||crypto.randomBytes)?H=!0:L?$(2,"crypto unavailable",e?void 0:crypto):H=!1:H=!1:L&&$(2,t+u,e)),n[t]=H,s(t="MODULO_MODE")&&z(e,0,9,2,t)&&(q=0|e),n[t]=q,s(t="POW_PRECISION")&&z(e,0,y,2,t)&&(V=0|e),n[t]=V,s(t="FORMAT")&&("object"==typeof e?G=e:L&&$(2,t+" not an object",e)),n[t]=G,n},W.max=function(){return Z(arguments,O.lt)},W.min=function(){return Z(arguments,O.gt)},W.random=(i=9007199254740992*Math.random()&2097151?function(){return c(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,o,s,u=0,f=[],l=new W(M);if(e=null!=e&&z(e,0,y,14)?0|e:N,o=a(e/d),H)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));u>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[u]=r[0],t[u+1]=r[1]):(f.push(s%1e14),u+=2);u=o/2}else if(crypto.randomBytes){for(t=crypto.randomBytes(o*=7);u=9e15?crypto.randomBytes(7).copy(t,u):(f.push(s%1e14),u+=7);u=o/7}else H=!1,L&&$(14,"crypto unavailable",crypto);if(!H)for(;u=10;s/=10,u++);un?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}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,o,s,a){var u,f,l,h,g,b,m,y,w,A,_,S,E,k,x,C,I,B=n.s==i.s?1:-1,T=n.c,R=i.c;if(!(T&&T[0]&&R&&R[0]))return new W(n.s&&i.s&&(T?!R||T[0]!=R[0]:R)?T&&0==T[0]||!R?0*B:B/0:NaN);for(w=(y=new W(B)).c=[],B=o+(f=n.e-i.e)+1,a||(a=p,f=v(n.e/d)-v(i.e/d),B=B/d|0),l=0;R[l]==(T[l]||0);l++);if(R[l]>(T[l]||0)&&f--,B<0)w.push(1),h=!0;else{for(k=T.length,C=R.length,l=0,B+=2,(g=c(a/(R[0]+1)))>1&&(R=e(R,g,a),T=e(T,g,a),C=R.length,k=T.length),E=C,_=(A=T.slice(0,C)).length;_=a/2&&x++;do{if(g=0,(u=t(R,A,C,_))<0){if(S=A[0],C!=_&&(S=S*a+(A[1]||0)),(g=c(S/x))>1)for(g>=a&&(g=a-1),m=(b=e(R,g,a)).length,_=A.length;1==t(b,A,m,_);)g--,r(b,C=10;B/=10,l++);ee(y,o+(y.e=l+f*d-1)+1,s,h)}else y.e=f,y.r=+h;return y}}(),o=/^(-?)0([xbo])(?=\w[\w.]*$)/i,I=/^([^.]+)\.$/,B=/^\.([^.]+)$/,T=/^-?(Infinity|NaN)$/,R=/^\s*\+(?=[\w.])|^\s+|\s+$/g,n=function(e,t,r,n){var i,s=r?t:t.replace(R,"");if(T.test(s))e.s=isNaN(s)?null:s<0?-1:1;else{if(!r&&(s=s.replace(o,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(B,"0.$1")),t!=s))return new W(s,i);L&&$(P,"not a"+(n?" base "+n:"")+" number",t),e.s=null}e.c=e.e=null,P=0},O.absoluteValue=O.abs=function(){var e=new W(this);return e.s<0&&(e.s=1),e},O.ceil=function(){return ee(new W(this),this.e+1,2)},O.comparedTo=O.cmp=function(e,t){return P=1,A(this,new W(e,t))},O.decimalPlaces=O.dp=function(){var e,t,r=this.c;if(!r)return null;if(e=((t=r.length-1)-v(this.e/d))*d,t=r[t])for(;t%10==0;t/=10,e--);return e<0&&(e=0),e},O.dividedBy=O.div=function(e,t){return P=3,r(this,new W(e,t),N,D)},O.dividedToIntegerBy=O.divToInt=function(e,t){return P=4,r(this,new W(e,t),0,1)},O.equals=O.eq=function(e,t){return P=5,0===A(this,new W(e,t))},O.floor=function(){return ee(new W(this),this.e+1,3)},O.greaterThan=O.gt=function(e,t){return P=6,A(this,new W(e,t))>0},O.greaterThanOrEqualTo=O.gte=function(e,t){return P=7,1===(t=A(this,new W(e,t)))||0===t},O.isFinite=function(){return!!this.c},O.isInteger=O.isInt=function(){return!!this.c&&v(this.e/d)>this.c.length-2},O.isNaN=function(){return!this.s},O.isNegative=O.isNeg=function(){return this.s<0},O.isZero=function(){return!!this.c&&0==this.c[0]},O.lessThan=O.lt=function(e,t){return P=8,A(this,new W(e,t))<0},O.lessThanOrEqualTo=O.lte=function(e,t){return P=9,-1===(t=A(this,new W(e,t)))||0===t},O.minus=O.sub=function(e,t){var r,n,i,o,s=this,a=s.s;if(P=10,t=(e=new W(e,t)).s,!a||!t)return new W(NaN);if(a!=t)return e.s=-t,s.plus(e);var c=s.e/d,u=e.e/d,f=s.c,l=e.c;if(!c||!u){if(!f||!l)return f?(e.s=-t,e):new W(l?s:NaN);if(!f[0]||!l[0])return l[0]?(e.s=-t,e):new W(f[0]?s:3==D?-0:0)}if(c=v(c),u=v(u),f=f.slice(),a=c-u){for((o=a<0)?(a=-a,i=f):(u=c,i=l),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(n=(o=(a=f.length)<(t=l.length))?a:t,a=t=0;t0)for(;t--;f[r++]=0);for(t=p-1;n>a;){if(f[--n]0?(s=o,r=c):(i=-i,r=a),r.reverse();i--;r.push(0));r.reverse()}for((i=a.length)-(t=c.length)<0&&(r=c,c=a,a=r,t=i),i=0;t;)i=(a[--t]=a[t]+c[t]+i)/p|0,a[t]=p===a[t]?0:a[t]%p;return i&&(a=[i].concat(a),++s),X(e,a,s)},O.precision=O.sd=function(e){var t,r,n=this,i=n.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(L&&$(13,"argument"+u,e),e!=!!e&&(e=null)),!i)return null;if(t=(r=i.length-1)*d+1,r=i[r]){for(;r%10==0;r/=10,t--);for(r=i[0];r>=10;r/=10,t++);}return e&&n.e+1>t&&(t=n.e+1),t},O.round=function(e,t){var r=new W(this);return(null==e||z(e,0,y,15))&&ee(r,~~e+this.e+1,null!=t&&z(t,0,8,15,f)?0|t:D),r},O.shift=function(e){var t=this;return z(e,-g,g,16,"argument")?t.times("1e"+C(e)):new W(t.c&&t.c[0]&&(e<-g||e>g)?t.s*(e<0?0:1/0):t)},O.squareRoot=O.sqrt=function(){var e,t,n,i,o,s=this,a=s.c,c=s.s,u=s.e,f=N+4,l=new W("0.5");if(1!==c||!a||!a[0])return new W(!c||c<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(c=Math.sqrt(+s))||c==1/0?(((t=w(a)).length+u)%2==0&&(t+="0"),c=Math.sqrt(t),u=v((u+1)/2)-(u<0||u%2),n=new W(t=c==1/0?"1e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new W(c+""),n.c[0])for((c=(u=n.e)+f)<3&&(c=0);;)if(o=n,n=l.times(o.plus(r(s,o,f,1))),w(o.c).slice(0,c)===(t=w(n.c)).slice(0,c)){if(n.e=0;){for(r=0,h=S[i]%w,g=S[i]/w|0,o=i+(s=c);o>i;)r=((u=h*(u=_[--s]%w)+(a=g*u+(f=_[s]/w|0)*h)%w*w+b[o]+r)/y|0)+(a/w|0)+g*f,b[o--]=u%y;b[o]=r}return r?++n:b.splice(0,1),X(e,b,n)},O.toDigits=function(e,t){var r=new W(this);return e=null!=e&&z(e,1,y,18,"precision")?0|e:null,t=null!=t&&z(t,0,8,18,f)?0|t:D,e?ee(r,e,t):r},O.toExponential=function(e,t){return J(this,null!=e&&z(e,0,y,19)?1+~~e:null,t,19)},O.toFixed=function(e,t){return J(this,null!=e&&z(e,0,y,20)?~~e+this.e+1:null,t,20)},O.toFormat=function(e,t){var r=J(this,null!=e&&z(e,0,y,21)?~~e+this.e+1:null,t,21);if(this.c){var n,i=r.split("."),o=+G.groupSize,s=+G.secondaryGroupSize,a=G.groupSeparator,c=i[0],u=i[1],f=this.s<0,l=f?c.slice(1):c,h=l.length;if(s&&(n=o,o=s,s=n,h-=n),o>0&&h>0){for(n=h%o||o,c=l.substr(0,n);n0&&(c+=a+l.slice(n)),f&&(c="-"+c)}r=u?c+G.decimalSeparator+((s=+G.fractionGroupSize)?u.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+G.fractionGroupSeparator):u):c}return r},O.toFraction=function(e){var t,n,i,o,s,a,c,u,f,l=L,h=this,p=h.c,g=new W(M),m=n=new W(M),y=c=new W(M);if(null!=e&&(L=!1,a=new W(e),L=l,(l=a.isInt())&&!a.lt(M)||(L&&$(22,"max denominator "+(l?"out of range":"not an integer"),e),e=!l&&a.c&&ee(a,a.e+1,1).gte(M)?a:null)),!p)return h.toString();for(f=w(p),o=g.e=f.length-h.e-1,g.c[0]=b[(s=o%d)<0?d+s:s],e=!e||a.cmp(g)>0?o>0?g:m:a,s=F,F=1/0,a=new W(f),c.c[0]=0;u=r(a,g,0,1),1!=(i=n.plus(u.times(y))).cmp(e);)n=y,y=i,m=c.plus(u.times(i=m)),c=i,g=a.minus(u.times(i=g)),a=i;return i=r(e.minus(n),y,0,1),c=c.plus(i.times(m)),n=n.plus(i.times(y)),c.s=m.s=h.s,t=r(m,y,o*=2,D).minus(h).abs().cmp(r(c,n,o,D).minus(h).abs())<1?[m.toString(),y.toString()]:[c.toString(),n.toString()],F=s,t},O.toNumber=function(){return+this},O.toPower=O.pow=function(e,t){var r,n,i,o=c(e<0?-e:+e),s=this;if(null!=t&&(P=23,t=new W(t)),!z(e,-g,g,23,"exponent")&&(!isFinite(e)||o>g&&(e/=0)||parseFloat(e)!=e&&!(e=NaN))||0==e)return r=Math.pow(+s,e),new W(t?r%t:r);for(t?e>1&&s.gt(M)&&s.isInt()&&t.gt(M)&&t.isInt()?s=s.mod(t):(i=t,t=null):V&&(r=a(V/d+2)),n=new W(M);;){if(o%2){if(!(n=n.times(s)).c)break;r?n.c.length>r&&(n.c.length=r):t&&(n=n.mod(t))}if(!(o=c(o/2)))break;s=s.times(s),r?s.c&&s.c.length>r&&(s.c.length=r):t&&(s=s.mod(t))}return t?n:(e<0&&(n=M.div(n)),i?n.mod(i):r?ee(n,V,D):n)},O.toPrecision=function(e,t){return J(this,null!=e&&z(e,1,y,24,"precision")?0|e:null,t,24)},O.toString=function(e){var t,r=this,n=r.s,i=r.e;return null===i?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(t=w(r.c),t=null!=e&&z(e,2,64,25,"base")?Y(x(t,i),0|e,10,n):i<=K||i>=U?k(t,i):x(t,i),n<0&&r.c[0]&&(t="-"+t)),t},O.truncated=O.trunc=function(){return ee(new W(this),this.e+1,1)},O.valueOf=O.toJSON=function(){var e,t=this,r=t.e;return null===r?t.toString():(e=w(t.c),e=r<=K||r>=U?k(e,r):x(e,r),t.s<0?"-"+e:e)},O.isBigNumber=!0,null!=t&&W.config(t),W}()).default=o.BigNumber=o,void 0===(n=function(){return o}.call(t,r,t,e))||(e.exports=n)}()},function(e,t,r){var n;e.exports=function e(t,r,i){function o(a,c){if(!r[a]){if(!t[a]){var u="function"==typeof n&&n;if(!c&&u)return n(a,!0);if(s)return s(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var l=r[a]={exports:{}};t[a][0].call(l.exports,function(e){var r=t[a][1][e];return o(r||e)},l,l.exports,e,t,r,i)}return r[a].exports}for(var s="function"==typeof n&&n,a=0;a=0?(this.lastItem=this.list[t],this.list[t].val):void 0},n.prototype.set=function(e,t){var r;return this.lastItem&&this.isEqual(this.lastItem.key,e)?(this.lastItem.val=t,this):(r=this.indexOf(e))>=0?(this.lastItem=this.list[r],this.list[r].val=t,this):(this.lastItem={key:e,val:t},this.list.push(this.lastItem),this.size++,this)},n.prototype.delete=function(e){var t;if(this.lastItem&&this.isEqual(this.lastItem.key,e)&&(this.lastItem=void 0),(t=this.indexOf(e))>=0)return this.size--,this.list.splice(t,1)[0]},n.prototype.has=function(e){var t;return!(!this.lastItem||!this.isEqual(this.lastItem.key,e))||(t=this.indexOf(e))>=0&&(this.lastItem=this.list[t],!0)},n.prototype.forEach=function(e,t){var r;for(r=0;r0&&(l[f]={cacheItem:u,arg:arguments[f]},h?function(e,t){var r,n,i,o,s,a=e.length,c=t.length;for(n=0;ne&&function(e){var t,r,n=e.length,i=e[n-1];for(i.cacheItem.delete(i.arg),r=n-2;r>=0&&(i=e[r],!(t=i.cacheItem.get(i.arg))||!t.size);r--)i.cacheItem.delete(i.arg)}(r.shift())),o.wasMemoized=h,o.numArgs=f+1,a};return o.limit=e,o.wasMemoized=!1,o.cache=t,o.lru=r,o}}},{"map-or-similar":1}]},{},[3])(3)},function(e,t,r){"use strict";const n=r(19);e.exports=n('\nmessage IpnsEntry {\n enum ValidityType {\n\t\tEOL = 0; // setting an EOL says "this record is valid until..."\n\t}\n\n required bytes value = 1;\n\trequired bytes signature = 2;\n\n\toptional ValidityType validityType = 3;\n\toptional bytes validity = 4;\n\n\toptional uint64 sequence = 5;\n\n\toptional uint64 ttl = 6;\n\n\t// in order for nodes to properly validate a record upon receipt, they need the public\n\t// key associated with it. For old RSA keys, its easiest if we just send this as part of\n\t// the record itself. For newer ed25519 keys, the public key can be embedded in the\n\t// peerID, making this field unnecessary.\n\toptional bytes pubKey = 7;\n}\n').IpnsEntry},function(e,t,r){"use strict";const n=r(335);e.exports.toRFC3339=(e=>{return`${e.getUTCFullYear()}-${n(e.getUTCMonth()+1,2,"0")}-${n(e.getUTCDate(),2,"0")}T${n(e.getUTCHours(),2,"0")}:${n(e.getUTCMinutes(),2,"0")}:${n(e.getUTCSeconds(),2,"0")}.${1e3*e.getUTCMilliseconds()*1e3}Z`}),e.exports.parseRFC3339=(e=>{const t=new RegExp("(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})\\.(\\d+)Z"),r=String(e).trim().match(t);if(!r)throw new Error("Invalid format");const n=parseInt(r[1],10),i=parseInt(r[2],10)-1,o=parseInt(r[3],10),s=parseInt(r[4],10),a=parseInt(r[5],10),c=parseInt(r[6],10),u=parseInt(r[7].slice(0,-6),10);return new Date(Date.UTC(n,i,o,s,a,c,u))})},function(e,t,r){"use strict";t.ERR_IPNS_EXPIRED_RECORD="ERR_IPNS_EXPIRED_RECORD",t.ERR_UNRECOGNIZED_VALIDITY="ERR_UNRECOGNIZED_VALIDITY",t.ERR_SIGNATURE_CREATION="ERR_SIGNATURE_CREATION",t.ERR_SIGNATURE_VERIFICATION="ERR_SIGNATURE_VERIFICATION",t.ERR_UNRECOGNIZED_FORMAT="ERR_UNRECOGNIZED_FORMAT",t.ERR_PEER_ID_FROM_PUBLIC_KEY="ERR_PEER_ID_FROM_PUBLIC_KEY",t.ERR_PUBLIC_KEY_FROM_ID="ERR_PUBLIC_KEY_FROM_ID",t.ERR_UNDEFINED_PARAMETER="ERR_UNDEFINED_PARAMETER"},function(e,t,r){"use strict";(function(t){const n=r(293),i=r(115),o=r(41),s=r(36),a=r(11),c=r(85),u=r(10),f=a("jsipfs:ipns:republisher");f.error=a("jsipfs:ipns:republisher:error");const l=6e4,h=60*l,p=4*h,d=24*h;e.exports=class{constructor(e,t,r,n,i){this._publisher=e,this._datastore=t,this._peerInfo=r,this._keychain=n,this._options=i,this._republishHandle=null}start(){if(this._republishHandle){const e="already running";throw f.error(e),s(new Error(e),"ERR_REPUBLISH_ALREADY_RUNNING")}const e={_onCancel:null,_timeoutId:null,runPeriodically:(t,r)=>{e._timeoutId=setTimeout(()=>{e._timeoutId=null,t(n=>{if(e._onCancel)return e._onCancel();e.runPeriodically(t,n||r)})},r)},cancel:t=>{if(e._timeoutId)return clearTimeout(e._timeoutId),t();e._onCancel=t}},{privKey:t}=this._peerInfo.id,{pass:r}=this._options;e.runPeriodically(e=>{this._republishEntries(t,r,()=>e(p))},l),this._republishHandle=e}stop(e){const t=this._republishHandle;if(!t){const t="not running";return f.error(t),e(s(new Error(t),"ERR_REPUBLISH_NOT_RUNNING"))}this._republishHandle=null,t.cancel(e)}_republishEntries(e,t,r){this._republishEntry(e,e=>{if(e){const e="cannot republish entry for the node's private key";f.error(e)}else t?this._keychain.listKeys((e,n)=>{e?f.error(e):c(n,(e,r)=>{u([r=>this._keychain.exportKey(e.name,t,r),(e,r)=>i.keys.import(e,t,r)],(e,t)=>{e?f.error(e):this._republishEntry(t,r)})},e=>{e&&f.error(e),r(null)})}):r(null)})}_republishEntry(e,t){if(!e||!e.bytes){const e="one or more of the provided parameters are not defined";return f.error(e),t(s(new Error(e),"ERR_UNDEFINED_PARAMETER"))}u([t=>o.createFromPrivKey(e.bytes,t),(e,t)=>this._getPreviousValue(e,t)],(r,n)=>{if(r)return t("ERR_NO_ENTRY_FOUND"===r.code?null:r);this._publisher.publishWithEOL(e,n,d,t)})}_getPreviousValue(e,r){if(!o.isPeerId(e)){const e="peerId received is not valid";return f.error(e),r(s(new Error(e),"ERR_INVALID_PEER_ID"))}this._datastore.get(n.getLocalKey(e.id),(i,o)=>{if(i&&i.notFound){const t=`no previous entry for record with id: ${e.id}`;return f.error(t),r(s(new Error(t),"ERR_NO_ENTRY_FOUND"))}if(i)return r(i);if(!t.isBuffer(o)){const e="found ipns record that we couldn't process";return f.error(e),r(s(new Error(e),"ERR_INVALID_IPNS_RECORD"))}let a;try{a=n.unmarshal(o)}catch(i){const e="found ipns record that we couldn't convert to a value";return f.error(e),r(s(new Error(e),"ERR_INVALID_IPNS_RECORD"))}r(null,a.value)})}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(293),i=r(115),o=r(41),s=r(36),a=r(11),c=a("jsipfs:ipns:resolver");c.error=a("jsipfs:ipns:resolver:error");const u=32;e.exports=class{constructor(e){this._routing=e}resolve(e,t,r){if("function"==typeof t&&(r=t,t={}),"string"!=typeof e){const e="one or more of the provided parameters are not valid";return c.error(e),r(s(new Error(e),"ERR_INVALID_PARAMETER"))}const n=(t=t||{}).recursive&&"true"===t.recursive.toString(),i=e.split("/");if(3!==i.length||""!==i[0]){const t=`invalid name syntax for ${e}`;return c.error(t),r(s(new Error(t),"ERR_INVALID_NAME_SYNTAX"))}const o=i[2];let a;n&&(a=u),this.resolver(o,a,(t,n)=>{if(t)return r(t);c(`${e} was locally resolved correctly`),r(null,n)})}resolver(e,t,r){if(0===t){const e=`could not resolve name (recursion limit of ${u} exceeded)`;return c.error(e),r(s(new Error(e),"ERR_RESOLVE_RECURSION_LIMIT"))}this._resolveName(e,(e,n)=>{if(e)return r(e);const i=n.split("/");if("ipfs"===i[1]||!t)return r(null,n);this.resolver(i[2],t-1,r)})}_resolveName(e,t){let r;try{r=o.createFromB58String(e)}catch(e){return t(e)}const{routingKey:a,routingPubKey:u}=n.getIdKeys(r.toBytes());this._routing.get(a.toBuffer(),(o,f)=>{if(o){if("ERR_NOT_FOUND"!==o.code){const e=`unexpected error getting the ipns record ${r.id}`;return c.error(e),t(s(new Error(e),"ERR_UNEXPECTED_ERROR_GETTING_RECORD"))}const n=`record requested was not found for ${e} (${a}) in the network`;return c.error(n),t(s(new Error(n),"ERR_NO_RECORD_FOUND"))}let l;try{l=n.unmarshal(f)}catch(o){const e="found ipns record that we couldn't convert to a value";return c.error(e),t(s(new Error(e),"ERR_INVALID_RECORD_RECEIVED"))}if(l.pubKey)return this._validateRecord(r,l,t);this._routing.get(a.toBuffer(),(n,o)=>{if(n){if("ERR_NOT_FOUND"!==n.code){const e=`unexpected error getting the public key for the ipns record ${r.id}`;return c.error(e),t(s(new Error(e),"ERR_UNEXPECTED_ERROR_GETTING_PUB_KEY"))}const i=`public key requested was not found for ${e} (${u}) in the network`;return c.error(i),t(s(new Error(i),"ERR_NO_RECORD_FOUND"))}try{r.pubKey=i.keys.unmarshalPublicKey(o)}catch(n){const e="found public key record that we couldn't convert to a value";return c.error(e),t(s(new Error(e),"ERR_INVALID_PUB_KEY_RECEIVED"))}this._validateRecord(r,l,t)})})}_validateRecord(e,t,r){n.extractPublicKey(e,t,(e,i)=>{if(e)return r(e);n.validate(i,t,e=>{if(e)return r(e);r(null,t.value.toString())})})}}},function(e,t,r){"use strict";(function(t){const{Key:n}=r(34),{encodeBase32:i,keyToTopic:o,topicToKey:s}=r(1303),a=r(36),c=r(20),u=r(11),f=u("datastore-pubsub:publisher");f.error=u("datastore-pubsub:publisher:error");e.exports=class{constructor(e,t,r,n,i){c.strictEqual(typeof n,"object","missing validator"),c.strictEqual(typeof n.validate,"function","missing validate function"),c.strictEqual(typeof n.select,"function","missing select function"),i&&c.strictEqual(typeof i,"function","invalid subscriptionKeyFn received"),this._pubsub=e,this._datastore=t,this._peerId=r,this._validator=n,this._handleSubscriptionKeyFn=i,this._onMessage=this._onMessage.bind(this)}put(e,r,n){if(!t.isBuffer(e)){const e="datastore key does not have a valid format";return f.error(e),n(a(new Error(e),"ERR_INVALID_DATASTORE_KEY"))}if(!t.isBuffer(r)){const e="received value is not a buffer";return f.error(e),n(a(new Error(e),"ERR_INVALID_VALUE_RECEIVED"))}const i=o(e);f(`publish value for topic ${i}`),this._pubsub.publish(i,r,n)}get(e,r){if(!t.isBuffer(e)){const e="datastore key does not have a valid format";return f.error(e),r(a(new Error(e),"ERR_INVALID_DATASTORE_KEY"))}const n=o(e);this._pubsub.ls((t,i)=>t?r(t):i&&Array.isArray(i)&&i.indexOf(n)>-1?this._getLocal(e,r):void this._pubsub.subscribe(n,this._onMessage,t=>{if(t){const e=`cannot subscribe topic ${n}`;return f.error(e),r(a(new Error(e),"ERR_SUBSCRIBING_TOPIC"))}f(`subscribed values for key ${n}`),this._getLocal(e,r)}))}unsubscribe(e){const t=o(e);this._pubsub.unsubscribe(t,this._onMessage)}_getLocal(e,r){const o=new n("/"+i(e),!1);this._datastore.get(o,(e,n)=>{if(e){if("ERR_NOT_FOUND"!==e.code){const e=`unexpected error getting the ipns record for ${o.toString()}`;return f.error(e),r(a(new Error(e),"ERR_UNEXPECTED_ERROR_GETTING_RECORD"))}const t=`local record requested was not found for ${o.toString()}`;return f.error(t),r(a(new Error(t),"ERR_NOT_FOUND"))}if(!t.isBuffer(n)){const e="found record that we couldn't convert to a value";return f.error(e),r(a(new Error(e),"ERR_INVALID_RECORD_RECEIVED"))}r(null,n)})}_onMessage(e){const{data:t,from:r,topicIDs:n}=e;let i;try{i=s(n[0])}catch(e){return void f.error(e)}f(`message received for ${i} topic`),r!==this._peerId.toB58String()?this._handleSubscriptionKeyFn?this._handleSubscriptionKeyFn(i,(e,r)=>{e?f.error("message discarded by the subscriptionKeyFn"):this._storeIfSubscriptionIsBetter(r,t)}):this._storeIfSubscriptionIsBetter(i,t):f("message discarded as it is from the same peer")}_storeIfSubscriptionIsBetter(e,r){this._isBetter(e,r,(n,i)=>{!n&&i&&this._storeRecord(t.from(e),r)})}_validateRecord(e,t,r){this._validator.validate(e,t,r)}_selectRecord(e,t,r){this._validator.select(e,t,(e,t)=>{if(e)return f.error(e),r(e);r(null,0===t)})}_isBetter(e,t,r){this._validateRecord(t,e,(i,o)=>{if(i||!o){const e="record received through pubsub is not valid";return f.error(e),r(a(new Error(e),"ERR_NOT_VALID_RECORD"))}const s=new n(e);this._getLocal(s.toBuffer(),(e,n)=>e?r(null,!0):n.equals(t)?r(null,!1):void this._selectRecord(t,n,r))})}_storeRecord(e,t){const r=new n("/"+i(e),!1);this._datastore.put(r,t,t=>{t?f.error(`record for ${e.toString()} could not be stored in the routing`):f(`record for ${e.toString()} was stored in the datastore`)})}open(e){const t="open function was not implemented yet";return f.error(t),e(a(new Error(t),"ERR_NOT_IMPLEMENTED_YET"))}has(e,t){const r="has function was not implemented yet";return f.error(r),t(a(new Error(r),"ERR_NOT_IMPLEMENTED_YET"))}delete(e,t){const r="delete function was not implemented yet";return f.error(r),t(a(new Error(r),"ERR_NOT_IMPLEMENTED_YET"))}close(e){const t="close function was not implemented yet";return f.error(t),e(a(new Error(t),"ERR_NOT_IMPLEMENTED_YET"))}batch(){const e="batch function was not implemented yet";throw f.error(e),a(new Error(e),"ERR_NOT_IMPLEMENTED_YET")}query(){const e="query function was not implemented yet";throw f.error(e),a(new Error(e),"ERR_NOT_IMPLEMENTED_YET")}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(147),i=r(36);e.exports.encodeBase32=(e=>n.encode("base32",e).slice(1)),e.exports.keyToTopic=(e=>{return`/record/${n.encode("base64url",e).slice(1).toString()}`}),e.exports.topicToKey=(e=>{if("/record/"!==e.substring(0,"/record/".length))throw i(new Error("topic received is not from a record"),"ERR_TOPIC_IS_NOT_FROM_RECORD_NAMESPACE");const t=`u${e.substring("/record/".length)}`;return n.decode(t).toString()})},function(e,t,r){"use strict";e.exports={Record:r(1305),validator:r(1308),selection:r(1316)}},function(e,t,r){"use strict";(function(t){const n=r(19),i=r(20),o=n(r(1306)).Record,s=r(1307);class a{constructor(e,r,n){e&&i(t.isBuffer(e),"key must be a Buffer"),r&&i(t.isBuffer(r),"value must be a buffer"),this.key=e,this.value=r,this.timeReceived=n}serialize(){return o.encode(this.prepareSerialize())}prepareSerialize(){return{key:this.key,value:this.value,timeReceived:this.timeReceived&&s.toRFC3339(this.timeReceived)}}static deserialize(e){const t=o.decode(e);return a.fromDeserialized(t)}static fromDeserialized(e){let t;return e.timeReceived&&(t=s.parseRFC3339(e.timeReceived)),new a(e.key,e.value,t)}}e.exports=a}).call(this,r(0).Buffer)},function(e,t,r){"use strict";e.exports="// Record represents a dht record that contains a value\n// for a key value pair\nmessage Record {\n // The key that references this record\n bytes key = 1;\n\n // The actual value this record is storing\n bytes value = 2;\n\n // Note: These fields were removed from the Record message\n // hash of the authors public key\n // optional bytes author = 3;\n // A PKI signature for the key+value+author\n // optional bytes signature = 4;\n\n // Time the record was received, set by receiver\n optional string timeReceived = 5;\n}"},function(e,t,r){"use strict";const n=r(335);e.exports.toRFC3339=(e=>{return`${e.getUTCFullYear()}-${n(e.getUTCMonth()+1,2,"0")}-${n(e.getUTCDate(),2,"0")}T${n(e.getUTCHours(),2,"0")}:${n(e.getUTCMinutes(),2,"0")}:${n(e.getUTCSeconds(),2,"0")}.${1e3*e.getUTCMilliseconds()*1e3}Z`}),e.exports.parseRFC3339=(e=>{const t=new RegExp("(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})\\.(\\d+)Z"),r=String(e).trim().match(t);if(!r)throw new Error("Invalid format");const n=parseInt(r[1],10),i=parseInt(r[2],10)-1,o=parseInt(r[3],10),s=parseInt(r[4],10),a=parseInt(r[5],10),c=parseInt(r[6],10),u=parseInt(r[7].slice(0,-6),10);return new Date(Date.UTC(n,i,o,s,a,c,u))})},function(e,t,r){"use strict";(function(t){const n=r(818),i=r(36);e.exports={verifyRecord:(e,r,o)=>{const s=r.key,a=n(s,t.from("/"));if(a.length<3)return o();const c=e[a[1].toString()];if(!c)return o(i(new Error("Invalid record keytype"),"ERR_INVALID_RECORD_KEY_TYPE"));c.func(s,r.value,o)},validators:r(1310)}}).call(this,r(0).Buffer)},function(e,t){e.exports=function(e,t,r){for(var n=0,i=-1,o=r=r||0;o-1&&e.length-i{const s=e=>n(()=>o(e));if(!t.isBuffer(e))return s(new Error('"key" must be a Buffer'));if(e.length<3)return s(new Error("invalid public key record"));if("/pk/"!==e.slice(0,4).toString())return s(new Error("key was not prefixed with /pk/"));const a=e.slice(4);i(r,"sha2-256",(e,t)=>e?s(e):a.equals(t)?void s():s(new Error("public key does not match passed in key")))},sign:!1}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(24),i=r(1313);function o(e,t,r,i){if("function"==typeof r&&(i=r,r=void 0),!i)throw new Error("Missing callback");o.digest(e,t,r,(e,o)=>{if(e)return i(e);i(null,n.encode(o,t,r))})}e.exports=o,o.Buffer=t,o.multihash=n,o.digest=function(e,t,r,n){if("function"==typeof r&&(n=r,r=void 0),!n)throw new Error("Missing callback");let i,s=n;r&&(s=((e,t)=>{if(e)return n(e);n(null,t.slice(0,r))}));try{i=o.createHash(t)}catch(e){return s(e)}i(e,s)},o.createHash=function(e){if(e=n.coerceCode(e),!o.functions[e])throw new Error("multihash function "+e+" not yet supported");return o.functions[e]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(55),i=r(56),o=r(819),s=r(1314),a=o.toCallback,c=o.toBuf,u=o.fromString,f=o.fromNumberTo32BitBuf;e.exports={sha1:s.sha1,sha2256:s.sha2256,sha2512:s.sha2512,sha3512:a(c(n.sha3_512)),sha3384:a(c(n.sha3_384)),sha3256:a(c(n.sha3_256)),sha3224:a(c(n.sha3_224)),shake128:a(c(n.shake_128,256)),shake256:a(c(n.shake_256,512)),keccak224:a(c(n.keccak_224)),keccak256:a(c(n.keccak_256)),keccak384:a(c(n.keccak_384)),keccak512:a(c(n.keccak_512)),murmur3128:a(c(u(i.x64.hash128))),murmur332:a(f(u(i.x86.hash32))),addBlake:r(1315),dblSha2256:(e,r)=>{s.sha2256(e,(e,n)=>{e&&r(e),s.sha2256(t.from(n),r)})}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(57),i=function(){if(self.crypto)return self.crypto.subtle||self.crypto.webkitSubtle;if(self.msCrypto)return self.msCrypto.subtle}();function o(e){if(!i)throw new Error("Please use a browser with webcrypto support");return(r,o)=>{const s=i.digest({name:e},r);if("function"!=typeof s.then)return s.onerror=(()=>{o(new Error(`hashing data using ${e}`))}),void(s.oncomplete=(e=>{o(null,e.target.result)}));n(s.then(e=>t.from(new Uint8Array(e))),o)}}e.exports={sha1:function(e,t){o("SHA-1")(e,t)},sha2256:function(e,t){o("SHA-256")(e,t)},sha2512:function(e,t){o("SHA-512")(e,t)}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(58),i=r(819).toCallback,o={init:n.blake2bInit,update:n.blake2bUpdate,digest:n.blake2bFinal},s={init:n.blake2sInit,update:n.blake2sUpdate,digest:n.blake2sFinal},a=(e,r)=>i(n=>{const i=r.init(e,null);return r.update(i,n),t.from(r.digest(i))});e.exports=(e=>{for(let t=0;t<64;t++)e[45569+t]=a(t+1,o);for(let t=0;t<32;t++)e[45633+t]=a(t+1,s)})}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(818),i=r(36);e.exports={bestRecord:(e,r,o)=>{if(0===o.length)throw i(new Error("No records given"),"ERR_NO_RECORDS_RECEIVED");const s=n(r,t.from("/"));if(s.length<3)throw i(new Error("Record key does not have a selector function"),"ERR_NO_SELECTOR_FUNCTION_FOR_RECORD_KEY");const a=e[s[1].toString()];if(!a){const e=`Unrecognized key prefix: ${s[1]}`;throw i(new Error(e),"ERR_UNRECOGNIZED_KEY_PREFIX")}return a(r,o)},selectors:r(1317)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";e.exports={pk:r(1318)}},function(e,t,r){"use strict";e.exports=((e,t)=>0)},function(e,t,r){"use strict";const n=r(61),i=r(29);e.exports=(e=>i(t=>{if(t=t||function(){},e.log("stop"),"stopped"===e.state.state())return t(new Error("Already stopped"));if("running"!==e.state.state())return t(new Error("Not able to stop from state: "+e.state.state()));e.state.stop(),e._blockService.unsetExchange(),e._bitswap.stop(),e._preload.stop(),n([t=>e._ipns.republisher.stop(t),t=>e._mfsPreload.stop(t),t=>e.libp2p.stop(t),t=>e._repo.close(t)],r=>{if(r)return e.emit("error",r),t(r);e.state.stopped(),e.emit("stop"),t()})}))},function(e,t,r){"use strict";e.exports=function(e){return()=>Boolean(e._bitswap&&e._libp2pNode&&e._libp2pNode.isStarted())}},function(e,t,r){"use strict";const n=r(821),i=r(29);e.exports=function(e){return i((t,r)=>{"function"==typeof t&&(r=t,t={}),e.repo.version((e,t)=>{if(e)return r(e);r(null,{version:n.version,repo:t,commit:""})})})}},function(e,t,r){"use strict";const n=r(29),i=r(7),o=r(821).version;e.exports=function(e){return n((t,r)=>{"function"==typeof t&&(r=t,t={}),i(()=>r(null,{id:e._peerInfo.id.toB58String(),publicKey:e._peerInfo.id.pubKey.bytes.toString("base64"),addresses:e._peerInfo.multiaddrs.toArray().map(e=>e.toString()).filter(e=>e.indexOf("ipfs")>=0).sort(),agentVersion:`js-ipfs/${o}`,protocolVersion:"9000"}))})}},function(e,t,r){"use strict";(function(t){const n=r(41),i=r(10),o=r(74),s=r(29),a=r(291),c=r(823),u=r(794),{DAGNode:f}=r(86),l=r(68),h=r(814),p=r(817),d=r(1324);e.exports=function(e){return s((r,s)=>{"function"==typeof r&&(s=r,r={});const g=(t,r)=>{if(t)return e.emit("error",t),s(t);e.preStart(t=>{if(t)return e.emit("error",t),s(t);e.state.initialized(),e.emit("init"),s(null,r)})};if("uninitialized"!==e.state.state())return g(new Error("Not able to init from state: "+e.state.state()));if(e.state.init(),e.log("init"),r.repo)return e._repo=r.repo,g(null,!0);r.emptyRepo=r.emptyRepo||!1,r.bits=Number(r.bits)||2048,r.log=r.log||function(){};const b=a(e._options.config,c());let m;i([t=>e._repo.exists(t),(i,o)=>{if(e.log("repo exists?",i),!0===i)return o(new Error("repo already exists"));r.privateKey?(e.log("using user-supplied private-key"),"object"==typeof r.privateKey?o(null,r.privateKey):n.createFromPrivKey(t.from(r.privateKey,"base64"),o)):(r.log(`generating ${r.bits}-bit RSA keypair...`,!1),e.log("generating peer id: %s bits",r.bits),n.create({bits:r.bits},o))},(t,n)=>{e.log("identity generated"),b.Identity={PeerID:t.toB58String(),PrivKey:t.privKey.bytes.toString("base64")},m=t.privKey,r.pass&&(b.Keychain=u.generateOptions()),r.log("done"),r.log("peer identity: "+b.Identity.PeerID),e._repo.init(b,n)},(t,r)=>e._repo.open(r),t=>{if(e.log("repo opened"),r.pass){e.log("creating keychain");const n=Object.assign({passPhrase:r.pass},b.Keychain);e._keychain=new u(e._repo.keys,n),e._keychain.importPeer("self",{privKey:m},t)}else t(null,!0)},(t,r)=>{const n=new p(e._repo);e._ipns=new h(n,e._repo.datastore,e._peerInfo,e._keychain,e._options),r(null,!0)},(t,n)=>{if(r.emptyRepo)return n(null,!0);const s=[t=>{i([e=>f.create(new l("directory").marshal(),e),(t,r)=>e.dag.put(t,{version:0,format:"dag-pb",hashAlg:"sha2-256"},r),(t,r)=>e._ipns.initializeKeyspace(m,t.toBaseEncodedString(),r)],t)}];"function"==typeof d&&s.push(t=>d(e,r.log,t)),e.log("adding assets"),o(s,e=>{e?n(e):n(null,!0)})}],g)})}}).call(this,r(0).Buffer)},function(e,t){},function(e,t,r){"use strict";(function(t){const n=r(823),i=r(144).IPFS.matches,o=r(29);function s(e){try{return i(e)}catch(e){return!1}}function a(e){return new Error(`${e} is not a valid Multiaddr`)}e.exports=function(e){return{list:o(t=>{e._repo.config.get((e,r)=>{if(e)return t(e);t(null,{Peers:r.Bootstrap})})}),add:o((r,i,o)=>{if("function"==typeof i&&(o=i,i={default:!1}),r&&!s(r))return t(()=>o(a(r)));e._repo.config.get((t,s)=>{if(t)return o(t);i.default?s.Bootstrap=n().Bootstrap:r&&-1===s.Bootstrap.indexOf(r)&&s.Bootstrap.push(r),e._repo.config.set(s,e=>{if(e)return o(e);o(null,{Peers:i.default?n().Bootstrap:[r]})})})}),rm:o((r,n,i)=>{if("function"==typeof n&&(i=n,n={all:!1}),r&&!s(r))return t(()=>i(a(r)));e._repo.config.get((t,o)=>{if(t)return i(t);n.all?o.Bootstrap=[]:o.Bootstrap=o.Bootstrap.filter(e=>e!==r),e._repo.config.set(o,e=>{if(e)return i(e);const t=[];!n.all&&r&&t.push(r),i(null,{Peers:t})})})})}}}).call(this,r(35).setImmediate)},function(e,t,r){"use strict";const n=r(29);e.exports=function(e){return{get:n((t,r)=>("function"==typeof t&&(r=t,t=void 0),e._repo.config.get(t,r))),set:n((t,r,n)=>{e._repo.config.set(t,r,n)}),replace:n((t,r)=>{e._repo.config.set(t,r)})}}},function(e,t,r){"use strict";const n=r(331),i=r(63),o=r(16),s=r(10),a=r(7),c=r(29),u=r(36);function f(e){return o.isCID(e)?e:new o(e)}e.exports=function(e){return{get:c((t,r,n)=>{"function"==typeof r&&(n=r,r={}),r=r||{};try{t=f(t)}catch(e){return a(()=>n(u(e,"ERR_INVALID_CID")))}!1!==r.preload&&e._preload(t),e._blockService.get(t,n)}),put:c((t,r,a)=>{if(a=a||function(){},"function"==typeof r&&(a=r,r={}),r=r||{},Array.isArray(t))return a(new Error("Array is not supported"));s([e=>{if(n.isBlock(t))return e(null,t);if(r.cid&&o.isCID(r.cid))return e(null,new n(t,r.cid));const s=r.mhtype||"sha2-256",a=r.format||"dag-pb";let c;c=null==r.version?"sha2-256"===s&&"dag-pb"===a?0:1:r.version,i(t,s,(r,i)=>{if(r)return e(r);let s;try{s=new o(c,a,i)}catch(r){return e(r)}e(null,new n(t,s))})},(t,n)=>e._blockService.put(t,i=>{if(i)return n(i);!1!==r.preload&&e._preload(t.cid),n(null,t)})],a)}),rm:c((t,r)=>{try{t=f(t)}catch(e){return a(()=>r(u(e,"ERR_INVALID_CID")))}e._blockService.delete(t,r)}),stat:c((t,r,n)=>{"function"==typeof r&&(n=r,r={}),r=r||{};try{t=f(t)}catch(e){return a(()=>n(u(e,"ERR_INVALID_CID")))}!1!==r.preload&&e._preload(t),e._blockService.get(t,(e,r)=>{if(e)return n(e);n(null,{key:t.toString(),size:r.data.length})})})}}},function(e,t,r){"use strict";(function(t){const n=r(10),i=r(74),o=r(7),s=r(29),a=r(86),c=a.DAGNode,u=a.DAGLink,f=r(16),l=r(24),h=r(68),p=r(36);function d(e,r,n){switch(r){case"json":return function(e,r){let n,i;try{const o=JSON.parse(e.toString());i=(o.Links||[]).map(e=>new u(e.Name||e.name,e.Size||e.size,l.fromB58String(e.Hash||e.hash||e.multihash))),n=t.from(o.Data)}catch(e){return r(new Error("failed to parse JSON: "+e))}c.create(n,i,r)}(e,n);case"protobuf":return function(e,t){a.util.deserialize(e,t)}(e,n);default:n(new Error(`unkown encoding: ${r}`))}}e.exports=function(e){function r(t){return(r,i,o)=>{"function"==typeof i&&(o=i,i={}),i=i||{},n([t=>{e.object.get(r,i,t)},(r,n)=>{t(r,(t,r)=>{if(t)return n(t);e._ipld.put(r,{version:0,hashAlg:"sha2-256",format:"dag-pb"},(t,r)=>{if(t)return n(t);!1!==i.preload&&e._preload(r),n(null,r)})})}],o)}}return{new:s((r,n,i)=>{let s;if("function"==typeof r&&(i=r,r=void 0,n={}),"function"==typeof n&&(i=n,n={}),n=n||{},r){if("unixfs-dir"!==r)return o(()=>i(new Error("unknown template")));s=new h("directory").marshal()}else s=t.alloc(0);c.create(s,(t,r)=>{if(t)return i(t);e._ipld.put(r,{version:0,hashAlg:"sha2-256",format:"dag-pb"},(t,r)=>{if(t)return i(t);!1!==n.preload&&e._preload(r),i(null,r)})})}),put:s((r,n,i)=>{"function"==typeof n&&(i=n,n={});const o=(n=n||{}).enc;let s;if(t.isBuffer(r))o?d(r,o,(e,t)=>{if(e)return i(e);s=t,a()}):c.create(r,(e,t)=>{if(e)return i(e);s=t,a()});else if(c.isDAGNode(r))s=r,a();else{if("object"!=typeof r)return i(new Error("obj not recognized"));c.create(r.Data,r.Links,(e,t)=>{if(e)return i(e);s=t,a()})}function a(){e._ipld.put(s,{version:0,hashAlg:"sha2-256",format:"dag-pb"},(t,r)=>{if(t)return i(t);!1!==n.preload&&e._preload(r),i(null,r)})}}),get:s((r,n,i)=>{let s,a;"function"==typeof n&&(i=n,n={}),n=n||{};try{s=function(e,r){if("string"==typeof e)return"base58"!==r&&r?t.from(e,r):e;if(t.isBuffer(e))return e;if(f.isCID(e))return e.buffer;throw new Error("unsupported multihash")}(r,n.enc)}catch(e){return o(()=>i(p(e,"ERR_INVALID_MULTIHASH")))}try{a=new f(s)}catch(e){return o(()=>i(p(e,"ERR_INVALID_CID")))}1===n.cidVersion&&(a=a.toV1()),!1!==n.preload&&e._preload(a),e._ipld.get(a,(e,t)=>{if(e)return i(e);i(null,t.value)})}),data:s((t,r,n)=>{"function"==typeof r&&(n=r,r={}),e.object.get(t,r,(e,t)=>{if(e)return n(e);n(null,t.data)})}),links:s((t,r,n)=>{"function"==typeof r&&(n=r,r={}),e.object.get(t,r,(e,t)=>{if(e)return n(e);n(null,t.links)})}),stat:s((t,r,o)=>{"function"==typeof r&&(o=r,r={}),r=r||{},n([n=>e.object.get(t,r,n),(e,t)=>{i({serialized:t=>a.util.serialize(e,t),cid:t=>a.util.cid(e,t),node:t=>t(null,e)},t)}],(e,t)=>{if(e)return o(e);const r=t.serialized.length,n=t.node.links.reduce((e,t)=>e+t.size,0);o(null,{Hash:t.cid.toBaseEncodedString(),NumLinks:t.node.links.length,BlockSize:r,LinksSize:r-t.node.data.length,DataSize:t.node.data.length,CumulativeSize:r+n})})}),patch:s({addLink(e,t,n,i){r((e,r)=>{c.addLink(e,t,r)})(e,n,i)},rmLink(e,t,n,i){r((e,r)=>{u.isDAGLink(t)?t=t._name:t&&t.name&&(t=t.name),c.rmLink(e,t,r)})(e,n,i)},appendData(e,n,i,o){r((e,r)=>{const i=t.concat([e.data,n]);c.create(i,e.links,r)})(e,i,o)},setData(e,t,n,i){r((e,r)=>{c.create(t,e.links,r)})(e,n,i)}})}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(29),i=r(16),o=r(14),s=r(143),a=r(7),c=r(1330),u=r(36);e.exports=function(e){return{put:n((t,r,n)=>{if("function"==typeof r&&(n=r,r={}),(r=r||{}).cid&&(r.format||r.hashAlg))return n(new Error("Can't put dag node. Please provide either `cid` OR `format` and `hashAlg` options."));if(r.format&&!r.hashAlg||!r.format&&r.hashAlg)return n(new Error("Can't put dag node. Please provide `format` AND `hashAlg` options."));r=r.cid?r:Object.assign({},{format:"dag-cbor",hashAlg:"sha2-256"},r),e._ipld.put(t,r,(t,i)=>{if(t)return n(t);!1!==r.preload&&e._preload(i),n(null,i)})}),get:n((r,n,o,s)=>{if("function"==typeof n&&(s=n,n=void 0),"function"==typeof o&&(s=o,"string"!=typeof n?(o=n,n=null):o={}),o=o||{},"string"==typeof r){const e=r.split("/");try{r=new i(e[0])}catch(e){return a(()=>s(u(e,"ERR_INVALID_CID")))}e.shift(),n=e.length>0?e.join("/"):"/"}else if(t.isBuffer(r))try{r=new i(r)}catch(e){return a(()=>s(u(e,"ERR_INVALID_CID")))}!1!==o.preload&&e._preload(r),e._ipld.get(r,n,o,s)}),tree:n((t,r,n,s)=>{if("object"==typeof r&&(s=n,n=r,r=void 0),"function"==typeof r&&(s=r,r=void 0),"function"==typeof n&&(s=n,n={}),n=n||{},"string"==typeof t){const e=t.split("/");try{t=new i(e[0])}catch(e){return a(()=>s(u(e,"ERR_INVALID_CID")))}e.shift(),r=e.length>0?e.join("/"):void 0}!1!==n.preload&&e._preload(t),o(e._ipld.treeStream(t,r,n),o.collect(s))}),_getRecursive:n((t,r,n)=>{let o;"function"==typeof r&&(n=r,r={}),r=r||{};try{o=new i(t)}catch(e){return a(()=>n(u(e,"ERR_INVALID_CID")))}e.dag.get(o,"",r,(t,i)=>{if(t)return n(t);s(i.value.links,(t,n)=>{e.dag._getRecursive(t.cid,r,n)},(e,t)=>{if(e)return n(e);n(null,c([i.value,t]))})})})}}}).call(this,r(0).Buffer)},function(e,t,r){var n=r(1331),i=1/0;e.exports=function(e){return null!=e&&e.length?n(e,i):[]}},function(e,t,r){var n=r(1332),i=r(1333);e.exports=function e(t,r,o,s,a){var c=-1,u=t.length;for(o||(o=i),a||(a=[]);++c0&&o(f)?r>1?e(f,r-1,o,s,a):n(a,f):s||(a[a.length]=f)}return a}},function(e,t){e.exports=function(e,t){for(var r=-1,n=t.length,i=e.length;++r{e.config.get(function(n,a){if(n)return t(n);const c=t=>{const n={datastore:t.datastore,peerInfo:t.peerInfo,peerBook:t.peerBook,config:{peerDiscovery:{mdns:{enabled:i(t.options,"config.Discovery.MDNS.Enabled",i(t.config,"Discovery.MDNS.Enabled",!0))},webRTCStar:{enabled:i(t.options,"config.Discovery.webRTCStar.Enabled",i(t.config,"Discovery.webRTCStar.Enabled",!0))},bootstrap:{list:i(t.options,"config.Bootstrap",i(t.config,"Bootstrap",[]))}},relay:{enabled:i(t.options,"relay.enabled",i(t.config,"relay.enabled",!1)),hop:{enabled:i(t.options,"relay.hop.enabled",i(t.config,"relay.hop.enabled",!1)),active:i(t.options,"relay.hop.active",i(t.config,"relay.hop.active",!1))}},dht:{validators:{ipns:s.validator},selectors:{ipns:s.selector}},EXPERIMENTAL:{dht:i(t.options,"EXPERIMENTAL.dht",!1),pubsub:i(t.options,"EXPERIMENTAL.pubsub",!1)}},connectionManager:i(t.options,"connectionManager",i(t.config,"connectionManager",{}))},a=o(i(e._options,"libp2p",{}),n),c=r(1335);return new c(a)};let u=i(e._options,"libp2p",null);"function"!=typeof u&&(u=c);e._libp2pNode=u({options:e._options,config:a,datastore:e._repo.datastore,peerInfo:e._peerInfo,peerBook:e._peerInfoBook}),e._libp2pNode.on("peer:discovery",t=>{const r=()=>{e._peerInfoBook.put(t),e._libp2pNode.dial(t,()=>{})};e.isOnline()?r():e._libp2pNode.once("start",r)}),e._libp2pNode.on("peer:connect",t=>{e._peerInfoBook.put(t)}),e._libp2pNode.start(r=>{if(r)return t(r);e._libp2pNode.peerInfo.multiaddrs.forEach(t=>{e._print("Swarm listening on",t.toString())}),t()})})}),stop:n(t=>{e._libp2pNode.stop(t)})}}},function(e,t,r){"use strict";const n=r(824),i=r(1349),o=r(1408),s=r(1440),a=r(1461),c=r(1491),u=r(1517),f=r(291);e.exports=class extends u{constructor(e){const t=new i({id:e.peerInfo.id}),r=new o({id:e.peerInfo.id}),u={modules:{transport:[n,t,r],streamMuxer:[s],connEncryption:[a],peerDiscovery:[t.discovery,r.discovery,c]},config:{peerDiscovery:{bootstrap:{enabled:!0},webRTCStar:{enabled:!0},websocketStar:{enabled:!0}},EXPERIMENTAL:{dht:!1,pubsub:!1}}};super(f(e,u))}}},function(e,t,r){"use strict";var n=r(1337),i=r(1339),o=r(1343);function s(e){return"function"==typeof e}e.exports=function(e,t){s(t)&&(t={onConnect:t});var r="undefined"==typeof window?{}:window.location,a=o(e,r),c=new n(a),u=i(c,t);return u.remoteAddress=a,u.close=function(e){s(e)&&c.addEventListener("close",e),c.close()},c.addEventListener("open",function(e){t&&s(t.onConnect)&&t.onConnect(null,u)}),u},e.exports.connect=e.exports},function(e,t,r){e.exports="undefined"==typeof WebSocket?r(1338):WebSocket},function(e,t){},function(e,t,r){var n=r(1340),i=r(1341);e.exports=function(e,t){var r=e.upgradeReq||{};t&&t.binaryType?e.binaryType=t.binaryType:t&&t.binary&&(e.binaryType="arraybuffer");return{source:n(e,t&&t.onConnect),sink:i(e,t),headers:r.headers,url:r.url,upgrade:r.upgrade,method:r.method}}},function(e,t,r){var n=r(3).Buffer;e.exports=function(e,t){var r,i,o=[],s=!1;return e.addEventListener("message",function(e){var t,i=e.data;if(((t=i)instanceof ArrayBuffer||null!=t&&null!=t.constructor&&"ArrayBuffer"===t.constructor.name&&"number"==typeof t.byteLength)&&(i=n.from(i)),r)return r(null,i);o.push(i)}),e.addEventListener("close",function(e){i||r&&r(i=!0)}),e.addEventListener("error",function(e){i||(i=e,s||(s=!0,t&&t(e)),r&&r(i))}),e.addEventListener("open",function(e){s||i||(s=!0)}),function(t,n){if(r=null,i)return n(i);t?(r=n,e.close()):o.length>0?n(null,o.shift()):r=n}}},function(e,t,r){(function(t,n){var i=r(1342),o=void 0!==t?t:n.nextTick;e.exports=function(e,t){return function(r){var n=!1!==(t=t||{}).closeOnEnd,s="function"==typeof t?t:t.onClose;r(null,function t(a,c){a?n&&e.readyState<=1&&(s&&e.addEventListener("close",function(e){if(e.wasClean||1006===e.code)s();else{var t=new Error("ws error");t.event=e,s(t)}}),e.close()):i(e,function(n){if(n)return r(n,function(){});e.send(c),o(function(){r(null,t)})})})}}}).call(this,r(35).setImmediate,r(6))},function(e,t){e.exports=function(e,t){var r=e&&(e.removeEventListener||e.removeListener);function n(){"function"==typeof r&&(r.call(e,"open",i),r.call(e,"error",o))}function i(e){n(),t()}function o(e){n(),t(e)}return e.readyState>=2?t(!0):1===e.readyState?t():(e.addEventListener("open",i),void e.addEventListener("error",o))}},function(e,t,r){var n=r(1344),i={http:"ws",https:"wss"};e.exports=function(e,t){return n(e,t,i,"ws")}},function(e,t,r){var n=r(290);e.exports=function(e,t,r,i){var o;return r=r||{},o=(e=n.parse(e,!1,!0)).protocol?e.protocol:(r[o=t.protocol?t.protocol.replace(/:$/,""):"http"]||i||o)+":",e.host&&":"===e.host[0]&&(e.host=null),e.hostname?n.format({protocol:o,slashes:!0,hostname:e.hostname,port:e.port,pathname:e.pathname,search:e.search}):(e.host=t.host,e.port?n.format({protocol:o,slashes:!0,host:t.hostname+":"+e.port,port:e.port,pathname:e.pathname,search:e.search}):e.pathname?n.format({protocol:o,slashes:!0,host:e.host,pathname:e.pathname,search:e.search}):(e.pathname=t.pathname,e.search?n.format({protocol:o,slashes:!0,host:e.host,pathname:e.pathname,search:e.search}):(e.search=t.search,e.format(e))))}},function(e,t){var r=1/0,n=9007199254740991,i=1.7976931348623157e308,o=NaN,s="[object Arguments]",a="[object Function]",c="[object GeneratorFunction]",u="[object String]",f="[object Symbol]",l=/^\s+|\s+$/g,h=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,d=/^0o[0-7]+$/i,g=/^(?:0|[1-9]\d*)$/,b=parseInt;function m(e){return e!=e}function y(e,t){return function(e,t){for(var r=-1,n=e?e.length:0,i=Array(n);++r-1&&e%1==0&&e-1&&e%1==0&&e<=n}(e.length)&&!function(e){var t=P(e)?S.call(e):"";return t==a||t==c}(e)}function P(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function O(e){return!!e&&"object"==typeof e}e.exports=function(e,t,n,s){var a;e=R(e)?e:(a=e)?y(a,function(e){return R(e)?C(e):I(e)}(a)):[],n=n&&!s?function(e){var t=function(e){if(!e)return 0===e?e:0;if((e=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||O(e)&&S.call(e)==f}(e))return o;if(P(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=P(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(l,"");var r=p.test(e);return r||d.test(e)?b(e.slice(2),r?2:8):h.test(e)?o:+e}(e))===r||e===-r){var t=e<0?-1:1;return t*i}return e==e?e:0}(e),n=t%1;return t==t?n?t-n:t:0}(n):0;var c=e.length;return n<0&&(n=x(c+n,0)),function(e){return"string"==typeof e||!T(e)&&O(e)&&S.call(e)==u}(e)?n<=c&&e.indexOf(t,n)>-1:!!c&&function(e,t,r){if(t!=t)return function(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o-1}},function(e,t,r){"use strict";const n=r(325);e.exports=class{constructor(e,t){this.peerInfo=null,this.conn=n(),e?this.setInnerConn(e,t):t&&(this.info=t)}get source(){return this.conn.source}get sink(){return this.conn.sink}getPeerInfo(e){return this.info&&this.info.getPeerInfo?this.info.getPeerInfo(e):this.peerInfo?void e(null,this.peerInfo):e(new Error("Peer Info not set yet"))}setPeerInfo(e){if(this.info&&this.info.setPeerInfo)return this.info.setPeerInfo(e);this.peerInfo=e}getObservedAddrs(e){if(this.info&&this.info.getObservedAddrs)return this.info.getObservedAddrs(e);e(null,[])}setInnerConn(e,t){this.conn.resolve(e),this.info=t||e}}},function(e,t,r){"use strict";const n=r(11)("libp2p:websockets:dialer");e.exports=function(e){const t=e.toString().split("/");let r,i;try{r=e.protoNames().filter(e=>"ws"===e||"wss"===e)[0]}catch(e){throw n(e),new Error("Not a valid websocket address",e)}try{i=e.stringTuples().filter(t=>{if(t[0]===e.protos().filter(e=>"tcp"===e.name)[0].code)return!0})[0][1]}catch(e){n("No port, skipping")}return`${r}://${t[2]}${!i||80===i&&443===i?"":`:${i}`}`}},function(e,t,r){"use strict";e.exports=function(){throw new Error("WebSocket Servers can not be created in the browser!")}},function(e,t,r){"use strict";const n=r(11)("libp2p:webrtc-star"),i=r(825),o=r(144),s=r(26),a=r(826),c=r(23).EventEmitter,u=r(1377),f=r(41),l=r(1384),h=r(89).Connection,p=r(151),d=r(88),g=r(7),b=r(1406),m=r(1407),y=m.cleanUrlSIO,v=m.cleanMultiaddr,w=d(()=>{}),A={transports:["websocket"],"force new connection":!0};e.exports=s(class{constructor(e){e=e||{},this.maSelf=void 0,this.sioOptions={transports:["websocket"],"force new connection":!0},e.wrtc&&(this.wrtc=e.wrtc),this.discovery=new c,this.discovery.tag="webRTCStar",this.discovery.start=(e=>{g(e)}),this.discovery.stop=(e=>{g(e)}),this.listenersRefs={},this._peerDiscovered=this._peerDiscovered.bind(this)}dial(e,t,r){"function"==typeof t&&(r=t,t={}),r=r?d(r):w;const i=(~~(1e9*Math.random())).toString(36)+Date.now(),o=this.listenersRefs[Object.keys(this.listenersRefs)[0]].io,s={initiator:!0,trickle:!1};let a;this.wrtc&&(s.wrtc=this.wrtc);try{a=new u(s)}catch(e){return n("Could not create connection:",e),r(e)}const c=new h(p.duplex(a));let f=!1;return a.on("signal",t=>{o.emit("ss-handshake",{intentId:i,srcMultiaddr:this.maSelf.toString(),dstMultiaddr:e.toString(),signal:t})}),a.once("timeout",()=>r(new Error("timeout"))),a.once("error",e=>{f||r(e)}),o.on("ws-handshake",t=>{if(t.intentId===i&&t.err)return r(new Error(t.err));t.intentId===i&&t.answer&&(a.once("connect",()=>{f=!0,c.destroy=a.destroy.bind(a),a.once("close",()=>c.destroy()),c.getObservedAddrs=(t=>t(null,[e])),r(null,c)}),a.signal(t.signal))}),c}createListener(e,t){"function"==typeof e&&(t=e,e={});const r=new c;return r.listen=((e,i)=>{if(i=i?d(i):w,!b.support&&!this.wrtc)return g(()=>i(new Error("no WebRTC support")));this.maSelf=e;const o=y(e);n("Dialing to Signalling Server on: "+o),r.io=a.connect(o,A),r.io.once("connect_error",i),r.io.once("error",e=>{r.emit("error",e),r.emit("close")}),r.io.on("ws-handshake",function(e){if(e.answer||e.err)return;const o={trickle:!1};let a;s.wrtc&&(o.wrtc=s.wrtc);try{a=new u(o)}catch(e){return n("Could not create incoming connection:",e),i(e)}const c=new h(p.duplex(a));a.once("connect",()=>{c.getObservedAddrs=(t=>t(null,[e.srcMultiaddr])),r.emit("connection",c),t(c)}),a.once("signal",t=>{e.signal=t,e.answer=!0,r.io.emit("ss-handshake",e)}),a.signal(e.signal)}),r.io.on("ws-peer",this._peerDiscovered),r.io.on("connect",()=>{r.io.emit("ss-join",e.toString())}),r.io.once("connect",()=>{r.emit("listening"),i()});const s=this}),r.close=(e=>{e=e?d(e):w,r.io.emit("ss-leave"),g(()=>{r.emit("close"),e()})}),r.getAddrs=(e=>{g(()=>e(null,[this.maSelf]))}),this.listenersRefs[i.toString()]=r,r}filter(e){return Array.isArray(e)||(e=[e]),e.filter(e=>!(e.protoNames().indexOf("p2p-circuit")>-1)&&o.WebRTCStar.matches(e))}_peerDiscovered(e){n("Peer Discovered:",e);const t=(e=v(e)).split("/ipfs/"),r=t[t.length-1],o=f.createFromB58String(r),s=new l(o);s.multiaddrs.add(i(e)),this.discovery.emit("peer",s)}},{className:"WebRTCStar",symbolName:"@libp2p/js-libp2p-webrtc-star/webrtcstar"})},function(e,t,r){"use strict";(function(t){const n=r(15),i=r(44),o=r(1351),s=r(649),a=r(5);function c(e){const t=[],r=e.split("/").slice(1);if(1===r.length&&""===r[0])return[];for(let n=0;n=r.length)throw v("invalid address: "+e);t.push([i,r[n]])}else t.push([i])}return t}function u(e){const t=[];return n(e,function(e){const r=w(e);t.push(r.name),e.length>1&&t.push(e[1])}),"/"+t.join("/")}function f(e){return n(e,function(e){Array.isArray(e)||(e=[e]);const t=w(e);return e.length>1?[t.code,o.toBuffer(t.code,e[1])]:[t.code]})}function l(e){return n(e,function(e){const t=w(e);return e.length>1?[t.code,o.toString(t.code,e[1])]:[t.code]})}function h(e){return b(t.concat(n(e,function(e){const r=w(e);let n=t.from(a.encode(r.code));return e.length>1&&(n=t.concat([n,e[1]])),n})))}function p(e,t){if(e.size>0)return e.size/8;if(0===e.size)return 0;return a.decode(t)+a.decode.bytes}function d(e){const t=[];let r=0;for(;re.length)throw v("Invalid address buffer: "+e.toString("hex"));t.push([n,c])}return t}function g(e){return h(f(c(e=y(e))))}function b(e){const r=m(e);if(r)throw r;return t.from(e)}function m(e){try{d(e)}catch(e){return e}}function y(e){return"/"+i(e.trim().split("/")).join("/")}function v(e){return new Error("Error parsing address: "+e)}function w(e){return s(e[0])}e.exports={stringToStringTuples:c,stringTuplesToString:u,tuplesToStringTuples:l,stringTuplesToTuples:f,bufferToTuples:d,tuplesToBuffer:h,bufferToString:function(e){return u(l(d(e)))},stringToBuffer:g,fromString:function(e){return g(e)},fromBuffer:b,validateBuffer:m,isValidBuffer:function(e){return void 0===m(e)},cleanPath:y,ParseError:v,protoFromTuple:w,sizeForAddr:p}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(45),i=r(46),o=r(649),s=r(9),a=r(5);function c(e,r){return r instanceof t?c.toString(e,r):c.toBuffer(e,r)}function u(e){if(!e.isValid())throw new Error("invalid ip address");return n.toBuffer(e.address)}e.exports=c,c.toString=function(e,t){switch((e=o(e)).code){case 4:case 41:return n.toString(t);case 6:case 17:case 33:case 132:return function(e){return e.readUInt16BE(0)}(t);case 54:case 55:case 56:return function(e){const t=a.decode(e);if((e=e.slice(a.decode.bytes)).length!==t)throw new Error("inconsistent lengths");return e.toString()}(t);case 421:return function(e){const t=a.decode(e),r=e.slice(a.decode.bytes);if(r.length!==t)throw new Error("inconsistent lengths");return s.encode(r)}(t);default:return t.toString("hex")}},c.toBuffer=function(e,r){switch((e=o(e)).code){case 4:return u(new i.Address4(r));case 41:return u(new i.Address6(r));case 6:case 17:case 33:case 132:return function(e){const r=t.alloc(2);return r.writeUInt16BE(e,0),r}(parseInt(r,10));case 54:case 55:case 56:return function(e){const r=t.from(e),n=t.from(a.encode(r.length));return t.concat([n,r])}(r);case 421:return function(e){const r=t.from(s.decode(e)),n=t.from(a.encode(r.length));return t.concat([n,r])}(r);default:return t.from(r,"hex")}}}).call(this,r(0).Buffer)},function(e,t,r){var n=r(827),i=r(355)("socket.io-client:url");e.exports=function(e,t){var r=e;t=t||"undefined"!=typeof location&&location,null==e&&(e=t.protocol+"//"+t.host);"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?t.protocol+e:t.host+e),/^(https?|wss?):\/\//.test(e)||(i("protocol-less url %s",e),e=void 0!==t?t.protocol+"//"+e:"https://"+e),i("parse %s",e),r=n(e));r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443"));r.path=r.path||"/";var o=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port,r.href=r.protocol+"://"+o+(t&&t.port===r.port?"":":"+r.port),r}},function(e,t,r){function n(e){var r;function n(){if(n.enabled){var e=n,i=+new Date,o=i-(r||i);e.diff=o,e.prev=r,e.curr=i,r=i;for(var s=new Array(arguments.length),a=0;a0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var a=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*s;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?a(c=e,o,"day")||a(c,i,"hour")||a(c,n,"minute")||a(c,r,"second")||c+" ms":function(e){if(e>=o)return Math.round(e/o)+"d";if(e>=i)return Math.round(e/i)+"h";if(e>=n)return Math.round(e/n)+"m";if(e>=r)return Math.round(e/r)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,r){(function(n){function i(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG),e}(t=e.exports=r(1356)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),!r)return;var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,n)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=i,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(i())}).call(this,r(6))},function(e,t,r){function n(e){var r;function n(){if(n.enabled){var e=n,i=+new Date,o=i-(r||i);e.diff=o,e.prev=r,e.curr=i,r=i;for(var s=new Array(arguments.length),a=0;a0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var a=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*s;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?a(c=e,o,"day")||a(c,i,"hour")||a(c,n,"minute")||a(c,r,"second")||c+" ms":function(e){if(e>=o)return Math.round(e/o)+"d";if(e>=i)return Math.round(e/i)+"h";if(e>=n)return Math.round(e/n)+"m";if(e>=r)return Math.round(e/r)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,r){var n=r(828),i=r(829),o=Object.prototype.toString,s="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===o.call(Blob),a="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===o.call(File);t.deconstructPacket=function(e){var t=[],r=e.data,o=e;return o.data=function e(t,r){if(!t)return t;if(i(t)){var o={_placeholder:!0,num:r.length};return r.push(t),o}if(n(t)){for(var s=new Array(t.length),a=0;a0&&(this.extraHeaders=t.extraHeaders),t.localAddress&&(this.localAddress=t.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}e.exports=f,f.priorWebsocketSuccess=!1,i(f.prototype),f.protocol=a.protocol,f.Socket=f,f.Transport=r(652),f.transports=r(831),f.parser=r(205),f.prototype.createTransport=function(e){o('creating transport "%s"',e);var t=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}(this.query);t.EIO=a.protocol,t.transport=e;var r=this.transportOptions[e]||{};return this.id&&(t.sid=this.id),new n[e]({query:t,socket:this,agent:r.agent||this.agent,hostname:r.hostname||this.hostname,port:r.port||this.port,secure:r.secure||this.secure,path:r.path||this.path,forceJSONP:r.forceJSONP||this.forceJSONP,jsonp:r.jsonp||this.jsonp,forceBase64:r.forceBase64||this.forceBase64,enablesXDR:r.enablesXDR||this.enablesXDR,timestampRequests:r.timestampRequests||this.timestampRequests,timestampParam:r.timestampParam||this.timestampParam,policyPort:r.policyPort||this.policyPort,pfx:r.pfx||this.pfx,key:r.key||this.key,passphrase:r.passphrase||this.passphrase,cert:r.cert||this.cert,ca:r.ca||this.ca,ciphers:r.ciphers||this.ciphers,rejectUnauthorized:r.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:r.perMessageDeflate||this.perMessageDeflate,extraHeaders:r.extraHeaders||this.extraHeaders,forceNode:r.forceNode||this.forceNode,localAddress:r.localAddress||this.localAddress,requestTimeout:r.requestTimeout||this.requestTimeout,protocols:r.protocols||void 0,isReactNative:this.isReactNative})},f.prototype.open=function(){var e;if(this.rememberUpgrade&&f.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout(function(){t.emit("error","No transports available")},0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},f.prototype.setTransport=function(e){o("setting transport %s",e.name);var t=this;this.transport&&(o("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",function(){t.onDrain()}).on("packet",function(e){t.onPacket(e)}).on("error",function(e){t.onError(e)}).on("close",function(){t.onClose("transport close")})},f.prototype.probe=function(e){o('probing transport "%s"',e);var t=this.createTransport(e,{probe:1}),r=!1,n=this;function i(){if(n.onlyBinaryUpgrades){var i=!this.supportsBinary&&n.transport.supportsBinary;r=r||i}r||(o('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",function(i){if(!r)if("pong"===i.type&&"probe"===i.data){if(o('probe transport "%s" pong',e),n.upgrading=!0,n.emit("upgrading",t),!t)return;f.priorWebsocketSuccess="websocket"===t.name,o('pausing current transport "%s"',n.transport.name),n.transport.pause(function(){r||"closed"!==n.readyState&&(o("changing transport and sending upgrade packet"),h(),n.setTransport(t),t.send([{type:"upgrade"}]),n.emit("upgrade",t),t=null,n.upgrading=!1,n.flush())})}else{o('probe transport "%s" failed',e);var s=new Error("probe error");s.transport=t.name,n.emit("upgradeError",s)}}))}function s(){r||(r=!0,h(),t.close(),t=null)}function a(r){var i=new Error("probe error: "+r);i.transport=t.name,s(),o('probe transport "%s" failed because of error: %s',e,r),n.emit("upgradeError",i)}function c(){a("transport closed")}function u(){a("socket closed")}function l(e){t&&e.name!==t.name&&(o('"%s" works - aborting "%s"',e.name,t.name),s())}function h(){t.removeListener("open",i),t.removeListener("error",a),t.removeListener("close",c),n.removeListener("close",u),n.removeListener("upgrading",l)}f.priorWebsocketSuccess=!1,t.once("open",i),t.once("error",a),t.once("close",c),this.once("close",u),this.once("upgrading",l),t.open()},f.prototype.onOpen=function(){if(o("socket open"),this.readyState="open",f.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){o("starting upgrade probes");for(var e=0,t=this.upgrades.length;en&&(r=n),t>=n||t>=r||0===n)return new ArrayBuffer(0);for(var i=new Uint8Array(e),o=new Uint8Array(r-t),s=t,a=0;s1?n[1]--:n[1]=0;if(r.time=t=Date.UTC.apply(Date,n)-(t||0),isNaN(t))throw new TypeError("Invalid Date");return v(r)},b.fromTimeT=function(e){return w(e,0)},h.year=0,h.time=0,h.nano=0,h.addNano=function(e){return this.nano+=+e||0,this},h.getNano=function(){var e=v(this);return(e.time%1e3*u+ +e.nano+l)%l},h.getTimeT=function(){var e=v(this),i=Math.floor(e.time/1e3),o=e.year;o&&(i+=o*n*t/r);return i},h.getYear=function(){return this.toDate().getUTCFullYear()+this.year},h.toDate=function(){return A(v(this).time)},h.toJSON=function(){return this.toString().replace(/0{1,6}Z$/,"Z")},h.toString=function(e){var t=this,r=t.toDate(),n={H:function(){return _(r.getUTCHours())},L:function(){return x(r.getUTCMilliseconds(),3)},M:function(){return _(r.getUTCMinutes())},N:function(){return x(t.getNano(),9)},S:function(){return _(r.getUTCSeconds())},Y:function(){var e=t.getYear();return e>999999?"+"+e:e>9999?"+"+x(e,6):e>=0?x(e,4):e>=-999999?"-"+x(-e,6):e},a:function(){return g[r.getUTCDay()]},b:function(){return m[r.getUTCMonth()]},d:function(){return _(r.getUTCDate())},e:function(){return e=r.getUTCDate(),(e>9?"":" ")+(0|e);var e},m:function(){return _(r.getUTCMonth()+1)}};return function e(t){return t.replace(/%./g,function(t){var r=t[1],i=y[r],o=n[r];return i?e(i):o?o():t})}(e||d)},h.writeInt64BE=E(0,1,2,3,0,4),h.writeInt64LE=E(3,2,1,0,4,0);var d="%Y-%m-%dT%H:%M:%S.%NZ",m=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],g=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],y={"%":"%",F:"%Y-%m-%d",n:"\n",R:"%H:%M",T:"%H:%M:%S",t:"\t",X:"%T",Z:"GMT",z:"+0000"};return b;function b(e,t,r){var n=this;if(!(n instanceof b))return new b(e,t,r);n.time=+e||0,n.nano=+t||0,n.year=+r||0,v(n)}function v(e){var t,n,i=e.year,a=e.time,c=e.nano;if(c<0||u<=c){var l=Math.floor(c/u);c-=l*u,a+=l,t=1}var f=i%r;if(a<-s||s>24&255,t[r+i]=n>>16&255,t[r+o]=n>>8&255,t[r+s]=255&n}}function k(e,t,r,n,i,o){return function(e,t){S(e,t|=0);var r=s(e,t+i);return w(s(e,t+o),r)};function s(i,o){return i[o+e]*a+(i[o+t]<<16|i[o+r]<<8|i[o+n])}}function S(e,t){var r=e&&e.length;if(null==r)throw new TypeError("Invalid Buffer");if(r9?"":"0")+(0|e)}function x(e,t){return(f+(0|e)).substr(-t)}}()},function(e,t,r){"use strict";const n=r(25);e.exports=n('\nmessage IpnsEntry {\n enum ValidityType {\n\t\tEOL = 0; // setting an EOL says "this record is valid until..."\n\t}\n\n required bytes value = 1;\n\trequired bytes signature = 2;\n\n\toptional ValidityType validityType = 3;\n\toptional bytes validity = 4;\n\n\toptional uint64 sequence = 5;\n\n\toptional uint64 ttl = 6;\n\n\t// in order for nodes to properly validate a record upon receipt, they need the public\n\t// key associated with it. For old RSA keys, its easiest if we just send this as part of\n\t// the record itself. For newer ed25519 keys, the public key can be embedded in the\n\t// peerID, making this field unnecessary.\n\toptional bytes pubKey = 7;\n}\n').IpnsEntry},function(e,t,r){"use strict";const n=r(285);e.exports.toRFC3339=(e=>{return`${e.getUTCFullYear()}-${n(e.getUTCMonth()+1,2,"0")}-${n(e.getUTCDate(),2,"0")}T${n(e.getUTCHours(),2,"0")}:${n(e.getUTCMinutes(),2,"0")}:${n(e.getUTCSeconds(),2,"0")}.${1e3*e.getUTCMilliseconds()*1e3}Z`}),e.exports.parseRFC3339=(e=>{const t=new RegExp("(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})\\.(\\d+)Z"),r=String(e).trim().match(t);if(!r)throw new Error("Invalid format");const n=parseInt(r[1],10),i=parseInt(r[2],10)-1,o=parseInt(r[3],10),s=parseInt(r[4],10),a=parseInt(r[5],10),c=parseInt(r[6],10),u=parseInt(r[7].slice(0,-6),10);return new Date(Date.UTC(n,i,o,s,a,c,u))})},function(e,t,r){"use strict";t.ERR_IPNS_EXPIRED_RECORD="ERR_IPNS_EXPIRED_RECORD",t.ERR_UNRECOGNIZED_VALIDITY="ERR_UNRECOGNIZED_VALIDITY",t.ERR_SIGNATURE_CREATION="ERR_SIGNATURE_CREATION",t.ERR_SIGNATURE_VERIFICATION="ERR_SIGNATURE_VERIFICATION",t.ERR_UNRECOGNIZED_FORMAT="ERR_UNRECOGNIZED_FORMAT",t.ERR_PEER_ID_FROM_PUBLIC_KEY="ERR_PEER_ID_FROM_PUBLIC_KEY",t.ERR_PUBLIC_KEY_FROM_ID="ERR_PUBLIC_KEY_FROM_ID",t.ERR_UNDEFINED_PARAMETER="ERR_UNDEFINED_PARAMETER"},function(e,t,r){"use strict";(function(t){const n=r(252),i=r(68),o=r(24),s=r(20),a=r(5),c=r(55),u=r(9),l=a("ipfs:ipns:republisher");l.error=a("ipfs:ipns:republisher:error");const f=6e4,p=60*f,h=4*p,d=24*p;e.exports=class{constructor(e,t,r,n,i){this._publisher=e,this._datastore=t,this._peerInfo=r,this._keychain=n,this._options=i,this._republishHandle=null}start(){if(this._republishHandle){const e="already running";throw l.error(e),s(new Error(e),"ERR_REPUBLISH_ALREADY_RUNNING")}const e={_onCancel:null,_timeoutId:null,runPeriodically:(t,r)=>{e._timeoutId=setTimeout(()=>{e._timeoutId=null,t(n=>{if(e._onCancel)return e._onCancel();e.runPeriodically(t,n||r)})},r)},cancel:t=>{if(e._timeoutId)return clearTimeout(e._timeoutId),t();e._onCancel=t}},{privKey:t}=this._peerInfo.id,{pass:r}=this._options;e.runPeriodically(e=>{this._republishEntries(t,r,()=>e(h))},f),this._republishHandle=e}stop(e){const t=this._republishHandle;if(!t){const t="not running";return l.error(t),e(s(new Error(t),"ERR_REPUBLISH_NOT_RUNNING"))}this._republishHandle=null,t.cancel(e)}_republishEntries(e,t,r){this._republishEntry(e,e=>{if(e){const e="cannot republish entry for the node's private key";l.error(e)}else t?this._keychain.listKeys((e,n)=>{e?l.error(e):c(n,(e,r)=>{u([r=>this._keychain.exportKey(e.name,t,r),(e,r)=>i.keys.import(e,t,r)],(e,t)=>{e?l.error(e):this._republishEntry(t,r)})},e=>{e&&l.error(e),r(null)})}):r(null)})}_republishEntry(e,t){if(!e||!e.bytes){const e="one or more of the provided parameters are not defined";return l.error(e),t(s(new Error(e),"ERR_UNDEFINED_PARAMETER"))}u([t=>o.createFromPrivKey(e.bytes,t),(e,t)=>this._getPreviousValue(e,t)],(r,n)=>{if(r)return t("ERR_NO_ENTRY_FOUND"===r.code?null:r);this._publisher.publishWithEOL(e,n,d,t)})}_getPreviousValue(e,r){if(!o.isPeerId(e)){const e="peerId received is not valid";return l.error(e),r(s(new Error(e),"ERR_INVALID_PEER_ID"))}this._datastore.get(n.getLocalKey(e.id),(i,o)=>{if(i&&i.notFound){const t=`no previous entry for record with id: ${e.id}`;return l.error(t),r(s(new Error(t),"ERR_NO_ENTRY_FOUND"))}if(i)return r(i);if(!t.isBuffer(o)){const e="found ipns record that we couldn't process";return l.error(e),r(s(new Error(e),"ERR_INVALID_IPNS_RECORD"))}let a;try{a=n.unmarshal(o)}catch(i){const e="found ipns record that we couldn't convert to a value";return l.error(e),r(s(new Error(e),"ERR_INVALID_IPNS_RECORD"))}r(null,a.value)})}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(252),i=r(68),o=r(24),s=r(20),a=r(5),c=a("ipfs:ipns:resolver");c.error=a("ipfs:ipns:resolver:error");const u=32;e.exports=class{constructor(e){this._routing=e}resolve(e,t,r){if("function"==typeof t&&(r=t,t={}),"string"!=typeof e){const e="one or more of the provided parameters are not valid";return c.error(e),r(s(new Error(e),"ERR_INVALID_PARAMETER"))}const n=(t=t||{}).recursive&&"true"===t.recursive.toString(),i=e.split("/");if(3!==i.length||""!==i[0]){const t=`invalid name syntax for ${e}`;return c.error(t),r(s(new Error(t),"ERR_INVALID_NAME_SYNTAX"))}const o=i[2];let a;n&&(a=u),this.resolver(o,a,(t,n)=>{if(t)return r(t);c(`${e} was locally resolved correctly`),r(null,n)})}resolver(e,t,r){if(0===t){const e=`could not resolve name (recursion limit of ${u} exceeded)`;return c.error(e),r(s(new Error(e),"ERR_RESOLVE_RECURSION_LIMIT"))}this._resolveName(e,(e,n)=>{if(e)return r(e);const i=n.split("/");if("ipfs"===i[1]||!t)return r(null,n);this.resolver(i[2],t-1,r)})}_resolveName(e,t){let r;try{r=o.createFromB58String(e)}catch(e){return t(e)}const{routingKey:a,routingPubKey:u}=n.getIdKeys(r.toBytes());this._routing.get(a.toBuffer(),(o,l)=>{if(o){if("ERR_NOT_FOUND"!==o.code){const e=`unexpected error getting the ipns record ${r.id}`;return c.error(e),t(s(new Error(e),"ERR_UNEXPECTED_ERROR_GETTING_RECORD"))}const n=`record requested was not found for ${e} (${a}) in the network`;return c.error(n),t(s(new Error(n),"ERR_NO_RECORD_FOUND"))}let f;try{f=n.unmarshal(l)}catch(o){const e="found ipns record that we couldn't convert to a value";return c.error(e),t(s(new Error(e),"ERR_INVALID_RECORD_RECEIVED"))}if(f.pubKey)return this._validateRecord(r,f,t);this._routing.get(a.toBuffer(),(n,o)=>{if(n){if("ERR_NOT_FOUND"!==n.code){const e=`unexpected error getting the public key for the ipns record ${r.id}`;return c.error(e),t(s(new Error(e),"ERR_UNEXPECTED_ERROR_GETTING_PUB_KEY"))}const i=`public key requested was not found for ${e} (${u}) in the network`;return c.error(i),t(s(new Error(i),"ERR_NO_RECORD_FOUND"))}try{r.pubKey=i.keys.unmarshalPublicKey(o)}catch(n){const e="found public key record that we couldn't convert to a value";return c.error(e),t(s(new Error(e),"ERR_INVALID_PUB_KEY_RECEIVED"))}this._validateRecord(r,f,t)})})}_validateRecord(e,t,r){n.extractPublicKey(e,t,(e,i)=>{if(e)return r(e);n.validate(i,t,e=>{if(e)return r(e);r(null,t.value.toString())})})}}},function(e,t,r){"use strict";const{TieredDatastore:n}=r(626),i=r(282),o=r(658),s=r(659);e.exports=(e=>{const t=[];let r;if(i(e._options,"EXPERIMENTAL.ipnsPubsub",!1)){const n=e.libp2p.pubsub,i=e._repo.datastore,s=e._peerInfo.id;r=new o(n,i,s),t.push(r)}if(i(e._options,"offline")||!i(e._options,"libp2p.dht.enabled",!1)){const r=new s(e._repo);t.push(r)}else t.push(e.libp2p.dht);return new n(t)})},function(e,t,r){"use strict";(function(t){const{Key:n}=r(28),{encodeBase32:i,keyToTopic:o,topicToKey:s}=r(922),a=r(20),c=r(22),u=r(5),l=u("datastore-pubsub:publisher");l.error=u("datastore-pubsub:publisher:error");e.exports=class{constructor(e,t,r,n,i){c.strictEqual(typeof n,"object","missing validator"),c.strictEqual(typeof n.validate,"function","missing validate function"),c.strictEqual(typeof n.select,"function","missing select function"),i&&c.strictEqual(typeof i,"function","invalid subscriptionKeyFn received"),this._pubsub=e,this._datastore=t,this._peerId=r,this._validator=n,this._handleSubscriptionKeyFn=i,this._onMessage=this._onMessage.bind(this)}put(e,r,n){if(!t.isBuffer(e)){const e="datastore key does not have a valid format";return l.error(e),n(a(new Error(e),"ERR_INVALID_DATASTORE_KEY"))}if(!t.isBuffer(r)){const e="received value is not a buffer";return l.error(e),n(a(new Error(e),"ERR_INVALID_VALUE_RECEIVED"))}const i=o(e);l(`publish value for topic ${i}`),this._pubsub.publish(i,r,n)}get(e,r){if(!t.isBuffer(e)){const e="datastore key does not have a valid format";return l.error(e),r(a(new Error(e),"ERR_INVALID_DATASTORE_KEY"))}const n=o(e);this._pubsub.ls((t,i)=>t?r(t):i&&Array.isArray(i)&&i.indexOf(n)>-1?this._getLocal(e,r):void this._pubsub.subscribe(n,this._onMessage,t=>{if(t){const e=`cannot subscribe topic ${n}`;return l.error(e),r(a(new Error(e),"ERR_SUBSCRIBING_TOPIC"))}l(`subscribed values for key ${n}`),this._getLocal(e,r)}))}unsubscribe(e){const t=o(e);this._pubsub.unsubscribe(t,this._onMessage)}_getLocal(e,r){const o=new n("/"+i(e),!1);this._datastore.get(o,(e,n)=>{if(e){if("ERR_NOT_FOUND"!==e.code){const e=`unexpected error getting the ipns record for ${o.toString()}`;return l.error(e),r(a(new Error(e),"ERR_UNEXPECTED_ERROR_GETTING_RECORD"))}const t=`local record requested was not found for ${o.toString()}`;return l.error(t),r(a(new Error(t),"ERR_NOT_FOUND"))}if(!t.isBuffer(n)){const e="found record that we couldn't convert to a value";return l.error(e),r(a(new Error(e),"ERR_INVALID_RECORD_RECEIVED"))}r(null,n)})}_onMessage(e){const{data:t,from:r,topicIDs:n}=e;let i;try{i=s(n[0])}catch(e){return void l.error(e)}l(`message received for ${i} topic`),r!==this._peerId.toB58String()?this._handleSubscriptionKeyFn?this._handleSubscriptionKeyFn(i,(e,r)=>{e?l.error("message discarded by the subscriptionKeyFn"):this._storeIfSubscriptionIsBetter(r,t)}):this._storeIfSubscriptionIsBetter(i,t):l("message discarded as it is from the same peer")}_storeIfSubscriptionIsBetter(e,r){this._isBetter(e,r,(n,i)=>{!n&&i&&this._storeRecord(t.from(e),r)})}_validateRecord(e,t,r){this._validator.validate(e,t,r)}_selectRecord(e,t,r){this._validator.select(e,t,(e,t)=>{if(e)return l.error(e),r(e);r(null,0===t)})}_isBetter(e,t,r){this._validateRecord(t,e,(i,o)=>{if(i||!o){const e="record received through pubsub is not valid";return l.error(e),r(a(new Error(e),"ERR_NOT_VALID_RECORD"))}const s=new n(e);this._getLocal(s.toBuffer(),(e,n)=>e?r(null,!0):n.equals(t)?r(null,!1):void this._selectRecord(t,n,r))})}_storeRecord(e,t){const r=new n("/"+i(e),!1);this._datastore.put(r,t,t=>{t?l.error(`record for ${e.toString()} could not be stored in the routing`):l(`record for ${e.toString()} was stored in the datastore`)})}open(e){const t="open function was not implemented yet";return l.error(t),e(a(new Error(t),"ERR_NOT_IMPLEMENTED_YET"))}has(e,t){const r="has function was not implemented yet";return l.error(r),t(a(new Error(r),"ERR_NOT_IMPLEMENTED_YET"))}delete(e,t){const r="delete function was not implemented yet";return l.error(r),t(a(new Error(r),"ERR_NOT_IMPLEMENTED_YET"))}close(e){const t="close function was not implemented yet";return l.error(t),e(a(new Error(t),"ERR_NOT_IMPLEMENTED_YET"))}batch(){const e="batch function was not implemented yet";throw l.error(e),a(new Error(e),"ERR_NOT_IMPLEMENTED_YET")}query(){const e="query function was not implemented yet";throw l.error(e),a(new Error(e),"ERR_NOT_IMPLEMENTED_YET")}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";const n=r(39),i=r(20);e.exports.encodeBase32=(e=>n.encode("base32",e).slice(1)),e.exports.keyToTopic=(e=>{return`/record/${n.encode("base64url",e).slice(1).toString()}`}),e.exports.topicToKey=(e=>{if("/record/"!==e.substring(0,"/record/".length))throw i(new Error("topic received is not from a record"),"ERR_TOPIC_IS_NOT_FROM_RECORD_NAMESPACE");const t=`u${e.substring("/record/".length)}`;return n.decode(t).toString()})},function(e,t,r){"use strict";(function(t){const n=r(25),i=r(22),o=n(r(924)).Record,s=r(925);class a{constructor(e,r,n){e&&i(t.isBuffer(e),"key must be a Buffer"),r&&i(t.isBuffer(r),"value must be a buffer"),this.key=e,this.value=r,this.timeReceived=n}serialize(){return o.encode(this.prepareSerialize())}prepareSerialize(){return{key:this.key,value:this.value,timeReceived:this.timeReceived&&s.toRFC3339(this.timeReceived)}}static deserialize(e){const t=o.decode(e);return a.fromDeserialized(t)}static fromDeserialized(e){let t;return e.timeReceived&&(t=s.parseRFC3339(e.timeReceived)),new a(e.key,e.value,t)}}e.exports=a}).call(this,r(0).Buffer)},function(e,t,r){"use strict";e.exports="// Record represents a dht record that contains a value\n// for a key value pair\nmessage Record {\n // The key that references this record\n bytes key = 1;\n\n // The actual value this record is storing\n bytes value = 2;\n\n // Note: These fields were removed from the Record message\n // hash of the authors public key\n // optional bytes author = 3;\n // A PKI signature for the key+value+author\n // optional bytes signature = 4;\n\n // Time the record was received, set by receiver\n optional string timeReceived = 5;\n}"},function(e,t,r){"use strict";const n=r(285);e.exports.toRFC3339=(e=>{return`${e.getUTCFullYear()}-${n(e.getUTCMonth()+1,2,"0")}-${n(e.getUTCDate(),2,"0")}T${n(e.getUTCHours(),2,"0")}:${n(e.getUTCMinutes(),2,"0")}:${n(e.getUTCSeconds(),2,"0")}.${1e3*e.getUTCMilliseconds()*1e3}Z`}),e.exports.parseRFC3339=(e=>{const t=new RegExp("(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})\\.(\\d+)Z"),r=String(e).trim().match(t);if(!r)throw new Error("Invalid format");const n=parseInt(r[1],10),i=parseInt(r[2],10)-1,o=parseInt(r[3],10),s=parseInt(r[4],10),a=parseInt(r[5],10),c=parseInt(r[6],10),u=parseInt(r[7].slice(0,-6),10);return new Date(Date.UTC(n,i,o,s,a,c,u))})},function(e,t,r){"use strict";(function(t){const n=r(660),i=r(20);e.exports={verifyRecord:(e,r,o)=>{const s=r.key,a=n(s,t.from("/"));if(a.length<3)return o();const c=e[a[1].toString()];if(!c)return o(i(new Error("Invalid record keytype"),"ERR_INVALID_RECORD_KEY_TYPE"));c.func(s,r.value,o)},validators:r(928)}}).call(this,r(0).Buffer)},function(e,t){e.exports=function(e,t,r){for(var n=0,i=-1,o=r=r||0;o-1&&e.length-i{const s=e=>n(()=>o(e));if(!t.isBuffer(e))return s(new Error('"key" must be a Buffer'));if(e.length<3)return s(new Error("invalid public key record"));if("/pk/"!==e.slice(0,4).toString())return s(new Error("key was not prefixed with /pk/"));const a=e.slice(4);i(r,"sha2-256",(e,t)=>e?s(e):a.equals(t)?void s():s(new Error("public key does not match passed in key")))},sign:!1}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){const n=r(660),i=r(20);e.exports={bestRecord:(e,r,o)=>{if(0===o.length)throw i(new Error("No records given"),"ERR_NO_RECORDS_RECEIVED");const s=n(r,t.from("/"));if(s.length<3)throw i(new Error("Record key does not have a selector function"),"ERR_NO_SELECTOR_FUNCTION_FOR_RECORD_KEY");const a=e[s[1].toString()];if(!a){const e=`Unrecognized key prefix: ${s[1]}`;throw i(new Error(e),"ERR_UNRECOGNIZED_KEY_PREFIX")}return a(r,o)},selectors:r(931)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";e.exports={pk:r(932)}},function(e,t,r){"use strict";e.exports=((e,t)=>0)},function(e,t,r){"use strict";const n=r(663),i=r(944),o=r(979),s=r(988),a=r(1003),c=r(1011),u=r(1012),l=r(1039),f=r(115),p=r(34);e.exports=class extends l{constructor(e){const t=new i({id:e.peerInfo.id}),r=e.peerInfo.multiaddrs.toArray().map(String).filter(e=>e.includes("p2p-websocket-star"));e.peerInfo.multiaddrs.replace(r.map(p),"/p2p-websocket-star");const l=new o({servers:r,id:e.peerInfo.id,ignore_no_online:!r.length||e.wsStarIgnoreErrors}),h={switch:{blacklistTTL:12e4,blackListAttempts:5,maxParallelDials:100,maxColdCalls:25,dialTimeout:2e4},modules:{transport:[n,t,l],streamMuxer:[s],connEncryption:[a],peerDiscovery:[t.discovery,l.discovery,c],dht:u},config:{peerDiscovery:{autoDial:!0,bootstrap:{enabled:!0},webRTCStar:{enabled:!0},websocketStar:{enabled:!0}},dht:{enabled:!1},EXPERIMENTAL:{pubsub:!1}}};super(f(h,e))}}},function(e,t,r){"use strict";var n=r(935),i=r(937),o=r(941);function s(e){return"function"==typeof e}e.exports=function(e,t){s(t)&&(t={onConnect:t});var r="undefined"==typeof window?{}:window.location,a=o(e,r),c=new n(a),u=i(c,t);return u.remoteAddress=a,u.close=function(e){s(e)&&c.addEventListener("close",e),c.close()},c.addEventListener("open",function(e){t&&s(t.onConnect)&&t.onConnect(null,u)}),u},e.exports.connect=e.exports},function(e,t,r){e.exports="undefined"==typeof WebSocket?r(936):WebSocket},function(e,t){},function(e,t,r){var n=r(938),i=r(939);e.exports=function(e,t){var r=e.upgradeReq||{};t&&t.binaryType?e.binaryType=t.binaryType:t&&t.binary&&(e.binaryType="arraybuffer");return{source:n(e,t&&t.onConnect),sink:i(e,t),headers:r.headers,url:r.url,upgrade:r.upgrade,method:r.method}}},function(e,t,r){var n=r(6).Buffer;e.exports=function(e,t){var r,i,o=[],s=!1;return e.addEventListener("message",function(e){var t,i=e.data;if(((t=i)instanceof ArrayBuffer||null!=t&&null!=t.constructor&&"ArrayBuffer"===t.constructor.name&&"number"==typeof t.byteLength)&&(i=n.from(i)),r)return r(null,i);o.push(i)}),e.addEventListener("close",function(e){i||r&&r(i=!0)}),e.addEventListener("error",function(e){i||(i=e,s||(s=!0,t&&t(e)),r&&r(i))}),e.addEventListener("open",function(e){s||i||(s=!0)}),function(t,n){if(r=null,i)return n(i);t?(r=n,e.close()):o.length>0?n(null,o.shift()):r=n}}},function(e,t,r){(function(t,n){var i=r(940),o=void 0!==t?t:n.nextTick;e.exports=function(e,t){return function(r){var n=!1!==(t=t||{}).closeOnEnd,s="function"==typeof t?t:t.onClose;r(null,function t(a,c){a?n&&e.readyState<=1&&(s&&e.addEventListener("close",function(e){if(e.wasClean||1006===e.code)s();else{var t=new Error("ws error");t.event=e,s(t)}}),e.close()):i(e,function(n){if(n)return r(n,function(){});e.send(c),o(function(){r(null,t)})})})}}}).call(this,r(31).setImmediate,r(4))},function(e,t){e.exports=function(e,t){var r=e&&(e.removeEventListener||e.removeListener);function n(){"function"==typeof r&&(r.call(e,"open",i),r.call(e,"error",o))}function i(e){n(),t()}function o(e){n(),t(e)}return e.readyState>=2?t(!0):1===e.readyState?t():(e.addEventListener("open",i),void e.addEventListener("error",o))}},function(e,t,r){var{relative:n}=r(275),i={http:"ws",https:"wss"};e.exports=function(e,t){return n(e,t,i,"ws")}},function(e,t,r){"use strict";const n=r(268);e.exports=class{constructor(e,t){this.peerInfo=null,this.conn=n(),e?this.setInnerConn(e,t):t&&(this.info=t)}get source(){return this.conn.source}get sink(){return this.conn.sink}getPeerInfo(e){return this.info&&this.info.getPeerInfo?this.info.getPeerInfo(e):this.peerInfo?void e(null,this.peerInfo):e(new Error("Peer Info not set yet"))}setPeerInfo(e){if(this.info&&this.info.setPeerInfo)return this.info.setPeerInfo(e);this.peerInfo=e}getObservedAddrs(e){if(this.info&&this.info.getObservedAddrs)return this.info.getObservedAddrs(e);e(null,[])}setInnerConn(e,t){this.conn.resolve(e),this.info=t||e}}},function(e,t,r){"use strict";e.exports=function(){throw new Error("WebSocket Servers can not be created in the browser!")}},function(e,t,r){"use strict";const n=r(5)("libp2p:webrtc-star"),i=r(34),o=r(93),s=r(19),a=r(665),c=r(14).EventEmitter,u=r(970),l=r(24),f=r(46),p=r(79).Connection,h=r(123),d=r(53),m=r(17),g=r(977),y=r(978),b=y.cleanUrlSIO,v=y.cleanMultiaddr,A=d(()=>{}),w={transports:["websocket"],"force new connection":!0};e.exports=s(class{constructor(e){e=e||{},this.maSelf=void 0,this.sioOptions={transports:["websocket"],"force new connection":!0},e.wrtc&&(this.wrtc=e.wrtc),this.discovery=new c,this.discovery.tag="webRTCStar",this.discovery.start=(e=>{m(e)}),this.discovery.stop=(e=>{m(e)}),this.listenersRefs={},this._peerDiscovered=this._peerDiscovered.bind(this)}dial(e,t,r){"function"==typeof t&&(r=t,t={}),r=r?d(r):A;const i=(~~(1e9*Math.random())).toString(36)+Date.now(),o=this.listenersRefs[Object.keys(this.listenersRefs)[0]].io,s={initiator:!0,trickle:!1};let a;this.wrtc&&(s.wrtc=this.wrtc);try{a=new u(s)}catch(e){return n("Could not create connection:",e),r(e)}const c=new p(h.duplex(a));let l=!1;return a.on("signal",t=>{o.emit("ss-handshake",{intentId:i,srcMultiaddr:this.maSelf.toString(),dstMultiaddr:e.toString(),signal:t})}),a.once("timeout",()=>r(new Error("timeout"))),a.once("error",e=>{l||r(e)}),o.on("ws-handshake",t=>{if(t.intentId===i&&t.err)return r(new Error(t.err));t.intentId===i&&t.answer&&(a.once("connect",()=>{l=!0,c.destroy=a.destroy.bind(a),a.once("close",()=>c.destroy()),c.getObservedAddrs=(t=>t(null,[e])),r(null,c)}),a.signal(t.signal))}),c}createListener(e,t){"function"==typeof e&&(t=e,e={});const r=new c;return r.listen=((e,i)=>{if(i=i?d(i):A,!g.support&&!this.wrtc)return m(()=>i(new Error("no WebRTC support")));this.maSelf=e;const o=b(e);n("Dialing to Signalling Server on: "+o),r.io=a.connect(o,w),r.io.once("connect_error",i),r.io.once("error",e=>{r.emit("error",e),r.emit("close")}),r.io.on("ws-handshake",function(e){if(e.answer||e.err)return;const o={trickle:!1};let a;s.wrtc&&(o.wrtc=s.wrtc);try{a=new u(o)}catch(e){return n("Could not create incoming connection:",e),i(e)}const c=new p(h.duplex(a));a.once("connect",()=>{c.getObservedAddrs=(t=>t(null,[e.srcMultiaddr])),r.emit("connection",c),t(c)}),a.once("signal",t=>{e.signal=t,e.answer=!0,r.io.emit("ss-handshake",e)}),a.signal(e.signal)}),r.io.on("ws-peer",this._peerDiscovered),r.io.on("connect",()=>{r.io.emit("ss-join",e.toString())}),r.io.once("connect",()=>{r.emit("listening"),i()});const s=this}),r.close=(e=>{e=e?d(e):A,r.io.emit("ss-leave"),m(()=>{r.emit("close"),e()})}),r.getAddrs=(e=>{m(()=>e(null,[this.maSelf]))}),this.listenersRefs[i.toString()]=r,r}filter(e){return Array.isArray(e)||(e=[e]),e.filter(e=>!(e.protoNames().indexOf("p2p-circuit")>-1)&&o.WebRTCStar.matches(e))}_peerDiscovered(e){n("Peer Discovered:",e);const t=(e=v(e)).split("/ipfs/"),r=t[t.length-1],o=l.createFromB58String(r),s=new f(o);s.multiaddrs.add(i(e)),this.discovery.emit("peer",s)}},{className:"WebRTCStar",symbolName:"@libp2p/js-libp2p-webrtc-star/webrtcstar"})},function(e,t,r){var n=r(666),i=r(291)("socket.io-client:url");e.exports=function(e,t){var r=e;t=t||"undefined"!=typeof location&&location,null==e&&(e=t.protocol+"//"+t.host);"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?t.protocol+e:t.host+e),/^(https?|wss?):\/\//.test(e)||(i("protocol-less url %s",e),e=void 0!==t?t.protocol+"//"+e:"https://"+e),i("parse %s",e),r=n(e));r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443"));r.path=r.path||"/";var o=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port,r.href=r.protocol+"://"+o+(t&&t.port===r.port?"":":"+r.port),r}},function(e,t,r){function n(e){var r;function n(){if(n.enabled){var e=n,i=+new Date,o=i-(r||i);e.diff=o,e.prev=r,e.curr=i,r=i;for(var s=new Array(arguments.length),a=0;a0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var a=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*s;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?a(c=e,o,"day")||a(c,i,"hour")||a(c,n,"minute")||a(c,r,"second")||c+" ms":function(e){if(e>=o)return Math.round(e/o)+"d";if(e>=i)return Math.round(e/i)+"h";if(e>=n)return Math.round(e/n)+"m";if(e>=r)return Math.round(e/r)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,r){(function(n){function i(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG),e}(t=e.exports=r(949)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),!r)return;var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,n)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=i,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(i())}).call(this,r(4))},function(e,t,r){function n(e){var r;function n(){if(n.enabled){var e=n,i=+new Date,o=i-(r||i);e.diff=o,e.prev=r,e.curr=i,r=i;for(var s=new Array(arguments.length),a=0;a0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var a=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*s;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?a(c=e,o,"day")||a(c,i,"hour")||a(c,n,"minute")||a(c,r,"second")||c+" ms":function(e){if(e>=o)return Math.round(e/o)+"d";if(e>=i)return Math.round(e/i)+"h";if(e>=n)return Math.round(e/n)+"m";if(e>=r)return Math.round(e/r)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,r){var n=r(667),i=r(668),o=Object.prototype.toString,s="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===o.call(Blob),a="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===o.call(File);t.deconstructPacket=function(e){var t=[],r=e.data,o=e;return o.data=function e(t,r){if(!t)return t;if(i(t)){var o={_placeholder:!0,num:r.length};return r.push(t),o}if(n(t)){for(var s=new Array(t.length),a=0;a0&&(this.extraHeaders=t.extraHeaders),t.localAddress&&(this.localAddress=t.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}e.exports=l,l.priorWebsocketSuccess=!1,i(l.prototype),l.protocol=a.protocol,l.Socket=l,l.Transport=r(573),l.transports=r(670),l.parser=r(167),l.prototype.createTransport=function(e){o('creating transport "%s"',e);var t=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}(this.query);t.EIO=a.protocol,t.transport=e;var r=this.transportOptions[e]||{};return this.id&&(t.sid=this.id),new n[e]({query:t,socket:this,agent:r.agent||this.agent,hostname:r.hostname||this.hostname,port:r.port||this.port,secure:r.secure||this.secure,path:r.path||this.path,forceJSONP:r.forceJSONP||this.forceJSONP,jsonp:r.jsonp||this.jsonp,forceBase64:r.forceBase64||this.forceBase64,enablesXDR:r.enablesXDR||this.enablesXDR,timestampRequests:r.timestampRequests||this.timestampRequests,timestampParam:r.timestampParam||this.timestampParam,policyPort:r.policyPort||this.policyPort,pfx:r.pfx||this.pfx,key:r.key||this.key,passphrase:r.passphrase||this.passphrase,cert:r.cert||this.cert,ca:r.ca||this.ca,ciphers:r.ciphers||this.ciphers,rejectUnauthorized:r.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:r.perMessageDeflate||this.perMessageDeflate,extraHeaders:r.extraHeaders||this.extraHeaders,forceNode:r.forceNode||this.forceNode,localAddress:r.localAddress||this.localAddress,requestTimeout:r.requestTimeout||this.requestTimeout,protocols:r.protocols||void 0,isReactNative:this.isReactNative})},l.prototype.open=function(){var e;if(this.rememberUpgrade&&l.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout(function(){t.emit("error","No transports available")},0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},l.prototype.setTransport=function(e){o("setting transport %s",e.name);var t=this;this.transport&&(o("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",function(){t.onDrain()}).on("packet",function(e){t.onPacket(e)}).on("error",function(e){t.onError(e)}).on("close",function(){t.onClose("transport close")})},l.prototype.probe=function(e){o('probing transport "%s"',e);var t=this.createTransport(e,{probe:1}),r=!1,n=this;function i(){if(n.onlyBinaryUpgrades){var i=!this.supportsBinary&&n.transport.supportsBinary;r=r||i}r||(o('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",function(i){if(!r)if("pong"===i.type&&"probe"===i.data){if(o('probe transport "%s" pong',e),n.upgrading=!0,n.emit("upgrading",t),!t)return;l.priorWebsocketSuccess="websocket"===t.name,o('pausing current transport "%s"',n.transport.name),n.transport.pause(function(){r||"closed"!==n.readyState&&(o("changing transport and sending upgrade packet"),p(),n.setTransport(t),t.send([{type:"upgrade"}]),n.emit("upgrade",t),t=null,n.upgrading=!1,n.flush())})}else{o('probe transport "%s" failed',e);var s=new Error("probe error");s.transport=t.name,n.emit("upgradeError",s)}}))}function s(){r||(r=!0,p(),t.close(),t=null)}function a(r){var i=new Error("probe error: "+r);i.transport=t.name,s(),o('probe transport "%s" failed because of error: %s',e,r),n.emit("upgradeError",i)}function c(){a("transport closed")}function u(){a("socket closed")}function f(e){t&&e.name!==t.name&&(o('"%s" works - aborting "%s"',e.name,t.name),s())}function p(){t.removeListener("open",i),t.removeListener("error",a),t.removeListener("close",c),n.removeListener("close",u),n.removeListener("upgrading",f)}l.priorWebsocketSuccess=!1,t.once("open",i),t.once("error",a),t.once("close",c),this.once("close",u),this.once("upgrading",f),t.open()},l.prototype.onOpen=function(){if(o("socket open"),this.readyState="open",l.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){o("starting upgrade probes");for(var e=0,t=this.upgrades.length;en&&(r=n),t>=n||t>=r||0===n)return new ArrayBuffer(0);for(var i=new Uint8Array(e),o=new Uint8Array(r-t),s=t,a=0;s=55296&&t<=56319&&i=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function c(e,t){return o(e>>t&63|128)}function u(e,t){if(0==(4294967168&e))return o(e);var r="";return 0==(4294965248&e)?r=o(e>>6&31|192):0==(4294901760&e)?(a(e,t)||(e=65533),r=o(e>>12&15|224),r+=c(e,6)):0==(4292870144&e)&&(r=o(e>>18&7|240),r+=c(e,12),r+=c(e,6)),r+=o(63&e|128)}function f(){if(i>=n)throw Error("Invalid byte index");var e=255&r[i];if(i++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function l(e){var t,o;if(i>n)throw Error("Invalid byte index");if(i==n)return!1;if(t=255&r[i],i++,0==(128&t))return t;if(192==(224&t)){if((o=(31&t)<<6|f())>=128)return o;throw Error("Invalid continuation byte")}if(224==(240&t)){if((o=(15&t)<<12|f()<<6|f())>=2048)return a(o,e)?o:65533;throw Error("Invalid continuation byte")}if(240==(248&t)&&(o=(7&t)<<18|f()<<12|f()<<6|f())>=65536&&o<=1114111)return o;throw Error("Invalid UTF-8 detected")}e.exports={version:"2.1.2",encode:function(e,t){for(var r=!1!==(t=t||{}).strict,n=s(e),i=n.length,o=-1,a="";++o65535&&(i+=o((t-=65536)>>>10&1023|55296),t=56320|1023&t),i+=o(t);return i}(u)}}},function(e,t){!function(){"use strict";for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=new Uint8Array(256),n=0;n>2],o+=e[(3&n[r])<<4|n[r+1]>>4],o+=e[(15&n[r+1])<<2|n[r+2]>>6],o+=e[63&n[r+2]];return i%3==2?o=o.substring(0,o.length-1)+"=":i%3==1&&(o=o.substring(0,o.length-2)+"=="),o},t.decode=function(e){var t,n,i,o,s,a=.75*e.length,c=e.length,u=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var f=new ArrayBuffer(a),l=new Uint8Array(f);for(t=0;t>4,l[u++]=(15&i)<<4|o>>2,l[u++]=(3&o)<<6|63&s;return f}}()},function(e,t){var r=void 0!==r?r:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,n=function(){try{return 2===new Blob(["hi"]).size}catch(e){return!1}}(),i=n&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(e){return!1}}(),o=r&&r.prototype.append&&r.prototype.getBlob;function s(e){return e.map(function(e){if(e.buffer instanceof ArrayBuffer){var t=e.buffer;if(e.byteLength!==t.byteLength){var r=new Uint8Array(e.byteLength);r.set(new Uint8Array(t,e.byteOffset,e.byteLength)),t=r.buffer}return t}return e})}function a(e,t){t=t||{};var n=new r;return s(e).forEach(function(e){n.append(e)}),t.type?n.getBlob(t.type):n.getBlob()}function c(e,t){return new Blob(s(e),t||{})}"undefined"!=typeof Blob&&(a.prototype=Blob.prototype,c.prototype=Blob.prototype),e.exports=n?i?Blob:c:o?a:void 0},function(e,t,r){function n(e){var r;function n(){if(n.enabled){var e=n,i=+new Date,o=i-(r||i);e.diff=o,e.prev=r,e.curr=i,r=i;for(var s=new Array(arguments.length),a=0;a0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var a=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*s;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?a(c=e,o,"day")||a(c,i,"hour")||a(c,n,"minute")||a(c,r,"second")||c+" ms":function(e){if(e>=o)return Math.round(e/o)+"d";if(e>=i)return Math.round(e/i)+"h";if(e>=n)return Math.round(e/n)+"m";if(e>=r)return Math.round(e/r)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,r){(function(t){var n=r(832),i=r(357);e.exports=f;var o,s=/\n/g,a=/\\n/g;function c(){}function u(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{}}function f(e){if(n.call(this,e),this.query=this.query||{},!o){var t=u();o=t.___eio=t.___eio||[]}this.index=o.length;var r=this;o.push(function(e){r.onData(e)}),this.query.j=this.index,"function"==typeof addEventListener&&addEventListener("beforeunload",function(){r.script&&(r.script.onerror=c)},!1)}i(f,n),f.prototype.supportsBinary=!1,f.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),n.prototype.doClose.call(this)},f.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var r=document.getElementsByTagName("script")[0];r?r.parentNode.insertBefore(t,r):(document.head||document.body).appendChild(t),this.script=t,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout(function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)},100)},f.prototype.doWrite=function(e,t){var r=this;if(!this.form){var n,i=document.createElement("form"),o=document.createElement("textarea"),c=this.iframeId="eio_iframe_"+this.index;i.className="socketio",i.style.position="absolute",i.style.top="-1000px",i.style.left="-1000px",i.target=c,i.method="POST",i.setAttribute("accept-charset","utf-8"),o.name="d",i.appendChild(o),document.body.appendChild(i),this.form=i,this.area=o}function u(){f(),t()}function f(){if(r.iframe)try{r.form.removeChild(r.iframe)}catch(e){r.onError("jsonp polling iframe removal error",e)}try{var e='