text: var Libp2PIdentify=function(modules){function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:!1,exports:{}};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.l=!0,module.exports}var installedModules={};return __webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.d=function(exports,name,getter){__webpack_require__.o(exports,name)||Object.defineProperty(exports,name,{configurable:!1,enumerable:!0,get:getter})},__webpack_require__.n=function(module){var getter=module&&module.__esModule?function(){return module.default}:function(){return module};return __webpack_require__.d(getter,"a",getter),getter},__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=88)}([function(module,exports,__webpack_require__){"use strict";(function(global){function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(that,length){if(kMaxLength()<length)throw new RangeError("Invalid typed array length");return Buffer.TYPED_ARRAY_SUPPORT?(that=new Uint8Array(length)).__proto__=Buffer.prototype:(null===that&&(that=new Buffer(length)),that.length=length),that}function Buffer(arg,encodingOrOffset,length){if(!(Buffer.TYPED_ARRAY_SUPPORT||this instanceof Buffer))return new Buffer(arg,encodingOrOffset,length);if("number"==typeof arg){if("string"==typeof encodingOrOffset)throw new Error("If encoding is specified then the first argument must be a string");return allocUnsafe(this,arg)}return from(this,arg,encodingOrOffset,length)}function from(that,value,encodingOrOffset,length){if("number"==typeof value)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&value instanceof ArrayBuffer?fromArrayBuffer(that,value,encodingOrOffset,length):"string"==typeof value?fromString(that,value,encodingOrOffset):fromObject(that,value)}function assertSize(size){if("number"!=typeof size)throw new TypeError('"size" argument must be a number');if(size<0)throw new RangeError('"size" argument must not be negative')}function alloc(that,size,fill,encoding){return assertSize(size),size<=0?createBuffer(that,size):void 0!==fill?"string"==typeof encoding?createBuffer(that,size).fill(fill,encoding):createBuffer(that,size).fill(fill):createBuffer(that,size)}function allocUnsafe(that,size){if(assertSize(size),that=createBuffer(that,size<0?0:0|checked(size)),!Buffer.TYPED_ARRAY_SUPPORT)for(var i=0;i<size;++i)that[i]=0;return that}function fromString(that,string,encoding){if("string"==typeof encoding&&""!==encoding||(encoding="utf8"),!Buffer.isEncoding(encoding))throw new TypeError('"encoding" must be a valid string encoding');var length=0|byteLength(string,encoding),actual=(that=createBuffer(that,length)).write(string,encoding);return actual!==length&&(that=that.slice(0,actual)),that}function fromArrayLike(that,array){var length=array.length<0?0:0|checked(array.length);that=createBuffer(that,length);for(var i=0;i<length;i+=1)that[i]=255&array[i];return that}function fromArrayBuffer(that,array,byteOffset,length){if(array.byteLength,byteOffset<0||array.byteLength<byteOffset)throw new RangeError("'offset' is out of bounds");if(array.byteLength<byteOffset+(length||0))throw new RangeError("'length' is out of bounds");return array=void 0===byteOffset&&void 0===length?new Uint8Array(array):void 0===length?new Uint8Array(array,byteOffset):new Uint8Array(array,byteOffset,length),Buffer.TYPED_ARRAY_SUPPORT?(that=array).__proto__=Buffer.prototype:that=fromArrayLike(that,array),that}function fromObject(that,obj){if(Buffer.isBuffer(obj)){var len=0|checked(obj.length);return 0===(that=createBuffer(that,len)).length?that:(obj.copy(that,0,0,len),that)}if(obj){if("undefined"!=typeof ArrayBuffer&&obj.buffer instanceof ArrayBuffer||"length"in obj)return"number"!=typeof obj.length||isnan(obj.length)?createBuffer(that,0):fromArrayLike(that,obj);if("Buffer"===obj.type&&isArray(obj.data))return fromArrayLike(that,obj.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function checked(length){if(length>=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|length}function byteLength(string,encoding){if(Buffer.isBuffer(string))return string.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(string)||string instanceof ArrayBuffer))return string.byteLength;"string"!=typeof string&&(string=""+string);var len=string.length;if(0===len)return 0;for(var loweredCase=!1;;)switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":case void 0:return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*len;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase(),loweredCase=!0}}function slowToString(encoding,start,end){var loweredCase=!1;if((void 0===start||start<0)&&(start=0),start>this.length)return"";if((void 0===end||end>this.length)&&(end=this.length),end<=0)return"";if(end>>>=0,start>>>=0,end<=start)return"";for(encoding||(encoding="utf8");;)switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase(),loweredCase=!0}}function swap(b,n,m){var i=b[n];b[n]=b[m],b[m]=i}function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){if(0===buffer.length)return-1;if("string"==typeof byteOffset?(encoding=byteOffset,byteOffset=0):byteOffset>2147483647?byteOffset=2147483647:byteOffset<-2147483648&&(byteOffset=-2147483648),byteOffset=+byteOffset,isNaN(byteOffset)&&(byteOffset=dir?0:buffer.length-1),byteOffset<0&&(byteOffset=buffer.length+byteOffset),byteOffset>=buffer.length){if(dir)return-1;byteOffset=buffer.length-1}else if(byteOffset<0){if(!dir)return-1;byteOffset=0}if("string"==typeof val&&(val=Buffer.from(val,encoding)),Buffer.isBuffer(val))return 0===val.length?-1:arrayIndexOf(buffer,val,byteOffset,encoding,dir);if("number"==typeof val)return val&=255,Buffer.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?dir?Uint8Array.prototype.indexOf.call(buffer,val,byteOffset):Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset):arrayIndexOf(buffer,[val],byteOffset,encoding,dir);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){function read(buf,i){return 1===indexSize?buf[i]:buf.readUInt16BE(i*indexSize)}var indexSize=1,arrLength=arr.length,valLength=val.length;if(void 0!==encoding&&("ucs2"===(encoding=String(encoding).toLowerCase())||"ucs-2"===encoding||"utf16le"===encoding||"utf-16le"===encoding)){if(arr.length<2||val.length<2)return-1;indexSize=2,arrLength/=2,valLength/=2,byteOffset/=2}var i;if(dir){var foundIndex=-1;for(i=byteOffset;i<arrLength;i++)if(read(arr,i)===read(val,-1===foundIndex?0:i-foundIndex)){if(-1===foundIndex&&(foundIndex=i),i-foundIndex+1===valLength)return foundIndex*indexSize}else-1!==foundIndex&&(i-=i-foundIndex),foundIndex=-1}else for(byteOffset+valLength>arrLength&&(byteOffset=arrLength-valLength),i=byteOffset;i>=0;i--){for(var found=!0,j=0;j<valLength;j++)if(read(arr,i+j)!==read(val,j)){found=!1;break}if(found)return i}return-1}function hexWrite(buf,string,offset,length){offset=Number(offset)||0;var remaining=buf.length-offset;length?(length=Number(length))>remaining&&(length=remaining):length=remaining;var strLen=string.length;if(strLen%2!=0)throw new TypeError("Invalid hex string");length>strLen/2&&(length=strLen/2);for(var i=0;i<length;++i){var parsed=parseInt(string.substr(2*i,2),16);if(isNaN(parsed))return i;buf[offset+i]=parsed}return i}function utf8Write(buf,string,offset,length){return blitBuffer(utf8ToBytes(string,buf.length-offset),buf,offset,length)}function asciiWrite(buf,string,offset,length){return blitBuffer(asciiToBytes(string),buf,offset,length)}function latin1Write(buf,string,offset,length){return asciiWrite(buf,string,offset,length)}function base64Write(buf,string,offset,length){return blitBuffer(base64ToBytes(string),buf,offset,length)}function ucs2Write(buf,string,offset,length){return blitBuffer(utf16leToBytes(string,buf.length-offset),buf,offset,length)}function base64Slice(buf,start,end){return 0===start&&end===buf.length?base64.fromByteArray(buf):base64.fromByteArray(buf.slice(start,end))}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);for(var res=[],i=start;i<end;){var firstByte=buf[i],codePoint=null,bytesPerSequence=firstByte>239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:firstByte<128&&(codePoint=firstByte);break;case 2:128==(192&(secondByte=buf[i+1]))&&(tempCodePoint=(31&firstByte)<<6|63&secondByte)>127&&(codePoint=tempCodePoint);break;case 3:secondByte=buf[i+1],thirdByte=buf[i+2],128==(192&secondByte)&&128==(192&thirdByte)&&(tempCodePoint=(15&firstByte)<<12|(63&secondByte)<<6|63&thirdByte)>2047&&(tempCodePoint<55296||tempCodePoint>57343)&&(codePoint=tempCodePoint);break;case 4:secondByte=buf[i+1],thirdByte=buf[i+2],fourthByte=buf[i+3],128==(192&secondByte)&&128==(192&thirdByte)&&128==(192&fourthByte)&&(tempCodePoint=(15&firstByte)<<18|(63&secondByte)<<12|(63&thirdByte)<<6|63&fourthByte)>65535&&tempCodePoint<1114112&&(codePoint=tempCodePoint)}}null===codePoint?(codePoint=65533,bytesPerSequence=1):codePoint>65535&&(codePoint-=65536,res.push(codePoint>>>10&1023|55296),codePoint=56320|1023&codePoint),res.push(codePoint),i+=bytesPerSequence}return decodeCodePointsArray(res)}function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,codePoints);for(var res="",i=0;i<len;)res+=String.fromCharCode.apply(String,codePoints.slice(i,i+=MAX_ARGUMENTS_LENGTH));return res}function asciiSlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i)ret+=String.fromCharCode(127&buf[i]);return ret}function latin1Slice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i)ret+=String.fromCharCode(buf[i]);return ret}function hexSlice(buf,start,end){var len=buf.length;(!start||start<0)&&(start=0),(!end||end<0||end>len)&&(end=len);for(var out="",i=start;i<end;++i)out+=toHex(buf[i]);return out}function utf16leSlice(buf,start,end){for(var bytes=buf.slice(start,end),res="",i=0;i<bytes.length;i+=2)res+=String.fromCharCode(bytes[i]+256*bytes[i+1]);return res}function checkOffset(offset,ext,length){if(offset%1!=0||offset<0)throw new RangeError("offset is not uint");if(offset+ext>length)throw new RangeError("Trying to access beyond buffer length")}function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||value<min)throw new RangeError('"value" argument is out of bounds');if(offset+ext>buf.length)throw new RangeError("Index out of range")}function objectWriteUInt16(buf,value,offset,littleEndian){value<0&&(value=65535+value+1);for(var i=0,j=Math.min(buf.length-offset,2);i<j;++i)buf[offset+i]=(value&255<<8*(littleEndian?i:1-i))>>>8*(littleEndian?i:1-i)}function objectWriteUInt32(buf,value,offset,littleEndian){value<0&&(value=4294967295+value+1);for(var i=0,j=Math.min(buf.length-offset,4);i<j;++i)buf[offset+i]=value>>>8*(littleEndian?i:3-i)&255}function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){return noAssert||checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38),ieee754.write(buf,value,offset,littleEndian,23,4),offset+4}function writeDouble(buf,value,offset,littleEndian,noAssert){return noAssert||checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308),ieee754.write(buf,value,offset,littleEndian,52,8),offset+8}function base64clean(str){if((str=stringtrim(str).replace(INVALID_BASE64_RE,"")).length<2)return"";for(;str.length%4!=0;)str+="=";return str}function stringtrim(str){return str.trim?str.trim():str.replace(/^\s+|\s+$/g,"")}function toHex(n){return n<16?"0"+n.toString(16):n.toString(16)}function utf8ToBytes(string,units){units=units||1/0;for(var codePoint,length=string.length,leadSurrogate=null,bytes=[],i=0;i<length;++i){if((codePoint=string.charCodeAt(i))>55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){(units-=3)>-1&&bytes.push(239,191,189);continue}if(i+1===length){(units-=3)>-1&&bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){(units-=3)>-1&&bytes.push(239,191,189),leadSurrogate=codePoint;continue}codePoint=65536+(leadSurrogate-55296<<10|codePoint-56320)}else leadSurrogate&&(units-=3)>-1&&bytes.push(239,191,189);if(leadSurrogate=null,codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,63&codePoint|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,63&codePoint|128)}else{if(!(codePoint<1114112))throw new Error("Invalid code point");if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,63&codePoint|128)}}return bytes}function asciiToBytes(str){for(var byteArray=[],i=0;i<str.length;++i)byteArray.push(255&str.charCodeAt(i));return byteArray}function utf16leToBytes(str,units){for(var c,hi,lo,byteArray=[],i=0;i<str.length&&!((units-=2)<0);++i)hi=(c=str.charCodeAt(i))>>8,lo=c%256,byteArray.push(lo),byteArray.push(hi);return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i<length&&!(i+offset>=dst.length||i>=src.length);++i)dst[i+offset]=src[i];return i}function isnan(val){return val!==val}var base64=__webpack_require__(91),ieee754=__webpack_require__(92),isArray=__webpack_require__(39);exports.Buffer=Buffer,exports.SlowBuffer=function(length){return+length!=length&&(length=0),Buffer.alloc(+length)},exports.INSPECT_MAX_BYTES=50,Buffer.TYPED_ARRAY_SUPPORT=void 0!==global.TYPED_ARRAY_SUPPORT?global.TYPED_ARRAY_SUPPORT:function(){try{var arr=new Uint8Array(1);return arr.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===arr.foo()&&"function"==typeof arr.subarray&&0===arr.subarray(1,1).byteLength}catch(e){return!1}}(),exports.kMaxLength=kMaxLength(),Buffer.poolSize=8192,Buffer._augment=function(arr){return arr.__proto__=Buffer.prototype,arr},Buffer.from=function(value,encodingOrOffset,length){return from(null,value,encodingOrOffset,length)},Buffer.TYPED_ARRAY_SUPPORT&&(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0})),Buffer.alloc=function(size,fill,encoding){return alloc(null,size,fill,encoding)},Buffer.allocUnsafe=function(size){return allocUnsafe(null,size)},Buffer.allocUnsafeSlow=function(size){return allocUnsafe(null,size)},Buffer.isBuffer=function(b){return!(null==b||!b._isBuffer)},Buffer.compare=function(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=Math.min(x,y);i<len;++i)if(a[i]!==b[i]){x=a[i],y=b[i];break}return x<y?-1:y<x?1:0},Buffer.isEncoding=function(encoding){switch(String(encoding).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function(list,length){if(!isArray(list))throw new TypeError('"list" argument must be an Array of Buffers');if(0===list.length)return Buffer.alloc(0);var i;if(void 0===length)for(length=0,i=0;i<list.length;++i)length+=list[i].length;var buffer=Buffer.allocUnsafe(length),pos=0;for(i=0;i<list.length;++i){var buf=list[i];if(!Buffer.isBuffer(buf))throw new TypeError('"list" argument must be an Array of Buffers');buf.copy(buffer,pos),pos+=buf.length}return buffer},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function(){var len=this.length;if(len%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;i<len;i+=2)swap(this,i,i+1);return this},Buffer.prototype.swap32=function(){var len=this.length;if(len%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var i=0;i<len;i+=4)swap(this,i,i+3),swap(this,i+1,i+2);return this},Buffer.prototype.swap64=function(){var len=this.length;if(len%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var i=0;i<len;i+=8)swap(this,i,i+7),swap(this,i+1,i+6),swap(this,i+2,i+5),swap(this,i+3,i+4);return this},Buffer.prototype.toString=function(){var length=0|this.length;return 0===length?"":0===arguments.length?utf8Slice(this,0,length):slowToString.apply(this,arguments)},Buffer.prototype.equals=function(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b||0===Buffer.compare(this,b)},Buffer.prototype.inspect=function(){var str="",max=exports.INSPECT_MAX_BYTES;return this.length>0&&(str=this.toString("hex",0,max).match(/.{2}/g).join(" "),this.length>max&&(str+=" ... ")),"<Buffer "+str+">"},Buffer.prototype.compare=function(target,start,end,thisStart,thisEnd){if(!Buffer.isBuffer(target))throw new TypeError("Argument must be a Buffer");if(void 0===start&&(start=0),void 0===end&&(end=target?target.length:0),void 0===thisStart&&(thisStart=0),void 0===thisEnd&&(thisEnd=this.length),start<0||end>target.length||thisStart<0||thisEnd>this.length)throw new RangeError("out of range index");if(thisStart>=thisEnd&&start>=end)return 0;if(thisStart>=thisEnd)return-1;if(start>=end)return 1;if(start>>>=0,end>>>=0,thisStart>>>=0,thisEnd>>>=0,this===target)return 0;for(var x=thisEnd-thisStart,y=end-start,len=Math.min(x,y),thisCopy=this.slice(thisStart,thisEnd),targetCopy=target.slice(start,end),i=0;i<len;++i)if(thisCopy[i]!==targetCopy[i]){x=thisCopy[i],y=targetCopy[i];break}return x<y?-1:y<x?1:0},Buffer.prototype.includes=function(val,byteOffset,encoding){return-1!==this.indexOf(val,byteOffset,encoding)},Buffer.prototype.indexOf=function(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,!0)},Buffer.prototype.lastIndexOf=function(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,!1)},Buffer.prototype.write=function(string,offset,length,encoding){if(void 0===offset)encoding="utf8",length=this.length,offset=0;else if(void 0===length&&"string"==typeof offset)encoding=offset,length=this.length,offset=0;else{if(!isFinite(offset))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");offset|=0,isFinite(length)?(length|=0,void 0===encoding&&(encoding="utf8")):(encoding=length,length=void 0)}var remaining=this.length-offset;if((void 0===length||length>remaining)&&(length=remaining),string.length>0&&(length<0||offset<0)||offset>this.length)throw new RangeError("Attempt to write outside buffer bounds");encoding||(encoding="utf8");for(var loweredCase=!1;;)switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase(),loweredCase=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;Buffer.prototype.slice=function(start,end){var len=this.length;start=~~start,end=void 0===end?len:~~end,start<0?(start+=len)<0&&(start=0):start>len&&(start=len),end<0?(end+=len)<0&&(end=0):end>len&&(end=len),end<start&&(end=start);var newBuf;if(Buffer.TYPED_ARRAY_SUPPORT)(newBuf=this.subarray(start,end)).__proto__=Buffer.prototype;else{var sliceLen=end-start;newBuf=new Buffer(sliceLen,void 0);for(var i=0;i<sliceLen;++i)newBuf[i]=this[i+start]}return newBuf},Buffer.prototype.readUIntLE=function(offset,byteLength,noAssert){offset|=0,byteLength|=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i<byteLength&&(mul*=256);)val+=this[offset+i]*mul;return val},Buffer.prototype.readUIntBE=function(offset,byteLength,noAssert){offset|=0,byteLength|=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset+--byteLength],mul=1;byteLength>0&&(mul*=256);)val+=this[offset+--byteLength]*mul;return val},Buffer.prototype.readUInt8=function(offset,noAssert){return noAssert||checkOffset(offset,1,this.length),this[offset]},Buffer.prototype.readUInt16LE=function(offset,noAssert){return noAssert||checkOffset(offset,2,this.length),this[offset]|this[offset+1]<<8},Buffer.prototype.readUInt16BE=function(offset,noAssert){return noAssert||checkOffset(offset,2,this.length),this[offset]<<8|this[offset+1]},Buffer.prototype.readUInt32LE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+16777216*this[offset+3]},Buffer.prototype.readUInt32BE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),16777216*this[offset]+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])},Buffer.prototype.readIntLE=function(offset,byteLength,noAssert){offset|=0,byteLength|=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i<byteLength&&(mul*=256);)val+=this[offset+i]*mul;return mul*=128,val>=mul&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readIntBE=function(offset,byteLength,noAssert){offset|=0,byteLength|=0,noAssert||checkOffset(offset,byteLength,this.length);for(var i=byteLength,mul=1,val=this[offset+--i];i>0&&(mul*=256);)val+=this[offset+--i]*mul;return mul*=128,val>=mul&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readInt8=function(offset,noAssert){return noAssert||checkOffset(offset,1,this.length),128&this[offset]?-1*(255-this[offset]+1):this[offset]},Buffer.prototype.readInt16LE=function(offset,noAssert){noAssert||checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt16BE=function(offset,noAssert){noAssert||checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt32LE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24},Buffer.prototype.readInt32BE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]},Buffer.prototype.readFloatLE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!0,23,4)},Buffer.prototype.readFloatBE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!1,23,4)},Buffer.prototype.readDoubleLE=function(offset,noAssert){return noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!0,52,8)},Buffer.prototype.readDoubleBE=function(offset,noAssert){return noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!1,52,8)},Buffer.prototype.writeUIntLE=function(value,offset,byteLength,noAssert){value=+value,offset|=0,byteLength|=0,noAssert||checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength)-1,0);var mul=1,i=0;for(this[offset]=255&value;++i<byteLength&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUIntBE=function(value,offset,byteLength,noAssert){value=+value,offset|=0,byteLength|=0,noAssert||checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength)-1,0);var i=byteLength-1,mul=1;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUInt8=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(value=Math.floor(value)),this[offset]=255&value,offset+1},Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8):objectWriteUInt16(this,value,offset,!0),offset+2},Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>8,this[offset+1]=255&value):objectWriteUInt16(this,value,offset,!1),offset+2},Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset+3]=value>>>24,this[offset+2]=value>>>16,this[offset+1]=value>>>8,this[offset]=255&value):objectWriteUInt32(this,value,offset,!0),offset+4},Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value):objectWriteUInt32(this,value,offset,!1),offset+4},Buffer.prototype.writeIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset|=0,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0,mul=1,sub=0;for(this[offset]=255&value;++i<byteLength&&(mul*=256);)value<0&&0===sub&&0!==this[offset+i-1]&&(sub=1),this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeIntBE=function(value,offset,byteLength,noAssert){if(value=+value,offset|=0,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1,mul=1,sub=0;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)value<0&&0===sub&&0!==this[offset+i+1]&&(sub=1),this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeInt8=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(value=Math.floor(value)),value<0&&(value=255+value+1),this[offset]=255&value,offset+1},Buffer.prototype.writeInt16LE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8):objectWriteUInt16(this,value,offset,!0),offset+2},Buffer.prototype.writeInt16BE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>8,this[offset+1]=255&value):objectWriteUInt16(this,value,offset,!1),offset+2},Buffer.prototype.writeInt32LE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8,this[offset+2]=value>>>16,this[offset+3]=value>>>24):objectWriteUInt32(this,value,offset,!0),offset+4},Buffer.prototype.writeInt32BE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),value<0&&(value=4294967295+value+1),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value):objectWriteUInt32(this,value,offset,!1),offset+4},Buffer.prototype.writeFloatLE=function(value,offset,noAssert){return writeFloat(this,value,offset,!0,noAssert)},Buffer.prototype.writeFloatBE=function(value,offset,noAssert){return writeFloat(this,value,offset,!1,noAssert)},Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){return writeDouble(this,value,offset,!0,noAssert)},Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){return writeDouble(this,value,offset,!1,noAssert)},Buffer.prototype.copy=function(target,targetStart,start,end){if(start||(start=0),end||0===end||(end=this.length),targetStart>=target.length&&(targetStart=target.length),targetStart||(targetStart=0),end>0&&end<start&&(end=start),end===start)return 0;if(0===target.length||0===this.length)return 0;if(targetStart<0)throw new RangeError("targetStart out of bounds");if(start<0||start>=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");end>this.length&&(end=this.length),target.length-targetStart<end-start&&(end=target.length-targetStart+start);var i,len=end-start;if(this===target&&start<targetStart&&targetStart<end)for(i=len-1;i>=0;--i)target[i+targetStart]=this[i+start];else if(len<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(i=0;i<len;++i)target[i+targetStart]=this[i+start];else Uint8Array.prototype.set.call(target,this.subarray(start,start+len),targetStart);return len},Buffer.prototype.fill=function(val,start,end,encoding){if("string"==typeof val){if("string"==typeof start?(encoding=start,start=0,end=this.length):"string"==typeof end&&(encoding=end,end=this.length),1===val.length){var code=val.charCodeAt(0);code<256&&(val=code)}if(void 0!==encoding&&"string"!=typeof encoding)throw new TypeError("encoding must be a string");if("string"==typeof encoding&&!Buffer.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding)}else"number"==typeof val&&(val&=255);if(start<0||this.length<start||this.length<end)throw new RangeError("Out of range index");if(end<=start)return this;start>>>=0,end=void 0===end?this.length:end>>>0,val||(val=0);var i;if("number"==typeof val)for(i=start;i<end;++i)this[i]=val;else{var bytes=Buffer.isBuffer(val)?val:utf8ToBytes(new Buffer(val,encoding).toString()),len=bytes.length;for(i=0;i<end-start;++i)this[i+start]=bytes[i%len]}return this};var INVALID_BASE64_RE=/[^+\/0-9A-Za-z-_]/g}).call(exports,__webpack_require__(4))},function(module,exports,__webpack_require__){function copyProps(src,dst){for(var key in src)dst[key]=src[key]}function SafeBuffer(arg,encodingOrOffset,length){return Buffer(arg,encodingOrOffset,length)}var buffer=__webpack_require__(0),Buffer=buffer.Buffer;Buffer.from&&Buffer.alloc&&Buffer.allocUnsafe&&Buffer.allocUnsafeSlow?module.exports=buffer:(copyProps(buffer,exports),exports.Buffer=SafeBuffer),copyProps(Buffer,SafeBuffer),SafeBuffer.from=function(arg,encodingOrOffset,length){if("number"==typeof arg)throw new TypeError("Argument must not be a number");return Buffer(arg,encodingOrOffset,length)},SafeBuffer.alloc=function(size,fill,encoding){if("number"!=typeof size)throw new TypeError("Argument must be a number");var buf=Buffer(size);return void 0!==fill?"string"==typeof encoding?buf.fill(fill,encoding):buf.fill(fill):buf.fill(0),buf},SafeBuffer.allocUnsafe=function(size){if("number"!=typeof size)throw new TypeError("Argument must be a number");return Buffer(size)},SafeBuffer.allocUnsafeSlow=function(size){if("number"!=typeof size)throw new TypeError("Argument must be a number");return buffer.SlowBuffer(size)}},function(module,exports){"function"==typeof Object.create?module.exports=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})}:module.exports=function(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}},function(module,exports,__webpack_require__){module.exports={encode:__webpack_require__(115),decode:__webpack_require__(116),encodingLength:__webpack_require__(117)}},function(module,exports){var g;g=function(){return this}();try{g=g||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(g=window)}module.exports=g},function(module,exports){function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(fun){if(cachedSetTimeout===setTimeout)return setTimeout(fun,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(fun,0);try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}function runClearTimeout(marker){if(cachedClearTimeout===clearTimeout)return clearTimeout(marker);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(marker);try{return cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}function cleanUpNextTick(){draining&&currentQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var timeout=runTimeout(cleanUpNextTick);draining=!0;for(var len=queue.length;len;){for(currentQueue=queue,queue=[];++queueIndex<len;)currentQueue&&currentQueue[queueIndex].run();queueIndex=-1,len=queue.length}currentQueue=null,draining=!1,runClearTimeout(timeout)}}function Item(fun,array){this.fun=fun,this.array=array}function noop(){}var cachedSetTimeout,cachedClearTimeout,process=module.exports={};!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var currentQueue,queue=[],draining=!1,queueIndex=-1;process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)args[i-1]=arguments[i];queue.push(new Item(fun,args)),1!==queue.length||draining||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={},process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.prependListener=noop,process.prependOnceListener=noop,process.listeners=function(name){return[]},process.binding=function(name){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(dir){throw new Error("process.chdir is not supported")},process.umask=function(){return 0}},function(module,exports,__webpack_require__){function CipherBase(hashMode){Transform.call(this),this.hashMode="string"==typeof hashMode,this.hashMode?this[hashMode]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}var Buffer=__webpack_require__(1).Buffer,Transform=__webpack_require__(29).Transform,StringDecoder=__webpack_require__(33).StringDecoder;__webpack_require__(2)(CipherBase,Transform),CipherBase.prototype.update=function(data,inputEnc,outputEnc){"string"==typeof data&&(data=Buffer.from(data,inputEnc));var outData=this._update(data);return this.hashMode?this:(outputEnc&&(outData=this._toString(outData,outputEnc)),outData)},CipherBase.prototype.setAutoPadding=function(){},CipherBase.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},CipherBase.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},CipherBase.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},CipherBase.prototype._transform=function(data,_,next){var err;try{this.hashMode?this._update(data):this.push(this._update(data))}catch(e){err=e}finally{next(err)}},CipherBase.prototype._flush=function(done){var err;try{this.push(this.__final())}catch(e){err=e}done(err)},CipherBase.prototype._finalOrDigest=function(outputEnc){var outData=this.__final()||Buffer.alloc(0);return outputEnc&&(outData=this._toString(outData,outputEnc,!0)),outData},CipherBase.prototype._toString=function(value,enc,fin){if(this._decoder||(this._decoder=new StringDecoder(enc),this._encoding=enc),this._encoding!==enc)throw new Error("can't switch encodings");var out=this._decoder.write(value);return fin&&(out+=this._decoder.end()),out},module.exports=CipherBase},function(module,exports,__webpack_require__){"use strict";function Duplex(options){if(!(this instanceof Duplex))return new Duplex(options);Readable.call(this,options),Writable.call(this,options),options&&!1===options.readable&&(this.readable=!1),options&&!1===options.writable&&(this.writable=!1),this.allowHalfOpen=!0,options&&!1===options.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",onend)}function onend(){this.allowHalfOpen||this._writableState.ended||processNextTick(onEndNT,this)}function onEndNT(self){self.end()}var processNextTick=__webpack_require__(17),objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys};module.exports=Duplex;var util=__webpack_require__(13);util.inherits=__webpack_require__(2);var Readable=__webpack_require__(57),Writable=__webpack_require__(32);util.inherits(Duplex,Readable);for(var keys=objectKeys(Writable.prototype),v=0;v<keys.length;v++){var method=keys[v];Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method])}Object.defineProperty(Duplex.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(value){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=value,this._writableState.destroyed=value)}}),Duplex.prototype._destroy=function(err,cb){this.push(null),this.end(),processNextTick(cb,err)}},function(module,exports,__webpack_require__){var asn1=exports;asn1.bignum=__webpack_require__(181),asn1.define=__webpack_require__(183).define,asn1.base=__webpack_require__(14),asn1.constants=__webpack_require__(69),asn1.decoders=__webpack_require__(190),asn1.encoders=__webpack_require__(192)},function(module,exports,__webpack_require__){(function(Buffer){function Hash(blockSize,finalSize){this._block=new Buffer(blockSize),this._finalSize=finalSize,this._blockSize=blockSize,this._len=0,this._s=0}Hash.prototype.update=function(data,enc){"string"==typeof data&&(data=new Buffer(data,enc=enc||"utf8"));for(var l=this._len+=data.length,s=this._s||0,f=0,buffer=this._block;s<l;){for(var ch=Math.min(data.length,f+this._blockSize-s%this._blockSize)-f,i=0;i<ch;i++)buffer[s%this._blockSize+i]=data[i+f];f+=ch,(s+=ch)%this._blockSize==0&&this._update(buffer)}return this._s=s,this},Hash.prototype.digest=function(enc){var l=8*this._len;this._block[this._len%this._blockSize]=128,this._block.fill(0,this._len%this._blockSize+1),l%(8*this._blockSize)>=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(l,this._blockSize-4);var hash=this._update(this._block)||this._hash();return enc?hash.toString(enc):hash},Hash.prototype._update=function(){throw new Error("_update must be implemented by subclass")},module.exports=Hash}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";module.exports=function(op,done){function sink(_read){if(read=_read,abort)return sink.abort();!function next(){for(var loop=!0,cbed=!1;loop;)if(cbed=!1,read(null,function(end,data){if(cbed=!0,end=end||abort){if(loop=!1,done)done(!0===end?null:end);else if(end&&!0!==end)throw end}else op&&!1===op(data)||abort?(loop=!1,read(abort||!0,done||function(){})):loop||next()}),!cbed)return void(loop=!1)}()}var read,abort;return sink.abort=function(err,cb){if("function"==typeof err&&(cb=err,err=!0),abort=err||!0,read)return read(abort,cb||function(){})},sink}},function(module,exports){module.exports=function(key){return key&&("string"==typeof key?function(data){return data[key]}:"object"==typeof key&&"function"==typeof key.exec?function(data){var v=key.exec(data);return v&&v[0]}:key)}},function(module,exports,__webpack_require__){(function(Buffer){module.exports=function(a,b){for(var length=Math.min(a.length,b.length),buffer=new Buffer(length),i=0;i<length;++i)buffer[i]=a[i]^b[i];return buffer}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){(function(Buffer){function objectToString(o){return Object.prototype.toString.call(o)}exports.isArray=function(arg){return Array.isArray?Array.isArray(arg):"[object Array]"===objectToString(arg)},exports.isBoolean=function(arg){return"boolean"==typeof arg},exports.isNull=function(arg){return null===arg},exports.isNullOrUndefined=function(arg){return null==arg},exports.isNumber=function(arg){return"number"==typeof arg},exports.isString=function(arg){return"string"==typeof arg},exports.isSymbol=function(arg){return"symbol"==typeof arg},exports.isUndefined=function(arg){return void 0===arg},exports.isRegExp=function(re){return"[object RegExp]"===objectToString(re)},exports.isObject=function(arg){return"object"==typeof arg&&null!==arg},exports.isDate=function(d){return"[object Date]"===objectToString(d)},exports.isError=function(e){return"[object Error]"===objectToString(e)||e instanceof Error},exports.isFunction=function(arg){return"function"==typeof arg},exports.isPrimitive=function(arg){return null===arg||"boolean"==typeof arg||"number"==typeof arg||"string"==typeof arg||"symbol"==typeof arg||void 0===arg},exports.isBuffer=Buffer.isBuffer}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){var base=exports;base.Reporter=__webpack_require__(186).Reporter,base.DecoderBuffer=__webpack_require__(68).DecoderBuffer,base.EncoderBuffer=__webpack_require__(68).EncoderBuffer,base.Node=__webpack_require__(187)},function(module,exports,__webpack_require__){(function(setImmediate,process){function nodeify(promise,cb){return"function"!=typeof cb?promise:promise.then(function(res){nextTick(function(){cb(null,res)})},function(err){nextTick(function(){cb(err)})})}function nodeifyThis(cb){return nodeify(this,cb)}function extend(prom){if(prom&&isPromise(prom)){prom.nodeify=nodeifyThis;var then=prom.then;return prom.then=function(){return extend(then.apply(this,arguments))},prom}"function"==typeof prom?prom.prototype.nodeify=nodeifyThis:Promise.prototype.nodeify=nodeifyThis}function NodeifyPromise(fn){if(!(this instanceof NodeifyPromise))return new NodeifyPromise(fn);Promise.call(this,fn),extend(this)}var nextTick,Promise=__webpack_require__(137),isPromise=__webpack_require__(52);nextTick="function"==typeof setImmediate?setImmediate:"object"==typeof process&&process&&process.nextTick?process.nextTick:function(cb){setTimeout(cb,0)},module.exports=nodeify,nodeify.extend=extend,nodeify.Promise=NodeifyPromise,NodeifyPromise.prototype=Object.create(Promise.prototype),NodeifyPromise.prototype.constructor=NodeifyPromise}).call(exports,__webpack_require__(27).setImmediate,__webpack_require__(5))},function(module,exports,__webpack_require__){function asUInt32Array(buf){Buffer.isBuffer(buf)||(buf=Buffer.from(buf));for(var len=buf.length/4|0,out=new Array(len),i=0;i<len;i++)out[i]=buf.readUInt32BE(4*i);return out}function scrubVec(v){for(;0<v.length;v++)v[0]=0}function cryptBlock(M,keySchedule,SUB_MIX,SBOX,nRounds){for(var t0,t1,t2,t3,SUB_MIX0=SUB_MIX[0],SUB_MIX1=SUB_MIX[1],SUB_MIX2=SUB_MIX[2],SUB_MIX3=SUB_MIX[3],s0=M[0]^keySchedule[0],s1=M[1]^keySchedule[1],s2=M[2]^keySchedule[2],s3=M[3]^keySchedule[3],ksRow=4,round=1;round<nRounds;round++)t0=SUB_MIX0[s0>>>24]^SUB_MIX1[s1>>>16&255]^SUB_MIX2[s2>>>8&255]^SUB_MIX3[255&s3]^keySchedule[ksRow++],t1=SUB_MIX0[s1>>>24]^SUB_MIX1[s2>>>16&255]^SUB_MIX2[s3>>>8&255]^SUB_MIX3[255&s0]^keySchedule[ksRow++],t2=SUB_MIX0[s2>>>24]^SUB_MIX1[s3>>>16&255]^SUB_MIX2[s0>>>8&255]^SUB_MIX3[255&s1]^keySchedule[ksRow++],t3=SUB_MIX0[s3>>>24]^SUB_MIX1[s0>>>16&255]^SUB_MIX2[s1>>>8&255]^SUB_MIX3[255&s2]^keySchedule[ksRow++],s0=t0,s1=t1,s2=t2,s3=t3;return t0=(SBOX[s0>>>24]<<24|SBOX[s1>>>16&255]<<16|SBOX[s2>>>8&255]<<8|SBOX[255&s3])^keySchedule[ksRow++],t1=(SBOX[s1>>>24]<<24|SBOX[s2>>>16&255]<<16|SBOX[s3>>>8&255]<<8|SBOX[255&s0])^keySchedule[ksRow++],t2=(SBOX[s2>>>24]<<24|SBOX[s3>>>16&255]<<16|SBOX[s0>>>8&255]<<8|SBOX[255&s1])^keySchedule[ksRow++],t3=(SBOX[s3>>>24]<<24|SBOX[s0>>>16&255]<<16|SBOX[s1>>>8&255]<<8|SBOX[255&s2])^keySchedule[ksRow++],t0>>>=0,t1>>>=0,t2>>>=0,t3>>>=0,[t0,t1,t2,t3]}function AES(key){this._key=asUInt32Array(key),this._reset()}var Buffer=__webpack_require__(1).Buffer,RCON=[0,1,2,4,8,16,32,64,128,27,54],G=function(){for(var d=new Array(256),j=0;j<256;j++)d[j]=j<128?j<<1:j<<1^283;for(var SBOX=[],INV_SBOX=[],SUB_MIX=[[],[],[],[]],INV_SUB_MIX=[[],[],[],[]],x=0,xi=0,i=0;i<256;++i){var sx=xi^xi<<1^xi<<2^xi<<3^xi<<4;sx=sx>>>8^255&sx^99,SBOX[x]=sx,INV_SBOX[sx]=x;var x2=d[x],x4=d[x2],x8=d[x4],t=257*d[sx]^16843008*sx;SUB_MIX[0][x]=t<<24|t>>>8,SUB_MIX[1][x]=t<<16|t>>>16,SUB_MIX[2][x]=t<<8|t>>>24,SUB_MIX[3][x]=t,t=16843009*x8^65537*x4^257*x2^16843008*x,INV_SUB_MIX[0][sx]=t<<24|t>>>8,INV_SUB_MIX[1][sx]=t<<16|t>>>16,INV_SUB_MIX[2][sx]=t<<8|t>>>24,INV_SUB_MIX[3][sx]=t,0===x?x=xi=1:(x=x2^d[d[d[x8^x2]]],xi^=d[d[xi]])}return{SBOX:SBOX,INV_SBOX:INV_SBOX,SUB_MIX:SUB_MIX,INV_SUB_MIX:INV_SUB_MIX}}();AES.blockSize=16,AES.keySize=32,AES.prototype.blockSize=AES.blockSize,AES.prototype.keySize=AES.keySize,AES.prototype._reset=function(){for(var keyWords=this._key,keySize=keyWords.length,nRounds=keySize+6,ksRows=4*(nRounds+1),keySchedule=[],k=0;k<keySize;k++)keySchedule[k]=keyWords[k];for(k=keySize;k<ksRows;k++){var t=keySchedule[k-1];k%keySize==0?(t=t<<8|t>>>24,t=G.SBOX[t>>>24]<<24|G.SBOX[t>>>16&255]<<16|G.SBOX[t>>>8&255]<<8|G.SBOX[255&t],t^=RCON[k/keySize|0]<<24):keySize>6&&k%keySize==4&&(t=G.SBOX[t>>>24]<<24|G.SBOX[t>>>16&255]<<16|G.SBOX[t>>>8&255]<<8|G.SBOX[255&t]),keySchedule[k]=keySchedule[k-keySize]^t}for(var invKeySchedule=[],ik=0;ik<ksRows;ik++){var ksR=ksRows-ik,tt=keySchedule[ksR-(ik%4?0:4)];invKeySchedule[ik]=ik<4||ksR<=4?tt:G.INV_SUB_MIX[0][G.SBOX[tt>>>24]]^G.INV_SUB_MIX[1][G.SBOX[tt>>>16&255]]^G.INV_SUB_MIX[2][G.SBOX[tt>>>8&255]]^G.INV_SUB_MIX[3][G.SBOX[255&tt]]}this._nRounds=nRounds,this._keySchedule=keySchedule,this._invKeySchedule=invKeySchedule},AES.prototype.encryptBlockRaw=function(M){return M=asUInt32Array(M),cryptBlock(M,this._keySchedule,G.SUB_MIX,G.SBOX,this._nRounds)},AES.prototype.encryptBlock=function(M){var out=this.encryptBlockRaw(M),buf=Buffer.allocUnsafe(16);return buf.writeUInt32BE(out[0],0),buf.writeUInt32BE(out[1],4),buf.writeUInt32BE(out[2],8),buf.writeUInt32BE(out[3],12),buf},AES.prototype.decryptBlock=function(M){var m1=(M=asUInt32Array(M))[1];M[1]=M[3],M[3]=m1;var out=cryptBlock(M,this._invKeySchedule,G.INV_SUB_MIX,G.INV_SBOX,this._nRounds),buf=Buffer.allocUnsafe(16);return buf.writeUInt32BE(out[0],0),buf.writeUInt32BE(out[3],4),buf.writeUInt32BE(out[2],8),buf.writeUInt32BE(out[1],12),buf},AES.prototype.scrub=function(){scrubVec(this._keySchedule),scrubVec(this._invKeySchedule),scrubVec(this._key)},module.exports.AES=AES},function(module,exports,__webpack_require__){"use strict";(function(process){!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?module.exports=function(fn,arg1,arg2,arg3){if("function"!=typeof fn)throw new TypeError('"callback" argument must be a function');var args,i,len=arguments.length;switch(len){case 0:case 1:return process.nextTick(fn);case 2:return process.nextTick(function(){fn.call(null,arg1)});case 3:return process.nextTick(function(){fn.call(null,arg1,arg2)});case 4:return process.nextTick(function(){fn.call(null,arg1,arg2,arg3)});default:for(args=new Array(len-1),i=0;i<args.length;)args[i++]=arguments[i];return process.nextTick(function(){fn.apply(null,args)})}}:module.exports=process.nextTick}).call(exports,__webpack_require__(5))},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function Multihashing(buf,func,length,callback){if("function"==typeof length&&(callback=length,length=void 0),!callback)throw new Error("Missing callback");Multihashing.digest(buf,func,length,(err,digest)=>{if(err)return callback(err);callback(null,multihash.encode(digest,func,length))})}const multihash=__webpack_require__(50),crypto=__webpack_require__(171);module.exports=Multihashing,Multihashing.Buffer=Buffer,Multihashing.multihash=multihash,Multihashing.digest=function(buf,func,length,callback){if("function"==typeof length&&(callback=length,length=void 0),!callback)throw new Error("Missing callback");let cb=callback;length&&(cb=((err,digest)=>{if(err)return callback(err);callback(null,digest.slice(0,length))}));let hash;try{hash=Multihashing.createHash(func)}catch(err){return cb(err)}hash(buf,cb)},Multihashing.createHash=function(func){if(func=multihash.coerceCode(func),!Multihashing.functions[func])throw new Error("multihash function "+func+" not yet supported");return Multihashing.functions[func]},Multihashing.functions={17:crypto.sha1,18:crypto.sha2256,19:crypto.sha2512,20:crypto.sha3512,21:crypto.sha3384,22:crypto.sha3256,23:crypto.sha3224,24:crypto.shake128,25:crypto.shake256,26:crypto.keccak224,27:crypto.keccak256,28:crypto.keccak384,29:crypto.keccak512,34:crypto.murmur3128,35:crypto.murmur332},crypto.addBlake(Multihashing.functions)}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(arrayLike,start){start|=0;for(var newLen=Math.max(arrayLike.length-start,0),newArr=Array(newLen),idx=0;idx<newLen;idx++)newArr[idx]=arrayLike[start+idx];return newArr},module.exports=exports.default},function(module,exports){module.exports=function(module){return module.webpackPolyfill||(module.deprecate=function(){},module.paths=[],module.children||(module.children=[]),Object.defineProperty(module,"loaded",{enumerable:!0,get:function(){return module.l}}),Object.defineProperty(module,"id",{enumerable:!0,get:function(){return module.i}}),module.webpackPolyfill=1),module}},function(module,exports,__webpack_require__){"use strict";function BN(){this.negative=0,this.words=null,this.length=0}var Buffer=__webpack_require__(1).Buffer,optimized=__webpack_require__(217);BN.fromNumber=function(n){var bn=new BN;return bn.words=[67108863&n],bn.length=1,bn},BN.fromBuffer=function(b32){var bn=new BN;return bn.words=new Array(10),bn.words[0]=(3&b32[28])<<24|b32[29]<<16|b32[30]<<8|b32[31],bn.words[1]=(15&b32[25])<<22|b32[26]<<14|b32[27]<<6|b32[28]>>>2,bn.words[2]=(63&b32[22])<<20|b32[23]<<12|b32[24]<<4|b32[25]>>>4,bn.words[3]=(255&b32[19])<<18|b32[20]<<10|b32[21]<<2|b32[22]>>>6,bn.words[4]=(3&b32[15])<<24|b32[16]<<16|b32[17]<<8|b32[18],bn.words[5]=(15&b32[12])<<22|b32[13]<<14|b32[14]<<6|b32[15]>>>2,bn.words[6]=(63&b32[9])<<20|b32[10]<<12|b32[11]<<4|b32[12]>>>4,bn.words[7]=(255&b32[6])<<18|b32[7]<<10|b32[8]<<2|b32[9]>>>6,bn.words[8]=(3&b32[2])<<24|b32[3]<<16|b32[4]<<8|b32[5],bn.words[9]=b32[0]<<14|b32[1]<<6|b32[2]>>>2,bn.length=10,bn.strip()},BN.prototype.toBuffer=function(){for(var w=this.words,i=this.length;i<10;++i)w[i]=0;return Buffer.from([w[9]>>>14&255,w[9]>>>6&255,(63&w[9])<<2|w[8]>>>24&3,w[8]>>>16&255,w[8]>>>8&255,255&w[8],w[7]>>>18&255,w[7]>>>10&255,w[7]>>>2&255,(3&w[7])<<6|w[6]>>>20&63,w[6]>>>12&255,w[6]>>>4&255,(15&w[6])<<4|w[5]>>>22&15,w[5]>>>14&255,w[5]>>>6&255,(63&w[5])<<2|w[4]>>>24&3,w[4]>>>16&255,w[4]>>>8&255,255&w[4],w[3]>>>18&255,w[3]>>>10&255,w[3]>>>2&255,(3&w[3])<<6|w[2]>>>20&63,w[2]>>>12&255,w[2]>>>4&255,(15&w[2])<<4|w[1]>>>22&15,w[1]>>>14&255,w[1]>>>6&255,(63&w[1])<<2|w[0]>>>24&3,w[0]>>>16&255,w[0]>>>8&255,255&w[0]])},BN.prototype.clone=function(){var r=new BN;r.words=new Array(this.length);for(var i=0;i<this.length;i++)r.words[i]=this.words[i];return r.length=this.length,r.negative=this.negative,r},BN.prototype.strip=function(){for(;this.length>1&&0==(0|this.words[this.length-1]);)this.length--;return this},BN.prototype.normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},BN.prototype.isEven=function(){return 0==(1&this.words[0])},BN.prototype.isOdd=function(){return 1==(1&this.words[0])},BN.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},BN.prototype.ucmp=function(num){if(this.length!==num.length)return this.length>num.length?1:-1;for(var i=this.length-1;i>=0;--i)if(this.words[i]!==num.words[i])return this.words[i]>num.words[i]?1:-1;return 0},BN.prototype.gtOne=function(){return this.length>1||this.words[0]>1},BN.prototype.isOverflow=function(){return this.ucmp(BN.n)>=0},BN.prototype.isHigh=function(){return 1===this.ucmp(BN.nh)},BN.prototype.bitLengthGT256=function(){return this.length>10||10===this.length&&this.words[9]>4194303},BN.prototype.iuaddn=function(num){this.words[0]+=num;for(var i=0;this.words[i]>67108863&&i<this.length;++i)this.words[i]-=67108864,this.words[i+1]+=1;return i===this.length&&(this.words[i]=1,this.length+=1),this},BN.prototype.iadd=function(num){if(this.negative!==num.negative)return 0!==this.negative?(this.negative=0,this.isub(num),this.negative^=1):(num.negative=0,this.isub(num),num.negative=1),this.normSign();var a,b;this.length>num.length?(a=this,b=num):(a=num,b=this);for(var i=0,carry=0;i<b.length;++i){var word=a.words[i]+b.words[i]+carry;this.words[i]=67108863&word,carry=word>>>26}for(;0!==carry&&i<a.length;++i)word=a.words[i]+carry,this.words[i]=67108863&word,carry=word>>>26;if(this.length=a.length,0!==carry)this.words[this.length++]=carry;else if(a!==this)for(;i<a.length;++i)this.words[i]=a.words[i];return this},BN.prototype.add=function(num){return this.clone().iadd(num)},BN.prototype.isub=function(num){if(this.negative!==num.negative)return 0!==this.negative?(this.negative=0,this.iadd(num),this.negative=1):(num.negative=0,this.iadd(num),num.negative=1),this.normSign();var cmp=this.ucmp(num);if(0===cmp)return this.negative=0,this.words[0]=0,this.length=1,this;var a,b;cmp>0?(a=this,b=num):(a=num,b=this);for(var i=0,carry=0;i<b.length;++i){var word=a.words[i]-b.words[i]+carry;carry=word>>26,this.words[i]=67108863&word}for(;0!==carry&&i<a.length;++i)carry=(word=a.words[i]+carry)>>26,this.words[i]=67108863&word;if(0===carry&&i<a.length&&a!==this)for(;i<a.length;++i)this.words[i]=a.words[i];return this.length=Math.max(this.length,i),a!==this&&(this.negative^=1),this.strip().normSign()},BN.prototype.sub=function(num){return this.clone().isub(num)},BN.umulTo=function(num1,num2,out){out.length=num1.length+num2.length-1;var r1=num1.words[0]*num2.words[0],carry=r1/67108864|0;out.words[0]=67108863&r1;for(var k=1,maxK=out.length;k<maxK;k++){for(var ncarry=carry>>>26,rword=67108863&carry,j=Math.max(0,k-num1.length+1),maxJ=Math.min(k,num2.length-1);j<=maxJ;j++){var i=k-j,r=num1.words[i]*num2.words[j]+rword;ncarry+=r/67108864|0,rword=67108863&r}out.words[k]=rword,carry=ncarry}return 0!==carry&&(out.words[out.length++]=carry),out.strip()},BN.umulTo10x10=Math.imul?optimized.umulTo10x10:BN.umulTo,BN.umulnTo=function(num,k,out){if(0===k)return out.words=[0],out.length=1,out;for(var i=0,carry=0;i<num.length;++i){var r=num.words[i]*k+carry;out.words[i]=67108863&r,carry=r/67108864|0}return carry>0?(out.words[i]=carry,out.length=num.length+1):out.length=num.length,out},BN.prototype.umul=function(num){var out=new BN;return out.words=new Array(this.length+num.length),10===this.length&&10===num.length?BN.umulTo10x10(this,num,out):1===this.length?BN.umulnTo(num,this.words[0],out):1===num.length?BN.umulnTo(this,num.words[0],out):BN.umulTo(this,num,out)},BN.prototype.isplit=function(output){output.length=Math.min(this.length,9);for(var i=0;i<output.length;++i)output.words[i]=this.words[i];if(this.length<=9)return this.words[0]=0,this.length=1,this;var prev=this.words[9];for(output.words[output.length++]=4194303&prev,i=10;i<this.length;++i){var word=this.words[i];this.words[i-10]=(4194303&word)<<4|prev>>>22,prev=word}return prev>>>=22,this.words[i-10]=prev,0===prev&&this.length>10?this.length-=10:this.length-=9,this},BN.prototype.fireduce=function(){return this.isOverflow()&&this.isub(BN.n),this},BN.prototype.ureduce=function(){var num=this.clone().isplit(BN.tmp).umul(BN.nc).iadd(BN.tmp);return num.bitLengthGT256()&&(num=num.isplit(BN.tmp).umul(BN.nc).iadd(BN.tmp)).bitLengthGT256()&&(num=num.isplit(BN.tmp).umul(BN.nc).iadd(BN.tmp)),num.fireduce()},BN.prototype.ishrn=function(n){for(var mask=(1<<n)-1,m=26-n,i=this.length-1,carry=0;i>=0;--i){var word=this.words[i];this.words[i]=carry<<m|word>>>n,carry=word&mask}return this.length>1&&0===this.words[this.length-1]&&(this.length-=1),this},BN.prototype.uinvm=function(){for(var x=this.clone(),y=BN.n.clone(),A=BN.fromNumber(1),B=BN.fromNumber(0),C=BN.fromNumber(0),D=BN.fromNumber(1);x.isEven()&&y.isEven();){for(var k=1,m=1;0==(x.words[0]&m)&&0==(y.words[0]&m)&&k<26;++k,m<<=1);x.ishrn(k),y.ishrn(k)}for(var yp=y.clone(),xp=x.clone();!x.isZero();){for(var i=0,im=1;0==(x.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(x.ishrn(i);i-- >0;)(A.isOdd()||B.isOdd())&&(A.iadd(yp),B.isub(xp)),A.ishrn(1),B.ishrn(1);for(var j=0,jm=1;0==(y.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(y.ishrn(j);j-- >0;)(C.isOdd()||D.isOdd())&&(C.iadd(yp),D.isub(xp)),C.ishrn(1),D.ishrn(1);x.ucmp(y)>=0?(x.isub(y),A.isub(C),B.isub(D)):(y.isub(x),C.isub(A),D.isub(B))}if(1===C.negative){C.negative=0;var result=C.ureduce();return result.negative^=1,result.normSign().iadd(BN.n)}return C.ureduce()},BN.prototype.imulK=function(){this.words[this.length]=0,this.words[this.length+1]=0,this.length+=2;for(var i=0,lo=0;i<this.length;++i){var w=0|this.words[i];lo+=977*w,this.words[i]=67108863&lo,lo=64*w+(lo/67108864|0)}return 0===this.words[this.length-1]&&(this.length-=1,0===this.words[this.length-1]&&(this.length-=1)),this},BN.prototype.redIReduce=function(){this.isplit(BN.tmp).imulK().iadd(BN.tmp),this.bitLengthGT256()&&this.isplit(BN.tmp).imulK().iadd(BN.tmp);var cmp=this.ucmp(BN.p);return 0===cmp?(this.words[0]=0,this.length=1):cmp>0?this.isub(BN.p):this.strip(),this},BN.prototype.redNeg=function(){return this.isZero()?BN.fromNumber(0):BN.p.sub(this)},BN.prototype.redAdd=function(num){return this.clone().redIAdd(num)},BN.prototype.redIAdd=function(num){return this.iadd(num),this.ucmp(BN.p)>=0&&this.isub(BN.p),this},BN.prototype.redIAdd7=function(){return this.iuaddn(7),this.ucmp(BN.p)>=0&&this.isub(BN.p),this},BN.prototype.redSub=function(num){return this.clone().redISub(num)},BN.prototype.redISub=function(num){return this.isub(num),0!==this.negative&&this.iadd(BN.p),this},BN.prototype.redMul=function(num){return this.umul(num).redIReduce()},BN.prototype.redSqr=function(){return this.umul(this).redIReduce()},BN.prototype.redSqrt=function(){if(this.isZero())return this.clone();for(var wv2=this.redSqr(),wv4=wv2.redSqr(),wv12=wv4.redSqr().redMul(wv4),wv14=wv12.redMul(wv2),wv15=wv14.redMul(this),out=wv15,i=0;i<54;++i)out=out.redSqr().redSqr().redSqr().redSqr().redMul(wv15);for(out=out.redSqr().redSqr().redSqr().redSqr().redMul(wv14),i=0;i<5;++i)out=out.redSqr().redSqr().redSqr().redSqr().redMul(wv15);return out=out.redSqr().redSqr().redSqr().redSqr().redMul(wv12),0===(out=out.redSqr().redSqr().redSqr().redSqr().redSqr().redSqr().redMul(wv12)).redSqr().ucmp(this)?out:null},BN.prototype.redInvm=function(){for(var a=this.clone(),b=BN.p.clone(),x1=BN.fromNumber(1),x2=BN.fromNumber(0);a.gtOne()&&b.gtOne();){for(var i=0,im=1;0==(a.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(a.ishrn(i);i-- >0;)x1.isOdd()&&x1.iadd(BN.p),x1.ishrn(1);for(var j=0,jm=1;0==(b.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(b.ishrn(j);j-- >0;)x2.isOdd()&&x2.iadd(BN.p),x2.ishrn(1);a.ucmp(b)>=0?(a.isub(b),x1.isub(x2)):(b.isub(a),x2.isub(x1))}var res;return 0!==(res=1===a.length&&1===a.words[0]?x1:x2).negative&&res.iadd(BN.p),0!==res.negative?(res.negative=0,res.redIReduce().redNeg()):res.redIReduce()},BN.prototype.getNAF=function(w){for(var naf=[],ws=1<<w+1,wsm1=ws-1,ws2=ws>>1,k=this.clone();!k.isZero();){for(var i=0,m=1;0==(k.words[0]&m)&&i<26;++i,m<<=1)naf.push(0);if(0!==i)k.ishrn(i);else{var mod=k.words[0]&wsm1;if(mod>=ws2)naf.push(ws2-mod),k.iuaddn(mod-ws2).ishrn(1);else if(naf.push(mod),k.words[0]-=mod,!k.isZero()){for(i=w-1;i>0;--i)naf.push(0);k.ishrn(w)}}}return naf},BN.prototype.inspect=function(){if(this.isZero())return"0";for(var buffer=this.toBuffer().toString("hex"),i=0;"0"===buffer[i];++i);return buffer.slice(i)},BN.n=BN.fromBuffer(Buffer.from("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141","hex")),BN.nh=BN.n.clone().ishrn(1),BN.nc=BN.fromBuffer(Buffer.from("000000000000000000000000000000014551231950B75FC4402DA1732FC9BEBF","hex")),BN.p=BN.fromBuffer(Buffer.from("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F","hex")),BN.psn=BN.p.sub(BN.n),(BN.tmp=new BN).words=new Array(10),BN.fromNumber(1).words[3]=0,module.exports=BN},function(module,exports,__webpack_require__){"use strict";var abortCb=__webpack_require__(41);module.exports=function(array,onAbort){if(!array)return function(abort,cb){return abort?abortCb(cb,abort,onAbort):cb(!0)};Array.isArray(array)||(array=Object.keys(array).map(function(k){return array[k]}));var i=0;return function(abort,cb){if(abort)return abortCb(cb,abort,onAbort);i>=array.length?cb(!0):cb(null,array[i++])}}},function(module,exports,__webpack_require__){"use strict";var drain=__webpack_require__(10);module.exports=function(reducer,acc,cb){cb||(cb=acc,acc=null);var sink=drain(function(data){acc=reducer(acc,data)},function(err){cb(err,acc)});return 2===arguments.length?function(source){source(null,function(end,data){if(end)return cb(!0===end?null:end);acc=data,sink(source)})}:sink}},function(module,exports,__webpack_require__){"use strict";var tester=__webpack_require__(43);module.exports=function(test){return test=tester(test),function(read){return function next(end,cb){for(var sync,loop=!0;loop;)loop=!1,sync=!0,read(end,function(end,data){if(!end&&!test(data))return sync?loop=!0:next(end,cb);cb(end,data)}),sync=!1}}}},function(module,exports,__webpack_require__){"use strict";exports.defined=function(val){return null!==val&&void 0!==val&&("number"!=typeof val||!isNaN(val))}},function(module,exports,__webpack_require__){var basex=__webpack_require__(133);module.exports=basex("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(module,exports,__webpack_require__){function Timeout(id,clearFn){this._id=id,this._clearFn=clearFn}var apply=Function.prototype.apply;exports.setTimeout=function(){return new Timeout(apply.call(setTimeout,window,arguments),clearTimeout)},exports.setInterval=function(){return new Timeout(apply.call(setInterval,window,arguments),clearInterval)},exports.clearTimeout=exports.clearInterval=function(timeout){timeout&&timeout.close()},Timeout.prototype.unref=Timeout.prototype.ref=function(){},Timeout.prototype.close=function(){this._clearFn.call(window,this._id)},exports.enroll=function(item,msecs){clearTimeout(item._idleTimeoutId),item._idleTimeout=msecs},exports.unenroll=function(item){clearTimeout(item._idleTimeoutId),item._idleTimeout=-1},exports._unrefActive=exports.active=function(item){clearTimeout(item._idleTimeoutId);var msecs=item._idleTimeout;msecs>=0&&(item._idleTimeoutId=setTimeout(function(){item._onTimeout&&item._onTimeout()},msecs))},__webpack_require__(136),exports.setImmediate=setImmediate,exports.clearImmediate=clearImmediate},function(module,exports,__webpack_require__){"use strict";module.exports=(()=>{if("undefined"!=typeof self&&(__webpack_require__(138)(self),self.crypto))return self.crypto;throw new Error("Please use an environment with crypto support")})},function(module,exports,__webpack_require__){function Stream(){EE.call(this)}module.exports=Stream;var EE=__webpack_require__(30).EventEmitter;__webpack_require__(2)(Stream,EE),Stream.Readable=__webpack_require__(31),Stream.Writable=__webpack_require__(154),Stream.Duplex=__webpack_require__(155),Stream.Transform=__webpack_require__(156),Stream.PassThrough=__webpack_require__(157),Stream.Stream=Stream,Stream.prototype.pipe=function(dest,options){function ondata(chunk){dest.writable&&!1===dest.write(chunk)&&source.pause&&source.pause()}function ondrain(){source.readable&&source.resume&&source.resume()}function onend(){didOnEnd||(didOnEnd=!0,dest.end())}function onclose(){didOnEnd||(didOnEnd=!0,"function"==typeof dest.destroy&&dest.destroy())}function onerror(er){if(cleanup(),0===EE.listenerCount(this,"error"))throw er}function cleanup(){source.removeListener("data",ondata),dest.removeListener("drain",ondrain),source.removeListener("end",onend),source.removeListener("close",onclose),source.removeListener("error",onerror),dest.removeListener("error",onerror),source.removeListener("end",cleanup),source.removeListener("close",cleanup),dest.removeListener("close",cleanup)}var source=this;source.on("data",ondata),dest.on("drain",ondrain),dest._isStdio||options&&!1===options.end||(source.on("end",onend),source.on("close",onclose));var didOnEnd=!1;return source.on("error",onerror),dest.on("error",onerror),source.on("end",cleanup),source.on("close",cleanup),dest.on("close",cleanup),dest.emit("pipe",source),dest}},function(module,exports){function EventEmitter(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function isFunction(arg){return"function"==typeof arg}function isNumber(arg){return"number"==typeof arg}function isObject(arg){return"object"==typeof arg&&null!==arg}function isUndefined(arg){return void 0===arg}module.exports=EventEmitter,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._maxListeners=void 0,EventEmitter.defaultMaxListeners=10,EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||n<0||isNaN(n))throw TypeError("n must be a positive number");return this._maxListeners=n,this},EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(this._events||(this._events={}),"error"===type&&(!this._events.error||isObject(this._events.error)&&!this._events.error.length)){if((er=arguments[1])instanceof Error)throw er;var err=new Error('Uncaught, unspecified "error" event. ('+er+")");throw err.context=er,err}if(handler=this._events[type],isUndefined(handler))return!1;if(isFunction(handler))switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:args=Array.prototype.slice.call(arguments,1),handler.apply(this,args)}else if(isObject(handler))for(args=Array.prototype.slice.call(arguments,1),len=(listeners=handler.slice()).length,i=0;i<len;i++)listeners[i].apply(this,args);return!0},EventEmitter.prototype.addListener=function(type,listener){var m;if(!isFunction(listener))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",type,isFunction(listener.listener)?listener.listener:listener),this._events[type]?isObject(this._events[type])?this._events[type].push(listener):this._events[type]=[this._events[type],listener]:this._events[type]=listener,isObject(this._events[type])&&!this._events[type].warned&&(m=isUndefined(this._maxListeners)?EventEmitter.defaultMaxListeners:this._maxListeners)&&m>0&&this._events[type].length>m&&(this._events[type].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[type].length),"function"==typeof console.trace&&console.trace()),this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function(type,listener){function g(){this.removeListener(type,g),fired||(fired=!0,listener.apply(this,arguments))}if(!isFunction(listener))throw TypeError("listener must be a function");var fired=!1;return g.listener=listener,this.on(type,g),this},EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;if(list=this._events[type],length=list.length,position=-1,list===listener||isFunction(list.listener)&&list.listener===listener)delete this._events[type],this._events.removeListener&&this.emit("removeListener",type,listener);else if(isObject(list)){for(i=length;i-- >0;)if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}if(position<0)return this;1===list.length?(list.length=0,delete this._events[type]):list.splice(position,1),this._events.removeListener&&this.emit("removeListener",type,listener)}return this},EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[type]&&delete this._events[type],this;if(0===arguments.length){for(key in this._events)"removeListener"!==key&&this.removeAllListeners(key);return this.removeAllListeners("removeListener"),this._events={},this}if(listeners=this._events[type],isFunction(listeners))this.removeListener(type,listeners);else if(listeners)for(;listeners.length;)this.removeListener(type,listeners[listeners.length-1]);return delete this._events[type],this},EventEmitter.prototype.listeners=function(type){return this._events&&this._events[type]?isFunction(this._events[type])?[this._events[type]]:this._events[type].slice():[]},EventEmitter.prototype.listenerCount=function(type){if(this._events){var evlistener=this._events[type];if(isFunction(evlistener))return 1;if(evlistener)return evlistener.length}return 0},EventEmitter.listenerCount=function(emitter,type){return emitter.listenerCount(type)}},function(module,exports,__webpack_require__){(exports=module.exports=__webpack_require__(57)).Stream=exports,exports.Readable=exports,exports.Writable=__webpack_require__(32),exports.Duplex=__webpack_require__(7),exports.Transform=__webpack_require__(60),exports.PassThrough=__webpack_require__(153)},function(module,exports,__webpack_require__){"use strict";(function(process,setImmediate,global){function CorkedRequest(state){var _this=this;this.next=null,this.entry=null,this.finish=function(){onCorkedFinish(_this,state)}}function _uint8ArrayToBuffer(chunk){return Buffer.from(chunk)}function _isUint8Array(obj){return Buffer.isBuffer(obj)||obj instanceof OurUint8Array}function nop(){}function WritableState(options,stream){Duplex=Duplex||__webpack_require__(7),options=options||{},this.objectMode=!!options.objectMode,stream instanceof Duplex&&(this.objectMode=this.objectMode||!!options.writableObjectMode);var hwm=options.highWaterMark,defaultHwm=this.objectMode?16:16384;this.highWaterMark=hwm||0===hwm?hwm:defaultHwm,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 noDecode=!1===options.decodeStrings;this.decodeStrings=!noDecode,this.defaultEncoding=options.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(er){onwrite(stream,er)},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 CorkedRequest(this)}function Writable(options){if(Duplex=Duplex||__webpack_require__(7),!(realHasInstance.call(Writable,this)||this instanceof Duplex))return new Writable(options);this._writableState=new WritableState(options,this),this.writable=!0,options&&("function"==typeof options.write&&(this._write=options.write),"function"==typeof options.writev&&(this._writev=options.writev),"function"==typeof options.destroy&&(this._destroy=options.destroy),"function"==typeof options.final&&(this._final=options.final)),Stream.call(this)}function writeAfterEnd(stream,cb){var er=new Error("write after end");stream.emit("error",er),processNextTick(cb,er)}function validChunk(stream,state,chunk,cb){var valid=!0,er=!1;return null===chunk?er=new TypeError("May not write null values to stream"):"string"==typeof chunk||void 0===chunk||state.objectMode||(er=new TypeError("Invalid non-string/buffer chunk")),er&&(stream.emit("error",er),processNextTick(cb,er),valid=!1),valid}function decodeChunk(state,chunk,encoding){return state.objectMode||!1===state.decodeStrings||"string"!=typeof chunk||(chunk=Buffer.from(chunk,encoding)),chunk}function writeOrBuffer(stream,state,isBuf,chunk,encoding,cb){if(!isBuf){var newChunk=decodeChunk(state,chunk,encoding);chunk!==newChunk&&(isBuf=!0,encoding="buffer",chunk=newChunk)}var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;if(ret||(state.needDrain=!0),state.writing||state.corked){var last=state.lastBufferedRequest;state.lastBufferedRequest={chunk:chunk,encoding:encoding,isBuf:isBuf,callback:cb,next:null},last?last.next=state.lastBufferedRequest:state.bufferedRequest=state.lastBufferedRequest,state.bufferedRequestCount+=1}else doWrite(stream,state,!1,len,chunk,encoding,cb);return ret}function doWrite(stream,state,writev,len,chunk,encoding,cb){state.writelen=len,state.writecb=cb,state.writing=!0,state.sync=!0,writev?stream._writev(chunk,state.onwrite):stream._write(chunk,encoding,state.onwrite),state.sync=!1}function onwriteError(stream,state,sync,er,cb){--state.pendingcb,sync?(processNextTick(cb,er),processNextTick(finishMaybe,stream,state),stream._writableState.errorEmitted=!0,stream.emit("error",er)):(cb(er),stream._writableState.errorEmitted=!0,stream.emit("error",er),finishMaybe(stream,state))}function onwriteStateUpdate(state){state.writing=!1,state.writecb=null,state.length-=state.writelen,state.writelen=0}function onwrite(stream,er){var state=stream._writableState,sync=state.sync,cb=state.writecb;if(onwriteStateUpdate(state),er)onwriteError(stream,state,sync,er,cb);else{var finished=needFinish(state);finished||state.corked||state.bufferProcessing||!state.bufferedRequest||clearBuffer(stream,state),sync?asyncWrite(afterWrite,stream,state,finished,cb):afterWrite(stream,state,finished,cb)}}function afterWrite(stream,state,finished,cb){finished||onwriteDrain(stream,state),state.pendingcb--,cb(),finishMaybe(stream,state)}function onwriteDrain(stream,state){0===state.length&&state.needDrain&&(state.needDrain=!1,stream.emit("drain"))}function clearBuffer(stream,state){state.bufferProcessing=!0;var entry=state.bufferedRequest;if(stream._writev&&entry&&entry.next){var l=state.bufferedRequestCount,buffer=new Array(l),holder=state.corkedRequestsFree;holder.entry=entry;for(var count=0,allBuffers=!0;entry;)buffer[count]=entry,entry.isBuf||(allBuffers=!1),entry=entry.next,count+=1;buffer.allBuffers=allBuffers,doWrite(stream,state,!0,state.length,buffer,"",holder.finish),state.pendingcb++,state.lastBufferedRequest=null,holder.next?(state.corkedRequestsFree=holder.next,holder.next=null):state.corkedRequestsFree=new CorkedRequest(state)}else{for(;entry;){var chunk=entry.chunk,encoding=entry.encoding,cb=entry.callback;if(doWrite(stream,state,!1,state.objectMode?1:chunk.length,chunk,encoding,cb),entry=entry.next,state.writing)break}null===entry&&(state.lastBufferedRequest=null)}state.bufferedRequestCount=0,state.bufferedRequest=entry,state.bufferProcessing=!1}function needFinish(state){return state.ending&&0===state.length&&null===state.bufferedRequest&&!state.finished&&!state.writing}function callFinal(stream,state){stream._final(function(err){state.pendingcb--,err&&stream.emit("error",err),state.prefinished=!0,stream.emit("prefinish"),finishMaybe(stream,state)})}function prefinish(stream,state){state.prefinished||state.finalCalled||("function"==typeof stream._final?(state.pendingcb++,state.finalCalled=!0,processNextTick(callFinal,stream,state)):(state.prefinished=!0,stream.emit("prefinish")))}function finishMaybe(stream,state){var need=needFinish(state);return need&&(prefinish(stream,state),0===state.pendingcb&&(state.finished=!0,stream.emit("finish"))),need}function endWritable(stream,state,cb){state.ending=!0,finishMaybe(stream,state),cb&&(state.finished?processNextTick(cb):stream.once("finish",cb)),state.ended=!0,stream.writable=!1}function onCorkedFinish(corkReq,state,err){var entry=corkReq.entry;for(corkReq.entry=null;entry;){var cb=entry.callback;state.pendingcb--,cb(err),entry=entry.next}state.corkedRequestsFree?state.corkedRequestsFree.next=corkReq:state.corkedRequestsFree=corkReq}var processNextTick=__webpack_require__(17);module.exports=Writable;var Duplex,asyncWrite=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:processNextTick;Writable.WritableState=WritableState;var util=__webpack_require__(13);util.inherits=__webpack_require__(2);var internalUtil={deprecate:__webpack_require__(152)},Stream=__webpack_require__(58),Buffer=__webpack_require__(1).Buffer,OurUint8Array=global.Uint8Array||function(){},destroyImpl=__webpack_require__(59);util.inherits(Writable,Stream),WritableState.prototype.getBuffer=function(){for(var current=this.bufferedRequest,out=[];current;)out.push(current),current=current.next;return out},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(_){}}();var realHasInstance;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(realHasInstance=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(object){return!!realHasInstance.call(this,object)||object&&object._writableState instanceof WritableState}})):realHasInstance=function(object){return object instanceof this},Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1,isBuf=_isUint8Array(chunk)&&!state.objectMode;return isBuf&&!Buffer.isBuffer(chunk)&&(chunk=_uint8ArrayToBuffer(chunk)),"function"==typeof encoding&&(cb=encoding,encoding=null),isBuf?encoding="buffer":encoding||(encoding=state.defaultEncoding),"function"!=typeof cb&&(cb=nop),state.ended?writeAfterEnd(this,cb):(isBuf||validChunk(this,state,chunk,cb))&&(state.pendingcb++,ret=writeOrBuffer(this,state,isBuf,chunk,encoding,cb)),ret},Writable.prototype.cork=function(){this._writableState.corked++},Writable.prototype.uncork=function(){var state=this._writableState;state.corked&&(state.corked--,state.writing||state.corked||state.finished||state.bufferProcessing||!state.bufferedRequest||clearBuffer(this,state))},Writable.prototype.setDefaultEncoding=function(encoding){if("string"==typeof encoding&&(encoding=encoding.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);return this._writableState.defaultEncoding=encoding,this},Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("_write() is not implemented"))},Writable.prototype._writev=null,Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;"function"==typeof chunk?(cb=chunk,chunk=null,encoding=null):"function"==typeof encoding&&(cb=encoding,encoding=null),null!==chunk&&void 0!==chunk&&this.write(chunk,encoding),state.corked&&(state.corked=1,this.uncork()),state.ending||state.finished||endWritable(this,state,cb)},Object.defineProperty(Writable.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(value){this._writableState&&(this._writableState.destroyed=value)}}),Writable.prototype.destroy=destroyImpl.destroy,Writable.prototype._undestroy=destroyImpl.undestroy,Writable.prototype._destroy=function(err,cb){this.end(),cb(err)}}).call(exports,__webpack_require__(5),__webpack_require__(27).setImmediate,__webpack_require__(4))},function(module,exports,__webpack_require__){function assertEncoding(encoding){if(encoding&&!isBufferEncoding(encoding))throw new Error("Unknown encoding: "+encoding)}function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2,this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3,this.charLength=this.charReceived?3:0}var Buffer=__webpack_require__(0).Buffer,isBufferEncoding=Buffer.isEncoding||function(encoding){switch(encoding&&encoding.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}},StringDecoder=exports.StringDecoder=function(encoding){switch(this.encoding=(encoding||"utf8").toLowerCase().replace(/[-_]/,""),assertEncoding(encoding),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=utf16DetectIncompleteChar;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=base64DetectIncompleteChar;break;default:return void(this.write=passThroughWrite)}this.charBuffer=new Buffer(6),this.charReceived=0,this.charLength=0};StringDecoder.prototype.write=function(buffer){for(var charStr="";this.charLength;){var available=buffer.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;if(buffer.copy(this.charBuffer,this.charReceived,0,available),this.charReceived+=available,this.charReceived<this.charLength)return"";if(buffer=buffer.slice(available,buffer.length),!((charCode=(charStr=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(charStr.length-1))>=55296&&charCode<=56319)){if(this.charReceived=this.charLength=0,0===buffer.length)return charStr;break}this.charLength+=this.surrogateSize,charStr=""}this.detectIncompleteChar(buffer);end=buffer.length;this.charLength&&(buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end),end-=this.charReceived);var end=(charStr+=buffer.toString(this.encoding,0,end)).length-1,charCode=charStr.charCodeAt(end);if(charCode>=55296&&charCode<=56319){var size=this.surrogateSize;return this.charLength+=size,this.charReceived+=size,this.charBuffer.copy(this.charBuffer,size,0,size),buffer.copy(this.charBuffer,0,0,size),charStr.substring(0,end)}return charStr},StringDecoder.prototype.detectIncompleteChar=function(buffer){for(var i=buffer.length>=3?3:buffer.length;i>0;i--){var c=buffer[buffer.length-i];if(1==i&&c>>5==6){this.charLength=2;break}if(i<=2&&c>>4==14){this.charLength=3;break}if(i<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=i},StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length&&(res=this.write(buffer)),this.charReceived){var cr=this.charReceived,buf=this.charBuffer,enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res}},function(module,exports,__webpack_require__){(function(Buffer){var schema=__webpack_require__(47),compile=__webpack_require__(163),flatten=function(values){if(!values)return null;var result={};return Object.keys(values).forEach(function(k){result[k]=values[k].value}),result};module.exports=function(proto,opts){if(opts||(opts={}),!proto)throw new Error("Pass in a .proto string or a protobuf-schema parsed object");var sch="object"!=typeof proto||Buffer.isBuffer(proto)?schema.parse(proto):proto,Messages=function(){var self=this;compile(sch,opts.encodings||{}).forEach(function(m){self[m.name]=flatten(m.values)||m})};return Messages.prototype.toString=function(){return schema.stringify(sch)},Messages.prototype.toJSON=function(){return sch},new Messages}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";module.exports=`enum KeyType {\n  RSA = 0;\n  Ed25519 = 1;\n  Secp256k1 = 2;\n}\n\nmessage PublicKey {\n  required KeyType Type = 1;\n  required bytes Data = 2;\n}\n\nmessage PrivateKey {\n  required KeyType Type = 1;\n  required bytes Data = 2;\n}`},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _setImmediate2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__(65));exports.default=_setImmediate2.default,module.exports=exports.default},function(module,exports,__webpack_require__){(function(global,module){function arrayMap(array,iteratee){for(var index=-1,length=array?array.length:0,result=Array(length);++index<length;)result[index]=iteratee(array[index],index,array);return result}function arraySome(array,predicate){for(var index=-1,length=array?array.length:0;++index<length;)if(predicate(array[index],index,array))return!0;return!1}function baseProperty(key){return function(object){return null==object?void 0:object[key]}}function baseTimes(n,iteratee){for(var index=-1,result=Array(n);++index<n;)result[index]=iteratee(index);return result}function getValue(object,key){return null==object?void 0:object[key]}function isHostObject(value){var result=!1;if(null!=value&&"function"!=typeof value.toString)try{result=!!(value+"")}catch(e){}return result}function mapToArray(map){var index=-1,result=Array(map.size);return map.forEach(function(value,key){result[++index]=[key,value]}),result}function setToArray(set){var index=-1,result=Array(set.size);return set.forEach(function(value){result[++index]=value}),result}function Hash(entries){var index=-1,length=entries?entries.length:0;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function ListCache(entries){var index=-1,length=entries?entries.length:0;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function MapCache(entries){var index=-1,length=entries?entries.length:0;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function SetCache(values){var index=-1,length=values?values.length:0;for(this.__data__=new MapCache;++index<length;)this.add(values[index])}function Stack(entries){this.__data__=new ListCache(entries)}function arrayLikeKeys(value,inherited){var result=isArray(value)||isArguments(value)?baseTimes(value.length,String):[],length=result.length,skipIndexes=!!length;for(var key in value)!inherited&&!hasOwnProperty.call(value,key)||skipIndexes&&("length"==key||isIndex(key,length))||result.push(key);return result}function assocIndexOf(array,key){for(var length=array.length;length--;)if(eq(array[length][0],key))return length;return-1}function baseGet(object,path){for(var index=0,length=(path=isKey(path,object)?[path]:castPath(path)).length;null!=object&&index<length;)object=object[toKey(path[index++])];return index&&index==length?object:void 0}function baseHasIn(object,key){return null!=object&&key in Object(object)}function baseIsEqual(value,other,customizer,bitmask,stack){return value===other||(null==value||null==other||!isObject(value)&&!isObjectLike(other)?value!==value&&other!==other:baseIsEqualDeep(value,other,baseIsEqual,customizer,bitmask,stack))}function baseIsEqualDeep(object,other,equalFunc,customizer,bitmask,stack){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=arrayTag,othTag=arrayTag;objIsArr||(objTag=(objTag=getTag(object))==argsTag?objectTag:objTag),othIsArr||(othTag=(othTag=getTag(other))==argsTag?objectTag:othTag);var objIsObj=objTag==objectTag&&!isHostObject(object),othIsObj=othTag==objectTag&&!isHostObject(other),isSameTag=objTag==othTag;if(isSameTag&&!objIsObj)return stack||(stack=new Stack),objIsArr||isTypedArray(object)?equalArrays(object,other,equalFunc,customizer,bitmask,stack):equalByTag(object,other,objTag,equalFunc,customizer,bitmask,stack);if(!(bitmask&PARTIAL_COMPARE_FLAG)){var objIsWrapped=objIsObj&&hasOwnProperty.call(object,"__wrapped__"),othIsWrapped=othIsObj&&hasOwnProperty.call(other,"__wrapped__");if(objIsWrapped||othIsWrapped){var objUnwrapped=objIsWrapped?object.value():object,othUnwrapped=othIsWrapped?other.value():other;return stack||(stack=new Stack),equalFunc(objUnwrapped,othUnwrapped,customizer,bitmask,stack)}}return!!isSameTag&&(stack||(stack=new Stack),equalObjects(object,other,equalFunc,customizer,bitmask,stack))}function baseIsMatch(object,source,matchData,customizer){var index=matchData.length,length=index,noCustomizer=!customizer;if(null==object)return!length;for(object=Object(object);index--;){var data=matchData[index];if(noCustomizer&&data[2]?data[1]!==object[data[0]]:!(data[0]in object))return!1}for(;++index<length;){var key=(data=matchData[index])[0],objValue=object[key],srcValue=data[1];if(noCustomizer&&data[2]){if(void 0===objValue&&!(key in object))return!1}else{var stack=new Stack;if(customizer)var result=customizer(objValue,srcValue,key,object,source,stack);if(!(void 0===result?baseIsEqual(srcValue,objValue,customizer,UNORDERED_COMPARE_FLAG|PARTIAL_COMPARE_FLAG,stack):result))return!1}}return!0}function baseIsNative(value){return!(!isObject(value)||isMasked(value))&&(isFunction(value)||isHostObject(value)?reIsNative:reIsHostCtor).test(toSource(value))}function baseIteratee(value){return"function"==typeof value?value:null==value?identity:"object"==typeof value?isArray(value)?baseMatchesProperty(value[0],value[1]):baseMatches(value):property(value)}function baseKeys(object){if(!isPrototype(object))return nativeKeys(object);var result=[];for(var key in Object(object))hasOwnProperty.call(object,key)&&"constructor"!=key&&result.push(key);return result}function baseMap(collection,iteratee){var index=-1,result=isArrayLike(collection)?Array(collection.length):[];return baseEach(collection,function(value,key,collection){result[++index]=iteratee(value,key,collection)}),result}function baseMatches(source){var matchData=getMatchData(source);return 1==matchData.length&&matchData[0][2]?matchesStrictComparable(matchData[0][0],matchData[0][1]):function(object){return object===source||baseIsMatch(object,source,matchData)}}function baseMatchesProperty(path,srcValue){return isKey(path)&&isStrictComparable(srcValue)?matchesStrictComparable(toKey(path),srcValue):function(object){var objValue=get(object,path);return void 0===objValue&&objValue===srcValue?hasIn(object,path):baseIsEqual(srcValue,objValue,void 0,UNORDERED_COMPARE_FLAG|PARTIAL_COMPARE_FLAG)}}function basePropertyDeep(path){return function(object){return baseGet(object,path)}}function baseToString(value){if("string"==typeof value)return value;if(isSymbol(value))return symbolToString?symbolToString.call(value):"";var result=value+"";return"0"==result&&1/value==-INFINITY?"-0":result}function castPath(value){return isArray(value)?value:stringToPath(value)}function equalArrays(array,other,equalFunc,customizer,bitmask,stack){var isPartial=bitmask&PARTIAL_COMPARE_FLAG,arrLength=array.length,othLength=other.length;if(arrLength!=othLength&&!(isPartial&&othLength>arrLength))return!1;var stacked=stack.get(array);if(stacked&&stack.get(other))return stacked==other;var index=-1,result=!0,seen=bitmask&UNORDERED_COMPARE_FLAG?new SetCache:void 0;for(stack.set(array,other),stack.set(other,array);++index<arrLength;){var arrValue=array[index],othValue=other[index];if(customizer)var compared=isPartial?customizer(othValue,arrValue,index,other,array,stack):customizer(arrValue,othValue,index,array,other,stack);if(void 0!==compared){if(compared)continue;result=!1;break}if(seen){if(!arraySome(other,function(othValue,othIndex){if(!seen.has(othIndex)&&(arrValue===othValue||equalFunc(arrValue,othValue,customizer,bitmask,stack)))return seen.add(othIndex)})){result=!1;break}}else if(arrValue!==othValue&&!equalFunc(arrValue,othValue,customizer,bitmask,stack)){result=!1;break}}return stack.delete(array),stack.delete(other),result}function equalByTag(object,other,tag,equalFunc,customizer,bitmask,stack){switch(tag){case dataViewTag:if(object.byteLength!=other.byteLength||object.byteOffset!=other.byteOffset)return!1;object=object.buffer,other=other.buffer;case arrayBufferTag:return!(object.byteLength!=other.byteLength||!equalFunc(new Uint8Array(object),new Uint8Array(other)));case boolTag:case dateTag:case numberTag:return eq(+object,+other);case errorTag:return object.name==other.name&&object.message==other.message;case regexpTag:case stringTag:return object==other+"";case mapTag:var convert=mapToArray;case setTag:var isPartial=bitmask&PARTIAL_COMPARE_FLAG;if(convert||(convert=setToArray),object.size!=other.size&&!isPartial)return!1;var stacked=stack.get(object);if(stacked)return stacked==other;bitmask|=UNORDERED_COMPARE_FLAG,stack.set(object,other);var result=equalArrays(convert(object),convert(other),equalFunc,customizer,bitmask,stack);return stack.delete(object),result;case symbolTag:if(symbolValueOf)return symbolValueOf.call(object)==symbolValueOf.call(other)}return!1}function equalObjects(object,other,equalFunc,customizer,bitmask,stack){var isPartial=bitmask&PARTIAL_COMPARE_FLAG,objProps=keys(object),objLength=objProps.length;if(objLength!=keys(other).length&&!isPartial)return!1;for(var index=objLength;index--;){var key=objProps[index];if(!(isPartial?key in other:hasOwnProperty.call(other,key)))return!1}var stacked=stack.get(object);if(stacked&&stack.get(other))return stacked==other;var result=!0;stack.set(object,other),stack.set(other,object);for(var skipCtor=isPartial;++index<objLength;){var objValue=object[key=objProps[index]],othValue=other[key];if(customizer)var compared=isPartial?customizer(othValue,objValue,key,other,object,stack):customizer(objValue,othValue,key,object,other,stack);if(!(void 0===compared?objValue===othValue||equalFunc(objValue,othValue,customizer,bitmask,stack):compared)){result=!1;break}skipCtor||(skipCtor="constructor"==key)}if(result&&!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;objCtor!=othCtor&&"constructor"in object&&"constructor"in other&&!("function"==typeof objCtor&&objCtor instanceof objCtor&&"function"==typeof othCtor&&othCtor instanceof othCtor)&&(result=!1)}return stack.delete(object),stack.delete(other),result}function getMapData(map,key){var data=map.__data__;return isKeyable(key)?data["string"==typeof key?"string":"hash"]:data.map}function getMatchData(object){for(var result=keys(object),length=result.length;length--;){var key=result[length],value=object[key];result[length]=[key,value,isStrictComparable(value)]}return result}function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:void 0}function hasPath(object,path,hasFunc){for(var result,index=-1,length=(path=isKey(path,object)?[path]:castPath(path)).length;++index<length;){var key=toKey(path[index]);if(!(result=null!=object&&hasFunc(object,key)))break;object=object[key]}return result||!!(length=object?object.length:0)&&isLength(length)&&isIndex(key,length)&&(isArray(object)||isArguments(object))}function isIndex(value,length){return!!(length=null==length?MAX_SAFE_INTEGER:length)&&("number"==typeof value||reIsUint.test(value))&&value>-1&&value%1==0&&value<length}function isKey(value,object){if(isArray(value))return!1;var type=typeof value;return!("number"!=type&&"symbol"!=type&&"boolean"!=type&&null!=value&&!isSymbol(value))||(reIsPlainProp.test(value)||!reIsDeepProp.test(value)||null!=object&&value in Object(object))}function isKeyable(value){var type=typeof value;return"string"==type||"number"==type||"symbol"==type||"boolean"==type?"__proto__"!==value:null===value}function isMasked(func){return!!maskSrcKey&&maskSrcKey in func}function isPrototype(value){var Ctor=value&&value.constructor;return value===("function"==typeof Ctor&&Ctor.prototype||objectProto)}function isStrictComparable(value){return value===value&&!isObject(value)}function matchesStrictComparable(key,srcValue){return function(object){return null!=object&&(object[key]===srcValue&&(void 0!==srcValue||key in Object(object)))}}function toKey(value){if("string"==typeof value||isSymbol(value))return value;var result=value+"";return"0"==result&&1/value==-INFINITY?"-0":result}function toSource(func){if(null!=func){try{return funcToString.call(func)}catch(e){}try{return func+""}catch(e){}}return""}function memoize(func,resolver){if("function"!=typeof func||resolver&&"function"!=typeof resolver)throw new TypeError(FUNC_ERROR_TEXT);var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key))return cache.get(key);var result=func.apply(this,args);return memoized.cache=cache.set(key,result),result};return memoized.cache=new(memoize.Cache||MapCache),memoized}function eq(value,other){return value===other||value!==value&&other!==other}function isArguments(value){return isArrayLikeObject(value)&&hasOwnProperty.call(value,"callee")&&(!propertyIsEnumerable.call(value,"callee")||objectToString.call(value)==argsTag)}function isArrayLike(value){return null!=value&&isLength(value.length)&&!isFunction(value)}function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value)}function isFunction(value){var tag=isObject(value)?objectToString.call(value):"";return tag==funcTag||tag==genTag}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function isObjectLike(value){return!!value&&"object"==typeof value}function isSymbol(value){return"symbol"==typeof value||isObjectLike(value)&&objectToString.call(value)==symbolTag}function toString(value){return null==value?"":baseToString(value)}function get(object,path,defaultValue){var result=null==object?void 0:baseGet(object,path);return void 0===result?defaultValue:result}function hasIn(object,path){return null!=object&&hasPath(object,path,baseHasIn)}function keys(object){return isArrayLike(object)?arrayLikeKeys(object):baseKeys(object)}function identity(value){return value}function property(path){return isKey(path)?baseProperty(toKey(path)):basePropertyDeep(path)}var LARGE_ARRAY_SIZE=200,FUNC_ERROR_TEXT="Expected a function",HASH_UNDEFINED="__lodash_hash_undefined__",UNORDERED_COMPARE_FLAG=1,PARTIAL_COMPARE_FLAG=2,INFINITY=1/0,MAX_SAFE_INTEGER=9007199254740991,argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,reLeadingDot=/^\./,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reEscapeChar=/\\(\\)?/g,reIsHostCtor=/^\[object .+?Constructor\]$/,reIsUint=/^(?:0|[1-9]\d*)$/,typedArrayTags={};typedArrayTags["[object Float32Array]"]=typedArrayTags["[object Float64Array]"]=typedArrayTags["[object Int8Array]"]=typedArrayTags["[object Int16Array]"]=typedArrayTags["[object Int32Array]"]=typedArrayTags["[object Uint8Array]"]=typedArrayTags["[object Uint8ClampedArray]"]=typedArrayTags["[object Uint16Array]"]=typedArrayTags["[object Uint32Array]"]=!0,typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags["[object WeakMap]"]=!1;var freeGlobal="object"==typeof global&&global&&global.Object===Object&&global,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),freeExports="object"==typeof exports&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&"object"==typeof module&&module&&!module.nodeType&&module,freeProcess=freeModule&&freeModule.exports===freeExports&&freeGlobal.process,nodeUtil=function(){try{return freeProcess&&freeProcess.binding("util")}catch(e){}}(),nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,arrayProto=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype,coreJsData=root["__core-js_shared__"],maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return uid?"Symbol(src)_1."+uid:""}(),funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectToString=objectProto.toString,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Symbol=root.Symbol,Uint8Array=root.Uint8Array,propertyIsEnumerable=objectProto.propertyIsEnumerable,splice=arrayProto.splice,nativeKeys=function(func,transform){return function(arg){return func(transform(arg))}}(Object.keys,Object),DataView=getNative(root,"DataView"),Map=getNative(root,"Map"),Promise=getNative(root,"Promise"),Set=getNative(root,"Set"),WeakMap=getNative(root,"WeakMap"),nativeCreate=getNative(Object,"create"),dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map),promiseCtorString=toSource(Promise),setCtorString=toSource(Set),weakMapCtorString=toSource(WeakMap),symbolProto=Symbol?Symbol.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;Hash.prototype.clear=function(){this.__data__=nativeCreate?nativeCreate(null):{}},Hash.prototype.delete=function(key){return this.has(key)&&delete this.__data__[key]},Hash.prototype.get=function(key){var data=this.__data__;if(nativeCreate){var result=data[key];return result===HASH_UNDEFINED?void 0:result}return hasOwnProperty.call(data,key)?data[key]:void 0},Hash.prototype.has=function(key){var data=this.__data__;return nativeCreate?void 0!==data[key]:hasOwnProperty.call(data,key)},Hash.prototype.set=function(key,value){return this.__data__[key]=nativeCreate&&void 0===value?HASH_UNDEFINED:value,this},ListCache.prototype.clear=function(){this.__data__=[]},ListCache.prototype.delete=function(key){var data=this.__data__,index=assocIndexOf(data,key);return!(index<0||(index==data.length-1?data.pop():splice.call(data,index,1),0))},ListCache.prototype.get=function(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?void 0:data[index][1]},ListCache.prototype.has=function(key){return assocIndexOf(this.__data__,key)>-1},ListCache.prototype.set=function(key,value){var data=this.__data__,index=assocIndexOf(data,key);return index<0?data.push([key,value]):data[index][1]=value,this},MapCache.prototype.clear=function(){this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}},MapCache.prototype.delete=function(key){return getMapData(this,key).delete(key)},MapCache.prototype.get=function(key){return getMapData(this,key).get(key)},MapCache.prototype.has=function(key){return getMapData(this,key).has(key)},MapCache.prototype.set=function(key,value){return getMapData(this,key).set(key,value),this},SetCache.prototype.add=SetCache.prototype.push=function(value){return this.__data__.set(value,HASH_UNDEFINED),this},SetCache.prototype.has=function(value){return this.__data__.has(value)},Stack.prototype.clear=function(){this.__data__=new ListCache},Stack.prototype.delete=function(key){return this.__data__.delete(key)},Stack.prototype.get=function(key){return this.__data__.get(key)},Stack.prototype.has=function(key){return this.__data__.has(key)},Stack.prototype.set=function(key,value){var cache=this.__data__;if(cache instanceof ListCache){var pairs=cache.__data__;if(!Map||pairs.length<LARGE_ARRAY_SIZE-1)return pairs.push([key,value]),this;cache=this.__data__=new MapCache(pairs)}return cache.set(key,value),this};var baseEach=function(eachFunc,fromRight){return function(collection,iteratee){if(null==collection)return collection;if(!isArrayLike(collection))return eachFunc(collection,iteratee);for(var length=collection.length,index=fromRight?length:-1,iterable=Object(collection);(fromRight?index--:++index<length)&&!1!==iteratee(iterable[index],index,iterable););return collection}}(function(object,iteratee){return object&&baseFor(object,iteratee,keys)}),baseFor=function(fromRight){return function(object,iteratee,keysFunc){for(var index=-1,iterable=Object(object),props=keysFunc(object),length=props.length;length--;){var key=props[fromRight?length:++index];if(!1===iteratee(iterable[key],key,iterable))break}return object}}(),getTag=function(value){return objectToString.call(value)};(DataView&&getTag(new DataView(new ArrayBuffer(1)))!=dataViewTag||Map&&getTag(new Map)!=mapTag||Promise&&"[object Promise]"!=getTag(Promise.resolve())||Set&&getTag(new Set)!=setTag||WeakMap&&"[object WeakMap]"!=getTag(new WeakMap))&&(getTag=function(value){var result=objectToString.call(value),Ctor=result==objectTag?value.constructor:void 0,ctorString=Ctor?toSource(Ctor):void 0;if(ctorString)switch(ctorString){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag;case promiseCtorString:return"[object Promise]";case setCtorString:return setTag;case weakMapCtorString:return"[object WeakMap]"}return result});var stringToPath=memoize(function(string){string=toString(string);var result=[];return reLeadingDot.test(string)&&result.push(""),string.replace(rePropName,function(match,number,quote,string){result.push(quote?string.replace(reEscapeChar,"$1"):number||match)}),result});memoize.Cache=MapCache;var isArray=Array.isArray,isTypedArray=nodeIsTypedArray?function(func){return function(value){return func(value)}}(nodeIsTypedArray):function(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[objectToString.call(value)]};module.exports=function(collection,iteratee){return(isArray(collection)?arrayMap:baseMap)(collection,baseIteratee(iteratee,3))}}).call(exports,__webpack_require__(4),__webpack_require__(20)(module))},function(module,exports,__webpack_require__){"use strict";function Protocols(proto){if("number"==typeof proto){if(Protocols.codes[proto])return Protocols.codes[proto];throw new Error("no protocol with code: "+proto)}if("string"==typeof proto||proto instanceof String){if(Protocols.names[proto])return Protocols.names[proto];throw new Error("no protocol with name: "+proto)}throw new Error("invalid protocol id type: "+proto)}function p(code,size,name,resolvable){return{code:code,size:size,name:name,resolvable:Boolean(resolvable)}}const map=__webpack_require__(37);Protocols.lengthPrefixedVarSize=-1,Protocols.V=-1,Protocols.table=[[4,32,"ip4"],[6,16,"tcp"],[17,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[53,-1,"dns","resolvable"],[54,-1,"dns4","resolvable"],[55,-1,"dns6","resolvable"],[132,16,"sctp"],[302,0,"utp"],[421,Protocols.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"]],Protocols.names={},Protocols.codes={},map(Protocols.table,function(row){const proto=p.apply(null,row);Protocols.codes[proto.code]=proto,Protocols.names[proto.name]=proto}),Protocols.object=p,module.exports=Protocols},function(module,exports){var toString={}.toString;module.exports=Array.isArray||function(arr){return"[object Array]"==toString.call(arr)}},function(module,exports,__webpack_require__){"use strict";var sources=__webpack_require__(93),sinks=__webpack_require__(99),throughs=__webpack_require__(105);(exports=module.exports=__webpack_require__(113)).pull=exports;for(var k in sources)exports[k]=sources[k];for(var k in throughs)exports[k]=throughs[k];for(var k in sinks)exports[k]=sinks[k]},function(module,exports){module.exports=function(cb,abort,onAbort){cb(abort),onAbort&&onAbort(!0===abort?null:abort)}},function(module,exports,__webpack_require__){"use strict";var abortCb=__webpack_require__(41);module.exports=function(value,onAbort){return function(abort,cb){if(abort)return abortCb(cb,abort,onAbort);if(null!=value){var _value=value;value=null,cb(null,_value)}else cb(!0)}}},function(module,exports,__webpack_require__){function id(e){return e}var prop=__webpack_require__(11);module.exports=function(test){return"object"==typeof test&&"function"==typeof test.test?function(data){return test.test(data)}:prop(test)||id}},function(module,exports,__webpack_require__){"use strict";function id(e){return e}var prop=__webpack_require__(11),filter=__webpack_require__(24);module.exports=function(field,invert){field=prop(field)||id;var seen={};return filter(function(data){var key=field(data);return seen[key]?!!invert:(seen[key]=!0,!invert)})}},function(module,exports,__webpack_require__){"use strict";const encode=__webpack_require__(114),d=__webpack_require__(118);exports.encode=encode,exports.decode=d.decode,exports.decodeFromReader=d.decodeFromReader},function(module,exports,__webpack_require__){"use strict";const protons=__webpack_require__(122);`\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`;module.exports=protons("\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(module,exports,__webpack_require__){var parse=__webpack_require__(123),stringify=__webpack_require__(125);module.exports=parse,module.exports.parse=parse,module.exports.stringify=stringify},function(module,exports,__webpack_require__){var varint=__webpack_require__(3);exports.encode=function encode(v,b,o){v=v>=0?2*v:-2*v-1;var r=varint.encode(v,b,o);return encode.bytes=varint.encode.bytes,r},exports.decode=function decode(b,o){var v=varint.decode(b,o);return decode.bytes=varint.decode.bytes,1&v?(v+1)/-2:v/2},exports.encodingLength=function(v){return varint.encodingLength(v>=0?2*v:-2*v-1)}},function(module,exports,__webpack_require__){"use strict";function toB64Opt(val){if(val)return val.toString("base64")}const mh=__webpack_require__(50),crypto=__webpack_require__(135),assert=__webpack_require__(85),waterfall=__webpack_require__(226),Buffer=__webpack_require__(1).Buffer;class PeerId{constructor(id,privKey,pubKey){assert(Buffer.isBuffer(id),"invalid id provided"),privKey&&pubKey&&assert(privKey.public.bytes.equals(pubKey.bytes),"inconsistent arguments"),this._id=id,this._idB58String=mh.toB58String(this.id),this._privKey=privKey,this._pubKey=pubKey}get id(){return this._id}set id(val){throw new Error("Id is immutable")}get privKey(){return this._privKey}set privKey(privKey){this._privKey=privKey}get pubKey(){return this._pubKey?this._pubKey:this._privKey?this._privKey.public:void 0}set pubKey(pubKey){this._pubKey=pubKey}marshalPubKey(){if(this.pubKey)return crypto.keys.marshalPublicKey(this.pubKey)}marshalPrivKey(){if(this.privKey)return crypto.keys.marshalPrivateKey(this.privKey)}toPrint(){return this.toJSON()}toJSON(){return{id:this.toB58String(),privKey:toB64Opt(this.marshalPrivKey()),pubKey:toB64Opt(this.marshalPubKey())}}toHexString(){return mh.toHexString(this.id)}toBytes(){return this.id}toB58String(){return this._idB58String}isEqual(id){if(Buffer.isBuffer(id))return this.id.equals(id);if(id.id)return this.id.equals(id.id);throw new Error("not valid Id")}isValid(callback){this.privKey&&this.privKey.public&&this.privKey.public.bytes&&Buffer.isBuffer(this.pubKey.bytes)&&this.privKey.public.bytes.equals(this.pubKey.bytes)?callback():callback(new Error("Keys not match"))}}(exports=module.exports=PeerId).create=function(opts,callback){"function"==typeof opts&&(callback=opts,opts={}),(opts=opts||{}).bits=opts.bits||2048,waterfall([cb=>crypto.keys.generateKeyPair("RSA",opts.bits,cb),(privKey,cb)=>privKey.public.hash((err,digest)=>{cb(err,digest,privKey)})],(err,digest,privKey)=>{if(err)return callback(err);callback(null,new PeerId(digest,privKey))})},exports.createFromHexString=function(str){return new PeerId(mh.fromHexString(str))},exports.createFromBytes=function(buf){return new PeerId(buf)},exports.createFromB58String=function(str){return new PeerId(mh.fromB58String(str))},exports.createFromPubKey=function(key,callback){if("function"!=typeof callback)throw new Error("callback is required");let buf=key;"string"==typeof buf&&(buf=Buffer.from(key,"base64"));const pubKey=crypto.keys.unmarshalPublicKey(buf);pubKey.hash((err,digest)=>{if(err)return callback(err);callback(null,new PeerId(digest,null,pubKey))})},exports.createFromPrivKey=function(key,callback){let buf=key;if("string"==typeof buf&&(buf=Buffer.from(key,"base64")),"function"!=typeof callback)throw new Error("callback is required");waterfall([cb=>crypto.keys.unmarshalPrivateKey(buf,cb),(privKey,cb)=>privKey.public.hash((err,digest)=>{cb(err,digest,privKey)})],(err,digest,privKey)=>{if(err)return callback(err);callback(null,new PeerId(digest,privKey))})},exports.createFromJSON=function(obj,callback){if("function"!=typeof callback)throw new Error("callback is required");const id=mh.fromB58String(obj.id),rawPrivKey=obj.privKey&&Buffer.from(obj.privKey,"base64"),rawPubKey=obj.pubKey&&Buffer.from(obj.pubKey,"base64"),pub=rawPubKey&&crypto.keys.unmarshalPublicKey(rawPubKey);rawPrivKey?waterfall([cb=>crypto.keys.unmarshalPrivateKey(rawPrivKey,cb),(priv,cb)=>priv.public.hash((err,digest)=>{cb(err,digest,priv)}),(privDigest,priv,cb)=>{pub?pub.hash((err,pubDigest)=>{cb(err,privDigest,priv,pubDigest)}):cb(null,privDigest,priv)}],(err,privDigest,priv,pubDigest)=>err?callback(err):pub&&!privDigest.equals(pubDigest)?callback(new Error("Public and private key do not match")):id&&!privDigest.equals(id)?callback(new Error("Id and private key do not match")):void callback(null,new PeerId(id,priv,pub))):callback(null,new PeerId(id,null,pub))},exports.isPeerId=function(peerId){return Boolean("object"==typeof peerId&&peerId._id&&peerId._idB58String)}},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function validate(multihash){exports.decode(multihash)}const bs58=__webpack_require__(26),cs=__webpack_require__(134);exports.names=cs.names,exports.codes=cs.codes,exports.defaultLengths=cs.defaultLengths;const varint=__webpack_require__(3);exports.toHexString=function(hash){if(!Buffer.isBuffer(hash))throw new Error("must be passed a buffer");return hash.toString("hex")},exports.fromHexString=function(hash){return new Buffer(hash,"hex")},exports.toB58String=function(hash){if(!Buffer.isBuffer(hash))throw new Error("must be passed a buffer");return bs58.encode(hash)},exports.fromB58String=function(hash){let encoded=hash;return Buffer.isBuffer(hash)&&(encoded=hash.toString()),new Buffer(bs58.decode(encoded))},exports.decode=function(buf){if(!Buffer.isBuffer(buf))throw new Error("multihash must be a Buffer");if(buf.length<3)throw new Error("multihash too short. must be > 3 bytes.");let code=varint.decode(buf);if(!exports.isValidCode(code))throw new Error(`multihash unknown function code: 0x${code.toString(16)}`);buf=buf.slice(varint.decode.bytes);let len=varint.decode(buf);if(len<1)throw new Error(`multihash invalid length: 0x${len.toString(16)}`);if((buf=buf.slice(varint.decode.bytes)).length!==len)throw new Error(`multihash length inconsistent: 0x${buf.toString("hex")}`);return{code:code,name:cs.codes[code],length:len,digest:buf}},exports.encode=function(digest,code,length){if(!digest||!code)throw new Error("multihash encode requires at least two args: digest, code");const hashfn=exports.coerceCode(code);if(!Buffer.isBuffer(digest))throw new Error("digest should be a Buffer");if(null==length&&(length=digest.length),length&&digest.length!==length)throw new Error("digest length should be equal to specified length.");return Buffer.concat([new Buffer(varint.encode(hashfn)),new Buffer(varint.encode(length)),digest])},exports.coerceCode=function(name){let code=name;if("string"==typeof name){if(!cs.names[name])throw new Error(`Unrecognized hash function named: ${name}`);code=cs.names[name]}if("number"!=typeof code)throw new Error(`Hash function code should be a number. Got: ${code}`);if(!cs.codes[code]&&!exports.isAppCode(code))throw new Error(`Unrecognized function code: ${code}`);return code},exports.isAppCode=function(code){return code>0&&code<16},exports.isValidCode=function(code){return!!exports.isAppCode(code)||!!cs.codes[code]},exports.validate=validate,exports.prefix=function(multihash){return validate(multihash),multihash.slice(0,2)}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";const nodeify=__webpack_require__(15),Buffer=__webpack_require__(1).Buffer,crypto=__webpack_require__(28)(),lengths=__webpack_require__(139),hashTypes={SHA1:"SHA-1",SHA256:"SHA-256",SHA512:"SHA-512"};exports.create=function(hashType,secret,callback){const hash=hashTypes[hashType];nodeify(crypto.subtle.importKey("raw",secret,{name:"HMAC",hash:{name:hash}},!1,["sign"]).then(key=>({digest(data,cb){nodeify(crypto.subtle.sign({name:"HMAC"},key,data).then(raw=>Buffer.from(raw)),cb)},length:lengths[hashType]})),callback)}},function(module,exports){module.exports=function(obj){return obj&&"function"==typeof obj.then}},function(module,exports,__webpack_require__){var modeModules={ECB:__webpack_require__(144),CBC:__webpack_require__(145),CFB:__webpack_require__(146),CFB8:__webpack_require__(147),CFB1:__webpack_require__(148),OFB:__webpack_require__(149),CTR:__webpack_require__(54),GCM:__webpack_require__(54)},modes=__webpack_require__(55);for(var key in modes)modes[key].module=modeModules[modes[key].mode];module.exports=modes},function(module,exports,__webpack_require__){(function(Buffer){function incr32(iv){for(var item,len=iv.length;len--;){if(255!==(item=iv.readUInt8(len))){item++,iv.writeUInt8(item,len);break}iv.writeUInt8(0,len)}}function getBlock(self){var out=self._cipher.encryptBlockRaw(self._prev);return incr32(self._prev),out}var xor=__webpack_require__(12);exports.encrypt=function(self,chunk){var chunkNum=Math.ceil(chunk.length/16),start=self._cache.length;self._cache=Buffer.concat([self._cache,Buffer.allocUnsafe(16*chunkNum)]);for(var i=0;i<chunkNum;i++){var out=getBlock(self),offset=start+16*i;self._cache.writeUInt32BE(out[0],offset+0),self._cache.writeUInt32BE(out[1],offset+4),self._cache.writeUInt32BE(out[2],offset+8),self._cache.writeUInt32BE(out[3],offset+12)}var pad=self._cache.slice(0,chunk.length);return self._cache=self._cache.slice(chunk.length),xor(chunk,pad)}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports){module.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}},function(module,exports,__webpack_require__){function xorTest(a,b){var out=0;a.length!==b.length&&out++;for(var len=Math.min(a.length,b.length),i=0;i<len;++i)out+=a[i]^b[i];return out}function StreamCipher(mode,key,iv,decrypt){Transform.call(this),this._finID=Buffer.concat([iv,Buffer.from([0,0,0,1])]),iv=Buffer.concat([iv,Buffer.from([0,0,0,2])]),this._cipher=new aes.AES(key),this._prev=Buffer.from(iv),this._cache=Buffer.allocUnsafe(0),this._secCache=Buffer.allocUnsafe(0),this._decrypt=decrypt,this._alen=0,this._len=0,this._mode=mode;var h=Buffer.alloc(4,0);this._ghash=new GHASH(this._cipher.encryptBlock(h)),this._authTag=null,this._called=!1}var aes=__webpack_require__(16),Buffer=__webpack_require__(1).Buffer,Transform=__webpack_require__(6),inherits=__webpack_require__(2),GHASH=__webpack_require__(158),xor=__webpack_require__(12);inherits(StreamCipher,Transform),StreamCipher.prototype._update=function(chunk){if(!this._called&&this._alen){var rump=16-this._alen%16;rump<16&&(rump=Buffer.alloc(rump,0),this._ghash.update(rump))}this._called=!0;var out=this._mode.encrypt(this,chunk);return this._decrypt?this._ghash.update(chunk):this._ghash.update(out),this._len+=chunk.length,out},StreamCipher.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var tag=xor(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&xorTest(tag,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=tag,this._cipher.scrub()},StreamCipher.prototype.getAuthTag=function(){if(this._decrypt||!Buffer.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},StreamCipher.prototype.setAuthTag=function(tag){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=tag},StreamCipher.prototype.setAAD=function(buf){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(buf),this._alen+=buf.length},module.exports=StreamCipher},function(module,exports,__webpack_require__){"use strict";(function(global,process){function _uint8ArrayToBuffer(chunk){return Buffer.from(chunk)}function _isUint8Array(obj){return Buffer.isBuffer(obj)||obj instanceof OurUint8Array}function prependListener(emitter,event,fn){if("function"==typeof emitter.prependListener)return emitter.prependListener(event,fn);emitter._events&&emitter._events[event]?isArray(emitter._events[event])?emitter._events[event].unshift(fn):emitter._events[event]=[fn,emitter._events[event]]:emitter.on(event,fn)}function ReadableState(options,stream){Duplex=Duplex||__webpack_require__(7),options=options||{},this.objectMode=!!options.objectMode,stream instanceof Duplex&&(this.objectMode=this.objectMode||!!options.readableObjectMode);var hwm=options.highWaterMark,defaultHwm=this.objectMode?16:16384;this.highWaterMark=hwm||0===hwm?hwm:defaultHwm,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new BufferList,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=options.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,options.encoding&&(StringDecoder||(StringDecoder=__webpack_require__(33).StringDecoder),this.decoder=new StringDecoder(options.encoding),this.encoding=options.encoding)}function Readable(options){if(Duplex=Duplex||__webpack_require__(7),!(this instanceof Readable))return new Readable(options);this._readableState=new ReadableState(options,this),this.readable=!0,options&&("function"==typeof options.read&&(this._read=options.read),"function"==typeof options.destroy&&(this._destroy=options.destroy)),Stream.call(this)}function readableAddChunk(stream,chunk,encoding,addToFront,skipChunkCheck){var state=stream._readableState;if(null===chunk)state.reading=!1,onEofChunk(stream,state);else{var er;skipChunkCheck||(er=chunkInvalid(state,chunk)),er?stream.emit("error",er):state.objectMode||chunk&&chunk.length>0?("string"==typeof chunk||state.objectMode||Object.getPrototypeOf(chunk)===Buffer.prototype||(chunk=_uint8ArrayToBuffer(chunk)),addToFront?state.endEmitted?stream.emit("error",new Error("stream.unshift() after end event")):addChunk(stream,state,chunk,!0):state.ended?stream.emit("error",new Error("stream.push() after EOF")):(state.reading=!1,state.decoder&&!encoding?(chunk=state.decoder.write(chunk),state.objectMode||0!==chunk.length?addChunk(stream,state,chunk,!1):maybeReadMore(stream,state)):addChunk(stream,state,chunk,!1))):addToFront||(state.reading=!1)}return needMoreData(state)}function addChunk(stream,state,chunk,addToFront){state.flowing&&0===state.length&&!state.sync?(stream.emit("data",chunk),stream.read(0)):(state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):state.buffer.push(chunk),state.needReadable&&emitReadable(stream)),maybeReadMore(stream,state)}function chunkInvalid(state,chunk){var er;return _isUint8Array(chunk)||"string"==typeof chunk||void 0===chunk||state.objectMode||(er=new TypeError("Invalid non-string/buffer chunk")),er}function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||0===state.length)}function computeNewHighWaterMark(n){return n>=MAX_HWM?n=MAX_HWM:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}function howMuchToRead(n,state){return n<=0||0===state.length&&state.ended?0:state.objectMode?1:n!==n?state.flowing&&state.length?state.buffer.head.data.length:state.length:(n>state.highWaterMark&&(state.highWaterMark=computeNewHighWaterMark(n)),n<=state.length?n:state.ended?state.length:(state.needReadable=!0,0))}function onEofChunk(stream,state){if(!state.ended){if(state.decoder){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length)}state.ended=!0,emitReadable(stream)}}function emitReadable(stream){var state=stream._readableState;state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,state.sync?processNextTick(emitReadable_,stream):emitReadable_(stream))}function emitReadable_(stream){debug("emit readable"),stream.emit("readable"),flow(stream)}function maybeReadMore(stream,state){state.readingMore||(state.readingMore=!0,processNextTick(maybeReadMore_,stream,state))}function maybeReadMore_(stream,state){for(var len=state.length;!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark&&(debug("maybeReadMore read 0"),stream.read(0),len!==state.length);)len=state.length;state.readingMore=!1}function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain),state.awaitDrain&&state.awaitDrain--,0===state.awaitDrain&&EElistenerCount(src,"data")&&(state.flowing=!0,flow(src))}}function nReadingNextTick(self){debug("readable nexttick read 0"),self.read(0)}function resume(stream,state){state.resumeScheduled||(state.resumeScheduled=!0,processNextTick(resume_,stream,state))}function resume_(stream,state){state.reading||(debug("resume read 0"),stream.read(0)),state.resumeScheduled=!1,state.awaitDrain=0,stream.emit("resume"),flow(stream),state.flowing&&!state.reading&&stream.read(0)}function flow(stream){var state=stream._readableState;for(debug("flow",state.flowing);state.flowing&&null!==stream.read(););}function fromList(n,state){if(0===state.length)return null;var ret;return state.objectMode?ret=state.buffer.shift():!n||n>=state.length?(ret=state.decoder?state.buffer.join(""):1===state.buffer.length?state.buffer.head.data:state.buffer.concat(state.length),state.buffer.clear()):ret=fromListPartial(n,state.buffer,state.decoder),ret}function fromListPartial(n,list,hasStrings){var ret;return n<list.head.data.length?(ret=list.head.data.slice(0,n),list.head.data=list.head.data.slice(n)):ret=n===list.head.data.length?list.shift():hasStrings?copyFromBufferString(n,list):copyFromBuffer(n,list),ret}function copyFromBufferString(n,list){var p=list.head,c=1,ret=p.data;for(n-=ret.length;p=p.next;){var str=p.data,nb=n>str.length?str.length:n;if(nb===str.length?ret+=str:ret+=str.slice(0,n),0===(n-=nb)){nb===str.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=str.slice(nb));break}++c}return list.length-=c,ret}function copyFromBuffer(n,list){var ret=Buffer.allocUnsafe(n),p=list.head,c=1;for(p.data.copy(ret),n-=p.data.length;p=p.next;){var buf=p.data,nb=n>buf.length?buf.length:n;if(buf.copy(ret,ret.length-n,0,nb),0===(n-=nb)){nb===buf.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=buf.slice(nb));break}++c}return list.length-=c,ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error('"endReadable()" called on non-empty stream');state.endEmitted||(state.ended=!0,processNextTick(endReadableNT,state,stream))}function endReadableNT(state,stream){state.endEmitted||0!==state.length||(state.endEmitted=!0,stream.readable=!1,stream.emit("end"))}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++)if(xs[i]===x)return i;return-1}var processNextTick=__webpack_require__(17);module.exports=Readable;var Duplex,isArray=__webpack_require__(39);Readable.ReadableState=ReadableState;__webpack_require__(30).EventEmitter;var EElistenerCount=function(emitter,type){return emitter.listeners(type).length},Stream=__webpack_require__(58),Buffer=__webpack_require__(1).Buffer,OurUint8Array=global.Uint8Array||function(){},util=__webpack_require__(13);util.inherits=__webpack_require__(2);var debugUtil=__webpack_require__(150),debug=void 0;debug=debugUtil&&debugUtil.debuglog?debugUtil.debuglog("stream"):function(){};var StringDecoder,BufferList=__webpack_require__(151),destroyImpl=__webpack_require__(59);util.inherits(Readable,Stream);var kProxyEvents=["error","close","destroy","pause","resume"];Object.defineProperty(Readable.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(value){this._readableState&&(this._readableState.destroyed=value)}}),Readable.prototype.destroy=destroyImpl.destroy,Readable.prototype._undestroy=destroyImpl.undestroy,Readable.prototype._destroy=function(err,cb){this.push(null),cb(err)},Readable.prototype.push=function(chunk,encoding){var skipChunkCheck,state=this._readableState;return state.objectMode?skipChunkCheck=!0:"string"==typeof chunk&&((encoding=encoding||state.defaultEncoding)!==state.encoding&&(chunk=Buffer.from(chunk,encoding),encoding=""),skipChunkCheck=!0),readableAddChunk(this,chunk,encoding,!1,skipChunkCheck)},Readable.prototype.unshift=function(chunk){return readableAddChunk(this,chunk,null,!0,!1)},Readable.prototype.isPaused=function(){return!1===this._readableState.flowing},Readable.prototype.setEncoding=function(enc){return StringDecoder||(StringDecoder=__webpack_require__(33).StringDecoder),this._readableState.decoder=new StringDecoder(enc),this._readableState.encoding=enc,this};var MAX_HWM=8388608;Readable.prototype.read=function(n){debug("read",n),n=parseInt(n,10);var state=this._readableState,nOrig=n;if(0!==n&&(state.emittedReadable=!1),0===n&&state.needReadable&&(state.length>=state.highWaterMark||state.ended))return debug("read: emitReadable",state.length,state.ended),0===state.length&&state.ended?endReadable(this):emitReadable(this),null;if(0===(n=howMuchToRead(n,state))&&state.ended)return 0===state.length&&endReadable(this),null;var doRead=state.needReadable;debug("need readable",doRead),(0===state.length||state.length-n<state.highWaterMark)&&debug("length less than watermark",doRead=!0),state.ended||state.reading?debug("reading or ended",doRead=!1):doRead&&(debug("do read"),state.reading=!0,state.sync=!0,0===state.length&&(state.needReadable=!0),this._read(state.highWaterMark),state.sync=!1,state.reading||(n=howMuchToRead(nOrig,state)));var ret;return null===(ret=n>0?fromList(n,state):null)?(state.needReadable=!0,n=0):state.length-=n,0===state.length&&(state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&endReadable(this)),null!==ret&&this.emit("data",ret),ret},Readable.prototype._read=function(n){this.emit("error",new Error("_read() is not implemented"))},Readable.prototype.pipe=function(dest,pipeOpts){function onunpipe(readable,unpipeInfo){debug("onunpipe"),readable===src&&unpipeInfo&&!1===unpipeInfo.hasUnpiped&&(unpipeInfo.hasUnpiped=!0,cleanup())}function onend(){debug("onend"),dest.end()}function cleanup(){debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",unpipe),src.removeListener("data",ondata),cleanedUp=!0,!state.awaitDrain||dest._writableState&&!dest._writableState.needDrain||ondrain()}function ondata(chunk){debug("ondata"),increasedAwaitDrain=!1,!1!==dest.write(chunk)||increasedAwaitDrain||((1===state.pipesCount&&state.pipes===dest||state.pipesCount>1&&-1!==indexOf(state.pipes,dest))&&!cleanedUp&&(debug("false write response, pause",src._readableState.awaitDrain),src._readableState.awaitDrain++,increasedAwaitDrain=!0),src.pause())}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),0===EElistenerCount(dest,"error")&&dest.emit("error",er)}function onclose(){dest.removeListener("finish",onfinish),unpipe()}function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe()}function unpipe(){debug("unpipe"),src.unpipe(dest)}var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest)}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var endFn=(!pipeOpts||!1!==pipeOpts.end)&&dest!==process.stdout&&dest!==process.stderr?onend:unpipe;state.endEmitted?processNextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);var cleanedUp=!1,increasedAwaitDrain=!1;return src.on("data",ondata),prependListener(dest,"error",onerror),dest.once("close",onclose),dest.once("finish",onfinish),dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest},Readable.prototype.unpipe=function(dest){var state=this._readableState,unpipeInfo={hasUnpiped:!1};if(0===state.pipesCount)return this;if(1===state.pipesCount)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this,unpipeInfo),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var i=0;i<len;i++)dests[i].emit("unpipe",this,unpipeInfo);return this}var index=indexOf(state.pipes,dest);return-1===index?this:(state.pipes.splice(index,1),state.pipesCount-=1,1===state.pipesCount&&(state.pipes=state.pipes[0]),dest.emit("unpipe",this,unpipeInfo),this)},Readable.prototype.on=function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn);if("data"===ev)!1!==this._readableState.flowing&&this.resume();else if("readable"===ev){var state=this._readableState;state.endEmitted||state.readableListening||(state.readableListening=state.needReadable=!0,state.emittedReadable=!1,state.reading?state.length&&emitReadable(this):processNextTick(nReadingNextTick,this))}return res},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.resume=function(){var state=this._readableState;return state.flowing||(debug("resume"),state.flowing=!0,resume(this,state)),this},Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Readable.prototype.wrap=function(stream){var state=this._readableState,paused=!1,self=this;stream.on("end",function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&self.push(chunk)}self.push(null)}),stream.on("data",function(chunk){debug("wrapped data"),state.decoder&&(chunk=state.decoder.write(chunk)),(!state.objectMode||null!==chunk&&void 0!==chunk)&&(state.objectMode||chunk&&chunk.length)&&(self.push(chunk)||(paused=!0,stream.pause()))});for(var i in stream)void 0===this[i]&&"function"==typeof stream[i]&&(this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i));for(var n=0;n<kProxyEvents.length;n++)stream.on(kProxyEvents[n],self.emit.bind(self,kProxyEvents[n]));return self._read=function(n){debug("wrapped _read",n),paused&&(paused=!1,stream.resume())},self},Readable._fromList=fromList}).call(exports,__webpack_require__(4),__webpack_require__(5))},function(module,exports,__webpack_require__){module.exports=__webpack_require__(30).EventEmitter},function(module,exports,__webpack_require__){"use strict";function emitErrorNT(self,err){self.emit("error",err)}var processNextTick=__webpack_require__(17);module.exports={destroy:function(err,cb){var _this=this,readableDestroyed=this._readableState&&this._readableState.destroyed,writableDestroyed=this._writableState&&this._writableState.destroyed;readableDestroyed||writableDestroyed?cb?cb(err):!err||this._writableState&&this._writableState.errorEmitted||processNextTick(emitErrorNT,this,err):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(err||null,function(err){!cb&&err?(processNextTick(emitErrorNT,_this,err),_this._writableState&&(_this._writableState.errorEmitted=!0)):cb&&cb(err)}))},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.finished=!1,this._writableState.errorEmitted=!1)}}},function(module,exports,__webpack_require__){"use strict";function TransformState(stream){this.afterTransform=function(er,data){return afterTransform(stream,er,data)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function afterTransform(stream,er,data){var ts=stream._transformState;ts.transforming=!1;var cb=ts.writecb;if(!cb)return stream.emit("error",new Error("write callback called multiple times"));ts.writechunk=null,ts.writecb=null,null!==data&&void 0!==data&&stream.push(data),cb(er);var rs=stream._readableState;rs.reading=!1,(rs.needReadable||rs.length<rs.highWaterMark)&&stream._read(rs.highWaterMark)}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex.call(this,options),this._transformState=new TransformState(this);var stream=this;this._readableState.needReadable=!0,this._readableState.sync=!1,options&&("function"==typeof options.transform&&(this._transform=options.transform),"function"==typeof options.flush&&(this._flush=options.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(er,data){done(stream,er,data)}):done(stream)})}function done(stream,er,data){if(er)return stream.emit("error",er);null!==data&&void 0!==data&&stream.push(data);var ws=stream._writableState,ts=stream._transformState;if(ws.length)throw new Error("Calling transform done when ws.length != 0");if(ts.transforming)throw new Error("Calling transform done when still transforming");return stream.push(null)}module.exports=Transform;var Duplex=__webpack_require__(7),util=__webpack_require__(13);util.inherits=__webpack_require__(2),util.inherits(Transform,Duplex),Transform.prototype.push=function(chunk,encoding){return this._transformState.needTransform=!1,Duplex.prototype.push.call(this,chunk,encoding)},Transform.prototype._transform=function(chunk,encoding,cb){throw new Error("_transform() is not implemented")},Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;if(ts.writecb=cb,ts.writechunk=chunk,ts.writeencoding=encoding,!ts.transforming){var rs=this._readableState;(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark)}},Transform.prototype._read=function(n){var ts=this._transformState;null!==ts.writechunk&&ts.writecb&&!ts.transforming?(ts.transforming=!0,this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform)):ts.needTransform=!0},Transform.prototype._destroy=function(err,cb){var _this=this;Duplex.prototype._destroy.call(this,err,function(err2){cb(err2),_this.emit("close")})}},function(module,exports,__webpack_require__){function StreamCipher(mode,key,iv,decrypt){Transform.call(this),this._cipher=new aes.AES(key),this._prev=Buffer.from(iv),this._cache=Buffer.allocUnsafe(0),this._secCache=Buffer.allocUnsafe(0),this._decrypt=decrypt,this._mode=mode}var aes=__webpack_require__(16),Buffer=__webpack_require__(1).Buffer,Transform=__webpack_require__(6);__webpack_require__(2)(StreamCipher,Transform),StreamCipher.prototype._update=function(chunk){return this._mode.encrypt(this,chunk,this._decrypt)},StreamCipher.prototype._final=function(){this._cipher.scrub()},module.exports=StreamCipher},function(module,exports,__webpack_require__){var Buffer=__webpack_require__(1).Buffer,MD5=__webpack_require__(159);module.exports=function(password,salt,keyBits,ivLen){if(Buffer.isBuffer(password)||(password=Buffer.from(password,"binary")),salt&&(Buffer.isBuffer(salt)||(salt=Buffer.from(salt,"binary")),8!==salt.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var keyLen=keyBits/8,key=Buffer.alloc(keyLen),iv=Buffer.alloc(ivLen||0),tmp=Buffer.alloc(0);keyLen>0||ivLen>0;){var hash=new MD5;hash.update(tmp),hash.update(password),salt&&hash.update(salt),tmp=hash.digest();var used=0;if(keyLen>0){var keyStart=key.length-keyLen;used=Math.min(keyLen,tmp.length),tmp.copy(key,keyStart,0,used),keyLen-=used}if(used<tmp.length&&ivLen>0){var ivStart=iv.length-ivLen,length=Math.min(ivLen,tmp.length-used);tmp.copy(iv,ivStart,used,used+length),ivLen-=length}}return tmp.fill(0),{key:key,iv:iv}}},function(module,exports,__webpack_require__){(function(global,process){function inspect(obj,opts){var ctx={seen:[],stylize:stylizeNoColor};return arguments.length>=3&&(ctx.depth=arguments[2]),arguments.length>=4&&(ctx.colors=arguments[3]),isBoolean(opts)?ctx.showHidden=opts:opts&&exports._extend(ctx,opts),isUndefined(ctx.showHidden)&&(ctx.showHidden=!1),isUndefined(ctx.depth)&&(ctx.depth=2),isUndefined(ctx.colors)&&(ctx.colors=!1),isUndefined(ctx.customInspect)&&(ctx.customInspect=!0),ctx.colors&&(ctx.stylize=stylizeWithColor),formatValue(ctx,obj,ctx.depth)}function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];return style?"["+inspect.colors[style][0]+"m"+str+"["+inspect.colors[style][1]+"m":str}function stylizeNoColor(str,styleType){return str}function arrayToHash(array){var hash={};return array.forEach(function(val,idx){hash[val]=!0}),hash}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&(!value.constructor||value.constructor.prototype!==value)){var ret=value.inspect(recurseTimes,ctx);return isString(ret)||(ret=formatValue(ctx,ret,recurseTimes)),ret}var primitive=formatPrimitive(ctx,value);if(primitive)return primitive;var keys=Object.keys(value),visibleKeys=arrayToHash(keys);if(ctx.showHidden&&(keys=Object.getOwnPropertyNames(value)),isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0))return formatError(value);if(0===keys.length){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value))return ctx.stylize(RegExp.prototype.toString.call(value),"regexp");if(isDate(value))return ctx.stylize(Date.prototype.toString.call(value),"date");if(isError(value))return formatError(value)}var base="",array=!1,braces=["{","}"];if(isArray(value)&&(array=!0,braces=["[","]"]),isFunction(value)&&(base=" [Function"+(value.name?": "+value.name:"")+"]"),isRegExp(value)&&(base=" "+RegExp.prototype.toString.call(value)),isDate(value)&&(base=" "+Date.prototype.toUTCString.call(value)),isError(value)&&(base=" "+formatError(value)),0===keys.length&&(!array||0==value.length))return braces[0]+base+braces[1];if(recurseTimes<0)return isRegExp(value)?ctx.stylize(RegExp.prototype.toString.call(value),"regexp"):ctx.stylize("[Object]","special");ctx.seen.push(value);var output;return output=array?formatArray(ctx,value,recurseTimes,visibleKeys,keys):keys.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)}),ctx.seen.pop(),reduceToSingleString(output,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}return isNumber(value)?ctx.stylize(""+value,"number"):isBoolean(value)?ctx.stylize(""+value,"boolean"):isNull(value)?ctx.stylize("null","null"):void 0}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){for(var output=[],i=0,l=value.length;i<l;++i)hasOwnProperty(value,String(i))?output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,String(i),!0)):output.push("");return keys.forEach(function(key){key.match(/^\d+$/)||output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,key,!0))}),output}function formatProperty(ctx,value,recurseTimes,visibleKeys,key,array){var name,str,desc;if((desc=Object.getOwnPropertyDescriptor(value,key)||{value:value[key]}).get?str=desc.set?ctx.stylize("[Getter/Setter]","special"):ctx.stylize("[Getter]","special"):desc.set&&(str=ctx.stylize("[Setter]","special")),hasOwnProperty(visibleKeys,key)||(name="["+key+"]"),str||(ctx.seen.indexOf(desc.value)<0?(str=isNull(recurseTimes)?formatValue(ctx,desc.value,null):formatValue(ctx,desc.value,recurseTimes-1)).indexOf("\n")>-1&&(str=array?str.split("\n").map(function(line){return"  "+line}).join("\n").substr(2):"\n"+str.split("\n").map(function(line){return"   "+line}).join("\n")):str=ctx.stylize("[Circular]","special")),isUndefined(name)){if(array&&key.match(/^\d+$/))return str;(name=JSON.stringify(""+key)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(name=name.substr(1,name.length-2),name=ctx.stylize(name,"name")):(name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),name=ctx.stylize(name,"string"))}return name+": "+str}function reduceToSingleString(output,base,braces){var numLinesEst=0;return output.reduce(function(prev,cur){return numLinesEst++,cur.indexOf("\n")>=0&&numLinesEst++,prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?braces[0]+(""===base?"":base+"\n ")+" "+output.join(",\n  ")+" "+braces[1]:braces[0]+base+" "+output.join(", ")+" "+braces[1]}function isArray(ar){return Array.isArray(ar)}function isBoolean(arg){return"boolean"==typeof arg}function isNull(arg){return null===arg}function isNumber(arg){return"number"==typeof arg}function isString(arg){return"string"==typeof arg}function isUndefined(arg){return void 0===arg}function isRegExp(re){return isObject(re)&&"[object RegExp]"===objectToString(re)}function isObject(arg){return"object"==typeof arg&&null!==arg}function isDate(d){return isObject(d)&&"[object Date]"===objectToString(d)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(arg){return"function"==typeof arg}function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}function timestamp(){var d=new Date,time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){for(var objects=[],i=0;i<arguments.length;i++)objects.push(inspect(arguments[i]));return objects.join(" ")}for(var i=1,args=arguments,len=args.length,str=String(f).replace(formatRegExp,function(x){if("%%"===x)return"%";if(i>=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}}),x=args[i];i<len;x=args[++i])isNull(x)||!isObject(x)?str+=" "+x:str+=" "+inspect(x);return str},exports.deprecate=function(fn,msg){if(isUndefined(global.process))return function(){return exports.deprecate(fn,msg).apply(this,arguments)};if(!0===process.noDeprecation)return fn;var warned=!1;return function(){if(!warned){if(process.throwDeprecation)throw new Error(msg);process.traceDeprecation?console.trace(msg):console.error(msg),warned=!0}return fn.apply(this,arguments)}};var debugEnviron,debugs={};exports.debuglog=function(set){if(isUndefined(debugEnviron)&&(debugEnviron=Object({NODE_ENV:"production",AEGIR_GHTOKEN:"546df08347db4660c85688e7eae14b5ffa2e04dd"}).NODE_DEBUG||""),set=set.toUpperCase(),!debugs[set])if(new RegExp("\\b"+set+"\\b","i").test(debugEnviron)){var pid=process.pid;debugs[set]=function(){var msg=exports.format.apply(exports,arguments);console.error("%s %d: %s",set,pid,msg)}}else debugs[set]=function(){};return debugs[set]},exports.inspect=inspect,inspect.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]},inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=function(arg){return null==arg},exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=function(arg){return"symbol"==typeof arg},exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=function(arg){return null===arg||"boolean"==typeof arg||"number"==typeof arg||"string"==typeof arg||"symbol"==typeof arg||void 0===arg},exports.isBuffer=__webpack_require__(168);var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))},exports.inherits=__webpack_require__(169),exports._extend=function(origin,add){if(!add||!isObject(add))return origin;for(var keys=Object.keys(add),i=keys.length;i--;)origin[keys[i]]=add[keys[i]];return origin}}).call(exports,__webpack_require__(4),__webpack_require__(5))},function(module,exports,__webpack_require__){"use strict";(function(Buffer){const setImmediate=__webpack_require__(36);exports.toCallback=(doWork=>(function(input,callback){const done=(err,res)=>setImmediate(()=>{callback(err,res)});let res;try{res=doWork(input)}catch(err){return void done(err)}done(null,res)})),exports.toBuf=((doWork,other)=>input=>{let result=doWork(input,other);return new Buffer(result,"hex")}),exports.fromString=((doWork,other)=>_input=>{const input=Buffer.isBuffer(_input)?_input.toString():_input;return doWork(input,other)}),exports.fromNumberTo32BitBuf=((doWork,other)=>input=>{let number=doWork(input,other);const bytes=new Array(4);for(let i=0;i<4;i++)bytes[i]=255&number,number>>=8;return Buffer.from(bytes)})}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";(function(setImmediate,process){function fallback(fn){setTimeout(fn,0)}function wrap(defer){return function(fn){var args=(0,_slice2.default)(arguments,1);defer(function(){fn.apply(null,args)})}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.hasNextTick=exports.hasSetImmediate=void 0,exports.fallback=fallback,exports.wrap=wrap;var _defer,_slice2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__(19)),hasSetImmediate=exports.hasSetImmediate="function"==typeof setImmediate&&setImmediate,hasNextTick=exports.hasNextTick="object"==typeof process&&"function"==typeof process.nextTick;_defer=hasSetImmediate?setImmediate:hasNextTick?process.nextTick:fallback,exports.default=wrap(_defer)}).call(exports,__webpack_require__(27).setImmediate,__webpack_require__(5))},function(module,exports,__webpack_require__){(function(Buffer){function uint32ToHex(val){return(4294967296+val).toString(16).substring(1)}var ERROR_MSG_INPUT="Input must be an string, Buffer or Uint8Array";module.exports={normalizeInput:function(input){var ret;if(input instanceof Uint8Array)ret=input;else if(input instanceof Buffer)ret=new Uint8Array(input);else{if("string"!=typeof input)throw new Error(ERROR_MSG_INPUT);ret=new Uint8Array(Buffer.from(input,"utf8"))}return ret},toHex:function(bytes){return Array.prototype.map.call(bytes,function(n){return(n<16?"0":"")+n.toString(16)}).join("")},debugPrint:function(label,arr,size){for(var msg="\n"+label+" = ",i=0;i<arr.length;i+=2){if(32===size)msg+=uint32ToHex(arr[i]).toUpperCase(),msg+=" ",msg+=uint32ToHex(arr[i+1]).toUpperCase();else{if(64!==size)throw new Error("Invalid size "+size);msg+=uint32ToHex(arr[i+1]).toUpperCase(),msg+=uint32ToHex(arr[i]).toUpperCase()}i%6==4?msg+="\n"+new Array(label.length+4).join(" "):i<arr.length-2&&(msg+=" ")}console.log(msg)},testSpeed:function(hashFn,N,M){for(var startMs=(new Date).getTime(),input=new Uint8Array(N),i=0;i<N;i++)input[i]=i%256;var genMs=(new Date).getTime();for(console.log("Generated random input in "+(genMs-startMs)+"ms"),startMs=genMs,i=0;i<M;i++){var hashHex=hashFn(input),hashMs=(new Date).getTime(),ms=hashMs-startMs;startMs=hashMs,console.log("Hashed in "+ms+"ms: "+hashHex.substring(0,20)+"..."),console.log(Math.round(N/(1<<20)/(ms/1e3)*100)/100+" MB PER SECOND")}}}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";function exportKey(pair){return Promise.all([webcrypto.subtle.exportKey("jwk",pair.privateKey),webcrypto.subtle.exportKey("jwk",pair.publicKey)])}function derivePublicFromPrivate(jwKey){return webcrypto.subtle.importKey("jwk",{kty:jwKey.kty,n:jwKey.n,e:jwKey.e,alg:jwKey.alg,kid:jwKey.kid},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"])}const nodeify=__webpack_require__(15),Buffer=__webpack_require__(1).Buffer,webcrypto=__webpack_require__(28)();exports.utils=__webpack_require__(180),exports.generateKey=function(bits,callback){nodeify(webcrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:bits,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(exportKey).then(keys=>({privateKey:keys[0],publicKey:keys[1]})),callback)},exports.unmarshalPrivateKey=function(key,callback){const privateKey=webcrypto.subtle.importKey("jwk",key,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);nodeify(Promise.all([privateKey,derivePublicFromPrivate(key)]).then(keys=>exportKey({privateKey:keys[0],publicKey:keys[1]})).then(keys=>({privateKey:keys[0],publicKey:keys[1]})),callback)},exports.getRandomValues=function(arr){return Buffer.from(webcrypto.getRandomValues(arr))},exports.hashAndSign=function(key,msg,callback){nodeify(webcrypto.subtle.importKey("jwk",key,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]).then(privateKey=>webcrypto.subtle.sign({name:"RSASSA-PKCS1-v1_5"},privateKey,Uint8Array.from(msg))).then(sig=>Buffer.from(sig)),callback)},exports.hashAndVerify=function(key,sig,msg,callback){nodeify(webcrypto.subtle.importKey("jwk",key,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]).then(publicKey=>webcrypto.subtle.verify({name:"RSASSA-PKCS1-v1_5"},publicKey,sig,msg)),callback)}},function(module,exports,__webpack_require__){function DecoderBuffer(base,options){Reporter.call(this,options),Buffer.isBuffer(base)?(this.base=base,this.offset=0,this.length=base.length):this.error("Input not Buffer")}function EncoderBuffer(value,reporter){if(Array.isArray(value))this.length=0,this.value=value.map(function(item){return item instanceof EncoderBuffer||(item=new EncoderBuffer(item,reporter)),this.length+=item.length,item},this);else if("number"==typeof value){if(!(0<=value&&value<=255))return reporter.error("non-byte EncoderBuffer value");this.value=value,this.length=1}else if("string"==typeof value)this.value=value,this.length=Buffer.byteLength(value);else{if(!Buffer.isBuffer(value))return reporter.error("Unsupported type: "+typeof value);this.value=value,this.length=value.length}}var inherits=__webpack_require__(2),Reporter=__webpack_require__(14).Reporter,Buffer=__webpack_require__(0).Buffer;inherits(DecoderBuffer,Reporter),exports.DecoderBuffer=DecoderBuffer,DecoderBuffer.prototype.save=function(){return{offset:this.offset,reporter:Reporter.prototype.save.call(this)}},DecoderBuffer.prototype.restore=function(save){var res=new DecoderBuffer(this.base);return res.offset=save.offset,res.length=this.offset,this.offset=save.offset,Reporter.prototype.restore.call(this,save.reporter),res},DecoderBuffer.prototype.isEmpty=function(){return this.offset===this.length},DecoderBuffer.prototype.readUInt8=function(fail){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(fail||"DecoderBuffer overrun")},DecoderBuffer.prototype.skip=function(bytes,fail){if(!(this.offset+bytes<=this.length))return this.error(fail||"DecoderBuffer overrun");var res=new DecoderBuffer(this.base);return res._reporterState=this._reporterState,res.offset=this.offset,res.length=this.offset+bytes,this.offset+=bytes,res},DecoderBuffer.prototype.raw=function(save){return this.base.slice(save?save.offset:this.offset,this.length)},exports.EncoderBuffer=EncoderBuffer,EncoderBuffer.prototype.join=function(out,offset){return out||(out=new Buffer(this.length)),offset||(offset=0),0===this.length?out:(Array.isArray(this.value)?this.value.forEach(function(item){item.join(out,offset),offset+=item.length}):("number"==typeof this.value?out[offset]=this.value:"string"==typeof this.value?out.write(this.value,offset):Buffer.isBuffer(this.value)&&this.value.copy(out,offset),offset+=this.length),out)}},function(module,exports,__webpack_require__){var constants=exports;constants._reverse=function(map){var res={};return Object.keys(map).forEach(function(key){(0|key)==key&&(key|=0);var value=map[key];res[value]=key}),res},constants.der=__webpack_require__(189)},function(module,exports,__webpack_require__){function DERDecoder(entity){this.enc="der",this.name=entity.name,this.entity=entity,this.tree=new DERNode,this.tree._init(entity.body)}function DERNode(parent){base.Node.call(this,"der",parent)}function derDecodeTag(buf,fail){var tag=buf.readUInt8(fail);if(buf.isError(tag))return tag;var cls=der.tagClass[tag>>6],primitive=0==(32&tag);if(31==(31&tag)){var oct=tag;for(tag=0;128==(128&oct);){if(oct=buf.readUInt8(fail),buf.isError(oct))return oct;tag<<=7,tag|=127&oct}}else tag&=31;return{cls:cls,primitive:primitive,tag:tag,tagStr:der.tag[tag]}}function derDecodeLen(buf,primitive,fail){var len=buf.readUInt8(fail);if(buf.isError(len))return len;if(!primitive&&128===len)return null;if(0==(128&len))return len;var num=127&len;if(num>4)return buf.error("length octect is too long");len=0;for(var i=0;i<num;i++){len<<=8;var j=buf.readUInt8(fail);if(buf.isError(j))return j;len|=j}return len}var inherits=__webpack_require__(2),asn1=__webpack_require__(8),base=asn1.base,bignum=asn1.bignum,der=asn1.constants.der;module.exports=DERDecoder,DERDecoder.prototype.decode=function(data,options){return data instanceof base.DecoderBuffer||(data=new base.DecoderBuffer(data,options)),this.tree._decode(data,options)},inherits(DERNode,base.Node),DERNode.prototype._peekTag=function(buffer,tag,any){if(buffer.isEmpty())return!1;var state=buffer.save(),decodedTag=derDecodeTag(buffer,'Failed to peek tag: "'+tag+'"');return buffer.isError(decodedTag)?decodedTag:(buffer.restore(state),decodedTag.tag===tag||decodedTag.tagStr===tag||decodedTag.tagStr+"of"===tag||any)},DERNode.prototype._decodeTag=function(buffer,tag,any){var decodedTag=derDecodeTag(buffer,'Failed to decode tag of "'+tag+'"');if(buffer.isError(decodedTag))return decodedTag;var len=derDecodeLen(buffer,decodedTag.primitive,'Failed to get length of "'+tag+'"');if(buffer.isError(len))return len;if(!any&&decodedTag.tag!==tag&&decodedTag.tagStr!==tag&&decodedTag.tagStr+"of"!==tag)return buffer.error('Failed to match tag: "'+tag+'"');if(decodedTag.primitive||null!==len)return buffer.skip(len,'Failed to match body of: "'+tag+'"');var state=buffer.save(),res=this._skipUntilEnd(buffer,'Failed to skip indefinite length body: "'+this.tag+'"');return buffer.isError(res)?res:(len=buffer.offset-state.offset,buffer.restore(state),buffer.skip(len,'Failed to match body of: "'+tag+'"'))},DERNode.prototype._skipUntilEnd=function(buffer,fail){for(;;){var tag=derDecodeTag(buffer,fail);if(buffer.isError(tag))return tag;var len=derDecodeLen(buffer,tag.primitive,fail);if(buffer.isError(len))return len;var res;if(res=tag.primitive||null!==len?buffer.skip(len):this._skipUntilEnd(buffer,fail),buffer.isError(res))return res;if("end"===tag.tagStr)break}},DERNode.prototype._decodeList=function(buffer,tag,decoder,options){for(var result=[];!buffer.isEmpty();){var possibleEnd=this._peekTag(buffer,"end");if(buffer.isError(possibleEnd))return possibleEnd;var res=decoder.decode(buffer,"der",options);if(buffer.isError(res)&&possibleEnd)break;result.push(res)}return result},DERNode.prototype._decodeStr=function(buffer,tag){if("bitstr"===tag){var unused=buffer.readUInt8();return buffer.isError(unused)?unused:{unused:unused,data:buffer.raw()}}if("bmpstr"===tag){var raw=buffer.raw();if(raw.length%2==1)return buffer.error("Decoding of string type: bmpstr length mismatch");for(var str="",i=0;i<raw.length/2;i++)str+=String.fromCharCode(raw.readUInt16BE(2*i));return str}if("numstr"===tag){var numstr=buffer.raw().toString("ascii");return this._isNumstr(numstr)?numstr:buffer.error("Decoding of string type: numstr unsupported characters")}if("octstr"===tag)return buffer.raw();if("objDesc"===tag)return buffer.raw();if("printstr"===tag){var printstr=buffer.raw().toString("ascii");return this._isPrintstr(printstr)?printstr:buffer.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(tag)?buffer.raw().toString():buffer.error("Decoding of string type: "+tag+" unsupported")},DERNode.prototype._decodeObjid=function(buffer,values,relative){for(var result,identifiers=[],ident=0;!buffer.isEmpty();){var subident=buffer.readUInt8();ident<<=7,ident|=127&subident,0==(128&subident)&&(identifiers.push(ident),ident=0)}128&subident&&identifiers.push(ident);var first=identifiers[0]/40|0,second=identifiers[0]%40;if(result=relative?identifiers:[first,second].concat(identifiers.slice(1)),values){var tmp=values[result.join(" ")];void 0===tmp&&(tmp=values[result.join(".")]),void 0!==tmp&&(result=tmp)}return result},DERNode.prototype._decodeTime=function(buffer,tag){var str=buffer.raw().toString();if("gentime"===tag)var year=0|str.slice(0,4),mon=0|str.slice(4,6),day=0|str.slice(6,8),hour=0|str.slice(8,10),min=0|str.slice(10,12),sec=0|str.slice(12,14);else{if("utctime"!==tag)return buffer.error("Decoding "+tag+" time is not supported yet");var year=0|str.slice(0,2),mon=0|str.slice(2,4),day=0|str.slice(4,6),hour=0|str.slice(6,8),min=0|str.slice(8,10),sec=0|str.slice(10,12);year=year<70?2e3+year:1900+year}return Date.UTC(year,mon-1,day,hour,min,sec,0)},DERNode.prototype._decodeNull=function(buffer){return null},DERNode.prototype._decodeBool=function(buffer){var res=buffer.readUInt8();return buffer.isError(res)?res:0!==res},DERNode.prototype._decodeInt=function(buffer,values){var raw=buffer.raw(),res=new bignum(raw);return values&&(res=values[res.toString(10)]||res),res},DERNode.prototype._use=function(entity,obj){return"function"==typeof entity&&(entity=entity(obj)),entity._getDecoder("der").tree}},function(module,exports,__webpack_require__){function DEREncoder(entity){this.enc="der",this.name=entity.name,this.entity=entity,this.tree=new DERNode,this.tree._init(entity.body)}function DERNode(parent){base.Node.call(this,"der",parent)}function two(num){return num<10?"0"+num:num}function encodeTag(tag,primitive,cls,reporter){var res;if("seqof"===tag?tag="seq":"setof"===tag&&(tag="set"),der.tagByName.hasOwnProperty(tag))res=der.tagByName[tag];else{if("number"!=typeof tag||(0|tag)!==tag)return reporter.error("Unknown tag: "+tag);res=tag}return res>=31?reporter.error("Multi-octet tag encoding unsupported"):(primitive||(res|=32),res|=der.tagClassByName[cls||"universal"]<<6)}var inherits=__webpack_require__(2),Buffer=__webpack_require__(0).Buffer,asn1=__webpack_require__(8),base=asn1.base,der=asn1.constants.der;module.exports=DEREncoder,DEREncoder.prototype.encode=function(data,reporter){return this.tree._encode(data,reporter).join()},inherits(DERNode,base.Node),DERNode.prototype._encodeComposite=function(tag,primitive,cls,content){var encodedTag=encodeTag(tag,primitive,cls,this.reporter);if(content.length<128)return(header=new Buffer(2))[0]=encodedTag,header[1]=content.length,this._createEncoderBuffer([header,content]);for(var lenOctets=1,i=content.length;i>=256;i>>=8)lenOctets++;var header=new Buffer(2+lenOctets);header[0]=encodedTag,header[1]=128|lenOctets;for(var i=1+lenOctets,j=content.length;j>0;i--,j>>=8)header[i]=255&j;return this._createEncoderBuffer([header,content])},DERNode.prototype._encodeStr=function(str,tag){if("bitstr"===tag)return this._createEncoderBuffer([0|str.unused,str.data]);if("bmpstr"===tag){for(var buf=new Buffer(2*str.length),i=0;i<str.length;i++)buf.writeUInt16BE(str.charCodeAt(i),2*i);return this._createEncoderBuffer(buf)}return"numstr"===tag?this._isNumstr(str)?this._createEncoderBuffer(str):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===tag?this._isPrintstr(str)?this._createEncoderBuffer(str):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(tag)?this._createEncoderBuffer(str):"objDesc"===tag?this._createEncoderBuffer(str):this.reporter.error("Encoding of string type: "+tag+" unsupported")},DERNode.prototype._encodeObjid=function(id,values,relative){if("string"==typeof id){if(!values)return this.reporter.error("string objid given, but no values map found");if(!values.hasOwnProperty(id))return this.reporter.error("objid not found in values map");id=values[id].split(/[\s\.]+/g);for(i=0;i<id.length;i++)id[i]|=0}else if(Array.isArray(id)){id=id.slice();for(i=0;i<id.length;i++)id[i]|=0}if(!Array.isArray(id))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(id));if(!relative){if(id[1]>=40)return this.reporter.error("Second objid identifier OOB");id.splice(0,2,40*id[0]+id[1])}for(var size=0,i=0;i<id.length;i++){ident=id[i];for(size++;ident>=128;ident>>=7)size++}for(var objid=new Buffer(size),offset=objid.length-1,i=id.length-1;i>=0;i--){var ident=id[i];for(objid[offset--]=127&ident;(ident>>=7)>0;)objid[offset--]=128|127&ident}return this._createEncoderBuffer(objid)},DERNode.prototype._encodeTime=function(time,tag){var str,date=new Date(time);return"gentime"===tag?str=[two(date.getFullYear()),two(date.getUTCMonth()+1),two(date.getUTCDate()),two(date.getUTCHours()),two(date.getUTCMinutes()),two(date.getUTCSeconds()),"Z"].join(""):"utctime"===tag?str=[two(date.getFullYear()%100),two(date.getUTCMonth()+1),two(date.getUTCDate()),two(date.getUTCHours()),two(date.getUTCMinutes()),two(date.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+tag+" time is not supported yet"),this._encodeStr(str,"octstr")},DERNode.prototype._encodeNull=function(){return this._createEncoderBuffer("")},DERNode.prototype._encodeInt=function(num,values){if("string"==typeof num){if(!values)return this.reporter.error("String int or enum given, but no values map");if(!values.hasOwnProperty(num))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(num));num=values[num]}if("number"!=typeof num&&!Buffer.isBuffer(num)){var numArray=num.toArray();!num.sign&&128&numArray[0]&&numArray.unshift(0),num=new Buffer(numArray)}if(Buffer.isBuffer(num)){size=num.length;0===num.length&&size++;var out=new Buffer(size);return num.copy(out),0===num.length&&(out[0]=0),this._createEncoderBuffer(out)}if(num<128)return this._createEncoderBuffer(num);if(num<256)return this._createEncoderBuffer([0,num]);for(var size=1,i=num;i>=256;i>>=8)size++;for(i=(out=new Array(size)).length-1;i>=0;i--)out[i]=255&num,num>>=8;return 128&out[0]&&out.unshift(0),this._createEncoderBuffer(new Buffer(out))},DERNode.prototype._encodeBool=function(value){return this._createEncoderBuffer(value?255:0)},DERNode.prototype._use=function(entity,obj){return"function"==typeof entity&&(entity=entity(obj)),entity._getEncoder("der").tree},DERNode.prototype._skipDefault=function(dataBuffer,reporter,parent){var i,state=this._baseState;if(null===state.default)return!1;var data=dataBuffer.join();if(void 0===state.defaultBuffer&&(state.defaultBuffer=this._encodeValue(state.default,reporter,parent).join()),data.length!==state.defaultBuffer.length)return!1;for(i=0;i<data.length;i++)if(data[i]!==state.defaultBuffer[i])return!1;return!0}},function(module,exports,__webpack_require__){"use strict";const BN=__webpack_require__(8).bignum,Buffer=__webpack_require__(1).Buffer;exports.toBase64=function(bn,len){return bn.toArrayLike(Buffer,"be",len).toString("base64").replace(/(=*)$/,"").replace(/\+/g,"-").replace(/\//g,"_")},exports.toBn=function(str){return new BN(Buffer.from(str,"base64"))}},function(module,exports){module.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_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(module,exports,__webpack_require__){"use strict";function core_md5(x,len){x[len>>5]|=128<<len%32,x[14+(len+64>>>9<<4)]=len;for(var a=1732584193,b=-271733879,c=-1732584194,d=271733878,i=0;i<x.length;i+=16){var olda=a,oldb=b,oldc=c,oldd=d;b=md5_ii(b=md5_ii(b=md5_ii(b=md5_ii(b=md5_hh(b=md5_hh(b=md5_hh(b=md5_hh(b=md5_gg(b=md5_gg(b=md5_gg(b=md5_gg(b=md5_ff(b=md5_ff(b=md5_ff(b=md5_ff(b,c=md5_ff(c,d=md5_ff(d,a=md5_ff(a,b,c,d,x[i+0],7,-680876936),b,c,x[i+1],12,-389564586),a,b,x[i+2],17,606105819),d,a,x[i+3],22,-1044525330),c=md5_ff(c,d=md5_ff(d,a=md5_ff(a,b,c,d,x[i+4],7,-176418897),b,c,x[i+5],12,1200080426),a,b,x[i+6],17,-1473231341),d,a,x[i+7],22,-45705983),c=md5_ff(c,d=md5_ff(d,a=md5_ff(a,b,c,d,x[i+8],7,1770035416),b,c,x[i+9],12,-1958414417),a,b,x[i+10],17,-42063),d,a,x[i+11],22,-1990404162),c=md5_ff(c,d=md5_ff(d,a=md5_ff(a,b,c,d,x[i+12],7,1804603682),b,c,x[i+13],12,-40341101),a,b,x[i+14],17,-1502002290),d,a,x[i+15],22,1236535329),c=md5_gg(c,d=md5_gg(d,a=md5_gg(a,b,c,d,x[i+1],5,-165796510),b,c,x[i+6],9,-1069501632),a,b,x[i+11],14,643717713),d,a,x[i+0],20,-373897302),c=md5_gg(c,d=md5_gg(d,a=md5_gg(a,b,c,d,x[i+5],5,-701558691),b,c,x[i+10],9,38016083),a,b,x[i+15],14,-660478335),d,a,x[i+4],20,-405537848),c=md5_gg(c,d=md5_gg(d,a=md5_gg(a,b,c,d,x[i+9],5,568446438),b,c,x[i+14],9,-1019803690),a,b,x[i+3],14,-187363961),d,a,x[i+8],20,1163531501),c=md5_gg(c,d=md5_gg(d,a=md5_gg(a,b,c,d,x[i+13],5,-1444681467),b,c,x[i+2],9,-51403784),a,b,x[i+7],14,1735328473),d,a,x[i+12],20,-1926607734),c=md5_hh(c,d=md5_hh(d,a=md5_hh(a,b,c,d,x[i+5],4,-378558),b,c,x[i+8],11,-2022574463),a,b,x[i+11],16,1839030562),d,a,x[i+14],23,-35309556),c=md5_hh(c,d=md5_hh(d,a=md5_hh(a,b,c,d,x[i+1],4,-1530992060),b,c,x[i+4],11,1272893353),a,b,x[i+7],16,-155497632),d,a,x[i+10],23,-1094730640),c=md5_hh(c,d=md5_hh(d,a=md5_hh(a,b,c,d,x[i+13],4,681279174),b,c,x[i+0],11,-358537222),a,b,x[i+3],16,-722521979),d,a,x[i+6],23,76029189),c=md5_hh(c,d=md5_hh(d,a=md5_hh(a,b,c,d,x[i+9],4,-640364487),b,c,x[i+12],11,-421815835),a,b,x[i+15],16,530742520),d,a,x[i+2],23,-995338651),c=md5_ii(c,d=md5_ii(d,a=md5_ii(a,b,c,d,x[i+0],6,-198630844),b,c,x[i+7],10,1126891415),a,b,x[i+14],15,-1416354905),d,a,x[i+5],21,-57434055),c=md5_ii(c,d=md5_ii(d,a=md5_ii(a,b,c,d,x[i+12],6,1700485571),b,c,x[i+3],10,-1894986606),a,b,x[i+10],15,-1051523),d,a,x[i+1],21,-2054922799),c=md5_ii(c,d=md5_ii(d,a=md5_ii(a,b,c,d,x[i+8],6,1873313359),b,c,x[i+15],10,-30611744),a,b,x[i+6],15,-1560198380),d,a,x[i+13],21,1309151649),c=md5_ii(c,d=md5_ii(d,a=md5_ii(a,b,c,d,x[i+4],6,-145523070),b,c,x[i+11],10,-1120210379),a,b,x[i+2],15,718787259),d,a,x[i+9],21,-343485551),a=safe_add(a,olda),b=safe_add(b,oldb),c=safe_add(c,oldc),d=safe_add(d,oldd)}return[a,b,c,d]}function md5_cmn(q,a,b,x,s,t){return safe_add(bit_rol(safe_add(safe_add(a,q),safe_add(x,t)),s),b)}function md5_ff(a,b,c,d,x,s,t){return md5_cmn(b&c|~b&d,a,b,x,s,t)}function md5_gg(a,b,c,d,x,s,t){return md5_cmn(b&d|c&~d,a,b,x,s,t)}function md5_hh(a,b,c,d,x,s,t){return md5_cmn(b^c^d,a,b,x,s,t)}function md5_ii(a,b,c,d,x,s,t){return md5_cmn(c^(b|~d),a,b,x,s,t)}function safe_add(x,y){var lsw=(65535&x)+(65535&y);return(x>>16)+(y>>16)+(lsw>>16)<<16|65535&lsw}function bit_rol(num,cnt){return num<<cnt|num>>>32-cnt}var makeHash=__webpack_require__(207);module.exports=function(buf){return makeHash(buf,core_md5)}},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function RIPEMD160(){HashBase.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function rotl(x,n){return x<<n|x>>>32-n}function fn1(a,b,c,d,e,m,k,s){return rotl(a+(b^c^d)+m+k|0,s)+e|0}function fn2(a,b,c,d,e,m,k,s){return rotl(a+(b&c|~b&d)+m+k|0,s)+e|0}function fn3(a,b,c,d,e,m,k,s){return rotl(a+((b|~c)^d)+m+k|0,s)+e|0}function fn4(a,b,c,d,e,m,k,s){return rotl(a+(b&d|c&~d)+m+k|0,s)+e|0}function fn5(a,b,c,d,e,m,k,s){return rotl(a+(b^(c|~d))+m+k|0,s)+e|0}var inherits=__webpack_require__(2),HashBase=__webpack_require__(208);inherits(RIPEMD160,HashBase),RIPEMD160.prototype._update=function(){for(var m=new Array(16),i=0;i<16;++i)m[i]=this._block.readInt32LE(4*i);var al=this._a,bl=this._b,cl=this._c,dl=this._d,el=this._e;el=fn1(el,al=fn1(al,bl,cl,dl,el,m[0],0,11),bl,cl=rotl(cl,10),dl,m[1],0,14),bl=fn1(bl=rotl(bl,10),cl=fn1(cl,dl=fn1(dl,el,al,bl,cl,m[2],0,15),el,al=rotl(al,10),bl,m[3],0,12),dl,el=rotl(el,10),al,m[4],0,5),dl=fn1(dl=rotl(dl,10),el=fn1(el,al=fn1(al,bl,cl,dl,el,m[5],0,8),bl,cl=rotl(cl,10),dl,m[6],0,7),al,bl=rotl(bl,10),cl,m[7],0,9),al=fn1(al=rotl(al,10),bl=fn1(bl,cl=fn1(cl,dl,el,al,bl,m[8],0,11),dl,el=rotl(el,10),al,m[9],0,13),cl,dl=rotl(dl,10),el,m[10],0,14),cl=fn1(cl=rotl(cl,10),dl=fn1(dl,el=fn1(el,al,bl,cl,dl,m[11],0,15),al,bl=rotl(bl,10),cl,m[12],0,6),el,al=rotl(al,10),bl,m[13],0,7),el=fn2(el=rotl(el,10),al=fn1(al,bl=fn1(bl,cl,dl,el,al,m[14],0,9),cl,dl=rotl(dl,10),el,m[15],0,8),bl,cl=rotl(cl,10),dl,m[7],1518500249,7),bl=fn2(bl=rotl(bl,10),cl=fn2(cl,dl=fn2(dl,el,al,bl,cl,m[4],1518500249,6),el,al=rotl(al,10),bl,m[13],1518500249,8),dl,el=rotl(el,10),al,m[1],1518500249,13),dl=fn2(dl=rotl(dl,10),el=fn2(el,al=fn2(al,bl,cl,dl,el,m[10],1518500249,11),bl,cl=rotl(cl,10),dl,m[6],1518500249,9),al,bl=rotl(bl,10),cl,m[15],1518500249,7),al=fn2(al=rotl(al,10),bl=fn2(bl,cl=fn2(cl,dl,el,al,bl,m[3],1518500249,15),dl,el=rotl(el,10),al,m[12],1518500249,7),cl,dl=rotl(dl,10),el,m[0],1518500249,12),cl=fn2(cl=rotl(cl,10),dl=fn2(dl,el=fn2(el,al,bl,cl,dl,m[9],1518500249,15),al,bl=rotl(bl,10),cl,m[5],1518500249,9),el,al=rotl(al,10),bl,m[2],1518500249,11),el=fn2(el=rotl(el,10),al=fn2(al,bl=fn2(bl,cl,dl,el,al,m[14],1518500249,7),cl,dl=rotl(dl,10),el,m[11],1518500249,13),bl,cl=rotl(cl,10),dl,m[8],1518500249,12),bl=fn3(bl=rotl(bl,10),cl=fn3(cl,dl=fn3(dl,el,al,bl,cl,m[3],1859775393,11),el,al=rotl(al,10),bl,m[10],1859775393,13),dl,el=rotl(el,10),al,m[14],1859775393,6),dl=fn3(dl=rotl(dl,10),el=fn3(el,al=fn3(al,bl,cl,dl,el,m[4],1859775393,7),bl,cl=rotl(cl,10),dl,m[9],1859775393,14),al,bl=rotl(bl,10),cl,m[15],1859775393,9),al=fn3(al=rotl(al,10),bl=fn3(bl,cl=fn3(cl,dl,el,al,bl,m[8],1859775393,13),dl,el=rotl(el,10),al,m[1],1859775393,15),cl,dl=rotl(dl,10),el,m[2],1859775393,14),cl=fn3(cl=rotl(cl,10),dl=fn3(dl,el=fn3(el,al,bl,cl,dl,m[7],1859775393,8),al,bl=rotl(bl,10),cl,m[0],1859775393,13),el,al=rotl(al,10),bl,m[6],1859775393,6),el=fn3(el=rotl(el,10),al=fn3(al,bl=fn3(bl,cl,dl,el,al,m[13],1859775393,5),cl,dl=rotl(dl,10),el,m[11],1859775393,12),bl,cl=rotl(cl,10),dl,m[5],1859775393,7),bl=fn4(bl=rotl(bl,10),cl=fn4(cl,dl=fn3(dl,el,al,bl,cl,m[12],1859775393,5),el,al=rotl(al,10),bl,m[1],2400959708,11),dl,el=rotl(el,10),al,m[9],2400959708,12),dl=fn4(dl=rotl(dl,10),el=fn4(el,al=fn4(al,bl,cl,dl,el,m[11],2400959708,14),bl,cl=rotl(cl,10),dl,m[10],2400959708,15),al,bl=rotl(bl,10),cl,m[0],2400959708,14),al=fn4(al=rotl(al,10),bl=fn4(bl,cl=fn4(cl,dl,el,al,bl,m[8],2400959708,15),dl,el=rotl(el,10),al,m[12],2400959708,9),cl,dl=rotl(dl,10),el,m[4],2400959708,8),cl=fn4(cl=rotl(cl,10),dl=fn4(dl,el=fn4(el,al,bl,cl,dl,m[13],2400959708,9),al,bl=rotl(bl,10),cl,m[3],2400959708,14),el,al=rotl(al,10),bl,m[7],2400959708,5),el=fn4(el=rotl(el,10),al=fn4(al,bl=fn4(bl,cl,dl,el,al,m[15],2400959708,6),cl,dl=rotl(dl,10),el,m[14],2400959708,8),bl,cl=rotl(cl,10),dl,m[5],2400959708,6),bl=fn5(bl=rotl(bl,10),cl=fn4(cl,dl=fn4(dl,el,al,bl,cl,m[6],2400959708,5),el,al=rotl(al,10),bl,m[2],2400959708,12),dl,el=rotl(el,10),al,m[4],2840853838,9),dl=fn5(dl=rotl(dl,10),el=fn5(el,al=fn5(al,bl,cl,dl,el,m[0],2840853838,15),bl,cl=rotl(cl,10),dl,m[5],2840853838,5),al,bl=rotl(bl,10),cl,m[9],2840853838,11),al=fn5(al=rotl(al,10),bl=fn5(bl,cl=fn5(cl,dl,el,al,bl,m[7],2840853838,6),dl,el=rotl(el,10),al,m[12],2840853838,8),cl,dl=rotl(dl,10),el,m[2],2840853838,13),cl=fn5(cl=rotl(cl,10),dl=fn5(dl,el=fn5(el,al,bl,cl,dl,m[10],2840853838,12),al,bl=rotl(bl,10),cl,m[14],2840853838,5),el,al=rotl(al,10),bl,m[1],2840853838,12),el=fn5(el=rotl(el,10),al=fn5(al,bl=fn5(bl,cl,dl,el,al,m[3],2840853838,13),cl,dl=rotl(dl,10),el,m[8],2840853838,14),bl,cl=rotl(cl,10),dl,m[11],2840853838,11),bl=fn5(bl=rotl(bl,10),cl=fn5(cl,dl=fn5(dl,el,al,bl,cl,m[6],2840853838,8),el,al=rotl(al,10),bl,m[15],2840853838,5),dl,el=rotl(el,10),al,m[13],2840853838,6),dl=rotl(dl,10);var ar=this._a,br=this._b,cr=this._c,dr=this._d,er=this._e;er=fn5(er,ar=fn5(ar,br,cr,dr,er,m[5],1352829926,8),br,cr=rotl(cr,10),dr,m[14],1352829926,9),br=fn5(br=rotl(br,10),cr=fn5(cr,dr=fn5(dr,er,ar,br,cr,m[7],1352829926,9),er,ar=rotl(ar,10),br,m[0],1352829926,11),dr,er=rotl(er,10),ar,m[9],1352829926,13),dr=fn5(dr=rotl(dr,10),er=fn5(er,ar=fn5(ar,br,cr,dr,er,m[2],1352829926,15),br,cr=rotl(cr,10),dr,m[11],1352829926,15),ar,br=rotl(br,10),cr,m[4],1352829926,5),ar=fn5(ar=rotl(ar,10),br=fn5(br,cr=fn5(cr,dr,er,ar,br,m[13],1352829926,7),dr,er=rotl(er,10),ar,m[6],1352829926,7),cr,dr=rotl(dr,10),er,m[15],1352829926,8),cr=fn5(cr=rotl(cr,10),dr=fn5(dr,er=fn5(er,ar,br,cr,dr,m[8],1352829926,11),ar,br=rotl(br,10),cr,m[1],1352829926,14),er,ar=rotl(ar,10),br,m[10],1352829926,14),er=fn4(er=rotl(er,10),ar=fn5(ar,br=fn5(br,cr,dr,er,ar,m[3],1352829926,12),cr,dr=rotl(dr,10),er,m[12],1352829926,6),br,cr=rotl(cr,10),dr,m[6],1548603684,9),br=fn4(br=rotl(br,10),cr=fn4(cr,dr=fn4(dr,er,ar,br,cr,m[11],1548603684,13),er,ar=rotl(ar,10),br,m[3],1548603684,15),dr,er=rotl(er,10),ar,m[7],1548603684,7),dr=fn4(dr=rotl(dr,10),er=fn4(er,ar=fn4(ar,br,cr,dr,er,m[0],1548603684,12),br,cr=rotl(cr,10),dr,m[13],1548603684,8),ar,br=rotl(br,10),cr,m[5],1548603684,9),ar=fn4(ar=rotl(ar,10),br=fn4(br,cr=fn4(cr,dr,er,ar,br,m[10],1548603684,11),dr,er=rotl(er,10),ar,m[14],1548603684,7),cr,dr=rotl(dr,10),er,m[15],1548603684,7),cr=fn4(cr=rotl(cr,10),dr=fn4(dr,er=fn4(er,ar,br,cr,dr,m[8],1548603684,12),ar,br=rotl(br,10),cr,m[12],1548603684,7),er,ar=rotl(ar,10),br,m[4],1548603684,6),er=fn4(er=rotl(er,10),ar=fn4(ar,br=fn4(br,cr,dr,er,ar,m[9],1548603684,15),cr,dr=rotl(dr,10),er,m[1],1548603684,13),br,cr=rotl(cr,10),dr,m[2],1548603684,11),br=fn3(br=rotl(br,10),cr=fn3(cr,dr=fn3(dr,er,ar,br,cr,m[15],1836072691,9),er,ar=rotl(ar,10),br,m[5],1836072691,7),dr,er=rotl(er,10),ar,m[1],1836072691,15),dr=fn3(dr=rotl(dr,10),er=fn3(er,ar=fn3(ar,br,cr,dr,er,m[3],1836072691,11),br,cr=rotl(cr,10),dr,m[7],1836072691,8),ar,br=rotl(br,10),cr,m[14],1836072691,6),ar=fn3(ar=rotl(ar,10),br=fn3(br,cr=fn3(cr,dr,er,ar,br,m[6],1836072691,6),dr,er=rotl(er,10),ar,m[9],1836072691,14),cr,dr=rotl(dr,10),er,m[11],1836072691,12),cr=fn3(cr=rotl(cr,10),dr=fn3(dr,er=fn3(er,ar,br,cr,dr,m[8],1836072691,13),ar,br=rotl(br,10),cr,m[12],1836072691,5),er,ar=rotl(ar,10),br,m[2],1836072691,14),er=fn3(er=rotl(er,10),ar=fn3(ar,br=fn3(br,cr,dr,er,ar,m[10],1836072691,13),cr,dr=rotl(dr,10),er,m[0],1836072691,13),br,cr=rotl(cr,10),dr,m[4],1836072691,7),br=fn2(br=rotl(br,10),cr=fn2(cr,dr=fn3(dr,er,ar,br,cr,m[13],1836072691,5),er,ar=rotl(ar,10),br,m[8],2053994217,15),dr,er=rotl(er,10),ar,m[6],2053994217,5),dr=fn2(dr=rotl(dr,10),er=fn2(er,ar=fn2(ar,br,cr,dr,er,m[4],2053994217,8),br,cr=rotl(cr,10),dr,m[1],2053994217,11),ar,br=rotl(br,10),cr,m[3],2053994217,14),ar=fn2(ar=rotl(ar,10),br=fn2(br,cr=fn2(cr,dr,er,ar,br,m[11],2053994217,14),dr,er=rotl(er,10),ar,m[15],2053994217,6),cr,dr=rotl(dr,10),er,m[0],2053994217,14),cr=fn2(cr=rotl(cr,10),dr=fn2(dr,er=fn2(er,ar,br,cr,dr,m[5],2053994217,6),ar,br=rotl(br,10),cr,m[12],2053994217,9),er,ar=rotl(ar,10),br,m[2],2053994217,12),er=fn2(er=rotl(er,10),ar=fn2(ar,br=fn2(br,cr,dr,er,ar,m[13],2053994217,9),cr,dr=rotl(dr,10),er,m[9],2053994217,12),br,cr=rotl(cr,10),dr,m[7],2053994217,5),br=fn1(br=rotl(br,10),cr=fn2(cr,dr=fn2(dr,er,ar,br,cr,m[10],2053994217,15),er,ar=rotl(ar,10),br,m[14],2053994217,8),dr,er=rotl(er,10),ar,m[12],0,8),dr=fn1(dr=rotl(dr,10),er=fn1(er,ar=fn1(ar,br,cr,dr,er,m[15],0,5),br,cr=rotl(cr,10),dr,m[10],0,12),ar,br=rotl(br,10),cr,m[4],0,9),ar=fn1(ar=rotl(ar,10),br=fn1(br,cr=fn1(cr,dr,er,ar,br,m[1],0,12),dr,er=rotl(er,10),ar,m[5],0,5),cr,dr=rotl(dr,10),er,m[8],0,14),cr=fn1(cr=rotl(cr,10),dr=fn1(dr,er=fn1(er,ar,br,cr,dr,m[7],0,6),ar,br=rotl(br,10),cr,m[6],0,8),er,ar=rotl(ar,10),br,m[2],0,13),er=fn1(er=rotl(er,10),ar=fn1(ar,br=fn1(br,cr,dr,er,ar,m[13],0,6),cr,dr=rotl(dr,10),er,m[14],0,5),br,cr=rotl(cr,10),dr,m[0],0,15),br=fn1(br=rotl(br,10),cr=fn1(cr,dr=fn1(dr,er,ar,br,cr,m[3],0,13),er,ar=rotl(ar,10),br,m[9],0,11),dr,er=rotl(er,10),ar,m[11],0,11),dr=rotl(dr,10);var t=this._b+cl+dr|0;this._b=this._c+dl+er|0,this._c=this._d+el+ar|0,this._d=this._e+al+br|0,this._e=this._a+bl+cr|0,this._a=t},RIPEMD160.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 buffer=new Buffer(20);return buffer.writeInt32LE(this._a,0),buffer.writeInt32LE(this._b,4),buffer.writeInt32LE(this._c,8),buffer.writeInt32LE(this._d,12),buffer.writeInt32LE(this._e,16),buffer},module.exports=RIPEMD160}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){(exports=module.exports=function(algorithm){algorithm=algorithm.toLowerCase();var Algorithm=exports[algorithm];if(!Algorithm)throw new Error(algorithm+" is not supported (we accept pull requests)");return new Algorithm}).sha=__webpack_require__(209),exports.sha1=__webpack_require__(210),exports.sha224=__webpack_require__(211),exports.sha256=__webpack_require__(77),exports.sha384=__webpack_require__(212),exports.sha512=__webpack_require__(78)},function(module,exports,__webpack_require__){(function(Buffer){function Sha256(){this.init(),this._w=W,Hash.call(this,64,56)}function ch(x,y,z){return z^x&(y^z)}function maj(x,y,z){return x&y|z&(x|y)}function sigma0(x){return(x>>>2|x<<30)^(x>>>13|x<<19)^(x>>>22|x<<10)}function sigma1(x){return(x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7)}function gamma0(x){return(x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3}function gamma1(x){return(x>>>17|x<<15)^(x>>>19|x<<13)^x>>>10}var inherits=__webpack_require__(2),Hash=__webpack_require__(9),K=[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],W=new Array(64);inherits(Sha256,Hash),Sha256.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},Sha256.prototype._update=function(M){for(var W=this._w,a=0|this._a,b=0|this._b,c=0|this._c,d=0|this._d,e=0|this._e,f=0|this._f,g=0|this._g,h=0|this._h,i=0;i<16;++i)W[i]=M.readInt32BE(4*i);for(;i<64;++i)W[i]=gamma1(W[i-2])+W[i-7]+gamma0(W[i-15])+W[i-16]|0;for(var j=0;j<64;++j){var T1=h+sigma1(e)+ch(e,f,g)+K[j]+W[j]|0,T2=sigma0(a)+maj(a,b,c)|0;h=g,g=f,f=e,e=d+T1|0,d=c,c=b,b=a,a=T1+T2|0}this._a=a+this._a|0,this._b=b+this._b|0,this._c=c+this._c|0,this._d=d+this._d|0,this._e=e+this._e|0,this._f=f+this._f|0,this._g=g+this._g|0,this._h=h+this._h|0},Sha256.prototype._hash=function(){var H=new Buffer(32);return H.writeInt32BE(this._a,0),H.writeInt32BE(this._b,4),H.writeInt32BE(this._c,8),H.writeInt32BE(this._d,12),H.writeInt32BE(this._e,16),H.writeInt32BE(this._f,20),H.writeInt32BE(this._g,24),H.writeInt32BE(this._h,28),H},module.exports=Sha256}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){(function(Buffer){function Sha512(){this.init(),this._w=W,Hash.call(this,128,112)}function Ch(x,y,z){return z^x&(y^z)}function maj(x,y,z){return x&y|z&(x|y)}function sigma0(x,xl){return(x>>>28|xl<<4)^(xl>>>2|x<<30)^(xl>>>7|x<<25)}function sigma1(x,xl){return(x>>>14|xl<<18)^(x>>>18|xl<<14)^(xl>>>9|x<<23)}function Gamma0(x,xl){return(x>>>1|xl<<31)^(x>>>8|xl<<24)^x>>>7}function Gamma0l(x,xl){return(x>>>1|xl<<31)^(x>>>8|xl<<24)^(x>>>7|xl<<25)}function Gamma1(x,xl){return(x>>>19|xl<<13)^(xl>>>29|x<<3)^x>>>6}function Gamma1l(x,xl){return(x>>>19|xl<<13)^(xl>>>29|x<<3)^(x>>>6|xl<<26)}function getCarry(a,b){return a>>>0<b>>>0?1:0}var inherits=__webpack_require__(2),Hash=__webpack_require__(9),K=[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],W=new Array(160);inherits(Sha512,Hash),Sha512.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},Sha512.prototype._update=function(M){for(var W=this._w,ah=0|this._ah,bh=0|this._bh,ch=0|this._ch,dh=0|this._dh,eh=0|this._eh,fh=0|this._fh,gh=0|this._gh,hh=0|this._hh,al=0|this._al,bl=0|this._bl,cl=0|this._cl,dl=0|this._dl,el=0|this._el,fl=0|this._fl,gl=0|this._gl,hl=0|this._hl,i=0;i<32;i+=2)W[i]=M.readInt32BE(4*i),W[i+1]=M.readInt32BE(4*i+4);for(;i<160;i+=2){var xh=W[i-30],xl=W[i-30+1],gamma0=Gamma0(xh,xl),gamma0l=Gamma0l(xl,xh),gamma1=Gamma1(xh=W[i-4],xl=W[i-4+1]),gamma1l=Gamma1l(xl,xh),Wi7h=W[i-14],Wi7l=W[i-14+1],Wi16h=W[i-32],Wi16l=W[i-32+1],Wil=gamma0l+Wi7l|0,Wih=gamma0+Wi7h+getCarry(Wil,gamma0l)|0;Wih=(Wih=Wih+gamma1+getCarry(Wil=Wil+gamma1l|0,gamma1l)|0)+Wi16h+getCarry(Wil=Wil+Wi16l|0,Wi16l)|0,W[i]=Wih,W[i+1]=Wil}for(var j=0;j<160;j+=2){Wih=W[j],Wil=W[j+1];var majh=maj(ah,bh,ch),majl=maj(al,bl,cl),sigma0h=sigma0(ah,al),sigma0l=sigma0(al,ah),sigma1h=sigma1(eh,el),sigma1l=sigma1(el,eh),Kih=K[j],Kil=K[j+1],chh=Ch(eh,fh,gh),chl=Ch(el,fl,gl),t1l=hl+sigma1l|0,t1h=hh+sigma1h+getCarry(t1l,hl)|0;t1h=(t1h=(t1h=t1h+chh+getCarry(t1l=t1l+chl|0,chl)|0)+Kih+getCarry(t1l=t1l+Kil|0,Kil)|0)+Wih+getCarry(t1l=t1l+Wil|0,Wil)|0;var t2l=sigma0l+majl|0,t2h=sigma0h+majh+getCarry(t2l,sigma0l)|0;hh=gh,hl=gl,gh=fh,gl=fl,fh=eh,fl=el,eh=dh+t1h+getCarry(el=dl+t1l|0,dl)|0,dh=ch,dl=cl,ch=bh,cl=bl,bh=ah,bl=al,ah=t1h+t2h+getCarry(al=t1l+t2l|0,t1l)|0}this._al=this._al+al|0,this._bl=this._bl+bl|0,this._cl=this._cl+cl|0,this._dl=this._dl+dl|0,this._el=this._el+el|0,this._fl=this._fl+fl|0,this._gl=this._gl+gl|0,this._hl=this._hl+hl|0,this._ah=this._ah+ah+getCarry(this._al,al)|0,this._bh=this._bh+bh+getCarry(this._bl,bl)|0,this._ch=this._ch+ch+getCarry(this._cl,cl)|0,this._dh=this._dh+dh+getCarry(this._dl,dl)|0,this._eh=this._eh+eh+getCarry(this._el,el)|0,this._fh=this._fh+fh+getCarry(this._fl,fl)|0,this._gh=this._gh+gh+getCarry(this._gl,gl)|0,this._hh=this._hh+hh+getCarry(this._hl,hl)|0},Sha512.prototype._hash=function(){function writeInt64BE(h,l,offset){H.writeInt32BE(h,offset),H.writeInt32BE(l,offset+4)}var H=new Buffer(64);return writeInt64BE(this._ah,this._al,0),writeInt64BE(this._bh,this._bl,8),writeInt64BE(this._ch,this._cl,16),writeInt64BE(this._dh,this._dl,24),writeInt64BE(this._eh,this._el,32),writeInt64BE(this._fh,this._fl,40),writeInt64BE(this._gh,this._gl,48),writeInt64BE(this._hh,this._hl,56),H},module.exports=Sha512}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";function ECPoint(x,y){null===x&&null===y?(this.x=this.y=null,this.inf=!0):(this.x=x,this.y=y,this.inf=!1)}var Buffer=__webpack_require__(1).Buffer,BN=__webpack_require__(21),ECJPoint=__webpack_require__(80);ECPoint.fromPublicKey=function(publicKey){var x,y,first=publicKey[0];return 33!==publicKey.length||2!==first&&3!==first?65!==publicKey.length||4!==first&&6!==first&&7!==first?null:(x=BN.fromBuffer(publicKey.slice(1,33)),y=BN.fromBuffer(publicKey.slice(33,65)),x.ucmp(BN.p)>=0||y.ucmp(BN.p)>=0?null:6!==first&&7!==first||y.isOdd()===(7===first)?0!==x.redSqr().redMul(x).redIAdd7().ucmp(y.redSqr())?null:new ECPoint(x,y):null):(x=BN.fromBuffer(publicKey.slice(1,33))).ucmp(BN.p)>=0?null:null===(y=x.redSqr().redMul(x).redIAdd7().redSqrt())?null:(3===first!==y.isOdd()&&(y=y.redNeg()),new ECPoint(x,y))},ECPoint.prototype.toPublicKey=function(compressed){var publicKey,x=this.x,y=this.y;return compressed?((publicKey=Buffer.alloc(33))[0]=y.isOdd()?3:2,x.toBuffer().copy(publicKey,1)):((publicKey=Buffer.alloc(65))[0]=4,x.toBuffer().copy(publicKey,1),y.toBuffer().copy(publicKey,33)),publicKey},ECPoint.fromECJPoint=function(p){if(p.inf)return new ECPoint(null,null);var zinv=p.z.redInvm(),zinv2=zinv.redSqr();return new ECPoint(p.x.redMul(zinv2),p.y.redMul(zinv2).redMul(zinv))},ECPoint.prototype.toECJPoint=function(){return this.inf?new ECJPoint(null,null,null):new ECJPoint(this.x,this.y,ECJPoint.one)},ECPoint.prototype.neg=function(){return this.inf?this:new ECPoint(this.x,this.y.redNeg())},ECPoint.prototype.add=function(p){if(this.inf)return p;if(p.inf)return this;if(0===this.x.ucmp(p.x))return 0===this.y.ucmp(p.y)?this.dbl():new ECPoint(null,null);var s=this.y.redSub(p.y);s.isZero()||(s=s.redMul(this.x.redSub(p.x).redInvm()));var nx=s.redSqr().redISub(this.x).redISub(p.x);return new ECPoint(nx,s.redMul(this.x.redSub(nx)).redISub(this.y))},ECPoint.prototype.dbl=function(){if(this.inf)return this;var yy=this.y.redAdd(this.y);if(yy.isZero())return new ECPoint(null,null);var x2=this.x.redSqr(),s=x2.redAdd(x2).redIAdd(x2).redMul(yy.redInvm()),nx=s.redSqr().redISub(this.x.redAdd(this.x));return new ECPoint(nx,s.redMul(this.x.redSub(nx)).redISub(this.y))},ECPoint.prototype.mul=function(num){for(var nafPoints=this._getNAFPoints(4),points=nafPoints.points,naf=num.getNAF(nafPoints.wnd),acc=new ECJPoint(null,null,null),i=naf.length-1;i>=0;i--){for(var k=0;i>=0&&0===naf[i];i--,++k);if(i>=0&&(k+=1),acc=acc.dblp(k),i<0)break;var z=naf[i];acc=z>0?acc.mixedAdd(points[z-1>>1]):acc.mixedAdd(points[-z-1>>1].neg())}return ECPoint.fromECJPoint(acc)},ECPoint.prototype._getNAFPoints1=function(){return{wnd:1,points:[this]}},ECPoint.prototype._getNAFPoints=function(wnd){var points=new Array((1<<wnd)-1);points[0]=this;for(var dbl=this.dbl(),i=1;i<points.length;++i)points[i]=points[i-1].add(dbl);return{wnd:wnd,points:points}},module.exports=ECPoint},function(module,exports,__webpack_require__){"use strict";function ECJPoint(x,y,z){null===x&&null===y&&null===z?(this.x=ECJPoint.one,this.y=ECJPoint.one,this.z=ECJPoint.zero):(this.x=x,this.y=y,this.z=z),this.zOne=this.z===ECJPoint.one}var BN=__webpack_require__(21);ECJPoint.zero=BN.fromNumber(0),ECJPoint.one=BN.fromNumber(1),ECJPoint.prototype.neg=function(){return this.inf?this:new ECJPoint(this.x,this.y.redNeg(),this.z)},ECJPoint.prototype.add=function(p){if(this.inf)return p;if(p.inf)return this;var pz2=p.z.redSqr(),z2=this.z.redSqr(),u1=this.x.redMul(pz2),u2=p.x.redMul(z2),s1=this.y.redMul(pz2).redMul(p.z),s2=p.y.redMul(z2).redMul(this.z),h=u1.redSub(u2),r=s1.redSub(s2);if(h.isZero())return r.isZero()?this.dbl():new ECJPoint(null,null,null);var h2=h.redSqr(),v=u1.redMul(h2),h3=h2.redMul(h),nx=r.redSqr().redIAdd(h3).redISub(v).redISub(v);return new ECJPoint(nx,r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)),this.z.redMul(p.z).redMul(h))},ECJPoint.prototype.mixedAdd=function(p){if(this.inf)return p.toECJPoint();if(p.inf)return this;var z2=this.z.redSqr(),u1=this.x,u2=p.x.redMul(z2),s1=this.y,s2=p.y.redMul(z2).redMul(this.z),h=u1.redSub(u2),r=s1.redSub(s2);if(h.isZero())return r.isZero()?this.dbl():new ECJPoint(null,null,null);var h2=h.redSqr(),v=u1.redMul(h2),h3=h2.redMul(h),nx=r.redSqr().redIAdd(h3).redISub(v).redISub(v);return new ECJPoint(nx,r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)),this.z.redMul(h))},ECJPoint.prototype.dbl=function(){if(this.inf)return this;var nx,ny,nz;if(this.zOne){var xx=this.x.redSqr(),yy=this.y.redSqr(),yyyy=yy.redSqr(),s=this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);s=s.redIAdd(s);var m=xx.redAdd(xx).redIAdd(xx),t=m.redSqr().redISub(s).redISub(s),yyyy8=yyyy.redIAdd(yyyy).redIAdd(yyyy).redIAdd(yyyy);nx=t,ny=m.redMul(s.redISub(t)).redISub(yyyy8),nz=this.y.redAdd(this.y)}else{var a=this.x.redSqr(),b=this.y.redSqr(),c=b.redSqr(),d=this.x.redAdd(b).redSqr().redISub(a).redISub(c);d=d.redIAdd(d);var e=a.redAdd(a).redIAdd(a),f=e.redSqr(),c8=c.redIAdd(c).redIAdd(c).redIAdd(c);nx=f.redISub(d).redISub(d),ny=e.redMul(d.redISub(nx)).redISub(c8),nz=(nz=this.y.redMul(this.z)).redIAdd(nz)}return new ECJPoint(nx,ny,nz)},ECJPoint.prototype.dblp=function(pow){if(0===pow||this.inf)return this;for(var point=this,i=0;i<pow;i++)point=point.dbl();return point},Object.defineProperty(ECJPoint.prototype,"inf",{enumerable:!0,get:function(){return this.z.isZero()}}),module.exports=ECJPoint},function(module,exports,__webpack_require__){"use strict";const rsa=__webpack_require__(67);module.exports=function(number){if(!number||"number"!=typeof number)throw new Error("first argument must be a Number bigger than 0");return rsa.getRandomValues(new Uint8Array(number))}},function(module,exports){module.exports=function(){}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(fn){return function(){if(null===fn)throw new Error("Callback was already called.");var callFn=fn;fn=null,callFn.apply(this,arguments)}},module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";function isAsync(fn){return supportsSymbol&&"AsyncFunction"===fn[Symbol.toStringTag]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.isAsync=void 0;var _asyncify2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__(221)),supportsSymbol="function"==typeof Symbol;exports.default=function(asyncFn){return isAsync(asyncFn)?(0,_asyncify2.default)(asyncFn):asyncFn},exports.isAsync=isAsync},function(module,exports,__webpack_require__){"use strict";(function(global){function compare(a,b){if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=Math.min(x,y);i<len;++i)if(a[i]!==b[i]){x=a[i],y=b[i];break}return x<y?-1:y<x?1:0}function isBuffer(b){return global.Buffer&&"function"==typeof global.Buffer.isBuffer?global.Buffer.isBuffer(b):!(null==b||!b._isBuffer)}function pToString(obj){return Object.prototype.toString.call(obj)}function isView(arrbuf){return!isBuffer(arrbuf)&&("function"==typeof global.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(arrbuf):!!arrbuf&&(arrbuf instanceof DataView||!!(arrbuf.buffer&&arrbuf.buffer instanceof ArrayBuffer))))}function getName(func){if(util.isFunction(func)){if(functionsHaveNames)return func.name;var match=func.toString().match(regex);return match&&match[1]}}function truncate(s,n){return"string"==typeof s?s.length<n?s:s.slice(0,n):s}function inspect(something){if(functionsHaveNames||!util.isFunction(something))return util.inspect(something);var rawname=getName(something);return"[Function"+(rawname?": "+rawname:"")+"]"}function getMessage(self){return truncate(inspect(self.actual),128)+" "+self.operator+" "+truncate(inspect(self.expected),128)}function fail(actual,expected,message,operator,stackStartFunction){throw new assert.AssertionError({message:message,actual:actual,expected:expected,operator:operator,stackStartFunction:stackStartFunction})}function ok(value,message){value||fail(value,!0,message,"==",assert.ok)}function _deepEqual(actual,expected,strict,memos){if(actual===expected)return!0;if(isBuffer(actual)&&isBuffer(expected))return 0===compare(actual,expected);if(util.isDate(actual)&&util.isDate(expected))return actual.getTime()===expected.getTime();if(util.isRegExp(actual)&&util.isRegExp(expected))return actual.source===expected.source&&actual.global===expected.global&&actual.multiline===expected.multiline&&actual.lastIndex===expected.lastIndex&&actual.ignoreCase===expected.ignoreCase;if(null!==actual&&"object"==typeof actual||null!==expected&&"object"==typeof expected){if(isView(actual)&&isView(expected)&&pToString(actual)===pToString(expected)&&!(actual instanceof Float32Array||actual instanceof Float64Array))return 0===compare(new Uint8Array(actual.buffer),new Uint8Array(expected.buffer));if(isBuffer(actual)!==isBuffer(expected))return!1;var actualIndex=(memos=memos||{actual:[],expected:[]}).actual.indexOf(actual);return-1!==actualIndex&&actualIndex===memos.expected.indexOf(expected)||(memos.actual.push(actual),memos.expected.push(expected),objEquiv(actual,expected,strict,memos))}return strict?actual===expected:actual==expected}function isArguments(object){return"[object Arguments]"==Object.prototype.toString.call(object)}function objEquiv(a,b,strict,actualVisitedObjects){if(null===a||void 0===a||null===b||void 0===b)return!1;if(util.isPrimitive(a)||util.isPrimitive(b))return a===b;if(strict&&Object.getPrototypeOf(a)!==Object.getPrototypeOf(b))return!1;var aIsArgs=isArguments(a),bIsArgs=isArguments(b);if(aIsArgs&&!bIsArgs||!aIsArgs&&bIsArgs)return!1;if(aIsArgs)return a=pSlice.call(a),b=pSlice.call(b),_deepEqual(a,b,strict);var key,i,ka=objectKeys(a),kb=objectKeys(b);if(ka.length!==kb.length)return!1;for(ka.sort(),kb.sort(),i=ka.length-1;i>=0;i--)if(ka[i]!==kb[i])return!1;for(i=ka.length-1;i>=0;i--)if(key=ka[i],!_deepEqual(a[key],b[key],strict,actualVisitedObjects))return!1;return!0}function notDeepStrictEqual(actual,expected,message){_deepEqual(actual,expected,!0)&&fail(actual,expected,message,"notDeepStrictEqual",notDeepStrictEqual)}function expectedException(actual,expected){if(!actual||!expected)return!1;if("[object RegExp]"==Object.prototype.toString.call(expected))return expected.test(actual);try{if(actual instanceof expected)return!0}catch(e){}return!Error.isPrototypeOf(expected)&&!0===expected.call({},actual)}function _tryBlock(block){var error;try{block()}catch(e){error=e}return error}function _throws(shouldThrow,block,expected,message){var actual;if("function"!=typeof block)throw new TypeError('"block" argument must be a function');"string"==typeof expected&&(message=expected,expected=null),actual=_tryBlock(block),message=(expected&&expected.name?" ("+expected.name+").":".")+(message?" "+message:"."),shouldThrow&&!actual&&fail(actual,expected,"Missing expected exception"+message);var userProvidedMessage="string"==typeof message,isUnwantedException=!shouldThrow&&util.isError(actual),isUnexpectedException=!shouldThrow&&actual&&!expected;if((isUnwantedException&&userProvidedMessage&&expectedException(actual,expected)||isUnexpectedException)&&fail(actual,expected,"Got unwanted exception"+message),shouldThrow&&actual&&expected&&!expectedException(actual,expected)||!shouldThrow&&actual)throw actual}var util=__webpack_require__(63),hasOwn=Object.prototype.hasOwnProperty,pSlice=Array.prototype.slice,functionsHaveNames="foo"===function(){}.name,assert=module.exports=ok,regex=/\s*function\s+([^\(\s]*)\s*/;assert.AssertionError=function(options){this.name="AssertionError",this.actual=options.actual,this.expected=options.expected,this.operator=options.operator,options.message?(this.message=options.message,this.generatedMessage=!1):(this.message=getMessage(this),this.generatedMessage=!0);var stackStartFunction=options.stackStartFunction||fail;if(Error.captureStackTrace)Error.captureStackTrace(this,stackStartFunction);else{var err=new Error;if(err.stack){var out=err.stack,fn_name=getName(stackStartFunction),idx=out.indexOf("\n"+fn_name);if(idx>=0){var next_line=out.indexOf("\n",idx+1);out=out.substring(next_line+1)}this.stack=out}}},util.inherits(assert.AssertionError,Error),assert.fail=fail,assert.ok=ok,assert.equal=function(actual,expected,message){actual!=expected&&fail(actual,expected,message,"==",assert.equal)},assert.notEqual=function(actual,expected,message){actual==expected&&fail(actual,expected,message,"!=",assert.notEqual)},assert.deepEqual=function(actual,expected,message){_deepEqual(actual,expected,!1)||fail(actual,expected,message,"deepEqual",assert.deepEqual)},assert.deepStrictEqual=function(actual,expected,message){_deepEqual(actual,expected,!0)||fail(actual,expected,message,"deepStrictEqual",assert.deepStrictEqual)},assert.notDeepEqual=function(actual,expected,message){_deepEqual(actual,expected,!1)&&fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)},assert.notDeepStrictEqual=notDeepStrictEqual,assert.strictEqual=function(actual,expected,message){actual!==expected&&fail(actual,expected,message,"===",assert.strictEqual)},assert.notStrictEqual=function(actual,expected,message){actual===expected&&fail(actual,expected,message,"!==",assert.notStrictEqual)},assert.throws=function(block,error,message){_throws(!0,block,error,message)},assert.doesNotThrow=function(block,error,message){_throws(!1,block,error,message)},assert.ifError=function(err){if(err)throw err};var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)hasOwn.call(obj,key)&&keys.push(key);return keys}}).call(exports,__webpack_require__(4))},function(module,exports,__webpack_require__){"use strict";const multiaddr=__webpack_require__(87);module.exports={ensureMultiaddr:function(ma){return multiaddr.isMultiaddr(ma)?ma:multiaddr(ma)}}},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function Multiaddr(addr){if(!(this instanceof Multiaddr))return new Multiaddr(addr);if((addr=addr||"")instanceof Buffer)this.buffer=codec.fromBuffer(addr);else if("string"==typeof addr||addr instanceof String)this.buffer=codec.fromString(addr);else{if(!(addr.buffer&&addr.protos&&addr.protoCodes))throw new Error("addr must be a string, Buffer, or another Multiaddr");this.buffer=codec.fromBuffer(addr.buffer)}}const map=__webpack_require__(37),extend=__webpack_require__(229),codec=__webpack_require__(230),protocols=__webpack_require__(38),varint=__webpack_require__(3),bs58=__webpack_require__(26),NotImplemented=new Error("Sorry, Not Implemented Yet.");exports=module.exports=Multiaddr,Multiaddr.prototype.toString=function(){return codec.bufferToString(this.buffer)},Multiaddr.prototype.toOptions=function(){const opts={},parsed=this.toString().split("/");return opts.family="ip4"===parsed[1]?"ipv4":"ipv6",opts.host=parsed[2],opts.transport=parsed[3],opts.port=parsed[4],opts},Multiaddr.prototype.inspect=function(){return"<Multiaddr "+this.buffer.toString("hex")+" - "+codec.bufferToString(this.buffer)+">"},Multiaddr.prototype.protos=function(){return map(this.protoCodes(),function(code){return extend(protocols(code))})},Multiaddr.prototype.protoCodes=function(){const codes=[],buf=this.buffer;let i=0;for(;i<buf.length;){const code=varint.decode(buf,i),n=varint.decode.bytes,p=protocols(code);i+=codec.sizeForAddr(p,buf.slice(i+n))+n,codes.push(code)}return codes},Multiaddr.prototype.protoNames=function(){return map(this.protos(),function(proto){return proto.name})},Multiaddr.prototype.tuples=function(){return codec.bufferToTuples(this.buffer)},Multiaddr.prototype.stringTuples=function(){const t=codec.bufferToTuples(this.buffer);return codec.tuplesToStringTuples(t)},Multiaddr.prototype.encapsulate=function(addr){return addr=Multiaddr(addr),Multiaddr(this.toString()+addr.toString())},Multiaddr.prototype.decapsulate=function(addr){addr=addr.toString();const s=this.toString(),i=s.lastIndexOf(addr);if(i<0)throw new Error("Address "+this+" does not contain subaddress: "+addr);return Multiaddr(s.slice(0,i))},Multiaddr.prototype.getPeerId=function(){let b58str=null;try{b58str=this.stringTuples().filter(tuple=>{if(tuple[0]===protocols.names.ipfs.code)return!0})[0][1],bs58.decode(b58str)}catch(e){b58str=null}return b58str},Multiaddr.prototype.equals=function(addr){return this.buffer.equals(addr.buffer)},Multiaddr.prototype.nodeAddress=function(){if(!this.isThinWaistAddress())throw new Error('Multiaddr must be "thin waist" address for nodeAddress.');const codes=this.protoCodes(),parts=this.toString().split("/").slice(1);return{family:41===codes[0]?"IPv6":"IPv4",address:parts[1],port:parts[3]}},Multiaddr.fromNodeAddress=function(addr,transport){if(!addr)throw new Error("requires node address object");if(!transport)throw new Error("requires transport protocol");return Multiaddr("/"+["IPv6"===addr.family?"ip6":"ip4",addr.address,transport,addr.port].join("/"))},Multiaddr.prototype.isThinWaistAddress=function(addr){const protos=(addr||this).protos();return 2===protos.length&&((4===protos[0].code||41===protos[0].code)&&(6===protos[1].code||17===protos[1].code))},Multiaddr.prototype.fromStupidString=function(str){throw NotImplemented},Multiaddr.protocols=protocols,Multiaddr.isMultiaddr=function(addr){return addr.constructor&&addr.constructor.name?"Multiaddr"===addr.constructor.name:Boolean(addr.fromStupidString&&addr.protos)},Multiaddr.isName=function(addr){return!!Multiaddr.isMultiaddr(addr)&&addr.protos().some(proto=>proto.resolvable)},Multiaddr.resolve=function(addr,callback){return callback(Multiaddr.isMultiaddr(addr)&&Multiaddr.isName(addr)?new Error("not implemented yet"):new Error("not a valid name"))}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){module.exports=__webpack_require__(89)},function(module,exports,__webpack_require__){"use strict";(exports=module.exports).multicodec="/ipfs/id/1.0.0",exports.listener=__webpack_require__(90),exports.dialer=__webpack_require__(131)},function(module,exports,__webpack_require__){"use strict";(function(Buffer){const pull=__webpack_require__(40),lp=__webpack_require__(45),msg=__webpack_require__(46);module.exports=((conn,pInfoSelf)=>{conn.getObservedAddrs((err,observedAddrs)=>{if(err)return;observedAddrs=observedAddrs[0];let publicKey=Buffer.alloc(0);pInfoSelf.id.pubKey&&(publicKey=pInfoSelf.id.pubKey.bytes);const msgSend=msg.encode({protocolVersion:"ipfs/0.1.0",agentVersion:"na",publicKey:publicKey,listenAddrs:pInfoSelf.multiaddrs.toArray().map(ma=>ma.buffer),observedAddr:observedAddrs?observedAddrs.buffer:Buffer.from("")});pull(pull.values([msgSend]),lp.encode(),conn)})})}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";function placeHoldersCount(b64){var len=b64.length;if(len%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===b64[len-2]?2:"="===b64[len-1]?1:0}function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[63&num]}function encodeChunk(uint8,start,end){for(var tmp,output=[],i=start;i<end;i+=3)tmp=(uint8[i]<<16)+(uint8[i+1]<<8)+uint8[i+2],output.push(tripletToBase64(tmp));return output.join("")}exports.byteLength=function(b64){return 3*b64.length/4-placeHoldersCount(b64)},exports.toByteArray=function(b64){var i,l,tmp,placeHolders,arr,len=b64.length;placeHolders=placeHoldersCount(b64),arr=new Arr(3*len/4-placeHolders),l=placeHolders>0?len-4:len;var L=0;for(i=0;i<l;i+=4)tmp=revLookup[b64.charCodeAt(i)]<<18|revLookup[b64.charCodeAt(i+1)]<<12|revLookup[b64.charCodeAt(i+2)]<<6|revLookup[b64.charCodeAt(i+3)],arr[L++]=tmp>>16&255,arr[L++]=tmp>>8&255,arr[L++]=255&tmp;return 2===placeHolders?(tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4,arr[L++]=255&tmp):1===placeHolders&&(tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2,arr[L++]=tmp>>8&255,arr[L++]=255&tmp),arr},exports.fromByteArray=function(uint8){for(var tmp,len=uint8.length,extraBytes=len%3,output="",parts=[],i=0,len2=len-extraBytes;i<len2;i+=16383)parts.push(encodeChunk(uint8,i,i+16383>len2?len2:i+16383));return 1===extraBytes?(tmp=uint8[len-1],output+=lookup[tmp>>2],output+=lookup[tmp<<4&63],output+="=="):2===extraBytes&&(tmp=(uint8[len-2]<<8)+uint8[len-1],output+=lookup[tmp>>10],output+=lookup[tmp>>4&63],output+=lookup[tmp<<2&63],output+="="),parts.push(output),parts.join("")};for(var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;i<len;++i)lookup[i]=code[i],revLookup[code.charCodeAt(i)]=i;revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63},function(module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=8*nBytes-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];for(i+=d,e=s&(1<<-nBits)-1,s>>=-nBits,nBits+=eLen;nBits>0;e=256*e+buffer[offset+i],i+=d,nBits-=8);for(m=e&(1<<-nBits)-1,e>>=-nBits,nBits+=mLen;nBits>0;m=256*m+buffer[offset+i],i+=d,nBits-=8);if(0===e)e=1-eBias;else{if(e===eMax)return m?NaN:1/0*(s?-1:1);m+=Math.pow(2,mLen),e-=eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)},exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c,eLen=8*nBytes-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,rt=23===mLen?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=value<0||0===value&&1/value<0?1:0;for(value=Math.abs(value),isNaN(value)||value===1/0?(m=isNaN(value)?1:0,e=eMax):(e=Math.floor(Math.log(value)/Math.LN2),value*(c=Math.pow(2,-e))<1&&(e--,c*=2),(value+=e+eBias>=1?rt/c:rt*Math.pow(2,1-eBias))*c>=2&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):e+eBias>=1?(m=(value*c-1)*Math.pow(2,mLen),e+=eBias):(m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen),e=0));mLen>=8;buffer[offset+i]=255&m,i+=d,m/=256,mLen-=8);for(e=e<<mLen|m,eLen+=mLen;eLen>0;buffer[offset+i]=255&e,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=128*s}},function(module,exports,__webpack_require__){"use strict";module.exports={keys:__webpack_require__(94),once:__webpack_require__(42),values:__webpack_require__(22),count:__webpack_require__(95),infinite:__webpack_require__(96),empty:__webpack_require__(97),error:__webpack_require__(98)}},function(module,exports,__webpack_require__){"use strict";var values=__webpack_require__(22);module.exports=function(object){return values(Object.keys(object))}},function(module,exports,__webpack_require__){"use strict";module.exports=function(max){var i=0;return max=max||1/0,function(end,cb){return end?cb&&cb(end):i>max?cb(!0):void cb(null,i++)}}},function(module,exports,__webpack_require__){"use strict";module.exports=function(generate){return generate=generate||Math.random,function(end,cb){return end?cb&&cb(end):cb(null,generate())}}},function(module,exports,__webpack_require__){"use strict";module.exports=function(){return function(abort,cb){cb(!0)}}},function(module,exports,__webpack_require__){"use strict";module.exports=function(err){return function(abort,cb){cb(err)}}},function(module,exports,__webpack_require__){"use strict";module.exports={drain:__webpack_require__(10),onEnd:__webpack_require__(100),log:__webpack_require__(101),find:__webpack_require__(102),reduce:__webpack_require__(23),collect:__webpack_require__(103),concat:__webpack_require__(104)}},function(module,exports,__webpack_require__){"use strict";var drain=__webpack_require__(10);module.exports=function(done){return drain(null,done)}},function(module,exports,__webpack_require__){"use strict";var drain=__webpack_require__(10);module.exports=function(done){return drain(function(data){console.log(data)},done)}},function(module,exports,__webpack_require__){"use strict";function id(e){return e}var prop=__webpack_require__(11),drain=__webpack_require__(10);module.exports=function(test,cb){var ended=!1;return cb?test=prop(test)||id:(cb=test,test=id),drain(function(data){if(test(data))return ended=!0,cb(null,data),!1},function(err){ended||cb(!0===err?null:err,null)})}},function(module,exports,__webpack_require__){"use strict";var reduce=__webpack_require__(23);module.exports=function(cb){return reduce(function(arr,item){return arr.push(item),arr},[],cb)}},function(module,exports,__webpack_require__){"use strict";var reduce=__webpack_require__(23);module.exports=function(cb){return reduce(function(a,b){return a+b},"",cb)}},function(module,exports,__webpack_require__){"use strict";module.exports={map:__webpack_require__(106),asyncMap:__webpack_require__(107),filter:__webpack_require__(24),filterNot:__webpack_require__(108),through:__webpack_require__(109),take:__webpack_require__(110),unique:__webpack_require__(44),nonUnique:__webpack_require__(111),flatten:__webpack_require__(112)}},function(module,exports,__webpack_require__){"use strict";function id(e){return e}var prop=__webpack_require__(11);module.exports=function(mapper){return mapper?(mapper=prop(mapper),function(read){return function(abort,cb){read(abort,function(end,data){try{data=end?null:mapper(data)}catch(err){return read(err,function(){return cb(err)})}cb(end,data)})}}):id}},function(module,exports,__webpack_require__){"use strict";function id(e){return e}var prop=__webpack_require__(11);module.exports=function(map){if(!map)return id;map=prop(map);var abortCb,aborted,busy=!1;return function(read){return function next(abort,cb){if(aborted)return cb(aborted);abort?(aborted=abort,busy?read(abort,function(){busy?abortCb=cb:cb(abort)}):read(abort,cb)):read(null,function(end,data){end?cb(end):aborted?cb(aborted):(busy=!0,map(data,function(err,data){busy=!1,aborted?(cb(aborted),abortCb(aborted)):err?next(err,cb):cb(null,data)}))})}}}},function(module,exports,__webpack_require__){"use strict";var tester=__webpack_require__(43),filter=__webpack_require__(24);module.exports=function(test){return test=tester(test),filter(function(data){return!test(data)})}},function(module,exports,__webpack_require__){"use strict";module.exports=function(op,onEnd){function once(abort){!a&&onEnd&&(a=!0,onEnd(!0===abort?null:abort))}var a=!1;return function(read){return function(end,cb){return end&&once(end),read(end,function(end,data){end?once(end):op&&op(data),cb(end,data)})}}}},function(module,exports,__webpack_require__){"use strict";module.exports=function(test,opts){var last=(opts=opts||{}).last||!1,ended=!1;if("number"==typeof test){last=!0;var n=test;test=function(){return--n}}return function(read){function terminate(cb){read(!0,function(err){last=!1,cb(err||!0)})}return function(end,cb){ended?last?terminate(cb):cb(ended):(ended=end)?read(ended,cb):read(null,function(end,data){(ended=ended||end)?cb(ended):test(data)?cb(null,data):(ended=!0,last?cb(null,data):terminate(cb))})}}}},function(module,exports,__webpack_require__){"use strict";var unique=__webpack_require__(44);module.exports=function(field){return unique(field,!0)}},function(module,exports,__webpack_require__){"use strict";var values=__webpack_require__(22),once=__webpack_require__(42);module.exports=function(){return function(read){var _read;return function(abort,cb){function nextChunk(){_read(null,function(err,data){!0===err?nextStream():err?read(!0,function(abortErr){cb(err)}):cb(null,data)})}function nextStream(){_read=null,read(null,function(end,stream){if(end)return cb(end);Array.isArray(stream)||stream&&"object"==typeof stream?stream=values(stream):"function"!=typeof stream&&(stream=once(stream)),_read=stream,nextChunk()})}abort?_read?_read(abort,function(err){read(err||abort,cb)}):read(abort,cb):_read?nextChunk():nextStream()}}}},function(module,exports,__webpack_require__){"use strict";module.exports=function pull(a){var length=arguments.length;if("function"==typeof a&&1===a.length){for(var args=new Array(length),i=0;i<length;i++)args[i]=arguments[i];return function(read){if(null==args)throw new TypeError("partial sink should only be called once!");var ref=args;switch(args=null,length){case 1:return pull(read,ref[0]);case 2:return pull(read,ref[0],ref[1]);case 3:return pull(read,ref[0],ref[1],ref[2]);case 4:return pull(read,ref[0],ref[1],ref[2],ref[3]);default:return ref.unshift(read),pull.apply(null,ref)}}}var read=a;read&&"function"==typeof read.source&&(read=read.source);for(i=1;i<length;i++){var s=arguments[i];"function"==typeof s?read=s(read):s&&"object"==typeof s&&(s.sink(read),read=s.source)}return read}},function(module,exports,__webpack_require__){"use strict";function createPool(){return Buffer.alloc(poolSize)}const Buffer=__webpack_require__(1).Buffer;module.exports=function(opts){opts=Object.assign({fixed:!1,bytes:4},opts||{});const varint=__webpack_require__(3);let pool=opts.fixed?null:createPool(),used=0,ended=!1;return read=>(end,cb)=>{if(end&&(ended=end),ended)return cb(ended);read(null,(end,data)=>{if(end&&(ended=end),ended)return cb(ended);if(!Buffer.isBuffer(data))return ended=new Error("data must be a buffer"),cb(ended);let encodedLength;opts.fixed?(encodedLength=Buffer.alloc(opts.bytes)).writeInt32BE(data.length,0):(varint.encode(data.length,pool,used),used+=varint.encode.bytes,encodedLength=pool.slice(used-varint.encode.bytes,used),pool.length-used<100&&(pool=createPool(),used=0)),cb(null,Buffer.concat([encodedLength,data]))})}};const poolSize=10240},function(module,exports){function encode(num,out,offset){out=out||[];for(var oldOffset=offset=offset||0;num>=INT;)out[offset++]=255&num|MSB,num/=128;for(;num&MSBALL;)out[offset++]=255&num|MSB,num>>>=7;return out[offset]=0|num,encode.bytes=offset-oldOffset+1,out}module.exports=encode;var MSB=128,MSBALL=-128,INT=Math.pow(2,31)},function(module,exports){function read(buf,offset){var b,res=0,shift=0,counter=offset=offset||0,l=buf.length;do{if(counter>=l)throw read.bytes=0,new RangeError("Could not decode varint");b=buf[counter++],res+=shift<28?(b&REST)<<shift:(b&REST)*Math.pow(2,shift),shift+=7}while(b>=MSB);return read.bytes=counter-offset,res}module.exports=read;var MSB=128,REST=127},function(module,exports){var N1=Math.pow(2,7),N2=Math.pow(2,14),N3=Math.pow(2,21),N4=Math.pow(2,28),N5=Math.pow(2,35),N6=Math.pow(2,42),N7=Math.pow(2,49),N8=Math.pow(2,56),N9=Math.pow(2,63);module.exports=function(value){return value<N1?1:value<N2?2:value<N3?3:value<N4?4:value<N5?5:value<N6?6:value<N7?7:value<N8?8:value<N9?9:10}},function(module,exports,__webpack_require__){"use strict";function decodeFromReader(reader,opts,cb){"function"==typeof opts&&(cb=opts,opts={}),(opts=Object.assign({fixed:!1,bytes:4},opts||{})).fixed?readFixedMessage(reader,opts.bytes,opts.maxLength,cb):readVarintMessage(reader,opts.maxLength,cb)}function readFixedMessage(reader,byteLength,maxLength,cb){"function"==typeof maxLength&&(cb=maxLength,maxLength=MAX_LENGTH),reader.read(byteLength,(err,bytes)=>{if(err)return cb(err);const msgSize=bytes.readInt32BE(0);if(msgSize>maxLength)return cb("size longer than max permitted length of "+maxLength+"!");readMessage(reader,msgSize,cb)})}function readVarintMessage(reader,maxLength,cb){function readByte(){reader.read(1,(err,byte)=>{if(err)return cb(err);if(rawMsgSize.push(byte),byte&&!isEndByte(byte[0]))return void readByte();const msgSize=varint.decode(Buffer.concat(rawMsgSize));if(msgSize>maxLength)return cb("size longer than max permitted length of "+maxLength+"!");readMessage(reader,msgSize,(err,msg)=>{if(err)return cb(err);rawMsgSize=[],cb(null,msg)})})}"function"==typeof maxLength&&(cb=maxLength,maxLength=MAX_LENGTH);let rawMsgSize=[];0===rawMsgSize.length&&readByte()}function readMessage(reader,size,cb){reader.read(size,(err,msg)=>{if(err)return cb(err);cb(null,msg)})}const varint=__webpack_require__(3),Reader=__webpack_require__(119),Buffer=__webpack_require__(1).Buffer,pushable=__webpack_require__(121);exports.decode=function(opts){let reader=new Reader,p=pushable(err=>{reader.abort(err)});return read=>{function next(){decodeFromReader(reader,opts,(err,msg)=>{if(err)return p.end(err);p.push(msg),next()})}return reader(read),next(),p}},exports.decodeFromReader=decodeFromReader;const isEndByte=byte=>!(128&byte),MAX_LENGTH=4194304},function(module,exports,__webpack_require__){"use strict";function isInteger(i){return Number.isFinite(i)}function isFunction(f){return"function"==typeof f}function maxDelay(fn,delay){return delay?function(a,cb){var timer=setTimeout(function(){fn(new Error("pull-reader: read exceeded timeout"),cb)},delay);fn(a,function(err,value){clearTimeout(timer),cb(err,value)})}:fn}var State=__webpack_require__(120);module.exports=function(timeout){function drain(){for(;queue.length;)if(null==queue[0].length&&state.has(1))queue.shift().cb(null,state.get());else if(state.has(queue[0].length)){var next=queue.shift();next.cb(null,state.get(next.length))}else{if(!ended)return!!queue.length;queue.shift().cb(ended)}return queue.length||!state.has(1)||abort}function more(){drain()&&!reading&&(!read||reading||streaming||(reading=!0,readTimed(null,function(err,data){if(reading=!1,err)return ended=err,drain();state.add(data),more()})))}function reader(_read){if(abort){for(;queue.length;)queue.shift().cb(abort);return cb&&cb(abort)}readTimed=maxDelay(_read,timeout),read=_read,more()}var read,readTimed,ended,streaming,abort,queue=[],reading=!1,state=State();return reader.abort=function(err,cb){abort=err||!0,read?(reading=!0,read(abort,function(){for(;queue.length;)queue.shift().cb(abort);cb&&cb(abort)})):cb()},reader.read=function(len,_timeout,cb){if(isFunction(_timeout)&&(cb=_timeout,_timeout=timeout),!isFunction(cb))return streaming=!0,function(abort,cb){if(reading||state.has(1)){if(abort)return read(abort,cb);queue.push({length:null,cb:cb}),more()}else maxDelay(read,_timeout)(abort,function(err,data){cb(err,data)})};queue.push({length:isInteger(len)?len:null,cb:cb}),more()},reader}},function(module,exports,__webpack_require__){(function(Buffer){module.exports=function(){var buffers=[],length=0;return{length:length,data:this,add:function(data){if(!Buffer.isBuffer(data))throw new Error("data must be a buffer, was: "+JSON.stringify(data));return this.length=length+=data.length,buffers.push(data),this},has:function(n){return null==n?length>0:length>=n},get:function(n){var _length;if(null==n||n===length){length=0;var _buffers=buffers;return buffers=[],1==_buffers.length?_buffers[0]:Buffer.concat(_buffers)}if(buffers.length>1&&n<=(_length=buffers[0].length)){var buf=buffers[0].slice(0,n);return n===_length?buffers.shift():buffers[0]=buffers[0].slice(n,_length),length-=n,buf}if(n<length){for(var out=[],len=0;len+buffers[0].length<n;){var b=buffers.shift();len+=b.length,out.push(b)}return len<n&&(out.push(buffers[0].slice(0,n-len)),buffers[0]=buffers[0].slice(n-len,buffers[0].length),this.length=length-=n),Buffer.concat(out)}throw new Error("could not get "+n+" bytes")}}}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports){module.exports=function(separated,onClose){function read(_abort,_cb){_abort&&(abort=_abort,cb&&callback(abort)),cb=_cb,drain()}function end(end){ended=ended||end||!0,drain()}function push(data){ended||(cb?callback(abort,data):(buffer.push(data),drain()))}function drain(){cb&&(abort?callback(abort):!buffer.length&&ended?callback(ended):buffer.length&&callback(null,buffer.shift()))}function callback(err,val){var _cb=cb;if(err&&onClose){var c=onClose;onClose=null,c(!0===err?null:err)}cb=null,_cb(err,val)}"function"==typeof separated&&(onClose=separated,separated=!1);var abort,cb,ended,buffer=[];return separated?{push:push,end:end,source:read}:(read.push=push,read.end=end,read)}},function(module,exports,__webpack_require__){"use strict";(function(Buffer){var schema=__webpack_require__(47),compile=__webpack_require__(126),flatten=function(values){if(!values)return null;var result={};return Object.keys(values).forEach(function(k){result[k]=values[k].value}),result};module.exports=function(proto,opts){if(opts||(opts={}),!proto)throw new Error("Pass in a .proto string or a protobuf-schema parsed object");var sch="object"!=typeof proto||Buffer.isBuffer(proto)?schema.parse(proto):proto,Messages=function(){var self=this;compile(sch,opts.encodings||{}).forEach(function(m){self[m.name]=flatten(m.values)||m})};return Messages.prototype.toString=function(){return schema.stringify(sch)},Messages.prototype.toJSON=function(){return sch},new Messages}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){var tokenize=__webpack_require__(124),PACKABLE_TYPES=["int32","int64","uint32","uint64","sint32","sint64","bool","fixed64","sfixed64","double","fixed32","sfixed32","float"],onfieldoptions=function(tokens){for(var opts={};tokens.length;)switch(tokens[0]){case"[":case",":tokens.shift();var name=tokens.shift();if("("===name&&(name=tokens.shift(),tokens.shift()),"="!==tokens[0])throw new Error("Unexpected token in field options: "+tokens[0]);if(tokens.shift(),"]"===tokens[0])throw new Error("Unexpected ] in field option");opts[name]=tokens.shift();break;case"]":return tokens.shift(),opts;default:throw new Error("Unexpected token in field options: "+tokens[0])}throw new Error("No closing tag for field options")},onfield=function(tokens){for(var field={name:null,type:null,tag:-1,map:null,oneof:null,required:!1,repeated:!1,options:{}};tokens.length;)switch(tokens[0]){case"=":tokens.shift(),field.tag=Number(tokens.shift());break;case"map":if(field.type="map",field.map={from:null,to:null},tokens.shift(),"<"!==tokens[0])throw new Error("Unexpected token in map type: "+tokens[0]);if(tokens.shift(),field.map.from=tokens.shift(),","!==tokens[0])throw new Error("Unexpected token in map type: "+tokens[0]);if(tokens.shift(),field.map.to=tokens.shift(),">"!==tokens[0])throw new Error("Unexpected token in map type: "+tokens[0]);tokens.shift(),field.name=tokens.shift();break;case"repeated":case"required":case"optional":var t=tokens.shift();field.required="required"===t,field.repeated="repeated"===t,field.type=tokens.shift(),field.name=tokens.shift();break;case"[":field.options=onfieldoptions(tokens);break;case";":if(null===field.name)throw new Error("Missing field name");if(null===field.type)throw new Error("Missing type in message field: "+field.name);if(-1===field.tag)throw new Error("Missing tag number in message field: "+field.name);return tokens.shift(),field;default:throw new Error("Unexpected token in message field: "+tokens[0])}throw new Error("No ; found for message field")},onmessagebody=function(tokens){for(var body={enums:[],messages:[],fields:[],extends:[],extensions:null};tokens.length;)switch(tokens[0]){case"map":case"repeated":case"optional":case"required":body.fields.push(onfield(tokens));break;case"enum":body.enums.push(onenum(tokens));break;case"message":body.messages.push(onmessage(tokens));break;case"extensions":body.extensions=onextensions(tokens);break;case"oneof":tokens.shift();var name=tokens.shift();if("{"!==tokens[0])throw new Error("Unexpected token in oneof: "+tokens[0]);for(tokens.shift();"}"!==tokens[0];){tokens.unshift("optional");var field=onfield(tokens);field.oneof=name,body.fields.push(field)}tokens.shift();break;case"extend":body.extends.push(onextend(tokens));break;case";":tokens.shift();break;case"reserved":case"option":for(tokens.shift();";"!==tokens[0];)tokens.shift();break;default:tokens.unshift("optional"),body.fields.push(onfield(tokens))}return body},onextend=function(tokens){return{name:tokens[1],message:onmessage(tokens)}},onextensions=function(tokens){tokens.shift();var from=Number(tokens.shift());if(isNaN(from))throw new Error("Invalid from in extensions definition");if("to"!==tokens.shift())throw new Error("Expected keyword 'to' in extensions definition");var to=tokens.shift();if("max"===to&&(to=536870911),to=Number(to),isNaN(to))throw new Error("Invalid to in extensions definition");if(";"!==tokens.shift())throw new Error("Missing ; in extensions definition");return{from:from,to:to}},onmessage=function(tokens){tokens.shift();var lvl=1,body=[],msg={name:tokens.shift(),enums:[],extends:[],messages:[],fields:[]};if("{"!==tokens[0])throw new Error("Expected { but found "+tokens[0]);for(tokens.shift();tokens.length;){if("{"===tokens[0]?lvl++:"}"===tokens[0]&&lvl--,!lvl)return tokens.shift(),body=onmessagebody(body),msg.enums=body.enums,msg.messages=body.messages,msg.fields=body.fields,msg.extends=body.extends,msg.extensions=body.extensions,msg;body.push(tokens.shift())}if(lvl)throw new Error("No closing tag for message")},onpackagename=function(tokens){tokens.shift();var name=tokens.shift();if(";"!==tokens[0])throw new Error("Expected ; but found "+tokens[0]);return tokens.shift(),name},onsyntaxversion=function(tokens){if(tokens.shift(),"="!==tokens[0])throw new Error("Expected = but found "+tokens[0]);tokens.shift();var version=tokens.shift();switch(version){case'"proto2"':version=2;break;case'"proto3"':version=3;break;default:throw new Error("Expected protobuf syntax version but found "+version)}if(";"!==tokens[0])throw new Error("Expected ; but found "+tokens[0]);return tokens.shift(),version},onenumvalue=function(tokens){if(tokens.length<4)throw new Error("Invalid enum value: "+tokens.slice(0,3).join(" "));if("="!==tokens[1])throw new Error("Expected = but found "+tokens[1]);if(";"!==tokens[3]&&"["!==tokens[3])throw new Error("Expected ; or [ but found "+tokens[1]);var name=tokens.shift();tokens.shift();var val={value:null,options:{}};return val.value=Number(tokens.shift()),"["===tokens[0]&&(val.options=onfieldoptions(tokens)),tokens.shift(),{name:name,val:val}},onenum=function(tokens){tokens.shift();var options={},e={name:tokens.shift(),values:{},options:{}};if("{"!==tokens[0])throw new Error("Expected { but found "+tokens[0]);for(tokens.shift();tokens.length;){if("}"===tokens[0])return tokens.shift(),";"===tokens[0]&&tokens.shift(),e;if("option"!==tokens[0]){var val=onenumvalue(tokens);e.values[val.name]=val.val}else options=onoption(tokens),e.options[options.name]=options.value}throw new Error("No closing tag for enum")},onoption=function(tokens){for(var name=null,value=null;tokens.length;){if(";"===tokens[0])return tokens.shift(),{name:name,value:value};switch(tokens[0]){case"option":tokens.shift();var hasBracket="("===tokens[0];if(hasBracket&&tokens.shift(),name=tokens.shift(),hasBracket){if(")"!==tokens[0])throw new Error("Expected ) but found "+tokens[0]);tokens.shift()}"."===tokens[0][0]&&(name+=tokens.shift());break;case"=":if(tokens.shift(),null===name)throw new Error("Expected key for option with value: "+tokens[0]);if(value=function(value){return"true"===value||"false"!==value&&value.replace(/^"+|"+$/gm,"")}(tokens.shift()),"optimize_for"===name&&!/^(SPEED|CODE_SIZE|LITE_RUNTIME)$/.test(value))throw new Error("Unexpected value for option optimize_for: "+value);"{"===value&&(value=onoptionMap(tokens));break;default:throw new Error("Unexpected token in option: "+tokens[0])}}},onoptionMap=function(tokens){for(var map={};tokens.length;){if("}"===tokens[0])return tokens.shift(),map;var hasBracket="("===tokens[0];hasBracket&&tokens.shift();var key=tokens.shift();if(hasBracket){if(")"!==tokens[0])throw new Error("Expected ) but found "+tokens[0]);tokens.shift()}var value=null;switch(tokens[0]){case":":if(void 0!==map[key])throw new Error("Duplicate option map key "+key);tokens.shift(),"{"===(value=function(value){return"true"===value||"false"!==value&&value.replace(/^"+|"+$/gm,"")}(tokens.shift()))&&(value=onoptionMap(tokens)),map[key]=value;break;case"{":if(tokens.shift(),value=onoptionMap(tokens),void 0===map[key]&&(map[key]=[]),!Array.isArray(map[key]))throw new Error("Duplicate option map key "+key);map[key].push(value);break;default:throw new Error("Unexpected token in option map: "+tokens[0])}}throw new Error("No closing tag for option map")},onimport=function(tokens){tokens.shift();var file=tokens.shift().replace(/^"+|"+$/gm,"");if(";"!==tokens[0])throw new Error("Unexpected token: "+tokens[0]+'. Expected ";"');return tokens.shift(),file},onservice=function(tokens){tokens.shift();var service={name:tokens.shift(),methods:[],options:{}};if("{"!==tokens[0])throw new Error("Expected { but found "+tokens[0]);for(tokens.shift();tokens.length;){if("}"===tokens[0])return tokens.shift(),";"===tokens[0]&&tokens.shift(),service;switch(tokens[0]){case"option":var opt=onoption(tokens);if(void 0!==service.options[opt.name])throw new Error("Duplicate option "+opt.name);service.options[opt.name]=opt.value;break;case"rpc":service.methods.push(onrpc(tokens));break;default:throw new Error("Unexpected token in service: "+tokens[0])}}throw new Error("No closing tag for service")},onrpc=function(tokens){tokens.shift();var rpc={name:tokens.shift(),input_type:null,output_type:null,client_streaming:!1,server_streaming:!1,options:{}};if("("!==tokens[0])throw new Error("Expected ( but found "+tokens[0]);if(tokens.shift(),"stream"===tokens[0]&&(tokens.shift(),rpc.client_streaming=!0),rpc.input_type=tokens.shift(),")"!==tokens[0])throw new Error("Expected ) but found "+tokens[0]);if(tokens.shift(),"returns"!==tokens[0])throw new Error("Expected returns but found "+tokens[0]);if(tokens.shift(),"("!==tokens[0])throw new Error("Expected ( but found "+tokens[0]);if(tokens.shift(),"stream"===tokens[0]&&(tokens.shift(),rpc.server_streaming=!0),rpc.output_type=tokens.shift(),")"!==tokens[0])throw new Error("Expected ) but found "+tokens[0]);if(tokens.shift(),";"===tokens[0])return tokens.shift(),rpc;if("{"!==tokens[0])throw new Error("Expected { but found "+tokens[0]);for(tokens.shift();tokens.length;){if("}"===tokens[0])return tokens.shift(),";"===tokens[0]&&tokens.shift(),rpc;if("option"!==tokens[0])throw new Error("Unexpected token in rpc options: "+tokens[0]);var opt=onoption(tokens);if(void 0!==rpc.options[opt.name])throw new Error("Duplicate option "+opt.name);rpc.options[opt.name]=opt.value}throw new Error("No closing tag for rpc")};module.exports=function(buf){for(var tokens=tokenize(buf.toString()),i=0;i<tokens.length;i++)if(/^(\"|\')([^\'\"]*)$/.test(tokens[i])){var j;for(j=1===tokens[i].length?i+1:i;j<tokens.length;j++)if(/^([^\'\"]*)(\"|\')$/.test(tokens[j])){tokens=tokens.slice(0,i).concat(tokens.slice(i,j+1).join("")).concat(tokens.slice(j+1));break}}for(var schema={syntax:3,package:null,imports:[],enums:[],messages:[],options:{},extends:[]},firstline=!0;tokens.length;){switch(tokens[0]){case"package":schema.package=onpackagename(tokens);break;case"syntax":if(!firstline)throw new Error("Protobuf syntax version should be first thing in file");schema.syntax=onsyntaxversion(tokens);break;case"message":schema.messages.push(onmessage(tokens));break;case"enum":schema.enums.push(onenum(tokens));break;case"option":var opt=onoption(tokens);if(schema.options[opt.name])throw new Error("Duplicate option "+opt.name);schema.options[opt.name]=opt.value;break;case"import":schema.imports.push(onimport(tokens));break;case"extend":schema.extends.push(onextend(tokens));break;case"service":schema.services||(schema.services=[]),schema.services.push(onservice(tokens));break;default:throw new Error("Unexpected token: "+tokens[0])}firstline=!1}return schema.extends.forEach(function(ext){schema.messages.forEach(function(msg){msg.name===ext.name&&ext.message.fields.forEach(function(field){if(!msg.extensions||field.tag<msg.extensions.from||field.tag>msg.extensions.to)throw new Error(msg.name+" does not declare "+field.tag+" as an extension number");msg.fields.push(field)})})}),schema.messages.forEach(function(msg){msg.fields.forEach(function(field){var fieldSplit,messageName,nestedEnumName,message;if(field.options&&"true"===field.options.packed&&-1===PACKABLE_TYPES.indexOf(field.type)){if(-1===field.type.indexOf(".")){if(msg.enums&&msg.enums.some(function(en){return en.name===field.type}))return}else{if((fieldSplit=field.type.split(".")).length>2)throw new Error("what is this?");if(messageName=fieldSplit[0],nestedEnumName=fieldSplit[1],schema.messages.some(function(msg){if(msg.name===messageName)return message=msg,msg}),message&&message.enums&&message.enums.some(function(en){return en.name===nestedEnumName}))return}throw new Error("Fields of type "+field.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')}})}),schema}},function(module,exports){module.exports=function(sch){var trim=function(line){return line.trim()};return sch.replace(/([;,{}\(\)=\:\[\]<>]|\/\*|\*\/)/g," $1 ").split(/\n/).map(trim).filter(Boolean).map(function(line){var i=line.indexOf("//");return i>-1?line.slice(0,i):line}).map(trim).filter(Boolean).join("\n").split(/\s+|\n+/gm).filter(function(){var inside=!1;return function(token){return"/*"===token?(inside=!0,!1):"*/"===token?(inside=!1,!1):!inside}}())}},function(module,exports){var onfield=function(f,result){var prefix=f.repeated?"repeated":f.required?"required":"optional";"map"===f.type&&(prefix="map<"+f.map.from+","+f.map.to+">"),f.oneof&&(prefix="");var opts=Object.keys(f.options||{}).map(function(key){return key+" = "+f.options[key]}).join(",");return opts&&(opts=" ["+opts+"]"),result.push((prefix?prefix+" ":"")+("map"===f.map?"":f.type+" ")+f.name+" = "+f.tag+opts+";"),result},onmessage=function(m,result){result.push("message "+m.name+" {"),m.enums||(m.enums=[]),m.enums.forEach(function(e){result.push(onenum(e,[]))}),m.messages||(m.messages=[]),m.messages.forEach(function(m){result.push(onmessage(m,[]))});var oneofs={};return m.fields||(m.fields=[]),m.fields.forEach(function(f){f.oneof?(oneofs[f.oneof]||(oneofs[f.oneof]=[]),oneofs[f.oneof].push(onfield(f,[]))):result.push(onfield(f,[]))}),Object.keys(oneofs).forEach(function(n){oneofs[n].unshift("oneof "+n+" {"),oneofs[n].push("}"),result.push(oneofs[n])}),result.push("}",""),result},onenum=function(e,result){result.push("enum "+e.name+" {"),e.options||(e.options={});var options=onoption(e.options,[]);return options.length>1&&result.push(options.slice(0,-1)),Object.keys(e.values).map(function(v){var val=onenumvalue(e.values[v]);result.push([v+" = "+val+";"])}),result.push("}",""),result},onenumvalue=function(v,result){var opts=Object.keys(v.options||{}).map(function(key){return key+" = "+v.options[key]}).join(",");return opts&&(opts=" ["+opts+"]"),v.value+opts},onoption=function(o,result){var keys=Object.keys(o);return keys.forEach(function(option){var v=o[option];~option.indexOf(".")&&(option="("+option+")");var type=typeof v;"object"===type?(v=onoptionMap(v,[])).length&&result.push("option "+option+" = {",v,"};"):("string"===type&&"optimize_for"!==option&&(v='"'+v+'"'),result.push("option "+option+" = "+v+";"))}),keys.length>0&&result.push(""),result},onoptionMap=function(o,result){return Object.keys(o).forEach(function(k){var v=o[k],type=typeof v;"object"===type?Array.isArray(v)?v.forEach(function(v){(v=onoptionMap(v,[])).length&&result.push(k+" {",v,"}")}):(v=onoptionMap(v,[])).length&&result.push(k+" {",v,"}"):("string"===type&&(v='"'+v+'"'),result.push(k+": "+v))}),result},onservices=function(s,result){return result.push("service "+s.name+" {"),s.options||(s.options={}),onoption(s.options,result),s.methods||(s.methods=[]),s.methods.forEach(function(m){result.push(onrpc(m,[]))}),result.push("}",""),result},onrpc=function(rpc,result){var def="rpc "+rpc.name+"(";rpc.client_streaming&&(def+="stream "),def+=rpc.input_type+") returns (",rpc.server_streaming&&(def+="stream "),def+=rpc.output_type+")",rpc.options||(rpc.options={});var options=onoption(rpc.options,[]);return options.length>1?result.push(def+" {",options.slice(0,-1),"}"):result.push(def+";"),result},indent=function(lvl){return function(line){return Array.isArray(line)?line.map(indent(lvl+"  ")).join("\n"):lvl+line}};module.exports=function(schema){var result=[];return result.push('syntax = "proto'+schema.syntax+'";',""),schema.package&&result.push("package "+schema.package+";",""),schema.options||(schema.options={}),onoption(schema.options,result),schema.enums||(schema.enums=[]),schema.enums.forEach(function(e){onenum(e,result)}),schema.messages||(schema.messages=[]),schema.messages.forEach(function(m){onmessage(m,result)}),schema.services&&schema.services.forEach(function(s){onservices(s,result)}),result.map(indent("")).join("\n")}},function(module,exports,__webpack_require__){"use strict";var encodings=__webpack_require__(127),compileDecode=__webpack_require__(128),compileEncode=__webpack_require__(129),compileEncodingLength=__webpack_require__(130),varint=__webpack_require__(3),flatten=function(values){if(!values)return null;var result={};return Object.keys(values).forEach(function(k){result[k]=values[k].value}),result};module.exports=function(schema,extraEncodings){var messages={},enums={},cache={},visit=function(schema,prefix){schema.enums&&schema.enums.forEach(function(e){e.id=prefix+(prefix?".":"")+e.name,enums[e.id]=e,visit(e,e.id)}),schema.messages&&schema.messages.forEach(function(m){m.id=prefix+(prefix?".":"")+m.name,messages[m.id]=m,m.fields.forEach(function(f){if(f.map){var name="Map_"+f.map.from+"_"+f.map.to,map={name:name,enums:[],messages:[],fields:[{name:"key",type:f.map.from,tag:1,repeated:!1,required:!0},{name:"value",type:f.map.to,tag:2,repeated:!1,required:!1}],extensions:null,id:prefix+(prefix?".":"")+name};messages[map.id]||(messages[map.id]=map,schema.messages.push(map)),f.type=name,f.repeated=!0}}),visit(m,m.id)})};visit(schema,"");var compileEnum=function(e){var values=Object.keys(e.values||[]).map(function(k){return parseInt(e.values[k].value,10)});return encodings.make(0,function encode(val,buf,offset){if(!values.length||-1===values.indexOf(val))throw new Error("Invalid enum value: "+val);return varint.encode(val,buf,offset),encode.bytes=varint.encode.bytes,buf},function decode(buf,offset){var val=varint.decode(buf,offset);if(!values.length||-1===values.indexOf(val))throw new Error("Invalid enum value: "+val);return decode.bytes=varint.decode.bytes,val},varint.encodingLength)},compileMessage=function(m,exports){m.messages.forEach(function(nested){exports[nested.name]=resolve(nested.name,m.id)}),m.enums.forEach(function(val){exports[val.name]=flatten(val.values)}),exports.type=2,exports.message=!0,exports.name=m.name;var oneofs={};m.fields.forEach(function(f){f.oneof&&(oneofs[f.oneof]||(oneofs[f.oneof]=[]),oneofs[f.oneof].push(f.name))});var enc=m.fields.map(function(f){return resolve(f.type,m.id)}),encodingLength=compileEncodingLength(m,enc,oneofs),encode=compileEncode(m,resolve,enc,oneofs,encodingLength),decode=compileDecode(m,resolve,enc);return encode.bytes=decode.bytes=0,exports.buffer=!0,exports.encode=encode,exports.decode=decode,exports.encodingLength=encodingLength,exports},resolve=function(name,from,compile){if(extraEncodings&&extraEncodings[name])return extraEncodings[name];if(encodings[name])return encodings[name];var m=(from?from+"."+name:name).split(".").map(function(part,i,list){return list.slice(0,i).concat(name).join(".")}).reverse().reduce(function(result,id){return result||messages[id]||enums[id]},null);if(!1===compile)return m;if(!m)throw new Error("Could not resolve "+name);return m.values?compileEnum(m):cache[m.id]||compileMessage(m,cache[m.id]={})};return(schema.enums||[]).concat((schema.messages||[]).map(function(message){return resolve(message.id)}))}},function(module,exports,__webpack_require__){"use strict";var varint=__webpack_require__(3),svarint=__webpack_require__(48),Buffer=__webpack_require__(1).Buffer,encoder=function(type,encode,decode,encodingLength){return encode.bytes=decode.bytes=0,{type:type,encode:encode,decode:decode,encodingLength:encodingLength}};exports.make=encoder,exports.bytes=function(tag){var bufferLength=function(val){return Buffer.isBuffer(val)?val.length:Buffer.byteLength(val)},encode=function(val,buffer,offset){var oldOffset=offset,len=bufferLength(val);return varint.encode(len,buffer,offset),offset+=varint.encode.bytes,Buffer.isBuffer(val)?val.copy(buffer,offset):buffer.write(val,offset,len),offset+=len,encode.bytes=offset-oldOffset,buffer},decode=function(buffer,offset){var oldOffset=offset,len=varint.decode(buffer,offset);offset+=varint.decode.bytes;var val=buffer.slice(offset,offset+len);return offset+=val.length,decode.bytes=offset-oldOffset,val};return encoder(2,encode,decode,function(val){var len=bufferLength(val);return varint.encodingLength(len)+len})}(),exports.string=function(){var encode=function(val,buffer,offset){var oldOffset=offset,len=Buffer.byteLength(val);return varint.encode(len,buffer,offset,"utf-8"),offset+=varint.encode.bytes,buffer.write(val,offset,len),offset+=len,encode.bytes=offset-oldOffset,buffer},decode=function(buffer,offset){var oldOffset=offset,len=varint.decode(buffer,offset);offset+=varint.decode.bytes;var val=buffer.toString("utf-8",offset,offset+len);return offset+=len,decode.bytes=offset-oldOffset,val};return encoder(2,encode,decode,function(val){var len=Buffer.byteLength(val);return varint.encodingLength(len)+len})}(),exports.bool=function(){var encode=function(val,buffer,offset){return buffer[offset]=val?1:0,encode.bytes=1,buffer},decode=function(buffer,offset){var bool=buffer[offset]>0;return decode.bytes=1,bool};return encoder(0,encode,decode,function(val){return 1})}(),exports.int32=function(){var decode=function(buffer,offset){var val=varint.decode(buffer,offset);return decode.bytes=varint.decode.bytes,val>2147483647?val-4294967296:val};return encoder(0,varint.encode,decode,function(val){return varint.encodingLength(val<0?val+4294967296:val)})}(),exports.int64=function(){var decode=function(buffer,offset){var val=varint.decode(buffer,offset);if(val>=Math.pow(2,63)){for(var limit=9;255===buffer[offset+limit-1];)limit--;limit=limit||9;var subset=Buffer.allocUnsafe(limit);buffer.copy(subset,0,offset,offset+limit),subset[limit-1]=127&subset[limit-1],val=-1*varint.decode(subset,0),decode.bytes=10}else decode.bytes=varint.decode.bytes;return val},encode=function(val,buffer,offset){if(val<0){var last=offset+9;for(varint.encode(-1*val,buffer,offset),buffer[offset+=varint.encode.bytes-1]=128|buffer[offset];offset<last-1;)buffer[++offset]=255;buffer[last]=1,encode.bytes=10}else varint.encode(val,buffer,offset),encode.bytes=varint.encode.bytes;return buffer};return encoder(0,encode,decode,function(val){return val<0?10:varint.encodingLength(val)})}(),exports.sint32=exports.sint64=encoder(0,svarint.encode,svarint.decode,svarint.encodingLength),exports.uint32=exports.uint64=exports.enum=exports.varint=encoder(0,varint.encode,varint.decode,varint.encodingLength),exports.fixed64=exports.sfixed64=function(){var encode=function(val,buffer,offset){return val.copy(buffer,offset),encode.bytes=8,buffer},decode=function(buffer,offset){var val=buffer.slice(offset,offset+8);return decode.bytes=8,val};return encoder(1,encode,decode,function(val){return 8})}(),exports.double=function(){var encode=function(val,buffer,offset){return buffer.writeDoubleLE(val,offset),encode.bytes=8,buffer},decode=function(buffer,offset){var val=buffer.readDoubleLE(offset);return decode.bytes=8,val};return encoder(1,encode,decode,function(val){return 8})}(),exports.fixed32=function(){var encode=function(val,buffer,offset){return buffer.writeUInt32LE(val,offset),encode.bytes=4,buffer},decode=function(buffer,offset){var val=buffer.readUInt32LE(offset);return decode.bytes=4,val};return encoder(5,encode,decode,function(val){return 4})}(),exports.sfixed32=function(){var encode=function(val,buffer,offset){return buffer.writeInt32LE(val,offset),encode.bytes=4,buffer},decode=function(buffer,offset){var val=buffer.readInt32LE(offset);return decode.bytes=4,val};return encoder(5,encode,decode,function(val){return 4})}(),exports.float=function(){var encode=function(val,buffer,offset){return buffer.writeFloatLE(val,offset),encode.bytes=4,buffer},decode=function(buffer,offset){var val=buffer.readFloatLE(offset);return decode.bytes=4,val};return encoder(5,encode,decode,function(val){return 4})}()},function(module,exports,__webpack_require__){"use strict";var varint=__webpack_require__(3),defined=__webpack_require__(25).defined,skip=function(type,buffer,offset){switch(type){case 0:return varint.decode(buffer,offset),offset+varint.decode.bytes;case 1:return offset+8;case 2:var len=varint.decode(buffer,offset);return offset+varint.decode.bytes+len;case 3:case 4:throw new Error("Groups are not supported");case 5:return offset+4;default:throw new Error("Unknown wire type: "+type)}},defaultValue=function(f,def){if(f.map)return{};if(f.repeated)return[];switch(f.type){case"string":return null!=def?def:"";case"bool":return"true"===def;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(def||0,10);default:return null}};module.exports=function(m,resolve,enc){function decodeField(e,field,obj,buf,offset,i){var name=field.name;if(field.oneof)for(var props=Object.keys(obj),j=0;j<props.length;j++)oneofFields.indexOf(props[j])>-1&&delete obj[props[j]];if(e.message){var len=varint.decode(buf,offset);offset+=varint.decode.bytes;var decoded=e.decode(buf,offset,offset+len);field.map?(obj[name]=obj[name]||{},obj[name][decoded.key]=decoded.value):field.repeated?(obj[name]=obj[name]||[],obj[name].push(decoded)):obj[name]=decoded}else field.repeated?(obj[name]=obj[name]||[],obj[name].push(e.decode(buf,offset))):obj[name]=e.decode(buf,offset);return offset+=e.decode.bytes}for(var requiredFields=[],fields={},oneofFields=[],vals=[],i=0;i<enc.length;i++){var field=m.fields[i];fields[field.tag]=i;var def=field.options&&field.options.default,resolved=resolve(field.type,m.id,!1);vals[i]=[def,resolved&&resolved.values],m.fields[i].packed=field.repeated&&field.options&&field.options.packed&&"false"!==field.options.packed,field.required&&requiredFields.push(field.name),field.oneof&&oneofFields.push(field.name)}return function decode(buf,offset,end){if(null==offset&&(offset=0),null==end&&(end=buf.length),!(end<=buf.length&&offset<=buf.length))throw new Error("Decoded message is not valid");for(var field,oldOffset=offset,obj={};;){if(end<=offset){var name="",j=0;for(j=0;j<requiredFields.length;j++)if(name=requiredFields[j],!defined(obj[name]))throw new Error("Decoded message is not valid, missing required field: "+name);var val,def;for(j=0;j<enc.length;j++)if(field=m.fields[j],def=vals[j][0],val=vals[j][1],name=field.name,!defined(obj[name])){var done=!1;if(field.oneof)for(var props=Object.keys(obj),k=0;k<props.length;k++)if(oneofFields.indexOf(props[k])>-1){done=!0;break}done||(val?field.repeated?obj[name]=[]:(def=def&&val[def]?val[def].value:val[Object.keys(val)[0]].value,obj[name]=parseInt(def||0,10)):obj[name]=defaultValue(field,def))}return decode.bytes=offset-oldOffset,obj}var prefix=varint.decode(buf,offset);offset+=varint.decode.bytes;var i=fields[prefix>>3];if(null!=i){var e=enc[i];if((field=m.fields[i]).packed){var packedEnd=varint.decode(buf,offset);for(packedEnd+=offset+=varint.decode.bytes;offset<packedEnd;)offset=decodeField(e,field,obj,buf,offset)}else offset=decodeField(e,field,obj,buf,offset)}else offset=skip(7&prefix,buf,offset)}}}},function(module,exports,__webpack_require__){"use strict";(function(Buffer){var defined=__webpack_require__(25).defined,varint=__webpack_require__(3);module.exports=function(m,resolve,enc,oneofs,encodingLength){function encodeField(buf,offset,h,e,packed,innerVal){var j=0;if(!packed)for(j=0;j<h.length;j++)buf[offset++]=h[j];return e.message&&(varint.encode(e.encodingLength(innerVal),buf,offset),offset+=varint.encode.bytes),e.encode(innerVal,buf,offset),offset+e.encode.bytes}for(var oneofsKeys=Object.keys(oneofs),encLength=enc.length,ints={},i=0;i<encLength;i++){ints[i]={p:varint.encode(m.fields[i].tag<<3|2),h:varint.encode(m.fields[i].tag<<3|enc[i].type)};var field=m.fields[i];m.fields[i].packed=field.repeated&&field.options&&field.options.packed&&"false"!==field.options.packed}return function encode(obj,buf,offset){null==offset&&(offset=0),null==buf&&(buf=Buffer.allocUnsafe(encodingLength(obj)));var oldOffset=offset,objKeys=Object.keys(obj),i=0,match=!1;for(i=0;i<oneofsKeys.length;i++){var name=oneofsKeys[i],prop=oneofs[i];if(objKeys.indexOf(prop)>-1){if(match)throw new Error("only one of the properties defined in oneof "+name+" can be set");match=!0}}for(i=0;i<encLength;i++){var e=enc[i],field=m.fields[i],val=obj[field.name],j=0;if(defined(val)){var p=ints[i].p,h=ints[i].h,packed=field.packed;if(field.map){var tmp=Object.keys(val);for(j=0;j<tmp.length;j++)tmp[j]={key:tmp[j],value:val[tmp[j]]};val=tmp}if(packed){var packedLen=0;for(j=0;j<val.length;j++)defined(val[j])&&(packedLen+=e.encodingLength(val[j]));if(packedLen){for(j=0;j<h.length;j++)buf[offset++]=p[j];varint.encode(packedLen,buf,offset),offset+=varint.encode.bytes}}if(field.repeated){var innerVal;for(j=0;j<val.length;j++)innerVal=val[j],defined(innerVal)&&(offset=encodeField(buf,offset,h,e,packed,innerVal))}else offset=encodeField(buf,offset,h,e,packed,val)}else if(field.required)throw new Error(field.name+" is required")}return encode.bytes=offset-oldOffset,buf}}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";var defined=__webpack_require__(25).defined,varint=__webpack_require__(3);module.exports=function(m,enc,oneofs){for(var oneofsKeys=Object.keys(oneofs),encLength=enc.length,hls=new Array(encLength),i=0;i<m.fields.length;i++){hls[i]=varint.encodingLength(m.fields[i].tag<<3|enc[i].type);var field=m.fields[i];m.fields[i].packed=field.repeated&&field.options&&field.options.packed&&"false"!==field.options.packed}return function(obj){var length=0,i=0,j=0;for(i=0;i<oneofsKeys.length;i++){var name=oneofsKeys[i],props=oneofs[name],match=!1;for(j=0;j<props.length;j++)if(defined(obj[props[j]])){if(match)throw new Error("only one of the properties defined in oneof "+name+" can be set");match=!0}}for(i=0;i<encLength;i++){var len,e=enc[i],field=m.fields[i],val=obj[field.name],hl=hls[i];if(defined(val)){if(field.map){var tmp=Object.keys(val);for(j=0;j<tmp.length;j++)tmp[j]={key:tmp[j],value:val[tmp[j]]};val=tmp}if(field.packed){var packedLen=0;for(j=0;j<val.length;j++)defined(val[j])&&(packedLen+=len=e.encodingLength(val[j]),e.message&&(packedLen+=varint.encodingLength(len)));packedLen&&(length+=hl+packedLen+varint.encodingLength(packedLen))}else if(field.repeated)for(j=0;j<val.length;j++)defined(val[j])&&(length+=hl+(len=e.encodingLength(val[j]))+(e.message?varint.encodingLength(len):0));else length+=hl+(len=e.encodingLength(val))+(e.message?varint.encodingLength(len):0)}else if(field.required)throw new Error(field.name+" is required")}return length}}},function(module,exports,__webpack_require__){"use strict";function getObservedAddrs(input){if(!hasObservedAddr(input))return[];let addrs=input.observedAddr;return Array.isArray(input.observedAddr)||(addrs=[addrs]),addrs.map(oa=>multiaddr(oa))}function hasObservedAddr(input){return input.observedAddr&&input.observedAddr.length>0}const PeerInfo=__webpack_require__(132),PeerId=__webpack_require__(49),multiaddr=__webpack_require__(87),pull=__webpack_require__(40),lp=__webpack_require__(45),msg=__webpack_require__(46);module.exports=((conn,callback)=>{pull(conn,lp.decode(),pull.take(1),pull.collect((err,data)=>{if(err)return callback(err);if(0===data.length)return callback(new Error("conn was closed, did not receive data"));const input=msg.decode(data[0]);PeerId.createFromPubKey(input.publicKey,(err,id)=>{if(err)return callback(err);const peerInfo=new PeerInfo(id);input.listenAddrs.map(multiaddr).forEach(ma=>peerInfo.multiaddrs.add(ma)),callback(null,peerInfo,getObservedAddrs(input))})}))})},function(module,exports,__webpack_require__){"use strict";const Id=__webpack_require__(49),ensureMultiaddr=__webpack_require__(86).ensureMultiaddr,MultiaddrSet=__webpack_require__(235),assert=__webpack_require__(85);class PeerInfo{constructor(peerId){assert(peerId,"Missing peerId. Use Peer.create(cb) to create one"),this.id=peerId,this.multiaddrs=new MultiaddrSet,this.protocols=new Set,this._connectedMultiaddr=void 0}connect(ma){if(ma=ensureMultiaddr(ma),!this.multiaddrs.has(ma)&&ma.toString()!==`/ipfs/${this.id.toB58String()}`)throw new Error("can't be connected to missing multiaddr from set");this._connectedMultiaddr=ma}disconnect(){this._connectedMultiaddr=void 0}isConnected(){return this._connectedMultiaddr}}PeerInfo.create=((id,callback)=>{if("function"==typeof id)return callback=id,id=null,void Id.create((err,id)=>{if(err)return callback(err);callback(null,new PeerInfo(id))});callback(null,new PeerInfo(id))}),PeerInfo.isPeerInfo=(peerInfo=>Boolean("object"==typeof peerInfo&&peerInfo.id&&peerInfo.multiaddrs)),module.exports=PeerInfo},function(module,exports,__webpack_require__){var Buffer=__webpack_require__(1).Buffer;module.exports=function(ALPHABET){function decodeUnsafe(string){if(0===string.length)return Buffer.allocUnsafe(0);for(var bytes=[0],i=0;i<string.length;i++){var value=ALPHABET_MAP[string[i]];if(void 0===value)return;for(var j=0,carry=value;j<bytes.length;++j)carry+=bytes[j]*BASE,bytes[j]=255&carry,carry>>=8;for(;carry>0;)bytes.push(255&carry),carry>>=8}for(var k=0;string[k]===LEADER&&k<string.length-1;++k)bytes.push(0);return Buffer.from(bytes.reverse())}for(var ALPHABET_MAP={},BASE=ALPHABET.length,LEADER=ALPHABET.charAt(0),z=0;z<ALPHABET.length;z++){var x=ALPHABET.charAt(z);if(void 0!==ALPHABET_MAP[x])throw new TypeError(x+" is ambiguous");ALPHABET_MAP[x]=z}return{encode:function(source){if(0===source.length)return"";for(var digits=[0],i=0;i<source.length;++i){for(var j=0,carry=source[i];j<digits.length;++j)carry+=digits[j]<<8,digits[j]=carry%BASE,carry=carry/BASE|0;for(;carry>0;)digits.push(carry%BASE),carry=carry/BASE|0}for(var string="",k=0;0===source[k]&&k<source.length-1;++k)string+=ALPHABET[0];for(var q=digits.length-1;q>=0;--q)string+=ALPHABET[digits[q]];return string},decodeUnsafe:decodeUnsafe,decode:function(string){var buffer=decodeUnsafe(string);if(buffer)return buffer;throw new Error("Non-base"+BASE+" character")}}}},function(module,exports,__webpack_require__){"use strict";exports.names=Object.freeze({sha1:17,"sha2-256":18,"sha2-512":19,"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}),exports.codes=Object.freeze({17:"sha1",18:"sha2-256",19:"sha2-512",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"}),exports.defaultLengths=Object.freeze({17:20,18:32,19:64,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})},function(module,exports,__webpack_require__){"use strict";const hmac=__webpack_require__(51),aes=__webpack_require__(140),keys=__webpack_require__(162);(exports=module.exports).aes=aes,exports.hmac=hmac,exports.keys=keys,exports.randomBytes=__webpack_require__(81)},function(module,exports,__webpack_require__){(function(global,process){!function(global,undefined){"use strict";function clearImmediate(handle){delete tasksByHandle[handle]}function run(task){var callback=task.callback,args=task.args;switch(args.length){case 0:callback();break;case 1:callback(args[0]);break;case 2:callback(args[0],args[1]);break;case 3:callback(args[0],args[1],args[2]);break;default:callback.apply(undefined,args)}}function runIfPresent(handle){if(currentlyRunningATask)setTimeout(runIfPresent,0,handle);else{var task=tasksByHandle[handle];if(task){currentlyRunningATask=!0;try{run(task)}finally{clearImmediate(handle),currentlyRunningATask=!1}}}}if(!global.setImmediate){var registerImmediate,nextHandle=1,tasksByHandle={},currentlyRunningATask=!1,doc=global.document,attachTo=Object.getPrototypeOf&&Object.getPrototypeOf(global);attachTo=attachTo&&attachTo.setTimeout?attachTo:global,"[object process]"==={}.toString.call(global.process)?registerImmediate=function(handle){process.nextTick(function(){runIfPresent(handle)})}:function(){if(global.postMessage&&!global.importScripts){var postMessageIsAsynchronous=!0,oldOnMessage=global.onmessage;return global.onmessage=function(){postMessageIsAsynchronous=!1},global.postMessage("","*"),global.onmessage=oldOnMessage,postMessageIsAsynchronous}}()?function(){var messagePrefix="setImmediate$"+Math.random()+"$",onGlobalMessage=function(event){event.source===global&&"string"==typeof event.data&&0===event.data.indexOf(messagePrefix)&&runIfPresent(+event.data.slice(messagePrefix.length))};global.addEventListener?global.addEventListener("message",onGlobalMessage,!1):global.attachEvent("onmessage",onGlobalMessage),registerImmediate=function(handle){global.postMessage(messagePrefix+handle,"*")}}():global.MessageChannel?function(){var channel=new MessageChannel;channel.port1.onmessage=function(event){runIfPresent(event.data)},registerImmediate=function(handle){channel.port2.postMessage(handle)}}():doc&&"onreadystatechange"in doc.createElement("script")?function(){var html=doc.documentElement;registerImmediate=function(handle){var script=doc.createElement("script");script.onreadystatechange=function(){runIfPresent(handle),script.onreadystatechange=null,html.removeChild(script),script=null},html.appendChild(script)}}():registerImmediate=function(handle){setTimeout(runIfPresent,0,handle)},attachTo.setImmediate=function(callback){"function"!=typeof callback&&(callback=new Function(""+callback));for(var args=new Array(arguments.length-1),i=0;i<args.length;i++)args[i]=arguments[i+1];var task={callback:callback,args:args};return tasksByHandle[nextHandle]=task,registerImmediate(nextHandle),nextHandle++},attachTo.clearImmediate=clearImmediate}}("undefined"==typeof self?void 0===global?this:global:self)}).call(exports,__webpack_require__(4),__webpack_require__(5))},function(module,exports,__webpack_require__){(function(process){function Promise(fn){function next(skipTimeout){waiting.length?(running=!0,waiting.shift()(skipTimeout||!1)):running=!1}if(!(this instanceof Promise))return"function"==typeof fn?new Promise(fn):defer();var value,isResolved=!1,isFulfilled=!1,waiting=[],running=!1;this.then=function(cb,eb){return new Promise(function(resolver){waiting.push(function(skipTimeout){var callback=isFulfilled?cb:eb;if("function"==typeof callback){function timeoutDone(){var val;try{val=callback(value)}catch(ex){return resolver.reject(ex),next()}resolver.fulfill(val),next(!0)}skipTimeout?timeoutDone():nextTick(timeoutDone)}else isFulfilled?(resolver.fulfill(value),next(skipTimeout)):(resolver.reject(value),next(skipTimeout))}),isResolved&&!running&&next()})},function(){function fulfill(val){isResolved||(isPromise(val)?val.then(fulfill,reject):(isResolved=isFulfilled=!0,value=val,next()))}function reject(err){isResolved||(isResolved=!0,isFulfilled=!1,value=err,next())}for(var resolver={fulfill:fulfill,reject:reject},i=0;i<extensions.length;i++)extensions[i](this,resolver);if("function"==typeof fn)try{fn(resolver)}catch(ex){resolver.reject(ex)}}()}function defer(){var resolver,promise=new Promise(function(res){resolver=res});return{resolver:resolver,promise:promise}}var nextTick,isPromise=__webpack_require__(52);nextTick="function"==typeof setImediate?setImediate:"object"==typeof process&&process&&process.nextTick?process.nextTick:function(cb){setTimeout(cb,0)};var extensions=[];module.exports=Promise,Promise.use=function(extension){extensions.push(extension)}}).call(exports,__webpack_require__(5))},function(module,exports){module.exports=function(global){"use strict";function s2a(s){return btoa(s).replace(/\=+$/,"").replace(/\+/g,"-").replace(/\//g,"_")}function a2s(s){return s+="===",s=s.slice(0,-s.length%4),atob(s.replace(/-/g,"+").replace(/_/g,"/"))}function s2b(s){for(var b=new Uint8Array(s.length),i=0;i<s.length;i++)b[i]=s.charCodeAt(i);return b}function b2s(b){return b instanceof ArrayBuffer&&(b=new Uint8Array(b)),String.fromCharCode.apply(String,b)}function alg(a){var r={name:(a.name||a||"").toUpperCase().replace("V","v")};switch(r.name){case"SHA-1":case"SHA-256":case"SHA-384":case"SHA-512":break;case"AES-CBC":case"AES-GCM":case"AES-KW":a.length&&(r.length=a.length);break;case"HMAC":a.hash&&(r.hash=alg(a.hash)),a.length&&(r.length=a.length);break;case"RSAES-PKCS1-v1_5":a.publicExponent&&(r.publicExponent=new Uint8Array(a.publicExponent)),a.modulusLength&&(r.modulusLength=a.modulusLength);break;case"RSASSA-PKCS1-v1_5":case"RSA-OAEP":a.hash&&(r.hash=alg(a.hash)),a.publicExponent&&(r.publicExponent=new Uint8Array(a.publicExponent)),a.modulusLength&&(r.modulusLength=a.modulusLength);break;default:throw new SyntaxError("Bad algorithm name")}return r}function jwkAlg(a){return{HMAC:{"SHA-1":"HS1","SHA-256":"HS256","SHA-384":"HS384","SHA-512":"HS512"},"RSASSA-PKCS1-v1_5":{"SHA-1":"RS1","SHA-256":"RS256","SHA-384":"RS384","SHA-512":"RS512"},"RSAES-PKCS1-v1_5":{"":"RSA1_5"},"RSA-OAEP":{"SHA-1":"RSA-OAEP","SHA-256":"RSA-OAEP-256"},"AES-KW":{128:"A128KW",192:"A192KW",256:"A256KW"},"AES-GCM":{128:"A128GCM",192:"A192GCM",256:"A256GCM"},"AES-CBC":{128:"A128CBC",192:"A192CBC",256:"A256CBC"}}[a.name][(a.hash||{}).name||a.length||""]}function b2jwk(k){(k instanceof ArrayBuffer||k instanceof Uint8Array)&&(k=JSON.parse(decodeURIComponent(escape(b2s(k)))));var jwk={kty:k.kty,alg:k.alg,ext:k.ext||k.extractable};switch(jwk.kty){case"oct":jwk.k=k.k;case"RSA":["n","e","d","p","q","dp","dq","qi","oth"].forEach(function(x){x in k&&(jwk[x]=k[x])});break;default:throw new TypeError("Unsupported key type")}return jwk}function jwk2b(k){var jwk=b2jwk(k);return isIE&&(jwk.extractable=jwk.ext,delete jwk.ext),s2b(unescape(encodeURIComponent(JSON.stringify(jwk)))).buffer}function pkcs2jwk(k){var info=b2der(k),prv=!1;info.length>2&&(prv=!0,info.shift());var jwk={ext:!0};switch(info[0][0]){case"1.2.840.113549.1.1.1":var rsaComp=["n","e","d","p","q","dp","dq","qi"],rsaKey=b2der(info[1]);prv&&rsaKey.shift();for(var i=0;i<rsaKey.length;i++)rsaKey[i][0]||(rsaKey[i]=rsaKey[i].subarray(1)),jwk[rsaComp[i]]=s2a(b2s(rsaKey[i]));jwk.kty="RSA";break;default:throw new TypeError("Unsupported key type")}return jwk}function jwk2pkcs(k){var key,info=[["",null]],prv=!1;switch(k.kty){case"RSA":for(var rsaComp=["n","e","d","p","q","dp","dq","qi"],rsaKey=[],i=0;i<rsaComp.length&&rsaComp[i]in k;i++){var b=rsaKey[i]=s2b(a2s(k[rsaComp[i]]));128&b[0]&&(rsaKey[i]=new Uint8Array(b.length+1),rsaKey[i].set(b,1))}rsaKey.length>2&&(prv=!0,rsaKey.unshift(new Uint8Array([0]))),info[0][0]="1.2.840.113549.1.1.1",key=rsaKey;break;default:throw new TypeError("Unsupported key type")}return info.push(new Uint8Array(der2b(key)).buffer),prv?info.unshift(new Uint8Array([0])):info[1]={tag:3,value:info[1]},new Uint8Array(der2b(info)).buffer}function b2der(buf,ctx){if(buf instanceof ArrayBuffer&&(buf=new Uint8Array(buf)),ctx||(ctx={pos:0,end:buf.length}),ctx.end-ctx.pos<2||ctx.end>buf.length)throw new RangeError("Malformed DER");var tag=buf[ctx.pos++],len=buf[ctx.pos++];if(len>=128){if(len&=127,ctx.end-ctx.pos<len)throw new RangeError("Malformed DER");for(var xlen=0;len--;)xlen<<=8,xlen|=buf[ctx.pos++];len=xlen}if(ctx.end-ctx.pos<len)throw new RangeError("Malformed DER");var rv;switch(tag){case 2:rv=buf.subarray(ctx.pos,ctx.pos+=len);break;case 3:if(buf[ctx.pos++])throw new Error("Unsupported bit string");len--;case 4:rv=new Uint8Array(buf.subarray(ctx.pos,ctx.pos+=len)).buffer;break;case 5:rv=null;break;case 6:var oid=btoa(b2s(buf.subarray(ctx.pos,ctx.pos+=len)));if(!(oid in oid2str))throw new Error("Unsupported OBJECT ID "+oid);rv=oid2str[oid];break;case 48:rv=[];for(var end=ctx.pos+len;ctx.pos<end;)rv.push(b2der(buf,ctx));break;default:throw new Error("Unsupported DER tag 0x"+tag.toString(16))}return rv}function der2b(val,buf){buf||(buf=[]);var tag=0,len=0,pos=buf.length+2;if(buf.push(0,0),val instanceof Uint8Array){tag=2,len=val.length;for(i=0;i<len;i++)buf.push(val[i])}else if(val instanceof ArrayBuffer){tag=4,len=val.byteLength,val=new Uint8Array(val);for(i=0;i<len;i++)buf.push(val[i])}else if(null===val)tag=5,len=0;else if("string"==typeof val&&val in str2oid){var oid=s2b(atob(str2oid[val]));tag=6,len=oid.length;for(i=0;i<len;i++)buf.push(oid[i])}else if(val instanceof Array){for(i=0;i<val.length;i++)der2b(val[i],buf);tag=48,len=buf.length-pos}else{if(!("object"==typeof val&&3===val.tag&&val.value instanceof ArrayBuffer))throw new Error("Unsupported DER value "+val);tag=3,len=(val=new Uint8Array(val.value)).byteLength,buf.push(0);for(var i=0;i<len;i++)buf.push(val[i]);len++}if(len>=128){var xlen=len,len=4;for(buf.splice(pos,0,xlen>>24&255,xlen>>16&255,xlen>>8&255,255&xlen);len>1&&!(xlen>>24);)xlen<<=8,len--;len<4&&buf.splice(pos,4-len),len|=128}return buf.splice(pos-2,2,tag,len),buf}function CryptoKey(key,alg,ext,use){Object.defineProperties(this,{_key:{value:key},type:{value:key.type,enumerable:!0},extractable:{value:void 0===ext?key.extractable:ext,enumerable:!0},algorithm:{value:void 0===alg?key.algorithm:alg,enumerable:!0},usages:{value:void 0===use?key.usages:use,enumerable:!0}})}function isPubKeyUse(u){return"verify"===u||"encrypt"===u||"wrapKey"===u}function isPrvKeyUse(u){return"sign"===u||"decrypt"===u||"unwrapKey"===u}if("function"!=typeof Promise)throw"Promise support required";var _crypto=global.crypto||global.msCrypto;if(_crypto){var _subtle=_crypto.subtle||_crypto.webkitSubtle;if(_subtle){var _Crypto=global.Crypto||_crypto.constructor||Object,_SubtleCrypto=global.SubtleCrypto||_subtle.constructor||Object,isEdge=(global.CryptoKey||global.Key||Object,global.navigator.userAgent.indexOf("Edge/")>-1),isIE=!!global.msCrypto&&!isEdge,isWebkit=!!_crypto.webkitSubtle;if(isIE||isWebkit){var oid2str={KoZIhvcNAQEB:"1.2.840.113549.1.1.1"},str2oid={"1.2.840.113549.1.1.1":"KoZIhvcNAQEB"};if(["generateKey","importKey","unwrapKey"].forEach(function(m){var _fn=_subtle[m];_subtle[m]=function(a,b,c){var ka,kx,ku,args=[].slice.call(arguments);switch(m){case"generateKey":ka=alg(a),kx=b,ku=c;break;case"importKey":ka=alg(c),kx=args[3],ku=args[4],"jwk"===a&&((b=b2jwk(b)).alg||(b.alg=jwkAlg(ka)),b.key_ops||(b.key_ops="oct"!==b.kty?"d"in b?ku.filter(isPrvKeyUse):ku.filter(isPubKeyUse):ku.slice()),args[1]=jwk2b(b));break;case"unwrapKey":ka=args[4],kx=args[5],ku=args[6],args[2]=c._key}if("generateKey"===m&&"HMAC"===ka.name&&ka.hash)return ka.length=ka.length||{"SHA-1":512,"SHA-256":512,"SHA-384":1024,"SHA-512":1024}[ka.hash.name],_subtle.importKey("raw",_crypto.getRandomValues(new Uint8Array(ka.length+7>>3)),ka,kx,ku);if(isWebkit&&"generateKey"===m&&"RSASSA-PKCS1-v1_5"===ka.name&&(!ka.modulusLength||ka.modulusLength>=2048))return a=alg(a),a.name="RSAES-PKCS1-v1_5",delete a.hash,_subtle.generateKey(a,!0,["encrypt","decrypt"]).then(function(k){return Promise.all([_subtle.exportKey("jwk",k.publicKey),_subtle.exportKey("jwk",k.privateKey)])}).then(function(keys){return keys[0].alg=keys[1].alg=jwkAlg(ka),keys[0].key_ops=ku.filter(isPubKeyUse),keys[1].key_ops=ku.filter(isPrvKeyUse),Promise.all([_subtle.importKey("jwk",keys[0],ka,!0,keys[0].key_ops),_subtle.importKey("jwk",keys[1],ka,kx,keys[1].key_ops)])}).then(function(keys){return{publicKey:keys[0],privateKey:keys[1]}});if((isWebkit||isIE&&"SHA-1"===(ka.hash||{}).name)&&"importKey"===m&&"jwk"===a&&"HMAC"===ka.name&&"oct"===b.kty)return _subtle.importKey("raw",s2b(a2s(b.k)),c,args[3],args[4]);if(isWebkit&&"importKey"===m&&("spki"===a||"pkcs8"===a))return _subtle.importKey("jwk",pkcs2jwk(b),c,args[3],args[4]);if(isIE&&"unwrapKey"===m)return _subtle.decrypt(args[3],c,b).then(function(k){return _subtle.importKey(a,k,args[4],args[5],args[6])});var op;try{op=_fn.apply(_subtle,args)}catch(e){return Promise.reject(e)}return isIE&&(op=new Promise(function(res,rej){op.onabort=op.onerror=function(e){rej(e)},op.oncomplete=function(r){res(r.target.result)}})),op=op.then(function(k){return"HMAC"===ka.name&&(ka.length||(ka.length=8*k.algorithm.length)),0==ka.name.search("RSA")&&(ka.modulusLength||(ka.modulusLength=(k.publicKey||k).algorithm.modulusLength),ka.publicExponent||(ka.publicExponent=(k.publicKey||k).algorithm.publicExponent)),k=k.publicKey&&k.privateKey?{publicKey:new CryptoKey(k.publicKey,ka,kx,ku.filter(isPubKeyUse)),privateKey:new CryptoKey(k.privateKey,ka,kx,ku.filter(isPrvKeyUse))}:new CryptoKey(k,ka,kx,ku)})}}),["exportKey","wrapKey"].forEach(function(m){var _fn=_subtle[m];_subtle[m]=function(a,b,c){var args=[].slice.call(arguments);switch(m){case"exportKey":args[1]=b._key;break;case"wrapKey":args[1]=b._key,args[2]=c._key}if((isWebkit||isIE&&"SHA-1"===(b.algorithm.hash||{}).name)&&"exportKey"===m&&"jwk"===a&&"HMAC"===b.algorithm.name&&(args[0]="raw"),!isWebkit||"exportKey"!==m||"spki"!==a&&"pkcs8"!==a||(args[0]="jwk"),isIE&&"wrapKey"===m)return _subtle.exportKey(a,b).then(function(k){return"jwk"===a&&(k=s2b(unescape(encodeURIComponent(JSON.stringify(b2jwk(k)))))),_subtle.encrypt(args[3],c,k)});var op;try{op=_fn.apply(_subtle,args)}catch(e){return Promise.reject(e)}return isIE&&(op=new Promise(function(res,rej){op.onabort=op.onerror=function(e){rej(e)},op.oncomplete=function(r){res(r.target.result)}})),"exportKey"===m&&"jwk"===a&&(op=op.then(function(k){return(isWebkit||isIE&&"SHA-1"===(b.algorithm.hash||{}).name)&&"HMAC"===b.algorithm.name?{kty:"oct",alg:jwkAlg(b.algorithm),key_ops:b.usages.slice(),ext:!0,k:s2a(b2s(k))}:((k=b2jwk(k)).alg||(k.alg=jwkAlg(b.algorithm)),k.key_ops||(k.key_ops="public"===b.type?b.usages.filter(isPubKeyUse):"private"===b.type?b.usages.filter(isPrvKeyUse):b.usages.slice()),k)})),!isWebkit||"exportKey"!==m||"spki"!==a&&"pkcs8"!==a||(op=op.then(function(k){return k=jwk2pkcs(b2jwk(k))})),op}}),["encrypt","decrypt","sign","verify"].forEach(function(m){var _fn=_subtle[m];_subtle[m]=function(a,b,c,d){if(isIE&&(!c.byteLength||d&&!d.byteLength))throw new Error("Empy input is not allowed");var args=[].slice.call(arguments),ka=alg(a);if(isIE&&"decrypt"===m&&"AES-GCM"===ka.name){var tl=a.tagLength>>3;args[2]=(c.buffer||c).slice(0,c.byteLength-tl),a.tag=(c.buffer||c).slice(c.byteLength-tl)}args[1]=b._key;var op;try{op=_fn.apply(_subtle,args)}catch(e){return Promise.reject(e)}return isIE&&(op=new Promise(function(res,rej){op.onabort=op.onerror=function(e){rej(e)},op.oncomplete=function(r){var r=r.target.result;if("encrypt"===m&&r instanceof AesGcmEncryptResult){var c=r.ciphertext,t=r.tag;(r=new Uint8Array(c.byteLength+t.byteLength)).set(new Uint8Array(c),0),r.set(new Uint8Array(t),c.byteLength),r=r.buffer}res(r)}})),op}}),isIE){var _digest=_subtle.digest;_subtle.digest=function(a,b){if(!b.byteLength)throw new Error("Empy input is not allowed");var op;try{op=_digest.call(_subtle,a,b)}catch(e){return Promise.reject(e)}return op=new Promise(function(res,rej){op.onabort=op.onerror=function(e){rej(e)},op.oncomplete=function(r){res(r.target.result)}})},global.crypto=Object.create(_crypto,{getRandomValues:{value:function(a){return _crypto.getRandomValues(a)}},subtle:{value:_subtle}}),global.CryptoKey=CryptoKey}isWebkit&&(_crypto.subtle=_subtle,global.Crypto=_Crypto,global.SubtleCrypto=_SubtleCrypto,global.CryptoKey=CryptoKey)}}}}},function(module,exports,__webpack_require__){"use strict";module.exports={SHA1:20,SHA256:32,SHA512:64}},function(module,exports,__webpack_require__){"use strict";const ciphers=__webpack_require__(141),CIPHER_MODES={16:"aes-128-ctr",32:"aes-256-ctr"};exports.create=function(key,iv,callback){const mode=CIPHER_MODES[key.length];if(!mode)return callback(new Error("Invalid key length"));const cipher=ciphers.createCipheriv(mode,key,iv),decipher=ciphers.createDecipheriv(mode,key,iv);callback(null,{encrypt(data,cb){cb(null,cipher.update(data))},decrypt(data,cb){cb(null,decipher.update(data))}})}},function(module,exports,__webpack_require__){"use strict";const crypto=__webpack_require__(142);module.exports={createCipheriv:crypto.createCipheriv,createDecipheriv:crypto.createDecipheriv}},function(module,exports,__webpack_require__){var ciphers=__webpack_require__(143),deciphers=__webpack_require__(161),modes=__webpack_require__(55);exports.createCipher=exports.Cipher=ciphers.createCipher,exports.createCipheriv=exports.Cipheriv=ciphers.createCipheriv,exports.createDecipher=exports.Decipher=deciphers.createDecipher,exports.createDecipheriv=exports.Decipheriv=deciphers.createDecipheriv,exports.listCiphers=exports.getCiphers=function(){return Object.keys(modes)}},function(module,exports,__webpack_require__){function Cipher(mode,key,iv){Transform.call(this),this._cache=new Splitter,this._cipher=new aes.AES(key),this._prev=Buffer.from(iv),this._mode=mode,this._autopadding=!0}function Splitter(){this.cache=Buffer.allocUnsafe(0)}function createCipheriv(suite,password,iv){var config=MODES[suite.toLowerCase()];if(!config)throw new TypeError("invalid suite type");if("string"==typeof password&&(password=Buffer.from(password)),password.length!==config.key/8)throw new TypeError("invalid key length "+password.length);if("string"==typeof iv&&(iv=Buffer.from(iv)),iv.length!==config.iv)throw new TypeError("invalid iv length "+iv.length);return"stream"===config.type?new StreamCipher(config.module,password,iv):"auth"===config.type?new AuthCipher(config.module,password,iv):new Cipher(config.module,password,iv)}var MODES=__webpack_require__(53),AuthCipher=__webpack_require__(56),Buffer=__webpack_require__(1).Buffer,StreamCipher=__webpack_require__(61),Transform=__webpack_require__(6),aes=__webpack_require__(16),ebtk=__webpack_require__(62);__webpack_require__(2)(Cipher,Transform),Cipher.prototype._update=function(data){this._cache.add(data);for(var chunk,thing,out=[];chunk=this._cache.get();)thing=this._mode.encrypt(this,chunk),out.push(thing);return Buffer.concat(out)};var PADDING=Buffer.alloc(16,16);Cipher.prototype._final=function(){var chunk=this._cache.flush();if(this._autopadding)return chunk=this._mode.encrypt(this,chunk),this._cipher.scrub(),chunk;if(!chunk.equals(PADDING))throw this._cipher.scrub(),new Error("data not multiple of block length")},Cipher.prototype.setAutoPadding=function(setTo){return this._autopadding=!!setTo,this},Splitter.prototype.add=function(data){this.cache=Buffer.concat([this.cache,data])},Splitter.prototype.get=function(){if(this.cache.length>15){var out=this.cache.slice(0,16);return this.cache=this.cache.slice(16),out}return null},Splitter.prototype.flush=function(){for(var len=16-this.cache.length,padBuff=Buffer.allocUnsafe(len),i=-1;++i<len;)padBuff.writeUInt8(len,i);return Buffer.concat([this.cache,padBuff])},exports.createCipheriv=createCipheriv,exports.createCipher=function(suite,password){var config=MODES[suite.toLowerCase()];if(!config)throw new TypeError("invalid suite type");var keys=ebtk(password,!1,config.key,config.iv);return createCipheriv(suite,keys.key,keys.iv)}},function(module,exports){exports.encrypt=function(self,block){return self._cipher.encryptBlock(block)},exports.decrypt=function(self,block){return self._cipher.decryptBlock(block)}},function(module,exports,__webpack_require__){var xor=__webpack_require__(12);exports.encrypt=function(self,block){var data=xor(block,self._prev);return self._prev=self._cipher.encryptBlock(data),self._prev},exports.decrypt=function(self,block){var pad=self._prev;self._prev=block;var out=self._cipher.decryptBlock(block);return xor(out,pad)}},function(module,exports,__webpack_require__){function encryptStart(self,data,decrypt){var len=data.length,out=xor(data,self._cache);return self._cache=self._cache.slice(len),self._prev=Buffer.concat([self._prev,decrypt?data:out]),out}var Buffer=__webpack_require__(1).Buffer,xor=__webpack_require__(12);exports.encrypt=function(self,data,decrypt){for(var len,out=Buffer.allocUnsafe(0);data.length;){if(0===self._cache.length&&(self._cache=self._cipher.encryptBlock(self._prev),self._prev=Buffer.allocUnsafe(0)),!(self._cache.length<=data.length)){out=Buffer.concat([out,encryptStart(self,data,decrypt)]);break}len=self._cache.length,out=Buffer.concat([out,encryptStart(self,data.slice(0,len),decrypt)]),data=data.slice(len)}return out}},function(module,exports,__webpack_require__){(function(Buffer){function encryptByte(self,byteParam,decrypt){var out=self._cipher.encryptBlock(self._prev)[0]^byteParam;return self._prev=Buffer.concat([self._prev.slice(1),Buffer.from([decrypt?byteParam:out])]),out}exports.encrypt=function(self,chunk,decrypt){for(var len=chunk.length,out=Buffer.allocUnsafe(len),i=-1;++i<len;)out[i]=encryptByte(self,chunk[i],decrypt);return out}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){function encryptByte(self,byteParam,decrypt){for(var pad,bit,value,i=-1,out=0;++i<8;)pad=self._cipher.encryptBlock(self._prev),bit=byteParam&1<<7-i?128:0,out+=(128&(value=pad[0]^bit))>>i%8,self._prev=shiftIn(self._prev,decrypt?bit:value);return out}function shiftIn(buffer,value){var len=buffer.length,i=-1,out=Buffer.allocUnsafe(buffer.length);for(buffer=Buffer.concat([buffer,Buffer.from([value])]);++i<len;)out[i]=buffer[i]<<1|buffer[i+1]>>7;return out}var Buffer=__webpack_require__(1).Buffer;exports.encrypt=function(self,chunk,decrypt){for(var len=chunk.length,out=Buffer.allocUnsafe(len),i=-1;++i<len;)out[i]=encryptByte(self,chunk[i],decrypt);return out}},function(module,exports,__webpack_require__){(function(Buffer){function getBlock(self){return self._prev=self._cipher.encryptBlock(self._prev),self._prev}var xor=__webpack_require__(12);exports.encrypt=function(self,chunk){for(;self._cache.length<chunk.length;)self._cache=Buffer.concat([self._cache,getBlock(self)]);var pad=self._cache.slice(0,chunk.length);return self._cache=self._cache.slice(chunk.length),xor(chunk,pad)}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports){},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function copyBuffer(src,target,offset){src.copy(target,offset)}var Buffer=__webpack_require__(1).Buffer;module.exports=function(){function BufferList(){_classCallCheck(this,BufferList),this.head=null,this.tail=null,this.length=0}return BufferList.prototype.push=function(v){var entry={data:v,next:null};this.length>0?this.tail.next=entry:this.head=entry,this.tail=entry,++this.length},BufferList.prototype.unshift=function(v){var entry={data:v,next:this.head};0===this.length&&(this.tail=entry),this.head=entry,++this.length},BufferList.prototype.shift=function(){if(0!==this.length){var ret=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,ret}},BufferList.prototype.clear=function(){this.head=this.tail=null,this.length=0},BufferList.prototype.join=function(s){if(0===this.length)return"";for(var p=this.head,ret=""+p.data;p=p.next;)ret+=s+p.data;return ret},BufferList.prototype.concat=function(n){if(0===this.length)return Buffer.alloc(0);if(1===this.length)return this.head.data;for(var ret=Buffer.allocUnsafe(n>>>0),p=this.head,i=0;p;)copyBuffer(p.data,ret,i),i+=p.data.length,p=p.next;return ret},BufferList}()},function(module,exports,__webpack_require__){(function(global){function config(name){try{if(!global.localStorage)return!1}catch(_){return!1}var val=global.localStorage[name];return null!=val&&"true"===String(val).toLowerCase()}module.exports=function(fn,msg){if(config("noDeprecation"))return fn;var warned=!1;return function(){if(!warned){if(config("throwDeprecation"))throw new Error(msg);config("traceDeprecation")?console.trace(msg):console.warn(msg),warned=!0}return fn.apply(this,arguments)}}}).call(exports,__webpack_require__(4))},function(module,exports,__webpack_require__){"use strict";function PassThrough(options){if(!(this instanceof PassThrough))return new PassThrough(options);Transform.call(this,options)}module.exports=PassThrough;var Transform=__webpack_require__(60),util=__webpack_require__(13);util.inherits=__webpack_require__(2),util.inherits(PassThrough,Transform),PassThrough.prototype._transform=function(chunk,encoding,cb){cb(null,chunk)}},function(module,exports,__webpack_require__){module.exports=__webpack_require__(32)},function(module,exports,__webpack_require__){module.exports=__webpack_require__(7)},function(module,exports,__webpack_require__){module.exports=__webpack_require__(31).Transform},function(module,exports,__webpack_require__){module.exports=__webpack_require__(31).PassThrough},function(module,exports,__webpack_require__){function toArray(buf){return[buf.readUInt32BE(0),buf.readUInt32BE(4),buf.readUInt32BE(8),buf.readUInt32BE(12)]}function fromArray(out){var buf=Buffer.allocUnsafe(16);return buf.writeUInt32BE(out[0]>>>0,0),buf.writeUInt32BE(out[1]>>>0,4),buf.writeUInt32BE(out[2]>>>0,8),buf.writeUInt32BE(out[3]>>>0,12),buf}function GHASH(key){this.h=key,this.state=Buffer.alloc(16,0),this.cache=Buffer.allocUnsafe(0)}var Buffer=__webpack_require__(1).Buffer,ZEROES=Buffer.alloc(16,0);GHASH.prototype.ghash=function(block){for(var i=-1;++i<block.length;)this.state[i]^=block[i];this._multiply()},GHASH.prototype._multiply=function(){for(var j,lsbVi,Vi=toArray(this.h),Zi=[0,0,0,0],i=-1;++i<128;){for(0!=(this.state[~~(i/8)]&1<<7-i%8)&&(Zi[0]^=Vi[0],Zi[1]^=Vi[1],Zi[2]^=Vi[2],Zi[3]^=Vi[3]),lsbVi=0!=(1&Vi[3]),j=3;j>0;j--)Vi[j]=Vi[j]>>>1|(1&Vi[j-1])<<31;Vi[0]=Vi[0]>>>1,lsbVi&&(Vi[0]=Vi[0]^225<<24)}this.state=fromArray(Zi)},GHASH.prototype.update=function(buf){this.cache=Buffer.concat([this.cache,buf]);for(var chunk;this.cache.length>=16;)chunk=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(chunk)},GHASH.prototype.final=function(abl,bl){return this.cache.length&&this.ghash(Buffer.concat([this.cache,ZEROES],16)),this.ghash(fromArray([0,abl,0,bl])),this.state},module.exports=GHASH},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function MD5(){HashBase.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function rotl(x,n){return x<<n|x>>>32-n}function fnF(a,b,c,d,m,k,s){return rotl(a+(b&c|~b&d)+m+k|0,s)+b|0}function fnG(a,b,c,d,m,k,s){return rotl(a+(b&d|c&~d)+m+k|0,s)+b|0}function fnH(a,b,c,d,m,k,s){return rotl(a+(b^c^d)+m+k|0,s)+b|0}function fnI(a,b,c,d,m,k,s){return rotl(a+(c^(b|~d))+m+k|0,s)+b|0}var inherits=__webpack_require__(2),HashBase=__webpack_require__(160),ARRAY16=new Array(16);inherits(MD5,HashBase),MD5.prototype._update=function(){for(var M=ARRAY16,i=0;i<16;++i)M[i]=this._block.readInt32LE(4*i);var a=this._a,b=this._b,c=this._c,d=this._d;b=fnI(b=fnI(b=fnI(b=fnI(b=fnH(b=fnH(b=fnH(b=fnH(b=fnG(b=fnG(b=fnG(b=fnG(b=fnF(b=fnF(b=fnF(b=fnF(b,c=fnF(c,d=fnF(d,a=fnF(a,b,c,d,M[0],3614090360,7),b,c,M[1],3905402710,12),a,b,M[2],606105819,17),d,a,M[3],3250441966,22),c=fnF(c,d=fnF(d,a=fnF(a,b,c,d,M[4],4118548399,7),b,c,M[5],1200080426,12),a,b,M[6],2821735955,17),d,a,M[7],4249261313,22),c=fnF(c,d=fnF(d,a=fnF(a,b,c,d,M[8],1770035416,7),b,c,M[9],2336552879,12),a,b,M[10],4294925233,17),d,a,M[11],2304563134,22),c=fnF(c,d=fnF(d,a=fnF(a,b,c,d,M[12],1804603682,7),b,c,M[13],4254626195,12),a,b,M[14],2792965006,17),d,a,M[15],1236535329,22),c=fnG(c,d=fnG(d,a=fnG(a,b,c,d,M[1],4129170786,5),b,c,M[6],3225465664,9),a,b,M[11],643717713,14),d,a,M[0],3921069994,20),c=fnG(c,d=fnG(d,a=fnG(a,b,c,d,M[5],3593408605,5),b,c,M[10],38016083,9),a,b,M[15],3634488961,14),d,a,M[4],3889429448,20),c=fnG(c,d=fnG(d,a=fnG(a,b,c,d,M[9],568446438,5),b,c,M[14],3275163606,9),a,b,M[3],4107603335,14),d,a,M[8],1163531501,20),c=fnG(c,d=fnG(d,a=fnG(a,b,c,d,M[13],2850285829,5),b,c,M[2],4243563512,9),a,b,M[7],1735328473,14),d,a,M[12],2368359562,20),c=fnH(c,d=fnH(d,a=fnH(a,b,c,d,M[5],4294588738,4),b,c,M[8],2272392833,11),a,b,M[11],1839030562,16),d,a,M[14],4259657740,23),c=fnH(c,d=fnH(d,a=fnH(a,b,c,d,M[1],2763975236,4),b,c,M[4],1272893353,11),a,b,M[7],4139469664,16),d,a,M[10],3200236656,23),c=fnH(c,d=fnH(d,a=fnH(a,b,c,d,M[13],681279174,4),b,c,M[0],3936430074,11),a,b,M[3],3572445317,16),d,a,M[6],76029189,23),c=fnH(c,d=fnH(d,a=fnH(a,b,c,d,M[9],3654602809,4),b,c,M[12],3873151461,11),a,b,M[15],530742520,16),d,a,M[2],3299628645,23),c=fnI(c,d=fnI(d,a=fnI(a,b,c,d,M[0],4096336452,6),b,c,M[7],1126891415,10),a,b,M[14],2878612391,15),d,a,M[5],4237533241,21),c=fnI(c,d=fnI(d,a=fnI(a,b,c,d,M[12],1700485571,6),b,c,M[3],2399980690,10),a,b,M[10],4293915773,15),d,a,M[1],2240044497,21),c=fnI(c,d=fnI(d,a=fnI(a,b,c,d,M[8],1873313359,6),b,c,M[15],4264355552,10),a,b,M[6],2734768916,15),d,a,M[13],1309151649,21),c=fnI(c,d=fnI(d,a=fnI(a,b,c,d,M[4],4149444226,6),b,c,M[11],3174756917,10),a,b,M[2],718787259,15),d,a,M[9],3951481745,21),this._a=this._a+a|0,this._b=this._b+b|0,this._c=this._c+c|0,this._d=this._d+d|0},MD5.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 buffer=new Buffer(16);return buffer.writeInt32LE(this._a,0),buffer.writeInt32LE(this._b,4),buffer.writeInt32LE(this._c,8),buffer.writeInt32LE(this._d,12),buffer},module.exports=MD5}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";function throwIfNotStringOrBuffer(val,prefix){if(!Buffer.isBuffer(val)&&"string"!=typeof val)throw new TypeError(prefix+" must be a string or a buffer")}function HashBase(blockSize){Transform.call(this),this._block=Buffer.allocUnsafe(blockSize),this._blockSize=blockSize,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}var Buffer=__webpack_require__(1).Buffer,Transform=__webpack_require__(29).Transform;__webpack_require__(2)(HashBase,Transform),HashBase.prototype._transform=function(chunk,encoding,callback){var error=null;try{this.update(chunk,encoding)}catch(err){error=err}callback(error)},HashBase.prototype._flush=function(callback){var error=null;try{this.push(this.digest())}catch(err){error=err}callback(error)},HashBase.prototype.update=function(data,encoding){if(throwIfNotStringOrBuffer(data,"Data"),this._finalized)throw new Error("Digest already called");Buffer.isBuffer(data)||(data=Buffer.from(data,encoding));for(var block=this._block,offset=0;this._blockOffset+data.length-offset>=this._blockSize;){for(var i=this._blockOffset;i<this._blockSize;)block[i++]=data[offset++];this._update(),this._blockOffset=0}for(;offset<data.length;)block[this._blockOffset++]=data[offset++];for(var j=0,carry=8*data.length;carry>0;++j)this._length[j]+=carry,(carry=this._length[j]/4294967296|0)>0&&(this._length[j]-=4294967296*carry);return this},HashBase.prototype._update=function(){throw new Error("_update is not implemented")},HashBase.prototype.digest=function(encoding){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var digest=this._digest();void 0!==encoding&&(digest=digest.toString(encoding)),this._block.fill(0),this._blockOffset=0;for(var i=0;i<4;++i)this._length[i]=0;return digest},HashBase.prototype._digest=function(){throw new Error("_digest is not implemented")},module.exports=HashBase},function(module,exports,__webpack_require__){function Decipher(mode,key,iv){Transform.call(this),this._cache=new Splitter,this._last=void 0,this._cipher=new aes.AES(key),this._prev=Buffer.from(iv),this._mode=mode,this._autopadding=!0}function Splitter(){this.cache=Buffer.allocUnsafe(0)}function unpad(last){for(var padded=last[15],i=-1;++i<padded;)if(last[i+(16-padded)]!==padded)throw new Error("unable to decrypt data");if(16!==padded)return last.slice(0,16-padded)}function createDecipheriv(suite,password,iv){var config=MODES[suite.toLowerCase()];if(!config)throw new TypeError("invalid suite type");if("string"==typeof iv&&(iv=Buffer.from(iv)),iv.length!==config.iv)throw new TypeError("invalid iv length "+iv.length);if("string"==typeof password&&(password=Buffer.from(password)),password.length!==config.key/8)throw new TypeError("invalid key length "+password.length);return"stream"===config.type?new StreamCipher(config.module,password,iv,!0):"auth"===config.type?new AuthCipher(config.module,password,iv,!0):new Decipher(config.module,password,iv)}var AuthCipher=__webpack_require__(56),Buffer=__webpack_require__(1).Buffer,MODES=__webpack_require__(53),StreamCipher=__webpack_require__(61),Transform=__webpack_require__(6),aes=__webpack_require__(16),ebtk=__webpack_require__(62);__webpack_require__(2)(Decipher,Transform),Decipher.prototype._update=function(data){this._cache.add(data);for(var chunk,thing,out=[];chunk=this._cache.get(this._autopadding);)thing=this._mode.decrypt(this,chunk),out.push(thing);return Buffer.concat(out)},Decipher.prototype._final=function(){var chunk=this._cache.flush();if(this._autopadding)return unpad(this._mode.decrypt(this,chunk));if(chunk)throw new Error("data not multiple of block length")},Decipher.prototype.setAutoPadding=function(setTo){return this._autopadding=!!setTo,this},Splitter.prototype.add=function(data){this.cache=Buffer.concat([this.cache,data])},Splitter.prototype.get=function(autoPadding){var out;if(autoPadding){if(this.cache.length>16)return out=this.cache.slice(0,16),this.cache=this.cache.slice(16),out}else if(this.cache.length>=16)return out=this.cache.slice(0,16),this.cache=this.cache.slice(16),out;return null},Splitter.prototype.flush=function(){if(this.cache.length)return this.cache},exports.createDecipher=function(suite,password){var config=MODES[suite.toLowerCase()];if(!config)throw new TypeError("invalid suite type");var keys=ebtk(password,!1,config.key,config.iv);return createDecipheriv(suite,keys.key,keys.iv)},exports.createDecipheriv=createDecipheriv},function(module,exports,__webpack_require__){"use strict";function isValidKeyType(keyType){return void 0!==supportedKeys[keyType.toLowerCase()]}const keysPBM=__webpack_require__(34)(__webpack_require__(35));exports=module.exports;const supportedKeys={rsa:__webpack_require__(170),ed25519:__webpack_require__(194),secp256k1:__webpack_require__(198)(keysPBM,__webpack_require__(81))};exports.supportedKeys=supportedKeys,exports.keysPBM=keysPBM,exports.keyStretcher=__webpack_require__(219),exports.generateEphemeralKeyPair=__webpack_require__(224),exports.generateKeyPair=((type,bits,cb)=>{let key=supportedKeys[type.toLowerCase()];if(!key)return cb(new Error("invalid or unsupported key type"));key.generateKeyPair(bits,cb)}),exports.generateKeyPairFromSeed=((type,seed,bits,cb)=>{let key=supportedKeys[type.toLowerCase()];return key?"ed25519"!==type.toLowerCase()?cb(new Error("Seed key derivation is unimplemented for RSA or secp256k1")):void key.generateKeyPairFromSeed(seed,bits,cb):cb(new Error("invalid or unsupported key type"))}),exports.unmarshalPublicKey=(buf=>{const decoded=keysPBM.PublicKey.decode(buf);switch(decoded.Type){case keysPBM.KeyType.RSA:return supportedKeys.rsa.unmarshalRsaPublicKey(decoded.Data);case keysPBM.KeyType.Ed25519:return supportedKeys.ed25519.unmarshalEd25519PublicKey(decoded.Data);case keysPBM.KeyType.Secp256k1:if(supportedKeys.secp256k1)return supportedKeys.secp256k1.unmarshalSecp256k1PublicKey(decoded.Data);throw new Error("secp256k1 support requires libp2p-crypto-secp256k1 package");default:throw new Error("invalid or unsupported key type")}}),exports.marshalPublicKey=((key,type)=>{if(type=(type||"rsa").toLowerCase(),!isValidKeyType(type))throw new Error("invalid or unsupported key type");return key.bytes}),exports.unmarshalPrivateKey=((buf,callback)=>{const decoded=keysPBM.PrivateKey.decode(buf);switch(decoded.Type){case keysPBM.KeyType.RSA:return supportedKeys.rsa.unmarshalRsaPrivateKey(decoded.Data,callback);case keysPBM.KeyType.Ed25519:return supportedKeys.ed25519.unmarshalEd25519PrivateKey(decoded.Data,callback);case keysPBM.KeyType.Secp256k1:return supportedKeys.secp256k1?supportedKeys.secp256k1.unmarshalSecp256k1PrivateKey(decoded.Data,callback):callback(new Error("secp256k1 support requires libp2p-crypto-secp256k1 package"));default:callback(new Error("invalid or unsupported key type"))}}),exports.marshalPrivateKey=((key,type)=>{if(type=(type||"rsa").toLowerCase(),!isValidKeyType(type))throw new Error("invalid or unsupported key type");return key.bytes})},function(module,exports,__webpack_require__){(function(Buffer){var encodings=__webpack_require__(164),varint=__webpack_require__(3),genobj=__webpack_require__(165),genfun=__webpack_require__(167),flatten=function(values){if(!values)return null;var result={};return Object.keys(values).forEach(function(k){result[k]=values[k].value}),result},skip=function(type,buffer,offset){switch(type){case 0:return varint.decode(buffer,offset),offset+varint.decode.bytes;case 1:return offset+8;case 2:var len=varint.decode(buffer,offset);return offset+varint.decode.bytes+len;case 3:case 4:throw new Error("Groups are not supported");case 5:return offset+4}throw new Error("Unknown wire type: "+type)},defined=function(val){return null!==val&&void 0!==val&&("number"!=typeof val||!isNaN(val))},isString=function(def){try{return!!def&&"string"==typeof JSON.parse(def)}catch(err){return!1}},defaultValue=function(f,def){if(f.map)return"{}";if(f.repeated)return"[]";switch(f.type){case"string":return isString(def)?def:'""';case"bool":return"true"===def?"true":"false";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""+Number(def||0);default:return"null"}};module.exports=function(schema,extraEncodings){var messages={},enums={},cache={},visit=function(schema,prefix){schema.enums&&schema.enums.forEach(function(e){e.id=prefix+(prefix?".":"")+e.name,enums[e.id]=e,visit(e,e.id)}),schema.messages&&schema.messages.forEach(function(m){m.id=prefix+(prefix?".":"")+m.name,messages[m.id]=m,m.fields.forEach(function(f){if(f.map){var name="Map_"+f.map.from+"_"+f.map.to,map={name:name,enums:[],messages:[],fields:[{name:"key",type:f.map.from,tag:1,repeated:!1,required:!0},{name:"value",type:f.map.to,tag:2,repeated:!1,required:!1}],extensions:null,id:prefix+(prefix?".":"")+name};messages[map.id]||(messages[map.id]=map,schema.messages.push(map)),f.type=name,f.repeated=!0}}),visit(m,m.id)})};visit(schema,"");var compileEnum=function(e){var conditions=Object.keys(e.values).map(function(k){return"val !== "+parseInt(e.values[k].value,10)}).join(" && ");conditions||(conditions="true");var encode=genfun()("function encode (val, buf, offset) {")('if (%s) throw new Error("Invalid enum value: "+val)',conditions)("varint.encode(val, buf, offset)")("encode.bytes = varint.encode.bytes")("return buf")("}").toFunction({varint:varint}),decode=genfun()("function decode (buf, offset) {")("var val = varint.decode(buf, offset)")('if (%s) throw new Error("Invalid enum value: "+val)',conditions)("decode.bytes = varint.decode.bytes")("return val")("}").toFunction({varint:varint});return encodings.make(0,encode,decode,varint.encodingLength)},compileMessage=function(m,exports){m.messages.forEach(function(nested){exports[nested.name]=resolve(nested.name,m.id)}),m.enums.forEach(function(val){exports[val.name]=flatten(val.values)}),exports.type=2,exports.message=!0,exports.name=m.name;var oneofs={};m.fields.forEach(function(f){f.oneof&&(oneofs[f.oneof]||(oneofs[f.oneof]=[]),oneofs[f.oneof].push(f.name))});var enc=m.fields.map(function(f){return resolve(f.type,m.id)}),forEach=function(fn){for(var i=0;i<enc.length;i++)fn(enc[i],m.fields[i],genobj("obj",m.fields[i].name),i)},encodingLength=genfun()("function encodingLength (obj) {")("var length = 0");Object.keys(oneofs).forEach(function(name){var msg=JSON.stringify("only one of the properties defined in oneof "+name+" can be set"),cnt=oneofs[name].map(function(prop){return"+defined("+genobj("obj",prop)+")"}).join(" + ");encodingLength("if ((%s) > 1) throw new Error(%s)",cnt,msg)}),forEach(function(e,f,val,i){var packed=f.repeated&&f.options&&f.options.packed&&"false"!==f.options.packed,hl=varint.encodingLength(f.tag<<3|e.type);f.required?encodingLength("if (!defined(%s)) throw new Error(%s)",val,JSON.stringify(f.name+" is required")):encodingLength("if (defined(%s)) {",val),f.map&&(encodingLength()("var tmp = Object.keys(%s)",val)("for (var i = 0; i < tmp.length; i++) {")("tmp[i] = {key: tmp[i], value: %s[tmp[i]]}",val)("}"),val="tmp"),packed?(encodingLength()("var packedLen = 0")("for (var i = 0; i < %s.length; i++) {",val)("if (!defined(%s)) continue",val+"[i]")("var len = enc[%d].encodingLength(%s)",i,val+"[i]")("packedLen += len"),e.message&&encodingLength("packedLen += varint.encodingLength(len)"),encodingLength("}")("if (packedLen) {")("length += %d + packedLen + varint.encodingLength(packedLen)",hl)("}")):(f.repeated&&(encodingLength("for (var i = 0; i < %s.length; i++) {",val),encodingLength("if (!defined(%s)) continue",val+="[i]")),encodingLength("var len = enc[%d].encodingLength(%s)",i,val),e.message&&encodingLength("length += varint.encodingLength(len)"),encodingLength("length += %d + len",hl),f.repeated&&encodingLength("}")),f.required||encodingLength("}")}),encodingLength()("return length")("}"),encodingLength=encodingLength.toFunction({defined:defined,varint:varint,enc:enc});var encode=genfun()("function encode (obj, buf, offset) {")("if (!offset) offset = 0")("if (!buf) buf = new Buffer(encodingLength(obj))")("var oldOffset = offset");Object.keys(oneofs).forEach(function(name){var msg=JSON.stringify("only one of the properties defined in oneof "+name+" can be set"),cnt=oneofs[name].map(function(prop){return"+defined("+genobj("obj",prop)+")"}).join(" + ");encode("if ((%s) > 1) throw new Error(%s)",cnt,msg)}),forEach(function(e,f,val,i){f.required?encode("if (!defined(%s)) throw new Error(%s)",val,JSON.stringify(f.name+" is required")):encode("if (defined(%s)) {",val);var j,packed=f.repeated&&f.options&&f.options.packed&&"false"!==f.options.packed,p=varint.encode(f.tag<<3|2),h=varint.encode(f.tag<<3|e.type);if(f.map&&(encode()("var tmp = Object.keys(%s)",val)("for (var i = 0; i < tmp.length; i++) {")("tmp[i] = {key: tmp[i], value: %s[tmp[i]]}",val)("}"),val="tmp"),packed){for(encode()("var packedLen = 0")("for (var i = 0; i < %s.length; i++) {",val)("if (!defined(%s)) continue",val+"[i]")("packedLen += enc[%d].encodingLength(%s)",i,val+"[i]")("}"),encode("if (packedLen) {"),j=0;j<h.length;j++)encode("buf[offset++] = %d",p[j]);encode("varint.encode(packedLen, buf, offset)"),encode("offset += varint.encode.bytes"),encode("}")}if(f.repeated&&(encode("for (var i = 0; i < %s.length; i++) {",val),encode("if (!defined(%s)) continue",val+="[i]")),!packed)for(j=0;j<h.length;j++)encode("buf[offset++] = %d",h[j]);e.message&&(encode("varint.encode(enc[%d].encodingLength(%s), buf, offset)",i,val),encode("offset += varint.encode.bytes")),encode("enc[%d].encode(%s, buf, offset)",i,val),encode("offset += enc[%d].encode.bytes",i),f.repeated&&encode("}"),f.required||encode("}")}),encode()("encode.bytes = offset - oldOffset")("return buf")("}"),encode=encode.toFunction({encodingLength:encodingLength,defined:defined,varint:varint,enc:enc,Buffer:Buffer});var invalid=m.fields.map(function(f,i){return f.required&&"!found"+i}).filter(function(f){return f}).join(" || "),decode=genfun(),objectKeys=[];return forEach(function(e,f){var def=f.options&&f.options.default,resolved=resolve(f.type,m.id,!1),vals=resolved&&resolved.values;vals?f.repeated?objectKeys.push(genobj.property(f.name)+": []"):(def=def&&vals[def]?vals[def].value:vals[Object.keys(vals)[0]].value,objectKeys.push(genobj.property(f.name)+": "+parseInt(def||0,10))):objectKeys.push(genobj.property(f.name)+": "+defaultValue(f,def))}),decode()("function decode (buf, offset, end) {")("if (!offset) offset = 0")("if (!end) end = buf.length")('if (!(end <= buf.length && offset <= buf.length)) throw new Error("Decoded message is not valid")')("var oldOffset = offset")("var obj = {"),objectKeys.forEach(function(prop,i){decode(prop+(i===objectKeys.length-1?"":","))}),decode("}"),forEach(function(e,f,val,i){f.required&&decode("var found%d = false",i)}),decode("while (true) {")("if (end <= offset) {")(invalid&&'if (%s) throw new Error("Decoded message is not valid")',invalid)("decode.bytes = offset - oldOffset")("return obj")("}")("var prefix = varint.decode(buf, offset)")("offset += varint.decode.bytes")("var tag = prefix >> 3")("switch (tag) {"),forEach(function(e,f,val,i){var packed=f.repeated&&f.options&&f.options.packed&&"false"!==f.options.packed;decode("case %d:",f.tag),f.oneof&&m.fields.forEach(function(otherField){otherField.oneof===f.oneof&&f.name!==otherField.name&&decode("delete %s",genobj("obj",otherField.name))}),packed&&decode()("var packedEnd = varint.decode(buf, offset)")("offset += varint.decode.bytes")("packedEnd += offset")("while (offset < packedEnd) {"),e.message?(decode("var len = varint.decode(buf, offset)"),decode("offset += varint.decode.bytes"),f.map?(decode("var tmp = enc[%d].decode(buf, offset, offset + len)",i),decode("%s[tmp.key] = tmp.value",val)):f.repeated?decode("%s.push(enc[%d].decode(buf, offset, offset + len))",val,i):decode("%s = enc[%d].decode(buf, offset, offset + len)",val,i)):f.repeated?decode("%s.push(enc[%d].decode(buf, offset))",val,i):decode("%s = enc[%d].decode(buf, offset)",val,i),decode("offset += enc[%d].decode.bytes",i),packed&&decode("}"),f.required&&decode("found%d = true",i),decode("break")}),decode()("default:")("offset = skip(prefix & 7, buf, offset)")("}")("}")("}"),decode=decode.toFunction({varint:varint,skip:skip,enc:enc}),encode.bytes=decode.bytes=0,exports.buffer=!0,exports.encode=encode,exports.decode=decode,exports.encodingLength=encodingLength,exports},resolve=function(name,from,compile){if(extraEncodings&&extraEncodings[name])return extraEncodings[name];if(encodings[name])return encodings[name];var m=(from?from+"."+name:name).split(".").map(function(part,i,list){return list.slice(0,i).concat(name).join(".")}).reverse().reduce(function(result,id){return result||messages[id]||enums[id]},null);if(!1===compile)return m;if(!m)throw new Error("Could not resolve "+name);return m.values?compileEnum(m):cache[m.id]||compileMessage(m,cache[m.id]={})};return(schema.enums||[]).concat((schema.messages||[]).map(function(message){return resolve(message.id)}))}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){(function(Buffer){var varint=__webpack_require__(3),svarint=__webpack_require__(48),encoder=function(type,encode,decode,encodingLength){return encode.bytes=decode.bytes=0,{type:type,encode:encode,decode:decode,encodingLength:encodingLength}};exports.make=encoder,exports.bytes=function(tag){var bufferLength=function(val){return Buffer.isBuffer(val)?val.length:Buffer.byteLength(val)},encode=function(val,buffer,offset){var oldOffset=offset,len=bufferLength(val);return varint.encode(len,buffer,offset),offset+=varint.encode.bytes,Buffer.isBuffer(val)?val.copy(buffer,offset):buffer.write(val,offset,len),offset+=len,encode.bytes=offset-oldOffset,buffer},decode=function(buffer,offset){var oldOffset=offset,len=varint.decode(buffer,offset);offset+=varint.decode.bytes;var val=buffer.slice(offset,offset+len);return offset+=val.length,decode.bytes=offset-oldOffset,val};return encoder(2,encode,decode,function(val){var len=bufferLength(val);return varint.encodingLength(len)+len})}(),exports.string=function(){var encode=function(val,buffer,offset){var oldOffset=offset,len=Buffer.byteLength(val);return varint.encode(len,buffer,offset,"utf-8"),offset+=varint.encode.bytes,buffer.write(val,offset,len),offset+=len,encode.bytes=offset-oldOffset,buffer},decode=function(buffer,offset){var oldOffset=offset,len=varint.decode(buffer,offset);offset+=varint.decode.bytes;var val=buffer.toString("utf-8",offset,offset+len);return offset+=len,decode.bytes=offset-oldOffset,val};return encoder(2,encode,decode,function(val){var len=Buffer.byteLength(val);return varint.encodingLength(len)+len})}(),exports.bool=function(){var encode=function(val,buffer,offset){return buffer[offset]=val?1:0,encode.bytes=1,buffer},decode=function(buffer,offset){var bool=buffer[offset]>0;return decode.bytes=1,bool};return encoder(0,encode,decode,function(val){return 1})}(),exports.int32=function(){var decode=function(buffer,offset){var val=varint.decode(buffer,offset);return decode.bytes=varint.decode.bytes,val>2147483647?val-4294967296:val};return encoder(0,varint.encode,decode,function(val){return varint.encodingLength(val<0?val+4294967296:val)})}(),exports.int64=function(){var decode=function(buffer,offset){var val=varint.decode(buffer,offset);if(val>=Math.pow(2,63)){for(var limit=9;255===buffer[offset+limit-1];)limit--;var subset=new Buffer(limit=limit||9);buffer.copy(subset,0,offset,offset+limit),subset[limit-1]=127&subset[limit-1],val=-1*varint.decode(subset,0),decode.bytes=10}else decode.bytes=varint.decode.bytes;return val},encode=function(val,buffer,offset){if(val<0){var last=offset+9;for(varint.encode(-1*val,buffer,offset),buffer[offset+=varint.encode.bytes-1]=128|buffer[offset];offset<last-1;)buffer[++offset]=255;buffer[last]=1,encode.bytes=10}else varint.encode(val,buffer,offset),encode.bytes=varint.encode.bytes;return buffer};return encoder(0,encode,decode,function(val){return val<0?10:varint.encodingLength(val)})}(),exports.sint32=exports.sint64=encoder(0,svarint.encode,svarint.decode,svarint.encodingLength),exports.uint32=exports.uint64=exports.enum=exports.varint=encoder(0,varint.encode,varint.decode,varint.encodingLength),exports.fixed64=exports.sfixed64=function(){var encode=function(val,buffer,offset){return val.copy(buffer,offset),encode.bytes=8,buffer},decode=function(buffer,offset){var val=buffer.slice(offset,offset+8);return decode.bytes=8,val};return encoder(1,encode,decode,function(val){return 8})}(),exports.double=function(){var encode=function(val,buffer,offset){return buffer.writeDoubleLE(val,offset),encode.bytes=8,buffer},decode=function(buffer,offset){var val=buffer.readDoubleLE(offset);return decode.bytes=8,val};return encoder(1,encode,decode,function(val){return 8})}(),exports.fixed32=function(){var encode=function(val,buffer,offset){return buffer.writeUInt32LE(val,offset),encode.bytes=4,buffer},decode=function(buffer,offset){var val=buffer.readUInt32LE(offset);return decode.bytes=4,val};return encoder(5,encode,decode,function(val){return 4})}(),exports.sfixed32=function(){var encode=function(val,buffer,offset){return buffer.writeInt32LE(val,offset),encode.bytes=4,buffer},decode=function(buffer,offset){var val=buffer.readInt32LE(offset);return decode.bytes=4,val};return encoder(5,encode,decode,function(val){return 4})}(),exports.float=function(){var encode=function(val,buffer,offset){return buffer.writeFloatLE(val,offset),encode.bytes=4,buffer},decode=function(buffer,offset){var val=buffer.readFloatLE(offset);return decode.bytes=4,val};return encoder(5,encode,decode,function(val){return 4})}()}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){var isProperty=__webpack_require__(166),gen=function(obj,prop){return isProperty(prop)?obj+"."+prop:obj+"["+JSON.stringify(prop)+"]"};gen.valid=isProperty,gen.property=function(prop){return isProperty(prop)?prop:JSON.stringify(prop)},module.exports=gen},function(module,exports,__webpack_require__){"use strict";module.exports=function(str){return/^[$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc][$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc0-9\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19b0-\u19c0\u19c8\u19c9\u19d0-\u19d9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f]*$/.test(str)}},function(module,exports,__webpack_require__){var util=__webpack_require__(63),INDENT_START=/[\{\[]/,INDENT_END=/[\}\]]/;module.exports=function(){var lines=[],indent=0,push=function(str){for(var spaces="";spaces.length<2*indent;)spaces+="  ";lines.push(spaces+str)},line=function(fmt){return fmt?INDENT_END.test(fmt.trim()[0])&&INDENT_START.test(fmt[fmt.length-1])?(indent--,push(util.format.apply(util,arguments)),indent++,line):INDENT_START.test(fmt[fmt.length-1])?(push(util.format.apply(util,arguments)),indent++,line):INDENT_END.test(fmt.trim()[0])?(indent--,push(util.format.apply(util,arguments)),line):(push(util.format.apply(util,arguments)),line):line};return line.toString=function(){return lines.join("\n")},line.toFunction=function(scope){var src="return ("+line.toString()+")",keys=Object.keys(scope||{}).map(function(key){return key}),vals=keys.map(function(key){return scope[key]});return Function.apply(null,keys.concat(src)).apply(null,vals)},arguments.length&&line.apply(null,arguments),line}},function(module,exports){module.exports=function(arg){return arg&&"object"==typeof arg&&"function"==typeof arg.copy&&"function"==typeof arg.fill&&"function"==typeof arg.readUInt8}},function(module,exports){"function"==typeof Object.create?module.exports=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})}:module.exports=function(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}},function(module,exports,__webpack_require__){"use strict";function ensure(cb){if("function"!=typeof cb)throw new Error("callback is required")}const multihashing=__webpack_require__(18),protobuf=__webpack_require__(34),crypto=__webpack_require__(67),pbm=protobuf(__webpack_require__(35));class RsaPublicKey{constructor(key){this._key=key}verify(data,sig,callback){ensure(callback),crypto.hashAndVerify(this._key,sig,data,callback)}marshal(){return crypto.utils.jwkToPkix(this._key)}get bytes(){return pbm.PublicKey.encode({Type:pbm.KeyType.RSA,Data:this.marshal()})}encrypt(bytes){return this._key.encrypt(bytes,"RSAES-PKCS1-V1_5")}equals(key){return this.bytes.equals(key.bytes)}hash(callback){ensure(callback),multihashing(this.bytes,"sha2-256",callback)}}class RsaPrivateKey{constructor(key,publicKey){this._key=key,this._publicKey=publicKey}genSecret(){return crypto.getRandomValues(new Uint8Array(16))}sign(message,callback){ensure(callback),crypto.hashAndSign(this._key,message,callback)}get public(){if(!this._publicKey)throw new Error("public key not provided");return new RsaPublicKey(this._publicKey)}decrypt(msg,callback){crypto.decrypt(this._key,msg,callback)}marshal(){return crypto.utils.jwkToPkcs1(this._key)}get bytes(){return pbm.PrivateKey.encode({Type:pbm.KeyType.RSA,Data:this.marshal()})}equals(key){return this.bytes.equals(key.bytes)}hash(callback){ensure(callback),multihashing(this.bytes,"sha2-256",callback)}}module.exports={RsaPublicKey:RsaPublicKey,RsaPrivateKey:RsaPrivateKey,unmarshalRsaPublicKey:function(bytes){const jwk=crypto.utils.pkixToJwk(bytes);return new RsaPublicKey(jwk)},unmarshalRsaPrivateKey:function(bytes,callback){const jwk=crypto.utils.pkcs1ToJwk(bytes);crypto.unmarshalPrivateKey(jwk,(err,keys)=>{if(err)return callback(err);callback(null,new RsaPrivateKey(keys.privateKey,keys.publicKey))})},generateKeyPair:function(bits,cb){crypto.generateKey(bits,(err,keys)=>{if(err)return cb(err);cb(null,new RsaPrivateKey(keys.privateKey,keys.publicKey))})}}},function(module,exports,__webpack_require__){"use strict";const sha3=__webpack_require__(172),murmur3=__webpack_require__(173),utils=__webpack_require__(64),sha=__webpack_require__(175),toCallback=utils.toCallback,toBuf=utils.toBuf,fromString=utils.fromString,fromNumberTo32BitBuf=utils.fromNumberTo32BitBuf;module.exports={sha1:sha.sha1,sha2256:sha.sha2256,sha2512:sha.sha2512,sha3512:toCallback(toBuf(sha3.sha3_512)),sha3384:toCallback(toBuf(sha3.sha3_384)),sha3256:toCallback(toBuf(sha3.sha3_256)),sha3224:toCallback(toBuf(sha3.sha3_224)),shake128:toCallback(toBuf(sha3.shake_128,256)),shake256:toCallback(toBuf(sha3.shake_256,512)),keccak224:toCallback(toBuf(sha3.keccak_224)),keccak256:toCallback(toBuf(sha3.keccak_256)),keccak384:toCallback(toBuf(sha3.keccak_384)),keccak512:toCallback(toBuf(sha3.keccak_512)),murmur3128:toCallback(toBuf(fromString(murmur3.x64.hash128))),murmur332:toCallback(fromNumberTo32BitBuf(fromString(murmur3.x86.hash32))),addBlake:__webpack_require__(176)}},function(module,exports,__webpack_require__){(function(process,global){!function(){"use strict";function Keccak(bits,padding,outputBits){this.blocks=[],this.s=[],this.padding=padding,this.outputBits=outputBits,this.reset=!0,this.block=0,this.start=0,this.blockCount=1600-(bits<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=outputBits>>5,this.extraBytes=(31&outputBits)>>3;for(var i=0;i<50;++i)this.s[i]=0}function Kmac(bits,padding,outputBits){Keccak.call(this,bits,padding,outputBits)}var root="object"==typeof window?window:{};!root.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node&&(root=global);var COMMON_JS=!root.JS_SHA3_NO_COMMON_JS&&"object"==typeof module&&module.exports,ARRAY_BUFFER=!root.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),SHAKE_PADDING=[31,7936,2031616,520093696],CSHAKE_PADDING=[4,1024,262144,67108864],KECCAK_PADDING=[1,256,65536,16777216],PADDING=[6,1536,393216,100663296],SHIFT=[0,8,16,24],RC=[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],BITS=[224,256,384,512],SHAKE_BITS=[128,256],OUTPUT_TYPES=["hex","buffer","arrayBuffer","array"],CSHAKE_BYTEPAD={128:168,256:136};!root.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(obj){return"[object Array]"===Object.prototype.toString.call(obj)});for(var createOutputMethod=function(bits,padding,outputType){return function(message){return new Keccak(bits,padding,bits).update(message)[outputType]()}},createShakeOutputMethod=function(bits,padding,outputType){return function(message,outputBits){return new Keccak(bits,padding,outputBits).update(message)[outputType]()}},createCshakeOutputMethod=function(bits,padding,outputType){return function(message,outputBits,n,s){return methods["cshake"+bits].update(message,outputBits,n,s)[outputType]()}},createKmacOutputMethod=function(bits,padding,outputType){return function(key,message,outputBits,s){return methods["kmac"+bits].update(key,message,outputBits,s)[outputType]()}},createOutputMethods=function(method,createMethod,bits,padding){for(var i=0;i<OUTPUT_TYPES.length;++i){var type=OUTPUT_TYPES[i];method[type]=createMethod(bits,padding,type)}return method},createMethod=function(bits,padding){var method=createOutputMethod(bits,padding,"hex");return method.create=function(){return new Keccak(bits,padding,bits)},method.update=function(message){return method.create().update(message)},createOutputMethods(method,createOutputMethod,bits,padding)},algorithms=[{name:"keccak",padding:KECCAK_PADDING,bits:BITS,createMethod:createMethod},{name:"sha3",padding:PADDING,bits:BITS,createMethod:createMethod},{name:"shake",padding:SHAKE_PADDING,bits:SHAKE_BITS,createMethod:function(bits,padding){var method=createShakeOutputMethod(bits,padding,"hex");return method.create=function(outputBits){return new Keccak(bits,padding,outputBits)},method.update=function(message,outputBits){return method.create(outputBits).update(message)},createOutputMethods(method,createShakeOutputMethod,bits,padding)}},{name:"cshake",padding:CSHAKE_PADDING,bits:SHAKE_BITS,createMethod:function(bits,padding){var w=CSHAKE_BYTEPAD[bits],method=createCshakeOutputMethod(bits,0,"hex");return method.create=function(outputBits,n,s){return n||s?new Keccak(bits,padding,outputBits).bytepad([n,s],w):methods["shake"+bits].create(outputBits)},method.update=function(message,outputBits,n,s){return method.create(outputBits,n,s).update(message)},createOutputMethods(method,createCshakeOutputMethod,bits,padding)}},{name:"kmac",padding:CSHAKE_PADDING,bits:SHAKE_BITS,createMethod:function(bits,padding){var w=CSHAKE_BYTEPAD[bits],method=createKmacOutputMethod(bits,0,"hex");return method.create=function(key,outputBits,s){return new Kmac(bits,padding,outputBits).bytepad(["KMAC",s],w).bytepad([key],w)},method.update=function(key,message,outputBits,s){return method.create(key,outputBits,s).update(message)},createOutputMethods(method,createKmacOutputMethod,bits,padding)}}],methods={},methodNames=[],i=0;i<algorithms.length;++i)for(var algorithm=algorithms[i],bits=algorithm.bits,j=0;j<bits.length;++j){var methodName=algorithm.name+"_"+bits[j];if(methodNames.push(methodName),methods[methodName]=algorithm.createMethod(bits[j],algorithm.padding),"sha3"!==algorithm.name){var newMethodName=algorithm.name+bits[j];methodNames.push(newMethodName),methods[newMethodName]=methods[methodName]}}Keccak.prototype.update=function(message){var notString="string"!=typeof message;notString&&message.constructor===root.ArrayBuffer&&(message=new Uint8Array(message));var length=message.length;if(notString&&("number"!=typeof length||!Array.isArray(message)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(message))))throw"input is invalid type";for(var i,code,blocks=this.blocks,byteCount=this.byteCount,blockCount=this.blockCount,index=0,s=this.s;index<length;){if(this.reset)for(this.reset=!1,blocks[0]=this.block,i=1;i<blockCount+1;++i)blocks[i]=0;if(notString)for(i=this.start;index<length&&i<byteCount;++index)blocks[i>>2]|=message[index]<<SHIFT[3&i++];else for(i=this.start;index<length&&i<byteCount;++index)(code=message.charCodeAt(index))<128?blocks[i>>2]|=code<<SHIFT[3&i++]:code<2048?(blocks[i>>2]|=(192|code>>6)<<SHIFT[3&i++],blocks[i>>2]|=(128|63&code)<<SHIFT[3&i++]):code<55296||code>=57344?(blocks[i>>2]|=(224|code>>12)<<SHIFT[3&i++],blocks[i>>2]|=(128|code>>6&63)<<SHIFT[3&i++],blocks[i>>2]|=(128|63&code)<<SHIFT[3&i++]):(code=65536+((1023&code)<<10|1023&message.charCodeAt(++index)),blocks[i>>2]|=(240|code>>18)<<SHIFT[3&i++],blocks[i>>2]|=(128|code>>12&63)<<SHIFT[3&i++],blocks[i>>2]|=(128|code>>6&63)<<SHIFT[3&i++],blocks[i>>2]|=(128|63&code)<<SHIFT[3&i++]);if(this.lastByteIndex=i,i>=byteCount){for(this.start=i-byteCount,this.block=blocks[blockCount],i=0;i<blockCount;++i)s[i]^=blocks[i];f(s),this.reset=!0}else this.start=i}return this},Keccak.prototype.encode=function(x,right){var o=255&x,n=1,bytes=[o];for(o=255&(x>>=8);o>0;)bytes.unshift(o),o=255&(x>>=8),++n;return right?bytes.push(n):bytes.unshift(n),this.update(bytes),bytes.length},Keccak.prototype.encodeString=function(str){var notString="string"!=typeof(str=str||"");notString&&str.constructor===root.ArrayBuffer&&(str=new Uint8Array(str));var length=str.length;if(notString&&("number"!=typeof length||!Array.isArray(str)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(str))))throw"input is invalid type";var bytes=0;if(notString)bytes=length;else for(var i=0;i<str.length;++i){var code=str.charCodeAt(i);code<128?bytes+=1:code<2048?bytes+=2:code<55296||code>=57344?bytes+=3:(code=65536+((1023&code)<<10|1023&str.charCodeAt(++i)),bytes+=4)}return bytes+=this.encode(8*bytes),this.update(str),bytes},Keccak.prototype.bytepad=function(strs,w){for(var bytes=this.encode(w),i=0;i<strs.length;++i)bytes+=this.encodeString(strs[i]);var paddingBytes=w-bytes%w,zeros=[];return zeros.length=paddingBytes,this.update(zeros),this},Keccak.prototype.finalize=function(){var blocks=this.blocks,i=this.lastByteIndex,blockCount=this.blockCount,s=this.s;if(blocks[i>>2]|=this.padding[3&i],this.lastByteIndex===this.byteCount)for(blocks[0]=blocks[blockCount],i=1;i<blockCount+1;++i)blocks[i]=0;for(blocks[blockCount-1]|=2147483648,i=0;i<blockCount;++i)s[i]^=blocks[i];f(s)},Keccak.prototype.toString=Keccak.prototype.hex=function(){this.finalize();for(var block,blockCount=this.blockCount,s=this.s,outputBlocks=this.outputBlocks,extraBytes=this.extraBytes,i=0,j=0,hex="";j<outputBlocks;){for(i=0;i<blockCount&&j<outputBlocks;++i,++j)block=s[i],hex+=HEX_CHARS[block>>4&15]+HEX_CHARS[15&block]+HEX_CHARS[block>>12&15]+HEX_CHARS[block>>8&15]+HEX_CHARS[block>>20&15]+HEX_CHARS[block>>16&15]+HEX_CHARS[block>>28&15]+HEX_CHARS[block>>24&15];j%blockCount==0&&(f(s),i=0)}return extraBytes&&(block=s[i],extraBytes>0&&(hex+=HEX_CHARS[block>>4&15]+HEX_CHARS[15&block]),extraBytes>1&&(hex+=HEX_CHARS[block>>12&15]+HEX_CHARS[block>>8&15]),extraBytes>2&&(hex+=HEX_CHARS[block>>20&15]+HEX_CHARS[block>>16&15])),hex},Keccak.prototype.arrayBuffer=function(){this.finalize();var buffer,blockCount=this.blockCount,s=this.s,outputBlocks=this.outputBlocks,extraBytes=this.extraBytes,i=0,j=0,bytes=this.outputBits>>3;buffer=extraBytes?new ArrayBuffer(outputBlocks+1<<2):new ArrayBuffer(bytes);for(var array=new Uint32Array(buffer);j<outputBlocks;){for(i=0;i<blockCount&&j<outputBlocks;++i,++j)array[j]=s[i];j%blockCount==0&&f(s)}return extraBytes&&(array[i]=s[i],buffer=buffer.slice(0,bytes)),buffer},Keccak.prototype.buffer=Keccak.prototype.arrayBuffer,Keccak.prototype.digest=Keccak.prototype.array=function(){this.finalize();for(var offset,block,blockCount=this.blockCount,s=this.s,outputBlocks=this.outputBlocks,extraBytes=this.extraBytes,i=0,j=0,array=[];j<outputBlocks;){for(i=0;i<blockCount&&j<outputBlocks;++i,++j)offset=j<<2,block=s[i],array[offset]=255&block,array[offset+1]=block>>8&255,array[offset+2]=block>>16&255,array[offset+3]=block>>24&255;j%blockCount==0&&f(s)}return extraBytes&&(offset=j<<2,block=s[i],extraBytes>0&&(array[offset]=255&block),extraBytes>1&&(array[offset+1]=block>>8&255),extraBytes>2&&(array[offset+2]=block>>16&255)),array},(Kmac.prototype=new Keccak).finalize=function(){return this.encode(this.outputBits,!0),Keccak.prototype.finalize.call(this)};var f=function(s){var h,l,n,c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15,b16,b17,b18,b19,b20,b21,b22,b23,b24,b25,b26,b27,b28,b29,b30,b31,b32,b33,b34,b35,b36,b37,b38,b39,b40,b41,b42,b43,b44,b45,b46,b47,b48,b49;for(n=0;n<48;n+=2)c0=s[0]^s[10]^s[20]^s[30]^s[40],c1=s[1]^s[11]^s[21]^s[31]^s[41],c2=s[2]^s[12]^s[22]^s[32]^s[42],c3=s[3]^s[13]^s[23]^s[33]^s[43],c4=s[4]^s[14]^s[24]^s[34]^s[44],c5=s[5]^s[15]^s[25]^s[35]^s[45],c6=s[6]^s[16]^s[26]^s[36]^s[46],c7=s[7]^s[17]^s[27]^s[37]^s[47],h=(c8=s[8]^s[18]^s[28]^s[38]^s[48])^(c2<<1|c3>>>31),l=(c9=s[9]^s[19]^s[29]^s[39]^s[49])^(c3<<1|c2>>>31),s[0]^=h,s[1]^=l,s[10]^=h,s[11]^=l,s[20]^=h,s[21]^=l,s[30]^=h,s[31]^=l,s[40]^=h,s[41]^=l,h=c0^(c4<<1|c5>>>31),l=c1^(c5<<1|c4>>>31),s[2]^=h,s[3]^=l,s[12]^=h,s[13]^=l,s[22]^=h,s[23]^=l,s[32]^=h,s[33]^=l,s[42]^=h,s[43]^=l,h=c2^(c6<<1|c7>>>31),l=c3^(c7<<1|c6>>>31),s[4]^=h,s[5]^=l,s[14]^=h,s[15]^=l,s[24]^=h,s[25]^=l,s[34]^=h,s[35]^=l,s[44]^=h,s[45]^=l,h=c4^(c8<<1|c9>>>31),l=c5^(c9<<1|c8>>>31),s[6]^=h,s[7]^=l,s[16]^=h,s[17]^=l,s[26]^=h,s[27]^=l,s[36]^=h,s[37]^=l,s[46]^=h,s[47]^=l,h=c6^(c0<<1|c1>>>31),l=c7^(c1<<1|c0>>>31),s[8]^=h,s[9]^=l,s[18]^=h,s[19]^=l,s[28]^=h,s[29]^=l,s[38]^=h,s[39]^=l,s[48]^=h,s[49]^=l,b0=s[0],b1=s[1],b32=s[11]<<4|s[10]>>>28,b33=s[10]<<4|s[11]>>>28,b14=s[20]<<3|s[21]>>>29,b15=s[21]<<3|s[20]>>>29,b46=s[31]<<9|s[30]>>>23,b47=s[30]<<9|s[31]>>>23,b28=s[40]<<18|s[41]>>>14,b29=s[41]<<18|s[40]>>>14,b20=s[2]<<1|s[3]>>>31,b21=s[3]<<1|s[2]>>>31,b2=s[13]<<12|s[12]>>>20,b3=s[12]<<12|s[13]>>>20,b34=s[22]<<10|s[23]>>>22,b35=s[23]<<10|s[22]>>>22,b16=s[33]<<13|s[32]>>>19,b17=s[32]<<13|s[33]>>>19,b48=s[42]<<2|s[43]>>>30,b49=s[43]<<2|s[42]>>>30,b40=s[5]<<30|s[4]>>>2,b41=s[4]<<30|s[5]>>>2,b22=s[14]<<6|s[15]>>>26,b23=s[15]<<6|s[14]>>>26,b4=s[25]<<11|s[24]>>>21,b5=s[24]<<11|s[25]>>>21,b36=s[34]<<15|s[35]>>>17,b37=s[35]<<15|s[34]>>>17,b18=s[45]<<29|s[44]>>>3,b19=s[44]<<29|s[45]>>>3,b10=s[6]<<28|s[7]>>>4,b11=s[7]<<28|s[6]>>>4,b42=s[17]<<23|s[16]>>>9,b43=s[16]<<23|s[17]>>>9,b24=s[26]<<25|s[27]>>>7,b25=s[27]<<25|s[26]>>>7,b6=s[36]<<21|s[37]>>>11,b7=s[37]<<21|s[36]>>>11,b38=s[47]<<24|s[46]>>>8,b39=s[46]<<24|s[47]>>>8,b30=s[8]<<27|s[9]>>>5,b31=s[9]<<27|s[8]>>>5,b12=s[18]<<20|s[19]>>>12,b13=s[19]<<20|s[18]>>>12,b44=s[29]<<7|s[28]>>>25,b45=s[28]<<7|s[29]>>>25,b26=s[38]<<8|s[39]>>>24,b27=s[39]<<8|s[38]>>>24,b8=s[48]<<14|s[49]>>>18,b9=s[49]<<14|s[48]>>>18,s[0]=b0^~b2&b4,s[1]=b1^~b3&b5,s[10]=b10^~b12&b14,s[11]=b11^~b13&b15,s[20]=b20^~b22&b24,s[21]=b21^~b23&b25,s[30]=b30^~b32&b34,s[31]=b31^~b33&b35,s[40]=b40^~b42&b44,s[41]=b41^~b43&b45,s[2]=b2^~b4&b6,s[3]=b3^~b5&b7,s[12]=b12^~b14&b16,s[13]=b13^~b15&b17,s[22]=b22^~b24&b26,s[23]=b23^~b25&b27,s[32]=b32^~b34&b36,s[33]=b33^~b35&b37,s[42]=b42^~b44&b46,s[43]=b43^~b45&b47,s[4]=b4^~b6&b8,s[5]=b5^~b7&b9,s[14]=b14^~b16&b18,s[15]=b15^~b17&b19,s[24]=b24^~b26&b28,s[25]=b25^~b27&b29,s[34]=b34^~b36&b38,s[35]=b35^~b37&b39,s[44]=b44^~b46&b48,s[45]=b45^~b47&b49,s[6]=b6^~b8&b0,s[7]=b7^~b9&b1,s[16]=b16^~b18&b10,s[17]=b17^~b19&b11,s[26]=b26^~b28&b20,s[27]=b27^~b29&b21,s[36]=b36^~b38&b30,s[37]=b37^~b39&b31,s[46]=b46^~b48&b40,s[47]=b47^~b49&b41,s[8]=b8^~b0&b2,s[9]=b9^~b1&b3,s[18]=b18^~b10&b12,s[19]=b19^~b11&b13,s[28]=b28^~b20&b22,s[29]=b29^~b21&b23,s[38]=b38^~b30&b32,s[39]=b39^~b31&b33,s[48]=b48^~b40&b42,s[49]=b49^~b41&b43,s[0]^=RC[n],s[1]^=RC[n+1]};if(COMMON_JS)module.exports=methods;else for(i=0;i<methodNames.length;++i)root[methodNames[i]]=methods[methodNames[i]]}()}).call(exports,__webpack_require__(5),__webpack_require__(4))},function(module,exports,__webpack_require__){module.exports=__webpack_require__(174)},function(module,exports,__webpack_require__){!function(root,undefined){"use strict";function _x86Multiply(m,n){return(65535&m)*n+(((m>>>16)*n&65535)<<16)}function _x86Rotl(m,n){return m<<n|m>>>32-n}function _x86Fmix(h){return h^=h>>>16,h=_x86Multiply(h,2246822507),h^=h>>>13,h=_x86Multiply(h,3266489909),h^=h>>>16}function _x64Add(m,n){m=[m[0]>>>16,65535&m[0],m[1]>>>16,65535&m[1]],n=[n[0]>>>16,65535&n[0],n[1]>>>16,65535&n[1]];var o=[0,0,0,0];return o[3]+=m[3]+n[3],o[2]+=o[3]>>>16,o[3]&=65535,o[2]+=m[2]+n[2],o[1]+=o[2]>>>16,o[2]&=65535,o[1]+=m[1]+n[1],o[0]+=o[1]>>>16,o[1]&=65535,o[0]+=m[0]+n[0],o[0]&=65535,[o[0]<<16|o[1],o[2]<<16|o[3]]}function _x64Multiply(m,n){m=[m[0]>>>16,65535&m[0],m[1]>>>16,65535&m[1]],n=[n[0]>>>16,65535&n[0],n[1]>>>16,65535&n[1]];var o=[0,0,0,0];return o[3]+=m[3]*n[3],o[2]+=o[3]>>>16,o[3]&=65535,o[2]+=m[2]*n[3],o[1]+=o[2]>>>16,o[2]&=65535,o[2]+=m[3]*n[2],o[1]+=o[2]>>>16,o[2]&=65535,o[1]+=m[1]*n[3],o[0]+=o[1]>>>16,o[1]&=65535,o[1]+=m[2]*n[2],o[0]+=o[1]>>>16,o[1]&=65535,o[1]+=m[3]*n[1],o[0]+=o[1]>>>16,o[1]&=65535,o[0]+=m[0]*n[3]+m[1]*n[2]+m[2]*n[1]+m[3]*n[0],o[0]&=65535,[o[0]<<16|o[1],o[2]<<16|o[3]]}function _x64Rotl(m,n){return 32===(n%=64)?[m[1],m[0]]:n<32?[m[0]<<n|m[1]>>>32-n,m[1]<<n|m[0]>>>32-n]:(n-=32,[m[1]<<n|m[0]>>>32-n,m[0]<<n|m[1]>>>32-n])}function _x64LeftShift(m,n){return 0===(n%=64)?m:n<32?[m[0]<<n|m[1]>>>32-n,m[1]<<n]:[m[1]<<n-32,0]}function _x64Xor(m,n){return[m[0]^n[0],m[1]^n[1]]}function _x64Fmix(h){return h=_x64Xor(h,[0,h[0]>>>1]),h=_x64Multiply(h,[4283543511,3981806797]),h=_x64Xor(h,[0,h[0]>>>1]),h=_x64Multiply(h,[3301882366,444984403]),h=_x64Xor(h,[0,h[0]>>>1])}var library={version:"3.0.1",x86:{},x64:{}};library.x86.hash32=function(key,seed){key=key||"",seed=seed||0;for(var remainder=key.length%4,bytes=key.length-remainder,h1=seed,k1=0,c1=3432918353,c2=461845907,i=0;i<bytes;i+=4)h1=_x86Multiply(h1=_x86Rotl(h1^=k1=_x86Multiply(k1=_x86Rotl(k1=_x86Multiply(k1=255&key.charCodeAt(i)|(255&key.charCodeAt(i+1))<<8|(255&key.charCodeAt(i+2))<<16|(255&key.charCodeAt(i+3))<<24,c1),15),c2),13),5)+3864292196;switch(k1=0,remainder){case 3:k1^=(255&key.charCodeAt(i+2))<<16;case 2:k1^=(255&key.charCodeAt(i+1))<<8;case 1:h1^=k1=_x86Multiply(k1=_x86Rotl(k1=_x86Multiply(k1^=255&key.charCodeAt(i),c1),15),c2)}return h1^=key.length,(h1=_x86Fmix(h1))>>>0},library.x86.hash128=function(key,seed){key=key||"",seed=seed||0;for(var remainder=key.length%16,bytes=key.length-remainder,h1=seed,h2=seed,h3=seed,h4=seed,k1=0,k2=0,k3=0,k4=0,c1=597399067,c2=2869860233,c3=951274213,c4=2716044179,i=0;i<bytes;i+=16)k1=255&key.charCodeAt(i)|(255&key.charCodeAt(i+1))<<8|(255&key.charCodeAt(i+2))<<16|(255&key.charCodeAt(i+3))<<24,k2=255&key.charCodeAt(i+4)|(255&key.charCodeAt(i+5))<<8|(255&key.charCodeAt(i+6))<<16|(255&key.charCodeAt(i+7))<<24,k3=255&key.charCodeAt(i+8)|(255&key.charCodeAt(i+9))<<8|(255&key.charCodeAt(i+10))<<16|(255&key.charCodeAt(i+11))<<24,k4=255&key.charCodeAt(i+12)|(255&key.charCodeAt(i+13))<<8|(255&key.charCodeAt(i+14))<<16|(255&key.charCodeAt(i+15))<<24,h1=_x86Rotl(h1^=k1=_x86Multiply(k1=_x86Rotl(k1=_x86Multiply(k1,c1),15),c2),19),h1=_x86Multiply(h1+=h2,5)+1444728091,h2=_x86Rotl(h2^=k2=_x86Multiply(k2=_x86Rotl(k2=_x86Multiply(k2,c2),16),c3),17),h2=_x86Multiply(h2+=h3,5)+197830471,h3=_x86Rotl(h3^=k3=_x86Multiply(k3=_x86Rotl(k3=_x86Multiply(k3,c3),17),c4),15),h3=_x86Multiply(h3+=h4,5)+2530024501,h4=_x86Rotl(h4^=k4=_x86Multiply(k4=_x86Rotl(k4=_x86Multiply(k4,c4),18),c1),13),h4=_x86Multiply(h4+=h1,5)+850148119;switch(k1=0,k2=0,k3=0,k4=0,remainder){case 15:k4^=key.charCodeAt(i+14)<<16;case 14:k4^=key.charCodeAt(i+13)<<8;case 13:h4^=k4=_x86Multiply(k4=_x86Rotl(k4=_x86Multiply(k4^=key.charCodeAt(i+12),c4),18),c1);case 12:k3^=key.charCodeAt(i+11)<<24;case 11:k3^=key.charCodeAt(i+10)<<16;case 10:k3^=key.charCodeAt(i+9)<<8;case 9:h3^=k3=_x86Multiply(k3=_x86Rotl(k3=_x86Multiply(k3^=key.charCodeAt(i+8),c3),17),c4);case 8:k2^=key.charCodeAt(i+7)<<24;case 7:k2^=key.charCodeAt(i+6)<<16;case 6:k2^=key.charCodeAt(i+5)<<8;case 5:h2^=k2=_x86Multiply(k2=_x86Rotl(k2=_x86Multiply(k2^=key.charCodeAt(i+4),c2),16),c3);case 4:k1^=key.charCodeAt(i+3)<<24;case 3:k1^=key.charCodeAt(i+2)<<16;case 2:k1^=key.charCodeAt(i+1)<<8;case 1:h1^=k1=_x86Multiply(k1=_x86Rotl(k1=_x86Multiply(k1^=key.charCodeAt(i),c1),15),c2)}return h1^=key.length,h2^=key.length,h3^=key.length,h4^=key.length,h1+=h2,h1+=h3,h1+=h4,h2+=h1,h3+=h1,h4+=h1,h1=_x86Fmix(h1),h2=_x86Fmix(h2),h3=_x86Fmix(h3),h4=_x86Fmix(h4),h1+=h2,h1+=h3,h1+=h4,h2+=h1,h3+=h1,h4+=h1,("00000000"+(h1>>>0).toString(16)).slice(-8)+("00000000"+(h2>>>0).toString(16)).slice(-8)+("00000000"+(h3>>>0).toString(16)).slice(-8)+("00000000"+(h4>>>0).toString(16)).slice(-8)},library.x64.hash128=function(key,seed){key=key||"",seed=seed||0;for(var remainder=key.length%16,bytes=key.length-remainder,h1=[0,seed],h2=[0,seed],k1=[0,0],k2=[0,0],c1=[2277735313,289559509],c2=[1291169091,658871167],i=0;i<bytes;i+=16)k1=[255&key.charCodeAt(i+4)|(255&key.charCodeAt(i+5))<<8|(255&key.charCodeAt(i+6))<<16|(255&key.charCodeAt(i+7))<<24,255&key.charCodeAt(i)|(255&key.charCodeAt(i+1))<<8|(255&key.charCodeAt(i+2))<<16|(255&key.charCodeAt(i+3))<<24],k2=[255&key.charCodeAt(i+12)|(255&key.charCodeAt(i+13))<<8|(255&key.charCodeAt(i+14))<<16|(255&key.charCodeAt(i+15))<<24,255&key.charCodeAt(i+8)|(255&key.charCodeAt(i+9))<<8|(255&key.charCodeAt(i+10))<<16|(255&key.charCodeAt(i+11))<<24],h1=_x64Add(_x64Multiply(h1=_x64Add(h1=_x64Rotl(h1=_x64Xor(h1,k1=_x64Multiply(k1=_x64Rotl(k1=_x64Multiply(k1,c1),31),c2)),27),h2),[0,5]),[0,1390208809]),h2=_x64Add(_x64Multiply(h2=_x64Add(h2=_x64Rotl(h2=_x64Xor(h2,k2=_x64Multiply(k2=_x64Rotl(k2=_x64Multiply(k2,c2),33),c1)),31),h1),[0,5]),[0,944331445]);switch(k1=[0,0],k2=[0,0],remainder){case 15:k2=_x64Xor(k2,_x64LeftShift([0,key.charCodeAt(i+14)],48));case 14:k2=_x64Xor(k2,_x64LeftShift([0,key.charCodeAt(i+13)],40));case 13:k2=_x64Xor(k2,_x64LeftShift([0,key.charCodeAt(i+12)],32));case 12:k2=_x64Xor(k2,_x64LeftShift([0,key.charCodeAt(i+11)],24));case 11:k2=_x64Xor(k2,_x64LeftShift([0,key.charCodeAt(i+10)],16));case 10:k2=_x64Xor(k2,_x64LeftShift([0,key.charCodeAt(i+9)],8));case 9:h2=_x64Xor(h2,k2=_x64Multiply(k2=_x64Rotl(k2=_x64Multiply(k2=_x64Xor(k2,[0,key.charCodeAt(i+8)]),c2),33),c1));case 8:k1=_x64Xor(k1,_x64LeftShift([0,key.charCodeAt(i+7)],56));case 7:k1=_x64Xor(k1,_x64LeftShift([0,key.charCodeAt(i+6)],48));case 6:k1=_x64Xor(k1,_x64LeftShift([0,key.charCodeAt(i+5)],40));case 5:k1=_x64Xor(k1,_x64LeftShift([0,key.charCodeAt(i+4)],32));case 4:k1=_x64Xor(k1,_x64LeftShift([0,key.charCodeAt(i+3)],24));case 3:k1=_x64Xor(k1,_x64LeftShift([0,key.charCodeAt(i+2)],16));case 2:k1=_x64Xor(k1,_x64LeftShift([0,key.charCodeAt(i+1)],8));case 1:h1=_x64Xor(h1,k1=_x64Multiply(k1=_x64Rotl(k1=_x64Multiply(k1=_x64Xor(k1,[0,key.charCodeAt(i)]),c1),31),c2))}return h1=_x64Xor(h1,[0,key.length]),h2=_x64Xor(h2,[0,key.length]),h1=_x64Add(h1,h2),h2=_x64Add(h2,h1),h1=_x64Fmix(h1),h2=_x64Fmix(h2),h1=_x64Add(h1,h2),h2=_x64Add(h2,h1),("00000000"+(h1[0]>>>0).toString(16)).slice(-8)+("00000000"+(h1[1]>>>0).toString(16)).slice(-8)+("00000000"+(h2[0]>>>0).toString(16)).slice(-8)+("00000000"+(h2[1]>>>0).toString(16)).slice(-8)},void 0!==module&&module.exports&&(exports=module.exports=library),exports.murmurHash3=library}()},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function webCryptoHash(type){if(!webCrypto)throw new Error("Please use a browser with webcrypto support");return(data,callback)=>{const res=webCrypto.digest({name:type},data);if("function"!=typeof res.then)return res.onerror=(()=>{callback(`Error hashing data using ${type}`)}),void(res.oncomplete=(e=>{callback(null,e.target.result)}));nodeify(res.then(raw=>new Buffer(new Uint8Array(raw))),callback)}}const nodeify=__webpack_require__(15),webCrypto=self.crypto?self.crypto.subtle||self.crypto.webkitSubtle:self.msCrypto?self.msCrypto.subtle:void 0;module.exports={sha1:function(buf,callback){webCryptoHash("SHA-1")(buf,callback)},sha2256:function(buf,callback){webCryptoHash("SHA-256")(buf,callback)},sha2512:function(buf,callback){webCryptoHash("SHA-512")(buf,callback)}}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";(function(Buffer){const blake=__webpack_require__(177),toCallback=__webpack_require__(64).toCallback,blake2b={init:blake.blake2bInit,update:blake.blake2bUpdate,digest:blake.blake2bFinal},blake2s={init:blake.blake2sInit,update:blake.blake2sUpdate,digest:blake.blake2sFinal},makeB2Hash=(size,hf)=>toCallback(buf=>{const ctx=hf.init(size,null);return hf.update(ctx,buf),new Buffer(hf.digest(ctx))});module.exports=(table=>{for(let i=0;i<64;i++)table[45569+i]=makeB2Hash(i+1,blake2b);for(let i=0;i<32;i++)table[45633+i]=makeB2Hash(i+1,blake2s)})}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){var b2b=__webpack_require__(178),b2s=__webpack_require__(179);module.exports={blake2b:b2b.blake2b,blake2bHex:b2b.blake2bHex,blake2bInit:b2b.blake2bInit,blake2bUpdate:b2b.blake2bUpdate,blake2bFinal:b2b.blake2bFinal,blake2s:b2s.blake2s,blake2sHex:b2s.blake2sHex,blake2sInit:b2s.blake2sInit,blake2sUpdate:b2s.blake2sUpdate,blake2sFinal:b2s.blake2sFinal}},function(module,exports,__webpack_require__){function ADD64AA(v,a,b){var o0=v[a]+v[b],o1=v[a+1]+v[b+1];o0>=4294967296&&o1++,v[a]=o0,v[a+1]=o1}function ADD64AC(v,a,b0,b1){var o0=v[a]+b0;b0<0&&(o0+=4294967296);var o1=v[a+1]+b1;o0>=4294967296&&o1++,v[a]=o0,v[a+1]=o1}function B2B_GET32(arr,i){return arr[i]^arr[i+1]<<8^arr[i+2]<<16^arr[i+3]<<24}function B2B_G(a,b,c,d,ix,iy){var x0=m[ix],x1=m[ix+1],y0=m[iy],y1=m[iy+1];ADD64AA(v,a,b),ADD64AC(v,a,x0,x1);var xor0=v[d]^v[a],xor1=v[d+1]^v[a+1];v[d]=xor1,v[d+1]=xor0,ADD64AA(v,c,d),xor0=v[b]^v[c],xor1=v[b+1]^v[c+1],v[b]=xor0>>>24^xor1<<8,v[b+1]=xor1>>>24^xor0<<8,ADD64AA(v,a,b),ADD64AC(v,a,y0,y1),xor0=v[d]^v[a],xor1=v[d+1]^v[a+1],v[d]=xor0>>>16^xor1<<16,v[d+1]=xor1>>>16^xor0<<16,ADD64AA(v,c,d),xor0=v[b]^v[c],xor1=v[b+1]^v[c+1],v[b]=xor1>>>31^xor0<<1,v[b+1]=xor0>>>31^xor1<<1}function blake2bCompress(ctx,last){var i=0;for(i=0;i<16;i++)v[i]=ctx.h[i],v[i+16]=BLAKE2B_IV32[i];for(v[24]=v[24]^ctx.t,v[25]=v[25]^ctx.t/4294967296,last&&(v[28]=~v[28],v[29]=~v[29]),i=0;i<32;i++)m[i]=B2B_GET32(ctx.b,4*i);for(i=0;i<12;i++)B2B_G(0,8,16,24,SIGMA82[16*i+0],SIGMA82[16*i+1]),B2B_G(2,10,18,26,SIGMA82[16*i+2],SIGMA82[16*i+3]),B2B_G(4,12,20,28,SIGMA82[16*i+4],SIGMA82[16*i+5]),B2B_G(6,14,22,30,SIGMA82[16*i+6],SIGMA82[16*i+7]),B2B_G(0,10,20,30,SIGMA82[16*i+8],SIGMA82[16*i+9]),B2B_G(2,12,22,24,SIGMA82[16*i+10],SIGMA82[16*i+11]),B2B_G(4,14,16,26,SIGMA82[16*i+12],SIGMA82[16*i+13]),B2B_G(6,8,18,28,SIGMA82[16*i+14],SIGMA82[16*i+15]);for(i=0;i<16;i++)ctx.h[i]=ctx.h[i]^v[i]^v[i+16]}function blake2bInit(outlen,key){if(0===outlen||outlen>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(key&&key.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");for(var ctx={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:outlen},i=0;i<16;i++)ctx.h[i]=BLAKE2B_IV32[i];var keylen=key?key.length:0;return ctx.h[0]^=16842752^keylen<<8^outlen,key&&(blake2bUpdate(ctx,key),ctx.c=128),ctx}function blake2bUpdate(ctx,input){for(var i=0;i<input.length;i++)128===ctx.c&&(ctx.t+=ctx.c,blake2bCompress(ctx,!1),ctx.c=0),ctx.b[ctx.c++]=input[i]}function blake2bFinal(ctx){for(ctx.t+=ctx.c;ctx.c<128;)ctx.b[ctx.c++]=0;blake2bCompress(ctx,!0);for(var out=new Uint8Array(ctx.outlen),i=0;i<ctx.outlen;i++)out[i]=ctx.h[i>>2]>>8*(3&i);return out}function blake2b(input,key,outlen){outlen=outlen||64,input=util.normalizeInput(input);var ctx=blake2bInit(outlen,key);return blake2bUpdate(ctx,input),blake2bFinal(ctx)}var util=__webpack_require__(66),BLAKE2B_IV32=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),SIGMA8=[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],SIGMA82=new Uint8Array(SIGMA8.map(function(x){return 2*x})),v=new Uint32Array(32),m=new Uint32Array(32);module.exports={blake2b:blake2b,blake2bHex:function(input,key,outlen){var output=blake2b(input,key,outlen);return util.toHex(output)},blake2bInit:blake2bInit,blake2bUpdate:blake2bUpdate,blake2bFinal:blake2bFinal}},function(module,exports,__webpack_require__){function B2S_GET32(v,i){return v[i]^v[i+1]<<8^v[i+2]<<16^v[i+3]<<24}function B2S_G(a,b,c,d,x,y){v[a]=v[a]+v[b]+x,v[d]=ROTR32(v[d]^v[a],16),v[c]=v[c]+v[d],v[b]=ROTR32(v[b]^v[c],12),v[a]=v[a]+v[b]+y,v[d]=ROTR32(v[d]^v[a],8),v[c]=v[c]+v[d],v[b]=ROTR32(v[b]^v[c],7)}function ROTR32(x,y){return x>>>y^x<<32-y}function blake2sCompress(ctx,last){var i=0;for(i=0;i<8;i++)v[i]=ctx.h[i],v[i+8]=BLAKE2S_IV[i];for(v[12]^=ctx.t,v[13]^=ctx.t/4294967296,last&&(v[14]=~v[14]),i=0;i<16;i++)m[i]=B2S_GET32(ctx.b,4*i);for(i=0;i<10;i++)B2S_G(0,4,8,12,m[SIGMA[16*i+0]],m[SIGMA[16*i+1]]),B2S_G(1,5,9,13,m[SIGMA[16*i+2]],m[SIGMA[16*i+3]]),B2S_G(2,6,10,14,m[SIGMA[16*i+4]],m[SIGMA[16*i+5]]),B2S_G(3,7,11,15,m[SIGMA[16*i+6]],m[SIGMA[16*i+7]]),B2S_G(0,5,10,15,m[SIGMA[16*i+8]],m[SIGMA[16*i+9]]),B2S_G(1,6,11,12,m[SIGMA[16*i+10]],m[SIGMA[16*i+11]]),B2S_G(2,7,8,13,m[SIGMA[16*i+12]],m[SIGMA[16*i+13]]),B2S_G(3,4,9,14,m[SIGMA[16*i+14]],m[SIGMA[16*i+15]]);for(i=0;i<8;i++)ctx.h[i]^=v[i]^v[i+8]}function blake2sInit(outlen,key){if(!(outlen>0&&outlen<=32))throw new Error("Incorrect output length, should be in [1, 32]");var keylen=key?key.length:0;if(key&&!(keylen>0&&keylen<=32))throw new Error("Incorrect key length, should be in [1, 32]");var ctx={h:new Uint32Array(BLAKE2S_IV),b:new Uint32Array(64),c:0,t:0,outlen:outlen};return ctx.h[0]^=16842752^keylen<<8^outlen,keylen>0&&(blake2sUpdate(ctx,key),ctx.c=64),ctx}function blake2sUpdate(ctx,input){for(var i=0;i<input.length;i++)64===ctx.c&&(ctx.t+=ctx.c,blake2sCompress(ctx,!1),ctx.c=0),ctx.b[ctx.c++]=input[i]}function blake2sFinal(ctx){for(ctx.t+=ctx.c;ctx.c<64;)ctx.b[ctx.c++]=0;blake2sCompress(ctx,!0);for(var out=new Uint8Array(ctx.outlen),i=0;i<ctx.outlen;i++)out[i]=ctx.h[i>>2]>>8*(3&i)&255;return out}function blake2s(input,key,outlen){outlen=outlen||32,input=util.normalizeInput(input);var ctx=blake2sInit(outlen,key);return blake2sUpdate(ctx,input),blake2sFinal(ctx)}var util=__webpack_require__(66),BLAKE2S_IV=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),SIGMA=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]),v=new Uint32Array(16),m=new Uint32Array(16);module.exports={blake2s:blake2s,blake2sHex:function(input,key,outlen){var output=blake2s(input,key,outlen);return util.toHex(output)},blake2sInit:blake2sInit,blake2sUpdate:blake2sUpdate,blake2sFinal:blake2sFinal}},function(module,exports,__webpack_require__){"use strict";const asn1=__webpack_require__(8),util=__webpack_require__(72),toBase64=util.toBase64,toBn=util.toBn,RSAPrivateKey=asn1.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())}),AlgorithmIdentifier=asn1.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()))}),PublicKey=asn1.define("RSAPublicKey",function(){this.seq().obj(this.key("algorithm").use(AlgorithmIdentifier),this.key("subjectPublicKey").bitstr())}),RSAPublicKey=asn1.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});exports.pkcs1ToJwk=function(bytes){const asn1=RSAPrivateKey.decode(bytes,"der");return{kty:"RSA",n:toBase64(asn1.modulus),e:toBase64(asn1.publicExponent),d:toBase64(asn1.privateExponent),p:toBase64(asn1.prime1),q:toBase64(asn1.prime2),dp:toBase64(asn1.exponent1),dq:toBase64(asn1.exponent2),qi:toBase64(asn1.coefficient),alg:"RS256",kid:"2011-04-29"}},exports.jwkToPkcs1=function(jwk){return RSAPrivateKey.encode({version:0,modulus:toBn(jwk.n),publicExponent:toBn(jwk.e),privateExponent:toBn(jwk.d),prime1:toBn(jwk.p),prime2:toBn(jwk.q),exponent1:toBn(jwk.dp),exponent2:toBn(jwk.dq),coefficient:toBn(jwk.qi)},"der")},exports.pkixToJwk=function(bytes){const ndata=PublicKey.decode(bytes,"der"),asn1=RSAPublicKey.decode(ndata.subjectPublicKey.data,"der");return{kty:"RSA",n:toBase64(asn1.modulus),e:toBase64(asn1.publicExponent),alg:"RS256",kid:"2011-04-29"}},exports.jwkToPkix=function(jwk){return PublicKey.encode({algorithm:{algorithm:"rsa",none:null},subjectPublicKey:{data:RSAPublicKey.encode({modulus:toBn(jwk.n),publicExponent:toBn(jwk.e)},"der")}},"der")}},function(module,exports,__webpack_require__){(function(module){!function(module,exports){"use strict";function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}function BN(number,base,endian){if(BN.isBN(number))return number;this.negative=0,this.words=null,this.length=0,this.red=null,null!==number&&("le"!==base&&"be"!==base||(endian=base,base=10),this._init(number||0,base||10,endian||"be"))}function parseHex(str,start,end){for(var r=0,len=Math.min(str.length,end),i=start;i<len;i++){var c=str.charCodeAt(i)-48;r<<=4,r|=c>=49&&c<=54?c-49+10:c>=17&&c<=22?c-17+10:15&c}return r}function parseBase(str,start,end,mul){for(var r=0,len=Math.min(str.length,end),i=start;i<len;i++){var c=str.charCodeAt(i)-48;r*=mul,r+=c>=49?c-49+10:c>=17?c-17+10:c}return r}function toBitArray(num){for(var w=new Array(num.bitLength()),bit=0;bit<w.length;bit++){var off=bit/26|0,wbit=bit%26;w[bit]=(num.words[off]&1<<wbit)>>>wbit}return w}function smallMulTo(self,num,out){out.negative=num.negative^self.negative;var len=self.length+num.length|0;out.length=len,len=len-1|0;var a=0|self.words[0],b=0|num.words[0],r=a*b,lo=67108863&r,carry=r/67108864|0;out.words[0]=lo;for(var k=1;k<len;k++){for(var ncarry=carry>>>26,rword=67108863&carry,maxJ=Math.min(k,num.length-1),j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j|0;ncarry+=(r=(a=0|self.words[i])*(b=0|num.words[j])+rword)/67108864|0,rword=67108863&r}out.words[k]=0|rword,carry=0|ncarry}return 0!==carry?out.words[k]=0|carry:out.length--,out.strip()}function bigMulTo(self,num,out){out.negative=num.negative^self.negative,out.length=self.length+num.length;for(var carry=0,hncarry=0,k=0;k<out.length-1;k++){var ncarry=hncarry;hncarry=0;for(var rword=67108863&carry,maxJ=Math.min(k,num.length-1),j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j,r=(0|self.words[i])*(0|num.words[j]),lo=67108863&r;rword=67108863&(lo=lo+rword|0),hncarry+=(ncarry=(ncarry=ncarry+(r/67108864|0)|0)+(lo>>>26)|0)>>>26,ncarry&=67108863}out.words[k]=rword,carry=ncarry,ncarry=hncarry}return 0!==carry?out.words[k]=carry:out.length--,out.strip()}function jumboMulTo(self,num,out){return(new FFTM).mulp(self,num,out)}function FFTM(x,y){this.x=x,this.y=y}function MPrime(name,p){this.name=name,this.p=new BN(p,16),this.n=this.p.bitLength(),this.k=new BN(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P224(){MPrime.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function P192(){MPrime.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P25519(){MPrime.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Red(m){if("string"==typeof m){var prime=BN._prime(m);this.m=prime.p,this.prime=prime}else assert(m.gtn(1),"modulus must be greater than 1"),this.m=m,this.prime=null}function Mont(m){Red.call(this,m),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new BN(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)}"object"==typeof module?module.exports=BN:exports.BN=BN,BN.BN=BN,BN.wordSize=26;var Buffer;try{Buffer=__webpack_require__(182).Buffer}catch(e){}BN.isBN=function(num){return num instanceof BN||null!==num&&"object"==typeof num&&num.constructor.wordSize===BN.wordSize&&Array.isArray(num.words)},BN.max=function(left,right){return left.cmp(right)>0?left:right},BN.min=function(left,right){return left.cmp(right)<0?left:right},BN.prototype._init=function(number,base,endian){if("number"==typeof number)return this._initNumber(number,base,endian);if("object"==typeof number)return this._initArray(number,base,endian);"hex"===base&&(base=16),assert(base===(0|base)&&base>=2&&base<=36);var start=0;"-"===(number=number.toString().replace(/\s+/g,""))[0]&&start++,16===base?this._parseHex(number,start):this._parseBase(number,base,start),"-"===number[0]&&(this.negative=1),this.strip(),"le"===endian&&this._initArray(this.toArray(),base,endian)},BN.prototype._initNumber=function(number,base,endian){number<0&&(this.negative=1,number=-number),number<67108864?(this.words=[67108863&number],this.length=1):number<4503599627370496?(this.words=[67108863&number,number/67108864&67108863],this.length=2):(assert(number<9007199254740992),this.words=[67108863&number,number/67108864&67108863,1],this.length=3),"le"===endian&&this._initArray(this.toArray(),base,endian)},BN.prototype._initArray=function(number,base,endian){if(assert("number"==typeof number.length),number.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(number.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var j,w,off=0;if("be"===endian)for(i=number.length-1,j=0;i>=0;i-=3)w=number[i]|number[i-1]<<8|number[i-2]<<16,this.words[j]|=w<<off&67108863,this.words[j+1]=w>>>26-off&67108863,(off+=24)>=26&&(off-=26,j++);else if("le"===endian)for(i=0,j=0;i<number.length;i+=3)w=number[i]|number[i+1]<<8|number[i+2]<<16,this.words[j]|=w<<off&67108863,this.words[j+1]=w>>>26-off&67108863,(off+=24)>=26&&(off-=26,j++);return this.strip()},BN.prototype._parseHex=function(number,start){this.length=Math.ceil((number.length-start)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var j,w,off=0;for(i=number.length-6,j=0;i>=start;i-=6)w=parseHex(number,i,i+6),this.words[j]|=w<<off&67108863,this.words[j+1]|=w>>>26-off&4194303,(off+=24)>=26&&(off-=26,j++);i+6!==start&&(w=parseHex(number,start,i+6),this.words[j]|=w<<off&67108863,this.words[j+1]|=w>>>26-off&4194303),this.strip()},BN.prototype._parseBase=function(number,base,start){this.words=[0],this.length=1;for(var limbLen=0,limbPow=1;limbPow<=67108863;limbPow*=base)limbLen++;limbLen--,limbPow=limbPow/base|0;for(var total=number.length-start,mod=total%limbLen,end=Math.min(total,total-mod)+start,word=0,i=start;i<end;i+=limbLen)word=parseBase(number,i,i+limbLen,base),this.imuln(limbPow),this.words[0]+word<67108864?this.words[0]+=word:this._iaddn(word);if(0!==mod){var pow=1;for(word=parseBase(number,i,number.length,base),i=0;i<mod;i++)pow*=base;this.imuln(pow),this.words[0]+word<67108864?this.words[0]+=word:this._iaddn(word)}},BN.prototype.copy=function(dest){dest.words=new Array(this.length);for(var i=0;i<this.length;i++)dest.words[i]=this.words[i];dest.length=this.length,dest.negative=this.negative,dest.red=this.red},BN.prototype.clone=function(){var r=new BN(null);return this.copy(r),r},BN.prototype._expand=function(size){for(;this.length<size;)this.words[this.length++]=0;return this},BN.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},BN.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},BN.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var zeros=["","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"],groupSizes=[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],groupBases=[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];BN.prototype.toString=function(base,padding){base=base||10,padding=0|padding||1;var out;if(16===base||"hex"===base){out="";for(var off=0,carry=0,i=0;i<this.length;i++){var w=this.words[i],word=(16777215&(w<<off|carry)).toString(16);out=0!==(carry=w>>>24-off&16777215)||i!==this.length-1?zeros[6-word.length]+word+out:word+out,(off+=2)>=26&&(off-=26,i--)}for(0!==carry&&(out=carry.toString(16)+out);out.length%padding!=0;)out="0"+out;return 0!==this.negative&&(out="-"+out),out}if(base===(0|base)&&base>=2&&base<=36){var groupSize=groupSizes[base],groupBase=groupBases[base];out="";var c=this.clone();for(c.negative=0;!c.isZero();){var r=c.modn(groupBase).toString(base);out=(c=c.idivn(groupBase)).isZero()?r+out:zeros[groupSize-r.length]+r+out}for(this.isZero()&&(out="0"+out);out.length%padding!=0;)out="0"+out;return 0!==this.negative&&(out="-"+out),out}assert(!1,"Base should be between 2 and 36")},BN.prototype.toNumber=function(){var ret=this.words[0];return 2===this.length?ret+=67108864*this.words[1]:3===this.length&&1===this.words[2]?ret+=4503599627370496+67108864*this.words[1]:this.length>2&&assert(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-ret:ret},BN.prototype.toJSON=function(){return this.toString(16)},BN.prototype.toBuffer=function(endian,length){return assert(void 0!==Buffer),this.toArrayLike(Buffer,endian,length)},BN.prototype.toArray=function(endian,length){return this.toArrayLike(Array,endian,length)},BN.prototype.toArrayLike=function(ArrayType,endian,length){var byteLength=this.byteLength(),reqLength=length||Math.max(1,byteLength);assert(byteLength<=reqLength,"byte array longer than desired length"),assert(reqLength>0,"Requested array length <= 0"),this.strip();var b,i,littleEndian="le"===endian,res=new ArrayType(reqLength),q=this.clone();if(littleEndian){for(i=0;!q.isZero();i++)b=q.andln(255),q.iushrn(8),res[i]=b;for(;i<reqLength;i++)res[i]=0}else{for(i=0;i<reqLength-byteLength;i++)res[i]=0;for(i=0;!q.isZero();i++)b=q.andln(255),q.iushrn(8),res[reqLength-i-1]=b}return res},Math.clz32?BN.prototype._countBits=function(w){return 32-Math.clz32(w)}:BN.prototype._countBits=function(w){var t=w,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},BN.prototype._zeroBits=function(w){if(0===w)return 26;var t=w,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},BN.prototype.bitLength=function(){var w=this.words[this.length-1],hi=this._countBits(w);return 26*(this.length-1)+hi},BN.prototype.zeroBits=function(){if(this.isZero())return 0;for(var r=0,i=0;i<this.length;i++){var b=this._zeroBits(this.words[i]);if(r+=b,26!==b)break}return r},BN.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},BN.prototype.toTwos=function(width){return 0!==this.negative?this.abs().inotn(width).iaddn(1):this.clone()},BN.prototype.fromTwos=function(width){return this.testn(width-1)?this.notn(width).iaddn(1).ineg():this.clone()},BN.prototype.isNeg=function(){return 0!==this.negative},BN.prototype.neg=function(){return this.clone().ineg()},BN.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},BN.prototype.iuor=function(num){for(;this.length<num.length;)this.words[this.length++]=0;for(var i=0;i<num.length;i++)this.words[i]=this.words[i]|num.words[i];return this.strip()},BN.prototype.ior=function(num){return assert(0==(this.negative|num.negative)),this.iuor(num)},BN.prototype.or=function(num){return this.length>num.length?this.clone().ior(num):num.clone().ior(this)},BN.prototype.uor=function(num){return this.length>num.length?this.clone().iuor(num):num.clone().iuor(this)},BN.prototype.iuand=function(num){var b;b=this.length>num.length?num:this;for(var i=0;i<b.length;i++)this.words[i]=this.words[i]&num.words[i];return this.length=b.length,this.strip()},BN.prototype.iand=function(num){return assert(0==(this.negative|num.negative)),this.iuand(num)},BN.prototype.and=function(num){return this.length>num.length?this.clone().iand(num):num.clone().iand(this)},BN.prototype.uand=function(num){return this.length>num.length?this.clone().iuand(num):num.clone().iuand(this)},BN.prototype.iuxor=function(num){var a,b;this.length>num.length?(a=this,b=num):(a=num,b=this);for(var i=0;i<b.length;i++)this.words[i]=a.words[i]^b.words[i];if(this!==a)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=a.length,this.strip()},BN.prototype.ixor=function(num){return assert(0==(this.negative|num.negative)),this.iuxor(num)},BN.prototype.xor=function(num){return this.length>num.length?this.clone().ixor(num):num.clone().ixor(this)},BN.prototype.uxor=function(num){return this.length>num.length?this.clone().iuxor(num):num.clone().iuxor(this)},BN.prototype.inotn=function(width){assert("number"==typeof width&&width>=0);var bytesNeeded=0|Math.ceil(width/26),bitsLeft=width%26;this._expand(bytesNeeded),bitsLeft>0&&bytesNeeded--;for(var i=0;i<bytesNeeded;i++)this.words[i]=67108863&~this.words[i];return bitsLeft>0&&(this.words[i]=~this.words[i]&67108863>>26-bitsLeft),this.strip()},BN.prototype.notn=function(width){return this.clone().inotn(width)},BN.prototype.setn=function(bit,val){assert("number"==typeof bit&&bit>=0);var off=bit/26|0,wbit=bit%26;return this._expand(off+1),this.words[off]=val?this.words[off]|1<<wbit:this.words[off]&~(1<<wbit),this.strip()},BN.prototype.iadd=function(num){var r;if(0!==this.negative&&0===num.negative)return this.negative=0,r=this.isub(num),this.negative^=1,this._normSign();if(0===this.negative&&0!==num.negative)return num.negative=0,r=this.isub(num),num.negative=1,r._normSign();var a,b;this.length>num.length?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i<b.length;i++)r=(0|a.words[i])+(0|b.words[i])+carry,this.words[i]=67108863&r,carry=r>>>26;for(;0!==carry&&i<a.length;i++)r=(0|a.words[i])+carry,this.words[i]=67108863&r,carry=r>>>26;if(this.length=a.length,0!==carry)this.words[this.length]=carry,this.length++;else if(a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this},BN.prototype.add=function(num){var res;return 0!==num.negative&&0===this.negative?(num.negative=0,res=this.sub(num),num.negative^=1,res):0===num.negative&&0!==this.negative?(this.negative=0,res=num.sub(this),this.negative=1,res):this.length>num.length?this.clone().iadd(num):num.clone().iadd(this)},BN.prototype.isub=function(num){if(0!==num.negative){num.negative=0;var r=this.iadd(num);return num.negative=1,r._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(num),this.negative=1,this._normSign();var cmp=this.cmp(num);if(0===cmp)return this.negative=0,this.length=1,this.words[0]=0,this;var a,b;cmp>0?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i<b.length;i++)carry=(r=(0|a.words[i])-(0|b.words[i])+carry)>>26,this.words[i]=67108863&r;for(;0!==carry&&i<a.length;i++)carry=(r=(0|a.words[i])+carry)>>26,this.words[i]=67108863&r;if(0===carry&&i<a.length&&a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=Math.max(this.length,i),a!==this&&(this.negative=1),this.strip()},BN.prototype.sub=function(num){return this.clone().isub(num)};var comb10MulTo=function(self,num,out){var lo,mid,hi,a=self.words,b=num.words,o=out.words,c=0,a0=0|a[0],al0=8191&a0,ah0=a0>>>13,a1=0|a[1],al1=8191&a1,ah1=a1>>>13,a2=0|a[2],al2=8191&a2,ah2=a2>>>13,a3=0|a[3],al3=8191&a3,ah3=a3>>>13,a4=0|a[4],al4=8191&a4,ah4=a4>>>13,a5=0|a[5],al5=8191&a5,ah5=a5>>>13,a6=0|a[6],al6=8191&a6,ah6=a6>>>13,a7=0|a[7],al7=8191&a7,ah7=a7>>>13,a8=0|a[8],al8=8191&a8,ah8=a8>>>13,a9=0|a[9],al9=8191&a9,ah9=a9>>>13,b0=0|b[0],bl0=8191&b0,bh0=b0>>>13,b1=0|b[1],bl1=8191&b1,bh1=b1>>>13,b2=0|b[2],bl2=8191&b2,bh2=b2>>>13,b3=0|b[3],bl3=8191&b3,bh3=b3>>>13,b4=0|b[4],bl4=8191&b4,bh4=b4>>>13,b5=0|b[5],bl5=8191&b5,bh5=b5>>>13,b6=0|b[6],bl6=8191&b6,bh6=b6>>>13,b7=0|b[7],bl7=8191&b7,bh7=b7>>>13,b8=0|b[8],bl8=8191&b8,bh8=b8>>>13,b9=0|b[9],bl9=8191&b9,bh9=b9>>>13;out.negative=self.negative^num.negative,out.length=19;var w0=(c+(lo=Math.imul(al0,bl0))|0)+((8191&(mid=(mid=Math.imul(al0,bh0))+Math.imul(ah0,bl0)|0))<<13)|0;c=((hi=Math.imul(ah0,bh0))+(mid>>>13)|0)+(w0>>>26)|0,w0&=67108863,lo=Math.imul(al1,bl0),mid=(mid=Math.imul(al1,bh0))+Math.imul(ah1,bl0)|0,hi=Math.imul(ah1,bh0);var w1=(c+(lo=lo+Math.imul(al0,bl1)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh1)|0)+Math.imul(ah0,bl1)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh1)|0)+(mid>>>13)|0)+(w1>>>26)|0,w1&=67108863,lo=Math.imul(al2,bl0),mid=(mid=Math.imul(al2,bh0))+Math.imul(ah2,bl0)|0,hi=Math.imul(ah2,bh0),lo=lo+Math.imul(al1,bl1)|0,mid=(mid=mid+Math.imul(al1,bh1)|0)+Math.imul(ah1,bl1)|0,hi=hi+Math.imul(ah1,bh1)|0;var w2=(c+(lo=lo+Math.imul(al0,bl2)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh2)|0)+Math.imul(ah0,bl2)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh2)|0)+(mid>>>13)|0)+(w2>>>26)|0,w2&=67108863,lo=Math.imul(al3,bl0),mid=(mid=Math.imul(al3,bh0))+Math.imul(ah3,bl0)|0,hi=Math.imul(ah3,bh0),lo=lo+Math.imul(al2,bl1)|0,mid=(mid=mid+Math.imul(al2,bh1)|0)+Math.imul(ah2,bl1)|0,hi=hi+Math.imul(ah2,bh1)|0,lo=lo+Math.imul(al1,bl2)|0,mid=(mid=mid+Math.imul(al1,bh2)|0)+Math.imul(ah1,bl2)|0,hi=hi+Math.imul(ah1,bh2)|0;var w3=(c+(lo=lo+Math.imul(al0,bl3)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh3)|0)+Math.imul(ah0,bl3)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh3)|0)+(mid>>>13)|0)+(w3>>>26)|0,w3&=67108863,lo=Math.imul(al4,bl0),mid=(mid=Math.imul(al4,bh0))+Math.imul(ah4,bl0)|0,hi=Math.imul(ah4,bh0),lo=lo+Math.imul(al3,bl1)|0,mid=(mid=mid+Math.imul(al3,bh1)|0)+Math.imul(ah3,bl1)|0,hi=hi+Math.imul(ah3,bh1)|0,lo=lo+Math.imul(al2,bl2)|0,mid=(mid=mid+Math.imul(al2,bh2)|0)+Math.imul(ah2,bl2)|0,hi=hi+Math.imul(ah2,bh2)|0,lo=lo+Math.imul(al1,bl3)|0,mid=(mid=mid+Math.imul(al1,bh3)|0)+Math.imul(ah1,bl3)|0,hi=hi+Math.imul(ah1,bh3)|0;var w4=(c+(lo=lo+Math.imul(al0,bl4)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh4)|0)+Math.imul(ah0,bl4)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh4)|0)+(mid>>>13)|0)+(w4>>>26)|0,w4&=67108863,lo=Math.imul(al5,bl0),mid=(mid=Math.imul(al5,bh0))+Math.imul(ah5,bl0)|0,hi=Math.imul(ah5,bh0),lo=lo+Math.imul(al4,bl1)|0,mid=(mid=mid+Math.imul(al4,bh1)|0)+Math.imul(ah4,bl1)|0,hi=hi+Math.imul(ah4,bh1)|0,lo=lo+Math.imul(al3,bl2)|0,mid=(mid=mid+Math.imul(al3,bh2)|0)+Math.imul(ah3,bl2)|0,hi=hi+Math.imul(ah3,bh2)|0,lo=lo+Math.imul(al2,bl3)|0,mid=(mid=mid+Math.imul(al2,bh3)|0)+Math.imul(ah2,bl3)|0,hi=hi+Math.imul(ah2,bh3)|0,lo=lo+Math.imul(al1,bl4)|0,mid=(mid=mid+Math.imul(al1,bh4)|0)+Math.imul(ah1,bl4)|0,hi=hi+Math.imul(ah1,bh4)|0;var w5=(c+(lo=lo+Math.imul(al0,bl5)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh5)|0)+Math.imul(ah0,bl5)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh5)|0)+(mid>>>13)|0)+(w5>>>26)|0,w5&=67108863,lo=Math.imul(al6,bl0),mid=(mid=Math.imul(al6,bh0))+Math.imul(ah6,bl0)|0,hi=Math.imul(ah6,bh0),lo=lo+Math.imul(al5,bl1)|0,mid=(mid=mid+Math.imul(al5,bh1)|0)+Math.imul(ah5,bl1)|0,hi=hi+Math.imul(ah5,bh1)|0,lo=lo+Math.imul(al4,bl2)|0,mid=(mid=mid+Math.imul(al4,bh2)|0)+Math.imul(ah4,bl2)|0,hi=hi+Math.imul(ah4,bh2)|0,lo=lo+Math.imul(al3,bl3)|0,mid=(mid=mid+Math.imul(al3,bh3)|0)+Math.imul(ah3,bl3)|0,hi=hi+Math.imul(ah3,bh3)|0,lo=lo+Math.imul(al2,bl4)|0,mid=(mid=mid+Math.imul(al2,bh4)|0)+Math.imul(ah2,bl4)|0,hi=hi+Math.imul(ah2,bh4)|0,lo=lo+Math.imul(al1,bl5)|0,mid=(mid=mid+Math.imul(al1,bh5)|0)+Math.imul(ah1,bl5)|0,hi=hi+Math.imul(ah1,bh5)|0;var w6=(c+(lo=lo+Math.imul(al0,bl6)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh6)|0)+Math.imul(ah0,bl6)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh6)|0)+(mid>>>13)|0)+(w6>>>26)|0,w6&=67108863,lo=Math.imul(al7,bl0),mid=(mid=Math.imul(al7,bh0))+Math.imul(ah7,bl0)|0,hi=Math.imul(ah7,bh0),lo=lo+Math.imul(al6,bl1)|0,mid=(mid=mid+Math.imul(al6,bh1)|0)+Math.imul(ah6,bl1)|0,hi=hi+Math.imul(ah6,bh1)|0,lo=lo+Math.imul(al5,bl2)|0,mid=(mid=mid+Math.imul(al5,bh2)|0)+Math.imul(ah5,bl2)|0,hi=hi+Math.imul(ah5,bh2)|0,lo=lo+Math.imul(al4,bl3)|0,mid=(mid=mid+Math.imul(al4,bh3)|0)+Math.imul(ah4,bl3)|0,hi=hi+Math.imul(ah4,bh3)|0,lo=lo+Math.imul(al3,bl4)|0,mid=(mid=mid+Math.imul(al3,bh4)|0)+Math.imul(ah3,bl4)|0,hi=hi+Math.imul(ah3,bh4)|0,lo=lo+Math.imul(al2,bl5)|0,mid=(mid=mid+Math.imul(al2,bh5)|0)+Math.imul(ah2,bl5)|0,hi=hi+Math.imul(ah2,bh5)|0,lo=lo+Math.imul(al1,bl6)|0,mid=(mid=mid+Math.imul(al1,bh6)|0)+Math.imul(ah1,bl6)|0,hi=hi+Math.imul(ah1,bh6)|0;var w7=(c+(lo=lo+Math.imul(al0,bl7)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh7)|0)+Math.imul(ah0,bl7)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh7)|0)+(mid>>>13)|0)+(w7>>>26)|0,w7&=67108863,lo=Math.imul(al8,bl0),mid=(mid=Math.imul(al8,bh0))+Math.imul(ah8,bl0)|0,hi=Math.imul(ah8,bh0),lo=lo+Math.imul(al7,bl1)|0,mid=(mid=mid+Math.imul(al7,bh1)|0)+Math.imul(ah7,bl1)|0,hi=hi+Math.imul(ah7,bh1)|0,lo=lo+Math.imul(al6,bl2)|0,mid=(mid=mid+Math.imul(al6,bh2)|0)+Math.imul(ah6,bl2)|0,hi=hi+Math.imul(ah6,bh2)|0,lo=lo+Math.imul(al5,bl3)|0,mid=(mid=mid+Math.imul(al5,bh3)|0)+Math.imul(ah5,bl3)|0,hi=hi+Math.imul(ah5,bh3)|0,lo=lo+Math.imul(al4,bl4)|0,mid=(mid=mid+Math.imul(al4,bh4)|0)+Math.imul(ah4,bl4)|0,hi=hi+Math.imul(ah4,bh4)|0,lo=lo+Math.imul(al3,bl5)|0,mid=(mid=mid+Math.imul(al3,bh5)|0)+Math.imul(ah3,bl5)|0,hi=hi+Math.imul(ah3,bh5)|0,lo=lo+Math.imul(al2,bl6)|0,mid=(mid=mid+Math.imul(al2,bh6)|0)+Math.imul(ah2,bl6)|0,hi=hi+Math.imul(ah2,bh6)|0,lo=lo+Math.imul(al1,bl7)|0,mid=(mid=mid+Math.imul(al1,bh7)|0)+Math.imul(ah1,bl7)|0,hi=hi+Math.imul(ah1,bh7)|0;var w8=(c+(lo=lo+Math.imul(al0,bl8)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh8)|0)+Math.imul(ah0,bl8)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh8)|0)+(mid>>>13)|0)+(w8>>>26)|0,w8&=67108863,lo=Math.imul(al9,bl0),mid=(mid=Math.imul(al9,bh0))+Math.imul(ah9,bl0)|0,hi=Math.imul(ah9,bh0),lo=lo+Math.imul(al8,bl1)|0,mid=(mid=mid+Math.imul(al8,bh1)|0)+Math.imul(ah8,bl1)|0,hi=hi+Math.imul(ah8,bh1)|0,lo=lo+Math.imul(al7,bl2)|0,mid=(mid=mid+Math.imul(al7,bh2)|0)+Math.imul(ah7,bl2)|0,hi=hi+Math.imul(ah7,bh2)|0,lo=lo+Math.imul(al6,bl3)|0,mid=(mid=mid+Math.imul(al6,bh3)|0)+Math.imul(ah6,bl3)|0,hi=hi+Math.imul(ah6,bh3)|0,lo=lo+Math.imul(al5,bl4)|0,mid=(mid=mid+Math.imul(al5,bh4)|0)+Math.imul(ah5,bl4)|0,hi=hi+Math.imul(ah5,bh4)|0,lo=lo+Math.imul(al4,bl5)|0,mid=(mid=mid+Math.imul(al4,bh5)|0)+Math.imul(ah4,bl5)|0,hi=hi+Math.imul(ah4,bh5)|0,lo=lo+Math.imul(al3,bl6)|0,mid=(mid=mid+Math.imul(al3,bh6)|0)+Math.imul(ah3,bl6)|0,hi=hi+Math.imul(ah3,bh6)|0,lo=lo+Math.imul(al2,bl7)|0,mid=(mid=mid+Math.imul(al2,bh7)|0)+Math.imul(ah2,bl7)|0,hi=hi+Math.imul(ah2,bh7)|0,lo=lo+Math.imul(al1,bl8)|0,mid=(mid=mid+Math.imul(al1,bh8)|0)+Math.imul(ah1,bl8)|0,hi=hi+Math.imul(ah1,bh8)|0;var w9=(c+(lo=lo+Math.imul(al0,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh9)|0)+Math.imul(ah0,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh9)|0)+(mid>>>13)|0)+(w9>>>26)|0,w9&=67108863,lo=Math.imul(al9,bl1),mid=(mid=Math.imul(al9,bh1))+Math.imul(ah9,bl1)|0,hi=Math.imul(ah9,bh1),lo=lo+Math.imul(al8,bl2)|0,mid=(mid=mid+Math.imul(al8,bh2)|0)+Math.imul(ah8,bl2)|0,hi=hi+Math.imul(ah8,bh2)|0,lo=lo+Math.imul(al7,bl3)|0,mid=(mid=mid+Math.imul(al7,bh3)|0)+Math.imul(ah7,bl3)|0,hi=hi+Math.imul(ah7,bh3)|0,lo=lo+Math.imul(al6,bl4)|0,mid=(mid=mid+Math.imul(al6,bh4)|0)+Math.imul(ah6,bl4)|0,hi=hi+Math.imul(ah6,bh4)|0,lo=lo+Math.imul(al5,bl5)|0,mid=(mid=mid+Math.imul(al5,bh5)|0)+Math.imul(ah5,bl5)|0,hi=hi+Math.imul(ah5,bh5)|0,lo=lo+Math.imul(al4,bl6)|0,mid=(mid=mid+Math.imul(al4,bh6)|0)+Math.imul(ah4,bl6)|0,hi=hi+Math.imul(ah4,bh6)|0,lo=lo+Math.imul(al3,bl7)|0,mid=(mid=mid+Math.imul(al3,bh7)|0)+Math.imul(ah3,bl7)|0,hi=hi+Math.imul(ah3,bh7)|0,lo=lo+Math.imul(al2,bl8)|0,mid=(mid=mid+Math.imul(al2,bh8)|0)+Math.imul(ah2,bl8)|0,hi=hi+Math.imul(ah2,bh8)|0;var w10=(c+(lo=lo+Math.imul(al1,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al1,bh9)|0)+Math.imul(ah1,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah1,bh9)|0)+(mid>>>13)|0)+(w10>>>26)|0,w10&=67108863,lo=Math.imul(al9,bl2),mid=(mid=Math.imul(al9,bh2))+Math.imul(ah9,bl2)|0,hi=Math.imul(ah9,bh2),lo=lo+Math.imul(al8,bl3)|0,mid=(mid=mid+Math.imul(al8,bh3)|0)+Math.imul(ah8,bl3)|0,hi=hi+Math.imul(ah8,bh3)|0,lo=lo+Math.imul(al7,bl4)|0,mid=(mid=mid+Math.imul(al7,bh4)|0)+Math.imul(ah7,bl4)|0,hi=hi+Math.imul(ah7,bh4)|0,lo=lo+Math.imul(al6,bl5)|0,mid=(mid=mid+Math.imul(al6,bh5)|0)+Math.imul(ah6,bl5)|0,hi=hi+Math.imul(ah6,bh5)|0,lo=lo+Math.imul(al5,bl6)|0,mid=(mid=mid+Math.imul(al5,bh6)|0)+Math.imul(ah5,bl6)|0,hi=hi+Math.imul(ah5,bh6)|0,lo=lo+Math.imul(al4,bl7)|0,mid=(mid=mid+Math.imul(al4,bh7)|0)+Math.imul(ah4,bl7)|0,hi=hi+Math.imul(ah4,bh7)|0,lo=lo+Math.imul(al3,bl8)|0,mid=(mid=mid+Math.imul(al3,bh8)|0)+Math.imul(ah3,bl8)|0,hi=hi+Math.imul(ah3,bh8)|0;var w11=(c+(lo=lo+Math.imul(al2,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al2,bh9)|0)+Math.imul(ah2,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah2,bh9)|0)+(mid>>>13)|0)+(w11>>>26)|0,w11&=67108863,lo=Math.imul(al9,bl3),mid=(mid=Math.imul(al9,bh3))+Math.imul(ah9,bl3)|0,hi=Math.imul(ah9,bh3),lo=lo+Math.imul(al8,bl4)|0,mid=(mid=mid+Math.imul(al8,bh4)|0)+Math.imul(ah8,bl4)|0,hi=hi+Math.imul(ah8,bh4)|0,lo=lo+Math.imul(al7,bl5)|0,mid=(mid=mid+Math.imul(al7,bh5)|0)+Math.imul(ah7,bl5)|0,hi=hi+Math.imul(ah7,bh5)|0,lo=lo+Math.imul(al6,bl6)|0,mid=(mid=mid+Math.imul(al6,bh6)|0)+Math.imul(ah6,bl6)|0,hi=hi+Math.imul(ah6,bh6)|0,lo=lo+Math.imul(al5,bl7)|0,mid=(mid=mid+Math.imul(al5,bh7)|0)+Math.imul(ah5,bl7)|0,hi=hi+Math.imul(ah5,bh7)|0,lo=lo+Math.imul(al4,bl8)|0,mid=(mid=mid+Math.imul(al4,bh8)|0)+Math.imul(ah4,bl8)|0,hi=hi+Math.imul(ah4,bh8)|0;var w12=(c+(lo=lo+Math.imul(al3,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al3,bh9)|0)+Math.imul(ah3,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah3,bh9)|0)+(mid>>>13)|0)+(w12>>>26)|0,w12&=67108863,lo=Math.imul(al9,bl4),mid=(mid=Math.imul(al9,bh4))+Math.imul(ah9,bl4)|0,hi=Math.imul(ah9,bh4),lo=lo+Math.imul(al8,bl5)|0,mid=(mid=mid+Math.imul(al8,bh5)|0)+Math.imul(ah8,bl5)|0,hi=hi+Math.imul(ah8,bh5)|0,lo=lo+Math.imul(al7,bl6)|0,mid=(mid=mid+Math.imul(al7,bh6)|0)+Math.imul(ah7,bl6)|0,hi=hi+Math.imul(ah7,bh6)|0,lo=lo+Math.imul(al6,bl7)|0,mid=(mid=mid+Math.imul(al6,bh7)|0)+Math.imul(ah6,bl7)|0,hi=hi+Math.imul(ah6,bh7)|0,lo=lo+Math.imul(al5,bl8)|0,mid=(mid=mid+Math.imul(al5,bh8)|0)+Math.imul(ah5,bl8)|0,hi=hi+Math.imul(ah5,bh8)|0;var w13=(c+(lo=lo+Math.imul(al4,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al4,bh9)|0)+Math.imul(ah4,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah4,bh9)|0)+(mid>>>13)|0)+(w13>>>26)|0,w13&=67108863,lo=Math.imul(al9,bl5),mid=(mid=Math.imul(al9,bh5))+Math.imul(ah9,bl5)|0,hi=Math.imul(ah9,bh5),lo=lo+Math.imul(al8,bl6)|0,mid=(mid=mid+Math.imul(al8,bh6)|0)+Math.imul(ah8,bl6)|0,hi=hi+Math.imul(ah8,bh6)|0,lo=lo+Math.imul(al7,bl7)|0,mid=(mid=mid+Math.imul(al7,bh7)|0)+Math.imul(ah7,bl7)|0,hi=hi+Math.imul(ah7,bh7)|0,lo=lo+Math.imul(al6,bl8)|0,mid=(mid=mid+Math.imul(al6,bh8)|0)+Math.imul(ah6,bl8)|0,hi=hi+Math.imul(ah6,bh8)|0;var w14=(c+(lo=lo+Math.imul(al5,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al5,bh9)|0)+Math.imul(ah5,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah5,bh9)|0)+(mid>>>13)|0)+(w14>>>26)|0,w14&=67108863,lo=Math.imul(al9,bl6),mid=(mid=Math.imul(al9,bh6))+Math.imul(ah9,bl6)|0,hi=Math.imul(ah9,bh6),lo=lo+Math.imul(al8,bl7)|0,mid=(mid=mid+Math.imul(al8,bh7)|0)+Math.imul(ah8,bl7)|0,hi=hi+Math.imul(ah8,bh7)|0,lo=lo+Math.imul(al7,bl8)|0,mid=(mid=mid+Math.imul(al7,bh8)|0)+Math.imul(ah7,bl8)|0,hi=hi+Math.imul(ah7,bh8)|0;var w15=(c+(lo=lo+Math.imul(al6,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al6,bh9)|0)+Math.imul(ah6,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah6,bh9)|0)+(mid>>>13)|0)+(w15>>>26)|0,w15&=67108863,lo=Math.imul(al9,bl7),mid=(mid=Math.imul(al9,bh7))+Math.imul(ah9,bl7)|0,hi=Math.imul(ah9,bh7),lo=lo+Math.imul(al8,bl8)|0,mid=(mid=mid+Math.imul(al8,bh8)|0)+Math.imul(ah8,bl8)|0,hi=hi+Math.imul(ah8,bh8)|0;var w16=(c+(lo=lo+Math.imul(al7,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al7,bh9)|0)+Math.imul(ah7,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah7,bh9)|0)+(mid>>>13)|0)+(w16>>>26)|0,w16&=67108863,lo=Math.imul(al9,bl8),mid=(mid=Math.imul(al9,bh8))+Math.imul(ah9,bl8)|0,hi=Math.imul(ah9,bh8);var w17=(c+(lo=lo+Math.imul(al8,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al8,bh9)|0)+Math.imul(ah8,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah8,bh9)|0)+(mid>>>13)|0)+(w17>>>26)|0,w17&=67108863;var w18=(c+(lo=Math.imul(al9,bl9))|0)+((8191&(mid=(mid=Math.imul(al9,bh9))+Math.imul(ah9,bl9)|0))<<13)|0;return c=((hi=Math.imul(ah9,bh9))+(mid>>>13)|0)+(w18>>>26)|0,w18&=67108863,o[0]=w0,o[1]=w1,o[2]=w2,o[3]=w3,o[4]=w4,o[5]=w5,o[6]=w6,o[7]=w7,o[8]=w8,o[9]=w9,o[10]=w10,o[11]=w11,o[12]=w12,o[13]=w13,o[14]=w14,o[15]=w15,o[16]=w16,o[17]=w17,o[18]=w18,0!==c&&(o[19]=c,out.length++),out};Math.imul||(comb10MulTo=smallMulTo),BN.prototype.mulTo=function(num,out){var len=this.length+num.length;return 10===this.length&&10===num.length?comb10MulTo(this,num,out):len<63?smallMulTo(this,num,out):len<1024?bigMulTo(this,num,out):jumboMulTo(this,num,out)},FFTM.prototype.makeRBT=function(N){for(var t=new Array(N),l=BN.prototype._countBits(N)-1,i=0;i<N;i++)t[i]=this.revBin(i,l,N);return t},FFTM.prototype.revBin=function(x,l,N){if(0===x||x===N-1)return x;for(var rb=0,i=0;i<l;i++)rb|=(1&x)<<l-i-1,x>>=1;return rb},FFTM.prototype.permute=function(rbt,rws,iws,rtws,itws,N){for(var i=0;i<N;i++)rtws[i]=rws[rbt[i]],itws[i]=iws[rbt[i]]},FFTM.prototype.transform=function(rws,iws,rtws,itws,N,rbt){this.permute(rbt,rws,iws,rtws,itws,N);for(var s=1;s<N;s<<=1)for(var l=s<<1,rtwdf=Math.cos(2*Math.PI/l),itwdf=Math.sin(2*Math.PI/l),p=0;p<N;p+=l)for(var rtwdf_=rtwdf,itwdf_=itwdf,j=0;j<s;j++){var re=rtws[p+j],ie=itws[p+j],ro=rtws[p+j+s],io=itws[p+j+s],rx=rtwdf_*ro-itwdf_*io;io=rtwdf_*io+itwdf_*ro,ro=rx,rtws[p+j]=re+ro,itws[p+j]=ie+io,rtws[p+j+s]=re-ro,itws[p+j+s]=ie-io,j!==l&&(rx=rtwdf*rtwdf_-itwdf*itwdf_,itwdf_=rtwdf*itwdf_+itwdf*rtwdf_,rtwdf_=rx)}},FFTM.prototype.guessLen13b=function(n,m){var N=1|Math.max(m,n),odd=1&N,i=0;for(N=N/2|0;N;N>>>=1)i++;return 1<<i+1+odd},FFTM.prototype.conjugate=function(rws,iws,N){if(!(N<=1))for(var i=0;i<N/2;i++){var t=rws[i];rws[i]=rws[N-i-1],rws[N-i-1]=t,t=iws[i],iws[i]=-iws[N-i-1],iws[N-i-1]=-t}},FFTM.prototype.normalize13b=function(ws,N){for(var carry=0,i=0;i<N/2;i++){var w=8192*Math.round(ws[2*i+1]/N)+Math.round(ws[2*i]/N)+carry;ws[i]=67108863&w,carry=w<67108864?0:w/67108864|0}return ws},FFTM.prototype.convert13b=function(ws,len,rws,N){for(var carry=0,i=0;i<len;i++)carry+=0|ws[i],rws[2*i]=8191&carry,carry>>>=13,rws[2*i+1]=8191&carry,carry>>>=13;for(i=2*len;i<N;++i)rws[i]=0;assert(0===carry),assert(0==(-8192&carry))},FFTM.prototype.stub=function(N){for(var ph=new Array(N),i=0;i<N;i++)ph[i]=0;return ph},FFTM.prototype.mulp=function(x,y,out){var N=2*this.guessLen13b(x.length,y.length),rbt=this.makeRBT(N),_=this.stub(N),rws=new Array(N),rwst=new Array(N),iwst=new Array(N),nrws=new Array(N),nrwst=new Array(N),niwst=new Array(N),rmws=out.words;rmws.length=N,this.convert13b(x.words,x.length,rws,N),this.convert13b(y.words,y.length,nrws,N),this.transform(rws,_,rwst,iwst,N,rbt),this.transform(nrws,_,nrwst,niwst,N,rbt);for(var i=0;i<N;i++){var rx=rwst[i]*nrwst[i]-iwst[i]*niwst[i];iwst[i]=rwst[i]*niwst[i]+iwst[i]*nrwst[i],rwst[i]=rx}return this.conjugate(rwst,iwst,N),this.transform(rwst,iwst,rmws,_,N,rbt),this.conjugate(rmws,_,N),this.normalize13b(rmws,N),out.negative=x.negative^y.negative,out.length=x.length+y.length,out.strip()},BN.prototype.mul=function(num){var out=new BN(null);return out.words=new Array(this.length+num.length),this.mulTo(num,out)},BN.prototype.mulf=function(num){var out=new BN(null);return out.words=new Array(this.length+num.length),jumboMulTo(this,num,out)},BN.prototype.imul=function(num){return this.clone().mulTo(num,this)},BN.prototype.imuln=function(num){assert("number"==typeof num),assert(num<67108864);for(var carry=0,i=0;i<this.length;i++){var w=(0|this.words[i])*num,lo=(67108863&w)+(67108863&carry);carry>>=26,carry+=w/67108864|0,carry+=lo>>>26,this.words[i]=67108863&lo}return 0!==carry&&(this.words[i]=carry,this.length++),this},BN.prototype.muln=function(num){return this.clone().imuln(num)},BN.prototype.sqr=function(){return this.mul(this)},BN.prototype.isqr=function(){return this.imul(this.clone())},BN.prototype.pow=function(num){var w=toBitArray(num);if(0===w.length)return new BN(1);for(var res=this,i=0;i<w.length&&0===w[i];i++,res=res.sqr());if(++i<w.length)for(var q=res.sqr();i<w.length;i++,q=q.sqr())0!==w[i]&&(res=res.mul(q));return res},BN.prototype.iushln=function(bits){assert("number"==typeof bits&&bits>=0);var i,r=bits%26,s=(bits-r)/26,carryMask=67108863>>>26-r<<26-r;if(0!==r){var carry=0;for(i=0;i<this.length;i++){var newCarry=this.words[i]&carryMask,c=(0|this.words[i])-newCarry<<r;this.words[i]=c|carry,carry=newCarry>>>26-r}carry&&(this.words[i]=carry,this.length++)}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i<s;i++)this.words[i]=0;this.length+=s}return this.strip()},BN.prototype.ishln=function(bits){return assert(0===this.negative),this.iushln(bits)},BN.prototype.iushrn=function(bits,hint,extended){assert("number"==typeof bits&&bits>=0);var h;h=hint?(hint-hint%26)/26:0;var r=bits%26,s=Math.min((bits-r)/26,this.length),mask=67108863^67108863>>>r<<r,maskedWords=extended;if(h-=s,h=Math.max(0,h),maskedWords){for(var i=0;i<s;i++)maskedWords.words[i]=this.words[i];maskedWords.length=s}if(0===s);else if(this.length>s)for(this.length-=s,i=0;i<this.length;i++)this.words[i]=this.words[i+s];else this.words[0]=0,this.length=1;var carry=0;for(i=this.length-1;i>=0&&(0!==carry||i>=h);i--){var word=0|this.words[i];this.words[i]=carry<<26-r|word>>>r,carry=word&mask}return maskedWords&&0!==carry&&(maskedWords.words[maskedWords.length++]=carry),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},BN.prototype.ishrn=function(bits,hint,extended){return assert(0===this.negative),this.iushrn(bits,hint,extended)},BN.prototype.shln=function(bits){return this.clone().ishln(bits)},BN.prototype.ushln=function(bits){return this.clone().iushln(bits)},BN.prototype.shrn=function(bits){return this.clone().ishrn(bits)},BN.prototype.ushrn=function(bits){return this.clone().iushrn(bits)},BN.prototype.testn=function(bit){assert("number"==typeof bit&&bit>=0);var r=bit%26,s=(bit-r)/26,q=1<<r;return!(this.length<=s)&&!!(this.words[s]&q)},BN.prototype.imaskn=function(bits){assert("number"==typeof bits&&bits>=0);var r=bits%26,s=(bits-r)/26;if(assert(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==r&&s++,this.length=Math.min(s,this.length),0!==r){var mask=67108863^67108863>>>r<<r;this.words[this.length-1]&=mask}return this.strip()},BN.prototype.maskn=function(bits){return this.clone().imaskn(bits)},BN.prototype.iaddn=function(num){return assert("number"==typeof num),assert(num<67108864),num<0?this.isubn(-num):0!==this.negative?1===this.length&&(0|this.words[0])<num?(this.words[0]=num-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(num),this.negative=1,this):this._iaddn(num)},BN.prototype._iaddn=function(num){this.words[0]+=num;for(var i=0;i<this.length&&this.words[i]>=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},BN.prototype.isubn=function(num){if(assert("number"==typeof num),assert(num<67108864),num<0)return this.iaddn(-num);if(0!==this.negative)return this.negative=0,this.iaddn(num),this.negative=1,this;if(this.words[0]-=num,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this.strip()},BN.prototype.addn=function(num){return this.clone().iaddn(num)},BN.prototype.subn=function(num){return this.clone().isubn(num)},BN.prototype.iabs=function(){return this.negative=0,this},BN.prototype.abs=function(){return this.clone().iabs()},BN.prototype._ishlnsubmul=function(num,mul,shift){var i,len=num.length+shift;this._expand(len);var w,carry=0;for(i=0;i<num.length;i++){w=(0|this.words[i+shift])+carry;var right=(0|num.words[i])*mul;carry=((w-=67108863&right)>>26)-(right/67108864|0),this.words[i+shift]=67108863&w}for(;i<this.length-shift;i++)carry=(w=(0|this.words[i+shift])+carry)>>26,this.words[i+shift]=67108863&w;if(0===carry)return this.strip();for(assert(-1===carry),carry=0,i=0;i<this.length;i++)carry=(w=-(0|this.words[i])+carry)>>26,this.words[i]=67108863&w;return this.negative=1,this.strip()},BN.prototype._wordDiv=function(num,mode){var shift=this.length-num.length,a=this.clone(),b=num,bhi=0|b.words[b.length-1];0!==(shift=26-this._countBits(bhi))&&(b=b.ushln(shift),a.iushln(shift),bhi=0|b.words[b.length-1]);var q,m=a.length-b.length;if("mod"!==mode){(q=new BN(null)).length=m+1,q.words=new Array(q.length);for(var i=0;i<q.length;i++)q.words[i]=0}var diff=a.clone()._ishlnsubmul(b,1,m);0===diff.negative&&(a=diff,q&&(q.words[m]=1));for(var j=m-1;j>=0;j--){var qj=67108864*(0|a.words[b.length+j])+(0|a.words[b.length+j-1]);for(qj=Math.min(qj/bhi|0,67108863),a._ishlnsubmul(b,qj,j);0!==a.negative;)qj--,a.negative=0,a._ishlnsubmul(b,1,j),a.isZero()||(a.negative^=1);q&&(q.words[j]=qj)}return q&&q.strip(),a.strip(),"div"!==mode&&0!==shift&&a.iushrn(shift),{div:q||null,mod:a}},BN.prototype.divmod=function(num,mode,positive){if(assert(!num.isZero()),this.isZero())return{div:new BN(0),mod:new BN(0)};var div,mod,res;return 0!==this.negative&&0===num.negative?(res=this.neg().divmod(num,mode),"mod"!==mode&&(div=res.div.neg()),"div"!==mode&&(mod=res.mod.neg(),positive&&0!==mod.negative&&mod.iadd(num)),{div:div,mod:mod}):0===this.negative&&0!==num.negative?(res=this.divmod(num.neg(),mode),"mod"!==mode&&(div=res.div.neg()),{div:div,mod:res.mod}):0!=(this.negative&num.negative)?(res=this.neg().divmod(num.neg(),mode),"div"!==mode&&(mod=res.mod.neg(),positive&&0!==mod.negative&&mod.isub(num)),{div:res.div,mod:mod}):num.length>this.length||this.cmp(num)<0?{div:new BN(0),mod:this}:1===num.length?"div"===mode?{div:this.divn(num.words[0]),mod:null}:"mod"===mode?{div:null,mod:new BN(this.modn(num.words[0]))}:{div:this.divn(num.words[0]),mod:new BN(this.modn(num.words[0]))}:this._wordDiv(num,mode)},BN.prototype.div=function(num){return this.divmod(num,"div",!1).div},BN.prototype.mod=function(num){return this.divmod(num,"mod",!1).mod},BN.prototype.umod=function(num){return this.divmod(num,"mod",!0).mod},BN.prototype.divRound=function(num){var dm=this.divmod(num);if(dm.mod.isZero())return dm.div;var mod=0!==dm.div.negative?dm.mod.isub(num):dm.mod,half=num.ushrn(1),r2=num.andln(1),cmp=mod.cmp(half);return cmp<0||1===r2&&0===cmp?dm.div:0!==dm.div.negative?dm.div.isubn(1):dm.div.iaddn(1)},BN.prototype.modn=function(num){assert(num<=67108863);for(var p=(1<<26)%num,acc=0,i=this.length-1;i>=0;i--)acc=(p*acc+(0|this.words[i]))%num;return acc},BN.prototype.idivn=function(num){assert(num<=67108863);for(var carry=0,i=this.length-1;i>=0;i--){var w=(0|this.words[i])+67108864*carry;this.words[i]=w/num|0,carry=w%num}return this.strip()},BN.prototype.divn=function(num){return this.clone().idivn(num)},BN.prototype.egcd=function(p){assert(0===p.negative),assert(!p.isZero());var x=this,y=p.clone();x=0!==x.negative?x.umod(p):x.clone();for(var A=new BN(1),B=new BN(0),C=new BN(0),D=new BN(1),g=0;x.isEven()&&y.isEven();)x.iushrn(1),y.iushrn(1),++g;for(var yp=y.clone(),xp=x.clone();!x.isZero();){for(var i=0,im=1;0==(x.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(x.iushrn(i);i-- >0;)(A.isOdd()||B.isOdd())&&(A.iadd(yp),B.isub(xp)),A.iushrn(1),B.iushrn(1);for(var j=0,jm=1;0==(y.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(y.iushrn(j);j-- >0;)(C.isOdd()||D.isOdd())&&(C.iadd(yp),D.isub(xp)),C.iushrn(1),D.iushrn(1);x.cmp(y)>=0?(x.isub(y),A.isub(C),B.isub(D)):(y.isub(x),C.isub(A),D.isub(B))}return{a:C,b:D,gcd:y.iushln(g)}},BN.prototype._invmp=function(p){assert(0===p.negative),assert(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var x1=new BN(1),x2=new BN(0),delta=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,im=1;0==(a.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(a.iushrn(i);i-- >0;)x1.isOdd()&&x1.iadd(delta),x1.iushrn(1);for(var j=0,jm=1;0==(b.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(b.iushrn(j);j-- >0;)x2.isOdd()&&x2.iadd(delta),x2.iushrn(1);a.cmp(b)>=0?(a.isub(b),x1.isub(x2)):(b.isub(a),x2.isub(x1))}var res;return(res=0===a.cmpn(1)?x1:x2).cmpn(0)<0&&res.iadd(p),res},BN.prototype.gcd=function(num){if(this.isZero())return num.abs();if(num.isZero())return this.abs();var a=this.clone(),b=num.clone();a.negative=0,b.negative=0;for(var shift=0;a.isEven()&&b.isEven();shift++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var r=a.cmp(b);if(r<0){var t=a;a=b,b=t}else if(0===r||0===b.cmpn(1))break;a.isub(b)}return b.iushln(shift)},BN.prototype.invm=function(num){return this.egcd(num).a.umod(num)},BN.prototype.isEven=function(){return 0==(1&this.words[0])},BN.prototype.isOdd=function(){return 1==(1&this.words[0])},BN.prototype.andln=function(num){return this.words[0]&num},BN.prototype.bincn=function(bit){assert("number"==typeof bit);var r=bit%26,s=(bit-r)/26,q=1<<r;if(this.length<=s)return this._expand(s+1),this.words[s]|=q,this;for(var carry=q,i=s;0!==carry&&i<this.length;i++){var w=0|this.words[i];carry=(w+=carry)>>>26,w&=67108863,this.words[i]=w}return 0!==carry&&(this.words[i]=carry,this.length++),this},BN.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},BN.prototype.cmpn=function(num){var negative=num<0;if(0!==this.negative&&!negative)return-1;if(0===this.negative&&negative)return 1;this.strip();var res;if(this.length>1)res=1;else{negative&&(num=-num),assert(num<=67108863,"Number is too big");var w=0|this.words[0];res=w===num?0:w<num?-1:1}return 0!==this.negative?0|-res:res},BN.prototype.cmp=function(num){if(0!==this.negative&&0===num.negative)return-1;if(0===this.negative&&0!==num.negative)return 1;var res=this.ucmp(num);return 0!==this.negative?0|-res:res},BN.prototype.ucmp=function(num){if(this.length>num.length)return 1;if(this.length<num.length)return-1;for(var res=0,i=this.length-1;i>=0;i--){var a=0|this.words[i],b=0|num.words[i];if(a!==b){a<b?res=-1:a>b&&(res=1);break}}return res},BN.prototype.gtn=function(num){return 1===this.cmpn(num)},BN.prototype.gt=function(num){return 1===this.cmp(num)},BN.prototype.gten=function(num){return this.cmpn(num)>=0},BN.prototype.gte=function(num){return this.cmp(num)>=0},BN.prototype.ltn=function(num){return-1===this.cmpn(num)},BN.prototype.lt=function(num){return-1===this.cmp(num)},BN.prototype.lten=function(num){return this.cmpn(num)<=0},BN.prototype.lte=function(num){return this.cmp(num)<=0},BN.prototype.eqn=function(num){return 0===this.cmpn(num)},BN.prototype.eq=function(num){return 0===this.cmp(num)},BN.red=function(num){return new Red(num)},BN.prototype.toRed=function(ctx){return assert(!this.red,"Already a number in reduction context"),assert(0===this.negative,"red works only with positives"),ctx.convertTo(this)._forceRed(ctx)},BN.prototype.fromRed=function(){return assert(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},BN.prototype._forceRed=function(ctx){return this.red=ctx,this},BN.prototype.forceRed=function(ctx){return assert(!this.red,"Already a number in reduction context"),this._forceRed(ctx)},BN.prototype.redAdd=function(num){return assert(this.red,"redAdd works only with red numbers"),this.red.add(this,num)},BN.prototype.redIAdd=function(num){return assert(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,num)},BN.prototype.redSub=function(num){return assert(this.red,"redSub works only with red numbers"),this.red.sub(this,num)},BN.prototype.redISub=function(num){return assert(this.red,"redISub works only with red numbers"),this.red.isub(this,num)},BN.prototype.redShl=function(num){return assert(this.red,"redShl works only with red numbers"),this.red.shl(this,num)},BN.prototype.redMul=function(num){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,num),this.red.mul(this,num)},BN.prototype.redIMul=function(num){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,num),this.red.imul(this,num)},BN.prototype.redSqr=function(){return assert(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},BN.prototype.redISqr=function(){return assert(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},BN.prototype.redSqrt=function(){return assert(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},BN.prototype.redInvm=function(){return assert(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},BN.prototype.redNeg=function(){return assert(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},BN.prototype.redPow=function(num){return assert(this.red&&!num.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,num)};var primes={k256:null,p224:null,p192:null,p25519:null};MPrime.prototype._tmp=function(){var tmp=new BN(null);return tmp.words=new Array(Math.ceil(this.n/13)),tmp},MPrime.prototype.ireduce=function(num){var rlen,r=num;do{this.split(r,this.tmp),rlen=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(rlen>this.n);var cmp=rlen<this.n?-1:r.ucmp(this.p);return 0===cmp?(r.words[0]=0,r.length=1):cmp>0?r.isub(this.p):r.strip(),r},MPrime.prototype.split=function(input,out){input.iushrn(this.n,0,out)},MPrime.prototype.imulK=function(num){return num.imul(this.k)},inherits(K256,MPrime),K256.prototype.split=function(input,output){for(var outLen=Math.min(input.length,9),i=0;i<outLen;i++)output.words[i]=input.words[i];if(output.length=outLen,input.length<=9)return input.words[0]=0,void(input.length=1);var prev=input.words[9];for(output.words[output.length++]=4194303&prev,i=10;i<input.length;i++){var next=0|input.words[i];input.words[i-10]=(4194303&next)<<4|prev>>>22,prev=next}prev>>>=22,input.words[i-10]=prev,0===prev&&input.length>10?input.length-=10:input.length-=9},K256.prototype.imulK=function(num){num.words[num.length]=0,num.words[num.length+1]=0,num.length+=2;for(var lo=0,i=0;i<num.length;i++){var w=0|num.words[i];lo+=977*w,num.words[i]=67108863&lo,lo=64*w+(lo/67108864|0)}return 0===num.words[num.length-1]&&(num.length--,0===num.words[num.length-1]&&num.length--),num},inherits(P224,MPrime),inherits(P192,MPrime),inherits(P25519,MPrime),P25519.prototype.imulK=function(num){for(var carry=0,i=0;i<num.length;i++){var hi=19*(0|num.words[i])+carry,lo=67108863&hi;hi>>>=26,num.words[i]=lo,carry=hi}return 0!==carry&&(num.words[num.length++]=carry),num},BN._prime=function(name){if(primes[name])return primes[name];var prime;if("k256"===name)prime=new K256;else if("p224"===name)prime=new P224;else if("p192"===name)prime=new P192;else{if("p25519"!==name)throw new Error("Unknown prime "+name);prime=new P25519}return primes[name]=prime,prime},Red.prototype._verify1=function(a){assert(0===a.negative,"red works only with positives"),assert(a.red,"red works only with red numbers")},Red.prototype._verify2=function(a,b){assert(0==(a.negative|b.negative),"red works only with positives"),assert(a.red&&a.red===b.red,"red works only with red numbers")},Red.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},Red.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},Red.prototype.add=function(a,b){this._verify2(a,b);var res=a.add(b);return res.cmp(this.m)>=0&&res.isub(this.m),res._forceRed(this)},Red.prototype.iadd=function(a,b){this._verify2(a,b);var res=a.iadd(b);return res.cmp(this.m)>=0&&res.isub(this.m),res},Red.prototype.sub=function(a,b){this._verify2(a,b);var res=a.sub(b);return res.cmpn(0)<0&&res.iadd(this.m),res._forceRed(this)},Red.prototype.isub=function(a,b){this._verify2(a,b);var res=a.isub(b);return res.cmpn(0)<0&&res.iadd(this.m),res},Red.prototype.shl=function(a,num){return this._verify1(a),this.imod(a.ushln(num))},Red.prototype.imul=function(a,b){return this._verify2(a,b),this.imod(a.imul(b))},Red.prototype.mul=function(a,b){return this._verify2(a,b),this.imod(a.mul(b))},Red.prototype.isqr=function(a){return this.imul(a,a.clone())},Red.prototype.sqr=function(a){return this.mul(a,a)},Red.prototype.sqrt=function(a){if(a.isZero())return a.clone();var mod3=this.m.andln(3);if(assert(mod3%2==1),3===mod3){var pow=this.m.add(new BN(1)).iushrn(2);return this.pow(a,pow)}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);assert(!q.isZero());var one=new BN(1).toRed(this),nOne=one.redNeg(),lpow=this.m.subn(1).iushrn(1),z=this.m.bitLength();for(z=new BN(2*z*z).toRed(this);0!==this.pow(z,lpow).cmp(nOne);)z.redIAdd(nOne);for(var c=this.pow(z,q),r=this.pow(a,q.addn(1).iushrn(1)),t=this.pow(a,q),m=s;0!==t.cmp(one);){for(var tmp=t,i=0;0!==tmp.cmp(one);i++)tmp=tmp.redSqr();assert(i<m);var b=this.pow(c,new BN(1).iushln(m-i-1));r=r.redMul(b),c=b.redSqr(),t=t.redMul(c),m=i}return r},Red.prototype.invm=function(a){var inv=a._invmp(this.m);return 0!==inv.negative?(inv.negative=0,this.imod(inv).redNeg()):this.imod(inv)},Red.prototype.pow=function(a,num){if(num.isZero())return new BN(1).toRed(this);if(0===num.cmpn(1))return a.clone();var wnd=new Array(16);wnd[0]=new BN(1).toRed(this),wnd[1]=a;for(var i=2;i<wnd.length;i++)wnd[i]=this.mul(wnd[i-1],a);var res=wnd[0],current=0,currentLen=0,start=num.bitLength()%26;for(0===start&&(start=26),i=num.length-1;i>=0;i--){for(var word=num.words[i],j=start-1;j>=0;j--){var bit=word>>j&1;res!==wnd[0]&&(res=this.sqr(res)),0!==bit||0!==current?(current<<=1,current|=bit,(4===++currentLen||0===i&&0===j)&&(res=this.mul(res,wnd[current]),currentLen=0,current=0)):currentLen=0}start=26}return res},Red.prototype.convertTo=function(num){var r=num.umod(this.m);return r===num?r.clone():r},Red.prototype.convertFrom=function(num){var res=num.clone();return res.red=null,res},BN.mont=function(num){return new Mont(num)},inherits(Mont,Red),Mont.prototype.convertTo=function(num){return this.imod(num.ushln(this.shift))},Mont.prototype.convertFrom=function(num){var r=this.imod(num.mul(this.rinv));return r.red=null,r},Mont.prototype.imul=function(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var t=a.imul(b),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=t.isub(c).iushrn(this.shift),res=u;return u.cmp(this.m)>=0?res=u.isub(this.m):u.cmpn(0)<0&&(res=u.iadd(this.m)),res._forceRed(this)},Mont.prototype.mul=function(a,b){if(a.isZero()||b.isZero())return new BN(0)._forceRed(this);var t=a.mul(b),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=t.isub(c).iushrn(this.shift),res=u;return u.cmp(this.m)>=0?res=u.isub(this.m):u.cmpn(0)<0&&(res=u.iadd(this.m)),res._forceRed(this)},Mont.prototype.invm=function(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===module||module,this)}).call(exports,__webpack_require__(20)(module))},function(module,exports){},function(module,exports,__webpack_require__){function Entity(name,body){this.name=name,this.body=body,this.decoders={},this.encoders={}}var asn1=__webpack_require__(8),inherits=__webpack_require__(2);exports.define=function(name,body){return new Entity(name,body)},Entity.prototype._createNamed=function(base){var named;try{named=__webpack_require__(184).runInThisContext("(function "+this.name+"(entity) {\n  this._initNamed(entity);\n})")}catch(e){named=function(entity){this._initNamed(entity)}}return inherits(named,base),named.prototype._initNamed=function(entity){base.call(this,entity)},new named(this)},Entity.prototype._getDecoder=function(enc){return enc=enc||"der",this.decoders.hasOwnProperty(enc)||(this.decoders[enc]=this._createNamed(asn1.decoders[enc])),this.decoders[enc]},Entity.prototype.decode=function(data,enc,options){return this._getDecoder(enc).decode(data,options)},Entity.prototype._getEncoder=function(enc){return enc=enc||"der",this.encoders.hasOwnProperty(enc)||(this.encoders[enc]=this._createNamed(asn1.encoders[enc])),this.encoders[enc]},Entity.prototype.encode=function(data,enc,reporter){return this._getEncoder(enc).encode(data,reporter)}},function(module,exports,__webpack_require__){function Context(){}var indexOf=__webpack_require__(185),Object_keys=function(obj){if(Object.keys)return Object.keys(obj);var res=[];for(var key in obj)res.push(key);return res},forEach=function(xs,fn){if(xs.forEach)return xs.forEach(fn);for(var i=0;i<xs.length;i++)fn(xs[i],i,xs)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(obj,name,value){Object.defineProperty(obj,name,{writable:!0,enumerable:!1,configurable:!0,value:value})}}catch(e){return function(obj,name,value){obj[name]=value}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];Context.prototype={};var Script=exports.Script=function(code){if(!(this instanceof Script))return new Script(code);this.code=code};Script.prototype.runInContext=function(context){if(!(context instanceof Context))throw new TypeError("needs a 'context' argument.");var iframe=document.createElement("iframe");iframe.style||(iframe.style={}),iframe.style.display="none",document.body.appendChild(iframe);var win=iframe.contentWindow,wEval=win.eval,wExecScript=win.execScript;!wEval&&wExecScript&&(wExecScript.call(win,"null"),wEval=win.eval),forEach(Object_keys(context),function(key){win[key]=context[key]}),forEach(globals,function(key){context[key]&&(win[key]=context[key])});var winKeys=Object_keys(win),res=wEval.call(win,this.code);return forEach(Object_keys(win),function(key){(key in context||-1===indexOf(winKeys,key))&&(context[key]=win[key])}),forEach(globals,function(key){key in context||defineProp(context,key,win[key])}),document.body.removeChild(iframe),res},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(context){var ctx=Script.createContext(context),res=this.runInContext(ctx);return forEach(Object_keys(ctx),function(key){context[key]=ctx[key]}),res},forEach(Object_keys(Script.prototype),function(name){exports[name]=Script[name]=function(code){var s=Script(code);return s[name].apply(s,[].slice.call(arguments,1))}}),exports.createScript=function(code){return exports.Script(code)},exports.createContext=Script.createContext=function(context){var copy=new Context;return"object"==typeof context&&forEach(Object_keys(context),function(key){copy[key]=context[key]}),copy}},function(module,exports){var indexOf=[].indexOf;module.exports=function(arr,obj){if(indexOf)return arr.indexOf(obj);for(var i=0;i<arr.length;++i)if(arr[i]===obj)return i;return-1}},function(module,exports,__webpack_require__){function Reporter(options){this._reporterState={obj:null,path:[],options:options||{},errors:[]}}function ReporterError(path,msg){this.path=path,this.rethrow(msg)}var inherits=__webpack_require__(2);exports.Reporter=Reporter,Reporter.prototype.isError=function(obj){return obj instanceof ReporterError},Reporter.prototype.save=function(){var state=this._reporterState;return{obj:state.obj,pathLen:state.path.length}},Reporter.prototype.restore=function(data){var state=this._reporterState;state.obj=data.obj,state.path=state.path.slice(0,data.pathLen)},Reporter.prototype.enterKey=function(key){return this._reporterState.path.push(key)},Reporter.prototype.exitKey=function(index){var state=this._reporterState;state.path=state.path.slice(0,index-1)},Reporter.prototype.leaveKey=function(index,key,value){var state=this._reporterState;this.exitKey(index),null!==state.obj&&(state.obj[key]=value)},Reporter.prototype.path=function(){return this._reporterState.path.join("/")},Reporter.prototype.enterObject=function(){var state=this._reporterState,prev=state.obj;return state.obj={},prev},Reporter.prototype.leaveObject=function(prev){var state=this._reporterState,now=state.obj;return state.obj=prev,now},Reporter.prototype.error=function(msg){var err,state=this._reporterState,inherited=msg instanceof ReporterError;if(err=inherited?msg:new ReporterError(state.path.map(function(elem){return"["+JSON.stringify(elem)+"]"}).join(""),msg.message||msg,msg.stack),!state.options.partial)throw err;return inherited||state.errors.push(err),err},Reporter.prototype.wrapResult=function(result){var state=this._reporterState;return state.options.partial?{result:this.isError(result)?null:result,errors:state.errors}:result},inherits(ReporterError,Error),ReporterError.prototype.rethrow=function(msg){if(this.message=msg+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,ReporterError),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},function(module,exports,__webpack_require__){function Node(enc,parent){var state={};this._baseState=state,state.enc=enc,state.parent=parent||null,state.children=null,state.tag=null,state.args=null,state.reverseArgs=null,state.choice=null,state.optional=!1,state.any=!1,state.obj=!1,state.use=null,state.useDecoder=null,state.key=null,state.default=null,state.explicit=null,state.implicit=null,state.contains=null,state.parent||(state.children=[],this._wrap())}var Reporter=__webpack_require__(14).Reporter,EncoderBuffer=__webpack_require__(14).EncoderBuffer,DecoderBuffer=__webpack_require__(14).DecoderBuffer,assert=__webpack_require__(188),tags=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],methods=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(tags),overrided=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];module.exports=Node;var stateProps=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Node.prototype.clone=function(){var state=this._baseState,cstate={};stateProps.forEach(function(prop){cstate[prop]=state[prop]});var res=new this.constructor(cstate.parent);return res._baseState=cstate,res},Node.prototype._wrap=function(){var state=this._baseState;methods.forEach(function(method){this[method]=function(){var clone=new this.constructor(this);return state.children.push(clone),clone[method].apply(clone,arguments)}},this)},Node.prototype._init=function(body){var state=this._baseState;assert(null===state.parent),body.call(this),state.children=state.children.filter(function(child){return child._baseState.parent===this},this),assert.equal(state.children.length,1,"Root node can have only one child")},Node.prototype._useArgs=function(args){var state=this._baseState,children=args.filter(function(arg){return arg instanceof this.constructor},this);args=args.filter(function(arg){return!(arg instanceof this.constructor)},this),0!==children.length&&(assert(null===state.children),state.children=children,children.forEach(function(child){child._baseState.parent=this},this)),0!==args.length&&(assert(null===state.args),state.args=args,state.reverseArgs=args.map(function(arg){if("object"!=typeof arg||arg.constructor!==Object)return arg;var res={};return Object.keys(arg).forEach(function(key){key==(0|key)&&(key|=0);var value=arg[key];res[value]=key}),res}))},overrided.forEach(function(method){Node.prototype[method]=function(){var state=this._baseState;throw new Error(method+" not implemented for encoding: "+state.enc)}}),tags.forEach(function(tag){Node.prototype[tag]=function(){var state=this._baseState,args=Array.prototype.slice.call(arguments);return assert(null===state.tag),state.tag=tag,this._useArgs(args),this}}),Node.prototype.use=function(item){assert(item);var state=this._baseState;return assert(null===state.use),state.use=item,this},Node.prototype.optional=function(){return this._baseState.optional=!0,this},Node.prototype.def=function(val){var state=this._baseState;return assert(null===state.default),state.default=val,state.optional=!0,this},Node.prototype.explicit=function(num){var state=this._baseState;return assert(null===state.explicit&&null===state.implicit),state.explicit=num,this},Node.prototype.implicit=function(num){var state=this._baseState;return assert(null===state.explicit&&null===state.implicit),state.implicit=num,this},Node.prototype.obj=function(){var state=this._baseState,args=Array.prototype.slice.call(arguments);return state.obj=!0,0!==args.length&&this._useArgs(args),this},Node.prototype.key=function(newKey){var state=this._baseState;return assert(null===state.key),state.key=newKey,this},Node.prototype.any=function(){return this._baseState.any=!0,this},Node.prototype.choice=function(obj){var state=this._baseState;return assert(null===state.choice),state.choice=obj,this._useArgs(Object.keys(obj).map(function(key){return obj[key]})),this},Node.prototype.contains=function(item){var state=this._baseState;return assert(null===state.use),state.contains=item,this},Node.prototype._decode=function(input,options){var state=this._baseState;if(null===state.parent)return input.wrapResult(state.children[0]._decode(input,options));var result=state.default,present=!0,prevKey=null;if(null!==state.key&&(prevKey=input.enterKey(state.key)),state.optional){var tag=null;if(null!==state.explicit?tag=state.explicit:null!==state.implicit?tag=state.implicit:null!==state.tag&&(tag=state.tag),null!==tag||state.any){if(present=this._peekTag(input,tag,state.any),input.isError(present))return present}else{save=input.save();try{null===state.choice?this._decodeGeneric(state.tag,input,options):this._decodeChoice(input,options),present=!0}catch(e){present=!1}input.restore(save)}}var prevObj;if(state.obj&&present&&(prevObj=input.enterObject()),present){if(null!==state.explicit){var explicit=this._decodeTag(input,state.explicit);if(input.isError(explicit))return explicit;input=explicit}var start=input.offset;if(null===state.use&&null===state.choice){if(state.any)var save=input.save();var body=this._decodeTag(input,null!==state.implicit?state.implicit:state.tag,state.any);if(input.isError(body))return body;state.any?result=input.raw(save):input=body}if(options&&options.track&&null!==state.tag&&options.track(input.path(),start,input.length,"tagged"),options&&options.track&&null!==state.tag&&options.track(input.path(),input.offset,input.length,"content"),result=state.any?result:null===state.choice?this._decodeGeneric(state.tag,input,options):this._decodeChoice(input,options),input.isError(result))return result;if(state.any||null!==state.choice||null===state.children||state.children.forEach(function(child){child._decode(input,options)}),state.contains&&("octstr"===state.tag||"bitstr"===state.tag)){var data=new DecoderBuffer(result);result=this._getUse(state.contains,input._reporterState.obj)._decode(data,options)}}return state.obj&&present&&(result=input.leaveObject(prevObj)),null===state.key||null===result&&!0!==present?null!==prevKey&&input.exitKey(prevKey):input.leaveKey(prevKey,state.key,result),result},Node.prototype._decodeGeneric=function(tag,input,options){var state=this._baseState;return"seq"===tag||"set"===tag?null:"seqof"===tag||"setof"===tag?this._decodeList(input,tag,state.args[0],options):/str$/.test(tag)?this._decodeStr(input,tag,options):"objid"===tag&&state.args?this._decodeObjid(input,state.args[0],state.args[1],options):"objid"===tag?this._decodeObjid(input,null,null,options):"gentime"===tag||"utctime"===tag?this._decodeTime(input,tag,options):"null_"===tag?this._decodeNull(input,options):"bool"===tag?this._decodeBool(input,options):"objDesc"===tag?this._decodeStr(input,tag,options):"int"===tag||"enum"===tag?this._decodeInt(input,state.args&&state.args[0],options):null!==state.use?this._getUse(state.use,input._reporterState.obj)._decode(input,options):input.error("unknown tag: "+tag)},Node.prototype._getUse=function(entity,obj){var state=this._baseState;return state.useDecoder=this._use(entity,obj),assert(null===state.useDecoder._baseState.parent),state.useDecoder=state.useDecoder._baseState.children[0],state.implicit!==state.useDecoder._baseState.implicit&&(state.useDecoder=state.useDecoder.clone(),state.useDecoder._baseState.implicit=state.implicit),state.useDecoder},Node.prototype._decodeChoice=function(input,options){var state=this._baseState,result=null,match=!1;return Object.keys(state.choice).some(function(key){var save=input.save(),node=state.choice[key];try{var value=node._decode(input,options);if(input.isError(value))return!1;result={type:key,value:value},match=!0}catch(e){return input.restore(save),!1}return!0},this),match?result:input.error("Choice not matched")},Node.prototype._createEncoderBuffer=function(data){return new EncoderBuffer(data,this.reporter)},Node.prototype._encode=function(data,reporter,parent){var state=this._baseState;if(null===state.default||state.default!==data){var result=this._encodeValue(data,reporter,parent);if(void 0!==result&&!this._skipDefault(result,reporter,parent))return result}},Node.prototype._encodeValue=function(data,reporter,parent){var state=this._baseState;if(null===state.parent)return state.children[0]._encode(data,reporter||new Reporter);result=null;if(this.reporter=reporter,state.optional&&void 0===data){if(null===state.default)return;data=state.default}var content=null,primitive=!1;if(state.any)result=this._createEncoderBuffer(data);else if(state.choice)result=this._encodeChoice(data,reporter);else if(state.contains)content=this._getUse(state.contains,parent)._encode(data,reporter),primitive=!0;else if(state.children)content=state.children.map(function(child){if("null_"===child._baseState.tag)return child._encode(null,reporter,data);if(null===child._baseState.key)return reporter.error("Child should have a key");var prevKey=reporter.enterKey(child._baseState.key);if("object"!=typeof data)return reporter.error("Child expected, but input is not object");var res=child._encode(data[child._baseState.key],reporter,data);return reporter.leaveKey(prevKey),res},this).filter(function(child){return child}),content=this._createEncoderBuffer(content);else if("seqof"===state.tag||"setof"===state.tag){if(!state.args||1!==state.args.length)return reporter.error("Too many args for : "+state.tag);if(!Array.isArray(data))return reporter.error("seqof/setof, but data is not Array");var child=this.clone();child._baseState.implicit=null,content=this._createEncoderBuffer(data.map(function(item){var state=this._baseState;return this._getUse(state.args[0],data)._encode(item,reporter)},child))}else null!==state.use?result=this._getUse(state.use,parent)._encode(data,reporter):(content=this._encodePrimitive(state.tag,data),primitive=!0);var result;if(!state.any&&null===state.choice){var tag=null!==state.implicit?state.implicit:state.tag,cls=null===state.implicit?"universal":"context";null===tag?null===state.use&&reporter.error("Tag could be ommited only for .use()"):null===state.use&&(result=this._encodeComposite(tag,primitive,cls,content))}return null!==state.explicit&&(result=this._encodeComposite(state.explicit,!1,"context",result)),result},Node.prototype._encodeChoice=function(data,reporter){var state=this._baseState,node=state.choice[data.type];return node||assert(!1,data.type+" not found in "+JSON.stringify(Object.keys(state.choice))),node._encode(data.value,reporter)},Node.prototype._encodePrimitive=function(tag,data){var state=this._baseState;if(/str$/.test(tag))return this._encodeStr(data,tag);if("objid"===tag&&state.args)return this._encodeObjid(data,state.reverseArgs[0],state.args[1]);if("objid"===tag)return this._encodeObjid(data,null,null);if("gentime"===tag||"utctime"===tag)return this._encodeTime(data,tag);if("null_"===tag)return this._encodeNull();if("int"===tag||"enum"===tag)return this._encodeInt(data,state.args&&state.reverseArgs[0]);if("bool"===tag)return this._encodeBool(data);if("objDesc"===tag)return this._encodeStr(data,tag);throw new Error("Unsupported tag: "+tag)},Node.prototype._isNumstr=function(str){return/^[0-9 ]*$/.test(str)},Node.prototype._isPrintstr=function(str){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(str)}},function(module,exports){function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}module.exports=assert,assert.equal=function(l,r,msg){if(l!=r)throw new Error(msg||"Assertion failed: "+l+" != "+r)}},function(module,exports,__webpack_require__){var constants=__webpack_require__(69);exports.tagClass={0:"universal",1:"application",2:"context",3:"private"},exports.tagClassByName=constants._reverse(exports.tagClass),exports.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},exports.tagByName=constants._reverse(exports.tag)},function(module,exports,__webpack_require__){var decoders=exports;decoders.der=__webpack_require__(70),decoders.pem=__webpack_require__(191)},function(module,exports,__webpack_require__){function PEMDecoder(entity){DERDecoder.call(this,entity),this.enc="pem"}var inherits=__webpack_require__(2),Buffer=__webpack_require__(0).Buffer,DERDecoder=__webpack_require__(70);inherits(PEMDecoder,DERDecoder),module.exports=PEMDecoder,PEMDecoder.prototype.decode=function(data,options){for(var lines=data.toString().split(/[\r\n]+/g),label=options.label.toUpperCase(),re=/^-----(BEGIN|END) ([^-]+)-----$/,start=-1,end=-1,i=0;i<lines.length;i++){var match=lines[i].match(re);if(null!==match&&match[2]===label){if(-1!==start){if("END"!==match[1])break;end=i;break}if("BEGIN"!==match[1])break;start=i}}if(-1===start||-1===end)throw new Error("PEM section not found for: "+label);var base64=lines.slice(start+1,end).join("");base64.replace(/[^a-z0-9\+\/=]+/gi,"");var input=new Buffer(base64,"base64");return DERDecoder.prototype.decode.call(this,input,options)}},function(module,exports,__webpack_require__){var encoders=exports;encoders.der=__webpack_require__(71),encoders.pem=__webpack_require__(193)},function(module,exports,__webpack_require__){function PEMEncoder(entity){DEREncoder.call(this,entity),this.enc="pem"}var inherits=__webpack_require__(2),DEREncoder=__webpack_require__(71);inherits(PEMEncoder,DEREncoder),module.exports=PEMEncoder,PEMEncoder.prototype.encode=function(data,options){for(var p=DEREncoder.prototype.encode.call(this,data).toString("base64"),out=["-----BEGIN "+options.label+"-----"],i=0;i<p.length;i+=64)out.push(p.slice(i,i+64));return out.push("-----END "+options.label+"-----"),out.join("\n")}},function(module,exports,__webpack_require__){"use strict";function ensure(cb){if("function"!=typeof cb)throw new Error("callback is required")}function ensureKey(key,length){if(Buffer.isBuffer(key)&&(key=new Uint8Array(key)),!(key instanceof Uint8Array)||key.length!==length)throw new Error("Key must be a Uint8Array or Buffer of length "+length);return key}const multihashing=__webpack_require__(18),protobuf=__webpack_require__(34),Buffer=__webpack_require__(1).Buffer,crypto=__webpack_require__(195),pbm=protobuf(__webpack_require__(35));class Ed25519PublicKey{constructor(key){this._key=ensureKey(key,crypto.publicKeyLength)}verify(data,sig,callback){ensure(callback),crypto.hashAndVerify(this._key,sig,data,callback)}marshal(){return Buffer.from(this._key)}get bytes(){return pbm.PublicKey.encode({Type:pbm.KeyType.Ed25519,Data:this.marshal()})}equals(key){return this.bytes.equals(key.bytes)}hash(callback){ensure(callback),multihashing(this.bytes,"sha2-256",callback)}}class Ed25519PrivateKey{constructor(key,publicKey){this._key=ensureKey(key,crypto.privateKeyLength),this._publicKey=ensureKey(publicKey,crypto.publicKeyLength)}sign(message,callback){ensure(callback),crypto.hashAndSign(this._key,message,callback)}get public(){if(!this._publicKey)throw new Error("public key not provided");return new Ed25519PublicKey(this._publicKey)}marshal(){return Buffer.concat([Buffer.from(this._key),Buffer.from(this._publicKey)])}get bytes(){return pbm.PrivateKey.encode({Type:pbm.KeyType.Ed25519,Data:this.marshal()})}equals(key){return this.bytes.equals(key.bytes)}hash(callback){ensure(callback),multihashing(this.bytes,"sha2-256",callback)}}module.exports={Ed25519PublicKey:Ed25519PublicKey,Ed25519PrivateKey:Ed25519PrivateKey,unmarshalEd25519PrivateKey:function(bytes,callback){try{bytes=ensureKey(bytes,crypto.privateKeyLength+crypto.publicKeyLength)}catch(err){return callback(err)}const privateKeyBytes=bytes.slice(0,crypto.privateKeyLength),publicKeyBytes=bytes.slice(crypto.privateKeyLength,bytes.length);callback(null,new Ed25519PrivateKey(privateKeyBytes,publicKeyBytes))},unmarshalEd25519PublicKey:function(bytes){return bytes=ensureKey(bytes,crypto.publicKeyLength),new Ed25519PublicKey(bytes)},generateKeyPair:function(_bits,cb){void 0===cb&&"function"==typeof _bits&&(cb=_bits),crypto.generateKey((err,keys)=>{if(err)return cb(err);let privkey;try{privkey=new Ed25519PrivateKey(keys.secretKey,keys.publicKey)}catch(err){return void cb(err)}cb(null,privkey)})},generateKeyPairFromSeed:function(seed,_bits,cb){void 0===cb&&"function"==typeof _bits&&(cb=_bits),crypto.generateKeyFromSeed(seed,(err,keys)=>{if(err)return cb(err);let privkey;try{privkey=new Ed25519PrivateKey(keys.secretKey,keys.publicKey)}catch(err){return void cb(err)}cb(null,privkey)})}}},function(module,exports,__webpack_require__){"use strict";const nacl=__webpack_require__(196),setImmediate=__webpack_require__(36),Buffer=__webpack_require__(1).Buffer;exports.publicKeyLength=nacl.sign.publicKeyLength,exports.privateKeyLength=nacl.sign.secretKeyLength,exports.generateKey=function(callback){const done=(err,res)=>setImmediate(()=>{callback(err,res)});let keys;try{keys=nacl.sign.keyPair()}catch(err){return done(err)}done(null,keys)},exports.generateKeyFromSeed=function(seed,callback){const done=(err,res)=>setImmediate(()=>callback(err,res));let keys;try{keys=nacl.sign.keyPair.fromSeed(seed)}catch(err){return done(err)}done(null,keys)},exports.hashAndSign=function(key,msg,callback){setImmediate(()=>{callback(null,Buffer.from(nacl.sign.detached(msg,key)))})},exports.hashAndVerify=function(key,sig,msg,callback){setImmediate(()=>{callback(null,nacl.sign.detached.verify(msg,sig,key))})}},function(module,exports,__webpack_require__){!function(nacl){"use strict";function ts64(x,i,h,l){x[i]=h>>24&255,x[i+1]=h>>16&255,x[i+2]=h>>8&255,x[i+3]=255&h,x[i+4]=l>>24&255,x[i+5]=l>>16&255,x[i+6]=l>>8&255,x[i+7]=255&l}function vn(x,xi,y,yi,n){var i,d=0;for(i=0;i<n;i++)d|=x[xi+i]^y[yi+i];return(1&d-1>>>8)-1}function crypto_verify_16(x,xi,y,yi){return vn(x,xi,y,yi,16)}function crypto_verify_32(x,xi,y,yi){return vn(x,xi,y,yi,32)}function core_salsa20(o,p,k,c){for(var u,j0=255&c[0]|(255&c[1])<<8|(255&c[2])<<16|(255&c[3])<<24,j1=255&k[0]|(255&k[1])<<8|(255&k[2])<<16|(255&k[3])<<24,j2=255&k[4]|(255&k[5])<<8|(255&k[6])<<16|(255&k[7])<<24,j3=255&k[8]|(255&k[9])<<8|(255&k[10])<<16|(255&k[11])<<24,j4=255&k[12]|(255&k[13])<<8|(255&k[14])<<16|(255&k[15])<<24,j5=255&c[4]|(255&c[5])<<8|(255&c[6])<<16|(255&c[7])<<24,j6=255&p[0]|(255&p[1])<<8|(255&p[2])<<16|(255&p[3])<<24,j7=255&p[4]|(255&p[5])<<8|(255&p[6])<<16|(255&p[7])<<24,j8=255&p[8]|(255&p[9])<<8|(255&p[10])<<16|(255&p[11])<<24,j9=255&p[12]|(255&p[13])<<8|(255&p[14])<<16|(255&p[15])<<24,j10=255&c[8]|(255&c[9])<<8|(255&c[10])<<16|(255&c[11])<<24,j11=255&k[16]|(255&k[17])<<8|(255&k[18])<<16|(255&k[19])<<24,j12=255&k[20]|(255&k[21])<<8|(255&k[22])<<16|(255&k[23])<<24,j13=255&k[24]|(255&k[25])<<8|(255&k[26])<<16|(255&k[27])<<24,j14=255&k[28]|(255&k[29])<<8|(255&k[30])<<16|(255&k[31])<<24,j15=255&c[12]|(255&c[13])<<8|(255&c[14])<<16|(255&c[15])<<24,x0=j0,x1=j1,x2=j2,x3=j3,x4=j4,x5=j5,x6=j6,x7=j7,x8=j8,x9=j9,x10=j10,x11=j11,x12=j12,x13=j13,x14=j14,x15=j15,i=0;i<20;i+=2)x0^=(u=(x12^=(u=(x8^=(u=(x4^=(u=x0+x12|0)<<7|u>>>25)+x0|0)<<9|u>>>23)+x4|0)<<13|u>>>19)+x8|0)<<18|u>>>14,x5^=(u=(x1^=(u=(x13^=(u=(x9^=(u=x5+x1|0)<<7|u>>>25)+x5|0)<<9|u>>>23)+x9|0)<<13|u>>>19)+x13|0)<<18|u>>>14,x10^=(u=(x6^=(u=(x2^=(u=(x14^=(u=x10+x6|0)<<7|u>>>25)+x10|0)<<9|u>>>23)+x14|0)<<13|u>>>19)+x2|0)<<18|u>>>14,x15^=(u=(x11^=(u=(x7^=(u=(x3^=(u=x15+x11|0)<<7|u>>>25)+x15|0)<<9|u>>>23)+x3|0)<<13|u>>>19)+x7|0)<<18|u>>>14,x0^=(u=(x3^=(u=(x2^=(u=(x1^=(u=x0+x3|0)<<7|u>>>25)+x0|0)<<9|u>>>23)+x1|0)<<13|u>>>19)+x2|0)<<18|u>>>14,x5^=(u=(x4^=(u=(x7^=(u=(x6^=(u=x5+x4|0)<<7|u>>>25)+x5|0)<<9|u>>>23)+x6|0)<<13|u>>>19)+x7|0)<<18|u>>>14,x10^=(u=(x9^=(u=(x8^=(u=(x11^=(u=x10+x9|0)<<7|u>>>25)+x10|0)<<9|u>>>23)+x11|0)<<13|u>>>19)+x8|0)<<18|u>>>14,x15^=(u=(x14^=(u=(x13^=(u=(x12^=(u=x15+x14|0)<<7|u>>>25)+x15|0)<<9|u>>>23)+x12|0)<<13|u>>>19)+x13|0)<<18|u>>>14;x0=x0+j0|0,x1=x1+j1|0,x2=x2+j2|0,x3=x3+j3|0,x4=x4+j4|0,x5=x5+j5|0,x6=x6+j6|0,x7=x7+j7|0,x8=x8+j8|0,x9=x9+j9|0,x10=x10+j10|0,x11=x11+j11|0,x12=x12+j12|0,x13=x13+j13|0,x14=x14+j14|0,x15=x15+j15|0,o[0]=x0>>>0&255,o[1]=x0>>>8&255,o[2]=x0>>>16&255,o[3]=x0>>>24&255,o[4]=x1>>>0&255,o[5]=x1>>>8&255,o[6]=x1>>>16&255,o[7]=x1>>>24&255,o[8]=x2>>>0&255,o[9]=x2>>>8&255,o[10]=x2>>>16&255,o[11]=x2>>>24&255,o[12]=x3>>>0&255,o[13]=x3>>>8&255,o[14]=x3>>>16&255,o[15]=x3>>>24&255,o[16]=x4>>>0&255,o[17]=x4>>>8&255,o[18]=x4>>>16&255,o[19]=x4>>>24&255,o[20]=x5>>>0&255,o[21]=x5>>>8&255,o[22]=x5>>>16&255,o[23]=x5>>>24&255,o[24]=x6>>>0&255,o[25]=x6>>>8&255,o[26]=x6>>>16&255,o[27]=x6>>>24&255,o[28]=x7>>>0&255,o[29]=x7>>>8&255,o[30]=x7>>>16&255,o[31]=x7>>>24&255,o[32]=x8>>>0&255,o[33]=x8>>>8&255,o[34]=x8>>>16&255,o[35]=x8>>>24&255,o[36]=x9>>>0&255,o[37]=x9>>>8&255,o[38]=x9>>>16&255,o[39]=x9>>>24&255,o[40]=x10>>>0&255,o[41]=x10>>>8&255,o[42]=x10>>>16&255,o[43]=x10>>>24&255,o[44]=x11>>>0&255,o[45]=x11>>>8&255,o[46]=x11>>>16&255,o[47]=x11>>>24&255,o[48]=x12>>>0&255,o[49]=x12>>>8&255,o[50]=x12>>>16&255,o[51]=x12>>>24&255,o[52]=x13>>>0&255,o[53]=x13>>>8&255,o[54]=x13>>>16&255,o[55]=x13>>>24&255,o[56]=x14>>>0&255,o[57]=x14>>>8&255,o[58]=x14>>>16&255,o[59]=x14>>>24&255,o[60]=x15>>>0&255,o[61]=x15>>>8&255,o[62]=x15>>>16&255,o[63]=x15>>>24&255}function core_hsalsa20(o,p,k,c){for(var u,x0=255&c[0]|(255&c[1])<<8|(255&c[2])<<16|(255&c[3])<<24,x1=255&k[0]|(255&k[1])<<8|(255&k[2])<<16|(255&k[3])<<24,x2=255&k[4]|(255&k[5])<<8|(255&k[6])<<16|(255&k[7])<<24,x3=255&k[8]|(255&k[9])<<8|(255&k[10])<<16|(255&k[11])<<24,x4=255&k[12]|(255&k[13])<<8|(255&k[14])<<16|(255&k[15])<<24,x5=255&c[4]|(255&c[5])<<8|(255&c[6])<<16|(255&c[7])<<24,x6=255&p[0]|(255&p[1])<<8|(255&p[2])<<16|(255&p[3])<<24,x7=255&p[4]|(255&p[5])<<8|(255&p[6])<<16|(255&p[7])<<24,x8=255&p[8]|(255&p[9])<<8|(255&p[10])<<16|(255&p[11])<<24,x9=255&p[12]|(255&p[13])<<8|(255&p[14])<<16|(255&p[15])<<24,x10=255&c[8]|(255&c[9])<<8|(255&c[10])<<16|(255&c[11])<<24,x11=255&k[16]|(255&k[17])<<8|(255&k[18])<<16|(255&k[19])<<24,x12=255&k[20]|(255&k[21])<<8|(255&k[22])<<16|(255&k[23])<<24,x13=255&k[24]|(255&k[25])<<8|(255&k[26])<<16|(255&k[27])<<24,x14=255&k[28]|(255&k[29])<<8|(255&k[30])<<16|(255&k[31])<<24,x15=255&c[12]|(255&c[13])<<8|(255&c[14])<<16|(255&c[15])<<24,i=0;i<20;i+=2)x0^=(u=(x12^=(u=(x8^=(u=(x4^=(u=x0+x12|0)<<7|u>>>25)+x0|0)<<9|u>>>23)+x4|0)<<13|u>>>19)+x8|0)<<18|u>>>14,x5^=(u=(x1^=(u=(x13^=(u=(x9^=(u=x5+x1|0)<<7|u>>>25)+x5|0)<<9|u>>>23)+x9|0)<<13|u>>>19)+x13|0)<<18|u>>>14,x10^=(u=(x6^=(u=(x2^=(u=(x14^=(u=x10+x6|0)<<7|u>>>25)+x10|0)<<9|u>>>23)+x14|0)<<13|u>>>19)+x2|0)<<18|u>>>14,x15^=(u=(x11^=(u=(x7^=(u=(x3^=(u=x15+x11|0)<<7|u>>>25)+x15|0)<<9|u>>>23)+x3|0)<<13|u>>>19)+x7|0)<<18|u>>>14,x0^=(u=(x3^=(u=(x2^=(u=(x1^=(u=x0+x3|0)<<7|u>>>25)+x0|0)<<9|u>>>23)+x1|0)<<13|u>>>19)+x2|0)<<18|u>>>14,x5^=(u=(x4^=(u=(x7^=(u=(x6^=(u=x5+x4|0)<<7|u>>>25)+x5|0)<<9|u>>>23)+x6|0)<<13|u>>>19)+x7|0)<<18|u>>>14,x10^=(u=(x9^=(u=(x8^=(u=(x11^=(u=x10+x9|0)<<7|u>>>25)+x10|0)<<9|u>>>23)+x11|0)<<13|u>>>19)+x8|0)<<18|u>>>14,x15^=(u=(x14^=(u=(x13^=(u=(x12^=(u=x15+x14|0)<<7|u>>>25)+x15|0)<<9|u>>>23)+x12|0)<<13|u>>>19)+x13|0)<<18|u>>>14;o[0]=x0>>>0&255,o[1]=x0>>>8&255,o[2]=x0>>>16&255,o[3]=x0>>>24&255,o[4]=x5>>>0&255,o[5]=x5>>>8&255,o[6]=x5>>>16&255,o[7]=x5>>>24&255,o[8]=x10>>>0&255,o[9]=x10>>>8&255,o[10]=x10>>>16&255,o[11]=x10>>>24&255,o[12]=x15>>>0&255,o[13]=x15>>>8&255,o[14]=x15>>>16&255,o[15]=x15>>>24&255,o[16]=x6>>>0&255,o[17]=x6>>>8&255,o[18]=x6>>>16&255,o[19]=x6>>>24&255,o[20]=x7>>>0&255,o[21]=x7>>>8&255,o[22]=x7>>>16&255,o[23]=x7>>>24&255,o[24]=x8>>>0&255,o[25]=x8>>>8&255,o[26]=x8>>>16&255,o[27]=x8>>>24&255,o[28]=x9>>>0&255,o[29]=x9>>>8&255,o[30]=x9>>>16&255,o[31]=x9>>>24&255}function crypto_core_salsa20(out,inp,k,c){core_salsa20(out,inp,k,c)}function crypto_core_hsalsa20(out,inp,k,c){core_hsalsa20(out,inp,k,c)}function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k){var u,i,z=new Uint8Array(16),x=new Uint8Array(64);for(i=0;i<16;i++)z[i]=0;for(i=0;i<8;i++)z[i]=n[i];for(;b>=64;){for(crypto_core_salsa20(x,z,k,sigma),i=0;i<64;i++)c[cpos+i]=m[mpos+i]^x[i];for(u=1,i=8;i<16;i++)u=u+(255&z[i])|0,z[i]=255&u,u>>>=8;b-=64,cpos+=64,mpos+=64}if(b>0)for(crypto_core_salsa20(x,z,k,sigma),i=0;i<b;i++)c[cpos+i]=m[mpos+i]^x[i];return 0}function crypto_stream_salsa20(c,cpos,b,n,k){var u,i,z=new Uint8Array(16),x=new Uint8Array(64);for(i=0;i<16;i++)z[i]=0;for(i=0;i<8;i++)z[i]=n[i];for(;b>=64;){for(crypto_core_salsa20(x,z,k,sigma),i=0;i<64;i++)c[cpos+i]=x[i];for(u=1,i=8;i<16;i++)u=u+(255&z[i])|0,z[i]=255&u,u>>>=8;b-=64,cpos+=64}if(b>0)for(crypto_core_salsa20(x,z,k,sigma),i=0;i<b;i++)c[cpos+i]=x[i];return 0}function crypto_stream(c,cpos,d,n,k){var s=new Uint8Array(32);crypto_core_hsalsa20(s,n,k,sigma);for(var sn=new Uint8Array(8),i=0;i<8;i++)sn[i]=n[i+16];return crypto_stream_salsa20(c,cpos,d,sn,s)}function crypto_stream_xor(c,cpos,m,mpos,d,n,k){var s=new Uint8Array(32);crypto_core_hsalsa20(s,n,k,sigma);for(var sn=new Uint8Array(8),i=0;i<8;i++)sn[i]=n[i+16];return crypto_stream_salsa20_xor(c,cpos,m,mpos,d,sn,s)}function crypto_onetimeauth(out,outpos,m,mpos,n,k){var s=new poly1305(k);return s.update(m,mpos,n),s.finish(out,outpos),0}function crypto_onetimeauth_verify(h,hpos,m,mpos,n,k){var x=new Uint8Array(16);return crypto_onetimeauth(x,0,m,mpos,n,k),crypto_verify_16(h,hpos,x,0)}function crypto_secretbox(c,m,d,n,k){var i;if(d<32)return-1;for(crypto_stream_xor(c,0,m,0,d,n,k),crypto_onetimeauth(c,16,c,32,d-32,c),i=0;i<16;i++)c[i]=0;return 0}function crypto_secretbox_open(m,c,d,n,k){var i,x=new Uint8Array(32);if(d<32)return-1;if(crypto_stream(x,0,32,n,k),0!==crypto_onetimeauth_verify(c,16,c,32,d-32,x))return-1;for(crypto_stream_xor(m,0,c,0,d,n,k),i=0;i<32;i++)m[i]=0;return 0}function set25519(r,a){var i;for(i=0;i<16;i++)r[i]=0|a[i]}function car25519(o){var i,v,c=1;for(i=0;i<16;i++)v=o[i]+c+65535,c=Math.floor(v/65536),o[i]=v-65536*c;o[0]+=c-1+37*(c-1)}function sel25519(p,q,b){for(var t,c=~(b-1),i=0;i<16;i++)t=c&(p[i]^q[i]),p[i]^=t,q[i]^=t}function pack25519(o,n){var i,j,b,m=gf(),t=gf();for(i=0;i<16;i++)t[i]=n[i];for(car25519(t),car25519(t),car25519(t),j=0;j<2;j++){for(m[0]=t[0]-65517,i=1;i<15;i++)m[i]=t[i]-65535-(m[i-1]>>16&1),m[i-1]&=65535;m[15]=t[15]-32767-(m[14]>>16&1),b=m[15]>>16&1,m[14]&=65535,sel25519(t,m,1-b)}for(i=0;i<16;i++)o[2*i]=255&t[i],o[2*i+1]=t[i]>>8}function neq25519(a,b){var c=new Uint8Array(32),d=new Uint8Array(32);return pack25519(c,a),pack25519(d,b),crypto_verify_32(c,0,d,0)}function par25519(a){var d=new Uint8Array(32);return pack25519(d,a),1&d[0]}function unpack25519(o,n){var i;for(i=0;i<16;i++)o[i]=n[2*i]+(n[2*i+1]<<8);o[15]&=32767}function A(o,a,b){for(var i=0;i<16;i++)o[i]=a[i]+b[i]}function Z(o,a,b){for(var i=0;i<16;i++)o[i]=a[i]-b[i]}function M(o,a,b){var v,c,t0=0,t1=0,t2=0,t3=0,t4=0,t5=0,t6=0,t7=0,t8=0,t9=0,t10=0,t11=0,t12=0,t13=0,t14=0,t15=0,t16=0,t17=0,t18=0,t19=0,t20=0,t21=0,t22=0,t23=0,t24=0,t25=0,t26=0,t27=0,t28=0,t29=0,t30=0,b0=b[0],b1=b[1],b2=b[2],b3=b[3],b4=b[4],b5=b[5],b6=b[6],b7=b[7],b8=b[8],b9=b[9],b10=b[10],b11=b[11],b12=b[12],b13=b[13],b14=b[14],b15=b[15];t0+=(v=a[0])*b0,t1+=v*b1,t2+=v*b2,t3+=v*b3,t4+=v*b4,t5+=v*b5,t6+=v*b6,t7+=v*b7,t8+=v*b8,t9+=v*b9,t10+=v*b10,t11+=v*b11,t12+=v*b12,t13+=v*b13,t14+=v*b14,t15+=v*b15,t1+=(v=a[1])*b0,t2+=v*b1,t3+=v*b2,t4+=v*b3,t5+=v*b4,t6+=v*b5,t7+=v*b6,t8+=v*b7,t9+=v*b8,t10+=v*b9,t11+=v*b10,t12+=v*b11,t13+=v*b12,t14+=v*b13,t15+=v*b14,t16+=v*b15,t2+=(v=a[2])*b0,t3+=v*b1,t4+=v*b2,t5+=v*b3,t6+=v*b4,t7+=v*b5,t8+=v*b6,t9+=v*b7,t10+=v*b8,t11+=v*b9,t12+=v*b10,t13+=v*b11,t14+=v*b12,t15+=v*b13,t16+=v*b14,t17+=v*b15,t3+=(v=a[3])*b0,t4+=v*b1,t5+=v*b2,t6+=v*b3,t7+=v*b4,t8+=v*b5,t9+=v*b6,t10+=v*b7,t11+=v*b8,t12+=v*b9,t13+=v*b10,t14+=v*b11,t15+=v*b12,t16+=v*b13,t17+=v*b14,t18+=v*b15,t4+=(v=a[4])*b0,t5+=v*b1,t6+=v*b2,t7+=v*b3,t8+=v*b4,t9+=v*b5,t10+=v*b6,t11+=v*b7,t12+=v*b8,t13+=v*b9,t14+=v*b10,t15+=v*b11,t16+=v*b12,t17+=v*b13,t18+=v*b14,t19+=v*b15,t5+=(v=a[5])*b0,t6+=v*b1,t7+=v*b2,t8+=v*b3,t9+=v*b4,t10+=v*b5,t11+=v*b6,t12+=v*b7,t13+=v*b8,t14+=v*b9,t15+=v*b10,t16+=v*b11,t17+=v*b12,t18+=v*b13,t19+=v*b14,t20+=v*b15,t6+=(v=a[6])*b0,t7+=v*b1,t8+=v*b2,t9+=v*b3,t10+=v*b4,t11+=v*b5,t12+=v*b6,t13+=v*b7,t14+=v*b8,t15+=v*b9,t16+=v*b10,t17+=v*b11,t18+=v*b12,t19+=v*b13,t20+=v*b14,t21+=v*b15,t7+=(v=a[7])*b0,t8+=v*b1,t9+=v*b2,t10+=v*b3,t11+=v*b4,t12+=v*b5,t13+=v*b6,t14+=v*b7,t15+=v*b8,t16+=v*b9,t17+=v*b10,t18+=v*b11,t19+=v*b12,t20+=v*b13,t21+=v*b14,t22+=v*b15,t8+=(v=a[8])*b0,t9+=v*b1,t10+=v*b2,t11+=v*b3,t12+=v*b4,t13+=v*b5,t14+=v*b6,t15+=v*b7,t16+=v*b8,t17+=v*b9,t18+=v*b10,t19+=v*b11,t20+=v*b12,t21+=v*b13,t22+=v*b14,t23+=v*b15,t9+=(v=a[9])*b0,t10+=v*b1,t11+=v*b2,t12+=v*b3,t13+=v*b4,t14+=v*b5,t15+=v*b6,t16+=v*b7,t17+=v*b8,t18+=v*b9,t19+=v*b10,t20+=v*b11,t21+=v*b12,t22+=v*b13,t23+=v*b14,t24+=v*b15,t10+=(v=a[10])*b0,t11+=v*b1,t12+=v*b2,t13+=v*b3,t14+=v*b4,t15+=v*b5,t16+=v*b6,t17+=v*b7,t18+=v*b8,t19+=v*b9,t20+=v*b10,t21+=v*b11,t22+=v*b12,t23+=v*b13,t24+=v*b14,t25+=v*b15,t11+=(v=a[11])*b0,t12+=v*b1,t13+=v*b2,t14+=v*b3,t15+=v*b4,t16+=v*b5,t17+=v*b6,t18+=v*b7,t19+=v*b8,t20+=v*b9,t21+=v*b10,t22+=v*b11,t23+=v*b12,t24+=v*b13,t25+=v*b14,t26+=v*b15,t12+=(v=a[12])*b0,t13+=v*b1,t14+=v*b2,t15+=v*b3,t16+=v*b4,t17+=v*b5,t18+=v*b6,t19+=v*b7,t20+=v*b8,t21+=v*b9,t22+=v*b10,t23+=v*b11,t24+=v*b12,t25+=v*b13,t26+=v*b14,t27+=v*b15,t13+=(v=a[13])*b0,t14+=v*b1,t15+=v*b2,t16+=v*b3,t17+=v*b4,t18+=v*b5,t19+=v*b6,t20+=v*b7,t21+=v*b8,t22+=v*b9,t23+=v*b10,t24+=v*b11,t25+=v*b12,t26+=v*b13,t27+=v*b14,t28+=v*b15,t14+=(v=a[14])*b0,t15+=v*b1,t16+=v*b2,t17+=v*b3,t18+=v*b4,t19+=v*b5,t20+=v*b6,t21+=v*b7,t22+=v*b8,t23+=v*b9,t24+=v*b10,t25+=v*b11,t26+=v*b12,t27+=v*b13,t28+=v*b14,t29+=v*b15,t15+=(v=a[15])*b0,t1+=38*(t17+=v*b2),t2+=38*(t18+=v*b3),t3+=38*(t19+=v*b4),t4+=38*(t20+=v*b5),t5+=38*(t21+=v*b6),t6+=38*(t22+=v*b7),t7+=38*(t23+=v*b8),t8+=38*(t24+=v*b9),t9+=38*(t25+=v*b10),t10+=38*(t26+=v*b11),t11+=38*(t27+=v*b12),t12+=38*(t28+=v*b13),t13+=38*(t29+=v*b14),t14+=38*(t30+=v*b15),t0=(v=(t0+=38*(t16+=v*b1))+(c=1)+65535)-65536*(c=Math.floor(v/65536)),t1=(v=t1+c+65535)-65536*(c=Math.floor(v/65536)),t2=(v=t2+c+65535)-65536*(c=Math.floor(v/65536)),t3=(v=t3+c+65535)-65536*(c=Math.floor(v/65536)),t4=(v=t4+c+65535)-65536*(c=Math.floor(v/65536)),t5=(v=t5+c+65535)-65536*(c=Math.floor(v/65536)),t6=(v=t6+c+65535)-65536*(c=Math.floor(v/65536)),t7=(v=t7+c+65535)-65536*(c=Math.floor(v/65536)),t8=(v=t8+c+65535)-65536*(c=Math.floor(v/65536)),t9=(v=t9+c+65535)-65536*(c=Math.floor(v/65536)),t10=(v=t10+c+65535)-65536*(c=Math.floor(v/65536)),t11=(v=t11+c+65535)-65536*(c=Math.floor(v/65536)),t12=(v=t12+c+65535)-65536*(c=Math.floor(v/65536)),t13=(v=t13+c+65535)-65536*(c=Math.floor(v/65536)),t14=(v=t14+c+65535)-65536*(c=Math.floor(v/65536)),t15=(v=t15+c+65535)-65536*(c=Math.floor(v/65536)),t0=(v=(t0+=c-1+37*(c-1))+(c=1)+65535)-65536*(c=Math.floor(v/65536)),t1=(v=t1+c+65535)-65536*(c=Math.floor(v/65536)),t2=(v=t2+c+65535)-65536*(c=Math.floor(v/65536)),t3=(v=t3+c+65535)-65536*(c=Math.floor(v/65536)),t4=(v=t4+c+65535)-65536*(c=Math.floor(v/65536)),t5=(v=t5+c+65535)-65536*(c=Math.floor(v/65536)),t6=(v=t6+c+65535)-65536*(c=Math.floor(v/65536)),t7=(v=t7+c+65535)-65536*(c=Math.floor(v/65536)),t8=(v=t8+c+65535)-65536*(c=Math.floor(v/65536)),t9=(v=t9+c+65535)-65536*(c=Math.floor(v/65536)),t10=(v=t10+c+65535)-65536*(c=Math.floor(v/65536)),t11=(v=t11+c+65535)-65536*(c=Math.floor(v/65536)),t12=(v=t12+c+65535)-65536*(c=Math.floor(v/65536)),t13=(v=t13+c+65535)-65536*(c=Math.floor(v/65536)),t14=(v=t14+c+65535)-65536*(c=Math.floor(v/65536)),t15=(v=t15+c+65535)-65536*(c=Math.floor(v/65536)),t0+=c-1+37*(c-1),o[0]=t0,o[1]=t1,o[2]=t2,o[3]=t3,o[4]=t4,o[5]=t5,o[6]=t6,o[7]=t7,o[8]=t8,o[9]=t9,o[10]=t10,o[11]=t11,o[12]=t12,o[13]=t13,o[14]=t14,o[15]=t15}function S(o,a){M(o,a,a)}function inv25519(o,i){var a,c=gf();for(a=0;a<16;a++)c[a]=i[a];for(a=253;a>=0;a--)S(c,c),2!==a&&4!==a&&M(c,c,i);for(a=0;a<16;a++)o[a]=c[a]}function pow2523(o,i){var a,c=gf();for(a=0;a<16;a++)c[a]=i[a];for(a=250;a>=0;a--)S(c,c),1!==a&&M(c,c,i);for(a=0;a<16;a++)o[a]=c[a]}function crypto_scalarmult(q,n,p){var r,i,z=new Uint8Array(32),x=new Float64Array(80),a=gf(),b=gf(),c=gf(),d=gf(),e=gf(),f=gf();for(i=0;i<31;i++)z[i]=n[i];for(z[31]=127&n[31]|64,z[0]&=248,unpack25519(x,p),i=0;i<16;i++)b[i]=x[i],d[i]=a[i]=c[i]=0;for(a[0]=d[0]=1,i=254;i>=0;--i)sel25519(a,b,r=z[i>>>3]>>>(7&i)&1),sel25519(c,d,r),A(e,a,c),Z(a,a,c),A(c,b,d),Z(b,b,d),S(d,e),S(f,a),M(a,c,a),M(c,b,e),A(e,a,c),Z(a,a,c),S(b,a),Z(c,d,f),M(a,c,_121665),A(a,a,d),M(c,c,a),M(a,d,f),M(d,b,x),S(b,e),sel25519(a,b,r),sel25519(c,d,r);for(i=0;i<16;i++)x[i+16]=a[i],x[i+32]=c[i],x[i+48]=b[i],x[i+64]=d[i];var x32=x.subarray(32),x16=x.subarray(16);return inv25519(x32,x32),M(x16,x16,x32),pack25519(q,x16),0}function crypto_scalarmult_base(q,n){return crypto_scalarmult(q,n,_9)}function crypto_box_keypair(y,x){return randombytes(x,32),crypto_scalarmult_base(y,x)}function crypto_box_beforenm(k,y,x){var s=new Uint8Array(32);return crypto_scalarmult(s,x,y),crypto_core_hsalsa20(k,_0,s,sigma)}function crypto_hashblocks_hl(hh,hl,m,n){for(var bh0,bh1,bh2,bh3,bh4,bh5,bh6,bh7,bl0,bl1,bl2,bl3,bl4,bl5,bl6,bl7,th,tl,i,j,h,l,a,b,c,d,wh=new Int32Array(16),wl=new Int32Array(16),ah0=hh[0],ah1=hh[1],ah2=hh[2],ah3=hh[3],ah4=hh[4],ah5=hh[5],ah6=hh[6],ah7=hh[7],al0=hl[0],al1=hl[1],al2=hl[2],al3=hl[3],al4=hl[4],al5=hl[5],al6=hl[6],al7=hl[7],pos=0;n>=128;){for(i=0;i<16;i++)j=8*i+pos,wh[i]=m[j+0]<<24|m[j+1]<<16|m[j+2]<<8|m[j+3],wl[i]=m[j+4]<<24|m[j+5]<<16|m[j+6]<<8|m[j+7];for(i=0;i<80;i++)if(bh0=ah0,bh1=ah1,bh2=ah2,bh3=ah3,bh4=ah4,bh5=ah5,bh6=ah6,bh7=ah7,bl0=al0,bl1=al1,bl2=al2,bl3=al3,bl4=al4,bl5=al5,bl6=al6,bl7=al7,h=ah7,l=al7,a=65535&l,b=l>>>16,c=65535&h,d=h>>>16,h=(ah4>>>14|al4<<18)^(ah4>>>18|al4<<14)^(al4>>>9|ah4<<23),l=(al4>>>14|ah4<<18)^(al4>>>18|ah4<<14)^(ah4>>>9|al4<<23),a+=65535&l,b+=l>>>16,c+=65535&h,d+=h>>>16,h=ah4&ah5^~ah4&ah6,l=al4&al5^~al4&al6,a+=65535&l,b+=l>>>16,c+=65535&h,d+=h>>>16,h=K[2*i],l=K[2*i+1],a+=65535&l,b+=l>>>16,c+=65535&h,d+=h>>>16,h=wh[i%16],l=wl[i%16],a+=65535&l,b+=l>>>16,c+=65535&h,d+=h>>>16,b+=a>>>16,c+=b>>>16,d+=c>>>16,th=65535&c|d<<16,tl=65535&a|b<<16,h=th,l=tl,a=65535&l,b=l>>>16,c=65535&h,d=h>>>16,h=(ah0>>>28|al0<<4)^(al0>>>2|ah0<<30)^(al0>>>7|ah0<<25),l=(al0>>>28|ah0<<4)^(ah0>>>2|al0<<30)^(ah0>>>7|al0<<25),a+=65535&l,b+=l>>>16,c+=65535&h,d+=h>>>16,h=ah0&ah1^ah0&ah2^ah1&ah2,l=al0&al1^al0&al2^al1&al2,a+=65535&l,b+=l>>>16,c+=65535&h,d+=h>>>16,b+=a>>>16,c+=b>>>16,d+=c>>>16,bh7=65535&c|d<<16,bl7=65535&a|b<<16,h=bh3,l=bl3,a=65535&l,b=l>>>16,c=65535&h,d=h>>>16,h=th,l=tl,a+=65535&l,b+=l>>>16,c+=65535&h,d+=h>>>16,b+=a>>>16,c+=b>>>16,d+=c>>>16,bh3=65535&c|d<<16,bl3=65535&a|b<<16,ah1=bh0,ah2=bh1,ah3=bh2,ah4=bh3,ah5=bh4,ah6=bh5,ah7=bh6,ah0=bh7,al1=bl0,al2=bl1,al3=bl2,al4=bl3,al5=bl4,al6=bl5,al7=bl6,al0=bl7,i%16==15)for(j=0;j<16;j++)h=wh[j],a=65535&(l=wl[j]),b=l>>>16,c=65535&h,d=h>>>16,h=wh[(j+9)%16],a+=65535&(l=wl[(j+9)%16]),b+=l>>>16,c+=65535&h,d+=h>>>16,th=wh[(j+1)%16],a+=65535&(l=((tl=wl[(j+1)%16])>>>1|th<<31)^(tl>>>8|th<<24)^(tl>>>7|th<<25)),b+=l>>>16,c+=65535&(h=(th>>>1|tl<<31)^(th>>>8|tl<<24)^th>>>7),d+=h>>>16,th=wh[(j+14)%16],b+=(l=((tl=wl[(j+14)%16])>>>19|th<<13)^(th>>>29|tl<<3)^(tl>>>6|th<<26))>>>16,c+=65535&(h=(th>>>19|tl<<13)^(tl>>>29|th<<3)^th>>>6),d+=h>>>16,d+=(c+=(b+=(a+=65535&l)>>>16)>>>16)>>>16,wh[j]=65535&c|d<<16,wl[j]=65535&a|b<<16;a=65535&(l=al0),b=l>>>16,c=65535&(h=ah0),d=h>>>16,h=hh[0],b+=(l=hl[0])>>>16,c+=65535&h,d+=h>>>16,d+=(c+=(b+=(a+=65535&l)>>>16)>>>16)>>>16,hh[0]=ah0=65535&c|d<<16,hl[0]=al0=65535&a|b<<16,a=65535&(l=al1),b=l>>>16,c=65535&(h=ah1),d=h>>>16,h=hh[1],b+=(l=hl[1])>>>16,c+=65535&h,d+=h>>>16,d+=(c+=(b+=(a+=65535&l)>>>16)>>>16)>>>16,hh[1]=ah1=65535&c|d<<16,hl[1]=al1=65535&a|b<<16,a=65535&(l=al2),b=l>>>16,c=65535&(h=ah2),d=h>>>16,h=hh[2],b+=(l=hl[2])>>>16,c+=65535&h,d+=h>>>16,d+=(c+=(b+=(a+=65535&l)>>>16)>>>16)>>>16,hh[2]=ah2=65535&c|d<<16,hl[2]=al2=65535&a|b<<16,a=65535&(l=al3),b=l>>>16,c=65535&(h=ah3),d=h>>>16,h=hh[3],b+=(l=hl[3])>>>16,c+=65535&h,d+=h>>>16,d+=(c+=(b+=(a+=65535&l)>>>16)>>>16)>>>16,hh[3]=ah3=65535&c|d<<16,hl[3]=al3=65535&a|b<<16,a=65535&(l=al4),b=l>>>16,c=65535&(h=ah4),d=h>>>16,h=hh[4],b+=(l=hl[4])>>>16,c+=65535&h,d+=h>>>16,d+=(c+=(b+=(a+=65535&l)>>>16)>>>16)>>>16,hh[4]=ah4=65535&c|d<<16,hl[4]=al4=65535&a|b<<16,a=65535&(l=al5),b=l>>>16,c=65535&(h=ah5),d=h>>>16,h=hh[5],b+=(l=hl[5])>>>16,c+=65535&h,d+=h>>>16,d+=(c+=(b+=(a+=65535&l)>>>16)>>>16)>>>16,hh[5]=ah5=65535&c|d<<16,hl[5]=al5=65535&a|b<<16,a=65535&(l=al6),b=l>>>16,c=65535&(h=ah6),d=h>>>16,h=hh[6],b+=(l=hl[6])>>>16,c+=65535&h,d+=h>>>16,d+=(c+=(b+=(a+=65535&l)>>>16)>>>16)>>>16,hh[6]=ah6=65535&c|d<<16,hl[6]=al6=65535&a|b<<16,a=65535&(l=al7),b=l>>>16,c=65535&(h=ah7),d=h>>>16,h=hh[7],b+=(l=hl[7])>>>16,c+=65535&h,d+=h>>>16,d+=(c+=(b+=(a+=65535&l)>>>16)>>>16)>>>16,hh[7]=ah7=65535&c|d<<16,hl[7]=al7=65535&a|b<<16,pos+=128,n-=128}return n}function crypto_hash(out,m,n){var i,hh=new Int32Array(8),hl=new Int32Array(8),x=new Uint8Array(256),b=n;for(hh[0]=1779033703,hh[1]=3144134277,hh[2]=1013904242,hh[3]=2773480762,hh[4]=1359893119,hh[5]=2600822924,hh[6]=528734635,hh[7]=1541459225,hl[0]=4089235720,hl[1]=2227873595,hl[2]=4271175723,hl[3]=1595750129,hl[4]=2917565137,hl[5]=725511199,hl[6]=4215389547,hl[7]=327033209,crypto_hashblocks_hl(hh,hl,m,n),n%=128,i=0;i<n;i++)x[i]=m[b-n+i];for(x[n]=128,x[(n=256-128*(n<112?1:0))-9]=0,ts64(x,n-8,b/536870912|0,b<<3),crypto_hashblocks_hl(hh,hl,x,n),i=0;i<8;i++)ts64(out,8*i,hh[i],hl[i]);return 0}function add(p,q){var a=gf(),b=gf(),c=gf(),d=gf(),e=gf(),f=gf(),g=gf(),h=gf(),t=gf();Z(a,p[1],p[0]),Z(t,q[1],q[0]),M(a,a,t),A(b,p[0],p[1]),A(t,q[0],q[1]),M(b,b,t),M(c,p[3],q[3]),M(c,c,D2),M(d,p[2],q[2]),A(d,d,d),Z(e,b,a),Z(f,d,c),A(g,d,c),A(h,b,a),M(p[0],e,f),M(p[1],h,g),M(p[2],g,f),M(p[3],e,h)}function cswap(p,q,b){var i;for(i=0;i<4;i++)sel25519(p[i],q[i],b)}function pack(r,p){var tx=gf(),ty=gf(),zi=gf();inv25519(zi,p[2]),M(tx,p[0],zi),M(ty,p[1],zi),pack25519(r,ty),r[31]^=par25519(tx)<<7}function scalarmult(p,q,s){var b,i;for(set25519(p[0],gf0),set25519(p[1],gf1),set25519(p[2],gf1),set25519(p[3],gf0),i=255;i>=0;--i)cswap(p,q,b=s[i/8|0]>>(7&i)&1),add(q,p),add(p,p),cswap(p,q,b)}function scalarbase(p,s){var q=[gf(),gf(),gf(),gf()];set25519(q[0],X),set25519(q[1],Y),set25519(q[2],gf1),M(q[3],X,Y),scalarmult(p,q,s)}function crypto_sign_keypair(pk,sk,seeded){var i,d=new Uint8Array(64),p=[gf(),gf(),gf(),gf()];for(seeded||randombytes(sk,32),crypto_hash(d,sk,32),d[0]&=248,d[31]&=127,d[31]|=64,scalarbase(p,d),pack(pk,p),i=0;i<32;i++)sk[i+32]=pk[i];return 0}function modL(r,x){var carry,i,j,k;for(i=63;i>=32;--i){for(carry=0,j=i-32,k=i-12;j<k;++j)x[j]+=carry-16*x[i]*L[j-(i-32)],carry=x[j]+128>>8,x[j]-=256*carry;x[j]+=carry,x[i]=0}for(carry=0,j=0;j<32;j++)x[j]+=carry-(x[31]>>4)*L[j],carry=x[j]>>8,x[j]&=255;for(j=0;j<32;j++)x[j]-=carry*L[j];for(i=0;i<32;i++)x[i+1]+=x[i]>>8,r[i]=255&x[i]}function reduce(r){var i,x=new Float64Array(64);for(i=0;i<64;i++)x[i]=r[i];for(i=0;i<64;i++)r[i]=0;modL(r,x)}function crypto_sign(sm,m,n,sk){var i,j,d=new Uint8Array(64),h=new Uint8Array(64),r=new Uint8Array(64),x=new Float64Array(64),p=[gf(),gf(),gf(),gf()];crypto_hash(d,sk,32),d[0]&=248,d[31]&=127,d[31]|=64;var smlen=n+64;for(i=0;i<n;i++)sm[64+i]=m[i];for(i=0;i<32;i++)sm[32+i]=d[32+i];for(crypto_hash(r,sm.subarray(32),n+32),reduce(r),scalarbase(p,r),pack(sm,p),i=32;i<64;i++)sm[i]=sk[i];for(crypto_hash(h,sm,n+64),reduce(h),i=0;i<64;i++)x[i]=0;for(i=0;i<32;i++)x[i]=r[i];for(i=0;i<32;i++)for(j=0;j<32;j++)x[i+j]+=h[i]*d[j];return modL(sm.subarray(32),x),smlen}function unpackneg(r,p){var t=gf(),chk=gf(),num=gf(),den=gf(),den2=gf(),den4=gf(),den6=gf();return set25519(r[2],gf1),unpack25519(r[1],p),S(num,r[1]),M(den,num,D),Z(num,num,r[2]),A(den,r[2],den),S(den2,den),S(den4,den2),M(den6,den4,den2),M(t,den6,num),M(t,t,den),pow2523(t,t),M(t,t,num),M(t,t,den),M(t,t,den),M(r[0],t,den),S(chk,r[0]),M(chk,chk,den),neq25519(chk,num)&&M(r[0],r[0],I),S(chk,r[0]),M(chk,chk,den),neq25519(chk,num)?-1:(par25519(r[0])===p[31]>>7&&Z(r[0],gf0,r[0]),M(r[3],r[0],r[1]),0)}function crypto_sign_open(m,sm,n,pk){var i,t=new Uint8Array(32),h=new Uint8Array(64),p=[gf(),gf(),gf(),gf()],q=[gf(),gf(),gf(),gf()];if(-1,n<64)return-1;if(unpackneg(q,pk))return-1;for(i=0;i<n;i++)m[i]=sm[i];for(i=0;i<32;i++)m[i+32]=pk[i];if(crypto_hash(h,m,n),reduce(h),scalarmult(p,q,h),scalarbase(q,sm.subarray(32)),add(p,q),pack(t,p),n-=64,crypto_verify_32(sm,0,t,0)){for(i=0;i<n;i++)m[i]=0;return-1}for(i=0;i<n;i++)m[i]=sm[i+64];return n}function checkLengths(k,n){if(k.length!==crypto_secretbox_KEYBYTES)throw new Error("bad key size");if(n.length!==crypto_secretbox_NONCEBYTES)throw new Error("bad nonce size")}function checkBoxLengths(pk,sk){if(pk.length!==crypto_box_PUBLICKEYBYTES)throw new Error("bad public key size");if(sk.length!==crypto_box_SECRETKEYBYTES)throw new Error("bad secret key size")}function checkArrayTypes(){for(var i=0;i<arguments.length;i++)if(!(arguments[i]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function cleanup(arr){for(var i=0;i<arr.length;i++)arr[i]=0}var gf=function(init){var i,r=new Float64Array(16);if(init)for(i=0;i<init.length;i++)r[i]=init[i];return r},randombytes=function(){throw new Error("no PRNG")},_0=new Uint8Array(16),_9=new Uint8Array(32);_9[0]=9;var gf0=gf(),gf1=gf([1]),_121665=gf([56129,1]),D=gf([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),D2=gf([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),X=gf([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),Y=gf([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),I=gf([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]),sigma=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]),poly1305=function(key){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var t0,t1,t2,t3,t4,t5,t6,t7;t0=255&key[0]|(255&key[1])<<8,this.r[0]=8191&t0,t1=255&key[2]|(255&key[3])<<8,this.r[1]=8191&(t0>>>13|t1<<3),t2=255&key[4]|(255&key[5])<<8,this.r[2]=7939&(t1>>>10|t2<<6),t3=255&key[6]|(255&key[7])<<8,this.r[3]=8191&(t2>>>7|t3<<9),t4=255&key[8]|(255&key[9])<<8,this.r[4]=255&(t3>>>4|t4<<12),this.r[5]=t4>>>1&8190,t5=255&key[10]|(255&key[11])<<8,this.r[6]=8191&(t4>>>14|t5<<2),t6=255&key[12]|(255&key[13])<<8,this.r[7]=8065&(t5>>>11|t6<<5),t7=255&key[14]|(255&key[15])<<8,this.r[8]=8191&(t6>>>8|t7<<8),this.r[9]=t7>>>5&127,this.pad[0]=255&key[16]|(255&key[17])<<8,this.pad[1]=255&key[18]|(255&key[19])<<8,this.pad[2]=255&key[20]|(255&key[21])<<8,this.pad[3]=255&key[22]|(255&key[23])<<8,this.pad[4]=255&key[24]|(255&key[25])<<8,this.pad[5]=255&key[26]|(255&key[27])<<8,this.pad[6]=255&key[28]|(255&key[29])<<8,this.pad[7]=255&key[30]|(255&key[31])<<8};poly1305.prototype.blocks=function(m,mpos,bytes){for(var t0,t1,t2,t3,t4,t5,t6,t7,c,d0,d1,d2,d3,d4,d5,d6,d7,d8,d9,hibit=this.fin?0:2048,h0=this.h[0],h1=this.h[1],h2=this.h[2],h3=this.h[3],h4=this.h[4],h5=this.h[5],h6=this.h[6],h7=this.h[7],h8=this.h[8],h9=this.h[9],r0=this.r[0],r1=this.r[1],r2=this.r[2],r3=this.r[3],r4=this.r[4],r5=this.r[5],r6=this.r[6],r7=this.r[7],r8=this.r[8],r9=this.r[9];bytes>=16;)d0=c=0,d0+=(h0+=8191&(t0=255&m[mpos+0]|(255&m[mpos+1])<<8))*r0,d0+=(h1+=8191&(t0>>>13|(t1=255&m[mpos+2]|(255&m[mpos+3])<<8)<<3))*(5*r9),d0+=(h2+=8191&(t1>>>10|(t2=255&m[mpos+4]|(255&m[mpos+5])<<8)<<6))*(5*r8),d0+=(h3+=8191&(t2>>>7|(t3=255&m[mpos+6]|(255&m[mpos+7])<<8)<<9))*(5*r7),c=(d0+=(h4+=8191&(t3>>>4|(t4=255&m[mpos+8]|(255&m[mpos+9])<<8)<<12))*(5*r6))>>>13,d0&=8191,d0+=(h5+=t4>>>1&8191)*(5*r5),d0+=(h6+=8191&(t4>>>14|(t5=255&m[mpos+10]|(255&m[mpos+11])<<8)<<2))*(5*r4),d0+=(h7+=8191&(t5>>>11|(t6=255&m[mpos+12]|(255&m[mpos+13])<<8)<<5))*(5*r3),d0+=(h8+=8191&(t6>>>8|(t7=255&m[mpos+14]|(255&m[mpos+15])<<8)<<8))*(5*r2),d1=c+=(d0+=(h9+=t7>>>5|hibit)*(5*r1))>>>13,d1+=h0*r1,d1+=h1*r0,d1+=h2*(5*r9),d1+=h3*(5*r8),c=(d1+=h4*(5*r7))>>>13,d1&=8191,d1+=h5*(5*r6),d1+=h6*(5*r5),d1+=h7*(5*r4),d1+=h8*(5*r3),c+=(d1+=h9*(5*r2))>>>13,d1&=8191,d2=c,d2+=h0*r2,d2+=h1*r1,d2+=h2*r0,d2+=h3*(5*r9),c=(d2+=h4*(5*r8))>>>13,d2&=8191,d2+=h5*(5*r7),d2+=h6*(5*r6),d2+=h7*(5*r5),d2+=h8*(5*r4),d3=c+=(d2+=h9*(5*r3))>>>13,d3+=h0*r3,d3+=h1*r2,d3+=h2*r1,d3+=h3*r0,c=(d3+=h4*(5*r9))>>>13,d3&=8191,d3+=h5*(5*r8),d3+=h6*(5*r7),d3+=h7*(5*r6),d3+=h8*(5*r5),d4=c+=(d3+=h9*(5*r4))>>>13,d4+=h0*r4,d4+=h1*r3,d4+=h2*r2,d4+=h3*r1,c=(d4+=h4*r0)>>>13,d4&=8191,d4+=h5*(5*r9),d4+=h6*(5*r8),d4+=h7*(5*r7),d4+=h8*(5*r6),d5=c+=(d4+=h9*(5*r5))>>>13,d5+=h0*r5,d5+=h1*r4,d5+=h2*r3,d5+=h3*r2,c=(d5+=h4*r1)>>>13,d5&=8191,d5+=h5*r0,d5+=h6*(5*r9),d5+=h7*(5*r8),d5+=h8*(5*r7),d6=c+=(d5+=h9*(5*r6))>>>13,d6+=h0*r6,d6+=h1*r5,d6+=h2*r4,d6+=h3*r3,c=(d6+=h4*r2)>>>13,d6&=8191,d6+=h5*r1,d6+=h6*r0,d6+=h7*(5*r9),d6+=h8*(5*r8),d7=c+=(d6+=h9*(5*r7))>>>13,d7+=h0*r7,d7+=h1*r6,d7+=h2*r5,d7+=h3*r4,c=(d7+=h4*r3)>>>13,d7&=8191,d7+=h5*r2,d7+=h6*r1,d7+=h7*r0,d7+=h8*(5*r9),d8=c+=(d7+=h9*(5*r8))>>>13,d8+=h0*r8,d8+=h1*r7,d8+=h2*r6,d8+=h3*r5,c=(d8+=h4*r4)>>>13,d8&=8191,d8+=h5*r3,d8+=h6*r2,d8+=h7*r1,d8+=h8*r0,d9=c+=(d8+=h9*(5*r9))>>>13,d9+=h0*r9,d9+=h1*r8,d9+=h2*r7,d9+=h3*r6,c=(d9+=h4*r5)>>>13,d9&=8191,d9+=h5*r4,d9+=h6*r3,d9+=h7*r2,d9+=h8*r1,h0=d0=8191&(c=(c=((c+=(d9+=h9*r0)>>>13)<<2)+c|0)+(d0&=8191)|0),h1=d1+=c>>>=13,h2=d2&=8191,h3=d3&=8191,h4=d4&=8191,h5=d5&=8191,h6=d6&=8191,h7=d7&=8191,h8=d8&=8191,h9=d9&=8191,mpos+=16,bytes-=16;this.h[0]=h0,this.h[1]=h1,this.h[2]=h2,this.h[3]=h3,this.h[4]=h4,this.h[5]=h5,this.h[6]=h6,this.h[7]=h7,this.h[8]=h8,this.h[9]=h9},poly1305.prototype.finish=function(mac,macpos){var c,mask,f,i,g=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(c=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=c,c=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*c,c=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=c,c=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=c,g[0]=this.h[0]+5,c=g[0]>>>13,g[0]&=8191,i=1;i<10;i++)g[i]=this.h[i]+c,c=g[i]>>>13,g[i]&=8191;for(g[9]-=8192,mask=(1^c)-1,i=0;i<10;i++)g[i]&=mask;for(mask=~mask,i=0;i<10;i++)this.h[i]=this.h[i]&mask|g[i];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),f=this.h[0]+this.pad[0],this.h[0]=65535&f,i=1;i<8;i++)f=(this.h[i]+this.pad[i]|0)+(f>>>16)|0,this.h[i]=65535&f;mac[macpos+0]=this.h[0]>>>0&255,mac[macpos+1]=this.h[0]>>>8&255,mac[macpos+2]=this.h[1]>>>0&255,mac[macpos+3]=this.h[1]>>>8&255,mac[macpos+4]=this.h[2]>>>0&255,mac[macpos+5]=this.h[2]>>>8&255,mac[macpos+6]=this.h[3]>>>0&255,mac[macpos+7]=this.h[3]>>>8&255,mac[macpos+8]=this.h[4]>>>0&255,mac[macpos+9]=this.h[4]>>>8&255,mac[macpos+10]=this.h[5]>>>0&255,mac[macpos+11]=this.h[5]>>>8&255,mac[macpos+12]=this.h[6]>>>0&255,mac[macpos+13]=this.h[6]>>>8&255,mac[macpos+14]=this.h[7]>>>0&255,mac[macpos+15]=this.h[7]>>>8&255},poly1305.prototype.update=function(m,mpos,bytes){var i,want;if(this.leftover){for((want=16-this.leftover)>bytes&&(want=bytes),i=0;i<want;i++)this.buffer[this.leftover+i]=m[mpos+i];if(bytes-=want,mpos+=want,this.leftover+=want,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(bytes>=16&&(want=bytes-bytes%16,this.blocks(m,mpos,want),mpos+=want,bytes-=want),bytes){for(i=0;i<bytes;i++)this.buffer[this.leftover+i]=m[mpos+i];this.leftover+=bytes}};var crypto_box_afternm=crypto_secretbox,crypto_box_open_afternm=crypto_secretbox_open,K=[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],L=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]),crypto_secretbox_KEYBYTES=32,crypto_secretbox_NONCEBYTES=24,crypto_box_PUBLICKEYBYTES=32,crypto_box_SECRETKEYBYTES=32,crypto_box_NONCEBYTES=crypto_secretbox_NONCEBYTES;nacl.lowlevel={crypto_core_hsalsa20:crypto_core_hsalsa20,crypto_stream_xor:crypto_stream_xor,crypto_stream:crypto_stream,crypto_stream_salsa20_xor:crypto_stream_salsa20_xor,crypto_stream_salsa20:crypto_stream_salsa20,crypto_onetimeauth:crypto_onetimeauth,crypto_onetimeauth_verify:crypto_onetimeauth_verify,crypto_verify_16:crypto_verify_16,crypto_verify_32:crypto_verify_32,crypto_secretbox:crypto_secretbox,crypto_secretbox_open:crypto_secretbox_open,crypto_scalarmult:crypto_scalarmult,crypto_scalarmult_base:crypto_scalarmult_base,crypto_box_beforenm:crypto_box_beforenm,crypto_box_afternm:crypto_box_afternm,crypto_box:function(c,m,d,n,y,x){var k=new Uint8Array(32);return crypto_box_beforenm(k,y,x),crypto_box_afternm(c,m,d,n,k)},crypto_box_open:function(m,c,d,n,y,x){var k=new Uint8Array(32);return crypto_box_beforenm(k,y,x),crypto_box_open_afternm(m,c,d,n,k)},crypto_box_keypair:crypto_box_keypair,crypto_hash:crypto_hash,crypto_sign:crypto_sign,crypto_sign_keypair:crypto_sign_keypair,crypto_sign_open:crypto_sign_open,crypto_secretbox_KEYBYTES:crypto_secretbox_KEYBYTES,crypto_secretbox_NONCEBYTES:crypto_secretbox_NONCEBYTES,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:crypto_box_PUBLICKEYBYTES,crypto_box_SECRETKEYBYTES:crypto_box_SECRETKEYBYTES,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:crypto_box_NONCEBYTES,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:64,crypto_sign_PUBLICKEYBYTES:32,crypto_sign_SECRETKEYBYTES:64,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64},nacl.randomBytes=function(n){var b=new Uint8Array(n);return randombytes(b,n),b},nacl.secretbox=function(msg,nonce,key){checkArrayTypes(msg,nonce,key),checkLengths(key,nonce);for(var m=new Uint8Array(32+msg.length),c=new Uint8Array(m.length),i=0;i<msg.length;i++)m[i+32]=msg[i];return crypto_secretbox(c,m,m.length,nonce,key),c.subarray(16)},nacl.secretbox.open=function(box,nonce,key){checkArrayTypes(box,nonce,key),checkLengths(key,nonce);for(var c=new Uint8Array(16+box.length),m=new Uint8Array(c.length),i=0;i<box.length;i++)c[i+16]=box[i];return c.length<32?null:0!==crypto_secretbox_open(m,c,c.length,nonce,key)?null:m.subarray(32)},nacl.secretbox.keyLength=crypto_secretbox_KEYBYTES,nacl.secretbox.nonceLength=crypto_secretbox_NONCEBYTES,nacl.secretbox.overheadLength=16,nacl.scalarMult=function(n,p){if(checkArrayTypes(n,p),32!==n.length)throw new Error("bad n size");if(32!==p.length)throw new Error("bad p size");var q=new Uint8Array(32);return crypto_scalarmult(q,n,p),q},nacl.scalarMult.base=function(n){if(checkArrayTypes(n),32!==n.length)throw new Error("bad n size");var q=new Uint8Array(32);return crypto_scalarmult_base(q,n),q},nacl.scalarMult.scalarLength=32,nacl.scalarMult.groupElementLength=32,nacl.box=function(msg,nonce,publicKey,secretKey){var k=nacl.box.before(publicKey,secretKey);return nacl.secretbox(msg,nonce,k)},nacl.box.before=function(publicKey,secretKey){checkArrayTypes(publicKey,secretKey),checkBoxLengths(publicKey,secretKey);var k=new Uint8Array(32);return crypto_box_beforenm(k,publicKey,secretKey),k},nacl.box.after=nacl.secretbox,nacl.box.open=function(msg,nonce,publicKey,secretKey){var k=nacl.box.before(publicKey,secretKey);return nacl.secretbox.open(msg,nonce,k)},nacl.box.open.after=nacl.secretbox.open,nacl.box.keyPair=function(){var pk=new Uint8Array(crypto_box_PUBLICKEYBYTES),sk=new Uint8Array(crypto_box_SECRETKEYBYTES);return crypto_box_keypair(pk,sk),{publicKey:pk,secretKey:sk}},nacl.box.keyPair.fromSecretKey=function(secretKey){if(checkArrayTypes(secretKey),secretKey.length!==crypto_box_SECRETKEYBYTES)throw new Error("bad secret key size");var pk=new Uint8Array(crypto_box_PUBLICKEYBYTES);return crypto_scalarmult_base(pk,secretKey),{publicKey:pk,secretKey:new Uint8Array(secretKey)}},nacl.box.publicKeyLength=crypto_box_PUBLICKEYBYTES,nacl.box.secretKeyLength=crypto_box_SECRETKEYBYTES,nacl.box.sharedKeyLength=32,nacl.box.nonceLength=crypto_box_NONCEBYTES,nacl.box.overheadLength=nacl.secretbox.overheadLength,nacl.sign=function(msg,secretKey){if(checkArrayTypes(msg,secretKey),64!==secretKey.length)throw new Error("bad secret key size");var signedMsg=new Uint8Array(64+msg.length);return crypto_sign(signedMsg,msg,msg.length,secretKey),signedMsg},nacl.sign.open=function(signedMsg,publicKey){if(checkArrayTypes(signedMsg,publicKey),32!==publicKey.length)throw new Error("bad public key size");var tmp=new Uint8Array(signedMsg.length),mlen=crypto_sign_open(tmp,signedMsg,signedMsg.length,publicKey);if(mlen<0)return null;for(var m=new Uint8Array(mlen),i=0;i<m.length;i++)m[i]=tmp[i];return m},nacl.sign.detached=function(msg,secretKey){for(var signedMsg=nacl.sign(msg,secretKey),sig=new Uint8Array(64),i=0;i<sig.length;i++)sig[i]=signedMsg[i];return sig},nacl.sign.detached.verify=function(msg,sig,publicKey){if(checkArrayTypes(msg,sig,publicKey),64!==sig.length)throw new Error("bad signature size");if(32!==publicKey.length)throw new Error("bad public key size");var i,sm=new Uint8Array(64+msg.length),m=new Uint8Array(64+msg.length);for(i=0;i<64;i++)sm[i]=sig[i];for(i=0;i<msg.length;i++)sm[i+64]=msg[i];return crypto_sign_open(m,sm,sm.length,publicKey)>=0},nacl.sign.keyPair=function(){var pk=new Uint8Array(32),sk=new Uint8Array(64);return crypto_sign_keypair(pk,sk),{publicKey:pk,secretKey:sk}},nacl.sign.keyPair.fromSecretKey=function(secretKey){if(checkArrayTypes(secretKey),64!==secretKey.length)throw new Error("bad secret key size");for(var pk=new Uint8Array(32),i=0;i<pk.length;i++)pk[i]=secretKey[32+i];return{publicKey:pk,secretKey:new Uint8Array(secretKey)}},nacl.sign.keyPair.fromSeed=function(seed){if(checkArrayTypes(seed),32!==seed.length)throw new Error("bad seed size");for(var pk=new Uint8Array(32),sk=new Uint8Array(64),i=0;i<32;i++)sk[i]=seed[i];return crypto_sign_keypair(pk,sk,!0),{publicKey:pk,secretKey:sk}},nacl.sign.publicKeyLength=32,nacl.sign.secretKeyLength=64,nacl.sign.seedLength=32,nacl.sign.signatureLength=64,nacl.hash=function(msg){checkArrayTypes(msg);var h=new Uint8Array(64);return crypto_hash(h,msg,msg.length),h},nacl.hash.hashLength=64,nacl.verify=function(x,y){return checkArrayTypes(x,y),0!==x.length&&0!==y.length&&(x.length===y.length&&0===vn(x,0,y,0,x.length))},nacl.setPRNG=function(fn){randombytes=fn},function(){var crypto="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(crypto&&crypto.getRandomValues){nacl.setPRNG(function(x,n){var i,v=new Uint8Array(n);for(i=0;i<n;i+=65536)crypto.getRandomValues(v.subarray(i,i+Math.min(n-i,65536)));for(i=0;i<n;i++)x[i]=v[i];cleanup(v)})}else(crypto=__webpack_require__(197))&&crypto.randomBytes&&nacl.setPRNG(function(x,n){var i,v=crypto.randomBytes(n);for(i=0;i<n;i++)x[i]=v[i];cleanup(v)})}()}(void 0!==module&&module.exports?module.exports:self.nacl=self.nacl||{})},function(module,exports){},function(module,exports,__webpack_require__){"use strict";const multihashing=__webpack_require__(18);module.exports=((keysProtobuf,randomBytes,crypto)=>{function ensure(callback){if("function"!=typeof callback)throw new Error("callback is required")}crypto=crypto||__webpack_require__(199)(randomBytes);class Secp256k1PublicKey{constructor(key){crypto.validatePublicKey(key),this._key=key}verify(data,sig,callback){ensure(callback),crypto.hashAndVerify(this._key,sig,data,callback)}marshal(){return crypto.compressPublicKey(this._key)}get bytes(){return keysProtobuf.PublicKey.encode({Type:keysProtobuf.KeyType.Secp256k1,Data:this.marshal()})}equals(key){return this.bytes.equals(key.bytes)}hash(callback){ensure(callback),multihashing(this.bytes,"sha2-256",callback)}}class Secp256k1PrivateKey{constructor(key,publicKey){this._key=key,this._publicKey=publicKey||crypto.computePublicKey(key),crypto.validatePrivateKey(this._key),crypto.validatePublicKey(this._publicKey)}sign(message,callback){ensure(callback),crypto.hashAndSign(this._key,message,callback)}get public(){return new Secp256k1PublicKey(this._publicKey)}marshal(){return this._key}get bytes(){return keysProtobuf.PrivateKey.encode({Type:keysProtobuf.KeyType.Secp256k1,Data:this.marshal()})}equals(key){return this.bytes.equals(key.bytes)}hash(callback){ensure(callback),multihashing(this.bytes,"sha2-256",callback)}}return{Secp256k1PublicKey:Secp256k1PublicKey,Secp256k1PrivateKey:Secp256k1PrivateKey,unmarshalSecp256k1PrivateKey:function(bytes,callback){callback(null,new Secp256k1PrivateKey(bytes),null)},unmarshalSecp256k1PublicKey:function(bytes){return new Secp256k1PublicKey(bytes)},generateKeyPair:function(_bits,callback){void 0===callback&&"function"==typeof _bits&&(callback=_bits),ensure(callback),crypto.generateKey((err,privateKeyBytes)=>{if(err)return callback(err);let privkey;try{privkey=new Secp256k1PrivateKey(privateKeyBytes)}catch(err){return callback(err)}callback(null,privkey)})}}})},function(module,exports,__webpack_require__){"use strict";const secp256k1=__webpack_require__(200),multihashing=__webpack_require__(18),setImmediate=__webpack_require__(36),HASH_ALGORITHM="sha2-256";module.exports=(randomBytes=>{function validatePrivateKey(key){if(!secp256k1.privateKeyVerify(key))throw new Error("Invalid private key")}return{generateKey:function(callback){let privateKey;do{privateKey=randomBytes(32)}while(!secp256k1.privateKeyVerify(privateKey));((err,res)=>setImmediate(()=>callback(err,res)))(null,privateKey)},privateKeyLength:32,hashAndSign:function(key,msg,callback){const done=(err,res)=>setImmediate(()=>callback(err,res));multihashing.digest(msg,HASH_ALGORITHM,(err,digest)=>{if(err)return done(err);try{const sig=secp256k1.sign(digest,key),sigDER=secp256k1.signatureExport(sig.signature);return done(null,sigDER)}catch(err){done(err)}})},hashAndVerify:function(key,sig,msg,callback){const done=(err,res)=>setImmediate(()=>callback(err,res));multihashing.digest(msg,HASH_ALGORITHM,(err,digest)=>{if(err)return done(err);try{sig=secp256k1.signatureImport(sig);const valid=secp256k1.verify(digest,sig,key);return done(null,valid)}catch(err){done(err)}})},compressPublicKey:function(key){if(!secp256k1.publicKeyVerify(key))throw new Error("Invalid public key");return secp256k1.publicKeyConvert(key,!0)},decompressPublicKey:function(key){return secp256k1.publicKeyConvert(key,!1)},validatePrivateKey:validatePrivateKey,validatePublicKey:function(key){if(!secp256k1.publicKeyVerify(key))throw new Error("Invalid public key")},computePublicKey:function(privateKey){return validatePrivateKey(privateKey),secp256k1.publicKeyCreate(privateKey)}}})},function(module,exports,__webpack_require__){"use strict";module.exports=__webpack_require__(201)(__webpack_require__(205))},function(module,exports,__webpack_require__){"use strict";function initCompressedValue(value,defaultValue){return void 0===value?defaultValue:(assert.isBoolean(value,messages.COMPRESSED_TYPE_INVALID),value)}var assert=__webpack_require__(202),der=__webpack_require__(203),messages=__webpack_require__(73);module.exports=function(secp256k1){return{privateKeyVerify:function(privateKey){return assert.isBuffer(privateKey,messages.EC_PRIVATE_KEY_TYPE_INVALID),32===privateKey.length&&secp256k1.privateKeyVerify(privateKey)},privateKeyExport:function(privateKey,compressed){assert.isBuffer(privateKey,messages.EC_PRIVATE_KEY_TYPE_INVALID),assert.isBufferLength(privateKey,32,messages.EC_PRIVATE_KEY_LENGTH_INVALID),compressed=initCompressedValue(compressed,!0);var publicKey=secp256k1.privateKeyExport(privateKey,compressed);return der.privateKeyExport(privateKey,publicKey,compressed)},privateKeyImport:function(privateKey){if(assert.isBuffer(privateKey,messages.EC_PRIVATE_KEY_TYPE_INVALID),(privateKey=der.privateKeyImport(privateKey))&&32===privateKey.length&&secp256k1.privateKeyVerify(privateKey))return privateKey;throw new Error(messages.EC_PRIVATE_KEY_IMPORT_DER_FAIL)},privateKeyTweakAdd:function(privateKey,tweak){return assert.isBuffer(privateKey,messages.EC_PRIVATE_KEY_TYPE_INVALID),assert.isBufferLength(privateKey,32,messages.EC_PRIVATE_KEY_LENGTH_INVALID),assert.isBuffer(tweak,messages.TWEAK_TYPE_INVALID),assert.isBufferLength(tweak,32,messages.TWEAK_LENGTH_INVALID),secp256k1.privateKeyTweakAdd(privateKey,tweak)},privateKeyTweakMul:function(privateKey,tweak){return assert.isBuffer(privateKey,messages.EC_PRIVATE_KEY_TYPE_INVALID),assert.isBufferLength(privateKey,32,messages.EC_PRIVATE_KEY_LENGTH_INVALID),assert.isBuffer(tweak,messages.TWEAK_TYPE_INVALID),assert.isBufferLength(tweak,32,messages.TWEAK_LENGTH_INVALID),secp256k1.privateKeyTweakMul(privateKey,tweak)},publicKeyCreate:function(privateKey,compressed){return assert.isBuffer(privateKey,messages.EC_PRIVATE_KEY_TYPE_INVALID),assert.isBufferLength(privateKey,32,messages.EC_PRIVATE_KEY_LENGTH_INVALID),compressed=initCompressedValue(compressed,!0),secp256k1.publicKeyCreate(privateKey,compressed)},publicKeyConvert:function(publicKey,compressed){return assert.isBuffer(publicKey,messages.EC_PUBLIC_KEY_TYPE_INVALID),assert.isBufferLength2(publicKey,33,65,messages.EC_PUBLIC_KEY_LENGTH_INVALID),compressed=initCompressedValue(compressed,!0),secp256k1.publicKeyConvert(publicKey,compressed)},publicKeyVerify:function(publicKey){return assert.isBuffer(publicKey,messages.EC_PUBLIC_KEY_TYPE_INVALID),secp256k1.publicKeyVerify(publicKey)},publicKeyTweakAdd:function(publicKey,tweak,compressed){return assert.isBuffer(publicKey,messages.EC_PUBLIC_KEY_TYPE_INVALID),assert.isBufferLength2(publicKey,33,65,messages.EC_PUBLIC_KEY_LENGTH_INVALID),assert.isBuffer(tweak,messages.TWEAK_TYPE_INVALID),assert.isBufferLength(tweak,32,messages.TWEAK_LENGTH_INVALID),compressed=initCompressedValue(compressed,!0),secp256k1.publicKeyTweakAdd(publicKey,tweak,compressed)},publicKeyTweakMul:function(publicKey,tweak,compressed){return assert.isBuffer(publicKey,messages.EC_PUBLIC_KEY_TYPE_INVALID),assert.isBufferLength2(publicKey,33,65,messages.EC_PUBLIC_KEY_LENGTH_INVALID),assert.isBuffer(tweak,messages.TWEAK_TYPE_INVALID),assert.isBufferLength(tweak,32,messages.TWEAK_LENGTH_INVALID),compressed=initCompressedValue(compressed,!0),secp256k1.publicKeyTweakMul(publicKey,tweak,compressed)},publicKeyCombine:function(publicKeys,compressed){assert.isArray(publicKeys,messages.EC_PUBLIC_KEYS_TYPE_INVALID),assert.isLengthGTZero(publicKeys,messages.EC_PUBLIC_KEYS_LENGTH_INVALID);for(var i=0;i<publicKeys.length;++i)assert.isBuffer(publicKeys[i],messages.EC_PUBLIC_KEY_TYPE_INVALID),assert.isBufferLength2(publicKeys[i],33,65,messages.EC_PUBLIC_KEY_LENGTH_INVALID);return compressed=initCompressedValue(compressed,!0),secp256k1.publicKeyCombine(publicKeys,compressed)},signatureNormalize:function(signature){return assert.isBuffer(signature,messages.ECDSA_SIGNATURE_TYPE_INVALID),assert.isBufferLength(signature,64,messages.ECDSA_SIGNATURE_LENGTH_INVALID),secp256k1.signatureNormalize(signature)},signatureExport:function(signature){assert.isBuffer(signature,messages.ECDSA_SIGNATURE_TYPE_INVALID),assert.isBufferLength(signature,64,messages.ECDSA_SIGNATURE_LENGTH_INVALID);var sigObj=secp256k1.signatureExport(signature);return der.signatureExport(sigObj)},signatureImport:function(sig){assert.isBuffer(sig,messages.ECDSA_SIGNATURE_TYPE_INVALID),assert.isLengthGTZero(sig,messages.ECDSA_SIGNATURE_LENGTH_INVALID);var sigObj=der.signatureImport(sig);if(sigObj)return secp256k1.signatureImport(sigObj);throw new Error(messages.ECDSA_SIGNATURE_PARSE_DER_FAIL)},signatureImportLax:function(sig){assert.isBuffer(sig,messages.ECDSA_SIGNATURE_TYPE_INVALID),assert.isLengthGTZero(sig,messages.ECDSA_SIGNATURE_LENGTH_INVALID);var sigObj=der.signatureImportLax(sig);if(sigObj)return secp256k1.signatureImport(sigObj);throw new Error(messages.ECDSA_SIGNATURE_PARSE_DER_FAIL)},sign:function(message,privateKey,options){assert.isBuffer(message,messages.MSG32_TYPE_INVALID),assert.isBufferLength(message,32,messages.MSG32_LENGTH_INVALID),assert.isBuffer(privateKey,messages.EC_PRIVATE_KEY_TYPE_INVALID),assert.isBufferLength(privateKey,32,messages.EC_PRIVATE_KEY_LENGTH_INVALID);var data=null,noncefn=null;return void 0!==options&&(assert.isObject(options,messages.OPTIONS_TYPE_INVALID),void 0!==options.data&&(assert.isBuffer(options.data,messages.OPTIONS_DATA_TYPE_INVALID),assert.isBufferLength(options.data,32,messages.OPTIONS_DATA_LENGTH_INVALID),data=options.data),void 0!==options.noncefn&&(assert.isFunction(options.noncefn,messages.OPTIONS_NONCEFN_TYPE_INVALID),noncefn=options.noncefn)),secp256k1.sign(message,privateKey,noncefn,data)},verify:function(message,signature,publicKey){return assert.isBuffer(message,messages.MSG32_TYPE_INVALID),assert.isBufferLength(message,32,messages.MSG32_LENGTH_INVALID),assert.isBuffer(signature,messages.ECDSA_SIGNATURE_TYPE_INVALID),assert.isBufferLength(signature,64,messages.ECDSA_SIGNATURE_LENGTH_INVALID),assert.isBuffer(publicKey,messages.EC_PUBLIC_KEY_TYPE_INVALID),assert.isBufferLength2(publicKey,33,65,messages.EC_PUBLIC_KEY_LENGTH_INVALID),secp256k1.verify(message,signature,publicKey)},recover:function(message,signature,recovery,compressed){return assert.isBuffer(message,messages.MSG32_TYPE_INVALID),assert.isBufferLength(message,32,messages.MSG32_LENGTH_INVALID),assert.isBuffer(signature,messages.ECDSA_SIGNATURE_TYPE_INVALID),assert.isBufferLength(signature,64,messages.ECDSA_SIGNATURE_LENGTH_INVALID),assert.isNumber(recovery,messages.RECOVERY_ID_TYPE_INVALID),assert.isNumberInInterval(recovery,-1,4,messages.RECOVERY_ID_VALUE_INVALID),compressed=initCompressedValue(compressed,!0),secp256k1.recover(message,signature,recovery,compressed)},ecdh:function(publicKey,privateKey){return assert.isBuffer(publicKey,messages.EC_PUBLIC_KEY_TYPE_INVALID),assert.isBufferLength2(publicKey,33,65,messages.EC_PUBLIC_KEY_LENGTH_INVALID),assert.isBuffer(privateKey,messages.EC_PRIVATE_KEY_TYPE_INVALID),assert.isBufferLength(privateKey,32,messages.EC_PRIVATE_KEY_LENGTH_INVALID),secp256k1.ecdh(publicKey,privateKey)},ecdhUnsafe:function(publicKey,privateKey,compressed){return assert.isBuffer(publicKey,messages.EC_PUBLIC_KEY_TYPE_INVALID),assert.isBufferLength2(publicKey,33,65,messages.EC_PUBLIC_KEY_LENGTH_INVALID),assert.isBuffer(privateKey,messages.EC_PRIVATE_KEY_TYPE_INVALID),assert.isBufferLength(privateKey,32,messages.EC_PRIVATE_KEY_LENGTH_INVALID),compressed=initCompressedValue(compressed,!0),secp256k1.ecdhUnsafe(publicKey,privateKey,compressed)}}}},function(module,exports,__webpack_require__){"use strict";(function(Buffer){var toString=Object.prototype.toString;exports.isArray=function(value,message){if(!Array.isArray(value))throw TypeError(message)},exports.isBoolean=function(value,message){if("[object Boolean]"!==toString.call(value))throw TypeError(message)},exports.isBuffer=function(value,message){if(!Buffer.isBuffer(value))throw TypeError(message)},exports.isFunction=function(value,message){if("[object Function]"!==toString.call(value))throw TypeError(message)},exports.isNumber=function(value,message){if("[object Number]"!==toString.call(value))throw TypeError(message)},exports.isObject=function(value,message){if("[object Object]"!==toString.call(value))throw TypeError(message)},exports.isBufferLength=function(buffer,length,message){if(buffer.length!==length)throw RangeError(message)},exports.isBufferLength2=function(buffer,length1,length2,message){if(buffer.length!==length1&&buffer.length!==length2)throw RangeError(message)},exports.isLengthGTZero=function(value,message){if(0===value.length)throw RangeError(message)},exports.isNumberInInterval=function(number,x,y,message){if(number<=x||number>=y)throw RangeError(message)}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";var Buffer=__webpack_require__(1).Buffer,bip66=__webpack_require__(204),EC_PRIVKEY_EXPORT_DER_COMPRESSED=Buffer.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]),EC_PRIVKEY_EXPORT_DER_UNCOMPRESSED=Buffer.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]),ZERO_BUFFER_32=Buffer.from([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);exports.privateKeyExport=function(privateKey,publicKey,compressed){var result=Buffer.from(compressed?EC_PRIVKEY_EXPORT_DER_COMPRESSED:EC_PRIVKEY_EXPORT_DER_UNCOMPRESSED);return privateKey.copy(result,compressed?8:9),publicKey.copy(result,compressed?181:214),result},exports.privateKeyImport=function(privateKey){var length=privateKey.length,index=0;if(!(length<index+1||48!==privateKey[index])&&(index+=1,!(length<index+1)&&128&privateKey[index])){var lenb=127&privateKey[index];if(index+=1,!(lenb<1||lenb>2||length<index+lenb)){var len=privateKey[index+lenb-1]|(lenb>1?privateKey[index+lenb-2]<<8:0);if(index+=lenb,!(length<index+len||length<index+3||2!==privateKey[index]||1!==privateKey[index+1]||1!==privateKey[index+2]||(index+=3,length<index+2||4!==privateKey[index]||privateKey[index+1]>32||length<index+2+privateKey[index+1])))return privateKey.slice(index+2,index+2+privateKey[index+1])}}},exports.signatureExport=function(sigObj){for(var r=Buffer.concat([Buffer.from([0]),sigObj.r]),lenR=33,posR=0;lenR>1&&0===r[posR]&&!(128&r[posR+1]);--lenR,++posR);for(var s=Buffer.concat([Buffer.from([0]),sigObj.s]),lenS=33,posS=0;lenS>1&&0===s[posS]&&!(128&s[posS+1]);--lenS,++posS);return bip66.encode(r.slice(posR),s.slice(posS))},exports.signatureImport=function(sig){var r=Buffer.from(ZERO_BUFFER_32),s=Buffer.from(ZERO_BUFFER_32);try{var sigObj=bip66.decode(sig);if(33===sigObj.r.length&&0===sigObj.r[0]&&(sigObj.r=sigObj.r.slice(1)),sigObj.r.length>32)throw new Error("R length is too long");if(33===sigObj.s.length&&0===sigObj.s[0]&&(sigObj.s=sigObj.s.slice(1)),sigObj.s.length>32)throw new Error("S length is too long")}catch(err){return}return sigObj.r.copy(r,32-sigObj.r.length),sigObj.s.copy(s,32-sigObj.s.length),{r:r,s:s}},exports.signatureImportLax=function(sig){var r=Buffer.from(ZERO_BUFFER_32),s=Buffer.from(ZERO_BUFFER_32),length=sig.length,index=0;if(48===sig[index++]){var lenbyte=sig[index++];if(!(128&lenbyte&&(index+=lenbyte-128)>length)&&2===sig[index++]){var rlen=sig[index++];if(128&rlen){if(lenbyte=rlen-128,index+lenbyte>length)return;for(;lenbyte>0&&0===sig[index];index+=1,lenbyte-=1);for(rlen=0;lenbyte>0;index+=1,lenbyte-=1)rlen=(rlen<<8)+sig[index]}if(!(rlen>length-index)){var rindex=index;if(index+=rlen,2===sig[index++]){var slen=sig[index++];if(128&slen){if(lenbyte=slen-128,index+lenbyte>length)return;for(;lenbyte>0&&0===sig[index];index+=1,lenbyte-=1);for(slen=0;lenbyte>0;index+=1,lenbyte-=1)slen=(slen<<8)+sig[index]}if(!(slen>length-index)){var sindex=index;for(index+=slen;rlen>0&&0===sig[rindex];rlen-=1,rindex+=1);if(!(rlen>32)){var rvalue=sig.slice(rindex,rindex+rlen);for(rvalue.copy(r,32-rvalue.length);slen>0&&0===sig[sindex];slen-=1,sindex+=1);if(!(slen>32)){var svalue=sig.slice(sindex,sindex+slen);return svalue.copy(s,32-svalue.length),{r:r,s:s}}}}}}}}}},function(module,exports,__webpack_require__){var Buffer=__webpack_require__(1).Buffer;module.exports={check:function(buffer){if(buffer.length<8)return!1;if(buffer.length>72)return!1;if(48!==buffer[0])return!1;if(buffer[1]!==buffer.length-2)return!1;if(2!==buffer[2])return!1;var lenR=buffer[3];if(0===lenR)return!1;if(5+lenR>=buffer.length)return!1;if(2!==buffer[4+lenR])return!1;var lenS=buffer[5+lenR];return!(0===lenS||6+lenR+lenS!==buffer.length||128&buffer[4]||lenR>1&&0===buffer[4]&&!(128&buffer[5])||128&buffer[lenR+6]||lenS>1&&0===buffer[lenR+6]&&!(128&buffer[lenR+7]))},decode:function(buffer){if(buffer.length<8)throw new Error("DER sequence length is too short");if(buffer.length>72)throw new Error("DER sequence length is too long");if(48!==buffer[0])throw new Error("Expected DER sequence");if(buffer[1]!==buffer.length-2)throw new Error("DER sequence length is invalid");if(2!==buffer[2])throw new Error("Expected DER integer");var lenR=buffer[3];if(0===lenR)throw new Error("R length is zero");if(5+lenR>=buffer.length)throw new Error("R length is too long");if(2!==buffer[4+lenR])throw new Error("Expected DER integer (2)");var lenS=buffer[5+lenR];if(0===lenS)throw new Error("S length is zero");if(6+lenR+lenS!==buffer.length)throw new Error("S length is invalid");if(128&buffer[4])throw new Error("R value is negative");if(lenR>1&&0===buffer[4]&&!(128&buffer[5]))throw new Error("R value excessively padded");if(128&buffer[lenR+6])throw new Error("S value is negative");if(lenS>1&&0===buffer[lenR+6]&&!(128&buffer[lenR+7]))throw new Error("S value excessively padded");return{r:buffer.slice(4,4+lenR),s:buffer.slice(6+lenR)}},encode:function(r,s){var lenR=r.length,lenS=s.length;if(0===lenR)throw new Error("R length is zero");if(0===lenS)throw new Error("S length is zero");if(lenR>33)throw new Error("R length is too long");if(lenS>33)throw new Error("S length is too long");if(128&r[0])throw new Error("R value is negative");if(128&s[0])throw new Error("S value is negative");if(lenR>1&&0===r[0]&&!(128&r[1]))throw new Error("R value excessively padded");if(lenS>1&&0===s[0]&&!(128&s[1]))throw new Error("S value excessively padded");var signature=Buffer.allocUnsafe(6+lenR+lenS);return signature[0]=48,signature[1]=signature.length-2,signature[2]=2,signature[3]=r.length,r.copy(signature,4),signature[4+lenR]=2,signature[5+lenR]=s.length,s.copy(signature,6+lenR),signature}}},function(module,exports,__webpack_require__){"use strict";var Buffer=__webpack_require__(1).Buffer,createHash=__webpack_require__(206),HmacDRBG=__webpack_require__(213),messages=__webpack_require__(73),BN=__webpack_require__(21),ECPoint=__webpack_require__(79),g=__webpack_require__(218);exports.privateKeyVerify=function(privateKey){var bn=BN.fromBuffer(privateKey);return!(bn.isOverflow()||bn.isZero())},exports.privateKeyExport=function(privateKey,compressed){var d=BN.fromBuffer(privateKey);if(d.isOverflow()||d.isZero())throw new Error(messages.EC_PRIVATE_KEY_EXPORT_DER_FAIL);return g.mul(d).toPublicKey(compressed)},exports.privateKeyTweakAdd=function(privateKey,tweak){var bn=BN.fromBuffer(tweak);if(bn.isOverflow())throw new Error(messages.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);if(bn.iadd(BN.fromBuffer(privateKey)),bn.isOverflow()&&bn.isub(BN.n),bn.isZero())throw new Error(messages.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);return bn.toBuffer()},exports.privateKeyTweakMul=function(privateKey,tweak){var bn=BN.fromBuffer(tweak);if(bn.isOverflow()||bn.isZero())throw new Error(messages.EC_PRIVATE_KEY_TWEAK_MUL_FAIL);var d=BN.fromBuffer(privateKey);return bn.umul(d).ureduce().toBuffer()},exports.publicKeyCreate=function(privateKey,compressed){var d=BN.fromBuffer(privateKey);if(d.isOverflow()||d.isZero())throw new Error(messages.EC_PUBLIC_KEY_CREATE_FAIL);return g.mul(d).toPublicKey(compressed)},exports.publicKeyConvert=function(publicKey,compressed){var point=ECPoint.fromPublicKey(publicKey);if(null===point)throw new Error(messages.EC_PUBLIC_KEY_PARSE_FAIL);return point.toPublicKey(compressed)},exports.publicKeyVerify=function(publicKey){return null!==ECPoint.fromPublicKey(publicKey)},exports.publicKeyTweakAdd=function(publicKey,tweak,compressed){var point=ECPoint.fromPublicKey(publicKey);if(null===point)throw new Error(messages.EC_PUBLIC_KEY_PARSE_FAIL);if((tweak=BN.fromBuffer(tweak)).isOverflow())throw new Error(messages.EC_PUBLIC_KEY_TWEAK_ADD_FAIL);return g.mul(tweak).add(point).toPublicKey(compressed)},exports.publicKeyTweakMul=function(publicKey,tweak,compressed){var point=ECPoint.fromPublicKey(publicKey);if(null===point)throw new Error(messages.EC_PUBLIC_KEY_PARSE_FAIL);if((tweak=BN.fromBuffer(tweak)).isOverflow()||tweak.isZero())throw new Error(messages.EC_PUBLIC_KEY_TWEAK_MUL_FAIL);return point.mul(tweak).toPublicKey(compressed)},exports.publicKeyCombine=function(publicKeys,compressed){for(var points=new Array(publicKeys.length),i=0;i<publicKeys.length;++i)if(points[i]=ECPoint.fromPublicKey(publicKeys[i]),null===points[i])throw new Error(messages.EC_PUBLIC_KEY_PARSE_FAIL);for(var point=points[0],j=1;j<points.length;++j)point=point.add(points[j]);if(point.inf)throw new Error(messages.EC_PUBLIC_KEY_COMBINE_FAIL);return point.toPublicKey(compressed)},exports.signatureNormalize=function(signature){var r=BN.fromBuffer(signature.slice(0,32)),s=BN.fromBuffer(signature.slice(32,64));if(r.isOverflow()||s.isOverflow())throw new Error(messages.ECDSA_SIGNATURE_PARSE_FAIL);var result=Buffer.from(signature);return s.isHigh()&&BN.n.sub(s).toBuffer().copy(result,32),result},exports.signatureExport=function(signature){var r=signature.slice(0,32),s=signature.slice(32,64);if(BN.fromBuffer(r).isOverflow()||BN.fromBuffer(s).isOverflow())throw new Error(messages.ECDSA_SIGNATURE_PARSE_FAIL);return{r:r,s:s}},exports.signatureImport=function(sigObj){var r=BN.fromBuffer(sigObj.r);r.isOverflow()&&(r=BN.fromNumber(0));var s=BN.fromBuffer(sigObj.s);return s.isOverflow()&&(s=BN.fromNumber(0)),Buffer.concat([r.toBuffer(),s.toBuffer()])},exports.sign=function(message,privateKey,noncefn,data){var d=BN.fromBuffer(privateKey);if(d.isOverflow()||d.isZero())throw new Error(messages.ECDSA_SIGN_FAIL);if(null===noncefn){var drbg=new HmacDRBG("sha256",privateKey,message,data);noncefn=function(){return drbg.generate(32)}}for(var bnMessage=BN.fromBuffer(message),count=0;;++count){var nonce=noncefn(message,privateKey,null,data,count);if(!Buffer.isBuffer(nonce)||32!==nonce.length)throw new Error(messages.ECDSA_SIGN_FAIL);var k=BN.fromBuffer(nonce);if(!k.isOverflow()&&!k.isZero()){var kp=g.mul(k),r=kp.x.fireduce();if(!r.isZero()){var s=k.uinvm().umul(r.umul(d).ureduce().iadd(bnMessage).fireduce()).ureduce();if(!s.isZero()){var recovery=(0!==kp.x.ucmp(r)?2:0)|(kp.y.isOdd()?1:0);return s.isHigh()&&(s=BN.n.sub(s),recovery^=1),{signature:Buffer.concat([r.toBuffer(),s.toBuffer()]),recovery:recovery}}}}}},exports.verify=function(message,signature,publicKey){var sigr=BN.fromBuffer(signature.slice(0,32)),sigs=BN.fromBuffer(signature.slice(32,64));if(sigr.isOverflow()||sigs.isOverflow())throw new Error(messages.ECDSA_SIGNATURE_PARSE_FAIL);if(sigs.isHigh()||sigr.isZero()||sigs.isZero())return!1;var pub=ECPoint.fromPublicKey(publicKey);if(null===pub)throw new Error(messages.EC_PUBLIC_KEY_PARSE_FAIL);var sinv=sigs.uinvm(),u1=sinv.umul(BN.fromBuffer(message)).ureduce(),u2=sinv.umul(sigr).ureduce(),point=g.mulAdd(u1,pub,u2);if(point.inf)return!1;var z2=point.z.redSqr();return 0===sigr.redMul(z2).ucmp(point.x)||!(sigr.ucmp(BN.psn)>=0)&&0===sigr.iadd(BN.psn).redMul(z2).ucmp(point.x)},exports.recover=function(message,signature,recovery,compressed){var sigr=BN.fromBuffer(signature.slice(0,32)),sigs=BN.fromBuffer(signature.slice(32,64));if(sigr.isOverflow()||sigs.isOverflow())throw new Error(messages.ECDSA_SIGNATURE_PARSE_FAIL);do{if(sigr.isZero()||sigs.isZero())break;var kpx=sigr;if(recovery>>1){if(kpx.ucmp(BN.psn)>=0)break;kpx=sigr.add(BN.n)}var kpPublicKey=Buffer.concat([Buffer.from([2+(1&recovery)]),kpx.toBuffer()]),kp=ECPoint.fromPublicKey(kpPublicKey);if(null===kp)break;var rInv=sigr.uinvm(),s1=BN.n.sub(BN.fromBuffer(message)).umul(rInv).ureduce(),s2=sigs.umul(rInv).ureduce();return ECPoint.fromECJPoint(g.mulAdd(s1,kp,s2)).toPublicKey(compressed)}while(!1);throw new Error(messages.ECDSA_RECOVER_FAIL)},exports.ecdh=function(publicKey,privateKey){var shared=exports.ecdhUnsafe(publicKey,privateKey,!0);return createHash("sha256").update(shared).digest()},exports.ecdhUnsafe=function(publicKey,privateKey,compressed){var point=ECPoint.fromPublicKey(publicKey);if(null===point)throw new Error(messages.EC_PUBLIC_KEY_PARSE_FAIL);var scalar=BN.fromBuffer(privateKey);if(scalar.isOverflow()||scalar.isZero())throw new Error(messages.ECDH_FAIL);return point.mul(scalar).toPublicKey(compressed)}},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function HashNoConstructor(hash){Base.call(this,"digest"),this._hash=hash,this.buffers=[]}function Hash(hash){Base.call(this,"digest"),this._hash=hash}var inherits=__webpack_require__(2),md5=__webpack_require__(74),RIPEMD160=__webpack_require__(75),sha=__webpack_require__(76),Base=__webpack_require__(6);inherits(HashNoConstructor,Base),HashNoConstructor.prototype._update=function(data){this.buffers.push(data)},HashNoConstructor.prototype._final=function(){var buf=Buffer.concat(this.buffers),r=this._hash(buf);return this.buffers=null,r},inherits(Hash,Base),Hash.prototype._update=function(data){this._hash.update(data)},Hash.prototype._final=function(){return this._hash.digest()},module.exports=function(alg){return"md5"===(alg=alg.toLowerCase())?new HashNoConstructor(md5):new Hash("rmd160"===alg||"ripemd160"===alg?new RIPEMD160:sha(alg))}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function toArray(buf){if(buf.length%intSize!=0){var len=buf.length+(intSize-buf.length%intSize);buf=Buffer.concat([buf,zeroBuffer],len)}for(var arr=new Array(buf.length>>>2),i=0,j=0;i<buf.length;i+=intSize,j++)arr[j]=buf.readInt32LE(i);return arr}var intSize=4,zeroBuffer=new Buffer(intSize);zeroBuffer.fill(0);module.exports=function(buf,fn){var arr=fn(toArray(buf),8*buf.length);buf=new Buffer(16);for(var i=0;i<arr.length;i++)buf.writeInt32LE(arr[i],i<<2,!0);return buf}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function HashBase(blockSize){Transform.call(this),this._block=new Buffer(blockSize),this._blockSize=blockSize,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}var Transform=__webpack_require__(29).Transform;__webpack_require__(2)(HashBase,Transform),HashBase.prototype._transform=function(chunk,encoding,callback){var error=null;try{"buffer"!==encoding&&(chunk=new Buffer(chunk,encoding)),this.update(chunk)}catch(err){error=err}callback(error)},HashBase.prototype._flush=function(callback){var error=null;try{this.push(this._digest())}catch(err){error=err}callback(error)},HashBase.prototype.update=function(data,encoding){if(!Buffer.isBuffer(data)&&"string"!=typeof data)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");Buffer.isBuffer(data)||(data=new Buffer(data,encoding||"binary"));for(var block=this._block,offset=0;this._blockOffset+data.length-offset>=this._blockSize;){for(var i=this._blockOffset;i<this._blockSize;)block[i++]=data[offset++];this._update(),this._blockOffset=0}for(;offset<data.length;)block[this._blockOffset++]=data[offset++];for(var j=0,carry=8*data.length;carry>0;++j)this._length[j]+=carry,(carry=this._length[j]/4294967296|0)>0&&(this._length[j]-=4294967296*carry);return this},HashBase.prototype._update=function(data){throw new Error("_update is not implemented")},HashBase.prototype.digest=function(encoding){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var digest=this._digest();return void 0!==encoding&&(digest=digest.toString(encoding)),digest},HashBase.prototype._digest=function(){throw new Error("_digest is not implemented")},module.exports=HashBase}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){(function(Buffer){function Sha(){this.init(),this._w=W,Hash.call(this,64,56)}function rotl5(num){return num<<5|num>>>27}function rotl30(num){return num<<30|num>>>2}function ft(s,b,c,d){return 0===s?b&c|~b&d:2===s?b&c|b&d|c&d:b^c^d}var inherits=__webpack_require__(2),Hash=__webpack_require__(9),K=[1518500249,1859775393,-1894007588,-899497514],W=new Array(80);inherits(Sha,Hash),Sha.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Sha.prototype._update=function(M){for(var W=this._w,a=0|this._a,b=0|this._b,c=0|this._c,d=0|this._d,e=0|this._e,i=0;i<16;++i)W[i]=M.readInt32BE(4*i);for(;i<80;++i)W[i]=W[i-3]^W[i-8]^W[i-14]^W[i-16];for(var j=0;j<80;++j){var s=~~(j/20),t=rotl5(a)+ft(s,b,c,d)+e+W[j]+K[s]|0;e=d,d=c,c=rotl30(b),b=a,a=t}this._a=a+this._a|0,this._b=b+this._b|0,this._c=c+this._c|0,this._d=d+this._d|0,this._e=e+this._e|0},Sha.prototype._hash=function(){var H=new Buffer(20);return H.writeInt32BE(0|this._a,0),H.writeInt32BE(0|this._b,4),H.writeInt32BE(0|this._c,8),H.writeInt32BE(0|this._d,12),H.writeInt32BE(0|this._e,16),H},module.exports=Sha}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){(function(Buffer){function Sha1(){this.init(),this._w=W,Hash.call(this,64,56)}function rotl1(num){return num<<1|num>>>31}function rotl5(num){return num<<5|num>>>27}function rotl30(num){return num<<30|num>>>2}function ft(s,b,c,d){return 0===s?b&c|~b&d:2===s?b&c|b&d|c&d:b^c^d}var inherits=__webpack_require__(2),Hash=__webpack_require__(9),K=[1518500249,1859775393,-1894007588,-899497514],W=new Array(80);inherits(Sha1,Hash),Sha1.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Sha1.prototype._update=function(M){for(var W=this._w,a=0|this._a,b=0|this._b,c=0|this._c,d=0|this._d,e=0|this._e,i=0;i<16;++i)W[i]=M.readInt32BE(4*i);for(;i<80;++i)W[i]=rotl1(W[i-3]^W[i-8]^W[i-14]^W[i-16]);for(var j=0;j<80;++j){var s=~~(j/20),t=rotl5(a)+ft(s,b,c,d)+e+W[j]+K[s]|0;e=d,d=c,c=rotl30(b),b=a,a=t}this._a=a+this._a|0,this._b=b+this._b|0,this._c=c+this._c|0,this._d=d+this._d|0,this._e=e+this._e|0},Sha1.prototype._hash=function(){var H=new Buffer(20);return H.writeInt32BE(0|this._a,0),H.writeInt32BE(0|this._b,4),H.writeInt32BE(0|this._c,8),H.writeInt32BE(0|this._d,12),H.writeInt32BE(0|this._e,16),H},module.exports=Sha1}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){(function(Buffer){function Sha224(){this.init(),this._w=W,Hash.call(this,64,56)}var inherits=__webpack_require__(2),Sha256=__webpack_require__(77),Hash=__webpack_require__(9),W=new Array(64);inherits(Sha224,Sha256),Sha224.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},Sha224.prototype._hash=function(){var H=new Buffer(28);return H.writeInt32BE(this._a,0),H.writeInt32BE(this._b,4),H.writeInt32BE(this._c,8),H.writeInt32BE(this._d,12),H.writeInt32BE(this._e,16),H.writeInt32BE(this._f,20),H.writeInt32BE(this._g,24),H},module.exports=Sha224}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){(function(Buffer){function Sha384(){this.init(),this._w=W,Hash.call(this,128,112)}var inherits=__webpack_require__(2),SHA512=__webpack_require__(78),Hash=__webpack_require__(9),W=new Array(160);inherits(Sha384,SHA512),Sha384.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},Sha384.prototype._hash=function(){function writeInt64BE(h,l,offset){H.writeInt32BE(h,offset),H.writeInt32BE(l,offset+4)}var H=new Buffer(48);return writeInt64BE(this._ah,this._al,0),writeInt64BE(this._bh,this._bl,8),writeInt64BE(this._ch,this._cl,16),writeInt64BE(this._dh,this._dl,24),writeInt64BE(this._eh,this._el,32),writeInt64BE(this._fh,this._fl,40),H},module.exports=Sha384}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function HmacDRBG(algo,entropy,nonce,pers){var info=hashInfo[algo];if(void 0===info)throw new Error("hash "+algo+" is not supported");this._algo=algo,this._securityStrength=info.securityStrength/8,this._outlen=info.outlen/8,this._reseedInterval=281474976710656,this._init(entropy,nonce,pers)}var createHmac=__webpack_require__(214),hashInfo=__webpack_require__(216),ebuf=new Buffer(0),b0x00=new Buffer([0]),b0x01=new Buffer([1]);HmacDRBG.prototype._update=function(seed){var kmac=createHmac(this._algo,this._K).update(this._V).update(b0x00);seed&&kmac.update(seed),this._K=kmac.digest(),this._V=createHmac(this._algo,this._K).update(this._V).digest(),seed&&(this._K=createHmac(this._algo,this._K).update(this._V).update(b0x01).update(seed).digest(),this._V=createHmac(this._algo,this._K).update(this._V).digest())},HmacDRBG.prototype._init=function(entropy,nonce,pers){if(entropy.length<this._securityStrength)throw new Error("Not enough entropy");this._K=new Buffer(this._outlen),this._V=new Buffer(this._outlen);for(var i=0;i<this._K.length;++i)this._K[i]=0,this._V[i]=1;this._update(Buffer.concat([entropy,nonce,pers||ebuf])),this._reseed=1},HmacDRBG.prototype.reseed=function(entropy,add){if(entropy.length<this._securityStrength)throw new Error("Not enough entropy");this._update(Buffer.concat([entropy,add||ebuf])),this._reseed=1},HmacDRBG.prototype.generate=function(len,add){if(this._reseed>this._reseedInterval)throw new Error("Reseed is required");add&&0===add.length&&(add=void 0),add&&this._update(add);for(var temp=new Buffer(0);temp.length<len;)this._V=createHmac(this._algo,this._K).update(this._V).digest(),temp=Buffer.concat([temp,this._V]);return this._update(add),this._reseed+=1,temp.slice(0,len)},module.exports=HmacDRBG}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";function Hmac(alg,key){Base.call(this,"digest"),"string"==typeof key&&(key=Buffer.from(key));var blocksize="sha512"===alg||"sha384"===alg?128:64;this._alg=alg,this._key=key,key.length>blocksize?key=("rmd160"===alg?new RIPEMD160:sha(alg)).update(key).digest():key.length<blocksize&&(key=Buffer.concat([key,ZEROS],blocksize));for(var ipad=this._ipad=Buffer.allocUnsafe(blocksize),opad=this._opad=Buffer.allocUnsafe(blocksize),i=0;i<blocksize;i++)ipad[i]=54^key[i],opad[i]=92^key[i];this._hash="rmd160"===alg?new RIPEMD160:sha(alg),this._hash.update(ipad)}var inherits=__webpack_require__(2),Legacy=__webpack_require__(215),Base=__webpack_require__(6),Buffer=__webpack_require__(1).Buffer,md5=__webpack_require__(74),RIPEMD160=__webpack_require__(75),sha=__webpack_require__(76),ZEROS=Buffer.alloc(128);inherits(Hmac,Base),Hmac.prototype._update=function(data){this._hash.update(data)},Hmac.prototype._final=function(){var h=this._hash.digest();return("rmd160"===this._alg?new RIPEMD160:sha(this._alg)).update(this._opad).update(h).digest()},module.exports=function(alg,key){return"rmd160"===(alg=alg.toLowerCase())||"ripemd160"===alg?new Hmac("rmd160",key):"md5"===alg?new Legacy(md5,key):new Hmac(alg,key)}},function(module,exports,__webpack_require__){"use strict";function Hmac(alg,key){Base.call(this,"digest"),"string"==typeof key&&(key=Buffer.from(key)),this._alg=alg,this._key=key,key.length>blocksize?key=alg(key):key.length<blocksize&&(key=Buffer.concat([key,ZEROS],blocksize));for(var ipad=this._ipad=Buffer.allocUnsafe(blocksize),opad=this._opad=Buffer.allocUnsafe(blocksize),i=0;i<blocksize;i++)ipad[i]=54^key[i],opad[i]=92^key[i];this._hash=[ipad]}var inherits=__webpack_require__(2),Buffer=__webpack_require__(1).Buffer,Base=__webpack_require__(6),ZEROS=Buffer.alloc(128),blocksize=64;inherits(Hmac,Base),Hmac.prototype._update=function(data){this._hash.push(data)},Hmac.prototype._final=function(){var h=this._alg(Buffer.concat(this._hash));return this._alg(Buffer.concat([this._opad,h]))},module.exports=Hmac},function(module,exports){module.exports={sha1:{securityStrength:128,outlen:160,seedlen:440},sha224:{securityStrength:192,outlen:224,seedlen:440},sha256:{securityStrength:256,outlen:256,seedlen:440},sha384:{securityStrength:256,outlen:384,seedlen:888},sha512:{securityStrength:256,outlen:512,seedlen:888}}},function(module,exports,__webpack_require__){"use strict";exports.umulTo10x10=function(num1,num2,out){var lo,mid,hi,a=num1.words,b=num2.words,o=out.words,c=0,a0=0|a[0],al0=8191&a0,ah0=a0>>>13,a1=0|a[1],al1=8191&a1,ah1=a1>>>13,a2=0|a[2],al2=8191&a2,ah2=a2>>>13,a3=0|a[3],al3=8191&a3,ah3=a3>>>13,a4=0|a[4],al4=8191&a4,ah4=a4>>>13,a5=0|a[5],al5=8191&a5,ah5=a5>>>13,a6=0|a[6],al6=8191&a6,ah6=a6>>>13,a7=0|a[7],al7=8191&a7,ah7=a7>>>13,a8=0|a[8],al8=8191&a8,ah8=a8>>>13,a9=0|a[9],al9=8191&a9,ah9=a9>>>13,b0=0|b[0],bl0=8191&b0,bh0=b0>>>13,b1=0|b[1],bl1=8191&b1,bh1=b1>>>13,b2=0|b[2],bl2=8191&b2,bh2=b2>>>13,b3=0|b[3],bl3=8191&b3,bh3=b3>>>13,b4=0|b[4],bl4=8191&b4,bh4=b4>>>13,b5=0|b[5],bl5=8191&b5,bh5=b5>>>13,b6=0|b[6],bl6=8191&b6,bh6=b6>>>13,b7=0|b[7],bl7=8191&b7,bh7=b7>>>13,b8=0|b[8],bl8=8191&b8,bh8=b8>>>13,b9=0|b[9],bl9=8191&b9,bh9=b9>>>13;out.length=19,lo=Math.imul(al0,bl0),mid=Math.imul(al0,bh0);var w0=c+lo+((8191&(mid+=Math.imul(ah0,bl0)))<<13);c=(hi=Math.imul(ah0,bh0))+(mid>>>13)+(w0>>>26),w0&=67108863,lo=Math.imul(al1,bl0),mid=Math.imul(al1,bh0),mid+=Math.imul(ah1,bl0),hi=Math.imul(ah1,bh0),lo+=Math.imul(al0,bl1),mid+=Math.imul(al0,bh1);var w1=c+lo+((8191&(mid+=Math.imul(ah0,bl1)))<<13);c=(hi+=Math.imul(ah0,bh1))+(mid>>>13)+(w1>>>26),w1&=67108863,lo=Math.imul(al2,bl0),mid=Math.imul(al2,bh0),mid+=Math.imul(ah2,bl0),hi=Math.imul(ah2,bh0),lo+=Math.imul(al1,bl1),mid+=Math.imul(al1,bh1),mid+=Math.imul(ah1,bl1),hi+=Math.imul(ah1,bh1),lo+=Math.imul(al0,bl2),mid+=Math.imul(al0,bh2);var w2=c+lo+((8191&(mid+=Math.imul(ah0,bl2)))<<13);c=(hi+=Math.imul(ah0,bh2))+(mid>>>13)+(w2>>>26),w2&=67108863,lo=Math.imul(al3,bl0),mid=Math.imul(al3,bh0),mid+=Math.imul(ah3,bl0),hi=Math.imul(ah3,bh0),lo+=Math.imul(al2,bl1),mid+=Math.imul(al2,bh1),mid+=Math.imul(ah2,bl1),hi+=Math.imul(ah2,bh1),lo+=Math.imul(al1,bl2),mid+=Math.imul(al1,bh2),mid+=Math.imul(ah1,bl2),hi+=Math.imul(ah1,bh2),lo+=Math.imul(al0,bl3),mid+=Math.imul(al0,bh3);var w3=c+lo+((8191&(mid+=Math.imul(ah0,bl3)))<<13);c=(hi+=Math.imul(ah0,bh3))+(mid>>>13)+(w3>>>26),w3&=67108863,lo=Math.imul(al4,bl0),mid=Math.imul(al4,bh0),mid+=Math.imul(ah4,bl0),hi=Math.imul(ah4,bh0),lo+=Math.imul(al3,bl1),mid+=Math.imul(al3,bh1),mid+=Math.imul(ah3,bl1),hi+=Math.imul(ah3,bh1),lo+=Math.imul(al2,bl2),mid+=Math.imul(al2,bh2),mid+=Math.imul(ah2,bl2),hi+=Math.imul(ah2,bh2),lo+=Math.imul(al1,bl3),mid+=Math.imul(al1,bh3),mid+=Math.imul(ah1,bl3),hi+=Math.imul(ah1,bh3),lo+=Math.imul(al0,bl4),mid+=Math.imul(al0,bh4);var w4=c+lo+((8191&(mid+=Math.imul(ah0,bl4)))<<13);c=(hi+=Math.imul(ah0,bh4))+(mid>>>13)+(w4>>>26),w4&=67108863,lo=Math.imul(al5,bl0),mid=Math.imul(al5,bh0),mid+=Math.imul(ah5,bl0),hi=Math.imul(ah5,bh0),lo+=Math.imul(al4,bl1),mid+=Math.imul(al4,bh1),mid+=Math.imul(ah4,bl1),hi+=Math.imul(ah4,bh1),lo+=Math.imul(al3,bl2),mid+=Math.imul(al3,bh2),mid+=Math.imul(ah3,bl2),hi+=Math.imul(ah3,bh2),lo+=Math.imul(al2,bl3),mid+=Math.imul(al2,bh3),mid+=Math.imul(ah2,bl3),hi+=Math.imul(ah2,bh3),lo+=Math.imul(al1,bl4),mid+=Math.imul(al1,bh4),mid+=Math.imul(ah1,bl4),hi+=Math.imul(ah1,bh4),lo+=Math.imul(al0,bl5),mid+=Math.imul(al0,bh5);var w5=c+lo+((8191&(mid+=Math.imul(ah0,bl5)))<<13);c=(hi+=Math.imul(ah0,bh5))+(mid>>>13)+(w5>>>26),w5&=67108863,lo=Math.imul(al6,bl0),mid=Math.imul(al6,bh0),mid+=Math.imul(ah6,bl0),hi=Math.imul(ah6,bh0),lo+=Math.imul(al5,bl1),mid+=Math.imul(al5,bh1),mid+=Math.imul(ah5,bl1),hi+=Math.imul(ah5,bh1),lo+=Math.imul(al4,bl2),mid+=Math.imul(al4,bh2),mid+=Math.imul(ah4,bl2),hi+=Math.imul(ah4,bh2),lo+=Math.imul(al3,bl3),mid+=Math.imul(al3,bh3),mid+=Math.imul(ah3,bl3),hi+=Math.imul(ah3,bh3),lo+=Math.imul(al2,bl4),mid+=Math.imul(al2,bh4),mid+=Math.imul(ah2,bl4),hi+=Math.imul(ah2,bh4),lo+=Math.imul(al1,bl5),mid+=Math.imul(al1,bh5),mid+=Math.imul(ah1,bl5),hi+=Math.imul(ah1,bh5),lo+=Math.imul(al0,bl6),mid+=Math.imul(al0,bh6);var w6=c+lo+((8191&(mid+=Math.imul(ah0,bl6)))<<13);c=(hi+=Math.imul(ah0,bh6))+(mid>>>13)+(w6>>>26),w6&=67108863,lo=Math.imul(al7,bl0),mid=Math.imul(al7,bh0),mid+=Math.imul(ah7,bl0),hi=Math.imul(ah7,bh0),lo+=Math.imul(al6,bl1),mid+=Math.imul(al6,bh1),mid+=Math.imul(ah6,bl1),hi+=Math.imul(ah6,bh1),lo+=Math.imul(al5,bl2),mid+=Math.imul(al5,bh2),mid+=Math.imul(ah5,bl2),hi+=Math.imul(ah5,bh2),lo+=Math.imul(al4,bl3),mid+=Math.imul(al4,bh3),mid+=Math.imul(ah4,bl3),hi+=Math.imul(ah4,bh3),lo+=Math.imul(al3,bl4),mid+=Math.imul(al3,bh4),mid+=Math.imul(ah3,bl4),hi+=Math.imul(ah3,bh4),lo+=Math.imul(al2,bl5),mid+=Math.imul(al2,bh5),mid+=Math.imul(ah2,bl5),hi+=Math.imul(ah2,bh5),lo+=Math.imul(al1,bl6),mid+=Math.imul(al1,bh6),mid+=Math.imul(ah1,bl6),hi+=Math.imul(ah1,bh6),lo+=Math.imul(al0,bl7),mid+=Math.imul(al0,bh7);var w7=c+lo+((8191&(mid+=Math.imul(ah0,bl7)))<<13);c=(hi+=Math.imul(ah0,bh7))+(mid>>>13)+(w7>>>26),w7&=67108863,lo=Math.imul(al8,bl0),mid=Math.imul(al8,bh0),mid+=Math.imul(ah8,bl0),hi=Math.imul(ah8,bh0),lo+=Math.imul(al7,bl1),mid+=Math.imul(al7,bh1),mid+=Math.imul(ah7,bl1),hi+=Math.imul(ah7,bh1),lo+=Math.imul(al6,bl2),mid+=Math.imul(al6,bh2),mid+=Math.imul(ah6,bl2),hi+=Math.imul(ah6,bh2),lo+=Math.imul(al5,bl3),mid+=Math.imul(al5,bh3),mid+=Math.imul(ah5,bl3),hi+=Math.imul(ah5,bh3),lo+=Math.imul(al4,bl4),mid+=Math.imul(al4,bh4),mid+=Math.imul(ah4,bl4),hi+=Math.imul(ah4,bh4),lo+=Math.imul(al3,bl5),mid+=Math.imul(al3,bh5),mid+=Math.imul(ah3,bl5),hi+=Math.imul(ah3,bh5),lo+=Math.imul(al2,bl6),mid+=Math.imul(al2,bh6),mid+=Math.imul(ah2,bl6),hi+=Math.imul(ah2,bh6),lo+=Math.imul(al1,bl7),mid+=Math.imul(al1,bh7),mid+=Math.imul(ah1,bl7),hi+=Math.imul(ah1,bh7),lo+=Math.imul(al0,bl8),mid+=Math.imul(al0,bh8);var w8=c+lo+((8191&(mid+=Math.imul(ah0,bl8)))<<13);c=(hi+=Math.imul(ah0,bh8))+(mid>>>13)+(w8>>>26),w8&=67108863,lo=Math.imul(al9,bl0),mid=Math.imul(al9,bh0),mid+=Math.imul(ah9,bl0),hi=Math.imul(ah9,bh0),lo+=Math.imul(al8,bl1),mid+=Math.imul(al8,bh1),mid+=Math.imul(ah8,bl1),hi+=Math.imul(ah8,bh1),lo+=Math.imul(al7,bl2),mid+=Math.imul(al7,bh2),mid+=Math.imul(ah7,bl2),hi+=Math.imul(ah7,bh2),lo+=Math.imul(al6,bl3),mid+=Math.imul(al6,bh3),mid+=Math.imul(ah6,bl3),hi+=Math.imul(ah6,bh3),lo+=Math.imul(al5,bl4),mid+=Math.imul(al5,bh4),mid+=Math.imul(ah5,bl4),hi+=Math.imul(ah5,bh4),lo+=Math.imul(al4,bl5),mid+=Math.imul(al4,bh5),mid+=Math.imul(ah4,bl5),hi+=Math.imul(ah4,bh5),lo+=Math.imul(al3,bl6),mid+=Math.imul(al3,bh6),mid+=Math.imul(ah3,bl6),hi+=Math.imul(ah3,bh6),lo+=Math.imul(al2,bl7),mid+=Math.imul(al2,bh7),mid+=Math.imul(ah2,bl7),hi+=Math.imul(ah2,bh7),lo+=Math.imul(al1,bl8),mid+=Math.imul(al1,bh8),mid+=Math.imul(ah1,bl8),hi+=Math.imul(ah1,bh8),lo+=Math.imul(al0,bl9),mid+=Math.imul(al0,bh9);var w9=c+lo+((8191&(mid+=Math.imul(ah0,bl9)))<<13);c=(hi+=Math.imul(ah0,bh9))+(mid>>>13)+(w9>>>26),w9&=67108863,lo=Math.imul(al9,bl1),mid=Math.imul(al9,bh1),mid+=Math.imul(ah9,bl1),hi=Math.imul(ah9,bh1),lo+=Math.imul(al8,bl2),mid+=Math.imul(al8,bh2),mid+=Math.imul(ah8,bl2),hi+=Math.imul(ah8,bh2),lo+=Math.imul(al7,bl3),mid+=Math.imul(al7,bh3),mid+=Math.imul(ah7,bl3),hi+=Math.imul(ah7,bh3),lo+=Math.imul(al6,bl4),mid+=Math.imul(al6,bh4),mid+=Math.imul(ah6,bl4),hi+=Math.imul(ah6,bh4),lo+=Math.imul(al5,bl5),mid+=Math.imul(al5,bh5),mid+=Math.imul(ah5,bl5),hi+=Math.imul(ah5,bh5),lo+=Math.imul(al4,bl6),mid+=Math.imul(al4,bh6),mid+=Math.imul(ah4,bl6),hi+=Math.imul(ah4,bh6),lo+=Math.imul(al3,bl7),mid+=Math.imul(al3,bh7),mid+=Math.imul(ah3,bl7),hi+=Math.imul(ah3,bh7),lo+=Math.imul(al2,bl8),mid+=Math.imul(al2,bh8),mid+=Math.imul(ah2,bl8),hi+=Math.imul(ah2,bh8),lo+=Math.imul(al1,bl9),mid+=Math.imul(al1,bh9);var w10=c+lo+((8191&(mid+=Math.imul(ah1,bl9)))<<13);c=(hi+=Math.imul(ah1,bh9))+(mid>>>13)+(w10>>>26),w10&=67108863,lo=Math.imul(al9,bl2),mid=Math.imul(al9,bh2),mid+=Math.imul(ah9,bl2),hi=Math.imul(ah9,bh2),lo+=Math.imul(al8,bl3),mid+=Math.imul(al8,bh3),mid+=Math.imul(ah8,bl3),hi+=Math.imul(ah8,bh3),lo+=Math.imul(al7,bl4),mid+=Math.imul(al7,bh4),mid+=Math.imul(ah7,bl4),hi+=Math.imul(ah7,bh4),lo+=Math.imul(al6,bl5),mid+=Math.imul(al6,bh5),mid+=Math.imul(ah6,bl5),hi+=Math.imul(ah6,bh5),lo+=Math.imul(al5,bl6),mid+=Math.imul(al5,bh6),mid+=Math.imul(ah5,bl6),hi+=Math.imul(ah5,bh6),lo+=Math.imul(al4,bl7),mid+=Math.imul(al4,bh7),mid+=Math.imul(ah4,bl7),hi+=Math.imul(ah4,bh7),lo+=Math.imul(al3,bl8),mid+=Math.imul(al3,bh8),mid+=Math.imul(ah3,bl8),hi+=Math.imul(ah3,bh8),lo+=Math.imul(al2,bl9),mid+=Math.imul(al2,bh9);var w11=c+lo+((8191&(mid+=Math.imul(ah2,bl9)))<<13);c=(hi+=Math.imul(ah2,bh9))+(mid>>>13)+(w11>>>26),w11&=67108863,lo=Math.imul(al9,bl3),mid=Math.imul(al9,bh3),mid+=Math.imul(ah9,bl3),hi=Math.imul(ah9,bh3),lo+=Math.imul(al8,bl4),mid+=Math.imul(al8,bh4),mid+=Math.imul(ah8,bl4),hi+=Math.imul(ah8,bh4),lo+=Math.imul(al7,bl5),mid+=Math.imul(al7,bh5),mid+=Math.imul(ah7,bl5),hi+=Math.imul(ah7,bh5),lo+=Math.imul(al6,bl6),mid+=Math.imul(al6,bh6),mid+=Math.imul(ah6,bl6),hi+=Math.imul(ah6,bh6),lo+=Math.imul(al5,bl7),mid+=Math.imul(al5,bh7),mid+=Math.imul(ah5,bl7),hi+=Math.imul(ah5,bh7),lo+=Math.imul(al4,bl8),mid+=Math.imul(al4,bh8),mid+=Math.imul(ah4,bl8),hi+=Math.imul(ah4,bh8),lo+=Math.imul(al3,bl9),mid+=Math.imul(al3,bh9);var w12=c+lo+((8191&(mid+=Math.imul(ah3,bl9)))<<13);c=(hi+=Math.imul(ah3,bh9))+(mid>>>13)+(w12>>>26),w12&=67108863,lo=Math.imul(al9,bl4),mid=Math.imul(al9,bh4),mid+=Math.imul(ah9,bl4),hi=Math.imul(ah9,bh4),lo+=Math.imul(al8,bl5),mid+=Math.imul(al8,bh5),mid+=Math.imul(ah8,bl5),hi+=Math.imul(ah8,bh5),lo+=Math.imul(al7,bl6),mid+=Math.imul(al7,bh6),mid+=Math.imul(ah7,bl6),hi+=Math.imul(ah7,bh6),lo+=Math.imul(al6,bl7),mid+=Math.imul(al6,bh7),mid+=Math.imul(ah6,bl7),hi+=Math.imul(ah6,bh7),lo+=Math.imul(al5,bl8),mid+=Math.imul(al5,bh8),mid+=Math.imul(ah5,bl8),hi+=Math.imul(ah5,bh8),lo+=Math.imul(al4,bl9),mid+=Math.imul(al4,bh9);var w13=c+lo+((8191&(mid+=Math.imul(ah4,bl9)))<<13);c=(hi+=Math.imul(ah4,bh9))+(mid>>>13)+(w13>>>26),w13&=67108863,lo=Math.imul(al9,bl5),mid=Math.imul(al9,bh5),mid+=Math.imul(ah9,bl5),hi=Math.imul(ah9,bh5),lo+=Math.imul(al8,bl6),mid+=Math.imul(al8,bh6),mid+=Math.imul(ah8,bl6),hi+=Math.imul(ah8,bh6),lo+=Math.imul(al7,bl7),mid+=Math.imul(al7,bh7),mid+=Math.imul(ah7,bl7),hi+=Math.imul(ah7,bh7),lo+=Math.imul(al6,bl8),mid+=Math.imul(al6,bh8),mid+=Math.imul(ah6,bl8),hi+=Math.imul(ah6,bh8),lo+=Math.imul(al5,bl9),mid+=Math.imul(al5,bh9);var w14=c+lo+((8191&(mid+=Math.imul(ah5,bl9)))<<13);c=(hi+=Math.imul(ah5,bh9))+(mid>>>13)+(w14>>>26),w14&=67108863,lo=Math.imul(al9,bl6),mid=Math.imul(al9,bh6),mid+=Math.imul(ah9,bl6),hi=Math.imul(ah9,bh6),lo+=Math.imul(al8,bl7),mid+=Math.imul(al8,bh7),mid+=Math.imul(ah8,bl7),hi+=Math.imul(ah8,bh7),lo+=Math.imul(al7,bl8),mid+=Math.imul(al7,bh8),mid+=Math.imul(ah7,bl8),hi+=Math.imul(ah7,bh8),lo+=Math.imul(al6,bl9),mid+=Math.imul(al6,bh9);var w15=c+lo+((8191&(mid+=Math.imul(ah6,bl9)))<<13);c=(hi+=Math.imul(ah6,bh9))+(mid>>>13)+(w15>>>26),w15&=67108863,lo=Math.imul(al9,bl7),mid=Math.imul(al9,bh7),mid+=Math.imul(ah9,bl7),hi=Math.imul(ah9,bh7),lo+=Math.imul(al8,bl8),mid+=Math.imul(al8,bh8),mid+=Math.imul(ah8,bl8),hi+=Math.imul(ah8,bh8),lo+=Math.imul(al7,bl9),mid+=Math.imul(al7,bh9);var w16=c+lo+((8191&(mid+=Math.imul(ah7,bl9)))<<13);c=(hi+=Math.imul(ah7,bh9))+(mid>>>13)+(w16>>>26),w16&=67108863,lo=Math.imul(al9,bl8),mid=Math.imul(al9,bh8),mid+=Math.imul(ah9,bl8),hi=Math.imul(ah9,bh8),lo+=Math.imul(al8,bl9),mid+=Math.imul(al8,bh9);var w17=c+lo+((8191&(mid+=Math.imul(ah8,bl9)))<<13);c=(hi+=Math.imul(ah8,bh9))+(mid>>>13)+(w17>>>26),w17&=67108863,lo=Math.imul(al9,bl9),mid=Math.imul(al9,bh9);var w18=c+lo+((8191&(mid+=Math.imul(ah9,bl9)))<<13);return c=(hi=Math.imul(ah9,bh9))+(mid>>>13)+(w18>>>26),w18&=67108863,o[0]=w0,o[1]=w1,o[2]=w2,o[3]=w3,o[4]=w4,o[5]=w5,o[6]=w6,o[7]=w7,o[8]=w8,o[9]=w9,o[10]=w10,o[11]=w11,o[12]=w12,o[13]=w13,o[14]=w14,o[15]=w15,o[16]=w16,o[17]=w17,o[18]=w18,0!==c&&(o[19]=c,out.length++),out}},function(module,exports,__webpack_require__){"use strict";function ECPointG(){this.x=BN.fromBuffer(Buffer.from("79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798","hex")),this.y=BN.fromBuffer(Buffer.from("483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8","hex")),this.inf=!1,this._precompute()}var Buffer=__webpack_require__(1).Buffer,BN=__webpack_require__(21),ECPoint=__webpack_require__(79),ECJPoint=__webpack_require__(80);ECPointG.prototype._precompute=function(){for(var ecpoint=new ECPoint(this.x,this.y),points=new Array(1+Math.ceil(64.25)),acc=points[0]=ecpoint,i=1;i<points.length;++i){for(var j=0;j<4;j++)acc=acc.dbl();points[i]=acc}this.precomputed={naf:ecpoint._getNAFPoints(7),doubles:{step:4,points:points,negpoints:points.map(function(p){return p.neg()})}}},ECPointG.prototype.mul=function(num){for(var step=this.precomputed.doubles.step,points=this.precomputed.doubles.points,negpoints=this.precomputed.doubles.negpoints,naf=num.getNAF(1),I=((1<<step+1)-(step%2==0?2:1))/3,repr=[],j=0;j<naf.length;j+=step){for(var nafW=0,k=j+step-1;k>=j;k--)nafW=(nafW<<1)+naf[k];repr.push(nafW)}for(var a=new ECJPoint(null,null,null),b=new ECJPoint(null,null,null),i=I;i>0;i--){for(var jj=0;jj<repr.length;jj++)repr[jj]===i?b=b.mixedAdd(points[jj]):repr[jj]===-i&&(b=b.mixedAdd(negpoints[jj]));a=a.add(b)}return ECPoint.fromECJPoint(a)},ECPointG.prototype.mulAdd=function(k1,p2,k2){for(var nafPointsP1=this.precomputed.naf,nafPointsP2=p2._getNAFPoints1(),wnd=[nafPointsP1.points,nafPointsP2.points],naf=[k1.getNAF(nafPointsP1.wnd),k2.getNAF(nafPointsP2.wnd)],acc=new ECJPoint(null,null,null),tmp=[null,null],i=Math.max(naf[0].length,naf[1].length);i>=0;i--){for(var k=0;i>=0&&(tmp[0]=0|naf[0][i],tmp[1]=0|naf[1][i],0===tmp[0]&&0===tmp[1]);++k,--i);if(i>=0&&(k+=1),acc=acc.dblp(k),i<0)break;for(var jj=0;jj<2;jj++){var p,z=tmp[jj];0!==z&&(z>0?p=wnd[jj][z>>1]:z<0&&(p=wnd[jj][-z>>1].neg()),acc=void 0===p.z?acc.mixedAdd(p):acc.add(p))}}return acc},module.exports=new ECPointG},function(module,exports,__webpack_require__){"use strict";const whilst=__webpack_require__(220),Buffer=__webpack_require__(1).Buffer,hmac=__webpack_require__(51),cipherMap={"AES-128":{ivSize:16,keySize:16},"AES-256":{ivSize:16,keySize:32},Blowfish:{ivSize:8,cipherKeySize:32}};module.exports=((cipherType,hash,secret,callback)=>{const cipher=cipherMap[cipherType];if(!cipher)return callback(new Error("unkown cipherType passed"));if(!hash)return callback(new Error("unkown hashType passed"));const cipherKeySize=cipher.keySize,ivSize=cipher.ivSize,seed=Buffer.from("key expansion"),resultLength=2*(ivSize+cipherKeySize+20);hmac.create(hash,secret,(err,m)=>{if(err)return callback(err);m.digest(seed,(err,a)=>{if(err)return callback(err);let result=[],j=0;whilst(()=>j<resultLength,function(cb){m.digest(Buffer.concat([a,seed]),(err,b)=>{if(err)return cb(err);let todo=b.length;j+todo>resultLength&&(todo=resultLength-j),result.push(b),j+=todo,m.digest(a,(err,_a)=>{if(err)return cb(err);a=_a,cb()})})},function(err){if(err)return callback(err);const half=resultLength/2,resultBuffer=Buffer.concat(result),r1=resultBuffer.slice(0,half),r2=resultBuffer.slice(half,resultLength),createKey=res=>({iv:res.slice(0,ivSize),cipherKey:res.slice(ivSize,ivSize+cipherKeySize),macKey:res.slice(ivSize+cipherKeySize)});callback(null,{k1:createKey(r1),k2:createKey(r2)})})})})})},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(test,iteratee,callback){callback=(0,_onlyOnce2.default)(callback||_noop2.default);var _iteratee=(0,_wrapAsync2.default)(iteratee);if(!test())return callback(null);var next=function(err){if(err)return callback(err);if(test())return _iteratee(next);var args=(0,_slice2.default)(arguments,1);callback.apply(null,[null].concat(args))};_iteratee(next)};var _noop2=_interopRequireDefault(__webpack_require__(82)),_slice2=_interopRequireDefault(__webpack_require__(19)),_onlyOnce2=_interopRequireDefault(__webpack_require__(83)),_wrapAsync2=_interopRequireDefault(__webpack_require__(84));module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function invokeCallback(callback,error,value){try{callback(error,value)}catch(e){(0,_setImmediate2.default)(rethrow,e)}}function rethrow(error){throw error}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(func){return(0,_initialParams2.default)(function(args,callback){var result;try{result=func.apply(this,args)}catch(e){return callback(e)}(0,_isObject2.default)(result)&&"function"==typeof result.then?result.then(function(value){invokeCallback(callback,null,value)},function(err){invokeCallback(callback,err.message?err:new Error(err))}):callback(null,result)})};var _isObject2=_interopRequireDefault(__webpack_require__(222)),_initialParams2=_interopRequireDefault(__webpack_require__(223)),_setImmediate2=_interopRequireDefault(__webpack_require__(65));module.exports=exports.default},function(module,exports){module.exports=function(value){var type=typeof value;return null!=value&&("object"==type||"function"==type)}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(fn){return function(){var args=(0,_slice2.default)(arguments),callback=args.pop();fn.call(this,args,callback)}};var _slice2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__(19));module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";const ecdh=__webpack_require__(225);module.exports=((curve,callback)=>{ecdh.generateEphmeralKeyPair(curve,callback)})},function(module,exports,__webpack_require__){"use strict";function marshalPublicKey(jwk){const byteLen=curveLengths[jwk.crv];return Buffer.concat([Buffer.from([4]),toBn(jwk.x).toArrayLike(Buffer,"be",byteLen),toBn(jwk.y).toArrayLike(Buffer,"be",byteLen)],1+2*byteLen)}function unmarshalPublicKey(curve,key){const byteLen=curveLengths[curve];if(!key.slice(0,1).equals(Buffer.from([4])))throw new Error("Invalid key format");const x=new BN(key.slice(1,byteLen+1)),y=new BN(key.slice(1+byteLen));return{kty:"EC",crv:curve,x:toBase64(x,byteLen),y:toBase64(y,byteLen),ext:!0}}function unmarshalPrivateKey(curve,key){const result=unmarshalPublicKey(curve,key.public);return result.d=toBase64(new BN(key.private)),result}const webcrypto=__webpack_require__(28)(),nodeify=__webpack_require__(15),BN=__webpack_require__(8).bignum,Buffer=__webpack_require__(1).Buffer,util=__webpack_require__(72),toBase64=util.toBase64,toBn=util.toBn,bits={"P-256":256,"P-384":384,"P-521":521};exports.generateEphmeralKeyPair=function(curve,callback){nodeify(webcrypto.subtle.generateKey({name:"ECDH",namedCurve:curve},!0,["deriveBits"]).then(pair=>{const genSharedKey=(theirPub,forcePrivate,cb)=>{"function"==typeof forcePrivate&&(cb=forcePrivate,forcePrivate=void 0);let privateKey;privateKey=forcePrivate?webcrypto.subtle.importKey("jwk",unmarshalPrivateKey(curve,forcePrivate),{name:"ECDH",namedCurve:curve},!1,["deriveBits"]):Promise.resolve(pair.privateKey);const keys=Promise.all([webcrypto.subtle.importKey("jwk",unmarshalPublicKey(curve,theirPub),{name:"ECDH",namedCurve:curve},!1,[]),privateKey]);nodeify(keys.then(keys=>webcrypto.subtle.deriveBits({name:"ECDH",namedCurve:curve,public:keys[0]},keys[1],bits[curve])).then(bits=>Buffer.from(bits)),cb)};return webcrypto.subtle.exportKey("jwk",pair.publicKey).then(publicKey=>({key:marshalPublicKey(publicKey),genSharedKey:genSharedKey}))}),callback)};const curveLengths={"P-256":32,"P-384":48,"P-521":66}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(tasks,callback){function nextTask(args){var task=(0,_wrapAsync2.default)(tasks[taskIndex++]);args.push((0,_onlyOnce2.default)(next)),task.apply(null,args)}function next(err){if(err||taskIndex===tasks.length)return callback.apply(null,arguments);nextTask((0,_slice2.default)(arguments,1))}if(callback=(0,_once2.default)(callback||_noop2.default),!(0,_isArray2.default)(tasks))return callback(new Error("First argument to waterfall must be an array of functions"));if(!tasks.length)return callback();var taskIndex=0;nextTask([])};var _isArray2=_interopRequireDefault(__webpack_require__(227)),_noop2=_interopRequireDefault(__webpack_require__(82)),_once2=_interopRequireDefault(__webpack_require__(228)),_slice2=_interopRequireDefault(__webpack_require__(19)),_onlyOnce2=_interopRequireDefault(__webpack_require__(83)),_wrapAsync2=_interopRequireDefault(__webpack_require__(84));module.exports=exports.default},function(module,exports){var isArray=Array.isArray;module.exports=isArray},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(fn){return function(){if(null!==fn){var callFn=fn;fn=null,callFn.apply(this,arguments)}}},module.exports=exports.default},function(module,exports){module.exports=function(){for(var target={},i=0;i<arguments.length;i++){var source=arguments[i];for(var key in source)hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target};var hasOwnProperty=Object.prototype.hasOwnProperty},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function stringToStringTuples(str){const tuples=[],parts=str.split("/").slice(1);if(1===parts.length&&""===parts[0])return[];for(let p=0;p<parts.length;p++){const part=parts[p];if(0!==protocols(part).size){if(++p>=parts.length)throw ParseError("invalid address: "+str);tuples.push([part,parts[p]])}else tuples.push([part])}return tuples}function stringTuplesToString(tuples){const parts=[];return map(tuples,function(tup){const proto=protoFromTuple(tup);parts.push(proto.name),tup.length>1&&parts.push(tup[1])}),"/"+parts.join("/")}function stringTuplesToTuples(tuples){return map(tuples,function(tup){Array.isArray(tup)||(tup=[tup]);const proto=protoFromTuple(tup);return tup.length>1?[proto.code,convert.toBuffer(proto.code,tup[1])]:[proto.code]})}function tuplesToStringTuples(tuples){return map(tuples,function(tup){const proto=protoFromTuple(tup);return tup.length>1?[proto.code,convert.toString(proto.code,tup[1])]:[proto.code]})}function tuplesToBuffer(tuples){return fromBuffer(Buffer.concat(map(tuples,function(tup){const proto=protoFromTuple(tup);let buf=new Buffer(varint.encode(proto.code));return tup.length>1&&(buf=Buffer.concat([buf,tup[1]])),buf})))}function sizeForAddr(p,addr){return p.size>0?p.size/8:0===p.size?0:varint.decode(addr)+varint.decode.bytes}function bufferToTuples(buf){const tuples=[];let i=0;for(;i<buf.length;){const code=varint.decode(buf,i),n=varint.decode.bytes,size=sizeForAddr(protocols(code),buf.slice(i+n));if(0===size){tuples.push([code]),i+=n;continue}const addr=buf.slice(i+n,i+n+size);if((i+=size+n)>buf.length)throw ParseError("Invalid address buffer: "+buf.toString("hex"));tuples.push([code,addr])}return tuples}function stringToBuffer(str){return tuplesToBuffer(stringTuplesToTuples(stringToStringTuples(str=cleanPath(str))))}function fromBuffer(buf){const err=validateBuffer(buf);if(err)throw err;return new Buffer(buf)}function validateBuffer(buf){try{bufferToTuples(buf)}catch(err){return err}}function cleanPath(str){return"/"+filter(str.trim().split("/")).join("/")}function ParseError(str){return new Error("Error parsing address: "+str)}function protoFromTuple(tup){return protocols(tup[0])}const map=__webpack_require__(37),filter=__webpack_require__(231),convert=__webpack_require__(232),protocols=__webpack_require__(38),varint=__webpack_require__(3);module.exports={stringToStringTuples:stringToStringTuples,stringTuplesToString:stringTuplesToString,tuplesToStringTuples:tuplesToStringTuples,stringTuplesToTuples:stringTuplesToTuples,bufferToTuples:bufferToTuples,tuplesToBuffer:tuplesToBuffer,bufferToString:function(buf){return stringTuplesToString(tuplesToStringTuples(bufferToTuples(buf)))},stringToBuffer:stringToBuffer,fromString:function(str){return stringToBuffer(str)},fromBuffer:fromBuffer,validateBuffer:validateBuffer,isValidBuffer:function(buf){return void 0===validateBuffer(buf)},cleanPath:cleanPath,ParseError:ParseError,protoFromTuple:protoFromTuple,sizeForAddr:sizeForAddr}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){(function(global,module){function arrayFilter(array,predicate){for(var index=-1,length=array?array.length:0,resIndex=0,result=[];++index<length;){var value=array[index];predicate(value,index,array)&&(result[resIndex++]=value)}return result}function arraySome(array,predicate){for(var index=-1,length=array?array.length:0;++index<length;)if(predicate(array[index],index,array))return!0;return!1}function baseProperty(key){return function(object){return null==object?void 0:object[key]}}function baseTimes(n,iteratee){for(var index=-1,result=Array(n);++index<n;)result[index]=iteratee(index);return result}function getValue(object,key){return null==object?void 0:object[key]}function isHostObject(value){var result=!1;if(null!=value&&"function"!=typeof value.toString)try{result=!!(value+"")}catch(e){}return result}function mapToArray(map){var index=-1,result=Array(map.size);return map.forEach(function(value,key){result[++index]=[key,value]}),result}function setToArray(set){var index=-1,result=Array(set.size);return set.forEach(function(value){result[++index]=value}),result}function Hash(entries){var index=-1,length=entries?entries.length:0;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function ListCache(entries){var index=-1,length=entries?entries.length:0;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function MapCache(entries){var index=-1,length=entries?entries.length:0;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function SetCache(values){var index=-1,length=values?values.length:0;for(this.__data__=new MapCache;++index<length;)this.add(values[index])}function Stack(entries){this.__data__=new ListCache(entries)}function arrayLikeKeys(value,inherited){var result=isArray(value)||isArguments(value)?baseTimes(value.length,String):[],length=result.length,skipIndexes=!!length;for(var key in value)!inherited&&!hasOwnProperty.call(value,key)||skipIndexes&&("length"==key||isIndex(key,length))||result.push(key);return result}function assocIndexOf(array,key){for(var length=array.length;length--;)if(eq(array[length][0],key))return length;return-1}function baseFilter(collection,predicate){var result=[];return baseEach(collection,function(value,index,collection){predicate(value,index,collection)&&result.push(value)}),result}function baseGet(object,path){for(var index=0,length=(path=isKey(path,object)?[path]:castPath(path)).length;null!=object&&index<length;)object=object[toKey(path[index++])];return index&&index==length?object:void 0}function baseHasIn(object,key){return null!=object&&key in Object(object)}function baseIsEqual(value,other,customizer,bitmask,stack){return value===other||(null==value||null==other||!isObject(value)&&!isObjectLike(other)?value!==value&&other!==other:baseIsEqualDeep(value,other,baseIsEqual,customizer,bitmask,stack))}function baseIsEqualDeep(object,other,equalFunc,customizer,bitmask,stack){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=arrayTag,othTag=arrayTag;objIsArr||(objTag=(objTag=getTag(object))==argsTag?objectTag:objTag),othIsArr||(othTag=(othTag=getTag(other))==argsTag?objectTag:othTag);var objIsObj=objTag==objectTag&&!isHostObject(object),othIsObj=othTag==objectTag&&!isHostObject(other),isSameTag=objTag==othTag;if(isSameTag&&!objIsObj)return stack||(stack=new Stack),objIsArr||isTypedArray(object)?equalArrays(object,other,equalFunc,customizer,bitmask,stack):equalByTag(object,other,objTag,equalFunc,customizer,bitmask,stack);if(!(bitmask&PARTIAL_COMPARE_FLAG)){var objIsWrapped=objIsObj&&hasOwnProperty.call(object,"__wrapped__"),othIsWrapped=othIsObj&&hasOwnProperty.call(other,"__wrapped__");if(objIsWrapped||othIsWrapped){var objUnwrapped=objIsWrapped?object.value():object,othUnwrapped=othIsWrapped?other.value():other;return stack||(stack=new Stack),equalFunc(objUnwrapped,othUnwrapped,customizer,bitmask,stack)}}return!!isSameTag&&(stack||(stack=new Stack),equalObjects(object,other,equalFunc,customizer,bitmask,stack))}function baseIsMatch(object,source,matchData,customizer){var index=matchData.length,length=index,noCustomizer=!customizer;if(null==object)return!length;for(object=Object(object);index--;){var data=matchData[index];if(noCustomizer&&data[2]?data[1]!==object[data[0]]:!(data[0]in object))return!1}for(;++index<length;){var key=(data=matchData[index])[0],objValue=object[key],srcValue=data[1];if(noCustomizer&&data[2]){if(void 0===objValue&&!(key in object))return!1}else{var stack=new Stack;if(customizer)var result=customizer(objValue,srcValue,key,object,source,stack);if(!(void 0===result?baseIsEqual(srcValue,objValue,customizer,UNORDERED_COMPARE_FLAG|PARTIAL_COMPARE_FLAG,stack):result))return!1}}return!0}function baseIsNative(value){return!(!isObject(value)||isMasked(value))&&(isFunction(value)||isHostObject(value)?reIsNative:reIsHostCtor).test(toSource(value))}function baseIteratee(value){return"function"==typeof value?value:null==value?identity:"object"==typeof value?isArray(value)?baseMatchesProperty(value[0],value[1]):baseMatches(value):property(value)}function baseKeys(object){if(!isPrototype(object))return nativeKeys(object);var result=[];for(var key in Object(object))hasOwnProperty.call(object,key)&&"constructor"!=key&&result.push(key);return result}function baseMatches(source){var matchData=getMatchData(source);return 1==matchData.length&&matchData[0][2]?matchesStrictComparable(matchData[0][0],matchData[0][1]):function(object){return object===source||baseIsMatch(object,source,matchData)}}function baseMatchesProperty(path,srcValue){return isKey(path)&&isStrictComparable(srcValue)?matchesStrictComparable(toKey(path),srcValue):function(object){var objValue=get(object,path);return void 0===objValue&&objValue===srcValue?hasIn(object,path):baseIsEqual(srcValue,objValue,void 0,UNORDERED_COMPARE_FLAG|PARTIAL_COMPARE_FLAG)}}function basePropertyDeep(path){return function(object){return baseGet(object,path)}}function baseToString(value){if("string"==typeof value)return value;if(isSymbol(value))return symbolToString?symbolToString.call(value):"";var result=value+"";return"0"==result&&1/value==-INFINITY?"-0":result}function castPath(value){return isArray(value)?value:stringToPath(value)}function equalArrays(array,other,equalFunc,customizer,bitmask,stack){var isPartial=bitmask&PARTIAL_COMPARE_FLAG,arrLength=array.length,othLength=other.length;if(arrLength!=othLength&&!(isPartial&&othLength>arrLength))return!1;var stacked=stack.get(array);if(stacked&&stack.get(other))return stacked==other;var index=-1,result=!0,seen=bitmask&UNORDERED_COMPARE_FLAG?new SetCache:void 0;for(stack.set(array,other),stack.set(other,array);++index<arrLength;){var arrValue=array[index],othValue=other[index];if(customizer)var compared=isPartial?customizer(othValue,arrValue,index,other,array,stack):customizer(arrValue,othValue,index,array,other,stack);if(void 0!==compared){if(compared)continue;result=!1;break}if(seen){if(!arraySome(other,function(othValue,othIndex){if(!seen.has(othIndex)&&(arrValue===othValue||equalFunc(arrValue,othValue,customizer,bitmask,stack)))return seen.add(othIndex)})){result=!1;break}}else if(arrValue!==othValue&&!equalFunc(arrValue,othValue,customizer,bitmask,stack)){result=!1;break}}return stack.delete(array),stack.delete(other),result}function equalByTag(object,other,tag,equalFunc,customizer,bitmask,stack){switch(tag){case dataViewTag:if(object.byteLength!=other.byteLength||object.byteOffset!=other.byteOffset)return!1;object=object.buffer,other=other.buffer;case arrayBufferTag:return!(object.byteLength!=other.byteLength||!equalFunc(new Uint8Array(object),new Uint8Array(other)));case boolTag:case dateTag:case numberTag:return eq(+object,+other);case errorTag:return object.name==other.name&&object.message==other.message;case regexpTag:case stringTag:return object==other+"";case mapTag:var convert=mapToArray;case setTag:var isPartial=bitmask&PARTIAL_COMPARE_FLAG;if(convert||(convert=setToArray),object.size!=other.size&&!isPartial)return!1;var stacked=stack.get(object);if(stacked)return stacked==other;bitmask|=UNORDERED_COMPARE_FLAG,stack.set(object,other);var result=equalArrays(convert(object),convert(other),equalFunc,customizer,bitmask,stack);return stack.delete(object),result;case symbolTag:if(symbolValueOf)return symbolValueOf.call(object)==symbolValueOf.call(other)}return!1}function equalObjects(object,other,equalFunc,customizer,bitmask,stack){var isPartial=bitmask&PARTIAL_COMPARE_FLAG,objProps=keys(object),objLength=objProps.length;if(objLength!=keys(other).length&&!isPartial)return!1;for(var index=objLength;index--;){var key=objProps[index];if(!(isPartial?key in other:hasOwnProperty.call(other,key)))return!1}var stacked=stack.get(object);if(stacked&&stack.get(other))return stacked==other;var result=!0;stack.set(object,other),stack.set(other,object);for(var skipCtor=isPartial;++index<objLength;){var objValue=object[key=objProps[index]],othValue=other[key];if(customizer)var compared=isPartial?customizer(othValue,objValue,key,other,object,stack):customizer(objValue,othValue,key,object,other,stack);if(!(void 0===compared?objValue===othValue||equalFunc(objValue,othValue,customizer,bitmask,stack):compared)){result=!1;break}skipCtor||(skipCtor="constructor"==key)}if(result&&!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;objCtor!=othCtor&&"constructor"in object&&"constructor"in other&&!("function"==typeof objCtor&&objCtor instanceof objCtor&&"function"==typeof othCtor&&othCtor instanceof othCtor)&&(result=!1)}return stack.delete(object),stack.delete(other),result}function getMapData(map,key){var data=map.__data__;return isKeyable(key)?data["string"==typeof key?"string":"hash"]:data.map}function getMatchData(object){for(var result=keys(object),length=result.length;length--;){var key=result[length],value=object[key];result[length]=[key,value,isStrictComparable(value)]}return result}function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:void 0}function hasPath(object,path,hasFunc){for(var result,index=-1,length=(path=isKey(path,object)?[path]:castPath(path)).length;++index<length;){var key=toKey(path[index]);if(!(result=null!=object&&hasFunc(object,key)))break;object=object[key]}return result||!!(length=object?object.length:0)&&isLength(length)&&isIndex(key,length)&&(isArray(object)||isArguments(object))}function isIndex(value,length){return!!(length=null==length?MAX_SAFE_INTEGER:length)&&("number"==typeof value||reIsUint.test(value))&&value>-1&&value%1==0&&value<length}function isKey(value,object){if(isArray(value))return!1;var type=typeof value;return!("number"!=type&&"symbol"!=type&&"boolean"!=type&&null!=value&&!isSymbol(value))||(reIsPlainProp.test(value)||!reIsDeepProp.test(value)||null!=object&&value in Object(object))}function isKeyable(value){var type=typeof value;return"string"==type||"number"==type||"symbol"==type||"boolean"==type?"__proto__"!==value:null===value}function isMasked(func){return!!maskSrcKey&&maskSrcKey in func}function isPrototype(value){var Ctor=value&&value.constructor;return value===("function"==typeof Ctor&&Ctor.prototype||objectProto)}function isStrictComparable(value){return value===value&&!isObject(value)}function matchesStrictComparable(key,srcValue){return function(object){return null!=object&&(object[key]===srcValue&&(void 0!==srcValue||key in Object(object)))}}function toKey(value){if("string"==typeof value||isSymbol(value))return value;var result=value+"";return"0"==result&&1/value==-INFINITY?"-0":result}function toSource(func){if(null!=func){try{return funcToString.call(func)}catch(e){}try{return func+""}catch(e){}}return""}function memoize(func,resolver){if("function"!=typeof func||resolver&&"function"!=typeof resolver)throw new TypeError(FUNC_ERROR_TEXT);var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key))return cache.get(key);var result=func.apply(this,args);return memoized.cache=cache.set(key,result),result};return memoized.cache=new(memoize.Cache||MapCache),memoized}function eq(value,other){return value===other||value!==value&&other!==other}function isArguments(value){return isArrayLikeObject(value)&&hasOwnProperty.call(value,"callee")&&(!propertyIsEnumerable.call(value,"callee")||objectToString.call(value)==argsTag)}function isArrayLike(value){return null!=value&&isLength(value.length)&&!isFunction(value)}function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value)}function isFunction(value){var tag=isObject(value)?objectToString.call(value):"";return tag==funcTag||tag==genTag}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function isObjectLike(value){return!!value&&"object"==typeof value}function isSymbol(value){return"symbol"==typeof value||isObjectLike(value)&&objectToString.call(value)==symbolTag}function toString(value){return null==value?"":baseToString(value)}function get(object,path,defaultValue){var result=null==object?void 0:baseGet(object,path);return void 0===result?defaultValue:result}function hasIn(object,path){return null!=object&&hasPath(object,path,baseHasIn)}function keys(object){return isArrayLike(object)?arrayLikeKeys(object):baseKeys(object)}function identity(value){return value}function property(path){return isKey(path)?baseProperty(toKey(path)):basePropertyDeep(path)}var LARGE_ARRAY_SIZE=200,FUNC_ERROR_TEXT="Expected a function",HASH_UNDEFINED="__lodash_hash_undefined__",UNORDERED_COMPARE_FLAG=1,PARTIAL_COMPARE_FLAG=2,INFINITY=1/0,MAX_SAFE_INTEGER=9007199254740991,argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,reLeadingDot=/^\./,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reEscapeChar=/\\(\\)?/g,reIsHostCtor=/^\[object .+?Constructor\]$/,reIsUint=/^(?:0|[1-9]\d*)$/,typedArrayTags={};typedArrayTags["[object Float32Array]"]=typedArrayTags["[object Float64Array]"]=typedArrayTags["[object Int8Array]"]=typedArrayTags["[object Int16Array]"]=typedArrayTags["[object Int32Array]"]=typedArrayTags["[object Uint8Array]"]=typedArrayTags["[object Uint8ClampedArray]"]=typedArrayTags["[object Uint16Array]"]=typedArrayTags["[object Uint32Array]"]=!0,typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags["[object WeakMap]"]=!1;var freeGlobal="object"==typeof global&&global&&global.Object===Object&&global,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),freeExports="object"==typeof exports&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&"object"==typeof module&&module&&!module.nodeType&&module,freeProcess=freeModule&&freeModule.exports===freeExports&&freeGlobal.process,nodeUtil=function(){try{return freeProcess&&freeProcess.binding("util")}catch(e){}}(),nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,arrayProto=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype,coreJsData=root["__core-js_shared__"],maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return uid?"Symbol(src)_1."+uid:""}(),funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectToString=objectProto.toString,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Symbol=root.Symbol,Uint8Array=root.Uint8Array,propertyIsEnumerable=objectProto.propertyIsEnumerable,splice=arrayProto.splice,nativeKeys=function(func,transform){return function(arg){return func(transform(arg))}}(Object.keys,Object),DataView=getNative(root,"DataView"),Map=getNative(root,"Map"),Promise=getNative(root,"Promise"),Set=getNative(root,"Set"),WeakMap=getNative(root,"WeakMap"),nativeCreate=getNative(Object,"create"),dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map),promiseCtorString=toSource(Promise),setCtorString=toSource(Set),weakMapCtorString=toSource(WeakMap),symbolProto=Symbol?Symbol.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;Hash.prototype.clear=function(){this.__data__=nativeCreate?nativeCreate(null):{}},Hash.prototype.delete=function(key){return this.has(key)&&delete this.__data__[key]},Hash.prototype.get=function(key){var data=this.__data__;if(nativeCreate){var result=data[key];return result===HASH_UNDEFINED?void 0:result}return hasOwnProperty.call(data,key)?data[key]:void 0},Hash.prototype.has=function(key){var data=this.__data__;return nativeCreate?void 0!==data[key]:hasOwnProperty.call(data,key)},Hash.prototype.set=function(key,value){return this.__data__[key]=nativeCreate&&void 0===value?HASH_UNDEFINED:value,this},ListCache.prototype.clear=function(){this.__data__=[]},ListCache.prototype.delete=function(key){var data=this.__data__,index=assocIndexOf(data,key);return!(index<0||(index==data.length-1?data.pop():splice.call(data,index,1),0))},ListCache.prototype.get=function(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?void 0:data[index][1]},ListCache.prototype.has=function(key){return assocIndexOf(this.__data__,key)>-1},ListCache.prototype.set=function(key,value){var data=this.__data__,index=assocIndexOf(data,key);return index<0?data.push([key,value]):data[index][1]=value,this},MapCache.prototype.clear=function(){this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}},MapCache.prototype.delete=function(key){return getMapData(this,key).delete(key)},MapCache.prototype.get=function(key){return getMapData(this,key).get(key)},MapCache.prototype.has=function(key){return getMapData(this,key).has(key)},MapCache.prototype.set=function(key,value){return getMapData(this,key).set(key,value),this},SetCache.prototype.add=SetCache.prototype.push=function(value){return this.__data__.set(value,HASH_UNDEFINED),this},SetCache.prototype.has=function(value){return this.__data__.has(value)},Stack.prototype.clear=function(){this.__data__=new ListCache},Stack.prototype.delete=function(key){return this.__data__.delete(key)},Stack.prototype.get=function(key){return this.__data__.get(key)},Stack.prototype.has=function(key){return this.__data__.has(key)},Stack.prototype.set=function(key,value){var cache=this.__data__;if(cache instanceof ListCache){var pairs=cache.__data__;if(!Map||pairs.length<LARGE_ARRAY_SIZE-1)return pairs.push([key,value]),this;cache=this.__data__=new MapCache(pairs)}return cache.set(key,value),this};var baseEach=function(eachFunc,fromRight){return function(collection,iteratee){if(null==collection)return collection;if(!isArrayLike(collection))return eachFunc(collection,iteratee);for(var length=collection.length,index=fromRight?length:-1,iterable=Object(collection);(fromRight?index--:++index<length)&&!1!==iteratee(iterable[index],index,iterable););return collection}}(function(object,iteratee){return object&&baseFor(object,iteratee,keys)}),baseFor=function(fromRight){return function(object,iteratee,keysFunc){for(var index=-1,iterable=Object(object),props=keysFunc(object),length=props.length;length--;){var key=props[fromRight?length:++index];if(!1===iteratee(iterable[key],key,iterable))break}return object}}(),getTag=function(value){return objectToString.call(value)};(DataView&&getTag(new DataView(new ArrayBuffer(1)))!=dataViewTag||Map&&getTag(new Map)!=mapTag||Promise&&"[object Promise]"!=getTag(Promise.resolve())||Set&&getTag(new Set)!=setTag||WeakMap&&"[object WeakMap]"!=getTag(new WeakMap))&&(getTag=function(value){var result=objectToString.call(value),Ctor=result==objectTag?value.constructor:void 0,ctorString=Ctor?toSource(Ctor):void 0;if(ctorString)switch(ctorString){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag;case promiseCtorString:return"[object Promise]";case setCtorString:return setTag;case weakMapCtorString:return"[object WeakMap]"}return result});var stringToPath=memoize(function(string){string=toString(string);var result=[];return reLeadingDot.test(string)&&result.push(""),string.replace(rePropName,function(match,number,quote,string){result.push(quote?string.replace(reEscapeChar,"$1"):number||match)}),result});memoize.Cache=MapCache;var isArray=Array.isArray,isTypedArray=nodeIsTypedArray?function(func){return function(value){return func(value)}}(nodeIsTypedArray):function(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[objectToString.call(value)]};module.exports=function(collection,predicate){return(isArray(collection)?arrayFilter:baseFilter)(collection,baseIteratee(predicate,3))}}).call(exports,__webpack_require__(4),__webpack_require__(20)(module))},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function Convert(proto,a){return a instanceof Buffer?Convert.toString(proto,a):Convert.toBuffer(proto,a)}function port2buf(port){const buf=new Buffer(2);return buf.writeUInt16BE(port,0),buf}function buf2port(buf){return buf.readUInt16BE(0)}function str2buf(str){const buf=new Buffer(str),size=new Buffer(varint.encode(buf.length));return Buffer.concat([size,buf])}function buf2str(buf){const size=varint.decode(buf);if((buf=buf.slice(varint.decode.bytes)).length!==size)throw new Error("inconsistent lengths");return buf.toString()}function mh2buf(hash){const mh=new Buffer(bs58.decode(hash)),size=new Buffer(varint.encode(mh.length));return Buffer.concat([size,mh])}function buf2mh(buf){const size=varint.decode(buf),address=buf.slice(varint.decode.bytes);if(address.length!==size)throw new Error("inconsistent lengths");return bs58.encode(address)}const ip=__webpack_require__(233),protocols=__webpack_require__(38),bs58=__webpack_require__(26),varint=__webpack_require__(3);module.exports=Convert,Convert.toString=function(proto,buf){switch((proto=protocols(proto)).code){case 4:case 41:return ip.toString(buf);case 6:case 17:case 33:case 132:return buf2port(buf);case 53:case 54:case 55:return buf2str(buf);case 421:return buf2mh(buf);default:return buf.toString("hex")}},Convert.toBuffer=function(proto,str){switch((proto=protocols(proto)).code){case 4:case 41:return ip.toBuffer(str);case 6:case 17:case 33:case 132:return port2buf(parseInt(str,10));case 53:case 54:case 55:return str2buf(str);case 421:return mh2buf(str);default:return new Buffer(str,"hex")}}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";function _normalizeFamily(family){return family?family.toLowerCase():"ipv4"}var ip=exports,Buffer=__webpack_require__(0).Buffer,os=__webpack_require__(234);ip.toBuffer=function(ip,buff,offset){offset=~~offset;var result;if(this.isV4Format(ip))result=buff||new Buffer(offset+4),ip.split(/\./g).map(function(byte){result[offset++]=255&parseInt(byte,10)});else if(this.isV6Format(ip)){var i,sections=ip.split(":",8);for(i=0;i<sections.length;i++){var v4Buffer;this.isV4Format(sections[i])&&(v4Buffer=this.toBuffer(sections[i]),sections[i]=v4Buffer.slice(0,2).toString("hex")),v4Buffer&&++i<8&&sections.splice(i,0,v4Buffer.slice(2,4).toString("hex"))}if(""===sections[0])for(;sections.length<8;)sections.unshift("0");else if(""===sections[sections.length-1])for(;sections.length<8;)sections.push("0");else if(sections.length<8){for(i=0;i<sections.length&&""!==sections[i];i++);var argv=[i,1];for(i=9-sections.length;i>0;i--)argv.push("0");sections.splice.apply(sections,argv)}for(result=buff||new Buffer(offset+16),i=0;i<sections.length;i++){var word=parseInt(sections[i],16);result[offset++]=word>>8&255,result[offset++]=255&word}}if(!result)throw Error("Invalid ip address: "+ip);return result},ip.toString=function(buff,offset,length){offset=~~offset;var result=[];if(4===(length=length||buff.length-offset)){for(i=0;i<length;i++)result.push(buff[offset+i]);result=result.join(".")}else if(16===length){for(var i=0;i<length;i+=2)result.push(buff.readUInt16BE(offset+i).toString(16));result=(result=(result=result.join(":")).replace(/(^|:)0(:0)*:0(:|$)/,"$1::$3")).replace(/:{3,4}/,"::")}return result};var ipv4Regex=/^(\d{1,3}\.){3,3}\d{1,3}$/,ipv6Regex=/^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i;ip.isV4Format=function(ip){return ipv4Regex.test(ip)},ip.isV6Format=function(ip){return ipv6Regex.test(ip)},ip.fromPrefixLen=function(prefixlen,family){var len=4;"ipv6"===(family=prefixlen>32?"ipv6":_normalizeFamily(family))&&(len=16);for(var buff=new Buffer(len),i=0,n=buff.length;i<n;++i){var bits=8;prefixlen<8&&(bits=prefixlen),prefixlen-=bits,buff[i]=255&~(255>>bits)}return ip.toString(buff)},ip.mask=function(addr,mask){addr=ip.toBuffer(addr),mask=ip.toBuffer(mask);var result=new Buffer(Math.max(addr.length,mask.length)),i=0;if(addr.length===mask.length)for(i=0;i<addr.length;i++)result[i]=addr[i]&mask[i];else if(4===mask.length)for(i=0;i<mask.length;i++)result[i]=addr[addr.length-4+i]&mask[i];else{for(i=0;i<result.length-6;i++)result[i]=0;for(result[10]=255,result[11]=255,i=0;i<addr.length;i++)result[i+12]=addr[i]&mask[i+12];i+=12}for(;i<result.length;i++)result[i]=0;return ip.toString(result)},ip.cidr=function(cidrString){var cidrParts=cidrString.split("/"),addr=cidrParts[0];if(2!==cidrParts.length)throw new Error("invalid CIDR subnet: "+addr);var mask=ip.fromPrefixLen(parseInt(cidrParts[1],10));return ip.mask(addr,mask)},ip.subnet=function(addr,mask){for(var networkAddress=ip.toLong(ip.mask(addr,mask)),maskBuffer=ip.toBuffer(mask),maskLength=0,i=0;i<maskBuffer.length;i++)if(255===maskBuffer[i])maskLength+=8;else for(var octet=255&maskBuffer[i];octet;)octet=octet<<1&255,maskLength++;var numberOfAddresses=Math.pow(2,32-maskLength);return{networkAddress:ip.fromLong(networkAddress),firstAddress:numberOfAddresses<=2?ip.fromLong(networkAddress):ip.fromLong(networkAddress+1),lastAddress:numberOfAddresses<=2?ip.fromLong(networkAddress+numberOfAddresses-1):ip.fromLong(networkAddress+numberOfAddresses-2),broadcastAddress:ip.fromLong(networkAddress+numberOfAddresses-1),subnetMask:mask,subnetMaskLength:maskLength,numHosts:numberOfAddresses<=2?numberOfAddresses:numberOfAddresses-2,length:numberOfAddresses,contains:function(other){return networkAddress===ip.toLong(ip.mask(other,mask))}}},ip.cidrSubnet=function(cidrString){var cidrParts=cidrString.split("/"),addr=cidrParts[0];if(2!==cidrParts.length)throw new Error("invalid CIDR subnet: "+addr);var mask=ip.fromPrefixLen(parseInt(cidrParts[1],10));return ip.subnet(addr,mask)},ip.not=function(addr){for(var buff=ip.toBuffer(addr),i=0;i<buff.length;i++)buff[i]=255^buff[i];return ip.toString(buff)},ip.or=function(a,b){if(a=ip.toBuffer(a),b=ip.toBuffer(b),a.length===b.length){for(i=0;i<a.length;++i)a[i]|=b[i];return ip.toString(a)}var buff=a,other=b;b.length>a.length&&(buff=b,other=a);for(var offset=buff.length-other.length,i=offset;i<buff.length;++i)buff[i]|=other[i-offset];return ip.toString(buff)},ip.isEqual=function(a,b){if(a=ip.toBuffer(a),b=ip.toBuffer(b),a.length===b.length){for(i=0;i<a.length;i++)if(a[i]!==b[i])return!1;return!0}if(4===b.length){var t=b;b=a,a=t}for(i=0;i<10;i++)if(0!==b[i])return!1;var word=b.readUInt16BE(10);if(0!==word&&65535!==word)return!1;for(var i=0;i<4;i++)if(a[i]!==b[i+12])return!1;return!0},ip.isPrivate=function(addr){return/^(::f{4}:)?10\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr)||/^(::f{4}:)?192\.168\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr)||/^(::f{4}:)?172\.(1[6-9]|2\d|30|31)\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr)||/^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr)||/^(::f{4}:)?169\.254\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr)||/^f[cd][0-9a-f]{2}:/i.test(addr)||/^fe80:/i.test(addr)||/^::1$/.test(addr)||/^::$/.test(addr)},ip.isPublic=function(addr){return!ip.isPrivate(addr)},ip.isLoopback=function(addr){return/^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/.test(addr)||/^fe80::1$/.test(addr)||/^::1$/.test(addr)||/^::$/.test(addr)},ip.loopback=function(family){if("ipv4"!==(family=_normalizeFamily(family))&&"ipv6"!==family)throw new Error("family must be ipv4 or ipv6");return"ipv4"===family?"127.0.0.1":"fe80::1"},ip.address=function(name,family){var all,interfaces=os.networkInterfaces();if(family=_normalizeFamily(family),name&&"private"!==name&&"public"!==name){var res=interfaces[name].filter(function(details){return details.family.toLowerCase()===family});if(0===res.length)return;return res[0].address}return(all=Object.keys(interfaces).map(function(nic){var addresses=interfaces[nic].filter(function(details){return details.family=details.family.toLowerCase(),details.family===family&&!ip.isLoopback(details.address)&&(!name||("public"===name?ip.isPrivate(details.address):ip.isPublic(details.address)))});return addresses.length?addresses[0].address:void 0}).filter(Boolean)).length?all[0]:ip.loopback(family)},ip.toLong=function(ip){var ipl=0;return ip.split(".").forEach(function(octet){ipl<<=8,ipl+=parseInt(octet)}),ipl>>>0},ip.fromLong=function(ipl){return(ipl>>>24)+"."+(ipl>>16&255)+"."+(ipl>>8&255)+"."+(255&ipl)}},function(module,exports){exports.endianness=function(){return"LE"},exports.hostname=function(){return"undefined"!=typeof location?location.hostname:""},exports.loadavg=function(){return[]},exports.uptime=function(){return 0},exports.freemem=function(){return Number.MAX_VALUE},exports.totalmem=function(){return Number.MAX_VALUE},exports.cpus=function(){return[]},exports.type=function(){return"Browser"},exports.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},exports.networkInterfaces=exports.getNetworkInterfaces=function(){return{}},exports.arch=function(){return"javascript"},exports.platform=function(){return"browser"},exports.tmpdir=exports.tmpDir=function(){return"/tmp"},exports.EOL="\n"},function(module,exports,__webpack_require__){"use strict";const ensureMultiaddr=__webpack_require__(86).ensureMultiaddr,uniqBy=__webpack_require__(236);class MultiaddrSet{constructor(multiaddrs){this._multiaddrs=multiaddrs||[],this._observedMultiaddrs=[]}add(ma){ma=ensureMultiaddr(ma),this.has(ma)||this._multiaddrs.push(ma)}addSafe(ma){ma=ensureMultiaddr(ma),this._observedMultiaddrs.some((m,i)=>{if(m.equals(ma))return this.add(ma),this._observedMultiaddrs.splice(i,1),!0})||this._observedMultiaddrs.push(ma)}toArray(){return this._multiaddrs.slice()}get size(){return this._multiaddrs.length}forEach(fn){return this._multiaddrs.forEach(fn)}has(ma){return ma=ensureMultiaddr(ma),this._multiaddrs.some(m=>m.equals(ma))}delete(ma){ma=ensureMultiaddr(ma),this._multiaddrs.some((m,i)=>{if(m.equals(ma))return this._multiaddrs.splice(i,1),!0})}replace(existing,fresh){Array.isArray(existing)||(existing=[existing]),Array.isArray(fresh)||(fresh=[fresh]),existing.forEach(m=>this.delete(m)),fresh.forEach(m=>this.add(m))}clear(){this._multiaddrs=[]}distinct(){return uniqBy(this._multiaddrs,ma=>[ma.toOptions().port,ma.toOptions().transport].join())}}module.exports=MultiaddrSet},function(module,exports,__webpack_require__){(function(global,module){function arrayIncludes(array,value){return!!(array?array.length:0)&&baseIndexOf(array,value,0)>-1}function arrayIncludesWith(array,value,comparator){for(var index=-1,length=array?array.length:0;++index<length;)if(comparator(value,array[index]))return!0;return!1}function arraySome(array,predicate){for(var index=-1,length=array?array.length:0;++index<length;)if(predicate(array[index],index,array))return!0;return!1}function baseFindIndex(array,predicate,fromIndex,fromRight){for(var length=array.length,index=fromIndex+(fromRight?1:-1);fromRight?index--:++index<length;)if(predicate(array[index],index,array))return index;return-1}function baseIndexOf(array,value,fromIndex){if(value!==value)return baseFindIndex(array,baseIsNaN,fromIndex);for(var index=fromIndex-1,length=array.length;++index<length;)if(array[index]===value)return index;return-1}function baseIsNaN(value){return value!==value}function baseProperty(key){return function(object){return null==object?void 0:object[key]}}function baseTimes(n,iteratee){for(var index=-1,result=Array(n);++index<n;)result[index]=iteratee(index);return result}function cacheHas(cache,key){return cache.has(key)}function getValue(object,key){return null==object?void 0:object[key]}function isHostObject(value){var result=!1;if(null!=value&&"function"!=typeof value.toString)try{result=!!(value+"")}catch(e){}return result}function mapToArray(map){var index=-1,result=Array(map.size);return map.forEach(function(value,key){result[++index]=[key,value]}),result}function setToArray(set){var index=-1,result=Array(set.size);return set.forEach(function(value){result[++index]=value}),result}function Hash(entries){var index=-1,length=entries?entries.length:0;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function ListCache(entries){var index=-1,length=entries?entries.length:0;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function MapCache(entries){var index=-1,length=entries?entries.length:0;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function SetCache(values){var index=-1,length=values?values.length:0;for(this.__data__=new MapCache;++index<length;)this.add(values[index])}function Stack(entries){this.__data__=new ListCache(entries)}function arrayLikeKeys(value,inherited){var result=isArray(value)||isArguments(value)?baseTimes(value.length,String):[],length=result.length,skipIndexes=!!length;for(var key in value)!inherited&&!hasOwnProperty.call(value,key)||skipIndexes&&("length"==key||isIndex(key,length))||result.push(key);return result}function assocIndexOf(array,key){for(var length=array.length;length--;)if(eq(array[length][0],key))return length;return-1}function baseGet(object,path){for(var index=0,length=(path=isKey(path,object)?[path]:castPath(path)).length;null!=object&&index<length;)object=object[toKey(path[index++])];return index&&index==length?object:void 0}function baseHasIn(object,key){return null!=object&&key in Object(object)}function baseIsEqual(value,other,customizer,bitmask,stack){return value===other||(null==value||null==other||!isObject(value)&&!isObjectLike(other)?value!==value&&other!==other:baseIsEqualDeep(value,other,baseIsEqual,customizer,bitmask,stack))}function baseIsEqualDeep(object,other,equalFunc,customizer,bitmask,stack){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=arrayTag,othTag=arrayTag;objIsArr||(objTag=(objTag=getTag(object))==argsTag?objectTag:objTag),othIsArr||(othTag=(othTag=getTag(other))==argsTag?objectTag:othTag);var objIsObj=objTag==objectTag&&!isHostObject(object),othIsObj=othTag==objectTag&&!isHostObject(other),isSameTag=objTag==othTag;if(isSameTag&&!objIsObj)return stack||(stack=new Stack),objIsArr||isTypedArray(object)?equalArrays(object,other,equalFunc,customizer,bitmask,stack):equalByTag(object,other,objTag,equalFunc,customizer,bitmask,stack);if(!(bitmask&PARTIAL_COMPARE_FLAG)){var objIsWrapped=objIsObj&&hasOwnProperty.call(object,"__wrapped__"),othIsWrapped=othIsObj&&hasOwnProperty.call(other,"__wrapped__");if(objIsWrapped||othIsWrapped){var objUnwrapped=objIsWrapped?object.value():object,othUnwrapped=othIsWrapped?other.value():other;return stack||(stack=new Stack),equalFunc(objUnwrapped,othUnwrapped,customizer,bitmask,stack)}}return!!isSameTag&&(stack||(stack=new Stack),equalObjects(object,other,equalFunc,customizer,bitmask,stack))}function baseIsMatch(object,source,matchData,customizer){var index=matchData.length,length=index,noCustomizer=!customizer;if(null==object)return!length;for(object=Object(object);index--;){var data=matchData[index];if(noCustomizer&&data[2]?data[1]!==object[data[0]]:!(data[0]in object))return!1}for(;++index<length;){var key=(data=matchData[index])[0],objValue=object[key],srcValue=data[1];if(noCustomizer&&data[2]){if(void 0===objValue&&!(key in object))return!1}else{var stack=new Stack;if(customizer)var result=customizer(objValue,srcValue,key,object,source,stack);if(!(void 0===result?baseIsEqual(srcValue,objValue,customizer,UNORDERED_COMPARE_FLAG|PARTIAL_COMPARE_FLAG,stack):result))return!1}}return!0}function baseIsNative(value){return!(!isObject(value)||isMasked(value))&&(isFunction(value)||isHostObject(value)?reIsNative:reIsHostCtor).test(toSource(value))}function baseIteratee(value){return"function"==typeof value?value:null==value?identity:"object"==typeof value?isArray(value)?baseMatchesProperty(value[0],value[1]):baseMatches(value):property(value)}function baseKeys(object){if(!isPrototype(object))return nativeKeys(object);var result=[];for(var key in Object(object))hasOwnProperty.call(object,key)&&"constructor"!=key&&result.push(key);return result}function baseMatches(source){var matchData=getMatchData(source);return 1==matchData.length&&matchData[0][2]?matchesStrictComparable(matchData[0][0],matchData[0][1]):function(object){return object===source||baseIsMatch(object,source,matchData)}}function baseMatchesProperty(path,srcValue){return isKey(path)&&isStrictComparable(srcValue)?matchesStrictComparable(toKey(path),srcValue):function(object){var objValue=get(object,path);return void 0===objValue&&objValue===srcValue?hasIn(object,path):baseIsEqual(srcValue,objValue,void 0,UNORDERED_COMPARE_FLAG|PARTIAL_COMPARE_FLAG)}}function basePropertyDeep(path){return function(object){return baseGet(object,path)}}function baseToString(value){if("string"==typeof value)return value;if(isSymbol(value))return symbolToString?symbolToString.call(value):"";var result=value+"";return"0"==result&&1/value==-INFINITY?"-0":result}function baseUniq(array,iteratee,comparator){var index=-1,includes=arrayIncludes,length=array.length,isCommon=!0,result=[],seen=result;if(comparator)isCommon=!1,includes=arrayIncludesWith;else if(length>=LARGE_ARRAY_SIZE){var set=iteratee?null:createSet(array);if(set)return setToArray(set);isCommon=!1,includes=cacheHas,seen=new SetCache}else seen=iteratee?[]:result;outer:for(;++index<length;){var value=array[index],computed=iteratee?iteratee(value):value;if(value=comparator||0!==value?value:0,isCommon&&computed===computed){for(var seenIndex=seen.length;seenIndex--;)if(seen[seenIndex]===computed)continue outer;iteratee&&seen.push(computed),result.push(value)}else includes(seen,computed,comparator)||(seen!==result&&seen.push(computed),result.push(value))}return result}function castPath(value){return isArray(value)?value:stringToPath(value)}function equalArrays(array,other,equalFunc,customizer,bitmask,stack){var isPartial=bitmask&PARTIAL_COMPARE_FLAG,arrLength=array.length,othLength=other.length;if(arrLength!=othLength&&!(isPartial&&othLength>arrLength))return!1;var stacked=stack.get(array);if(stacked&&stack.get(other))return stacked==other;var index=-1,result=!0,seen=bitmask&UNORDERED_COMPARE_FLAG?new SetCache:void 0;for(stack.set(array,other),stack.set(other,array);++index<arrLength;){var arrValue=array[index],othValue=other[index];if(customizer)var compared=isPartial?customizer(othValue,arrValue,index,other,array,stack):customizer(arrValue,othValue,index,array,other,stack);if(void 0!==compared){if(compared)continue;result=!1;break}if(seen){if(!arraySome(other,function(othValue,othIndex){if(!seen.has(othIndex)&&(arrValue===othValue||equalFunc(arrValue,othValue,customizer,bitmask,stack)))return seen.add(othIndex)})){result=!1;break}}else if(arrValue!==othValue&&!equalFunc(arrValue,othValue,customizer,bitmask,stack)){result=!1;break}}return stack.delete(array),stack.delete(other),result}function equalByTag(object,other,tag,equalFunc,customizer,bitmask,stack){switch(tag){case dataViewTag:if(object.byteLength!=other.byteLength||object.byteOffset!=other.byteOffset)return!1;object=object.buffer,other=other.buffer;case arrayBufferTag:return!(object.byteLength!=other.byteLength||!equalFunc(new Uint8Array(object),new Uint8Array(other)));case boolTag:case dateTag:case numberTag:return eq(+object,+other);case errorTag:return object.name==other.name&&object.message==other.message;case regexpTag:case stringTag:return object==other+"";case mapTag:var convert=mapToArray;case setTag:var isPartial=bitmask&PARTIAL_COMPARE_FLAG;if(convert||(convert=setToArray),object.size!=other.size&&!isPartial)return!1;var stacked=stack.get(object);if(stacked)return stacked==other;bitmask|=UNORDERED_COMPARE_FLAG,stack.set(object,other);var result=equalArrays(convert(object),convert(other),equalFunc,customizer,bitmask,stack);return stack.delete(object),result;case symbolTag:if(symbolValueOf)return symbolValueOf.call(object)==symbolValueOf.call(other)}return!1}function equalObjects(object,other,equalFunc,customizer,bitmask,stack){var isPartial=bitmask&PARTIAL_COMPARE_FLAG,objProps=keys(object),objLength=objProps.length;if(objLength!=keys(other).length&&!isPartial)return!1;for(var index=objLength;index--;){var key=objProps[index];if(!(isPartial?key in other:hasOwnProperty.call(other,key)))return!1}var stacked=stack.get(object);if(stacked&&stack.get(other))return stacked==other;var result=!0;stack.set(object,other),stack.set(other,object);for(var skipCtor=isPartial;++index<objLength;){var objValue=object[key=objProps[index]],othValue=other[key];if(customizer)var compared=isPartial?customizer(othValue,objValue,key,other,object,stack):customizer(objValue,othValue,key,object,other,stack);if(!(void 0===compared?objValue===othValue||equalFunc(objValue,othValue,customizer,bitmask,stack):compared)){result=!1;break}skipCtor||(skipCtor="constructor"==key)}if(result&&!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;objCtor!=othCtor&&"constructor"in object&&"constructor"in other&&!("function"==typeof objCtor&&objCtor instanceof objCtor&&"function"==typeof othCtor&&othCtor instanceof othCtor)&&(result=!1)}return stack.delete(object),stack.delete(other),result}function getMapData(map,key){var data=map.__data__;return isKeyable(key)?data["string"==typeof key?"string":"hash"]:data.map}function getMatchData(object){for(var result=keys(object),length=result.length;length--;){var key=result[length],value=object[key];result[length]=[key,value,isStrictComparable(value)]}return result}function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:void 0}function hasPath(object,path,hasFunc){for(var result,index=-1,length=(path=isKey(path,object)?[path]:castPath(path)).length;++index<length;){var key=toKey(path[index]);if(!(result=null!=object&&hasFunc(object,key)))break;object=object[key]}return result||!!(length=object?object.length:0)&&isLength(length)&&isIndex(key,length)&&(isArray(object)||isArguments(object))}function isIndex(value,length){return!!(length=null==length?MAX_SAFE_INTEGER:length)&&("number"==typeof value||reIsUint.test(value))&&value>-1&&value%1==0&&value<length}function isKey(value,object){if(isArray(value))return!1;var type=typeof value;return!("number"!=type&&"symbol"!=type&&"boolean"!=type&&null!=value&&!isSymbol(value))||(reIsPlainProp.test(value)||!reIsDeepProp.test(value)||null!=object&&value in Object(object))}function isKeyable(value){var type=typeof value;return"string"==type||"number"==type||"symbol"==type||"boolean"==type?"__proto__"!==value:null===value}function isMasked(func){return!!maskSrcKey&&maskSrcKey in func}function isPrototype(value){var Ctor=value&&value.constructor;return value===("function"==typeof Ctor&&Ctor.prototype||objectProto)}function isStrictComparable(value){return value===value&&!isObject(value)}function matchesStrictComparable(key,srcValue){return function(object){return null!=object&&(object[key]===srcValue&&(void 0!==srcValue||key in Object(object)))}}function toKey(value){if("string"==typeof value||isSymbol(value))return value;var result=value+"";return"0"==result&&1/value==-INFINITY?"-0":result}function toSource(func){if(null!=func){try{return funcToString.call(func)}catch(e){}try{return func+""}catch(e){}}return""}function memoize(func,resolver){if("function"!=typeof func||resolver&&"function"!=typeof resolver)throw new TypeError(FUNC_ERROR_TEXT);var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key))return cache.get(key);var result=func.apply(this,args);return memoized.cache=cache.set(key,result),result};return memoized.cache=new(memoize.Cache||MapCache),memoized}function eq(value,other){return value===other||value!==value&&other!==other}function isArguments(value){return isArrayLikeObject(value)&&hasOwnProperty.call(value,"callee")&&(!propertyIsEnumerable.call(value,"callee")||objectToString.call(value)==argsTag)}function isArrayLike(value){return null!=value&&isLength(value.length)&&!isFunction(value)}function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value)}function isFunction(value){var tag=isObject(value)?objectToString.call(value):"";return tag==funcTag||tag==genTag}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function isObjectLike(value){return!!value&&"object"==typeof value}function isSymbol(value){return"symbol"==typeof value||isObjectLike(value)&&objectToString.call(value)==symbolTag}function toString(value){return null==value?"":baseToString(value)}function get(object,path,defaultValue){var result=null==object?void 0:baseGet(object,path);return void 0===result?defaultValue:result}function hasIn(object,path){return null!=object&&hasPath(object,path,baseHasIn)}function keys(object){return isArrayLike(object)?arrayLikeKeys(object):baseKeys(object)}function identity(value){return value}function property(path){return isKey(path)?baseProperty(toKey(path)):basePropertyDeep(path)}var LARGE_ARRAY_SIZE=200,FUNC_ERROR_TEXT="Expected a function",HASH_UNDEFINED="__lodash_hash_undefined__",UNORDERED_COMPARE_FLAG=1,PARTIAL_COMPARE_FLAG=2,INFINITY=1/0,MAX_SAFE_INTEGER=9007199254740991,argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,reLeadingDot=/^\./,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reEscapeChar=/\\(\\)?/g,reIsHostCtor=/^\[object .+?Constructor\]$/,reIsUint=/^(?:0|[1-9]\d*)$/,typedArrayTags={};typedArrayTags["[object Float32Array]"]=typedArrayTags["[object Float64Array]"]=typedArrayTags["[object Int8Array]"]=typedArrayTags["[object Int16Array]"]=typedArrayTags["[object Int32Array]"]=typedArrayTags["[object Uint8Array]"]=typedArrayTags["[object Uint8ClampedArray]"]=typedArrayTags["[object Uint16Array]"]=typedArrayTags["[object Uint32Array]"]=!0,typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags["[object WeakMap]"]=!1;var freeGlobal="object"==typeof global&&global&&global.Object===Object&&global,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),freeExports="object"==typeof exports&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&"object"==typeof module&&module&&!module.nodeType&&module,freeProcess=freeModule&&freeModule.exports===freeExports&&freeGlobal.process,nodeUtil=function(){try{return freeProcess&&freeProcess.binding("util")}catch(e){}}(),nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,arrayProto=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype,coreJsData=root["__core-js_shared__"],maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return uid?"Symbol(src)_1."+uid:""}(),funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectToString=objectProto.toString,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Symbol=root.Symbol,Uint8Array=root.Uint8Array,propertyIsEnumerable=objectProto.propertyIsEnumerable,splice=arrayProto.splice,nativeKeys=function(func,transform){return function(arg){return func(transform(arg))}}(Object.keys,Object),DataView=getNative(root,"DataView"),Map=getNative(root,"Map"),Promise=getNative(root,"Promise"),Set=getNative(root,"Set"),WeakMap=getNative(root,"WeakMap"),nativeCreate=getNative(Object,"create"),dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map),promiseCtorString=toSource(Promise),setCtorString=toSource(Set),weakMapCtorString=toSource(WeakMap),symbolProto=Symbol?Symbol.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;Hash.prototype.clear=function(){this.__data__=nativeCreate?nativeCreate(null):{}},Hash.prototype.delete=function(key){return this.has(key)&&delete this.__data__[key]},Hash.prototype.get=function(key){var data=this.__data__;if(nativeCreate){var result=data[key];return result===HASH_UNDEFINED?void 0:result}return hasOwnProperty.call(data,key)?data[key]:void 0},Hash.prototype.has=function(key){var data=this.__data__;return nativeCreate?void 0!==data[key]:hasOwnProperty.call(data,key)},Hash.prototype.set=function(key,value){return this.__data__[key]=nativeCreate&&void 0===value?HASH_UNDEFINED:value,this},ListCache.prototype.clear=function(){this.__data__=[]},ListCache.prototype.delete=function(key){var data=this.__data__,index=assocIndexOf(data,key);return!(index<0||(index==data.length-1?data.pop():splice.call(data,index,1),0))},ListCache.prototype.get=function(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?void 0:data[index][1]},ListCache.prototype.has=function(key){return assocIndexOf(this.__data__,key)>-1},ListCache.prototype.set=function(key,value){var data=this.__data__,index=assocIndexOf(data,key);return index<0?data.push([key,value]):data[index][1]=value,this},MapCache.prototype.clear=function(){this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}},MapCache.prototype.delete=function(key){return getMapData(this,key).delete(key)},MapCache.prototype.get=function(key){return getMapData(this,key).get(key)},MapCache.prototype.has=function(key){return getMapData(this,key).has(key)},MapCache.prototype.set=function(key,value){return getMapData(this,key).set(key,value),this},SetCache.prototype.add=SetCache.prototype.push=function(value){return this.__data__.set(value,HASH_UNDEFINED),this},SetCache.prototype.has=function(value){return this.__data__.has(value)},Stack.prototype.clear=function(){this.__data__=new ListCache},Stack.prototype.delete=function(key){return this.__data__.delete(key)},Stack.prototype.get=function(key){return this.__data__.get(key)},Stack.prototype.has=function(key){return this.__data__.has(key)},Stack.prototype.set=function(key,value){var cache=this.__data__;if(cache instanceof ListCache){var pairs=cache.__data__;if(!Map||pairs.length<LARGE_ARRAY_SIZE-1)return pairs.push([key,value]),this;cache=this.__data__=new MapCache(pairs)}return cache.set(key,value),this};var createSet=Set&&1/setToArray(new Set([,-0]))[1]==INFINITY?function(values){return new Set(values)}:function(){},getTag=function(value){return objectToString.call(value)};(DataView&&getTag(new DataView(new ArrayBuffer(1)))!=dataViewTag||Map&&getTag(new Map)!=mapTag||Promise&&"[object Promise]"!=getTag(Promise.resolve())||Set&&getTag(new Set)!=setTag||WeakMap&&"[object WeakMap]"!=getTag(new WeakMap))&&(getTag=function(value){var result=objectToString.call(value),Ctor=result==objectTag?value.constructor:void 0,ctorString=Ctor?toSource(Ctor):void 0;if(ctorString)switch(ctorString){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag;case promiseCtorString:return"[object Promise]";case setCtorString:return setTag;case weakMapCtorString:return"[object WeakMap]"}return result});var stringToPath=memoize(function(string){string=toString(string);var result=[];return reLeadingDot.test(string)&&result.push(""),string.replace(rePropName,function(match,number,quote,string){result.push(quote?string.replace(reEscapeChar,"$1"):number||match)}),result});memoize.Cache=MapCache;var isArray=Array.isArray,isTypedArray=nodeIsTypedArray?function(func){return function(value){return func(value)}}(nodeIsTypedArray):function(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[objectToString.call(value)]};module.exports=function(array,iteratee){return array&&array.length?baseUniq(array,baseIteratee(iteratee,2)):[]}}).call(exports,__webpack_require__(4),__webpack_require__(20)(module))}]);