rsnext/packages/next/compiled/node-libs-browser/index3.js
Steven 777957e6b1
Compile native-url and node-libs-browser (#30032)
This prevents useless warnings about querystring.

```
warning next > native-url > querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
warning next > node-libs-browser > url > querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
```
2021-10-18 15:46:39 +00:00

1 line
No EOL
242 KiB
JavaScript
Raw Blame History

module.exports=(()=>{var e={3557:e=>{"use strict";e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},3182:e=>{"use strict";e.exports={i8:"6.5.3"}},5424:e=>{"use strict";e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},1363:(e,t,r)=>{var i=t;i.bignum=r(2828);i.define=r(9506).define;i.base=r(2285);i.constants=r(6859);i.decoders=r(5120);i.encoders=r(5568)},9506:(e,t,r)=>{var i=r(1363);var n=r(2989);var a=t;a.define=function define(e,t){return new Entity(e,t)};function Entity(e,t){this.name=e;this.body=t;this.decoders={};this.encoders={}}Entity.prototype._createNamed=function createNamed(e){var t;try{t=r(2184).runInThisContext("(function "+this.name+"(entity) {\n"+" this._initNamed(entity);\n"+"})")}catch(e){t=function(e){this._initNamed(e)}}n(t,e);t.prototype._initNamed=function initnamed(t){e.call(this,t)};return new t(this)};Entity.prototype._getDecoder=function _getDecoder(e){e=e||"der";if(!this.decoders.hasOwnProperty(e))this.decoders[e]=this._createNamed(i.decoders[e]);return this.decoders[e]};Entity.prototype.decode=function decode(e,t,r){return this._getDecoder(t).decode(e,r)};Entity.prototype._getEncoder=function _getEncoder(e){e=e||"der";if(!this.encoders.hasOwnProperty(e))this.encoders[e]=this._createNamed(i.encoders[e]);return this.encoders[e]};Entity.prototype.encode=function encode(e,t,r){return this._getEncoder(t).encode(e,r)}},2044:(e,t,r)=>{var i=r(2989);var n=r(2285).Reporter;var a=r(4293).Buffer;function DecoderBuffer(e,t){n.call(this,t);if(!a.isBuffer(e)){this.error("Input not Buffer");return}this.base=e;this.offset=0;this.length=e.length}i(DecoderBuffer,n);t.C=DecoderBuffer;DecoderBuffer.prototype.save=function save(){return{offset:this.offset,reporter:n.prototype.save.call(this)}};DecoderBuffer.prototype.restore=function restore(e){var t=new DecoderBuffer(this.base);t.offset=e.offset;t.length=this.offset;this.offset=e.offset;n.prototype.restore.call(this,e.reporter);return t};DecoderBuffer.prototype.isEmpty=function isEmpty(){return this.offset===this.length};DecoderBuffer.prototype.readUInt8=function readUInt8(e){if(this.offset+1<=this.length)return this.base.readUInt8(this.offset++,true);else return this.error(e||"DecoderBuffer overrun")};DecoderBuffer.prototype.skip=function skip(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new DecoderBuffer(this.base);r._reporterState=this._reporterState;r.offset=this.offset;r.length=this.offset+e;this.offset+=e;return r};DecoderBuffer.prototype.raw=function raw(e){return this.base.slice(e?e.offset:this.offset,this.length)};function EncoderBuffer(e,t){if(Array.isArray(e)){this.length=0;this.value=e.map(function(e){if(!(e instanceof EncoderBuffer))e=new EncoderBuffer(e,t);this.length+=e.length;return e},this)}else if(typeof e==="number"){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e;this.length=1}else if(typeof e==="string"){this.value=e;this.length=a.byteLength(e)}else if(a.isBuffer(e)){this.value=e;this.length=e.length}else{return t.error("Unsupported type: "+typeof e)}}t.R=EncoderBuffer;EncoderBuffer.prototype.join=function join(e,t){if(!e)e=new a(this.length);if(!t)t=0;if(this.length===0)return e;if(Array.isArray(this.value)){this.value.forEach(function(r){r.join(e,t);t+=r.length})}else{if(typeof this.value==="number")e[t]=this.value;else if(typeof this.value==="string")e.write(this.value,t);else if(a.isBuffer(this.value))this.value.copy(e,t);t+=this.length}return e}},2285:(e,t,r)=>{var i=t;i.Reporter=r(3206).b;i.DecoderBuffer=r(2044).C;i.EncoderBuffer=r(2044).R;i.Node=r(3621)},3621:(e,t,r)=>{var i=r(2285).Reporter;var n=r(2285).EncoderBuffer;var a=r(2285).DecoderBuffer;var f=r(6787);var o=["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"];var d=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(o);var s=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function Node(e,t){var r={};this._baseState=r;r.enc=e;r.parent=t||null;r.children=null;r.tag=null;r.args=null;r.reverseArgs=null;r.choice=null;r.optional=false;r.any=false;r.obj=false;r.use=null;r.useDecoder=null;r.key=null;r["default"]=null;r.explicit=null;r.implicit=null;r.contains=null;if(!r.parent){r.children=[];this._wrap()}}e.exports=Node;var u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Node.prototype.clone=function clone(){var e=this._baseState;var t={};u.forEach(function(r){t[r]=e[r]});var r=new this.constructor(t.parent);r._baseState=t;return r};Node.prototype._wrap=function wrap(){var e=this._baseState;d.forEach(function(t){this[t]=function _wrappedMethod(){var r=new this.constructor(this);e.children.push(r);return r[t].apply(r,arguments)}},this)};Node.prototype._init=function init(e){var t=this._baseState;f(t.parent===null);e.call(this);t.children=t.children.filter(function(e){return e._baseState.parent===this},this);f.equal(t.children.length,1,"Root node can have only one child")};Node.prototype._useArgs=function useArgs(e){var t=this._baseState;var r=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this);if(r.length!==0){f(t.children===null);t.children=r;r.forEach(function(e){e._baseState.parent=this},this)}if(e.length!==0){f(t.args===null);t.args=e;t.reverseArgs=e.map(function(e){if(typeof e!=="object"||e.constructor!==Object)return e;var t={};Object.keys(e).forEach(function(r){if(r==(r|0))r|=0;var i=e[r];t[i]=r});return t})}};s.forEach(function(e){Node.prototype[e]=function _overrided(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}});o.forEach(function(e){Node.prototype[e]=function _tagMethod(){var t=this._baseState;var r=Array.prototype.slice.call(arguments);f(t.tag===null);t.tag=e;this._useArgs(r);return this}});Node.prototype.use=function use(e){f(e);var t=this._baseState;f(t.use===null);t.use=e;return this};Node.prototype.optional=function optional(){var e=this._baseState;e.optional=true;return this};Node.prototype.def=function def(e){var t=this._baseState;f(t["default"]===null);t["default"]=e;t.optional=true;return this};Node.prototype.explicit=function explicit(e){var t=this._baseState;f(t.explicit===null&&t.implicit===null);t.explicit=e;return this};Node.prototype.implicit=function implicit(e){var t=this._baseState;f(t.explicit===null&&t.implicit===null);t.implicit=e;return this};Node.prototype.obj=function obj(){var e=this._baseState;var t=Array.prototype.slice.call(arguments);e.obj=true;if(t.length!==0)this._useArgs(t);return this};Node.prototype.key=function key(e){var t=this._baseState;f(t.key===null);t.key=e;return this};Node.prototype.any=function any(){var e=this._baseState;e.any=true;return this};Node.prototype.choice=function choice(e){var t=this._baseState;f(t.choice===null);t.choice=e;this._useArgs(Object.keys(e).map(function(t){return e[t]}));return this};Node.prototype.contains=function contains(e){var t=this._baseState;f(t.use===null);t.contains=e;return this};Node.prototype._decode=function decode(e,t){var r=this._baseState;if(r.parent===null)return e.wrapResult(r.children[0]._decode(e,t));var i=r["default"];var n=true;var f=null;if(r.key!==null)f=e.enterKey(r.key);if(r.optional){var o=null;if(r.explicit!==null)o=r.explicit;else if(r.implicit!==null)o=r.implicit;else if(r.tag!==null)o=r.tag;if(o===null&&!r.any){var d=e.save();try{if(r.choice===null)this._decodeGeneric(r.tag,e,t);else this._decodeChoice(e,t);n=true}catch(e){n=false}e.restore(d)}else{n=this._peekTag(e,o,r.any);if(e.isError(n))return n}}var s;if(r.obj&&n)s=e.enterObject();if(n){if(r.explicit!==null){var u=this._decodeTag(e,r.explicit);if(e.isError(u))return u;e=u}var h=e.offset;if(r.use===null&&r.choice===null){if(r.any)var d=e.save();var c=this._decodeTag(e,r.implicit!==null?r.implicit:r.tag,r.any);if(e.isError(c))return c;if(r.any)i=e.raw(d);else e=c}if(t&&t.track&&r.tag!==null)t.track(e.path(),h,e.length,"tagged");if(t&&t.track&&r.tag!==null)t.track(e.path(),e.offset,e.length,"content");if(r.any)i=i;else if(r.choice===null)i=this._decodeGeneric(r.tag,e,t);else i=this._decodeChoice(e,t);if(e.isError(i))return i;if(!r.any&&r.choice===null&&r.children!==null){r.children.forEach(function decodeChildren(r){r._decode(e,t)})}if(r.contains&&(r.tag==="octstr"||r.tag==="bitstr")){var l=new a(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(l,t)}}if(r.obj&&n)i=e.leaveObject(s);if(r.key!==null&&(i!==null||n===true))e.leaveKey(f,r.key,i);else if(f!==null)e.exitKey(f);return i};Node.prototype._decodeGeneric=function decodeGeneric(e,t,r){var i=this._baseState;if(e==="seq"||e==="set")return null;if(e==="seqof"||e==="setof")return this._decodeList(t,e,i.args[0],r);else if(/str$/.test(e))return this._decodeStr(t,e,r);else if(e==="objid"&&i.args)return this._decodeObjid(t,i.args[0],i.args[1],r);else if(e==="objid")return this._decodeObjid(t,null,null,r);else if(e==="gentime"||e==="utctime")return this._decodeTime(t,e,r);else if(e==="null_")return this._decodeNull(t,r);else if(e==="bool")return this._decodeBool(t,r);else if(e==="objDesc")return this._decodeStr(t,e,r);else if(e==="int"||e==="enum")return this._decodeInt(t,i.args&&i.args[0],r);if(i.use!==null){return this._getUse(i.use,t._reporterState.obj)._decode(t,r)}else{return t.error("unknown tag: "+e)}};Node.prototype._getUse=function _getUse(e,t){var r=this._baseState;r.useDecoder=this._use(e,t);f(r.useDecoder._baseState.parent===null);r.useDecoder=r.useDecoder._baseState.children[0];if(r.implicit!==r.useDecoder._baseState.implicit){r.useDecoder=r.useDecoder.clone();r.useDecoder._baseState.implicit=r.implicit}return r.useDecoder};Node.prototype._decodeChoice=function decodeChoice(e,t){var r=this._baseState;var i=null;var n=false;Object.keys(r.choice).some(function(a){var f=e.save();var o=r.choice[a];try{var d=o._decode(e,t);if(e.isError(d))return false;i={type:a,value:d};n=true}catch(t){e.restore(f);return false}return true},this);if(!n)return e.error("Choice not matched");return i};Node.prototype._createEncoderBuffer=function createEncoderBuffer(e){return new n(e,this.reporter)};Node.prototype._encode=function encode(e,t,r){var i=this._baseState;if(i["default"]!==null&&i["default"]===e)return;var n=this._encodeValue(e,t,r);if(n===undefined)return;if(this._skipDefault(n,t,r))return;return n};Node.prototype._encodeValue=function encode(e,t,r){var n=this._baseState;if(n.parent===null)return n.children[0]._encode(e,t||new i);var a=null;this.reporter=t;if(n.optional&&e===undefined){if(n["default"]!==null)e=n["default"];else return}var f=null;var o=false;if(n.any){a=this._createEncoderBuffer(e)}else if(n.choice){a=this._encodeChoice(e,t)}else if(n.contains){f=this._getUse(n.contains,r)._encode(e,t);o=true}else if(n.children){f=n.children.map(function(r){if(r._baseState.tag==="null_")return r._encode(null,t,e);if(r._baseState.key===null)return t.error("Child should have a key");var i=t.enterKey(r._baseState.key);if(typeof e!=="object")return t.error("Child expected, but input is not object");var n=r._encode(e[r._baseState.key],t,e);t.leaveKey(i);return n},this).filter(function(e){return e});f=this._createEncoderBuffer(f)}else{if(n.tag==="seqof"||n.tag==="setof"){if(!(n.args&&n.args.length===1))return t.error("Too many args for : "+n.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var d=this.clone();d._baseState.implicit=null;f=this._createEncoderBuffer(e.map(function(r){var i=this._baseState;return this._getUse(i.args[0],e)._encode(r,t)},d))}else if(n.use!==null){a=this._getUse(n.use,r)._encode(e,t)}else{f=this._encodePrimitive(n.tag,e);o=true}}var a;if(!n.any&&n.choice===null){var s=n.implicit!==null?n.implicit:n.tag;var u=n.implicit===null?"universal":"context";if(s===null){if(n.use===null)t.error("Tag could be omitted only for .use()")}else{if(n.use===null)a=this._encodeComposite(s,o,u,f)}}if(n.explicit!==null)a=this._encodeComposite(n.explicit,false,"context",a);return a};Node.prototype._encodeChoice=function encodeChoice(e,t){var r=this._baseState;var i=r.choice[e.type];if(!i){f(false,e.type+" not found in "+JSON.stringify(Object.keys(r.choice)))}return i._encode(e.value,t)};Node.prototype._encodePrimitive=function encodePrimitive(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);else if(e==="objid"&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);else if(e==="objid")return this._encodeObjid(t,null,null);else if(e==="gentime"||e==="utctime")return this._encodeTime(t,e);else if(e==="null_")return this._encodeNull();else if(e==="int"||e==="enum")return this._encodeInt(t,r.args&&r.reverseArgs[0]);else if(e==="bool")return this._encodeBool(t);else if(e==="objDesc")return this._encodeStr(t,e);else throw new Error("Unsupported tag: "+e)};Node.prototype._isNumstr=function isNumstr(e){return/^[0-9 ]*$/.test(e)};Node.prototype._isPrintstr=function isPrintstr(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},3206:(e,t,r)=>{var i=r(2989);function Reporter(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}t.b=Reporter;Reporter.prototype.isError=function isError(e){return e instanceof ReporterError};Reporter.prototype.save=function save(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}};Reporter.prototype.restore=function restore(e){var t=this._reporterState;t.obj=e.obj;t.path=t.path.slice(0,e.pathLen)};Reporter.prototype.enterKey=function enterKey(e){return this._reporterState.path.push(e)};Reporter.prototype.exitKey=function exitKey(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)};Reporter.prototype.leaveKey=function leaveKey(e,t,r){var i=this._reporterState;this.exitKey(e);if(i.obj!==null)i.obj[t]=r};Reporter.prototype.path=function path(){return this._reporterState.path.join("/")};Reporter.prototype.enterObject=function enterObject(){var e=this._reporterState;var t=e.obj;e.obj={};return t};Reporter.prototype.leaveObject=function leaveObject(e){var t=this._reporterState;var r=t.obj;t.obj=e;return r};Reporter.prototype.error=function error(e){var t;var r=this._reporterState;var i=e instanceof ReporterError;if(i){t=e}else{t=new ReporterError(r.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack)}if(!r.options.partial)throw t;if(!i)r.errors.push(t);return t};Reporter.prototype.wrapResult=function wrapResult(e){var t=this._reporterState;if(!t.options.partial)return e;return{result:this.isError(e)?null:e,errors:t.errors}};function ReporterError(e,t){this.path=e;this.rethrow(t)}i(ReporterError,Error);ReporterError.prototype.rethrow=function rethrow(e){this.message=e+" at: "+(this.path||"(shallow)");if(Error.captureStackTrace)Error.captureStackTrace(this,ReporterError);if(!this.stack){try{throw new Error(this.message)}catch(e){this.stack=e.stack}}return this}},2173:(e,t,r)=>{var i=r(6859);t.tagClass={0:"universal",1:"application",2:"context",3:"private"};t.tagClassByName=i._reverse(t.tagClass);t.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"};t.tagByName=i._reverse(t.tag)},6859:(e,t,r)=>{var i=t;i._reverse=function reverse(e){var t={};Object.keys(e).forEach(function(r){if((r|0)==r)r=r|0;var i=e[r];t[i]=r});return t};i.der=r(2173)},9921:(e,t,r)=>{var i=r(2989);var n=r(1363);var a=n.base;var f=n.bignum;var o=n.constants.der;function DERDecoder(e){this.enc="der";this.name=e.name;this.entity=e;this.tree=new DERNode;this.tree._init(e.body)}e.exports=DERDecoder;DERDecoder.prototype.decode=function decode(e,t){if(!(e instanceof a.DecoderBuffer))e=new a.DecoderBuffer(e,t);return this.tree._decode(e,t)};function DERNode(e){a.Node.call(this,"der",e)}i(DERNode,a.Node);DERNode.prototype._peekTag=function peekTag(e,t,r){if(e.isEmpty())return false;var i=e.save();var n=derDecodeTag(e,'Failed to peek tag: "'+t+'"');if(e.isError(n))return n;e.restore(i);return n.tag===t||n.tagStr===t||n.tagStr+"of"===t||r};DERNode.prototype._decodeTag=function decodeTag(e,t,r){var i=derDecodeTag(e,'Failed to decode tag of "'+t+'"');if(e.isError(i))return i;var n=derDecodeLen(e,i.primitive,'Failed to get length of "'+t+'"');if(e.isError(n))return n;if(!r&&i.tag!==t&&i.tagStr!==t&&i.tagStr+"of"!==t){return e.error('Failed to match tag: "'+t+'"')}if(i.primitive||n!==null)return e.skip(n,'Failed to match body of: "'+t+'"');var a=e.save();var f=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');if(e.isError(f))return f;n=e.offset-a.offset;e.restore(a);return e.skip(n,'Failed to match body of: "'+t+'"')};DERNode.prototype._skipUntilEnd=function skipUntilEnd(e,t){while(true){var r=derDecodeTag(e,t);if(e.isError(r))return r;var i=derDecodeLen(e,r.primitive,t);if(e.isError(i))return i;var n;if(r.primitive||i!==null)n=e.skip(i);else n=this._skipUntilEnd(e,t);if(e.isError(n))return n;if(r.tagStr==="end")break}};DERNode.prototype._decodeList=function decodeList(e,t,r,i){var n=[];while(!e.isEmpty()){var a=this._peekTag(e,"end");if(e.isError(a))return a;var f=r.decode(e,"der",i);if(e.isError(f)&&a)break;n.push(f)}return n};DERNode.prototype._decodeStr=function decodeStr(e,t){if(t==="bitstr"){var r=e.readUInt8();if(e.isError(r))return r;return{unused:r,data:e.raw()}}else if(t==="bmpstr"){var i=e.raw();if(i.length%2===1)return e.error("Decoding of string type: bmpstr length mismatch");var n="";for(var a=0;a<i.length/2;a++){n+=String.fromCharCode(i.readUInt16BE(a*2))}return n}else if(t==="numstr"){var f=e.raw().toString("ascii");if(!this._isNumstr(f)){return e.error("Decoding of string type: "+"numstr unsupported characters")}return f}else if(t==="octstr"){return e.raw()}else if(t==="objDesc"){return e.raw()}else if(t==="printstr"){var o=e.raw().toString("ascii");if(!this._isPrintstr(o)){return e.error("Decoding of string type: "+"printstr unsupported characters")}return o}else if(/str$/.test(t)){return e.raw().toString()}else{return e.error("Decoding of string type: "+t+" unsupported")}};DERNode.prototype._decodeObjid=function decodeObjid(e,t,r){var i;var n=[];var a=0;while(!e.isEmpty()){var f=e.readUInt8();a<<=7;a|=f&127;if((f&128)===0){n.push(a);a=0}}if(f&128)n.push(a);var o=n[0]/40|0;var d=n[0]%40;if(r)i=n;else i=[o,d].concat(n.slice(1));if(t){var s=t[i.join(" ")];if(s===undefined)s=t[i.join(".")];if(s!==undefined)i=s}return i};DERNode.prototype._decodeTime=function decodeTime(e,t){var r=e.raw().toString();if(t==="gentime"){var i=r.slice(0,4)|0;var n=r.slice(4,6)|0;var a=r.slice(6,8)|0;var f=r.slice(8,10)|0;var o=r.slice(10,12)|0;var d=r.slice(12,14)|0}else if(t==="utctime"){var i=r.slice(0,2)|0;var n=r.slice(2,4)|0;var a=r.slice(4,6)|0;var f=r.slice(6,8)|0;var o=r.slice(8,10)|0;var d=r.slice(10,12)|0;if(i<70)i=2e3+i;else i=1900+i}else{return e.error("Decoding "+t+" time is not supported yet")}return Date.UTC(i,n-1,a,f,o,d,0)};DERNode.prototype._decodeNull=function decodeNull(e){return null};DERNode.prototype._decodeBool=function decodeBool(e){var t=e.readUInt8();if(e.isError(t))return t;else return t!==0};DERNode.prototype._decodeInt=function decodeInt(e,t){var r=e.raw();var i=new f(r);if(t)i=t[i.toString(10)]||i;return i};DERNode.prototype._use=function use(e,t){if(typeof e==="function")e=e(t);return e._getDecoder("der").tree};function derDecodeTag(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var i=o.tagClass[r>>6];var n=(r&32)===0;if((r&31)===31){var a=r;r=0;while((a&128)===128){a=e.readUInt8(t);if(e.isError(a))return a;r<<=7;r|=a&127}}else{r&=31}var f=o.tag[r];return{cls:i,primitive:n,tag:r,tagStr:f}}function derDecodeLen(e,t,r){var i=e.readUInt8(r);if(e.isError(i))return i;if(!t&&i===128)return null;if((i&128)===0){return i}var n=i&127;if(n>4)return e.error("length octect is too long");i=0;for(var a=0;a<n;a++){i<<=8;var f=e.readUInt8(r);if(e.isError(f))return f;i|=f}return i}},5120:(e,t,r)=>{var i=t;i.der=r(9921);i.pem=r(6707)},6707:(e,t,r)=>{var i=r(2989);var n=r(4293).Buffer;var a=r(9921);function PEMDecoder(e){a.call(this,e);this.enc="pem"}i(PEMDecoder,a);e.exports=PEMDecoder;PEMDecoder.prototype.decode=function decode(e,t){var r=e.toString().split(/[\r\n]+/g);var i=t.label.toUpperCase();var f=/^-----(BEGIN|END) ([^-]+)-----$/;var o=-1;var d=-1;for(var s=0;s<r.length;s++){var u=r[s].match(f);if(u===null)continue;if(u[2]!==i)continue;if(o===-1){if(u[1]!=="BEGIN")break;o=s}else{if(u[1]!=="END")break;d=s;break}}if(o===-1||d===-1)throw new Error("PEM section not found for: "+i);var h=r.slice(o+1,d).join("");h.replace(/[^a-z0-9\+\/=]+/gi,"");var c=new n(h,"base64");return a.prototype.decode.call(this,c,t)}},9515:(e,t,r)=>{var i=r(2989);var n=r(4293).Buffer;var a=r(1363);var f=a.base;var o=a.constants.der;function DEREncoder(e){this.enc="der";this.name=e.name;this.entity=e;this.tree=new DERNode;this.tree._init(e.body)}e.exports=DEREncoder;DEREncoder.prototype.encode=function encode(e,t){return this.tree._encode(e,t).join()};function DERNode(e){f.Node.call(this,"der",e)}i(DERNode,f.Node);DERNode.prototype._encodeComposite=function encodeComposite(e,t,r,i){var a=encodeTag(e,t,r,this.reporter);if(i.length<128){var f=new n(2);f[0]=a;f[1]=i.length;return this._createEncoderBuffer([f,i])}var o=1;for(var d=i.length;d>=256;d>>=8)o++;var f=new n(1+1+o);f[0]=a;f[1]=128|o;for(var d=1+o,s=i.length;s>0;d--,s>>=8)f[d]=s&255;return this._createEncoderBuffer([f,i])};DERNode.prototype._encodeStr=function encodeStr(e,t){if(t==="bitstr"){return this._createEncoderBuffer([e.unused|0,e.data])}else if(t==="bmpstr"){var r=new n(e.length*2);for(var i=0;i<e.length;i++){r.writeUInt16BE(e.charCodeAt(i),i*2)}return this._createEncoderBuffer(r)}else if(t==="numstr"){if(!this._isNumstr(e)){return this.reporter.error("Encoding of string type: numstr supports "+"only digits and space")}return this._createEncoderBuffer(e)}else if(t==="printstr"){if(!this._isPrintstr(e)){return 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")}return this._createEncoderBuffer(e)}else if(/str$/.test(t)){return this._createEncoderBuffer(e)}else if(t==="objDesc"){return this._createEncoderBuffer(e)}else{return this.reporter.error("Encoding of string type: "+t+" unsupported")}};DERNode.prototype._encodeObjid=function encodeObjid(e,t,r){if(typeof e==="string"){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s\.]+/g);for(var i=0;i<e.length;i++)e[i]|=0}else if(Array.isArray(e)){e=e.slice();for(var i=0;i<e.length;i++)e[i]|=0}if(!Array.isArray(e)){return this.reporter.error("objid() should be either array or string, "+"got: "+JSON.stringify(e))}if(!r){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,e[0]*40+e[1])}var a=0;for(var i=0;i<e.length;i++){var f=e[i];for(a++;f>=128;f>>=7)a++}var o=new n(a);var d=o.length-1;for(var i=e.length-1;i>=0;i--){var f=e[i];o[d--]=f&127;while((f>>=7)>0)o[d--]=128|f&127}return this._createEncoderBuffer(o)};function two(e){if(e<10)return"0"+e;else return e}DERNode.prototype._encodeTime=function encodeTime(e,t){var r;var i=new Date(e);if(t==="gentime"){r=[two(i.getFullYear()),two(i.getUTCMonth()+1),two(i.getUTCDate()),two(i.getUTCHours()),two(i.getUTCMinutes()),two(i.getUTCSeconds()),"Z"].join("")}else if(t==="utctime"){r=[two(i.getFullYear()%100),two(i.getUTCMonth()+1),two(i.getUTCDate()),two(i.getUTCHours()),two(i.getUTCMinutes()),two(i.getUTCSeconds()),"Z"].join("")}else{this.reporter.error("Encoding "+t+" time is not supported yet")}return this._encodeStr(r,"octstr")};DERNode.prototype._encodeNull=function encodeNull(){return this._createEncoderBuffer("")};DERNode.prototype._encodeInt=function encodeInt(e,t){if(typeof e==="string"){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e)){return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e))}e=t[e]}if(typeof e!=="number"&&!n.isBuffer(e)){var r=e.toArray();if(!e.sign&&r[0]&128){r.unshift(0)}e=new n(r)}if(n.isBuffer(e)){var i=e.length;if(e.length===0)i++;var a=new n(i);e.copy(a);if(e.length===0)a[0]=0;return this._createEncoderBuffer(a)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);var i=1;for(var f=e;f>=256;f>>=8)i++;var a=new Array(i);for(var f=a.length-1;f>=0;f--){a[f]=e&255;e>>=8}if(a[0]&128){a.unshift(0)}return this._createEncoderBuffer(new n(a))};DERNode.prototype._encodeBool=function encodeBool(e){return this._createEncoderBuffer(e?255:0)};DERNode.prototype._use=function use(e,t){if(typeof e==="function")e=e(t);return e._getEncoder("der").tree};DERNode.prototype._skipDefault=function skipDefault(e,t,r){var i=this._baseState;var n;if(i["default"]===null)return false;var a=e.join();if(i.defaultBuffer===undefined)i.defaultBuffer=this._encodeValue(i["default"],t,r).join();if(a.length!==i.defaultBuffer.length)return false;for(n=0;n<a.length;n++)if(a[n]!==i.defaultBuffer[n])return false;return true};function encodeTag(e,t,r,i){var n;if(e==="seqof")e="seq";else if(e==="setof")e="set";if(o.tagByName.hasOwnProperty(e))n=o.tagByName[e];else if(typeof e==="number"&&(e|0)===e)n=e;else return i.error("Unknown tag: "+e);if(n>=31)return i.error("Multi-octet tag encoding unsupported");if(!t)n|=32;n|=o.tagClassByName[r||"universal"]<<6;return n}},5568:(e,t,r)=>{var i=t;i.der=r(9515);i.pem=r(4557)},4557:(e,t,r)=>{var i=r(2989);var n=r(9515);function PEMEncoder(e){n.call(this,e);this.enc="pem"}i(PEMEncoder,n);e.exports=PEMEncoder;PEMEncoder.prototype.encode=function encode(e,t){var r=n.prototype.encode.call(this,e);var i=r.toString("base64");var a=["-----BEGIN "+t.label+"-----"];for(var f=0;f<i.length;f+=64)a.push(i.slice(f,f+64));a.push("-----END "+t.label+"-----");return a.join("\n")}},2828:function(e,t,r){e=r.nmd(e);(function(e,t){"use strict";function assert(e,t){if(!e)throw new Error(t||"Assertion failed")}function inherits(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype;e.prototype=new r;e.prototype.constructor=e}function BN(e,t,r){if(BN.isBN(e)){return e}this.negative=0;this.words=null;this.length=0;this.red=null;if(e!==null){if(t==="le"||t==="be"){r=t;t=10}this._init(e||0,t||10,r||"be")}}if(typeof e==="object"){e.exports=BN}else{t.BN=BN}BN.BN=BN;BN.wordSize=26;var i;try{i=r(4293).Buffer}catch(e){}BN.isBN=function isBN(e){if(e instanceof BN){return true}return e!==null&&typeof e==="object"&&e.constructor.wordSize===BN.wordSize&&Array.isArray(e.words)};BN.max=function max(e,t){if(e.cmp(t)>0)return e;return t};BN.min=function min(e,t){if(e.cmp(t)<0)return e;return t};BN.prototype._init=function init(e,t,r){if(typeof e==="number"){return this._initNumber(e,t,r)}if(typeof e==="object"){return this._initArray(e,t,r)}if(t==="hex"){t=16}assert(t===(t|0)&&t>=2&&t<=36);e=e.toString().replace(/\s+/g,"");var i=0;if(e[0]==="-"){i++}if(t===16){this._parseHex(e,i)}else{this._parseBase(e,t,i)}if(e[0]==="-"){this.negative=1}this.strip();if(r!=="le")return;this._initArray(this.toArray(),t,r)};BN.prototype._initNumber=function _initNumber(e,t,r){if(e<0){this.negative=1;e=-e}if(e<67108864){this.words=[e&67108863];this.length=1}else if(e<4503599627370496){this.words=[e&67108863,e/67108864&67108863];this.length=2}else{assert(e<9007199254740992);this.words=[e&67108863,e/67108864&67108863,1];this.length=3}if(r!=="le")return;this._initArray(this.toArray(),t,r)};BN.prototype._initArray=function _initArray(e,t,r){assert(typeof e.length==="number");if(e.length<=0){this.words=[0];this.length=1;return this}this.length=Math.ceil(e.length/3);this.words=new Array(this.length);for(var i=0;i<this.length;i++){this.words[i]=0}var n,a;var f=0;if(r==="be"){for(i=e.length-1,n=0;i>=0;i-=3){a=e[i]|e[i-1]<<8|e[i-2]<<16;this.words[n]|=a<<f&67108863;this.words[n+1]=a>>>26-f&67108863;f+=24;if(f>=26){f-=26;n++}}}else if(r==="le"){for(i=0,n=0;i<e.length;i+=3){a=e[i]|e[i+1]<<8|e[i+2]<<16;this.words[n]|=a<<f&67108863;this.words[n+1]=a>>>26-f&67108863;f+=24;if(f>=26){f-=26;n++}}}return this.strip()};function parseHex(e,t,r){var i=0;var n=Math.min(e.length,r);for(var a=t;a<n;a++){var f=e.charCodeAt(a)-48;i<<=4;if(f>=49&&f<=54){i|=f-49+10}else if(f>=17&&f<=22){i|=f-17+10}else{i|=f&15}}return i}BN.prototype._parseHex=function _parseHex(e,t){this.length=Math.ceil((e.length-t)/6);this.words=new Array(this.length);for(var r=0;r<this.length;r++){this.words[r]=0}var i,n;var a=0;for(r=e.length-6,i=0;r>=t;r-=6){n=parseHex(e,r,r+6);this.words[i]|=n<<a&67108863;this.words[i+1]|=n>>>26-a&4194303;a+=24;if(a>=26){a-=26;i++}}if(r+6!==t){n=parseHex(e,t,r+6);this.words[i]|=n<<a&67108863;this.words[i+1]|=n>>>26-a&4194303}this.strip()};function parseBase(e,t,r,i){var n=0;var a=Math.min(e.length,r);for(var f=t;f<a;f++){var o=e.charCodeAt(f)-48;n*=i;if(o>=49){n+=o-49+10}else if(o>=17){n+=o-17+10}else{n+=o}}return n}BN.prototype._parseBase=function _parseBase(e,t,r){this.words=[0];this.length=1;for(var i=0,n=1;n<=67108863;n*=t){i++}i--;n=n/t|0;var a=e.length-r;var f=a%i;var o=Math.min(a,a-f)+r;var d=0;for(var s=r;s<o;s+=i){d=parseBase(e,s,s+i,t);this.imuln(n);if(this.words[0]+d<67108864){this.words[0]+=d}else{this._iaddn(d)}}if(f!==0){var u=1;d=parseBase(e,s,e.length,t);for(s=0;s<f;s++){u*=t}this.imuln(u);if(this.words[0]+d<67108864){this.words[0]+=d}else{this._iaddn(d)}}};BN.prototype.copy=function copy(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++){e.words[t]=this.words[t]}e.length=this.length;e.negative=this.negative;e.red=this.red};BN.prototype.clone=function clone(){var e=new BN(null);this.copy(e);return e};BN.prototype._expand=function _expand(e){while(this.length<e){this.words[this.length++]=0}return this};BN.prototype.strip=function strip(){while(this.length>1&&this.words[this.length-1]===0){this.length--}return this._normSign()};BN.prototype._normSign=function _normSign(){if(this.length===1&&this.words[0]===0){this.negative=0}return this};BN.prototype.inspect=function inspect(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var n=["","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"];var a=[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];var f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];BN.prototype.toString=function toString(e,t){e=e||10;t=t|0||1;var r;if(e===16||e==="hex"){r="";var i=0;var o=0;for(var d=0;d<this.length;d++){var s=this.words[d];var u=((s<<i|o)&16777215).toString(16);o=s>>>24-i&16777215;if(o!==0||d!==this.length-1){r=n[6-u.length]+u+r}else{r=u+r}i+=2;if(i>=26){i-=26;d--}}if(o!==0){r=o.toString(16)+r}while(r.length%t!==0){r="0"+r}if(this.negative!==0){r="-"+r}return r}if(e===(e|0)&&e>=2&&e<=36){var h=a[e];var c=f[e];r="";var l=this.clone();l.negative=0;while(!l.isZero()){var b=l.modn(c).toString(e);l=l.idivn(c);if(!l.isZero()){r=n[h-b.length]+b+r}else{r=b+r}}if(this.isZero()){r="0"+r}while(r.length%t!==0){r="0"+r}if(this.negative!==0){r="-"+r}return r}assert(false,"Base should be between 2 and 36")};BN.prototype.toNumber=function toNumber(){var e=this.words[0];if(this.length===2){e+=this.words[1]*67108864}else if(this.length===3&&this.words[2]===1){e+=4503599627370496+this.words[1]*67108864}else if(this.length>2){assert(false,"Number can only safely store up to 53 bits")}return this.negative!==0?-e:e};BN.prototype.toJSON=function toJSON(){return this.toString(16)};BN.prototype.toBuffer=function toBuffer(e,t){assert(typeof i!=="undefined");return this.toArrayLike(i,e,t)};BN.prototype.toArray=function toArray(e,t){return this.toArrayLike(Array,e,t)};BN.prototype.toArrayLike=function toArrayLike(e,t,r){var i=this.byteLength();var n=r||Math.max(1,i);assert(i<=n,"byte array longer than desired length");assert(n>0,"Requested array length <= 0");this.strip();var a=t==="le";var f=new e(n);var o,d;var s=this.clone();if(!a){for(d=0;d<n-i;d++){f[d]=0}for(d=0;!s.isZero();d++){o=s.andln(255);s.iushrn(8);f[n-d-1]=o}}else{for(d=0;!s.isZero();d++){o=s.andln(255);s.iushrn(8);f[d]=o}for(;d<n;d++){f[d]=0}}return f};if(Math.clz32){BN.prototype._countBits=function _countBits(e){return 32-Math.clz32(e)}}else{BN.prototype._countBits=function _countBits(e){var t=e;var r=0;if(t>=4096){r+=13;t>>>=13}if(t>=64){r+=7;t>>>=7}if(t>=8){r+=4;t>>>=4}if(t>=2){r+=2;t>>>=2}return r+t}}BN.prototype._zeroBits=function _zeroBits(e){if(e===0)return 26;var t=e;var r=0;if((t&8191)===0){r+=13;t>>>=13}if((t&127)===0){r+=7;t>>>=7}if((t&15)===0){r+=4;t>>>=4}if((t&3)===0){r+=2;t>>>=2}if((t&1)===0){r++}return r};BN.prototype.bitLength=function bitLength(){var e=this.words[this.length-1];var t=this._countBits(e);return(this.length-1)*26+t};function toBitArray(e){var t=new Array(e.bitLength());for(var r=0;r<t.length;r++){var i=r/26|0;var n=r%26;t[r]=(e.words[i]&1<<n)>>>n}return t}BN.prototype.zeroBits=function zeroBits(){if(this.isZero())return 0;var e=0;for(var t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);e+=r;if(r!==26)break}return e};BN.prototype.byteLength=function byteLength(){return Math.ceil(this.bitLength()/8)};BN.prototype.toTwos=function toTwos(e){if(this.negative!==0){return this.abs().inotn(e).iaddn(1)}return this.clone()};BN.prototype.fromTwos=function fromTwos(e){if(this.testn(e-1)){return this.notn(e).iaddn(1).ineg()}return this.clone()};BN.prototype.isNeg=function isNeg(){return this.negative!==0};BN.prototype.neg=function neg(){return this.clone().ineg()};BN.prototype.ineg=function ineg(){if(!this.isZero()){this.negative^=1}return this};BN.prototype.iuor=function iuor(e){while(this.length<e.length){this.words[this.length++]=0}for(var t=0;t<e.length;t++){this.words[t]=this.words[t]|e.words[t]}return this.strip()};BN.prototype.ior=function ior(e){assert((this.negative|e.negative)===0);return this.iuor(e)};BN.prototype.or=function or(e){if(this.length>e.length)return this.clone().ior(e);return e.clone().ior(this)};BN.prototype.uor=function uor(e){if(this.length>e.length)return this.clone().iuor(e);return e.clone().iuor(this)};BN.prototype.iuand=function iuand(e){var t;if(this.length>e.length){t=e}else{t=this}for(var r=0;r<t.length;r++){this.words[r]=this.words[r]&e.words[r]}this.length=t.length;return this.strip()};BN.prototype.iand=function iand(e){assert((this.negative|e.negative)===0);return this.iuand(e)};BN.prototype.and=function and(e){if(this.length>e.length)return this.clone().iand(e);return e.clone().iand(this)};BN.prototype.uand=function uand(e){if(this.length>e.length)return this.clone().iuand(e);return e.clone().iuand(this)};BN.prototype.iuxor=function iuxor(e){var t;var r;if(this.length>e.length){t=this;r=e}else{t=e;r=this}for(var i=0;i<r.length;i++){this.words[i]=t.words[i]^r.words[i]}if(this!==t){for(;i<t.length;i++){this.words[i]=t.words[i]}}this.length=t.length;return this.strip()};BN.prototype.ixor=function ixor(e){assert((this.negative|e.negative)===0);return this.iuxor(e)};BN.prototype.xor=function xor(e){if(this.length>e.length)return this.clone().ixor(e);return e.clone().ixor(this)};BN.prototype.uxor=function uxor(e){if(this.length>e.length)return this.clone().iuxor(e);return e.clone().iuxor(this)};BN.prototype.inotn=function inotn(e){assert(typeof e==="number"&&e>=0);var t=Math.ceil(e/26)|0;var r=e%26;this._expand(t);if(r>0){t--}for(var i=0;i<t;i++){this.words[i]=~this.words[i]&67108863}if(r>0){this.words[i]=~this.words[i]&67108863>>26-r}return this.strip()};BN.prototype.notn=function notn(e){return this.clone().inotn(e)};BN.prototype.setn=function setn(e,t){assert(typeof e==="number"&&e>=0);var r=e/26|0;var i=e%26;this._expand(r+1);if(t){this.words[r]=this.words[r]|1<<i}else{this.words[r]=this.words[r]&~(1<<i)}return this.strip()};BN.prototype.iadd=function iadd(e){var t;if(this.negative!==0&&e.negative===0){this.negative=0;t=this.isub(e);this.negative^=1;return this._normSign()}else if(this.negative===0&&e.negative!==0){e.negative=0;t=this.isub(e);e.negative=1;return t._normSign()}var r,i;if(this.length>e.length){r=this;i=e}else{r=e;i=this}var n=0;for(var a=0;a<i.length;a++){t=(r.words[a]|0)+(i.words[a]|0)+n;this.words[a]=t&67108863;n=t>>>26}for(;n!==0&&a<r.length;a++){t=(r.words[a]|0)+n;this.words[a]=t&67108863;n=t>>>26}this.length=r.length;if(n!==0){this.words[this.length]=n;this.length++}else if(r!==this){for(;a<r.length;a++){this.words[a]=r.words[a]}}return this};BN.prototype.add=function add(e){var t;if(e.negative!==0&&this.negative===0){e.negative=0;t=this.sub(e);e.negative^=1;return t}else if(e.negative===0&&this.negative!==0){this.negative=0;t=e.sub(this);this.negative=1;return t}if(this.length>e.length)return this.clone().iadd(e);return e.clone().iadd(this)};BN.prototype.isub=function isub(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);e.negative=1;return t._normSign()}else if(this.negative!==0){this.negative=0;this.iadd(e);this.negative=1;return this._normSign()}var r=this.cmp(e);if(r===0){this.negative=0;this.length=1;this.words[0]=0;return this}var i,n;if(r>0){i=this;n=e}else{i=e;n=this}var a=0;for(var f=0;f<n.length;f++){t=(i.words[f]|0)-(n.words[f]|0)+a;a=t>>26;this.words[f]=t&67108863}for(;a!==0&&f<i.length;f++){t=(i.words[f]|0)+a;a=t>>26;this.words[f]=t&67108863}if(a===0&&f<i.length&&i!==this){for(;f<i.length;f++){this.words[f]=i.words[f]}}this.length=Math.max(this.length,f);if(i!==this){this.negative=1}return this.strip()};BN.prototype.sub=function sub(e){return this.clone().isub(e)};function smallMulTo(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i;i=i-1|0;var n=e.words[0]|0;var a=t.words[0]|0;var f=n*a;var o=f&67108863;var d=f/67108864|0;r.words[0]=o;for(var s=1;s<i;s++){var u=d>>>26;var h=d&67108863;var c=Math.min(s,t.length-1);for(var l=Math.max(0,s-e.length+1);l<=c;l++){var b=s-l|0;n=e.words[b]|0;a=t.words[l]|0;f=n*a+h;u+=f/67108864|0;h=f&67108863}r.words[s]=h|0;d=u|0}if(d!==0){r.words[s]=d|0}else{r.length--}return r.strip()}var o=function comb10MulTo(e,t,r){var i=e.words;var n=t.words;var a=r.words;var f=0;var o;var d;var s;var u=i[0]|0;var h=u&8191;var c=u>>>13;var l=i[1]|0;var b=l&8191;var v=l>>>13;var p=i[2]|0;var m=p&8191;var g=p>>>13;var y=i[3]|0;var w=y&8191;var _=y>>>13;var S=i[4]|0;var M=S&8191;var A=S>>>13;var P=i[5]|0;var B=P&8191;var E=P>>>13;var R=i[6]|0;var N=R&8191;var I=R>>>13;var k=i[7]|0;var D=k&8191;var x=k>>>13;var C=i[8]|0;var j=C&8191;var q=C>>>13;var T=i[9]|0;var H=T&8191;var L=T>>>13;var O=n[0]|0;var K=O&8191;var z=O>>>13;var W=n[1]|0;var F=W&8191;var U=W>>>13;var G=n[2]|0;var J=G&8191;var V=G>>>13;var Z=n[3]|0;var Y=Z&8191;var X=Z>>>13;var $=n[4]|0;var Q=$&8191;var ee=$>>>13;var te=n[5]|0;var re=te&8191;var ie=te>>>13;var ne=n[6]|0;var ae=ne&8191;var fe=ne>>>13;var oe=n[7]|0;var de=oe&8191;var se=oe>>>13;var ue=n[8]|0;var he=ue&8191;var ce=ue>>>13;var le=n[9]|0;var be=le&8191;var ve=le>>>13;r.negative=e.negative^t.negative;r.length=19;o=Math.imul(h,K);d=Math.imul(h,z);d=d+Math.imul(c,K)|0;s=Math.imul(c,z);var pe=(f+o|0)+((d&8191)<<13)|0;f=(s+(d>>>13)|0)+(pe>>>26)|0;pe&=67108863;o=Math.imul(b,K);d=Math.imul(b,z);d=d+Math.imul(v,K)|0;s=Math.imul(v,z);o=o+Math.imul(h,F)|0;d=d+Math.imul(h,U)|0;d=d+Math.imul(c,F)|0;s=s+Math.imul(c,U)|0;var me=(f+o|0)+((d&8191)<<13)|0;f=(s+(d>>>13)|0)+(me>>>26)|0;me&=67108863;o=Math.imul(m,K);d=Math.imul(m,z);d=d+Math.imul(g,K)|0;s=Math.imul(g,z);o=o+Math.imul(b,F)|0;d=d+Math.imul(b,U)|0;d=d+Math.imul(v,F)|0;s=s+Math.imul(v,U)|0;o=o+Math.imul(h,J)|0;d=d+Math.imul(h,V)|0;d=d+Math.imul(c,J)|0;s=s+Math.imul(c,V)|0;var ge=(f+o|0)+((d&8191)<<13)|0;f=(s+(d>>>13)|0)+(ge>>>26)|0;ge&=67108863;o=Math.imul(w,K);d=Math.imul(w,z);d=d+Math.imul(_,K)|0;s=Math.imul(_,z);o=o+Math.imul(m,F)|0;d=d+Math.imul(m,U)|0;d=d+Math.imul(g,F)|0;s=s+Math.imul(g,U)|0;o=o+Math.imul(b,J)|0;d=d+Math.imul(b,V)|0;d=d+Math.imul(v,J)|0;s=s+Math.imul(v,V)|0;o=o+Math.imul(h,Y)|0;d=d+Math.imul(h,X)|0;d=d+Math.imul(c,Y)|0;s=s+Math.imul(c,X)|0;var ye=(f+o|0)+((d&8191)<<13)|0;f=(s+(d>>>13)|0)+(ye>>>26)|0;ye&=67108863;o=Math.imul(M,K);d=Math.imul(M,z);d=d+Math.imul(A,K)|0;s=Math.imul(A,z);o=o+Math.imul(w,F)|0;d=d+Math.imul(w,U)|0;d=d+Math.imul(_,F)|0;s=s+Math.imul(_,U)|0;o=o+Math.imul(m,J)|0;d=d+Math.imul(m,V)|0;d=d+Math.imul(g,J)|0;s=s+Math.imul(g,V)|0;o=o+Math.imul(b,Y)|0;d=d+Math.imul(b,X)|0;d=d+Math.imul(v,Y)|0;s=s+Math.imul(v,X)|0;o=o+Math.imul(h,Q)|0;d=d+Math.imul(h,ee)|0;d=d+Math.imul(c,Q)|0;s=s+Math.imul(c,ee)|0;var we=(f+o|0)+((d&8191)<<13)|0;f=(s+(d>>>13)|0)+(we>>>26)|0;we&=67108863;o=Math.imul(B,K);d=Math.imul(B,z);d=d+Math.imul(E,K)|0;s=Math.imul(E,z);o=o+Math.imul(M,F)|0;d=d+Math.imul(M,U)|0;d=d+Math.imul(A,F)|0;s=s+Math.imul(A,U)|0;o=o+Math.imul(w,J)|0;d=d+Math.imul(w,V)|0;d=d+Math.imul(_,J)|0;s=s+Math.imul(_,V)|0;o=o+Math.imul(m,Y)|0;d=d+Math.imul(m,X)|0;d=d+Math.imul(g,Y)|0;s=s+Math.imul(g,X)|0;o=o+Math.imul(b,Q)|0;d=d+Math.imul(b,ee)|0;d=d+Math.imul(v,Q)|0;s=s+Math.imul(v,ee)|0;o=o+Math.imul(h,re)|0;d=d+Math.imul(h,ie)|0;d=d+Math.imul(c,re)|0;s=s+Math.imul(c,ie)|0;var _e=(f+o|0)+((d&8191)<<13)|0;f=(s+(d>>>13)|0)+(_e>>>26)|0;_e&=67108863;o=Math.imul(N,K);d=Math.imul(N,z);d=d+Math.imul(I,K)|0;s=Math.imul(I,z);o=o+Math.imul(B,F)|0;d=d+Math.imul(B,U)|0;d=d+Math.imul(E,F)|0;s=s+Math.imul(E,U)|0;o=o+Math.imul(M,J)|0;d=d+Math.imul(M,V)|0;d=d+Math.imul(A,J)|0;s=s+Math.imul(A,V)|0;o=o+Math.imul(w,Y)|0;d=d+Math.imul(w,X)|0;d=d+Math.imul(_,Y)|0;s=s+Math.imul(_,X)|0;o=o+Math.imul(m,Q)|0;d=d+Math.imul(m,ee)|0;d=d+Math.imul(g,Q)|0;s=s+Math.imul(g,ee)|0;o=o+Math.imul(b,re)|0;d=d+Math.imul(b,ie)|0;d=d+Math.imul(v,re)|0;s=s+Math.imul(v,ie)|0;o=o+Math.imul(h,ae)|0;d=d+Math.imul(h,fe)|0;d=d+Math.imul(c,ae)|0;s=s+Math.imul(c,fe)|0;var Se=(f+o|0)+((d&8191)<<13)|0;f=(s+(d>>>13)|0)+(Se>>>26)|0;Se&=67108863;o=Math.imul(D,K);d=Math.imul(D,z);d=d+Math.imul(x,K)|0;s=Math.imul(x,z);o=o+Math.imul(N,F)|0;d=d+Math.imul(N,U)|0;d=d+Math.imul(I,F)|0;s=s+Math.imul(I,U)|0;o=o+Math.imul(B,J)|0;d=d+Math.imul(B,V)|0;d=d+Math.imul(E,J)|0;s=s+Math.imul(E,V)|0;o=o+Math.imul(M,Y)|0;d=d+Math.imul(M,X)|0;d=d+Math.imul(A,Y)|0;s=s+Math.imul(A,X)|0;o=o+Math.imul(w,Q)|0;d=d+Math.imul(w,ee)|0;d=d+Math.imul(_,Q)|0;s=s+Math.imul(_,ee)|0;o=o+Math.imul(m,re)|0;d=d+Math.imul(m,ie)|0;d=d+Math.imul(g,re)|0;s=s+Math.imul(g,ie)|0;o=o+Math.imul(b,ae)|0;d=d+Math.imul(b,fe)|0;d=d+Math.imul(v,ae)|0;s=s+Math.imul(v,fe)|0;o=o+Math.imul(h,de)|0;d=d+Math.imul(h,se)|0;d=d+Math.imul(c,de)|0;s=s+Math.imul(c,se)|0;var Me=(f+o|0)+((d&8191)<<13)|0;f=(s+(d>>>13)|0)+(Me>>>26)|0;Me&=67108863;o=Math.imul(j,K);d=Math.imul(j,z);d=d+Math.imul(q,K)|0;s=Math.imul(q,z);o=o+Math.imul(D,F)|0;d=d+Math.imul(D,U)|0;d=d+Math.imul(x,F)|0;s=s+Math.imul(x,U)|0;o=o+Math.imul(N,J)|0;d=d+Math.imul(N,V)|0;d=d+Math.imul(I,J)|0;s=s+Math.imul(I,V)|0;o=o+Math.imul(B,Y)|0;d=d+Math.imul(B,X)|0;d=d+Math.imul(E,Y)|0;s=s+Math.imul(E,X)|0;o=o+Math.imul(M,Q)|0;d=d+Math.imul(M,ee)|0;d=d+Math.imul(A,Q)|0;s=s+Math.imul(A,ee)|0;o=o+Math.imul(w,re)|0;d=d+Math.imul(w,ie)|0;d=d+Math.imul(_,re)|0;s=s+Math.imul(_,ie)|0;o=o+Math.imul(m,ae)|0;d=d+Math.imul(m,fe)|0;d=d+Math.imul(g,ae)|0;s=s+Math.imul(g,fe)|0;o=o+Math.imul(b,de)|0;d=d+Math.imul(b,se)|0;d=d+Math.imul(v,de)|0;s=s+Math.imul(v,se)|0;o=o+Math.imul(h,he)|0;d=d+Math.imul(h,ce)|0;d=d+Math.imul(c,he)|0;s=s+Math.imul(c,ce)|0;var Ae=(f+o|0)+((d&8191)<<13)|0;f=(s+(d>>>13)|0)+(Ae>>>26)|0;Ae&=67108863;o=Math.imul(H,K);d=Math.imul(H,z);d=d+Math.imul(L,K)|0;s=Math.imul(L,z);o=o+Math.imul(j,F)|0;d=d+Math.imul(j,U)|0;d=d+Math.imul(q,F)|0;s=s+Math.imul(q,U)|0;o=o+Math.imul(D,J)|0;d=d+Math.imul(D,V)|0;d=d+Math.imul(x,J)|0;s=s+Math.imul(x,V)|0;o=o+Math.imul(N,Y)|0;d=d+Math.imul(N,X)|0;d=d+Math.imul(I,Y)|0;s=s+Math.imul(I,X)|0;o=o+Math.imul(B,Q)|0;d=d+Math.imul(B,ee)|0;d=d+Math.imul(E,Q)|0;s=s+Math.imul(E,ee)|0;o=o+Math.imul(M,re)|0;d=d+Math.imul(M,ie)|0;d=d+Math.imul(A,re)|0;s=s+Math.imul(A,ie)|0;o=o+Math.imul(w,ae)|0;d=d+Math.imul(w,fe)|0;d=d+Math.imul(_,ae)|0;s=s+Math.imul(_,fe)|0;o=o+Math.imul(m,de)|0;d=d+Math.imul(m,se)|0;d=d+Math.imul(g,de)|0;s=s+Math.imul(g,se)|0;o=o+Math.imul(b,he)|0;d=d+Math.imul(b,ce)|0;d=d+Math.imul(v,he)|0;s=s+Math.imul(v,ce)|0;o=o+Math.imul(h,be)|0;d=d+Math.imul(h,ve)|0;d=d+Math.imul(c,be)|0;s=s+Math.imul(c,ve)|0;var Pe=(f+o|0)+((d&8191)<<13)|0;f=(s+(d>>>13)|0)+(Pe>>>26)|0;Pe&=67108863;o=Math.imul(H,F);d=Math.imul(H,U);d=d+Math.imul(L,F)|0;s=Math.imul(L,U);o=o+Math.imul(j,J)|0;d=d+Math.imul(j,V)|0;d=d+Math.imul(q,J)|0;s=s+Math.imul(q,V)|0;o=o+Math.imul(D,Y)|0;d=d+Math.imul(D,X)|0;d=d+Math.imul(x,Y)|0;s=s+Math.imul(x,X)|0;o=o+Math.imul(N,Q)|0;d=d+Math.imul(N,ee)|0;d=d+Math.imul(I,Q)|0;s=s+Math.imul(I,ee)|0;o=o+Math.imul(B,re)|0;d=d+Math.imul(B,ie)|0;d=d+Math.imul(E,re)|0;s=s+Math.imul(E,ie)|0;o=o+Math.imul(M,ae)|0;d=d+Math.imul(M,fe)|0;d=d+Math.imul(A,ae)|0;s=s+Math.imul(A,fe)|0;o=o+Math.imul(w,de)|0;d=d+Math.imul(w,se)|0;d=d+Math.imul(_,de)|0;s=s+Math.imul(_,se)|0;o=o+Math.imul(m,he)|0;d=d+Math.imul(m,ce)|0;d=d+Math.imul(g,he)|0;s=s+Math.imul(g,ce)|0;o=o+Math.imul(b,be)|0;d=d+Math.imul(b,ve)|0;d=d+Math.imul(v,be)|0;s=s+Math.imul(v,ve)|0;var Be=(f+o|0)+((d&8191)<<13)|0;f=(s+(d>>>13)|0)+(Be>>>26)|0;Be&=67108863;o=Math.imul(H,J);d=Math.imul(H,V);d=d+Math.imul(L,J)|0;s=Math.imul(L,V);o=o+Math.imul(j,Y)|0;d=d+Math.imul(j,X)|0;d=d+Math.imul(q,Y)|0;s=s+Math.imul(q,X)|0;o=o+Math.imul(D,Q)|0;d=d+Math.imul(D,ee)|0;d=d+Math.imul(x,Q)|0;s=s+Math.imul(x,ee)|0;o=o+Math.imul(N,re)|0;d=d+Math.imul(N,ie)|0;d=d+Math.imul(I,re)|0;s=s+Math.imul(I,ie)|0;o=o+Math.imul(B,ae)|0;d=d+Math.imul(B,fe)|0;d=d+Math.imul(E,ae)|0;s=s+Math.imul(E,fe)|0;o=o+Math.imul(M,de)|0;d=d+Math.imul(M,se)|0;d=d+Math.imul(A,de)|0;s=s+Math.imul(A,se)|0;o=o+Math.imul(w,he)|0;d=d+Math.imul(w,ce)|0;d=d+Math.imul(_,he)|0;s=s+Math.imul(_,ce)|0;o=o+Math.imul(m,be)|0;d=d+Math.imul(m,ve)|0;d=d+Math.imul(g,be)|0;s=s+Math.imul(g,ve)|0;var Ee=(f+o|0)+((d&8191)<<13)|0;f=(s+(d>>>13)|0)+(Ee>>>26)|0;Ee&=67108863;o=Math.imul(H,Y);d=Math.imul(H,X);d=d+Math.imul(L,Y)|0;s=Math.imul(L,X);o=o+Math.imul(j,Q)|0;d=d+Math.imul(j,ee)|0;d=d+Math.imul(q,Q)|0;s=s+Math.imul(q,ee)|0;o=o+Math.imul(D,re)|0;d=d+Math.imul(D,ie)|0;d=d+Math.imul(x,re)|0;s=s+Math.imul(x,ie)|0;o=o+Math.imul(N,ae)|0;d=d+Math.imul(N,fe)|0;d=d+Math.imul(I,ae)|0;s=s+Math.imul(I,fe)|0;o=o+Math.imul(B,de)|0;d=d+Math.imul(B,se)|0;d=d+Math.imul(E,de)|0;s=s+Math.imul(E,se)|0;o=o+Math.imul(M,he)|0;d=d+Math.imul(M,ce)|0;d=d+Math.imul(A,he)|0;s=s+Math.imul(A,ce)|0;o=o+Math.imul(w,be)|0;d=d+Math.imul(w,ve)|0;d=d+Math.imul(_,be)|0;s=s+Math.imul(_,ve)|0;var Re=(f+o|0)+((d&8191)<<13)|0;f=(s+(d>>>13)|0)+(Re>>>26)|0;Re&=67108863;o=Math.imul(H,Q);d=Math.imul(H,ee);d=d+Math.imul(L,Q)|0;s=Math.imul(L,ee);o=o+Math.imul(j,re)|0;d=d+Math.imul(j,ie)|0;d=d+Math.imul(q,re)|0;s=s+Math.imul(q,ie)|0;o=o+Math.imul(D,ae)|0;d=d+Math.imul(D,fe)|0;d=d+Math.imul(x,ae)|0;s=s+Math.imul(x,fe)|0;o=o+Math.imul(N,de)|0;d=d+Math.imul(N,se)|0;d=d+Math.imul(I,de)|0;s=s+Math.imul(I,se)|0;o=o+Math.imul(B,he)|0;d=d+Math.imul(B,ce)|0;d=d+Math.imul(E,he)|0;s=s+Math.imul(E,ce)|0;o=o+Math.imul(M,be)|0;d=d+Math.imul(M,ve)|0;d=d+Math.imul(A,be)|0;s=s+Math.imul(A,ve)|0;var Ne=(f+o|0)+((d&8191)<<13)|0;f=(s+(d>>>13)|0)+(Ne>>>26)|0;Ne&=67108863;o=Math.imul(H,re);d=Math.imul(H,ie);d=d+Math.imul(L,re)|0;s=Math.imul(L,ie);o=o+Math.imul(j,ae)|0;d=d+Math.imul(j,fe)|0;d=d+Math.imul(q,ae)|0;s=s+Math.imul(q,fe)|0;o=o+Math.imul(D,de)|0;d=d+Math.imul(D,se)|0;d=d+Math.imul(x,de)|0;s=s+Math.imul(x,se)|0;o=o+Math.imul(N,he)|0;d=d+Math.imul(N,ce)|0;d=d+Math.imul(I,he)|0;s=s+Math.imul(I,ce)|0;o=o+Math.imul(B,be)|0;d=d+Math.imul(B,ve)|0;d=d+Math.imul(E,be)|0;s=s+Math.imul(E,ve)|0;var Ie=(f+o|0)+((d&8191)<<13)|0;f=(s+(d>>>13)|0)+(Ie>>>26)|0;Ie&=67108863;o=Math.imul(H,ae);d=Math.imul(H,fe);d=d+Math.imul(L,ae)|0;s=Math.imul(L,fe);o=o+Math.imul(j,de)|0;d=d+Math.imul(j,se)|0;d=d+Math.imul(q,de)|0;s=s+Math.imul(q,se)|0;o=o+Math.imul(D,he)|0;d=d+Math.imul(D,ce)|0;d=d+Math.imul(x,he)|0;s=s+Math.imul(x,ce)|0;o=o+Math.imul(N,be)|0;d=d+Math.imul(N,ve)|0;d=d+Math.imul(I,be)|0;s=s+Math.imul(I,ve)|0;var ke=(f+o|0)+((d&8191)<<13)|0;f=(s+(d>>>13)|0)+(ke>>>26)|0;ke&=67108863;o=Math.imul(H,de);d=Math.imul(H,se);d=d+Math.imul(L,de)|0;s=Math.imul(L,se);o=o+Math.imul(j,he)|0;d=d+Math.imul(j,ce)|0;d=d+Math.imul(q,he)|0;s=s+Math.imul(q,ce)|0;o=o+Math.imul(D,be)|0;d=d+Math.imul(D,ve)|0;d=d+Math.imul(x,be)|0;s=s+Math.imul(x,ve)|0;var De=(f+o|0)+((d&8191)<<13)|0;f=(s+(d>>>13)|0)+(De>>>26)|0;De&=67108863;o=Math.imul(H,he);d=Math.imul(H,ce);d=d+Math.imul(L,he)|0;s=Math.imul(L,ce);o=o+Math.imul(j,be)|0;d=d+Math.imul(j,ve)|0;d=d+Math.imul(q,be)|0;s=s+Math.imul(q,ve)|0;var xe=(f+o|0)+((d&8191)<<13)|0;f=(s+(d>>>13)|0)+(xe>>>26)|0;xe&=67108863;o=Math.imul(H,be);d=Math.imul(H,ve);d=d+Math.imul(L,be)|0;s=Math.imul(L,ve);var Ce=(f+o|0)+((d&8191)<<13)|0;f=(s+(d>>>13)|0)+(Ce>>>26)|0;Ce&=67108863;a[0]=pe;a[1]=me;a[2]=ge;a[3]=ye;a[4]=we;a[5]=_e;a[6]=Se;a[7]=Me;a[8]=Ae;a[9]=Pe;a[10]=Be;a[11]=Ee;a[12]=Re;a[13]=Ne;a[14]=Ie;a[15]=ke;a[16]=De;a[17]=xe;a[18]=Ce;if(f!==0){a[19]=f;r.length++}return r};if(!Math.imul){o=smallMulTo}function bigMulTo(e,t,r){r.negative=t.negative^e.negative;r.length=e.length+t.length;var i=0;var n=0;for(var a=0;a<r.length-1;a++){var f=n;n=0;var o=i&67108863;var d=Math.min(a,t.length-1);for(var s=Math.max(0,a-e.length+1);s<=d;s++){var u=a-s;var h=e.words[u]|0;var c=t.words[s]|0;var l=h*c;var b=l&67108863;f=f+(l/67108864|0)|0;b=b+o|0;o=b&67108863;f=f+(b>>>26)|0;n+=f>>>26;f&=67108863}r.words[a]=o;i=f;f=n}if(i!==0){r.words[a]=i}else{r.length--}return r.strip()}function jumboMulTo(e,t,r){var i=new FFTM;return i.mulp(e,t,r)}BN.prototype.mulTo=function mulTo(e,t){var r;var i=this.length+e.length;if(this.length===10&&e.length===10){r=o(this,e,t)}else if(i<63){r=smallMulTo(this,e,t)}else if(i<1024){r=bigMulTo(this,e,t)}else{r=jumboMulTo(this,e,t)}return r};function FFTM(e,t){this.x=e;this.y=t}FFTM.prototype.makeRBT=function makeRBT(e){var t=new Array(e);var r=BN.prototype._countBits(e)-1;for(var i=0;i<e;i++){t[i]=this.revBin(i,r,e)}return t};FFTM.prototype.revBin=function revBin(e,t,r){if(e===0||e===r-1)return e;var i=0;for(var n=0;n<t;n++){i|=(e&1)<<t-n-1;e>>=1}return i};FFTM.prototype.permute=function permute(e,t,r,i,n,a){for(var f=0;f<a;f++){i[f]=t[e[f]];n[f]=r[e[f]]}};FFTM.prototype.transform=function transform(e,t,r,i,n,a){this.permute(a,e,t,r,i,n);for(var f=1;f<n;f<<=1){var o=f<<1;var d=Math.cos(2*Math.PI/o);var s=Math.sin(2*Math.PI/o);for(var u=0;u<n;u+=o){var h=d;var c=s;for(var l=0;l<f;l++){var b=r[u+l];var v=i[u+l];var p=r[u+l+f];var m=i[u+l+f];var g=h*p-c*m;m=h*m+c*p;p=g;r[u+l]=b+p;i[u+l]=v+m;r[u+l+f]=b-p;i[u+l+f]=v-m;if(l!==o){g=d*h-s*c;c=d*c+s*h;h=g}}}}};FFTM.prototype.guessLen13b=function guessLen13b(e,t){var r=Math.max(t,e)|1;var i=r&1;var n=0;for(r=r/2|0;r;r=r>>>1){n++}return 1<<n+1+i};FFTM.prototype.conjugate=function conjugate(e,t,r){if(r<=1)return;for(var i=0;i<r/2;i++){var n=e[i];e[i]=e[r-i-1];e[r-i-1]=n;n=t[i];t[i]=-t[r-i-1];t[r-i-1]=-n}};FFTM.prototype.normalize13b=function normalize13b(e,t){var r=0;for(var i=0;i<t/2;i++){var n=Math.round(e[2*i+1]/t)*8192+Math.round(e[2*i]/t)+r;e[i]=n&67108863;if(n<67108864){r=0}else{r=n/67108864|0}}return e};FFTM.prototype.convert13b=function convert13b(e,t,r,i){var n=0;for(var a=0;a<t;a++){n=n+(e[a]|0);r[2*a]=n&8191;n=n>>>13;r[2*a+1]=n&8191;n=n>>>13}for(a=2*t;a<i;++a){r[a]=0}assert(n===0);assert((n&~8191)===0)};FFTM.prototype.stub=function stub(e){var t=new Array(e);for(var r=0;r<e;r++){t[r]=0}return t};FFTM.prototype.mulp=function mulp(e,t,r){var i=2*this.guessLen13b(e.length,t.length);var n=this.makeRBT(i);var a=this.stub(i);var f=new Array(i);var o=new Array(i);var d=new Array(i);var s=new Array(i);var u=new Array(i);var h=new Array(i);var c=r.words;c.length=i;this.convert13b(e.words,e.length,f,i);this.convert13b(t.words,t.length,s,i);this.transform(f,a,o,d,i,n);this.transform(s,a,u,h,i,n);for(var l=0;l<i;l++){var b=o[l]*u[l]-d[l]*h[l];d[l]=o[l]*h[l]+d[l]*u[l];o[l]=b}this.conjugate(o,d,i);this.transform(o,d,c,a,i,n);this.conjugate(c,a,i);this.normalize13b(c,i);r.negative=e.negative^t.negative;r.length=e.length+t.length;return r.strip()};BN.prototype.mul=function mul(e){var t=new BN(null);t.words=new Array(this.length+e.length);return this.mulTo(e,t)};BN.prototype.mulf=function mulf(e){var t=new BN(null);t.words=new Array(this.length+e.length);return jumboMulTo(this,e,t)};BN.prototype.imul=function imul(e){return this.clone().mulTo(e,this)};BN.prototype.imuln=function imuln(e){assert(typeof e==="number");assert(e<67108864);var t=0;for(var r=0;r<this.length;r++){var i=(this.words[r]|0)*e;var n=(i&67108863)+(t&67108863);t>>=26;t+=i/67108864|0;t+=n>>>26;this.words[r]=n&67108863}if(t!==0){this.words[r]=t;this.length++}return this};BN.prototype.muln=function muln(e){return this.clone().imuln(e)};BN.prototype.sqr=function sqr(){return this.mul(this)};BN.prototype.isqr=function isqr(){return this.imul(this.clone())};BN.prototype.pow=function pow(e){var t=toBitArray(e);if(t.length===0)return new BN(1);var r=this;for(var i=0;i<t.length;i++,r=r.sqr()){if(t[i]!==0)break}if(++i<t.length){for(var n=r.sqr();i<t.length;i++,n=n.sqr()){if(t[i]===0)continue;r=r.mul(n)}}return r};BN.prototype.iushln=function iushln(e){assert(typeof e==="number"&&e>=0);var t=e%26;var r=(e-t)/26;var i=67108863>>>26-t<<26-t;var n;if(t!==0){var a=0;for(n=0;n<this.length;n++){var f=this.words[n]&i;var o=(this.words[n]|0)-f<<t;this.words[n]=o|a;a=f>>>26-t}if(a){this.words[n]=a;this.length++}}if(r!==0){for(n=this.length-1;n>=0;n--){this.words[n+r]=this.words[n]}for(n=0;n<r;n++){this.words[n]=0}this.length+=r}return this.strip()};BN.prototype.ishln=function ishln(e){assert(this.negative===0);return this.iushln(e)};BN.prototype.iushrn=function iushrn(e,t,r){assert(typeof e==="number"&&e>=0);var i;if(t){i=(t-t%26)/26}else{i=0}var n=e%26;var a=Math.min((e-n)/26,this.length);var f=67108863^67108863>>>n<<n;var o=r;i-=a;i=Math.max(0,i);if(o){for(var d=0;d<a;d++){o.words[d]=this.words[d]}o.length=a}if(a===0){}else if(this.length>a){this.length-=a;for(d=0;d<this.length;d++){this.words[d]=this.words[d+a]}}else{this.words[0]=0;this.length=1}var s=0;for(d=this.length-1;d>=0&&(s!==0||d>=i);d--){var u=this.words[d]|0;this.words[d]=s<<26-n|u>>>n;s=u&f}if(o&&s!==0){o.words[o.length++]=s}if(this.length===0){this.words[0]=0;this.length=1}return this.strip()};BN.prototype.ishrn=function ishrn(e,t,r){assert(this.negative===0);return this.iushrn(e,t,r)};BN.prototype.shln=function shln(e){return this.clone().ishln(e)};BN.prototype.ushln=function ushln(e){return this.clone().iushln(e)};BN.prototype.shrn=function shrn(e){return this.clone().ishrn(e)};BN.prototype.ushrn=function ushrn(e){return this.clone().iushrn(e)};BN.prototype.testn=function testn(e){assert(typeof e==="number"&&e>=0);var t=e%26;var r=(e-t)/26;var i=1<<t;if(this.length<=r)return false;var n=this.words[r];return!!(n&i)};BN.prototype.imaskn=function imaskn(e){assert(typeof e==="number"&&e>=0);var t=e%26;var r=(e-t)/26;assert(this.negative===0,"imaskn works only with positive numbers");if(this.length<=r){return this}if(t!==0){r++}this.length=Math.min(r,this.length);if(t!==0){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()};BN.prototype.maskn=function maskn(e){return this.clone().imaskn(e)};BN.prototype.iaddn=function iaddn(e){assert(typeof e==="number");assert(e<67108864);if(e<0)return this.isubn(-e);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<e){this.words[0]=e-(this.words[0]|0);this.negative=0;return this}this.negative=0;this.isubn(e);this.negative=1;return this}return this._iaddn(e)};BN.prototype._iaddn=function _iaddn(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++){this.words[t]-=67108864;if(t===this.length-1){this.words[t+1]=1}else{this.words[t+1]++}}this.length=Math.max(this.length,t+1);return this};BN.prototype.isubn=function isubn(e){assert(typeof e==="number");assert(e<67108864);if(e<0)return this.iaddn(-e);if(this.negative!==0){this.negative=0;this.iaddn(e);this.negative=1;return this}this.words[0]-=e;if(this.length===1&&this.words[0]<0){this.words[0]=-this.words[0];this.negative=1}else{for(var t=0;t<this.length&&this.words[t]<0;t++){this.words[t]+=67108864;this.words[t+1]-=1}}return this.strip()};BN.prototype.addn=function addn(e){return this.clone().iaddn(e)};BN.prototype.subn=function subn(e){return this.clone().isubn(e)};BN.prototype.iabs=function iabs(){this.negative=0;return this};BN.prototype.abs=function abs(){return this.clone().iabs()};BN.prototype._ishlnsubmul=function _ishlnsubmul(e,t,r){var i=e.length+r;var n;this._expand(i);var a;var f=0;for(n=0;n<e.length;n++){a=(this.words[n+r]|0)+f;var o=(e.words[n]|0)*t;a-=o&67108863;f=(a>>26)-(o/67108864|0);this.words[n+r]=a&67108863}for(;n<this.length-r;n++){a=(this.words[n+r]|0)+f;f=a>>26;this.words[n+r]=a&67108863}if(f===0)return this.strip();assert(f===-1);f=0;for(n=0;n<this.length;n++){a=-(this.words[n]|0)+f;f=a>>26;this.words[n]=a&67108863}this.negative=1;return this.strip()};BN.prototype._wordDiv=function _wordDiv(e,t){var r=this.length-e.length;var i=this.clone();var n=e;var a=n.words[n.length-1]|0;var f=this._countBits(a);r=26-f;if(r!==0){n=n.ushln(r);i.iushln(r);a=n.words[n.length-1]|0}var o=i.length-n.length;var d;if(t!=="mod"){d=new BN(null);d.length=o+1;d.words=new Array(d.length);for(var s=0;s<d.length;s++){d.words[s]=0}}var u=i.clone()._ishlnsubmul(n,1,o);if(u.negative===0){i=u;if(d){d.words[o]=1}}for(var h=o-1;h>=0;h--){var c=(i.words[n.length+h]|0)*67108864+(i.words[n.length+h-1]|0);c=Math.min(c/a|0,67108863);i._ishlnsubmul(n,c,h);while(i.negative!==0){c--;i.negative=0;i._ishlnsubmul(n,1,h);if(!i.isZero()){i.negative^=1}}if(d){d.words[h]=c}}if(d){d.strip()}i.strip();if(t!=="div"&&r!==0){i.iushrn(r)}return{div:d||null,mod:i}};BN.prototype.divmod=function divmod(e,t,r){assert(!e.isZero());if(this.isZero()){return{div:new BN(0),mod:new BN(0)}}var i,n,a;if(this.negative!==0&&e.negative===0){a=this.neg().divmod(e,t);if(t!=="mod"){i=a.div.neg()}if(t!=="div"){n=a.mod.neg();if(r&&n.negative!==0){n.iadd(e)}}return{div:i,mod:n}}if(this.negative===0&&e.negative!==0){a=this.divmod(e.neg(),t);if(t!=="mod"){i=a.div.neg()}return{div:i,mod:a.mod}}if((this.negative&e.negative)!==0){a=this.neg().divmod(e.neg(),t);if(t!=="div"){n=a.mod.neg();if(r&&n.negative!==0){n.isub(e)}}return{div:a.div,mod:n}}if(e.length>this.length||this.cmp(e)<0){return{div:new BN(0),mod:this}}if(e.length===1){if(t==="div"){return{div:this.divn(e.words[0]),mod:null}}if(t==="mod"){return{div:null,mod:new BN(this.modn(e.words[0]))}}return{div:this.divn(e.words[0]),mod:new BN(this.modn(e.words[0]))}}return this._wordDiv(e,t)};BN.prototype.div=function div(e){return this.divmod(e,"div",false).div};BN.prototype.mod=function mod(e){return this.divmod(e,"mod",false).mod};BN.prototype.umod=function umod(e){return this.divmod(e,"mod",true).mod};BN.prototype.divRound=function divRound(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=t.div.negative!==0?t.mod.isub(e):t.mod;var i=e.ushrn(1);var n=e.andln(1);var a=r.cmp(i);if(a<0||n===1&&a===0)return t.div;return t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)};BN.prototype.modn=function modn(e){assert(e<=67108863);var t=(1<<26)%e;var r=0;for(var i=this.length-1;i>=0;i--){r=(t*r+(this.words[i]|0))%e}return r};BN.prototype.idivn=function idivn(e){assert(e<=67108863);var t=0;for(var r=this.length-1;r>=0;r--){var i=(this.words[r]|0)+t*67108864;this.words[r]=i/e|0;t=i%e}return this.strip()};BN.prototype.divn=function divn(e){return this.clone().idivn(e)};BN.prototype.egcd=function egcd(e){assert(e.negative===0);assert(!e.isZero());var t=this;var r=e.clone();if(t.negative!==0){t=t.umod(e)}else{t=t.clone()}var i=new BN(1);var n=new BN(0);var a=new BN(0);var f=new BN(1);var o=0;while(t.isEven()&&r.isEven()){t.iushrn(1);r.iushrn(1);++o}var d=r.clone();var s=t.clone();while(!t.isZero()){for(var u=0,h=1;(t.words[0]&h)===0&&u<26;++u,h<<=1);if(u>0){t.iushrn(u);while(u-- >0){if(i.isOdd()||n.isOdd()){i.iadd(d);n.isub(s)}i.iushrn(1);n.iushrn(1)}}for(var c=0,l=1;(r.words[0]&l)===0&&c<26;++c,l<<=1);if(c>0){r.iushrn(c);while(c-- >0){if(a.isOdd()||f.isOdd()){a.iadd(d);f.isub(s)}a.iushrn(1);f.iushrn(1)}}if(t.cmp(r)>=0){t.isub(r);i.isub(a);n.isub(f)}else{r.isub(t);a.isub(i);f.isub(n)}}return{a:a,b:f,gcd:r.iushln(o)}};BN.prototype._invmp=function _invmp(e){assert(e.negative===0);assert(!e.isZero());var t=this;var r=e.clone();if(t.negative!==0){t=t.umod(e)}else{t=t.clone()}var i=new BN(1);var n=new BN(0);var a=r.clone();while(t.cmpn(1)>0&&r.cmpn(1)>0){for(var f=0,o=1;(t.words[0]&o)===0&&f<26;++f,o<<=1);if(f>0){t.iushrn(f);while(f-- >0){if(i.isOdd()){i.iadd(a)}i.iushrn(1)}}for(var d=0,s=1;(r.words[0]&s)===0&&d<26;++d,s<<=1);if(d>0){r.iushrn(d);while(d-- >0){if(n.isOdd()){n.iadd(a)}n.iushrn(1)}}if(t.cmp(r)>=0){t.isub(r);i.isub(n)}else{r.isub(t);n.isub(i)}}var u;if(t.cmpn(1)===0){u=i}else{u=n}if(u.cmpn(0)<0){u.iadd(e)}return u};BN.prototype.gcd=function gcd(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone();var r=e.clone();t.negative=0;r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++){t.iushrn(1);r.iushrn(1)}do{while(t.isEven()){t.iushrn(1)}while(r.isEven()){r.iushrn(1)}var n=t.cmp(r);if(n<0){var a=t;t=r;r=a}else if(n===0||r.cmpn(1)===0){break}t.isub(r)}while(true);return r.iushln(i)};BN.prototype.invm=function invm(e){return this.egcd(e).a.umod(e)};BN.prototype.isEven=function isEven(){return(this.words[0]&1)===0};BN.prototype.isOdd=function isOdd(){return(this.words[0]&1)===1};BN.prototype.andln=function andln(e){return this.words[0]&e};BN.prototype.bincn=function bincn(e){assert(typeof e==="number");var t=e%26;var r=(e-t)/26;var i=1<<t;if(this.length<=r){this._expand(r+1);this.words[r]|=i;return this}var n=i;for(var a=r;n!==0&&a<this.length;a++){var f=this.words[a]|0;f+=n;n=f>>>26;f&=67108863;this.words[a]=f}if(n!==0){this.words[a]=n;this.length++}return this};BN.prototype.isZero=function isZero(){return this.length===1&&this.words[0]===0};BN.prototype.cmpn=function cmpn(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var r;if(this.length>1){r=1}else{if(t){e=-e}assert(e<=67108863,"Number is too big");var i=this.words[0]|0;r=i===e?0:i<e?-1:1}if(this.negative!==0)return-r|0;return r};BN.prototype.cmp=function cmp(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);if(this.negative!==0)return-t|0;return t};BN.prototype.ucmp=function ucmp(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;var t=0;for(var r=this.length-1;r>=0;r--){var i=this.words[r]|0;var n=e.words[r]|0;if(i===n)continue;if(i<n){t=-1}else if(i>n){t=1}break}return t};BN.prototype.gtn=function gtn(e){return this.cmpn(e)===1};BN.prototype.gt=function gt(e){return this.cmp(e)===1};BN.prototype.gten=function gten(e){return this.cmpn(e)>=0};BN.prototype.gte=function gte(e){return this.cmp(e)>=0};BN.prototype.ltn=function ltn(e){return this.cmpn(e)===-1};BN.prototype.lt=function lt(e){return this.cmp(e)===-1};BN.prototype.lten=function lten(e){return this.cmpn(e)<=0};BN.prototype.lte=function lte(e){return this.cmp(e)<=0};BN.prototype.eqn=function eqn(e){return this.cmpn(e)===0};BN.prototype.eq=function eq(e){return this.cmp(e)===0};BN.red=function red(e){return new Red(e)};BN.prototype.toRed=function toRed(e){assert(!this.red,"Already a number in reduction context");assert(this.negative===0,"red works only with positives");return e.convertTo(this)._forceRed(e)};BN.prototype.fromRed=function fromRed(){assert(this.red,"fromRed works only with numbers in reduction context");return this.red.convertFrom(this)};BN.prototype._forceRed=function _forceRed(e){this.red=e;return this};BN.prototype.forceRed=function forceRed(e){assert(!this.red,"Already a number in reduction context");return this._forceRed(e)};BN.prototype.redAdd=function redAdd(e){assert(this.red,"redAdd works only with red numbers");return this.red.add(this,e)};BN.prototype.redIAdd=function redIAdd(e){assert(this.red,"redIAdd works only with red numbers");return this.red.iadd(this,e)};BN.prototype.redSub=function redSub(e){assert(this.red,"redSub works only with red numbers");return this.red.sub(this,e)};BN.prototype.redISub=function redISub(e){assert(this.red,"redISub works only with red numbers");return this.red.isub(this,e)};BN.prototype.redShl=function redShl(e){assert(this.red,"redShl works only with red numbers");return this.red.shl(this,e)};BN.prototype.redMul=function redMul(e){assert(this.red,"redMul works only with red numbers");this.red._verify2(this,e);return this.red.mul(this,e)};BN.prototype.redIMul=function redIMul(e){assert(this.red,"redMul works only with red numbers");this.red._verify2(this,e);return this.red.imul(this,e)};BN.prototype.redSqr=function redSqr(){assert(this.red,"redSqr works only with red numbers");this.red._verify1(this);return this.red.sqr(this)};BN.prototype.redISqr=function redISqr(){assert(this.red,"redISqr works only with red numbers");this.red._verify1(this);return this.red.isqr(this)};BN.prototype.redSqrt=function redSqrt(){assert(this.red,"redSqrt works only with red numbers");this.red._verify1(this);return this.red.sqrt(this)};BN.prototype.redInvm=function redInvm(){assert(this.red,"redInvm works only with red numbers");this.red._verify1(this);return this.red.invm(this)};BN.prototype.redNeg=function redNeg(){assert(this.red,"redNeg works only with red numbers");this.red._verify1(this);return this.red.neg(this)};BN.prototype.redPow=function redPow(e){assert(this.red&&!e.red,"redPow(normalNum)");this.red._verify1(this);return this.red.pow(this,e)};var d={k256:null,p224:null,p192:null,p25519:null};function MPrime(e,t){this.name=e;this.p=new BN(t,16);this.n=this.p.bitLength();this.k=new BN(1).iushln(this.n).isub(this.p);this.tmp=this._tmp()}MPrime.prototype._tmp=function _tmp(){var e=new BN(null);e.words=new Array(Math.ceil(this.n/13));return e};MPrime.prototype.ireduce=function ireduce(e){var t=e;var r;do{this.split(t,this.tmp);t=this.imulK(t);t=t.iadd(this.tmp);r=t.bitLength()}while(r>this.n);var i=r<this.n?-1:t.ucmp(this.p);if(i===0){t.words[0]=0;t.length=1}else if(i>0){t.isub(this.p)}else{if(t.strip!==undefined){t.strip()}else{t._strip()}}return t};MPrime.prototype.split=function split(e,t){e.iushrn(this.n,0,t)};MPrime.prototype.imulK=function imulK(e){return e.imul(this.k)};function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}inherits(K256,MPrime);K256.prototype.split=function split(e,t){var r=4194303;var i=Math.min(e.length,9);for(var n=0;n<i;n++){t.words[n]=e.words[n]}t.length=i;if(e.length<=9){e.words[0]=0;e.length=1;return}var a=e.words[9];t.words[t.length++]=a&r;for(n=10;n<e.length;n++){var f=e.words[n]|0;e.words[n-10]=(f&r)<<4|a>>>22;a=f}a>>>=22;e.words[n-10]=a;if(a===0&&e.length>10){e.length-=10}else{e.length-=9}};K256.prototype.imulK=function imulK(e){e.words[e.length]=0;e.words[e.length+1]=0;e.length+=2;var t=0;for(var r=0;r<e.length;r++){var i=e.words[r]|0;t+=i*977;e.words[r]=t&67108863;t=i*64+(t/67108864|0)}if(e.words[e.length-1]===0){e.length--;if(e.words[e.length-1]===0){e.length--}}return e};function P224(){MPrime.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}inherits(P224,MPrime);function P192(){MPrime.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}inherits(P192,MPrime);function P25519(){MPrime.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}inherits(P25519,MPrime);P25519.prototype.imulK=function imulK(e){var t=0;for(var r=0;r<e.length;r++){var i=(e.words[r]|0)*19+t;var n=i&67108863;i>>>=26;e.words[r]=n;t=i}if(t!==0){e.words[e.length++]=t}return e};BN._prime=function prime(e){if(d[e])return d[e];var prime;if(e==="k256"){prime=new K256}else if(e==="p224"){prime=new P224}else if(e==="p192"){prime=new P192}else if(e==="p25519"){prime=new P25519}else{throw new Error("Unknown prime "+e)}d[e]=prime;return prime};function Red(e){if(typeof e==="string"){var t=BN._prime(e);this.m=t.p;this.prime=t}else{assert(e.gtn(1),"modulus must be greater than 1");this.m=e;this.prime=null}}Red.prototype._verify1=function _verify1(e){assert(e.negative===0,"red works only with positives");assert(e.red,"red works only with red numbers")};Red.prototype._verify2=function _verify2(e,t){assert((e.negative|t.negative)===0,"red works only with positives");assert(e.red&&e.red===t.red,"red works only with red numbers")};Red.prototype.imod=function imod(e){if(this.prime)return this.prime.ireduce(e)._forceRed(this);return e.umod(this.m)._forceRed(this)};Red.prototype.neg=function neg(e){if(e.isZero()){return e.clone()}return this.m.sub(e)._forceRed(this)};Red.prototype.add=function add(e,t){this._verify2(e,t);var r=e.add(t);if(r.cmp(this.m)>=0){r.isub(this.m)}return r._forceRed(this)};Red.prototype.iadd=function iadd(e,t){this._verify2(e,t);var r=e.iadd(t);if(r.cmp(this.m)>=0){r.isub(this.m)}return r};Red.prototype.sub=function sub(e,t){this._verify2(e,t);var r=e.sub(t);if(r.cmpn(0)<0){r.iadd(this.m)}return r._forceRed(this)};Red.prototype.isub=function isub(e,t){this._verify2(e,t);var r=e.isub(t);if(r.cmpn(0)<0){r.iadd(this.m)}return r};Red.prototype.shl=function shl(e,t){this._verify1(e);return this.imod(e.ushln(t))};Red.prototype.imul=function imul(e,t){this._verify2(e,t);return this.imod(e.imul(t))};Red.prototype.mul=function mul(e,t){this._verify2(e,t);return this.imod(e.mul(t))};Red.prototype.isqr=function isqr(e){return this.imul(e,e.clone())};Red.prototype.sqr=function sqr(e){return this.mul(e,e)};Red.prototype.sqrt=function sqrt(e){if(e.isZero())return e.clone();var t=this.m.andln(3);assert(t%2===1);if(t===3){var r=this.m.add(new BN(1)).iushrn(2);return this.pow(e,r)}var i=this.m.subn(1);var n=0;while(!i.isZero()&&i.andln(1)===0){n++;i.iushrn(1)}assert(!i.isZero());var a=new BN(1).toRed(this);var f=a.redNeg();var o=this.m.subn(1).iushrn(1);var d=this.m.bitLength();d=new BN(2*d*d).toRed(this);while(this.pow(d,o).cmp(f)!==0){d.redIAdd(f)}var s=this.pow(d,i);var u=this.pow(e,i.addn(1).iushrn(1));var h=this.pow(e,i);var c=n;while(h.cmp(a)!==0){var l=h;for(var b=0;l.cmp(a)!==0;b++){l=l.redSqr()}assert(b<c);var v=this.pow(s,new BN(1).iushln(c-b-1));u=u.redMul(v);s=v.redSqr();h=h.redMul(s);c=b}return u};Red.prototype.invm=function invm(e){var t=e._invmp(this.m);if(t.negative!==0){t.negative=0;return this.imod(t).redNeg()}else{return this.imod(t)}};Red.prototype.pow=function pow(e,t){if(t.isZero())return new BN(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var r=4;var i=new Array(1<<r);i[0]=new BN(1).toRed(this);i[1]=e;for(var n=2;n<i.length;n++){i[n]=this.mul(i[n-1],e)}var a=i[0];var f=0;var o=0;var d=t.bitLength()%26;if(d===0){d=26}for(n=t.length-1;n>=0;n--){var s=t.words[n];for(var u=d-1;u>=0;u--){var h=s>>u&1;if(a!==i[0]){a=this.sqr(a)}if(h===0&&f===0){o=0;continue}f<<=1;f|=h;o++;if(o!==r&&(n!==0||u!==0))continue;a=this.mul(a,i[f]);o=0;f=0}d=26}return a};Red.prototype.convertTo=function convertTo(e){var t=e.umod(this.m);return t===e?t.clone():t};Red.prototype.convertFrom=function convertFrom(e){var t=e.clone();t.red=null;return t};BN.mont=function mont(e){return new Mont(e)};function Mont(e){Red.call(this,e);this.shift=this.m.bitLength();if(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)}inherits(Mont,Red);Mont.prototype.convertTo=function convertTo(e){return this.imod(e.ushln(this.shift))};Mont.prototype.convertFrom=function convertFrom(e){var t=this.imod(e.mul(this.rinv));t.red=null;return t};Mont.prototype.imul=function imul(e,t){if(e.isZero()||t.isZero()){e.words[0]=0;e.length=1;return e}var r=e.imul(t);var i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var n=r.isub(i).iushrn(this.shift);var a=n;if(n.cmp(this.m)>=0){a=n.isub(this.m)}else if(n.cmpn(0)<0){a=n.iadd(this.m)}return a._forceRed(this)};Mont.prototype.mul=function mul(e,t){if(e.isZero()||t.isZero())return new BN(0)._forceRed(this);var r=e.mul(t);var i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var n=r.isub(i).iushrn(this.shift);var a=n;if(n.cmp(this.m)>=0){a=n.isub(this.m)}else if(n.cmpn(0)<0){a=n.iadd(this.m)}return a._forceRed(this)};Mont.prototype.invm=function invm(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(false||e,this)},2752:(e,t,r)=>{var i;e.exports=function rand(e){if(!i)i=new Rand(null);return i.generate(e)};function Rand(e){this.rand=e}e.exports.Rand=Rand;Rand.prototype.generate=function generate(e){return this._rand(e)};Rand.prototype._rand=function _rand(e){if(this.rand.getBytes)return this.rand.getBytes(e);var t=new Uint8Array(e);for(var r=0;r<t.length;r++)t[r]=this.rand.getByte();return t};if(typeof self==="object"){if(self.crypto&&self.crypto.getRandomValues){Rand.prototype._rand=function _rand(e){var t=new Uint8Array(e);self.crypto.getRandomValues(t);return t}}else if(self.msCrypto&&self.msCrypto.getRandomValues){Rand.prototype._rand=function _rand(e){var t=new Uint8Array(e);self.msCrypto.getRandomValues(t);return t}}else if(typeof window==="object"){Rand.prototype._rand=function(){throw new Error("Not implemented yet")}}}else{try{var n=r(6417);if(typeof n.randomBytes!=="function")throw new Error("Not supported");Rand.prototype._rand=function _rand(e){return n.randomBytes(e)}}catch(e){}}},8855:(e,t,r)=>{var i=r(6417);t.createCipher=t.Cipher=i.createCipher;t.createCipheriv=t.Cipheriv=i.createCipheriv;t.createDecipher=t.Decipher=i.createDecipher;t.createDecipheriv=t.Decipheriv=i.createDecipheriv;t.listCiphers=t.getCiphers=i.getCiphers},2724:(e,t,r)=>{var i=r(6417);t.createCipher=t.Cipher=i.createCipher;t.createCipheriv=t.Cipheriv=i.createCipheriv;t.createDecipher=t.Decipher=i.createDecipher;t.createDecipheriv=t.Decipheriv=i.createDecipheriv;t.listCiphers=t.getCiphers=i.getCiphers},4326:(e,t,r)=>{var i=r(2828);var n=r(9822);e.exports=crt;function blind(e){var t=getr(e);var r=t.toRed(i.mont(e.modulus)).redPow(new i(e.publicExponent)).fromRed();return{blinder:r,unblinder:t.invm(e.modulus)}}function crt(e,t){var r=blind(t);var n=t.modulus.byteLength();var a=i.mont(t.modulus);var f=new i(e).mul(r.blinder).umod(t.modulus);var o=f.toRed(i.mont(t.prime1));var d=f.toRed(i.mont(t.prime2));var s=t.coefficient;var u=t.prime1;var h=t.prime2;var c=o.redPow(t.exponent1);var l=d.redPow(t.exponent2);c=c.fromRed();l=l.fromRed();var b=c.isub(l).imul(s).umod(u);b.imul(h);l.iadd(b);return new Buffer(l.imul(r.unblinder).umod(t.modulus).toArray(false,n))}crt.getr=getr;function getr(e){var t=e.modulus.byteLength();var r=new i(n(t));while(r.cmp(e.modulus)>=0||!r.umod(e.prime1)||!r.umod(e.prime2)){r=new i(n(t))}return r}},220:(e,t,r)=>{e.exports=r(3557)},693:(e,t,r)=>{var i=r(6417);t.createSign=i.createSign;t.Sign=i.Sign;t.createVerify=i.createVerify;t.Verify=i.Verify},2776:(e,t,r)=>{var i=r(4117);var n=r(2828);e.exports=function createECDH(e){return new ECDH(e)};var a={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};a.p224=a.secp224r1;a.p256=a.secp256r1=a.prime256v1;a.p192=a.secp192r1=a.prime192v1;a.p384=a.secp384r1;a.p521=a.secp521r1;function ECDH(e){this.curveType=a[e];if(!this.curveType){this.curveType={name:e}}this.curve=new i.ec(this.curveType.name);this.keys=void 0}ECDH.prototype.generateKeys=function(e,t){this.keys=this.curve.genKeyPair();return this.getPublicKey(e,t)};ECDH.prototype.computeSecret=function(e,t,r){t=t||"utf8";if(!Buffer.isBuffer(e)){e=new Buffer(e,t)}var i=this.curve.keyFromPublic(e).getPublic();var n=i.mul(this.keys.getPrivate()).getX();return formatReturnValue(n,r,this.curveType.byteLength)};ECDH.prototype.getPublicKey=function(e,t){var r=this.keys.getPublic(t==="compressed",true);if(t==="hybrid"){if(r[r.length-1]%2){r[0]=7}else{r[0]=6}}return formatReturnValue(r,e)};ECDH.prototype.getPrivateKey=function(e){return formatReturnValue(this.keys.getPrivate(),e)};ECDH.prototype.setPublicKey=function(e,t){t=t||"utf8";if(!Buffer.isBuffer(e)){e=new Buffer(e,t)}this.keys._importPublic(e);return this};ECDH.prototype.setPrivateKey=function(e,t){t=t||"utf8";if(!Buffer.isBuffer(e)){e=new Buffer(e,t)}var r=new n(e);r=r.toString(16);this.keys=this.curve.genKeyPair();this.keys._importPrivate(r);return this};function formatReturnValue(e,t,r){if(!Array.isArray(e)){e=e.toArray()}var i=new Buffer(e);if(r&&i.length<r){var n=new Buffer(r-i.length);n.fill(0);i=Buffer.concat([n,i])}if(!t){return i}else{return i.toString(t)}}},9318:(e,t,r)=>{var i=r(6417).createECDH;e.exports=i||r(2776)},356:(e,t,r)=>{e.exports=r(6417).createHash},9871:(e,t,r)=>{e.exports=r(6417).createHmac},1223:(e,t,r)=>{"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(9822);t.createHash=t.Hash=r(356);t.createHmac=t.Hmac=r(9871);var i=r(220);var n=Object.keys(i);var a=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(n);t.getHashes=function(){return a};var f=r(800);t.pbkdf2=f.pbkdf2;t.pbkdf2Sync=f.pbkdf2Sync;var o=r(2724);t.Cipher=o.Cipher;t.createCipher=o.createCipher;t.Cipheriv=o.Cipheriv;t.createCipheriv=o.createCipheriv;t.Decipher=o.Decipher;t.createDecipher=o.createDecipher;t.Decipheriv=o.Decipheriv;t.createDecipheriv=o.createDecipheriv;t.getCiphers=o.getCiphers;t.listCiphers=o.listCiphers;var d=r(7777);t.DiffieHellmanGroup=d.DiffieHellmanGroup;t.createDiffieHellmanGroup=d.createDiffieHellmanGroup;t.getDiffieHellman=d.getDiffieHellman;t.createDiffieHellman=d.createDiffieHellman;t.DiffieHellman=d.DiffieHellman;var s=r(693);t.createSign=s.createSign;t.Sign=s.Sign;t.createVerify=s.createVerify;t.Verify=s.Verify;t.createECDH=r(9318);var u=r(232);t.publicEncrypt=u.publicEncrypt;t.privateEncrypt=u.privateEncrypt;t.publicDecrypt=u.publicDecrypt;t.privateDecrypt=u.privateDecrypt;var h=r(4859);t.randomFill=h.randomFill;t.randomFillSync=h.randomFillSync;t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))};t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},7777:(e,t,r)=>{var i=r(6417);t.DiffieHellmanGroup=i.DiffieHellmanGroup;t.createDiffieHellmanGroup=i.createDiffieHellmanGroup;t.getDiffieHellman=i.getDiffieHellman;t.createDiffieHellman=i.createDiffieHellman;t.DiffieHellman=i.DiffieHellman},4117:(e,t,r)=>{"use strict";var i=t;i.version=r(3182).i8;i.utils=r(8843);i.rand=r(2752);i.curve=r(6506);i.curves=r(6866);i.ec=r(7720);i.eddsa=r(1774)},3695:(e,t,r)=>{"use strict";var i=r(2828);var n=r(8843);var a=n.getNAF;var f=n.getJSF;var o=n.assert;function BaseCurve(e,t){this.type=e;this.p=new i(t.p,16);this.red=t.prime?i.red(t.prime):i.mont(this.p);this.zero=new i(0).toRed(this.red);this.one=new i(1).toRed(this.red);this.two=new i(2).toRed(this.red);this.n=t.n&&new i(t.n,16);this.g=t.g&&this.pointFromJSON(t.g,t.gRed);this._wnafT1=new Array(4);this._wnafT2=new Array(4);this._wnafT3=new Array(4);this._wnafT4=new Array(4);this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);if(!r||r.cmpn(100)>0){this.redN=null}else{this._maxwellTrick=true;this.redN=this.n.toRed(this.red)}}e.exports=BaseCurve;BaseCurve.prototype.point=function point(){throw new Error("Not implemented")};BaseCurve.prototype.validate=function validate(){throw new Error("Not implemented")};BaseCurve.prototype._fixedNafMul=function _fixedNafMul(e,t){o(e.precomputed);var r=e._getDoubles();var i=a(t,1,this._bitLength);var n=(1<<r.step+1)-(r.step%2===0?2:1);n/=3;var f=[];for(var d=0;d<i.length;d+=r.step){var s=0;for(var t=d+r.step-1;t>=d;t--)s=(s<<1)+i[t];f.push(s)}var u=this.jpoint(null,null,null);var h=this.jpoint(null,null,null);for(var c=n;c>0;c--){for(var d=0;d<f.length;d++){var s=f[d];if(s===c)h=h.mixedAdd(r.points[d]);else if(s===-c)h=h.mixedAdd(r.points[d].neg())}u=u.add(h)}return u.toP()};BaseCurve.prototype._wnafMul=function _wnafMul(e,t){var r=4;var i=e._getNAFPoints(r);r=i.wnd;var n=i.points;var f=a(t,r,this._bitLength);var d=this.jpoint(null,null,null);for(var s=f.length-1;s>=0;s--){for(var t=0;s>=0&&f[s]===0;s--)t++;if(s>=0)t++;d=d.dblp(t);if(s<0)break;var u=f[s];o(u!==0);if(e.type==="affine"){if(u>0)d=d.mixedAdd(n[u-1>>1]);else d=d.mixedAdd(n[-u-1>>1].neg())}else{if(u>0)d=d.add(n[u-1>>1]);else d=d.add(n[-u-1>>1].neg())}}return e.type==="affine"?d.toP():d};BaseCurve.prototype._wnafMulAdd=function _wnafMulAdd(e,t,r,i,n){var o=this._wnafT1;var d=this._wnafT2;var s=this._wnafT3;var u=0;for(var h=0;h<i;h++){var c=t[h];var l=c._getNAFPoints(e);o[h]=l.wnd;d[h]=l.points}for(var h=i-1;h>=1;h-=2){var b=h-1;var v=h;if(o[b]!==1||o[v]!==1){s[b]=a(r[b],o[b],this._bitLength);s[v]=a(r[v],o[v],this._bitLength);u=Math.max(s[b].length,u);u=Math.max(s[v].length,u);continue}var p=[t[b],null,null,t[v]];if(t[b].y.cmp(t[v].y)===0){p[1]=t[b].add(t[v]);p[2]=t[b].toJ().mixedAdd(t[v].neg())}else if(t[b].y.cmp(t[v].y.redNeg())===0){p[1]=t[b].toJ().mixedAdd(t[v]);p[2]=t[b].add(t[v].neg())}else{p[1]=t[b].toJ().mixedAdd(t[v]);p[2]=t[b].toJ().mixedAdd(t[v].neg())}var m=[-3,-1,-5,-7,0,7,5,1,3];var g=f(r[b],r[v]);u=Math.max(g[0].length,u);s[b]=new Array(u);s[v]=new Array(u);for(var y=0;y<u;y++){var w=g[0][y]|0;var _=g[1][y]|0;s[b][y]=m[(w+1)*3+(_+1)];s[v][y]=0;d[b]=p}}var S=this.jpoint(null,null,null);var M=this._wnafT4;for(var h=u;h>=0;h--){var A=0;while(h>=0){var P=true;for(var y=0;y<i;y++){M[y]=s[y][h]|0;if(M[y]!==0)P=false}if(!P)break;A++;h--}if(h>=0)A++;S=S.dblp(A);if(h<0)break;for(var y=0;y<i;y++){var B=M[y];var c;if(B===0)continue;else if(B>0)c=d[y][B-1>>1];else if(B<0)c=d[y][-B-1>>1].neg();if(c.type==="affine")S=S.mixedAdd(c);else S=S.add(c)}}for(var h=0;h<i;h++)d[h]=null;if(n)return S;else return S.toP()};function BasePoint(e,t){this.curve=e;this.type=t;this.precomputed=null}BaseCurve.BasePoint=BasePoint;BasePoint.prototype.eq=function eq(){throw new Error("Not implemented")};BasePoint.prototype.validate=function validate(){return this.curve.validate(this)};BaseCurve.prototype.decodePoint=function decodePoint(e,t){e=n.toArray(e,t);var r=this.p.byteLength();if((e[0]===4||e[0]===6||e[0]===7)&&e.length-1===2*r){if(e[0]===6)o(e[e.length-1]%2===0);else if(e[0]===7)o(e[e.length-1]%2===1);var i=this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));return i}else if((e[0]===2||e[0]===3)&&e.length-1===r){return this.pointFromX(e.slice(1,1+r),e[0]===3)}throw new Error("Unknown point format")};BasePoint.prototype.encodeCompressed=function encodeCompressed(e){return this.encode(e,true)};BasePoint.prototype._encode=function _encode(e){var t=this.curve.p.byteLength();var r=this.getX().toArray("be",t);if(e)return[this.getY().isEven()?2:3].concat(r);return[4].concat(r,this.getY().toArray("be",t))};BasePoint.prototype.encode=function encode(e,t){return n.encode(this._encode(t),e)};BasePoint.prototype.precompute=function precompute(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};t.naf=this._getNAFPoints(8);t.doubles=this._getDoubles(4,e);t.beta=this._getBeta();this.precomputed=t;return this};BasePoint.prototype._hasDoubles=function _hasDoubles(e){if(!this.precomputed)return false;var t=this.precomputed.doubles;if(!t)return false;return t.points.length>=Math.ceil((e.bitLength()+1)/t.step)};BasePoint.prototype._getDoubles=function _getDoubles(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;var r=[this];var i=this;for(var n=0;n<t;n+=e){for(var a=0;a<e;a++)i=i.dbl();r.push(i)}return{step:e,points:r}};BasePoint.prototype._getNAFPoints=function _getNAFPoints(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;var t=[this];var r=(1<<e)-1;var i=r===1?null:this.dbl();for(var n=1;n<r;n++)t[n]=t[n-1].add(i);return{wnd:e,points:t}};BasePoint.prototype._getBeta=function _getBeta(){return null};BasePoint.prototype.dblp=function dblp(e){var t=this;for(var r=0;r<e;r++)t=t.dbl();return t}},9463:(e,t,r)=>{"use strict";var i=r(8843);var n=r(2828);var a=r(2989);var f=r(3695);var o=i.assert;function EdwardsCurve(e){this.twisted=(e.a|0)!==1;this.mOneA=this.twisted&&(e.a|0)===-1;this.extended=this.mOneA;f.call(this,"edwards",e);this.a=new n(e.a,16).umod(this.red.m);this.a=this.a.toRed(this.red);this.c=new n(e.c,16).toRed(this.red);this.c2=this.c.redSqr();this.d=new n(e.d,16).toRed(this.red);this.dd=this.d.redAdd(this.d);o(!this.twisted||this.c.fromRed().cmpn(1)===0);this.oneC=(e.c|0)===1}a(EdwardsCurve,f);e.exports=EdwardsCurve;EdwardsCurve.prototype._mulA=function _mulA(e){if(this.mOneA)return e.redNeg();else return this.a.redMul(e)};EdwardsCurve.prototype._mulC=function _mulC(e){if(this.oneC)return e;else return this.c.redMul(e)};EdwardsCurve.prototype.jpoint=function jpoint(e,t,r,i){return this.point(e,t,r,i)};EdwardsCurve.prototype.pointFromX=function pointFromX(e,t){e=new n(e,16);if(!e.red)e=e.toRed(this.red);var r=e.redSqr();var i=this.c2.redSub(this.a.redMul(r));var a=this.one.redSub(this.c2.redMul(this.d).redMul(r));var f=i.redMul(a.redInvm());var o=f.redSqrt();if(o.redSqr().redSub(f).cmp(this.zero)!==0)throw new Error("invalid point");var d=o.fromRed().isOdd();if(t&&!d||!t&&d)o=o.redNeg();return this.point(e,o)};EdwardsCurve.prototype.pointFromY=function pointFromY(e,t){e=new n(e,16);if(!e.red)e=e.toRed(this.red);var r=e.redSqr();var i=r.redSub(this.c2);var a=r.redMul(this.d).redMul(this.c2).redSub(this.a);var f=i.redMul(a.redInvm());if(f.cmp(this.zero)===0){if(t)throw new Error("invalid point");else return this.point(this.zero,e)}var o=f.redSqrt();if(o.redSqr().redSub(f).cmp(this.zero)!==0)throw new Error("invalid point");if(o.fromRed().isOdd()!==t)o=o.redNeg();return this.point(o,e)};EdwardsCurve.prototype.validate=function validate(e){if(e.isInfinity())return true;e.normalize();var t=e.x.redSqr();var r=e.y.redSqr();var i=t.redMul(this.a).redAdd(r);var n=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return i.cmp(n)===0};function Point(e,t,r,i,a){f.BasePoint.call(this,e,"projective");if(t===null&&r===null&&i===null){this.x=this.curve.zero;this.y=this.curve.one;this.z=this.curve.one;this.t=this.curve.zero;this.zOne=true}else{this.x=new n(t,16);this.y=new n(r,16);this.z=i?new n(i,16):this.curve.one;this.t=a&&new n(a,16);if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red);if(this.t&&!this.t.red)this.t=this.t.toRed(this.curve.red);this.zOne=this.z===this.curve.one;if(this.curve.extended&&!this.t){this.t=this.x.redMul(this.y);if(!this.zOne)this.t=this.t.redMul(this.z.redInvm())}}}a(Point,f.BasePoint);EdwardsCurve.prototype.pointFromJSON=function pointFromJSON(e){return Point.fromJSON(this,e)};EdwardsCurve.prototype.point=function point(e,t,r,i){return new Point(this,e,t,r,i)};Point.fromJSON=function fromJSON(e,t){return new Point(e,t[0],t[1],t[2])};Point.prototype.inspect=function inspect(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};Point.prototype.isInfinity=function isInfinity(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};Point.prototype._extDbl=function _extDbl(){var e=this.x.redSqr();var t=this.y.redSqr();var r=this.z.redSqr();r=r.redIAdd(r);var i=this.curve._mulA(e);var n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t);var a=i.redAdd(t);var f=a.redSub(r);var o=i.redSub(t);var d=n.redMul(f);var s=a.redMul(o);var u=n.redMul(o);var h=f.redMul(a);return this.curve.point(d,s,h,u)};Point.prototype._projDbl=function _projDbl(){var e=this.x.redAdd(this.y).redSqr();var t=this.x.redSqr();var r=this.y.redSqr();var i;var n;var a;if(this.curve.twisted){var f=this.curve._mulA(t);var o=f.redAdd(r);if(this.zOne){i=e.redSub(t).redSub(r).redMul(o.redSub(this.curve.two));n=o.redMul(f.redSub(r));a=o.redSqr().redSub(o).redSub(o)}else{var d=this.z.redSqr();var s=o.redSub(d).redISub(d);i=e.redSub(t).redISub(r).redMul(s);n=o.redMul(f.redSub(r));a=o.redMul(s)}}else{var f=t.redAdd(r);var d=this.curve._mulC(this.z).redSqr();var s=f.redSub(d).redSub(d);i=this.curve._mulC(e.redISub(f)).redMul(s);n=this.curve._mulC(f).redMul(t.redISub(r));a=f.redMul(s)}return this.curve.point(i,n,a)};Point.prototype.dbl=function dbl(){if(this.isInfinity())return this;if(this.curve.extended)return this._extDbl();else return this._projDbl()};Point.prototype._extAdd=function _extAdd(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x));var r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x));var i=this.t.redMul(this.curve.dd).redMul(e.t);var n=this.z.redMul(e.z.redAdd(e.z));var a=r.redSub(t);var f=n.redSub(i);var o=n.redAdd(i);var d=r.redAdd(t);var s=a.redMul(f);var u=o.redMul(d);var h=a.redMul(d);var c=f.redMul(o);return this.curve.point(s,u,c,h)};Point.prototype._projAdd=function _projAdd(e){var t=this.z.redMul(e.z);var r=t.redSqr();var i=this.x.redMul(e.x);var n=this.y.redMul(e.y);var a=this.curve.d.redMul(i).redMul(n);var f=r.redSub(a);var o=r.redAdd(a);var d=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(i).redISub(n);var s=t.redMul(f).redMul(d);var u;var h;if(this.curve.twisted){u=t.redMul(o).redMul(n.redSub(this.curve._mulA(i)));h=f.redMul(o)}else{u=t.redMul(o).redMul(n.redSub(i));h=this.curve._mulC(f).redMul(o)}return this.curve.point(s,u,h)};Point.prototype.add=function add(e){if(this.isInfinity())return e;if(e.isInfinity())return this;if(this.curve.extended)return this._extAdd(e);else return this._projAdd(e)};Point.prototype.mul=function mul(e){if(this._hasDoubles(e))return this.curve._fixedNafMul(this,e);else return this.curve._wnafMul(this,e)};Point.prototype.mulAdd=function mulAdd(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,false)};Point.prototype.jmulAdd=function jmulAdd(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,true)};Point.prototype.normalize=function normalize(){if(this.zOne)return this;var e=this.z.redInvm();this.x=this.x.redMul(e);this.y=this.y.redMul(e);if(this.t)this.t=this.t.redMul(e);this.z=this.curve.one;this.zOne=true;return this};Point.prototype.neg=function neg(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};Point.prototype.getX=function getX(){this.normalize();return this.x.fromRed()};Point.prototype.getY=function getY(){this.normalize();return this.y.fromRed()};Point.prototype.eq=function eq(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0};Point.prototype.eqXToP=function eqXToP(e){var t=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(t)===0)return true;var r=e.clone();var i=this.curve.redN.redMul(this.z);for(;;){r.iadd(this.curve.n);if(r.cmp(this.curve.p)>=0)return false;t.redIAdd(i);if(this.x.cmp(t)===0)return true}};Point.prototype.toP=Point.prototype.normalize;Point.prototype.mixedAdd=Point.prototype.add},6506:(e,t,r)=>{"use strict";var i=t;i.base=r(3695);i.short=r(2424);i.mont=r(5710);i.edwards=r(9463)},5710:(e,t,r)=>{"use strict";var i=r(2828);var n=r(2989);var a=r(3695);var f=r(8843);function MontCurve(e){a.call(this,"mont",e);this.a=new i(e.a,16).toRed(this.red);this.b=new i(e.b,16).toRed(this.red);this.i4=new i(4).toRed(this.red).redInvm();this.two=new i(2).toRed(this.red);this.a24=this.i4.redMul(this.a.redAdd(this.two))}n(MontCurve,a);e.exports=MontCurve;MontCurve.prototype.validate=function validate(e){var t=e.normalize().x;var r=t.redSqr();var i=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);var n=i.redSqrt();return n.redSqr().cmp(i)===0};function Point(e,t,r){a.BasePoint.call(this,e,"projective");if(t===null&&r===null){this.x=this.curve.one;this.z=this.curve.zero}else{this.x=new i(t,16);this.z=new i(r,16);if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red)}}n(Point,a.BasePoint);MontCurve.prototype.decodePoint=function decodePoint(e,t){return this.point(f.toArray(e,t),1)};MontCurve.prototype.point=function point(e,t){return new Point(this,e,t)};MontCurve.prototype.pointFromJSON=function pointFromJSON(e){return Point.fromJSON(this,e)};Point.prototype.precompute=function precompute(){};Point.prototype._encode=function _encode(){return this.getX().toArray("be",this.curve.p.byteLength())};Point.fromJSON=function fromJSON(e,t){return new Point(e,t[0],t[1]||e.one)};Point.prototype.inspect=function inspect(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};Point.prototype.isInfinity=function isInfinity(){return this.z.cmpn(0)===0};Point.prototype.dbl=function dbl(){var e=this.x.redAdd(this.z);var t=e.redSqr();var r=this.x.redSub(this.z);var i=r.redSqr();var n=t.redSub(i);var a=t.redMul(i);var f=n.redMul(i.redAdd(this.curve.a24.redMul(n)));return this.curve.point(a,f)};Point.prototype.add=function add(){throw new Error("Not supported on Montgomery curve")};Point.prototype.diffAdd=function diffAdd(e,t){var r=this.x.redAdd(this.z);var i=this.x.redSub(this.z);var n=e.x.redAdd(e.z);var a=e.x.redSub(e.z);var f=a.redMul(r);var o=n.redMul(i);var d=t.z.redMul(f.redAdd(o).redSqr());var s=t.x.redMul(f.redISub(o).redSqr());return this.curve.point(d,s)};Point.prototype.mul=function mul(e){var t=e.clone();var r=this;var i=this.curve.point(null,null);var n=this;for(var a=[];t.cmpn(0)!==0;t.iushrn(1))a.push(t.andln(1));for(var f=a.length-1;f>=0;f--){if(a[f]===0){r=r.diffAdd(i,n);i=i.dbl()}else{i=r.diffAdd(i,n);r=r.dbl()}}return i};Point.prototype.mulAdd=function mulAdd(){throw new Error("Not supported on Montgomery curve")};Point.prototype.jumlAdd=function jumlAdd(){throw new Error("Not supported on Montgomery curve")};Point.prototype.eq=function eq(e){return this.getX().cmp(e.getX())===0};Point.prototype.normalize=function normalize(){this.x=this.x.redMul(this.z.redInvm());this.z=this.curve.one;return this};Point.prototype.getX=function getX(){this.normalize();return this.x.fromRed()}},2424:(e,t,r)=>{"use strict";var i=r(8843);var n=r(2828);var a=r(2989);var f=r(3695);var o=i.assert;function ShortCurve(e){f.call(this,"short",e);this.a=new n(e.a,16).toRed(this.red);this.b=new n(e.b,16).toRed(this.red);this.tinv=this.two.redInvm();this.zeroA=this.a.fromRed().cmpn(0)===0;this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0;this.endo=this._getEndomorphism(e);this._endoWnafT1=new Array(4);this._endoWnafT2=new Array(4)}a(ShortCurve,f);e.exports=ShortCurve;ShortCurve.prototype._getEndomorphism=function _getEndomorphism(e){if(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)return;var t;var r;if(e.beta){t=new n(e.beta,16).toRed(this.red)}else{var i=this._getEndoRoots(this.p);t=i[0].cmp(i[1])<0?i[0]:i[1];t=t.toRed(this.red)}if(e.lambda){r=new n(e.lambda,16)}else{var a=this._getEndoRoots(this.n);if(this.g.mul(a[0]).x.cmp(this.g.x.redMul(t))===0){r=a[0]}else{r=a[1];o(this.g.mul(r).x.cmp(this.g.x.redMul(t))===0)}}var f;if(e.basis){f=e.basis.map(function(e){return{a:new n(e.a,16),b:new n(e.b,16)}})}else{f=this._getEndoBasis(r)}return{beta:t,lambda:r,basis:f}};ShortCurve.prototype._getEndoRoots=function _getEndoRoots(e){var t=e===this.p?this.red:n.mont(e);var r=new n(2).toRed(t).redInvm();var i=r.redNeg();var a=new n(3).toRed(t).redNeg().redSqrt().redMul(r);var f=i.redAdd(a).fromRed();var o=i.redSub(a).fromRed();return[f,o]};ShortCurve.prototype._getEndoBasis=function _getEndoBasis(e){var t=this.n.ushrn(Math.floor(this.n.bitLength()/2));var r=e;var i=this.n.clone();var a=new n(1);var f=new n(0);var o=new n(0);var d=new n(1);var s;var u;var h;var c;var l;var b;var v;var p=0;var m;var g;while(r.cmpn(0)!==0){var y=i.div(r);m=i.sub(y.mul(r));g=o.sub(y.mul(a));var w=d.sub(y.mul(f));if(!h&&m.cmp(t)<0){s=v.neg();u=a;h=m.neg();c=g}else if(h&&++p===2){break}v=m;i=r;r=m;o=a;a=g;d=f;f=w}l=m.neg();b=g;var _=h.sqr().add(c.sqr());var S=l.sqr().add(b.sqr());if(S.cmp(_)>=0){l=s;b=u}if(h.negative){h=h.neg();c=c.neg()}if(l.negative){l=l.neg();b=b.neg()}return[{a:h,b:c},{a:l,b:b}]};ShortCurve.prototype._endoSplit=function _endoSplit(e){var t=this.endo.basis;var r=t[0];var i=t[1];var n=i.b.mul(e).divRound(this.n);var a=r.b.neg().mul(e).divRound(this.n);var f=n.mul(r.a);var o=a.mul(i.a);var d=n.mul(r.b);var s=a.mul(i.b);var u=e.sub(f).sub(o);var h=d.add(s).neg();return{k1:u,k2:h}};ShortCurve.prototype.pointFromX=function pointFromX(e,t){e=new n(e,16);if(!e.red)e=e.toRed(this.red);var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b);var i=r.redSqrt();if(i.redSqr().redSub(r).cmp(this.zero)!==0)throw new Error("invalid point");var a=i.fromRed().isOdd();if(t&&!a||!t&&a)i=i.redNeg();return this.point(e,i)};ShortCurve.prototype.validate=function validate(e){if(e.inf)return true;var t=e.x;var r=e.y;var i=this.a.redMul(t);var n=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return r.redSqr().redISub(n).cmpn(0)===0};ShortCurve.prototype._endoWnafMulAdd=function _endoWnafMulAdd(e,t,r){var i=this._endoWnafT1;var n=this._endoWnafT2;for(var a=0;a<e.length;a++){var f=this._endoSplit(t[a]);var o=e[a];var d=o._getBeta();if(f.k1.negative){f.k1.ineg();o=o.neg(true)}if(f.k2.negative){f.k2.ineg();d=d.neg(true)}i[a*2]=o;i[a*2+1]=d;n[a*2]=f.k1;n[a*2+1]=f.k2}var s=this._wnafMulAdd(1,i,n,a*2,r);for(var u=0;u<a*2;u++){i[u]=null;n[u]=null}return s};function Point(e,t,r,i){f.BasePoint.call(this,e,"affine");if(t===null&&r===null){this.x=null;this.y=null;this.inf=true}else{this.x=new n(t,16);this.y=new n(r,16);if(i){this.x.forceRed(this.curve.red);this.y.forceRed(this.curve.red)}if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);this.inf=false}}a(Point,f.BasePoint);ShortCurve.prototype.point=function point(e,t,r){return new Point(this,e,t,r)};ShortCurve.prototype.pointFromJSON=function pointFromJSON(e,t){return Point.fromJSON(this,e,t)};Point.prototype._getBeta=function _getBeta(){if(!this.curve.endo)return;var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve;var i=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t;t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(i)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(i)}}}return t};Point.prototype.toJSON=function toJSON(){if(!this.precomputed)return[this.x,this.y];return[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]};Point.fromJSON=function fromJSON(e,t,r){if(typeof t==="string")t=JSON.parse(t);var i=e.point(t[0],t[1],r);if(!t[2])return i;function obj2point(t){return e.point(t[0],t[1],r)}var n=t[2];i.precomputed={beta:null,doubles:n.doubles&&{step:n.doubles.step,points:[i].concat(n.doubles.points.map(obj2point))},naf:n.naf&&{wnd:n.naf.wnd,points:[i].concat(n.naf.points.map(obj2point))}};return i};Point.prototype.inspect=function inspect(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"};Point.prototype.isInfinity=function isInfinity(){return this.inf};Point.prototype.add=function add(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);if(t.cmpn(0)!==0)t=t.redMul(this.x.redSub(e.x).redInvm());var r=t.redSqr().redISub(this.x).redISub(e.x);var i=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)};Point.prototype.dbl=function dbl(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a;var r=this.x.redSqr();var i=e.redInvm();var n=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(i);var a=n.redSqr().redISub(this.x.redAdd(this.x));var f=n.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,f)};Point.prototype.getX=function getX(){return this.x.fromRed()};Point.prototype.getY=function getY(){return this.y.fromRed()};Point.prototype.mul=function mul(e){e=new n(e,16);if(this.isInfinity())return this;else if(this._hasDoubles(e))return this.curve._fixedNafMul(this,e);else if(this.curve.endo)return this.curve._endoWnafMulAdd([this],[e]);else return this.curve._wnafMul(this,e)};Point.prototype.mulAdd=function mulAdd(e,t,r){var i=[this,t];var n=[e,r];if(this.curve.endo)return this.curve._endoWnafMulAdd(i,n);else return this.curve._wnafMulAdd(1,i,n,2)};Point.prototype.jmulAdd=function jmulAdd(e,t,r){var i=[this,t];var n=[e,r];if(this.curve.endo)return this.curve._endoWnafMulAdd(i,n,true);else return this.curve._wnafMulAdd(1,i,n,2,true)};Point.prototype.eq=function eq(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Point.prototype.neg=function neg(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed;var i=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return t};Point.prototype.toJ=function toJ(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function JPoint(e,t,r,i){f.BasePoint.call(this,e,"jacobian");if(t===null&&r===null&&i===null){this.x=this.curve.one;this.y=this.curve.one;this.z=new n(0)}else{this.x=new n(t,16);this.y=new n(r,16);this.z=new n(i,16)}if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red);this.zOne=this.z===this.curve.one}a(JPoint,f.BasePoint);ShortCurve.prototype.jpoint=function jpoint(e,t,r){return new JPoint(this,e,t,r)};JPoint.prototype.toP=function toP(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm();var t=e.redSqr();var r=this.x.redMul(t);var i=this.y.redMul(t).redMul(e);return this.curve.point(r,i)};JPoint.prototype.neg=function neg(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};JPoint.prototype.add=function add(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr();var r=this.z.redSqr();var i=this.x.redMul(t);var n=e.x.redMul(r);var a=this.y.redMul(t.redMul(e.z));var f=e.y.redMul(r.redMul(this.z));var o=i.redSub(n);var d=a.redSub(f);if(o.cmpn(0)===0){if(d.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl()}var s=o.redSqr();var u=s.redMul(o);var h=i.redMul(s);var c=d.redSqr().redIAdd(u).redISub(h).redISub(h);var l=d.redMul(h.redISub(c)).redISub(a.redMul(u));var b=this.z.redMul(e.z).redMul(o);return this.curve.jpoint(c,l,b)};JPoint.prototype.mixedAdd=function mixedAdd(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr();var r=this.x;var i=e.x.redMul(t);var n=this.y;var a=e.y.redMul(t).redMul(this.z);var f=r.redSub(i);var o=n.redSub(a);if(f.cmpn(0)===0){if(o.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl()}var d=f.redSqr();var s=d.redMul(f);var u=r.redMul(d);var h=o.redSqr().redIAdd(s).redISub(u).redISub(u);var c=o.redMul(u.redISub(h)).redISub(n.redMul(s));var l=this.z.redMul(f);return this.curve.jpoint(h,c,l)};JPoint.prototype.dblp=function dblp(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){var t=this;for(var r=0;r<e;r++)t=t.dbl();return t}var i=this.curve.a;var n=this.curve.tinv;var a=this.x;var f=this.y;var o=this.z;var d=o.redSqr().redSqr();var s=f.redAdd(f);for(var r=0;r<e;r++){var u=a.redSqr();var h=s.redSqr();var c=h.redSqr();var l=u.redAdd(u).redIAdd(u).redIAdd(i.redMul(d));var b=a.redMul(h);var v=l.redSqr().redISub(b.redAdd(b));var p=b.redISub(v);var m=l.redMul(p);m=m.redIAdd(m).redISub(c);var g=s.redMul(o);if(r+1<e)d=d.redMul(c);a=v;o=g;s=m}return this.curve.jpoint(a,s.redMul(n),o)};JPoint.prototype.dbl=function dbl(){if(this.isInfinity())return this;if(this.curve.zeroA)return this._zeroDbl();else if(this.curve.threeA)return this._threeDbl();else return this._dbl()};JPoint.prototype._zeroDbl=function _zeroDbl(){var e;var t;var r;if(this.zOne){var i=this.x.redSqr();var n=this.y.redSqr();var a=n.redSqr();var f=this.x.redAdd(n).redSqr().redISub(i).redISub(a);f=f.redIAdd(f);var o=i.redAdd(i).redIAdd(i);var d=o.redSqr().redISub(f).redISub(f);var s=a.redIAdd(a);s=s.redIAdd(s);s=s.redIAdd(s);e=d;t=o.redMul(f.redISub(d)).redISub(s);r=this.y.redAdd(this.y)}else{var u=this.x.redSqr();var h=this.y.redSqr();var c=h.redSqr();var l=this.x.redAdd(h).redSqr().redISub(u).redISub(c);l=l.redIAdd(l);var b=u.redAdd(u).redIAdd(u);var v=b.redSqr();var p=c.redIAdd(c);p=p.redIAdd(p);p=p.redIAdd(p);e=v.redISub(l).redISub(l);t=b.redMul(l.redISub(e)).redISub(p);r=this.y.redMul(this.z);r=r.redIAdd(r)}return this.curve.jpoint(e,t,r)};JPoint.prototype._threeDbl=function _threeDbl(){var e;var t;var r;if(this.zOne){var i=this.x.redSqr();var n=this.y.redSqr();var a=n.redSqr();var f=this.x.redAdd(n).redSqr().redISub(i).redISub(a);f=f.redIAdd(f);var o=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a);var d=o.redSqr().redISub(f).redISub(f);e=d;var s=a.redIAdd(a);s=s.redIAdd(s);s=s.redIAdd(s);t=o.redMul(f.redISub(d)).redISub(s);r=this.y.redAdd(this.y)}else{var u=this.z.redSqr();var h=this.y.redSqr();var c=this.x.redMul(h);var l=this.x.redSub(u).redMul(this.x.redAdd(u));l=l.redAdd(l).redIAdd(l);var b=c.redIAdd(c);b=b.redIAdd(b);var v=b.redAdd(b);e=l.redSqr().redISub(v);r=this.y.redAdd(this.z).redSqr().redISub(h).redISub(u);var p=h.redSqr();p=p.redIAdd(p);p=p.redIAdd(p);p=p.redIAdd(p);t=l.redMul(b.redISub(e)).redISub(p)}return this.curve.jpoint(e,t,r)};JPoint.prototype._dbl=function _dbl(){var e=this.curve.a;var t=this.x;var r=this.y;var i=this.z;var n=i.redSqr().redSqr();var a=t.redSqr();var f=r.redSqr();var o=a.redAdd(a).redIAdd(a).redIAdd(e.redMul(n));var d=t.redAdd(t);d=d.redIAdd(d);var s=d.redMul(f);var u=o.redSqr().redISub(s.redAdd(s));var h=s.redISub(u);var c=f.redSqr();c=c.redIAdd(c);c=c.redIAdd(c);c=c.redIAdd(c);var l=o.redMul(h).redISub(c);var b=r.redAdd(r).redMul(i);return this.curve.jpoint(u,l,b)};JPoint.prototype.trpl=function trpl(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr();var t=this.y.redSqr();var r=this.z.redSqr();var i=t.redSqr();var n=e.redAdd(e).redIAdd(e);var a=n.redSqr();var f=this.x.redAdd(t).redSqr().redISub(e).redISub(i);f=f.redIAdd(f);f=f.redAdd(f).redIAdd(f);f=f.redISub(a);var o=f.redSqr();var d=i.redIAdd(i);d=d.redIAdd(d);d=d.redIAdd(d);d=d.redIAdd(d);var s=n.redIAdd(f).redSqr().redISub(a).redISub(o).redISub(d);var u=t.redMul(s);u=u.redIAdd(u);u=u.redIAdd(u);var h=this.x.redMul(o).redISub(u);h=h.redIAdd(h);h=h.redIAdd(h);var c=this.y.redMul(s.redMul(d.redISub(s)).redISub(f.redMul(o)));c=c.redIAdd(c);c=c.redIAdd(c);c=c.redIAdd(c);var l=this.z.redAdd(f).redSqr().redISub(r).redISub(o);return this.curve.jpoint(h,c,l)};JPoint.prototype.mul=function mul(e,t){e=new n(e,t);return this.curve._wnafMul(this,e)};JPoint.prototype.eq=function eq(e){if(e.type==="affine")return this.eq(e.toJ());if(this===e)return true;var t=this.z.redSqr();var r=e.z.redSqr();if(this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0)!==0)return false;var i=t.redMul(this.z);var n=r.redMul(e.z);return this.y.redMul(n).redISub(e.y.redMul(i)).cmpn(0)===0};JPoint.prototype.eqXToP=function eqXToP(e){var t=this.z.redSqr();var r=e.toRed(this.curve.red).redMul(t);if(this.x.cmp(r)===0)return true;var i=e.clone();var n=this.curve.redN.redMul(t);for(;;){i.iadd(this.curve.n);if(i.cmp(this.curve.p)>=0)return false;r.redIAdd(n);if(this.x.cmp(r)===0)return true}};JPoint.prototype.inspect=function inspect(){if(this.isInfinity())return"<EC JPoint Infinity>";return"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"};JPoint.prototype.isInfinity=function isInfinity(){return this.z.cmpn(0)===0}},6866:(e,t,r)=>{"use strict";var i=t;var n=r(5582);var a=r(6506);var f=r(8843);var o=f.assert;function PresetCurve(e){if(e.type==="short")this.curve=new a.short(e);else if(e.type==="edwards")this.curve=new a.edwards(e);else this.curve=new a.mont(e);this.g=this.curve.g;this.n=this.curve.n;this.hash=e.hash;o(this.g.validate(),"Invalid curve");o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}i.PresetCurve=PresetCurve;function defineCurve(e,t){Object.defineProperty(i,e,{configurable:true,enumerable:true,get:function(){var r=new PresetCurve(t);Object.defineProperty(i,e,{configurable:true,enumerable:true,value:r});return r}})}defineCurve("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:n.sha256,gRed:false,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]});defineCurve("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:n.sha256,gRed:false,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]});defineCurve("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:n.sha256,gRed:false,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]});defineCurve("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff "+"fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff "+"fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f "+"5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 "+"f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:n.sha384,gRed:false,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 "+"5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 "+"0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]});defineCurve("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b "+"99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd "+"3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 "+"f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:n.sha512,gRed:false,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 "+"053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 "+"a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 "+"579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 "+"3fad0761 353c7086 a272c240 88be9476 9fd16650"]});defineCurve("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:n.sha256,gRed:false,g:["9"]});defineCurve("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:n.sha256,gRed:false,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var d;try{d=r(2790)}catch(e){d=undefined}defineCurve("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:n.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:false,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",d]})},7720:(e,t,r)=>{"use strict";var i=r(2828);var n=r(566);var a=r(8843);var f=r(6866);var o=r(2752);var d=a.assert;var s=r(1888);var u=r(2736);function EC(e){if(!(this instanceof EC))return new EC(e);if(typeof e==="string"){d(f.hasOwnProperty(e),"Unknown curve "+e);e=f[e]}if(e instanceof f.PresetCurve)e={curve:e};this.curve=e.curve.curve;this.n=this.curve.n;this.nh=this.n.ushrn(1);this.g=this.curve.g;this.g=e.curve.g;this.g.precompute(e.curve.n.bitLength()+1);this.hash=e.hash||e.curve.hash}e.exports=EC;EC.prototype.keyPair=function keyPair(e){return new s(this,e)};EC.prototype.keyFromPrivate=function keyFromPrivate(e,t){return s.fromPrivate(this,e,t)};EC.prototype.keyFromPublic=function keyFromPublic(e,t){return s.fromPublic(this,e,t)};EC.prototype.genKeyPair=function genKeyPair(e){if(!e)e={};var t=new n({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()});var r=this.n.byteLength();var a=this.n.sub(new i(2));do{var f=new i(t.generate(r));if(f.cmp(a)>0)continue;f.iaddn(1);return this.keyFromPrivate(f)}while(true)};EC.prototype._truncateToN=function truncateToN(e,t){var r=e.byteLength()*8-this.n.bitLength();if(r>0)e=e.ushrn(r);if(!t&&e.cmp(this.n)>=0)return e.sub(this.n);else return e};EC.prototype.sign=function sign(e,t,r,a){if(typeof r==="object"){a=r;r=null}if(!a)a={};t=this.keyFromPrivate(t,r);e=this._truncateToN(new i(e,16));var f=this.n.byteLength();var o=t.getPrivate().toArray("be",f);var d=e.toArray("be",f);var s=new n({hash:this.hash,entropy:o,nonce:d,pers:a.pers,persEnc:a.persEnc||"utf8"});var h=this.n.sub(new i(1));for(var c=0;true;c++){var l=a.k?a.k(c):new i(s.generate(this.n.byteLength()));l=this._truncateToN(l,true);if(l.cmpn(1)<=0||l.cmp(h)>=0)continue;var b=this.g.mul(l);if(b.isInfinity())continue;var v=b.getX();var p=v.umod(this.n);if(p.cmpn(0)===0)continue;var m=l.invm(this.n).mul(p.mul(t.getPrivate()).iadd(e));m=m.umod(this.n);if(m.cmpn(0)===0)continue;var g=(b.getY().isOdd()?1:0)|(v.cmp(p)!==0?2:0);if(a.canonical&&m.cmp(this.nh)>0){m=this.n.sub(m);g^=1}return new u({r:p,s:m,recoveryParam:g})}};EC.prototype.verify=function verify(e,t,r,n){e=this._truncateToN(new i(e,16));r=this.keyFromPublic(r,n);t=new u(t,"hex");var a=t.r;var f=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return false;if(f.cmpn(1)<0||f.cmp(this.n)>=0)return false;var o=f.invm(this.n);var d=o.mul(e).umod(this.n);var s=o.mul(a).umod(this.n);if(!this.curve._maxwellTrick){var h=this.g.mulAdd(d,r.getPublic(),s);if(h.isInfinity())return false;return h.getX().umod(this.n).cmp(a)===0}var h=this.g.jmulAdd(d,r.getPublic(),s);if(h.isInfinity())return false;return h.eqXToP(a)};EC.prototype.recoverPubKey=function(e,t,r,n){d((3&r)===r,"The recovery param is more than two bits");t=new u(t,n);var a=this.n;var f=new i(e);var o=t.r;var s=t.s;var h=r&1;var c=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");if(c)o=this.curve.pointFromX(o.add(this.curve.n),h);else o=this.curve.pointFromX(o,h);var l=t.r.invm(a);var b=a.sub(f).mul(l).umod(a);var v=s.mul(l).umod(a);return this.g.mulAdd(b,o,v)};EC.prototype.getKeyRecoveryParam=function(e,t,r,i){t=new u(t,i);if(t.recoveryParam!==null)return t.recoveryParam;for(var n=0;n<4;n++){var a;try{a=this.recoverPubKey(e,t,n)}catch(e){continue}if(a.eq(r))return n}throw new Error("Unable to find valid recovery factor")}},1888:(e,t,r)=>{"use strict";var i=r(2828);var n=r(8843);var a=n.assert;function KeyPair(e,t){this.ec=e;this.priv=null;this.pub=null;if(t.priv)this._importPrivate(t.priv,t.privEnc);if(t.pub)this._importPublic(t.pub,t.pubEnc)}e.exports=KeyPair;KeyPair.fromPublic=function fromPublic(e,t,r){if(t instanceof KeyPair)return t;return new KeyPair(e,{pub:t,pubEnc:r})};KeyPair.fromPrivate=function fromPrivate(e,t,r){if(t instanceof KeyPair)return t;return new KeyPair(e,{priv:t,privEnc:r})};KeyPair.prototype.validate=function validate(){var e=this.getPublic();if(e.isInfinity())return{result:false,reason:"Invalid public key"};if(!e.validate())return{result:false,reason:"Public key is not a point"};if(!e.mul(this.ec.curve.n).isInfinity())return{result:false,reason:"Public key * N != O"};return{result:true,reason:null}};KeyPair.prototype.getPublic=function getPublic(e,t){if(typeof e==="string"){t=e;e=null}if(!this.pub)this.pub=this.ec.g.mul(this.priv);if(!t)return this.pub;return this.pub.encode(t,e)};KeyPair.prototype.getPrivate=function getPrivate(e){if(e==="hex")return this.priv.toString(16,2);else return this.priv};KeyPair.prototype._importPrivate=function _importPrivate(e,t){this.priv=new i(e,t||16);this.priv=this.priv.umod(this.ec.curve.n)};KeyPair.prototype._importPublic=function _importPublic(e,t){if(e.x||e.y){if(this.ec.curve.type==="mont"){a(e.x,"Need x coordinate")}else if(this.ec.curve.type==="short"||this.ec.curve.type==="edwards"){a(e.x&&e.y,"Need both x and y coordinate")}this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,t)};KeyPair.prototype.derive=function derive(e){return e.mul(this.priv).getX()};KeyPair.prototype.sign=function sign(e,t,r){return this.ec.sign(e,this,t,r)};KeyPair.prototype.verify=function verify(e,t){return this.ec.verify(e,t,this)};KeyPair.prototype.inspect=function inspect(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},2736:(e,t,r)=>{"use strict";var i=r(2828);var n=r(8843);var a=n.assert;function Signature(e,t){if(e instanceof Signature)return e;if(this._importDER(e,t))return;a(e.r&&e.s,"Signature without r or s");this.r=new i(e.r,16);this.s=new i(e.s,16);if(e.recoveryParam===undefined)this.recoveryParam=null;else this.recoveryParam=e.recoveryParam}e.exports=Signature;function Position(){this.place=0}function getLength(e,t){var r=e[t.place++];if(!(r&128)){return r}var i=r&15;if(i===0||i>4){return false}var n=0;for(var a=0,f=t.place;a<i;a++,f++){n<<=8;n|=e[f];n>>>=0}if(n<=127){return false}t.place=f;return n}function rmPadding(e){var t=0;var r=e.length-1;while(!e[t]&&!(e[t+1]&128)&&t<r){t++}if(t===0){return e}return e.slice(t)}Signature.prototype._importDER=function _importDER(e,t){e=n.toArray(e,t);var r=new Position;if(e[r.place++]!==48){return false}var a=getLength(e,r);if(a===false){return false}if(a+r.place!==e.length){return false}if(e[r.place++]!==2){return false}var f=getLength(e,r);if(f===false){return false}var o=e.slice(r.place,f+r.place);r.place+=f;if(e[r.place++]!==2){return false}var d=getLength(e,r);if(d===false){return false}if(e.length!==d+r.place){return false}var s=e.slice(r.place,d+r.place);if(o[0]===0){if(o[1]&128){o=o.slice(1)}else{return false}}if(s[0]===0){if(s[1]&128){s=s.slice(1)}else{return false}}this.r=new i(o);this.s=new i(s);this.recoveryParam=null;return true};function constructLength(e,t){if(t<128){e.push(t);return}var r=1+(Math.log(t)/Math.LN2>>>3);e.push(r|128);while(--r){e.push(t>>>(r<<3)&255)}e.push(t)}Signature.prototype.toDER=function toDER(e){var t=this.r.toArray();var r=this.s.toArray();if(t[0]&128)t=[0].concat(t);if(r[0]&128)r=[0].concat(r);t=rmPadding(t);r=rmPadding(r);while(!r[0]&&!(r[1]&128)){r=r.slice(1)}var i=[2];constructLength(i,t.length);i=i.concat(t);i.push(2);constructLength(i,r.length);var a=i.concat(r);var f=[48];constructLength(f,a.length);f=f.concat(a);return n.encode(f,e)}},1774:(e,t,r)=>{"use strict";var i=r(5582);var n=r(6866);var a=r(8843);var f=a.assert;var o=a.parseBytes;var d=r(4560);var s=r(1294);function EDDSA(e){f(e==="ed25519","only tested with ed25519 so far");if(!(this instanceof EDDSA))return new EDDSA(e);var e=n[e].curve;this.curve=e;this.g=e.g;this.g.precompute(e.n.bitLength()+1);this.pointClass=e.point().constructor;this.encodingLength=Math.ceil(e.n.bitLength()/8);this.hash=i.sha512}e.exports=EDDSA;EDDSA.prototype.sign=function sign(e,t){e=o(e);var r=this.keyFromSecret(t);var i=this.hashInt(r.messagePrefix(),e);var n=this.g.mul(i);var a=this.encodePoint(n);var f=this.hashInt(a,r.pubBytes(),e).mul(r.priv());var d=i.add(f).umod(this.curve.n);return this.makeSignature({R:n,S:d,Rencoded:a})};EDDSA.prototype.verify=function verify(e,t,r){e=o(e);t=this.makeSignature(t);var i=this.keyFromPublic(r);var n=this.hashInt(t.Rencoded(),i.pubBytes(),e);var a=this.g.mul(t.S());var f=t.R().add(i.pub().mul(n));return f.eq(a)};EDDSA.prototype.hashInt=function hashInt(){var e=this.hash();for(var t=0;t<arguments.length;t++)e.update(arguments[t]);return a.intFromLE(e.digest()).umod(this.curve.n)};EDDSA.prototype.keyFromPublic=function keyFromPublic(e){return d.fromPublic(this,e)};EDDSA.prototype.keyFromSecret=function keyFromSecret(e){return d.fromSecret(this,e)};EDDSA.prototype.makeSignature=function makeSignature(e){if(e instanceof s)return e;return new s(this,e)};EDDSA.prototype.encodePoint=function encodePoint(e){var t=e.getY().toArray("le",this.encodingLength);t[this.encodingLength-1]|=e.getX().isOdd()?128:0;return t};EDDSA.prototype.decodePoint=function decodePoint(e){e=a.parseBytes(e);var t=e.length-1;var r=e.slice(0,t).concat(e[t]&~128);var i=(e[t]&128)!==0;var n=a.intFromLE(r);return this.curve.pointFromY(n,i)};EDDSA.prototype.encodeInt=function encodeInt(e){return e.toArray("le",this.encodingLength)};EDDSA.prototype.decodeInt=function decodeInt(e){return a.intFromLE(e)};EDDSA.prototype.isPoint=function isPoint(e){return e instanceof this.pointClass}},4560:(e,t,r)=>{"use strict";var i=r(8843);var n=i.assert;var a=i.parseBytes;var f=i.cachedProperty;function KeyPair(e,t){this.eddsa=e;this._secret=a(t.secret);if(e.isPoint(t.pub))this._pub=t.pub;else this._pubBytes=a(t.pub)}KeyPair.fromPublic=function fromPublic(e,t){if(t instanceof KeyPair)return t;return new KeyPair(e,{pub:t})};KeyPair.fromSecret=function fromSecret(e,t){if(t instanceof KeyPair)return t;return new KeyPair(e,{secret:t})};KeyPair.prototype.secret=function secret(){return this._secret};f(KeyPair,"pubBytes",function pubBytes(){return this.eddsa.encodePoint(this.pub())});f(KeyPair,"pub",function pub(){if(this._pubBytes)return this.eddsa.decodePoint(this._pubBytes);return this.eddsa.g.mul(this.priv())});f(KeyPair,"privBytes",function privBytes(){var e=this.eddsa;var t=this.hash();var r=e.encodingLength-1;var i=t.slice(0,e.encodingLength);i[0]&=248;i[r]&=127;i[r]|=64;return i});f(KeyPair,"priv",function priv(){return this.eddsa.decodeInt(this.privBytes())});f(KeyPair,"hash",function hash(){return this.eddsa.hash().update(this.secret()).digest()});f(KeyPair,"messagePrefix",function messagePrefix(){return this.hash().slice(this.eddsa.encodingLength)});KeyPair.prototype.sign=function sign(e){n(this._secret,"KeyPair can only verify");return this.eddsa.sign(e,this)};KeyPair.prototype.verify=function verify(e,t){return this.eddsa.verify(e,t,this)};KeyPair.prototype.getSecret=function getSecret(e){n(this._secret,"KeyPair is public only");return i.encode(this.secret(),e)};KeyPair.prototype.getPublic=function getPublic(e){return i.encode(this.pubBytes(),e)};e.exports=KeyPair},1294:(e,t,r)=>{"use strict";var i=r(2828);var n=r(8843);var a=n.assert;var f=n.cachedProperty;var o=n.parseBytes;function Signature(e,t){this.eddsa=e;if(typeof t!=="object")t=o(t);if(Array.isArray(t)){t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}}a(t.R&&t.S,"Signature without R or S");if(e.isPoint(t.R))this._R=t.R;if(t.S instanceof i)this._S=t.S;this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded;this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}f(Signature,"S",function S(){return this.eddsa.decodeInt(this.Sencoded())});f(Signature,"R",function R(){return this.eddsa.decodePoint(this.Rencoded())});f(Signature,"Rencoded",function Rencoded(){return this.eddsa.encodePoint(this.R())});f(Signature,"Sencoded",function Sencoded(){return this.eddsa.encodeInt(this.S())});Signature.prototype.toBytes=function toBytes(){return this.Rencoded().concat(this.Sencoded())};Signature.prototype.toHex=function toHex(){return n.encode(this.toBytes(),"hex").toUpperCase()};e.exports=Signature},2790:e=>{e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},8843:(e,t,r)=>{"use strict";var i=t;var n=r(2828);var a=r(6787);var f=r(8157);i.assert=a;i.toArray=f.toArray;i.zero2=f.zero2;i.toHex=f.toHex;i.encode=f.encode;function getNAF(e,t,r){var i=new Array(Math.max(e.bitLength(),r)+1);i.fill(0);var n=1<<t+1;var a=e.clone();for(var f=0;f<i.length;f++){var o;var d=a.andln(n-1);if(a.isOdd()){if(d>(n>>1)-1)o=(n>>1)-d;else o=d;a.isubn(o)}else{o=0}i[f]=o;a.iushrn(1)}return i}i.getNAF=getNAF;function getJSF(e,t){var r=[[],[]];e=e.clone();t=t.clone();var i=0;var n=0;while(e.cmpn(-i)>0||t.cmpn(-n)>0){var a=e.andln(3)+i&3;var f=t.andln(3)+n&3;if(a===3)a=-1;if(f===3)f=-1;var o;if((a&1)===0){o=0}else{var d=e.andln(7)+i&7;if((d===3||d===5)&&f===2)o=-a;else o=a}r[0].push(o);var s;if((f&1)===0){s=0}else{var d=t.andln(7)+n&7;if((d===3||d===5)&&a===2)s=-f;else s=f}r[1].push(s);if(2*i===o+1)i=1-i;if(2*n===s+1)n=1-n;e.iushrn(1);t.iushrn(1)}return r}i.getJSF=getJSF;function cachedProperty(e,t,r){var i="_"+t;e.prototype[t]=function cachedProperty(){return this[i]!==undefined?this[i]:this[i]=r.call(this)}}i.cachedProperty=cachedProperty;function parseBytes(e){return typeof e==="string"?i.toArray(e,"hex"):e}i.parseBytes=parseBytes;function intFromLE(e){return new n(e,"hex","le")}i.intFromLE=intFromLE},9727:(e,t,r)=>{var i=r(9615).Buffer;var n=r(8575);function EVP_BytesToKey(e,t,r,a){if(!i.isBuffer(e))e=i.from(e,"binary");if(t){if(!i.isBuffer(t))t=i.from(t,"binary");if(t.length!==8)throw new RangeError("salt should be Buffer with 8 byte length")}var f=r/8;var o=i.alloc(f);var d=i.alloc(a||0);var s=i.alloc(0);while(f>0||a>0){var u=new n;u.update(s);u.update(e);if(t)u.update(t);s=u.digest();var h=0;if(f>0){var c=o.length-f;h=Math.min(f,s.length);s.copy(o,c,0,h);f-=h}if(h<s.length&&a>0){var l=d.length-a;var b=Math.min(a,s.length-h);s.copy(d,l,h,h+b);a-=b}}s.fill(0);return{key:o,iv:d}}e.exports=EVP_BytesToKey},9086:(e,t,r)=>{"use strict";var i=r(9615).Buffer;var n=r(8022).Transform;var a=r(2989);function throwIfNotStringOrBuffer(e,t){if(!i.isBuffer(e)&&typeof e!=="string"){throw new TypeError(t+" must be a string or a buffer")}}function HashBase(e){n.call(this);this._block=i.allocUnsafe(e);this._blockSize=e;this._blockOffset=0;this._length=[0,0,0,0];this._finalized=false}a(HashBase,n);HashBase.prototype._transform=function(e,t,r){var i=null;try{this.update(e,t)}catch(e){i=e}r(i)};HashBase.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)};HashBase.prototype.update=function(e,t){throwIfNotStringOrBuffer(e,"Data");if(this._finalized)throw new Error("Digest already called");if(!i.isBuffer(e))e=i.from(e,t);var r=this._block;var n=0;while(this._blockOffset+e.length-n>=this._blockSize){for(var a=this._blockOffset;a<this._blockSize;)r[a++]=e[n++];this._update();this._blockOffset=0}while(n<e.length)r[this._blockOffset++]=e[n++];for(var f=0,o=e.length*8;o>0;++f){this._length[f]+=o;o=this._length[f]/4294967296|0;if(o>0)this._length[f]-=4294967296*o}return this};HashBase.prototype._update=function(){throw new Error("_update is not implemented")};HashBase.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=true;var t=this._digest();if(e!==undefined)t=t.toString(e);this._block.fill(0);this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t};HashBase.prototype._digest=function(){throw new Error("_digest is not implemented")};e.exports=HashBase},2145:e=>{"use strict";const t={};function createErrorType(e,r,i){if(!i){i=Error}function getMessage(e,t,i){if(typeof r==="string"){return r}else{return r(e,t,i)}}class NodeError extends i{constructor(e,t,r){super(getMessage(e,t,r))}}NodeError.prototype.name=i.name;NodeError.prototype.code=e;t[e]=NodeError}function oneOf(e,t){if(Array.isArray(e)){const r=e.length;e=e.map(e=>String(e));if(r>2){return`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]}else if(r===2){return`one of ${t} ${e[0]} or ${e[1]}`}else{return`of ${t} ${e[0]}`}}else{return`of ${t} ${String(e)}`}}function startsWith(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function endsWith(e,t,r){if(r===undefined||r>e.length){r=e.length}return e.substring(r-t.length,r)===t}function includes(e,t,r){if(typeof r!=="number"){r=0}if(r+t.length>e.length){return false}else{return e.indexOf(t,r)!==-1}}createErrorType("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);createErrorType("ERR_INVALID_ARG_TYPE",function(e,t,r){let i;if(typeof t==="string"&&startsWith(t,"not ")){i="must not be";t=t.replace(/^not /,"")}else{i="must be"}let n;if(endsWith(e," argument")){n=`The ${e} ${i} ${oneOf(t,"type")}`}else{const r=includes(e,".")?"property":"argument";n=`The "${e}" ${r} ${i} ${oneOf(t,"type")}`}n+=`. Received type ${typeof r}`;return n},TypeError);createErrorType("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");createErrorType("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});createErrorType("ERR_STREAM_PREMATURE_CLOSE","Premature close");createErrorType("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});createErrorType("ERR_MULTIPLE_CALLBACK","Callback called multiple times");createErrorType("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end");createErrorType("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);createErrorType("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");e.exports.q=t},7328:(e,t,r)=>{"use strict";var i=Object.keys||function(e){var t=[];for(var r in e){t.push(r)}return t};e.exports=Duplex;var n=r(4614);var a=r(9213);r(2989)(Duplex,n);{var f=i(a.prototype);for(var o=0;o<f.length;o++){var d=f[o];if(!Duplex.prototype[d])Duplex.prototype[d]=a.prototype[d]}}function Duplex(e){if(!(this instanceof Duplex))return new Duplex(e);n.call(this,e);a.call(this,e);this.allowHalfOpen=true;if(e){if(e.readable===false)this.readable=false;if(e.writable===false)this.writable=false;if(e.allowHalfOpen===false){this.allowHalfOpen=false;this.once("end",onend)}}}Object.defineProperty(Duplex.prototype,"writableHighWaterMark",{enumerable:false,get:function get(){return this._writableState.highWaterMark}});Object.defineProperty(Duplex.prototype,"writableBuffer",{enumerable:false,get:function get(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Duplex.prototype,"writableLength",{enumerable:false,get:function get(){return this._writableState.length}});function onend(){if(this._writableState.ended)return;process.nextTick(onEndNT,this)}function onEndNT(e){e.end()}Object.defineProperty(Duplex.prototype,"destroyed",{enumerable:false,get:function get(){if(this._readableState===undefined||this._writableState===undefined){return false}return this._readableState.destroyed&&this._writableState.destroyed},set:function set(e){if(this._readableState===undefined||this._writableState===undefined){return}this._readableState.destroyed=e;this._writableState.destroyed=e}})},674:(e,t,r)=>{"use strict";e.exports=PassThrough;var i=r(9343);r(2989)(PassThrough,i);function PassThrough(e){if(!(this instanceof PassThrough))return new PassThrough(e);i.call(this,e)}PassThrough.prototype._transform=function(e,t,r){r(null,e)}},4614:(e,t,r)=>{"use strict";e.exports=Readable;var i;Readable.ReadableState=ReadableState;var n=r(8614).EventEmitter;var a=function EElistenerCount(e,t){return e.listeners(t).length};var f=r(9089);var o=r(4293).Buffer;var d=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return o.from(e)}function _isUint8Array(e){return o.isBuffer(e)||e instanceof d}var s=r(1669);var u;if(s&&s.debuglog){u=s.debuglog("stream")}else{u=function debug(){}}var h=r(7031);var c=r(3302);var l=r(6747),b=l.getHighWaterMark;var v=r(2145).q,p=v.ERR_INVALID_ARG_TYPE,m=v.ERR_STREAM_PUSH_AFTER_EOF,g=v.ERR_METHOD_NOT_IMPLEMENTED,y=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;var w;var _;var S;r(2989)(Readable,f);var M=c.errorOrDestroy;var A=["error","close","destroy","pause","resume"];function prependListener(e,t,r){if(typeof e.prependListener==="function")return e.prependListener(t,r);if(!e._events||!e._events[t])e.on(t,r);else if(Array.isArray(e._events[t]))e._events[t].unshift(r);else e._events[t]=[r,e._events[t]]}function ReadableState(e,t,n){i=i||r(7328);e=e||{};if(typeof n!=="boolean")n=t instanceof i;this.objectMode=!!e.objectMode;if(n)this.objectMode=this.objectMode||!!e.readableObjectMode;this.highWaterMark=b(this,e,"readableHighWaterMark",n);this.buffer=new h;this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.ended=false;this.endEmitted=false;this.reading=false;this.sync=true;this.needReadable=false;this.emittedReadable=false;this.readableListening=false;this.resumeScheduled=false;this.paused=true;this.emitClose=e.emitClose!==false;this.autoDestroy=!!e.autoDestroy;this.destroyed=false;this.defaultEncoding=e.defaultEncoding||"utf8";this.awaitDrain=0;this.readingMore=false;this.decoder=null;this.encoding=null;if(e.encoding){if(!w)w=r(937).s;this.decoder=new w(e.encoding);this.encoding=e.encoding}}function Readable(e){i=i||r(7328);if(!(this instanceof Readable))return new Readable(e);var t=this instanceof i;this._readableState=new ReadableState(e,this,t);this.readable=true;if(e){if(typeof e.read==="function")this._read=e.read;if(typeof e.destroy==="function")this._destroy=e.destroy}f.call(this)}Object.defineProperty(Readable.prototype,"destroyed",{enumerable:false,get:function get(){if(this._readableState===undefined){return false}return this._readableState.destroyed},set:function set(e){if(!this._readableState){return}this._readableState.destroyed=e}});Readable.prototype.destroy=c.destroy;Readable.prototype._undestroy=c.undestroy;Readable.prototype._destroy=function(e,t){t(e)};Readable.prototype.push=function(e,t){var r=this._readableState;var i;if(!r.objectMode){if(typeof e==="string"){t=t||r.defaultEncoding;if(t!==r.encoding){e=o.from(e,t);t=""}i=true}}else{i=true}return readableAddChunk(this,e,t,false,i)};Readable.prototype.unshift=function(e){return readableAddChunk(this,e,null,true,false)};function readableAddChunk(e,t,r,i,n){u("readableAddChunk",t);var a=e._readableState;if(t===null){a.reading=false;onEofChunk(e,a)}else{var f;if(!n)f=chunkInvalid(a,t);if(f){M(e,f)}else if(a.objectMode||t&&t.length>0){if(typeof t!=="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==o.prototype){t=_uint8ArrayToBuffer(t)}if(i){if(a.endEmitted)M(e,new y);else addChunk(e,a,t,true)}else if(a.ended){M(e,new m)}else if(a.destroyed){return false}else{a.reading=false;if(a.decoder&&!r){t=a.decoder.write(t);if(a.objectMode||t.length!==0)addChunk(e,a,t,false);else maybeReadMore(e,a)}else{addChunk(e,a,t,false)}}}else if(!i){a.reading=false;maybeReadMore(e,a)}}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function addChunk(e,t,r,i){if(t.flowing&&t.length===0&&!t.sync){t.awaitDrain=0;e.emit("data",r)}else{t.length+=t.objectMode?1:r.length;if(i)t.buffer.unshift(r);else t.buffer.push(r);if(t.needReadable)emitReadable(e)}maybeReadMore(e,t)}function chunkInvalid(e,t){var r;if(!_isUint8Array(t)&&typeof t!=="string"&&t!==undefined&&!e.objectMode){r=new p("chunk",["string","Buffer","Uint8Array"],t)}return r}Readable.prototype.isPaused=function(){return this._readableState.flowing===false};Readable.prototype.setEncoding=function(e){if(!w)w=r(937).s;var t=new w(e);this._readableState.decoder=t;this._readableState.encoding=this._readableState.decoder.encoding;var i=this._readableState.buffer.head;var n="";while(i!==null){n+=t.write(i.data);i=i.next}this._readableState.buffer.clear();if(n!=="")this._readableState.buffer.push(n);this._readableState.length=n.length;return this};var P=1073741824;function computeNewHighWaterMark(e){if(e>=P){e=P}else{e--;e|=e>>>1;e|=e>>>2;e|=e>>>4;e|=e>>>8;e|=e>>>16;e++}return e}function howMuchToRead(e,t){if(e<=0||t.length===0&&t.ended)return 0;if(t.objectMode)return 1;if(e!==e){if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length}if(e>t.highWaterMark)t.highWaterMark=computeNewHighWaterMark(e);if(e<=t.length)return e;if(!t.ended){t.needReadable=true;return 0}return t.length}Readable.prototype.read=function(e){u("read",e);e=parseInt(e,10);var t=this._readableState;var r=e;if(e!==0)t.emittedReadable=false;if(e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended)){u("read: emitReadable",t.length,t.ended);if(t.length===0&&t.ended)endReadable(this);else emitReadable(this);return null}e=howMuchToRead(e,t);if(e===0&&t.ended){if(t.length===0)endReadable(this);return null}var i=t.needReadable;u("need readable",i);if(t.length===0||t.length-e<t.highWaterMark){i=true;u("length less than watermark",i)}if(t.ended||t.reading){i=false;u("reading or ended",i)}else if(i){u("do read");t.reading=true;t.sync=true;if(t.length===0)t.needReadable=true;this._read(t.highWaterMark);t.sync=false;if(!t.reading)e=howMuchToRead(r,t)}var n;if(e>0)n=fromList(e,t);else n=null;if(n===null){t.needReadable=t.length<=t.highWaterMark;e=0}else{t.length-=e;t.awaitDrain=0}if(t.length===0){if(!t.ended)t.needReadable=true;if(r!==e&&t.ended)endReadable(this)}if(n!==null)this.emit("data",n);return n};function onEofChunk(e,t){u("onEofChunk");if(t.ended)return;if(t.decoder){var r=t.decoder.end();if(r&&r.length){t.buffer.push(r);t.length+=t.objectMode?1:r.length}}t.ended=true;if(t.sync){emitReadable(e)}else{t.needReadable=false;if(!t.emittedReadable){t.emittedReadable=true;emitReadable_(e)}}}function emitReadable(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable);t.needReadable=false;if(!t.emittedReadable){u("emitReadable",t.flowing);t.emittedReadable=true;process.nextTick(emitReadable_,e)}}function emitReadable_(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended);if(!t.destroyed&&(t.length||t.ended)){e.emit("readable");t.emittedReadable=false}t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark;flow(e)}function maybeReadMore(e,t){if(!t.readingMore){t.readingMore=true;process.nextTick(maybeReadMore_,e,t)}}function maybeReadMore_(e,t){while(!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0)){var r=t.length;u("maybeReadMore read 0");e.read(0);if(r===t.length)break}t.readingMore=false}Readable.prototype._read=function(e){M(this,new g("_read()"))};Readable.prototype.pipe=function(e,t){var r=this;var i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1;u("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==false)&&e!==process.stdout&&e!==process.stderr;var f=n?onend:unpipe;if(i.endEmitted)process.nextTick(f);else r.once("end",f);e.on("unpipe",onunpipe);function onunpipe(e,t){u("onunpipe");if(e===r){if(t&&t.hasUnpiped===false){t.hasUnpiped=true;cleanup()}}}function onend(){u("onend");e.end()}var o=pipeOnDrain(r);e.on("drain",o);var d=false;function cleanup(){u("cleanup");e.removeListener("close",onclose);e.removeListener("finish",onfinish);e.removeListener("drain",o);e.removeListener("error",onerror);e.removeListener("unpipe",onunpipe);r.removeListener("end",onend);r.removeListener("end",unpipe);r.removeListener("data",ondata);d=true;if(i.awaitDrain&&(!e._writableState||e._writableState.needDrain))o()}r.on("data",ondata);function ondata(t){u("ondata");var n=e.write(t);u("dest.write",n);if(n===false){if((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&indexOf(i.pipes,e)!==-1)&&!d){u("false write response, pause",i.awaitDrain);i.awaitDrain++}r.pause()}}function onerror(t){u("onerror",t);unpipe();e.removeListener("error",onerror);if(a(e,"error")===0)M(e,t)}prependListener(e,"error",onerror);function onclose(){e.removeListener("finish",onfinish);unpipe()}e.once("close",onclose);function onfinish(){u("onfinish");e.removeListener("close",onclose);unpipe()}e.once("finish",onfinish);function unpipe(){u("unpipe");r.unpipe(e)}e.emit("pipe",r);if(!i.flowing){u("pipe resume");r.resume()}return e};function pipeOnDrain(e){return function pipeOnDrainFunctionResult(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain);if(t.awaitDrain)t.awaitDrain--;if(t.awaitDrain===0&&a(e,"data")){t.flowing=true;flow(e)}}}Readable.prototype.unpipe=function(e){var t=this._readableState;var r={hasUnpiped:false};if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;if(!e)e=t.pipes;t.pipes=null;t.pipesCount=0;t.flowing=false;if(e)e.emit("unpipe",this,r);return this}if(!e){var i=t.pipes;var n=t.pipesCount;t.pipes=null;t.pipesCount=0;t.flowing=false;for(var a=0;a<n;a++){i[a].emit("unpipe",this,{hasUnpiped:false})}return this}var f=indexOf(t.pipes,e);if(f===-1)return this;t.pipes.splice(f,1);t.pipesCount-=1;if(t.pipesCount===1)t.pipes=t.pipes[0];e.emit("unpipe",this,r);return this};Readable.prototype.on=function(e,t){var r=f.prototype.on.call(this,e,t);var i=this._readableState;if(e==="data"){i.readableListening=this.listenerCount("readable")>0;if(i.flowing!==false)this.resume()}else if(e==="readable"){if(!i.endEmitted&&!i.readableListening){i.readableListening=i.needReadable=true;i.flowing=false;i.emittedReadable=false;u("on readable",i.length,i.reading);if(i.length){emitReadable(this)}else if(!i.reading){process.nextTick(nReadingNextTick,this)}}}return r};Readable.prototype.addListener=Readable.prototype.on;Readable.prototype.removeListener=function(e,t){var r=f.prototype.removeListener.call(this,e,t);if(e==="readable"){process.nextTick(updateReadableListening,this)}return r};Readable.prototype.removeAllListeners=function(e){var t=f.prototype.removeAllListeners.apply(this,arguments);if(e==="readable"||e===undefined){process.nextTick(updateReadableListening,this)}return t};function updateReadableListening(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0;if(t.resumeScheduled&&!t.paused){t.flowing=true}else if(e.listenerCount("data")>0){e.resume()}}function nReadingNextTick(e){u("readable nexttick read 0");e.read(0)}Readable.prototype.resume=function(){var e=this._readableState;if(!e.flowing){u("resume");e.flowing=!e.readableListening;resume(this,e)}e.paused=false;return this};function resume(e,t){if(!t.resumeScheduled){t.resumeScheduled=true;process.nextTick(resume_,e,t)}}function resume_(e,t){u("resume",t.reading);if(!t.reading){e.read(0)}t.resumeScheduled=false;e.emit("resume");flow(e);if(t.flowing&&!t.reading)e.read(0)}Readable.prototype.pause=function(){u("call pause flowing=%j",this._readableState.flowing);if(this._readableState.flowing!==false){u("pause");this._readableState.flowing=false;this.emit("pause")}this._readableState.paused=true;return this};function flow(e){var t=e._readableState;u("flow",t.flowing);while(t.flowing&&e.read()!==null){}}Readable.prototype.wrap=function(e){var t=this;var r=this._readableState;var i=false;e.on("end",function(){u("wrapped end");if(r.decoder&&!r.ended){var e=r.decoder.end();if(e&&e.length)t.push(e)}t.push(null)});e.on("data",function(n){u("wrapped data");if(r.decoder)n=r.decoder.write(n);if(r.objectMode&&(n===null||n===undefined))return;else if(!r.objectMode&&(!n||!n.length))return;var a=t.push(n);if(!a){i=true;e.pause()}});for(var n in e){if(this[n]===undefined&&typeof e[n]==="function"){this[n]=function methodWrap(t){return function methodWrapReturnFunction(){return e[t].apply(e,arguments)}}(n)}}for(var a=0;a<A.length;a++){e.on(A[a],this.emit.bind(this,A[a]))}this._read=function(t){u("wrapped _read",t);if(i){i=false;e.resume()}};return this};if(typeof Symbol==="function"){Readable.prototype[Symbol.asyncIterator]=function(){if(_===undefined){_=r(7257)}return _(this)}}Object.defineProperty(Readable.prototype,"readableHighWaterMark",{enumerable:false,get:function get(){return this._readableState.highWaterMark}});Object.defineProperty(Readable.prototype,"readableBuffer",{enumerable:false,get:function get(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Readable.prototype,"readableFlowing",{enumerable:false,get:function get(){return this._readableState.flowing},set:function set(e){if(this._readableState){this._readableState.flowing=e}}});Readable._fromList=fromList;Object.defineProperty(Readable.prototype,"readableLength",{enumerable:false,get:function get(){return this._readableState.length}});function fromList(e,t){if(t.length===0)return null;var r;if(t.objectMode)r=t.buffer.shift();else if(!e||e>=t.length){if(t.decoder)r=t.buffer.join("");else if(t.buffer.length===1)r=t.buffer.first();else r=t.buffer.concat(t.length);t.buffer.clear()}else{r=t.buffer.consume(e,t.decoder)}return r}function endReadable(e){var t=e._readableState;u("endReadable",t.endEmitted);if(!t.endEmitted){t.ended=true;process.nextTick(endReadableNT,t,e)}}function endReadableNT(e,t){u("endReadableNT",e.endEmitted,e.length);if(!e.endEmitted&&e.length===0){e.endEmitted=true;t.readable=false;t.emit("end");if(e.autoDestroy){var r=t._writableState;if(!r||r.autoDestroy&&r.finished){t.destroy()}}}}if(typeof Symbol==="function"){Readable.from=function(e,t){if(S===undefined){S=r(9914)}return S(Readable,e,t)}}function indexOf(e,t){for(var r=0,i=e.length;r<i;r++){if(e[r]===t)return r}return-1}},9343:(e,t,r)=>{"use strict";e.exports=Transform;var i=r(2145).q,n=i.ERR_METHOD_NOT_IMPLEMENTED,a=i.ERR_MULTIPLE_CALLBACK,f=i.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=i.ERR_TRANSFORM_WITH_LENGTH_0;var d=r(7328);r(2989)(Transform,d);function afterTransform(e,t){var r=this._transformState;r.transforming=false;var i=r.writecb;if(i===null){return this.emit("error",new a)}r.writechunk=null;r.writecb=null;if(t!=null)this.push(t);i(e);var n=this._readableState;n.reading=false;if(n.needReadable||n.length<n.highWaterMark){this._read(n.highWaterMark)}}function Transform(e){if(!(this instanceof Transform))return new Transform(e);d.call(this,e);this._transformState={afterTransform:afterTransform.bind(this),needTransform:false,transforming:false,writecb:null,writechunk:null,writeencoding:null};this._readableState.needReadable=true;this._readableState.sync=false;if(e){if(typeof e.transform==="function")this._transform=e.transform;if(typeof e.flush==="function")this._flush=e.flush}this.on("prefinish",prefinish)}function prefinish(){var e=this;if(typeof this._flush==="function"&&!this._readableState.destroyed){this._flush(function(t,r){done(e,t,r)})}else{done(this,null,null)}}Transform.prototype.push=function(e,t){this._transformState.needTransform=false;return d.prototype.push.call(this,e,t)};Transform.prototype._transform=function(e,t,r){r(new n("_transform()"))};Transform.prototype._write=function(e,t,r){var i=this._transformState;i.writecb=r;i.writechunk=e;i.writeencoding=t;if(!i.transforming){var n=this._readableState;if(i.needTransform||n.needReadable||n.length<n.highWaterMark)this._read(n.highWaterMark)}};Transform.prototype._read=function(e){var t=this._transformState;if(t.writechunk!==null&&!t.transforming){t.transforming=true;this._transform(t.writechunk,t.writeencoding,t.afterTransform)}else{t.needTransform=true}};Transform.prototype._destroy=function(e,t){d.prototype._destroy.call(this,e,function(e){t(e)})};function done(e,t,r){if(t)return e.emit("error",t);if(r!=null)e.push(r);if(e._writableState.length)throw new o;if(e._transformState.transforming)throw new f;return e.push(null)}},9213:(e,t,r)=>{"use strict";e.exports=Writable;function WriteReq(e,t,r){this.chunk=e;this.encoding=t;this.callback=r;this.next=null}function CorkedRequest(e){var t=this;this.next=null;this.entry=null;this.finish=function(){onCorkedFinish(t,e)}}var i;Writable.WritableState=WritableState;var n={deprecate:r(2262)};var a=r(9089);var f=r(4293).Buffer;var o=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return f.from(e)}function _isUint8Array(e){return f.isBuffer(e)||e instanceof o}var d=r(3302);var s=r(6747),u=s.getHighWaterMark;var h=r(2145).q,c=h.ERR_INVALID_ARG_TYPE,l=h.ERR_METHOD_NOT_IMPLEMENTED,b=h.ERR_MULTIPLE_CALLBACK,v=h.ERR_STREAM_CANNOT_PIPE,p=h.ERR_STREAM_DESTROYED,m=h.ERR_STREAM_NULL_VALUES,g=h.ERR_STREAM_WRITE_AFTER_END,y=h.ERR_UNKNOWN_ENCODING;var w=d.errorOrDestroy;r(2989)(Writable,a);function nop(){}function WritableState(e,t,n){i=i||r(7328);e=e||{};if(typeof n!=="boolean")n=t instanceof i;this.objectMode=!!e.objectMode;if(n)this.objectMode=this.objectMode||!!e.writableObjectMode;this.highWaterMark=u(this,e,"writableHighWaterMark",n);this.finalCalled=false;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;this.destroyed=false;var a=e.decodeStrings===false;this.decodeStrings=!a;this.defaultEncoding=e.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(e){onwrite(t,e)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.emitClose=e.emitClose!==false;this.autoDestroy=!!e.autoDestroy;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function getBuffer(){var e=this.bufferedRequest;var t=[];while(e){t.push(e);e=e.next}return t};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:n.deprecate(function writableStateBufferGetter(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}})();var _;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function"){_=Function.prototype[Symbol.hasInstance];Object.defineProperty(Writable,Symbol.hasInstance,{value:function value(e){if(_.call(this,e))return true;if(this!==Writable)return false;return e&&e._writableState instanceof WritableState}})}else{_=function realHasInstance(e){return e instanceof this}}function Writable(e){i=i||r(7328);var t=this instanceof i;if(!t&&!_.call(Writable,this))return new Writable(e);this._writableState=new WritableState(e,this,t);this.writable=true;if(e){if(typeof e.write==="function")this._write=e.write;if(typeof e.writev==="function")this._writev=e.writev;if(typeof e.destroy==="function")this._destroy=e.destroy;if(typeof e.final==="function")this._final=e.final}a.call(this)}Writable.prototype.pipe=function(){w(this,new v)};function writeAfterEnd(e,t){var r=new g;w(e,r);process.nextTick(t,r)}function validChunk(e,t,r,i){var n;if(r===null){n=new m}else if(typeof r!=="string"&&!t.objectMode){n=new c("chunk",["string","Buffer"],r)}if(n){w(e,n);process.nextTick(i,n);return false}return true}Writable.prototype.write=function(e,t,r){var i=this._writableState;var n=false;var a=!i.objectMode&&_isUint8Array(e);if(a&&!f.isBuffer(e)){e=_uint8ArrayToBuffer(e)}if(typeof t==="function"){r=t;t=null}if(a)t="buffer";else if(!t)t=i.defaultEncoding;if(typeof r!=="function")r=nop;if(i.ending)writeAfterEnd(this,r);else if(a||validChunk(this,i,e,r)){i.pendingcb++;n=writeOrBuffer(this,i,a,e,t,r)}return n};Writable.prototype.cork=function(){this._writableState.corked++};Writable.prototype.uncork=function(){var e=this._writableState;if(e.corked){e.corked--;if(!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest)clearBuffer(this,e)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(e){if(typeof e==="string")e=e.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new y(e);this._writableState.defaultEncoding=e;return this};Object.defineProperty(Writable.prototype,"writableBuffer",{enumerable:false,get:function get(){return this._writableState&&this._writableState.getBuffer()}});function decodeChunk(e,t,r){if(!e.objectMode&&e.decodeStrings!==false&&typeof t==="string"){t=f.from(t,r)}return t}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:false,get:function get(){return this._writableState.highWaterMark}});function writeOrBuffer(e,t,r,i,n,a){if(!r){var f=decodeChunk(t,i,n);if(i!==f){r=true;n="buffer";i=f}}var o=t.objectMode?1:i.length;t.length+=o;var d=t.length<t.highWaterMark;if(!d)t.needDrain=true;if(t.writing||t.corked){var s=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null};if(s){s.next=t.lastBufferedRequest}else{t.bufferedRequest=t.lastBufferedRequest}t.bufferedRequestCount+=1}else{doWrite(e,t,false,o,i,n,a)}return d}function doWrite(e,t,r,i,n,a,f){t.writelen=i;t.writecb=f;t.writing=true;t.sync=true;if(t.destroyed)t.onwrite(new p("write"));else if(r)e._writev(n,t.onwrite);else e._write(n,a,t.onwrite);t.sync=false}function onwriteError(e,t,r,i,n){--t.pendingcb;if(r){process.nextTick(n,i);process.nextTick(finishMaybe,e,t);e._writableState.errorEmitted=true;w(e,i)}else{n(i);e._writableState.errorEmitted=true;w(e,i);finishMaybe(e,t)}}function onwriteStateUpdate(e){e.writing=false;e.writecb=null;e.length-=e.writelen;e.writelen=0}function onwrite(e,t){var r=e._writableState;var i=r.sync;var n=r.writecb;if(typeof n!=="function")throw new b;onwriteStateUpdate(r);if(t)onwriteError(e,r,i,t,n);else{var a=needFinish(r)||e.destroyed;if(!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest){clearBuffer(e,r)}if(i){process.nextTick(afterWrite,e,r,a,n)}else{afterWrite(e,r,a,n)}}}function afterWrite(e,t,r,i){if(!r)onwriteDrain(e,t);t.pendingcb--;i();finishMaybe(e,t)}function onwriteDrain(e,t){if(t.length===0&&t.needDrain){t.needDrain=false;e.emit("drain")}}function clearBuffer(e,t){t.bufferProcessing=true;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount;var n=new Array(i);var a=t.corkedRequestsFree;a.entry=r;var f=0;var o=true;while(r){n[f]=r;if(!r.isBuf)o=false;r=r.next;f+=1}n.allBuffers=o;doWrite(e,t,true,t.length,n,"",a.finish);t.pendingcb++;t.lastBufferedRequest=null;if(a.next){t.corkedRequestsFree=a.next;a.next=null}else{t.corkedRequestsFree=new CorkedRequest(t)}t.bufferedRequestCount=0}else{while(r){var d=r.chunk;var s=r.encoding;var u=r.callback;var h=t.objectMode?1:d.length;doWrite(e,t,false,h,d,s,u);r=r.next;t.bufferedRequestCount--;if(t.writing){break}}if(r===null)t.lastBufferedRequest=null}t.bufferedRequest=r;t.bufferProcessing=false}Writable.prototype._write=function(e,t,r){r(new l("_write()"))};Writable.prototype._writev=null;Writable.prototype.end=function(e,t,r){var i=this._writableState;if(typeof e==="function"){r=e;e=null;t=null}else if(typeof t==="function"){r=t;t=null}if(e!==null&&e!==undefined)this.write(e,t);if(i.corked){i.corked=1;this.uncork()}if(!i.ending)endWritable(this,i,r);return this};Object.defineProperty(Writable.prototype,"writableLength",{enumerable:false,get:function get(){return this._writableState.length}});function needFinish(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function callFinal(e,t){e._final(function(r){t.pendingcb--;if(r){w(e,r)}t.prefinished=true;e.emit("prefinish");finishMaybe(e,t)})}function prefinish(e,t){if(!t.prefinished&&!t.finalCalled){if(typeof e._final==="function"&&!t.destroyed){t.pendingcb++;t.finalCalled=true;process.nextTick(callFinal,e,t)}else{t.prefinished=true;e.emit("prefinish")}}}function finishMaybe(e,t){var r=needFinish(t);if(r){prefinish(e,t);if(t.pendingcb===0){t.finished=true;e.emit("finish");if(t.autoDestroy){var i=e._readableState;if(!i||i.autoDestroy&&i.endEmitted){e.destroy()}}}}return r}function endWritable(e,t,r){t.ending=true;finishMaybe(e,t);if(r){if(t.finished)process.nextTick(r);else e.once("finish",r)}t.ended=true;e.writable=false}function onCorkedFinish(e,t,r){var i=e.entry;e.entry=null;while(i){var n=i.callback;t.pendingcb--;n(r);i=i.next}t.corkedRequestsFree.next=e}Object.defineProperty(Writable.prototype,"destroyed",{enumerable:false,get:function get(){if(this._writableState===undefined){return false}return this._writableState.destroyed},set:function set(e){if(!this._writableState){return}this._writableState.destroyed=e}});Writable.prototype.destroy=d.destroy;Writable.prototype._undestroy=d.undestroy;Writable.prototype._destroy=function(e,t){t(e)}},7257:(e,t,r)=>{"use strict";var i;function _defineProperty(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}var n=r(2713);var a=Symbol("lastResolve");var f=Symbol("lastReject");var o=Symbol("error");var d=Symbol("ended");var s=Symbol("lastPromise");var u=Symbol("handlePromise");var h=Symbol("stream");function createIterResult(e,t){return{value:e,done:t}}function readAndResolve(e){var t=e[a];if(t!==null){var r=e[h].read();if(r!==null){e[s]=null;e[a]=null;e[f]=null;t(createIterResult(r,false))}}}function onReadable(e){process.nextTick(readAndResolve,e)}function wrapForNext(e,t){return function(r,i){e.then(function(){if(t[d]){r(createIterResult(undefined,true));return}t[u](r,i)},i)}}var c=Object.getPrototypeOf(function(){});var l=Object.setPrototypeOf((i={get stream(){return this[h]},next:function next(){var e=this;var t=this[o];if(t!==null){return Promise.reject(t)}if(this[d]){return Promise.resolve(createIterResult(undefined,true))}if(this[h].destroyed){return new Promise(function(t,r){process.nextTick(function(){if(e[o]){r(e[o])}else{t(createIterResult(undefined,true))}})})}var r=this[s];var i;if(r){i=new Promise(wrapForNext(r,this))}else{var n=this[h].read();if(n!==null){return Promise.resolve(createIterResult(n,false))}i=new Promise(this[u])}this[s]=i;return i}},_defineProperty(i,Symbol.asyncIterator,function(){return this}),_defineProperty(i,"return",function _return(){var e=this;return new Promise(function(t,r){e[h].destroy(null,function(e){if(e){r(e);return}t(createIterResult(undefined,true))})})}),i),c);var b=function createReadableStreamAsyncIterator(e){var t;var r=Object.create(l,(t={},_defineProperty(t,h,{value:e,writable:true}),_defineProperty(t,a,{value:null,writable:true}),_defineProperty(t,f,{value:null,writable:true}),_defineProperty(t,o,{value:null,writable:true}),_defineProperty(t,d,{value:e._readableState.endEmitted,writable:true}),_defineProperty(t,u,{value:function value(e,t){var i=r[h].read();if(i){r[s]=null;r[a]=null;r[f]=null;e(createIterResult(i,false))}else{r[a]=e;r[f]=t}},writable:true}),t));r[s]=null;n(e,function(e){if(e&&e.code!=="ERR_STREAM_PREMATURE_CLOSE"){var t=r[f];if(t!==null){r[s]=null;r[a]=null;r[f]=null;t(e)}r[o]=e;return}var i=r[a];if(i!==null){r[s]=null;r[a]=null;r[f]=null;i(createIterResult(undefined,true))}r[d]=true});e.on("readable",onReadable.bind(null,r));return r};e.exports=b},7031:(e,t,r)=>{"use strict";function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);if(t)i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable});r.push.apply(r,i)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};if(t%2){ownKeys(Object(r),true).forEach(function(t){_defineProperty(e,t,r[t])})}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(e,Object.getOwnPropertyDescriptors(r))}else{ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}}return e}function _defineProperty(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}function _classCallCheck(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}function _createClass(e,t,r){if(t)_defineProperties(e.prototype,t);if(r)_defineProperties(e,r);return e}var i=r(4293),n=i.Buffer;var a=r(1669),f=a.inspect;var o=f&&f.custom||"inspect";function copyBuffer(e,t,r){n.prototype.copy.call(e,t,r)}e.exports=function(){function BufferList(){_classCallCheck(this,BufferList);this.head=null;this.tail=null;this.length=0}_createClass(BufferList,[{key:"push",value:function push(e){var t={data:e,next:null};if(this.length>0)this.tail.next=t;else this.head=t;this.tail=t;++this.length}},{key:"unshift",value:function unshift(e){var t={data:e,next:this.head};if(this.length===0)this.tail=t;this.head=t;++this.length}},{key:"shift",value:function shift(){if(this.length===0)return;var e=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return e}},{key:"clear",value:function clear(){this.head=this.tail=null;this.length=0}},{key:"join",value:function join(e){if(this.length===0)return"";var t=this.head;var r=""+t.data;while(t=t.next){r+=e+t.data}return r}},{key:"concat",value:function concat(e){if(this.length===0)return n.alloc(0);var t=n.allocUnsafe(e>>>0);var r=this.head;var i=0;while(r){copyBuffer(r.data,t,i);i+=r.data.length;r=r.next}return t}},{key:"consume",value:function consume(e,t){var r;if(e<this.head.data.length){r=this.head.data.slice(0,e);this.head.data=this.head.data.slice(e)}else if(e===this.head.data.length){r=this.shift()}else{r=t?this._getString(e):this._getBuffer(e)}return r}},{key:"first",value:function first(){return this.head.data}},{key:"_getString",value:function _getString(e){var t=this.head;var r=1;var i=t.data;e-=i.length;while(t=t.next){var n=t.data;var a=e>n.length?n.length:e;if(a===n.length)i+=n;else i+=n.slice(0,e);e-=a;if(e===0){if(a===n.length){++r;if(t.next)this.head=t.next;else this.head=this.tail=null}else{this.head=t;t.data=n.slice(a)}break}++r}this.length-=r;return i}},{key:"_getBuffer",value:function _getBuffer(e){var t=n.allocUnsafe(e);var r=this.head;var i=1;r.data.copy(t);e-=r.data.length;while(r=r.next){var a=r.data;var f=e>a.length?a.length:e;a.copy(t,t.length-e,0,f);e-=f;if(e===0){if(f===a.length){++i;if(r.next)this.head=r.next;else this.head=this.tail=null}else{this.head=r;r.data=a.slice(f)}break}++i}this.length-=i;return t}},{key:o,value:function value(e,t){return f(this,_objectSpread({},t,{depth:0,customInspect:false}))}}]);return BufferList}()},3302:e=>{"use strict";function destroy(e,t){var r=this;var i=this._readableState&&this._readableState.destroyed;var n=this._writableState&&this._writableState.destroyed;if(i||n){if(t){t(e)}else if(e){if(!this._writableState){process.nextTick(emitErrorNT,this,e)}else if(!this._writableState.errorEmitted){this._writableState.errorEmitted=true;process.nextTick(emitErrorNT,this,e)}}return this}if(this._readableState){this._readableState.destroyed=true}if(this._writableState){this._writableState.destroyed=true}this._destroy(e||null,function(e){if(!t&&e){if(!r._writableState){process.nextTick(emitErrorAndCloseNT,r,e)}else if(!r._writableState.errorEmitted){r._writableState.errorEmitted=true;process.nextTick(emitErrorAndCloseNT,r,e)}else{process.nextTick(emitCloseNT,r)}}else if(t){process.nextTick(emitCloseNT,r);t(e)}else{process.nextTick(emitCloseNT,r)}});return this}function emitErrorAndCloseNT(e,t){emitErrorNT(e,t);emitCloseNT(e)}function emitCloseNT(e){if(e._writableState&&!e._writableState.emitClose)return;if(e._readableState&&!e._readableState.emitClose)return;e.emit("close")}function undestroy(){if(this._readableState){this._readableState.destroyed=false;this._readableState.reading=false;this._readableState.ended=false;this._readableState.endEmitted=false}if(this._writableState){this._writableState.destroyed=false;this._writableState.ended=false;this._writableState.ending=false;this._writableState.finalCalled=false;this._writableState.prefinished=false;this._writableState.finished=false;this._writableState.errorEmitted=false}}function emitErrorNT(e,t){e.emit("error",t)}function errorOrDestroy(e,t){var r=e._readableState;var i=e._writableState;if(r&&r.autoDestroy||i&&i.autoDestroy)e.destroy(t);else e.emit("error",t)}e.exports={destroy:destroy,undestroy:undestroy,errorOrDestroy:errorOrDestroy}},2713:(e,t,r)=>{"use strict";var i=r(2145).q.ERR_STREAM_PREMATURE_CLOSE;function once(e){var t=false;return function(){if(t)return;t=true;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++){i[n]=arguments[n]}e.apply(this,i)}}function noop(){}function isRequest(e){return e.setHeader&&typeof e.abort==="function"}function eos(e,t,r){if(typeof t==="function")return eos(e,null,t);if(!t)t={};r=once(r||noop);var n=t.readable||t.readable!==false&&e.readable;var a=t.writable||t.writable!==false&&e.writable;var f=function onlegacyfinish(){if(!e.writable)d()};var o=e._writableState&&e._writableState.finished;var d=function onfinish(){a=false;o=true;if(!n)r.call(e)};var s=e._readableState&&e._readableState.endEmitted;var u=function onend(){n=false;s=true;if(!a)r.call(e)};var h=function onerror(t){r.call(e,t)};var c=function onclose(){var t;if(n&&!s){if(!e._readableState||!e._readableState.ended)t=new i;return r.call(e,t)}if(a&&!o){if(!e._writableState||!e._writableState.ended)t=new i;return r.call(e,t)}};var l=function onrequest(){e.req.on("finish",d)};if(isRequest(e)){e.on("complete",d);e.on("abort",c);if(e.req)l();else e.on("request",l)}else if(a&&!e._writableState){e.on("end",f);e.on("close",f)}e.on("end",u);e.on("finish",d);if(t.error!==false)e.on("error",h);e.on("close",c);return function(){e.removeListener("complete",d);e.removeListener("abort",c);e.removeListener("request",l);if(e.req)e.req.removeListener("finish",d);e.removeListener("end",f);e.removeListener("close",f);e.removeListener("finish",d);e.removeListener("end",u);e.removeListener("error",h);e.removeListener("close",c)}}e.exports=eos},9914:(e,t,r)=>{"use strict";function asyncGeneratorStep(e,t,r,i,n,a,f){try{var o=e[a](f);var d=o.value}catch(e){r(e);return}if(o.done){t(d)}else{Promise.resolve(d).then(i,n)}}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise(function(i,n){var a=e.apply(t,r);function _next(e){asyncGeneratorStep(a,i,n,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(a,i,n,_next,_throw,"throw",e)}_next(undefined)})}}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);if(t)i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable});r.push.apply(r,i)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};if(t%2){ownKeys(Object(r),true).forEach(function(t){_defineProperty(e,t,r[t])})}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(e,Object.getOwnPropertyDescriptors(r))}else{ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}}return e}function _defineProperty(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}var i=r(2145).q.ERR_INVALID_ARG_TYPE;function from(e,t,r){var n;if(t&&typeof t.next==="function"){n=t}else if(t&&t[Symbol.asyncIterator])n=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])n=t[Symbol.iterator]();else throw new i("iterable",["Iterable"],t);var a=new e(_objectSpread({objectMode:true},r));var f=false;a._read=function(){if(!f){f=true;next()}};function next(){return _next2.apply(this,arguments)}function _next2(){_next2=_asyncToGenerator(function*(){try{var e=yield n.next(),t=e.value,r=e.done;if(r){a.push(null)}else if(a.push(yield t)){next()}else{f=false}}catch(e){a.destroy(e)}});return _next2.apply(this,arguments)}return a}e.exports=from},4802:(e,t,r)=>{"use strict";var i;function once(e){var t=false;return function(){if(t)return;t=true;e.apply(void 0,arguments)}}var n=r(2145).q,a=n.ERR_MISSING_ARGS,f=n.ERR_STREAM_DESTROYED;function noop(e){if(e)throw e}function isRequest(e){return e.setHeader&&typeof e.abort==="function"}function destroyer(e,t,n,a){a=once(a);var o=false;e.on("close",function(){o=true});if(i===undefined)i=r(2713);i(e,{readable:t,writable:n},function(e){if(e)return a(e);o=true;a()});var d=false;return function(t){if(o)return;if(d)return;d=true;if(isRequest(e))return e.abort();if(typeof e.destroy==="function")return e.destroy();a(t||new f("pipe"))}}function call(e){e()}function pipe(e,t){return e.pipe(t)}function popCallback(e){if(!e.length)return noop;if(typeof e[e.length-1]!=="function")return noop;return e.pop()}function pipeline(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}var i=popCallback(t);if(Array.isArray(t[0]))t=t[0];if(t.length<2){throw new a("streams")}var n;var f=t.map(function(e,r){var a=r<t.length-1;var o=r>0;return destroyer(e,a,o,function(e){if(!n)n=e;if(e)f.forEach(call);if(a)return;f.forEach(call);i(n)})});return t.reduce(pipe)}e.exports=pipeline},6747:(e,t,r)=>{"use strict";var i=r(2145).q.ERR_INVALID_OPT_VALUE;function highWaterMarkFrom(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function getHighWaterMark(e,t,r,n){var a=highWaterMarkFrom(t,n,r);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var f=n?r:"highWaterMark";throw new i(f,a)}return Math.floor(a)}return e.objectMode?16:16*1024}e.exports={getHighWaterMark:getHighWaterMark}},9089:(e,t,r)=>{e.exports=r(2413)},8022:(e,t,r)=>{var i=r(2413);if(process.env.READABLE_STREAM==="disable"&&i){e.exports=i.Readable;Object.assign(e.exports,i);e.exports.Stream=i}else{t=e.exports=r(4614);t.Stream=i||t;t.Readable=t;t.Writable=r(9213);t.Duplex=r(7328);t.Transform=r(9343);t.PassThrough=r(674);t.finished=r(2713);t.pipeline=r(4802)}},5582:(e,t,r)=>{var i=t;i.utils=r(6128);i.common=r(4803);i.sha=r(2347);i.ripemd=r(2630);i.hmac=r(3622);i.sha1=i.sha.sha1;i.sha256=i.sha.sha256;i.sha224=i.sha.sha224;i.sha384=i.sha.sha384;i.sha512=i.sha.sha512;i.ripemd160=i.ripemd.ripemd160},4803:(e,t,r)=>{"use strict";var i=r(6128);var n=r(6787);function BlockHash(){this.pending=null;this.pendingTotal=0;this.blockSize=this.constructor.blockSize;this.outSize=this.constructor.outSize;this.hmacStrength=this.constructor.hmacStrength;this.padLength=this.constructor.padLength/8;this.endian="big";this._delta8=this.blockSize/8;this._delta32=this.blockSize/32}t.BlockHash=BlockHash;BlockHash.prototype.update=function update(e,t){e=i.toArray(e,t);if(!this.pending)this.pending=e;else this.pending=this.pending.concat(e);this.pendingTotal+=e.length;if(this.pending.length>=this._delta8){e=this.pending;var r=e.length%this._delta8;this.pending=e.slice(e.length-r,e.length);if(this.pending.length===0)this.pending=null;e=i.join32(e,0,e.length-r,this.endian);for(var n=0;n<e.length;n+=this._delta32)this._update(e,n,n+this._delta32)}return this};BlockHash.prototype.digest=function digest(e){this.update(this._pad());n(this.pending===null);return this._digest(e)};BlockHash.prototype._pad=function pad(){var e=this.pendingTotal;var t=this._delta8;var r=t-(e+this.padLength)%t;var i=new Array(r+this.padLength);i[0]=128;for(var n=1;n<r;n++)i[n]=0;e<<=3;if(this.endian==="big"){for(var a=8;a<this.padLength;a++)i[n++]=0;i[n++]=0;i[n++]=0;i[n++]=0;i[n++]=0;i[n++]=e>>>24&255;i[n++]=e>>>16&255;i[n++]=e>>>8&255;i[n++]=e&255}else{i[n++]=e&255;i[n++]=e>>>8&255;i[n++]=e>>>16&255;i[n++]=e>>>24&255;i[n++]=0;i[n++]=0;i[n++]=0;i[n++]=0;for(a=8;a<this.padLength;a++)i[n++]=0}return i}},3622:(e,t,r)=>{"use strict";var i=r(6128);var n=r(6787);function Hmac(e,t,r){if(!(this instanceof Hmac))return new Hmac(e,t,r);this.Hash=e;this.blockSize=e.blockSize/8;this.outSize=e.outSize/8;this.inner=null;this.outer=null;this._init(i.toArray(t,r))}e.exports=Hmac;Hmac.prototype._init=function init(e){if(e.length>this.blockSize)e=(new this.Hash).update(e).digest();n(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;this.inner=(new this.Hash).update(e);for(t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)};Hmac.prototype.update=function update(e,t){this.inner.update(e,t);return this};Hmac.prototype.digest=function digest(e){this.outer.update(this.inner.digest());return this.outer.digest(e)}},2630:(e,t,r)=>{"use strict";var i=r(6128);var n=r(4803);var a=i.rotl32;var o=i.sum32;var d=i.sum32_3;var s=i.sum32_4;var u=n.BlockHash;function RIPEMD160(){if(!(this instanceof RIPEMD160))return new RIPEMD160;u.call(this);this.h=[1732584193,4023233417,2562383102,271733878,3285377520];this.endian="little"}i.inherits(RIPEMD160,u);t.ripemd160=RIPEMD160;RIPEMD160.blockSize=512;RIPEMD160.outSize=160;RIPEMD160.hmacStrength=192;RIPEMD160.padLength=64;RIPEMD160.prototype._update=function update(e,t){var r=this.h[0];var i=this.h[1];var n=this.h[2];var u=this.h[3];var v=this.h[4];var p=r;var m=i;var g=n;var y=u;var w=v;for(var _=0;_<80;_++){var S=o(a(s(r,f(_,i,n,u),e[h[_]+t],K(_)),l[_]),v);r=v;v=u;u=a(n,10);n=i;i=S;S=o(a(s(p,f(79-_,m,g,y),e[c[_]+t],Kh(_)),b[_]),w);p=w;w=y;y=a(g,10);g=m;m=S}S=d(this.h[1],n,y);this.h[1]=d(this.h[2],u,w);this.h[2]=d(this.h[3],v,p);this.h[3]=d(this.h[4],r,m);this.h[4]=d(this.h[0],i,g);this.h[0]=S};RIPEMD160.prototype._digest=function digest(e){if(e==="hex")return i.toHex32(this.h,"little");else return i.split32(this.h,"little")};function f(e,t,r,i){if(e<=15)return t^r^i;else if(e<=31)return t&r|~t&i;else if(e<=47)return(t|~r)^i;else if(e<=63)return t&i|r&~i;else return t^(r|~i)}function K(e){if(e<=15)return 0;else if(e<=31)return 1518500249;else if(e<=47)return 1859775393;else if(e<=63)return 2400959708;else return 2840853838}function Kh(e){if(e<=15)return 1352829926;else if(e<=31)return 1548603684;else if(e<=47)return 1836072691;else if(e<=63)return 2053994217;else return 0}var h=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13];var c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11];var l=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6];var b=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},2347:(e,t,r)=>{"use strict";t.sha1=r(9057);t.sha224=r(3079);t.sha256=r(5082);t.sha384=r(7062);t.sha512=r(4673)},9057:(e,t,r)=>{"use strict";var i=r(6128);var n=r(4803);var a=r(5541);var f=i.rotl32;var o=i.sum32;var d=i.sum32_5;var s=a.ft_1;var u=n.BlockHash;var h=[1518500249,1859775393,2400959708,3395469782];function SHA1(){if(!(this instanceof SHA1))return new SHA1;u.call(this);this.h=[1732584193,4023233417,2562383102,271733878,3285377520];this.W=new Array(80)}i.inherits(SHA1,u);e.exports=SHA1;SHA1.blockSize=512;SHA1.outSize=160;SHA1.hmacStrength=80;SHA1.padLength=64;SHA1.prototype._update=function _update(e,t){var r=this.W;for(var i=0;i<16;i++)r[i]=e[t+i];for(;i<r.length;i++)r[i]=f(r[i-3]^r[i-8]^r[i-14]^r[i-16],1);var n=this.h[0];var a=this.h[1];var u=this.h[2];var c=this.h[3];var l=this.h[4];for(i=0;i<r.length;i++){var b=~~(i/20);var v=d(f(n,5),s(b,a,u,c),l,r[i],h[b]);l=c;c=u;u=f(a,30);a=n;n=v}this.h[0]=o(this.h[0],n);this.h[1]=o(this.h[1],a);this.h[2]=o(this.h[2],u);this.h[3]=o(this.h[3],c);this.h[4]=o(this.h[4],l)};SHA1.prototype._digest=function digest(e){if(e==="hex")return i.toHex32(this.h,"big");else return i.split32(this.h,"big")}},3079:(e,t,r)=>{"use strict";var i=r(6128);var n=r(5082);function SHA224(){if(!(this instanceof SHA224))return new SHA224;n.call(this);this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}i.inherits(SHA224,n);e.exports=SHA224;SHA224.blockSize=512;SHA224.outSize=224;SHA224.hmacStrength=192;SHA224.padLength=64;SHA224.prototype._digest=function digest(e){if(e==="hex")return i.toHex32(this.h.slice(0,7),"big");else return i.split32(this.h.slice(0,7),"big")}},5082:(e,t,r)=>{"use strict";var i=r(6128);var n=r(4803);var a=r(5541);var f=r(6787);var o=i.sum32;var d=i.sum32_4;var s=i.sum32_5;var u=a.ch32;var h=a.maj32;var c=a.s0_256;var l=a.s1_256;var b=a.g0_256;var v=a.g1_256;var p=n.BlockHash;var m=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function SHA256(){if(!(this instanceof SHA256))return new SHA256;p.call(this);this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];this.k=m;this.W=new Array(64)}i.inherits(SHA256,p);e.exports=SHA256;SHA256.blockSize=512;SHA256.outSize=256;SHA256.hmacStrength=192;SHA256.padLength=64;SHA256.prototype._update=function _update(e,t){var r=this.W;for(var i=0;i<16;i++)r[i]=e[t+i];for(;i<r.length;i++)r[i]=d(v(r[i-2]),r[i-7],b(r[i-15]),r[i-16]);var n=this.h[0];var a=this.h[1];var p=this.h[2];var m=this.h[3];var g=this.h[4];var y=this.h[5];var w=this.h[6];var _=this.h[7];f(this.k.length===r.length);for(i=0;i<r.length;i++){var S=s(_,l(g),u(g,y,w),this.k[i],r[i]);var M=o(c(n),h(n,a,p));_=w;w=y;y=g;g=o(m,S);m=p;p=a;a=n;n=o(S,M)}this.h[0]=o(this.h[0],n);this.h[1]=o(this.h[1],a);this.h[2]=o(this.h[2],p);this.h[3]=o(this.h[3],m);this.h[4]=o(this.h[4],g);this.h[5]=o(this.h[5],y);this.h[6]=o(this.h[6],w);this.h[7]=o(this.h[7],_)};SHA256.prototype._digest=function digest(e){if(e==="hex")return i.toHex32(this.h,"big");else return i.split32(this.h,"big")}},7062:(e,t,r)=>{"use strict";var i=r(6128);var n=r(4673);function SHA384(){if(!(this instanceof SHA384))return new SHA384;n.call(this);this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}i.inherits(SHA384,n);e.exports=SHA384;SHA384.blockSize=1024;SHA384.outSize=384;SHA384.hmacStrength=192;SHA384.padLength=128;SHA384.prototype._digest=function digest(e){if(e==="hex")return i.toHex32(this.h.slice(0,12),"big");else return i.split32(this.h.slice(0,12),"big")}},4673:(e,t,r)=>{"use strict";var i=r(6128);var n=r(4803);var a=r(6787);var f=i.rotr64_hi;var o=i.rotr64_lo;var d=i.shr64_hi;var s=i.shr64_lo;var u=i.sum64;var h=i.sum64_hi;var c=i.sum64_lo;var l=i.sum64_4_hi;var b=i.sum64_4_lo;var v=i.sum64_5_hi;var p=i.sum64_5_lo;var m=n.BlockHash;var g=[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];function SHA512(){if(!(this instanceof SHA512))return new SHA512;m.call(this);this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209];this.k=g;this.W=new Array(160)}i.inherits(SHA512,m);e.exports=SHA512;SHA512.blockSize=1024;SHA512.outSize=512;SHA512.hmacStrength=192;SHA512.padLength=128;SHA512.prototype._prepareBlock=function _prepareBlock(e,t){var r=this.W;for(var i=0;i<32;i++)r[i]=e[t+i];for(;i<r.length;i+=2){var n=g1_512_hi(r[i-4],r[i-3]);var a=g1_512_lo(r[i-4],r[i-3]);var f=r[i-14];var o=r[i-13];var d=g0_512_hi(r[i-30],r[i-29]);var s=g0_512_lo(r[i-30],r[i-29]);var u=r[i-32];var h=r[i-31];r[i]=l(n,a,f,o,d,s,u,h);r[i+1]=b(n,a,f,o,d,s,u,h)}};SHA512.prototype._update=function _update(e,t){this._prepareBlock(e,t);var r=this.W;var i=this.h[0];var n=this.h[1];var f=this.h[2];var o=this.h[3];var d=this.h[4];var s=this.h[5];var l=this.h[6];var b=this.h[7];var m=this.h[8];var g=this.h[9];var y=this.h[10];var w=this.h[11];var _=this.h[12];var S=this.h[13];var M=this.h[14];var A=this.h[15];a(this.k.length===r.length);for(var P=0;P<r.length;P+=2){var B=M;var E=A;var R=s1_512_hi(m,g);var N=s1_512_lo(m,g);var I=ch64_hi(m,g,y,w,_,S);var k=ch64_lo(m,g,y,w,_,S);var D=this.k[P];var x=this.k[P+1];var C=r[P];var j=r[P+1];var q=v(B,E,R,N,I,k,D,x,C,j);var T=p(B,E,R,N,I,k,D,x,C,j);B=s0_512_hi(i,n);E=s0_512_lo(i,n);R=maj64_hi(i,n,f,o,d,s);N=maj64_lo(i,n,f,o,d,s);var H=h(B,E,R,N);var L=c(B,E,R,N);M=_;A=S;_=y;S=w;y=m;w=g;m=h(l,b,q,T);g=c(b,b,q,T);l=d;b=s;d=f;s=o;f=i;o=n;i=h(q,T,H,L);n=c(q,T,H,L)}u(this.h,0,i,n);u(this.h,2,f,o);u(this.h,4,d,s);u(this.h,6,l,b);u(this.h,8,m,g);u(this.h,10,y,w);u(this.h,12,_,S);u(this.h,14,M,A)};SHA512.prototype._digest=function digest(e){if(e==="hex")return i.toHex32(this.h,"big");else return i.split32(this.h,"big")};function ch64_hi(e,t,r,i,n){var a=e&r^~e&n;if(a<0)a+=4294967296;return a}function ch64_lo(e,t,r,i,n,a){var f=t&i^~t&a;if(f<0)f+=4294967296;return f}function maj64_hi(e,t,r,i,n){var a=e&r^e&n^r&n;if(a<0)a+=4294967296;return a}function maj64_lo(e,t,r,i,n,a){var f=t&i^t&a^i&a;if(f<0)f+=4294967296;return f}function s0_512_hi(e,t){var r=f(e,t,28);var i=f(t,e,2);var n=f(t,e,7);var a=r^i^n;if(a<0)a+=4294967296;return a}function s0_512_lo(e,t){var r=o(e,t,28);var i=o(t,e,2);var n=o(t,e,7);var a=r^i^n;if(a<0)a+=4294967296;return a}function s1_512_hi(e,t){var r=f(e,t,14);var i=f(e,t,18);var n=f(t,e,9);var a=r^i^n;if(a<0)a+=4294967296;return a}function s1_512_lo(e,t){var r=o(e,t,14);var i=o(e,t,18);var n=o(t,e,9);var a=r^i^n;if(a<0)a+=4294967296;return a}function g0_512_hi(e,t){var r=f(e,t,1);var i=f(e,t,8);var n=d(e,t,7);var a=r^i^n;if(a<0)a+=4294967296;return a}function g0_512_lo(e,t){var r=o(e,t,1);var i=o(e,t,8);var n=s(e,t,7);var a=r^i^n;if(a<0)a+=4294967296;return a}function g1_512_hi(e,t){var r=f(e,t,19);var i=f(t,e,29);var n=d(e,t,6);var a=r^i^n;if(a<0)a+=4294967296;return a}function g1_512_lo(e,t){var r=o(e,t,19);var i=o(t,e,29);var n=s(e,t,6);var a=r^i^n;if(a<0)a+=4294967296;return a}},5541:(e,t,r)=>{"use strict";var i=r(6128);var n=i.rotr32;function ft_1(e,t,r,i){if(e===0)return ch32(t,r,i);if(e===1||e===3)return p32(t,r,i);if(e===2)return maj32(t,r,i)}t.ft_1=ft_1;function ch32(e,t,r){return e&t^~e&r}t.ch32=ch32;function maj32(e,t,r){return e&t^e&r^t&r}t.maj32=maj32;function p32(e,t,r){return e^t^r}t.p32=p32;function s0_256(e){return n(e,2)^n(e,13)^n(e,22)}t.s0_256=s0_256;function s1_256(e){return n(e,6)^n(e,11)^n(e,25)}t.s1_256=s1_256;function g0_256(e){return n(e,7)^n(e,18)^e>>>3}t.g0_256=g0_256;function g1_256(e){return n(e,17)^n(e,19)^e>>>10}t.g1_256=g1_256},6128:(e,t,r)=>{"use strict";var i=r(6787);var n=r(2989);t.inherits=n;function isSurrogatePair(e,t){if((e.charCodeAt(t)&64512)!==55296){return false}if(t<0||t+1>=e.length){return false}return(e.charCodeAt(t+1)&64512)===56320}function toArray(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(typeof e==="string"){if(!t){var i=0;for(var n=0;n<e.length;n++){var a=e.charCodeAt(n);if(a<128){r[i++]=a}else if(a<2048){r[i++]=a>>6|192;r[i++]=a&63|128}else if(isSurrogatePair(e,n)){a=65536+((a&1023)<<10)+(e.charCodeAt(++n)&1023);r[i++]=a>>18|240;r[i++]=a>>12&63|128;r[i++]=a>>6&63|128;r[i++]=a&63|128}else{r[i++]=a>>12|224;r[i++]=a>>6&63|128;r[i++]=a&63|128}}}else if(t==="hex"){e=e.replace(/[^a-z0-9]+/gi,"");if(e.length%2!==0)e="0"+e;for(n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}}else{for(n=0;n<e.length;n++)r[n]=e[n]|0}return r}t.toArray=toArray;function toHex(e){var t="";for(var r=0;r<e.length;r++)t+=zero2(e[r].toString(16));return t}t.toHex=toHex;function htonl(e){var t=e>>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return t>>>0}t.htonl=htonl;function toHex32(e,t){var r="";for(var i=0;i<e.length;i++){var n=e[i];if(t==="little")n=htonl(n);r+=zero8(n.toString(16))}return r}t.toHex32=toHex32;function zero2(e){if(e.length===1)return"0"+e;else return e}t.zero2=zero2;function zero8(e){if(e.length===7)return"0"+e;else if(e.length===6)return"00"+e;else if(e.length===5)return"000"+e;else if(e.length===4)return"0000"+e;else if(e.length===3)return"00000"+e;else if(e.length===2)return"000000"+e;else if(e.length===1)return"0000000"+e;else return e}t.zero8=zero8;function join32(e,t,r,n){var a=r-t;i(a%4===0);var f=new Array(a/4);for(var o=0,d=t;o<f.length;o++,d+=4){var s;if(n==="big")s=e[d]<<24|e[d+1]<<16|e[d+2]<<8|e[d+3];else s=e[d+3]<<24|e[d+2]<<16|e[d+1]<<8|e[d];f[o]=s>>>0}return f}t.join32=join32;function split32(e,t){var r=new Array(e.length*4);for(var i=0,n=0;i<e.length;i++,n+=4){var a=e[i];if(t==="big"){r[n]=a>>>24;r[n+1]=a>>>16&255;r[n+2]=a>>>8&255;r[n+3]=a&255}else{r[n+3]=a>>>24;r[n+2]=a>>>16&255;r[n+1]=a>>>8&255;r[n]=a&255}}return r}t.split32=split32;function rotr32(e,t){return e>>>t|e<<32-t}t.rotr32=rotr32;function rotl32(e,t){return e<<t|e>>>32-t}t.rotl32=rotl32;function sum32(e,t){return e+t>>>0}t.sum32=sum32;function sum32_3(e,t,r){return e+t+r>>>0}t.sum32_3=sum32_3;function sum32_4(e,t,r,i){return e+t+r+i>>>0}t.sum32_4=sum32_4;function sum32_5(e,t,r,i,n){return e+t+r+i+n>>>0}t.sum32_5=sum32_5;function sum64(e,t,r,i){var n=e[t];var a=e[t+1];var f=i+a>>>0;var o=(f<i?1:0)+r+n;e[t]=o>>>0;e[t+1]=f}t.sum64=sum64;function sum64_hi(e,t,r,i){var n=t+i>>>0;var a=(n<t?1:0)+e+r;return a>>>0}t.sum64_hi=sum64_hi;function sum64_lo(e,t,r,i){var n=t+i;return n>>>0}t.sum64_lo=sum64_lo;function sum64_4_hi(e,t,r,i,n,a,f,o){var d=0;var s=t;s=s+i>>>0;d+=s<t?1:0;s=s+a>>>0;d+=s<a?1:0;s=s+o>>>0;d+=s<o?1:0;var u=e+r+n+f+d;return u>>>0}t.sum64_4_hi=sum64_4_hi;function sum64_4_lo(e,t,r,i,n,a,f,o){var d=t+i+a+o;return d>>>0}t.sum64_4_lo=sum64_4_lo;function sum64_5_hi(e,t,r,i,n,a,f,o,d,s){var u=0;var h=t;h=h+i>>>0;u+=h<t?1:0;h=h+a>>>0;u+=h<a?1:0;h=h+o>>>0;u+=h<o?1:0;h=h+s>>>0;u+=h<s?1:0;var c=e+r+n+f+d+u;return c>>>0}t.sum64_5_hi=sum64_5_hi;function sum64_5_lo(e,t,r,i,n,a,f,o,d,s){var u=t+i+a+o+s;return u>>>0}t.sum64_5_lo=sum64_5_lo;function rotr64_hi(e,t,r){var i=t<<32-r|e>>>r;return i>>>0}t.rotr64_hi=rotr64_hi;function rotr64_lo(e,t,r){var i=e<<32-r|t>>>r;return i>>>0}t.rotr64_lo=rotr64_lo;function shr64_hi(e,t,r){return e>>>r}t.shr64_hi=shr64_hi;function shr64_lo(e,t,r){var i=e<<32-r|t>>>r;return i>>>0}t.shr64_lo=shr64_lo},566:(e,t,r)=>{"use strict";var i=r(5582);var n=r(8157);var a=r(6787);function HmacDRBG(e){if(!(this instanceof HmacDRBG))return new HmacDRBG(e);this.hash=e.hash;this.predResist=!!e.predResist;this.outLen=this.hash.outSize;this.minEntropy=e.minEntropy||this.hash.hmacStrength;this._reseed=null;this.reseedInterval=null;this.K=null;this.V=null;var t=n.toArray(e.entropy,e.entropyEnc||"hex");var r=n.toArray(e.nonce,e.nonceEnc||"hex");var i=n.toArray(e.pers,e.persEnc||"hex");a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits");this._init(t,r,i)}e.exports=HmacDRBG;HmacDRBG.prototype._init=function init(e,t,r){var i=e.concat(t).concat(r);this.K=new Array(this.outLen/8);this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++){this.K[n]=0;this.V[n]=1}this._update(i);this._reseed=1;this.reseedInterval=281474976710656};HmacDRBG.prototype._hmac=function hmac(){return new i.hmac(this.hash,this.K)};HmacDRBG.prototype._update=function update(e){var t=this._hmac().update(this.V).update([0]);if(e)t=t.update(e);this.K=t.digest();this.V=this._hmac().update(this.V).digest();if(!e)return;this.K=this._hmac().update(this.V).update([1]).update(e).digest();this.V=this._hmac().update(this.V).digest()};HmacDRBG.prototype.reseed=function reseed(e,t,r,i){if(typeof t!=="string"){i=r;r=t;t=null}e=n.toArray(e,t);r=n.toArray(r,i);a(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits");this._update(e.concat(r||[]));this._reseed=1};HmacDRBG.prototype.generate=function generate(e,t,r,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");if(typeof t!=="string"){i=r;r=t;t=null}if(r){r=n.toArray(r,i||"hex");this._update(r)}var a=[];while(a.length<e){this.V=this._hmac().update(this.V).digest();a=a.concat(this.V)}var f=a.slice(0,e);this._update(r);this._reseed++;return n.encode(f,t)}},2989:(e,t,r)=>{try{var i=r(1669);if(typeof i.inherits!=="function")throw"";e.exports=i.inherits}catch(t){e.exports=r(7350)}},7350:e=>{if(typeof Object.create==="function"){e.exports=function inherits(e,t){if(t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{e.exports=function inherits(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype;e.prototype=new r;e.prototype.constructor=e}}}},8575:(e,t,r)=>{"use strict";var i=r(2989);var n=r(9086);var a=r(9615).Buffer;var f=new Array(16);function MD5(){n.call(this,64);this._a=1732584193;this._b=4023233417;this._c=2562383102;this._d=271733878}i(MD5,n);MD5.prototype._update=function(){var e=f;for(var t=0;t<16;++t)e[t]=this._block.readInt32LE(t*4);var r=this._a;var i=this._b;var n=this._c;var a=this._d;r=fnF(r,i,n,a,e[0],3614090360,7);a=fnF(a,r,i,n,e[1],3905402710,12);n=fnF(n,a,r,i,e[2],606105819,17);i=fnF(i,n,a,r,e[3],3250441966,22);r=fnF(r,i,n,a,e[4],4118548399,7);a=fnF(a,r,i,n,e[5],1200080426,12);n=fnF(n,a,r,i,e[6],2821735955,17);i=fnF(i,n,a,r,e[7],4249261313,22);r=fnF(r,i,n,a,e[8],1770035416,7);a=fnF(a,r,i,n,e[9],2336552879,12);n=fnF(n,a,r,i,e[10],4294925233,17);i=fnF(i,n,a,r,e[11],2304563134,22);r=fnF(r,i,n,a,e[12],1804603682,7);a=fnF(a,r,i,n,e[13],4254626195,12);n=fnF(n,a,r,i,e[14],2792965006,17);i=fnF(i,n,a,r,e[15],1236535329,22);r=fnG(r,i,n,a,e[1],4129170786,5);a=fnG(a,r,i,n,e[6],3225465664,9);n=fnG(n,a,r,i,e[11],643717713,14);i=fnG(i,n,a,r,e[0],3921069994,20);r=fnG(r,i,n,a,e[5],3593408605,5);a=fnG(a,r,i,n,e[10],38016083,9);n=fnG(n,a,r,i,e[15],3634488961,14);i=fnG(i,n,a,r,e[4],3889429448,20);r=fnG(r,i,n,a,e[9],568446438,5);a=fnG(a,r,i,n,e[14],3275163606,9);n=fnG(n,a,r,i,e[3],4107603335,14);i=fnG(i,n,a,r,e[8],1163531501,20);r=fnG(r,i,n,a,e[13],2850285829,5);a=fnG(a,r,i,n,e[2],4243563512,9);n=fnG(n,a,r,i,e[7],1735328473,14);i=fnG(i,n,a,r,e[12],2368359562,20);r=fnH(r,i,n,a,e[5],4294588738,4);a=fnH(a,r,i,n,e[8],2272392833,11);n=fnH(n,a,r,i,e[11],1839030562,16);i=fnH(i,n,a,r,e[14],4259657740,23);r=fnH(r,i,n,a,e[1],2763975236,4);a=fnH(a,r,i,n,e[4],1272893353,11);n=fnH(n,a,r,i,e[7],4139469664,16);i=fnH(i,n,a,r,e[10],3200236656,23);r=fnH(r,i,n,a,e[13],681279174,4);a=fnH(a,r,i,n,e[0],3936430074,11);n=fnH(n,a,r,i,e[3],3572445317,16);i=fnH(i,n,a,r,e[6],76029189,23);r=fnH(r,i,n,a,e[9],3654602809,4);a=fnH(a,r,i,n,e[12],3873151461,11);n=fnH(n,a,r,i,e[15],530742520,16);i=fnH(i,n,a,r,e[2],3299628645,23);r=fnI(r,i,n,a,e[0],4096336452,6);a=fnI(a,r,i,n,e[7],1126891415,10);n=fnI(n,a,r,i,e[14],2878612391,15);i=fnI(i,n,a,r,e[5],4237533241,21);r=fnI(r,i,n,a,e[12],1700485571,6);a=fnI(a,r,i,n,e[3],2399980690,10);n=fnI(n,a,r,i,e[10],4293915773,15);i=fnI(i,n,a,r,e[1],2240044497,21);r=fnI(r,i,n,a,e[8],1873313359,6);a=fnI(a,r,i,n,e[15],4264355552,10);n=fnI(n,a,r,i,e[6],2734768916,15);i=fnI(i,n,a,r,e[13],1309151649,21);r=fnI(r,i,n,a,e[4],4149444226,6);a=fnI(a,r,i,n,e[11],3174756917,10);n=fnI(n,a,r,i,e[2],718787259,15);i=fnI(i,n,a,r,e[9],3951481745,21);this._a=this._a+r|0;this._b=this._b+i|0;this._c=this._c+n|0;this._d=this._d+a|0};MD5.prototype._digest=function(){this._block[this._blockOffset++]=128;if(this._blockOffset>56){this._block.fill(0,this._blockOffset,64);this._update();this._blockOffset=0}this._block.fill(0,this._blockOffset,56);this._block.writeUInt32LE(this._length[0],56);this._block.writeUInt32LE(this._length[1],60);this._update();var e=a.allocUnsafe(16);e.writeInt32LE(this._a,0);e.writeInt32LE(this._b,4);e.writeInt32LE(this._c,8);e.writeInt32LE(this._d,12);return e};function rotl(e,t){return e<<t|e>>>32-t}function fnF(e,t,r,i,n,a,f){return rotl(e+(t&r|~t&i)+n+a|0,f)+t|0}function fnG(e,t,r,i,n,a,f){return rotl(e+(t&i|r&~i)+n+a|0,f)+t|0}function fnH(e,t,r,i,n,a,f){return rotl(e+(t^r^i)+n+a|0,f)+t|0}function fnI(e,t,r,i,n,a,f){return rotl(e+(r^(t|~i))+n+a|0,f)+t|0}e.exports=MD5},6787:e=>{e.exports=assert;function assert(e,t){if(!e)throw new Error(t||"Assertion failed")}assert.equal=function assertEqual(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},8157:(e,t)=>{"use strict";var r=t;function toArray(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(typeof e!=="string"){for(var i=0;i<e.length;i++)r[i]=e[i]|0;return r}if(t==="hex"){e=e.replace(/[^a-z0-9]+/gi,"");if(e.length%2!==0)e="0"+e;for(var i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else{for(var i=0;i<e.length;i++){var n=e.charCodeAt(i);var a=n>>8;var f=n&255;if(a)r.push(a,f);else r.push(f)}}return r}r.toArray=toArray;function zero2(e){if(e.length===1)return"0"+e;else return e}r.zero2=zero2;function toHex(e){var t="";for(var r=0;r<e.length;r++)t+=zero2(e[r].toString(16));return t}r.toHex=toHex;r.encode=function encode(e,t){if(t==="hex")return toHex(e);else return e}},9750:(e,t,r)=>{"use strict";var i=r(1363);t.certificate=r(2648);var n=i.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())});t.RSAPrivateKey=n;var a=i.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});t.RSAPublicKey=a;var f=i.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())});t.PublicKey=f;var o=i.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())});var d=i.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(o),this.key("subjectPrivateKey").octstr())});t.PrivateKey=d;var s=i.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});t.EncryptedPrivateKey=s;var u=i.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});t.DSAPrivateKey=u;t.DSAparam=i.define("DSAparam",function(){this.int()});var h=i.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(c),this.key("publicKey").optional().explicit(1).bitstr())});t.ECPrivateKey=h;var c=i.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});t.signature=i.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},2648:(e,t,r)=>{"use strict";var i=r(1363);var n=i.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})});var a=i.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())});var f=i.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())});var o=i.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(f),this.key("subjectPublicKey").bitstr())});var d=i.define("RelativeDistinguishedName",function(){this.setof(a)});var s=i.define("RDNSequence",function(){this.seqof(d)});var u=i.define("Name",function(){this.choice({rdnSequence:this.use(s)})});var h=i.define("Validity",function(){this.seq().obj(this.key("notBefore").use(n),this.key("notAfter").use(n))});var c=i.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(false),this.key("extnValue").octstr())});var l=i.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(f),this.key("issuer").use(u),this.key("validity").use(h),this.key("subject").use(u),this.key("subjectPublicKeyInfo").use(o),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(c).optional())});var b=i.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(l),this.key("signatureAlgorithm").use(f),this.key("signatureValue").bitstr())});e.exports=b},5831:(e,t,r)=>{var i=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r\+\/\=]+)[\n\r]+/m;var n=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m;var a=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r\+\/\=]+)-----END \1-----$/m;var f=r(9727);var o=r(8855);var d=r(9615).Buffer;e.exports=function(e,t){var r=e.toString();var s=r.match(i);var u;if(!s){var h=r.match(a);u=new d(h[2].replace(/[\r\n]/g,""),"base64")}else{var c="aes"+s[1];var l=d.from(s[2],"hex");var b=d.from(s[3].replace(/[\r\n]/g,""),"base64");var v=f(t,l.slice(0,8),parseInt(s[1],10)).key;var p=[];var m=o.createDecipheriv(c,v,l);p.push(m.update(b));p.push(m.final());u=d.concat(p)}var g=r.match(n)[1];return{tag:g,data:u}}},6885:(e,t,r)=>{var i=r(9750);var n=r(5424);var a=r(5831);var f=r(8855);var o=r(800);var d=r(9615).Buffer;e.exports=parseKeys;function parseKeys(e){var t;if(typeof e==="object"&&!d.isBuffer(e)){t=e.passphrase;e=e.key}if(typeof e==="string"){e=d.from(e)}var r=a(e,t);var n=r.tag;var f=r.data;var o,s;switch(n){case"CERTIFICATE":s=i.certificate.decode(f,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":if(!s){s=i.PublicKey.decode(f,"der")}o=s.algorithm.algorithm.join(".");switch(o){case"1.2.840.113549.1.1.1":return i.RSAPublicKey.decode(s.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":s.subjectPrivateKey=s.subjectPublicKey;return{type:"ec",data:s};case"1.2.840.10040.4.1":s.algorithm.params.pub_key=i.DSAparam.decode(s.subjectPublicKey.data,"der");return{type:"dsa",data:s.algorithm.params};default:throw new Error("unknown key id "+o)}throw new Error("unknown key type "+n);case"ENCRYPTED PRIVATE KEY":f=i.EncryptedPrivateKey.decode(f,"der");f=decrypt(f,t);case"PRIVATE KEY":s=i.PrivateKey.decode(f,"der");o=s.algorithm.algorithm.join(".");switch(o){case"1.2.840.113549.1.1.1":return i.RSAPrivateKey.decode(s.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:s.algorithm.curve,privateKey:i.ECPrivateKey.decode(s.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":s.algorithm.params.priv_key=i.DSAparam.decode(s.subjectPrivateKey,"der");return{type:"dsa",params:s.algorithm.params};default:throw new Error("unknown key id "+o)}throw new Error("unknown key type "+n);case"RSA PUBLIC KEY":return i.RSAPublicKey.decode(f,"der");case"RSA PRIVATE KEY":return i.RSAPrivateKey.decode(f,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:i.DSAPrivateKey.decode(f,"der")};case"EC PRIVATE KEY":f=i.ECPrivateKey.decode(f,"der");return{curve:f.parameters.value,privateKey:f.privateKey};default:throw new Error("unknown key type "+n)}}parseKeys.signature=i.signature;function decrypt(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt;var i=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10);var a=n[e.algorithm.decrypt.cipher.algo.join(".")];var s=e.algorithm.decrypt.cipher.iv;var u=e.subjectPrivateKey;var h=parseInt(a.split("-")[1],10)/8;var c=o.pbkdf2Sync(t,r,i,h,"sha1");var l=f.createDecipheriv(a,c,s);var b=[];b.push(l.update(u));b.push(l.final());return d.concat(b)}},800:(e,t,r)=>{var i=r(6417);var n=r(9725);var a=r(7713);var f=r(3005);function nativePBKDF2(e,t,r,o,d,s){n(r,o);e=f(e,a,"Password");t=f(t,a,"Salt");if(typeof d==="function"){s=d;d="sha1"}if(typeof s!=="function")throw new Error("No callback provided to pbkdf2");return i.pbkdf2(e,t,r,o,d,s)}function nativePBKDF2Sync(e,t,r,o,d){n(r,o);e=f(e,a,"Password");t=f(t,a,"Salt");d=d||"sha1";return i.pbkdf2Sync(e,t,r,o,d)}if(!i.pbkdf2Sync||i.pbkdf2Sync.toString().indexOf("keylen, digest")===-1){t.pbkdf2Sync=r(2602);t.pbkdf2=r(9055)}else{t.pbkdf2Sync=nativePBKDF2Sync;t.pbkdf2=nativePBKDF2}},9055:(e,t,r)=>{var i=r(9615).Buffer;var n=r(9725);var a=r(7713);var f=r(2602);var o=r(3005);var d;var s=global.crypto&&global.crypto.subtle;var u={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"};var h=[];function checkNative(e){if(global.process&&!global.process.browser){return Promise.resolve(false)}if(!s||!s.importKey||!s.deriveBits){return Promise.resolve(false)}if(h[e]!==undefined){return h[e]}d=d||i.alloc(8);var t=browserPbkdf2(d,d,10,128,e).then(function(){return true}).catch(function(){return false});h[e]=t;return t}function browserPbkdf2(e,t,r,n,a){return s.importKey("raw",e,{name:"PBKDF2"},false,["deriveBits"]).then(function(e){return s.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:a}},e,n<<3)}).then(function(e){return i.from(e)})}function resolvePromise(e,t){e.then(function(e){process.nextTick(function(){t(null,e)})},function(e){process.nextTick(function(){t(e)})})}e.exports=function(e,t,r,i,d,s){if(typeof d==="function"){s=d;d=undefined}d=d||"sha1";var h=u[d.toLowerCase()];if(!h||typeof global.Promise!=="function"){return process.nextTick(function(){var n;try{n=f(e,t,r,i,d)}catch(e){return s(e)}s(null,n)})}n(r,i);e=o(e,a,"Password");t=o(t,a,"Salt");if(typeof s!=="function")throw new Error("No callback provided to pbkdf2");resolvePromise(checkNative(h).then(function(n){if(n)return browserPbkdf2(e,t,r,i,h);return f(e,t,r,i,d)}),s)}},7713:e=>{var t;if(process.browser){t="utf-8"}else if(process.version){var r=parseInt(process.version.split(".")[0].slice(1),10);t=r>=6?"utf-8":"binary"}else{t="utf-8"}e.exports=t},9725:e=>{var t=Math.pow(2,30)-1;e.exports=function(e,r){if(typeof e!=="number"){throw new TypeError("Iterations not a number")}if(e<0){throw new TypeError("Bad iterations")}if(typeof r!=="number"){throw new TypeError("Key length not a number")}if(r<0||r>t||r!==r){throw new TypeError("Bad key length")}}},2602:(e,t,r)=>{var i={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};var n=r(9871);var a=r(9615).Buffer;var f=r(9725);var o=r(7713);var d=r(3005);function pbkdf2(e,t,r,s,u){f(r,s);e=d(e,o,"Password");t=d(t,o,"Salt");u=u||"sha1";var h=a.allocUnsafe(s);var c=a.allocUnsafe(t.length+4);t.copy(c,0,0,t.length);var l=0;var b=i[u];var v=Math.ceil(s/b);for(var p=1;p<=v;p++){c.writeUInt32BE(p,t.length);var m=n(u,e).update(c).digest();var g=m;for(var y=1;y<r;y++){g=n(u,e).update(g).digest();for(var w=0;w<b;w++)m[w]^=g[w]}m.copy(h,l);l+=b}return h}e.exports=pbkdf2},3005:(e,t,r)=>{var i=r(9615).Buffer;e.exports=function(e,t,r){if(i.isBuffer(e)){return e}else if(typeof e==="string"){return i.from(e,t)}else if(ArrayBuffer.isView(e)){return i.from(e.buffer)}else{throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}}},3463:(e,t,r)=>{t.publicEncrypt=r(8944);t.privateDecrypt=r(8070);t.privateEncrypt=function privateEncrypt(e,r){return t.publicEncrypt(e,r,true)};t.publicDecrypt=function publicDecrypt(e,r){return t.privateDecrypt(e,r,true)}},232:(e,t,r)=>{var i=r(6417);if(typeof i.publicEncrypt!=="function"){i=r(3463)}t.publicEncrypt=i.publicEncrypt;t.privateDecrypt=i.privateDecrypt;if(typeof i.privateEncrypt!=="function"){t.privateEncrypt=r(3463).privateEncrypt}else{t.privateEncrypt=i.privateEncrypt}if(typeof i.publicDecrypt!=="function"){t.publicDecrypt=r(3463).publicDecrypt}else{t.publicDecrypt=i.publicDecrypt}},2224:(e,t,r)=>{var i=r(356);var n=r(9615).Buffer;e.exports=function(e,t){var r=n.alloc(0);var a=0;var f;while(r.length<t){f=i2ops(a++);r=n.concat([r,i("sha1").update(e).update(f).digest()])}return r.slice(0,t)};function i2ops(e){var t=n.allocUnsafe(4);t.writeUInt32BE(e,0);return t}},8070:(e,t,r)=>{var i=r(6885);var n=r(2224);var a=r(8075);var f=r(2828);var o=r(4326);var d=r(356);var s=r(8920);var u=r(9615).Buffer;e.exports=function privateDecrypt(e,t,r){var n;if(e.padding){n=e.padding}else if(r){n=1}else{n=4}var a=i(e);var d=a.modulus.byteLength();if(t.length>d||new f(t).cmp(a.modulus)>=0){throw new Error("decryption error")}var h;if(r){h=s(new f(t),a)}else{h=o(t,a)}var c=u.alloc(d-h.length);h=u.concat([c,h],d);if(n===4){return oaep(a,h)}else if(n===1){return pkcs1(a,h,r)}else if(n===3){return h}else{throw new Error("unknown padding")}};function oaep(e,t){var r=e.modulus.byteLength();var i=d("sha1").update(u.alloc(0)).digest();var f=i.length;if(t[0]!==0){throw new Error("decryption error")}var o=t.slice(1,f+1);var s=t.slice(f+1);var h=a(o,n(s,f));var c=a(s,n(h,r-f-1));if(compare(i,c.slice(0,f))){throw new Error("decryption error")}var l=f;while(c[l]===0){l++}if(c[l++]!==1){throw new Error("decryption error")}return c.slice(l)}function pkcs1(e,t,r){var i=t.slice(0,2);var n=2;var a=0;while(t[n++]!==0){if(n>=t.length){a++;break}}var f=t.slice(2,n-1);if(i.toString("hex")!=="0002"&&!r||i.toString("hex")!=="0001"&&r){a++}if(f.length<8){a++}if(a){throw new Error("decryption error")}return t.slice(n)}function compare(e,t){e=u.from(e);t=u.from(t);var r=0;var i=e.length;if(e.length!==t.length){r++;i=Math.min(e.length,t.length)}var n=-1;while(++n<i){r+=e[n]^t[n]}return r}},8944:(e,t,r)=>{var i=r(6885);var n=r(9822);var a=r(356);var f=r(2224);var o=r(8075);var d=r(2828);var s=r(8920);var u=r(4326);var h=r(9615).Buffer;e.exports=function publicEncrypt(e,t,r){var n;if(e.padding){n=e.padding}else if(r){n=1}else{n=4}var a=i(e);var f;if(n===4){f=oaep(a,t)}else if(n===1){f=pkcs1(a,t,r)}else if(n===3){f=new d(t);if(f.cmp(a.modulus)>=0){throw new Error("data too long for modulus")}}else{throw new Error("unknown padding")}if(r){return u(f,a)}else{return s(f,a)}};function oaep(e,t){var r=e.modulus.byteLength();var i=t.length;var s=a("sha1").update(h.alloc(0)).digest();var u=s.length;var c=2*u;if(i>r-c-2){throw new Error("message too long")}var l=h.alloc(r-i-c-2);var b=r-u-1;var v=n(u);var p=o(h.concat([s,l,h.alloc(1,1),t],b),f(v,b));var m=o(v,f(p,u));return new d(h.concat([h.alloc(1),m,p],r))}function pkcs1(e,t,r){var i=t.length;var n=e.modulus.byteLength();if(i>n-11){throw new Error("message too long")}var a;if(r){a=h.alloc(n-i-3,255)}else{a=nonZero(n-i-3)}return new d(h.concat([h.from([0,r?1:2]),a,h.alloc(1),t],n))}function nonZero(e){var t=h.allocUnsafe(e);var r=0;var i=n(e*2);var a=0;var f;while(r<e){if(a===i.length){i=n(e*2);a=0}f=i[a++];if(f){t[r++]=f}}return t}},8920:(e,t,r)=>{var i=r(2828);var n=r(9615).Buffer;function withPublic(e,t){return n.from(e.toRed(i.mont(t.modulus)).redPow(new i(t.publicExponent)).fromRed().toArray())}e.exports=withPublic},8075:e=>{e.exports=function xor(e,t){var r=e.length;var i=-1;while(++i<r){e[i]^=t[i]}return e}},9822:(e,t,r)=>{e.exports=r(6417).randomBytes},4953:(e,t,r)=>{"use strict";function oldBrowser(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var i=r(9615);var n=r(9822);var a=i.Buffer;var f=i.kMaxLength;var o=global.crypto||global.msCrypto;var d=Math.pow(2,32)-1;function assertOffset(e,t){if(typeof e!=="number"||e!==e){throw new TypeError("offset must be a number")}if(e>d||e<0){throw new TypeError("offset must be a uint32")}if(e>f||e>t){throw new RangeError("offset out of range")}}function assertSize(e,t,r){if(typeof e!=="number"||e!==e){throw new TypeError("size must be a number")}if(e>d||e<0){throw new TypeError("size must be a uint32")}if(e+t>r||e>f){throw new RangeError("buffer too small")}}if(o&&o.getRandomValues||!process.browser){t.randomFill=randomFill;t.randomFillSync=randomFillSync}else{t.randomFill=oldBrowser;t.randomFillSync=oldBrowser}function randomFill(e,t,r,i){if(!a.isBuffer(e)&&!(e instanceof global.Uint8Array)){throw new TypeError('"buf" argument must be a Buffer or Uint8Array')}if(typeof t==="function"){i=t;t=0;r=e.length}else if(typeof r==="function"){i=r;r=e.length-t}else if(typeof i!=="function"){throw new TypeError('"cb" argument must be a function')}assertOffset(t,e.length);assertSize(r,t,e.length);return actualFill(e,t,r,i)}function actualFill(e,t,r,i){if(process.browser){var a=e.buffer;var f=new Uint8Array(a,t,r);o.getRandomValues(f);if(i){process.nextTick(function(){i(null,e)});return}return e}if(i){n(r,function(r,n){if(r){return i(r)}n.copy(e,t);i(null,e)});return}var d=n(r);d.copy(e,t);return e}function randomFillSync(e,t,r){if(typeof t==="undefined"){t=0}if(!a.isBuffer(e)&&!(e instanceof global.Uint8Array)){throw new TypeError('"buf" argument must be a Buffer or Uint8Array')}assertOffset(t,e.length);if(r===undefined)r=e.length-t;assertSize(r,t,e.length);return actualFill(e,t,r)}},4859:(e,t,r)=>{var i=r(6417);if(typeof i.randomFill==="function"&&typeof i.randomFillSync==="function"){t.randomFill=i.randomFill;t.randomFillSync=i.randomFillSync}else{e.exports=r(4953)}},9615:(e,t,r)=>{var i=r(4293);var n=i.Buffer;function copyProps(e,t){for(var r in e){t[r]=e[r]}}if(n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow){e.exports=i}else{copyProps(i,t);t.Buffer=SafeBuffer}function SafeBuffer(e,t,r){return n(e,t,r)}SafeBuffer.prototype=Object.create(n.prototype);copyProps(n,SafeBuffer);SafeBuffer.from=function(e,t,r){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return n(e,t,r)};SafeBuffer.alloc=function(e,t,r){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var i=n(e);if(t!==undefined){if(typeof r==="string"){i.fill(t,r)}else{i.fill(t)}}else{i.fill(0)}return i};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return n(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return i.SlowBuffer(e)}},937:(e,t,r)=>{"use strict";var i=r(9615).Buffer;var n=i.isEncoding||function(e){e=""+e;switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return true;default:return false}};function _normalizeEncoding(e){if(!e)return"utf8";var t;while(true){switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase();t=true}}}function normalizeEncoding(e){var t=_normalizeEncoding(e);if(typeof t!=="string"&&(i.isEncoding===n||!n(e)))throw new Error("Unknown encoding: "+e);return t||e}t.s=StringDecoder;function StringDecoder(e){this.encoding=normalizeEncoding(e);var t;switch(this.encoding){case"utf16le":this.text=utf16Text;this.end=utf16End;t=4;break;case"utf8":this.fillLast=utf8FillLast;t=4;break;case"base64":this.text=base64Text;this.end=base64End;t=3;break;default:this.write=simpleWrite;this.end=simpleEnd;return}this.lastNeed=0;this.lastTotal=0;this.lastChar=i.allocUnsafe(t)}StringDecoder.prototype.write=function(e){if(e.length===0)return"";var t;var r;if(this.lastNeed){t=this.fillLast(e);if(t===undefined)return"";r=this.lastNeed;this.lastNeed=0}else{r=0}if(r<e.length)return t?t+this.text(e,r):this.text(e,r);return t||""};StringDecoder.prototype.end=utf8End;StringDecoder.prototype.text=utf8Text;StringDecoder.prototype.fillLast=function(e){if(this.lastNeed<=e.length){e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length);this.lastNeed-=e.length};function utf8CheckByte(e){if(e<=127)return 0;else if(e>>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function utf8CheckIncomplete(e,t,r){var i=t.length-1;if(i<r)return 0;var n=utf8CheckByte(t[i]);if(n>=0){if(n>0)e.lastNeed=n-1;return n}if(--i<r||n===-2)return 0;n=utf8CheckByte(t[i]);if(n>=0){if(n>0)e.lastNeed=n-2;return n}if(--i<r||n===-2)return 0;n=utf8CheckByte(t[i]);if(n>=0){if(n>0){if(n===2)n=0;else e.lastNeed=n-3}return n}return 0}function utf8CheckExtraBytes(e,t,r){if((t[0]&192)!==128){e.lastNeed=0;return"<22>"}if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128){e.lastNeed=1;return"<22>"}if(e.lastNeed>2&&t.length>2){if((t[2]&192)!==128){e.lastNeed=2;return"<22>"}}}}function utf8FillLast(e){var t=this.lastTotal-this.lastNeed;var r=utf8CheckExtraBytes(this,e,t);if(r!==undefined)return r;if(this.lastNeed<=e.length){e.copy(this.lastChar,t,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,t,0,e.length);this.lastNeed-=e.length}function utf8Text(e,t){var r=utf8CheckIncomplete(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);e.copy(this.lastChar,0,i);return e.toString("utf8",t,i)}function utf8End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+"<22>";return t}function utf16Text(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1];return r.slice(0,-1)}}return r}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=e[e.length-1];return e.toString("utf16le",t,e.length-1)}function utf16End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function base64Text(e,t){var r=(e.length-t)%3;if(r===0)return e.toString("base64",t);this.lastNeed=3-r;this.lastTotal=3;if(r===1){this.lastChar[0]=e[e.length-1]}else{this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1]}return e.toString("base64",t,e.length-r)}function base64End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+this.lastChar.toString("base64",0,3-this.lastNeed);return t}function simpleWrite(e){return e.toString(this.encoding)}function simpleEnd(e){return e&&e.length?this.write(e):""}},2262:(e,t,r)=>{e.exports=r(1669).deprecate},4293:e=>{"use strict";e.exports=require("buffer")},6417:e=>{"use strict";e.exports=require("crypto")},8614:e=>{"use strict";e.exports=require("events")},2413:e=>{"use strict";e.exports=require("stream")},1669:e=>{"use strict";e.exports=require("util")},2184:e=>{"use strict";e.exports=require("vm")}};var t={};function __nccwpck_require__(r){if(t[r]){return t[r].exports}var i=t[r]={id:r,loaded:false,exports:{}};var n=true;try{e[r].call(i.exports,i,i.exports,__nccwpck_require__);n=false}finally{if(n)delete t[r]}i.loaded=true;return i.exports}(()=>{__nccwpck_require__.nmd=(e=>{e.paths=[];if(!e.children)e.children=[];return e})})();__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(1223)})();