-
Notifications
You must be signed in to change notification settings - Fork 0
/
bundle.js
1 lines (1 loc) · 907 KB
/
bundle.js
1
(function(e){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=e()}else if(typeof define==="function"&&define.amd){define([],e)}else{var r;if(typeof window!=="undefined"){r=window}else if(typeof global!=="undefined"){r=global}else if(typeof self!=="undefined"){r=self}else{r=this}r.ethgen=e()}})(function(){var X,e,r;return function(){function f(o,a,s){function u(t,e){if(!a[t]){if(!o[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(c)return c(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var i=a[t]={exports:{}};o[t][0].call(i.exports,function(e){var r=o[t][1][e];return u(r||e)},i,i.exports,f,o,a,s)}return a[t].exports}for(var c="function"==typeof require&&require,e=0;e<s.length;e++)u(s[e]);return u}return f}()({1:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="abi/5.5.0"},{}],2:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.defaultAbiCoder=t.AbiCoder=void 0;var a=e("@ethersproject/bytes");var n=e("@ethersproject/properties");var s=e("@ethersproject/logger");var i=e("./_version");var u=new s.Logger(i.version);var o=e("./coders/abstract-coder");var c=e("./coders/address");var f=e("./coders/array");var l=e("./coders/boolean");var h=e("./coders/bytes");var d=e("./coders/fixed-bytes");var p=e("./coders/null");var v=e("./coders/number");var b=e("./coders/string");var g=e("./coders/tuple");var m=e("./fragments");var y=new RegExp(/^bytes([0-9]*)$/);var w=new RegExp(/^(u?int)([0-9]*)$/);var _=function(){function t(e){var r=this.constructor;u.checkNew(r,t);(0,n.defineReadOnly)(this,"coerceFunc",e||null)}t.prototype._getCoder=function(e){var r=this;switch(e.baseType){case"address":return new c.AddressCoder(e.name);case"bool":return new l.BooleanCoder(e.name);case"string":return new b.StringCoder(e.name);case"bytes":return new h.BytesCoder(e.name);case"array":return new f.ArrayCoder(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new g.TupleCoder((e.components||[]).map(function(e){return r._getCoder(e)}),e.name);case"":return new p.NullCoder(e.name)}var t=e.type.match(w);if(t){var n=parseInt(t[2]||"256");if(n===0||n>256||n%8!==0){u.throwArgumentError("invalid "+t[1]+" bit length","param",e)}return new v.NumberCoder(n/8,t[1]==="int",e.name)}t=e.type.match(y);if(t){var n=parseInt(t[1]);if(n===0||n>32){u.throwArgumentError("invalid bytes length","param",e)}return new d.FixedBytesCoder(n,e.name)}return u.throwArgumentError("invalid type","type",e.type)};t.prototype._getWordSize=function(){return 32};t.prototype._getReader=function(e,r){return new o.Reader(e,this._getWordSize(),this.coerceFunc,r)};t.prototype._getWriter=function(){return new o.Writer(this._getWordSize())};t.prototype.getDefaultValue=function(e){var r=this;var t=e.map(function(e){return r._getCoder(m.ParamType.from(e))});var n=new g.TupleCoder(t,"_");return n.defaultValue()};t.prototype.encode=function(e,r){var t=this;if(e.length!==r.length){u.throwError("types/values length mismatch",s.Logger.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}})}var n=e.map(function(e){return t._getCoder(m.ParamType.from(e))});var i=new g.TupleCoder(n,"_");var o=this._getWriter();i.encode(o,r);return o.data};t.prototype.decode=function(e,r,t){var n=this;var i=e.map(function(e){return n._getCoder(m.ParamType.from(e))});var o=new g.TupleCoder(i,"_");return o.decode(this._getReader((0,a.arrayify)(r),t))};return t}();t.AbiCoder=_;t.defaultAbiCoder=new _},{"./_version":1,"./coders/abstract-coder":3,"./coders/address":4,"./coders/array":6,"./coders/boolean":7,"./coders/bytes":8,"./coders/fixed-bytes":9,"./coders/null":10,"./coders/number":11,"./coders/string":12,"./coders/tuple":13,"./fragments":14,"@ethersproject/bytes":31,"@ethersproject/logger":55,"@ethersproject/properties":61}],3:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Reader=t.Writer=t.Coder=t.checkResultErrors=void 0;var i=e("@ethersproject/bytes");var n=e("@ethersproject/bignumber");var o=e("@ethersproject/properties");var a=e("@ethersproject/logger");var s=e("../_version");var u=new a.Logger(s.version);function c(e){var i=[];var o=function(e,r){if(!Array.isArray(r)){return}for(var t in r){var n=e.slice();n.push(t);try{o(n,r[t])}catch(e){i.push({path:n,error:e})}}};o([],e);return i}t.checkResultErrors=c;var f=function(){function e(e,r,t,n){this.name=e;this.type=r;this.localName=t;this.dynamic=n}e.prototype._throwError=function(e,r){u.throwArgumentError(e,this.localName,r)};return e}();t.Coder=f;var l=function(){function e(e){(0,o.defineReadOnly)(this,"wordSize",e||32);this._data=[];this._dataLength=0;this._padding=new Uint8Array(e)}Object.defineProperty(e.prototype,"data",{get:function(){return(0,i.hexConcat)(this._data)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"length",{get:function(){return this._dataLength},enumerable:false,configurable:true});e.prototype._writeData=function(e){this._data.push(e);this._dataLength+=e.length;return e.length};e.prototype.appendWriter=function(e){return this._writeData((0,i.concat)(e._data))};e.prototype.writeBytes=function(e){var r=(0,i.arrayify)(e);var t=r.length%this.wordSize;if(t){r=(0,i.concat)([r,this._padding.slice(t)])}return this._writeData(r)};e.prototype._getValue=function(e){var r=(0,i.arrayify)(n.BigNumber.from(e));if(r.length>this.wordSize){u.throwError("value out-of-bounds",a.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length})}if(r.length%this.wordSize){r=(0,i.concat)([this._padding.slice(r.length%this.wordSize),r])}return r};e.prototype.writeValue=function(e){return this._writeData(this._getValue(e))};e.prototype.writeUpdatableValue=function(){var r=this;var t=this._data.length;this._data.push(this._padding);this._dataLength+=this.wordSize;return function(e){r._data[t]=r._getValue(e)}};return e}();t.Writer=l;var h=function(){function t(e,r,t,n){(0,o.defineReadOnly)(this,"_data",(0,i.arrayify)(e));(0,o.defineReadOnly)(this,"wordSize",r||32);(0,o.defineReadOnly)(this,"_coerceFunc",t);(0,o.defineReadOnly)(this,"allowLoose",n);this._offset=0}Object.defineProperty(t.prototype,"data",{get:function(){return(0,i.hexlify)(this._data)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"consumed",{get:function(){return this._offset},enumerable:false,configurable:true});t.coerce=function(e,r){var t=e.match("^u?int([0-9]+)$");if(t&&parseInt(t[1])<=48){r=r.toNumber()}return r};t.prototype.coerce=function(e,r){if(this._coerceFunc){return this._coerceFunc(e,r)}return t.coerce(e,r)};t.prototype._peekBytes=function(e,r,t){var n=Math.ceil(r/this.wordSize)*this.wordSize;if(this._offset+n>this._data.length){if(this.allowLoose&&t&&this._offset+r<=this._data.length){n=r}else{u.throwError("data out-of-bounds",a.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})}}return this._data.slice(this._offset,this._offset+n)};t.prototype.subReader=function(e){return new t(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)};t.prototype.readBytes=function(e,r){var t=this._peekBytes(0,e,!!r);this._offset+=t.length;return t.slice(0,e)};t.prototype.readValue=function(){return n.BigNumber.from(this.readBytes(this.wordSize))};return t}();t.Reader=h},{"../_version":1,"@ethersproject/bignumber":29,"@ethersproject/bytes":31,"@ethersproject/logger":55,"@ethersproject/properties":61}],4:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(t,"__esModule",{value:true});t.AddressCoder=void 0;var i=e("@ethersproject/address");var o=e("@ethersproject/bytes");var a=e("./abstract-coder");var s=function(r){n(e,r);function e(e){return r.call(this,"address","address",e,false)||this}e.prototype.defaultValue=function(){return"0x0000000000000000000000000000000000000000"};e.prototype.encode=function(e,r){try{r=(0,i.getAddress)(r)}catch(e){this._throwError(e.message,r)}return e.writeValue(r)};e.prototype.decode=function(e){return(0,i.getAddress)((0,o.hexZeroPad)(e.readValue().toHexString(),20))};return e}(a.Coder);t.AddressCoder=s},{"./abstract-coder":3,"@ethersproject/address":22,"@ethersproject/bytes":31}],5:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(t,"__esModule",{value:true});t.AnonymousCoder=void 0;var i=e("./abstract-coder");var o=function(t){n(e,t);function e(e){var r=t.call(this,e.name,e.type,undefined,e.dynamic)||this;r.coder=e;return r}e.prototype.defaultValue=function(){return this.coder.defaultValue()};e.prototype.encode=function(e,r){return this.coder.encode(e,r)};e.prototype.decode=function(e){return this.coder.decode(e)};return e}(i.Coder);t.AnonymousCoder=o},{"./abstract-coder":3}],6:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(t,"__esModule",{value:true});t.ArrayCoder=t.unpack=t.pack=void 0;var c=e("@ethersproject/logger");var i=e("../_version");var f=new c.Logger(i.version);var l=e("./abstract-coder");var o=e("./anonymous");function s(e,r,t){var o=null;if(Array.isArray(t)){o=t}else if(t&&typeof t==="object"){var n={};o=r.map(function(e){var r=e.localName;if(!r){f.throwError("cannot encode object for signature with missing names",c.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:t})}if(n[r]){f.throwError("cannot encode object for signature with duplicate names",c.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:t})}n[r]=true;return t[r]})}else{f.throwArgumentError("invalid tuple value","tuple",t)}if(r.length!==o.length){f.throwArgumentError("types/value length mismatch","tuple",t)}var a=new l.Writer(e.wordSize);var s=new l.Writer(e.wordSize);var u=[];r.forEach(function(e,r){var t=o[r];if(e.dynamic){var n=s.length;e.encode(s,t);var i=a.writeUpdatableValue();u.push(function(e){i(e+n)})}else{e.encode(a,t)}});u.forEach(function(e){e(a.length)});var i=e.appendWriter(a);i+=e.appendWriter(s);return i}t.pack=s;function u(i,e){var o=[];var a=i.subReader(0);e.forEach(function(r){var t=null;if(r.dynamic){var e=i.readValue();var n=a.subReader(e.toNumber());try{t=r.decode(n)}catch(e){if(e.code===c.Logger.errors.BUFFER_OVERRUN){throw e}t=e;t.baseType=r.name;t.name=r.localName;t.type=r.type}}else{try{t=r.decode(i)}catch(e){if(e.code===c.Logger.errors.BUFFER_OVERRUN){throw e}t=e;t.baseType=r.name;t.name=r.localName;t.type=r.type}}if(t!=undefined){o.push(t)}});var s=e.reduce(function(e,r){var t=r.localName;if(t){if(!e[t]){e[t]=0}e[t]++}return e},{});e.forEach(function(e,r){var t=e.localName;if(!t||s[t]!==1){return}if(t==="length"){t="_length"}if(o[t]!=null){return}var n=o[r];if(n instanceof Error){Object.defineProperty(o,t,{enumerable:true,get:function(){throw n}})}else{o[t]=n}});var r=function(e){var r=o[e];if(r instanceof Error){Object.defineProperty(o,e,{enumerable:true,get:function(){throw r}})}};for(var t=0;t<o.length;t++){r(t)}return Object.freeze(o)}t.unpack=u;var a=function(a){n(e,a);function e(e,r,t){var n=this;var i=e.type+"["+(r>=0?r:"")+"]";var o=r===-1||e.dynamic;n=a.call(this,"array",i,t,o)||this;n.coder=e;n.length=r;return n}e.prototype.defaultValue=function(){var e=this.coder.defaultValue();var r=[];for(var t=0;t<this.length;t++){r.push(e)}return r};e.prototype.encode=function(e,r){if(!Array.isArray(r)){this._throwError("expected array value",r)}var t=this.length;if(t===-1){t=r.length;e.writeValue(r.length)}f.checkArgumentCount(r.length,t,"coder array"+(this.localName?" "+this.localName:""));var n=[];for(var i=0;i<r.length;i++){n.push(this.coder)}return s(e,n,r)};e.prototype.decode=function(e){var r=this.length;if(r===-1){r=e.readValue().toNumber();if(r*32>e._data.length){f.throwError("insufficient data length",c.Logger.errors.BUFFER_OVERRUN,{length:e._data.length,count:r})}}var t=[];for(var n=0;n<r;n++){t.push(new o.AnonymousCoder(this.coder))}return e.coerce(this.name,u(e,t))};return e}(l.Coder);t.ArrayCoder=a},{"../_version":1,"./abstract-coder":3,"./anonymous":5,"@ethersproject/logger":55}],7:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(t,"__esModule",{value:true});t.BooleanCoder=void 0;var i=e("./abstract-coder");var o=function(r){n(e,r);function e(e){return r.call(this,"bool","bool",e,false)||this}e.prototype.defaultValue=function(){return false};e.prototype.encode=function(e,r){return e.writeValue(r?1:0)};e.prototype.decode=function(e){return e.coerce(this.type,!e.readValue().isZero())};return e}(i.Coder);t.BooleanCoder=o},{"./abstract-coder":3}],8:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(t,"__esModule",{value:true});t.BytesCoder=t.DynamicBytesCoder=void 0;var i=e("@ethersproject/bytes");var o=e("./abstract-coder");var a=function(t){n(e,t);function e(e,r){return t.call(this,e,e,r,true)||this}e.prototype.defaultValue=function(){return"0x"};e.prototype.encode=function(e,r){r=(0,i.arrayify)(r);var t=e.writeValue(r.length);t+=e.writeBytes(r);return t};e.prototype.decode=function(e){return e.readBytes(e.readValue().toNumber(),true)};return e}(o.Coder);t.DynamicBytesCoder=a;var s=function(r){n(e,r);function e(e){return r.call(this,"bytes",e)||this}e.prototype.decode=function(e){return e.coerce(this.name,(0,i.hexlify)(r.prototype.decode.call(this,e)))};return e}(a);t.BytesCoder=s},{"./abstract-coder":3,"@ethersproject/bytes":31}],9:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(t,"__esModule",{value:true});t.FixedBytesCoder=void 0;var o=e("@ethersproject/bytes");var i=e("./abstract-coder");var a=function(i){n(e,i);function e(e,r){var t=this;var n="bytes"+String(e);t=i.call(this,n,n,r,false)||this;t.size=e;return t}e.prototype.defaultValue=function(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+this.size*2)};e.prototype.encode=function(e,r){var t=(0,o.arrayify)(r);if(t.length!==this.size){this._throwError("incorrect data length",r)}return e.writeBytes(t)};e.prototype.decode=function(e){return e.coerce(this.name,(0,o.hexlify)(e.readBytes(this.size)))};return e}(i.Coder);t.FixedBytesCoder=a},{"./abstract-coder":3,"@ethersproject/bytes":31}],10:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(t,"__esModule",{value:true});t.NullCoder=void 0;var i=e("./abstract-coder");var o=function(r){n(e,r);function e(e){return r.call(this,"null","",e,false)||this}e.prototype.defaultValue=function(){return null};e.prototype.encode=function(e,r){if(r!=null){this._throwError("not null",r)}return e.writeBytes([])};e.prototype.decode=function(e){e.readBytes(0);return e.coerce(this.name,null)};return e}(i.Coder);t.NullCoder=o},{"./abstract-coder":3}],11:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(t,"__esModule",{value:true});t.NumberCoder=void 0;var a=e("@ethersproject/bignumber");var s=e("@ethersproject/constants");var i=e("./abstract-coder");var o=function(o){n(e,o);function e(e,r,t){var n=this;var i=(r?"int":"uint")+e*8;n=o.call(this,i,i,t,false)||this;n.size=e;n.signed=r;return n}e.prototype.defaultValue=function(){return 0};e.prototype.encode=function(e,r){var t=a.BigNumber.from(r);var n=s.MaxUint256.mask(e.wordSize*8);if(this.signed){var i=n.mask(this.size*8-1);if(t.gt(i)||t.lt(i.add(s.One).mul(s.NegativeOne))){this._throwError("value out-of-bounds",r)}}else if(t.lt(s.Zero)||t.gt(n.mask(this.size*8))){this._throwError("value out-of-bounds",r)}t=t.toTwos(this.size*8).mask(this.size*8);if(this.signed){t=t.fromTwos(this.size*8).toTwos(8*e.wordSize)}return e.writeValue(t)};e.prototype.decode=function(e){var r=e.readValue().mask(this.size*8);if(this.signed){r=r.fromTwos(this.size*8)}return e.coerce(this.name,r)};return e}(i.Coder);t.NumberCoder=o},{"./abstract-coder":3,"@ethersproject/bignumber":29,"@ethersproject/constants":35}],12:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(t,"__esModule",{value:true});t.StringCoder=void 0;var i=e("@ethersproject/strings");var o=e("./bytes");var a=function(t){n(e,t);function e(e){return t.call(this,"string",e)||this}e.prototype.defaultValue=function(){return""};e.prototype.encode=function(e,r){return t.prototype.encode.call(this,e,(0,i.toUtf8Bytes)(r))};e.prototype.decode=function(e){return(0,i.toUtf8String)(t.prototype.decode.call(this,e))};return e}(o.DynamicBytesCoder);t.StringCoder=a},{"./bytes":8,"@ethersproject/strings":98}],13:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(t,"__esModule",{value:true});t.TupleCoder=void 0;var i=e("./abstract-coder");var o=e("./array");var a=function(a){n(e,a);function e(e,r){var t=this;var n=false;var i=[];e.forEach(function(e){if(e.dynamic){n=true}i.push(e.type)});var o="tuple("+i.join(",")+")";t=a.call(this,"tuple",o,r,n)||this;t.coders=e;return t}e.prototype.defaultValue=function(){var n=[];this.coders.forEach(function(e){n.push(e.defaultValue())});var i=this.coders.reduce(function(e,r){var t=r.localName;if(t){if(!e[t]){e[t]=0}e[t]++}return e},{});this.coders.forEach(function(e,r){var t=e.localName;if(!t||i[t]!==1){return}if(t==="length"){t="_length"}if(n[t]!=null){return}n[t]=n[r]});return Object.freeze(n)};e.prototype.encode=function(e,r){return(0,o.pack)(e,this.coders,r)};e.prototype.decode=function(e){return e.coerce(this.name,(0,o.unpack)(e,this.coders))};return e}(i.Coder);t.TupleCoder=a},{"./abstract-coder":3,"./array":6}],14:[function(e,r,i){"use strict";var t=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(i,"__esModule",{value:true});i.ErrorFragment=i.FunctionFragment=i.ConstructorFragment=i.EventFragment=i.Fragment=i.ParamType=i.FormatTypes=void 0;var a=e("@ethersproject/bignumber");var n=e("@ethersproject/properties");var o=e("@ethersproject/logger");var s=e("./_version");var l=new o.Logger(s.version);var u={};var c={calldata:true,memory:true,storage:true};var f={calldata:true,memory:true};function h(e,r){if(e==="bytes"||e==="string"){if(c[r]){return true}}else if(e==="address"){if(r==="payable"){return true}}else if(e.indexOf("[")>=0||e==="tuple"){if(f[r]){return true}}if(c[r]||r==="payable"){l.throwArgumentError("invalid modifier","name",r)}return false}function d(r,t){var e=r;function n(e){l.throwArgumentError("unexpected character at position "+e,"param",r)}r=r.replace(/\s/g," ");function i(e){var r={type:"",name:"",parent:e,state:{allowType:true}};if(t){r.indexed=false}return r}var o={type:"",name:"",state:{allowType:true}};var a=o;for(var s=0;s<r.length;s++){var u=r[s];switch(u){case"(":if(a.state.allowType&&a.type===""){a.type="tuple"}else if(!a.state.allowParams){n(s)}a.state.allowType=false;a.type=T(a.type);a.components=[i(a)];a=a.components[0];break;case")":delete a.state;if(a.name==="indexed"){if(!t){n(s)}a.indexed=true;a.name=""}if(h(a.type,a.name)){a.name=""}a.type=T(a.type);var c=a;a=a.parent;if(!a){n(s)}delete c.parent;a.state.allowParams=false;a.state.allowName=true;a.state.allowArray=true;break;case",":delete a.state;if(a.name==="indexed"){if(!t){n(s)}a.indexed=true;a.name=""}if(h(a.type,a.name)){a.name=""}a.type=T(a.type);var f=i(a.parent);a.parent.components.push(f);delete a.parent;a=f;break;case" ":if(a.state.allowType){if(a.type!==""){a.type=T(a.type);delete a.state.allowType;a.state.allowName=true;a.state.allowParams=true}}if(a.state.allowName){if(a.name!==""){if(a.name==="indexed"){if(!t){n(s)}if(a.indexed){n(s)}a.indexed=true;a.name=""}else if(h(a.type,a.name)){a.name=""}else{a.state.allowName=false}}}break;case"[":if(!a.state.allowArray){n(s)}a.type+=u;a.state.allowArray=false;a.state.allowName=false;a.state.readArray=true;break;case"]":if(!a.state.readArray){n(s)}a.type+=u;a.state.readArray=false;a.state.allowArray=true;a.state.allowName=true;break;default:if(a.state.allowType){a.type+=u;a.state.allowParams=true;a.state.allowArray=true}else if(a.state.allowName){a.name+=u;delete a.state.allowArray}else if(a.state.readArray){a.type+=u}else{n(s)}}}if(a.parent){l.throwArgumentError("unexpected eof","param",r)}delete o.state;if(a.name==="indexed"){if(!t){n(e.length-7)}if(a.indexed){n(e.length-7)}a.indexed=true;a.name=""}else if(h(a.type,a.name)){a.name=""}o.type=T(o.type);return o}function p(e,r){for(var t in r){(0,n.defineReadOnly)(e,t,r[t])}}i.FormatTypes=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"});var v=new RegExp(/^(.*)\[([0-9]*)\]$/);var b=function(){function n(e,r){if(e!==u){l.throwError("use fromString",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"})}p(this,r);var t=this.type.match(v);if(t){p(this,{arrayLength:parseInt(t[2]||"-1"),arrayChildren:n.fromObject({type:t[1],components:this.components}),baseType:"array"})}else{p(this,{arrayLength:null,arrayChildren:null,baseType:this.components!=null?"tuple":this.type})}this._isParamType=true;Object.freeze(this)}n.prototype.format=function(r){if(!r){r=i.FormatTypes.sighash}if(!i.FormatTypes[r]){l.throwArgumentError("invalid format type","format",r)}if(r===i.FormatTypes.json){var e={type:this.baseType==="tuple"?"tuple":this.type,name:this.name||undefined};if(typeof this.indexed==="boolean"){e.indexed=this.indexed}if(this.components){e.components=this.components.map(function(e){return JSON.parse(e.format(r))})}return JSON.stringify(e)}var t="";if(this.baseType==="array"){t+=this.arrayChildren.format(r);t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"}else{if(this.baseType==="tuple"){if(r!==i.FormatTypes.sighash){t+=this.type}t+="("+this.components.map(function(e){return e.format(r)}).join(r===i.FormatTypes.full?", ":",")+")"}else{t+=this.type}}if(r!==i.FormatTypes.sighash){if(this.indexed===true){t+=" indexed"}if(r===i.FormatTypes.full&&this.name){t+=" "+this.name}}return t};n.from=function(e,r){if(typeof e==="string"){return n.fromString(e,r)}return n.fromObject(e)};n.fromObject=function(e){if(n.isParamType(e)){return e}return new n(u,{name:e.name||null,type:T(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(n.fromObject):null})};n.fromString=function(e,r){function t(e){return n.fromObject({name:e.name,type:e.type,indexed:e.indexed,components:e.components})}return t(d(e,!!r))};n.isParamType=function(e){return!!(e!=null&&e._isParamType)};return n}();i.ParamType=b;function g(e,r){return C(e).map(function(e){return b.fromString(e,r)})}var m=function(){function r(e,r){if(e!==u){l.throwError("use a static from method",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"})}p(this,r);this._isFragment=true;Object.freeze(this)}r.from=function(e){if(r.isFragment(e)){return e}if(typeof e==="string"){return r.fromString(e)}return r.fromObject(e)};r.fromObject=function(e){if(r.isFragment(e)){return e}switch(e.type){case"function":return E.fromObject(e);case"event":return y.fromObject(e);case"constructor":return A.fromObject(e);case"error":return P.fromObject(e);case"fallback":case"receive":return null}return l.throwArgumentError("invalid fragment object","value",e)};r.fromString=function(e){e=e.replace(/\s/g," ");e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ");e=e.trim();if(e.split(" ")[0]==="event"){return y.fromString(e.substring(5).trim())}else if(e.split(" ")[0]==="function"){return E.fromString(e.substring(8).trim())}else if(e.split("(")[0].trim()==="constructor"){return A.fromString(e.trim())}else if(e.split(" ")[0]==="error"){return P.fromString(e.substring(5).trim())}return l.throwArgumentError("unsupported fragment","value",e)};r.isFragment=function(e){return!!(e&&e._isFragment)};return r}();i.Fragment=m;var y=function(e){t(n,e);function n(){return e!==null&&e.apply(this,arguments)||this}n.prototype.format=function(r){if(!r){r=i.FormatTypes.sighash}if(!i.FormatTypes[r]){l.throwArgumentError("invalid format type","format",r)}if(r===i.FormatTypes.json){return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(function(e){return JSON.parse(e.format(r))})})}var e="";if(r!==i.FormatTypes.sighash){e+="event "}e+=this.name+"("+this.inputs.map(function(e){return e.format(r)}).join(r===i.FormatTypes.full?", ":",")+") ";if(r!==i.FormatTypes.sighash){if(this.anonymous){e+="anonymous "}}return e.trim()};n.from=function(e){if(typeof e==="string"){return n.fromString(e)}return n.fromObject(e)};n.fromObject=function(e){if(n.isEventFragment(e)){return e}if(e.type!=="event"){l.throwArgumentError("invalid event object","value",e)}var r={name:O(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(b.fromObject):[],type:"event"};return new n(u,r)};n.fromString=function(e){var r=e.match(B);if(!r){l.throwArgumentError("invalid event string","value",e)}var t=false;r[3].split(" ").forEach(function(e){switch(e.trim()){case"anonymous":t=true;break;case"":break;default:l.warn("unknown modifier: "+e)}});return n.fromObject({name:r[1].trim(),anonymous:t,inputs:g(r[2],true),type:"event"})};n.isEventFragment=function(e){return e&&e._isFragment&&e.type==="event"};return n}(m);i.EventFragment=y;function w(e,r){r.gas=null;var t=e.split("@");if(t.length!==1){if(t.length>2){l.throwArgumentError("invalid human-readable ABI signature","value",e)}if(!t[1].match(/^[0-9]+$/)){l.throwArgumentError("invalid human-readable ABI signature gas","value",e)}r.gas=a.BigNumber.from(t[1]);return t[0]}return e}function _(e,r){r.constant=false;r.payable=false;r.stateMutability="nonpayable";e.split(" ").forEach(function(e){switch(e.trim()){case"constant":r.constant=true;break;case"payable":r.payable=true;r.stateMutability="payable";break;case"nonpayable":r.payable=false;r.stateMutability="nonpayable";break;case"pure":r.constant=true;r.stateMutability="pure";break;case"view":r.constant=true;r.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}})}function S(e){var r={constant:false,payable:true,stateMutability:"payable"};if(e.stateMutability!=null){r.stateMutability=e.stateMutability;r.constant=r.stateMutability==="view"||r.stateMutability==="pure";if(e.constant!=null){if(!!e.constant!==r.constant){l.throwArgumentError("cannot have constant function with mutability "+r.stateMutability,"value",e)}}r.payable=r.stateMutability==="payable";if(e.payable!=null){if(!!e.payable!==r.payable){l.throwArgumentError("cannot have payable function with mutability "+r.stateMutability,"value",e)}}}else if(e.payable!=null){r.payable=!!e.payable;if(e.constant==null&&!r.payable&&e.type!=="constructor"){l.throwArgumentError("unable to determine stateMutability","value",e)}r.constant=!!e.constant;if(r.constant){r.stateMutability="view"}else{r.stateMutability=r.payable?"payable":"nonpayable"}if(r.payable&&r.constant){l.throwArgumentError("cannot have constant payable function","value",e)}}else if(e.constant!=null){r.constant=!!e.constant;r.payable=!r.constant;r.stateMutability=r.constant?"view":"payable"}else if(e.type!=="constructor"){l.throwArgumentError("unable to determine stateMutability","value",e)}return r}var A=function(e){t(n,e);function n(){return e!==null&&e.apply(this,arguments)||this}n.prototype.format=function(r){if(!r){r=i.FormatTypes.sighash}if(!i.FormatTypes[r]){l.throwArgumentError("invalid format type","format",r)}if(r===i.FormatTypes.json){return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:undefined,payable:this.payable,gas:this.gas?this.gas.toNumber():undefined,inputs:this.inputs.map(function(e){return JSON.parse(e.format(r))})})}if(r===i.FormatTypes.sighash){l.throwError("cannot format a constructor for sighash",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"})}var e="constructor("+this.inputs.map(function(e){return e.format(r)}).join(r===i.FormatTypes.full?", ":",")+") ";if(this.stateMutability&&this.stateMutability!=="nonpayable"){e+=this.stateMutability+" "}return e.trim()};n.from=function(e){if(typeof e==="string"){return n.fromString(e)}return n.fromObject(e)};n.fromObject=function(e){if(n.isConstructorFragment(e)){return e}if(e.type!=="constructor"){l.throwArgumentError("invalid constructor object","value",e)}var r=S(e);if(r.constant){l.throwArgumentError("constructor cannot be constant","value",e)}var t={name:null,type:e.type,inputs:e.inputs?e.inputs.map(b.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?a.BigNumber.from(e.gas):null};return new n(u,t)};n.fromString=function(e){var r={type:"constructor"};e=w(e,r);var t=e.match(B);if(!t||t[1].trim()!=="constructor"){l.throwArgumentError("invalid constructor string","value",e)}r.inputs=g(t[2].trim(),false);_(t[3].trim(),r);return n.fromObject(r)};n.isConstructorFragment=function(e){return e&&e._isFragment&&e.type==="constructor"};return n}(m);i.ConstructorFragment=A;var E=function(e){t(o,e);function o(){return e!==null&&e.apply(this,arguments)||this}o.prototype.format=function(r){if(!r){r=i.FormatTypes.sighash}if(!i.FormatTypes[r]){l.throwArgumentError("invalid format type","format",r)}if(r===i.FormatTypes.json){return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:undefined,payable:this.payable,gas:this.gas?this.gas.toNumber():undefined,inputs:this.inputs.map(function(e){return JSON.parse(e.format(r))}),outputs:this.outputs.map(function(e){return JSON.parse(e.format(r))})})}var e="";if(r!==i.FormatTypes.sighash){e+="function "}e+=this.name+"("+this.inputs.map(function(e){return e.format(r)}).join(r===i.FormatTypes.full?", ":",")+") ";if(r!==i.FormatTypes.sighash){if(this.stateMutability){if(this.stateMutability!=="nonpayable"){e+=this.stateMutability+" "}}else if(this.constant){e+="view "}if(this.outputs&&this.outputs.length){e+="returns ("+this.outputs.map(function(e){return e.format(r)}).join(", ")+") "}if(this.gas!=null){e+="@"+this.gas.toString()+" "}}return e.trim()};o.from=function(e){if(typeof e==="string"){return o.fromString(e)}return o.fromObject(e)};o.fromObject=function(e){if(o.isFunctionFragment(e)){return e}if(e.type!=="function"){l.throwArgumentError("invalid function object","value",e)}var r=S(e);var t={type:e.type,name:O(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(b.fromObject):[],outputs:e.outputs?e.outputs.map(b.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?a.BigNumber.from(e.gas):null};return new o(u,t)};o.fromString=function(e){var r={type:"function"};e=w(e,r);var t=e.split(" returns ");if(t.length>2){l.throwArgumentError("invalid function string","value",e)}var n=t[0].match(B);if(!n){l.throwArgumentError("invalid function signature","value",e)}r.name=n[1].trim();if(r.name){O(r.name)}r.inputs=g(n[2],false);_(n[3].trim(),r);if(t.length>1){var i=t[1].match(B);if(i[1].trim()!=""||i[3].trim()!=""){l.throwArgumentError("unexpected tokens","value",e)}r.outputs=g(i[2],false)}else{r.outputs=[]}return o.fromObject(r)};o.isFunctionFragment=function(e){return e&&e._isFragment&&e.type==="function"};return o}(A);i.FunctionFragment=E;function M(e){var r=e.format();if(r==="Error(string)"||r==="Panic(uint256)"){l.throwArgumentError("cannot specify user defined "+r+" error","fragment",e)}return e}var P=function(e){t(n,e);function n(){return e!==null&&e.apply(this,arguments)||this}n.prototype.format=function(r){if(!r){r=i.FormatTypes.sighash}if(!i.FormatTypes[r]){l.throwArgumentError("invalid format type","format",r)}if(r===i.FormatTypes.json){return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(function(e){return JSON.parse(e.format(r))})})}var e="";if(r!==i.FormatTypes.sighash){e+="error "}e+=this.name+"("+this.inputs.map(function(e){return e.format(r)}).join(r===i.FormatTypes.full?", ":",")+") ";return e.trim()};n.from=function(e){if(typeof e==="string"){return n.fromString(e)}return n.fromObject(e)};n.fromObject=function(e){if(n.isErrorFragment(e)){return e}if(e.type!=="error"){l.throwArgumentError("invalid error object","value",e)}var r={type:e.type,name:O(e.name),inputs:e.inputs?e.inputs.map(b.fromObject):[]};return M(new n(u,r))};n.fromString=function(e){var r={type:"error"};var t=e.match(B);if(!t){l.throwArgumentError("invalid error signature","value",e)}r.name=t[1].trim();if(r.name){O(r.name)}r.inputs=g(t[2],false);return M(n.fromObject(r))};n.isErrorFragment=function(e){return e&&e._isFragment&&e.type==="error"};return n}(m);i.ErrorFragment=P;function T(e){if(e.match(/^uint($|[^1-9])/)){e="uint256"+e.substring(4)}else if(e.match(/^int($|[^1-9])/)){e="int256"+e.substring(3)}return e}var k=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function O(e){if(!e||!e.match(k)){l.throwArgumentError('invalid identifier "'+e+'"',"value",e)}return e}var B=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function C(e){e=e.trim();var r=[];var t="";var n=0;for(var i=0;i<e.length;i++){var o=e[i];if(o===","&&n===0){r.push(t);t=""}else{t+=o;if(o==="("){n++}else if(o===")"){n--;if(n===-1){l.throwArgumentError("unbalanced parenthesis","value",e)}}}}if(t){r.push(t)}return r}},{"./_version":1,"@ethersproject/bignumber":29,"@ethersproject/logger":55,"@ethersproject/properties":61}],15:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TransactionDescription=t.LogDescription=t.checkResultErrors=t.Indexed=t.Interface=t.defaultAbiCoder=t.AbiCoder=t.FormatTypes=t.ParamType=t.FunctionFragment=t.Fragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=void 0;var n=e("./fragments");Object.defineProperty(t,"ConstructorFragment",{enumerable:true,get:function(){return n.ConstructorFragment}});Object.defineProperty(t,"ErrorFragment",{enumerable:true,get:function(){return n.ErrorFragment}});Object.defineProperty(t,"EventFragment",{enumerable:true,get:function(){return n.EventFragment}});Object.defineProperty(t,"FormatTypes",{enumerable:true,get:function(){return n.FormatTypes}});Object.defineProperty(t,"Fragment",{enumerable:true,get:function(){return n.Fragment}});Object.defineProperty(t,"FunctionFragment",{enumerable:true,get:function(){return n.FunctionFragment}});Object.defineProperty(t,"ParamType",{enumerable:true,get:function(){return n.ParamType}});var i=e("./abi-coder");Object.defineProperty(t,"AbiCoder",{enumerable:true,get:function(){return i.AbiCoder}});Object.defineProperty(t,"defaultAbiCoder",{enumerable:true,get:function(){return i.defaultAbiCoder}});var o=e("./interface");Object.defineProperty(t,"checkResultErrors",{enumerable:true,get:function(){return o.checkResultErrors}});Object.defineProperty(t,"Indexed",{enumerable:true,get:function(){return o.Indexed}});Object.defineProperty(t,"Interface",{enumerable:true,get:function(){return o.Interface}});Object.defineProperty(t,"LogDescription",{enumerable:true,get:function(){return o.LogDescription}});Object.defineProperty(t,"TransactionDescription",{enumerable:true,get:function(){return o.TransactionDescription}})},{"./abi-coder":2,"./fragments":14,"./interface":16}],16:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(t,"__esModule",{value:true});t.Interface=t.Indexed=t.ErrorDescription=t.TransactionDescription=t.LogDescription=t.checkResultErrors=void 0;var o=e("@ethersproject/address");var a=e("@ethersproject/bignumber");var p=e("@ethersproject/bytes");var u=e("@ethersproject/hash");var c=e("@ethersproject/keccak256");var s=e("@ethersproject/properties");var f=e("./abi-coder");var i=e("./coders/abstract-coder");Object.defineProperty(t,"checkResultErrors",{enumerable:true,get:function(){return i.checkResultErrors}});var v=e("./fragments");var b=e("@ethersproject/logger");var l=e("./_version");var g=new b.Logger(l.version);var h=function(e){n(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r}(s.Description);t.LogDescription=h;var d=function(e){n(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r}(s.Description);t.TransactionDescription=d;var m=function(e){n(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r}(s.Description);t.ErrorDescription=m;var y=function(e){n(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}r.isIndexed=function(e){return!!(e&&e._isIndexed)};return r}(s.Description);t.Indexed=y;var w={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:true},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function _(e,r){var t=new Error("deferred error during ABI decoding triggered accessing "+e);t.error=r;return t}var S=function(){function i(e){var r=this.constructor;var n=this;g.checkNew(r,i);var t=[];if(typeof e==="string"){t=JSON.parse(e)}else{t=e}(0,s.defineReadOnly)(this,"fragments",t.map(function(e){return v.Fragment.from(e)}).filter(function(e){return e!=null}));(0,s.defineReadOnly)(this,"_abiCoder",(0,s.getStatic)(r,"getAbiCoder")());(0,s.defineReadOnly)(this,"functions",{});(0,s.defineReadOnly)(this,"errors",{});(0,s.defineReadOnly)(this,"events",{});(0,s.defineReadOnly)(this,"structs",{});this.fragments.forEach(function(e){var r=null;switch(e.type){case"constructor":if(n.deploy){g.warn("duplicate definition - constructor");return}(0,s.defineReadOnly)(n,"deploy",e);return;case"function":r=n.functions;break;case"event":r=n.events;break;case"error":r=n.errors;break;default:return}var t=e.format();if(r[t]){g.warn("duplicate definition - "+t);return}r[t]=e});if(!this.deploy){(0,s.defineReadOnly)(this,"deploy",v.ConstructorFragment.from({payable:false,type:"constructor"}))}(0,s.defineReadOnly)(this,"_isInterface",true)}i.prototype.format=function(r){if(!r){r=v.FormatTypes.full}if(r===v.FormatTypes.sighash){g.throwArgumentError("interface does not support formatting sighash","format",r)}var e=this.fragments.map(function(e){return e.format(r)});if(r===v.FormatTypes.json){return JSON.stringify(e.map(function(e){return JSON.parse(e)}))}return e};i.getAbiCoder=function(){return f.defaultAbiCoder};i.getAddress=function(e){return(0,o.getAddress)(e)};i.getSighash=function(e){return(0,p.hexDataSlice)((0,u.id)(e.format()),0,4)};i.getEventTopic=function(e){return(0,u.id)(e.format())};i.prototype.getFunction=function(e){if((0,p.isHexString)(e)){for(var r in this.functions){if(e===this.getSighash(r)){return this.functions[r]}}g.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){var t=e.trim();var n=Object.keys(this.functions).filter(function(e){return e.split("(")[0]===t});if(n.length===0){g.throwArgumentError("no matching function","name",t)}else if(n.length>1){g.throwArgumentError("multiple matching functions","name",t)}return this.functions[n[0]]}var i=this.functions[v.FunctionFragment.fromString(e).format()];if(!i){g.throwArgumentError("no matching function","signature",e)}return i};i.prototype.getEvent=function(e){if((0,p.isHexString)(e)){var r=e.toLowerCase();for(var t in this.events){if(r===this.getEventTopic(t)){return this.events[t]}}g.throwArgumentError("no matching event","topichash",r)}if(e.indexOf("(")===-1){var n=e.trim();var i=Object.keys(this.events).filter(function(e){return e.split("(")[0]===n});if(i.length===0){g.throwArgumentError("no matching event","name",n)}else if(i.length>1){g.throwArgumentError("multiple matching events","name",n)}return this.events[i[0]]}var o=this.events[v.EventFragment.fromString(e).format()];if(!o){g.throwArgumentError("no matching event","signature",e)}return o};i.prototype.getError=function(e){if((0,p.isHexString)(e)){var r=(0,s.getStatic)(this.constructor,"getSighash");for(var t in this.errors){var n=this.errors[t];if(e===r(n)){return this.errors[t]}}g.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){var i=e.trim();var o=Object.keys(this.errors).filter(function(e){return e.split("(")[0]===i});if(o.length===0){g.throwArgumentError("no matching error","name",i)}else if(o.length>1){g.throwArgumentError("multiple matching errors","name",i)}return this.errors[o[0]]}var a=this.errors[v.FunctionFragment.fromString(e).format()];if(!a){g.throwArgumentError("no matching error","signature",e)}return a};i.prototype.getSighash=function(e){if(typeof e==="string"){try{e=this.getFunction(e)}catch(r){try{e=this.getError(e)}catch(e){throw r}}}return(0,s.getStatic)(this.constructor,"getSighash")(e)};i.prototype.getEventTopic=function(e){if(typeof e==="string"){e=this.getEvent(e)}return(0,s.getStatic)(this.constructor,"getEventTopic")(e)};i.prototype._decodeParams=function(e,r){return this._abiCoder.decode(e,r)};i.prototype._encodeParams=function(e,r){return this._abiCoder.encode(e,r)};i.prototype.encodeDeploy=function(e){return this._encodeParams(this.deploy.inputs,e||[])};i.prototype.decodeErrorResult=function(e,r){if(typeof e==="string"){e=this.getError(e)}var t=(0,p.arrayify)(r);if((0,p.hexlify)(t.slice(0,4))!==this.getSighash(e)){g.throwArgumentError("data signature does not match error "+e.name+".","data",(0,p.hexlify)(t))}return this._decodeParams(e.inputs,t.slice(4))};i.prototype.encodeErrorResult=function(e,r){if(typeof e==="string"){e=this.getError(e)}return(0,p.hexlify)((0,p.concat)([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))};i.prototype.decodeFunctionData=function(e,r){if(typeof e==="string"){e=this.getFunction(e)}var t=(0,p.arrayify)(r);if((0,p.hexlify)(t.slice(0,4))!==this.getSighash(e)){g.throwArgumentError("data signature does not match function "+e.name+".","data",(0,p.hexlify)(t))}return this._decodeParams(e.inputs,t.slice(4))};i.prototype.encodeFunctionData=function(e,r){if(typeof e==="string"){e=this.getFunction(e)}return(0,p.hexlify)((0,p.concat)([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))};i.prototype.decodeFunctionResult=function(e,r){if(typeof e==="string"){e=this.getFunction(e)}var t=(0,p.arrayify)(r);var n=null;var i=null;var o=null;var a=null;switch(t.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,t)}catch(c){}break;case 4:{var s=(0,p.hexlify)(t.slice(0,4));var u=w[s];if(u){i=this._abiCoder.decode(u.inputs,t.slice(4));o=u.name;a=u.signature;if(u.reason){n=i[0]}}else{try{var c=this.getError(s);i=this._abiCoder.decode(c.inputs,t.slice(4));o=c.name;a=c.format()}catch(c){console.log(c)}}break}}return g.throwError("call revert exception",b.Logger.errors.CALL_EXCEPTION,{method:e.format(),errorArgs:i,errorName:o,errorSignature:a,reason:n})};i.prototype.encodeFunctionResult=function(e,r){if(typeof e==="string"){e=this.getFunction(e)}return(0,p.hexlify)(this._abiCoder.encode(e.outputs,r||[]))};i.prototype.encodeFilterTopics=function(n,e){var t=this;if(typeof n==="string"){n=this.getEvent(n)}if(e.length>n.inputs.length){g.throwError("too many arguments for "+n.format(),b.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:e})}var i=[];if(!n.anonymous){i.push(this.getEventTopic(n))}var o=function(e,r){if(e.type==="string"){return(0,u.id)(r)}else if(e.type==="bytes"){return(0,c.keccak256)((0,p.hexlify)(r))}if(e.type==="address"){t._abiCoder.encode(["address"],[r])}return(0,p.hexZeroPad)((0,p.hexlify)(r),32)};e.forEach(function(e,r){var t=n.inputs[r];if(!t.indexed){if(e!=null){g.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+t.name,e)}return}if(e==null){i.push(null)}else if(t.baseType==="array"||t.baseType==="tuple"){g.throwArgumentError("filtering with tuples or arrays not supported","contract."+t.name,e)}else if(Array.isArray(e)){i.push(e.map(function(e){return o(t,e)}))}else{i.push(o(t,e))}});while(i.length&&i[i.length-1]===null){i.pop()}return i};i.prototype.encodeEventLog=function(e,n){var i=this;if(typeof e==="string"){e=this.getEvent(e)}var o=[];var a=[];var s=[];if(!e.anonymous){o.push(this.getEventTopic(e))}if(n.length!==e.inputs.length){g.throwArgumentError("event arguments/values mismatch","values",n)}e.inputs.forEach(function(e,r){var t=n[r];if(e.indexed){if(e.type==="string"){o.push((0,u.id)(t))}else if(e.type==="bytes"){o.push((0,c.keccak256)(t))}else if(e.baseType==="tuple"||e.baseType==="array"){throw new Error("not implemented")}else{o.push(i._abiCoder.encode([e.type],[t]))}}else{a.push(e);s.push(t)}});return{data:this._abiCoder.encode(a,s),topics:o}};i.prototype.decodeEventLog=function(e,r,t){if(typeof e==="string"){e=this.getEvent(e)}if(t!=null&&!e.anonymous){var n=this.getEventTopic(e);if(!(0,p.isHexString)(t[0],32)||t[0].toLowerCase()!==n){g.throwError("fragment/topic mismatch",b.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:n,value:t[0]})}t=t.slice(1)}var i=[];var o=[];var a=[];e.inputs.forEach(function(e,r){if(e.indexed){if(e.type==="string"||e.type==="bytes"||e.baseType==="tuple"||e.baseType==="array"){i.push(v.ParamType.fromObject({type:"bytes32",name:e.name}));a.push(true)}else{i.push(e);a.push(false)}}else{o.push(e);a.push(false)}});var s=t!=null?this._abiCoder.decode(i,(0,p.concat)(t)):null;var u=this._abiCoder.decode(o,r,true);var c=[];var f=0,l=0;e.inputs.forEach(function(e,r){if(e.indexed){if(s==null){c[r]=new y({_isIndexed:true,hash:null})}else if(a[r]){c[r]=new y({_isIndexed:true,hash:s[l++]})}else{try{c[r]=s[l++]}catch(e){c[r]=e}}}else{try{c[r]=u[f++]}catch(e){c[r]=e}}if(e.name&&c[e.name]==null){var t=c[r];if(t instanceof Error){Object.defineProperty(c,e.name,{enumerable:true,get:function(){throw _("property "+JSON.stringify(e.name),t)}})}else{c[e.name]=t}}});var h=function(e){var r=c[e];if(r instanceof Error){Object.defineProperty(c,e,{enumerable:true,get:function(){throw _("index "+e,r)}})}};for(var d=0;d<c.length;d++){h(d)}return Object.freeze(c)};i.prototype.parseTransaction=function(e){var r=this.getFunction(e.data.substring(0,10).toLowerCase());if(!r){return null}return new d({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:a.BigNumber.from(e.value||"0")})};i.prototype.parseLog=function(e){var r=this.getEvent(e.topics[0]);if(!r||r.anonymous){return null}return new h({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})};i.prototype.parseError=function(e){var r=(0,p.hexlify)(e);var t=this.getError(r.substring(0,10).toLowerCase());if(!t){return null}return new m({args:this._abiCoder.decode(t.inputs,"0x"+r.substring(10)),errorFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t)})};i.isInterface=function(e){return!!(e&&e._isInterface)};return i}();t.Interface=S},{"./_version":1,"./abi-coder":2,"./coders/abstract-coder":3,"./fragments":14,"@ethersproject/address":22,"@ethersproject/bignumber":29,"@ethersproject/bytes":31,"@ethersproject/hash":41,"@ethersproject/keccak256":53,"@ethersproject/logger":55,"@ethersproject/properties":61}],17:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="abstract-provider/5.5.1"},{}],18:[function(e,r,t){"use strict";var o=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();var n=this&&this.__awaiter||function(e,a,t,s){function u(r){return r instanceof t?r:new t(function(e){e(r)})}return new(t||(t=Promise))(function(r,t){function n(e){try{o(s.next(e))}catch(e){t(e)}}function i(e){try{o(s["throw"](e))}catch(e){t(e)}}function o(e){e.done?r(e.value):u(e.value).then(n,i)}o((s=s.apply(e,a||[])).next())})};var a=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(e){return u([r,e])}}function u(r){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(a=r[0]&2?o["return"]:r[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;if(o=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;o=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){n.label=r[1];break}if(r[0]===6&&n.label<a[1]){n.label=a[1];a=r;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(r);break}if(a[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];o=0}finally{i=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};Object.defineProperty(t,"__esModule",{value:true});t.Provider=t.TransactionOrderForkEvent=t.TransactionForkEvent=t.BlockForkEvent=t.ForkEvent=void 0;var s=e("@ethersproject/bignumber");var u=e("@ethersproject/bytes");var c=e("@ethersproject/properties");var i=e("@ethersproject/logger");var f=e("./_version");var l=new i.Logger(f.version);var h=function(e){o(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}r.isForkEvent=function(e){return!!(e&&e._isForkEvent)};return r}(c.Description);t.ForkEvent=h;var d=function(n){o(e,n);function e(e,r){var t=this;if(!(0,u.isHexString)(e,32)){l.throwArgumentError("invalid blockHash","blockHash",e)}t=n.call(this,{_isForkEvent:true,_isBlockForkEvent:true,expiry:r||0,blockHash:e})||this;return t}return e}(h);t.BlockForkEvent=d;var p=function(n){o(e,n);function e(e,r){var t=this;if(!(0,u.isHexString)(e,32)){l.throwArgumentError("invalid transaction hash","hash",e)}t=n.call(this,{_isForkEvent:true,_isTransactionForkEvent:true,expiry:r||0,hash:e})||this;return t}return e}(h);t.TransactionForkEvent=p;var v=function(i){o(e,i);function e(e,r,t){var n=this;if(!(0,u.isHexString)(e,32)){l.throwArgumentError("invalid transaction hash","beforeHash",e)}if(!(0,u.isHexString)(r,32)){l.throwArgumentError("invalid transaction hash","afterHash",r)}n=i.call(this,{_isForkEvent:true,_isTransactionOrderForkEvent:true,expiry:t||0,beforeHash:e,afterHash:r})||this;return n}return e}(h);t.TransactionOrderForkEvent=v;var b=function(){function r(){var e=this.constructor;l.checkAbstract(e,r);(0,c.defineReadOnly)(this,"_isProvider",true)}r.prototype.getFeeData=function(){return n(this,void 0,void 0,function(){var r,t,n,i,o;return a(this,function(e){switch(e.label){case 0:return[4,(0,c.resolveProperties)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(function(e){return null})})];case 1:r=e.sent(),t=r.block,n=r.gasPrice;i=null,o=null;if(t&&t.baseFeePerGas){o=s.BigNumber.from("2500000000");i=t.baseFeePerGas.mul(2).add(o)}return[2,{maxFeePerGas:i,maxPriorityFeePerGas:o,gasPrice:n}]}})})};r.prototype.addListener=function(e,r){return this.on(e,r)};r.prototype.removeListener=function(e,r){return this.off(e,r)};r.isProvider=function(e){return!!(e&&e._isProvider)};return r}();t.Provider=b},{"./_version":17,"@ethersproject/bignumber":29,"@ethersproject/bytes":31,"@ethersproject/logger":55,"@ethersproject/properties":61}],19:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="abstract-signer/5.5.0"},{}],20:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();var s=this&&this.__awaiter||function(e,a,t,s){function u(r){return r instanceof t?r:new t(function(e){e(r)})}return new(t||(t=Promise))(function(r,t){function n(e){try{o(s.next(e))}catch(e){t(e)}}function i(e){try{o(s["throw"](e))}catch(e){t(e)}}function o(e){e.done?r(e.value):u(e.value).then(n,i)}o((s=s.apply(e,a||[])).next())})};var u=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(e){return u([r,e])}}function u(r){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(a=r[0]&2?o["return"]:r[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;if(o=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;o=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){n.label=r[1];break}if(r[0]===6&&n.label<a[1]){n.label=a[1];a=r;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(r);break}if(a[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];o=0}finally{i=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};Object.defineProperty(t,"__esModule",{value:true});t.VoidSigner=t.Signer=void 0;var c=e("@ethersproject/properties");var f=e("@ethersproject/logger");var i=e("./_version");var l=new f.Logger(i.version);var o=["accessList","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"];var h=[f.Logger.errors.INSUFFICIENT_FUNDS,f.Logger.errors.NONCE_EXPIRED,f.Logger.errors.REPLACEMENT_UNDERPRICED];var a=function(){function r(){var e=this.constructor;l.checkAbstract(e,r);(0,c.defineReadOnly)(this,"_isSigner",true)}r.prototype.getBalance=function(r){return s(this,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:this._checkProvider("getBalance");return[4,this.provider.getBalance(this.getAddress(),r)];case 1:return[2,e.sent()]}})})};r.prototype.getTransactionCount=function(r){return s(this,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:this._checkProvider("getTransactionCount");return[4,this.provider.getTransactionCount(this.getAddress(),r)];case 1:return[2,e.sent()]}})})};r.prototype.estimateGas=function(t){return s(this,void 0,void 0,function(){var r;return u(this,function(e){switch(e.label){case 0:this._checkProvider("estimateGas");return[4,(0,c.resolveProperties)(this.checkTransaction(t))];case 1:r=e.sent();return[4,this.provider.estimateGas(r)];case 2:return[2,e.sent()]}})})};r.prototype.call=function(t,n){return s(this,void 0,void 0,function(){var r;return u(this,function(e){switch(e.label){case 0:this._checkProvider("call");return[4,(0,c.resolveProperties)(this.checkTransaction(t))];case 1:r=e.sent();return[4,this.provider.call(r,n)];case 2:return[2,e.sent()]}})})};r.prototype.sendTransaction=function(n){return s(this,void 0,void 0,function(){var r,t;return u(this,function(e){switch(e.label){case 0:this._checkProvider("sendTransaction");return[4,this.populateTransaction(n)];case 1:r=e.sent();return[4,this.signTransaction(r)];case 2:t=e.sent();return[4,this.provider.sendTransaction(t)];case 3:return[2,e.sent()]}})})};r.prototype.getChainId=function(){return s(this,void 0,void 0,function(){var r;return u(this,function(e){switch(e.label){case 0:this._checkProvider("getChainId");return[4,this.provider.getNetwork()];case 1:r=e.sent();return[2,r.chainId]}})})};r.prototype.getGasPrice=function(){return s(this,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:this._checkProvider("getGasPrice");return[4,this.provider.getGasPrice()];case 1:return[2,e.sent()]}})})};r.prototype.getFeeData=function(){return s(this,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:this._checkProvider("getFeeData");return[4,this.provider.getFeeData()];case 1:return[2,e.sent()]}})})};r.prototype.resolveName=function(r){return s(this,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:this._checkProvider("resolveName");return[4,this.provider.resolveName(r)];case 1:return[2,e.sent()]}})})};r.prototype.checkTransaction=function(r){for(var e in r){if(o.indexOf(e)===-1){l.throwArgumentError("invalid transaction key: "+e,"transaction",r)}}var t=(0,c.shallowCopy)(r);if(t.from==null){t.from=this.getAddress()}else{t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(function(e){if(e[0].toLowerCase()!==e[1].toLowerCase()){l.throwArgumentError("from address mismatch","transaction",r)}return e[0]})}return t};r.prototype.populateTransaction=function(a){return s(this,void 0,void 0,function(){var r,t,n,i;var o=this;return u(this,function(e){switch(e.label){case 0:return[4,(0,c.resolveProperties)(this.checkTransaction(a))];case 1:r=e.sent();if(r.to!=null){r.to=Promise.resolve(r.to).then(function(t){return s(o,void 0,void 0,function(){var r;return u(this,function(e){switch(e.label){case 0:if(t==null){return[2,null]}return[4,this.resolveName(t)];case 1:r=e.sent();if(r==null){l.throwArgumentError("provided ENS name resolves to null","tx.to",t)}return[2,r]}})})});r.to.catch(function(e){})}t=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||t)){l.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",a)}else if((r.type===0||r.type===1)&&t){l.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",a)}if(!((r.type===2||r.type==null)&&(r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)))return[3,2];r.type=2;return[3,5];case 2:if(!(r.type===0||r.type===1))return[3,3];if(r.gasPrice==null){r.gasPrice=this.getGasPrice()}return[3,5];case 3:return[4,this.getFeeData()];case 4:n=e.sent();if(r.type==null){if(n.maxFeePerGas!=null&&n.maxPriorityFeePerGas!=null){r.type=2;if(r.gasPrice!=null){i=r.gasPrice;delete r.gasPrice;r.maxFeePerGas=i;r.maxPriorityFeePerGas=i}else{if(r.maxFeePerGas==null){r.maxFeePerGas=n.maxFeePerGas}if(r.maxPriorityFeePerGas==null){r.maxPriorityFeePerGas=n.maxPriorityFeePerGas}}}else if(n.gasPrice!=null){if(t){l.throwError("network does not support EIP-1559",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"})}if(r.gasPrice==null){r.gasPrice=n.gasPrice}r.type=0}else{l.throwError("failed to get consistent fee data",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"})}}else if(r.type===2){if(r.maxFeePerGas==null){r.maxFeePerGas=n.maxFeePerGas}if(r.maxPriorityFeePerGas==null){r.maxPriorityFeePerGas=n.maxPriorityFeePerGas}}e.label=5;case 5:if(r.nonce==null){r.nonce=this.getTransactionCount("pending")}if(r.gasLimit==null){r.gasLimit=this.estimateGas(r).catch(function(e){if(h.indexOf(e.code)>=0){throw e}return l.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",f.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:r})})}if(r.chainId==null){r.chainId=this.getChainId()}else{r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(function(e){if(e[1]!==0&&e[0]!==e[1]){l.throwArgumentError("chainId address mismatch","transaction",a)}return e[0]})}return[4,(0,c.resolveProperties)(r)];case 6:return[2,e.sent()]}})})};r.prototype._checkProvider=function(e){if(!this.provider){l.throwError("missing provider",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}};r.isSigner=function(e){return!!(e&&e._isSigner)};return r}();t.Signer=a;var d=function(i){n(o,i);function o(e,r){var t=this.constructor;var n=this;l.checkNew(t,o);n=i.call(this)||this;(0,c.defineReadOnly)(n,"address",e);(0,c.defineReadOnly)(n,"provider",r||null);return n}o.prototype.getAddress=function(){return Promise.resolve(this.address)};o.prototype._fail=function(e,r){return Promise.resolve().then(function(){l.throwError(e,f.Logger.errors.UNSUPPORTED_OPERATION,{operation:r})})};o.prototype.signMessage=function(e){return this._fail("VoidSigner cannot sign messages","signMessage")};o.prototype.signTransaction=function(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")};o.prototype._signTypedData=function(e,r,t){return this._fail("VoidSigner cannot sign typed data","signTypedData")};o.prototype.connect=function(e){return new o(this.address,e)};return o}(a);t.VoidSigner=d},{"./_version":19,"@ethersproject/logger":55,"@ethersproject/properties":61}],21:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="address/5.5.0"},{}],22:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getCreate2Address=t.getContractAddress=t.getIcapAddress=t.isAddress=t.getAddress=void 0;var o=e("@ethersproject/bytes");var n=e("@ethersproject/bignumber");var a=e("@ethersproject/keccak256");var i=e("@ethersproject/rlp");var s=e("@ethersproject/logger");var u=e("./_version");var c=new s.Logger(u.version);function f(e){if(!(0,o.isHexString)(e,20)){c.throwArgumentError("invalid address","address",e)}e=e.toLowerCase();var r=e.substring(2).split("");var t=new Uint8Array(40);for(var n=0;n<40;n++){t[n]=r[n].charCodeAt(0)}var i=(0,o.arrayify)((0,a.keccak256)(t));for(var n=0;n<40;n+=2){if(i[n>>1]>>4>=8){r[n]=r[n].toUpperCase()}if((i[n>>1]&15)>=8){r[n+1]=r[n+1].toUpperCase()}}return"0x"+r.join("")}var l=9007199254740991;function h(e){if(Math.log10){return Math.log10(e)}return Math.log(e)/Math.LN10}var d={};for(var p=0;p<10;p++){d[String(p)]=String(p)}for(var p=0;p<26;p++){d[String.fromCharCode(65+p)]=String(10+p)}var v=Math.floor(h(l));function b(e){e=e.toUpperCase();e=e.substring(4)+e.substring(0,2)+"00";var r=e.split("").map(function(e){return d[e]}).join("");while(r.length>=v){var t=r.substring(0,v);r=parseInt(t,10)%97+r.substring(t.length)}var n=String(98-parseInt(r,10)%97);while(n.length<2){n="0"+n}return n}function g(e){var r=null;if(typeof e!=="string"){c.throwArgumentError("invalid address","address",e)}if(e.match(/^(0x)?[0-9a-fA-F]{40}$/)){if(e.substring(0,2)!=="0x"){e="0x"+e}r=f(e);if(e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&r!==e){c.throwArgumentError("bad address checksum","address",e)}}else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){if(e.substring(2,4)!==b(e)){c.throwArgumentError("bad icap checksum","address",e)}r=(0,n._base36To16)(e.substring(4));while(r.length<40){r="0"+r}r=f("0x"+r)}else{c.throwArgumentError("invalid address","address",e)}return r}t.getAddress=g;function m(e){try{g(e);return true}catch(e){}return false}t.isAddress=m;function y(e){var r=(0,n._base16To36)(g(e).substring(2)).toUpperCase();while(r.length<30){r="0"+r}return"XE"+b("XE00"+r)+r}t.getIcapAddress=y;function w(r){var e=null;try{e=g(r.from)}catch(e){c.throwArgumentError("missing from address","transaction",r)}var t=(0,o.stripZeros)((0,o.arrayify)(n.BigNumber.from(r.nonce).toHexString()));return g((0,o.hexDataSlice)((0,a.keccak256)((0,i.encode)([e,t])),12))}t.getContractAddress=w;function _(e,r,t){if((0,o.hexDataLength)(r)!==32){c.throwArgumentError("salt must be 32 bytes","salt",r)}if((0,o.hexDataLength)(t)!==32){c.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t)}return g((0,o.hexDataSlice)((0,a.keccak256)((0,o.concat)(["0xff",g(e),r,t])),12))}t.getCreate2Address=_},{"./_version":21,"@ethersproject/bignumber":29,"@ethersproject/bytes":31,"@ethersproject/keccak256":53,"@ethersproject/logger":55,"@ethersproject/rlp":85}],23:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.encode=t.decode=void 0;var n=e("@ethersproject/bytes");function i(e){e=atob(e);var r=[];for(var t=0;t<e.length;t++){r.push(e.charCodeAt(t))}return(0,n.arrayify)(r)}t.decode=i;function o(e){e=(0,n.arrayify)(e);var r="";for(var t=0;t<e.length;t++){r+=String.fromCharCode(e[t])}return btoa(r)}t.encode=o},{"@ethersproject/bytes":31}],24:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.encode=t.decode=void 0;var n=e("./base64");Object.defineProperty(t,"decode",{enumerable:true,get:function(){return n.decode}});Object.defineProperty(t,"encode",{enumerable:true,get:function(){return n.encode}})},{"./base64":23}],25:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Base58=t.Base32=t.BaseX=void 0;var c=e("@ethersproject/bytes");var n=e("@ethersproject/properties");var i=function(){function e(e){(0,n.defineReadOnly)(this,"alphabet",e);(0,n.defineReadOnly)(this,"base",e.length);(0,n.defineReadOnly)(this,"_alphabetMap",{});(0,n.defineReadOnly)(this,"_leader",e.charAt(0));for(var r=0;r<e.length;r++){this._alphabetMap[e.charAt(r)]=r}}e.prototype.encode=function(e){var r=(0,c.arrayify)(e);if(r.length===0){return""}var t=[0];for(var n=0;n<r.length;++n){var i=r[n];for(var o=0;o<t.length;++o){i+=t[o]<<8;t[o]=i%this.base;i=i/this.base|0}while(i>0){t.push(i%this.base);i=i/this.base|0}}var a="";for(var s=0;r[s]===0&&s<r.length-1;++s){a+=this._leader}for(var u=t.length-1;u>=0;--u){a+=this.alphabet[t[u]]}return a};e.prototype.decode=function(e){if(typeof e!=="string"){throw new TypeError("Expected String")}var r=[];if(e.length===0){return new Uint8Array(r)}r.push(0);for(var t=0;t<e.length;t++){var n=this._alphabetMap[e[t]];if(n===undefined){throw new Error("Non-base"+this.base+" character")}var i=n;for(var o=0;o<r.length;++o){i+=r[o]*this.base;r[o]=i&255;i>>=8}while(i>0){r.push(i&255);i>>=8}}for(var a=0;e[a]===this._leader&&a<e.length-1;++a){r.push(0)}return(0,c.arrayify)(new Uint8Array(r.reverse()))};return e}();t.BaseX=i;var o=new i("abcdefghijklmnopqrstuvwxyz234567");t.Base32=o;var a=new i("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");t.Base58=a},{"@ethersproject/bytes":31,"@ethersproject/properties":61}],26:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="bignumber/5.5.0"},{}],27:[function(e,r,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t._base16To36=t._base36To16=t.BigNumber=t.isBigNumberish=void 0;var i=n(e("bn.js"));var o=i.default.BN;var a=e("@ethersproject/bytes");var s=e("@ethersproject/logger");var u=e("./_version");var c=new s.Logger(u.version);var f={};var l=9007199254740991;function h(e){return e!=null&&(p.isBigNumber(e)||typeof e==="number"&&e%1===0||typeof e==="string"&&!!e.match(/^-?[0-9]+$/)||(0,a.isHexString)(e)||typeof e==="bigint"||(0,a.isBytes)(e))}t.isBigNumberish=h;var d=false;var p=function(){function n(e,r){var t=this.constructor;c.checkNew(t,n);if(e!==f){c.throwError("cannot call constructor directly; use BigNumber.from",s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"})}this._hex=r;this._isBigNumber=true;Object.freeze(this)}n.prototype.fromTwos=function(e){return b(g(this).fromTwos(e))};n.prototype.toTwos=function(e){return b(g(this).toTwos(e))};n.prototype.abs=function(){if(this._hex[0]==="-"){return n.from(this._hex.substring(1))}return this};n.prototype.add=function(e){return b(g(this).add(g(e)))};n.prototype.sub=function(e){return b(g(this).sub(g(e)))};n.prototype.div=function(e){var r=n.from(e);if(r.isZero()){m("division by zero","div")}return b(g(this).div(g(e)))};n.prototype.mul=function(e){return b(g(this).mul(g(e)))};n.prototype.mod=function(e){var r=g(e);if(r.isNeg()){m("cannot modulo negative values","mod")}return b(g(this).umod(r))};n.prototype.pow=function(e){var r=g(e);if(r.isNeg()){m("cannot raise to negative values","pow")}return b(g(this).pow(r))};n.prototype.and=function(e){var r=g(e);if(this.isNegative()||r.isNeg()){m("cannot 'and' negative values","and")}return b(g(this).and(r))};n.prototype.or=function(e){var r=g(e);if(this.isNegative()||r.isNeg()){m("cannot 'or' negative values","or")}return b(g(this).or(r))};n.prototype.xor=function(e){var r=g(e);if(this.isNegative()||r.isNeg()){m("cannot 'xor' negative values","xor")}return b(g(this).xor(r))};n.prototype.mask=function(e){if(this.isNegative()||e<0){m("cannot mask negative values","mask")}return b(g(this).maskn(e))};n.prototype.shl=function(e){if(this.isNegative()||e<0){m("cannot shift negative values","shl")}return b(g(this).shln(e))};n.prototype.shr=function(e){if(this.isNegative()||e<0){m("cannot shift negative values","shr")}return b(g(this).shrn(e))};n.prototype.eq=function(e){return g(this).eq(g(e))};n.prototype.lt=function(e){return g(this).lt(g(e))};n.prototype.lte=function(e){return g(this).lte(g(e))};n.prototype.gt=function(e){return g(this).gt(g(e))};n.prototype.gte=function(e){return g(this).gte(g(e))};n.prototype.isNegative=function(){return this._hex[0]==="-"};n.prototype.isZero=function(){return g(this).isZero()};n.prototype.toNumber=function(){try{return g(this).toNumber()}catch(e){m("overflow","toNumber",this.toString())}return null};n.prototype.toBigInt=function(){try{return BigInt(this.toString())}catch(e){}return c.throwError("this platform does not support BigInt",s.Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})};n.prototype.toString=function(){if(arguments.length>0){if(arguments[0]===10){if(!d){d=true;c.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")}}else if(arguments[0]===16){c.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",s.Logger.errors.UNEXPECTED_ARGUMENT,{})}else{c.throwError("BigNumber.toString does not accept parameters",s.Logger.errors.UNEXPECTED_ARGUMENT,{})}}return g(this).toString(10)};n.prototype.toHexString=function(){return this._hex};n.prototype.toJSON=function(e){return{type:"BigNumber",hex:this.toHexString()}};n.from=function(e){if(e instanceof n){return e}if(typeof e==="string"){if(e.match(/^-?0x[0-9a-f]+$/i)){return new n(f,v(e))}if(e.match(/^-?[0-9]+$/)){return new n(f,v(new o(e)))}return c.throwArgumentError("invalid BigNumber string","value",e)}if(typeof e==="number"){if(e%1){m("underflow","BigNumber.from",e)}if(e>=l||e<=-l){m("overflow","BigNumber.from",e)}return n.from(String(e))}var r=e;if(typeof r==="bigint"){return n.from(r.toString())}if((0,a.isBytes)(r)){return n.from((0,a.hexlify)(r))}if(r){if(r.toHexString){var t=r.toHexString();if(typeof t==="string"){return n.from(t)}}else{var t=r._hex;if(t==null&&r.type==="BigNumber"){t=r.hex}if(typeof t==="string"){if((0,a.isHexString)(t)||t[0]==="-"&&(0,a.isHexString)(t.substring(1))){return n.from(t)}}}}return c.throwArgumentError("invalid BigNumber value","value",e)};n.isBigNumber=function(e){return!!(e&&e._isBigNumber)};return n}();t.BigNumber=p;function v(e){if(typeof e!=="string"){return v(e.toString(16))}if(e[0]==="-"){e=e.substring(1);if(e[0]==="-"){c.throwArgumentError("invalid hex","value",e)}e=v(e);if(e==="0x00"){return e}return"-"+e}if(e.substring(0,2)!=="0x"){e="0x"+e}if(e==="0x"){return"0x00"}if(e.length%2){e="0x0"+e.substring(2)}while(e.length>4&&e.substring(0,4)==="0x00"){e="0x"+e.substring(4)}return e}function b(e){return p.from(v(e))}function g(e){var r=p.from(e).toHexString();if(r[0]==="-"){return new o("-"+r.substring(3),16)}return new o(r.substring(2),16)}function m(e,r,t){var n={fault:e,operation:r};if(t!=null){n.value=t}return c.throwError(e,s.Logger.errors.NUMERIC_FAULT,n)}function y(e){return new o(e,36).toString(16)}t._base36To16=y;function w(e){return new o(e,16).toString(36)}t._base16To36=w},{"./_version":26,"@ethersproject/bytes":31,"@ethersproject/logger":55,"bn.js":138}],28:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.FixedNumber=t.FixedFormat=t.parseFixed=t.formatFixed=void 0;var s=e("@ethersproject/bytes");var o=e("@ethersproject/logger");var n=e("./_version");var f=new o.Logger(n.version);var l=e("./bignumber");var u={};var c=l.BigNumber.from(0);var h=l.BigNumber.from(-1);function d(e,r,t,n){var i={fault:r,operation:t};if(n!==undefined){i.value=n}return f.throwError(e,o.Logger.errors.NUMERIC_FAULT,i)}var i="0";while(i.length<256){i+=i}function p(e){if(typeof e!=="number"){try{e=l.BigNumber.from(e).toNumber()}catch(e){}}if(typeof e==="number"&&e>=0&&e<=256&&!(e%1)){return"1"+i.substring(0,e)}return f.throwArgumentError("invalid decimal size","decimals",e)}function v(e,r){if(r==null){r=0}var t=p(r);e=l.BigNumber.from(e);var n=e.lt(c);if(n){e=e.mul(h)}var i=e.mod(t).toString();while(i.length<t.length-1){i="0"+i}i=i.match(/^([0-9]*[1-9]|0)(0*)/)[1];var o=e.div(t).toString();if(t.length===1){e=o}else{e=o+"."+i}if(n){e="-"+e}return e}t.formatFixed=v;function b(e,r){if(r==null){r=0}var t=p(r);if(typeof e!=="string"||!e.match(/^-?[0-9.]+$/)){f.throwArgumentError("invalid decimal value","value",e)}var n=e.substring(0,1)==="-";if(n){e=e.substring(1)}if(e==="."){f.throwArgumentError("missing value","value",e)}var i=e.split(".");if(i.length>2){f.throwArgumentError("too many decimal points","value",e)}var o=i[0],a=i[1];if(!o){o="0"}if(!a){a="0"}while(a[a.length-1]==="0"){a=a.substring(0,a.length-1)}if(a.length>t.length-1){d("fractional component exceeds decimals","underflow","parseFixed")}if(a===""){a="0"}while(a.length<t.length-1){a+="0"}var s=l.BigNumber.from(o);var u=l.BigNumber.from(a);var c=s.mul(t).add(u);if(n){c=c.mul(h)}return c}t.parseFixed=b;var g=function(){function a(e,r,t,n){if(e!==u){f.throwError("cannot use FixedFormat constructor; use FixedFormat.from",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"})}this.signed=r;this.width=t;this.decimals=n;this.name=(r?"":"u")+"fixed"+String(t)+"x"+String(n);this._multiplier=p(n);Object.freeze(this)}a.from=function(n){if(n instanceof a){return n}if(typeof n==="number"){n="fixed128x"+n}var e=true;var r=128;var t=18;if(typeof n==="string"){if(n==="fixed"){}else if(n==="ufixed"){e=false}else{var i=n.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);if(!i){f.throwArgumentError("invalid fixed format","format",n)}e=i[1]!=="u";r=parseInt(i[2]);t=parseInt(i[3])}}else if(n){var o=function(e,r,t){if(n[e]==null){return t}if(typeof n[e]!==r){f.throwArgumentError("invalid fixed format ("+e+" not "+r+")","format."+e,n[e])}return n[e]};e=o("signed","boolean",e);r=o("width","number",r);t=o("decimals","number",t)}if(r%8){f.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",r)}if(t>80){f.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",t)}return new a(u,e,r,t)};return a}();t.FixedFormat=g;var a=function(){function a(e,r,t,n){var i=this.constructor;f.checkNew(i,a);if(e!==u){f.throwError("cannot use FixedNumber constructor; use FixedNumber.from",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"})}this.format=n;this._hex=r;this._value=t;this._isFixedNumber=true;Object.freeze(this)}a.prototype._checkFormat=function(e){if(this.format.name!==e.format.name){f.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}};a.prototype.addUnsafe=function(e){this._checkFormat(e);var r=b(this._value,this.format.decimals);var t=b(e._value,e.format.decimals);return a.fromValue(r.add(t),this.format.decimals,this.format)};a.prototype.subUnsafe=function(e){this._checkFormat(e);var r=b(this._value,this.format.decimals);var t=b(e._value,e.format.decimals);return a.fromValue(r.sub(t),this.format.decimals,this.format)};a.prototype.mulUnsafe=function(e){this._checkFormat(e);var r=b(this._value,this.format.decimals);var t=b(e._value,e.format.decimals);return a.fromValue(r.mul(t).div(this.format._multiplier),this.format.decimals,this.format)};a.prototype.divUnsafe=function(e){this._checkFormat(e);var r=b(this._value,this.format.decimals);var t=b(e._value,e.format.decimals);return a.fromValue(r.mul(this.format._multiplier).div(t),this.format.decimals,this.format)};a.prototype.floor=function(){var e=this.toString().split(".");if(e.length===1){e.push("0")}var r=a.from(e[0],this.format);var t=!e[1].match(/^(0*)$/);if(this.isNegative()&&t){r=r.subUnsafe(m.toFormat(r.format))}return r};a.prototype.ceiling=function(){var e=this.toString().split(".");if(e.length===1){e.push("0")}var r=a.from(e[0],this.format);var t=!e[1].match(/^(0*)$/);if(!this.isNegative()&&t){r=r.addUnsafe(m.toFormat(r.format))}return r};a.prototype.round=function(e){if(e==null){e=0}var r=this.toString().split(".");if(r.length===1){r.push("0")}if(e<0||e>80||e%1){f.throwArgumentError("invalid decimal count","decimals",e)}if(r[1].length<=e){return this}var t=a.from("1"+i.substring(0,e),this.format);var n=y.toFormat(this.format);return this.mulUnsafe(t).addUnsafe(n).floor().divUnsafe(t)};a.prototype.isZero=function(){return this._value==="0.0"||this._value==="0"};a.prototype.isNegative=function(){return this._value[0]==="-"};a.prototype.toString=function(){return this._value};a.prototype.toHexString=function(e){if(e==null){return this._hex}if(e%8){f.throwArgumentError("invalid byte width","width",e)}var r=l.BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,s.hexZeroPad)(r,e/8)};a.prototype.toUnsafeFloat=function(){return parseFloat(this.toString())};a.prototype.toFormat=function(e){return a.fromString(this._value,e)};a.fromValue=function(e,r,t){if(t==null&&r!=null&&!(0,l.isBigNumberish)(r)){t=r;r=null}if(r==null){r=0}if(t==null){t="fixed"}return a.fromString(v(e,r),g.from(t))};a.fromString=function(e,r){if(r==null){r="fixed"}var t=g.from(r);var n=b(e,t.decimals);if(!t.signed&&n.lt(c)){d("unsigned value cannot be negative","overflow","value",e)}var i=null;if(t.signed){i=n.toTwos(t.width).toHexString()}else{i=n.toHexString();i=(0,s.hexZeroPad)(i,t.width/8)}var o=v(n,t.decimals);return new a(u,i,o,t)};a.fromBytes=function(e,r){if(r==null){r="fixed"}var t=g.from(r);if((0,s.arrayify)(e).length>t.width/8){throw new Error("overflow")}var n=l.BigNumber.from(e);if(t.signed){n=n.fromTwos(t.width)}var i=n.toTwos((t.signed?0:1)+t.width).toHexString();var o=v(n,t.decimals);return new a(u,i,o,t)};a.from=function(e,r){if(typeof e==="string"){return a.fromString(e,r)}if((0,s.isBytes)(e)){return a.fromBytes(e,r)}try{return a.fromValue(e,0,r)}catch(e){if(e.code!==o.Logger.errors.INVALID_ARGUMENT){throw e}}return f.throwArgumentError("invalid FixedNumber value","value",e)};a.isFixedNumber=function(e){return!!(e&&e._isFixedNumber)};return a}();t.FixedNumber=a;var m=a.from(1);var y=a.from("0.5")},{"./_version":26,"./bignumber":27,"@ethersproject/bytes":31,"@ethersproject/logger":55}],29:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t._base36To16=t._base16To36=t.parseFixed=t.FixedNumber=t.FixedFormat=t.formatFixed=t.BigNumber=void 0;var n=e("./bignumber");Object.defineProperty(t,"BigNumber",{enumerable:true,get:function(){return n.BigNumber}});var i=e("./fixednumber");Object.defineProperty(t,"formatFixed",{enumerable:true,get:function(){return i.formatFixed}});Object.defineProperty(t,"FixedFormat",{enumerable:true,get:function(){return i.FixedFormat}});Object.defineProperty(t,"FixedNumber",{enumerable:true,get:function(){return i.FixedNumber}});Object.defineProperty(t,"parseFixed",{enumerable:true,get:function(){return i.parseFixed}});var o=e("./bignumber");Object.defineProperty(t,"_base16To36",{enumerable:true,get:function(){return o._base16To36}});Object.defineProperty(t,"_base36To16",{enumerable:true,get:function(){return o._base36To16}})},{"./bignumber":27,"./fixednumber":28}],30:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="bytes/5.5.0"},{}],31:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.joinSignature=t.splitSignature=t.hexZeroPad=t.hexStripZeros=t.hexValue=t.hexConcat=t.hexDataSlice=t.hexDataLength=t.hexlify=t.isHexString=t.zeroPad=t.stripZeros=t.concat=t.arrayify=t.isBytes=t.isBytesLike=void 0;var n=e("@ethersproject/logger");var i=e("./_version");var c=new n.Logger(i.version);function a(e){return!!e.toHexString}function o(r){if(r.slice){return r}r.slice=function(){var e=Array.prototype.slice.call(arguments);return o(new Uint8Array(Array.prototype.slice.apply(r,e)))};return r}function f(e){return v(e)&&!(e.length%2)||u(e)}t.isBytesLike=f;function s(e){return typeof e==="number"&&e==e&&e%1===0}function u(e){if(e==null){return false}if(e.constructor===Uint8Array){return true}if(typeof e==="string"){return false}if(!s(e.length)||e.length<0){return false}for(var r=0;r<e.length;r++){var t=e[r];if(!s(t)||t<0||t>=256){return false}}return true}t.isBytes=u;function l(e,r){if(!r){r={}}if(typeof e==="number"){c.checkSafeUint53(e,"invalid arrayify value");var t=[];while(e){t.unshift(e&255);e=parseInt(String(e/256))}if(t.length===0){t.push(0)}return o(new Uint8Array(t))}if(r.allowMissingPrefix&&typeof e==="string"&&e.substring(0,2)!=="0x"){e="0x"+e}if(a(e)){e=e.toHexString()}if(v(e)){var n=e.substring(2);if(n.length%2){if(r.hexPad==="left"){n="0x0"+n.substring(2)}else if(r.hexPad==="right"){n+="0"}else{c.throwArgumentError("hex data is odd-length","value",e)}}var t=[];for(var i=0;i<n.length;i+=2){t.push(parseInt(n.substring(i,i+2),16))}return o(new Uint8Array(t))}if(u(e)){return o(new Uint8Array(e))}return c.throwArgumentError("invalid arrayify value","value",e)}t.arrayify=l;function h(e){var r=e.map(function(e){return l(e)});var t=r.reduce(function(e,r){return e+r.length},0);var n=new Uint8Array(t);r.reduce(function(e,r){n.set(r,e);return e+r.length},0);return o(n)}t.concat=h;function d(e){var r=l(e);if(r.length===0){return r}var t=0;while(t<r.length&&r[t]===0){t++}if(t){r=r.slice(t)}return r}t.stripZeros=d;function p(e,r){e=l(e);if(e.length>r){c.throwArgumentError("value out of range","value",arguments[0])}var t=new Uint8Array(r);t.set(e,r-e.length);return o(t)}t.zeroPad=p;function v(e,r){if(typeof e!=="string"||!e.match(/^0x[0-9A-Fa-f]*$/)){return false}if(r&&e.length!==2+2*r){return false}return true}t.isHexString=v;var b="0123456789abcdef";function g(e,r){if(!r){r={}}if(typeof e==="number"){c.checkSafeUint53(e,"invalid hexlify value");var t="";while(e){t=b[e&15]+t;e=Math.floor(e/16)}if(t.length){if(t.length%2){t="0"+t}return"0x"+t}return"0x00"}if(typeof e==="bigint"){e=e.toString(16);if(e.length%2){return"0x0"+e}return"0x"+e}if(r.allowMissingPrefix&&typeof e==="string"&&e.substring(0,2)!=="0x"){e="0x"+e}if(a(e)){return e.toHexString()}if(v(e)){if(e.length%2){if(r.hexPad==="left"){e="0x0"+e.substring(2)}else if(r.hexPad==="right"){e+="0"}else{c.throwArgumentError("hex data is odd-length","value",e)}}return e.toLowerCase()}if(u(e)){var n="0x";for(var i=0;i<e.length;i++){var o=e[i];n+=b[(o&240)>>4]+b[o&15]}return n}return c.throwArgumentError("invalid hexlify value","value",e)}t.hexlify=g;function m(e){if(typeof e!=="string"){e=g(e)}else if(!v(e)||e.length%2){return null}return(e.length-2)/2}t.hexDataLength=m;function y(e,r,t){if(typeof e!=="string"){e=g(e)}else if(!v(e)||e.length%2){c.throwArgumentError("invalid hexData","value",e)}r=2+2*r;if(t!=null){return"0x"+e.substring(r,2+2*t)}return"0x"+e.substring(r)}t.hexDataSlice=y;function w(e){var r="0x";e.forEach(function(e){r+=g(e).substring(2)});return r}t.hexConcat=w;function _(e){var r=S(g(e,{hexPad:"left"}));if(r==="0x"){return"0x0"}return r}t.hexValue=_;function S(e){if(typeof e!=="string"){e=g(e)}if(!v(e)){c.throwArgumentError("invalid hex string","value",e)}e=e.substring(2);var r=0;while(r<e.length&&e[r]==="0"){r++}return"0x"+e.substring(r)}t.hexStripZeros=S;function A(e,r){if(typeof e!=="string"){e=g(e)}else if(!v(e)){c.throwArgumentError("invalid hex string","value",e)}if(e.length>2*r+2){c.throwArgumentError("value out of range","value",arguments[1])}while(e.length<2*r+2){e="0x0"+e.substring(2)}return e}t.hexZeroPad=A;function E(e){var r={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0};if(f(e)){var t=l(e);if(t.length!==65){c.throwArgumentError("invalid signature string; must be 65 bytes","signature",e)}r.r=g(t.slice(0,32));r.s=g(t.slice(32,64));r.v=t[64];if(r.v<27){if(r.v===0||r.v===1){r.v+=27}else{c.throwArgumentError("signature invalid v byte","signature",e)}}r.recoveryParam=1-r.v%2;if(r.recoveryParam){t[32]|=128}r._vs=g(t.slice(32,64))}else{r.r=e.r;r.s=e.s;r.v=e.v;r.recoveryParam=e.recoveryParam;r._vs=e._vs;if(r._vs!=null){var n=p(l(r._vs),32);r._vs=g(n);var i=n[0]>=128?1:0;if(r.recoveryParam==null){r.recoveryParam=i}else if(r.recoveryParam!==i){c.throwArgumentError("signature recoveryParam mismatch _vs","signature",e)}n[0]&=127;var o=g(n);if(r.s==null){r.s=o}else if(r.s!==o){c.throwArgumentError("signature v mismatch _vs","signature",e)}}if(r.recoveryParam==null){if(r.v==null){c.throwArgumentError("signature missing v and recoveryParam","signature",e)}else if(r.v===0||r.v===1){r.recoveryParam=r.v}else{r.recoveryParam=1-r.v%2}}else{if(r.v==null){r.v=27+r.recoveryParam}else{var a=r.v===0||r.v===1?r.v:1-r.v%2;if(r.recoveryParam!==a){c.throwArgumentError("signature recoveryParam mismatch v","signature",e)}}}if(r.r==null||!v(r.r)){c.throwArgumentError("signature missing or invalid r","signature",e)}else{r.r=A(r.r,32)}if(r.s==null||!v(r.s)){c.throwArgumentError("signature missing or invalid s","signature",e)}else{r.s=A(r.s,32)}var s=l(r.s);if(s[0]>=128){c.throwArgumentError("signature s out of range","signature",e)}if(r.recoveryParam){s[0]|=128}var u=g(s);if(r._vs){if(!v(r._vs)){c.throwArgumentError("signature invalid _vs","signature",e)}r._vs=A(r._vs,32)}if(r._vs==null){r._vs=u}else if(r._vs!==u){c.throwArgumentError("signature _vs mismatch v and s","signature",e)}}return r}t.splitSignature=E;function M(e){e=E(e);return g(h([e.r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}t.joinSignature=M},{"./_version":30,"@ethersproject/logger":55}],32:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.AddressZero=void 0;t.AddressZero="0x0000000000000000000000000000000000000000"},{}],33:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.MaxInt256=t.MinInt256=t.MaxUint256=t.WeiPerEther=t.Two=t.One=t.Zero=t.NegativeOne=void 0;var n=e("@ethersproject/bignumber");var i=n.BigNumber.from(-1);t.NegativeOne=i;var o=n.BigNumber.from(0);t.Zero=o;var a=n.BigNumber.from(1);t.One=a;var s=n.BigNumber.from(2);t.Two=s;var u=n.BigNumber.from("1000000000000000000");t.WeiPerEther=u;var c=n.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");t.MaxUint256=c;var f=n.BigNumber.from("-0x8000000000000000000000000000000000000000000000000000000000000000");t.MinInt256=f;var l=n.BigNumber.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");t.MaxInt256=l},{"@ethersproject/bignumber":29}],34:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.HashZero=void 0;t.HashZero="0x0000000000000000000000000000000000000000000000000000000000000000"},{}],35:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EtherSymbol=t.HashZero=t.MaxInt256=t.MinInt256=t.MaxUint256=t.WeiPerEther=t.Two=t.One=t.Zero=t.NegativeOne=t.AddressZero=void 0;var n=e("./addresses");Object.defineProperty(t,"AddressZero",{enumerable:true,get:function(){return n.AddressZero}});var i=e("./bignumbers");Object.defineProperty(t,"NegativeOne",{enumerable:true,get:function(){return i.NegativeOne}});Object.defineProperty(t,"Zero",{enumerable:true,get:function(){return i.Zero}});Object.defineProperty(t,"One",{enumerable:true,get:function(){return i.One}});Object.defineProperty(t,"Two",{enumerable:true,get:function(){return i.Two}});Object.defineProperty(t,"WeiPerEther",{enumerable:true,get:function(){return i.WeiPerEther}});Object.defineProperty(t,"MaxUint256",{enumerable:true,get:function(){return i.MaxUint256}});Object.defineProperty(t,"MinInt256",{enumerable:true,get:function(){return i.MinInt256}});Object.defineProperty(t,"MaxInt256",{enumerable:true,get:function(){return i.MaxInt256}});var o=e("./hashes");Object.defineProperty(t,"HashZero",{enumerable:true,get:function(){return o.HashZero}});var a=e("./strings");Object.defineProperty(t,"EtherSymbol",{enumerable:true,get:function(){return a.EtherSymbol}})},{"./addresses":32,"./bignumbers":33,"./hashes":34,"./strings":36}],36:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EtherSymbol=void 0;t.EtherSymbol="Ξ"},{}],37:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="contracts/5.5.0"},{}],38:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();var v=this&&this.__awaiter||function(e,a,t,s){function u(r){return r instanceof t?r:new t(function(e){e(r)})}return new(t||(t=Promise))(function(r,t){function n(e){try{o(s.next(e))}catch(e){t(e)}}function i(e){try{o(s["throw"](e))}catch(e){t(e)}}function o(e){e.done?r(e.value):u(e.value).then(n,i)}o((s=s.apply(e,a||[])).next())})};var b=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(e){return u([r,e])}}function u(r){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(a=r[0]&2?o["return"]:r[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;if(o=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;o=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){n.label=r[1];break}if(r[0]===6&&n.label<a[1]){n.label=a[1];a=r;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(r);break}if(a[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];o=0}finally{i=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var a=this&&this.__spreadArray||function(e,r,t){if(t||arguments.length===2)for(var n=0,i=r.length,o;n<i;n++){if(o||!(n in r)){if(!o)o=Array.prototype.slice.call(r,0,n);o[n]=r[n]}}return e.concat(o||Array.prototype.slice.call(r))};Object.defineProperty(t,"__esModule",{value:true});t.ContractFactory=t.Contract=t.BaseContract=void 0;var i=e("@ethersproject/abi");var u=e("@ethersproject/abstract-provider");var c=e("@ethersproject/abstract-signer");var g=e("@ethersproject/address");var m=e("@ethersproject/bignumber");var y=e("@ethersproject/bytes");var w=e("@ethersproject/properties");var _=e("@ethersproject/transactions");var S=e("@ethersproject/logger");var o=e("./_version");var A=new S.Logger(o.version);var s={chainId:true,data:true,from:true,gasLimit:true,gasPrice:true,nonce:true,to:true,value:true,type:true,accessList:true,maxFeePerGas:true,maxPriorityFeePerGas:true,customData:true};function E(n,i){return v(this,void 0,void 0,function(){var r,t;return b(this,function(e){switch(e.label){case 0:return[4,i];case 1:r=e.sent();if(typeof r!=="string"){A.throwArgumentError("invalid address or ENS name","name",r)}try{return[2,(0,g.getAddress)(r)]}catch(e){}if(!n){A.throwError("a provider or signer is needed to resolve ENS names",S.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"})}return[4,n.resolveName(r)];case 2:t=e.sent();if(t==null){A.throwArgumentError("resolver or addr is not configured for ENS name","name",r)}return[2,t]}})})}function M(t,n,r){return v(this,void 0,void 0,function(){return b(this,function(e){switch(e.label){case 0:if(!Array.isArray(r))return[3,2];return[4,Promise.all(r.map(function(e,r){return M(t,Array.isArray(n)?n[r]:n[e.name],e)}))];case 1:return[2,e.sent()];case 2:if(!(r.type==="address"))return[3,4];return[4,E(t,n)];case 3:return[2,e.sent()];case 4:if(!(r.type==="tuple"))return[3,6];return[4,M(t,n,r.components)];case 5:return[2,e.sent()];case 6:if(!(r.baseType==="array"))return[3,8];if(!Array.isArray(n)){return[2,Promise.reject(A.makeError("invalid value for array",S.Logger.errors.INVALID_ARGUMENT,{argument:"value",value:n}))]}return[4,Promise.all(n.map(function(e){return M(t,e,r.arrayChildren)}))];case 7:return[2,e.sent()];case 8:return[2,n]}})})}function l(h,d,p){return v(this,void 0,void 0,function(){var r,t,n,i,o,a,s,u,c,f;var l=this;return b(this,function(e){switch(e.label){case 0:r={};if(p.length===d.inputs.length+1&&typeof p[p.length-1]==="object"){r=(0,w.shallowCopy)(p.pop())}A.checkArgumentCount(p.length,d.inputs.length,"passed to contract");if(h.signer){if(r.from){r.from=(0,w.resolveProperties)({override:E(h.signer,r.from),signer:h.signer.getAddress()}).then(function(r){return v(l,void 0,void 0,function(){return b(this,function(e){if((0,g.getAddress)(r.signer)!==r.override){A.throwError("Contract with a Signer cannot override from",S.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"})}return[2,r.override]})})})}else{r.from=h.signer.getAddress()}}else if(r.from){r.from=E(h.provider,r.from)}return[4,(0,w.resolveProperties)({args:M(h.signer||h.provider,p,d.inputs),address:h.resolvedAddress,overrides:(0,w.resolveProperties)(r)||{}})];case 1:t=e.sent();n=h.interface.encodeFunctionData(d,t.args);i={data:n,to:t.address};o=t.overrides;if(o.nonce!=null){i.nonce=m.BigNumber.from(o.nonce).toNumber()}if(o.gasLimit!=null){i.gasLimit=m.BigNumber.from(o.gasLimit)}if(o.gasPrice!=null){i.gasPrice=m.BigNumber.from(o.gasPrice)}if(o.maxFeePerGas!=null){i.maxFeePerGas=m.BigNumber.from(o.maxFeePerGas)}if(o.maxPriorityFeePerGas!=null){i.maxPriorityFeePerGas=m.BigNumber.from(o.maxPriorityFeePerGas)}if(o.from!=null){i.from=o.from}if(o.type!=null){i.type=o.type}if(o.accessList!=null){i.accessList=(0,_.accessListify)(o.accessList)}if(i.gasLimit==null&&d.gas!=null){a=21e3;s=(0,y.arrayify)(n);for(u=0;u<s.length;u++){a+=4;if(s[u]){a+=64}}i.gasLimit=m.BigNumber.from(d.gas).add(a)}if(o.value){c=m.BigNumber.from(o.value);if(!c.isZero()&&!d.payable){A.throwError("non-payable method cannot override value",S.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:r.value})}i.value=c}if(o.customData){i.customData=(0,w.shallowCopy)(o.customData)}delete r.nonce;delete r.gasLimit;delete r.gasPrice;delete r.from;delete r.value;delete r.type;delete r.accessList;delete r.maxFeePerGas;delete r.maxPriorityFeePerGas;delete r.customData;f=Object.keys(r).filter(function(e){return r[e]!=null});if(f.length){A.throwError("cannot override "+f.map(function(e){return JSON.stringify(e)}).join(","),S.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:f})}return[2,i]}})})}function f(t,n){return function(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}return l(t,n,e)}}function h(n,i){var o=n.signer||n.provider;return function(){var t=[];for(var e=0;e<arguments.length;e++){t[e]=arguments[e]}return v(this,void 0,void 0,function(){var r;return b(this,function(e){switch(e.label){case 0:if(!o){A.throwError("estimate require a provider or signer",S.Logger.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"})}return[4,l(n,i,t)];case 1:r=e.sent();return[4,o.estimateGas(r)];case 2:return[2,e.sent()]}})})}}function d(i,e){var r=e.wait.bind(e);e.wait=function(e){return r(e).then(function(n){n.events=n.logs.map(function(e){var r=(0,w.deepCopy)(e);var t=null;try{t=i.interface.parseLog(e)}catch(e){}if(t){r.args=t.args;r.decode=function(e,r){return i.interface.decodeEventLog(t.eventFragment,e,r)};r.event=t.name;r.eventSignature=t.signature}r.removeListener=function(){return i.provider};r.getBlock=function(){return i.provider.getBlock(n.blockHash)};r.getTransaction=function(){return i.provider.getTransaction(n.transactionHash)};r.getTransactionReceipt=function(){return Promise.resolve(n)};return r});return n})}}function p(s,u,c){var f=s.signer||s.provider;return function(){var a=[];for(var e=0;e<arguments.length;e++){a[e]=arguments[e]}return v(this,void 0,void 0,function(){var r,t,n,i,o;return b(this,function(e){switch(e.label){case 0:r=undefined;if(!(a.length===u.inputs.length+1&&typeof a[a.length-1]==="object"))return[3,3];t=(0,w.shallowCopy)(a.pop());if(!(t.blockTag!=null))return[3,2];return[4,t.blockTag];case 1:r=e.sent();e.label=2;case 2:delete t.blockTag;a.push(t);e.label=3;case 3:if(!(s.deployTransaction!=null))return[3,5];return[4,s._deployed(r)];case 4:e.sent();e.label=5;case 5:return[4,l(s,u,a)];case 6:n=e.sent();return[4,f.call(n,r)];case 7:i=e.sent();try{o=s.interface.decodeFunctionResult(u,i);if(c&&u.outputs.length===1){o=o[0]}return[2,o]}catch(e){if(e.code===S.Logger.errors.CALL_EXCEPTION){e.address=s.address;e.args=a;e.transaction=n}throw e}return[2]}})})}}function P(i,o){return function(){var n=[];for(var e=0;e<arguments.length;e++){n[e]=arguments[e]}return v(this,void 0,void 0,function(){var r,t;return b(this,function(e){switch(e.label){case 0:if(!i.signer){A.throwError("sending a transaction requires a signer",S.Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"})}if(!(i.deployTransaction!=null))return[3,2];return[4,i._deployed()];case 1:e.sent();e.label=2;case 2:return[4,l(i,o,n)];case 3:r=e.sent();return[4,i.signer.sendTransaction(r)];case 4:t=e.sent();d(i,t);return[2,t]}})})}}function T(e,r,t){if(r.constant){return p(e,r,t)}return P(e,r)}function k(e){if(e.address&&(e.topics==null||e.topics.length===0)){return"*"}return(e.address||"*")+"@"+(e.topics?e.topics.map(function(e){if(Array.isArray(e)){return e.join("|")}return e}).join(":"):"")}var O=function(){function e(e,r){(0,w.defineReadOnly)(this,"tag",e);(0,w.defineReadOnly)(this,"filter",r);this._listeners=[]}e.prototype.addListener=function(e,r){this._listeners.push({listener:e,once:r})};e.prototype.removeListener=function(r){var t=false;this._listeners=this._listeners.filter(function(e){if(t||e.listener!==r){return true}t=true;return false})};e.prototype.removeAllListeners=function(){this._listeners=[]};e.prototype.listeners=function(){return this._listeners.map(function(e){return e.listener})};e.prototype.listenerCount=function(){return this._listeners.length};e.prototype.run=function(t){var n=this;var e=this.listenerCount();this._listeners=this._listeners.filter(function(e){var r=t.slice();setTimeout(function(){e.listener.apply(n,r)},0);return!e.once});return e};e.prototype.prepareEvent=function(e){};e.prototype.getEmit=function(e){return[e]};return e}();var B=function(e){n(r,e);function r(){return e.call(this,"error",null)||this}return r}(O);var C=function(s){n(e,s);function e(e,r,t,n){var i=this;var o={address:e};var a=r.getEventTopic(t);if(n){if(a!==n[0]){A.throwArgumentError("topic mismatch","topics",n)}o.topics=n.slice()}else{o.topics=[a]}i=s.call(this,k(o),o)||this;(0,w.defineReadOnly)(i,"address",e);(0,w.defineReadOnly)(i,"interface",r);(0,w.defineReadOnly)(i,"fragment",t);return i}e.prototype.prepareEvent=function(r){var t=this;s.prototype.prepareEvent.call(this,r);r.event=this.fragment.name;r.eventSignature=this.fragment.format();r.decode=function(e,r){return t.interface.decodeEventLog(t.fragment,e,r)};try{r.args=this.interface.decodeEventLog(this.fragment,r.data,r.topics)}catch(e){r.args=null;r.decodeError=e}};e.prototype.getEmit=function(e){var r=(0,i.checkResultErrors)(e.args);if(r.length){throw r[0].error}var t=(e.args||[]).slice();t.push(e);return t};return e}(O);var R=function(i){n(e,i);function e(e,r){var t=i.call(this,"*",{address:e})||this;(0,w.defineReadOnly)(t,"address",e);(0,w.defineReadOnly)(t,"interface",r);return t}e.prototype.prepareEvent=function(e){var t=this;i.prototype.prepareEvent.call(this,e);try{var n=this.interface.parseLog(e);e.event=n.name;e.eventSignature=n.signature;e.decode=function(e,r){return t.interface.decodeEventLog(n.eventFragment,e,r)};e.args=n.args}catch(e){}};return e}(O);var L=function(){function e(e,r,t){var n=this.constructor;var i=this;A.checkNew(n,F);(0,w.defineReadOnly)(this,"interface",(0,w.getStatic)(n,"getInterface")(r));if(t==null){(0,w.defineReadOnly)(this,"provider",null);(0,w.defineReadOnly)(this,"signer",null)}else if(c.Signer.isSigner(t)){(0,w.defineReadOnly)(this,"provider",t.provider||null);(0,w.defineReadOnly)(this,"signer",t)}else if(u.Provider.isProvider(t)){(0,w.defineReadOnly)(this,"provider",t);(0,w.defineReadOnly)(this,"signer",null)}else{A.throwArgumentError("invalid signer or provider","signerOrProvider",t)}(0,w.defineReadOnly)(this,"callStatic",{});(0,w.defineReadOnly)(this,"estimateGas",{});(0,w.defineReadOnly)(this,"functions",{});(0,w.defineReadOnly)(this,"populateTransaction",{});(0,w.defineReadOnly)(this,"filters",{});{var o={};Object.keys(this.interface.events).forEach(function(e){var t=i.interface.events[e];(0,w.defineReadOnly)(i.filters,e,function(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}return{address:i.address,topics:i.interface.encodeFilterTopics(t,e)}});if(!o[t.name]){o[t.name]=[]}o[t.name].push(e)});Object.keys(o).forEach(function(e){var r=o[e];if(r.length===1){(0,w.defineReadOnly)(i.filters,e,i.filters[r[0]])}else{A.warn("Duplicate definition of "+e+" ("+r.join(", ")+")")}})}(0,w.defineReadOnly)(this,"_runningEvents",{});(0,w.defineReadOnly)(this,"_wrappedEmits",{});if(e==null){A.throwArgumentError("invalid contract address or ENS name","addressOrName",e)}(0,w.defineReadOnly)(this,"address",e);if(this.provider){(0,w.defineReadOnly)(this,"resolvedAddress",E(this.provider,e))}else{try{(0,w.defineReadOnly)(this,"resolvedAddress",Promise.resolve((0,g.getAddress)(e)))}catch(e){A.throwError("provider is required to use ENS name as contract address",S.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}}var a={};var s={};Object.keys(this.interface.functions).forEach(function(e){var r=i.interface.functions[e];if(s[e]){A.warn("Duplicate ABI entry for "+JSON.stringify(e));return}s[e]=true;{var t=r.name;if(!a["%"+t]){a["%"+t]=[]}a["%"+t].push(e)}if(i[e]==null){(0,w.defineReadOnly)(i,e,T(i,r,true))}if(i.functions[e]==null){(0,w.defineReadOnly)(i.functions,e,T(i,r,false))}if(i.callStatic[e]==null){(0,w.defineReadOnly)(i.callStatic,e,p(i,r,true))}if(i.populateTransaction[e]==null){(0,w.defineReadOnly)(i.populateTransaction,e,f(i,r))}if(i.estimateGas[e]==null){(0,w.defineReadOnly)(i.estimateGas,e,h(i,r))}});Object.keys(a).forEach(function(e){var r=a[e];if(r.length>1){return}e=e.substring(1);var t=r[0];try{if(i[e]==null){(0,w.defineReadOnly)(i,e,i[t])}}catch(e){}if(i.functions[e]==null){(0,w.defineReadOnly)(i.functions,e,i.functions[t])}if(i.callStatic[e]==null){(0,w.defineReadOnly)(i.callStatic,e,i.callStatic[t])}if(i.populateTransaction[e]==null){(0,w.defineReadOnly)(i.populateTransaction,e,i.populateTransaction[t])}if(i.estimateGas[e]==null){(0,w.defineReadOnly)(i.estimateGas,e,i.estimateGas[t])}})}e.getContractAddress=function(e){return(0,g.getContractAddress)(e)};e.getInterface=function(e){if(i.Interface.isInterface(e)){return e}return new i.Interface(e)};e.prototype.deployed=function(){return this._deployed()};e.prototype._deployed=function(e){var r=this;if(!this._deployedPromise){if(this.deployTransaction){this._deployedPromise=this.deployTransaction.wait().then(function(){return r})}else{this._deployedPromise=this.provider.getCode(this.address,e).then(function(e){if(e==="0x"){A.throwError("contract not deployed",S.Logger.errors.UNSUPPORTED_OPERATION,{contractAddress:r.address,operation:"getDeployed"})}return r})}}return this._deployedPromise};e.prototype.fallback=function(e){var r=this;if(!this.signer){A.throwError("sending a transactions require a signer",S.Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"})}var t=(0,w.shallowCopy)(e||{});["from","to"].forEach(function(e){if(t[e]==null){return}A.throwError("cannot override "+e,S.Logger.errors.UNSUPPORTED_OPERATION,{operation:e})});t.to=this.resolvedAddress;return this.deployed().then(function(){return r.signer.sendTransaction(t)})};e.prototype.connect=function(e){if(typeof e==="string"){e=new c.VoidSigner(e,this.provider)}var r=new this.constructor(this.address,this.interface,e);if(this.deployTransaction){(0,w.defineReadOnly)(r,"deployTransaction",this.deployTransaction)}return r};e.prototype.attach=function(e){return new this.constructor(e,this.interface,this.signer||this.provider)};e.isIndexed=function(e){return i.Indexed.isIndexed(e)};e.prototype._normalizeRunningEvent=function(e){if(this._runningEvents[e.tag]){return this._runningEvents[e.tag]}return e};e.prototype._getRunningEvent=function(e){if(typeof e==="string"){if(e==="error"){return this._normalizeRunningEvent(new B)}if(e==="event"){return this._normalizeRunningEvent(new O("event",null))}if(e==="*"){return this._normalizeRunningEvent(new R(this.address,this.interface))}var r=this.interface.getEvent(e);return this._normalizeRunningEvent(new C(this.address,this.interface,r))}if(e.topics&&e.topics.length>0){try{var t=e.topics[0];if(typeof t!=="string"){throw new Error("invalid topic")}var r=this.interface.getEvent(t);return this._normalizeRunningEvent(new C(this.address,this.interface,r,e.topics))}catch(e){}var n={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new O(k(n),n))}return this._normalizeRunningEvent(new R(this.address,this.interface))};e.prototype._checkRunningEvents=function(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];var r=this._wrappedEmits[e.tag];if(r&&e.filter){this.provider.off(e.filter,r);delete this._wrappedEmits[e.tag]}}};e.prototype._wrapEvent=function(e,r,t){var n=this;var i=(0,w.deepCopy)(r);i.removeListener=function(){if(!t){return}e.removeListener(t);n._checkRunningEvents(e)};i.getBlock=function(){return n.provider.getBlock(r.blockHash)};i.getTransaction=function(){return n.provider.getTransaction(r.transactionHash)};i.getTransactionReceipt=function(){return n.provider.getTransactionReceipt(r.transactionHash)};e.prepareEvent(i);return i};e.prototype._addEventListener=function(n,i,e){var o=this;if(!this.provider){A.throwError("events require a provider or a signer with a provider",S.Logger.errors.UNSUPPORTED_OPERATION,{operation:"once"})}n.addListener(i,e);this._runningEvents[n.tag]=n;if(!this._wrappedEmits[n.tag]){var r=function(e){var r=o._wrapEvent(n,e,i);if(r.decodeError==null){try{var t=n.getEmit(r);o.emit.apply(o,a([n.filter],t,false))}catch(e){r.decodeError=e.error}}if(n.filter!=null){o.emit("event",r)}if(r.decodeError!=null){o.emit("error",r.decodeError,r)}};this._wrappedEmits[n.tag]=r;if(n.filter!=null){this.provider.on(n.filter,r)}}};e.prototype.queryFilter=function(e,r,t){var n=this;var i=this._getRunningEvent(e);var o=(0,w.shallowCopy)(i.filter);if(typeof r==="string"&&(0,y.isHexString)(r,32)){if(t!=null){A.throwArgumentError("cannot specify toBlock with blockhash","toBlock",t)}o.blockHash=r}else{o.fromBlock=r!=null?r:0;o.toBlock=t!=null?t:"latest"}return this.provider.getLogs(o).then(function(e){return e.map(function(e){return n._wrapEvent(i,e,null)})})};e.prototype.on=function(e,r){this._addEventListener(this._getRunningEvent(e),r,false);return this};e.prototype.once=function(e,r){this._addEventListener(this._getRunningEvent(e),r,true);return this};e.prototype.emit=function(e){var r=[];for(var t=1;t<arguments.length;t++){r[t-1]=arguments[t]}if(!this.provider){return false}var n=this._getRunningEvent(e);var i=n.run(r)>0;this._checkRunningEvents(n);return i};e.prototype.listenerCount=function(e){var t=this;if(!this.provider){return 0}if(e==null){return Object.keys(this._runningEvents).reduce(function(e,r){return e+t._runningEvents[r].listenerCount()},0)}return this._getRunningEvent(e).listenerCount()};e.prototype.listeners=function(e){if(!this.provider){return[]}if(e==null){var r=[];for(var t in this._runningEvents){this._runningEvents[t].listeners().forEach(function(e){r.push(e)})}return r}return this._getRunningEvent(e).listeners()};e.prototype.removeAllListeners=function(e){if(!this.provider){return this}if(e==null){for(var r in this._runningEvents){var t=this._runningEvents[r];t.removeAllListeners();this._checkRunningEvents(t)}return this}var n=this._getRunningEvent(e);n.removeAllListeners();this._checkRunningEvents(n);return this};e.prototype.off=function(e,r){if(!this.provider){return this}var t=this._getRunningEvent(e);t.removeListener(r);this._checkRunningEvents(t);return this};e.prototype.removeListener=function(e,r){return this.off(e,r)};return e}();t.BaseContract=L;var F=function(e){n(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r}(L);t.Contract=F;var j=function(){function e(e,r,t){var n=this.constructor;var i=null;if(typeof r==="string"){i=r}else if((0,y.isBytes)(r)){i=(0,y.hexlify)(r)}else if(r&&typeof r.object==="string"){i=r.object}else{i="!"}if(i.substring(0,2)!=="0x"){i="0x"+i}if(!(0,y.isHexString)(i)||i.length%2){A.throwArgumentError("invalid bytecode","bytecode",r)}if(t&&!c.Signer.isSigner(t)){A.throwArgumentError("invalid signer","signer",t)}(0,w.defineReadOnly)(this,"bytecode",i);(0,w.defineReadOnly)(this,"interface",(0,w.getStatic)(n,"getInterface")(e));(0,w.defineReadOnly)(this,"signer",t||null)}e.prototype.getDeployTransaction=function(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}var t={};if(e.length===this.interface.deploy.inputs.length+1&&typeof e[e.length-1]==="object"){t=(0,w.shallowCopy)(e.pop());for(var n in t){if(!s[n]){throw new Error("unknown transaction override "+n)}}}["data","from","to"].forEach(function(e){if(t[e]==null){return}A.throwError("cannot override "+e,S.Logger.errors.UNSUPPORTED_OPERATION,{operation:e})});if(t.value){var i=m.BigNumber.from(t.value);if(!i.isZero()&&!this.interface.deploy.payable){A.throwError("non-payable constructor cannot override value",S.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value})}}A.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");t.data=(0,y.hexlify)((0,y.concat)([this.bytecode,this.interface.encodeDeploy(e)]));return t};e.prototype.deploy=function(){var s=[];for(var e=0;e<arguments.length;e++){s[e]=arguments[e]}return v(this,void 0,void 0,function(){var r,t,n,i,o,a;return b(this,function(e){switch(e.label){case 0:r={};if(s.length===this.interface.deploy.inputs.length+1){r=s.pop()}A.checkArgumentCount(s.length,this.interface.deploy.inputs.length," in Contract constructor");return[4,M(this.signer,s,this.interface.deploy.inputs)];case 1:t=e.sent();t.push(r);n=this.getDeployTransaction.apply(this,t);return[4,this.signer.sendTransaction(n)];case 2:i=e.sent();o=(0,w.getStatic)(this.constructor,"getContractAddress")(i);a=(0,w.getStatic)(this.constructor,"getContract")(o,this.interface,this.signer);d(a,i);(0,w.defineReadOnly)(a,"deployTransaction",i);return[2,a]}})})};e.prototype.attach=function(e){return this.constructor.getContract(e,this.interface,this.signer)};e.prototype.connect=function(e){return new this.constructor(this.interface,this.bytecode,e)};e.fromSolidity=function(e,r){if(e==null){A.throwError("missing compiler output",S.Logger.errors.MISSING_ARGUMENT,{argument:"compilerOutput"})}if(typeof e==="string"){e=JSON.parse(e)}var t=e.abi;var n=null;if(e.bytecode){n=e.bytecode}else if(e.evm&&e.evm.bytecode){n=e.evm.bytecode}return new this(t,n,r)};e.getInterface=function(e){return F.getInterface(e)};e.getContractAddress=function(e){return(0,g.getContractAddress)(e)};e.getContract=function(e,r,t){return new F(e,r,t)};return e}();t.ContractFactory=j},{"./_version":37,"@ethersproject/abi":15,"@ethersproject/abstract-provider":18,"@ethersproject/abstract-signer":20,"@ethersproject/address":22,"@ethersproject/bignumber":29,"@ethersproject/bytes":31,"@ethersproject/logger":55,"@ethersproject/properties":61,"@ethersproject/transactions":101}],39:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="hash/5.5.0"},{}],40:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.id=void 0;var n=e("@ethersproject/keccak256");var i=e("@ethersproject/strings");function o(e){return(0,n.keccak256)((0,i.toUtf8Bytes)(e))}t.id=o},{"@ethersproject/keccak256":53,"@ethersproject/strings":98}],41:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t._TypedDataEncoder=t.hashMessage=t.messagePrefix=t.isValidName=t.namehash=t.id=void 0;var n=e("./id");Object.defineProperty(t,"id",{enumerable:true,get:function(){return n.id}});var i=e("./namehash");Object.defineProperty(t,"isValidName",{enumerable:true,get:function(){return i.isValidName}});Object.defineProperty(t,"namehash",{enumerable:true,get:function(){return i.namehash}});var o=e("./message");Object.defineProperty(t,"hashMessage",{enumerable:true,get:function(){return o.hashMessage}});Object.defineProperty(t,"messagePrefix",{enumerable:true,get:function(){return o.messagePrefix}});var a=e("./typed-data");Object.defineProperty(t,"_TypedDataEncoder",{enumerable:true,get:function(){return a.TypedDataEncoder}})},{"./id":40,"./message":42,"./namehash":43,"./typed-data":44}],42:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.hashMessage=t.messagePrefix=void 0;var n=e("@ethersproject/bytes");var i=e("@ethersproject/keccak256");var o=e("@ethersproject/strings");t.messagePrefix="Ethereum Signed Message:\n";function a(e){if(typeof e==="string"){e=(0,o.toUtf8Bytes)(e)}return(0,i.keccak256)((0,n.concat)([(0,o.toUtf8Bytes)(t.messagePrefix),(0,o.toUtf8Bytes)(String(e.length)),e]))}t.hashMessage=a},{"@ethersproject/bytes":31,"@ethersproject/keccak256":53,"@ethersproject/strings":98}],43:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.namehash=t.isValidName=void 0;var o=e("@ethersproject/bytes");var a=e("@ethersproject/strings");var s=e("@ethersproject/keccak256");var n=e("@ethersproject/logger");var i=e("./_version");var u=new n.Logger(i.version);var c=new Uint8Array(32);c.fill(0);var f=new RegExp("^((.*)\\.)?([^.]+)$");function l(e){try{var r=e.split(".");for(var t=0;t<r.length;t++){if((0,a.nameprep)(r[t]).length===0){throw new Error("empty")}}return true}catch(e){}return false}t.isValidName=l;function h(e){if(typeof e!=="string"){u.throwArgumentError("invalid ENS name; not a string","name",e)}var r=e;var t=c;while(r.length){var n=r.match(f);if(n==null||n[2]===""){u.throwArgumentError("invalid ENS address; missing component","name",e)}var i=(0,a.toUtf8Bytes)((0,a.nameprep)(n[3]));t=(0,s.keccak256)((0,o.concat)([t,(0,s.keccak256)(i)]));r=n[2]||""}return(0,o.hexlify)(t)}t.namehash=h},{"./_version":39,"@ethersproject/bytes":31,"@ethersproject/keccak256":53,"@ethersproject/logger":55,"@ethersproject/strings":98}],44:[function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,a,t,s){function u(r){return r instanceof t?r:new t(function(e){e(r)})}return new(t||(t=Promise))(function(r,t){function n(e){try{o(s.next(e))}catch(e){t(e)}}function i(e){try{o(s["throw"](e))}catch(e){t(e)}}function o(e){e.done?r(e.value):u(e.value).then(n,i)}o((s=s.apply(e,a||[])).next())})};var p=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(e){return u([r,e])}}function u(r){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(a=r[0]&2?o["return"]:r[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;if(o=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;o=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){n.label=r[1];break}if(r[0]===6&&n.label<a[1]){n.label=a[1];a=r;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(r);break}if(a[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];o=0}finally{i=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};Object.defineProperty(t,"__esModule",{value:true});t.TypedDataEncoder=void 0;var s=e("@ethersproject/address");var u=e("@ethersproject/bignumber");var v=e("@ethersproject/bytes");var c=e("@ethersproject/keccak256");var b=e("@ethersproject/properties");var i=e("@ethersproject/logger");var o=e("./_version");var f=new i.Logger(o.version);var l=e("./id");var a=new Uint8Array(32);a.fill(0);var h=u.BigNumber.from(-1);var d=u.BigNumber.from(0);var g=u.BigNumber.from(1);var m=u.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function y(e){var r=(0,v.arrayify)(e);var t=r.length%32;if(t){return(0,v.hexConcat)([r,a.slice(t)])}return(0,v.hexlify)(r)}var w=(0,v.hexZeroPad)(g.toHexString(),32);var _=(0,v.hexZeroPad)(d.toHexString(),32);var S={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"};var A=["name","version","chainId","verifyingContract","salt"];function E(r){return function(e){if(typeof e!=="string"){f.throwArgumentError("invalid domain value for "+JSON.stringify(r),"domain."+r,e)}return e}}var M={name:E("name"),version:E("version"),chainId:function(e){try{return u.BigNumber.from(e).toString()}catch(e){}return f.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return(0,s.getAddress)(e).toLowerCase()}catch(e){}return f.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{var r=(0,v.arrayify)(e);if(r.length!==32){throw new Error("bad length")}return(0,v.hexlify)(r)}catch(e){}return f.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function P(t){{var e=t.match(/^(u?)int(\d*)$/);if(e){var r=e[1]==="";var n=parseInt(e[2]||"256");if(n%8!==0||n>256||e[2]&&e[2]!==String(n)){f.throwArgumentError("invalid numeric width","type",t)}var i=m.mask(r?n-1:n);var o=r?i.add(g).mul(h):d;return function(e){var r=u.BigNumber.from(e);if(r.lt(o)||r.gt(i)){f.throwArgumentError("value out-of-bounds for "+t,"value",e)}return(0,v.hexZeroPad)(r.toTwos(256).toHexString(),32)}}}{var e=t.match(/^bytes(\d+)$/);if(e){var a=parseInt(e[1]);if(a===0||a>32||e[1]!==String(a)){f.throwArgumentError("invalid bytes width","type",t)}return function(e){var r=(0,v.arrayify)(e);if(r.length!==a){f.throwArgumentError("invalid length for "+t,"value",e)}return y(e)}}}switch(t){case"address":return function(e){return(0,v.hexZeroPad)((0,s.getAddress)(e),32)};case"bool":return function(e){return!e?_:w};case"bytes":return function(e){return(0,c.keccak256)(e)};case"string":return function(e){return(0,l.id)(e)}}return null}function T(e,r){return e+"("+r.map(function(e){var r=e.name,t=e.type;return t+" "+r}).join(",")+")"}var k=function(){function d(o){(0,b.defineReadOnly)(this,"types",Object.freeze((0,b.deepCopy)(o)));(0,b.defineReadOnly)(this,"_encoderCache",{});(0,b.defineReadOnly)(this,"_types",{});var a={};var s={};var n={};Object.keys(o).forEach(function(e){a[e]={};s[e]=[];n[e]={}});var e=function(n){var i={};o[n].forEach(function(e){if(i[e.name]){f.throwArgumentError("duplicate variable name "+JSON.stringify(e.name)+" in "+JSON.stringify(n),"types",o)}i[e.name]=true;var r=e.type.match(/^([^\x5b]*)(\x5b|$)/)[1];if(r===n){f.throwArgumentError("circular type reference to "+JSON.stringify(r),"types",o)}var t=P(r);if(t){return}if(!s[r]){f.throwArgumentError("unknown type "+JSON.stringify(r),"types",o)}s[r].push(n);a[n][r]=true})};for(var r in o){e(r)}var t=Object.keys(s).filter(function(e){return s[e].length===0});if(t.length===0){f.throwArgumentError("missing primary type","types",o)}else if(t.length>1){f.throwArgumentError("ambiguous primary types or unused types: "+t.map(function(e){return JSON.stringify(e)}).join(", "),"types",o)}(0,b.defineReadOnly)(this,"primaryType",t[0]);function i(e,t){if(t[e]){f.throwArgumentError("circular type reference to "+JSON.stringify(e),"types",o)}t[e]=true;Object.keys(a[e]).forEach(function(r){if(!s[r]){return}i(r,t);Object.keys(t).forEach(function(e){n[e][r]=true})});delete t[e]}i(this.primaryType,{});for(var u in n){var c=Object.keys(n[u]);c.sort();this._types[u]=T(u,o[u])+c.map(function(e){return T(e,o[e])}).join("")}}d.prototype.getEncoder=function(e){var r=this._encoderCache[e];if(!r){r=this._encoderCache[e]=this._getEncoder(e)}return r};d.prototype._getEncoder=function(e){var o=this;{var r=P(e);if(r){return r}}var t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){var n=t[1];var i=this.getEncoder(n);var a=parseInt(t[3]);return function(e){if(a>=0&&e.length!==a){f.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e)}var r=e.map(i);if(o._types[n]){r=r.map(c.keccak256)}return(0,c.keccak256)((0,v.hexConcat)(r))}}var s=this.types[e];if(s){var u=(0,l.id)(this._types[e]);return function(i){var e=s.map(function(e){var r=e.name,t=e.type;var n=o.getEncoder(t)(i[r]);if(o._types[t]){return(0,c.keccak256)(n)}return n});e.unshift(u);return(0,v.hexConcat)(e)}}return f.throwArgumentError("unknown type: "+e,"type",e)};d.prototype.encodeType=function(e){var r=this._types[e];if(!r){f.throwArgumentError("unknown type: "+JSON.stringify(e),"name",e)}return r};d.prototype.encodeData=function(e,r){return this.getEncoder(e)(r)};d.prototype.hashStruct=function(e,r){return(0,c.keccak256)(this.encodeData(e,r))};d.prototype.encode=function(e){return this.encodeData(this.primaryType,e)};d.prototype.hash=function(e){return this.hashStruct(this.primaryType,e)};d.prototype._visit=function(e,i,o){var a=this;{var r=P(e);if(r){return o(e,i)}}var t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){var n=t[1];var s=parseInt(t[3]);if(s>=0&&i.length!==s){f.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",i)}return i.map(function(e){return a._visit(n,e,o)})}var u=this.types[e];if(u){return u.reduce(function(e,r){var t=r.name,n=r.type;e[t]=a._visit(n,i[t],o);return e},{})}return f.throwArgumentError("unknown type: "+e,"type",e)};d.prototype.visit=function(e,r){return this._visit(this.primaryType,e,r)};d.from=function(e){return new d(e)};d.getPrimaryType=function(e){return d.from(e).primaryType};d.hashStruct=function(e,r,t){return d.from(r).hashStruct(e,t)};d.hashDomain=function(e){var r=[];for(var t in e){var n=S[t];if(!n){f.throwArgumentError("invalid typed-data domain key: "+JSON.stringify(t),"domain",e)}r.push({name:t,type:n})}r.sort(function(e,r){return A.indexOf(e.name)-A.indexOf(r.name)});return d.hashStruct("EIP712Domain",{EIP712Domain:r},e)};d.encode=function(e,r,t){return(0,v.hexConcat)(["0x1901",d.hashDomain(e),d.from(r).hash(t)])};d.hash=function(e,r,t){return(0,c.keccak256)(d.encode(e,r,t))};d.resolveNames=function(c,f,l,h){return n(this,void 0,void 0,function(){var t,r,n,i,o,a,s,u;return p(this,function(e){switch(e.label){case 0:c=(0,b.shallowCopy)(c);t={};if(c.verifyingContract&&!(0,v.isHexString)(c.verifyingContract,20)){t[c.verifyingContract]="0x"}r=d.from(f);r.visit(l,function(e,r){if(e==="address"&&!(0,v.isHexString)(r,20)){t[r]="0x"}return r});n=[];for(i in t)n.push(i);o=0;e.label=1;case 1:if(!(o<n.length))return[3,4];a=n[o];s=t;u=a;return[4,h(a)];case 2:s[u]=e.sent();e.label=3;case 3:o++;return[3,1];case 4:if(c.verifyingContract&&t[c.verifyingContract]){c.verifyingContract=t[c.verifyingContract]}l=r.visit(l,function(e,r){if(e==="address"&&t[r]){return t[r]}return r});return[2,{domain:c,value:l}]}})})};d.getPayload=function(t,e,r){d.hashDomain(t);var n={};var i=[];A.forEach(function(e){var r=t[e];if(r==null){return}n[e]=M[e](r);i.push({name:e,type:S[e]})});var o=d.from(e);var a=(0,b.shallowCopy)(e);if(a.EIP712Domain){f.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",e)}else{a.EIP712Domain=i}o.encode(r);return{types:a,domain:n,primaryType:o.primaryType,message:o.visit(r,function(e,r){if(e.match(/^bytes(\d*)/)){return(0,v.hexlify)((0,v.arrayify)(r))}if(e.match(/^u?int/)){return u.BigNumber.from(r).toString()}switch(e){case"address":return r.toLowerCase();case"bool":return!!r;case"string":if(typeof r!=="string"){f.throwArgumentError("invalid string","value",r)}return r}return f.throwArgumentError("unsupported type","type",e)})}};return d}();t.TypedDataEncoder=k},{"./_version":39,"./id":40,"@ethersproject/address":22,"@ethersproject/bignumber":29,"@ethersproject/bytes":31,"@ethersproject/keccak256":53,"@ethersproject/logger":55,"@ethersproject/properties":61}],45:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="hdnode/5.5.0"},{}],46:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getAccountPath=t.isValidMnemonic=t.entropyToMnemonic=t.mnemonicToEntropy=t.mnemonicToSeed=t.HDNode=t.defaultPath=void 0;var s=e("@ethersproject/basex");var d=e("@ethersproject/bytes");var p=e("@ethersproject/bignumber");var n=e("@ethersproject/strings");var i=e("@ethersproject/pbkdf2");var f=e("@ethersproject/properties");var v=e("@ethersproject/signing-key");var b=e("@ethersproject/sha2");var l=e("@ethersproject/transactions");var o=e("@ethersproject/wordlists");var a=e("@ethersproject/logger");var u=e("./_version");var g=new a.Logger(u.version);var m=p.BigNumber.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");var c=(0,n.toUtf8Bytes)("Bitcoin seed");var y=2147483648;function h(e){return(1<<e)-1<<8-e}function w(e){return(1<<e)-1}function _(e){return(0,d.hexZeroPad)((0,d.hexlify)(e),32)}function S(e){return s.Base58.encode((0,d.concat)([e,(0,d.hexDataSlice)((0,b.sha256)((0,b.sha256)(e)),0,4)]))}function A(e){if(e==null){return o.wordlists["en"]}if(typeof e==="string"){var r=o.wordlists[e];if(r==null){g.throwArgumentError("unknown locale","wordlist",e)}return r}return e}var E={};t.defaultPath="m/44'/60'/0'/0/0";var M=function(){function h(e,r,t,n,i,o,a,s){var u=this.constructor;g.checkNew(u,h);if(e!==E){throw new Error("HDNode constructor cannot be called directly")}if(r){var c=new v.SigningKey(r);(0,f.defineReadOnly)(this,"privateKey",c.privateKey);(0,f.defineReadOnly)(this,"publicKey",c.compressedPublicKey)}else{(0,f.defineReadOnly)(this,"privateKey",null);(0,f.defineReadOnly)(this,"publicKey",(0,d.hexlify)(t))}(0,f.defineReadOnly)(this,"parentFingerprint",n);(0,f.defineReadOnly)(this,"fingerprint",(0,d.hexDataSlice)((0,b.ripemd160)((0,b.sha256)(this.publicKey)),0,4));(0,f.defineReadOnly)(this,"address",(0,l.computeAddress)(this.publicKey));(0,f.defineReadOnly)(this,"chainCode",i);(0,f.defineReadOnly)(this,"index",o);(0,f.defineReadOnly)(this,"depth",a);if(s==null){(0,f.defineReadOnly)(this,"mnemonic",null);(0,f.defineReadOnly)(this,"path",null)}else if(typeof s==="string"){(0,f.defineReadOnly)(this,"mnemonic",null);(0,f.defineReadOnly)(this,"path",s)}else{(0,f.defineReadOnly)(this,"mnemonic",s);(0,f.defineReadOnly)(this,"path",s.path)}}Object.defineProperty(h.prototype,"extendedKey",{get:function(){if(this.depth>=256){throw new Error("Depth too large!")}return S((0,d.concat)([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",(0,d.hexlify)(this.depth),this.parentFingerprint,(0,d.hexZeroPad)((0,d.hexlify)(this.index),4),this.chainCode,this.privateKey!=null?(0,d.concat)(["0x00",this.privateKey]):this.publicKey]))},enumerable:false,configurable:true});h.prototype.neuter=function(){return new h(E,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)};h.prototype._derive=function(e){if(e>4294967295){throw new Error("invalid index - "+String(e))}var r=this.path;if(r){r+="/"+(e&~y)}var t=new Uint8Array(37);if(e&y){if(!this.privateKey){throw new Error("cannot derive child of neutered node")}t.set((0,d.arrayify)(this.privateKey),1);if(r){r+="'"}}else{t.set((0,d.arrayify)(this.publicKey))}for(var n=24;n>=0;n-=8){t[33+(n>>3)]=e>>24-n&255}var i=(0,d.arrayify)((0,b.computeHmac)(b.SupportedAlgorithm.sha512,this.chainCode,t));var o=i.slice(0,32);var a=i.slice(32);var s=null;var u=null;if(this.privateKey){s=_(p.BigNumber.from(o).add(this.privateKey).mod(m))}else{var c=new v.SigningKey((0,d.hexlify)(o));u=c._addPoint(this.publicKey)}var f=r;var l=this.mnemonic;if(l){f=Object.freeze({phrase:l.phrase,path:r,locale:l.locale||"en"})}return new h(E,s,u,this.fingerprint,_(a),e,this.depth+1,f)};h.prototype.derivePath=function(e){var r=e.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0){throw new Error("invalid path - "+e)}if(r[0]==="m"){r.shift()}var t=this;for(var n=0;n<r.length;n++){var i=r[n];if(i.match(/^[0-9]+'$/)){var o=parseInt(i.substring(0,i.length-1));if(o>=y){throw new Error("invalid path index - "+i)}t=t._derive(y+o)}else if(i.match(/^[0-9]+$/)){var o=parseInt(i);if(o>=y){throw new Error("invalid path index - "+i)}t=t._derive(o)}else{throw new Error("invalid path component - "+i)}}return t};h._fromSeed=function(e,r){var t=(0,d.arrayify)(e);if(t.length<16||t.length>64){throw new Error("invalid seed")}var n=(0,d.arrayify)((0,b.computeHmac)(b.SupportedAlgorithm.sha512,c,t));return new h(E,_(n.slice(0,32)),null,"0x00000000",_(n.slice(32)),0,0,r)};h.fromMnemonic=function(e,r,t){t=A(t);e=k(T(e,t),t);return h._fromSeed(P(e,r),{phrase:e,path:"m",locale:t.locale})};h.fromSeed=function(e){return h._fromSeed(e,null)};h.fromExtendedKey=function(e){var r=s.Base58.decode(e);if(r.length!==82||S(r.slice(0,78))!==e){g.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}var t=r[4];var n=(0,d.hexlify)(r.slice(5,9));var i=parseInt((0,d.hexlify)(r.slice(9,13)).substring(2),16);var o=(0,d.hexlify)(r.slice(13,45));var a=r.slice(45,78);switch((0,d.hexlify)(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new h(E,null,(0,d.hexlify)(a),n,o,i,t,null);case"0x0488ade4":case"0x04358394 ":if(a[0]!==0){break}return new h(E,(0,d.hexlify)(a.slice(1)),null,n,o,i,t,null)}return g.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")};return h}();t.HDNode=M;function P(e,r){if(!r){r=""}var t=(0,n.toUtf8Bytes)("mnemonic"+r,n.UnicodeNormalizationForm.NFKD);return(0,i.pbkdf2)((0,n.toUtf8Bytes)(e,n.UnicodeNormalizationForm.NFKD),t,2048,64,"sha512")}t.mnemonicToSeed=P;function T(e,r){r=A(r);g.checkNormalize();var t=r.split(e);if(t.length%3!==0){throw new Error("invalid mnemonic")}var n=(0,d.arrayify)(new Uint8Array(Math.ceil(11*t.length/8)));var i=0;for(var o=0;o<t.length;o++){var a=r.getWordIndex(t[o].normalize("NFKD"));if(a===-1){throw new Error("invalid mnemonic")}for(var s=0;s<11;s++){if(a&1<<10-s){n[i>>3]|=1<<7-i%8}i++}}var u=32*t.length/3;var c=t.length/3;var f=h(c);var l=(0,d.arrayify)((0,b.sha256)(n.slice(0,u/8)))[0]&f;if(l!==(n[n.length-1]&f)){throw new Error("invalid checksum")}return(0,d.hexlify)(n.slice(0,u/8))}t.mnemonicToEntropy=T;function k(e,r){r=A(r);e=(0,d.arrayify)(e);if(e.length%4!==0||e.length<16||e.length>32){throw new Error("invalid entropy")}var t=[0];var n=11;for(var i=0;i<e.length;i++){if(n>8){t[t.length-1]<<=8;t[t.length-1]|=e[i];n-=8}else{t[t.length-1]<<=n;t[t.length-1]|=e[i]>>8-n;t.push(e[i]&w(8-n));n+=3}}var o=e.length/4;var a=(0,d.arrayify)((0,b.sha256)(e))[0]&h(o);t[t.length-1]<<=o;t[t.length-1]|=a>>8-o;return r.join(t.map(function(e){return r.getWord(e)}))}t.entropyToMnemonic=k;function O(e,r){try{T(e,r);return true}catch(e){}return false}t.isValidMnemonic=O;function B(e){if(typeof e!=="number"||e<0||e>=y||e%1){g.throwArgumentError("invalid account index","index",e)}return"m/44'/60'/"+e+"'/0/0"}t.getAccountPath=B},{"./_version":45,"@ethersproject/basex":25,"@ethersproject/bignumber":29,"@ethersproject/bytes":31,"@ethersproject/logger":55,"@ethersproject/pbkdf2":59,"@ethersproject/properties":61,"@ethersproject/sha2":88,"@ethersproject/signing-key":92,"@ethersproject/strings":98,"@ethersproject/transactions":101,"@ethersproject/wordlists":110}],47:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="json-wallets/5.5.0"},{}],48:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.decrypt=t.CrowdsaleAccount=void 0;var p=i(e("aes-js"));var v=e("@ethersproject/address");var b=e("@ethersproject/bytes");var g=e("@ethersproject/keccak256");var m=e("@ethersproject/pbkdf2");var y=e("@ethersproject/strings");var o=e("@ethersproject/properties");var a=e("@ethersproject/logger");var s=e("./_version");var w=new a.Logger(s.version);var _=e("./utils");var S=function(e){n(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}r.prototype.isCrowdsaleAccount=function(e){return!!(e&&e._isCrowdsaleAccount)};return r}(o.Description);t.CrowdsaleAccount=S;function u(e,r){var t=JSON.parse(e);r=(0,_.getPassword)(r);var n=(0,v.getAddress)((0,_.searchPath)(t,"ethaddr"));var i=(0,_.looseArrayify)((0,_.searchPath)(t,"encseed"));if(!i||i.length%16!==0){w.throwArgumentError("invalid encseed","json",e)}var o=(0,b.arrayify)((0,m.pbkdf2)(r,r,2e3,32,"sha256")).slice(0,16);var a=i.slice(0,16);var s=i.slice(16);var u=new p.default.ModeOfOperation.cbc(o,a);var c=p.default.padding.pkcs7.strip((0,b.arrayify)(u.decrypt(s)));var f="";for(var l=0;l<c.length;l++){f+=String.fromCharCode(c[l])}var h=(0,y.toUtf8Bytes)(f);var d=(0,g.keccak256)(h);return new S({_isCrowdsaleAccount:true,address:n,privateKey:d})}t.decrypt=u},{"./_version":47,"./utils":52,"@ethersproject/address":22,"@ethersproject/bytes":31,"@ethersproject/keccak256":53,"@ethersproject/logger":55,"@ethersproject/pbkdf2":59,"@ethersproject/properties":61,"@ethersproject/strings":98,"aes-js":121}],49:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decryptJsonWalletSync=t.decryptJsonWallet=t.getJsonWalletAddress=t.isKeystoreWallet=t.isCrowdsaleWallet=t.encryptKeystore=t.decryptKeystoreSync=t.decryptKeystore=t.decryptCrowdsale=void 0;var i=e("./crowdsale");Object.defineProperty(t,"decryptCrowdsale",{enumerable:true,get:function(){return i.decrypt}});var o=e("./inspect");Object.defineProperty(t,"getJsonWalletAddress",{enumerable:true,get:function(){return o.getJsonWalletAddress}});Object.defineProperty(t,"isCrowdsaleWallet",{enumerable:true,get:function(){return o.isCrowdsaleWallet}});Object.defineProperty(t,"isKeystoreWallet",{enumerable:true,get:function(){return o.isKeystoreWallet}});var a=e("./keystore");Object.defineProperty(t,"decryptKeystore",{enumerable:true,get:function(){return a.decrypt}});Object.defineProperty(t,"decryptKeystoreSync",{enumerable:true,get:function(){return a.decryptSync}});Object.defineProperty(t,"encryptKeystore",{enumerable:true,get:function(){return a.encrypt}});function n(e,r,t){if((0,o.isCrowdsaleWallet)(e)){if(t){t(0)}var n=(0,i.decrypt)(e,r);if(t){t(1)}return Promise.resolve(n)}if((0,o.isKeystoreWallet)(e)){return(0,a.decrypt)(e,r,t)}return Promise.reject(new Error("invalid JSON wallet"))}t.decryptJsonWallet=n;function s(e,r){if((0,o.isCrowdsaleWallet)(e)){return(0,i.decrypt)(e,r)}if((0,o.isKeystoreWallet)(e)){return(0,a.decryptSync)(e,r)}throw new Error("invalid JSON wallet")}t.decryptJsonWalletSync=s},{"./crowdsale":48,"./inspect":50,"./keystore":51}],50:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getJsonWalletAddress=t.isKeystoreWallet=t.isCrowdsaleWallet=void 0;var n=e("@ethersproject/address");function i(e){var r=null;try{r=JSON.parse(e)}catch(e){return false}return r.encseed&&r.ethaddr}t.isCrowdsaleWallet=i;function o(e){var r=null;try{r=JSON.parse(e)}catch(e){return false}if(!r.version||parseInt(r.version)!==r.version||parseInt(r.version)!==3){return false}return true}t.isKeystoreWallet=o;function a(e){if(i(e)){try{return(0,n.getAddress)(JSON.parse(e).ethaddr)}catch(e){return null}}if(o(e)){try{return(0,n.getAddress)(JSON.parse(e).address)}catch(e){return null}}return null}t.getJsonWalletAddress=a},{"@ethersproject/address":22}],51:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();var a=this&&this.__awaiter||function(e,a,t,s){function u(r){return r instanceof t?r:new t(function(e){e(r)})}return new(t||(t=Promise))(function(r,t){function n(e){try{o(s.next(e))}catch(e){t(e)}}function i(e){try{o(s["throw"](e))}catch(e){t(e)}}function o(e){e.done?r(e.value):u(e.value).then(n,i)}o((s=s.apply(e,a||[])).next())})};var s=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(e){return u([r,e])}}function u(r){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(a=r[0]&2?o["return"]:r[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;if(o=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;o=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){n.label=r[1];break}if(r[0]===6&&n.label<a[1]){n.label=a[1];a=r;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(r);break}if(a[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];o=0}finally{i=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.encrypt=t.decrypt=t.decryptSync=t.KeystoreAccount=void 0;var T=i(e("aes-js"));var u=i(e("scrypt-js"));var k=e("@ethersproject/address");var O=e("@ethersproject/bytes");var B=e("@ethersproject/hdnode");var C=e("@ethersproject/keccak256");var o=e("@ethersproject/pbkdf2");var R=e("@ethersproject/random");var c=e("@ethersproject/properties");var L=e("@ethersproject/transactions");var F=e("./utils");var m=e("@ethersproject/logger");var f=e("./_version");var y=new m.Logger(f.version);function l(e){return e!=null&&e.mnemonic&&e.mnemonic.phrase}var w=function(e){n(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}r.prototype.isKeystoreAccount=function(e){return!!(e&&e._isKeystoreAccount)};return r}(c.Description);t.KeystoreAccount=w;function _(e,r,t){var n=(0,F.searchPath)(e,"crypto/cipher");if(n==="aes-128-ctr"){var i=(0,F.looseArrayify)((0,F.searchPath)(e,"crypto/cipherparams/iv"));var o=new T.default.Counter(i);var a=new T.default.ModeOfOperation.ctr(r,o);return(0,O.arrayify)(a.decrypt(t))}return null}function h(e,r){var t=(0,F.looseArrayify)((0,F.searchPath)(e,"crypto/ciphertext"));var n=(0,O.hexlify)((0,C.keccak256)((0,O.concat)([r.slice(16,32),t]))).substring(2);if(n!==(0,F.searchPath)(e,"crypto/mac").toLowerCase()){throw new Error("invalid password")}var i=_(e,r.slice(0,16),t);if(!i){y.throwError("unsupported cipher",m.Logger.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"})}var o=r.slice(32,64);var a=(0,L.computeAddress)(i);if(e.address){var s=e.address.toLowerCase();if(s.substring(0,2)!=="0x"){s="0x"+s}if((0,k.getAddress)(s)!==a){throw new Error("address mismatch")}}var u={_isKeystoreAccount:true,address:a,privateKey:(0,O.hexlify)(i)};if((0,F.searchPath)(e,"x-ethers/version")==="0.1"){var c=(0,F.looseArrayify)((0,F.searchPath)(e,"x-ethers/mnemonicCiphertext"));var f=(0,F.looseArrayify)((0,F.searchPath)(e,"x-ethers/mnemonicCounter"));var l=new T.default.Counter(f);var h=new T.default.ModeOfOperation.ctr(o,l);var d=(0,F.searchPath)(e,"x-ethers/path")||B.defaultPath;var p=(0,F.searchPath)(e,"x-ethers/locale")||"en";var v=(0,O.arrayify)(h.decrypt(c));try{var b=(0,B.entropyToMnemonic)(v,p);var g=B.HDNode.fromMnemonic(b,null,p).derivePath(d);if(g.privateKey!=u.privateKey){throw new Error("mnemonic mismatch")}u.mnemonic=g.mnemonic}catch(e){if(e.code!==m.Logger.errors.INVALID_ARGUMENT||e.argument!=="wordlist"){throw e}}}return new w(u)}function d(e,r,t,n,i){return(0,O.arrayify)((0,o.pbkdf2)(e,r,t,n,i))}function p(e,r,t,n,i){return Promise.resolve(d(e,r,t,n,i))}function v(e,r,t,n,i){var o=(0,F.getPassword)(r);var a=(0,F.searchPath)(e,"crypto/kdf");if(a&&typeof a==="string"){var s=function(e,r){return y.throwArgumentError("invalid key-derivation function parameters",e,r)};if(a.toLowerCase()==="scrypt"){var u=(0,F.looseArrayify)((0,F.searchPath)(e,"crypto/kdfparams/salt"));var c=parseInt((0,F.searchPath)(e,"crypto/kdfparams/n"));var f=parseInt((0,F.searchPath)(e,"crypto/kdfparams/r"));var l=parseInt((0,F.searchPath)(e,"crypto/kdfparams/p"));if(!c||!f||!l){s("kdf",a)}if((c&c-1)!==0){s("N",c)}var h=parseInt((0,F.searchPath)(e,"crypto/kdfparams/dklen"));if(h!==32){s("dklen",h)}return n(o,u,c,f,l,64,i)}else if(a.toLowerCase()==="pbkdf2"){var u=(0,F.looseArrayify)((0,F.searchPath)(e,"crypto/kdfparams/salt"));var d=null;var p=(0,F.searchPath)(e,"crypto/kdfparams/prf");if(p==="hmac-sha256"){d="sha256"}else if(p==="hmac-sha512"){d="sha512"}else{s("prf",p)}var v=parseInt((0,F.searchPath)(e,"crypto/kdfparams/c"));var h=parseInt((0,F.searchPath)(e,"crypto/kdfparams/dklen"));if(h!==32){s("dklen",h)}return t(o,u,v,h,d)}}return y.throwArgumentError("unsupported key-derivation function","kdf",a)}function b(e,r){var t=JSON.parse(e);var n=v(t,r,d,u.default.syncScrypt);return h(t,n)}t.decryptSync=b;function g(n,i,o){return a(this,void 0,void 0,function(){var r,t;return s(this,function(e){switch(e.label){case 0:r=JSON.parse(n);return[4,v(r,i,p,u.default.scrypt,o)];case 1:t=e.sent();return[2,h(r,t)]}})})}t.decrypt=g;function S(v,e,r,t){try{if((0,k.getAddress)(v.address)!==(0,L.computeAddress)(v.privateKey)){throw new Error("address/privateKey mismatch")}if(l(v)){var n=v.mnemonic;var i=B.HDNode.fromMnemonic(n.phrase,null,n.locale).derivePath(n.path||B.defaultPath);if(i.privateKey!=v.privateKey){throw new Error("mnemonic mismatch")}}}catch(e){return Promise.reject(e)}if(typeof r==="function"&&!t){t=r;r={}}if(!r){r={}}var b=(0,O.arrayify)(v.privateKey);var o=(0,F.getPassword)(e);var g=null;var m=null;var y=null;if(l(v)){var a=v.mnemonic;g=(0,O.arrayify)((0,B.mnemonicToEntropy)(a.phrase,a.locale||"en"));m=a.path||B.defaultPath;y=a.locale||"en"}var w=r.client;if(!w){w="ethers.js"}var _=null;if(r.salt){_=(0,O.arrayify)(r.salt)}else{_=(0,R.randomBytes)(32)}var S=null;if(r.iv){S=(0,O.arrayify)(r.iv);if(S.length!==16){throw new Error("invalid iv")}}else{S=(0,R.randomBytes)(16)}var A=null;if(r.uuid){A=(0,O.arrayify)(r.uuid);if(A.length!==16){throw new Error("invalid uuid")}}else{A=(0,R.randomBytes)(16)}var E=1<<17,M=8,P=1;if(r.scrypt){if(r.scrypt.N){E=r.scrypt.N}if(r.scrypt.r){M=r.scrypt.r}if(r.scrypt.p){P=r.scrypt.p}}return u.default.scrypt(o,_,E,M,P,64,t).then(function(e){e=(0,O.arrayify)(e);var r=e.slice(0,16);var t=e.slice(16,32);var n=e.slice(32,64);var i=new T.default.Counter(S);var o=new T.default.ModeOfOperation.ctr(r,i);var a=(0,O.arrayify)(o.encrypt(b));var s=(0,C.keccak256)((0,O.concat)([t,a]));var u={address:v.address.substring(2).toLowerCase(),id:(0,F.uuidV4)(A),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,O.hexlify)(S).substring(2)},ciphertext:(0,O.hexlify)(a).substring(2),kdf:"scrypt",kdfparams:{salt:(0,O.hexlify)(_).substring(2),n:E,dklen:32,p:P,r:M},mac:s.substring(2)}};if(g){var c=(0,R.randomBytes)(16);var f=new T.default.Counter(c);var l=new T.default.ModeOfOperation.ctr(n,f);var h=(0,O.arrayify)(l.encrypt(g));var d=new Date;var p=d.getUTCFullYear()+"-"+(0,F.zpad)(d.getUTCMonth()+1,2)+"-"+(0,F.zpad)(d.getUTCDate(),2)+"T"+(0,F.zpad)(d.getUTCHours(),2)+"-"+(0,F.zpad)(d.getUTCMinutes(),2)+"-"+(0,F.zpad)(d.getUTCSeconds(),2)+".0Z";u["x-ethers"]={client:w,gethFilename:"UTC--"+p+"--"+u.address,mnemonicCounter:(0,O.hexlify)(c).substring(2),mnemonicCiphertext:(0,O.hexlify)(h).substring(2),path:m,locale:y,version:"0.1"}}return JSON.stringify(u)})}t.encrypt=S},{"./_version":47,"./utils":52,"@ethersproject/address":22,"@ethersproject/bytes":31,"@ethersproject/hdnode":46,"@ethersproject/keccak256":53,"@ethersproject/logger":55,"@ethersproject/pbkdf2":59,"@ethersproject/properties":61,"@ethersproject/random":82,"@ethersproject/transactions":101,"aes-js":121,"scrypt-js":285}],52:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.uuidV4=t.searchPath=t.getPassword=t.zpad=t.looseArrayify=void 0;var n=e("@ethersproject/bytes");var i=e("@ethersproject/strings");function o(e){if(typeof e==="string"&&e.substring(0,2)!=="0x"){e="0x"+e}return(0,n.arrayify)(e)}t.looseArrayify=o;function a(e,r){e=String(e);while(e.length<r){e="0"+e}return e}t.zpad=a;function s(e){if(typeof e==="string"){return(0,i.toUtf8Bytes)(e,i.UnicodeNormalizationForm.NFKC)}return(0,n.arrayify)(e)}t.getPassword=s;function u(e,r){var t=e;var n=r.toLowerCase().split("/");for(var i=0;i<n.length;i++){var o=null;for(var a in t){if(a.toLowerCase()===n[i]){o=t[a];break}}if(o===null){return null}t=o}return t}t.searchPath=u;function c(e){var r=(0,n.arrayify)(e);r[6]=r[6]&15|64;r[8]=r[8]&63|128;var t=(0,n.hexlify)(r);return[t.substring(2,10),t.substring(10,14),t.substring(14,18),t.substring(18,22),t.substring(22,34)].join("-")}t.uuidV4=c},{"@ethersproject/bytes":31,"@ethersproject/strings":98}],53:[function(e,r,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.keccak256=void 0;var i=n(e("js-sha3"));var o=e("@ethersproject/bytes");function a(e){return"0x"+i.default.keccak_256((0,o.arrayify)(e))}t.keccak256=a},{"@ethersproject/bytes":31,"js-sha3":257}],54:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="logger/5.5.0"},{}],55:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Logger=t.ErrorCode=t.LogLevel=void 0;var n=false;var s=false;var i={debug:1,default:2,info:2,warning:3,error:4,off:5};var o=i["default"];var u=e("./_version");var c=null;function a(){try{var t=[];["NFD","NFC","NFKD","NFKC"].forEach(function(r){try{if("test".normalize(r)!=="test"){throw new Error("bad normalize")}}catch(e){t.push(r)}});if(t.length){throw new Error("missing "+t.join(", "))}if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769)){throw new Error("broken implementation")}}catch(e){return e.message}return null}var f=a();var l;(function(e){e["DEBUG"]="DEBUG";e["INFO"]="INFO";e["WARNING"]="WARNING";e["ERROR"]="ERROR";e["OFF"]="OFF"})(l=t.LogLevel||(t.LogLevel={}));var h;(function(e){e["UNKNOWN_ERROR"]="UNKNOWN_ERROR";e["NOT_IMPLEMENTED"]="NOT_IMPLEMENTED";e["UNSUPPORTED_OPERATION"]="UNSUPPORTED_OPERATION";e["NETWORK_ERROR"]="NETWORK_ERROR";e["SERVER_ERROR"]="SERVER_ERROR";e["TIMEOUT"]="TIMEOUT";e["BUFFER_OVERRUN"]="BUFFER_OVERRUN";e["NUMERIC_FAULT"]="NUMERIC_FAULT";e["MISSING_NEW"]="MISSING_NEW";e["INVALID_ARGUMENT"]="INVALID_ARGUMENT";e["MISSING_ARGUMENT"]="MISSING_ARGUMENT";e["UNEXPECTED_ARGUMENT"]="UNEXPECTED_ARGUMENT";e["CALL_EXCEPTION"]="CALL_EXCEPTION";e["INSUFFICIENT_FUNDS"]="INSUFFICIENT_FUNDS";e["NONCE_EXPIRED"]="NONCE_EXPIRED";e["REPLACEMENT_UNDERPRICED"]="REPLACEMENT_UNDERPRICED";e["UNPREDICTABLE_GAS_LIMIT"]="UNPREDICTABLE_GAS_LIMIT";e["TRANSACTION_REPLACED"]="TRANSACTION_REPLACED"})(h=t.ErrorCode||(t.ErrorCode={}));var d="0123456789abcdef";var p=function(){function a(e){Object.defineProperty(this,"version",{enumerable:true,value:e,writable:false})}a.prototype._log=function(e,r){var t=e.toLowerCase();if(i[t]==null){this.throwArgumentError("invalid log level name","logLevel",e)}if(o>i[t]){return}console.log.apply(console,r)};a.prototype.debug=function(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}this._log(a.levels.DEBUG,e)};a.prototype.info=function(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}this._log(a.levels.INFO,e)};a.prototype.warn=function(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}this._log(a.levels.WARNING,e)};a.prototype.makeError=function(e,r,i){if(s){return this.makeError("censored error",r,{})}if(!r){r=a.errors.UNKNOWN_ERROR}if(!i){i={}}var o=[];Object.keys(i).forEach(function(r){var e=i[r];try{if(e instanceof Uint8Array){var t="";for(var n=0;n<e.length;n++){t+=d[e[n]>>4];t+=d[e[n]&15]}o.push(r+"=Uint8Array(0x"+t+")")}else{o.push(r+"="+JSON.stringify(e))}}catch(e){o.push(r+"="+JSON.stringify(i[r].toString()))}});o.push("code="+r);o.push("version="+this.version);var t=e;if(o.length){e+=" ("+o.join(", ")+")"}var n=new Error(e);n.reason=t;n.code=r;Object.keys(i).forEach(function(e){n[e]=i[e]});return n};a.prototype.throwError=function(e,r,t){throw this.makeError(e,r,t)};a.prototype.throwArgumentError=function(e,r,t){return this.throwError(e,a.errors.INVALID_ARGUMENT,{argument:r,value:t})};a.prototype.assert=function(e,r,t,n){if(!!e){return}this.throwError(r,t,n)};a.prototype.assertArgument=function(e,r,t,n){if(!!e){return}this.throwArgumentError(r,t,n)};a.prototype.checkNormalize=function(e){if(e==null){e="platform missing String.prototype.normalize"}if(f){this.throwError("platform missing String.prototype.normalize",a.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:f})}};a.prototype.checkSafeUint53=function(e,r){if(typeof e!=="number"){return}if(r==null){r="value not safe"}if(e<0||e>=9007199254740991){this.throwError(r,a.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e})}if(e%1){this.throwError(r,a.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e})}};a.prototype.checkArgumentCount=function(e,r,t){if(t){t=": "+t}else{t=""}if(e<r){this.throwError("missing argument"+t,a.errors.MISSING_ARGUMENT,{count:e,expectedCount:r})}if(e>r){this.throwError("too many arguments"+t,a.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}};a.prototype.checkNew=function(e,r){if(e===Object||e==null){this.throwError("missing new",a.errors.MISSING_NEW,{name:r.name})}};a.prototype.checkAbstract=function(e,r){if(e===r){this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",a.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"})}else if(e===Object||e==null){this.throwError("missing new",a.errors.MISSING_NEW,{name:r.name})}};a.globalLogger=function(){if(!c){c=new a(u.version)}return c};a.setCensorship=function(e,r){if(!e&&r){this.globalLogger().throwError("cannot permanently disable censorship",a.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}if(n){if(!e){return}this.globalLogger().throwError("error censorship permanent",a.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}s=!!e;n=!!r};a.setLogLevel=function(e){var r=i[e.toLowerCase()];if(r==null){a.globalLogger().warn("invalid log level - "+e);return}o=r};a.from=function(e){return new a(e)};a.errors=h;a.levels=l;return a}();t.Logger=p},{"./_version":54}],56:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="networks/5.5.1"},{}],57:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getNetwork=void 0;var n=e("@ethersproject/logger");var i=e("./_version");var a=new n.Logger(i.version);function s(e){return e&&typeof e.renetwork==="function"}function o(a){var e=function(e,r){if(r==null){r={}}var t=[];if(e.InfuraProvider){try{t.push(new e.InfuraProvider(a,r.infura))}catch(e){}}if(e.EtherscanProvider){try{t.push(new e.EtherscanProvider(a,r.etherscan))}catch(e){}}if(e.AlchemyProvider){try{t.push(new e.AlchemyProvider(a,r.alchemy))}catch(e){}}if(e.PocketProvider){var n=["goerli","ropsten","rinkeby"];try{var i=new e.PocketProvider(a);if(i.network&&n.indexOf(i.network.name)===-1){t.push(i)}}catch(e){}}if(e.CloudflareProvider){try{t.push(new e.CloudflareProvider(a))}catch(e){}}if(t.length===0){return null}if(e.FallbackProvider){var o=1;if(r.quorum!=null){o=r.quorum}else if(a==="homestead"){o=2}return new e.FallbackProvider(t,o)}return t[0]};e.renetwork=function(e){return o(e)};return e}function u(t,n){var e=function(e,r){if(e.JsonRpcProvider){return new e.JsonRpcProvider(t,n)}return null};e.renetwork=function(e){return u(t,e)};return e}var c={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:o("homestead")};var f={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:o("ropsten")};var l={chainId:63,name:"classicMordor",_defaultProvider:u("https://www.ethercluster.com/mordor","classicMordor")};var h={unspecified:{chainId:0,name:"unspecified"},homestead:c,mainnet:c,morden:{chainId:2,name:"morden"},ropsten:f,testnet:f,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:o("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:o("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:o("goerli")},classic:{chainId:61,name:"classic",_defaultProvider:u("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:l,classicTestnet:l,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:u("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic"},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism"},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function d(e){if(e==null){return null}if(typeof e==="number"){for(var r in h){var t=h[r];if(t.chainId===e){return{name:t.name,chainId:t.chainId,ensAddress:t.ensAddress||null,_defaultProvider:t._defaultProvider||null}}}return{chainId:e,name:"unknown"}}if(typeof e==="string"){var n=h[e];if(n==null){return null}return{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}var i=h[e.name];if(!i){if(typeof e.chainId!=="number"){a.throwArgumentError("invalid network chainId","network",e)}return e}if(e.chainId!==0&&e.chainId!==i.chainId){a.throwArgumentError("network chainId mismatch","network",e)}var o=e._defaultProvider||null;if(o==null&&i._defaultProvider){if(s(i._defaultProvider)){o=i._defaultProvider.renetwork(e)}else{o=i._defaultProvider}}return{name:e.name,chainId:i.chainId,ensAddress:e.ensAddress||i.ensAddress||null,_defaultProvider:o}}t.getNetwork=d},{"./_version":56,"@ethersproject/logger":55}],58:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.pbkdf2=void 0;var g=e("@ethersproject/bytes");var m=e("@ethersproject/sha2");function n(e,r,t,n,i){e=(0,g.arrayify)(e);r=(0,g.arrayify)(r);var o;var a=1;var s=new Uint8Array(n);var u=new Uint8Array(r.length+4);u.set(r);var c;var f;for(var l=1;l<=a;l++){u[r.length]=l>>24&255;u[r.length+1]=l>>16&255;u[r.length+2]=l>>8&255;u[r.length+3]=l&255;var h=(0,g.arrayify)((0,m.computeHmac)(i,e,u));if(!o){o=h.length;f=new Uint8Array(o);a=Math.ceil(n/o);c=n-(a-1)*o}f.set(h);for(var d=1;d<t;d++){h=(0,g.arrayify)((0,m.computeHmac)(i,e,h));for(var p=0;p<o;p++)f[p]^=h[p]}var v=(l-1)*o;var b=l===a?c:o;s.set((0,g.arrayify)(f).slice(0,b),v)}return(0,g.hexlify)(s)}t.pbkdf2=n},{"@ethersproject/bytes":31,"@ethersproject/sha2":88}],59:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.pbkdf2=void 0;var n=e("./pbkdf2");Object.defineProperty(t,"pbkdf2",{enumerable:true,get:function(){return n.pbkdf2}})},{"./pbkdf2":58}],60:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="properties/5.5.0"},{}],61:[function(e,r,t){"use strict";var i=this&&this.__awaiter||function(e,a,t,s){function u(r){return r instanceof t?r:new t(function(e){e(r)})}return new(t||(t=Promise))(function(r,t){function n(e){try{o(s.next(e))}catch(e){t(e)}}function i(e){try{o(s["throw"](e))}catch(e){t(e)}}function o(e){e.done?r(e.value):u(e.value).then(n,i)}o((s=s.apply(e,a||[])).next())})};var o=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(e){return u([r,e])}}function u(r){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(a=r[0]&2?o["return"]:r[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;if(o=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;o=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){n.label=r[1];break}if(r[0]===6&&n.label<a[1]){n.label=a[1];a=r;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(r);break}if(a[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];o=0}finally{i=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};Object.defineProperty(t,"__esModule",{value:true});t.Description=t.deepCopy=t.shallowCopy=t.checkProperties=t.resolveProperties=t.getStatic=t.defineReadOnly=void 0;var n=e("@ethersproject/logger");var a=e("./_version");var s=new n.Logger(a.version);function u(e,r,t){Object.defineProperty(e,r,{enumerable:true,value:t,writable:false})}t.defineReadOnly=u;function c(e,r){for(var t=0;t<32;t++){if(e[r]){return e[r]}if(!e.prototype||typeof e.prototype!=="object"){break}e=Object.getPrototypeOf(e.prototype).constructor}return null}t.getStatic=c;function f(n){return i(this,void 0,void 0,function(){var r,t;return o(this,function(e){switch(e.label){case 0:r=Object.keys(n).map(function(r){var e=n[r];return Promise.resolve(e).then(function(e){return{key:r,value:e}})});return[4,Promise.all(r)];case 1:t=e.sent();return[2,t.reduce(function(e,r){e[r.key]=r.value;return e},{})]}})})}t.resolveProperties=f;function l(r,t){if(!r||typeof r!=="object"){s.throwArgumentError("invalid object","object",r)}Object.keys(r).forEach(function(e){if(!t[e]){s.throwArgumentError("invalid object key - "+e,"transaction:"+e,r)}})}t.checkProperties=l;function h(e){var r={};for(var t in e){r[t]=e[t]}return r}t.shallowCopy=h;var d={bigint:true,boolean:true,function:true,number:true,string:true};function p(e){if(e===undefined||e===null||d[typeof e]){return true}if(Array.isArray(e)||typeof e==="object"){if(!Object.isFrozen(e)){return false}var r=Object.keys(e);for(var t=0;t<r.length;t++){var n=null;try{n=e[r[t]]}catch(e){continue}if(!p(n)){return false}}return true}return s.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function v(e){if(p(e)){return e}if(Array.isArray(e)){return Object.freeze(e.map(function(e){return b(e)}))}if(typeof e==="object"){var r={};for(var t in e){var n=e[t];if(n===undefined){continue}u(r,t,b(n))}return r}return s.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function b(e){return v(e)}t.deepCopy=b;var g=function(){function e(e){for(var r in e){this[r]=b(e[r])}}return e}();t.Description=g},{"./_version":60,"@ethersproject/logger":55}],62:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="providers/5.5.1"},{}],63:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(t,"__esModule",{value:true});t.AlchemyProvider=t.AlchemyWebSocketProvider=void 0;var a=e("@ethersproject/properties");var i=e("./formatter");var o=e("./websocket-provider");var s=e("@ethersproject/logger");var u=e("./_version");var c=new s.Logger(u.version);var f=e("./url-json-rpc-provider");var l="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";var h=function(o){n(e,o);function e(e,r){var t=this;var n=new d(e,r);var i=n.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");t=o.call(this,i,n.network)||this;(0,a.defineReadOnly)(t,"apiKey",n.apiKey);return t}e.prototype.isCommunityResource=function(){return this.apiKey===l};return e}(o.WebSocketProvider);t.AlchemyWebSocketProvider=h;var d=function(e){n(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}r.getWebSocketProvider=function(e,r){return new h(e,r)};r.getApiKey=function(e){if(e==null){return l}if(e&&typeof e!=="string"){c.throwArgumentError("invalid apiKey","apiKey",e)}return e};r.getUrl=function(e,t){var r=null;switch(e.name){case"homestead":r="eth-mainnet.alchemyapi.io/v2/";break;case"ropsten":r="eth-ropsten.alchemyapi.io/v2/";break;case"rinkeby":r="eth-rinkeby.alchemyapi.io/v2/";break;case"goerli":r="eth-goerli.alchemyapi.io/v2/";break;case"kovan":r="eth-kovan.alchemyapi.io/v2/";break;case"matic":r="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":r="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":r="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-rinkeby":r="arb-rinkeby.g.alchemy.com/v2/";break;case"optimism":r="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-kovan":r="opt-kovan.g.alchemy.com/v2/";break;default:c.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:true,url:"https:/"+"/"+r+t,throttleCallback:function(e,r){if(t===l){(0,i.showThrottleMessage)()}return Promise.resolve(true)}}};r.prototype.isCommunityResource=function(){return this.apiKey===l};return r}(f.UrlJsonRpcProvider);t.AlchemyProvider=d},{"./_version":62,"./formatter":70,"./url-json-rpc-provider":77,"./websocket-provider":79,"@ethersproject/logger":55,"@ethersproject/properties":61}],64:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();var m=this&&this.__awaiter||function(e,a,t,s){function u(r){return r instanceof t?r:new t(function(e){e(r)})}return new(t||(t=Promise))(function(r,t){function n(e){try{o(s.next(e))}catch(e){t(e)}}function i(e){try{o(s["throw"](e))}catch(e){t(e)}}function o(e){e.done?r(e.value):u(e.value).then(n,i)}o((s=s.apply(e,a||[])).next())})};var A=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(e){return u([r,e])}}function u(r){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(a=r[0]&2?o["return"]:r[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;if(o=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;o=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){n.label=r[1];break}if(r[0]===6&&n.label<a[1]){n.label=a[1];a=r;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(r);break}if(a[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];o=0}finally{i=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.BaseProvider=t.Resolver=t.Event=void 0;var o=e("@ethersproject/abstract-provider");var a=e("@ethersproject/basex");var E=e("@ethersproject/bignumber");var M=e("@ethersproject/bytes");var s=e("@ethersproject/constants");var c=e("@ethersproject/hash");var u=e("@ethersproject/networks");var f=e("@ethersproject/properties");var l=e("@ethersproject/sha2");var h=e("@ethersproject/strings");var P=e("@ethersproject/web");var d=i(e("bech32"));var y=e("@ethersproject/logger");var p=e("./_version");var w=new y.Logger(p.version);var v=e("./formatter");function b(e){if(e==null){return"null"}if((0,M.hexDataLength)(e)!==32){w.throwArgumentError("invalid topic","topic",e)}return e.toLowerCase()}function g(e){e=e.slice();while(e.length>0&&e[e.length-1]==null){e.pop()}return e.map(function(e){if(Array.isArray(e)){var r={};e.forEach(function(e){r[b(e)]=true});var t=Object.keys(r);t.sort();return t.join("|")}else{return b(e)}}).join("&")}function _(e){if(e===""){return[]}return e.split(/&/g).map(function(e){if(e===""){return[]}var r=e.split("|").map(function(e){return e==="null"?null:e});return r.length===1?r[0]:r})}function S(e){if(typeof e==="string"){e=e.toLowerCase();if((0,M.hexDataLength)(e)===32){return"tx:"+e}if(e.indexOf(":")===-1){return e}}else if(Array.isArray(e)){return"filter:*:"+g(e)}else if(o.ForkEvent.isForkEvent(e)){w.warn("not implemented");throw new Error("not implemented")}else if(e&&typeof e==="object"){return"filter:"+(e.address||"*")+":"+g(e.topics||[])}throw new Error("invalid event - "+e)}function T(){return(new Date).getTime()}function k(r){return new Promise(function(e){setTimeout(e,r)})}var O=["block","network","pending","poll"];var B=function(){function e(e,r,t){(0,f.defineReadOnly)(this,"tag",e);(0,f.defineReadOnly)(this,"listener",r);(0,f.defineReadOnly)(this,"once",t)}Object.defineProperty(e.prototype,"event",{get:function(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"type",{get:function(){return this.tag.split(":")[0]},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"hash",{get:function(){var e=this.tag.split(":");if(e[0]!=="tx"){return null}return e[1]},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"filter",{get:function(){var e=this.tag.split(":");if(e[0]!=="filter"){return null}var r=e[1];var t=_(e[2]);var n={};if(t.length>0){n.topics=t}if(r&&r!=="*"){n.address=r}return n},enumerable:false,configurable:true});e.prototype.pollable=function(){return this.tag.indexOf(":")>=0||O.indexOf(this.tag)>=0};return e}();t.Event=B;var C={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function R(e){return(0,M.hexZeroPad)(E.BigNumber.from(e).toHexString(),32)}function L(e){return a.Base58.encode((0,M.concat)([e,(0,M.hexDataSlice)((0,l.sha256)((0,l.sha256)(e)),0,4)]))}var F=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),new RegExp("^(ipfs)://(.*)$","i"),new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function j(e){try{return(0,h.toUtf8String)(x(e))}catch(e){}return null}function x(e){if(e==="0x"){return null}var r=E.BigNumber.from((0,M.hexDataSlice)(e,0,32)).toNumber();var t=E.BigNumber.from((0,M.hexDataSlice)(e,r,r+32)).toNumber();return(0,M.hexDataSlice)(e,r+32,r+32+t)}var N=function(){function e(e,r,t,n){(0,f.defineReadOnly)(this,"provider",e);(0,f.defineReadOnly)(this,"name",t);(0,f.defineReadOnly)(this,"address",e.formatter.address(r));(0,f.defineReadOnly)(this,"_resolvedAddress",n)}e.prototype._fetchBytes=function(i,o){return m(this,void 0,void 0,function(){var r,t,n;return A(this,function(e){switch(e.label){case 0:r={to:this.address,data:(0,M.hexConcat)([i,(0,c.namehash)(this.name),o||"0x"])};e.label=1;case 1:e.trys.push([1,3,,4]);t=x;return[4,this.provider.call(r)];case 2:return[2,t.apply(void 0,[e.sent()])];case 3:n=e.sent();if(n.code===y.Logger.errors.CALL_EXCEPTION){return[2,null]}return[2,null];case 4:return[2]}})})};e.prototype._getAddress=function(e,r){var t=C[String(e)];if(t==null){w.throwError("unsupported coin type: "+e,y.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress("+e+")"})}if(t.ilk==="eth"){return this.provider.formatter.address(r)}var n=(0,M.arrayify)(r);if(t.p2pkh!=null){var i=r.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(i){var o=parseInt(i[1],16);if(i[2].length===o*2&&o>=1&&o<=75){return L((0,M.concat)([[t.p2pkh],"0x"+i[2]]))}}}if(t.p2sh!=null){var a=r.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(a){var s=parseInt(a[1],16);if(a[2].length===s*2&&s>=1&&s<=75){return L((0,M.concat)([[t.p2sh],"0x"+a[2]]))}}}if(t.prefix!=null){var u=n[1];var c=n[0];if(c===0){if(u!==20&&u!==32){c=-1}}else{c=-1}if(c>=0&&n.length===2+u&&u>=1&&u<=75){var f=d.default.toWords(n.slice(2));f.unshift(c);return d.default.encode(t.prefix,f)}}return null};e.prototype.getAddress=function(a){return m(this,void 0,void 0,function(){var r,t,n,i,o;return A(this,function(e){switch(e.label){case 0:if(a==null){a=60}if(!(a===60))return[3,4];e.label=1;case 1:e.trys.push([1,3,,4]);r={to:this.address,data:"0x3b3b57de"+(0,c.namehash)(this.name).substring(2)};return[4,this.provider.call(r)];case 2:t=e.sent();if(t==="0x"||t===s.HashZero){return[2,null]}return[2,this.provider.formatter.callAddress(t)];case 3:n=e.sent();if(n.code===y.Logger.errors.CALL_EXCEPTION){return[2,null]}throw n;case 4:return[4,this._fetchBytes("0xf1cb7e06",R(a))];case 5:i=e.sent();if(i==null||i==="0x"){return[2,null]}o=this._getAddress(a,i);if(o==null){w.throwError("invalid or unsupported coin data",y.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress("+a+")",coinType:a,data:i})}return[2,o]}})})};e.prototype.getAvatar=function(){return m(this,void 0,void 0,function(){var r,t,n,i,o,a,s,u,c,f,l,h,d,p,v,b,g,m,y,w,_,S;return A(this,function(e){switch(e.label){case 0:r=[];e.label=1;case 1:e.trys.push([1,19,,20]);return[4,this.getText("avatar")];case 2:t=e.sent();if(t==null){return[2,null]}n=0;e.label=3;case 3:if(!(n<F.length))return[3,18];i=t.match(F[n]);if(i==null){return[3,17]}o=i[1];switch(o){case"https":return[3,4];case"data":return[3,5];case"ipfs":return[3,6];case"erc721":return[3,7];case"erc1155":return[3,7]}return[3,17];case 4:r.push({type:"url",content:t});return[2,{linkage:r,url:t}];case 5:r.push({type:"data",content:t});return[2,{linkage:r,url:t}];case 6:r.push({type:"ipfs",content:t});return[2,{linkage:r,url:"https://gateway.ipfs.io/ipfs/"+t.substring(7)}];case 7:a=i[1]==="erc721"?"0xc87b56dd":"0x0e89341c";r.push({type:i[1],content:t});u=this._resolvedAddress;if(u)return[3,9];return[4,this.getAddress()];case 8:u=e.sent();e.label=9;case 9:s=u;c=(i[2]||"").split("/");if(c.length!==2){return[2,null]}return[4,this.provider.formatter.address(c[0])];case 10:f=e.sent();l=(0,M.hexZeroPad)(E.BigNumber.from(c[1]).toHexString(),32);if(!(i[1]==="erc721"))return[3,12];p=(d=this.provider.formatter).callAddress;return[4,this.provider.call({to:f,data:(0,M.hexConcat)(["0x6352211e",l])})];case 11:h=p.apply(d,[e.sent()]);if(s!==h){return[2,null]}r.push({type:"owner",content:h});return[3,14];case 12:if(!(i[1]==="erc1155"))return[3,14];g=(b=E.BigNumber).from;return[4,this.provider.call({to:f,data:(0,M.hexConcat)(["0x00fdd58e",(0,M.hexZeroPad)(s,32),l])})];case 13:v=g.apply(b,[e.sent()]);if(v.isZero()){return[2,null]}r.push({type:"balance",content:v.toString()});e.label=14;case 14:m={to:this.provider.formatter.address(c[0]),data:(0,M.hexConcat)([a,l])};w=j;return[4,this.provider.call(m)];case 15:y=w.apply(void 0,[e.sent()]);if(y==null){return[2,null]}r.push({type:"metadata-url",content:y});if(i[1]==="erc1155"){y=y.replace("{id}",l.substring(2))}return[4,(0,P.fetchJson)(y)];case 16:_=e.sent();if(!_||typeof _.image!=="string"||!_.image.match(/^(https:\/\/|data:)/i)){return[2,null]}r.push({type:"metadata",content:JSON.stringify(_)});r.push({type:"url",content:_.image});return[2,{linkage:r,url:_.image}];case 17:n++;return[3,3];case 18:return[3,20];case 19:S=e.sent();return[3,20];case 20:return[2,null]}})})};e.prototype.getContentHash=function(){return m(this,void 0,void 0,function(){var r,t,n,i;return A(this,function(e){switch(e.label){case 0:return[4,this._fetchBytes("0xbc1c58d1")];case 1:r=e.sent();if(r==null||r==="0x"){return[2,null]}t=r.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){n=parseInt(t[3],16);if(t[4].length===n*2){return[2,"ipfs://"+a.Base58.encode("0x"+t[1])]}}i=r.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(i){if(i[1].length===32*2){return[2,"bzz://"+i[1]]}}return[2,w.throwError("invalid or unsupported content hash data",y.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:r})]}})})};e.prototype.getText=function(n){return m(this,void 0,void 0,function(){var r,t;return A(this,function(e){switch(e.label){case 0:r=(0,h.toUtf8Bytes)(n);r=(0,M.concat)([R(64),R(r.length),r]);if(r.length%32!==0){r=(0,M.concat)([r,(0,M.hexZeroPad)("0x",32-n.length%32)])}return[4,this._fetchBytes("0x59d1d43c",(0,M.hexlify)(r))];case 1:t=e.sent();if(t==null||t==="0x"){return[2,null]}return[2,(0,h.toUtf8String)(t)]}})})};return e}();t.Resolver=N;var D=null;var J=1;var I=function(i){n(e,i);function e(e){var r=this.constructor;var t=this;w.checkNew(r,o.Provider);t=i.call(this)||this;t._events=[];t._emitted={block:-2};t.formatter=r.getFormatter();(0,f.defineReadOnly)(t,"anyNetwork",e==="any");if(t.anyNetwork){e=t.detectNetwork()}if(e instanceof Promise){t._networkPromise=e;e.catch(function(e){});t._ready().catch(function(e){})}else{var n=(0,f.getStatic)(r,"getNetwork")(e);if(n){(0,f.defineReadOnly)(t,"_network",n);t.emit("network",n,null)}else{w.throwArgumentError("invalid network","network",e)}}t._maxInternalBlockNumber=-1024;t._lastBlockNumber=-2;t._pollingInterval=4e3;t._fastQueryDate=0;return t}e.prototype._ready=function(){return m(this,void 0,void 0,function(){var r,t;return A(this,function(e){switch(e.label){case 0:if(!(this._network==null))return[3,7];r=null;if(!this._networkPromise)return[3,4];e.label=1;case 1:e.trys.push([1,3,,4]);return[4,this._networkPromise];case 2:r=e.sent();return[3,4];case 3:t=e.sent();return[3,4];case 4:if(!(r==null))return[3,6];return[4,this.detectNetwork()];case 5:r=e.sent();e.label=6;case 6:if(!r){w.throwError("no network detected",y.Logger.errors.UNKNOWN_ERROR,{})}if(this._network==null){if(this.anyNetwork){this._network=r}else{(0,f.defineReadOnly)(this,"_network",r)}this.emit("network",r,null)}e.label=7;case 7:return[2,this._network]}})})};Object.defineProperty(e.prototype,"ready",{get:function(){var e=this;return(0,P.poll)(function(){return e._ready().then(function(e){return e},function(e){if(e.code===y.Logger.errors.NETWORK_ERROR&&e.event==="noNetwork"){return undefined}throw e})})},enumerable:false,configurable:true});e.getFormatter=function(){if(D==null){D=new v.Formatter}return D};e.getNetwork=function(e){return(0,u.getNetwork)(e==null?"homestead":e)};e.prototype._getInternalBlockNumber=function(s){return m(this,void 0,void 0,function(){var r,t,n,i,o;var a=this;return A(this,function(e){switch(e.label){case 0:return[4,this._ready()];case 1:e.sent();if(!(s>0))return[3,7];e.label=2;case 2:if(!this._internalBlockNumber)return[3,7];r=this._internalBlockNumber;e.label=3;case 3:e.trys.push([3,5,,6]);return[4,r];case 4:t=e.sent();if(T()-t.respTime<=s){return[2,t.blockNumber]}return[3,7];case 5:n=e.sent();if(this._internalBlockNumber===r){return[3,7]}return[3,6];case 6:return[3,2];case 7:i=T();o=(0,f.resolveProperties)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(function(e){return null},function(e){return e})}).then(function(e){var r=e.blockNumber,t=e.networkError;if(t){if(a._internalBlockNumber===o){a._internalBlockNumber=null}throw t}var n=T();r=E.BigNumber.from(r).toNumber();if(r<a._maxInternalBlockNumber){r=a._maxInternalBlockNumber}a._maxInternalBlockNumber=r;a._setFastBlockNumber(r);return{blockNumber:r,reqTime:i,respTime:n}});this._internalBlockNumber=o;o.catch(function(e){if(a._internalBlockNumber===o){a._internalBlockNumber=null}});return[4,o];case 8:return[2,e.sent().blockNumber]}})})};e.prototype.poll=function(){return m(this,void 0,void 0,function(){var r,i,o,t,n;var a=this;return A(this,function(e){switch(e.label){case 0:r=J++;i=[];o=null;e.label=1;case 1:e.trys.push([1,3,,4]);return[4,this._getInternalBlockNumber(100+this.pollingInterval/2)];case 2:o=e.sent();return[3,4];case 3:t=e.sent();this.emit("error",t);return[2];case 4:this._setFastBlockNumber(o);this.emit("poll",r,o);if(o===this._lastBlockNumber){this.emit("didPoll",r);return[2]}if(this._emitted.block===-2){this._emitted.block=o-1}if(Math.abs(this._emitted.block-o)>1e3){w.warn("network block skew detected; skipping block events (emitted="+this._emitted.block+" blockNumber"+o+")");this.emit("error",w.makeError("network block skew detected",y.Logger.errors.NETWORK_ERROR,{blockNumber:o,event:"blockSkew",previousBlockNumber:this._emitted.block}));this.emit("block",o)}else{for(n=this._emitted.block+1;n<=o;n++){this.emit("block",n)}}if(this._emitted.block!==o){this._emitted.block=o;Object.keys(this._emitted).forEach(function(e){if(e==="block"){return}var r=a._emitted[e];if(r==="pending"){return}if(o-r>12){delete a._emitted[e]}})}if(this._lastBlockNumber===-2){this._lastBlockNumber=o-1}this._events.forEach(function(e){switch(e.type){case"tx":{var r=e.hash;var t=a.getTransactionReceipt(r).then(function(e){if(!e||e.blockNumber==null){return null}a._emitted["t:"+r]=e.blockNumber;a.emit(r,e);return null}).catch(function(e){a.emit("error",e)});i.push(t);break}case"filter":{var n=e.filter;n.fromBlock=a._lastBlockNumber+1;n.toBlock=o;var t=a.getLogs(n).then(function(e){if(e.length===0){return}e.forEach(function(e){a._emitted["b:"+e.blockHash]=e.blockNumber;a._emitted["t:"+e.transactionHash]=e.blockNumber;a.emit(n,e)})}).catch(function(e){a.emit("error",e)});i.push(t);break}}});this._lastBlockNumber=o;Promise.all(i).then(function(){a.emit("didPoll",r)}).catch(function(e){a.emit("error",e)});return[2]}})})};e.prototype.resetEventsBlock=function(e){this._lastBlockNumber=e-1;if(this.polling){this.poll()}};Object.defineProperty(e.prototype,"network",{get:function(){return this._network},enumerable:false,configurable:true});e.prototype.detectNetwork=function(){return m(this,void 0,void 0,function(){return A(this,function(e){return[2,w.throwError("provider does not support network detection",y.Logger.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})]})})};e.prototype.getNetwork=function(){return m(this,void 0,void 0,function(){var r,t,n;return A(this,function(e){switch(e.label){case 0:return[4,this._ready()];case 1:r=e.sent();return[4,this.detectNetwork()];case 2:t=e.sent();if(!(r.chainId!==t.chainId))return[3,5];if(!this.anyNetwork)return[3,4];this._network=t;this._lastBlockNumber=-2;this._fastBlockNumber=null;this._fastBlockNumberPromise=null;this._fastQueryDate=0;this._emitted.block=-2;this._maxInternalBlockNumber=-1024;this._internalBlockNumber=null;this.emit("network",t,r);return[4,k(0)];case 3:e.sent();return[2,this._network];case 4:n=w.makeError("underlying network changed",y.Logger.errors.NETWORK_ERROR,{event:"changed",network:r,detectedNetwork:t});this.emit("error",n);throw n;case 5:return[2,r]}})})};Object.defineProperty(e.prototype,"blockNumber",{get:function(){var r=this;this._getInternalBlockNumber(100+this.pollingInterval/2).then(function(e){r._setFastBlockNumber(e)},function(e){});return this._fastBlockNumber!=null?this._fastBlockNumber:-1},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"polling",{get:function(){return this._poller!=null},set:function(e){var r=this;if(e&&!this._poller){this._poller=setInterval(function(){r.poll()},this.pollingInterval);if(!this._bootstrapPoll){this._bootstrapPoll=setTimeout(function(){r.poll();r._bootstrapPoll=setTimeout(function(){if(!r._poller){r.poll()}r._bootstrapPoll=null},r.pollingInterval)},0)}}else if(!e&&this._poller){clearInterval(this._poller);this._poller=null}},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"pollingInterval",{get:function(){return this._pollingInterval},set:function(e){var r=this;if(typeof e!=="number"||e<=0||parseInt(String(e))!=e){throw new Error("invalid polling interval")}this._pollingInterval=e;if(this._poller){clearInterval(this._poller);this._poller=setInterval(function(){r.poll()},this._pollingInterval)}},enumerable:false,configurable:true});e.prototype._getFastBlockNumber=function(){var r=this;var e=T();if(e-this._fastQueryDate>2*this._pollingInterval){this._fastQueryDate=e;this._fastBlockNumberPromise=this.getBlockNumber().then(function(e){if(r._fastBlockNumber==null||e>r._fastBlockNumber){r._fastBlockNumber=e}return r._fastBlockNumber})}return this._fastBlockNumberPromise};e.prototype._setFastBlockNumber=function(e){if(this._fastBlockNumber!=null&&e<this._fastBlockNumber){return}this._fastQueryDate=T();if(this._fastBlockNumber==null||e>this._fastBlockNumber){this._fastBlockNumber=e;this._fastBlockNumberPromise=Promise.resolve(e)}};e.prototype.waitForTransaction=function(r,t,n){return m(this,void 0,void 0,function(){return A(this,function(e){return[2,this._waitForTransaction(r,t==null?1:t,n||0,null)]})})};e.prototype._waitForTransaction=function(v,b,o,g){return m(this,void 0,void 0,function(){var r;var i=this;return A(this,function(e){switch(e.label){case 0:return[4,this.getTransactionReceipt(v)];case 1:r=e.sent();if((r?r.confirmations:0)>=b){return[2,r]}return[2,new Promise(function(r,c){var e=[];var f=false;var l=function(){if(f){return true}f=true;e.forEach(function(e){e()});return false};var t=function(e){if(e.confirmations<b){return}if(l()){return}r(e)};i.on(v,t);e.push(function(){i.removeListener(v,t)});if(g){var h=g.startBlock;var d=null;var p=function(u){return m(i,void 0,void 0,function(){var r=this;return A(this,function(e){switch(e.label){case 0:if(f){return[2]}return[4,k(1e3)];case 1:e.sent();this.getTransactionCount(g.from).then(function(s){return m(r,void 0,void 0,function(){var r,t,n,i,o,a;return A(this,function(e){switch(e.label){case 0:if(f){return[2]}if(!(s<=g.nonce))return[3,1];h=u;return[3,9];case 1:return[4,this.getTransaction(v)];case 2:r=e.sent();if(r&&r.blockNumber!=null){return[2]}if(d==null){d=h-3;if(d<g.startBlock){d=g.startBlock}}e.label=3;case 3:if(!(d<=u))return[3,9];if(f){return[2]}return[4,this.getBlockWithTransactions(d)];case 4:t=e.sent();n=0;e.label=5;case 5:if(!(n<t.transactions.length))return[3,8];i=t.transactions[n];if(i.hash===v){return[2]}if(!(i.from===g.from&&i.nonce===g.nonce))return[3,7];if(f){return[2]}return[4,this.waitForTransaction(i.hash,b)];case 6:o=e.sent();if(l()){return[2]}a="replaced";if(i.data===g.data&&i.to===g.to&&i.value.eq(g.value)){a="repriced"}else if(i.data==="0x"&&i.from===i.to&&i.value.isZero()){a="cancelled"}c(w.makeError("transaction was replaced",y.Logger.errors.TRANSACTION_REPLACED,{cancelled:a==="replaced"||a==="cancelled",reason:a,replacement:this._wrapTransaction(i),hash:v,receipt:o}));return[2];case 7:n++;return[3,5];case 8:d++;return[3,3];case 9:if(f){return[2]}this.once("block",p);return[2]}})})},function(e){if(f){return}r.once("block",p)});return[2]}})})};if(f){return}i.once("block",p);e.push(function(){i.removeListener("block",p)})}if(typeof o==="number"&&o>0){var n=setTimeout(function(){if(l()){return}c(w.makeError("timeout exceeded",y.Logger.errors.TIMEOUT,{timeout:o}))},o);if(n.unref){n.unref()}e.push(function(){clearTimeout(n)})}})]}})})};e.prototype.getBlockNumber=function(){return m(this,void 0,void 0,function(){return A(this,function(e){return[2,this._getInternalBlockNumber(0)]})})};e.prototype.getGasPrice=function(){return m(this,void 0,void 0,function(){var r;return A(this,function(e){switch(e.label){case 0:return[4,this.getNetwork()];case 1:e.sent();return[4,this.perform("getGasPrice",{})];case 2:r=e.sent();try{return[2,E.BigNumber.from(r)]}catch(e){return[2,w.throwError("bad result from backend",y.Logger.errors.SERVER_ERROR,{method:"getGasPrice",result:r,error:e})]}return[2]}})})};e.prototype.getBalance=function(n,i){return m(this,void 0,void 0,function(){var r,t;return A(this,function(e){switch(e.label){case 0:return[4,this.getNetwork()];case 1:e.sent();return[4,(0,f.resolveProperties)({address:this._getAddress(n),blockTag:this._getBlockTag(i)})];case 2:r=e.sent();return[4,this.perform("getBalance",r)];case 3:t=e.sent();try{return[2,E.BigNumber.from(t)]}catch(e){return[2,w.throwError("bad result from backend",y.Logger.errors.SERVER_ERROR,{method:"getBalance",params:r,result:t,error:e})]}return[2]}})})};e.prototype.getTransactionCount=function(n,i){return m(this,void 0,void 0,function(){var r,t;return A(this,function(e){switch(e.label){case 0:return[4,this.getNetwork()];case 1:e.sent();return[4,(0,f.resolveProperties)({address:this._getAddress(n),blockTag:this._getBlockTag(i)})];case 2:r=e.sent();return[4,this.perform("getTransactionCount",r)];case 3:t=e.sent();try{return[2,E.BigNumber.from(t).toNumber()]}catch(e){return[2,w.throwError("bad result from backend",y.Logger.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:t,error:e})]}return[2]}})})};e.prototype.getCode=function(n,i){return m(this,void 0,void 0,function(){var r,t;return A(this,function(e){switch(e.label){case 0:return[4,this.getNetwork()];case 1:e.sent();return[4,(0,f.resolveProperties)({address:this._getAddress(n),blockTag:this._getBlockTag(i)})];case 2:r=e.sent();return[4,this.perform("getCode",r)];case 3:t=e.sent();try{return[2,(0,M.hexlify)(t)]}catch(e){return[2,w.throwError("bad result from backend",y.Logger.errors.SERVER_ERROR,{method:"getCode",params:r,result:t,error:e})]}return[2]}})})};e.prototype.getStorageAt=function(n,i,o){return m(this,void 0,void 0,function(){var r,t;return A(this,function(e){switch(e.label){case 0:return[4,this.getNetwork()];case 1:e.sent();return[4,(0,f.resolveProperties)({address:this._getAddress(n),blockTag:this._getBlockTag(o),position:Promise.resolve(i).then(function(e){return(0,M.hexValue)(e)})})];case 2:r=e.sent();return[4,this.perform("getStorageAt",r)];case 3:t=e.sent();try{return[2,(0,M.hexlify)(t)]}catch(e){return[2,w.throwError("bad result from backend",y.Logger.errors.SERVER_ERROR,{method:"getStorageAt",params:r,result:t,error:e})]}return[2]}})})};e.prototype._wrapTransaction=function(o,e,a){var r=this;if(e!=null&&(0,M.hexDataLength)(e)!==32){throw new Error("invalid response - sendTransaction")}var t=o;if(e!=null&&o.hash!==e){w.throwError("Transaction hash mismatch from Provider.sendTransaction.",y.Logger.errors.UNKNOWN_ERROR,{expectedHash:o.hash,returnedHash:e})}t.wait=function(n,i){return m(r,void 0,void 0,function(){var r,t;return A(this,function(e){switch(e.label){case 0:if(n==null){n=1}if(i==null){i=0}r=undefined;if(n!==0&&a!=null){r={data:o.data,from:o.from,nonce:o.nonce,to:o.to,value:o.value,startBlock:a}}return[4,this._waitForTransaction(o.hash,n,i,r)];case 1:t=e.sent();if(t==null&&n===0){return[2,null]}this._emitted["t:"+o.hash]=t.blockNumber;if(t.status===0){w.throwError("transaction failed",y.Logger.errors.CALL_EXCEPTION,{transactionHash:o.hash,transaction:o,receipt:t})}return[2,t]}})})};return t};e.prototype.sendTransaction=function(a){return m(this,void 0,void 0,function(){var r,t,n,i,o;return A(this,function(e){switch(e.label){case 0:return[4,this.getNetwork()];case 1:e.sent();return[4,Promise.resolve(a).then(function(e){return(0,M.hexlify)(e)})];case 2:r=e.sent();t=this.formatter.transaction(a);if(t.confirmations==null){t.confirmations=0}return[4,this._getInternalBlockNumber(100+2*this.pollingInterval)];case 3:n=e.sent();e.label=4;case 4:e.trys.push([4,6,,7]);return[4,this.perform("sendTransaction",{signedTransaction:r})];case 5:i=e.sent();return[2,this._wrapTransaction(t,i,n)];case 6:o=e.sent();o.transaction=t;o.transactionHash=t.hash;throw o;case 7:return[2]}})})};e.prototype._getTransactionRequest=function(a){return m(this,void 0,void 0,function(){var r,t,n,i;var o=this;return A(this,function(e){switch(e.label){case 0:return[4,a];case 1:r=e.sent();t={};["from","to"].forEach(function(e){if(r[e]==null){return}t[e]=Promise.resolve(r[e]).then(function(e){return e?o._getAddress(e):null})});["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(function(e){if(r[e]==null){return}t[e]=Promise.resolve(r[e]).then(function(e){return e?E.BigNumber.from(e):null})});["type"].forEach(function(e){if(r[e]==null){return}t[e]=Promise.resolve(r[e]).then(function(e){return e!=null?e:null})});if(r.accessList){t.accessList=this.formatter.accessList(r.accessList)}["data"].forEach(function(e){if(r[e]==null){return}t[e]=Promise.resolve(r[e]).then(function(e){return e?(0,M.hexlify)(e):null})});i=(n=this.formatter).transactionRequest;return[4,(0,f.resolveProperties)(t)];case 2:return[2,i.apply(n,[e.sent()])]}})})};e.prototype._getFilter=function(o){return m(this,void 0,void 0,function(){var r,t,n;var i=this;return A(this,function(e){switch(e.label){case 0:return[4,o];case 1:o=e.sent();r={};if(o.address!=null){r.address=this._getAddress(o.address)}["blockHash","topics"].forEach(function(e){if(o[e]==null){return}r[e]=o[e]});["fromBlock","toBlock"].forEach(function(e){if(o[e]==null){return}r[e]=i._getBlockTag(o[e])});n=(t=this.formatter).filter;return[4,(0,f.resolveProperties)(r)];case 2:return[2,n.apply(t,[e.sent()])]}})})};e.prototype.call=function(n,i){return m(this,void 0,void 0,function(){var r,t;return A(this,function(e){switch(e.label){case 0:return[4,this.getNetwork()];case 1:e.sent();return[4,(0,f.resolveProperties)({transaction:this._getTransactionRequest(n),blockTag:this._getBlockTag(i)})];case 2:r=e.sent();return[4,this.perform("call",r)];case 3:t=e.sent();try{return[2,(0,M.hexlify)(t)]}catch(e){return[2,w.throwError("bad result from backend",y.Logger.errors.SERVER_ERROR,{method:"call",params:r,result:t,error:e})]}return[2]}})})};e.prototype.estimateGas=function(n){return m(this,void 0,void 0,function(){var r,t;return A(this,function(e){switch(e.label){case 0:return[4,this.getNetwork()];case 1:e.sent();return[4,(0,f.resolveProperties)({transaction:this._getTransactionRequest(n)})];case 2:r=e.sent();return[4,this.perform("estimateGas",r)];case 3:t=e.sent();try{return[2,E.BigNumber.from(t)]}catch(e){return[2,w.throwError("bad result from backend",y.Logger.errors.SERVER_ERROR,{method:"estimateGas",params:r,result:t,error:e})]}return[2]}})})};e.prototype._getAddress=function(t){return m(this,void 0,void 0,function(){var r;return A(this,function(e){switch(e.label){case 0:return[4,t];case 1:t=e.sent();if(typeof t!=="string"){w.throwArgumentError("invalid address or ENS name","name",t)}return[4,this.resolveName(t)];case 2:r=e.sent();if(r==null){w.throwError("ENS name not configured",y.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName("+JSON.stringify(t)+")"})}return[2,r]}})})};e.prototype._getBlock=function(i,f){return m(this,void 0,void 0,function(){var u,c,r,t;var n=this;return A(this,function(e){switch(e.label){case 0:return[4,this.getNetwork()];case 1:e.sent();return[4,i];case 2:i=e.sent();u=-128;c={includeTransactions:!!f};if(!(0,M.isHexString)(i,32))return[3,3];c.blockHash=i;return[3,6];case 3:e.trys.push([3,5,,6]);r=c;return[4,this._getBlockTag(i)];case 4:r.blockTag=e.sent();if((0,M.isHexString)(c.blockTag)){u=parseInt(c.blockTag.substring(2),16)}return[3,6];case 5:t=e.sent();w.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",i);return[3,6];case 6:return[2,(0,P.poll)(function(){return m(n,void 0,void 0,function(){var r,t,n,i,o,a;var s=this;return A(this,function(e){switch(e.label){case 0:return[4,this.perform("getBlock",c)];case 1:r=e.sent();if(r==null){if(c.blockHash!=null){if(this._emitted["b:"+c.blockHash]==null){return[2,null]}}if(c.blockTag!=null){if(u>this._emitted.block){return[2,null]}}return[2,undefined]}if(!f)return[3,8];t=null;n=0;e.label=2;case 2:if(!(n<r.transactions.length))return[3,7];i=r.transactions[n];if(!(i.blockNumber==null))return[3,3];i.confirmations=0;return[3,6];case 3:if(!(i.confirmations==null))return[3,6];if(!(t==null))return[3,5];return[4,this._getInternalBlockNumber(100+2*this.pollingInterval)];case 4:t=e.sent();e.label=5;case 5:o=t-i.blockNumber+1;if(o<=0){o=1}i.confirmations=o;e.label=6;case 6:n++;return[3,2];case 7:a=this.formatter.blockWithTransactions(r);a.transactions=a.transactions.map(function(e){return s._wrapTransaction(e)});return[2,a];case 8:return[2,this.formatter.block(r)]}})})},{oncePoll:this})]}})})};e.prototype.getBlock=function(e){return this._getBlock(e,false)};e.prototype.getBlockWithTransactions=function(e){return this._getBlock(e,true)};e.prototype.getTransaction=function(a){return m(this,void 0,void 0,function(){var o;var r=this;return A(this,function(e){switch(e.label){case 0:return[4,this.getNetwork()];case 1:e.sent();return[4,a];case 2:a=e.sent();o={transactionHash:this.formatter.hash(a,true)};return[2,(0,P.poll)(function(){return m(r,void 0,void 0,function(){var r,t,n,i;return A(this,function(e){switch(e.label){case 0:return[4,this.perform("getTransaction",o)];case 1:r=e.sent();if(r==null){if(this._emitted["t:"+a]==null){return[2,null]}return[2,undefined]}t=this.formatter.transactionResponse(r);if(!(t.blockNumber==null))return[3,2];t.confirmations=0;return[3,4];case 2:if(!(t.confirmations==null))return[3,4];return[4,this._getInternalBlockNumber(100+2*this.pollingInterval)];case 3:n=e.sent();i=n-t.blockNumber+1;if(i<=0){i=1}t.confirmations=i;e.label=4;case 4:return[2,this._wrapTransaction(t)]}})})},{oncePoll:this})]}})})};e.prototype.getTransactionReceipt=function(a){return m(this,void 0,void 0,function(){var o;var r=this;return A(this,function(e){switch(e.label){case 0:return[4,this.getNetwork()];case 1:e.sent();return[4,a];case 2:a=e.sent();o={transactionHash:this.formatter.hash(a,true)};return[2,(0,P.poll)(function(){return m(r,void 0,void 0,function(){var r,t,n,i;return A(this,function(e){switch(e.label){case 0:return[4,this.perform("getTransactionReceipt",o)];case 1:r=e.sent();if(r==null){if(this._emitted["t:"+a]==null){return[2,null]}return[2,undefined]}if(r.blockHash==null){return[2,undefined]}t=this.formatter.receipt(r);if(!(t.blockNumber==null))return[3,2];t.confirmations=0;return[3,4];case 2:if(!(t.confirmations==null))return[3,4];return[4,this._getInternalBlockNumber(100+2*this.pollingInterval)];case 3:n=e.sent();i=n-t.blockNumber+1;if(i<=0){i=1}t.confirmations=i;e.label=4;case 4:return[2,t]}})})},{oncePoll:this})]}})})};e.prototype.getLogs=function(n){return m(this,void 0,void 0,function(){var r,t;return A(this,function(e){switch(e.label){case 0:return[4,this.getNetwork()];case 1:e.sent();return[4,(0,f.resolveProperties)({filter:this._getFilter(n)})];case 2:r=e.sent();return[4,this.perform("getLogs",r)];case 3:t=e.sent();t.forEach(function(e){if(e.removed==null){e.removed=false}});return[2,v.Formatter.arrayOf(this.formatter.filterLog.bind(this.formatter))(t)]}})})};e.prototype.getEtherPrice=function(){return m(this,void 0,void 0,function(){return A(this,function(e){switch(e.label){case 0:return[4,this.getNetwork()];case 1:e.sent();return[2,this.perform("getEtherPrice",{})]}})})};e.prototype._getBlockTag=function(t){return m(this,void 0,void 0,function(){var r;return A(this,function(e){switch(e.label){case 0:return[4,t];case 1:t=e.sent();if(!(typeof t==="number"&&t<0))return[3,3];if(t%1){w.throwArgumentError("invalid BlockTag","blockTag",t)}return[4,this._getInternalBlockNumber(100+2*this.pollingInterval)];case 2:r=e.sent();r+=t;if(r<0){r=0}return[2,this.formatter.blockTag(r)];case 3:return[2,this.formatter.blockTag(t)]}})})};e.prototype.getResolver=function(n){return m(this,void 0,void 0,function(){var r,t;return A(this,function(e){switch(e.label){case 0:e.trys.push([0,2,,3]);return[4,this._getResolver(n)];case 1:r=e.sent();if(r==null){return[2,null]}return[2,new N(this,r,n)];case 2:t=e.sent();if(t.code===y.Logger.errors.CALL_EXCEPTION){return[2,null]}return[2,null];case 3:return[2]}})})};e.prototype._getResolver=function(a){return m(this,void 0,void 0,function(){var r,t,n,i,o;return A(this,function(e){switch(e.label){case 0:return[4,this.getNetwork()];case 1:r=e.sent();if(!r.ensAddress){w.throwError("network does not support ENS",y.Logger.errors.UNSUPPORTED_OPERATION,{operation:"ENS",network:r.name})}t={to:r.ensAddress,data:"0x0178b8bf"+(0,c.namehash)(a).substring(2)};e.label=2;case 2:e.trys.push([2,4,,5]);i=(n=this.formatter).callAddress;return[4,this.call(t)];case 3:return[2,i.apply(n,[e.sent()])];case 4:o=e.sent();if(o.code===y.Logger.errors.CALL_EXCEPTION){return[2,null]}throw o;case 5:return[2]}})})};e.prototype.resolveName=function(t){return m(this,void 0,void 0,function(){var r;return A(this,function(e){switch(e.label){case 0:return[4,t];case 1:t=e.sent();try{return[2,Promise.resolve(this.formatter.address(t))]}catch(e){if((0,M.isHexString)(t)){throw e}}if(typeof t!=="string"){w.throwArgumentError("invalid ENS name","name",t)}return[4,this.getResolver(t)];case 2:r=e.sent();if(!r){return[2,null]}return[4,r.getAddress()];case 3:return[2,e.sent()]}})})};e.prototype.lookupAddress=function(u){return m(this,void 0,void 0,function(){var r,t,n,i,o,a,s;return A(this,function(e){switch(e.label){case 0:return[4,u];case 1:u=e.sent();u=this.formatter.address(u);r=u.substring(2).toLowerCase()+".addr.reverse";return[4,this._getResolver(r)];case 2:t=e.sent();if(!t){return[2,null]}i=M.arrayify;return[4,this.call({to:t,data:"0x691f3431"+(0,c.namehash)(r).substring(2)})];case 3:n=i.apply(void 0,[e.sent()]);if(n.length<32||!E.BigNumber.from(n.slice(0,32)).eq(32)){return[2,null]}n=n.slice(32);if(n.length<32){return[2,null]}o=E.BigNumber.from(n.slice(0,32)).toNumber();n=n.slice(32);if(o>n.length){return[2,null]}a=(0,h.toUtf8String)(n.slice(0,o));return[4,this.resolveName(a)];case 4:s=e.sent();if(s!=u){return[2,null]}return[2,a]}})})};e.prototype.getAvatar=function(a){return m(this,void 0,void 0,function(){var r,t,n,i,o;return A(this,function(e){switch(e.label){case 0:r=null;if(!(0,M.isHexString)(a))return[3,2];t=this.formatter.address(a);n=t.substring(2).toLowerCase()+".addr.reverse";return[4,this._getResolver(n)];case 1:i=e.sent();if(!i){return[2,null]}r=new N(this,i,"_",t);return[3,4];case 2:return[4,this.getResolver(a)];case 3:r=e.sent();if(!r){return[2,null]}e.label=4;case 4:return[4,r.getAvatar()];case 5:o=e.sent();if(o==null){return[2,null]}return[2,o.url]}})})};e.prototype.perform=function(e,r){return w.throwError(e+" not implemented",y.Logger.errors.NOT_IMPLEMENTED,{operation:e})};e.prototype._startEvent=function(e){this.polling=this._events.filter(function(e){return e.pollable()}).length>0};e.prototype._stopEvent=function(e){this.polling=this._events.filter(function(e){return e.pollable()}).length>0};e.prototype._addEventListener=function(e,r,t){var n=new B(S(e),r,t);this._events.push(n);this._startEvent(n);return this};e.prototype.on=function(e,r){return this._addEventListener(e,r,false)};e.prototype.once=function(e,r){return this._addEventListener(e,r,true)};e.prototype.emit=function(e){var r=this;var t=[];for(var n=1;n<arguments.length;n++){t[n-1]=arguments[n]}var i=false;var o=[];var a=S(e);this._events=this._events.filter(function(e){if(e.tag!==a){return true}setTimeout(function(){e.listener.apply(r,t)},0);i=true;if(e.once){o.push(e);return false}return true});o.forEach(function(e){r._stopEvent(e)});return i};e.prototype.listenerCount=function(e){if(!e){return this._events.length}var r=S(e);return this._events.filter(function(e){return e.tag===r}).length};e.prototype.listeners=function(e){if(e==null){return this._events.map(function(e){return e.listener})}var r=S(e);return this._events.filter(function(e){return e.tag===r}).map(function(e){return e.listener})};e.prototype.off=function(e,r){var t=this;if(r==null){return this.removeAllListeners(e)}var n=[];var i=false;var o=S(e);this._events=this._events.filter(function(e){if(e.tag!==o||e.listener!=r){return true}if(i){return true}i=true;n.push(e);return false});n.forEach(function(e){t._stopEvent(e)});return this};e.prototype.removeAllListeners=function(e){var r=this;var t=[];if(e==null){t=this._events;this._events=[]}else{var n=S(e);this._events=this._events.filter(function(e){if(e.tag!==n){return true}t.push(e);return false})}t.forEach(function(e){r._stopEvent(e)});return this};return e}(o.Provider);t.BaseProvider=I},{"./_version":62,"./formatter":70,"@ethersproject/abstract-provider":18,"@ethersproject/basex":25,"@ethersproject/bignumber":29,"@ethersproject/bytes":31,"@ethersproject/constants":35,"@ethersproject/hash":41,"@ethersproject/logger":55,"@ethersproject/networks":57,"@ethersproject/properties":61,"@ethersproject/sha2":88,"@ethersproject/strings":98,"@ethersproject/web":108,bech32:137}],65:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.IpcProvider=void 0;var n=null;t.IpcProvider=n},{}],66:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.WebSocket=void 0;var n=e("@ethersproject/logger");var i=e("./_version");var o=null;t.WebSocket=o;try{t.WebSocket=o=WebSocket;if(o==null){throw new Error("inject please")}}catch(e){var a=new n.Logger(i.version);t.WebSocket=o=function(){a.throwError("WebSockets not supported in this environment",n.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}},{"./_version":62,"@ethersproject/logger":55}],67:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();var o=this&&this.__awaiter||function(e,a,t,s){function u(r){return r instanceof t?r:new t(function(e){e(r)})}return new(t||(t=Promise))(function(r,t){function n(e){try{o(s.next(e))}catch(e){t(e)}}function i(e){try{o(s["throw"](e))}catch(e){t(e)}}function o(e){e.done?r(e.value):u(e.value).then(n,i)}o((s=s.apply(e,a||[])).next())})};var a=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(e){return u([r,e])}}function u(r){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(a=r[0]&2?o["return"]:r[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;if(o=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;o=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){n.label=r[1];break}if(r[0]===6&&n.label<a[1]){n.label=a[1];a=r;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(r);break}if(a[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];o=0}finally{i=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};Object.defineProperty(t,"__esModule",{value:true});t.CloudflareProvider=void 0;var i=e("./url-json-rpc-provider");var s=e("@ethersproject/logger");var u=e("./_version");var c=new s.Logger(u.version);var f=function(i){n(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}e.getApiKey=function(e){if(e!=null){c.throwArgumentError("apiKey not supported for cloudflare","apiKey",e)}return null};e.getUrl=function(e,r){var t=null;switch(e.name){case"homestead":t="https://cloudflare-eth.com/";break;default:c.throwArgumentError("unsupported network","network",arguments[0])}return t};e.prototype.perform=function(t,n){return o(this,void 0,void 0,function(){var r;return a(this,function(e){switch(e.label){case 0:if(!(t==="getBlockNumber"))return[3,2];return[4,i.prototype.perform.call(this,"getBlock",{blockTag:"latest"})];case 1:r=e.sent();return[2,r.number];case 2:return[2,i.prototype.perform.call(this,t,n)]}})})};return e}(i.UrlJsonRpcProvider);t.CloudflareProvider=f},{"./_version":62,"./url-json-rpc-provider":77,"@ethersproject/logger":55}],68:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();var l=this&&this.__awaiter||function(e,a,t,s){function u(r){return r instanceof t?r:new t(function(e){e(r)})}return new(t||(t=Promise))(function(r,t){function n(e){try{o(s.next(e))}catch(e){t(e)}}function i(e){try{o(s["throw"](e))}catch(e){t(e)}}function o(e){e.done?r(e.value):u(e.value).then(n,i)}o((s=s.apply(e,a||[])).next())})};var b=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(e){return u([r,e])}}function u(r){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(a=r[0]&2?o["return"]:r[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;if(o=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;o=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){n.label=r[1];break}if(r[0]===6&&n.label<a[1]){n.label=a[1];a=r;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(r);break}if(a[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];o=0}finally{i=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};Object.defineProperty(t,"__esModule",{value:true});t.EtherscanProvider=void 0;var a=e("@ethersproject/bytes");var h=e("@ethersproject/properties");var i=e("@ethersproject/transactions");var d=e("@ethersproject/web");var p=e("./formatter");var g=e("@ethersproject/logger");var o=e("./_version");var m=new g.Logger(o.version);var s=e("./base-provider");function y(e){var r={};for(var t in e){if(e[t]==null){continue}var n=e[t];if(t==="type"&&n===0){continue}if({type:true,gasLimit:true,gasPrice:true,maxFeePerGs:true,maxPriorityFeePerGas:true,nonce:true,value:true}[t]){n=(0,a.hexValue)((0,a.hexlify)(n))}else if(t==="accessList"){n="["+(0,i.accessListify)(n).map(function(e){return'{address:"'+e.address+'",storageKeys:["'+e.storageKeys.join('","')+'"]}'}).join(",")+"]"}else{n=(0,a.hexlify)(n)}r[t]=n}return r}function w(e){if(e.status==0&&(e.message==="No records found"||e.message==="No transactions found")){return e.result}if(e.status!=1||e.message!="OK"){var r=new Error("invalid response");r.result=JSON.stringify(e);if((e.result||"").toLowerCase().indexOf("rate limit")>=0){r.throttleRetry=true}throw r}return e.result}function _(e){if(e&&e.status==0&&e.message=="NOTOK"&&(e.result||"").toLowerCase().indexOf("rate limit")>=0){var r=new Error("throttled response");r.result=JSON.stringify(e);r.throttleRetry=true;throw r}if(e.jsonrpc!="2.0"){var r=new Error("invalid response");r.result=JSON.stringify(e);throw r}if(e.error){var r=new Error(e.error.message||"unknown error");if(e.error.code){r.code=e.error.code}if(e.error.data){r.data=e.error.data}throw r}return e.result}function S(e){if(e==="pending"){throw new Error("pending not supported")}if(e==="latest"){return e}return parseInt(e.substring(2),16)}var u="9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB";function A(e,r,t){if(e==="call"&&r.code===g.Logger.errors.SERVER_ERROR){var n=r.error;if(n&&(n.message.match(/reverted/i)||n.message.match(/VM execution error/i))){var i=n.data;if(i){i="0x"+i.replace(/^.*0x/i,"")}if((0,a.isHexString)(i)){return i}m.throwError("missing revert data in call exception",g.Logger.errors.CALL_EXCEPTION,{error:r,data:"0x"})}}var o=r.message;if(r.code===g.Logger.errors.SERVER_ERROR){if(r.error&&typeof r.error.message==="string"){o=r.error.message}else if(typeof r.body==="string"){o=r.body}else if(typeof r.responseText==="string"){o=r.responseText}}o=(o||"").toLowerCase();if(o.match(/insufficient funds/)){m.throwError("insufficient funds for intrinsic transaction cost",g.Logger.errors.INSUFFICIENT_FUNDS,{error:r,method:e,transaction:t})}if(o.match(/same hash was already imported|transaction nonce is too low|nonce too low/)){m.throwError("nonce has already been used",g.Logger.errors.NONCE_EXPIRED,{error:r,method:e,transaction:t})}if(o.match(/another transaction with same nonce/)){m.throwError("replacement fee too low",g.Logger.errors.REPLACEMENT_UNDERPRICED,{error:r,method:e,transaction:t})}if(o.match(/execution failed due to an exception|execution reverted/)){m.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",g.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:r,method:e,transaction:t})}throw r}var c=function(v){n(i,v);function i(e,r){var t=this.constructor;var n=this;m.checkNew(t,i);n=v.call(this,e)||this;(0,h.defineReadOnly)(n,"baseUrl",n.getBaseUrl());(0,h.defineReadOnly)(n,"apiKey",r||u);return n}i.prototype.getBaseUrl=function(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"ropsten":return"https://api-ropsten.etherscan.io";case"rinkeby":return"https://api-rinkeby.etherscan.io";case"kovan":return"https://api-kovan.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";default:}return m.throwArgumentError("unsupported network","network",name)};i.prototype.getUrl=function(e,n){var r=Object.keys(n).reduce(function(e,r){var t=n[r];if(t!=null){e+="&"+r+"="+t}return e},"");var t=this.apiKey?"&apikey="+this.apiKey:"";return this.baseUrl+"/api?module="+e+r+t};i.prototype.getPostUrl=function(){return this.baseUrl+"/api"};i.prototype.getPostData=function(e,r){r.module=e;r.apikey=this.apiKey;return r};i.prototype.fetch=function(u,c,f){return l(this,void 0,void 0,function(){var r,t,n,i,o,a;var s=this;return b(this,function(e){switch(e.label){case 0:r=f?this.getPostUrl():this.getUrl(u,c);t=f?this.getPostData(u,c):null;n=u==="proxy"?_:w;this.emit("debug",{action:"request",request:r,provider:this});i={url:r,throttleSlotInterval:1e3,throttleCallback:function(e,r){if(s.isCommunityResource()){(0,p.showThrottleMessage)()}return Promise.resolve(true)}};o=null;if(t){i.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"};o=Object.keys(t).map(function(e){return e+"="+t[e]}).join("&")}return[4,(0,d.fetchJson)(i,o,n||_)];case 1:a=e.sent();this.emit("debug",{action:"response",request:r,response:(0,h.deepCopy)(a),provider:this});return[2,a]}})})};i.prototype.detectNetwork=function(){return l(this,void 0,void 0,function(){return b(this,function(e){return[2,this.network]})})};i.prototype.perform=function(d,p){return l(this,void 0,void 0,function(){var r,t,n,t,i,o,a,s,u,c,f,l,h;return b(this,function(e){switch(e.label){case 0:r=d;switch(r){case"getBlockNumber":return[3,1];case"getGasPrice":return[3,2];case"getBalance":return[3,3];case"getTransactionCount":return[3,4];case"getCode":return[3,5];case"getStorageAt":return[3,6];case"sendTransaction":return[3,7];case"getBlock":return[3,8];case"getTransaction":return[3,9];case"getTransactionReceipt":return[3,10];case"call":return[3,11];case"estimateGas":return[3,15];case"getLogs":return[3,19];case"getEtherPrice":return[3,26]}return[3,28];case 1:return[2,this.fetch("proxy",{action:"eth_blockNumber"})];case 2:return[2,this.fetch("proxy",{action:"eth_gasPrice"})];case 3:return[2,this.fetch("account",{action:"balance",address:p.address,tag:p.blockTag})];case 4:return[2,this.fetch("proxy",{action:"eth_getTransactionCount",address:p.address,tag:p.blockTag})];case 5:return[2,this.fetch("proxy",{action:"eth_getCode",address:p.address,tag:p.blockTag})];case 6:return[2,this.fetch("proxy",{action:"eth_getStorageAt",address:p.address,position:p.position,tag:p.blockTag})];case 7:return[2,this.fetch("proxy",{action:"eth_sendRawTransaction",hex:p.signedTransaction},true).catch(function(e){return A("sendTransaction",e,p.signedTransaction)})];case 8:if(p.blockTag){return[2,this.fetch("proxy",{action:"eth_getBlockByNumber",tag:p.blockTag,boolean:p.includeTransactions?"true":"false"})]}throw new Error("getBlock by blockHash not implemented");case 9:return[2,this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:p.transactionHash})];case 10:return[2,this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:p.transactionHash})];case 11:if(p.blockTag!=="latest"){throw new Error("EtherscanProvider does not support blockTag for call")}t=y(p.transaction);t.module="proxy";t.action="eth_call";e.label=12;case 12:e.trys.push([12,14,,15]);return[4,this.fetch("proxy",t,true)];case 13:return[2,e.sent()];case 14:n=e.sent();return[2,A("call",n,p.transaction)];case 15:t=y(p.transaction);t.module="proxy";t.action="eth_estimateGas";e.label=16;case 16:e.trys.push([16,18,,19]);return[4,this.fetch("proxy",t,true)];case 17:return[2,e.sent()];case 18:i=e.sent();return[2,A("estimateGas",i,p.transaction)];case 19:o={action:"getLogs"};if(p.filter.fromBlock){o.fromBlock=S(p.filter.fromBlock)}if(p.filter.toBlock){o.toBlock=S(p.filter.toBlock)}if(p.filter.address){o.address=p.filter.address}if(p.filter.topics&&p.filter.topics.length>0){if(p.filter.topics.length>1){m.throwError("unsupported topic count",g.Logger.errors.UNSUPPORTED_OPERATION,{topics:p.filter.topics})}if(p.filter.topics.length===1){a=p.filter.topics[0];if(typeof a!=="string"||a.length!==66){m.throwError("unsupported topic format",g.Logger.errors.UNSUPPORTED_OPERATION,{topic0:a})}o.topic0=a}}return[4,this.fetch("logs",o)];case 20:s=e.sent();u={};c=0;e.label=21;case 21:if(!(c<s.length))return[3,25];f=s[c];if(f.blockHash!=null){return[3,24]}if(!(u[f.blockNumber]==null))return[3,23];return[4,this.getBlock(f.blockNumber)];case 22:l=e.sent();if(l){u[f.blockNumber]=l.hash}e.label=23;case 23:f.blockHash=u[f.blockNumber];e.label=24;case 24:c++;return[3,21];case 25:return[2,s];case 26:if(this.network.name!=="homestead"){return[2,0]}h=parseFloat;return[4,this.fetch("stats",{action:"ethprice"})];case 27:return[2,h.apply(void 0,[e.sent().ethusd])];case 28:return[3,29];case 29:return[2,v.prototype.perform.call(this,d,p)]}})})};i.prototype.getHistory=function(o,a,s){return l(this,void 0,void 0,function(){var r,t;var n;var i=this;return b(this,function(e){switch(e.label){case 0:n={action:"txlist"};return[4,this.resolveName(o)];case 1:r=(n.address=e.sent(),n.startblock=a==null?0:a,n.endblock=s==null?99999999:s,n.sort="asc",n);return[4,this.fetch("account",r)];case 2:t=e.sent();return[2,t.map(function(r){["contractAddress","to"].forEach(function(e){if(r[e]==""){delete r[e]}});if(r.creates==null&&r.contractAddress!=null){r.creates=r.contractAddress}var e=i.formatter.transactionResponse(r);if(r.timeStamp){e.timestamp=parseInt(r.timeStamp)}return e})]}})})};i.prototype.isCommunityResource=function(){return this.apiKey===u};return i}(s.BaseProvider);t.EtherscanProvider=c},{"./_version":62,"./base-provider":64,"./formatter":70,"@ethersproject/bytes":31,"@ethersproject/logger":55,"@ethersproject/properties":61,"@ethersproject/transactions":101,"@ethersproject/web":108}],69:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();var c=this&&this.__awaiter||function(e,a,t,s){function u(r){return r instanceof t?r:new t(function(e){e(r)})}return new(t||(t=Promise))(function(r,t){function n(e){try{o(s.next(e))}catch(e){t(e)}}function i(e){try{o(s["throw"](e))}catch(e){t(e)}}function o(e){e.done?r(e.value):u(e.value).then(n,i)}o((s=s.apply(e,a||[])).next())})};var g=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(e){return u([r,e])}}function u(r){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(a=r[0]&2?o["return"]:r[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;if(o=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;o=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){n.label=r[1];break}if(r[0]===6&&n.label<a[1]){n.label=a[1];a=r;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(r);break}if(a[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];o=0}finally{i=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};Object.defineProperty(t,"__esModule",{value:true});t.FallbackProvider=void 0;var f=e("@ethersproject/abstract-provider");var i=e("@ethersproject/bignumber");var u=e("@ethersproject/bytes");var m=e("@ethersproject/properties");var a=e("@ethersproject/random");var o=e("@ethersproject/web");var s=e("./base-provider");var l=e("./formatter");var y=e("@ethersproject/logger");var h=e("./_version");var w=new y.Logger(h.version);function _(){return(new Date).getTime()}function d(e){var r=null;for(var t=0;t<e.length;t++){var n=e[t];if(n==null){return null}if(r){if(!(r.name===n.name&&r.chainId===n.chainId&&(r.ensAddress===n.ensAddress||r.ensAddress==null&&n.ensAddress==null))){w.throwArgumentError("provider mismatch","networks",e)}}else{r=n}}return r}function p(e,r){e=e.slice().sort();var t=Math.floor(e.length/2);if(e.length%2){return e[t]}var n=e[t-1],i=e[t];if(r!=null&&Math.abs(n-i)>r){return null}return(n+i)/2}function v(t){if(t===null){return"null"}else if(typeof t==="number"||typeof t==="boolean"){return JSON.stringify(t)}else if(typeof t==="string"){return t}else if(i.BigNumber.isBigNumber(t)){return t.toString()}else if(Array.isArray(t)){return JSON.stringify(t.map(function(e){return v(e)}))}else if(typeof t==="object"){var e=Object.keys(t);e.sort();return"{"+e.map(function(e){var r=t[e];if(typeof r==="function"){r="[function]"}else{r=v(r)}return JSON.stringify(e)+":"+r}).join(",")+"}"}throw new Error("unknown value type: "+typeof t)}var S=1;function A(r){var t=null;var n=null;var i=new Promise(function(e){t=function(){if(n){clearTimeout(n);n=null}e()};n=setTimeout(t,r)});var e=function(e){i=i.then(e);return i};function o(){return i}return{cancel:t,getPromise:o,wait:e}}var E=[y.Logger.errors.CALL_EXCEPTION,y.Logger.errors.INSUFFICIENT_FUNDS,y.Logger.errors.NONCE_EXPIRED,y.Logger.errors.REPLACEMENT_UNDERPRICED,y.Logger.errors.UNPREDICTABLE_GAS_LIMIT];var M=["address","args","errorArgs","errorSignature","method","transaction"];function P(e,r){var t={weight:e.weight};Object.defineProperty(t,"provider",{get:function(){return e.provider}});if(e.start){t.start=e.start}if(r){t.duration=r-e.start}if(e.done){if(e.error){t.error=e.error}else{t.result=e.result||null}}return t}function b(o,a){return function(e){var t={};e.forEach(function(e){var r=o(e.result);if(!t[r]){t[r]={count:0,result:e.result}}t[r].count++});var r=Object.keys(t);for(var n=0;n<r.length;n++){var i=t[r[n]];if(i.count>=a){return i.result}}return undefined}}function T(n,e,r){var t=v;switch(e){case"getBlockNumber":return function(e){var r=e.map(function(e){return e.result});var t=p(e.map(function(e){return e.result}),2);if(t==null){return undefined}t=Math.ceil(t);if(r.indexOf(t+1)>=0){t++}if(t>=n._highestBlockNumber){n._highestBlockNumber=t}return n._highestBlockNumber};case"getGasPrice":return function(e){var r=e.map(function(e){return e.result});r.sort();return r[Math.floor(r.length/2)]};case"getEtherPrice":return function(e){return p(e.map(function(e){return e.result}))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":t=function(e){if(e==null){return null}e=(0,m.shallowCopy)(e);e.confirmations=-1;return v(e)};break;case"getBlock":if(r.includeTransactions){t=function(e){if(e==null){return null}e=(0,m.shallowCopy)(e);e.transactions=e.transactions.map(function(e){e=(0,m.shallowCopy)(e);e.confirmations=-1;return e});return v(e)}}else{t=function(e){if(e==null){return null}return v(e)}}break;default:throw new Error("unknown method: "+e)}return b(t,n.quorum)}function k(n,i){return c(this,void 0,void 0,function(){var t;return g(this,function(e){t=n.provider;if(t.blockNumber!=null&&t.blockNumber>=i||i===-1){return[2,t]}return[2,(0,o.poll)(function(){return new Promise(function(e,r){setTimeout(function(){if(t.blockNumber>=i){return e(t)}if(n.cancelled){return e(null)}return e(undefined)},0)})},{oncePoll:t})]})})}function O(i,o,a,s){return c(this,void 0,void 0,function(){var r,t,n;return g(this,function(e){switch(e.label){case 0:r=i.provider;t=a;switch(t){case"getBlockNumber":return[3,1];case"getGasPrice":return[3,1];case"getEtherPrice":return[3,2];case"getBalance":return[3,3];case"getTransactionCount":return[3,3];case"getCode":return[3,3];case"getStorageAt":return[3,6];case"getBlock":return[3,9];case"call":return[3,12];case"estimateGas":return[3,12];case"getTransaction":return[3,15];case"getTransactionReceipt":return[3,15];case"getLogs":return[3,16]}return[3,19];case 1:return[2,r[a]()];case 2:if(r.getEtherPrice){return[2,r.getEtherPrice()]}return[3,19];case 3:if(!(s.blockTag&&(0,u.isHexString)(s.blockTag)))return[3,5];return[4,k(i,o)];case 4:r=e.sent();e.label=5;case 5:return[2,r[a](s.address,s.blockTag||"latest")];case 6:if(!(s.blockTag&&(0,u.isHexString)(s.blockTag)))return[3,8];return[4,k(i,o)];case 7:r=e.sent();e.label=8;case 8:return[2,r.getStorageAt(s.address,s.position,s.blockTag||"latest")];case 9:if(!(s.blockTag&&(0,u.isHexString)(s.blockTag)))return[3,11];return[4,k(i,o)];case 10:r=e.sent();e.label=11;case 11:return[2,r[s.includeTransactions?"getBlockWithTransactions":"getBlock"](s.blockTag||s.blockHash)];case 12:if(!(s.blockTag&&(0,u.isHexString)(s.blockTag)))return[3,14];return[4,k(i,o)];case 13:r=e.sent();e.label=14;case 14:return[2,r[a](s.transaction)];case 15:return[2,r[a](s.transactionHash)];case 16:n=s.filter;if(!(n.fromBlock&&(0,u.isHexString)(n.fromBlock)||n.toBlock&&(0,u.isHexString)(n.toBlock)))return[3,18];return[4,k(i,o)];case 17:r=e.sent();e.label=18;case 18:return[2,r.getLogs(n)];case 19:return[2,w.throwError("unknown method error",y.Logger.errors.UNKNOWN_ERROR,{method:a,params:s})]}})})}var B=function(s){n(u,s);function u(e,r){var t=this.constructor;var n=this;w.checkNew(t,u);if(e.length===0){w.throwArgumentError("missing providers","providers",e)}var i=e.map(function(e,r){if(f.Provider.isProvider(e)){var t=(0,l.isCommunityResource)(e)?2e3:750;var n=1;return Object.freeze({provider:e,weight:1,stallTimeout:t,priority:n})}var i=(0,m.shallowCopy)(e);if(i.priority==null){i.priority=1}if(i.stallTimeout==null){i.stallTimeout=(0,l.isCommunityResource)(e)?2e3:750}if(i.weight==null){i.weight=1}var o=i.weight;if(o%1||o>512||o<1){w.throwArgumentError("invalid weight; must be integer in [1, 512]","providers["+r+"].weight",o)}return Object.freeze(i)});var o=i.reduce(function(e,r){return e+r.weight},0);if(r==null){r=o/2}else if(r>o){w.throwArgumentError("quorum will always fail; larger than total weight","quorum",r)}var a=d(i.map(function(e){return e.provider.network}));if(a==null){a=new Promise(function(e,r){setTimeout(function(){n.detectNetwork().then(e,r)},0)})}n=s.call(this,a)||this;(0,m.defineReadOnly)(n,"providerConfigs",Object.freeze(i));(0,m.defineReadOnly)(n,"quorum",r);n._highestBlockNumber=-1;return n}u.prototype.detectNetwork=function(){return c(this,void 0,void 0,function(){var r;return g(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.providerConfigs.map(function(e){return e.provider.getNetwork()}))];case 1:r=e.sent();return[2,d(r)]}})})};u.prototype.perform=function(v,b){return c(this,void 0,void 0,function(){var r,t,n,u,c,f,l,h,i,d,o;var p=this;return g(this,function(e){switch(e.label){case 0:if(!(v==="sendTransaction"))return[3,2];return[4,Promise.all(this.providerConfigs.map(function(e){return e.provider.sendTransaction(b.signedTransaction).then(function(e){return e.hash},function(e){return e})}))];case 1:r=e.sent();for(t=0;t<r.length;t++){n=r[t];if(typeof n==="string"){return[2,n]}}throw r[0];case 2:if(!(this._highestBlockNumber===-1&&v!=="getBlockNumber"))return[3,4];return[4,this.getBlockNumber()];case 3:e.sent();e.label=4;case 4:u=T(this,v,b);c=(0,a.shuffled)(this.providerConfigs.map(m.shallowCopy));c.sort(function(e,r){return e.priority-r.priority});f=this._highestBlockNumber;l=0;h=true;i=function(){var r,n,t,i,o,a,s;return g(this,function(e){switch(e.label){case 0:r=_();n=c.filter(function(e){return e.runner&&r-e.start<e.stallTimeout}).reduce(function(e,r){return e+r.weight},0);t=function(){var r=c[l++];var t=S++;r.start=_();r.staller=A(r.stallTimeout);r.staller.wait(function(){r.staller=null});r.runner=O(r,f,v,b).then(function(e){r.done=true;r.result=e;if(p.listenerCount("debug")){p.emit("debug",{action:"request",rid:t,backend:P(r,_()),request:{method:v,params:(0,m.deepCopy)(b)},provider:p})}},function(e){r.done=true;r.error=e;if(p.listenerCount("debug")){p.emit("debug",{action:"request",rid:t,backend:P(r,_()),request:{method:v,params:(0,m.deepCopy)(b)},provider:p})}});if(d.listenerCount("debug")){d.emit("debug",{action:"request",rid:t,backend:P(r,null),request:{method:v,params:(0,m.deepCopy)(b)},provider:d})}n+=r.weight};while(n<d.quorum&&l<c.length){t()}i=[];c.forEach(function(e){if(e.done||!e.runner){return}i.push(e.runner);if(e.staller){i.push(e.staller.getPromise())}});if(!i.length)return[3,2];return[4,Promise.race(i)];case 1:e.sent();e.label=2;case 2:o=c.filter(function(e){return e.done&&e.error==null});if(!(o.length>=d.quorum))return[3,5];a=u(o);if(a!==undefined){c.forEach(function(e){if(e.staller){e.staller.cancel()}e.cancelled=true});return[2,{value:a}]}if(!!h)return[3,4];return[4,A(100).getPromise()];case 3:e.sent();e.label=4;case 4:h=false;e.label=5;case 5:s=c.reduce(function(e,r){if(!r.done||r.error==null){return e}var t=r.error.code;if(E.indexOf(t)>=0){if(!e[t]){e[t]={error:r.error,weight:0}}e[t].weight+=r.weight}return e},{});Object.keys(s).forEach(function(e){var r=s[e];if(r.weight<p.quorum){return}c.forEach(function(e){if(e.staller){e.staller.cancel()}e.cancelled=true});var t=r.error;var n={};M.forEach(function(e){if(t[e]==null){return}n[e]=t[e]});w.throwError(t.reason||t.message,e,n)});if(c.filter(function(e){return!e.done}).length===0){return[2,"break"]}return[2]}})};d=this;e.label=5;case 5:if(!true)return[3,7];return[5,i()];case 6:o=e.sent();if(typeof o==="object")return[2,o.value];if(o==="break")return[3,7];return[3,5];case 7:c.forEach(function(e){if(e.staller){e.staller.cancel()}e.cancelled=true});return[2,w.throwError("failed to meet quorum",y.Logger.errors.SERVER_ERROR,{method:v,params:b,results:c.map(function(e){return P(e)}),provider:this})]}})})};return u}(s.BaseProvider);t.FallbackProvider=B},{"./_version":62,"./base-provider":64,"./formatter":70,"@ethersproject/abstract-provider":18,"@ethersproject/bignumber":29,"@ethersproject/bytes":31,"@ethersproject/logger":55,"@ethersproject/properties":61,"@ethersproject/random":82,"@ethersproject/web":108}],70:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.showThrottleMessage=t.isCommunityResource=t.isCommunityResourcable=t.Formatter=void 0;var n=e("@ethersproject/address");var i=e("@ethersproject/bignumber");var o=e("@ethersproject/bytes");var a=e("@ethersproject/constants");var h=e("@ethersproject/properties");var s=e("@ethersproject/transactions");var u=e("@ethersproject/logger");var c=e("./_version");var f=new u.Logger(c.version);var l=function(){function l(){var e=this.constructor;f.checkNew(e,l);this.formats=this.getDefaultFormats()}l.prototype.getDefaultFormats=function(){var r=this;var e={};var t=this.address.bind(this);var n=this.bigNumber.bind(this);var i=this.blockTag.bind(this);var o=this.data.bind(this);var a=this.hash.bind(this);var s=this.hex.bind(this);var u=this.number.bind(this);var c=this.type.bind(this);var f=function(e){return r.data(e,true)};e.transaction={hash:a,type:c,accessList:l.allowNull(this.accessList.bind(this),null),blockHash:l.allowNull(a,null),blockNumber:l.allowNull(u,null),transactionIndex:l.allowNull(u,null),confirmations:l.allowNull(u,null),from:t,gasPrice:l.allowNull(n),maxPriorityFeePerGas:l.allowNull(n),maxFeePerGas:l.allowNull(n),gasLimit:n,to:l.allowNull(t,null),value:n,nonce:u,data:o,r:l.allowNull(this.uint256),s:l.allowNull(this.uint256),v:l.allowNull(u),creates:l.allowNull(t,null),raw:l.allowNull(o)};e.transactionRequest={from:l.allowNull(t),nonce:l.allowNull(u),gasLimit:l.allowNull(n),gasPrice:l.allowNull(n),maxPriorityFeePerGas:l.allowNull(n),maxFeePerGas:l.allowNull(n),to:l.allowNull(t),value:l.allowNull(n),data:l.allowNull(f),type:l.allowNull(u),accessList:l.allowNull(this.accessList.bind(this),null)};e.receiptLog={transactionIndex:u,blockNumber:u,transactionHash:a,address:t,topics:l.arrayOf(a),data:o,logIndex:u,blockHash:a};e.receipt={to:l.allowNull(this.address,null),from:l.allowNull(this.address,null),contractAddress:l.allowNull(t,null),transactionIndex:u,root:l.allowNull(s),gasUsed:n,logsBloom:l.allowNull(o),blockHash:a,transactionHash:a,logs:l.arrayOf(this.receiptLog.bind(this)),blockNumber:u,confirmations:l.allowNull(u,null),cumulativeGasUsed:n,effectiveGasPrice:l.allowNull(n),status:l.allowNull(u),type:c};e.block={hash:a,parentHash:a,number:u,timestamp:u,nonce:l.allowNull(s),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:t,extraData:o,transactions:l.allowNull(l.arrayOf(a)),baseFeePerGas:l.allowNull(n)};e.blockWithTransactions=(0,h.shallowCopy)(e.block);e.blockWithTransactions.transactions=l.allowNull(l.arrayOf(this.transactionResponse.bind(this)));e.filter={fromBlock:l.allowNull(i,undefined),toBlock:l.allowNull(i,undefined),blockHash:l.allowNull(a,undefined),address:l.allowNull(t,undefined),topics:l.allowNull(this.topics.bind(this),undefined)};e.filterLog={blockNumber:l.allowNull(u),blockHash:l.allowNull(a),transactionIndex:u,removed:l.allowNull(this.boolean.bind(this)),address:t,data:l.allowFalsish(o,"0x"),topics:l.arrayOf(a),transactionHash:a,logIndex:u};return e};l.prototype.accessList=function(e){return(0,s.accessListify)(e||[])};l.prototype.number=function(e){if(e==="0x"){return 0}return i.BigNumber.from(e).toNumber()};l.prototype.type=function(e){if(e==="0x"||e==null){return 0}return i.BigNumber.from(e).toNumber()};l.prototype.bigNumber=function(e){return i.BigNumber.from(e)};l.prototype.boolean=function(e){if(typeof e==="boolean"){return e}if(typeof e==="string"){e=e.toLowerCase();if(e==="true"){return true}if(e==="false"){return false}}throw new Error("invalid boolean - "+e)};l.prototype.hex=function(e,r){if(typeof e==="string"){if(!r&&e.substring(0,2)!=="0x"){e="0x"+e}if((0,o.isHexString)(e)){return e.toLowerCase()}}return f.throwArgumentError("invalid hash","value",e)};l.prototype.data=function(e,r){var t=this.hex(e,r);if(t.length%2!==0){throw new Error("invalid data; odd-length - "+e)}return t};l.prototype.address=function(e){return(0,n.getAddress)(e)};l.prototype.callAddress=function(e){if(!(0,o.isHexString)(e,32)){return null}var r=(0,n.getAddress)((0,o.hexDataSlice)(e,12));return r===a.AddressZero?null:r};l.prototype.contractAddress=function(e){return(0,n.getContractAddress)(e)};l.prototype.blockTag=function(e){if(e==null){return"latest"}if(e==="earliest"){return"0x0"}if(e==="latest"||e==="pending"){return e}if(typeof e==="number"||(0,o.isHexString)(e)){return(0,o.hexValue)(e)}throw new Error("invalid blockTag")};l.prototype.hash=function(e,r){var t=this.hex(e,r);if((0,o.hexDataLength)(t)!==32){return f.throwArgumentError("invalid hash","value",e)}return t};l.prototype.difficulty=function(e){if(e==null){return null}var r=i.BigNumber.from(e);try{return r.toNumber()}catch(e){}return null};l.prototype.uint256=function(e){if(!(0,o.isHexString)(e)){throw new Error("invalid uint256")}return(0,o.hexZeroPad)(e,32)};l.prototype._block=function(e,r){if(e.author!=null&&e.miner==null){e.miner=e.author}var t=e._difficulty!=null?e._difficulty:e.difficulty;var n=l.check(r,e);n._difficulty=t==null?null:i.BigNumber.from(t);return n};l.prototype.block=function(e){return this._block(e,this.formats.block)};l.prototype.blockWithTransactions=function(e){return this._block(e,this.formats.blockWithTransactions)};l.prototype.transactionRequest=function(e){return l.check(this.formats.transactionRequest,e)};l.prototype.transactionResponse=function(e){if(e.gas!=null&&e.gasLimit==null){e.gasLimit=e.gas}if(e.to&&i.BigNumber.from(e.to).isZero()){e.to="0x0000000000000000000000000000000000000000"}if(e.input!=null&&e.data==null){e.data=e.input}if(e.to==null&&e.creates==null){e.creates=this.contractAddress(e)}if((e.type===1||e.type===2)&&e.accessList==null){e.accessList=[]}var r=l.check(this.formats.transaction,e);if(e.chainId!=null){var t=e.chainId;if((0,o.isHexString)(t)){t=i.BigNumber.from(t).toNumber()}r.chainId=t}else{var t=e.networkId;if(t==null&&r.v==null){t=e.chainId}if((0,o.isHexString)(t)){t=i.BigNumber.from(t).toNumber()}if(typeof t!=="number"&&r.v!=null){t=(r.v-35)/2;if(t<0){t=0}t=parseInt(t)}if(typeof t!=="number"){t=0}r.chainId=t}if(r.blockHash&&r.blockHash.replace(/0/g,"")==="x"){r.blockHash=null}return r};l.prototype.transaction=function(e){return(0,s.parse)(e)};l.prototype.receiptLog=function(e){return l.check(this.formats.receiptLog,e)};l.prototype.receipt=function(e){var r=l.check(this.formats.receipt,e);if(r.root!=null){if(r.root.length<=4){var t=i.BigNumber.from(r.root).toNumber();if(t===0||t===1){if(r.status!=null&&r.status!==t){f.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status})}r.status=t;delete r.root}else{f.throwArgumentError("invalid alt-root-status","value.root",r.root)}}else if(r.root.length!==66){f.throwArgumentError("invalid root hash","value.root",r.root)}}if(r.status!=null){r.byzantium=true}return r};l.prototype.topics=function(e){var r=this;if(Array.isArray(e)){return e.map(function(e){return r.topics(e)})}else if(e!=null){return this.hash(e,true)}return null};l.prototype.filter=function(e){return l.check(this.formats.filter,e)};l.prototype.filterLog=function(e){return l.check(this.formats.filterLog,e)};l.check=function(e,r){var t={};for(var n in e){try{var i=e[n](r[n]);if(i!==undefined){t[n]=i}}catch(e){e.checkKey=n;e.checkValue=r[n];throw e}}return t};l.allowNull=function(r,t){return function(e){if(e==null){return t}return r(e)}};l.allowFalsish=function(r,t){return function(e){if(!e){return t}return r(e)}};l.arrayOf=function(t){return function(e){if(!Array.isArray(e)){throw new Error("not an array")}var r=[];e.forEach(function(e){r.push(t(e))});return r}};return l}();t.Formatter=l;function d(e){return e&&typeof e.isCommunityResource==="function"}t.isCommunityResourcable=d;function p(e){return d(e)&&e.isCommunityResource()}t.isCommunityResource=p;var v=false;function b(){if(v){return}v=true;console.log("========= NOTICE =========");console.log("Request-Rate Exceeded (this message will not be repeated)");console.log("");console.log("The default API keys for each service are provided as a highly-throttled,");console.log("community resource for low-traffic projects and early prototyping.");console.log("");console.log("While your application will continue to function, we highly recommended");console.log("signing up for your own API keys to improve performance, increase your");console.log("request rate/limit and enable other perks, such as metrics and advanced APIs.");console.log("");console.log("For more details: https://docs.ethers.io/api-keys/");console.log("==========================")}t.showThrottleMessage=b},{"./_version":62,"@ethersproject/address":22,"@ethersproject/bignumber":29,"@ethersproject/bytes":31,"@ethersproject/constants":35,"@ethersproject/logger":55,"@ethersproject/properties":61,"@ethersproject/transactions":101}],71:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Formatter=t.showThrottleMessage=t.isCommunityResourcable=t.isCommunityResource=t.getNetwork=t.getDefaultProvider=t.JsonRpcSigner=t.IpcProvider=t.WebSocketProvider=t.Web3Provider=t.StaticJsonRpcProvider=t.PocketProvider=t.NodesmithProvider=t.JsonRpcBatchProvider=t.JsonRpcProvider=t.InfuraWebSocketProvider=t.InfuraProvider=t.EtherscanProvider=t.CloudflareProvider=t.AlchemyWebSocketProvider=t.AlchemyProvider=t.FallbackProvider=t.UrlJsonRpcProvider=t.Resolver=t.BaseProvider=t.Provider=void 0;var n=e("@ethersproject/abstract-provider");Object.defineProperty(t,"Provider",{enumerable:true,get:function(){return n.Provider}});var i=e("@ethersproject/networks");Object.defineProperty(t,"getNetwork",{enumerable:true,get:function(){return i.getNetwork}});var o=e("./base-provider");Object.defineProperty(t,"BaseProvider",{enumerable:true,get:function(){return o.BaseProvider}});Object.defineProperty(t,"Resolver",{enumerable:true,get:function(){return o.Resolver}});var a=e("./alchemy-provider");Object.defineProperty(t,"AlchemyProvider",{enumerable:true,get:function(){return a.AlchemyProvider}});Object.defineProperty(t,"AlchemyWebSocketProvider",{enumerable:true,get:function(){return a.AlchemyWebSocketProvider}});var s=e("./cloudflare-provider");Object.defineProperty(t,"CloudflareProvider",{enumerable:true,get:function(){return s.CloudflareProvider}});var u=e("./etherscan-provider");Object.defineProperty(t,"EtherscanProvider",{enumerable:true,get:function(){return u.EtherscanProvider}});var c=e("./fallback-provider");Object.defineProperty(t,"FallbackProvider",{enumerable:true,get:function(){return c.FallbackProvider}});var f=e("./ipc-provider");Object.defineProperty(t,"IpcProvider",{enumerable:true,get:function(){return f.IpcProvider}});var l=e("./infura-provider");Object.defineProperty(t,"InfuraProvider",{enumerable:true,get:function(){return l.InfuraProvider}});Object.defineProperty(t,"InfuraWebSocketProvider",{enumerable:true,get:function(){return l.InfuraWebSocketProvider}});var h=e("./json-rpc-provider");Object.defineProperty(t,"JsonRpcProvider",{enumerable:true,get:function(){return h.JsonRpcProvider}});Object.defineProperty(t,"JsonRpcSigner",{enumerable:true,get:function(){return h.JsonRpcSigner}});var d=e("./json-rpc-batch-provider");Object.defineProperty(t,"JsonRpcBatchProvider",{enumerable:true,get:function(){return d.JsonRpcBatchProvider}});var p=e("./nodesmith-provider");Object.defineProperty(t,"NodesmithProvider",{enumerable:true,get:function(){return p.NodesmithProvider}});var v=e("./pocket-provider");Object.defineProperty(t,"PocketProvider",{enumerable:true,get:function(){return v.PocketProvider}});var b=e("./url-json-rpc-provider");Object.defineProperty(t,"StaticJsonRpcProvider",{enumerable:true,get:function(){return b.StaticJsonRpcProvider}});Object.defineProperty(t,"UrlJsonRpcProvider",{enumerable:true,get:function(){return b.UrlJsonRpcProvider}});var g=e("./web3-provider");Object.defineProperty(t,"Web3Provider",{enumerable:true,get:function(){return g.Web3Provider}});var m=e("./websocket-provider");Object.defineProperty(t,"WebSocketProvider",{enumerable:true,get:function(){return m.WebSocketProvider}});var y=e("./formatter");Object.defineProperty(t,"Formatter",{enumerable:true,get:function(){return y.Formatter}});Object.defineProperty(t,"isCommunityResourcable",{enumerable:true,get:function(){return y.isCommunityResourcable}});Object.defineProperty(t,"isCommunityResource",{enumerable:true,get:function(){return y.isCommunityResource}});Object.defineProperty(t,"showThrottleMessage",{enumerable:true,get:function(){return y.showThrottleMessage}});var w=e("@ethersproject/logger");var _=e("./_version");var S=new w.Logger(_.version);function A(e,r){if(e==null){e="homestead"}if(typeof e==="string"){var t=e.match(/^(ws|http)s?:/i);if(t){switch(t[1]){case"http":return new h.JsonRpcProvider(e);case"ws":return new m.WebSocketProvider(e);default:S.throwArgumentError("unsupported URL scheme","network",e)}}}var n=(0,i.getNetwork)(e);if(!n||!n._defaultProvider){S.throwError("unsupported getDefaultProvider network",w.Logger.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:e})}return n._defaultProvider({FallbackProvider:c.FallbackProvider,AlchemyProvider:a.AlchemyProvider,CloudflareProvider:s.CloudflareProvider,EtherscanProvider:u.EtherscanProvider,InfuraProvider:l.InfuraProvider,JsonRpcProvider:h.JsonRpcProvider,NodesmithProvider:p.NodesmithProvider,PocketProvider:v.PocketProvider,Web3Provider:g.Web3Provider,IpcProvider:f.IpcProvider},r)}t.getDefaultProvider=A},{"./_version":62,"./alchemy-provider":63,"./base-provider":64,"./cloudflare-provider":67,"./etherscan-provider":68,"./fallback-provider":69,"./formatter":70,"./infura-provider":72,"./ipc-provider":65,"./json-rpc-batch-provider":73,"./json-rpc-provider":74,"./nodesmith-provider":75,"./pocket-provider":76,"./url-json-rpc-provider":77,"./web3-provider":78,"./websocket-provider":79,"@ethersproject/abstract-provider":18,"@ethersproject/logger":55,"@ethersproject/networks":57}],72:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(t,"__esModule",{value:true});t.InfuraProvider=t.InfuraWebSocketProvider=void 0;var s=e("@ethersproject/properties");var i=e("./websocket-provider");var o=e("./formatter");var u=e("@ethersproject/logger");var a=e("./_version");var c=new u.Logger(a.version);var f=e("./url-json-rpc-provider");var l="84842078b09946638c03157f83405213";var h=function(a){n(e,a);function e(e,r){var t=this;var n=new d(e,r);var i=n.connection;if(i.password){c.throwError("INFURA WebSocket project secrets unsupported",u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"})}var o=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");t=a.call(this,o,e)||this;(0,s.defineReadOnly)(t,"apiKey",n.projectId);(0,s.defineReadOnly)(t,"projectId",n.projectId);(0,s.defineReadOnly)(t,"projectSecret",n.projectSecret);return t}e.prototype.isCommunityResource=function(){return this.projectId===l};return e}(i.WebSocketProvider);t.InfuraWebSocketProvider=h;var d=function(e){n(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}r.getWebSocketProvider=function(e,r){return new h(e,r)};r.getApiKey=function(e){var r={apiKey:l,projectId:l,projectSecret:null};if(e==null){return r}if(typeof e==="string"){r.projectId=e}else if(e.projectSecret!=null){c.assertArgument(typeof e.projectId==="string","projectSecret requires a projectId","projectId",e.projectId);c.assertArgument(typeof e.projectSecret==="string","invalid projectSecret","projectSecret","[REDACTED]");r.projectId=e.projectId;r.projectSecret=e.projectSecret}else if(e.projectId){r.projectId=e.projectId}r.apiKey=r.projectId;return r};r.getUrl=function(e,t){var r=null;switch(e?e.name:"unknown"){case"homestead":r="mainnet.infura.io";break;case"ropsten":r="ropsten.infura.io";break;case"rinkeby":r="rinkeby.infura.io";break;case"kovan":r="kovan.infura.io";break;case"goerli":r="goerli.infura.io";break;case"matic":r="polygon-mainnet.infura.io";break;case"maticmum":r="polygon-mumbai.infura.io";break;case"optimism":r="optimism-mainnet.infura.io";break;case"optimism-kovan":r="optimism-kovan.infura.io";break;case"arbitrum":r="arbitrum-mainnet.infura.io";break;case"arbitrum-rinkeby":r="arbitrum-rinkeby.infura.io";break;default:c.throwError("unsupported network",u.Logger.errors.INVALID_ARGUMENT,{argument:"network",value:e})}var n={allowGzip:true,url:"https:/"+"/"+r+"/v3/"+t.projectId,throttleCallback:function(e,r){if(t.projectId===l){(0,o.showThrottleMessage)()}return Promise.resolve(true)}};if(t.projectSecret!=null){n.user="";n.password=t.projectSecret}return n};r.prototype.isCommunityResource=function(){return this.projectId===l};return r}(f.UrlJsonRpcProvider);t.InfuraProvider=d},{"./_version":62,"./formatter":70,"./url-json-rpc-provider":77,"./websocket-provider":79,"@ethersproject/logger":55,"@ethersproject/properties":61}],73:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(t,"__esModule",{value:true});t.JsonRpcBatchProvider=void 0;var a=e("@ethersproject/properties");var s=e("@ethersproject/web");var i=e("./json-rpc-provider");var o=function(e){n(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}r.prototype.send=function(e,r){var n=this;var t={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};if(this._pendingBatch==null){this._pendingBatch=[]}var i={request:t,resolve:null,reject:null};var o=new Promise(function(e,r){i.resolve=e;i.reject=r});this._pendingBatch.push(i);if(!this._pendingBatchAggregator){this._pendingBatchAggregator=setTimeout(function(){var e=n._pendingBatch;n._pendingBatch=null;n._pendingBatchAggregator=null;var t=e.map(function(e){return e.request});n.emit("debug",{action:"requestBatch",request:(0,a.deepCopy)(t),provider:n});return(0,s.fetchJson)(n.connection,JSON.stringify(t)).then(function(i){n.emit("debug",{action:"response",request:t,response:i,provider:n});e.forEach(function(e,r){var t=i[r];if(t.error){var n=new Error(t.error.message);n.code=t.error.code;n.data=t.error.data;e.reject(n)}else{e.resolve(t.result)}})},function(r){n.emit("debug",{action:"response",error:r,request:t,provider:n});e.forEach(function(e){e.reject(r)})})},10)}return o};return r}(i.JsonRpcProvider);t.JsonRpcBatchProvider=o},{"./json-rpc-provider":74,"@ethersproject/properties":61,"@ethersproject/web":108}],74:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();var s=this&&this.__awaiter||function(e,a,t,s){function u(r){return r instanceof t?r:new t(function(e){e(r)})}return new(t||(t=Promise))(function(r,t){function n(e){try{o(s.next(e))}catch(e){t(e)}}function i(e){try{o(s["throw"](e))}catch(e){t(e)}}function o(e){e.done?r(e.value):u(e.value).then(n,i)}o((s=s.apply(e,a||[])).next())})};var u=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(e){return u([r,e])}}function u(r){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(a=r[0]&2?o["return"]:r[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;if(o=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;o=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){n.label=r[1];break}if(r[0]===6&&n.label<a[1]){n.label=a[1];a=r;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(r);break}if(a[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];o=0}finally{i=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};Object.defineProperty(t,"__esModule",{value:true});t.JsonRpcProvider=t.JsonRpcSigner=void 0;var i=e("@ethersproject/abstract-signer");var c=e("@ethersproject/bignumber");var f=e("@ethersproject/bytes");var l=e("@ethersproject/hash");var h=e("@ethersproject/properties");var d=e("@ethersproject/strings");var p=e("@ethersproject/transactions");var v=e("@ethersproject/web");var b=e("@ethersproject/logger");var o=e("./_version");var g=new b.Logger(o.version);var a=e("./base-provider");var m=["call","estimateGas"];function y(e,r,t){if(e==="call"&&r.code===b.Logger.errors.SERVER_ERROR){var n=r.error;if(n&&n.message.match("reverted")&&(0,f.isHexString)(n.data)){return n.data}g.throwError("missing revert data in call exception",b.Logger.errors.CALL_EXCEPTION,{error:r,data:"0x"})}var i=r.message;if(r.code===b.Logger.errors.SERVER_ERROR&&r.error&&typeof r.error.message==="string"){i=r.error.message}else if(typeof r.body==="string"){i=r.body}else if(typeof r.responseText==="string"){i=r.responseText}i=(i||"").toLowerCase();var o=t.transaction||t.signedTransaction;if(i.match(/insufficient funds|base fee exceeds gas limit/)){g.throwError("insufficient funds for intrinsic transaction cost",b.Logger.errors.INSUFFICIENT_FUNDS,{error:r,method:e,transaction:o})}if(i.match(/nonce too low/)){g.throwError("nonce has already been used",b.Logger.errors.NONCE_EXPIRED,{error:r,method:e,transaction:o})}if(i.match(/replacement transaction underpriced/)){g.throwError("replacement fee too low",b.Logger.errors.REPLACEMENT_UNDERPRICED,{error:r,method:e,transaction:o})}if(i.match(/only replay-protected/)){g.throwError("legacy pre-eip-155 transactions not supported",b.Logger.errors.UNSUPPORTED_OPERATION,{error:r,method:e,transaction:o})}if(m.indexOf(e)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted/)){g.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",b.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:r,method:e,transaction:o})}throw r}function w(r){return new Promise(function(e){setTimeout(e,r)})}function _(e){if(e.error){var r=new Error(e.error.message);r.code=e.error.code;r.data=e.error.data;throw r}return e.result}function S(e){if(e){return e.toLowerCase()}return e}var A={};var E=function(o){n(a,o);function a(e,r,t){var n=this.constructor;var i=this;g.checkNew(n,a);i=o.call(this)||this;if(e!==A){throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner")}(0,h.defineReadOnly)(i,"provider",r);if(t==null){t=0}if(typeof t==="string"){(0,h.defineReadOnly)(i,"_address",i.provider.formatter.address(t));(0,h.defineReadOnly)(i,"_index",null)}else if(typeof t==="number"){(0,h.defineReadOnly)(i,"_index",t);(0,h.defineReadOnly)(i,"_address",null)}else{g.throwArgumentError("invalid address or index","addressOrIndex",t)}return i}a.prototype.connect=function(e){return g.throwError("cannot alter JSON-RPC Signer connection",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"connect"})};a.prototype.connectUnchecked=function(){return new M(A,this.provider,this._address||this._index)};a.prototype.getAddress=function(){var r=this;if(this._address){return Promise.resolve(this._address)}return this.provider.send("eth_accounts",[]).then(function(e){if(e.length<=r._index){g.throwError("unknown account #"+r._index,b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"})}return r.provider.formatter.address(e[r._index])})};a.prototype.sendUncheckedTransaction=function(i){var o=this;i=(0,h.shallowCopy)(i);var e=this.getAddress().then(function(e){if(e){e=e.toLowerCase()}return e});if(i.gasLimit==null){var r=(0,h.shallowCopy)(i);r.from=e;i.gasLimit=this.provider.estimateGas(r)}if(i.to!=null){i.to=Promise.resolve(i.to).then(function(t){return s(o,void 0,void 0,function(){var r;return u(this,function(e){switch(e.label){case 0:if(t==null){return[2,null]}return[4,this.provider.resolveName(t)];case 1:r=e.sent();if(r==null){g.throwArgumentError("provided ENS name resolves to null","tx.to",t)}return[2,r]}})})})}return(0,h.resolveProperties)({tx:(0,h.resolveProperties)(i),sender:e}).then(function(e){var r=e.tx,t=e.sender;if(r.from!=null){if(r.from.toLowerCase()!==t){g.throwArgumentError("from address mismatch","transaction",i)}}else{r.from=t}var n=o.provider.constructor.hexlifyTransaction(r,{from:true});return o.provider.send("eth_sendTransaction",[n]).then(function(e){return e},function(e){return y("sendTransaction",e,n)})})};a.prototype.signTransaction=function(e){return g.throwError("signing transactions is unsupported",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})};a.prototype.sendTransaction=function(o){return s(this,void 0,void 0,function(){var t,n,r;var i=this;return u(this,function(e){switch(e.label){case 0:return[4,this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval)];case 1:t=e.sent();return[4,this.sendUncheckedTransaction(o)];case 2:n=e.sent();e.label=3;case 3:e.trys.push([3,5,,6]);return[4,(0,v.poll)(function(){return s(i,void 0,void 0,function(){var r;return u(this,function(e){switch(e.label){case 0:return[4,this.provider.getTransaction(n)];case 1:r=e.sent();if(r===null){return[2,undefined]}return[2,this.provider._wrapTransaction(r,n,t)]}})})},{oncePoll:this.provider})];case 4:return[2,e.sent()];case 5:r=e.sent();r.transactionHash=n;throw r;case 6:return[2]}})})};a.prototype.signMessage=function(n){return s(this,void 0,void 0,function(){var r,t;return u(this,function(e){switch(e.label){case 0:r=typeof n==="string"?(0,d.toUtf8Bytes)(n):n;return[4,this.getAddress()];case 1:t=e.sent();return[4,this.provider.send("personal_sign",[(0,f.hexlify)(r),t.toLowerCase()])];case 2:return[2,e.sent()]}})})};a.prototype._legacySignMessage=function(n){return s(this,void 0,void 0,function(){var r,t;return u(this,function(e){switch(e.label){case 0:r=typeof n==="string"?(0,d.toUtf8Bytes)(n):n;return[4,this.getAddress()];case 1:t=e.sent();return[4,this.provider.send("eth_sign",[t.toLowerCase(),(0,f.hexlify)(r)])];case 2:return[2,e.sent()]}})})};a.prototype._signTypedData=function(i,o,a){return s(this,void 0,void 0,function(){var r,t;var n=this;return u(this,function(e){switch(e.label){case 0:return[4,l._TypedDataEncoder.resolveNames(i,o,a,function(e){return n.provider.resolveName(e)})];case 1:r=e.sent();return[4,this.getAddress()];case 2:t=e.sent();return[4,this.provider.send("eth_signTypedData_v4",[t.toLowerCase(),JSON.stringify(l._TypedDataEncoder.getPayload(r.domain,o,r.value))])];case 3:return[2,e.sent()]}})})};a.prototype.unlock=function(n){return s(this,void 0,void 0,function(){var r,t;return u(this,function(e){switch(e.label){case 0:r=this.provider;return[4,this.getAddress()];case 1:t=e.sent();return[2,r.send("personal_unlockAccount",[t.toLowerCase(),n,null])]}})})};return a}(i.Signer);t.JsonRpcSigner=E;var M=function(e){n(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}r.prototype.sendTransaction=function(e){var t=this;return this.sendUncheckedTransaction(e).then(function(r){return{hash:r,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:function(e){return t.provider.waitForTransaction(r,e)}}})};return r}(E);var P={chainId:true,data:true,gasLimit:true,gasPrice:true,nonce:true,to:true,value:true,type:true,accessList:true,maxFeePerGas:true,maxPriorityFeePerGas:true};var T=function(o){n(a,o);function a(e,r){var t=this.constructor;var n=this;g.checkNew(t,a);var i=r;if(i==null){i=new Promise(function(r,t){setTimeout(function(){n.detectNetwork().then(function(e){r(e)},function(e){t(e)})},0)})}n=o.call(this,i)||this;if(!e){e=(0,h.getStatic)(n.constructor,"defaultUrl")()}if(typeof e==="string"){(0,h.defineReadOnly)(n,"connection",Object.freeze({url:e}))}else{(0,h.defineReadOnly)(n,"connection",Object.freeze((0,h.shallowCopy)(e)))}n._nextId=42;return n}Object.defineProperty(a.prototype,"_cache",{get:function(){if(this._eventLoopCache==null){this._eventLoopCache={}}return this._eventLoopCache},enumerable:false,configurable:true});a.defaultUrl=function(){return"http://localhost:8545"};a.prototype.detectNetwork=function(){var e=this;if(!this._cache["detectNetwork"]){this._cache["detectNetwork"]=this._uncachedDetectNetwork();setTimeout(function(){e._cache["detectNetwork"]=null},0)}return this._cache["detectNetwork"]};a.prototype._uncachedDetectNetwork=function(){return s(this,void 0,void 0,function(){var r,t,n,i;return u(this,function(e){switch(e.label){case 0:return[4,w(0)];case 1:e.sent();r=null;e.label=2;case 2:e.trys.push([2,4,,9]);return[4,this.send("eth_chainId",[])];case 3:r=e.sent();return[3,9];case 4:t=e.sent();e.label=5;case 5:e.trys.push([5,7,,8]);return[4,this.send("net_version",[])];case 6:r=e.sent();return[3,8];case 7:n=e.sent();return[3,8];case 8:return[3,9];case 9:if(r!=null){i=(0,h.getStatic)(this.constructor,"getNetwork");try{return[2,i(c.BigNumber.from(r).toNumber())]}catch(e){return[2,g.throwError("could not detect network",b.Logger.errors.NETWORK_ERROR,{chainId:r,event:"invalidNetwork",serverError:e})]}}return[2,g.throwError("could not detect network",b.Logger.errors.NETWORK_ERROR,{event:"noNetwork"})]}})})};a.prototype.getSigner=function(e){return new E(A,this,e)};a.prototype.getUncheckedSigner=function(e){return this.getSigner(e).connectUnchecked()};a.prototype.listAccounts=function(){var r=this;return this.send("eth_accounts",[]).then(function(e){return e.map(function(e){return r.formatter.address(e)})})};a.prototype.send=function(e,r){var t=this;var n={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:(0,h.deepCopy)(n),provider:this});var i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e]){return this._cache[e]}var o=(0,v.fetchJson)(this.connection,JSON.stringify(n),_).then(function(e){t.emit("debug",{action:"response",request:n,response:e,provider:t});return e},function(e){t.emit("debug",{action:"response",error:e,request:n,provider:t});throw e});if(i){this._cache[e]=o;setTimeout(function(){t._cache[e]=null},0)}return o};a.prototype.prepareRequest=function(e,r){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[S(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[S(r.address),r.blockTag]];case"getCode":return["eth_getCode",[S(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[S(r.address),r.position,r.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[r.signedTransaction]];case"getBlock":if(r.blockTag){return["eth_getBlockByNumber",[r.blockTag,!!r.includeTransactions]]}else if(r.blockHash){return["eth_getBlockByHash",[r.blockHash,!!r.includeTransactions]]}return null;case"getTransaction":return["eth_getTransactionByHash",[r.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[r.transactionHash]];case"call":{var t=(0,h.getStatic)(this.constructor,"hexlifyTransaction");return["eth_call",[t(r.transaction,{from:true}),r.blockTag]]}case"estimateGas":{var t=(0,h.getStatic)(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[t(r.transaction,{from:true})]]}case"getLogs":if(r.filter&&r.filter.address!=null){r.filter.address=S(r.filter.address)}return["eth_getLogs",[r.filter]];default:break}return null};a.prototype.perform=function(o,a){return s(this,void 0,void 0,function(){var r,t,n,i;return u(this,function(e){switch(e.label){case 0:if(!(o==="call"||o==="estimateGas"))return[3,2];r=a.transaction;if(!(r&&r.type!=null&&c.BigNumber.from(r.type).isZero()))return[3,2];if(!(r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null))return[3,2];return[4,this.getFeeData()];case 1:t=e.sent();if(t.maxFeePerGas==null&&t.maxPriorityFeePerGas==null){a=(0,h.shallowCopy)(a);a.transaction=(0,h.shallowCopy)(r);delete a.transaction.type}e.label=2;case 2:n=this.prepareRequest(o,a);if(n==null){g.throwError(o+" not implemented",b.Logger.errors.NOT_IMPLEMENTED,{operation:o})}e.label=3;case 3:e.trys.push([3,5,,6]);return[4,this.send(n[0],n[1])];case 4:return[2,e.sent()];case 5:i=e.sent();return[2,y(o,i,a)];case 6:return[2]}})})};a.prototype._startEvent=function(e){if(e.tag==="pending"){this._startPending()}o.prototype._startEvent.call(this,e)};a.prototype._startPending=function(){if(this._pendingFilter!=null){return}var t=this;var n=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=n;n.then(function(e){function r(){t.send("eth_getFilterChanges",[e]).then(function(e){if(t._pendingFilter!=n){return null}var r=Promise.resolve();e.forEach(function(e){t._emitted["t:"+e.toLowerCase()]="pending";r=r.then(function(){return t.getTransaction(e).then(function(e){t.emit("pending",e);return null})})});return r.then(function(){return w(1e3)})}).then(function(){if(t._pendingFilter!=n){t.send("eth_uninstallFilter",[e]);return}setTimeout(function(){r()},0);return null}).catch(function(e){})}r();return e}).catch(function(e){})};a.prototype._stopEvent=function(e){if(e.tag==="pending"&&this.listenerCount("pending")===0){this._pendingFilter=null}o.prototype._stopEvent.call(this,e)};a.hexlifyTransaction=function(t,e){var r=(0,h.shallowCopy)(P);if(e){for(var n in e){if(e[n]){r[n]=true}}}(0,h.checkProperties)(t,r);var i={};["gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(e){if(t[e]==null){return}var r=(0,f.hexValue)(t[e]);if(e==="gasLimit"){e="gas"}i[e]=r});["from","to","data"].forEach(function(e){if(t[e]==null){return}i[e]=(0,f.hexlify)(t[e])});if(t.accessList){i["accessList"]=(0,p.accessListify)(t.accessList)}return i};return a}(a.BaseProvider);t.JsonRpcProvider=T},{"./_version":62,"./base-provider":64,"@ethersproject/abstract-signer":20,"@ethersproject/bignumber":29,"@ethersproject/bytes":31,"@ethersproject/hash":41,"@ethersproject/logger":55,"@ethersproject/properties":61,"@ethersproject/strings":98,"@ethersproject/transactions":101,"@ethersproject/web":108}],75:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(t,"__esModule",{value:true});t.NodesmithProvider=void 0;var i=e("./url-json-rpc-provider");var o=e("@ethersproject/logger");var a=e("./_version");var s=new o.Logger(a.version);var u="ETHERS_JS_SHARED";var c=function(e){n(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}r.getApiKey=function(e){if(e&&typeof e!=="string"){s.throwArgumentError("invalid apiKey","apiKey",e)}return e||u};r.getUrl=function(e,r){s.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");var t=null;switch(e.name){case"homestead":t="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":t="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":t="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":t="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":t="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:s.throwArgumentError("unsupported network","network",arguments[0])}return t+"?apiKey="+r};return r}(i.UrlJsonRpcProvider);t.NodesmithProvider=c},{"./_version":62,"./url-json-rpc-provider":77,"@ethersproject/logger":55}],76:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(t,"__esModule",{value:true});t.PocketProvider=void 0;var s=e("@ethersproject/properties");var u=e("@ethersproject/logger");var i=e("./_version");var c=new u.Logger(i.version);var o=e("./url-json-rpc-provider");var f={homestead:"6004bcd10040261633ade990",ropsten:"6004bd4d0040261633ade991",rinkeby:"6004bda20040261633ade994",goerli:"6004bd860040261633ade992"};var a=function(a){n(e,a);function e(e,r){var t=this.constructor;var n=this;if(r==null){var i=(0,s.getStatic)(t,"getNetwork")(e);if(i){var o=f[i.name];if(o){r={applicationId:o,loadBalancer:true}}}if(r==null){c.throwError("unsupported network",u.Logger.errors.INVALID_ARGUMENT,{argument:"network",value:e})}}n=a.call(this,e,r)||this;return n}e.getApiKey=function(e){if(e==null){c.throwArgumentError("PocketProvider.getApiKey does not support null apiKey","apiKey",e)}var r={applicationId:null,loadBalancer:false,applicationSecretKey:null};if(typeof e==="string"){r.applicationId=e}else if(e.applicationSecretKey!=null){c.assertArgument(typeof e.applicationId==="string","applicationSecretKey requires an applicationId","applicationId",e.applicationId);c.assertArgument(typeof e.applicationSecretKey==="string","invalid applicationSecretKey","applicationSecretKey","[REDACTED]");r.applicationId=e.applicationId;r.applicationSecretKey=e.applicationSecretKey;r.loadBalancer=!!e.loadBalancer}else if(e.applicationId){c.assertArgument(typeof e.applicationId==="string","apiKey.applicationId must be a string","apiKey.applicationId",e.applicationId);r.applicationId=e.applicationId;r.loadBalancer=!!e.loadBalancer}else{c.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e)}return r};e.getUrl=function(e,r){var t=null;switch(e?e.name:"unknown"){case"homestead":t="eth-mainnet.gateway.pokt.network";break;case"ropsten":t="eth-ropsten.gateway.pokt.network";break;case"rinkeby":t="eth-rinkeby.gateway.pokt.network";break;case"goerli":t="eth-goerli.gateway.pokt.network";break;default:c.throwError("unsupported network",u.Logger.errors.INVALID_ARGUMENT,{argument:"network",value:e})}var n=null;if(r.loadBalancer){n="https://"+t+"/v1/lb/"+r.applicationId}else{n="https://"+t+"/v1/"+r.applicationId}var i={url:n};i.headers={};if(r.applicationSecretKey!=null){i.user="";i.password=r.applicationSecretKey}return i};e.prototype.isCommunityResource=function(){return this.applicationId===f[this.network.name]};return e}(o.UrlJsonRpcProvider);t.PocketProvider=a},{"./_version":62,"./url-json-rpc-provider":77,"@ethersproject/logger":55,"@ethersproject/properties":61}],77:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();var i=this&&this.__awaiter||function(e,a,t,s){function u(r){return r instanceof t?r:new t(function(e){e(r)})}return new(t||(t=Promise))(function(r,t){function n(e){try{o(s.next(e))}catch(e){t(e)}}function i(e){try{o(s["throw"](e))}catch(e){t(e)}}function o(e){e.done?r(e.value):u(e.value).then(n,i)}o((s=s.apply(e,a||[])).next())})};var o=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(e){return u([r,e])}}function u(r){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(a=r[0]&2?o["return"]:r[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;if(o=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;o=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){n.label=r[1];break}if(r[0]===6&&n.label<a[1]){n.label=a[1];a=r;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(r);break}if(a[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];o=0}finally{i=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};Object.defineProperty(t,"__esModule",{value:true});t.UrlJsonRpcProvider=t.StaticJsonRpcProvider=void 0;var s=e("@ethersproject/properties");var u=e("@ethersproject/logger");var a=e("./_version");var c=new u.Logger(a.version);var f=e("./json-rpc-provider");var l=function(t){n(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.prototype.detectNetwork=function(){return i(this,void 0,void 0,function(){var r;return o(this,function(e){switch(e.label){case 0:r=this.network;if(!(r==null))return[3,2];return[4,t.prototype.detectNetwork.call(this)];case 1:r=e.sent();if(!r){c.throwError("no network detected",u.Logger.errors.UNKNOWN_ERROR,{})}if(this._network==null){(0,s.defineReadOnly)(this,"_network",r);this.emit("network",r,null)}e.label=2;case 2:return[2,r]}})})};return e}(f.JsonRpcProvider);t.StaticJsonRpcProvider=l;var h=function(o){n(a,o);function a(e,r){var t=this.constructor;var n=this;c.checkAbstract(t,a);e=(0,s.getStatic)(t,"getNetwork")(e);r=(0,s.getStatic)(t,"getApiKey")(r);var i=(0,s.getStatic)(t,"getUrl")(e,r);n=o.call(this,i,e)||this;if(typeof r==="string"){(0,s.defineReadOnly)(n,"apiKey",r)}else if(r!=null){Object.keys(r).forEach(function(e){(0,s.defineReadOnly)(n,e,r[e])})}return n}a.prototype._startPending=function(){c.warn("WARNING: API provider does not support pending filters")};a.prototype.isCommunityResource=function(){return false};a.prototype.getSigner=function(e){return c.throwError("API provider does not support signing",u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})};a.prototype.listAccounts=function(){return Promise.resolve([])};a.getApiKey=function(e){return e};a.getUrl=function(e,r){return c.throwError("not implemented; sub-classes must override getUrl",u.Logger.errors.NOT_IMPLEMENTED,{operation:"getUrl"})};return a}(l);t.UrlJsonRpcProvider=h},{"./_version":62,"./json-rpc-provider":74,"@ethersproject/logger":55,"@ethersproject/properties":61}],78:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(t,"__esModule",{value:true});t.Web3Provider=void 0;var c=e("@ethersproject/properties");var i=e("@ethersproject/logger");var o=e("./_version");var f=new i.Logger(o.version);var a=e("./json-rpc-provider");var u=1;function l(e,t){var s="Web3LegacyFetcher";return function(e,r){var o=this;var a={method:e,params:r,id:u++,jsonrpc:"2.0"};return new Promise(function(n,i){o.emit("debug",{action:"request",fetcher:s,request:(0,c.deepCopy)(a),provider:o});t(a,function(e,r){if(e){o.emit("debug",{action:"response",fetcher:s,error:e,request:a,provider:o});return i(e)}o.emit("debug",{action:"response",fetcher:s,request:a,response:r,provider:o});if(r.error){var t=new Error(r.error.message);t.code=r.error.code;t.data=r.error.data;return i(t)}n(r.result)})})}}function h(i){return function(e,r){var t=this;if(r==null){r=[]}var n={method:e,params:r};this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:(0,c.deepCopy)(n),provider:this});return i.request(n).then(function(e){t.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:e,provider:t});return e},function(e){t.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:e,provider:t});throw e})}}var s=function(s){n(u,s);function u(e,r){var t=this.constructor;var n=this;f.checkNew(t,u);if(e==null){f.throwArgumentError("missing provider","provider",e)}var i=null;var o=null;var a=null;if(typeof e==="function"){i="unknown:";o=e}else{i=e.host||e.path||"";if(!i&&e.isMetaMask){i="metamask"}a=e;if(e.request){if(i===""){i="eip-1193:"}o=h(e)}else if(e.sendAsync){o=l(e,e.sendAsync.bind(e))}else if(e.send){o=l(e,e.send.bind(e))}else{f.throwArgumentError("unsupported provider","provider",e)}if(!i){i="unknown:"}}n=s.call(this,i,r)||this;(0,c.defineReadOnly)(n,"jsonRpcFetchFunc",o);(0,c.defineReadOnly)(n,"provider",a);return n}u.prototype.send=function(e,r){return this.jsonRpcFetchFunc(e,r)};return u}(a.JsonRpcProvider);t.Web3Provider=s},{"./_version":62,"./json-rpc-provider":74,"@ethersproject/logger":55,"@ethersproject/properties":61}],79:[function(e,r,t){"use strict";var i=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();var s=this&&this.__awaiter||function(e,a,t,s){function u(r){return r instanceof t?r:new t(function(e){e(r)})}return new(t||(t=Promise))(function(r,t){function n(e){try{o(s.next(e))}catch(e){t(e)}}function i(e){try{o(s["throw"](e))}catch(e){t(e)}}function o(e){e.done?r(e.value):u(e.value).then(n,i)}o((s=s.apply(e,a||[])).next())})};var u=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(e){return u([r,e])}}function u(r){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(a=r[0]&2?o["return"]:r[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;if(o=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;o=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){n.label=r[1];break}if(r[0]===6&&n.label<a[1]){n.label=a[1];a=r;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(r);break}if(a[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];o=0}finally{i=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};Object.defineProperty(t,"__esModule",{value:true});t.WebSocketProvider=void 0;var o=e("@ethersproject/bignumber");var c=e("@ethersproject/properties");var n=e("./json-rpc-provider");var a=e("./ws");var f=e("@ethersproject/logger");var l=e("./_version");var h=new f.Logger(l.version);var d=1;var p=function(n){i(e,n);function e(e,r){var s=this;if(r==="any"){h.throwError("WebSocketProvider does not support 'any' network yet",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"network:any"})}s=n.call(this,e,r)||this;s._pollingInterval=-1;s._wsReady=false;(0,c.defineReadOnly)(s,"_websocket",new a.WebSocket(s.connection.url));(0,c.defineReadOnly)(s,"_requests",{});(0,c.defineReadOnly)(s,"_subs",{});(0,c.defineReadOnly)(s,"_subIds",{});(0,c.defineReadOnly)(s,"_detectNetwork",n.prototype.detectNetwork.call(s));s._websocket.onopen=function(){s._wsReady=true;Object.keys(s._requests).forEach(function(e){s._websocket.send(s._requests[e].payload)})};s._websocket.onmessage=function(e){var r=e.data;var t=JSON.parse(r);if(t.id!=null){var n=String(t.id);var i=s._requests[n];delete s._requests[n];if(t.result!==undefined){i.callback(null,t.result);s.emit("debug",{action:"response",request:JSON.parse(i.payload),response:t.result,provider:s})}else{var o=null;if(t.error){o=new Error(t.error.message||"unknown error");(0,c.defineReadOnly)(o,"code",t.error.code||null);(0,c.defineReadOnly)(o,"response",r)}else{o=new Error("unknown error")}i.callback(o,undefined);s.emit("debug",{action:"response",error:o,request:JSON.parse(i.payload),provider:s})}}else if(t.method==="eth_subscription"){var a=s._subs[t.params.subscription];if(a){a.processFunc(t.params.result)}}else{console.warn("this should not happen")}};var t=setInterval(function(){s.emit("poll")},1e3);if(t.unref){t.unref()}return s}e.prototype.detectNetwork=function(){return this._detectNetwork};Object.defineProperty(e.prototype,"pollingInterval",{get:function(){return 0},set:function(e){h.throwError("cannot set polling interval on WebSocketProvider",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})},enumerable:false,configurable:true});e.prototype.resetEventsBlock=function(e){h.throwError("cannot reset events block on WebSocketProvider",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})};e.prototype.poll=function(){return s(this,void 0,void 0,function(){return u(this,function(e){return[2,null]})})};Object.defineProperty(e.prototype,"polling",{set:function(e){if(!e){return}h.throwError("cannot set polling on WebSocketProvider",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})},enumerable:false,configurable:true});e.prototype.send=function(i,o){var a=this;var s=d++;return new Promise(function(t,n){function e(e,r){if(e){return n(e)}return t(r)}var r=JSON.stringify({method:i,params:o,id:s,jsonrpc:"2.0"});a.emit("debug",{action:"request",request:JSON.parse(r),provider:a});a._requests[String(s)]={callback:e,payload:r};if(a._wsReady){a._websocket.send(r)}})};e.defaultUrl=function(){return"ws://localhost:8546"};e.prototype._subscribe=function(i,o,a){return s(this,void 0,void 0,function(){var r,t;var n=this;return u(this,function(e){switch(e.label){case 0:r=this._subIds[i];if(r==null){r=Promise.all(o).then(function(e){return n.send("eth_subscribe",e)});this._subIds[i]=r}return[4,r];case 1:t=e.sent();this._subs[t]={tag:i,processFunc:a};return[2]}})})};e.prototype._startEvent=function(r){var t=this;switch(r.type){case"block":this._subscribe("block",["newHeads"],function(e){var r=o.BigNumber.from(e.number).toNumber();t._emitted.block=r;t.emit("block",r)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],function(e){t.emit("pending",e)});break;case"filter":this._subscribe(r.tag,["logs",this._getFilter(r.filter)],function(e){if(e.removed==null){e.removed=false}t.emit(r.filter,t.formatter.filterLog(e))});break;case"tx":{var n=function(e){var r=e.hash;t.getTransactionReceipt(r).then(function(e){if(!e){return}t.emit(r,e)})};n(r);this._subscribe("tx",["newHeads"],function(e){t._events.filter(function(e){return e.type==="tx"}).forEach(n)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",r);break}};e.prototype._stopEvent=function(e){var r=this;var t=e.tag;if(e.type==="tx"){if(this._events.filter(function(e){return e.type==="tx"}).length){return}t="tx"}else if(this.listenerCount(e.event)){return}var n=this._subIds[t];if(!n){return}delete this._subIds[t];n.then(function(e){if(!r._subs[e]){return}delete r._subs[e];r.send("eth_unsubscribe",[e])})};e.prototype.destroy=function(){return s(this,void 0,void 0,function(){var r=this;return u(this,function(e){switch(e.label){case 0:if(!(this._websocket.readyState===a.WebSocket.CONNECTING))return[3,2];return[4,new Promise(function(e){r._websocket.onopen=function(){e(true)};r._websocket.onerror=function(){e(false)}})];case 1:e.sent();e.label=2;case 2:this._websocket.close(1e3);return[2]}})})};return e}(n.JsonRpcProvider);t.WebSocketProvider=p},{"./_version":62,"./json-rpc-provider":74,"./ws":66,"@ethersproject/bignumber":29,"@ethersproject/logger":55,"@ethersproject/properties":61}],80:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="random/5.5.0"},{}],81:[function(u,e,c){(function(s){(function(){"use strict";Object.defineProperty(c,"__esModule",{value:true});c.randomBytes=void 0;var t=u("@ethersproject/bytes");var r=u("@ethersproject/logger");var e=u("./_version");var n=new r.Logger(e.version);var i=null;try{i=window;if(i==null){throw new Error("try next")}}catch(e){try{i=s;if(i==null){throw new Error("try next")}}catch(e){i={}}}var o=i.crypto||i.msCrypto;if(!o||!o.getRandomValues){n.warn("WARNING: Missing strong random number source");o={getRandomValues:function(e){return n.throwError("no secure random source avaialble",r.Logger.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}}}function a(e){if(e<=0||e>1024||e%1||e!=e){n.throwArgumentError("invalid length","length",e)}var r=new Uint8Array(e);o.getRandomValues(r);return(0,t.arrayify)(r)}c.randomBytes=a}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./_version":80,"@ethersproject/bytes":31,"@ethersproject/logger":55}],82:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.shuffled=t.randomBytes=void 0;var n=e("./random");Object.defineProperty(t,"randomBytes",{enumerable:true,get:function(){return n.randomBytes}});var i=e("./shuffle");Object.defineProperty(t,"shuffled",{enumerable:true,get:function(){return i.shuffled}})},{"./random":81,"./shuffle":83}],83:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.shuffled=void 0;function n(e){e=e.slice();for(var r=e.length-1;r>0;r--){var t=Math.floor(Math.random()*(r+1));var n=e[r];e[r]=e[t];e[t]=n}return e}t.shuffled=n},{}],84:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="rlp/5.5.0"},{}],85:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decode=t.encode=void 0;var u=e("@ethersproject/bytes");var c=e("@ethersproject/logger");var n=e("./_version");var f=new c.Logger(n.version);function o(e){var r=[];while(e){r.unshift(e&255);e>>=8}return r}function l(e,r,t){var n=0;for(var i=0;i<t;i++){n=n*256+e[r+i]}return n}function a(e){if(Array.isArray(e)){var r=[];e.forEach(function(e){r=r.concat(a(e))});if(r.length<=55){r.unshift(192+r.length);return r}var t=o(r.length);t.unshift(247+t.length);return t.concat(r)}if(!(0,u.isBytesLike)(e)){f.throwArgumentError("RLP object must be BytesLike","object",e)}var n=Array.prototype.slice.call((0,u.arrayify)(e));if(n.length===1&&n[0]<=127){return n}else if(n.length<=55){n.unshift(128+n.length);return n}var i=o(n.length);i.unshift(183+i.length);return i.concat(n)}function i(e){return(0,u.hexlify)(a(e))}t.encode=i;function h(e,r,t,n){var i=[];while(t<r+1+n){var o=s(e,t);i.push(o.result);t+=o.consumed;if(t>r+1+n){f.throwError("child data too short",c.Logger.errors.BUFFER_OVERRUN,{})}}return{consumed:1+n,result:i}}function s(e,r){if(e.length===0){f.throwError("data too short",c.Logger.errors.BUFFER_OVERRUN,{})}if(e[r]>=248){var t=e[r]-247;if(r+1+t>e.length){f.throwError("data short segment too short",c.Logger.errors.BUFFER_OVERRUN,{})}var n=l(e,r+1,t);if(r+1+t+n>e.length){f.throwError("data long segment too short",c.Logger.errors.BUFFER_OVERRUN,{})}return h(e,r,r+1+t,t+n)}else if(e[r]>=192){var i=e[r]-192;if(r+1+i>e.length){f.throwError("data array too short",c.Logger.errors.BUFFER_OVERRUN,{})}return h(e,r,r+1,i)}else if(e[r]>=184){var t=e[r]-183;if(r+1+t>e.length){f.throwError("data array too short",c.Logger.errors.BUFFER_OVERRUN,{})}var o=l(e,r+1,t);if(r+1+t+o>e.length){f.throwError("data array too short",c.Logger.errors.BUFFER_OVERRUN,{})}var a=(0,u.hexlify)(e.slice(r+1+t,r+1+t+o));return{consumed:1+t+o,result:a}}else if(e[r]>=128){var s=e[r]-128;if(r+1+s>e.length){f.throwError("data too short",c.Logger.errors.BUFFER_OVERRUN,{})}var a=(0,u.hexlify)(e.slice(r+1,r+1+s));return{consumed:1+s,result:a}}return{consumed:1,result:(0,u.hexlify)(e[r])}}function d(e){var r=(0,u.arrayify)(e);var t=s(r,0);if(t.consumed!==r.length){f.throwArgumentError("invalid rlp data","data",e)}return t.result}t.decode=d},{"./_version":84,"@ethersproject/bytes":31,"@ethersproject/logger":55}],86:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="sha2/5.5.0"},{}],87:[function(e,r,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.computeHmac=t.sha512=t.sha256=t.ripemd160=void 0;var i=n(e("hash.js"));var o=e("@ethersproject/bytes");var a=e("./types");var s=e("@ethersproject/logger");var u=e("./_version");var c=new s.Logger(u.version);function f(e){return"0x"+i.default.ripemd160().update((0,o.arrayify)(e)).digest("hex")}t.ripemd160=f;function l(e){return"0x"+i.default.sha256().update((0,o.arrayify)(e)).digest("hex")}t.sha256=l;function h(e){return"0x"+i.default.sha512().update((0,o.arrayify)(e)).digest("hex")}t.sha512=h;function d(e,r,t){if(!a.SupportedAlgorithm[e]){c.throwError("unsupported algorithm "+e,s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e})}return"0x"+i.default.hmac(i.default[e],(0,o.arrayify)(r)).update((0,o.arrayify)(t)).digest("hex")}t.computeHmac=d},{"./_version":86,"./types":89,"@ethersproject/bytes":31,"@ethersproject/logger":55,"hash.js":242}],88:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SupportedAlgorithm=t.sha512=t.sha256=t.ripemd160=t.computeHmac=void 0;var n=e("./sha2");Object.defineProperty(t,"computeHmac",{enumerable:true,get:function(){return n.computeHmac}});Object.defineProperty(t,"ripemd160",{enumerable:true,get:function(){return n.ripemd160}});Object.defineProperty(t,"sha256",{enumerable:true,get:function(){return n.sha256}});Object.defineProperty(t,"sha512",{enumerable:true,get:function(){return n.sha512}});var i=e("./types");Object.defineProperty(t,"SupportedAlgorithm",{enumerable:true,get:function(){return i.SupportedAlgorithm}})},{"./sha2":87,"./types":89}],89:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SupportedAlgorithm=void 0;var n;(function(e){e["sha256"]="sha256";e["sha512"]="sha512"})(n=t.SupportedAlgorithm||(t.SupportedAlgorithm={}))},{}],90:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="signing-key/5.5.0"},{}],91:[function(e,r,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.EC=void 0;var i=n(e("elliptic"));var o=i.default.ec;t.EC=o},{elliptic:204}],92:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.computePublicKey=t.recoverPublicKey=t.SigningKey=void 0;var n=e("./elliptic");var i=e("@ethersproject/bytes");var o=e("@ethersproject/properties");var a=e("@ethersproject/logger");var s=e("./_version");var u=new a.Logger(s.version);var c=null;function f(){if(!c){c=new n.EC("secp256k1")}return c}var l=function(){function e(e){(0,o.defineReadOnly)(this,"curve","secp256k1");(0,o.defineReadOnly)(this,"privateKey",(0,i.hexlify)(e));var r=f().keyFromPrivate((0,i.arrayify)(this.privateKey));(0,o.defineReadOnly)(this,"publicKey","0x"+r.getPublic(false,"hex"));(0,o.defineReadOnly)(this,"compressedPublicKey","0x"+r.getPublic(true,"hex"));(0,o.defineReadOnly)(this,"_isSigningKey",true)}e.prototype._addPoint=function(e){var r=f().keyFromPublic((0,i.arrayify)(this.publicKey));var t=f().keyFromPublic((0,i.arrayify)(e));return"0x"+r.pub.add(t.pub).encodeCompressed("hex")};e.prototype.signDigest=function(e){var r=f().keyFromPrivate((0,i.arrayify)(this.privateKey));var t=(0,i.arrayify)(e);if(t.length!==32){u.throwArgumentError("bad digest length","digest",e)}var n=r.sign(t,{canonical:true});return(0,i.splitSignature)({recoveryParam:n.recoveryParam,r:(0,i.hexZeroPad)("0x"+n.r.toString(16),32),s:(0,i.hexZeroPad)("0x"+n.s.toString(16),32)})};e.prototype.computeSharedSecret=function(e){var r=f().keyFromPrivate((0,i.arrayify)(this.privateKey));var t=f().keyFromPublic((0,i.arrayify)(d(e)));return(0,i.hexZeroPad)("0x"+r.derive(t.getPublic()).toString(16),32)};e.isSigningKey=function(e){return!!(e&&e._isSigningKey)};return e}();t.SigningKey=l;function h(e,r){var t=(0,i.splitSignature)(r);var n={r:(0,i.arrayify)(t.r),s:(0,i.arrayify)(t.s)};return"0x"+f().recoverPubKey((0,i.arrayify)(e),n,t.recoveryParam).encode("hex",false)}t.recoverPublicKey=h;function d(e,r){var t=(0,i.arrayify)(e);if(t.length===32){var n=new l(t);if(r){return"0x"+f().keyFromPrivate(t).getPublic(true,"hex")}return n.publicKey}else if(t.length===33){if(r){return(0,i.hexlify)(t)}return"0x"+f().keyFromPublic(t).getPublic(false,"hex")}else if(t.length===65){if(!r){return(0,i.hexlify)(t)}return"0x"+f().keyFromPublic(t).getPublic(true,"hex")}return u.throwArgumentError("invalid public or private key","key","[REDACTED]")}t.computePublicKey=d},{"./_version":90,"./elliptic":91,"@ethersproject/bytes":31,"@ethersproject/logger":55,"@ethersproject/properties":61}],93:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="solidity/5.5.0"},{}],94:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.sha256=t.keccak256=t.pack=void 0;var u=e("@ethersproject/bignumber");var c=e("@ethersproject/bytes");var n=e("@ethersproject/keccak256");var i=e("@ethersproject/sha2");var f=e("@ethersproject/strings");var l=new RegExp("^bytes([0-9]+)$");var h=new RegExp("^(u?int)([0-9]*)$");var d=new RegExp("^(.*)\\[([0-9]*)\\]$");var p="0000000000000000000000000000000000000000000000000000000000000000";var o=e("@ethersproject/logger");var a=e("./_version");var v=new o.Logger(a.version);function b(e,r,t){switch(e){case"address":if(t){return(0,c.zeroPad)(r,32)}return(0,c.arrayify)(r);case"string":return(0,f.toUtf8Bytes)(r);case"bytes":return(0,c.arrayify)(r);case"bool":r=r?"0x01":"0x00";if(t){return(0,c.zeroPad)(r,32)}return(0,c.arrayify)(r)}var n=e.match(h);if(n){var i=parseInt(n[2]||"256");if(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256){v.throwArgumentError("invalid number type","type",e)}if(t){i=256}r=u.BigNumber.from(r).toTwos(i);return(0,c.zeroPad)(r,i/8)}n=e.match(l);if(n){var i=parseInt(n[1]);if(String(i)!==n[1]||i===0||i>32){v.throwArgumentError("invalid bytes type","type",e)}if((0,c.arrayify)(r).byteLength!==i){v.throwArgumentError("invalid value for "+e,"value",r)}if(t){return(0,c.arrayify)((r+p).substring(0,66))}return r}n=e.match(d);if(n&&Array.isArray(r)){var o=n[1];var a=parseInt(n[2]||String(r.length));if(a!=r.length){v.throwArgumentError("invalid array length for "+e,"value",r)}var s=[];r.forEach(function(e){s.push(b(o,e,true))});return(0,c.concat)(s)}return v.throwArgumentError("invalid type","type",e)}function s(e,t){if(e.length!=t.length){v.throwArgumentError("wrong number of values; expected ${ types.length }","values",t)}var n=[];e.forEach(function(e,r){n.push(b(e,t[r]))});return(0,c.hexlify)((0,c.concat)(n))}t.pack=s;function g(e,r){return(0,n.keccak256)(s(e,r))}t.keccak256=g;function m(e,r){return(0,i.sha256)(s(e,r))}t.sha256=m},{"./_version":93,"@ethersproject/bignumber":29,"@ethersproject/bytes":31,"@ethersproject/keccak256":53,"@ethersproject/logger":55,"@ethersproject/sha2":88,"@ethersproject/strings":98}],95:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="strings/5.5.0"},{}],96:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.parseBytes32String=t.formatBytes32String=void 0;var n=e("@ethersproject/constants");var i=e("@ethersproject/bytes");var o=e("./utf8");function a(e){var r=(0,o.toUtf8Bytes)(e);if(r.length>31){throw new Error("bytes32 string must be less than 32 bytes")}return(0,i.hexlify)((0,i.concat)([r,n.HashZero]).slice(0,32))}t.formatBytes32String=a;function s(e){var r=(0,i.arrayify)(e);if(r.length!==32){throw new Error("invalid bytes32 - not 32 bytes long")}if(r[31]!==0){throw new Error("invalid bytes32 string - no null terminator")}var t=31;while(r[t-1]===0){t--}return(0,o.toUtf8String)(r.slice(0,t))}t.parseBytes32String=s},{"./utf8":99,"@ethersproject/bytes":31,"@ethersproject/constants":35}],97:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.nameprep=t._nameprepTableC=t._nameprepTableB2=t._nameprepTableA1=void 0;var n=e("./utf8");function i(e){if(e.length%4!==0){throw new Error("bad data")}var r=[];for(var t=0;t<e.length;t+=4){r.push(parseInt(e.substring(t,t+4),16))}return r}function o(e,t){if(!t){t=function(e){return[parseInt(e,16)]}}var n=0;var i={};e.split(",").forEach(function(e){var r=e.split(":");n+=parseInt(r[0],16);i[n]=t(r[1])});return i}function a(e){var n=0;return e.split(",").map(function(e){var r=e.split("-");if(r.length===1){r[1]="0"}else if(r[1]===""){r[1]="1"}var t=n+parseInt(r[0],16);n=parseInt(r[1],16);return{l:t,h:n}})}function s(e,r){var t=0;for(var n=0;n<r.length;n++){var i=r[n];t+=i.l;if(e>=t&&e<=t+i.h&&(e-t)%(i.d||1)===0){if(i.e&&i.e.indexOf(e-t)!==-1){continue}return i}}return null}var u=a("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d");var c="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(function(e){return parseInt(e,16)});var f=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}];var l=o("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3");var h=o("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7");var d=o("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",i);var p=a("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function v(e){return e.reduce(function(r,e){e.forEach(function(e){r.push(e)});return r},[])}function b(e){return!!s(e,u)}t._nameprepTableA1=b;function g(e){var r=s(e,f);if(r){return[e+r.s]}var t=l[e];if(t){return t}var n=h[e];if(n){return[e+n[0]]}var i=d[e];if(i){return i}return null}t._nameprepTableB2=g;function m(e){return!!s(e,p)}t._nameprepTableC=m;function y(e){if(e.match(/^[a-z0-9-]*$/i)&&e.length<=59){return e.toLowerCase()}var r=(0,n.toUtf8CodePoints)(e);r=v(r.map(function(e){if(c.indexOf(e)>=0){return[]}if(e>=65024&&e<=65039){return[]}var r=g(e);if(r){return r}return[e]}));r=(0,n.toUtf8CodePoints)((0,n._toUtf8String)(r),n.UnicodeNormalizationForm.NFKC);r.forEach(function(e){if(m(e)){throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}});r.forEach(function(e){if(b(e)){throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}});var t=(0,n._toUtf8String)(r);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-"){throw new Error("invalid hyphen")}if(t.length>63){throw new Error("too long")}return t}t.nameprep=y},{"./utf8":99}],98:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.nameprep=t.parseBytes32String=t.formatBytes32String=t.UnicodeNormalizationForm=t.Utf8ErrorReason=t.Utf8ErrorFuncs=t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t._toEscapedUtf8String=void 0;var n=e("./bytes32");Object.defineProperty(t,"formatBytes32String",{enumerable:true,get:function(){return n.formatBytes32String}});Object.defineProperty(t,"parseBytes32String",{enumerable:true,get:function(){return n.parseBytes32String}});var i=e("./idna");Object.defineProperty(t,"nameprep",{enumerable:true,get:function(){return i.nameprep}});var o=e("./utf8");Object.defineProperty(t,"_toEscapedUtf8String",{enumerable:true,get:function(){return o._toEscapedUtf8String}});Object.defineProperty(t,"toUtf8Bytes",{enumerable:true,get:function(){return o.toUtf8Bytes}});Object.defineProperty(t,"toUtf8CodePoints",{enumerable:true,get:function(){return o.toUtf8CodePoints}});Object.defineProperty(t,"toUtf8String",{enumerable:true,get:function(){return o.toUtf8String}});Object.defineProperty(t,"UnicodeNormalizationForm",{enumerable:true,get:function(){return o.UnicodeNormalizationForm}});Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:true,get:function(){return o.Utf8ErrorFuncs}});Object.defineProperty(t,"Utf8ErrorReason",{enumerable:true,get:function(){return o.Utf8ErrorReason}})},{"./bytes32":96,"./idna":97,"./utf8":99}],99:[function(e,r,f){"use strict";Object.defineProperty(f,"__esModule",{value:true});f.toUtf8CodePoints=f.toUtf8String=f._toUtf8String=f._toEscapedUtf8String=f.toUtf8Bytes=f.Utf8ErrorFuncs=f.Utf8ErrorReason=f.UnicodeNormalizationForm=void 0;var l=e("@ethersproject/bytes");var t=e("@ethersproject/logger");var n=e("./_version");var s=new t.Logger(n.version);var u;(function(e){e["current"]="";e["NFC"]="NFC";e["NFD"]="NFD";e["NFKC"]="NFKC";e["NFKD"]="NFKD"})(u=f.UnicodeNormalizationForm||(f.UnicodeNormalizationForm={}));var h;(function(e){e["UNEXPECTED_CONTINUE"]="unexpected continuation byte";e["BAD_PREFIX"]="bad codepoint prefix";e["OVERRUN"]="string overrun";e["MISSING_CONTINUE"]="missing continuation byte";e["OUT_OF_RANGE"]="out of UTF-8 range";e["UTF16_SURROGATE"]="UTF-16 surrogate";e["OVERLONG"]="overlong representation"})(h=f.Utf8ErrorReason||(f.Utf8ErrorReason={}));function i(e,r,t,n,i){return s.throwArgumentError("invalid codepoint at offset "+r+"; "+e,"bytes",t)}function o(e,r,t,n,i){if(e===h.BAD_PREFIX||e===h.UNEXPECTED_CONTINUE){var o=0;for(var a=r+1;a<t.length;a++){if(t[a]>>6!==2){break}o++}return o}if(e===h.OVERRUN){return t.length-r-1}return 0}function a(e,r,t,n,i){if(e===h.OVERLONG){n.push(i);return 0}n.push(65533);return o(e,r,t,n,i)}f.Utf8ErrorFuncs=Object.freeze({error:i,ignore:o,replace:a});function c(e,r){if(r==null){r=f.Utf8ErrorFuncs.error}e=(0,l.arrayify)(e);var t=[];var n=0;while(n<e.length){var i=e[n++];if(i>>7===0){t.push(i);continue}var o=null;var a=null;if((i&224)===192){o=1;a=127}else if((i&240)===224){o=2;a=2047}else if((i&248)===240){o=3;a=65535}else{if((i&192)===128){n+=r(h.UNEXPECTED_CONTINUE,n-1,e,t)}else{n+=r(h.BAD_PREFIX,n-1,e,t)}continue}if(n-1+o>=e.length){n+=r(h.OVERRUN,n-1,e,t);continue}var s=i&(1<<8-o-1)-1;for(var u=0;u<o;u++){var c=e[n];if((c&192)!=128){n+=r(h.MISSING_CONTINUE,n,e,t);s=null;break}s=s<<6|c&63;n++}if(s===null){continue}if(s>1114111){n+=r(h.OUT_OF_RANGE,n-1-o,e,t,s);continue}if(s>=55296&&s<=57343){n+=r(h.UTF16_SURROGATE,n-1-o,e,t,s);continue}if(s<=a){n+=r(h.OVERLONG,n-1-o,e,t,s);continue}t.push(s)}return t}function d(e,r){if(r===void 0){r=u.current}if(r!=u.current){s.checkNormalize();e=e.normalize(r)}var t=[];for(var n=0;n<e.length;n++){var i=e.charCodeAt(n);if(i<128){t.push(i)}else if(i<2048){t.push(i>>6|192);t.push(i&63|128)}else if((i&64512)==55296){n++;var o=e.charCodeAt(n);if(n>=e.length||(o&64512)!==56320){throw new Error("invalid utf-8 string")}var a=65536+((i&1023)<<10)+(o&1023);t.push(a>>18|240);t.push(a>>12&63|128);t.push(a>>6&63|128);t.push(a&63|128)}else{t.push(i>>12|224);t.push(i>>6&63|128);t.push(i&63|128)}}return(0,l.arrayify)(t)}f.toUtf8Bytes=d;function p(e){var r="0000"+e.toString(16);return"\\u"+r.substring(r.length-4)}function v(e,r){return'"'+c(e,r).map(function(e){if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(e>=32&&e<127){return String.fromCharCode(e)}}if(e<=65535){return p(e)}e-=65536;return p((e>>10&1023)+55296)+p((e&1023)+56320)}).join("")+'"'}f._toEscapedUtf8String=v;function b(e){return e.map(function(e){if(e<=65535){return String.fromCharCode(e)}e-=65536;return String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320)}).join("")}f._toUtf8String=b;function g(e,r){return b(c(e,r))}f.toUtf8String=g;function m(e,r){if(r===void 0){r=u.current}return c(d(e,r))}f.toUtf8CodePoints=m},{"./_version":95,"@ethersproject/bytes":31,"@ethersproject/logger":55}],100:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="transactions/5.5.0"},{}],101:[function(e,r,t){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,r,t,n){if(n===undefined)n=t;Object.defineProperty(e,n,{enumerable:true,get:function(){return r[t]}})}:function(e,r,t,n){if(n===undefined)n=t;e[n]=r[t]});var i=this&&this.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:true,value:r})}:function(e,r){e["default"]=r});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(t!=="default"&&Object.prototype.hasOwnProperty.call(e,t))n(r,e,t);i(r,e);return r};Object.defineProperty(t,"__esModule",{value:true});t.parse=t.serialize=t.accessListify=t.recoverAddress=t.computeAddress=t.TransactionTypes=void 0;var a=e("@ethersproject/address");var s=e("@ethersproject/bignumber");var u=e("@ethersproject/bytes");var c=e("@ethersproject/constants");var f=e("@ethersproject/keccak256");var l=e("@ethersproject/properties");var h=o(e("@ethersproject/rlp"));var d=e("@ethersproject/signing-key");var p=e("@ethersproject/logger");var v=e("./_version");var b=new p.Logger(v.version);var g;(function(e){e[e["legacy"]=0]="legacy";e[e["eip2930"]=1]="eip2930";e[e["eip1559"]=2]="eip1559"})(g=t.TransactionTypes||(t.TransactionTypes={}));function m(e){if(e==="0x"){return null}return(0,a.getAddress)(e)}function y(e){if(e==="0x"){return c.Zero}return s.BigNumber.from(e)}var w=[{name:"nonce",maxLength:32,numeric:true},{name:"gasPrice",maxLength:32,numeric:true},{name:"gasLimit",maxLength:32,numeric:true},{name:"to",length:20},{name:"value",maxLength:32,numeric:true},{name:"data"}];var _={chainId:true,data:true,gasLimit:true,gasPrice:true,nonce:true,to:true,type:true,value:true};function S(e){var r=(0,d.computePublicKey)(e);return(0,a.getAddress)((0,u.hexDataSlice)((0,f.keccak256)((0,u.hexDataSlice)(r,1)),12))}t.computeAddress=S;function A(e,r){return S((0,d.recoverPublicKey)((0,u.arrayify)(e),r))}t.recoverAddress=A;function E(e,r){var t=(0,u.stripZeros)(s.BigNumber.from(e).toHexString());if(t.length>32){b.throwArgumentError("invalid length for "+r,"transaction:"+r,e)}return t}function M(t,e){return{address:(0,a.getAddress)(t),storageKeys:(e||[]).map(function(e,r){if((0,u.hexDataLength)(e)!==32){b.throwArgumentError("invalid access list storageKey","accessList["+t+":"+r+"]",e)}return e.toLowerCase()})}}function P(t){if(Array.isArray(t)){return t.map(function(e,r){if(Array.isArray(e)){if(e.length>2){b.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value["+r+"]",e)}return M(e[0],e[1])}return M(e.address,e.storageKeys)})}var e=Object.keys(t).map(function(e){var r=t[e].reduce(function(e,r){e[r]=true;return e},{});return M(e,Object.keys(r).sort())});e.sort(function(e,r){return e.address.localeCompare(r.address)});return e}t.accessListify=P;function T(e){return P(e).map(function(e){return[e.address,e.storageKeys]})}function k(e,r){if(e.gasPrice!=null){var t=s.BigNumber.from(e.gasPrice);var n=s.BigNumber.from(e.maxFeePerGas||0);if(!t.eq(n)){b.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:t,maxFeePerGas:n})}}var i=[E(e.chainId||0,"chainId"),E(e.nonce||0,"nonce"),E(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),E(e.maxFeePerGas||0,"maxFeePerGas"),E(e.gasLimit||0,"gasLimit"),e.to!=null?(0,a.getAddress)(e.to):"0x",E(e.value||0,"value"),e.data||"0x",T(e.accessList||[])];if(r){var o=(0,u.splitSignature)(r);i.push(E(o.recoveryParam,"recoveryParam"));i.push((0,u.stripZeros)(o.r));i.push((0,u.stripZeros)(o.s))}return(0,u.hexConcat)(["0x02",h.encode(i)])}function O(e,r){var t=[E(e.chainId||0,"chainId"),E(e.nonce||0,"nonce"),E(e.gasPrice||0,"gasPrice"),E(e.gasLimit||0,"gasLimit"),e.to!=null?(0,a.getAddress)(e.to):"0x",E(e.value||0,"value"),e.data||"0x",T(e.accessList||[])];if(r){var n=(0,u.splitSignature)(r);t.push(E(n.recoveryParam,"recoveryParam"));t.push((0,u.stripZeros)(n.r));t.push((0,u.stripZeros)(n.s))}return(0,u.hexConcat)(["0x01",h.encode(t)])}function B(n,e){(0,l.checkProperties)(n,_);var i=[];w.forEach(function(e){var r=n[e.name]||[];var t={};if(e.numeric){t.hexPad="left"}r=(0,u.arrayify)((0,u.hexlify)(r,t));if(e.length&&r.length!==e.length&&r.length>0){b.throwArgumentError("invalid length for "+e.name,"transaction:"+e.name,r)}if(e.maxLength){r=(0,u.stripZeros)(r);if(r.length>e.maxLength){b.throwArgumentError("invalid length for "+e.name,"transaction:"+e.name,r)}}i.push((0,u.hexlify)(r))});var r=0;if(n.chainId!=null){r=n.chainId;if(typeof r!=="number"){b.throwArgumentError("invalid transaction.chainId","transaction",n)}}else if(e&&!(0,u.isBytesLike)(e)&&e.v>28){r=Math.floor((e.v-35)/2)}if(r!==0){i.push((0,u.hexlify)(r));i.push("0x");i.push("0x")}if(!e){return h.encode(i)}var t=(0,u.splitSignature)(e);var o=27+t.recoveryParam;if(r!==0){i.pop();i.pop();i.pop();o+=r*2+8;if(t.v>28&&t.v!==o){b.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)}}else if(t.v!==o){b.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)}i.push((0,u.hexlify)(o));i.push((0,u.stripZeros)((0,u.arrayify)(t.r)));i.push((0,u.stripZeros)((0,u.arrayify)(t.s)));return h.encode(i)}function C(e,r){if(e.type==null||e.type===0){if(e.accessList!=null){b.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e)}return B(e,r)}switch(e.type){case 1:return O(e,r);case 2:return k(e,r);default:break}return b.throwError("unsupported transaction type: "+e.type,p.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})}t.serialize=C;function R(e,r,t){try{var n=y(r[0]).toNumber();if(n!==0&&n!==1){throw new Error("bad recid")}e.v=n}catch(e){b.throwArgumentError("invalid v for transaction type: 1","v",r[0])}e.r=(0,u.hexZeroPad)(r[1],32);e.s=(0,u.hexZeroPad)(r[2],32);try{var i=(0,f.keccak256)(t(e));e.from=A(i,{r:e.r,s:e.s,recoveryParam:e.v})}catch(e){console.log(e)}}function L(e){var r=h.decode(e.slice(1));if(r.length!==9&&r.length!==12){b.throwArgumentError("invalid component count for transaction type: 2","payload",(0,u.hexlify)(e))}var t=y(r[2]);var n=y(r[3]);var i={type:2,chainId:y(r[0]).toNumber(),nonce:y(r[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:n,gasPrice:null,gasLimit:y(r[4]),to:m(r[5]),value:y(r[6]),data:r[7],accessList:P(r[8])};if(r.length===9){return i}i.hash=(0,f.keccak256)(e);R(i,r.slice(9),k);return i}function F(e){var r=h.decode(e.slice(1));if(r.length!==8&&r.length!==11){b.throwArgumentError("invalid component count for transaction type: 1","payload",(0,u.hexlify)(e))}var t={type:1,chainId:y(r[0]).toNumber(),nonce:y(r[1]).toNumber(),gasPrice:y(r[2]),gasLimit:y(r[3]),to:m(r[4]),value:y(r[5]),data:r[6],accessList:P(r[7])};if(r.length===8){return t}t.hash=(0,f.keccak256)(e);R(t,r.slice(8),O);return t}function j(e){var r=h.decode(e);if(r.length!==9&&r.length!==6){b.throwArgumentError("invalid raw transaction","rawTransaction",e)}var t={nonce:y(r[0]).toNumber(),gasPrice:y(r[1]),gasLimit:y(r[2]),to:m(r[3]),value:y(r[4]),data:r[5],chainId:0};if(r.length===6){return t}try{t.v=s.BigNumber.from(r[6]).toNumber()}catch(e){console.log(e);return t}t.r=(0,u.hexZeroPad)(r[7],32);t.s=(0,u.hexZeroPad)(r[8],32);if(s.BigNumber.from(t.r).isZero()&&s.BigNumber.from(t.s).isZero()){t.chainId=t.v;t.v=0}else{t.chainId=Math.floor((t.v-35)/2);if(t.chainId<0){t.chainId=0}var n=t.v-27;var i=r.slice(0,6);if(t.chainId!==0){i.push((0,u.hexlify)(t.chainId));i.push("0x");i.push("0x");n-=t.chainId*2+8}var o=(0,f.keccak256)(h.encode(i));try{t.from=A(o,{r:(0,u.hexlify)(t.r),s:(0,u.hexlify)(t.s),recoveryParam:n})}catch(e){console.log(e)}t.hash=(0,f.keccak256)(e)}t.type=null;return t}function x(e){var r=(0,u.arrayify)(e);if(r[0]>127){return j(r)}switch(r[0]){case 1:return F(r);case 2:return L(r);default:break}return b.throwError("unsupported transaction type: "+r[0],p.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:r[0]})}t.parse=x},{"./_version":100,"@ethersproject/address":22,"@ethersproject/bignumber":29,"@ethersproject/bytes":31,"@ethersproject/constants":35,"@ethersproject/keccak256":53,"@ethersproject/logger":55,"@ethersproject/properties":61,"@ethersproject/rlp":85,"@ethersproject/signing-key":92}],102:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="units/5.5.0"},{}],103:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.parseEther=t.formatEther=t.parseUnits=t.formatUnits=t.commify=void 0;var n=e("@ethersproject/bignumber");var i=e("@ethersproject/logger");var o=e("./_version");var s=new i.Logger(o.version);var a=["wei","kwei","mwei","gwei","szabo","finney","ether"];function u(e){var r=String(e).split(".");if(r.length>2||!r[0].match(/^-?[0-9]*$/)||r[1]&&!r[1].match(/^[0-9]*$/)||e==="."||e==="-."){s.throwArgumentError("invalid value","value",e)}var t=r[0];var n="";if(t.substring(0,1)==="-"){n="-";t=t.substring(1)}while(t.substring(0,1)==="0"){t=t.substring(1)}if(t===""){t="0"}var i="";if(r.length===2){i="."+(r[1]||"0")}while(i.length>2&&i[i.length-1]==="0"){i=i.substring(0,i.length-1)}var o=[];while(t.length){if(t.length<=3){o.unshift(t);break}else{var a=t.length-3;o.unshift(t.substring(a));t=t.substring(0,a)}}return n+o.join(",")+i}t.commify=u;function c(e,r){if(typeof r==="string"){var t=a.indexOf(r);if(t!==-1){r=3*t}}return(0,n.formatFixed)(e,r!=null?r:18)}t.formatUnits=c;function f(e,r){if(typeof e!=="string"){s.throwArgumentError("value must be a string","value",e)}if(typeof r==="string"){var t=a.indexOf(r);if(t!==-1){r=3*t}}return(0,n.parseFixed)(e,r!=null?r:18)}t.parseUnits=f;function l(e){return c(e,18)}t.formatEther=l;function h(e){return f(e,18)}t.parseEther=h},{"./_version":102,"@ethersproject/bignumber":29,"@ethersproject/logger":55}],104:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="wallet/5.5.0"},{}],105:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();var a=this&&this.__awaiter||function(e,a,t,s){function u(r){return r instanceof t?r:new t(function(e){e(r)})}return new(t||(t=Promise))(function(r,t){function n(e){try{o(s.next(e))}catch(e){t(e)}}function i(e){try{o(s["throw"](e))}catch(e){t(e)}}function o(e){e.done?r(e.value):u(e.value).then(n,i)}o((s=s.apply(e,a||[])).next())})};var s=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(e){return u([r,e])}}function u(r){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(a=r[0]&2?o["return"]:r[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;if(o=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;o=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){n.label=r[1];break}if(r[0]===6&&n.label<a[1]){n.label=a[1];a=r;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(r);break}if(a[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];o=0}finally{i=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};Object.defineProperty(t,"__esModule",{value:true});t.verifyTypedData=t.verifyMessage=t.Wallet=void 0;var l=e("@ethersproject/address");var h=e("@ethersproject/abstract-provider");var i=e("@ethersproject/abstract-signer");var u=e("@ethersproject/bytes");var d=e("@ethersproject/hash");var p=e("@ethersproject/hdnode");var o=e("@ethersproject/keccak256");var v=e("@ethersproject/properties");var b=e("@ethersproject/random");var g=e("@ethersproject/signing-key");var m=e("@ethersproject/json-wallets");var y=e("@ethersproject/transactions");var w=e("@ethersproject/logger");var c=e("./_version");var _=new w.Logger(c.version);function S(e){return e!=null&&(0,u.isHexString)(e.privateKey,32)&&e.address!=null}function A(e){var r=e.mnemonic;return r&&r.phrase}var f=function(c){n(f,c);function f(e,r){var t=this.constructor;var n=this;_.checkNew(t,f);n=c.call(this)||this;if(S(e)){var i=new g.SigningKey(e.privateKey);(0,v.defineReadOnly)(n,"_signingKey",function(){return i});(0,v.defineReadOnly)(n,"address",(0,y.computeAddress)(n.publicKey));if(n.address!==(0,l.getAddress)(e.address)){_.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]")}if(A(e)){var o=e.mnemonic;(0,v.defineReadOnly)(n,"_mnemonic",function(){return{phrase:o.phrase,path:o.path||p.defaultPath,locale:o.locale||"en"}});var a=n.mnemonic;var s=p.HDNode.fromMnemonic(a.phrase,null,a.locale).derivePath(a.path);if((0,y.computeAddress)(s.privateKey)!==n.address){_.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}}else{(0,v.defineReadOnly)(n,"_mnemonic",function(){return null})}}else{if(g.SigningKey.isSigningKey(e)){if(e.curve!=="secp256k1"){_.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]")}(0,v.defineReadOnly)(n,"_signingKey",function(){return e})}else{if(typeof e==="string"){if(e.match(/^[0-9a-f]*$/i)&&e.length===64){e="0x"+e}}var u=new g.SigningKey(e);(0,v.defineReadOnly)(n,"_signingKey",function(){return u})}(0,v.defineReadOnly)(n,"_mnemonic",function(){return null});(0,v.defineReadOnly)(n,"address",(0,y.computeAddress)(n.publicKey))}if(r&&!h.Provider.isProvider(r)){_.throwArgumentError("invalid provider","provider",r)}(0,v.defineReadOnly)(n,"provider",r||null);return n}Object.defineProperty(f.prototype,"mnemonic",{get:function(){return this._mnemonic()},enumerable:false,configurable:true});Object.defineProperty(f.prototype,"privateKey",{get:function(){return this._signingKey().privateKey},enumerable:false,configurable:true});Object.defineProperty(f.prototype,"publicKey",{get:function(){return this._signingKey().publicKey},enumerable:false,configurable:true});f.prototype.getAddress=function(){return Promise.resolve(this.address)};f.prototype.connect=function(e){return new f(this,e)};f.prototype.signTransaction=function(t){var n=this;return(0,v.resolveProperties)(t).then(function(e){if(e.from!=null){if((0,l.getAddress)(e.from)!==n.address){_.throwArgumentError("transaction from address mismatch","transaction.from",t.from)}delete e.from}var r=n._signingKey().signDigest((0,o.keccak256)((0,y.serialize)(e)));return(0,y.serialize)(e,r)})};f.prototype.signMessage=function(r){return a(this,void 0,void 0,function(){return s(this,function(e){return[2,(0,u.joinSignature)(this._signingKey().signDigest((0,d.hashMessage)(r)))]})})};f.prototype._signTypedData=function(n,i,o){return a(this,void 0,void 0,function(){var r;var t=this;return s(this,function(e){switch(e.label){case 0:return[4,d._TypedDataEncoder.resolveNames(n,i,o,function(e){if(t.provider==null){_.throwError("cannot resolve ENS names without a provider",w.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:e})}return t.provider.resolveName(e)})];case 1:r=e.sent();return[2,(0,u.joinSignature)(this._signingKey().signDigest(d._TypedDataEncoder.hash(r.domain,i,r.value)))]}})})};f.prototype.encrypt=function(e,r,t){if(typeof r==="function"&&!t){t=r;r={}}if(t&&typeof t!=="function"){throw new Error("invalid callback")}if(!r){r={}}return(0,m.encryptKeystore)(this,e,r,t)};f.createRandom=function(e){var r=(0,b.randomBytes)(16);if(!e){e={}}if(e.extraEntropy){r=(0,u.arrayify)((0,u.hexDataSlice)((0,o.keccak256)((0,u.concat)([r,e.extraEntropy])),0,16))}var t=(0,p.entropyToMnemonic)(r,e.locale);return f.fromMnemonic(t,e.path,e.locale)};f.fromEncryptedJson=function(e,r,t){return(0,m.decryptJsonWallet)(e,r,t).then(function(e){return new f(e)})};f.fromEncryptedJsonSync=function(e,r){return new f((0,m.decryptJsonWalletSync)(e,r))};f.fromMnemonic=function(e,r,t){if(!r){r=p.defaultPath}return new f(p.HDNode.fromMnemonic(e,null,t).derivePath(r))};return f}(i.Signer);t.Wallet=f;function E(e,r){return(0,y.recoverAddress)((0,d.hashMessage)(e),r)}t.verifyMessage=E;function M(e,r,t,n){return(0,y.recoverAddress)(d._TypedDataEncoder.hash(e,r,t),n)}t.verifyTypedData=M},{"./_version":104,"@ethersproject/abstract-provider":18,"@ethersproject/abstract-signer":20,"@ethersproject/address":22,"@ethersproject/bytes":31,"@ethersproject/hash":41,"@ethersproject/hdnode":46,"@ethersproject/json-wallets":49,"@ethersproject/keccak256":53,"@ethersproject/logger":55,"@ethersproject/properties":61,"@ethersproject/random":82,"@ethersproject/signing-key":92,"@ethersproject/transactions":101}],106:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="web/5.5.1"},{}],107:[function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,a,t,s){function u(r){return r instanceof t?r:new t(function(e){e(r)})}return new(t||(t=Promise))(function(r,t){function n(e){try{o(s.next(e))}catch(e){t(e)}}function i(e){try{o(s["throw"](e))}catch(e){t(e)}}function o(e){e.done?r(e.value):u(e.value).then(n,i)}o((s=s.apply(e,a||[])).next())})};var s=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(e){return u([r,e])}}function u(r){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(a=r[0]&2?o["return"]:r[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;if(o=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;o=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){n.label=r[1];break}if(r[0]===6&&n.label<a[1]){n.label=a[1];a=r;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(r);break}if(a[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];o=0}finally{i=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};Object.defineProperty(t,"__esModule",{value:true});t.getUrl=void 0;var u=e("@ethersproject/bytes");function i(o,a){return n(this,void 0,void 0,function(){var r,t,n,i;return s(this,function(e){switch(e.label){case 0:if(a==null){a={}}r={method:a.method||"GET",headers:a.headers||{},body:a.body||undefined};if(a.skipFetchSetup!==true){r.mode="cors";r.cache="no-cache";r.credentials="same-origin";r.redirect="follow";r.referrer="client"};return[4,fetch(o,r)];case 1:t=e.sent();return[4,t.arrayBuffer()];case 2:n=e.sent();i={};if(t.headers.forEach){t.headers.forEach(function(e,r){i[r.toLowerCase()]=e})}else{t.headers.keys().forEach(function(e){i[e.toLowerCase()]=t.headers.get(e)})}return[2,{headers:i,statusCode:t.status,statusMessage:t.statusText,body:(0,u.arrayify)(new Uint8Array(n))}]}})})}t.getUrl=i},{"@ethersproject/bytes":31}],108:[function(e,r,t){"use strict";var l=this&&this.__awaiter||function(e,a,t,s){function u(r){return r instanceof t?r:new t(function(e){e(r)})}return new(t||(t=Promise))(function(r,t){function n(e){try{o(s.next(e))}catch(e){t(e)}}function i(e){try{o(s["throw"](e))}catch(e){t(e)}}function o(e){e.done?r(e.value):u(e.value).then(n,i)}o((s=s.apply(e,a||[])).next())})};var _=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(e){return u([r,e])}}function u(r){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(a=r[0]&2?o["return"]:r[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;if(o=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;o=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){n.label=r[1];break}if(r[0]===6&&n.label<a[1]){n.label=a[1];a=r;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(r);break}if(a[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];o=0}finally{i=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};Object.defineProperty(t,"__esModule",{value:true});t.poll=t.fetchJson=t._fetchData=void 0;var S=e("@ethersproject/base64");var n=e("@ethersproject/bytes");var s=e("@ethersproject/properties");var A=e("@ethersproject/strings");var E=e("@ethersproject/logger");var i=e("./_version");var M=new E.Logger(i.version);var P=e("./geturl");function T(r){return new Promise(function(e){setTimeout(e,r)})}function k(e,r){if(e==null){return null}if(typeof e==="string"){return e}if((0,n.isBytesLike)(e)){if(r&&(r.split("/")[0]==="text"||r.split(";")[0].trim()==="application/json")){try{return(0,A.toUtf8String)(e)}catch(e){}}return(0,n.hexlify)(e)}return e}function u(e,r,h){var d=typeof e==="object"&&e.throttleLimit!=null?e.throttleLimit:12;M.assertArgument(d>0&&d%1===0,"invalid connection throttle limit","connection.throttleLimit",d);var p=typeof e==="object"?e.throttleCallback:null;var v=typeof e==="object"&&typeof e.throttleSlotInterval==="number"?e.throttleSlotInterval:100;M.assertArgument(v>0&&v%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",v);var t={};var b=null;var g={method:"GET"};var m=false;var n=2*60*1e3;if(typeof e==="string"){b=e}else if(typeof e==="object"){if(e==null||e.url==null){M.throwArgumentError("missing URL","connection.url",e)}b=e.url;if(typeof e.timeout==="number"&&e.timeout>0){n=e.timeout}if(e.headers){for(var i in e.headers){t[i.toLowerCase()]={key:i,value:String(e.headers[i])};if(["if-none-match","if-modified-since"].indexOf(i.toLowerCase())>=0){m=true}}}g.allowGzip=!!e.allowGzip;if(e.user!=null&&e.password!=null){if(b.substring(0,6)!=="https:"&&e.allowInsecureAuthentication!==true){M.throwError("basic authentication requires a secure https url",E.Logger.errors.INVALID_ARGUMENT,{argument:"url",url:b,user:e.user,password:"[REDACTED]"})}var o=e.user+":"+e.password;t["authorization"]={key:"Authorization",value:"Basic "+(0,S.encode)((0,A.toUtf8Bytes)(o))}}}var a=new RegExp("^data:([a-z0-9-]+/[a-z0-9-]+);base64,(.*)$","i");var s=b?b.match(a):null;if(s){try{var u={statusCode:200,statusMessage:"OK",headers:{"content-type":s[1]},body:(0,S.decode)(s[2])};var c=u.body;if(h){c=h(u.body,u)}return Promise.resolve(c)}catch(e){M.throwError("processing response error",E.Logger.errors.SERVER_ERROR,{body:k(s[1],s[2]),error:e,requestBody:null,requestMethod:"GET",url:b})}}if(r){g.method="POST";g.body=r;if(t["content-type"]==null){t["content-type"]={key:"Content-Type",value:"application/octet-stream"}}if(t["content-length"]==null){t["content-length"]={key:"Content-Length",value:String(r.length)}}}var y={};Object.keys(t).forEach(function(e){var r=t[e];y[r.key]=r.value});g.headers=y;var w=function(){var t=null;var e=new Promise(function(e,r){if(n){t=setTimeout(function(){if(t==null){return}t=null;r(M.makeError("timeout",E.Logger.errors.TIMEOUT,{requestBody:k(g.body,y["content-type"]),requestMethod:g.method,timeout:n,url:b}))},n)}});var r=function(){if(t==null){return}clearTimeout(t);t=null};return{promise:e,cancel:r}}();var f=function(){return l(this,void 0,void 0,function(){var r,t,n,i,o,a,s,u,c,f,i,l;return _(this,function(e){switch(e.label){case 0:r=0;e.label=1;case 1:if(!(r<d))return[3,20];t=null;e.label=2;case 2:e.trys.push([2,9,,10]);return[4,(0,P.getUrl)(b,g)];case 3:t=e.sent();if(!(r<d))return[3,8];if(!(t.statusCode===301||t.statusCode===302))return[3,4];n=t.headers.location||"";if(g.method==="GET"&&n.match(/^https:/)){b=t.headers.location;return[3,19]}return[3,8];case 4:if(!(t.statusCode===429))return[3,8];i=true;if(!p)return[3,6];return[4,p(r,b)];case 5:i=e.sent();e.label=6;case 6:if(!i)return[3,8];o=0;a=t.headers["retry-after"];if(typeof a==="string"&&a.match(/^[1-9][0-9]*$/)){o=parseInt(a)*1e3}else{o=v*parseInt(String(Math.random()*Math.pow(2,r)))}return[4,T(o)];case 7:e.sent();return[3,19];case 8:return[3,10];case 9:s=e.sent();t=s.response;if(t==null){w.cancel();M.throwError("missing response",E.Logger.errors.SERVER_ERROR,{requestBody:k(g.body,y["content-type"]),requestMethod:g.method,serverError:s,url:b})}return[3,10];case 10:u=t.body;if(m&&t.statusCode===304){u=null}else if(t.statusCode<200||t.statusCode>=300){w.cancel();M.throwError("bad response",E.Logger.errors.SERVER_ERROR,{status:t.statusCode,headers:t.headers,body:k(u,t.headers?t.headers["content-type"]:null),requestBody:k(g.body,y["content-type"]),requestMethod:g.method,url:b})}if(!h)return[3,18];e.label=11;case 11:e.trys.push([11,13,,18]);return[4,h(u,t)];case 12:c=e.sent();w.cancel();return[2,c];case 13:f=e.sent();if(!(f.throttleRetry&&r<d))return[3,17];i=true;if(!p)return[3,15];return[4,p(r,b)];case 14:i=e.sent();e.label=15;case 15:if(!i)return[3,17];l=v*parseInt(String(Math.random()*Math.pow(2,r)));return[4,T(l)];case 16:e.sent();return[3,19];case 17:w.cancel();M.throwError("processing response error",E.Logger.errors.SERVER_ERROR,{body:k(u,t.headers?t.headers["content-type"]:null),error:f,requestBody:k(g.body,y["content-type"]),requestMethod:g.method,url:b});return[3,18];case 18:w.cancel();return[2,u];case 19:r++;return[3,1];case 20:return[2,M.throwError("failed response",E.Logger.errors.SERVER_ERROR,{requestBody:k(g.body,y["content-type"]),requestMethod:g.method,url:b})]}})})}();return Promise.race([w.promise,f])}t._fetchData=u;function o(e,r,n){var t=function(r,e){var t=null;if(r!=null){try{t=JSON.parse((0,A.toUtf8String)(r))}catch(e){M.throwError("invalid JSON",E.Logger.errors.SERVER_ERROR,{body:r,error:e})}}if(n){t=n(t,e)}return t};var i=null;if(r!=null){i=(0,A.toUtf8Bytes)(r);var o=typeof e==="string"?{url:e}:(0,s.shallowCopy)(e);if(o.headers){var a=Object.keys(o.headers).filter(function(e){return e.toLowerCase()==="content-type"}).length!==0;if(!a){o.headers=(0,s.shallowCopy)(o.headers);o.headers["content-type"]="application/json"}}else{o.headers={"content-type":"application/json"}}e=o}return u(e,i,t)}t.fetchJson=o;function a(r,c){if(!c){c={}}c=(0,s.shallowCopy)(c);if(c.floor==null){c.floor=0}if(c.ceiling==null){c.ceiling=1e4}if(c.interval==null){c.interval=250}return new Promise(function(t,n){var e=null;var i=false;var o=function(){if(i){return false}i=true;if(e){clearTimeout(e)}return true};if(c.timeout){e=setTimeout(function(){if(o()){n(new Error("timeout"))}},c.timeout)}var a=c.retryLimit;var s=0;function u(){return r().then(function(e){if(e!==undefined){if(o()){t(e)}}else if(c.oncePoll){c.oncePoll.once("poll",u)}else if(c.onceBlock){c.onceBlock.once("block",u)}else if(!i){s++;if(s>a){if(o()){n(new Error("retry limit reached"))}return}var r=c.interval*parseInt(String(Math.random()*Math.pow(2,s)));if(r<c.floor){r=c.floor}if(r>c.ceiling){r=c.ceiling}setTimeout(u,r)}return null},function(e){if(o()){n(e)}})}u()})}t.poll=a},{"./_version":106,"./geturl":107,"@ethersproject/base64":24,"@ethersproject/bytes":31,"@ethersproject/logger":55,"@ethersproject/properties":61,"@ethersproject/strings":98}],109:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="wordlists/5.5.0"},{}],110:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.wordlists=t.Wordlist=t.logger=void 0;var n=e("./wordlist");Object.defineProperty(t,"logger",{enumerable:true,get:function(){return n.logger}});Object.defineProperty(t,"Wordlist",{enumerable:true,get:function(){return n.Wordlist}});var i=e("./wordlists");Object.defineProperty(t,"wordlists",{enumerable:true,get:function(){return i.wordlists}})},{"./wordlist":119,"./wordlists":120}],111:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(t,"__esModule",{value:true});t.langCz=void 0;var i=e("./wordlist");var o="AbdikaceAbecedaAdresaAgreseAkceAktovkaAlejAlkoholAmputaceAnanasAndulkaAnekdotaAnketaAntikaAnulovatArchaAroganceAsfaltAsistentAspiraceAstmaAstronomAtlasAtletikaAtolAutobusAzylBabkaBachorBacilBaculkaBadatelBagetaBagrBahnoBakterieBaladaBaletkaBalkonBalonekBalvanBalzaBambusBankomatBarbarBaretBarmanBarokoBarvaBaterkaBatohBavlnaBazalkaBazilikaBazukaBednaBeranBesedaBestieBetonBezinkaBezmocBeztakBicyklBidloBiftekBikinyBilanceBiografBiologBitvaBizonBlahobytBlatouchBlechaBleduleBleskBlikatBliznaBlokovatBlouditBludBobekBobrBodlinaBodnoutBohatostBojkotBojovatBokorysBolestBorecBoroviceBotaBoubelBouchatBoudaBouleBouratBoxerBradavkaBramboraBrankaBratrBreptaBriketaBrkoBrlohBronzBroskevBrunetkaBrusinkaBrzdaBrzyBublinaBubnovatBuchtaBuditelBudkaBudovaBufetBujarostBukviceBuldokBulvaBundaBunkrBurzaButikBuvolBuzolaBydletBylinaBytovkaBzukotCapartCarevnaCedrCeduleCejchCejnCelaCelerCelkemCelniceCeninaCennostCenovkaCentrumCenzorCestopisCetkaChalupaChapadloCharitaChataChechtatChemieChichotChirurgChladChlebaChlubitChmelChmuraChobotChocholChodbaCholeraChomoutChopitChorobaChovChrapotChrlitChrtChrupChtivostChudinaChutnatChvatChvilkaChvostChybaChystatChytitCibuleCigaretaCihelnaCihlaCinkotCirkusCisternaCitaceCitrusCizinecCizostClonaCokolivCouvatCtitelCtnostCudnostCuketaCukrCupotCvaknoutCvalCvikCvrkotCyklistaDalekoDarebaDatelDatumDceraDebataDechovkaDecibelDeficitDeflaceDeklDekretDemokratDepreseDerbyDeskaDetektivDikobrazDiktovatDiodaDiplomDiskDisplejDivadloDivochDlahaDlouhoDluhopisDnesDobroDobytekDocentDochutitDodnesDohledDohodaDohraDojemDojniceDokladDokolaDoktorDokumentDolarDolevaDolinaDomaDominantDomluvitDomovDonutitDopadDopisDoplnitDoposudDoprovodDopustitDorazitDorostDortDosahDoslovDostatekDosudDosytaDotazDotekDotknoutDoufatDoutnatDovozceDozaduDoznatDozorceDrahotaDrakDramatikDravecDrazeDrdolDrobnostDrogerieDrozdDrsnostDrtitDrzostDubenDuchovnoDudekDuhaDuhovkaDusitDusnoDutostDvojiceDvorecDynamitEkologEkonomieElektronElipsaEmailEmiseEmoceEmpatieEpizodaEpochaEpopejEposEsejEsenceEskortaEskymoEtiketaEuforieEvoluceExekuceExkurzeExpediceExplozeExportExtraktFackaFajfkaFakultaFanatikFantazieFarmacieFavoritFazoleFederaceFejetonFenkaFialkaFigurantFilozofFiltrFinanceFintaFixaceFjordFlanelFlirtFlotilaFondFosforFotbalFotkaFotonFrakceFreskaFrontaFukarFunkceFyzikaGalejeGarantGenetikaGeologGilotinaGlazuraGlejtGolemGolfistaGotikaGrafGramofonGranuleGrepGrilGrogGroteskaGumaHadiceHadrHalaHalenkaHanbaHanopisHarfaHarpunaHavranHebkostHejkalHejnoHejtmanHektarHelmaHematomHerecHernaHesloHezkyHistorikHladovkaHlasivkyHlavaHledatHlenHlodavecHlohHloupostHltatHlubinaHluchotaHmatHmotaHmyzHnisHnojivoHnoutHoblinaHobojHochHodinyHodlatHodnotaHodovatHojnostHokejHolinkaHolkaHolubHomoleHonitbaHonoraceHoralHordaHorizontHorkoHorlivecHormonHorninaHoroskopHorstvoHospodaHostinaHotovostHoubaHoufHoupatHouskaHovorHradbaHraniceHravostHrazdaHrbolekHrdinaHrdloHrdostHrnekHrobkaHromadaHrotHroudaHrozenHrstkaHrubostHryzatHubenostHubnoutHudbaHukotHumrHusitaHustotaHvozdHybnostHydrantHygienaHymnaHysterikIdylkaIhnedIkonaIluzeImunitaInfekceInflaceInkasoInovaceInspekceInternetInvalidaInvestorInzerceIronieJablkoJachtaJahodaJakmileJakostJalovecJantarJarmarkJaroJasanJasnoJatkaJavorJazykJedinecJedleJednatelJehlanJekotJelenJelitoJemnostJenomJepiceJeseterJevitJezdecJezeroJinakJindyJinochJiskraJistotaJitrniceJizvaJmenovatJogurtJurtaKabaretKabelKabinetKachnaKadetKadidloKahanKajakKajutaKakaoKaktusKalamitaKalhotyKalibrKalnostKameraKamkolivKamnaKanibalKanoeKantorKapalinaKapelaKapitolaKapkaKapleKapotaKaprKapustaKapybaraKaramelKarotkaKartonKasaKatalogKatedraKauceKauzaKavalecKazajkaKazetaKazivostKdekolivKdesiKedlubenKempKeramikaKinoKlacekKladivoKlamKlapotKlasikaKlaunKlecKlenbaKlepatKlesnoutKlidKlimaKlisnaKloboukKlokanKlopaKloubKlubovnaKlusatKluzkostKmenKmitatKmotrKnihaKnotKoaliceKoberecKobkaKoblihaKobylaKocourKohoutKojenecKokosKoktejlKolapsKoledaKolizeKoloKomandoKometaKomikKomnataKomoraKompasKomunitaKonatKonceptKondiceKonecKonfeseKongresKoninaKonkursKontaktKonzervaKopanecKopieKopnoutKoprovkaKorbelKorektorKormidloKoroptevKorpusKorunaKorytoKorzetKosatecKostkaKotelKotletaKotoulKoukatKoupelnaKousekKouzloKovbojKozaKozorohKrabiceKrachKrajinaKralovatKrasopisKravataKreditKrejcarKresbaKrevetaKriketKritikKrizeKrkavecKrmelecKrmivoKrocanKrokKronikaKropitKroupaKrovkaKrtekKruhadloKrupiceKrutostKrvinkaKrychleKryptaKrystalKrytKudlankaKufrKujnostKuklaKulajdaKulichKulkaKulometKulturaKunaKupodivuKurtKurzorKutilKvalitaKvasinkaKvestorKynologKyselinaKytaraKyticeKytkaKytovecKyvadloLabradorLachtanLadnostLaikLakomecLamelaLampaLanovkaLasiceLasoLasturaLatinkaLavinaLebkaLeckdyLedenLedniceLedovkaLedvinaLegendaLegieLegraceLehceLehkostLehnoutLektvarLenochodLentilkaLepenkaLepidloLetadloLetecLetmoLetokruhLevhartLevitaceLevobokLibraLichotkaLidojedLidskostLihovinaLijavecLilekLimetkaLinieLinkaLinoleumListopadLitinaLitovatLobistaLodivodLogikaLogopedLokalitaLoketLomcovatLopataLopuchLordLososLotrLoudalLouhLoukaLouskatLovecLstivostLucernaLuciferLumpLuskLustraceLviceLyraLyrikaLysinaMadamMadloMagistrMahagonMajetekMajitelMajoritaMakakMakoviceMakrelaMalbaMalinaMalovatMalviceMaminkaMandleMankoMarnostMasakrMaskotMasopustMaticeMatrikaMaturitaMazanecMazivoMazlitMazurkaMdlobaMechanikMeditaceMedovinaMelasaMelounMentolkaMetlaMetodaMetrMezeraMigraceMihnoutMihuleMikinaMikrofonMilenecMilimetrMilostMimikaMincovnaMinibarMinometMinulostMiskaMistrMixovatMladostMlhaMlhovinaMlokMlsatMluvitMnichMnohemMobilMocnostModelkaModlitbaMohylaMokroMolekulaMomentkaMonarchaMonoklMonstrumMontovatMonzunMosazMoskytMostMotivaceMotorkaMotykaMouchaMoudrostMozaikaMozekMozolMramorMravenecMrkevMrtvolaMrzetMrzutostMstitelMudrcMuflonMulatMumieMuniceMusetMutaceMuzeumMuzikantMyslivecMzdaNabouratNachytatNadaceNadbytekNadhozNadobroNadpisNahlasNahnatNahodileNahraditNaivitaNajednouNajistoNajmoutNaklonitNakonecNakrmitNalevoNamazatNamluvitNanometrNaokoNaopakNaostroNapadatNapevnoNaplnitNapnoutNaposledNaprostoNaroditNarubyNarychloNasaditNasekatNaslepoNastatNatolikNavenekNavrchNavzdoryNazvatNebeNechatNeckyNedalekoNedbatNeduhNegaceNehetNehodaNejenNejprveNeklidNelibostNemilostNemocNeochotaNeonkaNepokojNerostNervNesmyslNesouladNetvorNeuronNevinaNezvykleNicotaNijakNikamNikdyNiklNikterakNitroNoclehNohaviceNominaceNoraNorekNositelNosnostNouzeNovinyNovotaNozdraNudaNudleNugetNutitNutnostNutrieNymfaObalObarvitObavaObdivObecObehnatObejmoutObezitaObhajobaObilniceObjasnitObjektObklopitOblastOblekOblibaOblohaObludaObnosObohatitObojekOboutObrazecObrnaObrubaObrysObsahObsluhaObstaratObuvObvazObvinitObvodObvykleObyvatelObzorOcasOcelOcenitOchladitOchotaOchranaOcitnoutOdbojOdbytOdchodOdcizitOdebratOdeslatOdevzdatOdezvaOdhadceOdhoditOdjetOdjinudOdkazOdkoupitOdlivOdlukaOdmlkaOdolnostOdpadOdpisOdploutOdporOdpustitOdpykatOdrazkaOdsouditOdstupOdsunOdtokOdtudOdvahaOdvetaOdvolatOdvracetOdznakOfinaOfsajdOhlasOhniskoOhradaOhrozitOhryzekOkapOkeniceOklikaOknoOkouzlitOkovyOkrasaOkresOkrsekOkruhOkupantOkurkaOkusitOlejninaOlizovatOmakOmeletaOmezitOmladinaOmlouvatOmluvaOmylOnehdyOpakovatOpasekOperaceOpiceOpilostOpisovatOporaOpoziceOpravduOprotiOrbitalOrchestrOrgieOrliceOrlojOrtelOsadaOschnoutOsikaOsivoOslavaOslepitOslnitOslovitOsnovaOsobaOsolitOspalecOstenOstrahaOstudaOstychOsvojitOteplitOtiskOtopOtrhatOtrlostOtrokOtrubyOtvorOvanoutOvarOvesOvlivnitOvoceOxidOzdobaPachatelPacientPadouchPahorekPaktPalandaPalecPalivoPalubaPamfletPamlsekPanenkaPanikaPannaPanovatPanstvoPantoflePaprikaParketaParodiePartaParukaParybaPasekaPasivitaPastelkaPatentPatronaPavoukPaznehtPazourekPeckaPedagogPejsekPekloPelotonPenaltaPendrekPenzePeriskopPeroPestrostPetardaPeticePetrolejPevninaPexesoPianistaPihaPijavicePiklePiknikPilinaPilnostPilulkaPinzetaPipetaPisatelPistolePitevnaPivnicePivovarPlacentaPlakatPlamenPlanetaPlastikaPlatitPlavidloPlazPlechPlemenoPlentaPlesPletivoPlevelPlivatPlnitPlnoPlochaPlodinaPlombaPloutPlukPlynPobavitPobytPochodPocitPoctivecPodatPodcenitPodepsatPodhledPodivitPodkladPodmanitPodnikPodobaPodporaPodrazPodstataPodvodPodzimPoeziePohankaPohnutkaPohovorPohromaPohybPointaPojistkaPojmoutPokazitPoklesPokojPokrokPokutaPokynPolednePolibekPolknoutPolohaPolynomPomaluPominoutPomlkaPomocPomstaPomysletPonechatPonorkaPonurostPopadatPopelPopisekPoplachPoprositPopsatPopudPoradcePorcePorodPoruchaPoryvPosaditPosedPosilaPoskokPoslanecPosouditPospoluPostavaPosudekPosypPotahPotkanPotleskPotomekPotravaPotupaPotvoraPoukazPoutoPouzdroPovahaPovidlaPovlakPovozPovrchPovstatPovykPovzdechPozdravPozemekPoznatekPozorPozvatPracovatPrahoryPraktikaPralesPraotecPraporekPrasePravdaPrincipPrknoProbuditProcentoProdejProfeseProhraProjektProlomitPromilePronikatPropadProrokProsbaProtonProutekProvazPrskavkaPrstenPrudkostPrutPrvekPrvohoryPsanecPsovodPstruhPtactvoPubertaPuchPudlPukavecPuklinaPukrlePultPumpaPuncPupenPusaPusinkaPustinaPutovatPutykaPyramidaPyskPytelRacekRachotRadiaceRadniceRadonRaftRagbyRaketaRakovinaRamenoRampouchRandeRarachRaritaRasovnaRastrRatolestRazanceRazidloReagovatReakceReceptRedaktorReferentReflexRejnokReklamaRekordRekrutRektorReputaceRevizeRevmaRevolverRezervaRiskovatRizikoRobotikaRodokmenRohovkaRokleRokokoRomanetoRopovodRopuchaRorejsRosolRostlinaRotmistrRotopedRotundaRoubenkaRouchoRoupRouraRovinaRovniceRozborRozchodRozdatRozeznatRozhodceRozinkaRozjezdRozkazRozlohaRozmarRozpadRozruchRozsahRoztokRozumRozvodRubrikaRuchadloRukaviceRukopisRybaRybolovRychlostRydloRypadloRytinaRyzostSadistaSahatSakoSamecSamizdatSamotaSanitkaSardinkaSasankaSatelitSazbaSazeniceSborSchovatSebrankaSeceseSedadloSedimentSedloSehnatSejmoutSekeraSektaSekundaSekvojeSemenoSenoServisSesaditSeshoraSeskokSeslatSestraSesuvSesypatSetbaSetinaSetkatSetnoutSetrvatSeverSeznamShodaShrnoutSifonSilniceSirkaSirotekSirupSituaceSkafandrSkaliskoSkanzenSkautSkeptikSkicaSkladbaSkleniceSkloSkluzSkobaSkokanSkoroSkriptaSkrzSkupinaSkvostSkvrnaSlabikaSladidloSlaninaSlastSlavnostSledovatSlepecSlevaSlezinaSlibSlinaSlizniceSlonSloupekSlovoSluchSluhaSlunceSlupkaSlzaSmaragdSmetanaSmilstvoSmlouvaSmogSmradSmrkSmrtkaSmutekSmyslSnadSnahaSnobSobotaSochaSodovkaSokolSopkaSotvaSoubojSoucitSoudceSouhlasSouladSoumrakSoupravaSousedSoutokSouvisetSpalovnaSpasitelSpisSplavSpodekSpojenecSpoluSponzorSpornostSpoustaSprchaSpustitSrandaSrazSrdceSrnaSrnecSrovnatSrpenSrstSrubStaniceStarostaStatikaStavbaStehnoStezkaStodolaStolekStopaStornoStoupatStrachStresStrhnoutStromStrunaStudnaStupniceStvolStykSubjektSubtropySucharSudostSuknoSundatSunoutSurikataSurovinaSvahSvalstvoSvetrSvatbaSvazekSvisleSvitekSvobodaSvodidloSvorkaSvrabSykavkaSykotSynekSynovecSypatSypkostSyrovostSyselSytostTabletkaTabuleTahounTajemnoTajfunTajgaTajitTajnostTaktikaTamhleTamponTancovatTanecTankerTapetaTaveninaTazatelTechnikaTehdyTekutinaTelefonTemnotaTendenceTenistaTenorTeplotaTepnaTeprveTerapieTermoskaTextilTichoTiskopisTitulekTkadlecTkaninaTlapkaTleskatTlukotTlupaTmelToaletaTopinkaTopolTorzoTouhaToulecTradiceTraktorTrampTrasaTraverzaTrefitTrestTrezorTrhavinaTrhlinaTrochuTrojiceTroskaTroubaTrpceTrpitelTrpkostTrubecTruchlitTruhliceTrusTrvatTudyTuhnoutTuhostTundraTuristaTurnajTuzemskoTvarohTvorbaTvrdostTvrzTygrTykevUbohostUbozeUbratUbrousekUbrusUbytovnaUchoUctivostUdivitUhraditUjednatUjistitUjmoutUkazatelUklidnitUklonitUkotvitUkrojitUliceUlitaUlovitUmyvadloUnavitUniformaUniknoutUpadnoutUplatnitUplynoutUpoutatUpravitUranUrazitUsednoutUsilovatUsmrtitUsnadnitUsnoutUsouditUstlatUstrnoutUtahovatUtkatUtlumitUtonoutUtopenecUtrousitUvalitUvolnitUvozovkaUzdravitUzelUzeninaUzlinaUznatVagonValchaValounVanaVandalVanilkaVaranVarhanyVarovatVcelkuVchodVdovaVedroVegetaceVejceVelbloudVeletrhVelitelVelmocVelrybaVenkovVerandaVerzeVeselkaVeskrzeVesniceVespoduVestaVeterinaVeverkaVibraceVichrVideohraVidinaVidleVilaViniceVisetVitalitaVizeVizitkaVjezdVkladVkusVlajkaVlakVlasecVlevoVlhkostVlivVlnovkaVloupatVnucovatVnukVodaVodivostVodoznakVodstvoVojenskyVojnaVojskoVolantVolbaVolitVolnoVoskovkaVozidloVozovnaVpravoVrabecVracetVrahVrataVrbaVrcholekVrhatVrstvaVrtuleVsaditVstoupitVstupVtipVybavitVybratVychovatVydatVydraVyfotitVyhledatVyhnoutVyhoditVyhraditVyhubitVyjasnitVyjetVyjmoutVyklopitVykonatVylekatVymazatVymezitVymizetVymysletVynechatVynikatVynutitVypadatVyplatitVypravitVypustitVyrazitVyrovnatVyrvatVyslovitVysokoVystavitVysunoutVysypatVytasitVytesatVytratitVyvinoutVyvolatVyvrhelVyzdobitVyznatVzaduVzbuditVzchopitVzdorVzduchVzdychatVzestupVzhledemVzkazVzlykatVznikVzorekVzpouraVztahVztekXylofonZabratZabydletZachovatZadarmoZadusitZafoukatZahltitZahoditZahradaZahynoutZajatecZajetZajistitZaklepatZakoupitZalepitZamezitZamotatZamysletZanechatZanikatZaplatitZapojitZapsatZarazitZastavitZasunoutZatajitZatemnitZatknoutZaujmoutZavalitZaveletZavinitZavolatZavrtatZazvonitZbavitZbrusuZbudovatZbytekZdalekaZdarmaZdatnostZdivoZdobitZdrojZdvihZdymadloZeleninaZemanZeminaZeptatZezaduZezdolaZhatitZhltnoutZhlubokaZhotovitZhrubaZimaZimniceZjemnitZklamatZkoumatZkratkaZkumavkaZlatoZlehkaZlobaZlomZlostZlozvykZmapovatZmarZmatekZmijeZmizetZmocnitZmodratZmrzlinaZmutovatZnakZnalostZnamenatZnovuZobrazitZotavitZoubekZoufaleZploditZpomalitZpravaZprostitZprudkaZprvuZradaZranitZrcadloZrnitostZrnoZrovnaZrychlitZrzavostZtichaZtratitZubovinaZubrZvednoutZvenkuZveselaZvonZvratZvukovodZvyk";var a=null;function s(e){if(a!=null){return}a=o.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" ");if(i.Wordlist.check(e)!=="0x25f44555f4af25b51a711136e1c7d6e50ce9f8917d39d6b1f076b2bb4d2fac1a"){a=null;throw new Error("BIP39 Wordlist for en (English) FAILED")}}var u=function(e){n(r,e);function r(){return e.call(this,"cz")||this}r.prototype.getWord=function(e){s(this);return a[e]};r.prototype.getWordIndex=function(e){s(this);return a.indexOf(e)};return r}(i.Wordlist);var c=new u;t.langCz=c;i.Wordlist.register(c)},{"./wordlist":119}],112:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(t,"__esModule",{value:true});t.langEn=void 0;var i=e("./wordlist");var o="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo";var a=null;function s(e){if(a!=null){return}a=o.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" ");if(i.Wordlist.check(e)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"){a=null;throw new Error("BIP39 Wordlist for en (English) FAILED")}}var u=function(e){n(r,e);function r(){return e.call(this,"en")||this}r.prototype.getWord=function(e){s(this);return a[e]};r.prototype.getWordIndex=function(e){s(this);return a.indexOf(e)};return r}(i.Wordlist);var c=new u;t.langEn=c;i.Wordlist.register(c)},{"./wordlist":119}],113:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(t,"__esModule",{value:true});t.langEs=void 0;var i=e("@ethersproject/strings");var o=e("./wordlist");var a="A/bacoAbdomenAbejaAbiertoAbogadoAbonoAbortoAbrazoAbrirAbueloAbusoAcabarAcademiaAccesoAccio/nAceiteAcelgaAcentoAceptarA/cidoAclararAcne/AcogerAcosoActivoActoActrizActuarAcudirAcuerdoAcusarAdictoAdmitirAdoptarAdornoAduanaAdultoAe/reoAfectarAficio/nAfinarAfirmarA/gilAgitarAgoni/aAgostoAgotarAgregarAgrioAguaAgudoA/guilaAgujaAhogoAhorroAireAislarAjedrezAjenoAjusteAlacra/nAlambreAlarmaAlbaA/lbumAlcaldeAldeaAlegreAlejarAlertaAletaAlfilerAlgaAlgodo/nAliadoAlientoAlivioAlmaAlmejaAlmi/barAltarAltezaAltivoAltoAlturaAlumnoAlzarAmableAmanteAmapolaAmargoAmasarA/mbarA/mbitoAmenoAmigoAmistadAmorAmparoAmplioAnchoAncianoAnclaAndarAnde/nAnemiaA/nguloAnilloA/nimoAni/sAnotarAntenaAntiguoAntojoAnualAnularAnuncioA~adirA~ejoA~oApagarAparatoApetitoApioAplicarApodoAporteApoyoAprenderAprobarApuestaApuroAradoAra~aArarA/rbitroA/rbolArbustoArchivoArcoArderArdillaArduoA/reaA/ridoAriesArmoni/aArne/sAromaArpaArpo/nArregloArrozArrugaArteArtistaAsaAsadoAsaltoAscensoAsegurarAseoAsesorAsientoAsiloAsistirAsnoAsombroA/speroAstillaAstroAstutoAsumirAsuntoAtajoAtaqueAtarAtentoAteoA/ticoAtletaA/tomoAtraerAtrozAtu/nAudazAudioAugeAulaAumentoAusenteAutorAvalAvanceAvaroAveAvellanaAvenaAvestruzAvio/nAvisoAyerAyudaAyunoAzafra/nAzarAzoteAzu/carAzufreAzulBabaBaborBacheBahi/aBaileBajarBalanzaBalco/nBaldeBambu/BancoBandaBa~oBarbaBarcoBarnizBarroBa/sculaBasto/nBasuraBatallaBateri/aBatirBatutaBau/lBazarBebe/BebidaBelloBesarBesoBestiaBichoBienBingoBlancoBloqueBlusaBoaBobinaBoboBocaBocinaBodaBodegaBoinaBolaBoleroBolsaBombaBondadBonitoBonoBonsa/iBordeBorrarBosqueBoteBoti/nBo/vedaBozalBravoBrazoBrechaBreveBrilloBrincoBrisaBrocaBromaBronceBroteBrujaBruscoBrutoBuceoBucleBuenoBueyBufandaBufo/nBu/hoBuitreBultoBurbujaBurlaBurroBuscarButacaBuzo/nCaballoCabezaCabinaCabraCacaoCada/verCadenaCaerCafe/Cai/daCaima/nCajaCajo/nCalCalamarCalcioCaldoCalidadCalleCalmaCalorCalvoCamaCambioCamelloCaminoCampoCa/ncerCandilCanelaCanguroCanicaCantoCa~aCa~o/nCaobaCaosCapazCapita/nCapoteCaptarCapuchaCaraCarbo/nCa/rcelCaretaCargaCari~oCarneCarpetaCarroCartaCasaCascoCaseroCaspaCastorCatorceCatreCaudalCausaCazoCebollaCederCedroCeldaCe/lebreCelosoCe/lulaCementoCenizaCentroCercaCerdoCerezaCeroCerrarCertezaCe/spedCetroChacalChalecoChampu/ChanclaChapaCharlaChicoChisteChivoChoqueChozaChuletaChuparCiclo/nCiegoCieloCienCiertoCifraCigarroCimaCincoCineCintaCipre/sCircoCiruelaCisneCitaCiudadClamorClanClaroClaseClaveClienteClimaCli/nicaCobreCoccio/nCochinoCocinaCocoCo/digoCodoCofreCogerCoheteCoji/nCojoColaColchaColegioColgarColinaCollarColmoColumnaCombateComerComidaCo/modoCompraCondeConejoCongaConocerConsejoContarCopaCopiaCorazo/nCorbataCorchoCordo/nCoronaCorrerCoserCosmosCostaCra/neoCra/terCrearCrecerCrei/doCremaCri/aCrimenCriptaCrisisCromoCro/nicaCroquetaCrudoCruzCuadroCuartoCuatroCuboCubrirCucharaCuelloCuentoCuerdaCuestaCuevaCuidarCulebraCulpaCultoCumbreCumplirCunaCunetaCuotaCupo/nCu/pulaCurarCuriosoCursoCurvaCutisDamaDanzaDarDardoDa/tilDeberDe/bilDe/cadaDecirDedoDefensaDefinirDejarDelfi/nDelgadoDelitoDemoraDensoDentalDeporteDerechoDerrotaDesayunoDeseoDesfileDesnudoDestinoDesvi/oDetalleDetenerDeudaDi/aDiabloDiademaDiamanteDianaDiarioDibujoDictarDienteDietaDiezDifi/cilDignoDilemaDiluirDineroDirectoDirigirDiscoDise~oDisfrazDivaDivinoDobleDoceDolorDomingoDonDonarDoradoDormirDorsoDosDosisDrago/nDrogaDuchaDudaDueloDue~oDulceDu/oDuqueDurarDurezaDuroE/banoEbrioEcharEcoEcuadorEdadEdicio/nEdificioEditorEducarEfectoEficazEjeEjemploElefanteElegirElementoElevarElipseE/liteElixirElogioEludirEmbudoEmitirEmocio/nEmpateEmpe~oEmpleoEmpresaEnanoEncargoEnchufeEnci/aEnemigoEneroEnfadoEnfermoEnga~oEnigmaEnlaceEnormeEnredoEnsayoEnse~arEnteroEntrarEnvaseEnvi/oE/pocaEquipoErizoEscalaEscenaEscolarEscribirEscudoEsenciaEsferaEsfuerzoEspadaEspejoEspi/aEsposaEspumaEsqui/EstarEsteEstiloEstufaEtapaEternoE/ticaEtniaEvadirEvaluarEventoEvitarExactoExamenExcesoExcusaExentoExigirExilioExistirE/xitoExpertoExplicarExponerExtremoFa/bricaFa/bulaFachadaFa/cilFactorFaenaFajaFaldaFalloFalsoFaltarFamaFamiliaFamosoFarao/nFarmaciaFarolFarsaFaseFatigaFaunaFavorFaxFebreroFechaFelizFeoFeriaFerozFe/rtilFervorFesti/nFiableFianzaFiarFibraFiccio/nFichaFideoFiebreFielFieraFiestaFiguraFijarFijoFilaFileteFilialFiltroFinFincaFingirFinitoFirmaFlacoFlautaFlechaFlorFlotaFluirFlujoFlu/orFobiaFocaFogataFogo/nFolioFolletoFondoFormaForroFortunaForzarFosaFotoFracasoFra/gilFranjaFraseFraudeFrei/rFrenoFresaFri/oFritoFrutaFuegoFuenteFuerzaFugaFumarFuncio/nFundaFurgo/nFuriaFusilFu/tbolFuturoGacelaGafasGaitaGajoGalaGaleri/aGalloGambaGanarGanchoGangaGansoGarajeGarzaGasolinaGastarGatoGavila/nGemeloGemirGenGe/neroGenioGenteGeranioGerenteGermenGestoGiganteGimnasioGirarGiroGlaciarGloboGloriaGolGolfoGolosoGolpeGomaGordoGorilaGorraGotaGoteoGozarGradaGra/ficoGranoGrasaGratisGraveGrietaGrilloGripeGrisGritoGrosorGru/aGruesoGrumoGrupoGuanteGuapoGuardiaGuerraGui/aGui~oGuionGuisoGuitarraGusanoGustarHaberHa/bilHablarHacerHachaHadaHallarHamacaHarinaHazHaza~aHebillaHebraHechoHeladoHelioHembraHerirHermanoHe/roeHervirHieloHierroHi/gadoHigieneHijoHimnoHistoriaHocicoHogarHogueraHojaHombreHongoHonorHonraHoraHormigaHornoHostilHoyoHuecoHuelgaHuertaHuesoHuevoHuidaHuirHumanoHu/medoHumildeHumoHundirHuraca/nHurtoIconoIdealIdiomaI/doloIglesiaIglu/IgualIlegalIlusio/nImagenIma/nImitarImparImperioImponerImpulsoIncapazI/ndiceInerteInfielInformeIngenioInicioInmensoInmuneInnatoInsectoInstanteIntere/sI/ntimoIntuirInu/tilInviernoIraIrisIroni/aIslaIsloteJabali/Jabo/nJamo/nJarabeJardi/nJarraJaulaJazmi/nJefeJeringaJineteJornadaJorobaJovenJoyaJuergaJuevesJuezJugadorJugoJugueteJuicioJuncoJunglaJunioJuntarJu/piterJurarJustoJuvenilJuzgarKiloKoalaLabioLacioLacraLadoLadro/nLagartoLa/grimaLagunaLaicoLamerLa/minaLa/mparaLanaLanchaLangostaLanzaLa/pizLargoLarvaLa/stimaLataLa/texLatirLaurelLavarLazoLealLeccio/nLecheLectorLeerLegio/nLegumbreLejanoLenguaLentoLe~aLeo/nLeopardoLesio/nLetalLetraLeveLeyendaLibertadLibroLicorLi/derLidiarLienzoLigaLigeroLimaLi/miteLimo/nLimpioLinceLindoLi/neaLingoteLinoLinternaLi/quidoLisoListaLiteraLitioLitroLlagaLlamaLlantoLlaveLlegarLlenarLlevarLlorarLloverLluviaLoboLocio/nLocoLocuraLo/gicaLogroLombrizLomoLonjaLoteLuchaLucirLugarLujoLunaLunesLupaLustroLutoLuzMacetaMachoMaderaMadreMaduroMaestroMafiaMagiaMagoMai/zMaldadMaletaMallaMaloMama/MamboMamutMancoMandoManejarMangaManiqui/ManjarManoMansoMantaMa~anaMapaMa/quinaMarMarcoMareaMarfilMargenMaridoMa/rmolMarro/nMartesMarzoMasaMa/scaraMasivoMatarMateriaMatizMatrizMa/ximoMayorMazorcaMechaMedallaMedioMe/dulaMejillaMejorMelenaMelo/nMemoriaMenorMensajeMenteMenu/MercadoMerengueMe/ritoMesMeso/nMetaMeterMe/todoMetroMezclaMiedoMielMiembroMigaMilMilagroMilitarMillo/nMimoMinaMineroMi/nimoMinutoMiopeMirarMisaMiseriaMisilMismoMitadMitoMochilaMocio/nModaModeloMohoMojarMoldeMolerMolinoMomentoMomiaMonarcaMonedaMonjaMontoMo~oMoradaMorderMorenoMorirMorroMorsaMortalMoscaMostrarMotivoMoverMo/vilMozoMuchoMudarMuebleMuelaMuerteMuestraMugreMujerMulaMuletaMultaMundoMu~ecaMuralMuroMu/sculoMuseoMusgoMu/sicaMusloNa/carNacio/nNadarNaipeNaranjaNarizNarrarNasalNatalNativoNaturalNa/useaNavalNaveNavidadNecioNe/ctarNegarNegocioNegroNeo/nNervioNetoNeutroNevarNeveraNichoNidoNieblaNietoNi~ezNi~oNi/tidoNivelNoblezaNocheNo/minaNoriaNormaNorteNotaNoticiaNovatoNovelaNovioNubeNucaNu/cleoNudilloNudoNueraNueveNuezNuloNu/meroNutriaOasisObesoObispoObjetoObraObreroObservarObtenerObvioOcaOcasoOce/anoOchentaOchoOcioOcreOctavoOctubreOcultoOcuparOcurrirOdiarOdioOdiseaOesteOfensaOfertaOficioOfrecerOgroOi/doOi/rOjoOlaOleadaOlfatoOlivoOllaOlmoOlorOlvidoOmbligoOndaOnzaOpacoOpcio/nO/peraOpinarOponerOptarO/pticaOpuestoOracio/nOradorOralO/rbitaOrcaOrdenOrejaO/rganoOrgi/aOrgulloOrienteOrigenOrillaOroOrquestaOrugaOsadi/aOscuroOseznoOsoOstraOto~oOtroOvejaO/vuloO/xidoOxi/genoOyenteOzonoPactoPadrePaellaPa/ginaPagoPai/sPa/jaroPalabraPalcoPaletaPa/lidoPalmaPalomaPalparPanPanalPa/nicoPanteraPa~ueloPapa/PapelPapillaPaquetePararParcelaParedParirParoPa/rpadoParquePa/rrafoPartePasarPaseoPasio/nPasoPastaPataPatioPatriaPausaPautaPavoPayasoPeato/nPecadoPeceraPechoPedalPedirPegarPeinePelarPelda~oPeleaPeligroPellejoPeloPelucaPenaPensarPe~o/nPeo/nPeorPepinoPeque~oPeraPerchaPerderPerezaPerfilPericoPerlaPermisoPerroPersonaPesaPescaPe/simoPesta~aPe/taloPetro/leoPezPezu~aPicarPicho/nPiePiedraPiernaPiezaPijamaPilarPilotoPimientaPinoPintorPinzaPi~aPiojoPipaPirataPisarPiscinaPisoPistaPito/nPizcaPlacaPlanPlataPlayaPlazaPleitoPlenoPlomoPlumaPluralPobrePocoPoderPodioPoemaPoesi/aPoetaPolenPolici/aPolloPolvoPomadaPomeloPomoPompaPonerPorcio/nPortalPosadaPoseerPosiblePostePotenciaPotroPozoPradoPrecozPreguntaPremioPrensaPresoPrevioPrimoPri/ncipePrisio/nPrivarProaProbarProcesoProductoProezaProfesorProgramaProlePromesaProntoPropioPro/ximoPruebaPu/blicoPucheroPudorPuebloPuertaPuestoPulgaPulirPulmo/nPulpoPulsoPumaPuntoPu~alPu~oPupaPupilaPure/QuedarQuejaQuemarQuererQuesoQuietoQui/micaQuinceQuitarRa/banoRabiaRaboRacio/nRadicalRai/zRamaRampaRanchoRangoRapazRa/pidoRaptoRasgoRaspaRatoRayoRazaRazo/nReaccio/nRealidadReba~oReboteRecaerRecetaRechazoRecogerRecreoRectoRecursoRedRedondoReducirReflejoReformaRefra/nRefugioRegaloRegirReglaRegresoRehe/nReinoRei/rRejaRelatoRelevoRelieveRellenoRelojRemarRemedioRemoRencorRendirRentaRepartoRepetirReposoReptilResRescateResinaRespetoRestoResumenRetiroRetornoRetratoReunirReve/sRevistaReyRezarRicoRiegoRiendaRiesgoRifaRi/gidoRigorRinco/nRi~o/nRi/oRiquezaRisaRitmoRitoRizoRobleRoceRociarRodarRodeoRodillaRoerRojizoRojoRomeroRomperRonRoncoRondaRopaRoperoRosaRoscaRostroRotarRubi/RuborRudoRuedaRugirRuidoRuinaRuletaRuloRumboRumorRupturaRutaRutinaSa/badoSaberSabioSableSacarSagazSagradoSalaSaldoSaleroSalirSalmo/nSalo/nSalsaSaltoSaludSalvarSambaSancio/nSandi/aSanearSangreSanidadSanoSantoSapoSaqueSardinaSarte/nSastreSata/nSaunaSaxofo/nSeccio/nSecoSecretoSectaSedSeguirSeisSelloSelvaSemanaSemillaSendaSensorSe~alSe~orSepararSepiaSequi/aSerSerieSermo/nServirSesentaSesio/nSetaSetentaSeveroSexoSextoSidraSiestaSieteSigloSignoSi/labaSilbarSilencioSillaSi/mboloSimioSirenaSistemaSitioSituarSobreSocioSodioSolSolapaSoldadoSoledadSo/lidoSoltarSolucio/nSombraSondeoSonidoSonoroSonrisaSopaSoplarSoporteSordoSorpresaSorteoSoste/nSo/tanoSuaveSubirSucesoSudorSuegraSueloSue~oSuerteSufrirSujetoSulta/nSumarSuperarSuplirSuponerSupremoSurSurcoSure~oSurgirSustoSutilTabacoTabiqueTablaTabu/TacoTactoTajoTalarTalcoTalentoTallaTalo/nTama~oTamborTangoTanqueTapaTapeteTapiaTapo/nTaquillaTardeTareaTarifaTarjetaTarotTarroTartaTatuajeTauroTazaTazo/nTeatroTechoTeclaTe/cnicaTejadoTejerTejidoTelaTele/fonoTemaTemorTemploTenazTenderTenerTenisTensoTeori/aTerapiaTercoTe/rminoTernuraTerrorTesisTesoroTestigoTeteraTextoTezTibioTiburo/nTiempoTiendaTierraTiesoTigreTijeraTildeTimbreTi/midoTimoTintaTi/oTi/picoTipoTiraTiro/nTita/nTi/tereTi/tuloTizaToallaTobilloTocarTocinoTodoTogaToldoTomarTonoTontoToparTopeToqueTo/raxToreroTormentaTorneoToroTorpedoTorreTorsoTortugaTosToscoToserTo/xicoTrabajoTractorTraerTra/ficoTragoTrajeTramoTranceTratoTraumaTrazarTre/bolTreguaTreintaTrenTreparTresTribuTrigoTripaTristeTriunfoTrofeoTrompaTroncoTropaTroteTrozoTrucoTruenoTrufaTuberi/aTuboTuertoTumbaTumorTu/nelTu/nicaTurbinaTurismoTurnoTutorUbicarU/lceraUmbralUnidadUnirUniversoUnoUntarU~aUrbanoUrbeUrgenteUrnaUsarUsuarioU/tilUtopi/aUvaVacaVaci/oVacunaVagarVagoVainaVajillaValeVa/lidoValleValorVa/lvulaVampiroVaraVariarVaro/nVasoVecinoVectorVehi/culoVeinteVejezVelaVeleroVelozVenaVencerVendaVenenoVengarVenirVentaVenusVerVeranoVerboVerdeVeredaVerjaVersoVerterVi/aViajeVibrarVicioVi/ctimaVidaVi/deoVidrioViejoViernesVigorVilVillaVinagreVinoVi~edoVioli/nViralVirgoVirtudVisorVi/speraVistaVitaminaViudoVivazViveroVivirVivoVolca/nVolumenVolverVorazVotarVotoVozVueloVulgarYacerYateYeguaYemaYernoYesoYodoYogaYogurZafiroZanjaZapatoZarzaZonaZorroZumoZurdo";var s={};var u=null;function c(e){o.logger.checkNormalize();return(0,i.toUtf8String)(Array.prototype.filter.call((0,i.toUtf8Bytes)(e.normalize("NFD").toLowerCase()),function(e){return e>=65&&e<=90||e>=97&&e<=123}))}function f(e){var r=[];Array.prototype.forEach.call((0,i.toUtf8Bytes)(e),function(e){if(e===47){r.push(204);r.push(129)}else if(e===126){r.push(110);r.push(204);r.push(131)}else{r.push(e)}});return(0,i.toUtf8String)(r)}function l(e){if(u!=null){return}u=a.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" ").map(function(e){return f(e)});u.forEach(function(e,r){s[c(e)]=r});if(o.Wordlist.check(e)!=="0xf74fb7092aeacdfbf8959557de22098da512207fb9f109cb526994938cf40300"){u=null;throw new Error("BIP39 Wordlist for es (Spanish) FAILED")}}var h=function(e){n(r,e);function r(){return e.call(this,"es")||this}r.prototype.getWord=function(e){l(this);return u[e]};r.prototype.getWordIndex=function(e){l(this);return s[c(e)]};return r}(o.Wordlist);var d=new h;t.langEs=d;o.Wordlist.register(d)},{"./wordlist":119,"@ethersproject/strings":98}],114:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(t,"__esModule",{value:true});t.langFr=void 0;var i=e("@ethersproject/strings");var o=e("./wordlist");var a="AbaisserAbandonAbdiquerAbeilleAbolirAborderAboutirAboyerAbrasifAbreuverAbriterAbrogerAbruptAbsenceAbsoluAbsurdeAbusifAbyssalAcade/mieAcajouAcarienAccablerAccepterAcclamerAccoladeAccrocheAccuserAcerbeAchatAcheterAcidulerAcierAcompteAcque/rirAcronymeActeurActifActuelAdepteAde/quatAdhe/sifAdjectifAdjugerAdmettreAdmirerAdopterAdorerAdoucirAdresseAdroitAdulteAdverbeAe/rerAe/ronefAffaireAffecterAfficheAffreuxAffublerAgacerAgencerAgileAgiterAgraferAgre/ableAgrumeAiderAiguilleAilierAimableAisanceAjouterAjusterAlarmerAlchimieAlerteAlge-breAlgueAlie/nerAlimentAlle/gerAlliageAllouerAllumerAlourdirAlpagaAltesseAlve/oleAmateurAmbiguAmbreAme/nagerAmertumeAmidonAmiralAmorcerAmourAmovibleAmphibieAmpleurAmusantAnalyseAnaphoreAnarchieAnatomieAncienAne/antirAngleAngoisseAnguleuxAnimalAnnexerAnnonceAnnuelAnodinAnomalieAnonymeAnormalAntenneAntidoteAnxieuxApaiserApe/ritifAplanirApologieAppareilAppelerApporterAppuyerAquariumAqueducArbitreArbusteArdeurArdoiseArgentArlequinArmatureArmementArmoireArmureArpenterArracherArriverArroserArsenicArte/rielArticleAspectAsphalteAspirerAssautAsservirAssietteAssocierAssurerAsticotAstreAstuceAtelierAtomeAtriumAtroceAttaqueAttentifAttirerAttraperAubaineAubergeAudaceAudibleAugurerAuroreAutomneAutrucheAvalerAvancerAvariceAvenirAverseAveugleAviateurAvideAvionAviserAvoineAvouerAvrilAxialAxiomeBadgeBafouerBagageBaguetteBaignadeBalancerBalconBaleineBalisageBambinBancaireBandageBanlieueBannie-reBanquierBarbierBarilBaronBarqueBarrageBassinBastionBatailleBateauBatterieBaudrierBavarderBeletteBe/lierBeloteBe/ne/ficeBerceauBergerBerlineBermudaBesaceBesogneBe/tailBeurreBiberonBicycleBiduleBijouBilanBilingueBillardBinaireBiologieBiopsieBiotypeBiscuitBisonBistouriBitumeBizarreBlafardBlagueBlanchirBlessantBlinderBlondBloquerBlousonBobardBobineBoireBoiserBolideBonbonBondirBonheurBonifierBonusBordureBorneBotteBoucleBoueuxBougieBoulonBouquinBourseBoussoleBoutiqueBoxeurBrancheBrasierBraveBrebisBre-cheBreuvageBricolerBrigadeBrillantBriocheBriqueBrochureBroderBronzerBrousseBroyeurBrumeBrusqueBrutalBruyantBuffleBuissonBulletinBureauBurinBustierButinerButoirBuvableBuvetteCabanonCabineCachetteCadeauCadreCafe/ineCaillouCaissonCalculerCalepinCalibreCalmerCalomnieCalvaireCamaradeCame/raCamionCampagneCanalCanetonCanonCantineCanularCapableCaporalCapriceCapsuleCapterCapucheCarabineCarboneCaresserCaribouCarnageCarotteCarreauCartonCascadeCasierCasqueCassureCauserCautionCavalierCaverneCaviarCe/dilleCeintureCe/lesteCelluleCendrierCensurerCentralCercleCe/re/bralCeriseCernerCerveauCesserChagrinChaiseChaleurChambreChanceChapitreCharbonChasseurChatonChaussonChavirerChemiseChenilleChe/quierChercherChevalChienChiffreChignonChime-reChiotChlorureChocolatChoisirChoseChouetteChromeChuteCigareCigogneCimenterCine/maCintrerCirculerCirerCirqueCiterneCitoyenCitronCivilClaironClameurClaquerClasseClavierClientClignerClimatClivageClocheClonageCloporteCobaltCobraCocasseCocotierCoderCodifierCoffreCognerCohe/sionCoifferCoincerCole-reColibriCollineColmaterColonelCombatCome/dieCommandeCompactConcertConduireConfierCongelerConnoterConsonneContactConvexeCopainCopieCorailCorbeauCordageCornicheCorpusCorrectCorte-geCosmiqueCostumeCotonCoudeCoupureCourageCouteauCouvrirCoyoteCrabeCrainteCravateCrayonCre/atureCre/diterCre/meuxCreuserCrevetteCriblerCrierCristalCrite-reCroireCroquerCrotaleCrucialCruelCrypterCubiqueCueillirCuille-reCuisineCuivreCulminerCultiverCumulerCupideCuratifCurseurCyanureCycleCylindreCyniqueDaignerDamierDangerDanseurDauphinDe/battreDe/biterDe/borderDe/briderDe/butantDe/calerDe/cembreDe/chirerDe/ciderDe/clarerDe/corerDe/crireDe/cuplerDe/daleDe/ductifDe/esseDe/fensifDe/filerDe/frayerDe/gagerDe/givrerDe/glutirDe/graferDe/jeunerDe/liceDe/logerDemanderDemeurerDe/molirDe/nicherDe/nouerDentelleDe/nuderDe/partDe/penserDe/phaserDe/placerDe/poserDe/rangerDe/roberDe/sastreDescenteDe/sertDe/signerDe/sobe/irDessinerDestrierDe/tacherDe/testerDe/tourerDe/tresseDevancerDevenirDevinerDevoirDiableDialogueDiamantDicterDiffe/rerDige/rerDigitalDigneDiluerDimancheDiminuerDioxydeDirectifDirigerDiscuterDisposerDissiperDistanceDivertirDiviserDocileDocteurDogmeDoigtDomaineDomicileDompterDonateurDonjonDonnerDopamineDortoirDorureDosageDoseurDossierDotationDouanierDoubleDouceurDouterDoyenDragonDraperDresserDribblerDroitureDuperieDuplexeDurableDurcirDynastieE/blouirE/carterE/charpeE/chelleE/clairerE/clipseE/cloreE/cluseE/coleE/conomieE/corceE/couterE/craserE/cre/merE/crivainE/crouE/cumeE/cureuilE/difierE/duquerEffacerEffectifEffigieEffortEffrayerEffusionE/galiserE/garerE/jecterE/laborerE/largirE/lectronE/le/gantE/le/phantE/le-veE/ligibleE/litismeE/logeE/luciderE/luderEmballerEmbellirEmbryonE/meraudeE/missionEmmenerE/motionE/mouvoirEmpereurEmployerEmporterEmpriseE/mulsionEncadrerEnche-reEnclaveEncocheEndiguerEndosserEndroitEnduireE/nergieEnfanceEnfermerEnfouirEngagerEnginEngloberE/nigmeEnjamberEnjeuEnleverEnnemiEnnuyeuxEnrichirEnrobageEnseigneEntasserEntendreEntierEntourerEntraverE/nume/rerEnvahirEnviableEnvoyerEnzymeE/olienE/paissirE/pargneE/patantE/pauleE/picerieE/pide/mieE/pierE/pilogueE/pineE/pisodeE/pitapheE/poqueE/preuveE/prouverE/puisantE/querreE/quipeE/rigerE/rosionErreurE/ruptionEscalierEspadonEspe-ceEspie-gleEspoirEspritEsquiverEssayerEssenceEssieuEssorerEstimeEstomacEstradeE/tage-reE/talerE/tancheE/tatiqueE/teindreE/tendoirE/ternelE/thanolE/thiqueEthnieE/tirerE/tofferE/toileE/tonnantE/tourdirE/trangeE/troitE/tudeEuphorieE/valuerE/vasionE/ventailE/videnceE/viterE/volutifE/voquerExactExage/rerExaucerExcellerExcitantExclusifExcuseExe/cuterExempleExercerExhalerExhorterExigenceExilerExisterExotiqueExpe/dierExplorerExposerExprimerExquisExtensifExtraireExulterFableFabuleuxFacetteFacileFactureFaiblirFalaiseFameuxFamilleFarceurFarfeluFarineFaroucheFascinerFatalFatigueFauconFautifFaveurFavoriFe/brileFe/conderFe/de/rerFe/linFemmeFe/murFendoirFe/odalFermerFe/roceFerveurFestivalFeuilleFeutreFe/vrierFiascoFicelerFictifFide-leFigureFilatureFiletageFilie-reFilleulFilmerFilouFiltrerFinancerFinirFioleFirmeFissureFixerFlairerFlammeFlasqueFlatteurFle/auFle-cheFleurFlexionFloconFloreFluctuerFluideFluvialFolieFonderieFongibleFontaineForcerForgeronFormulerFortuneFossileFoudreFouge-reFouillerFoulureFourmiFragileFraiseFranchirFrapperFrayeurFre/gateFreinerFrelonFre/mirFre/ne/sieFre-reFriableFrictionFrissonFrivoleFroidFromageFrontalFrotterFruitFugitifFuiteFureurFurieuxFurtifFusionFuturGagnerGalaxieGalerieGambaderGarantirGardienGarnirGarrigueGazelleGazonGe/antGe/latineGe/luleGendarmeGe/ne/ralGe/nieGenouGentilGe/ologieGe/ome-treGe/raniumGermeGestuelGeyserGibierGiclerGirafeGivreGlaceGlaiveGlisserGlobeGloireGlorieuxGolfeurGommeGonflerGorgeGorilleGoudronGouffreGoulotGoupilleGourmandGoutteGraduelGraffitiGraineGrandGrappinGratuitGravirGrenatGriffureGrillerGrimperGrognerGronderGrotteGroupeGrugerGrutierGruye-reGue/pardGuerrierGuideGuimauveGuitareGustatifGymnasteGyrostatHabitudeHachoirHalteHameauHangarHannetonHaricotHarmonieHarponHasardHe/liumHe/matomeHerbeHe/rissonHermineHe/ronHe/siterHeureuxHibernerHibouHilarantHistoireHiverHomardHommageHomoge-neHonneurHonorerHonteuxHordeHorizonHorlogeHormoneHorribleHouleuxHousseHublotHuileuxHumainHumbleHumideHumourHurlerHydromelHygie-neHymneHypnoseIdylleIgnorerIguaneIlliciteIllusionImageImbiberImiterImmenseImmobileImmuableImpactImpe/rialImplorerImposerImprimerImputerIncarnerIncendieIncidentInclinerIncoloreIndexerIndiceInductifIne/ditIneptieInexactInfiniInfligerInformerInfusionInge/rerInhalerInhiberInjecterInjureInnocentInoculerInonderInscrireInsecteInsigneInsoliteInspirerInstinctInsulterIntactIntenseIntimeIntrigueIntuitifInutileInvasionInventerInviterInvoquerIroniqueIrradierIrre/elIrriterIsolerIvoireIvresseJaguarJaillirJambeJanvierJardinJaugerJauneJavelotJetableJetonJeudiJeunesseJoindreJoncherJonglerJoueurJouissifJournalJovialJoyauJoyeuxJubilerJugementJuniorJuponJuristeJusticeJuteuxJuve/nileKayakKimonoKiosqueLabelLabialLabourerLace/rerLactoseLaguneLaineLaisserLaitierLambeauLamelleLampeLanceurLangageLanterneLapinLargeurLarmeLaurierLavaboLavoirLectureLe/galLe/gerLe/gumeLessiveLettreLevierLexiqueLe/zardLiasseLibe/rerLibreLicenceLicorneLie-geLie-vreLigatureLigoterLigueLimerLimiteLimonadeLimpideLine/aireLingotLionceauLiquideLisie-reListerLithiumLitigeLittoralLivreurLogiqueLointainLoisirLombricLoterieLouerLourdLoutreLouveLoyalLubieLucideLucratifLueurLugubreLuisantLumie-reLunaireLundiLuronLutterLuxueuxMachineMagasinMagentaMagiqueMaigreMaillonMaintienMairieMaisonMajorerMalaxerMale/ficeMalheurMaliceMalletteMammouthMandaterManiableManquantManteauManuelMarathonMarbreMarchandMardiMaritimeMarqueurMarronMartelerMascotteMassifMate/rielMatie-reMatraqueMaudireMaussadeMauveMaximalMe/chantMe/connuMe/dailleMe/decinMe/diterMe/duseMeilleurMe/langeMe/lodieMembreMe/moireMenacerMenerMenhirMensongeMentorMercrediMe/riteMerleMessagerMesureMe/talMe/te/oreMe/thodeMe/tierMeubleMiaulerMicrobeMietteMignonMigrerMilieuMillionMimiqueMinceMine/ralMinimalMinorerMinuteMiracleMiroiterMissileMixteMobileModerneMoelleuxMondialMoniteurMonnaieMonotoneMonstreMontagneMonumentMoqueurMorceauMorsureMortierMoteurMotifMoucheMoufleMoulinMoussonMoutonMouvantMultipleMunitionMurailleMure-neMurmureMuscleMuse/umMusicienMutationMuterMutuelMyriadeMyrtilleMyste-reMythiqueNageurNappeNarquoisNarrerNatationNationNatureNaufrageNautiqueNavireNe/buleuxNectarNe/fasteNe/gationNe/gligerNe/gocierNeigeNerveuxNettoyerNeuroneNeutronNeveuNicheNickelNitrateNiveauNobleNocifNocturneNoirceurNoisetteNomadeNombreuxNommerNormatifNotableNotifierNotoireNourrirNouveauNovateurNovembreNoviceNuageNuancerNuireNuisibleNume/roNuptialNuqueNutritifObe/irObjectifObligerObscurObserverObstacleObtenirObturerOccasionOccuperOce/anOctobreOctroyerOctuplerOculaireOdeurOdorantOffenserOfficierOffrirOgiveOiseauOisillonOlfactifOlivierOmbrageOmettreOnctueuxOndulerOne/reuxOniriqueOpaleOpaqueOpe/rerOpinionOpportunOpprimerOpterOptiqueOrageuxOrangeOrbiteOrdonnerOreilleOrganeOrgueilOrificeOrnementOrqueOrtieOscillerOsmoseOssatureOtarieOuraganOursonOutilOutragerOuvrageOvationOxydeOxyge-neOzonePaisiblePalacePalmare-sPalourdePalperPanachePandaPangolinPaniquerPanneauPanoramaPantalonPapayePapierPapoterPapyrusParadoxeParcelleParesseParfumerParlerParoleParrainParsemerPartagerParureParvenirPassionPaste-quePaternelPatiencePatronPavillonPavoiserPayerPaysagePeignePeintrePelagePe/licanPellePelousePeluchePendulePe/ne/trerPe/niblePensifPe/nuriePe/pitePe/plumPerdrixPerforerPe/riodePermuterPerplexePersilPertePeserPe/talePetitPe/trirPeuplePharaonPhobiePhoquePhotonPhrasePhysiquePianoPicturalPie-cePierrePieuvrePilotePinceauPipettePiquerPiroguePiscinePistonPivoterPixelPizzaPlacardPlafondPlaisirPlanerPlaquePlastronPlateauPleurerPlexusPliagePlombPlongerPluiePlumagePochettePoe/siePoe-tePointePoirierPoissonPoivrePolairePolicierPollenPolygonePommadePompierPonctuelPonde/rerPoneyPortiquePositionPosse/derPosturePotagerPoteauPotionPoucePoulainPoumonPourprePoussinPouvoirPrairiePratiquePre/cieuxPre/direPre/fixePre/ludePre/nomPre/sencePre/textePre/voirPrimitifPrincePrisonPriverProble-meProce/derProdigeProfondProgre-sProieProjeterProloguePromenerPropreProspe-reProte/gerProuesseProverbePrudencePruneauPsychosePublicPuceronPuiserPulpePulsarPunaisePunitifPupitrePurifierPuzzlePyramideQuasarQuerelleQuestionQuie/tudeQuitterQuotientRacineRaconterRadieuxRagondinRaideurRaisinRalentirRallongeRamasserRapideRasageRatisserRavagerRavinRayonnerRe/actifRe/agirRe/aliserRe/animerRecevoirRe/citerRe/clamerRe/colterRecruterReculerRecyclerRe/digerRedouterRefaireRe/flexeRe/formerRefrainRefugeRe/galienRe/gionRe/glageRe/gulierRe/ite/rerRejeterRejouerRelatifReleverReliefRemarqueReme-deRemiseRemonterRemplirRemuerRenardRenfortReniflerRenoncerRentrerRenvoiReplierReporterRepriseReptileRequinRe/serveRe/sineuxRe/soudreRespectResterRe/sultatRe/tablirRetenirRe/ticuleRetomberRetracerRe/unionRe/ussirRevancheRevivreRe/volteRe/vulsifRichesseRideauRieurRigideRigolerRincerRiposterRisibleRisqueRituelRivalRivie-reRocheuxRomanceRompreRonceRondinRoseauRosierRotatifRotorRotuleRougeRouilleRouleauRoutineRoyaumeRubanRubisRucheRuelleRugueuxRuinerRuisseauRuserRustiqueRythmeSablerSaboterSabreSacocheSafariSagesseSaisirSaladeSaliveSalonSaluerSamediSanctionSanglierSarcasmeSardineSaturerSaugrenuSaumonSauterSauvageSavantSavonnerScalpelScandaleSce/le/ratSce/narioSceptreSche/maScienceScinderScoreScrutinSculpterSe/anceSe/cableSe/cherSecouerSe/cre/terSe/datifSe/duireSeigneurSe/jourSe/lectifSemaineSemblerSemenceSe/minalSe/nateurSensibleSentenceSe/parerSe/quenceSereinSergentSe/rieuxSerrureSe/rumServiceSe/sameSe/virSevrageSextupleSide/ralSie-cleSie/gerSifflerSigleSignalSilenceSiliciumSimpleSince-reSinistreSiphonSiropSismiqueSituerSkierSocialSocleSodiumSoigneuxSoldatSoleilSolitudeSolubleSombreSommeilSomnolerSondeSongeurSonnetteSonoreSorcierSortirSosieSottiseSoucieuxSoudureSouffleSouleverSoupapeSourceSoutirerSouvenirSpacieuxSpatialSpe/cialSphe-reSpiralStableStationSternumStimulusStipulerStrictStudieuxStupeurStylisteSublimeSubstratSubtilSubvenirSucce-sSucreSuffixeSugge/rerSuiveurSulfateSuperbeSupplierSurfaceSuricateSurmenerSurpriseSursautSurvieSuspectSyllabeSymboleSyme/trieSynapseSyntaxeSyste-meTabacTablierTactileTaillerTalentTalismanTalonnerTambourTamiserTangibleTapisTaquinerTarderTarifTartineTasseTatamiTatouageTaupeTaureauTaxerTe/moinTemporelTenailleTendreTeneurTenirTensionTerminerTerneTerribleTe/tineTexteThe-meThe/orieThe/rapieThoraxTibiaTie-deTimideTirelireTiroirTissuTitaneTitreTituberTobogganTole/rantTomateToniqueTonneauToponymeTorcheTordreTornadeTorpilleTorrentTorseTortueTotemToucherTournageTousserToxineTractionTraficTragiqueTrahirTrainTrancherTravailTre-fleTremperTre/sorTreuilTriageTribunalTricoterTrilogieTriompheTriplerTriturerTrivialTromboneTroncTropicalTroupeauTuileTulipeTumulteTunnelTurbineTuteurTutoyerTuyauTympanTyphonTypiqueTyranUbuesqueUltimeUltrasonUnanimeUnifierUnionUniqueUnitaireUniversUraniumUrbainUrticantUsageUsineUsuelUsureUtileUtopieVacarmeVaccinVagabondVagueVaillantVaincreVaisseauValableValiseVallonValveVampireVanilleVapeurVarierVaseuxVassalVasteVecteurVedetteVe/ge/talVe/hiculeVeinardVe/loceVendrediVe/ne/rerVengerVenimeuxVentouseVerdureVe/rinVernirVerrouVerserVertuVestonVe/te/ranVe/tusteVexantVexerViaducViandeVictoireVidangeVide/oVignetteVigueurVilainVillageVinaigreViolonVipe-reVirementVirtuoseVirusVisageViseurVisionVisqueuxVisuelVitalVitesseViticoleVitrineVivaceVivipareVocationVoguerVoileVoisinVoitureVolailleVolcanVoltigerVolumeVoraceVortexVoterVouloirVoyageVoyelleWagonXe/nonYachtZe-breZe/nithZesteZoologie";var s=null;var u={};function c(e){o.logger.checkNormalize();return(0,i.toUtf8String)(Array.prototype.filter.call((0,i.toUtf8Bytes)(e.normalize("NFD").toLowerCase()),function(e){return e>=65&&e<=90||e>=97&&e<=123}))}function f(e){var r=[];Array.prototype.forEach.call((0,i.toUtf8Bytes)(e),function(e){if(e===47){r.push(204);r.push(129)}else if(e===45){r.push(204);r.push(128)}else{r.push(e)}});return(0,i.toUtf8String)(r)}function l(e){if(s!=null){return}s=a.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" ").map(function(e){return f(e)});s.forEach(function(e,r){u[c(e)]=r});if(o.Wordlist.check(e)!=="0x51deb7ae009149dc61a6bd18a918eb7ac78d2775726c68e598b92d002519b045"){s=null;throw new Error("BIP39 Wordlist for fr (French) FAILED")}}var h=function(e){n(r,e);function r(){return e.call(this,"fr")||this}r.prototype.getWord=function(e){l(this);return s[e]};r.prototype.getWordIndex=function(e){l(this);return u[c(e)]};return r}(o.Wordlist);var d=new h;t.langFr=d;o.Wordlist.register(d)},{"./wordlist":119,"@ethersproject/strings":98}],115:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(t,"__esModule",{value:true});t.langIt=void 0;var i=e("./wordlist");var o="AbacoAbbaglioAbbinatoAbeteAbissoAbolireAbrasivoAbrogatoAccadereAccennoAccusatoAcetoneAchilleAcidoAcquaAcreAcrilicoAcrobataAcutoAdagioAddebitoAddomeAdeguatoAderireAdipeAdottareAdulareAffabileAffettoAffissoAffrantoAforismaAfosoAfricanoAgaveAgenteAgevoleAggancioAgireAgitareAgonismoAgricoloAgrumetoAguzzoAlabardaAlatoAlbatroAlberatoAlboAlbumeAlceAlcolicoAlettoneAlfaAlgebraAlianteAlibiAlimentoAllagatoAllegroAllievoAllodolaAllusivoAlmenoAlogenoAlpacaAlpestreAltalenaAlternoAlticcioAltroveAlunnoAlveoloAlzareAmalgamaAmanitaAmarenaAmbitoAmbratoAmebaAmericaAmetistaAmicoAmmassoAmmendaAmmirareAmmonitoAmoreAmpioAmpliareAmuletoAnacardoAnagrafeAnalistaAnarchiaAnatraAncaAncellaAncoraAndareAndreaAnelloAngeloAngolareAngustoAnimaAnnegareAnnidatoAnnoAnnuncioAnonimoAnticipoAnziApaticoAperturaApodeApparireAppetitoAppoggioApprodoAppuntoAprileArabicaArachideAragostaAraldicaArancioAraturaArazzoArbitroArchivioArditoArenileArgentoArgineArgutoAriaArmoniaArneseArredatoArringaArrostoArsenicoArsoArteficeArzilloAsciuttoAscoltoAsepsiAsetticoAsfaltoAsinoAsolaAspiratoAsproAssaggioAsseAssolutoAssurdoAstaAstenutoAsticeAstrattoAtavicoAteismoAtomicoAtonoAttesaAttivareAttornoAttritoAttualeAusilioAustriaAutistaAutonomoAutunnoAvanzatoAvereAvvenireAvvisoAvvolgereAzioneAzotoAzzimoAzzurroBabeleBaccanoBacinoBacoBadessaBadilataBagnatoBaitaBalconeBaldoBalenaBallataBalzanoBambinoBandireBaraondaBarbaroBarcaBaritonoBarlumeBaroccoBasilicoBassoBatostaBattutoBauleBavaBavosaBeccoBeffaBelgioBelvaBendaBenevoleBenignoBenzinaBereBerlinaBetaBibitaBiciBidoneBifidoBigaBilanciaBimboBinocoloBiologoBipedeBipolareBirbanteBirraBiscottoBisestoBisnonnoBisonteBisturiBizzarroBlandoBlattaBollitoBonificoBordoBoscoBotanicoBottinoBozzoloBraccioBradipoBramaBrancaBravuraBretellaBrevettoBrezzaBrigliaBrillanteBrindareBroccoloBrodoBronzinaBrulloBrunoBubboneBucaBudinoBuffoneBuioBulboBuonoBurloneBurrascaBussolaBustaCadettoCaducoCalamaroCalcoloCalesseCalibroCalmoCaloriaCambusaCamerataCamiciaCamminoCamolaCampaleCanapaCandelaCaneCaninoCanottoCantinaCapaceCapelloCapitoloCapogiroCapperoCapraCapsulaCarapaceCarcassaCardoCarismaCarovanaCarrettoCartolinaCasaccioCascataCasermaCasoCassoneCastelloCasualeCatastaCatenaCatrameCautoCavilloCedibileCedrataCefaloCelebreCellulareCenaCenoneCentesimoCeramicaCercareCertoCerumeCervelloCesoiaCespoCetoChelaChiaroChiccaChiedereChimeraChinaChirurgoChitarraCiaoCiclismoCifrareCignoCilindroCiottoloCircaCirrosiCitricoCittadinoCiuffoCivettaCivileClassicoClinicaCloroCoccoCodardoCodiceCoerenteCognomeCollareColmatoColoreColposoColtivatoColzaComaCometaCommandoComodoComputerComuneConcisoCondurreConfermaCongelareConiugeConnessoConoscereConsumoContinuoConvegnoCopertoCopioneCoppiaCopricapoCorazzaCordataCoricatoCorniceCorollaCorpoCorredoCorsiaCorteseCosmicoCostanteCotturaCovatoCratereCravattaCreatoCredereCremosoCrescitaCretaCricetoCrinaleCrisiCriticoCroceCronacaCrostataCrucialeCruscaCucireCuculoCuginoCullatoCupolaCuratoreCursoreCurvoCuscinoCustodeDadoDainoDalmataDamerinoDanielaDannosoDanzareDatatoDavantiDavveroDebuttoDecennioDecisoDeclinoDecolloDecretoDedicatoDefinitoDeformeDegnoDelegareDelfinoDelirioDeltaDemenzaDenotatoDentroDepositoDerapataDerivareDerogaDescrittoDesertoDesiderioDesumereDetersivoDevotoDiametroDicembreDiedroDifesoDiffusoDigerireDigitaleDiluvioDinamicoDinnanziDipintoDiplomaDipoloDiradareDireDirottoDirupoDisagioDiscretoDisfareDisgeloDispostoDistanzaDisumanoDitoDivanoDiveltoDividereDivoratoDobloneDocenteDoganaleDogmaDolceDomatoDomenicaDominareDondoloDonoDormireDoteDottoreDovutoDozzinaDragoDruidoDubbioDubitareDucaleDunaDuomoDupliceDuraturoEbanoEccessoEccoEclissiEconomiaEderaEdicolaEdileEditoriaEducareEgemoniaEgliEgoismoEgregioElaboratoElargireEleganteElencatoElettoElevareElficoElicaElmoElsaElusoEmanatoEmblemaEmessoEmiroEmotivoEmozioneEmpiricoEmuloEndemicoEnduroEnergiaEnfasiEnotecaEntrareEnzimaEpatiteEpilogoEpisodioEpocaleEppureEquatoreErarioErbaErbosoEredeEremitaErigereErmeticoEroeErosivoErranteEsagonoEsameEsanimeEsaudireEscaEsempioEsercitoEsibitoEsigenteEsistereEsitoEsofagoEsortatoEsosoEspansoEspressoEssenzaEssoEstesoEstimareEstoniaEstrosoEsultareEtilicoEtnicoEtruscoEttoEuclideoEuropaEvasoEvidenzaEvitatoEvolutoEvvivaFabbricaFaccendaFachiroFalcoFamigliaFanaleFanfaraFangoFantasmaFareFarfallaFarinosoFarmacoFasciaFastosoFasulloFaticareFatoFavolosoFebbreFecolaFedeFegatoFelpaFeltroFemminaFendereFenomenoFermentoFerroFertileFessuraFestivoFettaFeudoFiabaFiduciaFifaFiguratoFiloFinanzaFinestraFinireFioreFiscaleFisicoFiumeFlaconeFlamencoFleboFlemmaFloridoFluenteFluoroFobicoFocacciaFocosoFoderatoFoglioFolataFolcloreFolgoreFondenteFoneticoFoniaFontanaForbitoForchettaForestaFormicaFornaioForoFortezzaForzareFosfatoFossoFracassoFranaFrassinoFratelloFreccettaFrenataFrescoFrigoFrollinoFrondeFrugaleFruttaFucilataFucsiaFuggenteFulmineFulvoFumanteFumettoFumosoFuneFunzioneFuocoFurboFurgoneFuroreFusoFutileGabbianoGaffeGalateoGallinaGaloppoGamberoGammaGaranziaGarboGarofanoGarzoneGasdottoGasolioGastricoGattoGaudioGazeboGazzellaGecoGelatinaGelsoGemelloGemmatoGeneGenitoreGennaioGenotipoGergoGhepardoGhiaccioGhisaGialloGildaGineproGiocareGioielloGiornoGioveGiratoGironeGittataGiudizioGiuratoGiustoGlobuloGlutineGnomoGobbaGolfGomitoGommoneGonfioGonnaGovernoGracileGradoGraficoGrammoGrandeGrattareGravosoGraziaGrecaGreggeGrifoneGrigioGrinzaGrottaGruppoGuadagnoGuaioGuantoGuardareGufoGuidareIbernatoIconaIdenticoIdillioIdoloIdraIdricoIdrogenoIgieneIgnaroIgnoratoIlareIllesoIllogicoIlludereImballoImbevutoImboccoImbutoImmaneImmersoImmolatoImpaccoImpetoImpiegoImportoImprontaInalareInarcareInattivoIncantoIncendioInchinoIncisivoInclusoIncontroIncrocioIncuboIndagineIndiaIndoleIneditoInfattiInfilareInflittoIngaggioIngegnoIngleseIngordoIngrossoInnescoInodoreInoltrareInondatoInsanoInsettoInsiemeInsonniaInsulinaIntasatoInteroIntonacoIntuitoInumidireInvalidoInveceInvitoIperboleIpnoticoIpotesiIppicaIrideIrlandaIronicoIrrigatoIrrorareIsolatoIsotopoIstericoIstitutoIstriceItaliaIterareLabbroLabirintoLaccaLaceratoLacrimaLacunaLaddoveLagoLampoLancettaLanternaLardosoLargaLaringeLastraLatenzaLatinoLattugaLavagnaLavoroLegaleLeggeroLemboLentezzaLenzaLeoneLepreLesivoLessatoLestoLetteraleLevaLevigatoLiberoLidoLievitoLillaLimaturaLimitareLimpidoLineareLinguaLiquidoLiraLiricaLiscaLiteLitigioLivreaLocandaLodeLogicaLombareLondraLongevoLoquaceLorenzoLotoLotteriaLuceLucidatoLumacaLuminosoLungoLupoLuppoloLusingaLussoLuttoMacabroMacchinaMaceroMacinatoMadamaMagicoMagliaMagneteMagroMaiolicaMalafedeMalgradoMalintesoMalsanoMaltoMalumoreManaManciaMandorlaMangiareManifestoMannaroManovraMansardaMantideManubrioMappaMaratonaMarcireMarettaMarmoMarsupioMascheraMassaiaMastinoMaterassoMatricolaMattoneMaturoMazurcaMeandroMeccanicoMecenateMedesimoMeditareMegaMelassaMelisMelodiaMeningeMenoMensolaMercurioMerendaMerloMeschinoMeseMessereMestoloMetalloMetodoMettereMiagolareMicaMicelioMicheleMicroboMidolloMieleMiglioreMilanoMiliteMimosaMineraleMiniMinoreMirinoMirtilloMiscelaMissivaMistoMisurareMitezzaMitigareMitraMittenteMnemonicoModelloModificaModuloMoganoMogioMoleMolossoMonasteroMoncoMondinaMonetarioMonileMonotonoMonsoneMontatoMonvisoMoraMordereMorsicatoMostroMotivatoMotosegaMottoMovenzaMovimentoMozzoMuccaMucosaMuffaMughettoMugnaioMulattoMulinelloMultiploMummiaMuntoMuovereMuraleMusaMuscoloMusicaMutevoleMutoNababboNaftaNanometroNarcisoNariceNarratoNascereNastrareNaturaleNauticaNaviglioNebulosaNecrosiNegativoNegozioNemmenoNeofitaNerettoNervoNessunoNettunoNeutraleNeveNevroticoNicchiaNinfaNitidoNobileNocivoNodoNomeNominaNordicoNormaleNorvegeseNostranoNotareNotiziaNotturnoNovellaNucleoNullaNumeroNuovoNutrireNuvolaNuzialeOasiObbedireObbligoObeliscoOblioOboloObsoletoOccasioneOcchioOccidenteOccorrereOccultareOcraOculatoOdiernoOdorareOffertaOffrireOffuscatoOggettoOggiOgnunoOlandeseOlfattoOliatoOlivaOlogrammaOltreOmaggioOmbelicoOmbraOmegaOmissioneOndosoOnereOniceOnnivoroOnorevoleOntaOperatoOpinioneOppostoOracoloOrafoOrdineOrecchinoOreficeOrfanoOrganicoOrigineOrizzonteOrmaOrmeggioOrnativoOrologioOrrendoOrribileOrtensiaOrticaOrzataOrzoOsareOscurareOsmosiOspedaleOspiteOssaOssidareOstacoloOsteOtiteOtreOttagonoOttimoOttobreOvaleOvestOvinoOviparoOvocitoOvunqueOvviareOzioPacchettoPacePacificoPadellaPadronePaesePagaPaginaPalazzinaPalesarePallidoPaloPaludePandoroPannelloPaoloPaonazzoPapricaParabolaParcellaParerePargoloPariParlatoParolaPartireParvenzaParzialePassivoPasticcaPataccaPatologiaPattumePavonePeccatoPedalarePedonalePeggioPelosoPenarePendicePenisolaPennutoPenombraPensarePentolaPepePepitaPerbenePercorsoPerdonatoPerforarePergamenaPeriodoPermessoPernoPerplessoPersuasoPertugioPervasoPesatorePesistaPesoPestiferoPetaloPettinePetulantePezzoPiacerePiantaPiattinoPiccinoPicozzaPiegaPietraPifferoPigiamaPigolioPigroPilaPiliferoPillolaPilotaPimpantePinetaPinnaPinoloPioggiaPiomboPiramidePireticoPiritePirolisiPitonePizzicoPlaceboPlanarePlasmaPlatanoPlenarioPochezzaPoderosoPodismoPoesiaPoggiarePolentaPoligonoPollicePolmonitePolpettaPolsoPoltronaPolverePomicePomodoroPontePopolosoPorfidoPorosoPorporaPorrePortataPosaPositivoPossessoPostulatoPotassioPoterePranzoPrassiPraticaPreclusoPredicaPrefissoPregiatoPrelievoPremerePrenotarePreparatoPresenzaPretestoPrevalsoPrimaPrincipePrivatoProblemaProcuraProdurreProfumoProgettoProlungaPromessaPronomePropostaProrogaProtesoProvaPrudentePrugnaPruritoPsichePubblicoPudicaPugilatoPugnoPulcePulitoPulsantePuntarePupazzoPupillaPuroQuadroQualcosaQuasiQuerelaQuotaRaccoltoRaddoppioRadicaleRadunatoRafficaRagazzoRagioneRagnoRamarroRamingoRamoRandagioRantolareRapatoRapinaRappresoRasaturaRaschiatoRasenteRassegnaRastrelloRataRavvedutoRealeRecepireRecintoReclutaReconditoRecuperoRedditoRedimereRegalatoRegistroRegolaRegressoRelazioneRemareRemotoRennaReplicaReprimereReputareResaResidenteResponsoRestauroReteRetinaRetoricaRettificaRevocatoRiassuntoRibadireRibelleRibrezzoRicaricaRiccoRicevereRiciclatoRicordoRicredutoRidicoloRidurreRifasareRiflessoRiformaRifugioRigareRigettatoRighelloRilassatoRilevatoRimanereRimbalzoRimedioRimorchioRinascitaRincaroRinforzoRinnovoRinomatoRinsavitoRintoccoRinunciaRinvenireRiparatoRipetutoRipienoRiportareRipresaRipulireRisataRischioRiservaRisibileRisoRispettoRistoroRisultatoRisvoltoRitardoRitegnoRitmicoRitrovoRiunioneRivaRiversoRivincitaRivoltoRizomaRobaRoboticoRobustoRocciaRocoRodaggioRodereRoditoreRogitoRollioRomanticoRompereRonzioRosolareRospoRotanteRotondoRotulaRovescioRubizzoRubricaRugaRullinoRumineRumorosoRuoloRupeRussareRusticoSabatoSabbiareSabotatoSagomaSalassoSaldaturaSalgemmaSalivareSalmoneSaloneSaltareSalutoSalvoSapereSapidoSaporitoSaracenoSarcasmoSartoSassosoSatelliteSatiraSatolloSaturnoSavanaSavioSaziatoSbadiglioSbalzoSbancatoSbarraSbattereSbavareSbendareSbirciareSbloccatoSbocciatoSbrinareSbruffoneSbuffareScabrosoScadenzaScalaScambiareScandaloScapolaScarsoScatenareScavatoSceltoScenicoScettroSchedaSchienaSciarpaScienzaScindereScippoSciroppoScivoloSclerareScodellaScolpitoScompartoSconfortoScoprireScortaScossoneScozzeseScribaScrollareScrutinioScuderiaScultoreScuolaScuroScusareSdebitareSdoganareSeccaturaSecondoSedanoSeggiolaSegnalatoSegregatoSeguitoSelciatoSelettivoSellaSelvaggioSemaforoSembrareSemeSeminatoSempreSensoSentireSepoltoSequenzaSerataSerbatoSerenoSerioSerpenteSerraglioServireSestinaSetolaSettimanaSfaceloSfaldareSfamatoSfarzosoSfaticatoSferaSfidaSfilatoSfingeSfocatoSfoderareSfogoSfoltireSforzatoSfrattoSfruttatoSfuggitoSfumareSfusoSgabelloSgarbatoSgonfiareSgorbioSgrassatoSguardoSibiloSiccomeSierraSiglaSignoreSilenzioSillabaSimboloSimpaticoSimulatoSinfoniaSingoloSinistroSinoSintesiSinusoideSiparioSismaSistoleSituatoSlittaSlogaturaSlovenoSmarritoSmemoratoSmentitoSmeraldoSmilzoSmontareSmottatoSmussatoSnellireSnervatoSnodoSobbalzoSobrioSoccorsoSocialeSodaleSoffittoSognoSoldatoSolenneSolidoSollazzoSoloSolubileSolventeSomaticoSommaSondaSonettoSonniferoSopireSoppesoSopraSorgereSorpassoSorrisoSorsoSorteggioSorvolatoSospiroSostaSottileSpadaSpallaSpargereSpatolaSpaventoSpazzolaSpecieSpedireSpegnereSpelaturaSperanzaSpessoreSpettraleSpezzatoSpiaSpigolosoSpillatoSpinosoSpiraleSplendidoSportivoSposoSprangaSprecareSpronatoSpruzzoSpuntinoSquilloSradicareSrotolatoStabileStaccoStaffaStagnareStampatoStantioStarnutoStaseraStatutoSteloSteppaSterzoStilettoStimaStirpeStivaleStizzosoStonatoStoricoStrappoStregatoStriduloStrozzareStruttoStuccareStufoStupendoSubentroSuccosoSudoreSuggeritoSugoSultanoSuonareSuperboSupportoSurgelatoSurrogatoSussurroSuturaSvagareSvedeseSveglioSvelareSvenutoSveziaSviluppoSvistaSvizzeraSvoltaSvuotareTabaccoTabulatoTacciareTaciturnoTaleTalismanoTamponeTanninoTaraTardivoTargatoTariffaTarpareTartarugaTastoTatticoTavernaTavolataTazzaTecaTecnicoTelefonoTemerarioTempoTemutoTendoneTeneroTensioneTentacoloTeoremaTermeTerrazzoTerzettoTesiTesseratoTestatoTetroTettoiaTifareTigellaTimbroTintoTipicoTipografoTiraggioTiroTitanioTitoloTitubanteTizioTizzoneToccareTollerareToltoTombolaTomoTonfoTonsillaTopazioTopologiaToppaTorbaTornareTorroneTortoraToscanoTossireTostaturaTotanoTraboccoTracheaTrafilaTragediaTralcioTramontoTransitoTrapanoTrarreTraslocoTrattatoTraveTrecciaTremolioTrespoloTributoTrichecoTrifoglioTrilloTrinceaTrioTristezzaTrituratoTrivellaTrombaTronoTroppoTrottolaTrovareTruccatoTubaturaTuffatoTulipanoTumultoTunisiaTurbareTurchinoTutaTutelaUbicatoUccelloUccisoreUdireUditivoUffaUfficioUgualeUlisseUltimatoUmanoUmileUmorismoUncinettoUngereUnghereseUnicornoUnificatoUnisonoUnitarioUnteUovoUpupaUraganoUrgenzaUrloUsanzaUsatoUscitoUsignoloUsuraioUtensileUtilizzoUtopiaVacanteVaccinatoVagabondoVagliatoValangaValgoValicoVallettaValorosoValutareValvolaVampataVangareVanitosoVanoVantaggioVanveraVaporeVaranoVarcatoVarianteVascaVedettaVedovaVedutoVegetaleVeicoloVelcroVelinaVellutoVeloceVenatoVendemmiaVentoVeraceVerbaleVergognaVerificaVeroVerrucaVerticaleVescicaVessilloVestaleVeteranoVetrinaVetustoViandanteVibranteVicendaVichingoVicinanzaVidimareVigiliaVignetoVigoreVileVillanoViminiVincitoreViolaViperaVirgolaVirologoVirulentoViscosoVisioneVispoVissutoVisuraVitaVitelloVittimaVivandaVividoViziareVoceVogaVolatileVolereVolpeVoragineVulcanoZampognaZannaZappatoZatteraZavorraZefiroZelanteZeloZenzeroZerbinoZibettoZincoZirconeZittoZollaZoticoZuccheroZufoloZuluZuppa";var a=null;function s(e){if(a!=null){return}a=o.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" ");if(i.Wordlist.check(e)!=="0x5c1362d88fd4cf614a96f3234941d29f7d37c08c5292fde03bf62c2db6ff7620"){a=null;throw new Error("BIP39 Wordlist for it (Italian) FAILED")}}var u=function(e){n(r,e);function r(){return e.call(this,"it")||this}r.prototype.getWord=function(e){s(this);return a[e]};r.prototype.getWordIndex=function(e){s(this);return a.indexOf(e)};return r}(i.Wordlist);var c=new u;t.langIt=c;i.Wordlist.register(c)},{"./wordlist":119}],116:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(t,"__esModule",{value:true});t.langJa=void 0;var i=e("@ethersproject/bytes");var l=e("@ethersproject/strings");var h=e("./wordlist");var d=["AQRASRAGBAGUAIRAHBAghAURAdBAdcAnoAMEAFBAFCBKFBQRBSFBCXBCDBCHBGFBEQBpBBpQBIkBHNBeOBgFBVCBhBBhNBmOBmRBiHBiFBUFBZDBvFBsXBkFBlcBjYBwDBMBBTBBTRBWBBWXXaQXaRXQWXSRXCFXYBXpHXOQXHRXhRXuRXmXXbRXlXXwDXTRXrCXWQXWGaBWaKcaYgasFadQalmaMBacAKaRKKBKKXKKjKQRKDRKCYKCRKIDKeVKHcKlXKjHKrYNAHNBWNaRNKcNIBNIONmXNsXNdXNnBNMBNRBNrXNWDNWMNFOQABQAHQBrQXBQXFQaRQKXQKDQKOQKFQNBQNDQQgQCXQCDQGBQGDQGdQYXQpBQpQQpHQLXQHuQgBQhBQhCQuFQmXQiDQUFQZDQsFQdRQkHQbRQlOQlmQPDQjDQwXQMBQMDQcFQTBQTHQrDDXQDNFDGBDGQDGRDpFDhFDmXDZXDbRDMYDRdDTRDrXSAhSBCSBrSGQSEQSHBSVRShYShkSyQSuFSiBSdcSoESocSlmSMBSFBSFKSFNSFdSFcCByCaRCKcCSBCSRCCrCGbCEHCYXCpBCpQCIBCIHCeNCgBCgFCVECVcCmkCmwCZXCZFCdRClOClmClFCjDCjdCnXCwBCwXCcRCFQCFjGXhGNhGDEGDMGCDGCHGIFGgBGVXGVEGVRGmXGsXGdYGoSGbRGnXGwXGwDGWRGFNGFLGFOGFdGFkEABEBDEBFEXOEaBEKSENBENDEYXEIgEIkEgBEgQEgHEhFEudEuFEiBEiHEiFEZDEvBEsXEsFEdXEdREkFEbBEbRElFEPCEfkEFNYAEYAhYBNYQdYDXYSRYCEYYoYgQYgRYuRYmCYZTYdBYbEYlXYjQYRbYWRpKXpQopQnpSFpCXpIBpISphNpdBpdRpbRpcZpFBpFNpFDpFopFrLADLBuLXQLXcLaFLCXLEhLpBLpFLHXLeVLhILdHLdRLoDLbRLrXIABIBQIBCIBsIBoIBMIBRIXaIaRIKYIKRINBINuICDIGBIIDIIkIgRIxFIyQIiHIdRIbYIbRIlHIwRIMYIcRIRVITRIFBIFNIFQOABOAFOBQOaFONBONMOQFOSFOCDOGBOEQOpBOLXOIBOIFOgQOgFOyQOycOmXOsXOdIOkHOMEOMkOWWHBNHXNHXWHNXHDuHDRHSuHSRHHoHhkHmRHdRHkQHlcHlRHwBHWcgAEgAggAkgBNgBQgBEgXOgYcgLXgHjgyQgiBgsFgdagMYgWSgFQgFEVBTVXEVKBVKNVKDVKYVKRVNBVNYVDBVDxVSBVSRVCjVGNVLXVIFVhBVhcVsXVdRVbRVlRhBYhKYhDYhGShxWhmNhdahdkhbRhjohMXhTRxAXxXSxKBxNBxEQxeNxeQxhXxsFxdbxlHxjcxFBxFNxFQxFOxFoyNYyYoybcyMYuBQuBRuBruDMuCouHBudQukkuoBulVuMXuFEmCYmCRmpRmeDmiMmjdmTFmFQiADiBOiaRiKRiNBiNRiSFiGkiGFiERipRiLFiIFihYibHijBijEiMXiWBiFBiFCUBQUXFUaRUNDUNcUNRUNFUDBUSHUCDUGBUGFUEqULNULoUIRUeEUeYUgBUhFUuRUiFUsXUdFUkHUbBUjSUjYUwXUMDUcHURdUTBUrBUrXUrQZAFZXZZaRZKFZNBZQFZCXZGBZYdZpBZLDZIFZHXZHNZeQZVRZVFZmXZiBZvFZdFZkFZbHZbFZwXZcCZcRZRBvBQvBGvBLvBWvCovMYsAFsBDsaRsKFsNFsDrsSHsSFsCXsCRsEBsEHsEfspBsLBsLDsIgsIRseGsbRsFBsFQsFSdNBdSRdCVdGHdYDdHcdVbdySduDdsXdlRdwXdWYdWcdWRkBMkXOkaRkNIkNFkSFkCFkYBkpRkeNkgBkhVkmXksFklVkMBkWDkFNoBNoaQoaFoNBoNXoNaoNEoSRoEroYXoYCoYbopRopFomXojkowXorFbBEbEIbdBbjYlaRlDElMXlFDjKjjSRjGBjYBjYkjpRjLXjIBjOFjeVjbRjwBnXQnSHnpFnLXnINnMBnTRwXBwXNwXYwNFwQFwSBwGFwLXwLDweNwgBwuHwjDwnXMBXMpFMIBMeNMTHcaQcNBcDHcSFcCXcpBcLXcLDcgFcuFcnXcwXccDcTQcrFTQErXNrCHrpFrgFrbFrTHrFcWNYWNbWEHWMXWTR","ABGHABIJAEAVAYJQALZJAIaRAHNXAHdcAHbRAZJMAZJRAZTRAdVJAklmAbcNAjdRAMnRAMWYAWpRAWgRAFgBAFhBAFdcBNJBBNJDBQKBBQhcBQlmBDEJBYJkBYJTBpNBBpJFBIJBBIJDBIcABOKXBOEJBOVJBOiJBOZJBepBBeLXBeIFBegBBgGJBVJXBuocBiJRBUJQBlXVBlITBwNFBMYVBcqXBTlmBWNFBWiJBWnRBFGHBFwXXKGJXNJBXNZJXDTTXSHSXSVRXSlHXCJDXGQJXEhXXYQJXYbRXOfXXeNcXVJFXhQJXhEJXdTRXjdXXMhBXcQTXRGBXTEBXTnQXFCXXFOFXFgFaBaFaBNJaBCJaBpBaBwXaNJKaNJDaQIBaDpRaEPDaHMFamDJalEJaMZJaFaFaFNBaFQJaFLDaFVHKBCYKBEBKBHDKXaFKXGdKXEJKXpHKXIBKXZDKXwXKKwLKNacKNYJKNJoKNWcKDGdKDTRKChXKGaRKGhBKGbRKEBTKEaRKEPTKLMDKLWRKOHDKVJcKdBcKlIBKlOPKFSBKFEPKFpFNBNJNJBQNBGHNBEPNBHXNBgFNBVXNBZDNBsXNBwXNNaRNNJDNNJENNJkNDCJNDVDNGJRNJiDNZJNNsCJNJFNNFSBNFCXNFEPNFLXNFIFQJBFQCaRQJEQQLJDQLJFQIaRQOqXQHaFQHHQQVJXQVJDQhNJQmEIQZJFQsJXQJrFQWbRDJABDBYJDXNFDXCXDXLXDXZDDXsJDQqXDSJFDJCXDEPkDEqXDYmQDpSJDOCkDOGQDHEIDVJDDuDuDWEBDJFgSBNDSBSFSBGHSBIBSBTQSKVYSJQNSJQiSJCXSEqXSJYVSIiJSOMYSHAHSHaQSeCFSepQSegBSHdHSHrFShSJSJuHSJUFSkNRSrSrSWEBSFaHSJFQSFCXSFGDSFYXSFODSFgBSFVXSFhBSFxFSFkFSFbBSFMFCADdCJXBCXaFCXKFCXNFCXCXCXGBCXEJCXYBCXLDCXIBCXOPCXHXCXgBCXhBCXiBCXlDCXcHCJNBCJNFCDCJCDGBCDVXCDhBCDiDCDJdCCmNCpJFCIaRCOqXCHCHCHZJCViJCuCuCmddCJiFCdNBCdHhClEJCnUJCreSCWlgCWTRCFBFCFNBCFYBCFVFCFhFCFdSCFTBCFWDGBNBGBQFGJBCGBEqGBpBGBgQGNBEGNJYGNkOGNJRGDUFGJpQGHaBGJeNGJeEGVBlGVKjGiJDGvJHGsVJGkEBGMIJGWjNGFBFGFCXGFGBGFYXGFpBGFMFEASJEAWpEJNFECJVEIXSEIQJEOqXEOcFEeNcEHEJEHlFEJgFEhlmEmDJEmZJEiMBEUqXEoSREPBFEPXFEPKFEPSFEPEFEPpFEPLXEPIBEJPdEPcFEPTBEJnXEqlHEMpREFCXEFODEFcFYASJYJAFYBaBYBVXYXpFYDhBYCJBYJGFYYbRYeNcYJeVYiIJYZJcYvJgYvJRYJsXYsJFYMYMYreVpBNHpBEJpBwXpQxFpYEJpeNDpJeDpeSFpeCHpHUJpHbBpHcHpmUJpiiJpUJrpsJuplITpFaBpFQqpFGBpFEfpFYBpFpBpFLJpFIDpFgBpFVXpFyQpFuFpFlFpFjDpFnXpFwXpJFMpFTBLXCJLXEFLXhFLXUJLXbFLalmLNJBLSJQLCLCLGJBLLDJLHaFLeNFLeSHLeCXLepFLhaRLZsJLsJDLsJrLocaLlLlLMdbLFNBLFSBLFEHLFkFIBBFIBXFIBaQIBKXIBSFIBpHIBLXIBgBIBhBIBuHIBmXIBiFIBZXIBvFIBbFIBjQIBwXIBWFIKTRIQUJIDGFICjQIYSRIINXIJeCIVaRImEkIZJFIvJRIsJXIdCJIJoRIbBQIjYBIcqXITFVIreVIFKFIFSFIFCJIFGFIFLDIFIBIJFOIFgBIFVXIJFhIFxFIFmXIFdHIFbBIJFrIJFWOBGBOQfXOOKjOUqXOfXBOqXEOcqXORVJOFIBOFlDHBIOHXiFHNTRHCJXHIaRHHJDHHEJHVbRHZJYHbIBHRsJHRkDHWlmgBKFgBSBgBCDgBGHgBpBgBIBgBVJgBuBgBvFgKDTgQVXgDUJgGSJgOqXgmUMgZIJgTUJgWIEgFBFgFNBgFDJgFSFgFGBgFYXgJFOgFgQgFVXgFhBgFbHgJFWVJABVQKcVDgFVOfXVeDFVhaRVmGdViJYVMaRVFNHhBNDhBCXhBEqhBpFhBLXhNJBhSJRheVXhhKEhxlmhZIJhdBQhkIJhbMNhMUJhMZJxNJgxQUJxDEkxDdFxSJRxplmxeSBxeCXxeGFxeYXxepQxegBxWVcxFEQxFLXxFIBxFgBxFxDxFZtxFdcxFbBxFwXyDJXyDlcuASJuDJpuDIBuCpJuGSJuIJFueEFuZIJusJXudWEuoIBuWGJuFBcuFKEuFNFuFQFuFDJuFGJuFVJuFUtuFdHuFTBmBYJmNJYmQhkmLJDmLJomIdXmiJYmvJRmsJRmklmmMBymMuCmclmmcnQiJABiJBNiJBDiBSFiBCJiBEFiBYBiBpFiBLXiBTHiJNciDEfiCZJiECJiJEqiOkHiHKFieNDiHJQieQcieDHieSFieCXieGFieEFieIHiegFihUJixNoioNXiFaBiFKFiFNDiFEPiFYXitFOitFHiFgBiFVEiFmXiFitiFbBiFMFiFrFUCXQUIoQUIJcUHQJUeCEUHwXUUJDUUqXUdWcUcqXUrnQUFNDUFSHUFCFUFEfUFLXUtFOZBXOZXSBZXpFZXVXZEQJZEJkZpDJZOqXZeNHZeCDZUqXZFBQZFEHZFLXvBAFvBKFvBCXvBEPvBpHvBIDvBgFvBuHvQNJvFNFvFGBvFIBvJFcsXCDsXLXsXsXsXlFsXcHsQqXsJQFsEqXseIFsFEHsFjDdBxOdNpRdNJRdEJbdpJRdhZJdnSJdrjNdFNJdFQHdFhNkNJDkYaRkHNRkHSRkVbRkuMRkjSJkcqDoSJFoEiJoYZJoOfXohEBoMGQocqXbBAFbBXFbBaFbBNDbBGBbBLXbBTBbBWDbGJYbIJHbFQqbFpQlDgQlOrFlVJRjGEBjZJRnXvJnXbBnEfHnOPDngJRnxfXnUJWwXEJwNpJwDpBwEfXwrEBMDCJMDGHMDIJMLJDcQGDcQpHcqXccqNFcqCXcFCJRBSBRBGBRBEJRBpQTBNFTBQJTBpBTBVXTFABTFSBTFCFTFGBTFMDrXCJrXLDrDNJrEfHrFQJrFitWNjdWNTR","AKLJMANOPFASNJIAEJWXAYJNRAIIbRAIcdaAeEfDAgidRAdjNYAMYEJAMIbRAFNJBAFpJFBBIJYBDZJFBSiJhBGdEBBEJfXBEJqXBEJWRBpaUJBLXrXBIYJMBOcfXBeEfFBestXBjNJRBcDJOBFEqXXNvJRXDMBhXCJNYXOAWpXONJWXHDEBXeIaRXhYJDXZJSJXMDJOXcASJXFVJXaBQqXaBZJFasXdQaFSJQaFEfXaFpJHaFOqXKBNSRKXvJBKQJhXKEJQJKEJGFKINJBKIJjNKgJNSKVElmKVhEBKiJGFKlBgJKjnUJKwsJYKMFIJKFNJDKFIJFKFOfXNJBSFNJBCXNBpJFNJBvQNJBMBNJLJXNJOqXNJeCXNJeGFNdsJCNbTKFNwXUJQNFEPQDiJcQDMSJQSFpBQGMQJQJeOcQyCJEQUJEBQJFBrQFEJqDXDJFDJXpBDJXIMDGiJhDIJGRDJeYcDHrDJDVXgFDkAWpDkIgRDjDEqDMvJRDJFNFDJFIBSKclmSJQOFSJQVHSJQjDSJGJBSJGJFSECJoSHEJqSJHTBSJVJDSViJYSZJNBSJsJDSFSJFSFEfXSJFLXCBUJVCJXSBCJXpBCXVJXCJXsXCJXdFCJNJHCLIJgCHiJFCVNJMChCJhCUHEJCsJTRCJdYcCoQJCCFEfXCFIJgCFUJxCFstFGJBaQGJBIDGQJqXGYJNRGJHKFGeQqDGHEJFGJeLXGHIiJGHdBlGUJEBGkIJTGFQPDGJFEqEAGegEJIJBEJVJXEhQJTEiJNcEJZJFEJoEqEjDEqEPDsXEPGJBEPOqXEPeQFEfDiDEJfEFEfepQEfMiJEqXNBEqDIDEqeSFEqVJXEMvJRYXNJDYXEJHYKVJcYYJEBYJeEcYJUqXYFpJFYFstXpAZJMpBSJFpNBNFpeQPDpHLJDpHIJFpHgJFpeitFpHZJFpJFADpFSJFpJFCJpFOqXpFitBpJFZJLXIJFLIJgRLVNJWLVHJMLwNpJLFGJBLFLJDLFOqXLJFUJIBDJXIBGJBIJBYQIJBIBIBOqXIBcqDIEGJFILNJTIIJEBIOiJhIJeNBIJeIBIhiJIIWoTRIJFAHIJFpBIJFuHIFUtFIJFTHOSBYJOEcqXOHEJqOvBpFOkVJrObBVJOncqDOcNJkHhNJRHuHJuHdMhBgBUqXgBsJXgONJBgHNJDgHHJQgJeitgHsJXgJyNagyDJBgZJDrgsVJQgkEJNgkjSJgJFAHgFCJDgFZtMVJXNFVXQfXVJXDJVXoQJVQVJQVDEfXVDvJHVEqNFVeQfXVHpJFVHxfXVVJSRVVmaRVlIJOhCXVJhHjYkhxCJVhWVUJhWiJcxBNJIxeEqDxfXBFxcFEPxFSJFxFYJXyBDQJydaUJyFOPDuYCJYuLvJRuHLJXuZJLDuFOPDuFZJHuFcqXmKHJdmCQJcmOsVJiJAGFitLCFieOfXiestXiZJMEikNJQirXzFiFQqXiFIJFiFZJFiFvtFUHpJFUteIcUteOcUVCJkUhdHcUbEJEUJqXQUMNJhURjYkUFitFZDGJHZJIxDZJVJXZJFDJZJFpQvBNJBvBSJFvJxBrseQqDsVFVJdFLJDkEJNBkmNJYkFLJDoQJOPoGsJRoEAHBoEJfFbBQqDbBZJHbFVJXlFIJBjYIrXjeitcjjCEBjWMNBwXQfXwXOaFwDsJXwCJTRwrCZJMDNJQcDDJFcqDOPRYiJFTBsJXTQIJBTFEfXTFLJDrXEJFrEJXMrFZJFWEJdEWYTlm","ABCDEFACNJTRAMBDJdAcNJVXBLNJEBXSIdWRXErNJkXYDJMBXZJCJaXMNJaYKKVJKcKDEJqXKDcNJhKVJrNYKbgJVXKFVJSBNBYBwDNJeQfXNJeEqXNhGJWENJFiJRQlIJbEQJfXxDQqXcfXQFNDEJQFwXUJDYcnUJDJIBgQDIUJTRDJFEqDSJQSJFSJQIJFSOPeZtSJFZJHCJXQfXCTDEqFGJBSJFGJBOfXGJBcqXGJHNJDGJRLiJEJfXEqEJFEJPEFpBEJYJBZJFYBwXUJYiJMEBYJZJyTYTONJXpQMFXFpeGIDdpJFstXpJFcPDLBVSJRLHQJqXLJFZJFIJBNJDIJBUqXIBkFDJIJEJPTIYJGWRIJeQPDIJeEfHIJFsJXOqGDSFHXEJqXgJCsJCgGQJqXgdQYJEgFMFNBgJFcqDVJwXUJVJFZJchIgJCCxOEJqXxOwXUJyDJBVRuscisciJBiJBieUtqXiJFDJkiFsJXQUGEZJcUJFsJXZtXIrXZDZJDrZJFNJDZJFstXvJFQqXvJFCJEsJXQJqkhkNGBbDJdTRbYJMEBlDwXUJMEFiJFcfXNJDRcNJWMTBLJXC","BraFUtHBFSJFdbNBLJXVJQoYJNEBSJBEJfHSJHwXUJCJdAZJMGjaFVJXEJPNJBlEJfFiJFpFbFEJqIJBVJCrIBdHiJhOPFChvJVJZJNJWxGFNIFLueIBQJqUHEJfUFstOZJDrlXEASJRlXVJXSFwVJNJWD","QJEJNNJDQJEJIBSFQJEJxegBQJEJfHEPSJBmXEJFSJCDEJqXLXNJFQqXIcQsFNJFIFEJqXUJgFsJXIJBUJEJfHNFvJxEqXNJnXUJFQqD","IJBEJqXZJ"];var p="~~AzB~X~a~KN~Q~D~S~C~G~E~Y~p~L~I~O~eH~g~V~hxyumi~~U~~Z~~v~~s~~dkoblPjfnqwMcRTr~W~~~F~~~~~Jt";var v=null;function b(e){return(0,i.hexlify)((0,l.toUtf8Bytes)(e))}var g="0xe3818de38284e3818f";var m="0xe3818de38283e3818f";function o(e){if(v!==null){return}v=[];var o={};o[(0,l.toUtf8String)([227,130,154])]=false;o[(0,l.toUtf8String)([227,130,153])]=false;o[(0,l.toUtf8String)([227,130,133])]=(0,l.toUtf8String)([227,130,134]);o[(0,l.toUtf8String)([227,129,163])]=(0,l.toUtf8String)([227,129,164]);o[(0,l.toUtf8String)([227,130,131])]=(0,l.toUtf8String)([227,130,132]);o[(0,l.toUtf8String)([227,130,135])]=(0,l.toUtf8String)([227,130,136]);function t(e){var r="";for(var t=0;t<e.length;t++){var n=e[t];var i=o[n];if(i===false){continue}if(i){n=i}r+=n}return r}function r(e,r){e=t(e);r=t(r);if(e<r){return-1}if(e>r){return 1}return 0}for(var n=3;n<=9;n++){var i=d[n-3];for(var a=0;a<i.length;a+=n){var s=[];for(var u=0;u<n;u++){var c=p.indexOf(i[a+u]);s.push(227);s.push(c&64?130:129);s.push((c&63)+128)}v.push((0,l.toUtf8String)(s))}}v.sort(r);if(b(v[442])===g&&b(v[443])===m){var f=v[442];v[442]=v[443];v[443]=f}if(h.Wordlist.check(e)!=="0xcb36b09e6baa935787fd762ce65e80b0c6a8dabdfbc3a7f86ac0e2c4fd111600"){v=null;throw new Error("BIP39 Wordlist for ja (Japanese) FAILED")}}var a=function(e){n(r,e);function r(){return e.call(this,"ja")||this}r.prototype.getWord=function(e){o(this);return v[e]};r.prototype.getWordIndex=function(e){o(this);return v.indexOf(e)};r.prototype.split=function(e){h.logger.checkNormalize();return e.split(/(?:\u3000| )+/g)};r.prototype.join=function(e){return e.join(" ")};return r}(h.Wordlist);var s=new a;t.langJa=s;h.Wordlist.register(s)},{"./wordlist":119,"@ethersproject/bytes":31,"@ethersproject/strings":98}],117:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(t,"__esModule",{value:true});t.langKo=void 0;var i=e("@ethersproject/strings");var o=e("./wordlist");var a=["OYAa","ATAZoATBl3ATCTrATCl8ATDloATGg3ATHT8ATJT8ATJl3ATLlvATLn4ATMT8ATMX8ATMboATMgoAToLbAToMTATrHgATvHnAT3AnAT3JbAT3MTAT8DbAT8JTAT8LmAT8MYAT8MbAT#LnAUHT8AUHZvAUJXrAUJX8AULnrAXJnvAXLUoAXLgvAXMn6AXRg3AXrMbAX3JTAX3QbAYLn3AZLgvAZrSUAZvAcAZ8AaAZ8AbAZ8AnAZ8HnAZ8LgAZ8MYAZ8MgAZ8OnAaAboAaDTrAaFTrAaJTrAaJboAaLVoAaMXvAaOl8AaSeoAbAUoAbAg8AbAl4AbGnrAbMT8AbMXrAbMn4AbQb8AbSV8AbvRlAb8AUAb8AnAb8HgAb8JTAb8NTAb8RbAcGboAcLnvAcMT8AcMX8AcSToAcrAaAcrFnAc8AbAc8MgAfGgrAfHboAfJnvAfLV8AfLkoAfMT8AfMnoAfQb8AfScrAfSgrAgAZ8AgFl3AgGX8AgHZvAgHgrAgJXoAgJX8AgJboAgLZoAgLn4AgOX8AgoATAgoAnAgoCUAgoJgAgoLXAgoMYAgoSeAgrDUAgrJTAhrFnAhrLjAhrQgAjAgoAjJnrAkMX8AkOnoAlCTvAlCV8AlClvAlFg4AlFl6AlFn3AloSnAlrAXAlrAfAlrFUAlrFbAlrGgAlrOXAlvKnAlvMTAl3AbAl3MnAnATrAnAcrAnCZ3AnCl8AnDg8AnFboAnFl3AnHX4AnHbrAnHgrAnIl3AnJgvAnLXoAnLX4AnLbrAnLgrAnLhrAnMXoAnMgrAnOn3AnSbrAnSeoAnvLnAn3OnCTGgvCTSlvCTvAUCTvKnCTvNTCT3CZCT3GUCT3MTCT8HnCUCZrCULf8CULnvCU3HnCU3JUCY6NUCbDb8CbFZoCbLnrCboOTCboScCbrFnCbvLnCb8AgCb8HgCb$LnCkLfoClBn3CloDUDTHT8DTLl3DTSU8DTrAaDTrLXDTrLjDTrOYDTrOgDTvFXDTvFnDT3HUDT3LfDUCT9DUDT4DUFVoDUFV8DUFkoDUGgrDUJnrDULl8DUMT8DUMXrDUMX4DUMg8DUOUoDUOgvDUOg8DUSToDUSZ8DbDXoDbDgoDbGT8DbJn3DbLg3DbLn4DbMXrDbMg8DbOToDboJXGTClvGTDT8GTFZrGTLVoGTLlvGTLl3GTMg8GTOTvGTSlrGToCUGTrDgGTrJYGTrScGTtLnGTvAnGTvQgGUCZrGUDTvGUFZoGUHXrGULnvGUMT8GUoMgGXoLnGXrMXGXrMnGXvFnGYLnvGZOnvGZvOnGZ8LaGZ8LmGbAl3GbDYvGbDlrGbHX3GbJl4GbLV8GbLn3GbMn4GboJTGboRfGbvFUGb3GUGb4JnGgDX3GgFl$GgJlrGgLX6GgLZoGgLf8GgOXoGgrAgGgrJXGgrMYGgrScGgvATGgvOYGnAgoGnJgvGnLZoGnLg3GnLnrGnQn8GnSbrGnrMgHTClvHTDToHTFT3HTQT8HToJTHToJgHTrDUHTrMnHTvFYHTvRfHT8MnHT8SUHUAZ8HUBb4HUDTvHUoMYHXFl6HXJX6HXQlrHXrAUHXrMnHXrSbHXvFYHXvKXHX3LjHX3MeHYvQlHZrScHZvDbHbAcrHbFT3HbFl3HbJT8HbLTrHbMT8HbMXrHbMbrHbQb8HbSX3HboDbHboJTHbrFUHbrHgHbrJTHb8JTHb8MnHb8QgHgAlrHgDT3HgGgrHgHgrHgJTrHgJT8HgLX@HgLnrHgMT8HgMX8HgMboHgOnrHgQToHgRg3HgoHgHgrCbHgrFnHgrLVHgvAcHgvAfHnAloHnCTrHnCnvHnGTrHnGZ8HnGnvHnJT8HnLf8HnLkvHnMg8HnRTrITvFUITvFnJTAXrJTCV8JTFT3JTFT8JTFn4JTGgvJTHT8JTJT8JTJXvJTJl3JTJnvJTLX4JTLf8JTLhvJTMT8JTMXrJTMnrJTObrJTQT8JTSlvJT8DUJT8FkJT8MTJT8OXJT8OgJT8QUJT8RfJUHZoJXFT4JXFlrJXGZ8JXGnrJXLV8JXLgvJXMXoJXMX3JXNboJXPlvJXoJTJXoLkJXrAXJXrHUJXrJgJXvJTJXvOnJX4KnJYAl3JYJT8JYLhvJYQToJYrQXJY6NUJbAl3JbCZrJbDloJbGT8JbGgrJbJXvJbJboJbLf8JbLhrJbLl3JbMnvJbRg8JbSZ8JboDbJbrCZJbrSUJb3KnJb8LnJfRn8JgAXrJgCZrJgDTrJgGZrJgGZ8JgHToJgJT8JgJXoJgJgvJgLX4JgLZ3JgLZ8JgLn4JgMgrJgMn4JgOgvJgPX6JgRnvJgSToJgoCZJgoJbJgoMYJgrJXJgrJgJgrLjJg6MTJlCn3JlGgvJlJl8Jl4AnJl8FnJl8HgJnAToJnATrJnAbvJnDUoJnGnrJnJXrJnJXvJnLhvJnLnrJnLnvJnMToJnMT8JnMXvJnMX3JnMg8JnMlrJnMn4JnOX8JnST4JnSX3JnoAgJnoAnJnoJTJnoObJnrAbJnrAkJnrHnJnrJTJnrJYJnrOYJnrScJnvCUJnvFaJnvJgJnvJnJnvOYJnvQUJnvRUJn3FnJn3JTKnFl3KnLT6LTDlvLTMnoLTOn3LTRl3LTSb4LTSlrLToAnLToJgLTrAULTrAcLTrCULTrHgLTrMgLT3JnLULnrLUMX8LUoJgLVATrLVDTrLVLb8LVoJgLV8MgLV8RTLXDg3LXFlrLXrCnLXrLXLX3GTLX4GgLX4OYLZAXrLZAcrLZAgrLZAhrLZDXyLZDlrLZFbrLZFl3LZJX6LZJX8LZLc8LZLnrLZSU8LZoJTLZoJnLZrAgLZrAnLZrJYLZrLULZrMgLZrSkLZvAnLZvGULZvJeLZvOTLZ3FZLZ4JXLZ8STLZ8ScLaAT3LaAl3LaHT8LaJTrLaJT8LaJXrLaJgvLaJl4LaLVoLaMXrLaMXvLaMX8LbClvLbFToLbHlrLbJn4LbLZ3LbLhvLbMXrLbMnoLbvSULcLnrLc8HnLc8MTLdrMnLeAgoLeOgvLeOn3LfAl3LfLnvLfMl3LfOX8Lf8AnLf8JXLf8LXLgJTrLgJXrLgJl8LgMX8LgRZrLhCToLhrAbLhrFULhrJXLhvJYLjHTrLjHX4LjJX8LjLhrLjSX3LjSZ4LkFX4LkGZ8LkGgvLkJTrLkMXoLkSToLkSU8LkSZ8LkoOYLl3FfLl3MgLmAZrLmCbrLmGgrLmHboLmJnoLmJn3LmLfoLmLhrLmSToLnAX6LnAb6LnCZ3LnCb3LnDTvLnDb8LnFl3LnGnrLnHZvLnHgvLnITvLnJT8LnJX8LnJlvLnLf8LnLg6LnLhvLnLnoLnMXrLnMg8LnQlvLnSbrLnrAgLnrAnLnrDbLnrFkLnrJdLnrMULnrOYLnrSTLnvAnLnvDULnvHgLnvOYLnvOnLn3GgLn4DULn4JTLn4JnMTAZoMTAloMTDb8MTFT8MTJnoMTJnrMTLZrMTLhrMTLkvMTMX8MTRTrMToATMTrDnMTrOnMT3JnMT4MnMT8FUMT8FaMT8FlMT8GTMT8GbMT8GnMT8HnMT8JTMT8JbMT8OTMUCl8MUJTrMUJU8MUMX8MURTrMUSToMXAX6MXAb6MXCZoMXFXrMXHXrMXLgvMXOgoMXrAUMXrAnMXrHgMXrJYMXrJnMXrMTMXrMgMXrOYMXrSZMXrSgMXvDUMXvOTMX3JgMX3OTMX4JnMX8DbMX8FnMX8HbMX8HgMX8HnMX8LbMX8MnMX8OnMYAb8MYGboMYHTvMYHX4MYLTrMYLnvMYMToMYOgvMYRg3MYSTrMbAToMbAXrMbAl3MbAn8MbGZ8MbJT8MbJXrMbMXvMbMX8MbMnoMbrMUMb8AfMb8FbMb8FkMcJXoMeLnrMgFl3MgGTvMgGXoMgGgrMgGnrMgHT8MgHZrMgJnoMgLnrMgLnvMgMT8MgQUoMgrHnMgvAnMg8HgMg8JYMg8LfMloJnMl8ATMl8AXMl8JYMnAToMnAT4MnAZ8MnAl3MnAl4MnCl8MnHT8MnHg8MnJnoMnLZoMnLhrMnMXoMnMX3MnMnrMnOgvMnrFbMnrFfMnrFnMnrNTMnvJXNTMl8OTCT3OTFV8OTFn3OTHZvOTJXrOTOl3OT3ATOT3JUOT3LZOT3LeOT3MbOT8ATOT8AbOT8AgOT8MbOUCXvOUMX3OXHXvOXLl3OXrMUOXvDbOX6NUOX8JbOYFZoOYLbrOYLkoOYMg8OYSX3ObHTrObHT4ObJgrObLhrObMX3ObOX8Ob8FnOeAlrOeJT8OeJXrOeJnrOeLToOeMb8OgJXoOgLXoOgMnrOgOXrOgOloOgoAgOgoJbOgoMYOgoSTOg8AbOjLX4OjMnoOjSV8OnLVoOnrAgOn3DUPXQlrPXvFXPbvFTPdAT3PlFn3PnvFbQTLn4QToAgQToMTQULV8QURg8QUoJnQXCXvQbFbrQb8AaQb8AcQb8FbQb8MYQb8ScQeAlrQeLhrQjAn3QlFXoQloJgQloSnRTLnvRTrGURTrJTRUJZrRUoJlRUrQnRZrLmRZrMnRZrSnRZ8ATRZ8JbRZ8ScRbMT8RbST3RfGZrRfMX8RfMgrRfSZrRnAbrRnGT8RnvJgRnvLfRnvMTRn8AaSTClvSTJgrSTOXrSTRg3STRnvSToAcSToAfSToAnSToHnSToLjSToMTSTrAaSTrEUST3BYST8AgST8LmSUAZvSUAgrSUDT4SUDT8SUGgvSUJXoSUJXvSULTrSU8JTSU8LjSV8AnSV8JgSXFToSXLf8SYvAnSZrDUSZrMUSZrMnSZ8HgSZ8JTSZ8JgSZ8MYSZ8QUSaQUoSbCT3SbHToSbQYvSbSl4SboJnSbvFbSb8HbSb8JgSb8OTScGZrScHgrScJTvScMT8ScSToScoHbScrMTScvAnSeAZrSeAcrSeHboSeJUoSeLhrSeMT8SeMXrSe6JgSgHTrSkJnoSkLnvSk8CUSlFl3SlrSnSl8GnSmAboSmGT8SmJU8","ATLnDlATrAZoATrJX4ATrMT8ATrMX4ATrRTrATvDl8ATvJUoATvMl8AT3AToAT3MX8AT8CT3AT8DT8AT8HZrAT8HgoAUAgFnAUCTFnAXoMX8AXrAT8AXrGgvAXrJXvAXrOgoAXvLl3AZvAgoAZvFbrAZvJXoAZvJl8AZvJn3AZvMX8AZvSbrAZ8FZoAZ8LZ8AZ8MU8AZ8OTvAZ8SV8AZ8SX3AbAgFZAboJnoAbvGboAb8ATrAb8AZoAb8AgrAb8Al4Ab8Db8Ab8JnoAb8LX4Ab8LZrAb8LhrAb8MT8Ab8OUoAb8Qb8Ab8ST8AcrAUoAcrAc8AcrCZ3AcrFT3AcrFZrAcrJl4AcrJn3AcrMX3AcrOTvAc8AZ8Ac8MT8AfAcJXAgoFn4AgoGgvAgoGnrAgoLc8AgoMXoAgrLnrAkrSZ8AlFXCTAloHboAlrHbrAlrLhrAlrLkoAl3CZrAl3LUoAl3LZrAnrAl4AnrMT8An3HT4BT3IToBX4MnvBb!Ln$CTGXMnCToLZ4CTrHT8CT3JTrCT3RZrCT#GTvCU6GgvCU8Db8CU8GZrCU8HT8CboLl3CbrGgrCbrMU8Cb8DT3Cb8GnrCb8LX4Cb8MT8Cb8ObrCgrGgvCgrKX4Cl8FZoDTrAbvDTrDboDTrGT6DTrJgrDTrMX3DTrRZrDTrRg8DTvAVvDTvFZoDT3DT8DT3Ln3DT4HZrDT4MT8DT8AlrDT8MT8DUAkGbDUDbJnDYLnQlDbDUOYDbMTAnDbMXSnDboAT3DboFn4DboLnvDj6JTrGTCgFTGTGgFnGTJTMnGTLnPlGToJT8GTrCT3GTrLVoGTrLnvGTrMX3GTrMboGTvKl3GZClFnGZrDT3GZ8DTrGZ8FZ8GZ8MXvGZ8On8GZ8ST3GbCnQXGbMbFnGboFboGboJg3GboMXoGb3JTvGb3JboGb3Mn6Gb3Qb8GgDXLjGgMnAUGgrDloGgrHX4GgrSToGgvAXrGgvAZvGgvFbrGgvLl3GgvMnvGnDnLXGnrATrGnrMboGnuLl3HTATMnHTAgCnHTCTCTHTrGTvHTrHTvHTrJX8HTrLl8HTrMT8HTrMgoHTrOTrHTuOn3HTvAZrHTvDTvHTvGboHTvJU8HTvLl3HTvMXrHTvQb4HT4GT6HT4JT8HT4Jb#HT8Al3HT8GZrHT8GgrHT8HX4HT8Jb8HT8JnoHT8LTrHT8LgvHT8SToHT8SV8HUoJUoHUoJX8HUoLnrHXrLZoHXvAl3HX3LnrHX4FkvHX4LhrHX4MXoHX4OnoHZrAZ8HZrDb8HZrGZ8HZrJnrHZvGZ8HZvLnvHZ8JnvHZ8LhrHbCXJlHbMTAnHboJl4HbpLl3HbrJX8HbrLnrHbrMnvHbvRYrHgoSTrHgrFV8HgrGZ8HgrJXoHgrRnvHgvBb!HgvGTrHgvHX4HgvHn!HgvLTrHgvSU8HnDnLbHnFbJbHnvDn8Hn6GgvHn!BTvJTCTLnJTQgFnJTrAnvJTrLX4JTrOUoJTvFn3JTvLnrJTvNToJT3AgoJT3Jn4JT3LhvJT3ObrJT8AcrJT8Al3JT8JT8JT8JnoJT8LX4JT8LnrJT8MX3JT8Rg3JT8Sc8JUoBTvJU8AToJU8GZ8JU8GgvJU8JTrJU8JXrJU8JnrJU8LnvJU8ScvJXHnJlJXrGgvJXrJU8JXrLhrJXrMT8JXrMXrJXrQUoJXvCTvJXvGZ8JXvGgrJXvQT8JX8Ab8JX8DT8JX8GZ8JX8HZvJX8LnrJX8MT8JX8MXoJX8MnvJX8ST3JYGnCTJbAkGbJbCTAnJbLTAcJboDT3JboLb6JbrAnvJbrCn3JbrDl8JbrGboJbrIZoJbrJnvJbrMnvJbrQb4Jb8RZrJeAbAnJgJnFbJgScAnJgrATrJgvHZ8JgvMn4JlJlFbJlLiQXJlLjOnJlRbOlJlvNXoJlvRl3Jl4AcrJl8AUoJl8MnrJnFnMlJnHgGbJnoDT8JnoFV8JnoGgvJnoIT8JnoQToJnoRg3JnrCZ3JnrGgrJnrHTvJnrLf8JnrOX8JnvAT3JnvFZoJnvGT8JnvJl4JnvMT8JnvMX8JnvOXrJnvPX6JnvSX3JnvSZrJn3MT8Jn3MX8Jn3RTrLTATKnLTJnLTLTMXKnLTRTQlLToGb8LTrAZ8LTrCZ8LTrDb8LTrHT8LT3PX6LT4FZoLT$CTvLT$GgrLUvHX3LVoATrLVoAgoLVoJboLVoMX3LVoRg3LV8CZ3LV8FZoLV8GTvLXrDXoLXrFbrLXvAgvLXvFlrLXvLl3LXvRn6LX4Mb8LX8GT8LYCXMnLYrMnrLZoSTvLZrAZvLZrAloLZrFToLZrJXvLZrJboLZrJl4LZrLnrLZrMT8LZrOgvLZrRnvLZrST4LZvMX8LZvSlvLZ8AgoLZ8CT3LZ8JT8LZ8LV8LZ8LZoLZ8Lg8LZ8SV8LZ8SbrLZ$HT8LZ$Mn4La6CTvLbFbMnLbRYFTLbSnFZLboJT8LbrAT9LbrGb3LbrQb8LcrJX8LcrMXrLerHTvLerJbrLerNboLgrDb8LgrGZ8LgrHTrLgrMXrLgrSU8LgvJTrLgvLl3Lg6Ll3LhrLnrLhrMT8LhvAl4LiLnQXLkoAgrLkoJT8LkoJn4LlrSU8Ll3FZoLl3HTrLl3JX8Ll3JnoLl3LToLmLeFbLnDUFbLnLVAnLnrATrLnrAZoLnrAb8LnrAlrLnrGgvLnrJU8LnrLZrLnrLhrLnrMb8LnrOXrLnrSZ8LnvAb4LnvDTrLnvDl8LnvHTrLnvHbrLnvJT8LnvJU8LnvJbrLnvLhvLnvMX8LnvMb8LnvNnoLnvSU8Ln3Al3Ln4FZoLn4GT6Ln4JgvLn4LhrLn4MT8Ln4SToMToCZrMToJX8MToLX4MToLf8MToRg3MTrEloMTvGb6MT3BTrMT3Lb6MT8AcrMT8AgrMT8GZrMT8JnoMT8LnrMT8MX3MUOUAnMXAbFnMXoAloMXoJX8MXoLf8MXoLl8MXrAb8MXrDTvMXrGT8MXrGgrMXrHTrMXrLf8MXrMU8MXrOXvMXrQb8MXvGT8MXvHTrMXvLVoMX3AX3MX3Jn3MX3LhrMX3MX3MX4AlrMX4OboMX8GTvMX8GZrMX8GgrMX8JT8MX8JX8MX8LhrMX8MT8MYDUFbMYMgDbMbGnFfMbvLX4MbvLl3Mb8Mb8Mb8ST4MgGXCnMg8ATrMg8AgoMg8CZrMg8DTrMg8DboMg8HTrMg8JgrMg8LT8MloJXoMl8AhrMl8JT8MnLgAUMnoJXrMnoLX4MnoLhrMnoMT8MnrAl4MnrDb8MnrOTvMnrOgvMnrQb8MnrSU8MnvGgrMnvHZ8Mn3MToMn4DTrMn4LTrMn4Mg8NnBXAnOTFTFnOToAToOTrGgvOTrJX8OT3JXoOT6MTrOT8GgrOT8HTpOT8MToOUoHT8OUoJT8OUoLn3OXrAgoOXrDg8OXrMT8OXvSToOX6CTvOX8CZrOX8OgrOb6HgvOb8AToOb8MT8OcvLZ8OgvAlrOgvHTvOgvJTrOgvJnrOgvLZrOgvLn4OgvMT8OgvRTrOg8AZoOg8DbvOnrOXoOnvJn4OnvLhvOnvRTrOn3GgoOn3JnvOn6JbvOn8OTrPTGYFTPbBnFnPbGnDnPgDYQTPlrAnvPlrETvPlrLnvPlrMXvPlvFX4QTMTAnQTrJU8QYCnJlQYJlQlQbGTQbQb8JnrQb8LZoQb8LnvQb8MT8Qb8Ml8Qb8ST4QloAl4QloHZvQloJX8QloMn8QnJZOlRTrAZvRTrDTrRTvJn4RTvLhvRT4Jb8RZrAZrRZ8AkrRZ8JU8RZ8LV8RZ8LnvRbJlQXRg3GboRg3MnvRg8AZ8Rg8JboRg8Jl4RnLTCbRnvFl3RnvQb8SToAl4SToCZrSToFZoSToHXrSToJU8SToJgvSToJl4SToLhrSToMX3STrAlvSTrCT9STrCgrSTrGgrSTrHXrSTrHboSTrJnoSTrNboSTvLnrST4AZoST8Ab8ST8JT8SUoJn3SU6HZ#SU6JTvSU8Db8SU8HboSU8LgrSV8JT8SZrAcrSZrAl3SZrJT8SZrJnvSZrMT8SZvLUoSZ4FZoSZ8JnoSZ8RZrScoLnrScoMT8ScoMX8ScrAT4ScrAZ8ScrLZ8ScrLkvScvDb8ScvLf8ScvNToSgrFZrShvKnrSloHUoSloLnrSlrMXoSl8HgrSmrJUoSn3BX6","ATFlOn3ATLgrDYAT4MTAnAT8LTMnAYJnRTrAbGgJnrAbLV8LnAbvNTAnAeFbLg3AgOYMXoAlQbFboAnDboAfAnJgoJTBToDgAnBUJbAl3BboDUAnCTDlvLnCTFTrSnCYoQTLnDTwAbAnDUDTrSnDUHgHgrDX8LXFnDbJXAcrETvLTLnGTFTQbrGTMnGToGT3DUFbGUJlPX3GbQg8LnGboJbFnGb3GgAYGgAg8ScGgMbAXrGgvAbAnGnJTLnvGnvATFgHTDT6ATHTrDlJnHYLnMn8HZrSbJTHZ8LTFnHbFTJUoHgSeMT8HgrLjAnHgvAbAnHlFUrDlHnDgvAnHnHTFT3HnQTGnrJTAaMXvJTGbCn3JTOgrAnJXvAXMnJbMg8SnJbMnRg3Jb8LTMnJnAl3OnJnGYrQlJnJlQY3LTDlCn3LTJjLg3LTLgvFXLTMg3GTLV8HUOgLXFZLg3LXNXrMnLX8QXFnLX9AlMYLYLXPXrLZAbJU8LZDUJU8LZMXrSnLZ$AgFnLaPXrDULbFYrMnLbMn8LXLboJgJgLeFbLg3LgLZrSnLgOYAgoLhrRnJlLkCTrSnLkOnLhrLnFX%AYLnFZoJXLnHTvJbLnLloAbMTATLf8MTHgJn3MTMXrAXMT3MTFnMUITvFnMXFX%AYMXMXvFbMXrFTDbMYAcMX3MbLf8SnMb8JbFnMgMXrMTMgvAXFnMgvGgCmMnAloSnMnFnJTrOXvMXSnOX8HTMnObJT8ScObLZFl3ObMXCZoPTLgrQXPUFnoQXPU3RXJlPX3RkQXPbrJXQlPlrJbFnQUAhrDbQXGnCXvQYLnHlvQbLfLnvRTOgvJbRXJYrQlRYLnrQlRbLnrQlRlFT8JlRlFnrQXSTClCn3STHTrAnSTLZQlrSTMnGTrSToHgGbSTrGTDnSTvGXCnST3HgFbSU3HXAXSbAnJn3SbFT8LnScLfLnv","AT3JgJX8AT8FZoSnAT8JgFV8AT8LhrDbAZ8JT8DbAb8GgLhrAb8SkLnvAe8MT8SnAlMYJXLVAl3GYDTvAl3LfLnvBUDTvLl3CTOn3HTrCT3DUGgrCU8MT8AbCbFTrJUoCgrDb8MTDTLV8JX8DTLnLXQlDT8LZrSnDUQb8FZ8DUST4JnvDb8ScOUoDj6GbJl4GTLfCYMlGToAXvFnGboAXvLnGgAcrJn3GgvFnSToGnLf8JnvGn#HTDToHTLnFXJlHTvATFToHTvHTDToHTvMTAgoHT3STClvHT4AlFl6HT8HTDToHUoDgJTrHUoScMX3HbRZrMXoHboJg8LTHgDb8JTrHgMToLf8HgvLnLnoHnHn3HT4Hn6MgvAnJTJU8ScvJT3AaQT8JT8HTrAnJXrRg8AnJbAloMXoJbrATFToJbvMnoSnJgDb6GgvJgDb8MXoJgSX3JU8JguATFToJlPYLnQlJlQkDnLbJlQlFYJlJl8Lf8OTJnCTFnLbJnLTHXMnJnLXGXCnJnoFfRg3JnrMYRg3Jn3HgFl3KT8Dg8LnLTRlFnPTLTvPbLbvLVoSbrCZLXMY6HT3LXNU7DlrLXNXDTATLX8DX8LnLZDb8JU8LZMnoLhrLZSToJU8LZrLaLnrLZvJn3SnLZ8LhrSnLaJnoMT8LbFlrHTvLbrFTLnrLbvATLlvLb6OTFn3LcLnJZOlLeAT6Mn4LeJT3ObrLg6LXFlrLhrJg8LnLhvDlPX4LhvLfLnvLj6JTFT3LnFbrMXoLnQluCTvLnrQXCY6LnvLfLnvLnvMgLnvLnvSeLf8MTMbrJn3MT3JgST3MT8AnATrMT8LULnrMUMToCZrMUScvLf8MXoDT8SnMX6ATFToMX8AXMT8MX8FkMT8MX8HTrDUMX8ScoSnMYJT6CTvMgAcrMXoMg8SToAfMlvAXLg3MnFl3AnvOT3AnFl3OUoATHT8OU3RnLXrOXrOXrSnObPbvFn6Og8HgrSnOg8OX8DbPTvAgoJgPU3RYLnrPXrDnJZrPb8CTGgvPlrLTDlvPlvFUJnoQUvFXrQlQeMnoAl3QlrQlrSnRTFTrJUoSTDlLiLXSTFg6HT3STJgoMn4STrFTJTrSTrLZFl3ST4FnMXoSUrDlHUoScvHTvSnSfLkvMXo","AUoAcrMXoAZ8HboAg8AbOg6ATFgAg8AloMXoAl3AT8JTrAl8MX8MXoCT3SToJU8Cl8Db8MXoDT8HgrATrDboOT8MXoGTOTrATMnGT8LhrAZ8GnvFnGnQXHToGgvAcrHTvAXvLl3HbrAZoMXoHgBlFXLg3HgMnFXrSnHgrSb8JUoHn6HT8LgvITvATrJUoJUoLZrRnvJU8HT8Jb8JXvFX8QT8JXvLToJTrJYrQnGnQXJgrJnoATrJnoJU8ScvJnvMnvMXoLTCTLgrJXLTJlRTvQlLbRnJlQYvLbrMb8LnvLbvFn3RnoLdCVSTGZrLeSTvGXCnLg3MnoLn3MToLlrETvMT8SToAl3MbrDU6GTvMb8LX4LhrPlrLXGXCnSToLf8Rg3STrDb8LTrSTvLTHXMnSb3RYLnMnSgOg6ATFg","HUDlGnrQXrJTrHgLnrAcJYMb8DULc8LTvFgGnCk3Mg8JbAnLX4QYvFYHnMXrRUoJnGnvFnRlvFTJlQnoSTrBXHXrLYSUJgLfoMT8Se8DTrHbDb","AbDl8SToJU8An3RbAb8ST8DUSTrGnrAgoLbFU6Db8LTrMg8AaHT8Jb8ObDl8SToJU8Pb3RlvFYoJl"];var s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*";function u(e){if(e>=40){e=e+168-40}else if(e>=19){e=e+97-19}return(0,i.toUtf8String)([225,(e>>6)+132,(e&63)+128])}var c=null;function f(e){if(c!=null){return}c=[];a.forEach(function(e,r){r+=4;for(var t=0;t<e.length;t+=r){var n="";for(var i=0;i<r;i++){n+=u(s.indexOf(e[t+i]))}c.push(n)}});c.sort();if(o.Wordlist.check(e)!=="0xf9eddeace9c5d3da9c93cf7d3cd38f6a13ed3affb933259ae865714e8a3ae71a"){c=null;throw new Error("BIP39 Wordlist for ko (Korean) FAILED")}}var l=function(e){n(r,e);function r(){return e.call(this,"ko")||this}r.prototype.getWord=function(e){f(this);return c[e]};r.prototype.getWordIndex=function(e){f(this);return c.indexOf(e)};return r}(o.Wordlist);var h=new l;t.langKo=h;o.Wordlist.register(h)},{"./wordlist":119,"@ethersproject/strings":98}],118:[function(e,r,t){"use strict";var n=this&&this.__extends||function(){var n=function(e,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return n(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(t,"__esModule",{value:true});t.langZhTw=t.langZhCn=void 0;var s=e("@ethersproject/strings");var u=e("./wordlist");var c="}aE#4A=Yv&co#4N#6G=cJ&SM#66|/Z#4t&kn~46#4K~4q%b9=IR#7l,mB#7W_X2*dl}Uo~7s}Uf&Iw#9c&cw~6O&H6&wx&IG%v5=IQ~8a&Pv#47$PR&50%Ko&QM&3l#5f,D9#4L|/H&tQ;v0~6n]nN<di,AM=W5%QO&ka&ua,hM^tm=zV=JA=wR&+X]7P&NB#4J#5L|/b[dA}tJ<Do&6m&u2[U1&Kb.HM&mC=w0&MW<rY,Hq#6M}QG,13&wP}Jp]Ow%ue&Kg<HP<D9~4k~9T&I2_c6$9T#9/[C5~7O~4a=cs&O7=KK=An&l9$6U$8A&uD&QI|/Y&bg}Ux&F2#6b}E2&JN&kW&kp=U/&bb=Xl<Cj}k+~5J#6L&5z&9i}b4&Fo,ho(X0_g3~4O$Fz&QE<HN=Ww]6/%GF-Vw=tj&/D&PN#9g=YO}cL&Of&PI~5I&Ip=vU=IW#9G;0o-wU}ss&QR<BT&R9=tk$PY_dh&Pq-yh]7T,nj.Xu=EP&76=cI&Fs*Xg}z7$Gb&+I=DF,AF=cA}rL#7j=Dz&3y<Aa$52=PQ}b0(iY$Fa}oL&xV#6U=ec=WZ,xh%RY<dp#9N&Fl&44=WH*A7=sh&TB&8P=07;u+&PK}uh}J5#72)V/=xC,AB$k0&f6;1E|+5=1B,3v]6n&wR%b+&xx]7f=Ol}fl;+D^wG]7E;nB;uh^Ir&l5=JL,nS=cf=g5;u6|/Q$Gc=MH%Hg#5d%M6^86=U+$Gz,l/,ir^5y&Ba&/F-IY&FI&be%IZ#77&PW_Nu$kE(Yf&NX]7Z,Jy&FJ(Xo&Nz#/d=y7&MX<Ag}Z+;nE]Dt(iG#4D=13&Pj~4c%v8&Zo%OL&/X#4W<HR&ie~6J_1O(Y2=y5=Ad*cv_eB#6k&PX:BU#7A;uk&Ft&Fx_dD=U2;vB=U5=4F}+O&GN.HH:9s=b0%NV(jO&IH=JT}Z9=VZ<Af,Kx^4m&uJ%c6,6r;9m#+L}cf%Kh&F3~4H=vP}bu,Hz|++,1w]nv}k6;uu$jw*Kl*WX&uM[x7&Fr[m7$NO&QN]hu=JN}nR^8g#/h(ps|KC;vd}xz=V0}p6&FD$G1#7K<bG_4p~8g&cf;u4=tl}+k%5/}fz;uw<cA=u1}gU}VM=LJ=eX&+L&Pr#4U}p2:nC,2K]7H:jF&9x}uX#9O=MB<fz~8X~5m&4D&kN&u5%E/(h7(ZF&VG<de(qM|/e-Wt=3x(a+,/R]f/&ND$Ro&nU}0g=KA%kH&NK$Ke<dS}cB&IX~5g$TN]6m=Uv,Is&Py=Ef%Kz#+/%bi&+A<F4$OG&4C&FL#9V<Zk=2I_eE&6c]nw&kq$HG}y+&A8$P3}OH=XP]70%IS(AJ_gH%GZ&tY&AZ=vb~6y&/r=VI=Wv<Zi=fl=xf&eL}c8}OL=MJ=g8$F7=YT}9u=0+^xC}JH&nL^N0~4T]K2,Cy%OC#6s;vG(AC^xe^cG&MF}Br#9P;wD-7h$O/&xA}Fn^PC]6i]7G&8V$Qs;vl(TB~73~4l<mW&6V=2y&uY&+3)aP}XF;LP&kx$wU=t7;uy<FN&lz)7E=Oo*Y+;wI}9q}le;J6&Ri&4t&Qr#8B=cb&vG=J5|Ql(h5<Yy~4+}QD,Lx=wn%K/&RK=dO&Pw,Q9=co%4u;9u}g0@6a^4I%b0=zo|/c&tX=dQ=OS#+b=yz_AB&wB&Pm=W9$HP_gR=62=AO=ti=hI,oA&jr&dH=tm&b6$P2(x8=zi;nG~7F;05]0n[Ix&3m}rg=Xp=cd&uz]7t;97=cN;vV<jf&FF&F1=6Q&Ik*Kk&P4,2z=fQ]7D&3u,H0=d/}Uw<ZN<7R}Kv;0f$H7,MD]7n$F0#88~9Z%da=by;+T#/u=VF&fO&kr^kf<AB]sU,I5$Ng&Pz;0i&QD&vM=Yl:BM;nJ_xJ]U7&Kf&30,3f|Z9*dC)je_jA&Q4&Kp$NH(Yz#6S&Id%Ib=KX,AD=KV%dP}tW&Pk^+E_Ni=cq,3R}VZ(Si=b+}rv;0j}rZ]uA,/w(Sx&Jv$w9&4d&wE,NJ$Gy=J/]Ls#7k<ZQ<Y/&uj]Ov$PM;v3,2F&+u:up=On&3e,Jv;90=J+&Qm]6q}bK#+d~8Y(h2]hA;99&AS=I/}qB&dQ}yJ-VM}Vl&ui,iB&G3|Dc]7d=eQ%dX%JC_1L~4d^NP;vJ&/1)ZI#7N]9X[bQ&PL=0L(UZ,Lm&kc&IR}n7(iR<AQ<dg=33=vN}ft}au]7I,Ba=x9=dR~6R&Tq=Xi,3d$Nr&Bc}DI&ku&vf]Dn,/F&iD,Ll&Nw=0y&I7=Ls=/A&tU=Qe}Ua&uk&+F=g4=gh=Vj#+1&Qn}Uy*44#5F,Pc&Rz*Xn=oh=5W;0n_Nf(iE<Y7=vr=Zu]oz#5Z%mI=kN=Bv_Jp(T2;vt_Ml<FS&uI=L/&6P]64$M7}86<bo%QX(SI%IY&VK=Al&Ux;vv;ut*E/%uh<ZE|O3,M2(yc]yu=Wk&tp:Ex}hr,Cl&WE)+Z=8U}I2_4Q,hA_si=iw=OM=tM=yZ%Ia=U7;wT}b+;uo=Za}yS!5x}HD}fb#5O_dA;Nv%uB(yB;01(Sf}Fk;v7}Pt#8v<mZ#7L,/r&Pl~4w&f5=Ph$Fw_LF&8m,bL=yJ&BH}p/*Jn}tU~5Q;wB(h6]Df]8p^+B;E4&Wc=d+;Ea&bw$8C&FN,DM=Yf}mP~5w=fT#6V=mC=Fi=AV}jB&AN}lW}aH#/D)dZ;hl;vE}/7,CJ;31&w8,hj%u9_Js=jJ&4M~8k=TN&eC}nL&uc-wi&lX}dj=Mv=e2#6u=cr$uq$6G]8W}Jb:nm=Yg<b3(UA;vX&6n&xF=KT,jC,De&R8&oY=Zv&oB]7/=Z2&Oa}bf,hh(4h^tZ&72&Nx;D2&xL~5h~40)ZG)h+=OJ&RA]Bv$yB=Oq=df,AQ%Jn}OJ;11,3z&Tl&tj;v+^Hv,Dh(id=s+]7N&N3)9Q~8f,S4=uW=w4&uX,LX&3d]CJ&yp&8x<b2_do&lP=y/<cy_dG=Oi=7R(VH(lt_1T,Iq_AA;12^6T%k6#8K[B1{oO<AU[Bt;1b$9S&Ps<8T=St{bY,jB(Zp&63&Uv$9V,PM]6v&Af}zW[bW_oq}sm}nB&Kq&gC&ff_eq_2m&5F&TI}rf}Gf;Zr_z9;ER&jk}iz_sn<BN~+n&vo=Vi%97|ZR=Wc,WE&6t]6z%85(ly#84=KY)6m_5/=aX,N3}Tm&he&6K]tR_B2-I3;u/&hU&lH<AP=iB&IA=XL;/5&Nh=wv<BH#79=vS=zl<AA=0X_RG}Bw&9p$NW,AX&kP_Lp&/Z(Tc]Mu}hs#6I}5B&cI<bq&H9#6m=K9}vH(Y1(Y0#4B&w6,/9&gG<bE,/O=zb}I4_l8<B/;wL%Qo<HO[Mq=XX}0v&BP&F4(mG}0i}nm,EC=9u{I3,xG&/9=JY*DK&hR)BX=EI=cx=b/{6k}yX%A+&wa}Xb=la;wi^lL;0t}jo&Qb=xg=XB}iO<qo{bR=NV&8f=a0&Jy;0v=uK)HK;vN#6h&jB(h/%ud&NI%wY.X7=Pt}Cu-uL&Gs_hl%mH,tm]78=Lb^Q0#7Y=1u<Bt&+Q=Co_RH,w3;1e}ux<aU;ui}U3&Q5%bt]63&UQ|0l&uL}O7&3o,AV&dm|Nj(Xt*5+(Uu&Hh(p7(UF=VR=Bp^Jl&Hd[ix)9/=Iq]C8<67]66}mB%6f}bb}JI]8T$HA}db=YM&pa=2J}tS&Y0=PS&y4=cX$6E,hX,XP&nR;04,FQ&l0&Vm_Dv#5Y~8Z=Bi%MA]6x=JO:+p,Az&9q,Hj~6/}SD=K1:EJ}nA;Qo#/E]9R,Ie&6X%W3]61&v4=xX_MC=0q;06(Xq=fs}IG}Dv=0l}o7$iZ;9v&LH&DP-7a&OY,SZ,Kz,Cv&dh=fx|Nh,F/~7q=XF&w+;9n&Gw;0h}Z7<7O&JK(S7&LS<AD<ac=wo<Dt&zw%4B=4v#8P;9o~6p*vV=Tm,Or&I6=1q}nY=P0=gq&Bl&Uu,Ch%yb}UY=zh}dh}rl(T4_xk(YA#8R*xH,IN}Jn]7V}C4&Ty}j3]7p=cL=3h&wW%Qv<Z3=f0&RI&+S(ic_zq}oN&/Y=z1;Td=LW=0e=OI(Vc,+b^ju(UL;0r:Za%8v=Rp=zw&58&73&wK}qX]6y&8E)a2}WR=wP^ur&nQ<cH}Re=Aq&wk}Q0&+q=PP,Gc|/d^k5,Fw]8Y}Pg]p3=ju=ed}r5_yf&Cs]7z$/G<Cm&Jp&54_1G_gP_Ll}JZ;0u]k8_7k(Sg]65{9i=LN&Sx&WK,iW&fD&Lk{9a}Em-9c#8N&io=sy]8d&nT&IK(lx#7/$lW(Td<s8~49,3o<7Y=MW(T+_Jr&Wd,iL}Ct=xh&5V;v4&8n%Kx=iF&l2_0B{B+,If(J0,Lv;u8=Kx-vB=HC&vS=Z6&fU&vE^xK;3D=4h=MR#45:Jw;0d}iw=LU}I5=I0]gB*im,K9}GU,1k_4U&Tt=Vs(iX&lU(TF#7y,ZO}oA&m5#5P}PN}Uz=hM<B1&FB<aG,e6~7T<tP(UQ_ZT=wu&F8)aQ]iN,1r_Lo&/g:CD}84{J1_Ki&Na&3n$jz&FE=dc;uv;va}in}ll=fv(h1&3h}fp=Cy}BM(+E~8m}lo%v7=hC(T6$cj=BQ=Bw(DR,2j=Ks,NS|F+;00=fU=70}Mb(YU;+G&m7&hr=Sk%Co]t+(X5_Jw}0r}gC(AS-IP&QK<Z2#8Q$WC]WX}T2&pG_Ka,HC=R4&/N;Z+;ch(C7,D4$3p_Mk&B2$8D=n9%Ky#5z(CT&QJ#7B]DC]gW}nf~5M;Iw#80}Tc_1F#4Z-aC}Hl=ph=fz,/3=aW}JM}nn;DG;vm}wn,4P}T3;wx&RG$u+}zK=0b;+J_Ek{re<aZ=AS}yY#5D]7q,Cp}xN=VP*2C}GZ}aG~+m_Cs=OY#6r]6g<GS}LC(UB=3A=Bo}Jy<c4}Is;1P<AG}Op<Z1}ld}nS=1Z,yM&95&98=CJ(4t:2L$Hk=Zo}Vc;+I}np&N1}9y=iv}CO*7p=jL)px]tb^zh&GS&Vl%v/;vR=14=zJ&49|/f]hF}WG;03=8P}o/&Gg&rp;DB,Kv}Ji&Pb;aA^ll(4j%yt}+K$Ht#4y&hY]7Y<F1,eN}bG(Uh%6Z]t5%G7;+F_RE;it}tL=LS&Da=Xx(S+(4f=8G=yI}cJ}WP=37=jS}pX}hd)fp<A8=Jt~+o$HJ=M6}iX=g9}CS=dv=Cj(mP%Kd,xq|+9&LD(4/=Xm&QP=Lc}LX&fL;+K=Op(lu=Qs.qC:+e&L+=Jj#8w;SL]7S(b+#4I=c1&nG_Lf&uH;+R)ZV<bV%B/,TE&0H&Jq&Ah%OF&Ss(p2,Wv&I3=Wl}Vq;1L&lJ#9b_1H=8r=b8=JH(SZ=hD=J2#7U,/U#/X~6P,FU<eL=jx,mG=hG=CE&PU=Se(qX&LY=X6=y4&tk&QQ&tf=4g&xI}W+&mZ=Dc#7w}Lg;DA;wQ_Kb(cJ=hR%yX&Yb,hw{bX_4X;EP;1W_2M}Uc=b5(YF,CM&Tp^OJ{DD]6s=vF=Yo~8q}XH}Fu%P5(SJ=Qt;MO]s8<F3&B3&8T(Ul-BS*dw&dR<87}/8]62$PZ]Lx<Au}9Q]7c=ja=KR,Go,Us&v6(qk}pG&G2=ev^GM%w4&H4]7F&dv]J6}Ew:9w=sj-ZL}Ym$+h(Ut(Um~4n=Xs(U7%eE=Qc_JR<CA#6t<Fv|/I,IS,EG<F2(Xy$/n<Fa(h9}+9_2o&N4#7X<Zq|+f_Dp=dt&na,Ca=NJ)jY=8C=YG=s6&Q+<DO}D3=xB&R1(lw;Qn<bF(Cu|/B}HV=SS&n7,10&u0]Dm%A6^4Q=WR(TD=Xo<GH,Rj(l8)bP&n/=LM&CF,F5&ml=PJ;0k=LG=tq,Rh,D6@4i=1p&+9=YC%er_Mh;nI;0q=Fw]80=xq=FM$Gv;v6&nc;wK%H2&Kj;vs,AA=YP,66}bI(qR~5U=6q~4b$Ni=K5.X3$So&Iu(p+]8G=Cf=RY(TS_O3(iH&57=fE=Dg_Do#9z#7H;FK{qd_2k%JR}en&gh_z8;Rx}9p<cN_Ne,DO;LN_7o~/p=NF=5Y}gN<ce<C1,QE]Wv=3u<BC}GK]yq}DY&u/_hj=II(pz&rC,jV&+Z}ut=NQ;Cg-SR_ZS,+o=u/;Oy_RK_QF(Fx&xP}Wr&TA,Uh&g1=yr{ax[VF$Pg(YB;Ox=Vy;+W(Sp}XV%dd&33(l/]l4#4Y}OE=6c=bw(A7&9t%wd&N/&mo,JH&Qe)fm=Ao}fu=tH";var f="FAZDC6BALcLZCA+GBARCW8wNCcDDZ8LVFBOqqDUiou+M42TFAyERXFb7EjhP+vmBFpFrUpfDV2F7eB+eCltCHJFWLFCED+pWTojEIHFXc3aFn4F68zqjEuKidS1QBVPDEhE7NA4mhMF7oThD49ot3FgtzHFCK0acW1x8DH1EmLoIlrWFBLE+y5+NA3Cx65wJHTaEZVaK1mWAmPGxgYCdxwOjTDIt/faOEhTl1vqNsKtJCOhJWuio2g07KLZEQsFBUpNtwEByBgxFslFheFbiEPvi61msDvApxCzB6rBCzox7joYA5UdDc+Cb4FSgIabpXFAj3bjkmFAxCZE+mD/SFf/0ELecYCt3nLoxC6WEZf2tKDB4oZvrEmqFkKk7BwILA7gtYBpsTq//D4jD0F0wEB9pyQ1BD5Ba0oYHDI+sbDFhvrHXdDHfgFEIJLi5r8qercNFBgFLC4bo5ERJtamWBDFy73KCEb6M8VpmEt330ygCTK58EIIFkYgF84gtGA9Uyh3m68iVrFbWFbcbqiCYHZ9J1jeRPbL8yswhMiDbhEhdNoSwFbZrLT740ABEqgCkO8J1BLd1VhKKR4sD1yUo0z+FF59Mvg71CFbyEhbHSFBKEIKyoQNgQppq9T0KAqePu0ZFGrXOHdKJqkoTFhYvpDNyuuznrN84thJbsCoO6Cu6Xlvntvy0QYuAExQEYtTUBf3CoCqwgGFZ4u1HJFzDVwEy3cjcpV4QvsPaBC3rCGyCF23o4K3pp2gberGgFEJEHo4nHICtyKH2ZqyxhN05KBBJIQlKh/Oujv/DH32VrlqFdIFC7Fz9Ct4kaqFME0UETLprnN9kfy+kFmtQBB0+5CFu0N9Ij8l/VvJDh2oq3hT6EzjTHKFN7ZjZwoTsAZ4Exsko6Fpa6WC+sduz8jyrLpegTv2h1EBeYpLpm2czQW0KoCcS0bCVXCmuWJDBjN1nQNLdF58SFJ0h7i3pC3oEOKy/FjBklL70XvBEEIWp2yZ04xObzAWDDJG7f+DbqBEA7LyiR95j7MDVdDViz2RE5vWlBMv5e4+VfhP3aXNPhvLSynb9O2x4uFBV+3jqu6d5pCG28/sETByvmu/+IJ0L3wb4rj9DNOLBF6XPIODr4L19U9RRofAG6Nxydi8Bki8BhGJbBAJKzbJxkZSlF9Q2Cu8oKqggB9hBArwLLqEBWEtFowy8XK8bEyw9snT+BeyFk1ZCSrdmgfEwFePTgCjELBEnIbjaDDPJm36rG9pztcEzT8dGk23SBhXBB1H4z+OWze0ooFzz8pDBYFvp9j9tvFByf9y4EFdVnz026CGR5qMr7fxMHN8UUdlyJAzlTBDRC28k+L4FB8078ljyD91tUj1ocnTs8vdEf7znbzm+GIjEZnoZE5rnLL700Xc7yHfz05nWxy03vBB9YGHYOWxgMQGBCR24CVYNE1hpfKxN0zKnfJDmmMgMmBWqNbjfSyFCBWSCGCgR8yFXiHyEj+VtD1FB3FpC1zI0kFbzifiKTLm9yq5zFmur+q8FHqjoOBWsBPiDbnCC2ErunV6cJ6TygXFYHYp7MKN9RUlSIS8/xBAGYLzeqUnBF4QbsTuUkUqGs6CaiDWKWjQK9EJkjpkTmNCPYXL";var l={zh_cn:null,zh_tw:null};var h={zh_cn:"0x17bcc4d8547e5a7135e365d1ab443aaae95e76d8230c2782c67305d4f21497a1",zh_tw:"0x51e720e90c7b87bec1d70eb6e74a21a449bd3ec9c020b01d3a40ed991b60ce5d"};var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var p="~!@#$%^&*_-=[]{}|;:,.()<>?";function i(e){if(l[e.locale]!==null){return}l[e.locale]=[];var r=0;for(var t=0;t<2048;t++){var n=p.indexOf(c[t*3]);var i=[228+(n>>2),128+d.indexOf(c[t*3+1]),128+d.indexOf(c[t*3+2])];if(e.locale==="zh_tw"){var o=n%4;for(var a=o;a<3;a++){i[a]=d.indexOf(f[r++])+(a==0?228:128)}}l[e.locale].push((0,s.toUtf8String)(i))}if(u.Wordlist.check(e)!==h[e.locale]){l[e.locale]=null;throw new Error("BIP39 Wordlist for "+e.locale+" (Chinese) FAILED")}}var o=function(r){n(e,r);function e(e){return r.call(this,"zh_"+e)||this}e.prototype.getWord=function(e){i(this);return l[this.locale][e]};e.prototype.getWordIndex=function(e){i(this);return l[this.locale].indexOf(e)};e.prototype.split=function(e){e=e.replace(/(?:\u3000| )+/g,"");return e.split("")};return e}(u.Wordlist);var a=new o("cn");t.langZhCn=a;u.Wordlist.register(a);u.Wordlist.register(a,"zh");var v=new o("tw");t.langZhTw=v;u.Wordlist.register(v)},{"./wordlist":119,"@ethersproject/strings":98}],119:[function(e,r,n){"use strict";Object.defineProperty(n,"__esModule",{value:true});n.Wordlist=n.logger=void 0;var i=false;var o=e("@ethersproject/hash");var a=e("@ethersproject/properties");var t=e("@ethersproject/logger");var s=e("./_version");n.logger=new t.Logger(s.version);var u=function(){function t(e){var r=this.constructor;n.logger.checkAbstract(r,t);(0,a.defineReadOnly)(this,"locale",e)}t.prototype.split=function(e){return e.toLowerCase().split(/ +/g)};t.prototype.join=function(e){return e.join(" ")};t.check=function(e){var r=[];for(var t=0;t<2048;t++){var n=e.getWord(t);if(t!==e.getWordIndex(n)){return"0x"}r.push(n)}return(0,o.id)(r.join("\n")+"\n")};t.register=function(e,r){if(!r){r=e.locale}if(i){try{var t=window;if(t._ethers&&t._ethers.wordlists){if(!t._ethers.wordlists[r]){(0,a.defineReadOnly)(t._ethers.wordlists,r,e)}}}catch(e){}}};return t}();n.Wordlist=u},{"./_version":109,"@ethersproject/hash":41,"@ethersproject/logger":55,"@ethersproject/properties":61}],120:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.wordlists=void 0;var n=e("./lang-cz");var i=e("./lang-en");var o=e("./lang-es");var a=e("./lang-fr");var s=e("./lang-ja");var u=e("./lang-ko");var c=e("./lang-it");var f=e("./lang-zh");t.wordlists={cz:n.langCz,en:i.langEn,es:o.langEs,fr:a.langFr,it:c.langIt,ja:s.langJa,ko:u.langKo,zh:f.langZhCn,zh_cn:f.langZhCn,zh_tw:f.langZhTw}},{"./lang-cz":111,"./lang-en":112,"./lang-es":113,"./lang-fr":114,"./lang-it":115,"./lang-ja":116,"./lang-ko":117,"./lang-zh":118}],121:[function(e,j,x){"use strict";(function(e){function t(e){return parseInt(e)===e}function n(e){if(!t(e.length)){return false}for(var r=0;r<e.length;r++){if(!t(e[r])||e[r]<0||e[r]>255){return false}}return true}function o(e,r){if(e.buffer&&ArrayBuffer.isView(e)&&e.name==="Uint8Array"){if(r){if(e.slice){e=e.slice()}else{e=Array.prototype.slice.call(e)}}return e}if(Array.isArray(e)){if(!n(e)){throw new Error("Array contains invalid value: "+e)}return new Uint8Array(e)}if(t(e.length)&&n(e)){return new Uint8Array(e)}throw new Error("unsupported array-like object")}function u(e){return new Uint8Array(e)}function a(e,r,t,n,i){if(n!=null||i!=null){if(e.slice){e=e.slice(n,i)}else{e=Array.prototype.slice.call(e,n,i)}}r.set(e,t)}var r=function(){function e(e){var r=[],t=0;e=encodeURI(e);while(t<e.length){var n=e.charCodeAt(t++);if(n===37){r.push(parseInt(e.substr(t,2),16));t+=2}else{r.push(n)}}return o(r)}function r(e){var r=[],t=0;while(t<e.length){var n=e[t];if(n<128){r.push(String.fromCharCode(n));t++}else if(n>191&&n<224){r.push(String.fromCharCode((n&31)<<6|e[t+1]&63));t+=2}else{r.push(String.fromCharCode((n&15)<<12|(e[t+1]&63)<<6|e[t+2]&63));t+=3}}return r.join("")}return{toBytes:e,fromBytes:r}}();var i=function(){function e(e){var r=[];for(var t=0;t<e.length;t+=2){r.push(parseInt(e.substr(t,2),16))}return r}var i="0123456789abcdef";function r(e){var r=[];for(var t=0;t<e.length;t++){var n=e[t];r.push(i[(n&240)>>4]+i[n&15])}return r.join("")}return{toBytes:e,fromBytes:r}}();var l={16:10,24:12,32:14};var h=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145];var d=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22];var c=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125];var f=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986];var p=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766];var v=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126];var b=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436];var g=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890];var m=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935];var y=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600];var w=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480];var _=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795];var S=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855];var A=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150];var E=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function M(e){var r=[];for(var t=0;t<e.length;t+=4){r.push(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])}return r}var s=function(e){if(!(this instanceof s)){throw Error("AES must be instanitated with `new`")}Object.defineProperty(this,"key",{value:o(e,true)});this._prepare()};s.prototype._prepare=function(){var e=l[this.key.length];if(e==null){throw new Error("invalid key size (must be 16, 24 or 32 bytes)")}this._Ke=[];this._Kd=[];for(var r=0;r<=e;r++){this._Ke.push([0,0,0,0]);this._Kd.push([0,0,0,0])}var t=(e+1)*4;var n=this.key.length/4;var i=M(this.key);var o;for(var r=0;r<n;r++){o=r>>2;this._Ke[o][r%4]=i[r];this._Kd[e-o][r%4]=i[r]}var a=0;var s=n,u;while(s<t){u=i[n-1];i[0]^=d[u>>16&255]<<24^d[u>>8&255]<<16^d[u&255]<<8^d[u>>24&255]^h[a]<<24;a+=1;if(n!=8){for(var r=1;r<n;r++){i[r]^=i[r-1]}}else{for(var r=1;r<n/2;r++){i[r]^=i[r-1]}u=i[n/2-1];i[n/2]^=d[u&255]^d[u>>8&255]<<8^d[u>>16&255]<<16^d[u>>24&255]<<24;for(var r=n/2+1;r<n;r++){i[r]^=i[r-1]}}var r=0,c,f;while(r<n&&s<t){c=s>>2;f=s%4;this._Ke[c][f]=i[r];this._Kd[e-c][f]=i[r++];s++}}for(var c=1;c<e;c++){for(var f=0;f<4;f++){u=this._Kd[c][f];this._Kd[c][f]=_[u>>24&255]^S[u>>16&255]^A[u>>8&255]^E[u&255]}}};s.prototype.encrypt=function(e){if(e.length!=16){throw new Error("invalid plaintext size (must be 16 bytes)")}var r=this._Ke.length-1;var t=[0,0,0,0];var n=M(e);for(var i=0;i<4;i++){n[i]^=this._Ke[0][i]}for(var o=1;o<r;o++){for(var i=0;i<4;i++){t[i]=f[n[i]>>24&255]^p[n[(i+1)%4]>>16&255]^v[n[(i+2)%4]>>8&255]^b[n[(i+3)%4]&255]^this._Ke[o][i]}n=t.slice()}var a=u(16),s;for(var i=0;i<4;i++){s=this._Ke[r][i];a[4*i]=(d[n[i]>>24&255]^s>>24)&255;a[4*i+1]=(d[n[(i+1)%4]>>16&255]^s>>16)&255;a[4*i+2]=(d[n[(i+2)%4]>>8&255]^s>>8)&255;a[4*i+3]=(d[n[(i+3)%4]&255]^s)&255}return a};s.prototype.decrypt=function(e){if(e.length!=16){throw new Error("invalid ciphertext size (must be 16 bytes)")}var r=this._Kd.length-1;var t=[0,0,0,0];var n=M(e);for(var i=0;i<4;i++){n[i]^=this._Kd[0][i]}for(var o=1;o<r;o++){for(var i=0;i<4;i++){t[i]=g[n[i]>>24&255]^m[n[(i+3)%4]>>16&255]^y[n[(i+2)%4]>>8&255]^w[n[(i+1)%4]&255]^this._Kd[o][i]}n=t.slice()}var a=u(16),s;for(var i=0;i<4;i++){s=this._Kd[r][i];a[4*i]=(c[n[i]>>24&255]^s>>24)&255;a[4*i+1]=(c[n[(i+3)%4]>>16&255]^s>>16)&255;a[4*i+2]=(c[n[(i+2)%4]>>8&255]^s>>8)&255;a[4*i+3]=(c[n[(i+1)%4]&255]^s)&255}return a};var P=function(e){if(!(this instanceof P)){throw Error("AES must be instanitated with `new`")}this.description="Electronic Code Block";this.name="ecb";this._aes=new s(e)};P.prototype.encrypt=function(e){e=o(e);if(e.length%16!==0){throw new Error("invalid plaintext size (must be multiple of 16 bytes)")}var r=u(e.length);var t=u(16);for(var n=0;n<e.length;n+=16){a(e,t,0,n,n+16);t=this._aes.encrypt(t);a(t,r,n)}return r};P.prototype.decrypt=function(e){e=o(e);if(e.length%16!==0){throw new Error("invalid ciphertext size (must be multiple of 16 bytes)")}var r=u(e.length);var t=u(16);for(var n=0;n<e.length;n+=16){a(e,t,0,n,n+16);t=this._aes.decrypt(t);a(t,r,n)}return r};var T=function(e,r){if(!(this instanceof T)){throw Error("AES must be instanitated with `new`")}this.description="Cipher Block Chaining";this.name="cbc";if(!r){r=u(16)}else if(r.length!=16){throw new Error("invalid initialation vector size (must be 16 bytes)")}this._lastCipherblock=o(r,true);this._aes=new s(e)};T.prototype.encrypt=function(e){e=o(e);if(e.length%16!==0){throw new Error("invalid plaintext size (must be multiple of 16 bytes)")}var r=u(e.length);var t=u(16);for(var n=0;n<e.length;n+=16){a(e,t,0,n,n+16);for(var i=0;i<16;i++){t[i]^=this._lastCipherblock[i]}this._lastCipherblock=this._aes.encrypt(t);a(this._lastCipherblock,r,n)}return r};T.prototype.decrypt=function(e){e=o(e);if(e.length%16!==0){throw new Error("invalid ciphertext size (must be multiple of 16 bytes)")}var r=u(e.length);var t=u(16);for(var n=0;n<e.length;n+=16){a(e,t,0,n,n+16);t=this._aes.decrypt(t);for(var i=0;i<16;i++){r[n+i]=t[i]^this._lastCipherblock[i]}a(e,this._lastCipherblock,0,n,n+16)}return r};var k=function(e,r,t){if(!(this instanceof k)){throw Error("AES must be instanitated with `new`")}this.description="Cipher Feedback";this.name="cfb";if(!r){r=u(16)}else if(r.length!=16){throw new Error("invalid initialation vector size (must be 16 size)")}if(!t){t=1}this.segmentSize=t;this._shiftRegister=o(r,true);this._aes=new s(e)};k.prototype.encrypt=function(e){if(e.length%this.segmentSize!=0){throw new Error("invalid plaintext size (must be segmentSize bytes)")}var r=o(e,true);var t;for(var n=0;n<r.length;n+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var i=0;i<this.segmentSize;i++){r[n+i]^=t[i]}a(this._shiftRegister,this._shiftRegister,0,this.segmentSize);a(r,this._shiftRegister,16-this.segmentSize,n,n+this.segmentSize)}return r};k.prototype.decrypt=function(e){if(e.length%this.segmentSize!=0){throw new Error("invalid ciphertext size (must be segmentSize bytes)")}var r=o(e,true);var t;for(var n=0;n<r.length;n+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var i=0;i<this.segmentSize;i++){r[n+i]^=t[i]}a(this._shiftRegister,this._shiftRegister,0,this.segmentSize);a(e,this._shiftRegister,16-this.segmentSize,n,n+this.segmentSize)}return r};var O=function(e,r){if(!(this instanceof O)){throw Error("AES must be instanitated with `new`")}this.description="Output Feedback";this.name="ofb";if(!r){r=u(16)}else if(r.length!=16){throw new Error("invalid initialation vector size (must be 16 bytes)")}this._lastPrecipher=o(r,true);this._lastPrecipherIndex=16;this._aes=new s(e)};O.prototype.encrypt=function(e){var r=o(e,true);for(var t=0;t<r.length;t++){if(this._lastPrecipherIndex===16){this._lastPrecipher=this._aes.encrypt(this._lastPrecipher);this._lastPrecipherIndex=0}r[t]^=this._lastPrecipher[this._lastPrecipherIndex++]}return r};O.prototype.decrypt=O.prototype.encrypt;var B=function(e){if(!(this instanceof B)){throw Error("Counter must be instanitated with `new`")}if(e!==0&&!e){e=1}if(typeof e==="number"){this._counter=u(16);this.setValue(e)}else{this.setBytes(e)}};B.prototype.setValue=function(e){if(typeof e!=="number"||parseInt(e)!=e){throw new Error("invalid counter value (must be an integer)")}for(var r=15;r>=0;--r){this._counter[r]=e%256;e=e>>8}};B.prototype.setBytes=function(e){e=o(e,true);if(e.length!=16){throw new Error("invalid counter bytes size (must be 16 bytes)")}this._counter=e};B.prototype.increment=function(){for(var e=15;e>=0;e--){if(this._counter[e]===255){this._counter[e]=0}else{this._counter[e]++;break}}};var C=function(e,r){if(!(this instanceof C)){throw Error("AES must be instanitated with `new`")}this.description="Counter";this.name="ctr";if(!(r instanceof B)){r=new B(r)}this._counter=r;this._remainingCounter=null;this._remainingCounterIndex=16;this._aes=new s(e)};C.prototype.encrypt=function(e){var r=o(e,true);for(var t=0;t<r.length;t++){if(this._remainingCounterIndex===16){this._remainingCounter=this._aes.encrypt(this._counter._counter);this._remainingCounterIndex=0;this._counter.increment()}r[t]^=this._remainingCounter[this._remainingCounterIndex++]}return r};C.prototype.decrypt=C.prototype.encrypt;function R(e){e=o(e,true);var r=16-e.length%16;var t=u(e.length+r);a(e,t);for(var n=e.length;n<t.length;n++){t[n]=r}return t}function L(e){e=o(e,true);if(e.length<16){throw new Error("PKCS#7 invalid length")}var r=e[e.length-1];if(r>16){throw new Error("PKCS#7 padding byte out of range")}var t=e.length-r;for(var n=0;n<r;n++){if(e[t+n]!==r){throw new Error("PKCS#7 invalid padding byte")}}var i=u(t);a(e,i,0,0,t);return i}var F={AES:s,Counter:B,ModeOfOperation:{ecb:P,cbc:T,cfb:k,ofb:O,ctr:C},utils:{hex:i,utf8:r},padding:{pkcs7:{pad:R,strip:L}},_arrayTest:{coerceArray:o,createArray:u,copyArray:a}};if(typeof x!=="undefined"){j.exports=F}else if(typeof X==="function"&&X.amd){X(F)}else{if(e.aesjs){F._aesjs=e.aesjs}e.aesjs=F}})(this)},{}],122:[function(e,r,t){"use strict";const n=t;n.bignum=e("bn.js");n.define=e("./asn1/api").define;n.base=e("./asn1/base");n.constants=e("./asn1/constants");n.decoders=e("./asn1/decoders");n.encoders=e("./asn1/encoders")},{"./asn1/api":123,"./asn1/base":125,"./asn1/constants":129,"./asn1/decoders":131,"./asn1/encoders":134,"bn.js":138}],123:[function(e,r,t){"use strict";const n=e("./encoders");const i=e("./decoders");const o=e("inherits");const a=t;a.define=function e(r,t){return new s(r,t)};function s(e,r){this.name=e;this.body=r;this.decoders={};this.encoders={}}s.prototype._createNamed=function e(n){const r=this.name;function t(e){this._initNamed(e,r)}o(t,n);t.prototype._initNamed=function e(r,t){n.call(this,r,t)};return new t(this)};s.prototype._getDecoder=function e(r){r=r||"der";if(!this.decoders.hasOwnProperty(r))this.decoders[r]=this._createNamed(i[r]);return this.decoders[r]};s.prototype.decode=function e(r,t,n){return this._getDecoder(t).decode(r,n)};s.prototype._getEncoder=function e(r){r=r||"der";if(!this.encoders.hasOwnProperty(r))this.encoders[r]=this._createNamed(n[r]);return this.encoders[r]};s.prototype.encode=function e(r,t,n){return this._getEncoder(t).encode(r,n)}},{"./decoders":131,"./encoders":134,inherits:256}],124:[function(e,r,t){"use strict";const n=e("inherits");const i=e("../base/reporter").Reporter;const o=e("safer-buffer").Buffer;function a(e,r){i.call(this,r);if(!o.isBuffer(e)){this.error("Input not Buffer");return}this.base=e;this.offset=0;this.length=e.length}n(a,i);t.DecoderBuffer=a;a.isDecoderBuffer=function e(r){if(r instanceof a){return true}const t=typeof r==="object"&&o.isBuffer(r.base)&&r.constructor.name==="DecoderBuffer"&&typeof r.offset==="number"&&typeof r.length==="number"&&typeof r.save==="function"&&typeof r.restore==="function"&&typeof r.isEmpty==="function"&&typeof r.readUInt8==="function"&&typeof r.skip==="function"&&typeof r.raw==="function";return t};a.prototype.save=function e(){return{offset:this.offset,reporter:i.prototype.save.call(this)}};a.prototype.restore=function e(r){const t=new a(this.base);t.offset=r.offset;t.length=this.offset;this.offset=r.offset;i.prototype.restore.call(this,r.reporter);return t};a.prototype.isEmpty=function e(){return this.offset===this.length};a.prototype.readUInt8=function e(r){if(this.offset+1<=this.length)return this.base.readUInt8(this.offset++,true);else return this.error(r||"DecoderBuffer overrun")};a.prototype.skip=function e(r,t){if(!(this.offset+r<=this.length))return this.error(t||"DecoderBuffer overrun");const n=new a(this.base);n._reporterState=this._reporterState;n.offset=this.offset;n.length=this.offset+r;this.offset+=r;return n};a.prototype.raw=function e(r){return this.base.slice(r?r.offset:this.offset,this.length)};function s(e,r){if(Array.isArray(e)){this.length=0;this.value=e.map(function(e){if(!s.isEncoderBuffer(e))e=new s(e,r);this.length+=e.length;return e},this)}else if(typeof e==="number"){if(!(0<=e&&e<=255))return r.error("non-byte EncoderBuffer value");this.value=e;this.length=1}else if(typeof e==="string"){this.value=e;this.length=o.byteLength(e)}else if(o.isBuffer(e)){this.value=e;this.length=e.length}else{return r.error("Unsupported type: "+typeof e)}}t.EncoderBuffer=s;s.isEncoderBuffer=function e(r){if(r instanceof s){return true}const t=typeof r==="object"&&r.constructor.name==="EncoderBuffer"&&typeof r.length==="number"&&typeof r.join==="function";return t};s.prototype.join=function e(r,t){if(!r)r=o.alloc(this.length);if(!t)t=0;if(this.length===0)return r;if(Array.isArray(this.value)){this.value.forEach(function(e){e.join(r,t);t+=e.length})}else{if(typeof this.value==="number")r[t]=this.value;else if(typeof this.value==="string")r.write(this.value,t);else if(o.isBuffer(this.value))this.value.copy(r,t);t+=this.length}return r}},{"../base/reporter":127,inherits:256,"safer-buffer":284}],125:[function(e,r,t){"use strict";const n=t;n.Reporter=e("./reporter").Reporter;n.DecoderBuffer=e("./buffer").DecoderBuffer;n.EncoderBuffer=e("./buffer").EncoderBuffer;n.Node=e("./node")},{"./buffer":124,"./node":126,"./reporter":127}],126:[function(e,r,t){"use strict";const l=e("../base/reporter").Reporter;const n=e("../base/buffer").EncoderBuffer;const d=e("../base/buffer").DecoderBuffer;const o=e("minimalistic-assert");const i=["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"];const a=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(i);const s=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function u(e,r,t){const n={};this._baseState=n;n.name=t;n.enc=e;n.parent=r||null;n.children=null;n.tag=null;n.args=null;n.reverseArgs=null;n.choice=null;n.optional=false;n.any=false;n.obj=false;n.use=null;n.useDecoder=null;n.key=null;n["default"]=null;n.explicit=null;n.implicit=null;n.contains=null;if(!n.parent){n.children=[];this._wrap()}}r.exports=u;const c=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];u.prototype.clone=function e(){const r=this._baseState;const t={};c.forEach(function(e){t[e]=r[e]});const n=new this.constructor(t.parent);n._baseState=t;return n};u.prototype._wrap=function e(){const n=this._baseState;a.forEach(function(t){this[t]=function e(){const r=new this.constructor(this);n.children.push(r);return r[t].apply(r,arguments)}},this)};u.prototype._init=function e(r){const t=this._baseState;o(t.parent===null);r.call(this);t.children=t.children.filter(function(e){return e._baseState.parent===this},this);o.equal(t.children.length,1,"Root node can have only one child")};u.prototype._useArgs=function e(r){const t=this._baseState;const n=r.filter(function(e){return e instanceof this.constructor},this);r=r.filter(function(e){return!(e instanceof this.constructor)},this);if(n.length!==0){o(t.children===null);t.children=n;n.forEach(function(e){e._baseState.parent=this},this)}if(r.length!==0){o(t.args===null);t.args=r;t.reverseArgs=r.map(function(t){if(typeof t!=="object"||t.constructor!==Object)return t;const n={};Object.keys(t).forEach(function(e){if(e==(e|0))e|=0;const r=t[e];n[r]=e});return n})}};s.forEach(function(t){u.prototype[t]=function e(){const r=this._baseState;throw new Error(t+" not implemented for encoding: "+r.enc)}});i.forEach(function(n){u.prototype[n]=function e(){const r=this._baseState;const t=Array.prototype.slice.call(arguments);o(r.tag===null);r.tag=n;this._useArgs(t);return this}});u.prototype.use=function e(r){o(r);const t=this._baseState;o(t.use===null);t.use=r;return this};u.prototype.optional=function e(){const r=this._baseState;r.optional=true;return this};u.prototype.def=function e(r){const t=this._baseState;o(t["default"]===null);t["default"]=r;t.optional=true;return this};u.prototype.explicit=function e(r){const t=this._baseState;o(t.explicit===null&&t.implicit===null);t.explicit=r;return this};u.prototype.implicit=function e(r){const t=this._baseState;o(t.explicit===null&&t.implicit===null);t.implicit=r;return this};u.prototype.obj=function e(){const r=this._baseState;const t=Array.prototype.slice.call(arguments);r.obj=true;if(t.length!==0)this._useArgs(t);return this};u.prototype.key=function e(r){const t=this._baseState;o(t.key===null);t.key=r;return this};u.prototype.any=function e(){const r=this._baseState;r.any=true;return this};u.prototype.choice=function e(r){const t=this._baseState;o(t.choice===null);t.choice=r;this._useArgs(Object.keys(r).map(function(e){return r[e]}));return this};u.prototype.contains=function e(r){const t=this._baseState;o(t.use===null);t.contains=r;return this};u.prototype._decode=function e(t,n){const r=this._baseState;if(r.parent===null)return t.wrapResult(r.children[0]._decode(t,n));let i=r["default"];let o=true;let a=null;if(r.key!==null)a=t.enterKey(r.key);if(r.optional){let e=null;if(r.explicit!==null)e=r.explicit;else if(r.implicit!==null)e=r.implicit;else if(r.tag!==null)e=r.tag;if(e===null&&!r.any){const u=t.save();try{if(r.choice===null)this._decodeGeneric(r.tag,t,n);else this._decodeChoice(t,n);o=true}catch(e){o=false}t.restore(u)}else{o=this._peekTag(t,e,r.any);if(t.isError(o))return o}}let s;if(r.obj&&o)s=t.enterObject();if(o){if(r.explicit!==null){const f=this._decodeTag(t,r.explicit);if(t.isError(f))return f;t=f}const c=t.offset;if(r.use===null&&r.choice===null){let e;if(r.any)e=t.save();const l=this._decodeTag(t,r.implicit!==null?r.implicit:r.tag,r.any);if(t.isError(l))return l;if(r.any)i=t.raw(e);else t=l}if(n&&n.track&&r.tag!==null)n.track(t.path(),c,t.length,"tagged");if(n&&n.track&&r.tag!==null)n.track(t.path(),t.offset,t.length,"content");if(r.any){}else if(r.choice===null){i=this._decodeGeneric(r.tag,t,n)}else{i=this._decodeChoice(t,n)}if(t.isError(i))return i;if(!r.any&&r.choice===null&&r.children!==null){r.children.forEach(function e(r){r._decode(t,n)})}if(r.contains&&(r.tag==="octstr"||r.tag==="bitstr")){const h=new d(i);i=this._getUse(r.contains,t._reporterState.obj)._decode(h,n)}}if(r.obj&&o)i=t.leaveObject(s);if(r.key!==null&&(i!==null||o===true))t.leaveKey(a,r.key,i);else if(a!==null)t.exitKey(a);return i};u.prototype._decodeGeneric=function e(r,t,n){const i=this._baseState;if(r==="seq"||r==="set")return null;if(r==="seqof"||r==="setof")return this._decodeList(t,r,i.args[0],n);else if(/str$/.test(r))return this._decodeStr(t,r,n);else if(r==="objid"&&i.args)return this._decodeObjid(t,i.args[0],i.args[1],n);else if(r==="objid")return this._decodeObjid(t,null,null,n);else if(r==="gentime"||r==="utctime")return this._decodeTime(t,r,n);else if(r==="null_")return this._decodeNull(t,n);else if(r==="bool")return this._decodeBool(t,n);else if(r==="objDesc")return this._decodeStr(t,r,n);else if(r==="int"||r==="enum")return this._decodeInt(t,i.args&&i.args[0],n);if(i.use!==null){return this._getUse(i.use,t._reporterState.obj)._decode(t,n)}else{return t.error("unknown tag: "+r)}};u.prototype._getUse=function e(r,t){const n=this._baseState;n.useDecoder=this._use(r,t);o(n.useDecoder._baseState.parent===null);n.useDecoder=n.useDecoder._baseState.children[0];if(n.implicit!==n.useDecoder._baseState.implicit){n.useDecoder=n.useDecoder.clone();n.useDecoder._baseState.implicit=n.implicit}return n.useDecoder};u.prototype._decodeChoice=function e(i,o){const a=this._baseState;let s=null;let u=false;Object.keys(a.choice).some(function(e){const r=i.save();const t=a.choice[e];try{const n=t._decode(i,o);if(i.isError(n))return false;s={type:e,value:n};u=true}catch(e){i.restore(r);return false}return true},this);if(!u)return i.error("Choice not matched");return s};u.prototype._createEncoderBuffer=function e(r){return new n(r,this.reporter)};u.prototype._encode=function e(r,t,n){const i=this._baseState;if(i["default"]!==null&&i["default"]===r)return;const o=this._encodeValue(r,t,n);if(o===undefined)return;if(this._skipDefault(o,t,n))return;return o};u.prototype._encodeValue=function e(n,i,r){const t=this._baseState;if(t.parent===null)return t.children[0]._encode(n,i||new l);let o=null;this.reporter=i;if(t.optional&&n===undefined){if(t["default"]!==null)n=t["default"];else return}let a=null;let s=false;if(t.any){o=this._createEncoderBuffer(n)}else if(t.choice){o=this._encodeChoice(n,i)}else if(t.contains){a=this._getUse(t.contains,r)._encode(n,i);s=true}else if(t.children){a=t.children.map(function(e){if(e._baseState.tag==="null_")return e._encode(null,i,n);if(e._baseState.key===null)return i.error("Child should have a key");const r=i.enterKey(e._baseState.key);if(typeof n!=="object")return i.error("Child expected, but input is not object");const t=e._encode(n[e._baseState.key],i,n);i.leaveKey(r);return t},this).filter(function(e){return e});a=this._createEncoderBuffer(a)}else{if(t.tag==="seqof"||t.tag==="setof"){if(!(t.args&&t.args.length===1))return i.error("Too many args for : "+t.tag);if(!Array.isArray(n))return i.error("seqof/setof, but data is not Array");const u=this.clone();u._baseState.implicit=null;a=this._createEncoderBuffer(n.map(function(e){const r=this._baseState;return this._getUse(r.args[0],n)._encode(e,i)},u))}else if(t.use!==null){o=this._getUse(t.use,r)._encode(n,i)}else{a=this._encodePrimitive(t.tag,n);s=true}}if(!t.any&&t.choice===null){const c=t.implicit!==null?t.implicit:t.tag;const f=t.implicit===null?"universal":"context";if(c===null){if(t.use===null)i.error("Tag could be omitted only for .use()")}else{if(t.use===null)o=this._encodeComposite(c,s,f,a)}}if(t.explicit!==null)o=this._encodeComposite(t.explicit,false,"context",o);return o};u.prototype._encodeChoice=function e(r,t){const n=this._baseState;const i=n.choice[r.type];if(!i){o(false,r.type+" not found in "+JSON.stringify(Object.keys(n.choice)))}return i._encode(r.value,t)};u.prototype._encodePrimitive=function e(r,t){const n=this._baseState;if(/str$/.test(r))return this._encodeStr(t,r);else if(r==="objid"&&n.args)return this._encodeObjid(t,n.reverseArgs[0],n.args[1]);else if(r==="objid")return this._encodeObjid(t,null,null);else if(r==="gentime"||r==="utctime")return this._encodeTime(t,r);else if(r==="null_")return this._encodeNull();else if(r==="int"||r==="enum")return this._encodeInt(t,n.args&&n.reverseArgs[0]);else if(r==="bool")return this._encodeBool(t);else if(r==="objDesc")return this._encodeStr(t,r);else throw new Error("Unsupported tag: "+r)};u.prototype._isNumstr=function e(r){return/^[0-9 ]*$/.test(r)};u.prototype._isPrintstr=function e(r){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(r)}},{"../base/buffer":124,"../base/reporter":127,"minimalistic-assert":260}],127:[function(e,r,t){"use strict";const n=e("inherits");function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}t.Reporter=i;i.prototype.isError=function e(r){return r instanceof o};i.prototype.save=function e(){const r=this._reporterState;return{obj:r.obj,pathLen:r.path.length}};i.prototype.restore=function e(r){const t=this._reporterState;t.obj=r.obj;t.path=t.path.slice(0,r.pathLen)};i.prototype.enterKey=function e(r){return this._reporterState.path.push(r)};i.prototype.exitKey=function e(r){const t=this._reporterState;t.path=t.path.slice(0,r-1)};i.prototype.leaveKey=function e(r,t,n){const i=this._reporterState;this.exitKey(r);if(i.obj!==null)i.obj[t]=n};i.prototype.path=function e(){return this._reporterState.path.join("/")};i.prototype.enterObject=function e(){const r=this._reporterState;const t=r.obj;r.obj={};return t};i.prototype.leaveObject=function e(r){const t=this._reporterState;const n=t.obj;t.obj=r;return n};i.prototype.error=function e(r){let t;const n=this._reporterState;const i=r instanceof o;if(i){t=r}else{t=new o(n.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),r.message||r,r.stack)}if(!n.options.partial)throw t;if(!i)n.errors.push(t);return t};i.prototype.wrapResult=function e(r){const t=this._reporterState;if(!t.options.partial)return r;return{result:this.isError(r)?null:r,errors:t.errors}};function o(e,r){this.path=e;this.rethrow(r)}n(o,Error);o.prototype.rethrow=function e(r){this.message=r+" at: "+(this.path||"(shallow)");if(Error.captureStackTrace)Error.captureStackTrace(this,o);if(!this.stack){try{throw new Error(this.message)}catch(e){this.stack=e.stack}}return this}},{inherits:256}],128:[function(e,r,t){"use strict";function n(t){const n={};Object.keys(t).forEach(function(e){if((e|0)==e)e=e|0;const r=t[e];n[r]=e});return n}t.tagClass={0:"universal",1:"application",2:"context",3:"private"};t.tagClassByName=n(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=n(t.tag)},{}],129:[function(e,r,t){"use strict";const n=t;n._reverse=function e(t){const n={};Object.keys(t).forEach(function(e){if((e|0)==e)e=e|0;const r=t[e];n[r]=e});return n};n.der=e("./der")},{"./der":128}],130:[function(e,r,t){"use strict";const n=e("inherits");const o=e("bn.js");const i=e("../base/buffer").DecoderBuffer;const a=e("../base/node");const s=e("../constants/der");function u(e){this.enc="der";this.name=e.name;this.entity=e;this.tree=new c;this.tree._init(e.body)}r.exports=u;u.prototype.decode=function e(r,t){if(!i.isDecoderBuffer(r)){r=new i(r,t)}return this.tree._decode(r,t)};function c(e){a.call(this,"der",e)}n(c,a);c.prototype._peekTag=function e(r,t,n){if(r.isEmpty())return false;const i=r.save();const o=f(r,'Failed to peek tag: "'+t+'"');if(r.isError(o))return o;r.restore(i);return o.tag===t||o.tagStr===t||o.tagStr+"of"===t||n};c.prototype._decodeTag=function e(r,t,n){const i=f(r,'Failed to decode tag of "'+t+'"');if(r.isError(i))return i;let o=l(r,i.primitive,'Failed to get length of "'+t+'"');if(r.isError(o))return o;if(!n&&i.tag!==t&&i.tagStr!==t&&i.tagStr+"of"!==t){return r.error('Failed to match tag: "'+t+'"')}if(i.primitive||o!==null)return r.skip(o,'Failed to match body of: "'+t+'"');const a=r.save();const s=this._skipUntilEnd(r,'Failed to skip indefinite length body: "'+this.tag+'"');if(r.isError(s))return s;o=r.offset-a.offset;r.restore(a);return r.skip(o,'Failed to match body of: "'+t+'"')};c.prototype._skipUntilEnd=function e(r,t){for(;;){const n=f(r,t);if(r.isError(n))return n;const i=l(r,n.primitive,t);if(r.isError(i))return i;let e;if(n.primitive||i!==null)e=r.skip(i);else e=this._skipUntilEnd(r,t);if(r.isError(e))return e;if(n.tagStr==="end")break}};c.prototype._decodeList=function e(r,t,n,i){const o=[];while(!r.isEmpty()){const a=this._peekTag(r,"end");if(r.isError(a))return a;const s=n.decode(r,"der",i);if(r.isError(s)&&a)break;o.push(s)}return o};c.prototype._decodeStr=function e(t,r){if(r==="bitstr"){const n=t.readUInt8();if(t.isError(n))return n;return{unused:n,data:t.raw()}}else if(r==="bmpstr"){const i=t.raw();if(i.length%2===1)return t.error("Decoding of string type: bmpstr length mismatch");let r="";for(let e=0;e<i.length/2;e++){r+=String.fromCharCode(i.readUInt16BE(e*2))}return r}else if(r==="numstr"){const o=t.raw().toString("ascii");if(!this._isNumstr(o)){return t.error("Decoding of string type: "+"numstr unsupported characters")}return o}else if(r==="octstr"){return t.raw()}else if(r==="objDesc"){return t.raw()}else if(r==="printstr"){const a=t.raw().toString("ascii");if(!this._isPrintstr(a)){return t.error("Decoding of string type: "+"printstr unsupported characters")}return a}else if(/str$/.test(r)){return t.raw().toString()}else{return t.error("Decoding of string type: "+r+" unsupported")}};c.prototype._decodeObjid=function e(r,t,n){let i;const o=[];let a=0;let s=0;while(!r.isEmpty()){s=r.readUInt8();a<<=7;a|=s&127;if((s&128)===0){o.push(a);a=0}}if(s&128)o.push(a);const u=o[0]/40|0;const c=o[0]%40;if(n)i=o;else i=[u,c].concat(o.slice(1));if(t){let e=t[i.join(" ")];if(e===undefined)e=t[i.join(".")];if(e!==undefined)i=e}return i};c.prototype._decodeTime=function e(r,t){const n=r.raw().toString();let i;let o;let a;let s;let u;let c;if(t==="gentime"){i=n.slice(0,4)|0;o=n.slice(4,6)|0;a=n.slice(6,8)|0;s=n.slice(8,10)|0;u=n.slice(10,12)|0;c=n.slice(12,14)|0}else if(t==="utctime"){i=n.slice(0,2)|0;o=n.slice(2,4)|0;a=n.slice(4,6)|0;s=n.slice(6,8)|0;u=n.slice(8,10)|0;c=n.slice(10,12)|0;if(i<70)i=2e3+i;else i=1900+i}else{return r.error("Decoding "+t+" time is not supported yet")}return Date.UTC(i,o-1,a,s,u,c,0)};c.prototype._decodeNull=function e(){return null};c.prototype._decodeBool=function e(r){const t=r.readUInt8();if(r.isError(t))return t;else return t!==0};c.prototype._decodeInt=function e(r,t){const n=r.raw();let i=new o(n);if(t)i=t[i.toString(10)]||i;return i};c.prototype._use=function e(r,t){if(typeof r==="function")r=r(t);return r._getDecoder("der").tree};function f(r,t){let n=r.readUInt8(t);if(r.isError(n))return n;const e=s.tagClass[n>>6];const i=(n&32)===0;if((n&31)===31){let e=n;n=0;while((e&128)===128){e=r.readUInt8(t);if(r.isError(e))return e;n<<=7;n|=e&127}}else{n&=31}const o=s.tag[n];return{cls:e,primitive:i,tag:n,tagStr:o}}function l(r,e,t){let n=r.readUInt8(t);if(r.isError(n))return n;if(!e&&n===128)return null;if((n&128)===0){return n}const i=n&127;if(i>4)return r.error("length octect is too long");n=0;for(let e=0;e<i;e++){n<<=8;const o=r.readUInt8(t);if(r.isError(o))return o;n|=o}return n}},{"../base/buffer":124,"../base/node":126,"../constants/der":128,"bn.js":138,inherits:256}],131:[function(e,r,t){"use strict";const n=t;n.der=e("./der");n.pem=e("./pem")},{"./der":130,"./pem":132}],132:[function(e,r,t){"use strict";const n=e("inherits");const l=e("safer-buffer").Buffer;const h=e("./der");function i(e){h.call(this,e);this.enc="pem"}n(i,h);r.exports=i;i.prototype.decode=function e(r,t){const n=r.toString().split(/[\r\n]+/g);const i=t.label.toUpperCase();const o=/^-----(BEGIN|END) ([^-]+)-----$/;let a=-1;let s=-1;for(let e=0;e<n.length;e++){const f=n[e].match(o);if(f===null)continue;if(f[2]!==i)continue;if(a===-1){if(f[1]!=="BEGIN")break;a=e}else{if(f[1]!=="END")break;s=e;break}}if(a===-1||s===-1)throw new Error("PEM section not found for: "+i);const u=n.slice(a+1,s).join("");u.replace(/[^a-z0-9+/=]+/gi,"");const c=l.from(u,"base64");return h.prototype.decode.call(this,c,t)}},{"./der":130,inherits:256,"safer-buffer":284}],133:[function(e,r,t){"use strict";const n=e("inherits");const u=e("safer-buffer").Buffer;const i=e("../base/node");const o=e("../constants/der");function a(e){this.enc="der";this.name=e.name;this.entity=e;this.tree=new s;this.tree._init(e.body)}r.exports=a;a.prototype.encode=function e(r,t){return this.tree._encode(r,t).join()};function s(e){i.call(this,"der",e)}n(s,i);s.prototype._encodeComposite=function e(r,t,n,i){const o=f(r,t,n,this.reporter);if(i.length<128){const s=u.alloc(2);s[0]=o;s[1]=i.length;return this._createEncoderBuffer([s,i])}let a=1;for(let e=i.length;e>=256;e>>=8)a++;const s=u.alloc(1+1+a);s[0]=o;s[1]=128|a;for(let e=1+a,r=i.length;r>0;e--,r>>=8)s[e]=r&255;return this._createEncoderBuffer([s,i])};s.prototype._encodeStr=function e(r,t){if(t==="bitstr"){return this._createEncoderBuffer([r.unused|0,r.data])}else if(t==="bmpstr"){const n=u.alloc(r.length*2);for(let e=0;e<r.length;e++){n.writeUInt16BE(r.charCodeAt(e),e*2)}return this._createEncoderBuffer(n)}else if(t==="numstr"){if(!this._isNumstr(r)){return this.reporter.error("Encoding of string type: numstr supports "+"only digits and space")}return this._createEncoderBuffer(r)}else if(t==="printstr"){if(!this._isPrintstr(r)){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(r)}else if(/str$/.test(t)){return this._createEncoderBuffer(r)}else if(t==="objDesc"){return this._createEncoderBuffer(r)}else{return this.reporter.error("Encoding of string type: "+t+" unsupported")}};s.prototype._encodeObjid=function e(t,r,n){if(typeof t==="string"){if(!r)return this.reporter.error("string objid given, but no values map found");if(!r.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=r[t].split(/[\s.]+/g);for(let e=0;e<t.length;e++)t[e]|=0}else if(Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]|=0}if(!Array.isArray(t)){return this.reporter.error("objid() should be either array or string, "+"got: "+JSON.stringify(t))}if(!n){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,t[0]*40+t[1])}let i=0;for(let r=0;r<t.length;r++){let e=t[r];for(i++;e>=128;e>>=7)i++}const o=u.alloc(i);let a=o.length-1;for(let r=t.length-1;r>=0;r--){let e=t[r];o[a--]=e&127;while((e>>=7)>0)o[a--]=128|e&127}return this._createEncoderBuffer(o)};function c(e){if(e<10)return"0"+e;else return e}s.prototype._encodeTime=function e(r,t){let n;const i=new Date(r);if(t==="gentime"){n=[c(i.getUTCFullYear()),c(i.getUTCMonth()+1),c(i.getUTCDate()),c(i.getUTCHours()),c(i.getUTCMinutes()),c(i.getUTCSeconds()),"Z"].join("")}else if(t==="utctime"){n=[c(i.getUTCFullYear()%100),c(i.getUTCMonth()+1),c(i.getUTCDate()),c(i.getUTCHours()),c(i.getUTCMinutes()),c(i.getUTCSeconds()),"Z"].join("")}else{this.reporter.error("Encoding "+t+" time is not supported yet")}return this._encodeStr(n,"octstr")};s.prototype._encodeNull=function e(){return this._createEncoderBuffer("")};s.prototype._encodeInt=function e(r,t){if(typeof r==="string"){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(r)){return this.reporter.error("Values map doesn't contain: "+JSON.stringify(r))}r=t[r]}if(typeof r!=="number"&&!u.isBuffer(r)){const o=r.toArray();if(!r.sign&&o[0]&128){o.unshift(0)}r=u.from(o)}if(u.isBuffer(r)){let e=r.length;if(r.length===0)e++;const i=u.alloc(e);r.copy(i);if(r.length===0)i[0]=0;return this._createEncoderBuffer(i)}if(r<128)return this._createEncoderBuffer(r);if(r<256)return this._createEncoderBuffer([0,r]);let n=1;for(let e=r;e>=256;e>>=8)n++;const i=new Array(n);for(let e=i.length-1;e>=0;e--){i[e]=r&255;r>>=8}if(i[0]&128){i.unshift(0)}return this._createEncoderBuffer(u.from(i))};s.prototype._encodeBool=function e(r){return this._createEncoderBuffer(r?255:0)};s.prototype._use=function e(r,t){if(typeof r==="function")r=r(t);return r._getEncoder("der").tree};s.prototype._skipDefault=function e(r,t,n){const i=this._baseState;let o;if(i["default"]===null)return false;const a=r.join();if(i.defaultBuffer===undefined)i.defaultBuffer=this._encodeValue(i["default"],t,n).join();if(a.length!==i.defaultBuffer.length)return false;for(o=0;o<a.length;o++)if(a[o]!==i.defaultBuffer[o])return false;return true};function f(e,r,t,n){let i;if(e==="seqof")e="seq";else if(e==="setof")e="set";if(o.tagByName.hasOwnProperty(e))i=o.tagByName[e];else if(typeof e==="number"&&(e|0)===e)i=e;else return n.error("Unknown tag: "+e);if(i>=31)return n.error("Multi-octet tag encoding unsupported");if(!r)i|=32;i|=o.tagClassByName[t||"universal"]<<6;return i}},{"../base/node":126,"../constants/der":128,inherits:256,"safer-buffer":284}],134:[function(e,r,t){"use strict";const n=t;n.der=e("./der");n.pem=e("./pem")},{"./der":133,"./pem":135}],135:[function(e,r,t){"use strict";const n=e("inherits");const a=e("./der");function i(e){a.call(this,e);this.enc="pem"}n(i,a);r.exports=i;i.prototype.encode=function e(r,t){const n=a.prototype.encode.call(this,r);const i=n.toString("base64");const o=["-----BEGIN "+t.label+"-----"];for(let e=0;e<i.length;e+=64)o.push(i.slice(e,e+64));o.push("-----END "+t.label+"-----");return o.join("\n")}},{"./der":133,inherits:256}],136:[function(e,r,t){"use strict";t.byteLength=a;t.toByteArray=s;t.fromByteArray=v;var u=[];var c=[];var f=typeof Uint8Array!=="undefined"?Uint8Array:Array;var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i=0,o=n.length;i<o;++i){u[i]=n[i];c[n.charCodeAt(i)]=i}c["-".charCodeAt(0)]=62;c["_".charCodeAt(0)]=63;function l(e){var r=e.length;if(r%4>0){throw new Error("Invalid string. Length must be a multiple of 4")}var t=e.indexOf("=");if(t===-1)t=r;var n=t===r?0:4-t%4;return[t,n]}function a(e){var r=l(e);var t=r[0];var n=r[1];return(t+n)*3/4-n}function h(e,r,t){return(r+t)*3/4-t}function s(e){var r;var t=l(e);var n=t[0];var i=t[1];var o=new f(h(e,n,i));var a=0;var s=i>0?n-4:n;var u;for(u=0;u<s;u+=4){r=c[e.charCodeAt(u)]<<18|c[e.charCodeAt(u+1)]<<12|c[e.charCodeAt(u+2)]<<6|c[e.charCodeAt(u+3)];o[a++]=r>>16&255;o[a++]=r>>8&255;o[a++]=r&255}if(i===2){r=c[e.charCodeAt(u)]<<2|c[e.charCodeAt(u+1)]>>4;o[a++]=r&255}if(i===1){r=c[e.charCodeAt(u)]<<10|c[e.charCodeAt(u+1)]<<4|c[e.charCodeAt(u+2)]>>2;o[a++]=r>>8&255;o[a++]=r&255}return o}function d(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[e&63]}function p(e,r,t){var n;var i=[];for(var o=r;o<t;o+=3){n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255);i.push(d(n))}return i.join("")}function v(e){var r;var t=e.length;var n=t%3;var i=[];var o=16383;for(var a=0,s=t-n;a<s;a+=o){i.push(p(e,a,a+o>s?s:a+o))}if(n===1){r=e[t-1];i.push(u[r>>2]+u[r<<4&63]+"==")}else if(n===2){r=(e[t-2]<<8)+e[t-1];i.push(u[r>>10]+u[r>>4&63]+u[r<<2&63]+"=")}return i.join("")}},{}],137:[function(e,r,t){"use strict";var u="qpzry9x8gf2tvdw0s3jn54khce6mua7l";var h={};for(var n=0;n<u.length;n++){var i=u.charAt(n);if(h[i]!==undefined)throw new TypeError(i+" is ambiguous");h[i]=n}function d(e){var r=e>>25;return(e&33554431)<<5^-(r>>0&1)&996825010^-(r>>1&1)&642813549^-(r>>2&1)&513874426^-(r>>3&1)&1027748829^-(r>>4&1)&705979059}function p(e){var r=1;for(var t=0;t<e.length;++t){var n=e.charCodeAt(t);if(n<33||n>126)return"Invalid prefix ("+e+")";r=d(r)^n>>5}r=d(r);for(t=0;t<e.length;++t){var i=e.charCodeAt(t);r=d(r)^i&31}return r}function o(e,r,t){t=t||90;if(e.length+7+r.length>t)throw new TypeError("Exceeds length limit");e=e.toLowerCase();var n=p(e);if(typeof n==="string")throw new Error(n);var i=e+"1";for(var o=0;o<r.length;++o){var a=r[o];if(a>>5!==0)throw new Error("Non 5-bit word");n=d(n)^a;i+=u.charAt(a)}for(o=0;o<6;++o){n=d(n)}n^=1;for(o=0;o<6;++o){var s=n>>(5-o)*5&31;i+=u.charAt(s)}return i}function a(e,r){r=r||90;if(e.length<8)return e+" too short";if(e.length>r)return"Exceeds length limit";var t=e.toLowerCase();var n=e.toUpperCase();if(e!==t&&e!==n)return"Mixed-case string "+e;e=t;var i=e.lastIndexOf("1");if(i===-1)return"No separator character for "+e;if(i===0)return"Missing prefix for "+e;var o=e.slice(0,i);var a=e.slice(i+1);if(a.length<6)return"Data too short";var s=p(o);if(typeof s==="string")return s;var u=[];for(var c=0;c<a.length;++c){var f=a.charAt(c);var l=h[f];if(l===undefined)return"Unknown character "+f;s=d(s)^l;if(c+6>=a.length)continue;u.push(l)}if(s!==1)return"Invalid checksum for "+e;return{prefix:o,words:u}}function s(){var e=a.apply(null,arguments);if(typeof e==="object")return e}function c(e){var r=a.apply(null,arguments);if(typeof r==="object")return r;throw new Error(r)}function f(e,r,t,n){var i=0;var o=0;var a=(1<<t)-1;var s=[];for(var u=0;u<e.length;++u){i=i<<r|e[u];o+=r;while(o>=t){o-=t;s.push(i>>o&a)}}if(n){if(o>0){s.push(i<<t-o&a)}}else{if(o>=r)return"Excess padding";if(i<<t-o&a)return"Non-zero padding"}return s}function l(e){var r=f(e,8,5,true);if(Array.isArray(r))return r}function v(e){var r=f(e,8,5,true);if(Array.isArray(r))return r;throw new Error(r)}function b(e){var r=f(e,5,8,false);if(Array.isArray(r))return r}function g(e){var r=f(e,5,8,false);if(Array.isArray(r))return r;throw new Error(r)}r.exports={decodeUnsafe:s,decode:c,encode:o,toWordsUnsafe:l,toWords:v,fromWordsUnsafe:b,fromWords:g}},{}],138:[function(P,e,r){(function(e,r){"use strict";function g(e,r){if(!e)throw new Error(r||"Assertion failed")}function t(e,r){e.super_=r;var t=function(){};t.prototype=r.prototype;e.prototype=new t;e.prototype.constructor=e}function m(e,r,t){if(m.isBN(e)){return e}this.negative=0;this.words=null;this.length=0;this.red=null;if(e!==null){if(r==="le"||r==="be"){t=r;r=10}this._init(e||0,r||10,t||"be")}}if(typeof e==="object"){e.exports=m}else{r.BN=m}m.BN=m;m.wordSize=26;var n;try{if(typeof window!=="undefined"&&typeof window.Buffer!=="undefined"){n=window.Buffer}else{n=P("buffer").Buffer}}catch(e){}m.isBN=function e(r){if(r instanceof m){return true}return r!==null&&typeof r==="object"&&r.constructor.wordSize===m.wordSize&&Array.isArray(r.words)};m.max=function e(r,t){if(r.cmp(t)>0)return r;return t};m.min=function e(r,t){if(r.cmp(t)<0)return r;return t};m.prototype._init=function e(r,t,n){if(typeof r==="number"){return this._initNumber(r,t,n)}if(typeof r==="object"){return this._initArray(r,t,n)}if(t==="hex"){t=16}g(t===(t|0)&&t>=2&&t<=36);r=r.toString().replace(/\s+/g,"");var i=0;if(r[0]==="-"){i++;this.negative=1}if(i<r.length){if(t===16){this._parseHex(r,i,n)}else{this._parseBase(r,t,i);if(n==="le"){this._initArray(this.toArray(),t,n)}}}};m.prototype._initNumber=function e(r,t,n){if(r<0){this.negative=1;r=-r}if(r<67108864){this.words=[r&67108863];this.length=1}else if(r<4503599627370496){this.words=[r&67108863,r/67108864&67108863];this.length=2}else{g(r<9007199254740992);this.words=[r&67108863,r/67108864&67108863,1];this.length=3}if(n!=="le")return;this._initArray(this.toArray(),t,n)};m.prototype._initArray=function e(r,t,n){g(typeof r.length==="number");if(r.length<=0){this.words=[0];this.length=1;return this}this.length=Math.ceil(r.length/3);this.words=new Array(this.length);for(var i=0;i<this.length;i++){this.words[i]=0}var o,a;var s=0;if(n==="be"){for(i=r.length-1,o=0;i>=0;i-=3){a=r[i]|r[i-1]<<8|r[i-2]<<16;this.words[o]|=a<<s&67108863;this.words[o+1]=a>>>26-s&67108863;s+=24;if(s>=26){s-=26;o++}}}else if(n==="le"){for(i=0,o=0;i<r.length;i+=3){a=r[i]|r[i+1]<<8|r[i+2]<<16;this.words[o]|=a<<s&67108863;this.words[o+1]=a>>>26-s&67108863;s+=24;if(s>=26){s-=26;o++}}}return this.strip()};function i(e,r){var t=e.charCodeAt(r);if(t>=65&&t<=70){return t-55}else if(t>=97&&t<=102){return t-87}else{return t-48&15}}function c(e,r,t){var n=i(e,t);if(t-1>=r){n|=i(e,t-1)<<4}return n}m.prototype._parseHex=function e(r,t,n){this.length=Math.ceil((r.length-t)/6);this.words=new Array(this.length);for(var i=0;i<this.length;i++){this.words[i]=0}var o=0;var a=0;var s;if(n==="be"){for(i=r.length-1;i>=t;i-=2){s=c(r,t,i)<<o;this.words[a]|=s&67108863;if(o>=18){o-=18;a+=1;this.words[a]|=s>>>26}else{o+=8}}}else{var u=r.length-t;for(i=u%2===0?t+1:t;i<r.length;i+=2){s=c(r,t,i)<<o;this.words[a]|=s&67108863;if(o>=18){o-=18;a+=1;this.words[a]|=s>>>26}else{o+=8}}}this.strip()};function h(e,r,t,n){var i=0;var o=Math.min(e.length,t);for(var a=r;a<o;a++){var s=e.charCodeAt(a)-48;i*=n;if(s>=49){i+=s-49+10}else if(s>=17){i+=s-17+10}else{i+=s}}return i}m.prototype._parseBase=function e(r,t,n){this.words=[0];this.length=1;for(var i=0,o=1;o<=67108863;o*=t){i++}i--;o=o/t|0;var a=r.length-n;var s=a%i;var u=Math.min(a,a-s)+n;var c=0;for(var f=n;f<u;f+=i){c=h(r,f,f+i,t);this.imuln(o);if(this.words[0]+c<67108864){this.words[0]+=c}else{this._iaddn(c)}}if(s!==0){var l=1;c=h(r,f,r.length,t);for(f=0;f<s;f++){l*=t}this.imuln(l);if(this.words[0]+c<67108864){this.words[0]+=c}else{this._iaddn(c)}}this.strip()};m.prototype.copy=function e(r){r.words=new Array(this.length);for(var t=0;t<this.length;t++){r.words[t]=this.words[t]}r.length=this.length;r.negative=this.negative;r.red=this.red};m.prototype.clone=function e(){var r=new m(null);this.copy(r);return r};m.prototype._expand=function e(r){while(this.length<r){this.words[this.length++]=0}return this};m.prototype.strip=function e(){while(this.length>1&&this.words[this.length-1]===0){this.length--}return this._normSign()};m.prototype._normSign=function e(){if(this.length===1&&this.words[0]===0){this.negative=0}return this};m.prototype.inspect=function e(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","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 p=[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 v=[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];m.prototype.toString=function e(r,t){r=r||10;t=t|0||1;var n;if(r===16||r==="hex"){n="";var i=0;var o=0;for(var a=0;a<this.length;a++){var s=this.words[a];var u=((s<<i|o)&16777215).toString(16);o=s>>>24-i&16777215;if(o!==0||a!==this.length-1){n=d[6-u.length]+u+n}else{n=u+n}i+=2;if(i>=26){i-=26;a--}}if(o!==0){n=o.toString(16)+n}while(n.length%t!==0){n="0"+n}if(this.negative!==0){n="-"+n}return n}if(r===(r|0)&&r>=2&&r<=36){var c=p[r];var f=v[r];n="";var l=this.clone();l.negative=0;while(!l.isZero()){var h=l.modn(f).toString(r);l=l.idivn(f);if(!l.isZero()){n=d[c-h.length]+h+n}else{n=h+n}}if(this.isZero()){n="0"+n}while(n.length%t!==0){n="0"+n}if(this.negative!==0){n="-"+n}return n}g(false,"Base should be between 2 and 36")};m.prototype.toNumber=function e(){var r=this.words[0];if(this.length===2){r+=this.words[1]*67108864}else if(this.length===3&&this.words[2]===1){r+=4503599627370496+this.words[1]*67108864}else if(this.length>2){g(false,"Number can only safely store up to 53 bits")}return this.negative!==0?-r:r};m.prototype.toJSON=function e(){return this.toString(16)};m.prototype.toBuffer=function e(r,t){g(typeof n!=="undefined");return this.toArrayLike(n,r,t)};m.prototype.toArray=function e(r,t){return this.toArrayLike(Array,r,t)};m.prototype.toArrayLike=function e(r,t,n){var i=this.byteLength();var o=n||Math.max(1,i);g(i<=o,"byte array longer than desired length");g(o>0,"Requested array length <= 0");this.strip();var a=t==="le";var s=new r(o);var u,c;var f=this.clone();if(!a){for(c=0;c<o-i;c++){s[c]=0}for(c=0;!f.isZero();c++){u=f.andln(255);f.iushrn(8);s[o-c-1]=u}}else{for(c=0;!f.isZero();c++){u=f.andln(255);f.iushrn(8);s[c]=u}for(;c<o;c++){s[c]=0}}return s};if(Math.clz32){m.prototype._countBits=function e(r){return 32-Math.clz32(r)}}else{m.prototype._countBits=function e(r){var t=r;var n=0;if(t>=4096){n+=13;t>>>=13}if(t>=64){n+=7;t>>>=7}if(t>=8){n+=4;t>>>=4}if(t>=2){n+=2;t>>>=2}return n+t}}m.prototype._zeroBits=function e(r){if(r===0)return 26;var t=r;var n=0;if((t&8191)===0){n+=13;t>>>=13}if((t&127)===0){n+=7;t>>>=7}if((t&15)===0){n+=4;t>>>=4}if((t&3)===0){n+=2;t>>>=2}if((t&1)===0){n++}return n};m.prototype.bitLength=function e(){var r=this.words[this.length-1];var t=this._countBits(r);return(this.length-1)*26+t};function a(e){var r=new Array(e.bitLength());for(var t=0;t<r.length;t++){var n=t/26|0;var i=t%26;r[t]=(e.words[n]&1<<i)>>>i}return r}m.prototype.zeroBits=function e(){if(this.isZero())return 0;var r=0;for(var t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);r+=n;if(n!==26)break}return r};m.prototype.byteLength=function e(){return Math.ceil(this.bitLength()/8)};m.prototype.toTwos=function e(r){if(this.negative!==0){return this.abs().inotn(r).iaddn(1)}return this.clone()};m.prototype.fromTwos=function e(r){if(this.testn(r-1)){return this.notn(r).iaddn(1).ineg()}return this.clone()};m.prototype.isNeg=function e(){return this.negative!==0};m.prototype.neg=function e(){return this.clone().ineg()};m.prototype.ineg=function e(){if(!this.isZero()){this.negative^=1}return this};m.prototype.iuor=function e(r){while(this.length<r.length){this.words[this.length++]=0}for(var t=0;t<r.length;t++){this.words[t]=this.words[t]|r.words[t]}return this.strip()};m.prototype.ior=function e(r){g((this.negative|r.negative)===0);return this.iuor(r)};m.prototype.or=function e(r){if(this.length>r.length)return this.clone().ior(r);return r.clone().ior(this)};m.prototype.uor=function e(r){if(this.length>r.length)return this.clone().iuor(r);return r.clone().iuor(this)};m.prototype.iuand=function e(r){var t;if(this.length>r.length){t=r}else{t=this}for(var n=0;n<t.length;n++){this.words[n]=this.words[n]&r.words[n]}this.length=t.length;return this.strip()};m.prototype.iand=function e(r){g((this.negative|r.negative)===0);return this.iuand(r)};m.prototype.and=function e(r){if(this.length>r.length)return this.clone().iand(r);return r.clone().iand(this)};m.prototype.uand=function e(r){if(this.length>r.length)return this.clone().iuand(r);return r.clone().iuand(this)};m.prototype.iuxor=function e(r){var t;var n;if(this.length>r.length){t=this;n=r}else{t=r;n=this}for(var i=0;i<n.length;i++){this.words[i]=t.words[i]^n.words[i]}if(this!==t){for(;i<t.length;i++){this.words[i]=t.words[i]}}this.length=t.length;return this.strip()};m.prototype.ixor=function e(r){g((this.negative|r.negative)===0);return this.iuxor(r)};m.prototype.xor=function e(r){if(this.length>r.length)return this.clone().ixor(r);return r.clone().ixor(this)};m.prototype.uxor=function e(r){if(this.length>r.length)return this.clone().iuxor(r);return r.clone().iuxor(this)};m.prototype.inotn=function e(r){g(typeof r==="number"&&r>=0);var t=Math.ceil(r/26)|0;var n=r%26;this._expand(t);if(n>0){t--}for(var i=0;i<t;i++){this.words[i]=~this.words[i]&67108863}if(n>0){this.words[i]=~this.words[i]&67108863>>26-n}return this.strip()};m.prototype.notn=function e(r){return this.clone().inotn(r)};m.prototype.setn=function e(r,t){g(typeof r==="number"&&r>=0);var n=r/26|0;var i=r%26;this._expand(n+1);if(t){this.words[n]=this.words[n]|1<<i}else{this.words[n]=this.words[n]&~(1<<i)}return this.strip()};m.prototype.iadd=function e(r){var t;if(this.negative!==0&&r.negative===0){this.negative=0;t=this.isub(r);this.negative^=1;return this._normSign()}else if(this.negative===0&&r.negative!==0){r.negative=0;t=this.isub(r);r.negative=1;return t._normSign()}var n,i;if(this.length>r.length){n=this;i=r}else{n=r;i=this}var o=0;for(var a=0;a<i.length;a++){t=(n.words[a]|0)+(i.words[a]|0)+o;this.words[a]=t&67108863;o=t>>>26}for(;o!==0&&a<n.length;a++){t=(n.words[a]|0)+o;this.words[a]=t&67108863;o=t>>>26}this.length=n.length;if(o!==0){this.words[this.length]=o;this.length++}else if(n!==this){for(;a<n.length;a++){this.words[a]=n.words[a]}}return this};m.prototype.add=function e(r){var t;if(r.negative!==0&&this.negative===0){r.negative=0;t=this.sub(r);r.negative^=1;return t}else if(r.negative===0&&this.negative!==0){this.negative=0;t=r.sub(this);this.negative=1;return t}if(this.length>r.length)return this.clone().iadd(r);return r.clone().iadd(this)};m.prototype.isub=function e(r){if(r.negative!==0){r.negative=0;var t=this.iadd(r);r.negative=1;return t._normSign()}else if(this.negative!==0){this.negative=0;this.iadd(r);this.negative=1;return this._normSign()}var n=this.cmp(r);if(n===0){this.negative=0;this.length=1;this.words[0]=0;return this}var i,o;if(n>0){i=this;o=r}else{i=r;o=this}var a=0;for(var s=0;s<o.length;s++){t=(i.words[s]|0)-(o.words[s]|0)+a;a=t>>26;this.words[s]=t&67108863}for(;a!==0&&s<i.length;s++){t=(i.words[s]|0)+a;a=t>>26;this.words[s]=t&67108863}if(a===0&&s<i.length&&i!==this){for(;s<i.length;s++){this.words[s]=i.words[s]}}this.length=Math.max(this.length,s);if(i!==this){this.negative=1}return this.strip()};m.prototype.sub=function e(r){return this.clone().isub(r)};function o(e,r,t){t.negative=r.negative^e.negative;var n=e.length+r.length|0;t.length=n;n=n-1|0;var i=e.words[0]|0;var o=r.words[0]|0;var a=i*o;var s=a&67108863;var u=a/67108864|0;t.words[0]=s;for(var c=1;c<n;c++){var f=u>>>26;var l=u&67108863;var h=Math.min(c,r.length-1);for(var d=Math.max(0,c-e.length+1);d<=h;d++){var p=c-d|0;i=e.words[p]|0;o=r.words[d]|0;a=i*o+l;f+=a/67108864|0;l=a&67108863}t.words[c]=l|0;u=f|0}if(u!==0){t.words[c]=u|0}else{t.length--}return t.strip()}var s=function e(r,t,n){var i=r.words;var o=t.words;var a=n.words;var s=0;var u;var c;var f;var l=i[0]|0;var h=l&8191;var d=l>>>13;var p=i[1]|0;var v=p&8191;var b=p>>>13;var g=i[2]|0;var m=g&8191;var y=g>>>13;var w=i[3]|0;var _=w&8191;var S=w>>>13;var A=i[4]|0;var E=A&8191;var M=A>>>13;var P=i[5]|0;var T=P&8191;var k=P>>>13;var O=i[6]|0;var B=O&8191;var C=O>>>13;var R=i[7]|0;var L=R&8191;var F=R>>>13;var j=i[8]|0;var x=j&8191;var N=j>>>13;var D=i[9]|0;var J=D&8191;var I=D>>>13;var U=o[0]|0;var H=U&8191;var X=U>>>13;var G=o[1]|0;var z=G&8191;var V=G>>>13;var Z=o[2]|0;var K=Z&8191;var q=Z>>>13;var Q=o[3]|0;var W=Q&8191;var Y=Q>>>13;var $=o[4]|0;var ee=$&8191;var re=$>>>13;var te=o[5]|0;var ne=te&8191;var ie=te>>>13;var oe=o[6]|0;var ae=oe&8191;var se=oe>>>13;var ue=o[7]|0;var ce=ue&8191;var fe=ue>>>13;var le=o[8]|0;var he=le&8191;var de=le>>>13;var pe=o[9]|0;var ve=pe&8191;var be=pe>>>13;n.negative=r.negative^t.negative;n.length=19;u=Math.imul(h,H);c=Math.imul(h,X);c=c+Math.imul(d,H)|0;f=Math.imul(d,X);var ge=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(ge>>>26)|0;ge&=67108863;u=Math.imul(v,H);c=Math.imul(v,X);c=c+Math.imul(b,H)|0;f=Math.imul(b,X);u=u+Math.imul(h,z)|0;c=c+Math.imul(h,V)|0;c=c+Math.imul(d,z)|0;f=f+Math.imul(d,V)|0;var me=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(me>>>26)|0;me&=67108863;u=Math.imul(m,H);c=Math.imul(m,X);c=c+Math.imul(y,H)|0;f=Math.imul(y,X);u=u+Math.imul(v,z)|0;c=c+Math.imul(v,V)|0;c=c+Math.imul(b,z)|0;f=f+Math.imul(b,V)|0;u=u+Math.imul(h,K)|0;c=c+Math.imul(h,q)|0;c=c+Math.imul(d,K)|0;f=f+Math.imul(d,q)|0;var ye=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(ye>>>26)|0;ye&=67108863;u=Math.imul(_,H);c=Math.imul(_,X);c=c+Math.imul(S,H)|0;f=Math.imul(S,X);u=u+Math.imul(m,z)|0;c=c+Math.imul(m,V)|0;c=c+Math.imul(y,z)|0;f=f+Math.imul(y,V)|0;u=u+Math.imul(v,K)|0;c=c+Math.imul(v,q)|0;c=c+Math.imul(b,K)|0;f=f+Math.imul(b,q)|0;u=u+Math.imul(h,W)|0;c=c+Math.imul(h,Y)|0;c=c+Math.imul(d,W)|0;f=f+Math.imul(d,Y)|0;var we=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(we>>>26)|0;we&=67108863;u=Math.imul(E,H);c=Math.imul(E,X);c=c+Math.imul(M,H)|0;f=Math.imul(M,X);u=u+Math.imul(_,z)|0;c=c+Math.imul(_,V)|0;c=c+Math.imul(S,z)|0;f=f+Math.imul(S,V)|0;u=u+Math.imul(m,K)|0;c=c+Math.imul(m,q)|0;c=c+Math.imul(y,K)|0;f=f+Math.imul(y,q)|0;u=u+Math.imul(v,W)|0;c=c+Math.imul(v,Y)|0;c=c+Math.imul(b,W)|0;f=f+Math.imul(b,Y)|0;u=u+Math.imul(h,ee)|0;c=c+Math.imul(h,re)|0;c=c+Math.imul(d,ee)|0;f=f+Math.imul(d,re)|0;var _e=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(_e>>>26)|0;_e&=67108863;u=Math.imul(T,H);c=Math.imul(T,X);c=c+Math.imul(k,H)|0;f=Math.imul(k,X);u=u+Math.imul(E,z)|0;c=c+Math.imul(E,V)|0;c=c+Math.imul(M,z)|0;f=f+Math.imul(M,V)|0;u=u+Math.imul(_,K)|0;c=c+Math.imul(_,q)|0;c=c+Math.imul(S,K)|0;f=f+Math.imul(S,q)|0;u=u+Math.imul(m,W)|0;c=c+Math.imul(m,Y)|0;c=c+Math.imul(y,W)|0;f=f+Math.imul(y,Y)|0;u=u+Math.imul(v,ee)|0;c=c+Math.imul(v,re)|0;c=c+Math.imul(b,ee)|0;f=f+Math.imul(b,re)|0;u=u+Math.imul(h,ne)|0;c=c+Math.imul(h,ie)|0;c=c+Math.imul(d,ne)|0;f=f+Math.imul(d,ie)|0;var Se=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(Se>>>26)|0;Se&=67108863;u=Math.imul(B,H);c=Math.imul(B,X);c=c+Math.imul(C,H)|0;f=Math.imul(C,X);u=u+Math.imul(T,z)|0;c=c+Math.imul(T,V)|0;c=c+Math.imul(k,z)|0;f=f+Math.imul(k,V)|0;u=u+Math.imul(E,K)|0;c=c+Math.imul(E,q)|0;c=c+Math.imul(M,K)|0;f=f+Math.imul(M,q)|0;u=u+Math.imul(_,W)|0;c=c+Math.imul(_,Y)|0;c=c+Math.imul(S,W)|0;f=f+Math.imul(S,Y)|0;u=u+Math.imul(m,ee)|0;c=c+Math.imul(m,re)|0;c=c+Math.imul(y,ee)|0;f=f+Math.imul(y,re)|0;u=u+Math.imul(v,ne)|0;c=c+Math.imul(v,ie)|0;c=c+Math.imul(b,ne)|0;f=f+Math.imul(b,ie)|0;u=u+Math.imul(h,ae)|0;c=c+Math.imul(h,se)|0;c=c+Math.imul(d,ae)|0;f=f+Math.imul(d,se)|0;var Ae=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(Ae>>>26)|0;Ae&=67108863;u=Math.imul(L,H);c=Math.imul(L,X);c=c+Math.imul(F,H)|0;f=Math.imul(F,X);u=u+Math.imul(B,z)|0;c=c+Math.imul(B,V)|0;c=c+Math.imul(C,z)|0;f=f+Math.imul(C,V)|0;u=u+Math.imul(T,K)|0;c=c+Math.imul(T,q)|0;c=c+Math.imul(k,K)|0;f=f+Math.imul(k,q)|0;u=u+Math.imul(E,W)|0;c=c+Math.imul(E,Y)|0;c=c+Math.imul(M,W)|0;f=f+Math.imul(M,Y)|0;u=u+Math.imul(_,ee)|0;c=c+Math.imul(_,re)|0;c=c+Math.imul(S,ee)|0;f=f+Math.imul(S,re)|0;u=u+Math.imul(m,ne)|0;c=c+Math.imul(m,ie)|0;c=c+Math.imul(y,ne)|0;f=f+Math.imul(y,ie)|0;u=u+Math.imul(v,ae)|0;c=c+Math.imul(v,se)|0;c=c+Math.imul(b,ae)|0;f=f+Math.imul(b,se)|0;u=u+Math.imul(h,ce)|0;c=c+Math.imul(h,fe)|0;c=c+Math.imul(d,ce)|0;f=f+Math.imul(d,fe)|0;var Ee=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(Ee>>>26)|0;Ee&=67108863;u=Math.imul(x,H);c=Math.imul(x,X);c=c+Math.imul(N,H)|0;f=Math.imul(N,X);u=u+Math.imul(L,z)|0;c=c+Math.imul(L,V)|0;c=c+Math.imul(F,z)|0;f=f+Math.imul(F,V)|0;u=u+Math.imul(B,K)|0;c=c+Math.imul(B,q)|0;c=c+Math.imul(C,K)|0;f=f+Math.imul(C,q)|0;u=u+Math.imul(T,W)|0;c=c+Math.imul(T,Y)|0;c=c+Math.imul(k,W)|0;f=f+Math.imul(k,Y)|0;u=u+Math.imul(E,ee)|0;c=c+Math.imul(E,re)|0;c=c+Math.imul(M,ee)|0;f=f+Math.imul(M,re)|0;u=u+Math.imul(_,ne)|0;c=c+Math.imul(_,ie)|0;c=c+Math.imul(S,ne)|0;f=f+Math.imul(S,ie)|0;u=u+Math.imul(m,ae)|0;c=c+Math.imul(m,se)|0;c=c+Math.imul(y,ae)|0;f=f+Math.imul(y,se)|0;u=u+Math.imul(v,ce)|0;c=c+Math.imul(v,fe)|0;c=c+Math.imul(b,ce)|0;f=f+Math.imul(b,fe)|0;u=u+Math.imul(h,he)|0;c=c+Math.imul(h,de)|0;c=c+Math.imul(d,he)|0;f=f+Math.imul(d,de)|0;var Me=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(Me>>>26)|0;Me&=67108863;u=Math.imul(J,H);c=Math.imul(J,X);c=c+Math.imul(I,H)|0;f=Math.imul(I,X);u=u+Math.imul(x,z)|0;c=c+Math.imul(x,V)|0;c=c+Math.imul(N,z)|0;f=f+Math.imul(N,V)|0;u=u+Math.imul(L,K)|0;c=c+Math.imul(L,q)|0;c=c+Math.imul(F,K)|0;f=f+Math.imul(F,q)|0;u=u+Math.imul(B,W)|0;c=c+Math.imul(B,Y)|0;c=c+Math.imul(C,W)|0;f=f+Math.imul(C,Y)|0;u=u+Math.imul(T,ee)|0;c=c+Math.imul(T,re)|0;c=c+Math.imul(k,ee)|0;f=f+Math.imul(k,re)|0;u=u+Math.imul(E,ne)|0;c=c+Math.imul(E,ie)|0;c=c+Math.imul(M,ne)|0;f=f+Math.imul(M,ie)|0;u=u+Math.imul(_,ae)|0;c=c+Math.imul(_,se)|0;c=c+Math.imul(S,ae)|0;f=f+Math.imul(S,se)|0;u=u+Math.imul(m,ce)|0;c=c+Math.imul(m,fe)|0;c=c+Math.imul(y,ce)|0;f=f+Math.imul(y,fe)|0;u=u+Math.imul(v,he)|0;c=c+Math.imul(v,de)|0;c=c+Math.imul(b,he)|0;f=f+Math.imul(b,de)|0;u=u+Math.imul(h,ve)|0;c=c+Math.imul(h,be)|0;c=c+Math.imul(d,ve)|0;f=f+Math.imul(d,be)|0;var Pe=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(Pe>>>26)|0;Pe&=67108863;u=Math.imul(J,z);c=Math.imul(J,V);c=c+Math.imul(I,z)|0;f=Math.imul(I,V);u=u+Math.imul(x,K)|0;c=c+Math.imul(x,q)|0;c=c+Math.imul(N,K)|0;f=f+Math.imul(N,q)|0;u=u+Math.imul(L,W)|0;c=c+Math.imul(L,Y)|0;c=c+Math.imul(F,W)|0;f=f+Math.imul(F,Y)|0;u=u+Math.imul(B,ee)|0;c=c+Math.imul(B,re)|0;c=c+Math.imul(C,ee)|0;f=f+Math.imul(C,re)|0;u=u+Math.imul(T,ne)|0;c=c+Math.imul(T,ie)|0;c=c+Math.imul(k,ne)|0;f=f+Math.imul(k,ie)|0;u=u+Math.imul(E,ae)|0;c=c+Math.imul(E,se)|0;c=c+Math.imul(M,ae)|0;f=f+Math.imul(M,se)|0;u=u+Math.imul(_,ce)|0;c=c+Math.imul(_,fe)|0;c=c+Math.imul(S,ce)|0;f=f+Math.imul(S,fe)|0;u=u+Math.imul(m,he)|0;c=c+Math.imul(m,de)|0;c=c+Math.imul(y,he)|0;f=f+Math.imul(y,de)|0;u=u+Math.imul(v,ve)|0;c=c+Math.imul(v,be)|0;c=c+Math.imul(b,ve)|0;f=f+Math.imul(b,be)|0;var Te=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(Te>>>26)|0;Te&=67108863;u=Math.imul(J,K);c=Math.imul(J,q);c=c+Math.imul(I,K)|0;f=Math.imul(I,q);u=u+Math.imul(x,W)|0;c=c+Math.imul(x,Y)|0;c=c+Math.imul(N,W)|0;f=f+Math.imul(N,Y)|0;u=u+Math.imul(L,ee)|0;c=c+Math.imul(L,re)|0;c=c+Math.imul(F,ee)|0;f=f+Math.imul(F,re)|0;u=u+Math.imul(B,ne)|0;c=c+Math.imul(B,ie)|0;c=c+Math.imul(C,ne)|0;f=f+Math.imul(C,ie)|0;u=u+Math.imul(T,ae)|0;c=c+Math.imul(T,se)|0;c=c+Math.imul(k,ae)|0;f=f+Math.imul(k,se)|0;u=u+Math.imul(E,ce)|0;c=c+Math.imul(E,fe)|0;c=c+Math.imul(M,ce)|0;f=f+Math.imul(M,fe)|0;u=u+Math.imul(_,he)|0;c=c+Math.imul(_,de)|0;c=c+Math.imul(S,he)|0;f=f+Math.imul(S,de)|0;u=u+Math.imul(m,ve)|0;c=c+Math.imul(m,be)|0;c=c+Math.imul(y,ve)|0;f=f+Math.imul(y,be)|0;var ke=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(ke>>>26)|0;ke&=67108863;u=Math.imul(J,W);c=Math.imul(J,Y);c=c+Math.imul(I,W)|0;f=Math.imul(I,Y);u=u+Math.imul(x,ee)|0;c=c+Math.imul(x,re)|0;c=c+Math.imul(N,ee)|0;f=f+Math.imul(N,re)|0;u=u+Math.imul(L,ne)|0;c=c+Math.imul(L,ie)|0;c=c+Math.imul(F,ne)|0;f=f+Math.imul(F,ie)|0;u=u+Math.imul(B,ae)|0;c=c+Math.imul(B,se)|0;c=c+Math.imul(C,ae)|0;f=f+Math.imul(C,se)|0;u=u+Math.imul(T,ce)|0;c=c+Math.imul(T,fe)|0;c=c+Math.imul(k,ce)|0;f=f+Math.imul(k,fe)|0;u=u+Math.imul(E,he)|0;c=c+Math.imul(E,de)|0;c=c+Math.imul(M,he)|0;f=f+Math.imul(M,de)|0;u=u+Math.imul(_,ve)|0;c=c+Math.imul(_,be)|0;c=c+Math.imul(S,ve)|0;f=f+Math.imul(S,be)|0;var Oe=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(Oe>>>26)|0;Oe&=67108863;u=Math.imul(J,ee);c=Math.imul(J,re);c=c+Math.imul(I,ee)|0;f=Math.imul(I,re);u=u+Math.imul(x,ne)|0;c=c+Math.imul(x,ie)|0;c=c+Math.imul(N,ne)|0;f=f+Math.imul(N,ie)|0;u=u+Math.imul(L,ae)|0;c=c+Math.imul(L,se)|0;c=c+Math.imul(F,ae)|0;f=f+Math.imul(F,se)|0;u=u+Math.imul(B,ce)|0;c=c+Math.imul(B,fe)|0;c=c+Math.imul(C,ce)|0;f=f+Math.imul(C,fe)|0;u=u+Math.imul(T,he)|0;c=c+Math.imul(T,de)|0;c=c+Math.imul(k,he)|0;f=f+Math.imul(k,de)|0;u=u+Math.imul(E,ve)|0;c=c+Math.imul(E,be)|0;c=c+Math.imul(M,ve)|0;f=f+Math.imul(M,be)|0;var Be=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(Be>>>26)|0;Be&=67108863;u=Math.imul(J,ne);c=Math.imul(J,ie);c=c+Math.imul(I,ne)|0;f=Math.imul(I,ie);u=u+Math.imul(x,ae)|0;c=c+Math.imul(x,se)|0;c=c+Math.imul(N,ae)|0;f=f+Math.imul(N,se)|0;u=u+Math.imul(L,ce)|0;c=c+Math.imul(L,fe)|0;c=c+Math.imul(F,ce)|0;f=f+Math.imul(F,fe)|0;u=u+Math.imul(B,he)|0;c=c+Math.imul(B,de)|0;c=c+Math.imul(C,he)|0;f=f+Math.imul(C,de)|0;u=u+Math.imul(T,ve)|0;c=c+Math.imul(T,be)|0;c=c+Math.imul(k,ve)|0;f=f+Math.imul(k,be)|0;var Ce=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(Ce>>>26)|0;Ce&=67108863;u=Math.imul(J,ae);c=Math.imul(J,se);c=c+Math.imul(I,ae)|0;f=Math.imul(I,se);u=u+Math.imul(x,ce)|0;c=c+Math.imul(x,fe)|0;c=c+Math.imul(N,ce)|0;f=f+Math.imul(N,fe)|0;u=u+Math.imul(L,he)|0;c=c+Math.imul(L,de)|0;c=c+Math.imul(F,he)|0;f=f+Math.imul(F,de)|0;u=u+Math.imul(B,ve)|0;c=c+Math.imul(B,be)|0;c=c+Math.imul(C,ve)|0;f=f+Math.imul(C,be)|0;var Re=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(Re>>>26)|0;Re&=67108863;u=Math.imul(J,ce);c=Math.imul(J,fe);c=c+Math.imul(I,ce)|0;f=Math.imul(I,fe);u=u+Math.imul(x,he)|0;c=c+Math.imul(x,de)|0;c=c+Math.imul(N,he)|0;f=f+Math.imul(N,de)|0;u=u+Math.imul(L,ve)|0;c=c+Math.imul(L,be)|0;c=c+Math.imul(F,ve)|0;f=f+Math.imul(F,be)|0;var Le=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(Le>>>26)|0;Le&=67108863;u=Math.imul(J,he);c=Math.imul(J,de);c=c+Math.imul(I,he)|0;f=Math.imul(I,de);u=u+Math.imul(x,ve)|0;c=c+Math.imul(x,be)|0;c=c+Math.imul(N,ve)|0;f=f+Math.imul(N,be)|0;var Fe=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(Fe>>>26)|0;Fe&=67108863;u=Math.imul(J,ve);c=Math.imul(J,be);c=c+Math.imul(I,ve)|0;f=Math.imul(I,be);var je=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(je>>>26)|0;je&=67108863;a[0]=ge;a[1]=me;a[2]=ye;a[3]=we;a[4]=_e;a[5]=Se;a[6]=Ae;a[7]=Ee;a[8]=Me;a[9]=Pe;a[10]=Te;a[11]=ke;a[12]=Oe;a[13]=Be;a[14]=Ce;a[15]=Re;a[16]=Le;a[17]=Fe;a[18]=je;if(s!==0){a[19]=s;n.length++}return n};if(!Math.imul){s=o}function u(e,r,t){t.negative=r.negative^e.negative;t.length=e.length+r.length;var n=0;var i=0;for(var o=0;o<t.length-1;o++){var a=i;i=0;var s=n&67108863;var u=Math.min(o,r.length-1);for(var c=Math.max(0,o-e.length+1);c<=u;c++){var f=o-c;var l=e.words[f]|0;var h=r.words[c]|0;var d=l*h;var p=d&67108863;a=a+(d/67108864|0)|0;p=p+s|0;s=p&67108863;a=a+(p>>>26)|0;i+=a>>>26;a&=67108863}t.words[o]=s;n=a;a=i}if(n!==0){t.words[o]=n}else{t.length--}return t.strip()}function f(e,r,t){var n=new l;return n.mulp(e,r,t)}m.prototype.mulTo=function e(r,t){var n;var i=this.length+r.length;if(this.length===10&&r.length===10){n=s(this,r,t)}else if(i<63){n=o(this,r,t)}else if(i<1024){n=u(this,r,t)}else{n=f(this,r,t)}return n};function l(e,r){this.x=e;this.y=r}l.prototype.makeRBT=function e(r){var t=new Array(r);var n=m.prototype._countBits(r)-1;for(var i=0;i<r;i++){t[i]=this.revBin(i,n,r)}return t};l.prototype.revBin=function e(r,t,n){if(r===0||r===n-1)return r;var i=0;for(var o=0;o<t;o++){i|=(r&1)<<t-o-1;r>>=1}return i};l.prototype.permute=function e(r,t,n,i,o,a){for(var s=0;s<a;s++){i[s]=t[r[s]];o[s]=n[r[s]]}};l.prototype.transform=function e(r,t,n,i,o,a){this.permute(a,r,t,n,i,o);for(var s=1;s<o;s<<=1){var u=s<<1;var c=Math.cos(2*Math.PI/u);var f=Math.sin(2*Math.PI/u);for(var l=0;l<o;l+=u){var h=c;var d=f;for(var p=0;p<s;p++){var v=n[l+p];var b=i[l+p];var g=n[l+p+s];var m=i[l+p+s];var y=h*g-d*m;m=h*m+d*g;g=y;n[l+p]=v+g;i[l+p]=b+m;n[l+p+s]=v-g;i[l+p+s]=b-m;if(p!==u){y=c*h-f*d;d=c*d+f*h;h=y}}}}};l.prototype.guessLen13b=function e(r,t){var n=Math.max(t,r)|1;var i=n&1;var o=0;for(n=n/2|0;n;n=n>>>1){o++}return 1<<o+1+i};l.prototype.conjugate=function e(r,t,n){if(n<=1)return;for(var i=0;i<n/2;i++){var o=r[i];r[i]=r[n-i-1];r[n-i-1]=o;o=t[i];t[i]=-t[n-i-1];t[n-i-1]=-o}};l.prototype.normalize13b=function e(r,t){var n=0;for(var i=0;i<t/2;i++){var o=Math.round(r[2*i+1]/t)*8192+Math.round(r[2*i]/t)+n;r[i]=o&67108863;if(o<67108864){n=0}else{n=o/67108864|0}}return r};l.prototype.convert13b=function e(r,t,n,i){var o=0;for(var a=0;a<t;a++){o=o+(r[a]|0);n[2*a]=o&8191;o=o>>>13;n[2*a+1]=o&8191;o=o>>>13}for(a=2*t;a<i;++a){n[a]=0}g(o===0);g((o&~8191)===0)};l.prototype.stub=function e(r){var t=new Array(r);for(var n=0;n<r;n++){t[n]=0}return t};l.prototype.mulp=function e(r,t,n){var i=2*this.guessLen13b(r.length,t.length);var o=this.makeRBT(i);var a=this.stub(i);var s=new Array(i);var u=new Array(i);var c=new Array(i);var f=new Array(i);var l=new Array(i);var h=new Array(i);var d=n.words;d.length=i;this.convert13b(r.words,r.length,s,i);this.convert13b(t.words,t.length,f,i);this.transform(s,a,u,c,i,o);this.transform(f,a,l,h,i,o);for(var p=0;p<i;p++){var v=u[p]*l[p]-c[p]*h[p];c[p]=u[p]*h[p]+c[p]*l[p];u[p]=v}this.conjugate(u,c,i);this.transform(u,c,d,a,i,o);this.conjugate(d,a,i);this.normalize13b(d,i);n.negative=r.negative^t.negative;n.length=r.length+t.length;return n.strip()};m.prototype.mul=function e(r){var t=new m(null);t.words=new Array(this.length+r.length);return this.mulTo(r,t)};m.prototype.mulf=function e(r){var t=new m(null);t.words=new Array(this.length+r.length);return f(this,r,t)};m.prototype.imul=function e(r){return this.clone().mulTo(r,this)};m.prototype.imuln=function e(r){g(typeof r==="number");g(r<67108864);var t=0;for(var n=0;n<this.length;n++){var i=(this.words[n]|0)*r;var o=(i&67108863)+(t&67108863);t>>=26;t+=i/67108864|0;t+=o>>>26;this.words[n]=o&67108863}if(t!==0){this.words[n]=t;this.length++}return this};m.prototype.muln=function e(r){return this.clone().imuln(r)};m.prototype.sqr=function e(){return this.mul(this)};m.prototype.isqr=function e(){return this.imul(this.clone())};m.prototype.pow=function e(r){var t=a(r);if(t.length===0)return new m(1);var n=this;for(var i=0;i<t.length;i++,n=n.sqr()){if(t[i]!==0)break}if(++i<t.length){for(var o=n.sqr();i<t.length;i++,o=o.sqr()){if(t[i]===0)continue;n=n.mul(o)}}return n};m.prototype.iushln=function e(r){g(typeof r==="number"&&r>=0);var t=r%26;var n=(r-t)/26;var i=67108863>>>26-t<<26-t;var o;if(t!==0){var a=0;for(o=0;o<this.length;o++){var s=this.words[o]&i;var u=(this.words[o]|0)-s<<t;this.words[o]=u|a;a=s>>>26-t}if(a){this.words[o]=a;this.length++}}if(n!==0){for(o=this.length-1;o>=0;o--){this.words[o+n]=this.words[o]}for(o=0;o<n;o++){this.words[o]=0}this.length+=n}return this.strip()};m.prototype.ishln=function e(r){g(this.negative===0);return this.iushln(r)};m.prototype.iushrn=function e(r,t,n){g(typeof r==="number"&&r>=0);var i;if(t){i=(t-t%26)/26}else{i=0}var o=r%26;var a=Math.min((r-o)/26,this.length);var s=67108863^67108863>>>o<<o;var u=n;i-=a;i=Math.max(0,i);if(u){for(var c=0;c<a;c++){u.words[c]=this.words[c]}u.length=a}if(a===0){}else if(this.length>a){this.length-=a;for(c=0;c<this.length;c++){this.words[c]=this.words[c+a]}}else{this.words[0]=0;this.length=1}var f=0;for(c=this.length-1;c>=0&&(f!==0||c>=i);c--){var l=this.words[c]|0;this.words[c]=f<<26-o|l>>>o;f=l&s}if(u&&f!==0){u.words[u.length++]=f}if(this.length===0){this.words[0]=0;this.length=1}return this.strip()};m.prototype.ishrn=function e(r,t,n){g(this.negative===0);return this.iushrn(r,t,n)};m.prototype.shln=function e(r){return this.clone().ishln(r)};m.prototype.ushln=function e(r){return this.clone().iushln(r)};m.prototype.shrn=function e(r){return this.clone().ishrn(r)};m.prototype.ushrn=function e(r){return this.clone().iushrn(r)};m.prototype.testn=function e(r){g(typeof r==="number"&&r>=0);var t=r%26;var n=(r-t)/26;var i=1<<t;if(this.length<=n)return false;var o=this.words[n];return!!(o&i)};m.prototype.imaskn=function e(r){g(typeof r==="number"&&r>=0);var t=r%26;var n=(r-t)/26;g(this.negative===0,"imaskn works only with positive numbers");if(this.length<=n){return this}if(t!==0){n++}this.length=Math.min(n,this.length);if(t!==0){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()};m.prototype.maskn=function e(r){return this.clone().imaskn(r)};m.prototype.iaddn=function e(r){g(typeof r==="number");g(r<67108864);if(r<0)return this.isubn(-r);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<r){this.words[0]=r-(this.words[0]|0);this.negative=0;return this}this.negative=0;this.isubn(r);this.negative=1;return this}return this._iaddn(r)};m.prototype._iaddn=function e(r){this.words[0]+=r;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};m.prototype.isubn=function e(r){g(typeof r==="number");g(r<67108864);if(r<0)return this.iaddn(-r);if(this.negative!==0){this.negative=0;this.iaddn(r);this.negative=1;return this}this.words[0]-=r;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()};m.prototype.addn=function e(r){return this.clone().iaddn(r)};m.prototype.subn=function e(r){return this.clone().isubn(r)};m.prototype.iabs=function e(){this.negative=0;return this};m.prototype.abs=function e(){return this.clone().iabs()};m.prototype._ishlnsubmul=function e(r,t,n){var i=r.length+n;var o;this._expand(i);var a;var s=0;for(o=0;o<r.length;o++){a=(this.words[o+n]|0)+s;var u=(r.words[o]|0)*t;a-=u&67108863;s=(a>>26)-(u/67108864|0);this.words[o+n]=a&67108863}for(;o<this.length-n;o++){a=(this.words[o+n]|0)+s;s=a>>26;this.words[o+n]=a&67108863}if(s===0)return this.strip();g(s===-1);s=0;for(o=0;o<this.length;o++){a=-(this.words[o]|0)+s;s=a>>26;this.words[o]=a&67108863}this.negative=1;return this.strip()};m.prototype._wordDiv=function e(r,t){var n=this.length-r.length;var i=this.clone();var o=r;var a=o.words[o.length-1]|0;var s=this._countBits(a);n=26-s;if(n!==0){o=o.ushln(n);i.iushln(n);a=o.words[o.length-1]|0}var u=i.length-o.length;var c;if(t!=="mod"){c=new m(null);c.length=u+1;c.words=new Array(c.length);for(var f=0;f<c.length;f++){c.words[f]=0}}var l=i.clone()._ishlnsubmul(o,1,u);if(l.negative===0){i=l;if(c){c.words[u]=1}}for(var h=u-1;h>=0;h--){var d=(i.words[o.length+h]|0)*67108864+(i.words[o.length+h-1]|0);d=Math.min(d/a|0,67108863);i._ishlnsubmul(o,d,h);while(i.negative!==0){d--;i.negative=0;i._ishlnsubmul(o,1,h);if(!i.isZero()){i.negative^=1}}if(c){c.words[h]=d}}if(c){c.strip()}i.strip();if(t!=="div"&&n!==0){i.iushrn(n)}return{div:c||null,mod:i}};m.prototype.divmod=function e(r,t,n){g(!r.isZero());if(this.isZero()){return{div:new m(0),mod:new m(0)}}var i,o,a;if(this.negative!==0&&r.negative===0){a=this.neg().divmod(r,t);if(t!=="mod"){i=a.div.neg()}if(t!=="div"){o=a.mod.neg();if(n&&o.negative!==0){o.iadd(r)}}return{div:i,mod:o}}if(this.negative===0&&r.negative!==0){a=this.divmod(r.neg(),t);if(t!=="mod"){i=a.div.neg()}return{div:i,mod:a.mod}}if((this.negative&r.negative)!==0){a=this.neg().divmod(r.neg(),t);if(t!=="div"){o=a.mod.neg();if(n&&o.negative!==0){o.isub(r)}}return{div:a.div,mod:o}}if(r.length>this.length||this.cmp(r)<0){return{div:new m(0),mod:this}}if(r.length===1){if(t==="div"){return{div:this.divn(r.words[0]),mod:null}}if(t==="mod"){return{div:null,mod:new m(this.modn(r.words[0]))}}return{div:this.divn(r.words[0]),mod:new m(this.modn(r.words[0]))}}return this._wordDiv(r,t)};m.prototype.div=function e(r){return this.divmod(r,"div",false).div};m.prototype.mod=function e(r){return this.divmod(r,"mod",false).mod};m.prototype.umod=function e(r){return this.divmod(r,"mod",true).mod};m.prototype.divRound=function e(r){var t=this.divmod(r);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(r):t.mod;var i=r.ushrn(1);var o=r.andln(1);var a=n.cmp(i);if(a<0||o===1&&a===0)return t.div;return t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)};m.prototype.modn=function e(r){g(r<=67108863);var t=(1<<26)%r;var n=0;for(var i=this.length-1;i>=0;i--){n=(t*n+(this.words[i]|0))%r}return n};m.prototype.idivn=function e(r){g(r<=67108863);var t=0;for(var n=this.length-1;n>=0;n--){var i=(this.words[n]|0)+t*67108864;this.words[n]=i/r|0;t=i%r}return this.strip()};m.prototype.divn=function e(r){return this.clone().idivn(r)};m.prototype.egcd=function e(r){g(r.negative===0);g(!r.isZero());var t=this;var n=r.clone();if(t.negative!==0){t=t.umod(r)}else{t=t.clone()}var i=new m(1);var o=new m(0);var a=new m(0);var s=new m(1);var u=0;while(t.isEven()&&n.isEven()){t.iushrn(1);n.iushrn(1);++u}var c=n.clone();var f=t.clone();while(!t.isZero()){for(var l=0,h=1;(t.words[0]&h)===0&&l<26;++l,h<<=1);if(l>0){t.iushrn(l);while(l-- >0){if(i.isOdd()||o.isOdd()){i.iadd(c);o.isub(f)}i.iushrn(1);o.iushrn(1)}}for(var d=0,p=1;(n.words[0]&p)===0&&d<26;++d,p<<=1);if(d>0){n.iushrn(d);while(d-- >0){if(a.isOdd()||s.isOdd()){a.iadd(c);s.isub(f)}a.iushrn(1);s.iushrn(1)}}if(t.cmp(n)>=0){t.isub(n);i.isub(a);o.isub(s)}else{n.isub(t);a.isub(i);s.isub(o)}}return{a:a,b:s,gcd:n.iushln(u)}};m.prototype._invmp=function e(r){g(r.negative===0);g(!r.isZero());var t=this;var n=r.clone();if(t.negative!==0){t=t.umod(r)}else{t=t.clone()}var i=new m(1);var o=new m(0);var a=n.clone();while(t.cmpn(1)>0&&n.cmpn(1)>0){for(var s=0,u=1;(t.words[0]&u)===0&&s<26;++s,u<<=1);if(s>0){t.iushrn(s);while(s-- >0){if(i.isOdd()){i.iadd(a)}i.iushrn(1)}}for(var c=0,f=1;(n.words[0]&f)===0&&c<26;++c,f<<=1);if(c>0){n.iushrn(c);while(c-- >0){if(o.isOdd()){o.iadd(a)}o.iushrn(1)}}if(t.cmp(n)>=0){t.isub(n);i.isub(o)}else{n.isub(t);o.isub(i)}}var l;if(t.cmpn(1)===0){l=i}else{l=o}if(l.cmpn(0)<0){l.iadd(r)}return l};m.prototype.gcd=function e(r){if(this.isZero())return r.abs();if(r.isZero())return this.abs();var t=this.clone();var n=r.clone();t.negative=0;n.negative=0;for(var i=0;t.isEven()&&n.isEven();i++){t.iushrn(1);n.iushrn(1)}do{while(t.isEven()){t.iushrn(1)}while(n.isEven()){n.iushrn(1)}var o=t.cmp(n);if(o<0){var a=t;t=n;n=a}else if(o===0||n.cmpn(1)===0){break}t.isub(n)}while(true);return n.iushln(i)};m.prototype.invm=function e(r){return this.egcd(r).a.umod(r)};m.prototype.isEven=function e(){return(this.words[0]&1)===0};m.prototype.isOdd=function e(){return(this.words[0]&1)===1};m.prototype.andln=function e(r){return this.words[0]&r};m.prototype.bincn=function e(r){g(typeof r==="number");var t=r%26;var n=(r-t)/26;var i=1<<t;if(this.length<=n){this._expand(n+1);this.words[n]|=i;return this}var o=i;for(var a=n;o!==0&&a<this.length;a++){var s=this.words[a]|0;s+=o;o=s>>>26;s&=67108863;this.words[a]=s}if(o!==0){this.words[a]=o;this.length++}return this};m.prototype.isZero=function e(){return this.length===1&&this.words[0]===0};m.prototype.cmpn=function e(r){var t=r<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1){n=1}else{if(t){r=-r}g(r<=67108863,"Number is too big");var i=this.words[0]|0;n=i===r?0:i<r?-1:1}if(this.negative!==0)return-n|0;return n};m.prototype.cmp=function e(r){if(this.negative!==0&&r.negative===0)return-1;if(this.negative===0&&r.negative!==0)return 1;var t=this.ucmp(r);if(this.negative!==0)return-t|0;return t};m.prototype.ucmp=function e(r){if(this.length>r.length)return 1;if(this.length<r.length)return-1;var t=0;for(var n=this.length-1;n>=0;n--){var i=this.words[n]|0;var o=r.words[n]|0;if(i===o)continue;if(i<o){t=-1}else if(i>o){t=1}break}return t};m.prototype.gtn=function e(r){return this.cmpn(r)===1};m.prototype.gt=function e(r){return this.cmp(r)===1};m.prototype.gten=function e(r){return this.cmpn(r)>=0};m.prototype.gte=function e(r){return this.cmp(r)>=0};m.prototype.ltn=function e(r){return this.cmpn(r)===-1};m.prototype.lt=function e(r){return this.cmp(r)===-1};m.prototype.lten=function e(r){return this.cmpn(r)<=0};m.prototype.lte=function e(r){return this.cmp(r)<=0};m.prototype.eqn=function e(r){return this.cmpn(r)===0};m.prototype.eq=function e(r){return this.cmp(r)===0};m.red=function e(r){return new E(r)};m.prototype.toRed=function e(r){g(!this.red,"Already a number in reduction context");g(this.negative===0,"red works only with positives");return r.convertTo(this)._forceRed(r)};m.prototype.fromRed=function e(){g(this.red,"fromRed works only with numbers in reduction context");return this.red.convertFrom(this)};m.prototype._forceRed=function e(r){this.red=r;return this};m.prototype.forceRed=function e(r){g(!this.red,"Already a number in reduction context");return this._forceRed(r)};m.prototype.redAdd=function e(r){g(this.red,"redAdd works only with red numbers");return this.red.add(this,r)};m.prototype.redIAdd=function e(r){g(this.red,"redIAdd works only with red numbers");return this.red.iadd(this,r)};m.prototype.redSub=function e(r){g(this.red,"redSub works only with red numbers");return this.red.sub(this,r)};m.prototype.redISub=function e(r){g(this.red,"redISub works only with red numbers");return this.red.isub(this,r)};m.prototype.redShl=function e(r){g(this.red,"redShl works only with red numbers");return this.red.shl(this,r)};m.prototype.redMul=function e(r){g(this.red,"redMul works only with red numbers");this.red._verify2(this,r);return this.red.mul(this,r)};m.prototype.redIMul=function e(r){g(this.red,"redMul works only with red numbers");this.red._verify2(this,r);return this.red.imul(this,r)};m.prototype.redSqr=function e(){g(this.red,"redSqr works only with red numbers");this.red._verify1(this);return this.red.sqr(this)};m.prototype.redISqr=function e(){g(this.red,"redISqr works only with red numbers");this.red._verify1(this);return this.red.isqr(this)};m.prototype.redSqrt=function e(){g(this.red,"redSqrt works only with red numbers");this.red._verify1(this);return this.red.sqrt(this)};m.prototype.redInvm=function e(){g(this.red,"redInvm works only with red numbers");this.red._verify1(this);return this.red.invm(this)};m.prototype.redNeg=function e(){g(this.red,"redNeg works only with red numbers");this.red._verify1(this);return this.red.neg(this)};m.prototype.redPow=function e(r){g(this.red&&!r.red,"redPow(normalNum)");this.red._verify1(this);return this.red.pow(this,r)};var b={k256:null,p224:null,p192:null,p25519:null};function y(e,r){this.name=e;this.p=new m(r,16);this.n=this.p.bitLength();this.k=new m(1).iushln(this.n).isub(this.p);this.tmp=this._tmp()}y.prototype._tmp=function e(){var r=new m(null);r.words=new Array(Math.ceil(this.n/13));return r};y.prototype.ireduce=function e(r){var t=r;var n;do{this.split(t,this.tmp);t=this.imulK(t);t=t.iadd(this.tmp);n=t.bitLength()}while(n>this.n);var i=n<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};y.prototype.split=function e(r,t){r.iushrn(this.n,0,t)};y.prototype.imulK=function e(r){return r.imul(this.k)};function w(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}t(w,y);w.prototype.split=function e(r,t){var n=4194303;var i=Math.min(r.length,9);for(var o=0;o<i;o++){t.words[o]=r.words[o]}t.length=i;if(r.length<=9){r.words[0]=0;r.length=1;return}var a=r.words[9];t.words[t.length++]=a&n;for(o=10;o<r.length;o++){var s=r.words[o]|0;r.words[o-10]=(s&n)<<4|a>>>22;a=s}a>>>=22;r.words[o-10]=a;if(a===0&&r.length>10){r.length-=10}else{r.length-=9}};w.prototype.imulK=function e(r){r.words[r.length]=0;r.words[r.length+1]=0;r.length+=2;var t=0;for(var n=0;n<r.length;n++){var i=r.words[n]|0;t+=i*977;r.words[n]=t&67108863;t=i*64+(t/67108864|0)}if(r.words[r.length-1]===0){r.length--;if(r.words[r.length-1]===0){r.length--}}return r};function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}t(_,y);function S(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}t(S,y);function A(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}t(A,y);A.prototype.imulK=function e(r){var t=0;for(var n=0;n<r.length;n++){var i=(r.words[n]|0)*19+t;var o=i&67108863;i>>>=26;r.words[n]=o;t=i}if(t!==0){r.words[r.length++]=t}return r};m._prime=function e(r){if(b[r])return b[r];var e;if(r==="k256"){e=new w}else if(r==="p224"){e=new _}else if(r==="p192"){e=new S}else if(r==="p25519"){e=new A}else{throw new Error("Unknown prime "+r)}b[r]=e;return e};function E(e){if(typeof e==="string"){var r=m._prime(e);this.m=r.p;this.prime=r}else{g(e.gtn(1),"modulus must be greater than 1");this.m=e;this.prime=null}}E.prototype._verify1=function e(r){g(r.negative===0,"red works only with positives");g(r.red,"red works only with red numbers")};E.prototype._verify2=function e(r,t){g((r.negative|t.negative)===0,"red works only with positives");g(r.red&&r.red===t.red,"red works only with red numbers")};E.prototype.imod=function e(r){if(this.prime)return this.prime.ireduce(r)._forceRed(this);return r.umod(this.m)._forceRed(this)};E.prototype.neg=function e(r){if(r.isZero()){return r.clone()}return this.m.sub(r)._forceRed(this)};E.prototype.add=function e(r,t){this._verify2(r,t);var n=r.add(t);if(n.cmp(this.m)>=0){n.isub(this.m)}return n._forceRed(this)};E.prototype.iadd=function e(r,t){this._verify2(r,t);var n=r.iadd(t);if(n.cmp(this.m)>=0){n.isub(this.m)}return n};E.prototype.sub=function e(r,t){this._verify2(r,t);var n=r.sub(t);if(n.cmpn(0)<0){n.iadd(this.m)}return n._forceRed(this)};E.prototype.isub=function e(r,t){this._verify2(r,t);var n=r.isub(t);if(n.cmpn(0)<0){n.iadd(this.m)}return n};E.prototype.shl=function e(r,t){this._verify1(r);return this.imod(r.ushln(t))};E.prototype.imul=function e(r,t){this._verify2(r,t);return this.imod(r.imul(t))};E.prototype.mul=function e(r,t){this._verify2(r,t);return this.imod(r.mul(t))};E.prototype.isqr=function e(r){return this.imul(r,r.clone())};E.prototype.sqr=function e(r){return this.mul(r,r)};E.prototype.sqrt=function e(r){if(r.isZero())return r.clone();var t=this.m.andln(3);g(t%2===1);if(t===3){var n=this.m.add(new m(1)).iushrn(2);return this.pow(r,n)}var i=this.m.subn(1);var o=0;while(!i.isZero()&&i.andln(1)===0){o++;i.iushrn(1)}g(!i.isZero());var a=new m(1).toRed(this);var s=a.redNeg();var u=this.m.subn(1).iushrn(1);var c=this.m.bitLength();c=new m(2*c*c).toRed(this);while(this.pow(c,u).cmp(s)!==0){c.redIAdd(s)}var f=this.pow(c,i);var l=this.pow(r,i.addn(1).iushrn(1));var h=this.pow(r,i);var d=o;while(h.cmp(a)!==0){var p=h;for(var v=0;p.cmp(a)!==0;v++){p=p.redSqr()}g(v<d);var b=this.pow(f,new m(1).iushln(d-v-1));l=l.redMul(b);f=b.redSqr();h=h.redMul(f);d=v}return l};E.prototype.invm=function e(r){var t=r._invmp(this.m);if(t.negative!==0){t.negative=0;return this.imod(t).redNeg()}else{return this.imod(t)}};E.prototype.pow=function e(r,t){if(t.isZero())return new m(1).toRed(this);if(t.cmpn(1)===0)return r.clone();var n=4;var i=new Array(1<<n);i[0]=new m(1).toRed(this);i[1]=r;for(var o=2;o<i.length;o++){i[o]=this.mul(i[o-1],r)}var a=i[0];var s=0;var u=0;var c=t.bitLength()%26;if(c===0){c=26}for(o=t.length-1;o>=0;o--){var f=t.words[o];for(var l=c-1;l>=0;l--){var h=f>>l&1;if(a!==i[0]){a=this.sqr(a)}if(h===0&&s===0){u=0;continue}s<<=1;s|=h;u++;if(u!==n&&(o!==0||l!==0))continue;a=this.mul(a,i[s]);u=0;s=0}c=26}return a};E.prototype.convertTo=function e(r){var t=r.umod(this.m);return t===r?t.clone():t};E.prototype.convertFrom=function e(r){var t=r.clone();t.red=null;return t};m.mont=function e(r){return new M(r)};function M(e){E.call(this,e);this.shift=this.m.bitLength();if(this.shift%26!==0){this.shift+=26-this.shift%26}this.r=new m(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)}t(M,E);M.prototype.convertTo=function e(r){return this.imod(r.ushln(this.shift))};M.prototype.convertFrom=function e(r){var t=this.imod(r.mul(this.rinv));t.red=null;return t};M.prototype.imul=function e(r,t){if(r.isZero()||t.isZero()){r.words[0]=0;r.length=1;return r}var n=r.imul(t);var i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var o=n.isub(i).iushrn(this.shift);var a=o;if(o.cmp(this.m)>=0){a=o.isub(this.m)}else if(o.cmpn(0)<0){a=o.iadd(this.m)}return a._forceRed(this)};M.prototype.mul=function e(r,t){if(r.isZero()||t.isZero())return new m(0)._forceRed(this);var n=r.mul(t);var i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var o=n.isub(i).iushrn(this.shift);var a=o;if(o.cmp(this.m)>=0){a=o.isub(this.m)}else if(o.cmpn(0)<0){a=o.iadd(this.m)}return a._forceRed(this)};M.prototype.invm=function e(r){var t=this.imod(r._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(typeof e==="undefined"||e,this)},{buffer:140}],139:[function(e,r,t){var n;r.exports=function e(r){if(!n)n=new i(null);return n.generate(r)};function i(e){this.rand=e}r.exports.Rand=i;i.prototype.generate=function e(r){return this._rand(r)};i.prototype._rand=function e(r){if(this.rand.getBytes)return this.rand.getBytes(r);var t=new Uint8Array(r);for(var n=0;n<t.length;n++)t[n]=this.rand.getByte();return t};if(typeof self==="object"){if(self.crypto&&self.crypto.getRandomValues){i.prototype._rand=function e(r){var t=new Uint8Array(r);self.crypto.getRandomValues(t);return t}}else if(self.msCrypto&&self.msCrypto.getRandomValues){i.prototype._rand=function e(r){var t=new Uint8Array(r);self.msCrypto.getRandomValues(t);return t}}else if(typeof window==="object"){i.prototype._rand=function(){throw new Error("Not implemented yet")}}}else{try{var o=e("crypto");if(typeof o.randomBytes!=="function")throw new Error("Not supported");i.prototype._rand=function e(r){return o.randomBytes(r)}}catch(e){}}},{crypto:140}],140:[function(e,r,t){},{}],141:[function(e,r,t){var i=e("safe-buffer").Buffer;function o(e){if(!i.isBuffer(e))e=i.from(e);var r=e.length/4|0;var t=new Array(r);for(var n=0;n<r;n++){t[n]=e.readUInt32BE(n*4)}return t}function n(e){for(var r=0;r<e.length;e++){e[r]=0}}function a(e,r,t,n,i){var o=t[0];var a=t[1];var s=t[2];var u=t[3];var c=e[0]^r[0];var f=e[1]^r[1];var l=e[2]^r[2];var h=e[3]^r[3];var d,p,v,b;var g=4;for(var m=1;m<i;m++){d=o[c>>>24]^a[f>>>16&255]^s[l>>>8&255]^u[h&255]^r[g++];p=o[f>>>24]^a[l>>>16&255]^s[h>>>8&255]^u[c&255]^r[g++];v=o[l>>>24]^a[h>>>16&255]^s[c>>>8&255]^u[f&255]^r[g++];b=o[h>>>24]^a[c>>>16&255]^s[f>>>8&255]^u[l&255]^r[g++];c=d;f=p;l=v;h=b}d=(n[c>>>24]<<24|n[f>>>16&255]<<16|n[l>>>8&255]<<8|n[h&255])^r[g++];p=(n[f>>>24]<<24|n[l>>>16&255]<<16|n[h>>>8&255]<<8|n[c&255])^r[g++];v=(n[l>>>24]<<24|n[h>>>16&255]<<16|n[c>>>8&255]<<8|n[f&255])^r[g++];b=(n[h>>>24]<<24|n[c>>>16&255]<<16|n[f>>>8&255]<<8|n[l&255])^r[g++];d=d>>>0;p=p>>>0;v=v>>>0;b=b>>>0;return[d,p,v,b]}var l=[0,1,2,4,8,16,32,64,128,27,54];var h=function(){var e=new Array(256);for(var r=0;r<256;r++){if(r<128){e[r]=r<<1}else{e[r]=r<<1^283}}var t=[];var n=[];var i=[[],[],[],[]];var o=[[],[],[],[]];var a=0;var s=0;for(var u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^c&255^99;t[a]=c;n[c]=a;var f=e[a];var l=e[f];var h=e[l];var d=e[c]*257^c*16843008;i[0][a]=d<<24|d>>>8;i[1][a]=d<<16|d>>>16;i[2][a]=d<<8|d>>>24;i[3][a]=d;d=h*16843009^l*65537^f*257^a*16843008;o[0][c]=d<<24|d>>>8;o[1][c]=d<<16|d>>>16;o[2][c]=d<<8|d>>>24;o[3][c]=d;if(a===0){a=s=1}else{a=f^e[e[e[h^f]]];s^=e[e[s]]}}return{SBOX:t,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function s(e){this._key=o(e);this._reset()}s.blockSize=4*4;s.keySize=256/8;s.prototype.blockSize=s.blockSize;s.prototype.keySize=s.keySize;s.prototype._reset=function(){var e=this._key;var r=e.length;var t=r+6;var n=(t+1)*4;var i=[];for(var o=0;o<r;o++){i[o]=e[o]}for(o=r;o<n;o++){var a=i[o-1];if(o%r===0){a=a<<8|a>>>24;a=h.SBOX[a>>>24]<<24|h.SBOX[a>>>16&255]<<16|h.SBOX[a>>>8&255]<<8|h.SBOX[a&255];a^=l[o/r|0]<<24}else if(r>6&&o%r===4){a=h.SBOX[a>>>24]<<24|h.SBOX[a>>>16&255]<<16|h.SBOX[a>>>8&255]<<8|h.SBOX[a&255]}i[o]=i[o-r]^a}var s=[];for(var u=0;u<n;u++){var c=n-u;var f=i[c-(u%4?0:4)];if(u<4||c<=4){s[u]=f}else{s[u]=h.INV_SUB_MIX[0][h.SBOX[f>>>24]]^h.INV_SUB_MIX[1][h.SBOX[f>>>16&255]]^h.INV_SUB_MIX[2][h.SBOX[f>>>8&255]]^h.INV_SUB_MIX[3][h.SBOX[f&255]]}}this._nRounds=t;this._keySchedule=i;this._invKeySchedule=s};s.prototype.encryptBlockRaw=function(e){e=o(e);return a(e,this._keySchedule,h.SUB_MIX,h.SBOX,this._nRounds)};s.prototype.encryptBlock=function(e){var r=this.encryptBlockRaw(e);var t=i.allocUnsafe(16);t.writeUInt32BE(r[0],0);t.writeUInt32BE(r[1],4);t.writeUInt32BE(r[2],8);t.writeUInt32BE(r[3],12);return t};s.prototype.decryptBlock=function(e){e=o(e);var r=e[1];e[1]=e[3];e[3]=r;var t=a(e,this._invKeySchedule,h.INV_SUB_MIX,h.INV_SBOX,this._nRounds);var n=i.allocUnsafe(16);n.writeUInt32BE(t[0],0);n.writeUInt32BE(t[3],4);n.writeUInt32BE(t[2],8);n.writeUInt32BE(t[1],12);return n};s.prototype.scrub=function(){n(this._keySchedule);n(this._invKeySchedule);n(this._key)};r.exports.AES=s},{"safe-buffer":283}],142:[function(e,r,t){var a=e("./aes");var c=e("safe-buffer").Buffer;var s=e("cipher-base");var n=e("inherits");var f=e("./ghash");var i=e("buffer-xor");var l=e("./incr32");function o(e,r){var t=0;if(e.length!==r.length)t++;var n=Math.min(e.length,r.length);for(var i=0;i<n;++i){t+=e[i]^r[i]}return t}function u(e,r,t){if(r.length===12){e._finID=c.concat([r,c.from([0,0,0,1])]);return c.concat([r,c.from([0,0,0,2])])}var n=new f(t);var i=r.length;var o=i%16;n.update(r);if(o){o=16-o;n.update(c.alloc(o,0))}n.update(c.alloc(8,0));var a=i*8;var s=c.alloc(8);s.writeUIntBE(a,0,8);n.update(s);e._finID=n.state;var u=c.from(e._finID);l(u);return u}function h(e,r,t,n){s.call(this);var i=c.alloc(4,0);this._cipher=new a.AES(r);var o=this._cipher.encryptBlock(i);this._ghash=new f(o);t=u(this,t,o);this._prev=c.from(t);this._cache=c.allocUnsafe(0);this._secCache=c.allocUnsafe(0);this._decrypt=n;this._alen=0;this._len=0;this._mode=e;this._authTag=null;this._called=false}n(h,s);h.prototype._update=function(e){if(!this._called&&this._alen){var r=16-this._alen%16;if(r<16){r=c.alloc(r,0);this._ghash.update(r)}}this._called=true;var t=this._mode.encrypt(this,e);if(this._decrypt){this._ghash.update(e)}else{this._ghash.update(t)}this._len+=e.length;return t};h.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=i(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&o(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e;this._cipher.scrub()};h.prototype.getAuthTag=function e(){if(this._decrypt||!c.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag};h.prototype.setAuthTag=function e(r){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=r};h.prototype.setAAD=function e(r){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(r);this._alen+=r.length};r.exports=h},{"./aes":141,"./ghash":146,"./incr32":147,"buffer-xor":185,"cipher-base":187,inherits:256,"safe-buffer":283}],143:[function(e,r,t){var n=e("./encrypter");var i=e("./decrypter");var o=e("./modes/list.json");function a(){return Object.keys(o)}t.createCipher=t.Cipher=n.createCipher;t.createCipheriv=t.Cipheriv=n.createCipheriv;t.createDecipher=t.Decipher=i.createDecipher;t.createDecipheriv=t.Decipheriv=i.createDecipheriv;t.listCiphers=t.getCiphers=a},{"./decrypter":144,"./encrypter":145,"./modes/list.json":155}],144:[function(e,r,t){var i=e("./authCipher");var o=e("safe-buffer").Buffer;var a=e("./modes");var s=e("./streamCipher");var n=e("cipher-base");var u=e("./aes");var c=e("evp_bytestokey");var f=e("inherits");function l(e,r,t){n.call(this);this._cache=new h;this._last=void 0;this._cipher=new u.AES(r);this._prev=o.from(t);this._mode=e;this._autopadding=true}f(l,n);l.prototype._update=function(e){this._cache.add(e);var r;var t;var n=[];while(r=this._cache.get(this._autopadding)){t=this._mode.decrypt(this,r);n.push(t)}return o.concat(n)};l.prototype._final=function(){var e=this._cache.flush();if(this._autopadding){return d(this._mode.decrypt(this,e))}else if(e){throw new Error("data not multiple of block length")}};l.prototype.setAutoPadding=function(e){this._autopadding=!!e;return this};function h(){this.cache=o.allocUnsafe(0)}h.prototype.add=function(e){this.cache=o.concat([this.cache,e])};h.prototype.get=function(e){var r;if(e){if(this.cache.length>16){r=this.cache.slice(0,16);this.cache=this.cache.slice(16);return r}}else{if(this.cache.length>=16){r=this.cache.slice(0,16);this.cache=this.cache.slice(16);return r}}return null};h.prototype.flush=function(){if(this.cache.length)return this.cache};function d(e){var r=e[15];if(r<1||r>16){throw new Error("unable to decrypt data")}var t=-1;while(++t<r){if(e[t+(16-r)]!==r){throw new Error("unable to decrypt data")}}if(r===16)return;return e.slice(0,16-r)}function p(e,r,t){var n=a[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if(typeof t==="string")t=o.from(t);if(n.mode!=="GCM"&&t.length!==n.iv)throw new TypeError("invalid iv length "+t.length);if(typeof r==="string")r=o.from(r);if(r.length!==n.key/8)throw new TypeError("invalid key length "+r.length);if(n.type==="stream"){return new s(n.module,r,t,true)}else if(n.type==="auth"){return new i(n.module,r,t,true)}return new l(n.module,r,t)}function v(e,r){var t=a[e.toLowerCase()];if(!t)throw new TypeError("invalid suite type");var n=c(r,false,t.key,t.iv);return p(e,n.key,n.iv)}t.createDecipher=v;t.createDecipheriv=p},{"./aes":141,"./authCipher":142,"./modes":154,"./streamCipher":157,"cipher-base":187,evp_bytestokey:225,inherits:256,"safe-buffer":283}],145:[function(e,r,t){var i=e("./modes");var o=e("./authCipher");var a=e("safe-buffer").Buffer;var s=e("./streamCipher");var n=e("cipher-base");var u=e("./aes");var c=e("evp_bytestokey");var f=e("inherits");function l(e,r,t){n.call(this);this._cache=new d;this._cipher=new u.AES(r);this._prev=a.from(t);this._mode=e;this._autopadding=true}f(l,n);l.prototype._update=function(e){this._cache.add(e);var r;var t;var n=[];while(r=this._cache.get()){t=this._mode.encrypt(this,r);n.push(t)}return a.concat(n)};var h=a.alloc(16,16);l.prototype._final=function(){var e=this._cache.flush();if(this._autopadding){e=this._mode.encrypt(this,e);this._cipher.scrub();return e}if(!e.equals(h)){this._cipher.scrub();throw new Error("data not multiple of block length")}};l.prototype.setAutoPadding=function(e){this._autopadding=!!e;return this};function d(){this.cache=a.allocUnsafe(0)}d.prototype.add=function(e){this.cache=a.concat([this.cache,e])};d.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);this.cache=this.cache.slice(16);return e}return null};d.prototype.flush=function(){var e=16-this.cache.length;var r=a.allocUnsafe(e);var t=-1;while(++t<e){r.writeUInt8(e,t)}return a.concat([this.cache,r])};function p(e,r,t){var n=i[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if(typeof r==="string")r=a.from(r);if(r.length!==n.key/8)throw new TypeError("invalid key length "+r.length);if(typeof t==="string")t=a.from(t);if(n.mode!=="GCM"&&t.length!==n.iv)throw new TypeError("invalid iv length "+t.length);if(n.type==="stream"){return new s(n.module,r,t)}else if(n.type==="auth"){return new o(n.module,r,t)}return new l(n.module,r,t)}function v(e,r){var t=i[e.toLowerCase()];if(!t)throw new TypeError("invalid suite type");var n=c(r,false,t.key,t.iv);return p(e,n.key,n.iv)}t.createCipheriv=p;t.createCipher=v},{"./aes":141,"./authCipher":142,"./modes":154,"./streamCipher":157,"cipher-base":187,evp_bytestokey:225,inherits:256,"safe-buffer":283}],146:[function(e,r,t){var n=e("safe-buffer").Buffer;var i=n.alloc(16,0);function a(e){return[e.readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)]}function s(e){var r=n.allocUnsafe(16);r.writeUInt32BE(e[0]>>>0,0);r.writeUInt32BE(e[1]>>>0,4);r.writeUInt32BE(e[2]>>>0,8);r.writeUInt32BE(e[3]>>>0,12);return r}function o(e){this.h=e;this.state=n.alloc(16,0);this.cache=n.allocUnsafe(0)}o.prototype.ghash=function(e){var r=-1;while(++r<e.length){this.state[r]^=e[r]}this._multiply()};o.prototype._multiply=function(){var e=a(this.h);var r=[0,0,0,0];var t,n,i;var o=-1;while(++o<128){n=(this.state[~~(o/8)]&1<<7-o%8)!==0;if(n){r[0]^=e[0];r[1]^=e[1];r[2]^=e[2];r[3]^=e[3]}i=(e[3]&1)!==0;for(t=3;t>0;t--){e[t]=e[t]>>>1|(e[t-1]&1)<<31}e[0]=e[0]>>>1;if(i){e[0]=e[0]^225<<24}}this.state=s(r)};o.prototype.update=function(e){this.cache=n.concat([this.cache,e]);var r;while(this.cache.length>=16){r=this.cache.slice(0,16);this.cache=this.cache.slice(16);this.ghash(r)}};o.prototype.final=function(e,r){if(this.cache.length){this.ghash(n.concat([this.cache,i],16))}this.ghash(s([0,e,0,r]));return this.state};r.exports=o},{"safe-buffer":283}],147:[function(e,r,t){function n(e){var r=e.length;var t;while(r--){t=e.readUInt8(r);if(t===255){e.writeUInt8(0,r)}else{t++;e.writeUInt8(t,r);break}}}r.exports=n},{}],148:[function(e,r,t){var i=e("buffer-xor");t.encrypt=function(e,r){var t=i(r,e._prev);e._prev=e._cipher.encryptBlock(t);return e._prev};t.decrypt=function(e,r){var t=e._prev;e._prev=r;var n=e._cipher.decryptBlock(r);return i(n,t)}},{"buffer-xor":185}],149:[function(e,r,t){var o=e("safe-buffer").Buffer;var a=e("buffer-xor");function s(e,r,t){var n=r.length;var i=a(r,e._cache);e._cache=e._cache.slice(n);e._prev=o.concat([e._prev,t?r:i]);return i}t.encrypt=function(e,r,t){var n=o.allocUnsafe(0);var i;while(r.length){if(e._cache.length===0){e._cache=e._cipher.encryptBlock(e._prev);e._prev=o.allocUnsafe(0)}if(e._cache.length<=r.length){i=e._cache.length;n=o.concat([n,s(e,r.slice(0,i),t)]);r=r.slice(i)}else{n=o.concat([n,s(e,r,t)]);break}}return n}},{"buffer-xor":185,"safe-buffer":283}],150:[function(e,r,t){var a=e("safe-buffer").Buffer;function s(e,r,t){var n;var i=-1;var o=8;var a=0;var s,u;while(++i<o){n=e._cipher.encryptBlock(e._prev);s=r&1<<7-i?128:0;u=n[0]^s;a+=(u&128)>>i%8;e._prev=c(e._prev,t?s:u)}return a}function c(e,r){var t=e.length;var n=-1;var i=a.allocUnsafe(e.length);e=a.concat([e,a.from([r])]);while(++n<t){i[n]=e[n]<<1|e[n+1]>>7}return i}t.encrypt=function(e,r,t){var n=r.length;var i=a.allocUnsafe(n);var o=-1;while(++o<n){i[o]=s(e,r[o],t)}return i}},{"safe-buffer":283}],151:[function(e,r,t){var a=e("safe-buffer").Buffer;function s(e,r,t){var n=e._cipher.encryptBlock(e._prev);var i=n[0]^r;e._prev=a.concat([e._prev.slice(1),a.from([t?r:i])]);return i}t.encrypt=function(e,r,t){var n=r.length;var i=a.allocUnsafe(n);var o=-1;while(++o<n){i[o]=s(e,r[o],t)}return i}},{"safe-buffer":283}],152:[function(e,r,t){var u=e("buffer-xor");var c=e("safe-buffer").Buffer;var n=e("../incr32");function f(e){var r=e._cipher.encryptBlockRaw(e._prev);n(e._prev);return r}var l=16;t.encrypt=function(e,r){var t=Math.ceil(r.length/l);var n=e._cache.length;e._cache=c.concat([e._cache,c.allocUnsafe(t*l)]);for(var i=0;i<t;i++){var o=f(e);var a=n+i*l;e._cache.writeUInt32BE(o[0],a+0);e._cache.writeUInt32BE(o[1],a+4);e._cache.writeUInt32BE(o[2],a+8);e._cache.writeUInt32BE(o[3],a+12)}var s=e._cache.slice(0,r.length);e._cache=e._cache.slice(r.length);return u(r,s)}},{"../incr32":147,"buffer-xor":185,"safe-buffer":283}],153:[function(e,r,t){t.encrypt=function(e,r){return e._cipher.encryptBlock(r)};t.decrypt=function(e,r){return e._cipher.decryptBlock(r)}},{}],154:[function(e,r,t){var n={ECB:e("./ecb"),CBC:e("./cbc"),CFB:e("./cfb"),CFB8:e("./cfb8"),CFB1:e("./cfb1"),OFB:e("./ofb"),CTR:e("./ctr"),GCM:e("./ctr")};var i=e("./list.json");for(var o in i){i[o].module=n[i[o].mode]}r.exports=i},{"./cbc":148,"./cfb":149,"./cfb1":150,"./cfb8":151,"./ctr":152,"./ecb":153,"./list.json":155,"./ofb":156}],155:[function(e,r,t){r.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}},{}],156:[function(e,r,t){(function(o){(function(){var n=e("buffer-xor");function i(e){e._prev=e._cipher.encryptBlock(e._prev);return e._prev}t.encrypt=function(e,r){while(e._cache.length<r.length){e._cache=o.concat([e._cache,i(e)])}var t=e._cache.slice(0,r.length);e._cache=e._cache.slice(r.length);return n(r,t)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:186,"buffer-xor":185}],157:[function(e,r,t){var i=e("./aes");var o=e("safe-buffer").Buffer;var a=e("cipher-base");var n=e("inherits");function s(e,r,t,n){a.call(this);this._cipher=new i.AES(r);this._prev=o.from(t);this._cache=o.allocUnsafe(0);this._secCache=o.allocUnsafe(0);this._decrypt=n;this._mode=e}n(s,a);s.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)};s.prototype._final=function(){this._cipher.scrub()};r.exports=s},{"./aes":141,"cipher-base":187,inherits:256,"safe-buffer":283}],158:[function(e,r,t){var n=e("browserify-des");var i=e("browserify-aes/browser");var o=e("browserify-aes/modes");var a=e("browserify-des/modes");var s=e("evp_bytestokey");function u(e,r){e=e.toLowerCase();var t,n;if(o[e]){t=o[e].key;n=o[e].iv}else if(a[e]){t=a[e].key*8;n=a[e].iv}else{throw new TypeError("invalid suite type")}var i=s(r,false,t,n);return f(e,i.key,i.iv)}function c(e,r){e=e.toLowerCase();var t,n;if(o[e]){t=o[e].key;n=o[e].iv}else if(a[e]){t=a[e].key*8;n=a[e].iv}else{throw new TypeError("invalid suite type")}var i=s(r,false,t,n);return l(e,i.key,i.iv)}function f(e,r,t){e=e.toLowerCase();if(o[e])return i.createCipheriv(e,r,t);if(a[e])return new n({key:r,iv:t,mode:e});throw new TypeError("invalid suite type")}function l(e,r,t){e=e.toLowerCase();if(o[e])return i.createDecipheriv(e,r,t);if(a[e])return new n({key:r,iv:t,mode:e,decrypt:true});throw new TypeError("invalid suite type")}function h(){return Object.keys(a).concat(i.getCiphers())}t.createCipher=t.Cipher=u;t.createCipheriv=t.Cipheriv=f;t.createDecipher=t.Decipher=c;t.createDecipheriv=t.Decipheriv=l;t.listCiphers=t.getCiphers=h},{"browserify-aes/browser":143,"browserify-aes/modes":154,"browserify-des":159,"browserify-des/modes":160,evp_bytestokey:225}],159:[function(e,r,t){var a=e("cipher-base");var n=e("des.js");var i=e("inherits");var s=e("safe-buffer").Buffer;var u={"des-ede3-cbc":n.CBC.instantiate(n.EDE),"des-ede3":n.EDE,"des-ede-cbc":n.CBC.instantiate(n.EDE),"des-ede":n.EDE,"des-cbc":n.CBC.instantiate(n.DES),"des-ecb":n.DES};u.des=u["des-cbc"];u.des3=u["des-ede3-cbc"];r.exports=o;i(o,a);function o(e){a.call(this);var r=e.mode.toLowerCase();var t=u[r];var n;if(e.decrypt){n="decrypt"}else{n="encrypt"}var i=e.key;if(!s.isBuffer(i)){i=s.from(i)}if(r==="des-ede"||r==="des-ede-cbc"){i=s.concat([i,i.slice(0,8)])}var o=e.iv;if(!s.isBuffer(o)){o=s.from(o)}this._des=t.create({key:i,iv:o,type:n})}o.prototype._update=function(e){return s.from(this._des.update(e))};o.prototype._final=function(){return s.from(this._des.final())}},{"cipher-base":187,"des.js":194,inherits:256,"safe-buffer":283}],160:[function(e,r,t){t["des-ecb"]={key:8,iv:0};t["des-cbc"]=t.des={key:8,iv:8};t["des-ede3-cbc"]=t.des3={key:24,iv:8};t["des-ede3"]={key:24,iv:0};t["des-ede-cbc"]={key:16,iv:8};t["des-ede"]={key:16,iv:0}},{}],161:[function(r,t,e){(function(v){(function(){var d=r("bn.js");var n=r("randombytes");function p(e){var r=i(e);var t=r.toRed(d.mont(e.modulus)).redPow(new d(e.publicExponent)).fromRed();return{blinder:t,unblinder:r.invm(e.modulus)}}function i(e){var r=e.modulus.byteLength();var t;do{t=new d(n(r))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function e(e,r){var t=p(r);var n=r.modulus.byteLength();var i=new d(e).mul(t.blinder).umod(r.modulus);var o=i.toRed(d.mont(r.prime1));var a=i.toRed(d.mont(r.prime2));var s=r.coefficient;var u=r.prime1;var c=r.prime2;var f=o.redPow(r.exponent1).fromRed();var l=a.redPow(r.exponent2).fromRed();var h=f.isub(l).imul(s).umod(u).imul(c);return l.iadd(h).imul(t.unblinder).umod(r.modulus).toArrayLike(v,"be",n)}e.getr=i;t.exports=e}).call(this)}).call(this,r("buffer").Buffer)},{"bn.js":162,buffer:186,randombytes:280}],162:[function(O,e,r){(function(e,r){"use strict";function g(e,r){if(!e)throw new Error(r||"Assertion failed")}function t(e,r){e.super_=r;var t=function(){};t.prototype=r.prototype;e.prototype=new t;e.prototype.constructor=e}function m(e,r,t){if(m.isBN(e)){return e}this.negative=0;this.words=null;this.length=0;this.red=null;if(e!==null){if(r==="le"||r==="be"){t=r;r=10}this._init(e||0,r||10,t||"be")}}if(typeof e==="object"){e.exports=m}else{r.BN=m}m.BN=m;m.wordSize=26;var n;try{if(typeof window!=="undefined"&&typeof window.Buffer!=="undefined"){n=window.Buffer}else{n=O("buffer").Buffer}}catch(e){}m.isBN=function e(r){if(r instanceof m){return true}return r!==null&&typeof r==="object"&&r.constructor.wordSize===m.wordSize&&Array.isArray(r.words)};m.max=function e(r,t){if(r.cmp(t)>0)return r;return t};m.min=function e(r,t){if(r.cmp(t)<0)return r;return t};m.prototype._init=function e(r,t,n){if(typeof r==="number"){return this._initNumber(r,t,n)}if(typeof r==="object"){return this._initArray(r,t,n)}if(t==="hex"){t=16}g(t===(t|0)&&t>=2&&t<=36);r=r.toString().replace(/\s+/g,"");var i=0;if(r[0]==="-"){i++;this.negative=1}if(i<r.length){if(t===16){this._parseHex(r,i,n)}else{this._parseBase(r,t,i);if(n==="le"){this._initArray(this.toArray(),t,n)}}}};m.prototype._initNumber=function e(r,t,n){if(r<0){this.negative=1;r=-r}if(r<67108864){this.words=[r&67108863];this.length=1}else if(r<4503599627370496){this.words=[r&67108863,r/67108864&67108863];this.length=2}else{g(r<9007199254740992);this.words=[r&67108863,r/67108864&67108863,1];this.length=3}if(n!=="le")return;this._initArray(this.toArray(),t,n)};m.prototype._initArray=function e(r,t,n){g(typeof r.length==="number");if(r.length<=0){this.words=[0];this.length=1;return this}this.length=Math.ceil(r.length/3);this.words=new Array(this.length);for(var i=0;i<this.length;i++){this.words[i]=0}var o,a;var s=0;if(n==="be"){for(i=r.length-1,o=0;i>=0;i-=3){a=r[i]|r[i-1]<<8|r[i-2]<<16;this.words[o]|=a<<s&67108863;this.words[o+1]=a>>>26-s&67108863;s+=24;if(s>=26){s-=26;o++}}}else if(n==="le"){for(i=0,o=0;i<r.length;i+=3){a=r[i]|r[i+1]<<8|r[i+2]<<16;this.words[o]|=a<<s&67108863;this.words[o+1]=a>>>26-s&67108863;s+=24;if(s>=26){s-=26;o++}}}return this._strip()};function i(e,r){var t=e.charCodeAt(r);if(t>=48&&t<=57){return t-48}else if(t>=65&&t<=70){return t-55}else if(t>=97&&t<=102){return t-87}else{g(false,"Invalid character in "+e)}}function c(e,r,t){var n=i(e,t);if(t-1>=r){n|=i(e,t-1)<<4}return n}m.prototype._parseHex=function e(r,t,n){this.length=Math.ceil((r.length-t)/6);this.words=new Array(this.length);for(var i=0;i<this.length;i++){this.words[i]=0}var o=0;var a=0;var s;if(n==="be"){for(i=r.length-1;i>=t;i-=2){s=c(r,t,i)<<o;this.words[a]|=s&67108863;if(o>=18){o-=18;a+=1;this.words[a]|=s>>>26}else{o+=8}}}else{var u=r.length-t;for(i=u%2===0?t+1:t;i<r.length;i+=2){s=c(r,t,i)<<o;this.words[a]|=s&67108863;if(o>=18){o-=18;a+=1;this.words[a]|=s>>>26}else{o+=8}}}this._strip()};function h(e,r,t,n){var i=0;var o=0;var a=Math.min(e.length,t);for(var s=r;s<a;s++){var u=e.charCodeAt(s)-48;i*=n;if(u>=49){o=u-49+10}else if(u>=17){o=u-17+10}else{o=u}g(u>=0&&o<n,"Invalid character");i+=o}return i}m.prototype._parseBase=function e(r,t,n){this.words=[0];this.length=1;for(var i=0,o=1;o<=67108863;o*=t){i++}i--;o=o/t|0;var a=r.length-n;var s=a%i;var u=Math.min(a,a-s)+n;var c=0;for(var f=n;f<u;f+=i){c=h(r,f,f+i,t);this.imuln(o);if(this.words[0]+c<67108864){this.words[0]+=c}else{this._iaddn(c)}}if(s!==0){var l=1;c=h(r,f,r.length,t);for(f=0;f<s;f++){l*=t}this.imuln(l);if(this.words[0]+c<67108864){this.words[0]+=c}else{this._iaddn(c)}}this._strip()};m.prototype.copy=function e(r){r.words=new Array(this.length);for(var t=0;t<this.length;t++){r.words[t]=this.words[t]}r.length=this.length;r.negative=this.negative;r.red=this.red};function o(e,r){e.words=r.words;e.length=r.length;e.negative=r.negative;e.red=r.red}m.prototype._move=function e(r){o(r,this)};m.prototype.clone=function e(){var r=new m(null);this.copy(r);return r};m.prototype._expand=function e(r){while(this.length<r){this.words[this.length++]=0}return this};m.prototype._strip=function e(){while(this.length>1&&this.words[this.length-1]===0){this.length--}return this._normSign()};m.prototype._normSign=function e(){if(this.length===1&&this.words[0]===0){this.negative=0}return this};if(typeof Symbol!=="undefined"&&typeof Symbol.for==="function"){try{m.prototype[Symbol.for("nodejs.util.inspect.custom")]=a}catch(e){m.prototype.inspect=a}}else{m.prototype.inspect=a}function a(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","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 p=[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 v=[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];m.prototype.toString=function e(r,t){r=r||10;t=t|0||1;var n;if(r===16||r==="hex"){n="";var i=0;var o=0;for(var a=0;a<this.length;a++){var s=this.words[a];var u=((s<<i|o)&16777215).toString(16);o=s>>>24-i&16777215;if(o!==0||a!==this.length-1){n=d[6-u.length]+u+n}else{n=u+n}i+=2;if(i>=26){i-=26;a--}}if(o!==0){n=o.toString(16)+n}while(n.length%t!==0){n="0"+n}if(this.negative!==0){n="-"+n}return n}if(r===(r|0)&&r>=2&&r<=36){var c=p[r];var f=v[r];n="";var l=this.clone();l.negative=0;while(!l.isZero()){var h=l.modrn(f).toString(r);l=l.idivn(f);if(!l.isZero()){n=d[c-h.length]+h+n}else{n=h+n}}if(this.isZero()){n="0"+n}while(n.length%t!==0){n="0"+n}if(this.negative!==0){n="-"+n}return n}g(false,"Base should be between 2 and 36")};m.prototype.toNumber=function e(){var r=this.words[0];if(this.length===2){r+=this.words[1]*67108864}else if(this.length===3&&this.words[2]===1){r+=4503599627370496+this.words[1]*67108864}else if(this.length>2){g(false,"Number can only safely store up to 53 bits")}return this.negative!==0?-r:r};m.prototype.toJSON=function e(){return this.toString(16,2)};if(n){m.prototype.toBuffer=function e(r,t){return this.toArrayLike(n,r,t)}}m.prototype.toArray=function e(r,t){return this.toArrayLike(Array,r,t)};var u=function e(r,t){if(r.allocUnsafe){return r.allocUnsafe(t)}return new r(t)};m.prototype.toArrayLike=function e(r,t,n){this._strip();var i=this.byteLength();var o=n||Math.max(1,i);g(i<=o,"byte array longer than desired length");g(o>0,"Requested array length <= 0");var a=u(r,o);var s=t==="le"?"LE":"BE";this["_toArrayLike"+s](a,i);return a};m.prototype._toArrayLikeLE=function e(r,t){var n=0;var i=0;for(var o=0,a=0;o<this.length;o++){var s=this.words[o]<<a|i;r[n++]=s&255;if(n<r.length){r[n++]=s>>8&255}if(n<r.length){r[n++]=s>>16&255}if(a===6){if(n<r.length){r[n++]=s>>24&255}i=0;a=0}else{i=s>>>24;a+=2}}if(n<r.length){r[n++]=i;while(n<r.length){r[n++]=0}}};m.prototype._toArrayLikeBE=function e(r,t){var n=r.length-1;var i=0;for(var o=0,a=0;o<this.length;o++){var s=this.words[o]<<a|i;r[n--]=s&255;if(n>=0){r[n--]=s>>8&255}if(n>=0){r[n--]=s>>16&255}if(a===6){if(n>=0){r[n--]=s>>24&255}i=0;a=0}else{i=s>>>24;a+=2}}if(n>=0){r[n--]=i;while(n>=0){r[n--]=0}}};if(Math.clz32){m.prototype._countBits=function e(r){return 32-Math.clz32(r)}}else{m.prototype._countBits=function e(r){var t=r;var n=0;if(t>=4096){n+=13;t>>>=13}if(t>=64){n+=7;t>>>=7}if(t>=8){n+=4;t>>>=4}if(t>=2){n+=2;t>>>=2}return n+t}}m.prototype._zeroBits=function e(r){if(r===0)return 26;var t=r;var n=0;if((t&8191)===0){n+=13;t>>>=13}if((t&127)===0){n+=7;t>>>=7}if((t&15)===0){n+=4;t>>>=4}if((t&3)===0){n+=2;t>>>=2}if((t&1)===0){n++}return n};m.prototype.bitLength=function e(){var r=this.words[this.length-1];var t=this._countBits(r);return(this.length-1)*26+t};function s(e){var r=new Array(e.bitLength());for(var t=0;t<r.length;t++){var n=t/26|0;var i=t%26;r[t]=e.words[n]>>>i&1}return r}m.prototype.zeroBits=function e(){if(this.isZero())return 0;var r=0;for(var t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);r+=n;if(n!==26)break}return r};m.prototype.byteLength=function e(){return Math.ceil(this.bitLength()/8)};m.prototype.toTwos=function e(r){if(this.negative!==0){return this.abs().inotn(r).iaddn(1)}return this.clone()};m.prototype.fromTwos=function e(r){if(this.testn(r-1)){return this.notn(r).iaddn(1).ineg()}return this.clone()};m.prototype.isNeg=function e(){return this.negative!==0};m.prototype.neg=function e(){return this.clone().ineg()};m.prototype.ineg=function e(){if(!this.isZero()){this.negative^=1}return this};m.prototype.iuor=function e(r){while(this.length<r.length){this.words[this.length++]=0}for(var t=0;t<r.length;t++){this.words[t]=this.words[t]|r.words[t]}return this._strip()};m.prototype.ior=function e(r){g((this.negative|r.negative)===0);return this.iuor(r)};m.prototype.or=function e(r){if(this.length>r.length)return this.clone().ior(r);return r.clone().ior(this)};m.prototype.uor=function e(r){if(this.length>r.length)return this.clone().iuor(r);return r.clone().iuor(this)};m.prototype.iuand=function e(r){var t;if(this.length>r.length){t=r}else{t=this}for(var n=0;n<t.length;n++){this.words[n]=this.words[n]&r.words[n]}this.length=t.length;return this._strip()};m.prototype.iand=function e(r){g((this.negative|r.negative)===0);return this.iuand(r)};m.prototype.and=function e(r){if(this.length>r.length)return this.clone().iand(r);return r.clone().iand(this)};m.prototype.uand=function e(r){if(this.length>r.length)return this.clone().iuand(r);return r.clone().iuand(this)};m.prototype.iuxor=function e(r){var t;var n;if(this.length>r.length){t=this;n=r}else{t=r;n=this}for(var i=0;i<n.length;i++){this.words[i]=t.words[i]^n.words[i]}if(this!==t){for(;i<t.length;i++){this.words[i]=t.words[i]}}this.length=t.length;return this._strip()};m.prototype.ixor=function e(r){g((this.negative|r.negative)===0);return this.iuxor(r)};m.prototype.xor=function e(r){if(this.length>r.length)return this.clone().ixor(r);return r.clone().ixor(this)};m.prototype.uxor=function e(r){if(this.length>r.length)return this.clone().iuxor(r);return r.clone().iuxor(this)};m.prototype.inotn=function e(r){g(typeof r==="number"&&r>=0);var t=Math.ceil(r/26)|0;var n=r%26;this._expand(t);if(n>0){t--}for(var i=0;i<t;i++){this.words[i]=~this.words[i]&67108863}if(n>0){this.words[i]=~this.words[i]&67108863>>26-n}return this._strip()};m.prototype.notn=function e(r){return this.clone().inotn(r)};m.prototype.setn=function e(r,t){g(typeof r==="number"&&r>=0);var n=r/26|0;var i=r%26;this._expand(n+1);if(t){this.words[n]=this.words[n]|1<<i}else{this.words[n]=this.words[n]&~(1<<i)}return this._strip()};m.prototype.iadd=function e(r){var t;if(this.negative!==0&&r.negative===0){this.negative=0;t=this.isub(r);this.negative^=1;return this._normSign()}else if(this.negative===0&&r.negative!==0){r.negative=0;t=this.isub(r);r.negative=1;return t._normSign()}var n,i;if(this.length>r.length){n=this;i=r}else{n=r;i=this}var o=0;for(var a=0;a<i.length;a++){t=(n.words[a]|0)+(i.words[a]|0)+o;this.words[a]=t&67108863;o=t>>>26}for(;o!==0&&a<n.length;a++){t=(n.words[a]|0)+o;this.words[a]=t&67108863;o=t>>>26}this.length=n.length;if(o!==0){this.words[this.length]=o;this.length++}else if(n!==this){for(;a<n.length;a++){this.words[a]=n.words[a]}}return this};m.prototype.add=function e(r){var t;if(r.negative!==0&&this.negative===0){r.negative=0;t=this.sub(r);r.negative^=1;return t}else if(r.negative===0&&this.negative!==0){this.negative=0;t=r.sub(this);this.negative=1;return t}if(this.length>r.length)return this.clone().iadd(r);return r.clone().iadd(this)};m.prototype.isub=function e(r){if(r.negative!==0){r.negative=0;var t=this.iadd(r);r.negative=1;return t._normSign()}else if(this.negative!==0){this.negative=0;this.iadd(r);this.negative=1;return this._normSign()}var n=this.cmp(r);if(n===0){this.negative=0;this.length=1;this.words[0]=0;return this}var i,o;if(n>0){i=this;o=r}else{i=r;o=this}var a=0;for(var s=0;s<o.length;s++){t=(i.words[s]|0)-(o.words[s]|0)+a;a=t>>26;this.words[s]=t&67108863}for(;a!==0&&s<i.length;s++){t=(i.words[s]|0)+a;a=t>>26;this.words[s]=t&67108863}if(a===0&&s<i.length&&i!==this){for(;s<i.length;s++){this.words[s]=i.words[s]}}this.length=Math.max(this.length,s);if(i!==this){this.negative=1}return this._strip()};m.prototype.sub=function e(r){return this.clone().isub(r)};function f(e,r,t){t.negative=r.negative^e.negative;var n=e.length+r.length|0;t.length=n;n=n-1|0;var i=e.words[0]|0;var o=r.words[0]|0;var a=i*o;var s=a&67108863;var u=a/67108864|0;t.words[0]=s;for(var c=1;c<n;c++){var f=u>>>26;var l=u&67108863;var h=Math.min(c,r.length-1);for(var d=Math.max(0,c-e.length+1);d<=h;d++){var p=c-d|0;i=e.words[p]|0;o=r.words[d]|0;a=i*o+l;f+=a/67108864|0;l=a&67108863}t.words[c]=l|0;u=f|0}if(u!==0){t.words[c]=u|0}else{t.length--}return t._strip()}var l=function e(r,t,n){var i=r.words;var o=t.words;var a=n.words;var s=0;var u;var c;var f;var l=i[0]|0;var h=l&8191;var d=l>>>13;var p=i[1]|0;var v=p&8191;var b=p>>>13;var g=i[2]|0;var m=g&8191;var y=g>>>13;var w=i[3]|0;var _=w&8191;var S=w>>>13;var A=i[4]|0;var E=A&8191;var M=A>>>13;var P=i[5]|0;var T=P&8191;var k=P>>>13;var O=i[6]|0;var B=O&8191;var C=O>>>13;var R=i[7]|0;var L=R&8191;var F=R>>>13;var j=i[8]|0;var x=j&8191;var N=j>>>13;var D=i[9]|0;var J=D&8191;var I=D>>>13;var U=o[0]|0;var H=U&8191;var X=U>>>13;var G=o[1]|0;var z=G&8191;var V=G>>>13;var Z=o[2]|0;var K=Z&8191;var q=Z>>>13;var Q=o[3]|0;var W=Q&8191;var Y=Q>>>13;var $=o[4]|0;var ee=$&8191;var re=$>>>13;var te=o[5]|0;var ne=te&8191;var ie=te>>>13;var oe=o[6]|0;var ae=oe&8191;var se=oe>>>13;var ue=o[7]|0;var ce=ue&8191;var fe=ue>>>13;var le=o[8]|0;var he=le&8191;var de=le>>>13;var pe=o[9]|0;var ve=pe&8191;var be=pe>>>13;n.negative=r.negative^t.negative;n.length=19;u=Math.imul(h,H);c=Math.imul(h,X);c=c+Math.imul(d,H)|0;f=Math.imul(d,X);var ge=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(ge>>>26)|0;ge&=67108863;u=Math.imul(v,H);c=Math.imul(v,X);c=c+Math.imul(b,H)|0;f=Math.imul(b,X);u=u+Math.imul(h,z)|0;c=c+Math.imul(h,V)|0;c=c+Math.imul(d,z)|0;f=f+Math.imul(d,V)|0;var me=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(me>>>26)|0;me&=67108863;u=Math.imul(m,H);c=Math.imul(m,X);c=c+Math.imul(y,H)|0;f=Math.imul(y,X);u=u+Math.imul(v,z)|0;c=c+Math.imul(v,V)|0;c=c+Math.imul(b,z)|0;f=f+Math.imul(b,V)|0;u=u+Math.imul(h,K)|0;c=c+Math.imul(h,q)|0;c=c+Math.imul(d,K)|0;f=f+Math.imul(d,q)|0;var ye=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(ye>>>26)|0;ye&=67108863;u=Math.imul(_,H);c=Math.imul(_,X);c=c+Math.imul(S,H)|0;f=Math.imul(S,X);u=u+Math.imul(m,z)|0;c=c+Math.imul(m,V)|0;c=c+Math.imul(y,z)|0;f=f+Math.imul(y,V)|0;u=u+Math.imul(v,K)|0;c=c+Math.imul(v,q)|0;c=c+Math.imul(b,K)|0;f=f+Math.imul(b,q)|0;u=u+Math.imul(h,W)|0;c=c+Math.imul(h,Y)|0;c=c+Math.imul(d,W)|0;f=f+Math.imul(d,Y)|0;var we=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(we>>>26)|0;we&=67108863;u=Math.imul(E,H);c=Math.imul(E,X);c=c+Math.imul(M,H)|0;f=Math.imul(M,X);u=u+Math.imul(_,z)|0;c=c+Math.imul(_,V)|0;c=c+Math.imul(S,z)|0;f=f+Math.imul(S,V)|0;u=u+Math.imul(m,K)|0;c=c+Math.imul(m,q)|0;c=c+Math.imul(y,K)|0;f=f+Math.imul(y,q)|0;u=u+Math.imul(v,W)|0;c=c+Math.imul(v,Y)|0;c=c+Math.imul(b,W)|0;f=f+Math.imul(b,Y)|0;u=u+Math.imul(h,ee)|0;c=c+Math.imul(h,re)|0;c=c+Math.imul(d,ee)|0;f=f+Math.imul(d,re)|0;var _e=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(_e>>>26)|0;_e&=67108863;u=Math.imul(T,H);c=Math.imul(T,X);c=c+Math.imul(k,H)|0;f=Math.imul(k,X);u=u+Math.imul(E,z)|0;c=c+Math.imul(E,V)|0;c=c+Math.imul(M,z)|0;f=f+Math.imul(M,V)|0;u=u+Math.imul(_,K)|0;c=c+Math.imul(_,q)|0;c=c+Math.imul(S,K)|0;f=f+Math.imul(S,q)|0;u=u+Math.imul(m,W)|0;c=c+Math.imul(m,Y)|0;c=c+Math.imul(y,W)|0;f=f+Math.imul(y,Y)|0;u=u+Math.imul(v,ee)|0;c=c+Math.imul(v,re)|0;c=c+Math.imul(b,ee)|0;f=f+Math.imul(b,re)|0;u=u+Math.imul(h,ne)|0;c=c+Math.imul(h,ie)|0;c=c+Math.imul(d,ne)|0;f=f+Math.imul(d,ie)|0;var Se=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(Se>>>26)|0;Se&=67108863;u=Math.imul(B,H);c=Math.imul(B,X);c=c+Math.imul(C,H)|0;f=Math.imul(C,X);u=u+Math.imul(T,z)|0;c=c+Math.imul(T,V)|0;c=c+Math.imul(k,z)|0;f=f+Math.imul(k,V)|0;u=u+Math.imul(E,K)|0;c=c+Math.imul(E,q)|0;c=c+Math.imul(M,K)|0;f=f+Math.imul(M,q)|0;u=u+Math.imul(_,W)|0;c=c+Math.imul(_,Y)|0;c=c+Math.imul(S,W)|0;f=f+Math.imul(S,Y)|0;u=u+Math.imul(m,ee)|0;c=c+Math.imul(m,re)|0;c=c+Math.imul(y,ee)|0;f=f+Math.imul(y,re)|0;u=u+Math.imul(v,ne)|0;c=c+Math.imul(v,ie)|0;c=c+Math.imul(b,ne)|0;f=f+Math.imul(b,ie)|0;u=u+Math.imul(h,ae)|0;c=c+Math.imul(h,se)|0;c=c+Math.imul(d,ae)|0;f=f+Math.imul(d,se)|0;var Ae=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(Ae>>>26)|0;Ae&=67108863;u=Math.imul(L,H);c=Math.imul(L,X);c=c+Math.imul(F,H)|0;f=Math.imul(F,X);u=u+Math.imul(B,z)|0;c=c+Math.imul(B,V)|0;c=c+Math.imul(C,z)|0;f=f+Math.imul(C,V)|0;u=u+Math.imul(T,K)|0;c=c+Math.imul(T,q)|0;c=c+Math.imul(k,K)|0;f=f+Math.imul(k,q)|0;u=u+Math.imul(E,W)|0;c=c+Math.imul(E,Y)|0;c=c+Math.imul(M,W)|0;f=f+Math.imul(M,Y)|0;u=u+Math.imul(_,ee)|0;c=c+Math.imul(_,re)|0;c=c+Math.imul(S,ee)|0;f=f+Math.imul(S,re)|0;u=u+Math.imul(m,ne)|0;c=c+Math.imul(m,ie)|0;c=c+Math.imul(y,ne)|0;f=f+Math.imul(y,ie)|0;u=u+Math.imul(v,ae)|0;c=c+Math.imul(v,se)|0;c=c+Math.imul(b,ae)|0;f=f+Math.imul(b,se)|0;u=u+Math.imul(h,ce)|0;c=c+Math.imul(h,fe)|0;c=c+Math.imul(d,ce)|0;f=f+Math.imul(d,fe)|0;var Ee=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(Ee>>>26)|0;Ee&=67108863;u=Math.imul(x,H);c=Math.imul(x,X);c=c+Math.imul(N,H)|0;f=Math.imul(N,X);u=u+Math.imul(L,z)|0;c=c+Math.imul(L,V)|0;c=c+Math.imul(F,z)|0;f=f+Math.imul(F,V)|0;u=u+Math.imul(B,K)|0;c=c+Math.imul(B,q)|0;c=c+Math.imul(C,K)|0;f=f+Math.imul(C,q)|0;u=u+Math.imul(T,W)|0;c=c+Math.imul(T,Y)|0;c=c+Math.imul(k,W)|0;f=f+Math.imul(k,Y)|0;u=u+Math.imul(E,ee)|0;c=c+Math.imul(E,re)|0;c=c+Math.imul(M,ee)|0;f=f+Math.imul(M,re)|0;u=u+Math.imul(_,ne)|0;c=c+Math.imul(_,ie)|0;c=c+Math.imul(S,ne)|0;f=f+Math.imul(S,ie)|0;u=u+Math.imul(m,ae)|0;c=c+Math.imul(m,se)|0;c=c+Math.imul(y,ae)|0;f=f+Math.imul(y,se)|0;u=u+Math.imul(v,ce)|0;c=c+Math.imul(v,fe)|0;c=c+Math.imul(b,ce)|0;f=f+Math.imul(b,fe)|0;u=u+Math.imul(h,he)|0;c=c+Math.imul(h,de)|0;c=c+Math.imul(d,he)|0;f=f+Math.imul(d,de)|0;var Me=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(Me>>>26)|0;Me&=67108863;u=Math.imul(J,H);c=Math.imul(J,X);c=c+Math.imul(I,H)|0;f=Math.imul(I,X);u=u+Math.imul(x,z)|0;c=c+Math.imul(x,V)|0;c=c+Math.imul(N,z)|0;f=f+Math.imul(N,V)|0;u=u+Math.imul(L,K)|0;c=c+Math.imul(L,q)|0;c=c+Math.imul(F,K)|0;f=f+Math.imul(F,q)|0;u=u+Math.imul(B,W)|0;c=c+Math.imul(B,Y)|0;c=c+Math.imul(C,W)|0;f=f+Math.imul(C,Y)|0;u=u+Math.imul(T,ee)|0;c=c+Math.imul(T,re)|0;c=c+Math.imul(k,ee)|0;f=f+Math.imul(k,re)|0;u=u+Math.imul(E,ne)|0;c=c+Math.imul(E,ie)|0;c=c+Math.imul(M,ne)|0;f=f+Math.imul(M,ie)|0;u=u+Math.imul(_,ae)|0;c=c+Math.imul(_,se)|0;c=c+Math.imul(S,ae)|0;f=f+Math.imul(S,se)|0;u=u+Math.imul(m,ce)|0;c=c+Math.imul(m,fe)|0;c=c+Math.imul(y,ce)|0;f=f+Math.imul(y,fe)|0;u=u+Math.imul(v,he)|0;c=c+Math.imul(v,de)|0;c=c+Math.imul(b,he)|0;f=f+Math.imul(b,de)|0;u=u+Math.imul(h,ve)|0;c=c+Math.imul(h,be)|0;c=c+Math.imul(d,ve)|0;f=f+Math.imul(d,be)|0;var Pe=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(Pe>>>26)|0;Pe&=67108863;u=Math.imul(J,z);c=Math.imul(J,V);c=c+Math.imul(I,z)|0;f=Math.imul(I,V);u=u+Math.imul(x,K)|0;c=c+Math.imul(x,q)|0;c=c+Math.imul(N,K)|0;f=f+Math.imul(N,q)|0;u=u+Math.imul(L,W)|0;c=c+Math.imul(L,Y)|0;c=c+Math.imul(F,W)|0;f=f+Math.imul(F,Y)|0;u=u+Math.imul(B,ee)|0;c=c+Math.imul(B,re)|0;c=c+Math.imul(C,ee)|0;f=f+Math.imul(C,re)|0;u=u+Math.imul(T,ne)|0;c=c+Math.imul(T,ie)|0;c=c+Math.imul(k,ne)|0;f=f+Math.imul(k,ie)|0;u=u+Math.imul(E,ae)|0;c=c+Math.imul(E,se)|0;c=c+Math.imul(M,ae)|0;f=f+Math.imul(M,se)|0;u=u+Math.imul(_,ce)|0;c=c+Math.imul(_,fe)|0;c=c+Math.imul(S,ce)|0;f=f+Math.imul(S,fe)|0;u=u+Math.imul(m,he)|0;c=c+Math.imul(m,de)|0;c=c+Math.imul(y,he)|0;f=f+Math.imul(y,de)|0;u=u+Math.imul(v,ve)|0;c=c+Math.imul(v,be)|0;c=c+Math.imul(b,ve)|0;f=f+Math.imul(b,be)|0;var Te=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(Te>>>26)|0;Te&=67108863;u=Math.imul(J,K);c=Math.imul(J,q);c=c+Math.imul(I,K)|0;f=Math.imul(I,q);u=u+Math.imul(x,W)|0;c=c+Math.imul(x,Y)|0;c=c+Math.imul(N,W)|0;f=f+Math.imul(N,Y)|0;u=u+Math.imul(L,ee)|0;c=c+Math.imul(L,re)|0;c=c+Math.imul(F,ee)|0;f=f+Math.imul(F,re)|0;u=u+Math.imul(B,ne)|0;c=c+Math.imul(B,ie)|0;c=c+Math.imul(C,ne)|0;f=f+Math.imul(C,ie)|0;u=u+Math.imul(T,ae)|0;c=c+Math.imul(T,se)|0;c=c+Math.imul(k,ae)|0;f=f+Math.imul(k,se)|0;u=u+Math.imul(E,ce)|0;c=c+Math.imul(E,fe)|0;c=c+Math.imul(M,ce)|0;f=f+Math.imul(M,fe)|0;u=u+Math.imul(_,he)|0;c=c+Math.imul(_,de)|0;c=c+Math.imul(S,he)|0;f=f+Math.imul(S,de)|0;u=u+Math.imul(m,ve)|0;c=c+Math.imul(m,be)|0;c=c+Math.imul(y,ve)|0;f=f+Math.imul(y,be)|0;var ke=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(ke>>>26)|0;ke&=67108863;u=Math.imul(J,W);c=Math.imul(J,Y);c=c+Math.imul(I,W)|0;f=Math.imul(I,Y);u=u+Math.imul(x,ee)|0;c=c+Math.imul(x,re)|0;c=c+Math.imul(N,ee)|0;f=f+Math.imul(N,re)|0;u=u+Math.imul(L,ne)|0;c=c+Math.imul(L,ie)|0;c=c+Math.imul(F,ne)|0;f=f+Math.imul(F,ie)|0;u=u+Math.imul(B,ae)|0;c=c+Math.imul(B,se)|0;c=c+Math.imul(C,ae)|0;f=f+Math.imul(C,se)|0;u=u+Math.imul(T,ce)|0;c=c+Math.imul(T,fe)|0;c=c+Math.imul(k,ce)|0;f=f+Math.imul(k,fe)|0;u=u+Math.imul(E,he)|0;c=c+Math.imul(E,de)|0;c=c+Math.imul(M,he)|0;f=f+Math.imul(M,de)|0;u=u+Math.imul(_,ve)|0;c=c+Math.imul(_,be)|0;c=c+Math.imul(S,ve)|0;f=f+Math.imul(S,be)|0;var Oe=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(Oe>>>26)|0;Oe&=67108863;u=Math.imul(J,ee);c=Math.imul(J,re);c=c+Math.imul(I,ee)|0;f=Math.imul(I,re);u=u+Math.imul(x,ne)|0;c=c+Math.imul(x,ie)|0;c=c+Math.imul(N,ne)|0;f=f+Math.imul(N,ie)|0;u=u+Math.imul(L,ae)|0;c=c+Math.imul(L,se)|0;c=c+Math.imul(F,ae)|0;f=f+Math.imul(F,se)|0;u=u+Math.imul(B,ce)|0;c=c+Math.imul(B,fe)|0;c=c+Math.imul(C,ce)|0;f=f+Math.imul(C,fe)|0;u=u+Math.imul(T,he)|0;c=c+Math.imul(T,de)|0;c=c+Math.imul(k,he)|0;f=f+Math.imul(k,de)|0;u=u+Math.imul(E,ve)|0;c=c+Math.imul(E,be)|0;c=c+Math.imul(M,ve)|0;f=f+Math.imul(M,be)|0;var Be=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(Be>>>26)|0;Be&=67108863;u=Math.imul(J,ne);c=Math.imul(J,ie);c=c+Math.imul(I,ne)|0;f=Math.imul(I,ie);u=u+Math.imul(x,ae)|0;c=c+Math.imul(x,se)|0;c=c+Math.imul(N,ae)|0;f=f+Math.imul(N,se)|0;u=u+Math.imul(L,ce)|0;c=c+Math.imul(L,fe)|0;c=c+Math.imul(F,ce)|0;f=f+Math.imul(F,fe)|0;u=u+Math.imul(B,he)|0;c=c+Math.imul(B,de)|0;c=c+Math.imul(C,he)|0;f=f+Math.imul(C,de)|0;u=u+Math.imul(T,ve)|0;c=c+Math.imul(T,be)|0;c=c+Math.imul(k,ve)|0;f=f+Math.imul(k,be)|0;var Ce=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(Ce>>>26)|0;Ce&=67108863;u=Math.imul(J,ae);c=Math.imul(J,se);c=c+Math.imul(I,ae)|0;f=Math.imul(I,se);u=u+Math.imul(x,ce)|0;c=c+Math.imul(x,fe)|0;c=c+Math.imul(N,ce)|0;f=f+Math.imul(N,fe)|0;u=u+Math.imul(L,he)|0;c=c+Math.imul(L,de)|0;c=c+Math.imul(F,he)|0;f=f+Math.imul(F,de)|0;u=u+Math.imul(B,ve)|0;c=c+Math.imul(B,be)|0;c=c+Math.imul(C,ve)|0;f=f+Math.imul(C,be)|0;var Re=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(Re>>>26)|0;Re&=67108863;u=Math.imul(J,ce);c=Math.imul(J,fe);c=c+Math.imul(I,ce)|0;f=Math.imul(I,fe);u=u+Math.imul(x,he)|0;c=c+Math.imul(x,de)|0;c=c+Math.imul(N,he)|0;f=f+Math.imul(N,de)|0;u=u+Math.imul(L,ve)|0;c=c+Math.imul(L,be)|0;c=c+Math.imul(F,ve)|0;f=f+Math.imul(F,be)|0;var Le=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(Le>>>26)|0;Le&=67108863;u=Math.imul(J,he);c=Math.imul(J,de);c=c+Math.imul(I,he)|0;f=Math.imul(I,de);u=u+Math.imul(x,ve)|0;c=c+Math.imul(x,be)|0;c=c+Math.imul(N,ve)|0;f=f+Math.imul(N,be)|0;var Fe=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(Fe>>>26)|0;Fe&=67108863;u=Math.imul(J,ve);c=Math.imul(J,be);c=c+Math.imul(I,ve)|0;f=Math.imul(I,be);var je=(s+u|0)+((c&8191)<<13)|0;s=(f+(c>>>13)|0)+(je>>>26)|0;je&=67108863;a[0]=ge;a[1]=me;a[2]=ye;a[3]=we;a[4]=_e;a[5]=Se;a[6]=Ae;a[7]=Ee;a[8]=Me;a[9]=Pe;a[10]=Te;a[11]=ke;a[12]=Oe;a[13]=Be;a[14]=Ce;a[15]=Re;a[16]=Le;a[17]=Fe;a[18]=je;if(s!==0){a[19]=s;n.length++}return n};if(!Math.imul){l=f}function b(e,r,t){t.negative=r.negative^e.negative;t.length=e.length+r.length;var n=0;var i=0;for(var o=0;o<t.length-1;o++){var a=i;i=0;var s=n&67108863;var u=Math.min(o,r.length-1);for(var c=Math.max(0,o-e.length+1);c<=u;c++){var f=o-c;var l=e.words[f]|0;var h=r.words[c]|0;var d=l*h;var p=d&67108863;a=a+(d/67108864|0)|0;p=p+s|0;s=p&67108863;a=a+(p>>>26)|0;i+=a>>>26;a&=67108863}t.words[o]=s;n=a;a=i}if(n!==0){t.words[o]=n}else{t.length--}return t._strip()}function y(e,r,t){return b(e,r,t)}m.prototype.mulTo=function e(r,t){var n;var i=this.length+r.length;if(this.length===10&&r.length===10){n=l(this,r,t)}else if(i<63){n=f(this,r,t)}else if(i<1024){n=b(this,r,t)}else{n=y(this,r,t)}return n};function w(e,r){this.x=e;this.y=r}w.prototype.makeRBT=function e(r){var t=new Array(r);var n=m.prototype._countBits(r)-1;for(var i=0;i<r;i++){t[i]=this.revBin(i,n,r)}return t};w.prototype.revBin=function e(r,t,n){if(r===0||r===n-1)return r;var i=0;for(var o=0;o<t;o++){i|=(r&1)<<t-o-1;r>>=1}return i};w.prototype.permute=function e(r,t,n,i,o,a){for(var s=0;s<a;s++){i[s]=t[r[s]];o[s]=n[r[s]]}};w.prototype.transform=function e(r,t,n,i,o,a){this.permute(a,r,t,n,i,o);for(var s=1;s<o;s<<=1){var u=s<<1;var c=Math.cos(2*Math.PI/u);var f=Math.sin(2*Math.PI/u);for(var l=0;l<o;l+=u){var h=c;var d=f;for(var p=0;p<s;p++){var v=n[l+p];var b=i[l+p];var g=n[l+p+s];var m=i[l+p+s];var y=h*g-d*m;m=h*m+d*g;g=y;n[l+p]=v+g;i[l+p]=b+m;n[l+p+s]=v-g;i[l+p+s]=b-m;if(p!==u){y=c*h-f*d;d=c*d+f*h;h=y}}}}};w.prototype.guessLen13b=function e(r,t){var n=Math.max(t,r)|1;var i=n&1;var o=0;for(n=n/2|0;n;n=n>>>1){o++}return 1<<o+1+i};w.prototype.conjugate=function e(r,t,n){if(n<=1)return;for(var i=0;i<n/2;i++){var o=r[i];r[i]=r[n-i-1];r[n-i-1]=o;o=t[i];t[i]=-t[n-i-1];t[n-i-1]=-o}};w.prototype.normalize13b=function e(r,t){var n=0;for(var i=0;i<t/2;i++){var o=Math.round(r[2*i+1]/t)*8192+Math.round(r[2*i]/t)+n;r[i]=o&67108863;if(o<67108864){n=0}else{n=o/67108864|0}}return r};w.prototype.convert13b=function e(r,t,n,i){var o=0;for(var a=0;a<t;a++){o=o+(r[a]|0);n[2*a]=o&8191;o=o>>>13;n[2*a+1]=o&8191;o=o>>>13}for(a=2*t;a<i;++a){n[a]=0}g(o===0);g((o&~8191)===0)};w.prototype.stub=function e(r){var t=new Array(r);for(var n=0;n<r;n++){t[n]=0}return t};w.prototype.mulp=function e(r,t,n){var i=2*this.guessLen13b(r.length,t.length);var o=this.makeRBT(i);var a=this.stub(i);var s=new Array(i);var u=new Array(i);var c=new Array(i);var f=new Array(i);var l=new Array(i);var h=new Array(i);var d=n.words;d.length=i;this.convert13b(r.words,r.length,s,i);this.convert13b(t.words,t.length,f,i);this.transform(s,a,u,c,i,o);this.transform(f,a,l,h,i,o);for(var p=0;p<i;p++){var v=u[p]*l[p]-c[p]*h[p];c[p]=u[p]*h[p]+c[p]*l[p];u[p]=v}this.conjugate(u,c,i);this.transform(u,c,d,a,i,o);this.conjugate(d,a,i);this.normalize13b(d,i);n.negative=r.negative^t.negative;n.length=r.length+t.length;return n._strip()};m.prototype.mul=function e(r){var t=new m(null);t.words=new Array(this.length+r.length);return this.mulTo(r,t)};m.prototype.mulf=function e(r){var t=new m(null);t.words=new Array(this.length+r.length);return y(this,r,t)};m.prototype.imul=function e(r){return this.clone().mulTo(r,this)};m.prototype.imuln=function e(r){var t=r<0;if(t)r=-r;g(typeof r==="number");g(r<67108864);var n=0;for(var i=0;i<this.length;i++){var o=(this.words[i]|0)*r;var a=(o&67108863)+(n&67108863);n>>=26;n+=o/67108864|0;n+=a>>>26;this.words[i]=a&67108863}if(n!==0){this.words[i]=n;this.length++}return t?this.ineg():this};m.prototype.muln=function e(r){return this.clone().imuln(r)};m.prototype.sqr=function e(){return this.mul(this)};m.prototype.isqr=function e(){return this.imul(this.clone())};m.prototype.pow=function e(r){var t=s(r);if(t.length===0)return new m(1);var n=this;for(var i=0;i<t.length;i++,n=n.sqr()){if(t[i]!==0)break}if(++i<t.length){for(var o=n.sqr();i<t.length;i++,o=o.sqr()){if(t[i]===0)continue;n=n.mul(o)}}return n};m.prototype.iushln=function e(r){g(typeof r==="number"&&r>=0);var t=r%26;var n=(r-t)/26;var i=67108863>>>26-t<<26-t;var o;if(t!==0){var a=0;for(o=0;o<this.length;o++){var s=this.words[o]&i;var u=(this.words[o]|0)-s<<t;this.words[o]=u|a;a=s>>>26-t}if(a){this.words[o]=a;this.length++}}if(n!==0){for(o=this.length-1;o>=0;o--){this.words[o+n]=this.words[o]}for(o=0;o<n;o++){this.words[o]=0}this.length+=n}return this._strip()};m.prototype.ishln=function e(r){g(this.negative===0);return this.iushln(r)};m.prototype.iushrn=function e(r,t,n){g(typeof r==="number"&&r>=0);var i;if(t){i=(t-t%26)/26}else{i=0}var o=r%26;var a=Math.min((r-o)/26,this.length);var s=67108863^67108863>>>o<<o;var u=n;i-=a;i=Math.max(0,i);if(u){for(var c=0;c<a;c++){u.words[c]=this.words[c]}u.length=a}if(a===0){}else if(this.length>a){this.length-=a;for(c=0;c<this.length;c++){this.words[c]=this.words[c+a]}}else{this.words[0]=0;this.length=1}var f=0;for(c=this.length-1;c>=0&&(f!==0||c>=i);c--){var l=this.words[c]|0;this.words[c]=f<<26-o|l>>>o;f=l&s}if(u&&f!==0){u.words[u.length++]=f}if(this.length===0){this.words[0]=0;this.length=1}return this._strip()};m.prototype.ishrn=function e(r,t,n){g(this.negative===0);return this.iushrn(r,t,n)};m.prototype.shln=function e(r){return this.clone().ishln(r)};m.prototype.ushln=function e(r){return this.clone().iushln(r)};m.prototype.shrn=function e(r){return this.clone().ishrn(r)};m.prototype.ushrn=function e(r){return this.clone().iushrn(r)};m.prototype.testn=function e(r){g(typeof r==="number"&&r>=0);var t=r%26;var n=(r-t)/26;var i=1<<t;if(this.length<=n)return false;var o=this.words[n];return!!(o&i)};m.prototype.imaskn=function e(r){g(typeof r==="number"&&r>=0);var t=r%26;var n=(r-t)/26;g(this.negative===0,"imaskn works only with positive numbers");if(this.length<=n){return this}if(t!==0){n++}this.length=Math.min(n,this.length);if(t!==0){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()};m.prototype.maskn=function e(r){return this.clone().imaskn(r)};m.prototype.iaddn=function e(r){g(typeof r==="number");g(r<67108864);if(r<0)return this.isubn(-r);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<=r){this.words[0]=r-(this.words[0]|0);this.negative=0;return this}this.negative=0;this.isubn(r);this.negative=1;return this}return this._iaddn(r)};m.prototype._iaddn=function e(r){this.words[0]+=r;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};m.prototype.isubn=function e(r){g(typeof r==="number");g(r<67108864);if(r<0)return this.iaddn(-r);if(this.negative!==0){this.negative=0;this.iaddn(r);this.negative=1;return this}this.words[0]-=r;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()};m.prototype.addn=function e(r){return this.clone().iaddn(r)};m.prototype.subn=function e(r){return this.clone().isubn(r)};m.prototype.iabs=function e(){this.negative=0;return this};m.prototype.abs=function e(){return this.clone().iabs()};m.prototype._ishlnsubmul=function e(r,t,n){var i=r.length+n;var o;this._expand(i);var a;var s=0;for(o=0;o<r.length;o++){a=(this.words[o+n]|0)+s;var u=(r.words[o]|0)*t;a-=u&67108863;s=(a>>26)-(u/67108864|0);this.words[o+n]=a&67108863}for(;o<this.length-n;o++){a=(this.words[o+n]|0)+s;s=a>>26;this.words[o+n]=a&67108863}if(s===0)return this._strip();g(s===-1);s=0;for(o=0;o<this.length;o++){a=-(this.words[o]|0)+s;s=a>>26;this.words[o]=a&67108863}this.negative=1;return this._strip()};m.prototype._wordDiv=function e(r,t){var n=this.length-r.length;var i=this.clone();var o=r;var a=o.words[o.length-1]|0;var s=this._countBits(a);n=26-s;if(n!==0){o=o.ushln(n);i.iushln(n);a=o.words[o.length-1]|0}var u=i.length-o.length;var c;if(t!=="mod"){c=new m(null);c.length=u+1;c.words=new Array(c.length);for(var f=0;f<c.length;f++){c.words[f]=0}}var l=i.clone()._ishlnsubmul(o,1,u);if(l.negative===0){i=l;if(c){c.words[u]=1}}for(var h=u-1;h>=0;h--){var d=(i.words[o.length+h]|0)*67108864+(i.words[o.length+h-1]|0);d=Math.min(d/a|0,67108863);i._ishlnsubmul(o,d,h);while(i.negative!==0){d--;i.negative=0;i._ishlnsubmul(o,1,h);if(!i.isZero()){i.negative^=1}}if(c){c.words[h]=d}}if(c){c._strip()}i._strip();if(t!=="div"&&n!==0){i.iushrn(n)}return{div:c||null,mod:i}};m.prototype.divmod=function e(r,t,n){g(!r.isZero());if(this.isZero()){return{div:new m(0),mod:new m(0)}}var i,o,a;if(this.negative!==0&&r.negative===0){a=this.neg().divmod(r,t);if(t!=="mod"){i=a.div.neg()}if(t!=="div"){o=a.mod.neg();if(n&&o.negative!==0){o.iadd(r)}}return{div:i,mod:o}}if(this.negative===0&&r.negative!==0){a=this.divmod(r.neg(),t);if(t!=="mod"){i=a.div.neg()}return{div:i,mod:a.mod}}if((this.negative&r.negative)!==0){a=this.neg().divmod(r.neg(),t);if(t!=="div"){o=a.mod.neg();if(n&&o.negative!==0){o.isub(r)}}return{div:a.div,mod:o}}if(r.length>this.length||this.cmp(r)<0){return{div:new m(0),mod:this}}if(r.length===1){if(t==="div"){return{div:this.divn(r.words[0]),mod:null}}if(t==="mod"){return{div:null,mod:new m(this.modrn(r.words[0]))}}return{div:this.divn(r.words[0]),mod:new m(this.modrn(r.words[0]))}}return this._wordDiv(r,t)};m.prototype.div=function e(r){return this.divmod(r,"div",false).div};m.prototype.mod=function e(r){return this.divmod(r,"mod",false).mod};m.prototype.umod=function e(r){return this.divmod(r,"mod",true).mod};m.prototype.divRound=function e(r){var t=this.divmod(r);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(r):t.mod;var i=r.ushrn(1);var o=r.andln(1);var a=n.cmp(i);if(a<0||o===1&&a===0)return t.div;return t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)};m.prototype.modrn=function e(r){var t=r<0;if(t)r=-r;g(r<=67108863);var n=(1<<26)%r;var i=0;for(var o=this.length-1;o>=0;o--){i=(n*i+(this.words[o]|0))%r}return t?-i:i};m.prototype.modn=function e(r){return this.modrn(r)};m.prototype.idivn=function e(r){var t=r<0;if(t)r=-r;g(r<=67108863);var n=0;for(var i=this.length-1;i>=0;i--){var o=(this.words[i]|0)+n*67108864;this.words[i]=o/r|0;n=o%r}this._strip();return t?this.ineg():this};m.prototype.divn=function e(r){return this.clone().idivn(r)};m.prototype.egcd=function e(r){g(r.negative===0);g(!r.isZero());var t=this;var n=r.clone();if(t.negative!==0){t=t.umod(r)}else{t=t.clone()}var i=new m(1);var o=new m(0);var a=new m(0);var s=new m(1);var u=0;while(t.isEven()&&n.isEven()){t.iushrn(1);n.iushrn(1);++u}var c=n.clone();var f=t.clone();while(!t.isZero()){for(var l=0,h=1;(t.words[0]&h)===0&&l<26;++l,h<<=1);if(l>0){t.iushrn(l);while(l-- >0){if(i.isOdd()||o.isOdd()){i.iadd(c);o.isub(f)}i.iushrn(1);o.iushrn(1)}}for(var d=0,p=1;(n.words[0]&p)===0&&d<26;++d,p<<=1);if(d>0){n.iushrn(d);while(d-- >0){if(a.isOdd()||s.isOdd()){a.iadd(c);s.isub(f)}a.iushrn(1);s.iushrn(1)}}if(t.cmp(n)>=0){t.isub(n);i.isub(a);o.isub(s)}else{n.isub(t);a.isub(i);s.isub(o)}}return{a:a,b:s,gcd:n.iushln(u)}};m.prototype._invmp=function e(r){g(r.negative===0);g(!r.isZero());var t=this;var n=r.clone();if(t.negative!==0){t=t.umod(r)}else{t=t.clone()}var i=new m(1);var o=new m(0);var a=n.clone();while(t.cmpn(1)>0&&n.cmpn(1)>0){for(var s=0,u=1;(t.words[0]&u)===0&&s<26;++s,u<<=1);if(s>0){t.iushrn(s);while(s-- >0){if(i.isOdd()){i.iadd(a)}i.iushrn(1)}}for(var c=0,f=1;(n.words[0]&f)===0&&c<26;++c,f<<=1);if(c>0){n.iushrn(c);while(c-- >0){if(o.isOdd()){o.iadd(a)}o.iushrn(1)}}if(t.cmp(n)>=0){t.isub(n);i.isub(o)}else{n.isub(t);o.isub(i)}}var l;if(t.cmpn(1)===0){l=i}else{l=o}if(l.cmpn(0)<0){l.iadd(r)}return l};m.prototype.gcd=function e(r){if(this.isZero())return r.abs();if(r.isZero())return this.abs();var t=this.clone();var n=r.clone();t.negative=0;n.negative=0;for(var i=0;t.isEven()&&n.isEven();i++){t.iushrn(1);n.iushrn(1)}do{while(t.isEven()){t.iushrn(1)}while(n.isEven()){n.iushrn(1)}var o=t.cmp(n);if(o<0){var a=t;t=n;n=a}else if(o===0||n.cmpn(1)===0){break}t.isub(n)}while(true);return n.iushln(i)};m.prototype.invm=function e(r){return this.egcd(r).a.umod(r)};m.prototype.isEven=function e(){return(this.words[0]&1)===0};m.prototype.isOdd=function e(){return(this.words[0]&1)===1};m.prototype.andln=function e(r){return this.words[0]&r};m.prototype.bincn=function e(r){g(typeof r==="number");var t=r%26;var n=(r-t)/26;var i=1<<t;if(this.length<=n){this._expand(n+1);this.words[n]|=i;return this}var o=i;for(var a=n;o!==0&&a<this.length;a++){var s=this.words[a]|0;s+=o;o=s>>>26;s&=67108863;this.words[a]=s}if(o!==0){this.words[a]=o;this.length++}return this};m.prototype.isZero=function e(){return this.length===1&&this.words[0]===0};m.prototype.cmpn=function e(r){var t=r<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this._strip();var n;if(this.length>1){n=1}else{if(t){r=-r}g(r<=67108863,"Number is too big");var i=this.words[0]|0;n=i===r?0:i<r?-1:1}if(this.negative!==0)return-n|0;return n};m.prototype.cmp=function e(r){if(this.negative!==0&&r.negative===0)return-1;if(this.negative===0&&r.negative!==0)return 1;var t=this.ucmp(r);if(this.negative!==0)return-t|0;return t};m.prototype.ucmp=function e(r){if(this.length>r.length)return 1;if(this.length<r.length)return-1;var t=0;for(var n=this.length-1;n>=0;n--){var i=this.words[n]|0;var o=r.words[n]|0;if(i===o)continue;if(i<o){t=-1}else if(i>o){t=1}break}return t};m.prototype.gtn=function e(r){return this.cmpn(r)===1};m.prototype.gt=function e(r){return this.cmp(r)===1};m.prototype.gten=function e(r){return this.cmpn(r)>=0};m.prototype.gte=function e(r){return this.cmp(r)>=0};m.prototype.ltn=function e(r){return this.cmpn(r)===-1};m.prototype.lt=function e(r){return this.cmp(r)===-1};m.prototype.lten=function e(r){return this.cmpn(r)<=0};m.prototype.lte=function e(r){return this.cmp(r)<=0};m.prototype.eqn=function e(r){return this.cmpn(r)===0};m.prototype.eq=function e(r){return this.cmp(r)===0};m.red=function e(r){return new T(r)};m.prototype.toRed=function e(r){g(!this.red,"Already a number in reduction context");g(this.negative===0,"red works only with positives");return r.convertTo(this)._forceRed(r)};m.prototype.fromRed=function e(){g(this.red,"fromRed works only with numbers in reduction context");return this.red.convertFrom(this)};m.prototype._forceRed=function e(r){this.red=r;return this};m.prototype.forceRed=function e(r){g(!this.red,"Already a number in reduction context");return this._forceRed(r)};m.prototype.redAdd=function e(r){g(this.red,"redAdd works only with red numbers");return this.red.add(this,r)};m.prototype.redIAdd=function e(r){g(this.red,"redIAdd works only with red numbers");return this.red.iadd(this,r)};m.prototype.redSub=function e(r){g(this.red,"redSub works only with red numbers");return this.red.sub(this,r)};m.prototype.redISub=function e(r){g(this.red,"redISub works only with red numbers");return this.red.isub(this,r)};m.prototype.redShl=function e(r){g(this.red,"redShl works only with red numbers");return this.red.shl(this,r)};m.prototype.redMul=function e(r){g(this.red,"redMul works only with red numbers");this.red._verify2(this,r);return this.red.mul(this,r)};m.prototype.redIMul=function e(r){g(this.red,"redMul works only with red numbers");this.red._verify2(this,r);return this.red.imul(this,r)};m.prototype.redSqr=function e(){g(this.red,"redSqr works only with red numbers");this.red._verify1(this);return this.red.sqr(this)};m.prototype.redISqr=function e(){g(this.red,"redISqr works only with red numbers");this.red._verify1(this);return this.red.isqr(this)};m.prototype.redSqrt=function e(){g(this.red,"redSqrt works only with red numbers");this.red._verify1(this);return this.red.sqrt(this)};m.prototype.redInvm=function e(){g(this.red,"redInvm works only with red numbers");this.red._verify1(this);return this.red.invm(this)};m.prototype.redNeg=function e(){g(this.red,"redNeg works only with red numbers");this.red._verify1(this);return this.red.neg(this)};m.prototype.redPow=function e(r){g(this.red&&!r.red,"redPow(normalNum)");this.red._verify1(this);return this.red.pow(this,r)};var _={k256:null,p224:null,p192:null,p25519:null};function S(e,r){this.name=e;this.p=new m(r,16);this.n=this.p.bitLength();this.k=new m(1).iushln(this.n).isub(this.p);this.tmp=this._tmp()}S.prototype._tmp=function e(){var r=new m(null);r.words=new Array(Math.ceil(this.n/13));return r};S.prototype.ireduce=function e(r){var t=r;var n;do{this.split(t,this.tmp);t=this.imulK(t);t=t.iadd(this.tmp);n=t.bitLength()}while(n>this.n);var i=n<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};S.prototype.split=function e(r,t){r.iushrn(this.n,0,t)};S.prototype.imulK=function e(r){return r.imul(this.k)};function A(){S.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}t(A,S);A.prototype.split=function e(r,t){var n=4194303;var i=Math.min(r.length,9);for(var o=0;o<i;o++){t.words[o]=r.words[o]}t.length=i;if(r.length<=9){r.words[0]=0;r.length=1;return}var a=r.words[9];t.words[t.length++]=a&n;for(o=10;o<r.length;o++){var s=r.words[o]|0;r.words[o-10]=(s&n)<<4|a>>>22;a=s}a>>>=22;r.words[o-10]=a;if(a===0&&r.length>10){r.length-=10}else{r.length-=9}};A.prototype.imulK=function e(r){r.words[r.length]=0;r.words[r.length+1]=0;r.length+=2;var t=0;for(var n=0;n<r.length;n++){var i=r.words[n]|0;t+=i*977;r.words[n]=t&67108863;t=i*64+(t/67108864|0)}if(r.words[r.length-1]===0){r.length--;if(r.words[r.length-1]===0){r.length--}}return r};function E(){S.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}t(E,S);function M(){S.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}t(M,S);function P(){S.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}t(P,S);P.prototype.imulK=function e(r){var t=0;for(var n=0;n<r.length;n++){var i=(r.words[n]|0)*19+t;var o=i&67108863;i>>>=26;r.words[n]=o;t=i}if(t!==0){r.words[r.length++]=t}return r};m._prime=function e(r){if(_[r])return _[r];var e;if(r==="k256"){e=new A}else if(r==="p224"){e=new E}else if(r==="p192"){e=new M}else if(r==="p25519"){e=new P}else{throw new Error("Unknown prime "+r)}_[r]=e;return e};function T(e){if(typeof e==="string"){var r=m._prime(e);this.m=r.p;this.prime=r}else{g(e.gtn(1),"modulus must be greater than 1");this.m=e;this.prime=null}}T.prototype._verify1=function e(r){g(r.negative===0,"red works only with positives");g(r.red,"red works only with red numbers")};T.prototype._verify2=function e(r,t){g((r.negative|t.negative)===0,"red works only with positives");g(r.red&&r.red===t.red,"red works only with red numbers")};T.prototype.imod=function e(r){if(this.prime)return this.prime.ireduce(r)._forceRed(this);o(r,r.umod(this.m)._forceRed(this));return r};T.prototype.neg=function e(r){if(r.isZero()){return r.clone()}return this.m.sub(r)._forceRed(this)};T.prototype.add=function e(r,t){this._verify2(r,t);var n=r.add(t);if(n.cmp(this.m)>=0){n.isub(this.m)}return n._forceRed(this)};T.prototype.iadd=function e(r,t){this._verify2(r,t);var n=r.iadd(t);if(n.cmp(this.m)>=0){n.isub(this.m)}return n};T.prototype.sub=function e(r,t){this._verify2(r,t);var n=r.sub(t);if(n.cmpn(0)<0){n.iadd(this.m)}return n._forceRed(this)};T.prototype.isub=function e(r,t){this._verify2(r,t);var n=r.isub(t);if(n.cmpn(0)<0){n.iadd(this.m)}return n};T.prototype.shl=function e(r,t){this._verify1(r);return this.imod(r.ushln(t))};T.prototype.imul=function e(r,t){this._verify2(r,t);return this.imod(r.imul(t))};T.prototype.mul=function e(r,t){this._verify2(r,t);return this.imod(r.mul(t))};T.prototype.isqr=function e(r){return this.imul(r,r.clone())};T.prototype.sqr=function e(r){return this.mul(r,r)};T.prototype.sqrt=function e(r){if(r.isZero())return r.clone();var t=this.m.andln(3);g(t%2===1);if(t===3){var n=this.m.add(new m(1)).iushrn(2);return this.pow(r,n)}var i=this.m.subn(1);var o=0;while(!i.isZero()&&i.andln(1)===0){o++;i.iushrn(1)}g(!i.isZero());var a=new m(1).toRed(this);var s=a.redNeg();var u=this.m.subn(1).iushrn(1);var c=this.m.bitLength();c=new m(2*c*c).toRed(this);while(this.pow(c,u).cmp(s)!==0){c.redIAdd(s)}var f=this.pow(c,i);var l=this.pow(r,i.addn(1).iushrn(1));var h=this.pow(r,i);var d=o;while(h.cmp(a)!==0){var p=h;for(var v=0;p.cmp(a)!==0;v++){p=p.redSqr()}g(v<d);var b=this.pow(f,new m(1).iushln(d-v-1));l=l.redMul(b);f=b.redSqr();h=h.redMul(f);d=v}return l};T.prototype.invm=function e(r){var t=r._invmp(this.m);if(t.negative!==0){t.negative=0;return this.imod(t).redNeg()}else{return this.imod(t)}};T.prototype.pow=function e(r,t){if(t.isZero())return new m(1).toRed(this);if(t.cmpn(1)===0)return r.clone();var n=4;var i=new Array(1<<n);i[0]=new m(1).toRed(this);i[1]=r;for(var o=2;o<i.length;o++){i[o]=this.mul(i[o-1],r)}var a=i[0];var s=0;var u=0;var c=t.bitLength()%26;if(c===0){c=26}for(o=t.length-1;o>=0;o--){var f=t.words[o];for(var l=c-1;l>=0;l--){var h=f>>l&1;if(a!==i[0]){a=this.sqr(a)}if(h===0&&s===0){u=0;continue}s<<=1;s|=h;u++;if(u!==n&&(o!==0||l!==0))continue;a=this.mul(a,i[s]);u=0;s=0}c=26}return a};T.prototype.convertTo=function e(r){var t=r.umod(this.m);return t===r?t.clone():t};T.prototype.convertFrom=function e(r){var t=r.clone();t.red=null;return t};m.mont=function e(r){return new k(r)};function k(e){T.call(this,e);this.shift=this.m.bitLength();if(this.shift%26!==0){this.shift+=26-this.shift%26}this.r=new m(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)}t(k,T);k.prototype.convertTo=function e(r){return this.imod(r.ushln(this.shift))};k.prototype.convertFrom=function e(r){var t=this.imod(r.mul(this.rinv));t.red=null;return t};k.prototype.imul=function e(r,t){if(r.isZero()||t.isZero()){r.words[0]=0;r.length=1;return r}var n=r.imul(t);var i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var o=n.isub(i).iushrn(this.shift);var a=o;if(o.cmp(this.m)>=0){a=o.isub(this.m)}else if(o.cmpn(0)<0){a=o.iadd(this.m)}return a._forceRed(this)};k.prototype.mul=function e(r,t){if(r.isZero()||t.isZero())return new m(0)._forceRed(this);var n=r.mul(t);var i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var o=n.isub(i).iushrn(this.shift);var a=o;if(o.cmp(this.m)>=0){a=o.isub(this.m)}else if(o.cmpn(0)<0){a=o.iadd(this.m)}return a._forceRed(this)};k.prototype.invm=function e(r){var t=this.imod(r._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(typeof e==="undefined"||e,this)},{buffer:140}],163:[function(e,r,t){r.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":164}],164:[function(e,r,t){r.exports={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"}}},{}],165:[function(e,r,t){r.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],166:[function(e,r,t){var o=e("safe-buffer").Buffer;var n=e("create-hash");var i=e("readable-stream");var a=e("inherits");var s=e("./sign");var u=e("./verify");var c=e("./algorithms.json");Object.keys(c).forEach(function(e){c[e].id=o.from(c[e].id,"hex");c[e.toLowerCase()]=c[e]});function f(e){i.Writable.call(this);var r=c[e];if(!r)throw new Error("Unknown message digest");this._hashType=r.hash;this._hash=n(r.hash);this._tag=r.id;this._signType=r.sign}a(f,i.Writable);f.prototype._write=function e(r,t,n){this._hash.update(r);n()};f.prototype.update=function e(r,t){if(typeof r==="string")r=o.from(r,t);this._hash.update(r);return this};f.prototype.sign=function e(r,t){this.end();var n=this._hash.digest();var i=s(n,r,this._hashType,this._signType,this._tag);return t?i.toString(t):i};function l(e){i.Writable.call(this);var r=c[e];if(!r)throw new Error("Unknown message digest");this._hash=n(r.hash);this._tag=r.id;this._signType=r.sign}a(l,i.Writable);l.prototype._write=function e(r,t,n){this._hash.update(r);n()};l.prototype.update=function e(r,t){if(typeof r==="string")r=o.from(r,t);this._hash.update(r);return this};l.prototype.verify=function e(r,t,n){if(typeof t==="string")t=o.from(t,n);this.end();var i=this._hash.digest();return u(t,i,r,this._signType,this._tag)};function h(e){return new f(e)}function d(e){return new l(e)}r.exports={Sign:h,Verify:d,createSign:h,createVerify:d}},{"./algorithms.json":164,"./sign":167,"./verify":168,"create-hash":189,inherits:256,"readable-stream":184,"safe-buffer":283}],167:[function(e,r,t){var f=e("safe-buffer").Buffer;var c=e("create-hmac");var l=e("browserify-rsa");var a=e("elliptic").ec;var h=e("bn.js");var d=e("parse-asn1");var s=e("./curves.json");function n(e,r,t,n,i){var o=d(r);if(o.curve){if(n!=="ecdsa"&&n!=="ecdsa/rsa")throw new Error("wrong private key type");return p(e,o)}else if(o.type==="dsa"){if(n!=="dsa")throw new Error("wrong private key type");return v(e,o,t)}else{if(n!=="rsa"&&n!=="ecdsa/rsa")throw new Error("wrong private key type")}e=f.concat([i,e]);var a=o.modulus.byteLength();var s=[0,1];while(e.length+s.length+1<a)s.push(255);s.push(0);var u=-1;while(++u<e.length)s.push(e[u]);var c=l(s,o);return c}function p(e,r){var t=s[r.curve.join(".")];if(!t)throw new Error("unknown curve "+r.curve.join("."));var n=new a(t);var i=n.keyFromPrivate(r.privateKey);var o=i.sign(e);return f.from(o.toDER())}function v(e,r,t){var n=r.params.priv_key;var i=r.params.p;var o=r.params.q;var a=r.params.g;var s=new h(0);var u;var c=m(e,o).mod(o);var f=false;var l=g(n,o,e,t);while(f===false){u=w(o,l,t);s=_(a,u,i,o);f=u.invm(o).imul(c.add(n.mul(s))).mod(o);if(f.cmpn(0)===0){f=false;s=new h(0)}}return b(s,f)}function b(e,r){e=e.toArray();r=r.toArray();if(e[0]&128)e=[0].concat(e);if(r[0]&128)r=[0].concat(r);var t=e.length+r.length+4;var n=[48,t,2,e.length];n=n.concat(e,[2,r.length],r);return f.from(n)}function g(e,r,t,n){e=f.from(e.toArray());if(e.length<r.byteLength()){var i=f.alloc(r.byteLength()-e.length);e=f.concat([i,e])}var o=t.length;var a=y(t,r);var s=f.alloc(o);s.fill(1);var u=f.alloc(o);u=c(n,u).update(s).update(f.from([0])).update(e).update(a).digest();s=c(n,u).update(s).digest();u=c(n,u).update(s).update(f.from([1])).update(e).update(a).digest();s=c(n,u).update(s).digest();return{k:u,v:s}}function m(e,r){var t=new h(e);var n=(e.length<<3)-r.bitLength();if(n>0)t.ishrn(n);return t}function y(e,r){e=m(e,r);e=e.mod(r);var t=f.from(e.toArray());if(t.length<r.byteLength()){var n=f.alloc(r.byteLength()-t.length);t=f.concat([n,t])}return t}function w(e,r,t){var n;var i;do{n=f.alloc(0);while(n.length*8<e.bitLength()){r.v=c(t,r.k).update(r.v).digest();n=f.concat([n,r.v])}i=m(n,e);r.k=c(t,r.k).update(r.v).update(f.from([0])).digest();r.v=c(t,r.k).update(r.v).digest()}while(i.cmp(e)!==-1);return i}function _(e,r,t,n){return e.toRed(h.mont(t)).redPow(r).fromRed().mod(n)}r.exports=n;r.exports.getKey=g;r.exports.makeKey=w},{"./curves.json":165,"bn.js":169,"browserify-rsa":161,"create-hmac":191,elliptic:204,"parse-asn1":266,"safe-buffer":283}],168:[function(e,r,t){var h=e("safe-buffer").Buffer;var d=e("bn.js");var a=e("elliptic").ec;var p=e("parse-asn1");var s=e("./curves.json");function n(e,r,t,n,i){var o=p(t);if(o.type==="ec"){if(n!=="ecdsa"&&n!=="ecdsa/rsa")throw new Error("wrong public key type");return v(e,r,o)}else if(o.type==="dsa"){if(n!=="dsa")throw new Error("wrong public key type");return b(e,r,o)}else{if(n!=="rsa"&&n!=="ecdsa/rsa")throw new Error("wrong public key type")}r=h.concat([i,r]);var a=o.modulus.byteLength();var s=[1];var u=0;while(r.length+s.length+2<a){s.push(255);u++}s.push(0);var c=-1;while(++c<r.length){s.push(r[c])}s=h.from(s);var f=d.mont(o.modulus);e=new d(e).toRed(f);e=e.redPow(new d(o.publicExponent));e=h.from(e.fromRed().toArray());var l=u<8?1:0;a=Math.min(e.length,s.length);if(e.length!==s.length)l=1;c=-1;while(++c<a)l|=e[c]^s[c];return l===0}function v(e,r,t){var n=s[t.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+t.data.algorithm.curve.join("."));var i=new a(n);var o=t.data.subjectPrivateKey.data;return i.verify(r,e,o)}function b(e,r,t){var n=t.data.p;var i=t.data.q;var o=t.data.g;var a=t.data.pub_key;var s=p.signature.decode(e,"der");var u=s.s;var c=s.r;g(u,i);g(c,i);var f=d.mont(n);var l=u.invm(i);var h=o.toRed(f).redPow(new d(r).mul(l).mod(i)).fromRed().mul(a.toRed(f).redPow(c.mul(l).mod(i)).fromRed()).mod(n).mod(i);return h.cmp(c)===0}function g(e,r){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(r)>=r)throw new Error("invalid sig")}r.exports=n},{"./curves.json":165,"bn.js":169,elliptic:204,"parse-asn1":266,"safe-buffer":283}],169:[function(e,r,t){arguments[4][162][0].apply(t,arguments)},{buffer:140,dup:162}],170:[function(e,r,t){"use strict";function o(e,r){e.prototype=Object.create(r.prototype);e.prototype.constructor=e;e.__proto__=r}var a={};function n(e,n,r){if(!r){r=Error}function i(e,r,t){if(typeof n==="string"){return n}else{return n(e,r,t)}}var t=function(n){o(e,n);function e(e,r,t){return n.call(this,i(e,r,t))||this}return e}(r);t.prototype.name=r.name;t.prototype.code=e;a[e]=t}function s(e,r){if(Array.isArray(e)){var t=e.length;e=e.map(function(e){return String(e)});if(t>2){return"one of ".concat(r," ").concat(e.slice(0,t-1).join(", "),", or ")+e[t-1]}else if(t===2){return"one of ".concat(r," ").concat(e[0]," or ").concat(e[1])}else{return"of ".concat(r," ").concat(e[0])}}else{return"of ".concat(r," ").concat(String(e))}}function u(e,r,t){return e.substr(!t||t<0?0:+t,r.length)===r}function c(e,r,t){if(t===undefined||t>e.length){t=e.length}return e.substring(t-r.length,t)===r}function f(e,r,t){if(typeof t!=="number"){t=0}if(t+r.length>e.length){return false}else{return e.indexOf(r,t)!==-1}}n("ERR_INVALID_OPT_VALUE",function(e,r){return'The value "'+r+'" is invalid for option "'+e+'"'},TypeError);n("ERR_INVALID_ARG_TYPE",function(e,r,t){var n;if(typeof r==="string"&&u(r,"not ")){n="must not be";r=r.replace(/^not /,"")}else{n="must be"}var i;if(c(e," argument")){i="The ".concat(e," ").concat(n," ").concat(s(r,"type"))}else{var o=f(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(o," ").concat(n," ").concat(s(r,"type"))}i+=". Received type ".concat(typeof t);return i},TypeError);n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");n("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});n("ERR_STREAM_PREMATURE_CLOSE","Premature close");n("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});n("ERR_MULTIPLE_CALLBACK","Callback called multiple times");n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");n("ERR_STREAM_WRITE_AFTER_END","write after end");n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);n("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");r.exports.codes=a},{}],171:[function(f,l,e){(function(c){(function(){"use strict";var e=Object.keys||function(e){var r=[];for(var t in e){r.push(t)}return r};l.exports=a;var r=f("./_stream_readable");var t=f("./_stream_writable");f("inherits")(a,r);{var n=e(t.prototype);for(var i=0;i<n.length;i++){var o=n[i];if(!a.prototype[o])a.prototype[o]=t.prototype[o]}}function a(e){if(!(this instanceof a))return new a(e);r.call(this,e);t.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",s)}}}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:false,get:function e(){return this._writableState.highWaterMark}});Object.defineProperty(a.prototype,"writableBuffer",{enumerable:false,get:function e(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(a.prototype,"writableLength",{enumerable:false,get:function e(){return this._writableState.length}});function s(){if(this._writableState.ended)return;c.nextTick(u,this)}function u(e){e.end()}Object.defineProperty(a.prototype,"destroyed",{enumerable:false,get:function e(){if(this._readableState===undefined||this._writableState===undefined){return false}return this._readableState.destroyed&&this._writableState.destroyed},set:function e(r){if(this._readableState===undefined||this._writableState===undefined){return}this._readableState.destroyed=r;this._writableState.destroyed=r}})}).call(this)}).call(this,f("_process"))},{"./_stream_readable":173,"./_stream_writable":175,_process:273,inherits:256}],172:[function(e,r,t){"use strict";r.exports=i;var n=e("./_stream_transform");e("inherits")(i,n);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}i.prototype._transform=function(e,r,t){t(null,e)}},{"./_stream_transform":174,inherits:256}],173:[function(Q,W,e){(function(K,q){(function(){"use strict";W.exports=P;var n;P.ReadableState=M;var e=Q("events").EventEmitter;var b=function e(r,t){return r.listeners(t).length};var i=Q("./internal/streams/stream");var s=Q("buffer").Buffer;var r=q.Uint8Array||function(){};function u(e){return s.from(e)}function o(e){return s.isBuffer(e)||e instanceof r}var t=Q("util");var g;if(t&&t.debuglog){g=t.debuglog("stream")}else{g=function e(){}}var a=Q("./internal/streams/buffer_list");var c=Q("./internal/streams/destroy");var f=Q("./internal/streams/state"),l=f.getHighWaterMark;var h=Q("../errors").codes,d=h.ERR_INVALID_ARG_TYPE,p=h.ERR_STREAM_PUSH_AFTER_EOF,v=h.ERR_METHOD_NOT_IMPLEMENTED,m=h.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;var y;var w;var _;Q("inherits")(P,i);var S=c.errorOrDestroy;var A=["error","close","destroy","pause","resume"];function E(e,r,t){if(typeof e.prependListener==="function")return e.prependListener(r,t);if(!e._events||!e._events[r])e.on(r,t);else if(Array.isArray(e._events[r]))e._events[r].unshift(t);else e._events[r]=[t,e._events[r]]}function M(e,r,t){n=n||Q("./_stream_duplex");e=e||{};if(typeof t!=="boolean")t=r instanceof n;this.objectMode=!!e.objectMode;if(t)this.objectMode=this.objectMode||!!e.readableObjectMode;this.highWaterMark=l(this,e,"readableHighWaterMark",t);this.buffer=new a;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(!y)y=Q("string_decoder/").StringDecoder;this.decoder=new y(e.encoding);this.encoding=e.encoding}}function P(e){n=n||Q("./_stream_duplex");if(!(this instanceof P))return new P(e);var r=this instanceof n;this._readableState=new M(e,this,r);this.readable=true;if(e){if(typeof e.read==="function")this._read=e.read;if(typeof e.destroy==="function")this._destroy=e.destroy}i.call(this)}Object.defineProperty(P.prototype,"destroyed",{enumerable:false,get:function e(){if(this._readableState===undefined){return false}return this._readableState.destroyed},set:function e(r){if(!this._readableState){return}this._readableState.destroyed=r}});P.prototype.destroy=c.destroy;P.prototype._undestroy=c.undestroy;P.prototype._destroy=function(e,r){r(e)};P.prototype.push=function(e,r){var t=this._readableState;var n;if(!t.objectMode){if(typeof e==="string"){r=r||t.defaultEncoding;if(r!==t.encoding){e=s.from(e,r);r=""}n=true}}else{n=true}return T(this,e,r,false,n)};P.prototype.unshift=function(e){return T(this,e,null,true,false)};function T(e,r,t,n,i){g("readableAddChunk",r);var o=e._readableState;if(r===null){o.reading=false;L(e,o)}else{var a;if(!i)a=O(o,r);if(a){S(e,a)}else if(o.objectMode||r&&r.length>0){if(typeof r!=="string"&&!o.objectMode&&Object.getPrototypeOf(r)!==s.prototype){r=u(r)}if(n){if(o.endEmitted)S(e,new m);else k(e,o,r,true)}else if(o.ended){S(e,new p)}else if(o.destroyed){return false}else{o.reading=false;if(o.decoder&&!t){r=o.decoder.write(r);if(o.objectMode||r.length!==0)k(e,o,r,false);else x(e,o)}else{k(e,o,r,false)}}}else if(!n){o.reading=false;x(e,o)}}return!o.ended&&(o.length<o.highWaterMark||o.length===0)}function k(e,r,t,n){if(r.flowing&&r.length===0&&!r.sync){r.awaitDrain=0;e.emit("data",t)}else{r.length+=r.objectMode?1:t.length;if(n)r.buffer.unshift(t);else r.buffer.push(t);if(r.needReadable)F(e)}x(e,r)}function O(e,r){var t;if(!o(r)&&typeof r!=="string"&&r!==undefined&&!e.objectMode){t=new d("chunk",["string","Buffer","Uint8Array"],r)}return t}P.prototype.isPaused=function(){return this._readableState.flowing===false};P.prototype.setEncoding=function(e){if(!y)y=Q("string_decoder/").StringDecoder;var r=new y(e);this._readableState.decoder=r;this._readableState.encoding=this._readableState.decoder.encoding;var t=this._readableState.buffer.head;var n="";while(t!==null){n+=r.write(t.data);t=t.next}this._readableState.buffer.clear();if(n!=="")this._readableState.buffer.push(n);this._readableState.length=n.length;return this};var B=1073741824;function C(e){if(e>=B){e=B}else{e--;e|=e>>>1;e|=e>>>2;e|=e>>>4;e|=e>>>8;e|=e>>>16;e++}return e}function R(e,r){if(e<=0||r.length===0&&r.ended)return 0;if(r.objectMode)return 1;if(e!==e){if(r.flowing&&r.length)return r.buffer.head.data.length;else return r.length}if(e>r.highWaterMark)r.highWaterMark=C(e);if(e<=r.length)return e;if(!r.ended){r.needReadable=true;return 0}return r.length}P.prototype.read=function(e){g("read",e);e=parseInt(e,10);var r=this._readableState;var t=e;if(e!==0)r.emittedReadable=false;if(e===0&&r.needReadable&&((r.highWaterMark!==0?r.length>=r.highWaterMark:r.length>0)||r.ended)){g("read: emitReadable",r.length,r.ended);if(r.length===0&&r.ended)z(this);else F(this);return null}e=R(e,r);if(e===0&&r.ended){if(r.length===0)z(this);return null}var n=r.needReadable;g("need readable",n);if(r.length===0||r.length-e<r.highWaterMark){n=true;g("length less than watermark",n)}if(r.ended||r.reading){n=false;g("reading or ended",n)}else if(n){g("do read");r.reading=true;r.sync=true;if(r.length===0)r.needReadable=true;this._read(r.highWaterMark);r.sync=false;if(!r.reading)e=R(t,r)}var i;if(e>0)i=G(e,r);else i=null;if(i===null){r.needReadable=r.length<=r.highWaterMark;e=0}else{r.length-=e;r.awaitDrain=0}if(r.length===0){if(!r.ended)r.needReadable=true;if(t!==e&&r.ended)z(this)}if(i!==null)this.emit("data",i);return i};function L(e,r){g("onEofChunk");if(r.ended)return;if(r.decoder){var t=r.decoder.end();if(t&&t.length){r.buffer.push(t);r.length+=r.objectMode?1:t.length}}r.ended=true;if(r.sync){F(e)}else{r.needReadable=false;if(!r.emittedReadable){r.emittedReadable=true;j(e)}}}function F(e){var r=e._readableState;g("emitReadable",r.needReadable,r.emittedReadable);r.needReadable=false;if(!r.emittedReadable){g("emitReadable",r.flowing);r.emittedReadable=true;K.nextTick(j,e)}}function j(e){var r=e._readableState;g("emitReadable_",r.destroyed,r.length,r.ended);if(!r.destroyed&&(r.length||r.ended)){e.emit("readable");r.emittedReadable=false}r.needReadable=!r.flowing&&!r.ended&&r.length<=r.highWaterMark;X(e)}function x(e,r){if(!r.readingMore){r.readingMore=true;K.nextTick(N,e,r)}}function N(e,r){while(!r.reading&&!r.ended&&(r.length<r.highWaterMark||r.flowing&&r.length===0)){var t=r.length;g("maybeReadMore read 0");e.read(0);if(t===r.length)break}r.readingMore=false}P.prototype._read=function(e){S(this,new v("_read()"))};P.prototype.pipe=function(t,e){var n=this;var i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1;g("pipe count=%d opts=%j",i.pipesCount,e);var r=(!e||e.end!==false)&&t!==K.stdout&&t!==K.stderr;var o=r?s:v;if(i.endEmitted)K.nextTick(o);else n.once("end",o);t.on("unpipe",a);function a(e,r){g("onunpipe");if(e===n){if(r&&r.hasUnpiped===false){r.hasUnpiped=true;f()}}}function s(){g("onend");t.end()}var u=D(n);t.on("drain",u);var c=false;function f(){g("cleanup");t.removeListener("close",d);t.removeListener("finish",p);t.removeListener("drain",u);t.removeListener("error",h);t.removeListener("unpipe",a);n.removeListener("end",s);n.removeListener("end",v);n.removeListener("data",l);c=true;if(i.awaitDrain&&(!t._writableState||t._writableState.needDrain))u()}n.on("data",l);function l(e){g("ondata");var r=t.write(e);g("dest.write",r);if(r===false){if((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Z(i.pipes,t)!==-1)&&!c){g("false write response, pause",i.awaitDrain);i.awaitDrain++}n.pause()}}function h(e){g("onerror",e);v();t.removeListener("error",h);if(b(t,"error")===0)S(t,e)}E(t,"error",h);function d(){t.removeListener("finish",p);v()}t.once("close",d);function p(){g("onfinish");t.removeListener("close",d);v()}t.once("finish",p);function v(){g("unpipe");n.unpipe(t)}t.emit("pipe",n);if(!i.flowing){g("pipe resume");n.resume()}return t};function D(t){return function e(){var r=t._readableState;g("pipeOnDrain",r.awaitDrain);if(r.awaitDrain)r.awaitDrain--;if(r.awaitDrain===0&&b(t,"data")){r.flowing=true;X(t)}}}P.prototype.unpipe=function(e){var r=this._readableState;var t={hasUnpiped:false};if(r.pipesCount===0)return this;if(r.pipesCount===1){if(e&&e!==r.pipes)return this;if(!e)e=r.pipes;r.pipes=null;r.pipesCount=0;r.flowing=false;if(e)e.emit("unpipe",this,t);return this}if(!e){var n=r.pipes;var i=r.pipesCount;r.pipes=null;r.pipesCount=0;r.flowing=false;for(var o=0;o<i;o++){n[o].emit("unpipe",this,{hasUnpiped:false})}return this}var a=Z(r.pipes,e);if(a===-1)return this;r.pipes.splice(a,1);r.pipesCount-=1;if(r.pipesCount===1)r.pipes=r.pipes[0];e.emit("unpipe",this,t);return this};P.prototype.on=function(e,r){var t=i.prototype.on.call(this,e,r);var n=this._readableState;if(e==="data"){n.readableListening=this.listenerCount("readable")>0;if(n.flowing!==false)this.resume()}else if(e==="readable"){if(!n.endEmitted&&!n.readableListening){n.readableListening=n.needReadable=true;n.flowing=false;n.emittedReadable=false;g("on readable",n.length,n.reading);if(n.length){F(this)}else if(!n.reading){K.nextTick(I,this)}}}return t};P.prototype.addListener=P.prototype.on;P.prototype.removeListener=function(e,r){var t=i.prototype.removeListener.call(this,e,r);if(e==="readable"){K.nextTick(J,this)}return t};P.prototype.removeAllListeners=function(e){var r=i.prototype.removeAllListeners.apply(this,arguments);if(e==="readable"||e===undefined){K.nextTick(J,this)}return r};function J(e){var r=e._readableState;r.readableListening=e.listenerCount("readable")>0;if(r.resumeScheduled&&!r.paused){r.flowing=true}else if(e.listenerCount("data")>0){e.resume()}}function I(e){g("readable nexttick read 0");e.read(0)}P.prototype.resume=function(){var e=this._readableState;if(!e.flowing){g("resume");e.flowing=!e.readableListening;U(this,e)}e.paused=false;return this};function U(e,r){if(!r.resumeScheduled){r.resumeScheduled=true;K.nextTick(H,e,r)}}function H(e,r){g("resume",r.reading);if(!r.reading){e.read(0)}r.resumeScheduled=false;e.emit("resume");X(e);if(r.flowing&&!r.reading)e.read(0)}P.prototype.pause=function(){g("call pause flowing=%j",this._readableState.flowing);if(this._readableState.flowing!==false){g("pause");this._readableState.flowing=false;this.emit("pause")}this._readableState.paused=true;return this};function X(e){var r=e._readableState;g("flow",r.flowing);while(r.flowing&&e.read()!==null){}}P.prototype.wrap=function(t){var n=this;var i=this._readableState;var o=false;t.on("end",function(){g("wrapped end");if(i.decoder&&!i.ended){var e=i.decoder.end();if(e&&e.length)n.push(e)}n.push(null)});t.on("data",function(e){g("wrapped data");if(i.decoder)e=i.decoder.write(e);if(i.objectMode&&(e===null||e===undefined))return;else if(!i.objectMode&&(!e||!e.length))return;var r=n.push(e);if(!r){o=true;t.pause()}});for(var e in t){if(this[e]===undefined&&typeof t[e]==="function"){this[e]=function e(r){return function e(){return t[r].apply(t,arguments)}}(e)}}for(var r=0;r<A.length;r++){t.on(A[r],this.emit.bind(this,A[r]))}this._read=function(e){g("wrapped _read",e);if(o){o=false;t.resume()}};return this};if(typeof Symbol==="function"){P.prototype[Symbol.asyncIterator]=function(){if(w===undefined){w=Q("./internal/streams/async_iterator")}return w(this)}}Object.defineProperty(P.prototype,"readableHighWaterMark",{enumerable:false,get:function e(){return this._readableState.highWaterMark}});Object.defineProperty(P.prototype,"readableBuffer",{enumerable:false,get:function e(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(P.prototype,"readableFlowing",{enumerable:false,get:function e(){return this._readableState.flowing},set:function e(r){if(this._readableState){this._readableState.flowing=r}}});P._fromList=G;Object.defineProperty(P.prototype,"readableLength",{enumerable:false,get:function e(){return this._readableState.length}});function G(e,r){if(r.length===0)return null;var t;if(r.objectMode)t=r.buffer.shift();else if(!e||e>=r.length){if(r.decoder)t=r.buffer.join("");else if(r.buffer.length===1)t=r.buffer.first();else t=r.buffer.concat(r.length);r.buffer.clear()}else{t=r.buffer.consume(e,r.decoder)}return t}function z(e){var r=e._readableState;g("endReadable",r.endEmitted);if(!r.endEmitted){r.ended=true;K.nextTick(V,r,e)}}function V(e,r){g("endReadableNT",e.endEmitted,e.length);if(!e.endEmitted&&e.length===0){e.endEmitted=true;r.readable=false;r.emit("end");if(e.autoDestroy){var t=r._writableState;if(!t||t.autoDestroy&&t.finished){r.destroy()}}}}if(typeof Symbol==="function"){P.from=function(e,r){if(_===undefined){_=Q("./internal/streams/from")}return _(P,e,r)}}function Z(e,r){for(var t=0,n=e.length;t<n;t++){if(e[t]===r)return t}return-1}}).call(this)}).call(this,Q("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../errors":170,"./_stream_duplex":171,"./internal/streams/async_iterator":176,"./internal/streams/buffer_list":177,"./internal/streams/destroy":178,"./internal/streams/from":180,"./internal/streams/state":182,"./internal/streams/stream":183,_process:273,buffer:186,events:224,inherits:256,"string_decoder/":309,util:140}],174:[function(e,r,t){"use strict";r.exports=f;var n=e("../errors").codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0;var u=e("./_stream_duplex");e("inherits")(f,u);function c(e,r){var t=this._transformState;t.transforming=false;var n=t.writecb;if(n===null){return this.emit("error",new o)}t.writechunk=null;t.writecb=null;if(r!=null)this.push(r);n(e);var i=this._readableState;i.reading=false;if(i.needReadable||i.length<i.highWaterMark){this._read(i.highWaterMark)}}function f(e){if(!(this instanceof f))return new f(e);u.call(this,e);this._transformState={afterTransform:c.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",l)}function l(){var t=this;if(typeof this._flush==="function"&&!this._readableState.destroyed){this._flush(function(e,r){h(t,e,r)})}else{h(this,null,null)}}f.prototype.push=function(e,r){this._transformState.needTransform=false;return u.prototype.push.call(this,e,r)};f.prototype._transform=function(e,r,t){t(new i("_transform()"))};f.prototype._write=function(e,r,t){var n=this._transformState;n.writecb=t;n.writechunk=e;n.writeencoding=r;if(!n.transforming){var i=this._readableState;if(n.needTransform||i.needReadable||i.length<i.highWaterMark)this._read(i.highWaterMark)}};f.prototype._read=function(e){var r=this._transformState;if(r.writechunk!==null&&!r.transforming){r.transforming=true;this._transform(r.writechunk,r.writeencoding,r.afterTransform)}else{r.needTransform=true}};f.prototype._destroy=function(e,r){u.prototype._destroy.call(this,e,function(e){r(e)})};function h(e,r,t){if(r)return e.emit("error",r);if(t!=null)e.push(t);if(e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}},{"../errors":170,"./_stream_duplex":171,inherits:256}],175:[function(z,V,e){(function(X,G){(function(){"use strict";V.exports=M;function e(e,r,t){this.chunk=e;this.encoding=r;this.callback=t;this.next=null}function h(e){var r=this;this.next=null;this.entry=null;this.finish=function(){H(r,e)}}var i;M.WritableState=A;var r={deprecate:z("util-deprecate")};var t=z("./internal/streams/stream");var a=z("buffer").Buffer;var n=G.Uint8Array||function(){};function s(e){return a.from(e)}function u(e){return a.isBuffer(e)||e instanceof n}var o=z("./internal/streams/destroy");var c=z("./internal/streams/state"),f=c.getHighWaterMark;var l=z("../errors").codes,d=l.ERR_INVALID_ARG_TYPE,p=l.ERR_METHOD_NOT_IMPLEMENTED,v=l.ERR_MULTIPLE_CALLBACK,b=l.ERR_STREAM_CANNOT_PIPE,g=l.ERR_STREAM_DESTROYED,m=l.ERR_STREAM_NULL_VALUES,y=l.ERR_STREAM_WRITE_AFTER_END,w=l.ERR_UNKNOWN_ENCODING;var _=o.errorOrDestroy;z("inherits")(M,t);function S(){}function A(e,r,t){i=i||z("./_stream_duplex");e=e||{};if(typeof t!=="boolean")t=r instanceof i;this.objectMode=!!e.objectMode;if(t)this.objectMode=this.objectMode||!!e.writableObjectMode;this.highWaterMark=f(this,e,"writableHighWaterMark",t);this.finalCalled=false;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;this.destroyed=false;var n=e.decodeStrings===false;this.decodeStrings=!n;this.defaultEncoding=e.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(e){L(r,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 h(this)}A.prototype.getBuffer=function e(){var r=this.bufferedRequest;var t=[];while(r){t.push(r);r=r.next}return t};(function(){try{Object.defineProperty(A.prototype,"buffer",{get:r.deprecate(function e(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}})();var E;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function"){E=Function.prototype[Symbol.hasInstance];Object.defineProperty(M,Symbol.hasInstance,{value:function e(r){if(E.call(this,r))return true;if(this!==M)return false;return r&&r._writableState instanceof A}})}else{E=function e(r){return r instanceof this}}function M(e){i=i||z("./_stream_duplex");var r=this instanceof i;if(!r&&!E.call(M,this))return new M(e);this._writableState=new A(e,this,r);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}t.call(this)}M.prototype.pipe=function(){_(this,new b)};function P(e,r){var t=new y;_(e,t);X.nextTick(r,t)}function T(e,r,t,n){var i;if(t===null){i=new m}else if(typeof t!=="string"&&!r.objectMode){i=new d("chunk",["string","Buffer"],t)}if(i){_(e,i);X.nextTick(n,i);return false}return true}M.prototype.write=function(e,r,t){var n=this._writableState;var i=false;var o=!n.objectMode&&u(e);if(o&&!a.isBuffer(e)){e=s(e)}if(typeof r==="function"){t=r;r=null}if(o)r="buffer";else if(!r)r=n.defaultEncoding;if(typeof t!=="function")t=S;if(n.ending)P(this,t);else if(o||T(this,n,e,t)){n.pendingcb++;i=O(this,n,o,e,r,t)}return i};M.prototype.cork=function(){this._writableState.corked++};M.prototype.uncork=function(){var e=this._writableState;if(e.corked){e.corked--;if(!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest)x(this,e)}};M.prototype.setDefaultEncoding=function e(r){if(typeof r==="string")r=r.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((r+"").toLowerCase())>-1))throw new w(r);this._writableState.defaultEncoding=r;return this};Object.defineProperty(M.prototype,"writableBuffer",{enumerable:false,get:function e(){return this._writableState&&this._writableState.getBuffer()}});function k(e,r,t){if(!e.objectMode&&e.decodeStrings!==false&&typeof r==="string"){r=a.from(r,t)}return r}Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:false,get:function e(){return this._writableState.highWaterMark}});function O(e,r,t,n,i,o){if(!t){var a=k(r,n,i);if(n!==a){t=true;i="buffer";n=a}}var s=r.objectMode?1:n.length;r.length+=s;var u=r.length<r.highWaterMark;if(!u)r.needDrain=true;if(r.writing||r.corked){var c=r.lastBufferedRequest;r.lastBufferedRequest={chunk:n,encoding:i,isBuf:t,callback:o,next:null};if(c){c.next=r.lastBufferedRequest}else{r.bufferedRequest=r.lastBufferedRequest}r.bufferedRequestCount+=1}else{B(e,r,false,s,n,i,o)}return u}function B(e,r,t,n,i,o,a){r.writelen=n;r.writecb=a;r.writing=true;r.sync=true;if(r.destroyed)r.onwrite(new g("write"));else if(t)e._writev(i,r.onwrite);else e._write(i,o,r.onwrite);r.sync=false}function C(e,r,t,n,i){--r.pendingcb;if(t){X.nextTick(i,n);X.nextTick(I,e,r);e._writableState.errorEmitted=true;_(e,n)}else{i(n);e._writableState.errorEmitted=true;_(e,n);I(e,r)}}function R(e){e.writing=false;e.writecb=null;e.length-=e.writelen;e.writelen=0}function L(e,r){var t=e._writableState;var n=t.sync;var i=t.writecb;if(typeof i!=="function")throw new v;R(t);if(r)C(e,t,n,r,i);else{var o=N(t)||e.destroyed;if(!o&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest){x(e,t)}if(n){X.nextTick(F,e,t,o,i)}else{F(e,t,o,i)}}}function F(e,r,t,n){if(!t)j(e,r);r.pendingcb--;n();I(e,r)}function j(e,r){if(r.length===0&&r.needDrain){r.needDrain=false;e.emit("drain")}}function x(e,r){r.bufferProcessing=true;var t=r.bufferedRequest;if(e._writev&&t&&t.next){var n=r.bufferedRequestCount;var i=new Array(n);var o=r.corkedRequestsFree;o.entry=t;var a=0;var s=true;while(t){i[a]=t;if(!t.isBuf)s=false;t=t.next;a+=1}i.allBuffers=s;B(e,r,true,r.length,i,"",o.finish);r.pendingcb++;r.lastBufferedRequest=null;if(o.next){r.corkedRequestsFree=o.next;o.next=null}else{r.corkedRequestsFree=new h(r)}r.bufferedRequestCount=0}else{while(t){var u=t.chunk;var c=t.encoding;var f=t.callback;var l=r.objectMode?1:u.length;B(e,r,false,l,u,c,f);t=t.next;r.bufferedRequestCount--;if(r.writing){break}}if(t===null)r.lastBufferedRequest=null}r.bufferedRequest=t;r.bufferProcessing=false}M.prototype._write=function(e,r,t){t(new p("_write()"))};M.prototype._writev=null;M.prototype.end=function(e,r,t){var n=this._writableState;if(typeof e==="function"){t=e;e=null;r=null}else if(typeof r==="function"){t=r;r=null}if(e!==null&&e!==undefined)this.write(e,r);if(n.corked){n.corked=1;this.uncork()}if(!n.ending)U(this,n,t);return this};Object.defineProperty(M.prototype,"writableLength",{enumerable:false,get:function e(){return this._writableState.length}});function N(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function D(r,t){r._final(function(e){t.pendingcb--;if(e){_(r,e)}t.prefinished=true;r.emit("prefinish");I(r,t)})}function J(e,r){if(!r.prefinished&&!r.finalCalled){if(typeof e._final==="function"&&!r.destroyed){r.pendingcb++;r.finalCalled=true;X.nextTick(D,e,r)}else{r.prefinished=true;e.emit("prefinish")}}}function I(e,r){var t=N(r);if(t){J(e,r);if(r.pendingcb===0){r.finished=true;e.emit("finish");if(r.autoDestroy){var n=e._readableState;if(!n||n.autoDestroy&&n.endEmitted){e.destroy()}}}}return t}function U(e,r,t){r.ending=true;I(e,r);if(t){if(r.finished)X.nextTick(t);else e.once("finish",t)}r.ended=true;e.writable=false}function H(e,r,t){var n=e.entry;e.entry=null;while(n){var i=n.callback;r.pendingcb--;i(t);n=n.next}r.corkedRequestsFree.next=e}Object.defineProperty(M.prototype,"destroyed",{enumerable:false,get:function e(){if(this._writableState===undefined){return false}return this._writableState.destroyed},set:function e(r){if(!this._writableState){return}this._writableState.destroyed=r}});M.prototype.destroy=o.destroy;M.prototype._undestroy=o.undestroy;M.prototype._destroy=function(e,r){r(e)}}).call(this)}).call(this,z("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../errors":170,"./_stream_duplex":171,"./internal/streams/destroy":178,"./internal/streams/state":182,"./internal/streams/stream":183,_process:273,buffer:186,inherits:256,"util-deprecate":311}],176:[function(m,y,e){(function(g){(function(){"use strict";var e;function n(e,r,t){if(r in e){Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:true})}else{e[r]=t}return e}var o=m("./end-of-stream");var a=Symbol("lastResolve");var s=Symbol("lastReject");var u=Symbol("error");var c=Symbol("ended");var f=Symbol("lastPromise");var l=Symbol("handlePromise");var h=Symbol("stream");function d(e,r){return{value:e,done:r}}function r(e){var r=e[a];if(r!==null){var t=e[h].read();if(t!==null){e[f]=null;e[a]=null;e[s]=null;r(d(t,false))}}}function p(e){g.nextTick(r,e)}function v(t,n){return function(e,r){t.then(function(){if(n[c]){e(d(undefined,true));return}n[l](e,r)},r)}}var t=Object.getPrototypeOf(function(){});var b=Object.setPrototypeOf((e={get stream(){return this[h]},next:function e(){var t=this;var r=this[u];if(r!==null){return Promise.reject(r)}if(this[c]){return Promise.resolve(d(undefined,true))}if(this[h].destroyed){return new Promise(function(e,r){g.nextTick(function(){if(t[u]){r(t[u])}else{e(d(undefined,true))}})})}var n=this[f];var i;if(n){i=new Promise(v(n,this))}else{var o=this[h].read();if(o!==null){return Promise.resolve(d(o,false))}i=new Promise(this[l])}this[f]=i;return i}},n(e,Symbol.asyncIterator,function(){return this}),n(e,"return",function e(){var n=this;return new Promise(function(r,t){n[h].destroy(null,function(e){if(e){t(e);return}r(d(undefined,true))})})}),e),t);var i=function e(r){var t;var i=Object.create(b,(t={},n(t,h,{value:r,writable:true}),n(t,a,{value:null,writable:true}),n(t,s,{value:null,writable:true}),n(t,u,{value:null,writable:true}),n(t,c,{value:r._readableState.endEmitted,writable:true}),n(t,l,{value:function e(r,t){var n=i[h].read();if(n){i[f]=null;i[a]=null;i[s]=null;r(d(n,false))}else{i[a]=r;i[s]=t}},writable:true}),t));i[f]=null;o(r,function(e){if(e&&e.code!=="ERR_STREAM_PREMATURE_CLOSE"){var r=i[s];if(r!==null){i[f]=null;i[a]=null;i[s]=null;r(e)}i[u]=e;return}var t=i[a];if(t!==null){i[f]=null;i[a]=null;i[s]=null;t(d(undefined,true))}i[c]=true});r.on("readable",p.bind(null,i));return i};y.exports=i}).call(this)}).call(this,m("_process"))},{"./end-of-stream":179,_process:273}],177:[function(e,r,t){"use strict";function n(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);if(e)n=n.filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable});t.push.apply(t,n)}return t}function i(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};if(e%2){n(Object(t),true).forEach(function(e){o(r,e,t[e])})}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(r,Object.getOwnPropertyDescriptors(t))}else{n(Object(t)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))})}}return r}function o(e,r,t){if(r in e){Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:true})}else{e[r]=t}return e}function a(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function s(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||false;n.configurable=true;if("value"in n)n.writable=true;Object.defineProperty(e,n.key,n)}}function u(e,r,t){if(r)s(e.prototype,r);if(t)s(e,t);return e}var c=e("buffer"),f=c.Buffer;var l=e("util"),h=l.inspect;var d=h&&h.custom||"inspect";function p(e,r,t){f.prototype.copy.call(e,r,t)}r.exports=function(){function e(){a(this,e);this.head=null;this.tail=null;this.length=0}u(e,[{key:"push",value:function e(r){var t={data:r,next:null};if(this.length>0)this.tail.next=t;else this.head=t;this.tail=t;++this.length}},{key:"unshift",value:function e(r){var t={data:r,next:this.head};if(this.length===0)this.tail=t;this.head=t;++this.length}},{key:"shift",value:function e(){if(this.length===0)return;var r=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return r}},{key:"clear",value:function e(){this.head=this.tail=null;this.length=0}},{key:"join",value:function e(r){if(this.length===0)return"";var t=this.head;var n=""+t.data;while(t=t.next){n+=r+t.data}return n}},{key:"concat",value:function e(r){if(this.length===0)return f.alloc(0);var t=f.allocUnsafe(r>>>0);var n=this.head;var i=0;while(n){p(n.data,t,i);i+=n.data.length;n=n.next}return t}},{key:"consume",value:function e(r,t){var n;if(r<this.head.data.length){n=this.head.data.slice(0,r);this.head.data=this.head.data.slice(r)}else if(r===this.head.data.length){n=this.shift()}else{n=t?this._getString(r):this._getBuffer(r)}return n}},{key:"first",value:function e(){return this.head.data}},{key:"_getString",value:function e(r){var t=this.head;var n=1;var i=t.data;r-=i.length;while(t=t.next){var o=t.data;var a=r>o.length?o.length:r;if(a===o.length)i+=o;else i+=o.slice(0,r);r-=a;if(r===0){if(a===o.length){++n;if(t.next)this.head=t.next;else this.head=this.tail=null}else{this.head=t;t.data=o.slice(a)}break}++n}this.length-=n;return i}},{key:"_getBuffer",value:function e(r){var t=f.allocUnsafe(r);var n=this.head;var i=1;n.data.copy(t);r-=n.data.length;while(n=n.next){var o=n.data;var a=r>o.length?o.length:r;o.copy(t,t.length-r,0,a);r-=a;if(r===0){if(a===o.length){++i;if(n.next)this.head=n.next;else this.head=this.tail=null}else{this.head=n;n.data=o.slice(a)}break}++i}this.length-=i;return t}},{key:d,value:function e(r,t){return h(this,i({},t,{depth:0,customInspect:false}))}}]);return e}()},{buffer:186,util:140}],178:[function(e,n,r){(function(u){(function(){"use strict";function e(e,r){var t=this;var n=this._readableState&&this._readableState.destroyed;var i=this._writableState&&this._writableState.destroyed;if(n||i){if(r){r(e)}else if(e){if(!this._writableState){u.nextTick(s,this,e)}else if(!this._writableState.errorEmitted){this._writableState.errorEmitted=true;u.nextTick(s,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(!r&&e){if(!t._writableState){u.nextTick(o,t,e)}else if(!t._writableState.errorEmitted){t._writableState.errorEmitted=true;u.nextTick(o,t,e)}else{u.nextTick(a,t)}}else if(r){u.nextTick(a,t);r(e)}else{u.nextTick(a,t)}});return this}function o(e,r){s(e,r);a(e)}function a(e){if(e._writableState&&!e._writableState.emitClose)return;if(e._readableState&&!e._readableState.emitClose)return;e.emit("close")}function r(){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 s(e,r){e.emit("error",r)}function t(e,r){var t=e._readableState;var n=e._writableState;if(t&&t.autoDestroy||n&&n.autoDestroy)e.destroy(r);else e.emit("error",r)}n.exports={destroy:e,undestroy:r,errorOrDestroy:t}}).call(this)}).call(this,e("_process"))},{_process:273}],179:[function(e,r,t){"use strict";var d=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function p(n){var i=false;return function(){if(i)return;i=true;for(var e=arguments.length,r=new Array(e),t=0;t<e;t++){r[t]=arguments[t]}n.apply(this,r)}}function v(){}function b(e){return e.setHeader&&typeof e.abort==="function"}function g(t,e,n){if(typeof e==="function")return g(t,null,e);if(!e)e={};n=p(n||v);var i=e.readable||e.readable!==false&&t.readable;var o=e.writable||e.writable!==false&&t.writable;var r=function e(){if(!t.writable)s()};var a=t._writableState&&t._writableState.finished;var s=function e(){o=false;a=true;if(!i)n.call(t)};var u=t._readableState&&t._readableState.endEmitted;var c=function e(){i=false;u=true;if(!o)n.call(t)};var f=function e(r){n.call(t,r)};var l=function e(){var r;if(i&&!u){if(!t._readableState||!t._readableState.ended)r=new d;return n.call(t,r)}if(o&&!a){if(!t._writableState||!t._writableState.ended)r=new d;return n.call(t,r)}};var h=function e(){t.req.on("finish",s)};if(b(t)){t.on("complete",s);t.on("abort",l);if(t.req)h();else t.on("request",h)}else if(o&&!t._writableState){t.on("end",r);t.on("close",r)}t.on("end",c);t.on("finish",s);if(e.error!==false)t.on("error",f);t.on("close",l);return function(){t.removeListener("complete",s);t.removeListener("abort",l);t.removeListener("request",h);if(t.req)t.req.removeListener("finish",s);t.removeListener("end",r);t.removeListener("close",r);t.removeListener("finish",s);t.removeListener("end",c);t.removeListener("error",f);t.removeListener("close",l)}}r.exports=g},{"../../../errors":170}],180:[function(e,r,t){r.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],181:[function(a,e,r){"use strict";var s;function u(e){var r=false;return function(){if(r)return;r=true;e.apply(void 0,arguments)}}var t=a("../../../errors").codes,n=t.ERR_MISSING_ARGS,c=t.ERR_STREAM_DESTROYED;function i(e){if(e)throw e}function f(e){return e.setHeader&&typeof e.abort==="function"}function l(r,e,t,n){n=u(n);var i=false;r.on("close",function(){i=true});if(s===undefined)s=a("./end-of-stream");s(r,{readable:e,writable:t},function(e){if(e)return n(e);i=true;n()});var o=false;return function(e){if(i)return;if(o)return;o=true;if(f(r))return r.abort();if(typeof r.destroy==="function")return r.destroy();n(e||new c("pipe"))}}function h(e){e()}function d(e,r){return e.pipe(r)}function p(e){if(!e.length)return i;if(typeof e[e.length-1]!=="function")return i;return e.pop()}function o(){for(var e=arguments.length,i=new Array(e),r=0;r<e;r++){i[r]=arguments[r]}var o=p(i);if(Array.isArray(i[0]))i=i[0];if(i.length<2){throw new n("streams")}var a;var s=i.map(function(e,r){var t=r<i.length-1;var n=r>0;return l(e,t,n,function(e){if(!a)a=e;if(e)s.forEach(h);if(t)return;s.forEach(h);o(a)})});return i.reduce(d)}e.exports=o},{"../../../errors":170,"./end-of-stream":179}],182:[function(e,r,t){"use strict";var a=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;function s(e,r,t){return e.highWaterMark!=null?e.highWaterMark:r?e[t]:null}function n(e,r,t,n){var i=s(r,n,t);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var o=n?t:"highWaterMark";throw new a(o,i)}return Math.floor(i)}return e.objectMode?16:16*1024}r.exports={getHighWaterMark:n}},{"../../../errors":170}],183:[function(e,r,t){r.exports=e("events").EventEmitter},{events:224}],184:[function(e,r,t){t=r.exports=e("./lib/_stream_readable.js");t.Stream=t;t.Readable=t;t.Writable=e("./lib/_stream_writable.js");t.Duplex=e("./lib/_stream_duplex.js");t.Transform=e("./lib/_stream_transform.js");t.PassThrough=e("./lib/_stream_passthrough.js");t.finished=e("./lib/internal/streams/end-of-stream.js");t.pipeline=e("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":171,"./lib/_stream_passthrough.js":172,"./lib/_stream_readable.js":173,"./lib/_stream_transform.js":174,"./lib/_stream_writable.js":175,"./lib/internal/streams/end-of-stream.js":179,"./lib/internal/streams/pipeline.js":181}],185:[function(e,r,t){(function(a){(function(){r.exports=function e(r,t){var n=Math.min(r.length,t.length);var i=new a(n);for(var o=0;o<n;++o){i[o]=r[o]^t[o]}return i}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:186}],186:[function(Q,e,W){(function(e){(function(){"use strict";var n=Q("base64-js");var o=Q("ieee754");W.Buffer=h;W.SlowBuffer=r;W.INSPECT_MAX_BYTES=50;var t=2147483647;W.kMaxLength=t;h.TYPED_ARRAY_SUPPORT=e();if(!h.TYPED_ARRAY_SUPPORT&&typeof console!=="undefined"&&typeof console.error==="function"){console.error("This browser lacks typed array (Uint8Array) support which is required by "+"`buffer` v5.x. Use `buffer` v4.x if you require old browser support.")}function e(){try{var e=new Uint8Array(1);e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}};return e.foo()===42}catch(e){return false}}Object.defineProperty(h.prototype,"parent",{enumerable:true,get:function(){if(!h.isBuffer(this))return undefined;return this.buffer}});Object.defineProperty(h.prototype,"offset",{enumerable:true,get:function(){if(!h.isBuffer(this))return undefined;return this.byteOffset}});function a(e){if(e>t){throw new RangeError('The value "'+e+'" is invalid for option "size"')}var r=new Uint8Array(e);r.__proto__=h.prototype;return r}function h(e,r,t){if(typeof e==="number"){if(typeof r==="string"){throw new TypeError('The "string" argument must be of type string. Received type number')}return c(e)}return i(e,r,t)}if(typeof Symbol!=="undefined"&&Symbol.species!=null&&h[Symbol.species]===h){Object.defineProperty(h,Symbol.species,{value:null,configurable:true,enumerable:false,writable:false})}h.poolSize=8192;function i(e,r,t){if(typeof e==="string"){return f(e,r)}if(ArrayBuffer.isView(e)){return l(e)}if(e==null){throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, "+"or Array-like Object. Received type "+typeof e)}if(K(e,ArrayBuffer)||e&&K(e.buffer,ArrayBuffer)){return d(e,r,t)}if(typeof e==="number"){throw new TypeError('The "value" argument must not be of type number. Received type number')}var n=e.valueOf&&e.valueOf();if(n!=null&&n!==e){return h.from(n,r,t)}var i=p(e);if(i)return i;if(typeof Symbol!=="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]==="function"){return h.from(e[Symbol.toPrimitive]("string"),r,t)}throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, "+"or Array-like Object. Received type "+typeof e)}h.from=function(e,r,t){return i(e,r,t)};h.prototype.__proto__=Uint8Array.prototype;h.__proto__=Uint8Array;function s(e){if(typeof e!=="number"){throw new TypeError('"size" argument must be of type number')}else if(e<0){throw new RangeError('The value "'+e+'" is invalid for option "size"')}}function u(e,r,t){s(e);if(e<=0){return a(e)}if(r!==undefined){return typeof t==="string"?a(e).fill(r,t):a(e).fill(r)}return a(e)}h.alloc=function(e,r,t){return u(e,r,t)};function c(e){s(e);return a(e<0?0:v(e)|0)}h.allocUnsafe=function(e){return c(e)};h.allocUnsafeSlow=function(e){return c(e)};function f(e,r){if(typeof r!=="string"||r===""){r="utf8"}if(!h.isEncoding(r)){throw new TypeError("Unknown encoding: "+r)}var t=b(e,r)|0;var n=a(t);var i=n.write(e,r);if(i!==t){n=n.slice(0,i)}return n}function l(e){var r=e.length<0?0:v(e.length)|0;var t=a(r);for(var n=0;n<r;n+=1){t[n]=e[n]&255}return t}function d(e,r,t){if(r<0||e.byteLength<r){throw new RangeError('"offset" is outside of buffer bounds')}if(e.byteLength<r+(t||0)){throw new RangeError('"length" is outside of buffer bounds')}var n;if(r===undefined&&t===undefined){n=new Uint8Array(e)}else if(t===undefined){n=new Uint8Array(e,r)}else{n=new Uint8Array(e,r,t)}n.__proto__=h.prototype;return n}function p(e){if(h.isBuffer(e)){var r=v(e.length)|0;var t=a(r);if(t.length===0){return t}e.copy(t,0,0,r);return t}if(e.length!==undefined){if(typeof e.length!=="number"||q(e.length)){return a(0)}return l(e)}if(e.type==="Buffer"&&Array.isArray(e.data)){return l(e.data)}}function v(e){if(e>=t){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+t.toString(16)+" bytes")}return e|0}function r(e){if(+e!=e){e=0}return h.alloc(+e)}h.isBuffer=function e(r){return r!=null&&r._isBuffer===true&&r!==h.prototype};h.compare=function e(r,t){if(K(r,Uint8Array))r=h.from(r,r.offset,r.byteLength);if(K(t,Uint8Array))t=h.from(t,t.offset,t.byteLength);if(!h.isBuffer(r)||!h.isBuffer(t)){throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array')}if(r===t)return 0;var n=r.length;var i=t.length;for(var o=0,a=Math.min(n,i);o<a;++o){if(r[o]!==t[o]){n=r[o];i=t[o];break}}if(n<i)return-1;if(i<n)return 1;return 0};h.isEncoding=function e(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return true;default:return false}};h.concat=function e(r,t){if(!Array.isArray(r)){throw new TypeError('"list" argument must be an Array of Buffers')}if(r.length===0){return h.alloc(0)}var n;if(t===undefined){t=0;for(n=0;n<r.length;++n){t+=r[n].length}}var i=h.allocUnsafe(t);var o=0;for(n=0;n<r.length;++n){var a=r[n];if(K(a,Uint8Array)){a=h.from(a)}if(!h.isBuffer(a)){throw new TypeError('"list" argument must be an Array of Buffers')}a.copy(i,o);o+=a.length}return i};function b(e,r){if(h.isBuffer(e)){return e.length}if(ArrayBuffer.isView(e)||K(e,ArrayBuffer)){return e.byteLength}if(typeof e!=="string"){throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. '+"Received type "+typeof e)}var t=e.length;var n=arguments.length>2&&arguments[2]===true;if(!n&&t===0)return 0;var i=false;for(;;){switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return X(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return V(e).length;default:if(i){return n?-1:X(e).length}r=(""+r).toLowerCase();i=true}}}h.byteLength=b;function g(e,r,t){var n=false;if(r===undefined||r<0){r=0}if(r>this.length){return""}if(t===undefined||t>this.length){t=this.length}if(t<=0){return""}t>>>=0;r>>>=0;if(t<=r){return""}if(!e)e="utf8";while(true){switch(e){case"hex":return L(this,r,t);case"utf8":case"utf-8":return k(this,r,t);case"ascii":return C(this,r,t);case"latin1":case"binary":return R(this,r,t);case"base64":return T(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,r,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase();n=true}}}h.prototype._isBuffer=true;function m(e,r,t){var n=e[r];e[r]=e[t];e[t]=n}h.prototype.swap16=function e(){var r=this.length;if(r%2!==0){throw new RangeError("Buffer size must be a multiple of 16-bits")}for(var t=0;t<r;t+=2){m(this,t,t+1)}return this};h.prototype.swap32=function e(){var r=this.length;if(r%4!==0){throw new RangeError("Buffer size must be a multiple of 32-bits")}for(var t=0;t<r;t+=4){m(this,t,t+3);m(this,t+1,t+2)}return this};h.prototype.swap64=function e(){var r=this.length;if(r%8!==0){throw new RangeError("Buffer size must be a multiple of 64-bits")}for(var t=0;t<r;t+=8){m(this,t,t+7);m(this,t+1,t+6);m(this,t+2,t+5);m(this,t+3,t+4)}return this};h.prototype.toString=function e(){var r=this.length;if(r===0)return"";if(arguments.length===0)return k(this,0,r);return g.apply(this,arguments)};h.prototype.toLocaleString=h.prototype.toString;h.prototype.equals=function e(r){if(!h.isBuffer(r))throw new TypeError("Argument must be a Buffer");if(this===r)return true;return h.compare(this,r)===0};h.prototype.inspect=function e(){var r="";var t=W.INSPECT_MAX_BYTES;r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim();if(this.length>t)r+=" ... ";return"<Buffer "+r+">"};h.prototype.compare=function e(r,t,n,i,o){if(K(r,Uint8Array)){r=h.from(r,r.offset,r.byteLength)}if(!h.isBuffer(r)){throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. '+"Received type "+typeof r)}if(t===undefined){t=0}if(n===undefined){n=r?r.length:0}if(i===undefined){i=0}if(o===undefined){o=this.length}if(t<0||n>r.length||i<0||o>this.length){throw new RangeError("out of range index")}if(i>=o&&t>=n){return 0}if(i>=o){return-1}if(t>=n){return 1}t>>>=0;n>>>=0;i>>>=0;o>>>=0;if(this===r)return 0;var a=o-i;var s=n-t;var u=Math.min(a,s);var c=this.slice(i,o);var f=r.slice(t,n);for(var l=0;l<u;++l){if(c[l]!==f[l]){a=c[l];s=f[l];break}}if(a<s)return-1;if(s<a)return 1;return 0};function y(e,r,t,n,i){if(e.length===0)return-1;if(typeof t==="string"){n=t;t=0}else if(t>2147483647){t=2147483647}else if(t<-2147483648){t=-2147483648}t=+t;if(q(t)){t=i?0:e.length-1}if(t<0)t=e.length+t;if(t>=e.length){if(i)return-1;else t=e.length-1}else if(t<0){if(i)t=0;else return-1}if(typeof r==="string"){r=h.from(r,n)}if(h.isBuffer(r)){if(r.length===0){return-1}return w(e,r,t,n,i)}else if(typeof r==="number"){r=r&255;if(typeof Uint8Array.prototype.indexOf==="function"){if(i){return Uint8Array.prototype.indexOf.call(e,r,t)}else{return Uint8Array.prototype.lastIndexOf.call(e,r,t)}}return w(e,[r],t,n,i)}throw new TypeError("val must be string, number or Buffer")}function w(e,r,t,n,i){var o=1;var a=e.length;var s=r.length;if(n!==undefined){n=String(n).toLowerCase();if(n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le"){if(e.length<2||r.length<2){return-1}o=2;a/=2;s/=2;t/=2}}function u(e,r){if(o===1){return e[r]}else{return e.readUInt16BE(r*o)}}var c;if(i){var f=-1;for(c=t;c<a;c++){if(u(e,c)===u(r,f===-1?0:c-f)){if(f===-1)f=c;if(c-f+1===s)return f*o}else{if(f!==-1)c-=c-f;f=-1}}}else{if(t+s>a)t=a-s;for(c=t;c>=0;c--){var l=true;for(var h=0;h<s;h++){if(u(e,c+h)!==u(r,h)){l=false;break}}if(l)return c}}return-1}h.prototype.includes=function e(r,t,n){return this.indexOf(r,t,n)!==-1};h.prototype.indexOf=function e(r,t,n){return y(this,r,t,n,true)};h.prototype.lastIndexOf=function e(r,t,n){return y(this,r,t,n,false)};function _(e,r,t,n){t=Number(t)||0;var i=e.length-t;if(!n){n=i}else{n=Number(n);if(n>i){n=i}}var o=r.length;if(n>o/2){n=o/2}for(var a=0;a<n;++a){var s=parseInt(r.substr(a*2,2),16);if(q(s))return a;e[t+a]=s}return a}function S(e,r,t,n){return Z(X(r,e.length-t),e,t,n)}function A(e,r,t,n){return Z(G(r),e,t,n)}function E(e,r,t,n){return A(e,r,t,n)}function M(e,r,t,n){return Z(V(r),e,t,n)}function P(e,r,t,n){return Z(z(r,e.length-t),e,t,n)}h.prototype.write=function e(r,t,n,i){if(t===undefined){i="utf8";n=this.length;t=0}else if(n===undefined&&typeof t==="string"){i=t;n=this.length;t=0}else if(isFinite(t)){t=t>>>0;if(isFinite(n)){n=n>>>0;if(i===undefined)i="utf8"}else{i=n;n=undefined}}else{throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported")}var o=this.length-t;if(n===undefined||n>o)n=o;if(r.length>0&&(n<0||t<0)||t>this.length){throw new RangeError("Attempt to write outside buffer bounds")}if(!i)i="utf8";var a=false;for(;;){switch(i){case"hex":return _(this,r,t,n);case"utf8":case"utf-8":return S(this,r,t,n);case"ascii":return A(this,r,t,n);case"latin1":case"binary":return E(this,r,t,n);case"base64":return M(this,r,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,r,t,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase();a=true}}};h.prototype.toJSON=function e(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function T(e,r,t){if(r===0&&t===e.length){return n.fromByteArray(e)}else{return n.fromByteArray(e.slice(r,t))}}function k(e,r,t){t=Math.min(e.length,t);var n=[];var i=r;while(i<t){var o=e[i];var a=null;var s=o>239?4:o>223?3:o>191?2:1;if(i+s<=t){var u,c,f,l;switch(s){case 1:if(o<128){a=o}break;case 2:u=e[i+1];if((u&192)===128){l=(o&31)<<6|u&63;if(l>127){a=l}}break;case 3:u=e[i+1];c=e[i+2];if((u&192)===128&&(c&192)===128){l=(o&15)<<12|(u&63)<<6|c&63;if(l>2047&&(l<55296||l>57343)){a=l}}break;case 4:u=e[i+1];c=e[i+2];f=e[i+3];if((u&192)===128&&(c&192)===128&&(f&192)===128){l=(o&15)<<18|(u&63)<<12|(c&63)<<6|f&63;if(l>65535&&l<1114112){a=l}}}}if(a===null){a=65533;s=1}else if(a>65535){a-=65536;n.push(a>>>10&1023|55296);a=56320|a&1023}n.push(a);i+=s}return B(n)}var O=4096;function B(e){var r=e.length;if(r<=O){return String.fromCharCode.apply(String,e)}var t="";var n=0;while(n<r){t+=String.fromCharCode.apply(String,e.slice(n,n+=O))}return t}function C(e,r,t){var n="";t=Math.min(e.length,t);for(var i=r;i<t;++i){n+=String.fromCharCode(e[i]&127)}return n}function R(e,r,t){var n="";t=Math.min(e.length,t);for(var i=r;i<t;++i){n+=String.fromCharCode(e[i])}return n}function L(e,r,t){var n=e.length;if(!r||r<0)r=0;if(!t||t<0||t>n)t=n;var i="";for(var o=r;o<t;++o){i+=H(e[o])}return i}function F(e,r,t){var n=e.slice(r,t);var i="";for(var o=0;o<n.length;o+=2){i+=String.fromCharCode(n[o]+n[o+1]*256)}return i}h.prototype.slice=function e(r,t){var n=this.length;r=~~r;t=t===undefined?n:~~t;if(r<0){r+=n;if(r<0)r=0}else if(r>n){r=n}if(t<0){t+=n;if(t<0)t=0}else if(t>n){t=n}if(t<r)t=r;var i=this.subarray(r,t);i.__proto__=h.prototype;return i};function j(e,r,t){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+r>t)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUIntLE=function e(r,t,n){r=r>>>0;t=t>>>0;if(!n)j(r,t,this.length);var i=this[r];var o=1;var a=0;while(++a<t&&(o*=256)){i+=this[r+a]*o}return i};h.prototype.readUIntBE=function e(r,t,n){r=r>>>0;t=t>>>0;if(!n){j(r,t,this.length)}var i=this[r+--t];var o=1;while(t>0&&(o*=256)){i+=this[r+--t]*o}return i};h.prototype.readUInt8=function e(r,t){r=r>>>0;if(!t)j(r,1,this.length);return this[r]};h.prototype.readUInt16LE=function e(r,t){r=r>>>0;if(!t)j(r,2,this.length);return this[r]|this[r+1]<<8};h.prototype.readUInt16BE=function e(r,t){r=r>>>0;if(!t)j(r,2,this.length);return this[r]<<8|this[r+1]};h.prototype.readUInt32LE=function e(r,t){r=r>>>0;if(!t)j(r,4,this.length);return(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};h.prototype.readUInt32BE=function e(r,t){r=r>>>0;if(!t)j(r,4,this.length);return this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};h.prototype.readIntLE=function e(r,t,n){r=r>>>0;t=t>>>0;if(!n)j(r,t,this.length);var i=this[r];var o=1;var a=0;while(++a<t&&(o*=256)){i+=this[r+a]*o}o*=128;if(i>=o)i-=Math.pow(2,8*t);return i};h.prototype.readIntBE=function e(r,t,n){r=r>>>0;t=t>>>0;if(!n)j(r,t,this.length);var i=t;var o=1;var a=this[r+--i];while(i>0&&(o*=256)){a+=this[r+--i]*o}o*=128;if(a>=o)a-=Math.pow(2,8*t);return a};h.prototype.readInt8=function e(r,t){r=r>>>0;if(!t)j(r,1,this.length);if(!(this[r]&128))return this[r];return(255-this[r]+1)*-1};h.prototype.readInt16LE=function e(r,t){r=r>>>0;if(!t)j(r,2,this.length);var n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n};h.prototype.readInt16BE=function e(r,t){r=r>>>0;if(!t)j(r,2,this.length);var n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n};h.prototype.readInt32LE=function e(r,t){r=r>>>0;if(!t)j(r,4,this.length);return this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};h.prototype.readInt32BE=function e(r,t){r=r>>>0;if(!t)j(r,4,this.length);return this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};h.prototype.readFloatLE=function e(r,t){r=r>>>0;if(!t)j(r,4,this.length);return o.read(this,r,true,23,4)};h.prototype.readFloatBE=function e(r,t){r=r>>>0;if(!t)j(r,4,this.length);return o.read(this,r,false,23,4)};h.prototype.readDoubleLE=function e(r,t){r=r>>>0;if(!t)j(r,8,this.length);return o.read(this,r,true,52,8)};h.prototype.readDoubleBE=function e(r,t){r=r>>>0;if(!t)j(r,8,this.length);return o.read(this,r,false,52,8)};function x(e,r,t,n,i,o){if(!h.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(t+n>e.length)throw new RangeError("Index out of range")}h.prototype.writeUIntLE=function e(r,t,n,i){r=+r;t=t>>>0;n=n>>>0;if(!i){var o=Math.pow(2,8*n)-1;x(this,r,t,n,o,0)}var a=1;var s=0;this[t]=r&255;while(++s<n&&(a*=256)){this[t+s]=r/a&255}return t+n};h.prototype.writeUIntBE=function e(r,t,n,i){r=+r;t=t>>>0;n=n>>>0;if(!i){var o=Math.pow(2,8*n)-1;x(this,r,t,n,o,0)}var a=n-1;var s=1;this[t+a]=r&255;while(--a>=0&&(s*=256)){this[t+a]=r/s&255}return t+n};h.prototype.writeUInt8=function e(r,t,n){r=+r;t=t>>>0;if(!n)x(this,r,t,1,255,0);this[t]=r&255;return t+1};h.prototype.writeUInt16LE=function e(r,t,n){r=+r;t=t>>>0;if(!n)x(this,r,t,2,65535,0);this[t]=r&255;this[t+1]=r>>>8;return t+2};h.prototype.writeUInt16BE=function e(r,t,n){r=+r;t=t>>>0;if(!n)x(this,r,t,2,65535,0);this[t]=r>>>8;this[t+1]=r&255;return t+2};h.prototype.writeUInt32LE=function e(r,t,n){r=+r;t=t>>>0;if(!n)x(this,r,t,4,4294967295,0);this[t+3]=r>>>24;this[t+2]=r>>>16;this[t+1]=r>>>8;this[t]=r&255;return t+4};h.prototype.writeUInt32BE=function e(r,t,n){r=+r;t=t>>>0;if(!n)x(this,r,t,4,4294967295,0);this[t]=r>>>24;this[t+1]=r>>>16;this[t+2]=r>>>8;this[t+3]=r&255;return t+4};h.prototype.writeIntLE=function e(r,t,n,i){r=+r;t=t>>>0;if(!i){var o=Math.pow(2,8*n-1);x(this,r,t,n,o-1,-o)}var a=0;var s=1;var u=0;this[t]=r&255;while(++a<n&&(s*=256)){if(r<0&&u===0&&this[t+a-1]!==0){u=1}this[t+a]=(r/s>>0)-u&255}return t+n};h.prototype.writeIntBE=function e(r,t,n,i){r=+r;t=t>>>0;if(!i){var o=Math.pow(2,8*n-1);x(this,r,t,n,o-1,-o)}var a=n-1;var s=1;var u=0;this[t+a]=r&255;while(--a>=0&&(s*=256)){if(r<0&&u===0&&this[t+a+1]!==0){u=1}this[t+a]=(r/s>>0)-u&255}return t+n};h.prototype.writeInt8=function e(r,t,n){r=+r;t=t>>>0;if(!n)x(this,r,t,1,127,-128);if(r<0)r=255+r+1;this[t]=r&255;return t+1};h.prototype.writeInt16LE=function e(r,t,n){r=+r;t=t>>>0;if(!n)x(this,r,t,2,32767,-32768);this[t]=r&255;this[t+1]=r>>>8;return t+2};h.prototype.writeInt16BE=function e(r,t,n){r=+r;t=t>>>0;if(!n)x(this,r,t,2,32767,-32768);this[t]=r>>>8;this[t+1]=r&255;return t+2};h.prototype.writeInt32LE=function e(r,t,n){r=+r;t=t>>>0;if(!n)x(this,r,t,4,2147483647,-2147483648);this[t]=r&255;this[t+1]=r>>>8;this[t+2]=r>>>16;this[t+3]=r>>>24;return t+4};h.prototype.writeInt32BE=function e(r,t,n){r=+r;t=t>>>0;if(!n)x(this,r,t,4,2147483647,-2147483648);if(r<0)r=4294967295+r+1;this[t]=r>>>24;this[t+1]=r>>>16;this[t+2]=r>>>8;this[t+3]=r&255;return t+4};function N(e,r,t,n,i,o){if(t+n>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function D(e,r,t,n,i){r=+r;t=t>>>0;if(!i){N(e,r,t,4,34028234663852886e22,-34028234663852886e22)}o.write(e,r,t,n,23,4);return t+4}h.prototype.writeFloatLE=function e(r,t,n){return D(this,r,t,true,n)};h.prototype.writeFloatBE=function e(r,t,n){return D(this,r,t,false,n)};function J(e,r,t,n,i){r=+r;t=t>>>0;if(!i){N(e,r,t,8,17976931348623157e292,-17976931348623157e292)}o.write(e,r,t,n,52,8);return t+8}h.prototype.writeDoubleLE=function e(r,t,n){return J(this,r,t,true,n)};h.prototype.writeDoubleBE=function e(r,t,n){return J(this,r,t,false,n)};h.prototype.copy=function e(r,t,n,i){if(!h.isBuffer(r))throw new TypeError("argument should be a Buffer");if(!n)n=0;if(!i&&i!==0)i=this.length;if(t>=r.length)t=r.length;if(!t)t=0;if(i>0&&i<n)i=n;if(i===n)return 0;if(r.length===0||this.length===0)return 0;if(t<0){throw new RangeError("targetStart out of bounds")}if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");if(i>this.length)i=this.length;if(r.length-t<i-n){i=r.length-t+n}var o=i-n;if(this===r&&typeof Uint8Array.prototype.copyWithin==="function"){this.copyWithin(t,n,i)}else if(this===r&&n<t&&t<i){for(var a=o-1;a>=0;--a){r[a+t]=this[a+n]}}else{Uint8Array.prototype.set.call(r,this.subarray(n,i),t)}return o};h.prototype.fill=function e(r,t,n,i){if(typeof r==="string"){if(typeof t==="string"){i=t;t=0;n=this.length}else if(typeof n==="string"){i=n;n=this.length}if(i!==undefined&&typeof i!=="string"){throw new TypeError("encoding must be a string")}if(typeof i==="string"&&!h.isEncoding(i)){throw new TypeError("Unknown encoding: "+i)}if(r.length===1){var o=r.charCodeAt(0);if(i==="utf8"&&o<128||i==="latin1"){r=o}}}else if(typeof r==="number"){r=r&255}if(t<0||this.length<t||this.length<n){throw new RangeError("Out of range index")}if(n<=t){return this}t=t>>>0;n=n===undefined?this.length:n>>>0;if(!r)r=0;var a;if(typeof r==="number"){for(a=t;a<n;++a){this[a]=r}}else{var s=h.isBuffer(r)?r:h.from(r,i);var u=s.length;if(u===0){throw new TypeError('The value "'+r+'" is invalid for argument "value"')}for(a=0;a<n-t;++a){this[a+t]=s[a%u]}}return this};var I=/[^+/0-9A-Za-z-_]/g;function U(e){e=e.split("=")[0];e=e.trim().replace(I,"");if(e.length<2)return"";while(e.length%4!==0){e=e+"="}return e}function H(e){if(e<16)return"0"+e.toString(16);return e.toString(16)}function X(e,r){r=r||Infinity;var t;var n=e.length;var i=null;var o=[];for(var a=0;a<n;++a){t=e.charCodeAt(a);if(t>55295&&t<57344){if(!i){if(t>56319){if((r-=3)>-1)o.push(239,191,189);continue}else if(a+1===n){if((r-=3)>-1)o.push(239,191,189);continue}i=t;continue}if(t<56320){if((r-=3)>-1)o.push(239,191,189);i=t;continue}t=(i-55296<<10|t-56320)+65536}else if(i){if((r-=3)>-1)o.push(239,191,189)}i=null;if(t<128){if((r-=1)<0)break;o.push(t)}else if(t<2048){if((r-=2)<0)break;o.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;o.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;o.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else{throw new Error("Invalid code point")}}return o}function G(e){var r=[];for(var t=0;t<e.length;++t){r.push(e.charCodeAt(t)&255)}return r}function z(e,r){var t,n,i;var o=[];for(var a=0;a<e.length;++a){if((r-=2)<0)break;t=e.charCodeAt(a);n=t>>8;i=t%256;o.push(i);o.push(n)}return o}function V(e){return n.toByteArray(U(e))}function Z(e,r,t,n){for(var i=0;i<n;++i){if(i+t>=r.length||i>=e.length)break;r[i+t]=e[i]}return i}function K(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function q(e){return e!==e}}).call(this)}).call(this,Q("buffer").Buffer)},{"base64-js":136,buffer:186,ieee754:255}],187:[function(e,r,t){var i=e("safe-buffer").Buffer;var n=e("stream").Transform;var o=e("string_decoder").StringDecoder;var a=e("inherits");function s(e){n.call(this);this.hashMode=typeof e==="string";if(this.hashMode){this[e]=this._finalOrDigest}else{this.final=this._finalOrDigest}if(this._final){this.__final=this._final;this._final=null}this._decoder=null;this._encoding=null}a(s,n);s.prototype.update=function(e,r,t){if(typeof e==="string"){e=i.from(e,r)}var n=this._update(e);if(this.hashMode)return this;if(t){n=this._toString(n,t)}return n};s.prototype.setAutoPadding=function(){};s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};s.prototype._transform=function(e,r,t){var n;try{if(this.hashMode){this._update(e)}else{this.push(this._update(e))}}catch(e){n=e}finally{t(n)}};s.prototype._flush=function(e){var r;try{this.push(this.__final())}catch(e){r=e}e(r)};s.prototype._finalOrDigest=function(e){var r=this.__final()||i.alloc(0);if(e){r=this._toString(r,e,true)}return r};s.prototype._toString=function(e,r,t){if(!this._decoder){this._decoder=new o(r);this._encoding=r}if(this._encoding!==r)throw new Error("can't switch encodings");var n=this._decoder.write(e);if(t){n+=this._decoder.end()}return n};r.exports=s},{inherits:256,"safe-buffer":283,stream:294,string_decoder:309}],188:[function(e,s,r){(function(a){(function(){var r=e("elliptic");var n=e("bn.js");s.exports=function e(r){return new i(r)};var t={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}};t.p224=t.secp224r1;t.p256=t.secp256r1=t.prime256v1;t.p192=t.secp192r1=t.prime192v1;t.p384=t.secp384r1;t.p521=t.secp521r1;function i(e){this.curveType=t[e];if(!this.curveType){this.curveType={name:e}}this.curve=new r.ec(this.curveType.name);this.keys=void 0}i.prototype.generateKeys=function(e,r){this.keys=this.curve.genKeyPair();return this.getPublicKey(e,r)};i.prototype.computeSecret=function(e,r,t){r=r||"utf8";if(!a.isBuffer(e)){e=new a(e,r)}var n=this.curve.keyFromPublic(e).getPublic();var i=n.mul(this.keys.getPrivate()).getX();return o(i,t,this.curveType.byteLength)};i.prototype.getPublicKey=function(e,r){var t=this.keys.getPublic(r==="compressed",true);if(r==="hybrid"){if(t[t.length-1]%2){t[0]=7}else{t[0]=6}}return o(t,e)};i.prototype.getPrivateKey=function(e){return o(this.keys.getPrivate(),e)};i.prototype.setPublicKey=function(e,r){r=r||"utf8";if(!a.isBuffer(e)){e=new a(e,r)}this.keys._importPublic(e);return this};i.prototype.setPrivateKey=function(e,r){r=r||"utf8";if(!a.isBuffer(e)){e=new a(e,r)}var t=new n(e);t=t.toString(16);this.keys=this.curve.genKeyPair();this.keys._importPrivate(t);return this};function o(e,r,t){if(!Array.isArray(e)){e=e.toArray()}var n=new a(e);if(t&&n.length<t){var i=new a(t-n.length);i.fill(0);n=a.concat([i,n])}if(!r){return n}else{return n.toString(r)}}}).call(this)}).call(this,e("buffer").Buffer)},{"bn.js":138,buffer:186,elliptic:204}],189:[function(e,r,t){"use strict";var n=e("inherits");var i=e("md5.js");var o=e("ripemd160");var a=e("sha.js");var s=e("cipher-base");function u(e){s.call(this,"digest");this._hash=e}n(u,s);u.prototype._update=function(e){this._hash.update(e)};u.prototype._final=function(){return this._hash.digest()};r.exports=function e(r){r=r.toLowerCase();if(r==="md5")return new i;if(r==="rmd160"||r==="ripemd160")return new o;return new u(a(r))}},{"cipher-base":187,inherits:256,"md5.js":258,ripemd160:282,"sha.js":287}],190:[function(e,r,t){var n=e("md5.js");r.exports=function(e){return(new n).update(e).digest()}},{"md5.js":258}],191:[function(e,r,t){"use strict";var n=e("inherits");var i=e("./legacy");var s=e("cipher-base");var u=e("safe-buffer").Buffer;var o=e("create-hash/md5");var c=e("ripemd160");var f=e("sha.js");var l=u.alloc(128);function a(e,r){s.call(this,"digest");if(typeof r==="string"){r=u.from(r)}var t=e==="sha512"||e==="sha384"?128:64;this._alg=e;this._key=r;if(r.length>t){var n=e==="rmd160"?new c:f(e);r=n.update(r).digest()}else if(r.length<t){r=u.concat([r,l],t)}var i=this._ipad=u.allocUnsafe(t);var o=this._opad=u.allocUnsafe(t);for(var a=0;a<t;a++){i[a]=r[a]^54;o[a]=r[a]^92}this._hash=e==="rmd160"?new c:f(e);this._hash.update(i)}n(a,s);a.prototype._update=function(e){this._hash.update(e)};a.prototype._final=function(){var e=this._hash.digest();var r=this._alg==="rmd160"?new c:f(this._alg);return r.update(this._opad).update(e).digest()};r.exports=function e(r,t){r=r.toLowerCase();if(r==="rmd160"||r==="ripemd160"){return new a("rmd160",t)}if(r==="md5"){return new i(o,t)}return new a(r,t)}},{"./legacy":192,"cipher-base":187,"create-hash/md5":190,inherits:256,ripemd160:282,"safe-buffer":283,"sha.js":287}],192:[function(e,r,t){"use strict";var n=e("inherits");var o=e("safe-buffer").Buffer;var a=e("cipher-base");var s=o.alloc(128);var u=64;function i(e,r){a.call(this,"digest");if(typeof r==="string"){r=o.from(r)}this._alg=e;this._key=r;if(r.length>u){r=e(r)}else if(r.length<u){r=o.concat([r,s],u)}var t=this._ipad=o.allocUnsafe(u);var n=this._opad=o.allocUnsafe(u);for(var i=0;i<u;i++){t[i]=r[i]^54;n[i]=r[i]^92}this._hash=[t]}n(i,a);i.prototype._update=function(e){this._hash.push(e)};i.prototype._final=function(){var e=this._alg(o.concat(this._hash));return this._alg(o.concat([this._opad,e]))};r.exports=i},{"cipher-base":187,inherits:256,"safe-buffer":283}],193:[function(e,r,t){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=e("randombytes");t.createHash=t.Hash=e("create-hash");t.createHmac=t.Hmac=e("create-hmac");var n=e("browserify-sign/algos");var i=Object.keys(n);var o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return o};var a=e("pbkdf2");t.pbkdf2=a.pbkdf2;t.pbkdf2Sync=a.pbkdf2Sync;var s=e("browserify-cipher");t.Cipher=s.Cipher;t.createCipher=s.createCipher;t.Cipheriv=s.Cipheriv;t.createCipheriv=s.createCipheriv;t.Decipher=s.Decipher;t.createDecipher=s.createDecipher;t.Decipheriv=s.Decipheriv;t.createDecipheriv=s.createDecipheriv;t.getCiphers=s.getCiphers;t.listCiphers=s.listCiphers;var u=e("diffie-hellman");t.DiffieHellmanGroup=u.DiffieHellmanGroup;t.createDiffieHellmanGroup=u.createDiffieHellmanGroup;t.getDiffieHellman=u.getDiffieHellman;t.createDiffieHellman=u.createDiffieHellman;t.DiffieHellman=u.DiffieHellman;var c=e("browserify-sign");t.createSign=c.createSign;t.Sign=c.Sign;t.createVerify=c.createVerify;t.Verify=c.Verify;t.createECDH=e("create-ecdh");var f=e("public-encrypt");t.publicEncrypt=f.publicEncrypt;t.privateEncrypt=f.privateEncrypt;t.publicDecrypt=f.publicDecrypt;t.privateDecrypt=f.privateDecrypt;var l=e("randomfill");t.randomFill=l.randomFill;t.randomFillSync=l.randomFillSync;t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))};t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},{"browserify-cipher":158,"browserify-sign":166,"browserify-sign/algos":163,"create-ecdh":188,"create-hash":189,"create-hmac":191,"diffie-hellman":200,pbkdf2:267,"public-encrypt":274,randombytes:280,randomfill:281}],194:[function(e,r,t){"use strict";t.utils=e("./des/utils");t.Cipher=e("./des/cipher");t.DES=e("./des/des");t.CBC=e("./des/cbc");t.EDE=e("./des/ede")},{"./des/cbc":195,"./des/cipher":196,"./des/des":197,"./des/ede":198,"./des/utils":199}],195:[function(e,r,t){"use strict";var n=e("minimalistic-assert");var o=e("inherits");var a={};function i(e){n.equal(e.length,8,"Invalid IV length");this.iv=new Array(8);for(var r=0;r<this.iv.length;r++)this.iv[r]=e[r]}function s(r){function t(e){r.call(this,e);this._cbcInit()}o(t,r);var e=Object.keys(a);for(var n=0;n<e.length;n++){var i=e[n];t.prototype[i]=a[i]}t.create=function e(r){return new t(r)};return t}t.instantiate=s;a._cbcInit=function e(){var r=new i(this.options.iv);this._cbcState=r};a._update=function e(r,t,n,i){var o=this._cbcState;var a=this.constructor.super_.prototype;var s=o.iv;if(this.type==="encrypt"){for(var u=0;u<this.blockSize;u++)s[u]^=r[t+u];a._update.call(this,s,0,n,i);for(var u=0;u<this.blockSize;u++)s[u]=n[i+u]}else{a._update.call(this,r,t,n,i);for(var u=0;u<this.blockSize;u++)n[i+u]^=s[u];for(var u=0;u<this.blockSize;u++)s[u]=r[t+u]}}},{inherits:256,"minimalistic-assert":260}],196:[function(e,r,t){"use strict";var n=e("minimalistic-assert");function i(e){this.options=e;this.type=this.options.type;this.blockSize=8;this._init();this.buffer=new Array(this.blockSize);this.bufferOff=0}r.exports=i;i.prototype._init=function e(){};i.prototype.update=function e(r){if(r.length===0)return[];if(this.type==="decrypt")return this._updateDecrypt(r);else return this._updateEncrypt(r)};i.prototype._buffer=function e(r,t){var n=Math.min(this.buffer.length-this.bufferOff,r.length-t);for(var i=0;i<n;i++)this.buffer[this.bufferOff+i]=r[t+i];this.bufferOff+=n;return n};i.prototype._flushBuffer=function e(r,t){this._update(this.buffer,0,r,t);this.bufferOff=0;return this.blockSize};i.prototype._updateEncrypt=function e(r){var t=0;var n=0;var i=(this.bufferOff+r.length)/this.blockSize|0;var o=new Array(i*this.blockSize);if(this.bufferOff!==0){t+=this._buffer(r,t);if(this.bufferOff===this.buffer.length)n+=this._flushBuffer(o,n)}var a=r.length-(r.length-t)%this.blockSize;for(;t<a;t+=this.blockSize){this._update(r,t,o,n);n+=this.blockSize}for(;t<r.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=r[t];return o};i.prototype._updateDecrypt=function e(r){var t=0;var n=0;var i=Math.ceil((this.bufferOff+r.length)/this.blockSize)-1;var o=new Array(i*this.blockSize);for(;i>0;i--){t+=this._buffer(r,t);n+=this._flushBuffer(o,n)}t+=this._buffer(r,t);return o};i.prototype.final=function e(r){var t;if(r)t=this.update(r);var n;if(this.type==="encrypt")n=this._finalEncrypt();else n=this._finalDecrypt();if(t)return t.concat(n);else return n};i.prototype._pad=function e(r,t){if(t===0)return false;while(t<r.length)r[t++]=0;return true};i.prototype._finalEncrypt=function e(){if(!this._pad(this.buffer,this.bufferOff))return[];var r=new Array(this.blockSize);this._update(this.buffer,0,r,0);return r};i.prototype._unpad=function e(r){return r};i.prototype._finalDecrypt=function e(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var r=new Array(this.blockSize);this._flushBuffer(r,0);return this._unpad(r)}},{"minimalistic-assert":260}],197:[function(e,r,t){"use strict";var s=e("minimalistic-assert");var n=e("inherits");var p=e("./utils");var i=e("./cipher");function o(){this.tmp=new Array(2);this.keys=null}function a(e){i.call(this,e);var r=new o;this._desState=r;this.deriveKeys(r,e.key)}n(a,i);r.exports=a;a.create=function e(r){return new a(r)};var u=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];a.prototype.deriveKeys=function e(r,t){r.keys=new Array(16*2);s.equal(t.length,this.blockSize,"Invalid key length");var n=p.readUInt32BE(t,0);var i=p.readUInt32BE(t,4);p.pc1(n,i,r.tmp,0);n=r.tmp[0];i=r.tmp[1];for(var o=0;o<r.keys.length;o+=2){var a=u[o>>>1];n=p.r28shl(n,a);i=p.r28shl(i,a);p.pc2(n,i,r.keys,o)}};a.prototype._update=function e(r,t,n,i){var o=this._desState;var a=p.readUInt32BE(r,t);var s=p.readUInt32BE(r,t+4);p.ip(a,s,o.tmp,0);a=o.tmp[0];s=o.tmp[1];if(this.type==="encrypt")this._encrypt(o,a,s,o.tmp,0);else this._decrypt(o,a,s,o.tmp,0);a=o.tmp[0];s=o.tmp[1];p.writeUInt32BE(n,a,i);p.writeUInt32BE(n,s,i+4)};a.prototype._pad=function e(r,t){var n=r.length-t;for(var i=t;i<r.length;i++)r[i]=n;return true};a.prototype._unpad=function e(r){var t=r[r.length-1];for(var n=r.length-t;n<r.length;n++)s.equal(r[n],t);return r.slice(0,r.length-t)};a.prototype._encrypt=function e(r,t,n,i,o){var a=t;var s=n;for(var u=0;u<r.keys.length;u+=2){var c=r.keys[u];var f=r.keys[u+1];p.expand(s,r.tmp,0);c^=r.tmp[0];f^=r.tmp[1];var l=p.substitute(c,f);var h=p.permute(l);var d=s;s=(a^h)>>>0;a=d}p.rip(s,a,i,o)};a.prototype._decrypt=function e(r,t,n,i,o){var a=n;var s=t;for(var u=r.keys.length-2;u>=0;u-=2){var c=r.keys[u];var f=r.keys[u+1];p.expand(a,r.tmp,0);c^=r.tmp[0];f^=r.tmp[1];var l=p.substitute(c,f);var h=p.permute(l);var d=a;a=(s^h)>>>0;s=d}p.rip(a,s,i,o)}},{"./cipher":196,"./utils":199,inherits:256,"minimalistic-assert":260}],198:[function(e,r,t){"use strict";var o=e("minimalistic-assert");var n=e("inherits");var i=e("./cipher");var a=e("./des");function s(e,r){o.equal(r.length,24,"Invalid key length");var t=r.slice(0,8);var n=r.slice(8,16);var i=r.slice(16,24);if(e==="encrypt"){this.ciphers=[a.create({type:"encrypt",key:t}),a.create({type:"decrypt",key:n}),a.create({type:"encrypt",key:i})]}else{this.ciphers=[a.create({type:"decrypt",key:i}),a.create({type:"encrypt",key:n}),a.create({type:"decrypt",key:t})]}}function u(e){i.call(this,e);var r=new s(this.type,this.options.key);this._edeState=r}n(u,i);r.exports=u;u.create=function e(r){return new u(r)};u.prototype._update=function e(r,t,n,i){var o=this._edeState;o.ciphers[0]._update(r,t,n,i);o.ciphers[1]._update(n,i,n,i);o.ciphers[2]._update(n,i,n,i)};u.prototype._pad=a.prototype._pad;u.prototype._unpad=a.prototype._unpad},{"./cipher":196,"./des":197,inherits:256,"minimalistic-assert":260}],199:[function(e,r,t){"use strict";t.readUInt32BE=function e(r,t){var n=r[0+t]<<24|r[1+t]<<16|r[2+t]<<8|r[3+t];return n>>>0};t.writeUInt32BE=function e(r,t,n){r[0+n]=t>>>24;r[1+n]=t>>>16&255;r[2+n]=t>>>8&255;r[3+n]=t&255};t.ip=function e(r,t,n,i){var o=0;var a=0;for(var s=6;s>=0;s-=2){for(var u=0;u<=24;u+=8){o<<=1;o|=t>>>u+s&1}for(var u=0;u<=24;u+=8){o<<=1;o|=r>>>u+s&1}}for(var s=6;s>=0;s-=2){for(var u=1;u<=25;u+=8){a<<=1;a|=t>>>u+s&1}for(var u=1;u<=25;u+=8){a<<=1;a|=r>>>u+s&1}}n[i+0]=o>>>0;n[i+1]=a>>>0};t.rip=function e(r,t,n,i){var o=0;var a=0;for(var s=0;s<4;s++){for(var u=24;u>=0;u-=8){o<<=1;o|=t>>>u+s&1;o<<=1;o|=r>>>u+s&1}}for(var s=4;s<8;s++){for(var u=24;u>=0;u-=8){a<<=1;a|=t>>>u+s&1;a<<=1;a|=r>>>u+s&1}}n[i+0]=o>>>0;n[i+1]=a>>>0};t.pc1=function e(r,t,n,i){var o=0;var a=0;for(var s=7;s>=5;s--){for(var u=0;u<=24;u+=8){o<<=1;o|=t>>u+s&1}for(var u=0;u<=24;u+=8){o<<=1;o|=r>>u+s&1}}for(var u=0;u<=24;u+=8){o<<=1;o|=t>>u+s&1}for(var s=1;s<=3;s++){for(var u=0;u<=24;u+=8){a<<=1;a|=t>>u+s&1}for(var u=0;u<=24;u+=8){a<<=1;a|=r>>u+s&1}}for(var u=0;u<=24;u+=8){a<<=1;a|=r>>u+s&1}n[i+0]=o>>>0;n[i+1]=a>>>0};t.r28shl=function e(r,t){return r<<t&268435455|r>>>28-t};var c=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function e(r,t,n,i){var o=0;var a=0;var s=c.length>>>1;for(var u=0;u<s;u++){o<<=1;o|=r>>>c[u]&1}for(var u=s;u<c.length;u++){a<<=1;a|=t>>>c[u]&1}n[i+0]=o>>>0;n[i+1]=a>>>0};t.expand=function e(r,t,n){var i=0;var o=0;i=(r&1)<<5|r>>>27;for(var a=23;a>=15;a-=4){i<<=6;i|=r>>>a&63}for(var a=11;a>=3;a-=4){o|=r>>>a&63;o<<=6}o|=(r&31)<<1|r>>>31;t[n+0]=i>>>0;t[n+1]=o>>>0};var s=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function e(r,t){var n=0;for(var i=0;i<4;i++){var o=r>>>18-i*6&63;var a=s[i*64+o];n<<=4;n|=a}for(var i=0;i<4;i++){var o=t>>>18-i*6&63;var a=s[4*64+i*64+o];n<<=4;n|=a}return n>>>0};var i=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function e(r){var t=0;for(var n=0;n<i.length;n++){t<<=1;t|=r>>>i[n]&1}return t>>>0};t.padSplit=function e(r,t,n){var i=r.toString(2);while(i.length<t)i="0"+i;var o=[];for(var a=0;a<t;a+=n)o.push(i.slice(a,a+n));return o.join(" ")}},{}],200:[function(r,e,t){(function(u){(function(){var i=r("./lib/generatePrime");var n=r("./lib/primes.json");var o=r("./lib/dh");function e(e){var r=new u(n[e].prime,"hex");var t=new u(n[e].gen,"hex");return new o(r,t)}var a={binary:true,hex:true,base64:true};function s(e,r,t,n){if(u.isBuffer(r)||a[r]===undefined){return s(e,"binary",r,t)}r=r||"binary";n=n||"binary";t=t||new u([2]);if(!u.isBuffer(t)){t=new u(t,n)}if(typeof e==="number"){return new o(i(e,t),t,true)}if(!u.isBuffer(e)){e=new u(e,r)}return new o(e,t,true)}t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=e;t.createDiffieHellman=t.DiffieHellman=s}).call(this)}).call(this,r("buffer").Buffer)},{"./lib/dh":201,"./lib/generatePrime":202,"./lib/primes.json":203,buffer:186}],201:[function(g,m,e){(function(b){(function(){var o=g("bn.js");var e=g("miller-rabin");var a=new e;var s=new o(24);var u=new o(11);var c=new o(10);var f=new o(3);var l=new o(7);var h=g("./generatePrime");var r=g("randombytes");m.exports=p;function n(e,r){r=r||"utf8";if(!b.isBuffer(e)){e=new b(e,r)}this._pub=new o(e);return this}function i(e,r){r=r||"utf8";if(!b.isBuffer(e)){e=new b(e,r)}this._priv=new o(e);return this}var d={};function t(e,r){var t=r.toString("hex");var n=[t,e.toString(16)].join("_");if(n in d){return d[n]}var i=0;if(e.isEven()||!h.simpleSieve||!h.fermatTest(e)||!a.test(e)){i+=1;if(t==="02"||t==="05"){i+=8}else{i+=4}d[n]=i;return i}if(!a.test(e.shrn(1))){i+=2}var o;switch(t){case"02":if(e.mod(s).cmp(u)){i+=8}break;case"05":o=e.mod(c);if(o.cmp(f)&&o.cmp(l)){i+=8}break;default:i+=4}d[n]=i;return i}function p(e,r,t){this.setGenerator(r);this.__prime=new o(e);this._prime=o.mont(this.__prime);this._primeLen=e.length;this._pub=undefined;this._priv=undefined;this._primeCode=undefined;if(t){this.setPublicKey=n;this.setPrivateKey=i}else{this._primeCode=8}}Object.defineProperty(p.prototype,"verifyError",{enumerable:true,get:function(){if(typeof this._primeCode!=="number"){this._primeCode=t(this.__prime,this.__gen)}return this._primeCode}});p.prototype.generateKeys=function(){if(!this._priv){this._priv=new o(r(this._primeLen))}this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed();return this.getPublicKey()};p.prototype.computeSecret=function(e){e=new o(e);e=e.toRed(this._prime);var r=e.redPow(this._priv).fromRed();var t=new b(r.toArray());var n=this.getPrime();if(t.length<n.length){var i=new b(n.length-t.length);i.fill(0);t=b.concat([i,t])}return t};p.prototype.getPublicKey=function e(r){return v(this._pub,r)};p.prototype.getPrivateKey=function e(r){return v(this._priv,r)};p.prototype.getPrime=function(e){return v(this.__prime,e)};p.prototype.getGenerator=function(e){return v(this._gen,e)};p.prototype.setGenerator=function(e,r){r=r||"utf8";if(!b.isBuffer(e)){e=new b(e,r)}this.__gen=e;this._gen=new o(e);return this};function v(e,r){var t=new b(e.toArray());if(!r){return t}else{return t.toString(r)}}}).call(this)}).call(this,g("buffer").Buffer)},{"./generatePrime":202,"bn.js":138,buffer:186,"miller-rabin":259,randombytes:280}],202:[function(e,r,t){var i=e("randombytes");r.exports=A;A.simpleSieve=_;A.fermatTest=S;var o=e("bn.js");var a=new o(24);var n=e("miller-rabin");var s=new n;var u=new o(1);var c=new o(2);var f=new o(5);var l=new o(16);var h=new o(8);var d=new o(10);var p=new o(3);var v=new o(7);var b=new o(11);var g=new o(4);var m=new o(12);var y=null;function w(){if(y!==null)return y;var e=1048576;var r=[];r[0]=2;for(var t=1,n=3;n<e;n+=2){var i=Math.ceil(Math.sqrt(n));for(var o=0;o<t&&r[o]<=i;o++)if(n%r[o]===0)break;if(t!==o&&r[o]<=i)continue;r[t++]=n}y=r;return r}function _(e){var r=w();for(var t=0;t<r.length;t++)if(e.modn(r[t])===0){if(e.cmpn(r[t])===0){return true}else{return false}}return true}function S(e){var r=o.mont(e);return c.toRed(r).redPow(e.subn(1)).fromRed().cmpn(1)===0}function A(e,r){if(e<16){if(r===2||r===5){return new o([140,123])}else{return new o([140,39])}}r=new o(r);var t,n;while(true){t=new o(i(Math.ceil(e/8)));while(t.bitLength()>e){t.ishrn(1)}if(t.isEven()){t.iadd(u)}if(!t.testn(1)){t.iadd(c)}if(!r.cmp(c)){while(t.mod(a).cmp(b)){t.iadd(g)}}else if(!r.cmp(f)){while(t.mod(d).cmp(p)){t.iadd(g)}}n=t.shrn(1);if(_(n)&&_(t)&&S(n)&&S(t)&&s.test(n)&&s.test(t)){return t}}}},{"bn.js":138,"miller-rabin":259,randombytes:280}],203:[function(e,r,t){r.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],204:[function(e,r,t){"use strict";var n=t;n.version=e("../package.json").version;n.utils=e("./elliptic/utils");n.rand=e("brorand");n.curve=e("./elliptic/curve");n.curves=e("./elliptic/curves");n.ec=e("./elliptic/ec");n.eddsa=e("./elliptic/eddsa")},{"../package.json":219,"./elliptic/curve":207,"./elliptic/curves":210,"./elliptic/ec":211,"./elliptic/eddsa":214,"./elliptic/utils":218,brorand:139}],205:[function(e,r,t){"use strict";var n=e("bn.js");var o=e("../utils");var P=o.getNAF;var T=o.getJSF;var d=o.assert;function i(e,r){this.type=e;this.p=new n(r.p,16);this.red=r.prime?n.red(r.prime):n.mont(this.p);this.zero=new n(0).toRed(this.red);this.one=new n(1).toRed(this.red);this.two=new n(2).toRed(this.red);this.n=r.n&&new n(r.n,16);this.g=r.g&&this.pointFromJSON(r.g,r.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 t=this.n&&this.p.div(this.n);if(!t||t.cmpn(100)>0){this.redN=null}else{this._maxwellTrick=true;this.redN=this.n.toRed(this.red)}}r.exports=i;i.prototype.point=function e(){throw new Error("Not implemented")};i.prototype.validate=function e(){throw new Error("Not implemented")};i.prototype._fixedNafMul=function e(r,t){d(r.precomputed);var n=r._getDoubles();var i=P(t,1,this._bitLength);var o=(1<<n.step+1)-(n.step%2===0?2:1);o/=3;var a=[];var s;var u;for(s=0;s<i.length;s+=n.step){u=0;for(var c=s+n.step-1;c>=s;c--)u=(u<<1)+i[c];a.push(u)}var f=this.jpoint(null,null,null);var l=this.jpoint(null,null,null);for(var h=o;h>0;h--){for(s=0;s<a.length;s++){u=a[s];if(u===h)l=l.mixedAdd(n.points[s]);else if(u===-h)l=l.mixedAdd(n.points[s].neg())}f=f.add(l)}return f.toP()};i.prototype._wnafMul=function e(r,t){var n=4;var i=r._getNAFPoints(n);n=i.wnd;var o=i.points;var a=P(t,n,this._bitLength);var s=this.jpoint(null,null,null);for(var u=a.length-1;u>=0;u--){for(var c=0;u>=0&&a[u]===0;u--)c++;if(u>=0)c++;s=s.dblp(c);if(u<0)break;var f=a[u];d(f!==0);if(r.type==="affine"){if(f>0)s=s.mixedAdd(o[f-1>>1]);else s=s.mixedAdd(o[-f-1>>1].neg())}else{if(f>0)s=s.add(o[f-1>>1]);else s=s.add(o[-f-1>>1].neg())}}return r.type==="affine"?s.toP():s};i.prototype._wnafMulAdd=function e(r,t,n,i,o){var a=this._wnafT1;var s=this._wnafT2;var u=this._wnafT3;var c=0;var f;var l;var h;for(f=0;f<i;f++){h=t[f];var d=h._getNAFPoints(r);a[f]=d.wnd;s[f]=d.points}for(f=i-1;f>=1;f-=2){var p=f-1;var v=f;if(a[p]!==1||a[v]!==1){u[p]=P(n[p],a[p],this._bitLength);u[v]=P(n[v],a[v],this._bitLength);c=Math.max(u[p].length,c);c=Math.max(u[v].length,c);continue}var b=[t[p],null,null,t[v]];if(t[p].y.cmp(t[v].y)===0){b[1]=t[p].add(t[v]);b[2]=t[p].toJ().mixedAdd(t[v].neg())}else if(t[p].y.cmp(t[v].y.redNeg())===0){b[1]=t[p].toJ().mixedAdd(t[v]);b[2]=t[p].add(t[v].neg())}else{b[1]=t[p].toJ().mixedAdd(t[v]);b[2]=t[p].toJ().mixedAdd(t[v].neg())}var g=[-3,-1,-5,-7,0,7,5,1,3];var m=T(n[p],n[v]);c=Math.max(m[0].length,c);u[p]=new Array(c);u[v]=new Array(c);for(l=0;l<c;l++){var y=m[0][l]|0;var w=m[1][l]|0;u[p][l]=g[(y+1)*3+(w+1)];u[v][l]=0;s[p]=b}}var _=this.jpoint(null,null,null);var S=this._wnafT4;for(f=c;f>=0;f--){var A=0;while(f>=0){var E=true;for(l=0;l<i;l++){S[l]=u[l][f]|0;if(S[l]!==0)E=false}if(!E)break;A++;f--}if(f>=0)A++;_=_.dblp(A);if(f<0)break;for(l=0;l<i;l++){var M=S[l];h;if(M===0)continue;else if(M>0)h=s[l][M-1>>1];else if(M<0)h=s[l][-M-1>>1].neg();if(h.type==="affine")_=_.mixedAdd(h);else _=_.add(h)}}for(f=0;f<i;f++)s[f]=null;if(o)return _;else return _.toP()};function a(e,r){this.curve=e;this.type=r;this.precomputed=null}i.BasePoint=a;a.prototype.eq=function e(){throw new Error("Not implemented")};a.prototype.validate=function e(){return this.curve.validate(this)};i.prototype.decodePoint=function e(r,t){r=o.toArray(r,t);var n=this.p.byteLength();if((r[0]===4||r[0]===6||r[0]===7)&&r.length-1===2*n){if(r[0]===6)d(r[r.length-1]%2===0);else if(r[0]===7)d(r[r.length-1]%2===1);var i=this.point(r.slice(1,1+n),r.slice(1+n,1+2*n));return i}else if((r[0]===2||r[0]===3)&&r.length-1===n){return this.pointFromX(r.slice(1,1+n),r[0]===3)}throw new Error("Unknown point format")};a.prototype.encodeCompressed=function e(r){return this.encode(r,true)};a.prototype._encode=function e(r){var t=this.curve.p.byteLength();var n=this.getX().toArray("be",t);if(r)return[this.getY().isEven()?2:3].concat(n);return[4].concat(n,this.getY().toArray("be",t))};a.prototype.encode=function e(r,t){return o.encode(this._encode(t),r)};a.prototype.precompute=function e(r){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};t.naf=this._getNAFPoints(8);t.doubles=this._getDoubles(4,r);t.beta=this._getBeta();this.precomputed=t;return this};a.prototype._hasDoubles=function e(r){if(!this.precomputed)return false;var t=this.precomputed.doubles;if(!t)return false;return t.points.length>=Math.ceil((r.bitLength()+1)/t.step)};a.prototype._getDoubles=function e(r,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;var n=[this];var i=this;for(var o=0;o<t;o+=r){for(var a=0;a<r;a++)i=i.dbl();n.push(i)}return{step:r,points:n}};a.prototype._getNAFPoints=function e(r){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;var t=[this];var n=(1<<r)-1;var i=n===1?null:this.dbl();for(var o=1;o<n;o++)t[o]=t[o-1].add(i);return{wnd:r,points:t}};a.prototype._getBeta=function e(){return null};a.prototype.dblp=function e(r){var t=this;for(var n=0;n<r;n++)t=t.dbl();return t}},{"../utils":218,"bn.js":138}],206:[function(e,r,t){"use strict";var n=e("../utils");var c=e("bn.js");var i=e("inherits");var o=e("./base");var a=n.assert;function s(e){this.twisted=(e.a|0)!==1;this.mOneA=this.twisted&&(e.a|0)===-1;this.extended=this.mOneA;o.call(this,"edwards",e);this.a=new c(e.a,16).umod(this.red.m);this.a=this.a.toRed(this.red);this.c=new c(e.c,16).toRed(this.red);this.c2=this.c.redSqr();this.d=new c(e.d,16).toRed(this.red);this.dd=this.d.redAdd(this.d);a(!this.twisted||this.c.fromRed().cmpn(1)===0);this.oneC=(e.c|0)===1}i(s,o);r.exports=s;s.prototype._mulA=function e(r){if(this.mOneA)return r.redNeg();else return this.a.redMul(r)};s.prototype._mulC=function e(r){if(this.oneC)return r;else return this.c.redMul(r)};s.prototype.jpoint=function e(r,t,n,i){return this.point(r,t,n,i)};s.prototype.pointFromX=function e(r,t){r=new c(r,16);if(!r.red)r=r.toRed(this.red);var n=r.redSqr();var i=this.c2.redSub(this.a.redMul(n));var o=this.one.redSub(this.c2.redMul(this.d).redMul(n));var a=i.redMul(o.redInvm());var s=a.redSqrt();if(s.redSqr().redSub(a).cmp(this.zero)!==0)throw new Error("invalid point");var u=s.fromRed().isOdd();if(t&&!u||!t&&u)s=s.redNeg();return this.point(r,s)};s.prototype.pointFromY=function e(r,t){r=new c(r,16);if(!r.red)r=r.toRed(this.red);var n=r.redSqr();var i=n.redSub(this.c2);var o=n.redMul(this.d).redMul(this.c2).redSub(this.a);var a=i.redMul(o.redInvm());if(a.cmp(this.zero)===0){if(t)throw new Error("invalid point");else return this.point(this.zero,r)}var s=a.redSqrt();if(s.redSqr().redSub(a).cmp(this.zero)!==0)throw new Error("invalid point");if(s.fromRed().isOdd()!==t)s=s.redNeg();return this.point(s,r)};s.prototype.validate=function e(r){if(r.isInfinity())return true;r.normalize();var t=r.x.redSqr();var n=r.y.redSqr();var i=t.redMul(this.a).redAdd(n);var o=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));return i.cmp(o)===0};function u(e,r,t,n,i){o.BasePoint.call(this,e,"projective");if(r===null&&t===null&&n===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 c(r,16);this.y=new c(t,16);this.z=n?new c(n,16):this.curve.one;this.t=i&&new c(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);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())}}}i(u,o.BasePoint);s.prototype.pointFromJSON=function e(r){return u.fromJSON(this,r)};s.prototype.point=function e(r,t,n,i){return new u(this,r,t,n,i)};u.fromJSON=function e(r,t){return new u(r,t[0],t[1],t[2])};u.prototype.inspect=function e(){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)+">"};u.prototype.isInfinity=function e(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};u.prototype._extDbl=function e(){var r=this.x.redSqr();var t=this.y.redSqr();var n=this.z.redSqr();n=n.redIAdd(n);var i=this.curve._mulA(r);var o=this.x.redAdd(this.y).redSqr().redISub(r).redISub(t);var a=i.redAdd(t);var s=a.redSub(n);var u=i.redSub(t);var c=o.redMul(s);var f=a.redMul(u);var l=o.redMul(u);var h=s.redMul(a);return this.curve.point(c,f,h,l)};u.prototype._projDbl=function e(){var r=this.x.redAdd(this.y).redSqr();var t=this.x.redSqr();var n=this.y.redSqr();var i;var o;var a;var s;var u;var c;if(this.curve.twisted){s=this.curve._mulA(t);var f=s.redAdd(n);if(this.zOne){i=r.redSub(t).redSub(n).redMul(f.redSub(this.curve.two));o=f.redMul(s.redSub(n));a=f.redSqr().redSub(f).redSub(f)}else{u=this.z.redSqr();c=f.redSub(u).redISub(u);i=r.redSub(t).redISub(n).redMul(c);o=f.redMul(s.redSub(n));a=f.redMul(c)}}else{s=t.redAdd(n);u=this.curve._mulC(this.z).redSqr();c=s.redSub(u).redSub(u);i=this.curve._mulC(r.redISub(s)).redMul(c);o=this.curve._mulC(s).redMul(t.redISub(n));a=s.redMul(c)}return this.curve.point(i,o,a)};u.prototype.dbl=function e(){if(this.isInfinity())return this;if(this.curve.extended)return this._extDbl();else return this._projDbl()};u.prototype._extAdd=function e(r){var t=this.y.redSub(this.x).redMul(r.y.redSub(r.x));var n=this.y.redAdd(this.x).redMul(r.y.redAdd(r.x));var i=this.t.redMul(this.curve.dd).redMul(r.t);var o=this.z.redMul(r.z.redAdd(r.z));var a=n.redSub(t);var s=o.redSub(i);var u=o.redAdd(i);var c=n.redAdd(t);var f=a.redMul(s);var l=u.redMul(c);var h=a.redMul(c);var d=s.redMul(u);return this.curve.point(f,l,d,h)};u.prototype._projAdd=function e(r){var t=this.z.redMul(r.z);var n=t.redSqr();var i=this.x.redMul(r.x);var o=this.y.redMul(r.y);var a=this.curve.d.redMul(i).redMul(o);var s=n.redSub(a);var u=n.redAdd(a);var c=this.x.redAdd(this.y).redMul(r.x.redAdd(r.y)).redISub(i).redISub(o);var f=t.redMul(s).redMul(c);var l;var h;if(this.curve.twisted){l=t.redMul(u).redMul(o.redSub(this.curve._mulA(i)));h=s.redMul(u)}else{l=t.redMul(u).redMul(o.redSub(i));h=this.curve._mulC(s).redMul(u)}return this.curve.point(f,l,h)};u.prototype.add=function e(r){if(this.isInfinity())return r;if(r.isInfinity())return this;if(this.curve.extended)return this._extAdd(r);else return this._projAdd(r)};u.prototype.mul=function e(r){if(this._hasDoubles(r))return this.curve._fixedNafMul(this,r);else return this.curve._wnafMul(this,r)};u.prototype.mulAdd=function e(r,t,n){return this.curve._wnafMulAdd(1,[this,t],[r,n],2,false)};u.prototype.jmulAdd=function e(r,t,n){return this.curve._wnafMulAdd(1,[this,t],[r,n],2,true)};u.prototype.normalize=function e(){if(this.zOne)return this;var r=this.z.redInvm();this.x=this.x.redMul(r);this.y=this.y.redMul(r);if(this.t)this.t=this.t.redMul(r);this.z=this.curve.one;this.zOne=true;return this};u.prototype.neg=function e(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};u.prototype.getX=function e(){this.normalize();return this.x.fromRed()};u.prototype.getY=function e(){this.normalize();return this.y.fromRed()};u.prototype.eq=function e(r){return this===r||this.getX().cmp(r.getX())===0&&this.getY().cmp(r.getY())===0};u.prototype.eqXToP=function e(r){var t=r.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(t)===0)return true;var n=r.clone();var i=this.curve.redN.redMul(this.z);for(;;){n.iadd(this.curve.n);if(n.cmp(this.curve.p)>=0)return false;t.redIAdd(i);if(this.x.cmp(t)===0)return true}};u.prototype.toP=u.prototype.normalize;u.prototype.mixedAdd=u.prototype.add},{"../utils":218,"./base":205,"bn.js":138,inherits:256}],207:[function(e,r,t){"use strict";var n=t;n.base=e("./base");n.short=e("./short");n.mont=e("./mont");n.edwards=e("./edwards")},{"./base":205,"./edwards":206,"./mont":208,"./short":209}],208:[function(e,r,t){"use strict";var n=e("bn.js");var i=e("inherits");var o=e("./base");var a=e("../utils");function s(e){o.call(this,"mont",e);this.a=new n(e.a,16).toRed(this.red);this.b=new n(e.b,16).toRed(this.red);this.i4=new n(4).toRed(this.red).redInvm();this.two=new n(2).toRed(this.red);this.a24=this.i4.redMul(this.a.redAdd(this.two))}i(s,o);r.exports=s;s.prototype.validate=function e(r){var t=r.normalize().x;var n=t.redSqr();var i=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);var o=i.redSqrt();return o.redSqr().cmp(i)===0};function u(e,r,t){o.BasePoint.call(this,e,"projective");if(r===null&&t===null){this.x=this.curve.one;this.z=this.curve.zero}else{this.x=new n(r,16);this.z=new n(t,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)}}i(u,o.BasePoint);s.prototype.decodePoint=function e(r,t){return this.point(a.toArray(r,t),1)};s.prototype.point=function e(r,t){return new u(this,r,t)};s.prototype.pointFromJSON=function e(r){return u.fromJSON(this,r)};u.prototype.precompute=function e(){};u.prototype._encode=function e(){return this.getX().toArray("be",this.curve.p.byteLength())};u.fromJSON=function e(r,t){return new u(r,t[0],t[1]||r.one)};u.prototype.inspect=function e(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};u.prototype.isInfinity=function e(){return this.z.cmpn(0)===0};u.prototype.dbl=function e(){var r=this.x.redAdd(this.z);var t=r.redSqr();var n=this.x.redSub(this.z);var i=n.redSqr();var o=t.redSub(i);var a=t.redMul(i);var s=o.redMul(i.redAdd(this.curve.a24.redMul(o)));return this.curve.point(a,s)};u.prototype.add=function e(){throw new Error("Not supported on Montgomery curve")};u.prototype.diffAdd=function e(r,t){var n=this.x.redAdd(this.z);var i=this.x.redSub(this.z);var o=r.x.redAdd(r.z);var a=r.x.redSub(r.z);var s=a.redMul(n);var u=o.redMul(i);var c=t.z.redMul(s.redAdd(u).redSqr());var f=t.x.redMul(s.redISub(u).redSqr());return this.curve.point(c,f)};u.prototype.mul=function e(r){var t=r.clone();var n=this;var i=this.curve.point(null,null);var o=this;for(var a=[];t.cmpn(0)!==0;t.iushrn(1))a.push(t.andln(1));for(var s=a.length-1;s>=0;s--){if(a[s]===0){n=n.diffAdd(i,o);i=i.dbl()}else{i=n.diffAdd(i,o);n=n.dbl()}}return i};u.prototype.mulAdd=function e(){throw new Error("Not supported on Montgomery curve")};u.prototype.jumlAdd=function e(){throw new Error("Not supported on Montgomery curve")};u.prototype.eq=function e(r){return this.getX().cmp(r.getX())===0};u.prototype.normalize=function e(){this.x=this.x.redMul(this.z.redInvm());this.z=this.curve.one;return this};u.prototype.getX=function e(){this.normalize();return this.x.fromRed()}},{"../utils":218,"./base":205,"bn.js":138,inherits:256}],209:[function(e,r,t){"use strict";var n=e("../utils");var A=e("bn.js");var i=e("inherits");var o=e("./base");var s=n.assert;function a(e){o.call(this,"short",e);this.a=new A(e.a,16).toRed(this.red);this.b=new A(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)}i(a,o);r.exports=a;a.prototype._getEndomorphism=function e(r){if(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)return;var t;var n;if(r.beta){t=new A(r.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(r.lambda){n=new A(r.lambda,16)}else{var o=this._getEndoRoots(this.n);if(this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))===0){n=o[0]}else{n=o[1];s(this.g.mul(n).x.cmp(this.g.x.redMul(t))===0)}}var a;if(r.basis){a=r.basis.map(function(e){return{a:new A(e.a,16),b:new A(e.b,16)}})}else{a=this._getEndoBasis(n)}return{beta:t,lambda:n,basis:a}};a.prototype._getEndoRoots=function e(r){var t=r===this.p?this.red:A.mont(r);var n=new A(2).toRed(t).redInvm();var i=n.redNeg();var o=new A(3).toRed(t).redNeg().redSqrt().redMul(n);var a=i.redAdd(o).fromRed();var s=i.redSub(o).fromRed();return[a,s]};a.prototype._getEndoBasis=function e(r){var t=this.n.ushrn(Math.floor(this.n.bitLength()/2));var n=r;var i=this.n.clone();var o=new A(1);var a=new A(0);var s=new A(0);var u=new A(1);var c;var f;var l;var h;var d;var p;var v;var b=0;var g;var m;while(n.cmpn(0)!==0){var y=i.div(n);g=i.sub(y.mul(n));m=s.sub(y.mul(o));var w=u.sub(y.mul(a));if(!l&&g.cmp(t)<0){c=v.neg();f=o;l=g.neg();h=m}else if(l&&++b===2){break}v=g;i=n;n=g;s=o;o=m;u=a;a=w}d=g.neg();p=m;var _=l.sqr().add(h.sqr());var S=d.sqr().add(p.sqr());if(S.cmp(_)>=0){d=c;p=f}if(l.negative){l=l.neg();h=h.neg()}if(d.negative){d=d.neg();p=p.neg()}return[{a:l,b:h},{a:d,b:p}]};a.prototype._endoSplit=function e(r){var t=this.endo.basis;var n=t[0];var i=t[1];var o=i.b.mul(r).divRound(this.n);var a=n.b.neg().mul(r).divRound(this.n);var s=o.mul(n.a);var u=a.mul(i.a);var c=o.mul(n.b);var f=a.mul(i.b);var l=r.sub(s).sub(u);var h=c.add(f).neg();return{k1:l,k2:h}};a.prototype.pointFromX=function e(r,t){r=new A(r,16);if(!r.red)r=r.toRed(this.red);var n=r.redSqr().redMul(r).redIAdd(r.redMul(this.a)).redIAdd(this.b);var i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var o=i.fromRed().isOdd();if(t&&!o||!t&&o)i=i.redNeg();return this.point(r,i)};a.prototype.validate=function e(r){if(r.inf)return true;var t=r.x;var n=r.y;var i=this.a.redMul(t);var o=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(o).cmpn(0)===0};a.prototype._endoWnafMulAdd=function e(r,t,n){var i=this._endoWnafT1;var o=this._endoWnafT2;for(var a=0;a<r.length;a++){var s=this._endoSplit(t[a]);var u=r[a];var c=u._getBeta();if(s.k1.negative){s.k1.ineg();u=u.neg(true)}if(s.k2.negative){s.k2.ineg();c=c.neg(true)}i[a*2]=u;i[a*2+1]=c;o[a*2]=s.k1;o[a*2+1]=s.k2}var f=this._wnafMulAdd(1,i,o,a*2,n);for(var l=0;l<a*2;l++){i[l]=null;o[l]=null}return f};function u(e,r,t,n){o.BasePoint.call(this,e,"affine");if(r===null&&t===null){this.x=null;this.y=null;this.inf=true}else{this.x=new A(r,16);this.y=new A(t,16);if(n){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}}i(u,o.BasePoint);a.prototype.point=function e(r,t,n){return new u(this,r,t,n)};a.prototype.pointFromJSON=function e(r,t){return u.fromJSON(this,r,t)};u.prototype._getBeta=function e(){if(!this.curve.endo)return;var r=this.precomputed;if(r&&r.beta)return r.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(r){var n=this.curve;var i=function(e){return n.point(e.x.redMul(n.endo.beta),e.y)};r.beta=t;t.precomputed={beta:null,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};u.prototype.toJSON=function e(){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)}}]};u.fromJSON=function e(r,t,n){if(typeof t==="string")t=JSON.parse(t);var i=r.point(t[0],t[1],n);if(!t[2])return i;function o(e){return r.point(e[0],e[1],n)}var a=t[2];i.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[i].concat(a.doubles.points.map(o))},naf:a.naf&&{wnd:a.naf.wnd,points:[i].concat(a.naf.points.map(o))}};return i};u.prototype.inspect=function e(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"};u.prototype.isInfinity=function e(){return this.inf};u.prototype.add=function e(r){if(this.inf)return r;if(r.inf)return this;if(this.eq(r))return this.dbl();if(this.neg().eq(r))return this.curve.point(null,null);if(this.x.cmp(r.x)===0)return this.curve.point(null,null);var t=this.y.redSub(r.y);if(t.cmpn(0)!==0)t=t.redMul(this.x.redSub(r.x).redInvm());var n=t.redSqr().redISub(this.x).redISub(r.x);var i=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};u.prototype.dbl=function e(){if(this.inf)return this;var r=this.y.redAdd(this.y);if(r.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a;var n=this.x.redSqr();var i=r.redInvm();var o=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(i);var a=o.redSqr().redISub(this.x.redAdd(this.x));var s=o.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s)};u.prototype.getX=function e(){return this.x.fromRed()};u.prototype.getY=function e(){return this.y.fromRed()};u.prototype.mul=function e(r){r=new A(r,16);if(this.isInfinity())return this;else if(this._hasDoubles(r))return this.curve._fixedNafMul(this,r);else if(this.curve.endo)return this.curve._endoWnafMulAdd([this],[r]);else return this.curve._wnafMul(this,r)};u.prototype.mulAdd=function e(r,t,n){var i=[this,t];var o=[r,n];if(this.curve.endo)return this.curve._endoWnafMulAdd(i,o);else return this.curve._wnafMulAdd(1,i,o,2)};u.prototype.jmulAdd=function e(r,t,n){var i=[this,t];var o=[r,n];if(this.curve.endo)return this.curve._endoWnafMulAdd(i,o,true);else return this.curve._wnafMulAdd(1,i,o,2,true)};u.prototype.eq=function e(r){return this===r||this.inf===r.inf&&(this.inf||this.x.cmp(r.x)===0&&this.y.cmp(r.y)===0)};u.prototype.neg=function e(r){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(r&&this.precomputed){var n=this.precomputed;var i=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return t};u.prototype.toJ=function e(){if(this.inf)return this.curve.jpoint(null,null,null);var r=this.curve.jpoint(this.x,this.y,this.curve.one);return r};function c(e,r,t,n){o.BasePoint.call(this,e,"jacobian");if(r===null&&t===null&&n===null){this.x=this.curve.one;this.y=this.curve.one;this.z=new A(0)}else{this.x=new A(r,16);this.y=new A(t,16);this.z=new A(n,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}i(c,o.BasePoint);a.prototype.jpoint=function e(r,t,n){return new c(this,r,t,n)};c.prototype.toP=function e(){if(this.isInfinity())return this.curve.point(null,null);var r=this.z.redInvm();var t=r.redSqr();var n=this.x.redMul(t);var i=this.y.redMul(t).redMul(r);return this.curve.point(n,i)};c.prototype.neg=function e(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};c.prototype.add=function e(r){if(this.isInfinity())return r;if(r.isInfinity())return this;var t=r.z.redSqr();var n=this.z.redSqr();var i=this.x.redMul(t);var o=r.x.redMul(n);var a=this.y.redMul(t.redMul(r.z));var s=r.y.redMul(n.redMul(this.z));var u=i.redSub(o);var c=a.redSub(s);if(u.cmpn(0)===0){if(c.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl()}var f=u.redSqr();var l=f.redMul(u);var h=i.redMul(f);var d=c.redSqr().redIAdd(l).redISub(h).redISub(h);var p=c.redMul(h.redISub(d)).redISub(a.redMul(l));var v=this.z.redMul(r.z).redMul(u);return this.curve.jpoint(d,p,v)};c.prototype.mixedAdd=function e(r){if(this.isInfinity())return r.toJ();if(r.isInfinity())return this;var t=this.z.redSqr();var n=this.x;var i=r.x.redMul(t);var o=this.y;var a=r.y.redMul(t).redMul(this.z);var s=n.redSub(i);var u=o.redSub(a);if(s.cmpn(0)===0){if(u.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl()}var c=s.redSqr();var f=c.redMul(s);var l=n.redMul(c);var h=u.redSqr().redIAdd(f).redISub(l).redISub(l);var d=u.redMul(l.redISub(h)).redISub(o.redMul(f));var p=this.z.redMul(s);return this.curve.jpoint(h,d,p)};c.prototype.dblp=function e(r){if(r===0)return this;if(this.isInfinity())return this;if(!r)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t<r;t++)n=n.dbl();return n}var i=this.curve.a;var o=this.curve.tinv;var a=this.x;var s=this.y;var u=this.z;var c=u.redSqr().redSqr();var f=s.redAdd(s);for(t=0;t<r;t++){var l=a.redSqr();var h=f.redSqr();var d=h.redSqr();var p=l.redAdd(l).redIAdd(l).redIAdd(i.redMul(c));var v=a.redMul(h);var b=p.redSqr().redISub(v.redAdd(v));var g=v.redISub(b);var m=p.redMul(g);m=m.redIAdd(m).redISub(d);var y=f.redMul(u);if(t+1<r)c=c.redMul(d);a=b;u=y;f=m}return this.curve.jpoint(a,f.redMul(o),u)};c.prototype.dbl=function e(){if(this.isInfinity())return this;if(this.curve.zeroA)return this._zeroDbl();else if(this.curve.threeA)return this._threeDbl();else return this._dbl()};c.prototype._zeroDbl=function e(){var r;var t;var n;if(this.zOne){var i=this.x.redSqr();var o=this.y.redSqr();var a=o.redSqr();var s=this.x.redAdd(o).redSqr().redISub(i).redISub(a);s=s.redIAdd(s);var u=i.redAdd(i).redIAdd(i);var c=u.redSqr().redISub(s).redISub(s);var f=a.redIAdd(a);f=f.redIAdd(f);f=f.redIAdd(f);r=c;t=u.redMul(s.redISub(c)).redISub(f);n=this.y.redAdd(this.y)}else{var l=this.x.redSqr();var h=this.y.redSqr();var d=h.redSqr();var p=this.x.redAdd(h).redSqr().redISub(l).redISub(d);p=p.redIAdd(p);var v=l.redAdd(l).redIAdd(l);var b=v.redSqr();var g=d.redIAdd(d);g=g.redIAdd(g);g=g.redIAdd(g);r=b.redISub(p).redISub(p);t=v.redMul(p.redISub(r)).redISub(g);n=this.y.redMul(this.z);n=n.redIAdd(n)}return this.curve.jpoint(r,t,n)};c.prototype._threeDbl=function e(){var r;var t;var n;if(this.zOne){var i=this.x.redSqr();var o=this.y.redSqr();var a=o.redSqr();var s=this.x.redAdd(o).redSqr().redISub(i).redISub(a);s=s.redIAdd(s);var u=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a);var c=u.redSqr().redISub(s).redISub(s);r=c;var f=a.redIAdd(a);f=f.redIAdd(f);f=f.redIAdd(f);t=u.redMul(s.redISub(c)).redISub(f);n=this.y.redAdd(this.y)}else{var l=this.z.redSqr();var h=this.y.redSqr();var d=this.x.redMul(h);var p=this.x.redSub(l).redMul(this.x.redAdd(l));p=p.redAdd(p).redIAdd(p);var v=d.redIAdd(d);v=v.redIAdd(v);var b=v.redAdd(v);r=p.redSqr().redISub(b);n=this.y.redAdd(this.z).redSqr().redISub(h).redISub(l);var g=h.redSqr();g=g.redIAdd(g);g=g.redIAdd(g);g=g.redIAdd(g);t=p.redMul(v.redISub(r)).redISub(g)}return this.curve.jpoint(r,t,n)};c.prototype._dbl=function e(){var r=this.curve.a;var t=this.x;var n=this.y;var i=this.z;var o=i.redSqr().redSqr();var a=t.redSqr();var s=n.redSqr();var u=a.redAdd(a).redIAdd(a).redIAdd(r.redMul(o));var c=t.redAdd(t);c=c.redIAdd(c);var f=c.redMul(s);var l=u.redSqr().redISub(f.redAdd(f));var h=f.redISub(l);var d=s.redSqr();d=d.redIAdd(d);d=d.redIAdd(d);d=d.redIAdd(d);var p=u.redMul(h).redISub(d);var v=n.redAdd(n).redMul(i);return this.curve.jpoint(l,p,v)};c.prototype.trpl=function e(){if(!this.curve.zeroA)return this.dbl().add(this);var r=this.x.redSqr();var t=this.y.redSqr();var n=this.z.redSqr();var i=t.redSqr();var o=r.redAdd(r).redIAdd(r);var a=o.redSqr();var s=this.x.redAdd(t).redSqr().redISub(r).redISub(i);s=s.redIAdd(s);s=s.redAdd(s).redIAdd(s);s=s.redISub(a);var u=s.redSqr();var c=i.redIAdd(i);c=c.redIAdd(c);c=c.redIAdd(c);c=c.redIAdd(c);var f=o.redIAdd(s).redSqr().redISub(a).redISub(u).redISub(c);var l=t.redMul(f);l=l.redIAdd(l);l=l.redIAdd(l);var h=this.x.redMul(u).redISub(l);h=h.redIAdd(h);h=h.redIAdd(h);var d=this.y.redMul(f.redMul(c.redISub(f)).redISub(s.redMul(u)));d=d.redIAdd(d);d=d.redIAdd(d);d=d.redIAdd(d);var p=this.z.redAdd(s).redSqr().redISub(n).redISub(u);return this.curve.jpoint(h,d,p)};c.prototype.mul=function e(r,t){r=new A(r,t);return this.curve._wnafMul(this,r)};c.prototype.eq=function e(r){if(r.type==="affine")return this.eq(r.toJ());if(this===r)return true;var t=this.z.redSqr();var n=r.z.redSqr();if(this.x.redMul(n).redISub(r.x.redMul(t)).cmpn(0)!==0)return false;var i=t.redMul(this.z);var o=n.redMul(r.z);return this.y.redMul(o).redISub(r.y.redMul(i)).cmpn(0)===0};c.prototype.eqXToP=function e(r){var t=this.z.redSqr();var n=r.toRed(this.curve.red).redMul(t);if(this.x.cmp(n)===0)return true;var i=r.clone();var o=this.curve.redN.redMul(t);for(;;){i.iadd(this.curve.n);if(i.cmp(this.curve.p)>=0)return false;n.redIAdd(o);if(this.x.cmp(n)===0)return true}};c.prototype.inspect=function e(){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)+">"};c.prototype.isInfinity=function e(){return this.z.cmpn(0)===0}},{"../utils":218,"./base":205,"bn.js":138,inherits:256}],210:[function(e,r,t){"use strict";var n=t;var i=e("hash.js");var o=e("./curve");var a=e("./utils");var s=a.assert;function u(e){if(e.type==="short")this.curve=new o.short(e);else if(e.type==="edwards")this.curve=new o.edwards(e);else this.curve=new o.mont(e);this.g=this.curve.g;this.n=this.curve.n;this.hash=e.hash;s(this.g.validate(),"Invalid curve");s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}n.PresetCurve=u;function c(r,t){Object.defineProperty(n,r,{configurable:true,enumerable:true,get:function(){var e=new u(t);Object.defineProperty(n,r,{configurable:true,enumerable:true,value:e});return e}})}c("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:i.sha256,gRed:false,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]});c("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:i.sha256,gRed:false,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]});c("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:i.sha256,gRed:false,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]});c("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:i.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"]});c("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:i.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"]});c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:false,g:["9"]});c("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:i.sha256,gRed:false,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var f;try{f=e("./precomputed/secp256k1")}catch(e){f=undefined}c("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:i.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:false,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",f]})},{"./curve":207,"./precomputed/secp256k1":217,"./utils":218,"hash.js":242}],211:[function(e,r,t){"use strict";var g=e("bn.js");var m=e("hmac-drbg");var n=e("../utils");var i=e("../curves");var a=e("brorand");var d=n.assert;var o=e("./key");var y=e("./signature");function s(e){if(!(this instanceof s))return new s(e);if(typeof e==="string"){d(Object.prototype.hasOwnProperty.call(i,e),"Unknown curve "+e);e=i[e]}if(e instanceof i.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}r.exports=s;s.prototype.keyPair=function e(r){return new o(this,r)};s.prototype.keyFromPrivate=function e(r,t){return o.fromPrivate(this,r,t)};s.prototype.keyFromPublic=function e(r,t){return o.fromPublic(this,r,t)};s.prototype.genKeyPair=function e(r){if(!r)r={};var t=new m({hash:this.hash,pers:r.pers,persEnc:r.persEnc||"utf8",entropy:r.entropy||a(this.hash.hmacStrength),entropyEnc:r.entropy&&r.entropyEnc||"utf8",nonce:this.n.toArray()});var n=this.n.byteLength();var i=this.n.sub(new g(2));for(;;){var o=new g(t.generate(n));if(o.cmp(i)>0)continue;o.iaddn(1);return this.keyFromPrivate(o)}};s.prototype._truncateToN=function e(r,t){var n=r.byteLength()*8-this.n.bitLength();if(n>0)r=r.ushrn(n);if(!t&&r.cmp(this.n)>=0)return r.sub(this.n);else return r};s.prototype.sign=function e(r,t,n,i){if(typeof n==="object"){i=n;n=null}if(!i)i={};t=this.keyFromPrivate(t,n);r=this._truncateToN(new g(r,16));var o=this.n.byteLength();var a=t.getPrivate().toArray("be",o);var s=r.toArray("be",o);var u=new m({hash:this.hash,entropy:a,nonce:s,pers:i.pers,persEnc:i.persEnc||"utf8"});var c=this.n.sub(new g(1));for(var f=0;;f++){var l=i.k?i.k(f):new g(u.generate(this.n.byteLength()));l=this._truncateToN(l,true);if(l.cmpn(1)<=0||l.cmp(c)>=0)continue;var h=this.g.mul(l);if(h.isInfinity())continue;var d=h.getX();var p=d.umod(this.n);if(p.cmpn(0)===0)continue;var v=l.invm(this.n).mul(p.mul(t.getPrivate()).iadd(r));v=v.umod(this.n);if(v.cmpn(0)===0)continue;var b=(h.getY().isOdd()?1:0)|(d.cmp(p)!==0?2:0);if(i.canonical&&v.cmp(this.nh)>0){v=this.n.sub(v);b^=1}return new y({r:p,s:v,recoveryParam:b})}};s.prototype.verify=function e(r,t,n,i){r=this._truncateToN(new g(r,16));n=this.keyFromPublic(n,i);t=new y(t,"hex");var o=t.r;var a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return false;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return false;var s=a.invm(this.n);var u=s.mul(r).umod(this.n);var c=s.mul(o).umod(this.n);var f;if(!this.curve._maxwellTrick){f=this.g.mulAdd(u,n.getPublic(),c);if(f.isInfinity())return false;return f.getX().umod(this.n).cmp(o)===0}f=this.g.jmulAdd(u,n.getPublic(),c);if(f.isInfinity())return false;return f.eqXToP(o)};s.prototype.recoverPubKey=function(e,r,t,n){d((3&t)===t,"The recovery param is more than two bits");r=new y(r,n);var i=this.n;var o=new g(e);var a=r.r;var s=r.s;var u=t&1;var c=t>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");if(c)a=this.curve.pointFromX(a.add(this.curve.n),u);else a=this.curve.pointFromX(a,u);var f=r.r.invm(i);var l=i.sub(o).mul(f).umod(i);var h=s.mul(f).umod(i);return this.g.mulAdd(l,a,h)};s.prototype.getKeyRecoveryParam=function(e,r,t,n){r=new y(r,n);if(r.recoveryParam!==null)return r.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,r,i)}catch(e){continue}if(o.eq(t))return i}throw new Error("Unable to find valid recovery factor")}},{"../curves":210,"../utils":218,"./key":212,"./signature":213,"bn.js":138,brorand:139,"hmac-drbg":254}],212:[function(e,r,t){"use strict";var n=e("bn.js");var i=e("../utils");var o=i.assert;function a(e,r){this.ec=e;this.priv=null;this.pub=null;if(r.priv)this._importPrivate(r.priv,r.privEnc);if(r.pub)this._importPublic(r.pub,r.pubEnc)}r.exports=a;a.fromPublic=function e(r,t,n){if(t instanceof a)return t;return new a(r,{pub:t,pubEnc:n})};a.fromPrivate=function e(r,t,n){if(t instanceof a)return t;return new a(r,{priv:t,privEnc:n})};a.prototype.validate=function e(){var r=this.getPublic();if(r.isInfinity())return{result:false,reason:"Invalid public key"};if(!r.validate())return{result:false,reason:"Public key is not a point"};if(!r.mul(this.ec.curve.n).isInfinity())return{result:false,reason:"Public key * N != O"};return{result:true,reason:null}};a.prototype.getPublic=function e(r,t){if(typeof r==="string"){t=r;r=null}if(!this.pub)this.pub=this.ec.g.mul(this.priv);if(!t)return this.pub;return this.pub.encode(t,r)};a.prototype.getPrivate=function e(r){if(r==="hex")return this.priv.toString(16,2);else return this.priv};a.prototype._importPrivate=function e(r,t){this.priv=new n(r,t||16);this.priv=this.priv.umod(this.ec.curve.n)};a.prototype._importPublic=function e(r,t){if(r.x||r.y){if(this.ec.curve.type==="mont"){o(r.x,"Need x coordinate")}else if(this.ec.curve.type==="short"||this.ec.curve.type==="edwards"){o(r.x&&r.y,"Need both x and y coordinate")}this.pub=this.ec.curve.point(r.x,r.y);return}this.pub=this.ec.curve.decodePoint(r,t)};a.prototype.derive=function e(r){if(!r.validate()){o(r.validate(),"public point not validated")}return r.mul(this.priv).getX()};a.prototype.sign=function e(r,t,n){return this.ec.sign(r,this,t,n)};a.prototype.verify=function e(r,t){return this.ec.verify(r,t,this)};a.prototype.inspect=function e(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},{"../utils":218,"bn.js":138}],213:[function(e,r,t){"use strict";var c=e("bn.js");var f=e("../utils");var n=f.assert;function i(e,r){if(e instanceof i)return e;if(this._importDER(e,r))return;n(e.r&&e.s,"Signature without r or s");this.r=new c(e.r,16);this.s=new c(e.s,16);if(e.recoveryParam===undefined)this.recoveryParam=null;else this.recoveryParam=e.recoveryParam}r.exports=i;function l(){this.place=0}function h(e,r){var t=e[r.place++];if(!(t&128)){return t}var n=t&15;if(n===0||n>4){return false}var i=0;for(var o=0,a=r.place;o<n;o++,a++){i<<=8;i|=e[a];i>>>=0}if(i<=127){return false}r.place=a;return i}function s(e){var r=0;var t=e.length-1;while(!e[r]&&!(e[r+1]&128)&&r<t){r++}if(r===0){return e}return e.slice(r)}i.prototype._importDER=function e(r,t){r=f.toArray(r,t);var n=new l;if(r[n.place++]!==48){return false}var i=h(r,n);if(i===false){return false}if(i+n.place!==r.length){return false}if(r[n.place++]!==2){return false}var o=h(r,n);if(o===false){return false}var a=r.slice(n.place,o+n.place);n.place+=o;if(r[n.place++]!==2){return false}var s=h(r,n);if(s===false){return false}if(r.length!==s+n.place){return false}var u=r.slice(n.place,s+n.place);if(a[0]===0){if(a[1]&128){a=a.slice(1)}else{return false}}if(u[0]===0){if(u[1]&128){u=u.slice(1)}else{return false}}this.r=new c(a);this.s=new c(u);this.recoveryParam=null;return true};function u(e,r){if(r<128){e.push(r);return}var t=1+(Math.log(r)/Math.LN2>>>3);e.push(t|128);while(--t){e.push(r>>>(t<<3)&255)}e.push(r)}i.prototype.toDER=function e(r){var t=this.r.toArray();var n=this.s.toArray();if(t[0]&128)t=[0].concat(t);if(n[0]&128)n=[0].concat(n);t=s(t);n=s(n);while(!n[0]&&!(n[1]&128)){n=n.slice(1)}var i=[2];u(i,t.length);i=i.concat(t);i.push(2);u(i,n.length);var o=i.concat(n);var a=[48];u(a,o.length);a=a.concat(o);return f.encode(a,r)}},{"../utils":218,"bn.js":138}],214:[function(e,r,t){"use strict";var n=e("hash.js");var i=e("../curves");var a=e("../utils");var o=a.assert;var c=a.parseBytes;var s=e("./key");var u=e("./signature");function f(e){o(e==="ed25519","only tested with ed25519 so far");if(!(this instanceof f))return new f(e);e=i[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=n.sha512}r.exports=f;f.prototype.sign=function e(r,t){r=c(r);var n=this.keyFromSecret(t);var i=this.hashInt(n.messagePrefix(),r);var o=this.g.mul(i);var a=this.encodePoint(o);var s=this.hashInt(a,n.pubBytes(),r).mul(n.priv());var u=i.add(s).umod(this.curve.n);return this.makeSignature({R:o,S:u,Rencoded:a})};f.prototype.verify=function e(r,t,n){r=c(r);t=this.makeSignature(t);var i=this.keyFromPublic(n);var o=this.hashInt(t.Rencoded(),i.pubBytes(),r);var a=this.g.mul(t.S());var s=t.R().add(i.pub().mul(o));return s.eq(a)};f.prototype.hashInt=function e(){var r=this.hash();for(var t=0;t<arguments.length;t++)r.update(arguments[t]);return a.intFromLE(r.digest()).umod(this.curve.n)};f.prototype.keyFromPublic=function e(r){return s.fromPublic(this,r)};f.prototype.keyFromSecret=function e(r){return s.fromSecret(this,r)};f.prototype.makeSignature=function e(r){if(r instanceof u)return r;return new u(this,r)};f.prototype.encodePoint=function e(r){var t=r.getY().toArray("le",this.encodingLength);t[this.encodingLength-1]|=r.getX().isOdd()?128:0;return t};f.prototype.decodePoint=function e(r){r=a.parseBytes(r);var t=r.length-1;var n=r.slice(0,t).concat(r[t]&~128);var i=(r[t]&128)!==0;var o=a.intFromLE(n);return this.curve.pointFromY(o,i)};f.prototype.encodeInt=function e(r){return r.toArray("le",this.encodingLength)};f.prototype.decodeInt=function e(r){return a.intFromLE(r)};f.prototype.isPoint=function e(r){return r instanceof this.pointClass}},{"../curves":210,"../utils":218,"./key":215,"./signature":216,"hash.js":242}],215:[function(e,r,t){"use strict";var n=e("../utils");var i=n.assert;var o=n.parseBytes;var a=n.cachedProperty;function s(e,r){this.eddsa=e;this._secret=o(r.secret);if(e.isPoint(r.pub))this._pub=r.pub;else this._pubBytes=o(r.pub)}s.fromPublic=function e(r,t){if(t instanceof s)return t;return new s(r,{pub:t})};s.fromSecret=function e(r,t){if(t instanceof s)return t;return new s(r,{secret:t})};s.prototype.secret=function e(){return this._secret};a(s,"pubBytes",function e(){return this.eddsa.encodePoint(this.pub())});a(s,"pub",function e(){if(this._pubBytes)return this.eddsa.decodePoint(this._pubBytes);return this.eddsa.g.mul(this.priv())});a(s,"privBytes",function e(){var r=this.eddsa;var t=this.hash();var n=r.encodingLength-1;var i=t.slice(0,r.encodingLength);i[0]&=248;i[n]&=127;i[n]|=64;return i});a(s,"priv",function e(){return this.eddsa.decodeInt(this.privBytes())});a(s,"hash",function e(){return this.eddsa.hash().update(this.secret()).digest()});a(s,"messagePrefix",function e(){return this.hash().slice(this.eddsa.encodingLength)});s.prototype.sign=function e(r){i(this._secret,"KeyPair can only verify");return this.eddsa.sign(r,this)};s.prototype.verify=function e(r,t){return this.eddsa.verify(r,t,this)};s.prototype.getSecret=function e(r){i(this._secret,"KeyPair is public only");return n.encode(this.secret(),r)};s.prototype.getPublic=function e(r){return n.encode(this.pubBytes(),r)};r.exports=s},{"../utils":218}],216:[function(e,r,t){"use strict";var n=e("bn.js");var i=e("../utils");var o=i.assert;var a=i.cachedProperty;var s=i.parseBytes;function u(e,r){this.eddsa=e;if(typeof r!=="object")r=s(r);if(Array.isArray(r)){r={R:r.slice(0,e.encodingLength),S:r.slice(e.encodingLength)}}o(r.R&&r.S,"Signature without R or S");if(e.isPoint(r.R))this._R=r.R;if(r.S instanceof n)this._S=r.S;this._Rencoded=Array.isArray(r.R)?r.R:r.Rencoded;this._Sencoded=Array.isArray(r.S)?r.S:r.Sencoded}a(u,"S",function e(){return this.eddsa.decodeInt(this.Sencoded())});a(u,"R",function e(){return this.eddsa.decodePoint(this.Rencoded())});a(u,"Rencoded",function e(){return this.eddsa.encodePoint(this.R())});a(u,"Sencoded",function e(){return this.eddsa.encodeInt(this.S())});u.prototype.toBytes=function e(){return this.Rencoded().concat(this.Sencoded())};u.prototype.toHex=function e(){return i.encode(this.toBytes(),"hex").toUpperCase()};r.exports=u},{"../utils":218,"bn.js":138}],217:[function(e,r,t){r.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"]]}}},{}],218:[function(e,r,t){"use strict";var n=t;var i=e("bn.js");var o=e("minimalistic-assert");var a=e("minimalistic-crypto-utils");n.assert=o;n.toArray=a.toArray;n.zero2=a.zero2;n.toHex=a.toHex;n.encode=a.encode;function s(e,r,t){var n=new Array(Math.max(e.bitLength(),t)+1);n.fill(0);var i=1<<r+1;var o=e.clone();for(var a=0;a<n.length;a++){var s;var u=o.andln(i-1);if(o.isOdd()){if(u>(i>>1)-1)s=(i>>1)-u;else s=u;o.isubn(s)}else{s=0}n[a]=s;o.iushrn(1)}return n}n.getNAF=s;function u(e,r){var t=[[],[]];e=e.clone();r=r.clone();var n=0;var i=0;var o;while(e.cmpn(-n)>0||r.cmpn(-i)>0){var a=e.andln(3)+n&3;var s=r.andln(3)+i&3;if(a===3)a=-1;if(s===3)s=-1;var u;if((a&1)===0){u=0}else{o=e.andln(7)+n&7;if((o===3||o===5)&&s===2)u=-a;else u=a}t[0].push(u);var c;if((s&1)===0){c=0}else{o=r.andln(7)+i&7;if((o===3||o===5)&&a===2)c=-s;else c=s}t[1].push(c);if(2*n===u+1)n=1-n;if(2*i===c+1)i=1-i;e.iushrn(1);r.iushrn(1)}return t}n.getJSF=u;function c(e,r,t){var n="_"+r;e.prototype[r]=function e(){return this[n]!==undefined?this[n]:this[n]=t.call(this)}}n.cachedProperty=c;function f(e){return typeof e==="string"?n.toArray(e,"hex"):e}n.parseBytes=f;function l(e){return new i(e,"hex","le")}n.intFromLE=l},{"bn.js":138,"minimalistic-assert":260,"minimalistic-crypto-utils":261}],219:[function(e,r,t){r.exports={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}},{}],220:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="ethers/5.5.2"},{}],221:[function(e,r,t){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,r,t,n){if(n===undefined)n=t;Object.defineProperty(e,n,{enumerable:true,get:function(){return r[t]}})}:function(e,r,t,n){if(n===undefined)n=t;e[n]=r[t]});var i=this&&this.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:true,value:r})}:function(e,r){e["default"]=r});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(t!=="default"&&Object.prototype.hasOwnProperty.call(e,t))n(r,e,t);i(r,e);return r};Object.defineProperty(t,"__esModule",{value:true});t.Wordlist=t.version=t.wordlists=t.utils=t.logger=t.errors=t.constants=t.FixedNumber=t.BigNumber=t.ContractFactory=t.Contract=t.BaseContract=t.providers=t.getDefaultProvider=t.VoidSigner=t.Wallet=t.Signer=void 0;var a=e("@ethersproject/contracts");Object.defineProperty(t,"BaseContract",{enumerable:true,get:function(){return a.BaseContract}});Object.defineProperty(t,"Contract",{enumerable:true,get:function(){return a.Contract}});Object.defineProperty(t,"ContractFactory",{enumerable:true,get:function(){return a.ContractFactory}});var s=e("@ethersproject/bignumber");Object.defineProperty(t,"BigNumber",{enumerable:true,get:function(){return s.BigNumber}});Object.defineProperty(t,"FixedNumber",{enumerable:true,get:function(){return s.FixedNumber}});var u=e("@ethersproject/abstract-signer");Object.defineProperty(t,"Signer",{enumerable:true,get:function(){return u.Signer}});Object.defineProperty(t,"VoidSigner",{enumerable:true,get:function(){return u.VoidSigner}});var c=e("@ethersproject/wallet");Object.defineProperty(t,"Wallet",{enumerable:true,get:function(){return c.Wallet}});var f=o(e("@ethersproject/constants"));t.constants=f;var l=o(e("@ethersproject/providers"));t.providers=l;var h=e("@ethersproject/providers");Object.defineProperty(t,"getDefaultProvider",{enumerable:true,get:function(){return h.getDefaultProvider}});var d=e("@ethersproject/wordlists");Object.defineProperty(t,"Wordlist",{enumerable:true,get:function(){return d.Wordlist}});Object.defineProperty(t,"wordlists",{enumerable:true,get:function(){return d.wordlists}});var p=o(e("./utils"));t.utils=p;var v=e("@ethersproject/logger");Object.defineProperty(t,"errors",{enumerable:true,get:function(){return v.ErrorCode}});var b=e("./_version");Object.defineProperty(t,"version",{enumerable:true,get:function(){return b.version}});var g=new v.Logger(b.version);t.logger=g},{"./_version":220,"./utils":223,"@ethersproject/abstract-signer":20,"@ethersproject/bignumber":29,"@ethersproject/constants":35,"@ethersproject/contracts":38,"@ethersproject/logger":55,"@ethersproject/providers":71,"@ethersproject/wallet":105,"@ethersproject/wordlists":110}],222:[function(e,r,t){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,r,t,n){if(n===undefined)n=t;Object.defineProperty(e,n,{enumerable:true,get:function(){return r[t]}})}:function(e,r,t,n){if(n===undefined)n=t;e[n]=r[t]});var i=this&&this.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:true,value:r})}:function(e,r){e["default"]=r});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(t!=="default"&&Object.prototype.hasOwnProperty.call(e,t))n(r,e,t);i(r,e);return r};Object.defineProperty(t,"__esModule",{value:true});t.Wordlist=t.version=t.wordlists=t.utils=t.logger=t.errors=t.constants=t.FixedNumber=t.BigNumber=t.ContractFactory=t.Contract=t.BaseContract=t.providers=t.getDefaultProvider=t.VoidSigner=t.Wallet=t.Signer=t.ethers=void 0;var a=o(e("./ethers"));t.ethers=a;try{var s=window;if(s._ethers==null){s._ethers=a}}catch(e){}var u=e("./ethers");Object.defineProperty(t,"Signer",{enumerable:true,get:function(){return u.Signer}});Object.defineProperty(t,"Wallet",{enumerable:true,get:function(){return u.Wallet}});Object.defineProperty(t,"VoidSigner",{enumerable:true,get:function(){return u.VoidSigner}});Object.defineProperty(t,"getDefaultProvider",{enumerable:true,get:function(){return u.getDefaultProvider}});Object.defineProperty(t,"providers",{enumerable:true,get:function(){return u.providers}});Object.defineProperty(t,"BaseContract",{enumerable:true,get:function(){return u.BaseContract}});Object.defineProperty(t,"Contract",{enumerable:true,get:function(){return u.Contract}});Object.defineProperty(t,"ContractFactory",{enumerable:true,get:function(){return u.ContractFactory}});Object.defineProperty(t,"BigNumber",{enumerable:true,get:function(){return u.BigNumber}});Object.defineProperty(t,"FixedNumber",{enumerable:true,get:function(){return u.FixedNumber}});Object.defineProperty(t,"constants",{enumerable:true,get:function(){return u.constants}});Object.defineProperty(t,"errors",{enumerable:true,get:function(){return u.errors}});Object.defineProperty(t,"logger",{enumerable:true,get:function(){return u.logger}});Object.defineProperty(t,"utils",{enumerable:true,get:function(){return u.utils}});Object.defineProperty(t,"wordlists",{enumerable:true,get:function(){return u.wordlists}});Object.defineProperty(t,"version",{enumerable:true,get:function(){return u.version}});Object.defineProperty(t,"Wordlist",{enumerable:true,get:function(){return u.Wordlist}})},{"./ethers":221}],223:[function(e,r,t){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,r,t,n){if(n===undefined)n=t;Object.defineProperty(e,n,{enumerable:true,get:function(){return r[t]}})}:function(e,r,t,n){if(n===undefined)n=t;e[n]=r[t]});var i=this&&this.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:true,value:r})}:function(e,r){e["default"]=r});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(t!=="default"&&Object.prototype.hasOwnProperty.call(e,t))n(r,e,t);i(r,e);return r};Object.defineProperty(t,"__esModule",{value:true});t.formatBytes32String=t.Utf8ErrorFuncs=t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t._toEscapedUtf8String=t.nameprep=t.hexDataSlice=t.hexDataLength=t.hexZeroPad=t.hexValue=t.hexStripZeros=t.hexConcat=t.isHexString=t.hexlify=t.base64=t.base58=t.TransactionDescription=t.LogDescription=t.Interface=t.SigningKey=t.HDNode=t.defaultPath=t.isBytesLike=t.isBytes=t.zeroPad=t.stripZeros=t.concat=t.arrayify=t.shallowCopy=t.resolveProperties=t.getStatic=t.defineReadOnly=t.deepCopy=t.checkProperties=t.poll=t.fetchJson=t._fetchData=t.RLP=t.Logger=t.checkResultErrors=t.FormatTypes=t.ParamType=t.FunctionFragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.Fragment=t.defaultAbiCoder=t.AbiCoder=void 0;t.Indexed=t.Utf8ErrorReason=t.UnicodeNormalizationForm=t.SupportedAlgorithm=t.mnemonicToSeed=t.isValidMnemonic=t.entropyToMnemonic=t.mnemonicToEntropy=t.getAccountPath=t.verifyTypedData=t.verifyMessage=t.recoverPublicKey=t.computePublicKey=t.recoverAddress=t.computeAddress=t.getJsonWalletAddress=t.TransactionTypes=t.serializeTransaction=t.parseTransaction=t.accessListify=t.joinSignature=t.splitSignature=t.soliditySha256=t.solidityKeccak256=t.solidityPack=t.shuffled=t.randomBytes=t.sha512=t.sha256=t.ripemd160=t.keccak256=t.computeHmac=t.commify=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.isAddress=t.getCreate2Address=t.getContractAddress=t.getIcapAddress=t.getAddress=t._TypedDataEncoder=t.id=t.isValidName=t.namehash=t.hashMessage=t.parseBytes32String=void 0;var a=e("@ethersproject/abi");Object.defineProperty(t,"AbiCoder",{enumerable:true,get:function(){return a.AbiCoder}});Object.defineProperty(t,"checkResultErrors",{enumerable:true,get:function(){return a.checkResultErrors}});Object.defineProperty(t,"ConstructorFragment",{enumerable:true,get:function(){return a.ConstructorFragment}});Object.defineProperty(t,"defaultAbiCoder",{enumerable:true,get:function(){return a.defaultAbiCoder}});Object.defineProperty(t,"ErrorFragment",{enumerable:true,get:function(){return a.ErrorFragment}});Object.defineProperty(t,"EventFragment",{enumerable:true,get:function(){return a.EventFragment}});Object.defineProperty(t,"FormatTypes",{enumerable:true,get:function(){return a.FormatTypes}});Object.defineProperty(t,"Fragment",{enumerable:true,get:function(){return a.Fragment}});Object.defineProperty(t,"FunctionFragment",{enumerable:true,get:function(){return a.FunctionFragment}});Object.defineProperty(t,"Indexed",{enumerable:true,get:function(){return a.Indexed}});Object.defineProperty(t,"Interface",{enumerable:true,get:function(){return a.Interface}});Object.defineProperty(t,"LogDescription",{enumerable:true,get:function(){return a.LogDescription}});Object.defineProperty(t,"ParamType",{enumerable:true,get:function(){return a.ParamType}});Object.defineProperty(t,"TransactionDescription",{enumerable:true,get:function(){return a.TransactionDescription}});var s=e("@ethersproject/address");Object.defineProperty(t,"getAddress",{enumerable:true,get:function(){return s.getAddress}});Object.defineProperty(t,"getCreate2Address",{enumerable:true,get:function(){return s.getCreate2Address}});Object.defineProperty(t,"getContractAddress",{enumerable:true,get:function(){return s.getContractAddress}});Object.defineProperty(t,"getIcapAddress",{enumerable:true,get:function(){return s.getIcapAddress}});Object.defineProperty(t,"isAddress",{enumerable:true,get:function(){return s.isAddress}});var u=o(e("@ethersproject/base64"));t.base64=u;var c=e("@ethersproject/basex");Object.defineProperty(t,"base58",{enumerable:true,get:function(){return c.Base58}});var f=e("@ethersproject/bytes");Object.defineProperty(t,"arrayify",{enumerable:true,get:function(){return f.arrayify}});Object.defineProperty(t,"concat",{enumerable:true,get:function(){return f.concat}});Object.defineProperty(t,"hexConcat",{enumerable:true,get:function(){return f.hexConcat}});Object.defineProperty(t,"hexDataSlice",{enumerable:true,get:function(){return f.hexDataSlice}});Object.defineProperty(t,"hexDataLength",{enumerable:true,get:function(){return f.hexDataLength}});Object.defineProperty(t,"hexlify",{enumerable:true,get:function(){return f.hexlify}});Object.defineProperty(t,"hexStripZeros",{enumerable:true,get:function(){return f.hexStripZeros}});Object.defineProperty(t,"hexValue",{enumerable:true,get:function(){return f.hexValue}});Object.defineProperty(t,"hexZeroPad",{enumerable:true,get:function(){return f.hexZeroPad}});Object.defineProperty(t,"isBytes",{enumerable:true,get:function(){return f.isBytes}});Object.defineProperty(t,"isBytesLike",{enumerable:true,get:function(){return f.isBytesLike}});Object.defineProperty(t,"isHexString",{enumerable:true,get:function(){return f.isHexString}});Object.defineProperty(t,"joinSignature",{enumerable:true,get:function(){return f.joinSignature}});Object.defineProperty(t,"zeroPad",{enumerable:true,get:function(){return f.zeroPad}});Object.defineProperty(t,"splitSignature",{enumerable:true,get:function(){return f.splitSignature}});Object.defineProperty(t,"stripZeros",{enumerable:true,get:function(){return f.stripZeros}});var l=e("@ethersproject/hash");Object.defineProperty(t,"_TypedDataEncoder",{enumerable:true,get:function(){return l._TypedDataEncoder}});Object.defineProperty(t,"hashMessage",{enumerable:true,get:function(){return l.hashMessage}});Object.defineProperty(t,"id",{enumerable:true,get:function(){return l.id}});Object.defineProperty(t,"isValidName",{enumerable:true,get:function(){return l.isValidName}});Object.defineProperty(t,"namehash",{enumerable:true,get:function(){return l.namehash}});var h=e("@ethersproject/hdnode");Object.defineProperty(t,"defaultPath",{enumerable:true,get:function(){return h.defaultPath}});Object.defineProperty(t,"entropyToMnemonic",{enumerable:true,get:function(){return h.entropyToMnemonic}});Object.defineProperty(t,"getAccountPath",{enumerable:true,get:function(){return h.getAccountPath}});Object.defineProperty(t,"HDNode",{enumerable:true,get:function(){return h.HDNode}});Object.defineProperty(t,"isValidMnemonic",{enumerable:true,get:function(){return h.isValidMnemonic}});Object.defineProperty(t,"mnemonicToEntropy",{enumerable:true,get:function(){return h.mnemonicToEntropy}});Object.defineProperty(t,"mnemonicToSeed",{enumerable:true,get:function(){return h.mnemonicToSeed}});var d=e("@ethersproject/json-wallets");Object.defineProperty(t,"getJsonWalletAddress",{enumerable:true,get:function(){return d.getJsonWalletAddress}});var p=e("@ethersproject/keccak256");Object.defineProperty(t,"keccak256",{enumerable:true,get:function(){return p.keccak256}});var v=e("@ethersproject/logger");Object.defineProperty(t,"Logger",{enumerable:true,get:function(){return v.Logger}});var b=e("@ethersproject/sha2");Object.defineProperty(t,"computeHmac",{enumerable:true,get:function(){return b.computeHmac}});Object.defineProperty(t,"ripemd160",{enumerable:true,get:function(){return b.ripemd160}});Object.defineProperty(t,"sha256",{enumerable:true,get:function(){return b.sha256}});Object.defineProperty(t,"sha512",{enumerable:true,get:function(){return b.sha512}});var g=e("@ethersproject/solidity");Object.defineProperty(t,"solidityKeccak256",{enumerable:true,get:function(){return g.keccak256}});Object.defineProperty(t,"solidityPack",{enumerable:true,get:function(){return g.pack}});Object.defineProperty(t,"soliditySha256",{enumerable:true,get:function(){return g.sha256}});var m=e("@ethersproject/random");Object.defineProperty(t,"randomBytes",{enumerable:true,get:function(){return m.randomBytes}});Object.defineProperty(t,"shuffled",{enumerable:true,get:function(){return m.shuffled}});var y=e("@ethersproject/properties");Object.defineProperty(t,"checkProperties",{enumerable:true,get:function(){return y.checkProperties}});Object.defineProperty(t,"deepCopy",{enumerable:true,get:function(){return y.deepCopy}});Object.defineProperty(t,"defineReadOnly",{enumerable:true,get:function(){return y.defineReadOnly}});Object.defineProperty(t,"getStatic",{enumerable:true,get:function(){return y.getStatic}});Object.defineProperty(t,"resolveProperties",{enumerable:true,get:function(){return y.resolveProperties}});Object.defineProperty(t,"shallowCopy",{enumerable:true,get:function(){return y.shallowCopy}});var w=o(e("@ethersproject/rlp"));t.RLP=w;var _=e("@ethersproject/signing-key");Object.defineProperty(t,"computePublicKey",{enumerable:true,get:function(){return _.computePublicKey}});Object.defineProperty(t,"recoverPublicKey",{enumerable:true,get:function(){return _.recoverPublicKey}});Object.defineProperty(t,"SigningKey",{enumerable:true,get:function(){return _.SigningKey}});var S=e("@ethersproject/strings");Object.defineProperty(t,"formatBytes32String",{enumerable:true,get:function(){return S.formatBytes32String}});Object.defineProperty(t,"nameprep",{enumerable:true,get:function(){return S.nameprep}});Object.defineProperty(t,"parseBytes32String",{enumerable:true,get:function(){return S.parseBytes32String}});Object.defineProperty(t,"_toEscapedUtf8String",{enumerable:true,get:function(){return S._toEscapedUtf8String}});Object.defineProperty(t,"toUtf8Bytes",{enumerable:true,get:function(){return S.toUtf8Bytes}});Object.defineProperty(t,"toUtf8CodePoints",{enumerable:true,get:function(){return S.toUtf8CodePoints}});Object.defineProperty(t,"toUtf8String",{enumerable:true,get:function(){return S.toUtf8String}});Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:true,get:function(){return S.Utf8ErrorFuncs}});var A=e("@ethersproject/transactions");Object.defineProperty(t,"accessListify",{enumerable:true,get:function(){return A.accessListify}});Object.defineProperty(t,"computeAddress",{enumerable:true,get:function(){return A.computeAddress}});Object.defineProperty(t,"parseTransaction",{enumerable:true,get:function(){return A.parse}});Object.defineProperty(t,"recoverAddress",{enumerable:true,get:function(){return A.recoverAddress}});Object.defineProperty(t,"serializeTransaction",{enumerable:true,get:function(){return A.serialize}});Object.defineProperty(t,"TransactionTypes",{enumerable:true,get:function(){return A.TransactionTypes}});var E=e("@ethersproject/units");Object.defineProperty(t,"commify",{enumerable:true,get:function(){return E.commify}});Object.defineProperty(t,"formatEther",{enumerable:true,get:function(){return E.formatEther}});Object.defineProperty(t,"parseEther",{enumerable:true,get:function(){return E.parseEther}});Object.defineProperty(t,"formatUnits",{enumerable:true,get:function(){return E.formatUnits}});Object.defineProperty(t,"parseUnits",{enumerable:true,get:function(){return E.parseUnits}});var M=e("@ethersproject/wallet");Object.defineProperty(t,"verifyMessage",{enumerable:true,get:function(){return M.verifyMessage}});Object.defineProperty(t,"verifyTypedData",{enumerable:true,get:function(){return M.verifyTypedData}});var P=e("@ethersproject/web");Object.defineProperty(t,"_fetchData",{enumerable:true,get:function(){return P._fetchData}});Object.defineProperty(t,"fetchJson",{enumerable:true,get:function(){return P.fetchJson}});Object.defineProperty(t,"poll",{enumerable:true,get:function(){return P.poll}});var T=e("@ethersproject/sha2");Object.defineProperty(t,"SupportedAlgorithm",{enumerable:true,get:function(){return T.SupportedAlgorithm}});var k=e("@ethersproject/strings");Object.defineProperty(t,"UnicodeNormalizationForm",{enumerable:true,get:function(){return k.UnicodeNormalizationForm}});Object.defineProperty(t,"Utf8ErrorReason",{enumerable:true,get:function(){return k.Utf8ErrorReason}})},{"@ethersproject/abi":15,"@ethersproject/address":22,"@ethersproject/base64":24,"@ethersproject/basex":25,"@ethersproject/bytes":31,"@ethersproject/hash":41,"@ethersproject/hdnode":46,"@ethersproject/json-wallets":49,"@ethersproject/keccak256":53,"@ethersproject/logger":55,"@ethersproject/properties":61,"@ethersproject/random":82,"@ethersproject/rlp":85,"@ethersproject/sha2":88,"@ethersproject/signing-key":92,"@ethersproject/solidity":94,"@ethersproject/strings":98,"@ethersproject/transactions":101,"@ethersproject/units":103,"@ethersproject/wallet":105,"@ethersproject/web":108}],224:[function(e,r,t){"use strict";var n=typeof Reflect==="object"?Reflect:null;var l=n&&typeof n.apply==="function"?n.apply:function e(r,t,n){return Function.prototype.apply.call(r,t,n)};var i;if(n&&typeof n.ownKeys==="function"){i=n.ownKeys}else if(Object.getOwnPropertySymbols){i=function e(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}}else{i=function e(r){return Object.getOwnPropertyNames(r)}}function u(e){if(console&&console.warn)console.warn(e)}var o=Number.isNaN||function e(r){return r!==r};function a(){a.init.call(this)}r.exports=a;r.exports.once=w;a.EventEmitter=a;a.prototype._events=undefined;a.prototype._eventsCount=0;a.prototype._maxListeners=undefined;var s=10;function c(e){if(typeof e!=="function"){throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:true,get:function(){return s},set:function(e){if(typeof e!=="number"||e<0||o(e)){throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".")}s=e}});a.init=function(){if(this._events===undefined||this._events===Object.getPrototypeOf(this)._events){this._events=Object.create(null);this._eventsCount=0}this._maxListeners=this._maxListeners||undefined};a.prototype.setMaxListeners=function e(r){if(typeof r!=="number"||r<0||o(r)){throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".")}this._maxListeners=r;return this};function f(e){if(e._maxListeners===undefined)return a.defaultMaxListeners;return e._maxListeners}a.prototype.getMaxListeners=function e(){return f(this)};a.prototype.emit=function e(r){var t=[];for(var n=1;n<arguments.length;n++)t.push(arguments[n]);var i=r==="error";var o=this._events;if(o!==undefined)i=i&&o.error===undefined;else if(!i)return false;if(i){var a;if(t.length>0)a=t[0];if(a instanceof Error){throw a}var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));s.context=a;throw s}var u=o[r];if(u===undefined)return false;if(typeof u==="function"){l(u,this,t)}else{var c=u.length;var f=g(u,c);for(var n=0;n<c;++n)l(f[n],this,t)}return true};function h(e,r,t,n){var i;var o;var a;c(t);o=e._events;if(o===undefined){o=e._events=Object.create(null);e._eventsCount=0}else{if(o.newListener!==undefined){e.emit("newListener",r,t.listener?t.listener:t);o=e._events}a=o[r]}if(a===undefined){a=o[r]=t;++e._eventsCount}else{if(typeof a==="function"){a=o[r]=n?[t,a]:[a,t]}else if(n){a.unshift(t)}else{a.push(t)}i=f(e);if(i>0&&a.length>i&&!a.warned){a.warned=true;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(r)+" listeners "+"added. Use emitter.setMaxListeners() to "+"increase limit");s.name="MaxListenersExceededWarning";s.emitter=e;s.type=r;s.count=a.length;u(s)}}return e}a.prototype.addListener=function e(r,t){return h(this,r,t,false)};a.prototype.on=a.prototype.addListener;a.prototype.prependListener=function e(r,t){return h(this,r,t,true)};function d(){if(!this.fired){this.target.removeListener(this.type,this.wrapFn);this.fired=true;if(arguments.length===0)return this.listener.call(this.target);return this.listener.apply(this.target,arguments)}}function p(e,r,t){var n={fired:false,wrapFn:undefined,target:e,type:r,listener:t};var i=d.bind(n);i.listener=t;n.wrapFn=i;return i}a.prototype.once=function e(r,t){c(t);this.on(r,p(this,r,t));return this};a.prototype.prependOnceListener=function e(r,t){c(t);this.prependListener(r,p(this,r,t));return this};a.prototype.removeListener=function e(r,t){var n,i,o,a,s;c(t);i=this._events;if(i===undefined)return this;n=i[r];if(n===undefined)return this;if(n===t||n.listener===t){if(--this._eventsCount===0)this._events=Object.create(null);else{delete i[r];if(i.removeListener)this.emit("removeListener",r,n.listener||t)}}else if(typeof n!=="function"){o=-1;for(a=n.length-1;a>=0;a--){if(n[a]===t||n[a].listener===t){s=n[a].listener;o=a;break}}if(o<0)return this;if(o===0)n.shift();else{m(n,o)}if(n.length===1)i[r]=n[0];if(i.removeListener!==undefined)this.emit("removeListener",r,s||t)}return this};a.prototype.off=a.prototype.removeListener;a.prototype.removeAllListeners=function e(r){var t,n,i;n=this._events;if(n===undefined)return this;if(n.removeListener===undefined){if(arguments.length===0){this._events=Object.create(null);this._eventsCount=0}else if(n[r]!==undefined){if(--this._eventsCount===0)this._events=Object.create(null);else delete n[r]}return this}if(arguments.length===0){var o=Object.keys(n);var a;for(i=0;i<o.length;++i){a=o[i];if(a==="removeListener")continue;this.removeAllListeners(a)}this.removeAllListeners("removeListener");this._events=Object.create(null);this._eventsCount=0;return this}t=n[r];if(typeof t==="function"){this.removeListener(r,t)}else if(t!==undefined){for(i=t.length-1;i>=0;i--){this.removeListener(r,t[i])}}return this};function v(e,r,t){var n=e._events;if(n===undefined)return[];var i=n[r];if(i===undefined)return[];if(typeof i==="function")return t?[i.listener||i]:[i];return t?y(i):g(i,i.length)}a.prototype.listeners=function e(r){return v(this,r,true)};a.prototype.rawListeners=function e(r){return v(this,r,false)};a.listenerCount=function(e,r){if(typeof e.listenerCount==="function"){return e.listenerCount(r)}else{return b.call(e,r)}};a.prototype.listenerCount=b;function b(e){var r=this._events;if(r!==undefined){var t=r[e];if(typeof t==="function"){return 1}else if(t!==undefined){return t.length}}return 0}a.prototype.eventNames=function e(){return this._eventsCount>0?i(this._events):[]};function g(e,r){var t=new Array(r);for(var n=0;n<r;++n)t[n]=e[n];return t}function m(e,r){for(;r+1<e.length;r++)e[r]=e[r+1];e.pop()}function y(e){var r=new Array(e.length);for(var t=0;t<r.length;++t){r[t]=e[t].listener||e[t]}return r}function w(i,o){return new Promise(function(e,r){function t(e){i.removeListener(o,n);r(e)}function n(){if(typeof i.removeListener==="function"){i.removeListener("error",t)}e([].slice.call(arguments))}S(i,o,n,{once:true});if(o!=="error"){_(i,t,{once:true})}})}function _(e,r,t){if(typeof e.on==="function"){S(e,"error",r,t)}}function S(t,n,i,o){if(typeof t.on==="function"){if(o.once){t.once(n,i)}else{t.on(n,i)}}else if(typeof t.addEventListener==="function"){t.addEventListener(n,function e(r){if(o.once){t.removeEventListener(n,e)}i(r)})}else{throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}}},{}],225:[function(e,r,t){var d=e("safe-buffer").Buffer;var p=e("md5.js");function n(e,r,t,n){if(!d.isBuffer(e))e=d.from(e,"binary");if(r){if(!d.isBuffer(r))r=d.from(r,"binary");if(r.length!==8)throw new RangeError("salt should be Buffer with 8 byte length")}var i=t/8;var o=d.alloc(i);var a=d.alloc(n||0);var s=d.alloc(0);while(i>0||n>0){var u=new p;u.update(s);u.update(e);if(r)u.update(r);s=u.digest();var c=0;if(i>0){var f=o.length-i;c=Math.min(i,s.length);s.copy(o,f,0,c);i-=c}if(c<s.length&&n>0){var l=a.length-n;var h=Math.min(n,s.length-c);s.copy(a,l,c,c+h);n-=h}}s.fill(0);return{key:o,iv:a}}r.exports=n},{"md5.js":258,"safe-buffer":283}],226:[function(e,r,t){"use strict";var s=e("safe-buffer").Buffer;var n=e("readable-stream").Transform;var i=e("inherits");function u(e,r){if(!s.isBuffer(e)&&typeof e!=="string"){throw new TypeError(r+" must be a string or a buffer")}}function o(e){n.call(this);this._block=s.allocUnsafe(e);this._blockSize=e;this._blockOffset=0;this._length=[0,0,0,0];this._finalized=false}i(o,n);o.prototype._transform=function(e,r,t){var n=null;try{this.update(e,r)}catch(e){n=e}t(n)};o.prototype._flush=function(e){var r=null;try{this.push(this.digest())}catch(e){r=e}e(r)};o.prototype.update=function(e,r){u(e,"Data");if(this._finalized)throw new Error("Digest already called");if(!s.isBuffer(e))e=s.from(e,r);var t=this._block;var n=0;while(this._blockOffset+e.length-n>=this._blockSize){for(var i=this._blockOffset;i<this._blockSize;)t[i++]=e[n++];this._update();this._blockOffset=0}while(n<e.length)t[this._blockOffset++]=e[n++];for(var o=0,a=e.length*8;a>0;++o){this._length[o]+=a;a=this._length[o]/4294967296|0;if(a>0)this._length[o]-=4294967296*a}return this};o.prototype._update=function(){throw new Error("_update is not implemented")};o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=true;var r=this._digest();if(e!==undefined)r=r.toString(e);this._block.fill(0);this._blockOffset=0;for(var t=0;t<4;++t)this._length[t]=0;return r};o.prototype._digest=function(){throw new Error("_digest is not implemented")};r.exports=o},{inherits:256,"readable-stream":241,"safe-buffer":283}],227:[function(e,r,t){arguments[4][170][0].apply(t,arguments)},{dup:170}],228:[function(e,r,t){arguments[4][171][0].apply(t,arguments)},{"./_stream_readable":230,"./_stream_writable":232,_process:273,dup:171,inherits:256}],229:[function(e,r,t){arguments[4][172][0].apply(t,arguments)},{"./_stream_transform":231,dup:172,inherits:256}],230:[function(e,r,t){arguments[4][173][0].apply(t,arguments)},{"../errors":227,"./_stream_duplex":228,"./internal/streams/async_iterator":233,"./internal/streams/buffer_list":234,"./internal/streams/destroy":235,"./internal/streams/from":237,"./internal/streams/state":239,"./internal/streams/stream":240,_process:273,buffer:186,dup:173,events:224,inherits:256,"string_decoder/":309,util:140}],231:[function(e,r,t){arguments[4][174][0].apply(t,arguments)},{"../errors":227,"./_stream_duplex":228,dup:174,inherits:256}],232:[function(e,r,t){arguments[4][175][0].apply(t,arguments)},{"../errors":227,"./_stream_duplex":228,"./internal/streams/destroy":235,"./internal/streams/state":239,"./internal/streams/stream":240,_process:273,buffer:186,dup:175,inherits:256,"util-deprecate":311}],233:[function(e,r,t){arguments[4][176][0].apply(t,arguments)},{"./end-of-stream":236,_process:273,dup:176}],234:[function(e,r,t){arguments[4][177][0].apply(t,arguments)},{buffer:186,dup:177,util:140}],235:[function(e,r,t){arguments[4][178][0].apply(t,arguments)},{_process:273,dup:178}],236:[function(e,r,t){arguments[4][179][0].apply(t,arguments)},{"../../../errors":227,dup:179}],237:[function(e,r,t){arguments[4][180][0].apply(t,arguments)},{dup:180}],238:[function(e,r,t){arguments[4][181][0].apply(t,arguments)},{"../../../errors":227,"./end-of-stream":236,dup:181}],239:[function(e,r,t){arguments[4][182][0].apply(t,arguments)},{"../../../errors":227,dup:182}],240:[function(e,r,t){arguments[4][183][0].apply(t,arguments)},{dup:183,events:224}],241:[function(e,r,t){arguments[4][184][0].apply(t,arguments)},{"./lib/_stream_duplex.js":228,"./lib/_stream_passthrough.js":229,"./lib/_stream_readable.js":230,"./lib/_stream_transform.js":231,"./lib/_stream_writable.js":232,"./lib/internal/streams/end-of-stream.js":236,"./lib/internal/streams/pipeline.js":238,dup:184}],242:[function(e,r,t){var n=t;n.utils=e("./hash/utils");n.common=e("./hash/common");n.sha=e("./hash/sha");n.ripemd=e("./hash/ripemd");n.hmac=e("./hash/hmac");n.sha1=n.sha.sha1;n.sha256=n.sha.sha256;n.sha224=n.sha.sha224;n.sha384=n.sha.sha384;n.sha512=n.sha.sha512;n.ripemd160=n.ripemd.ripemd160},{"./hash/common":243,"./hash/hmac":244,"./hash/ripemd":245,"./hash/sha":246,"./hash/utils":253}],243:[function(e,r,t){"use strict";var o=e("./utils");var n=e("minimalistic-assert");function i(){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=i;i.prototype.update=function e(r,t){r=o.toArray(r,t);if(!this.pending)this.pending=r;else this.pending=this.pending.concat(r);this.pendingTotal+=r.length;if(this.pending.length>=this._delta8){r=this.pending;var n=r.length%this._delta8;this.pending=r.slice(r.length-n,r.length);if(this.pending.length===0)this.pending=null;r=o.join32(r,0,r.length-n,this.endian);for(var i=0;i<r.length;i+=this._delta32)this._update(r,i,i+this._delta32)}return this};i.prototype.digest=function e(r){this.update(this._pad());n(this.pending===null);return this._digest(r)};i.prototype._pad=function e(){var r=this.pendingTotal;var t=this._delta8;var n=t-(r+this.padLength)%t;var i=new Array(n+this.padLength);i[0]=128;for(var o=1;o<n;o++)i[o]=0;r<<=3;if(this.endian==="big"){for(var a=8;a<this.padLength;a++)i[o++]=0;i[o++]=0;i[o++]=0;i[o++]=0;i[o++]=0;i[o++]=r>>>24&255;i[o++]=r>>>16&255;i[o++]=r>>>8&255;i[o++]=r&255}else{i[o++]=r&255;i[o++]=r>>>8&255;i[o++]=r>>>16&255;i[o++]=r>>>24&255;i[o++]=0;i[o++]=0;i[o++]=0;i[o++]=0;for(a=8;a<this.padLength;a++)i[o++]=0}return i}},{"./utils":253,"minimalistic-assert":260}],244:[function(e,r,t){"use strict";var n=e("./utils");var i=e("minimalistic-assert");function o(e,r,t){if(!(this instanceof o))return new o(e,r,t);this.Hash=e;this.blockSize=e.blockSize/8;this.outSize=e.outSize/8;this.inner=null;this.outer=null;this._init(n.toArray(r,t))}r.exports=o;o.prototype._init=function e(r){if(r.length>this.blockSize)r=(new this.Hash).update(r).digest();i(r.length<=this.blockSize);for(var t=r.length;t<this.blockSize;t++)r.push(0);for(t=0;t<r.length;t++)r[t]^=54;this.inner=(new this.Hash).update(r);for(t=0;t<r.length;t++)r[t]^=106;this.outer=(new this.Hash).update(r)};o.prototype.update=function e(r,t){this.inner.update(r,t);return this};o.prototype.digest=function e(r){this.outer.update(this.inner.digest());return this.outer.digest(r)}},{"./utils":253,"minimalistic-assert":260}],245:[function(e,r,t){"use strict";var n=e("./utils");var i=e("./common");var v=n.rotl32;var b=n.sum32;var g=n.sum32_3;var m=n.sum32_4;var o=i.BlockHash;function a(){if(!(this instanceof a))return new a;o.call(this);this.h=[1732584193,4023233417,2562383102,271733878,3285377520];this.endian="little"}n.inherits(a,o);t.ripemd160=a;a.blockSize=512;a.outSize=160;a.hmacStrength=192;a.padLength=64;a.prototype._update=function e(r,t){var n=this.h[0];var i=this.h[1];var o=this.h[2];var a=this.h[3];var s=this.h[4];var u=n;var c=i;var f=o;var l=a;var h=s;for(var d=0;d<80;d++){var p=b(v(m(n,y(d,i,o,a),r[S[d]+t],w(d)),E[d]),s);n=s;s=a;a=v(o,10);o=i;i=p;p=b(v(m(u,y(79-d,c,f,l),r[A[d]+t],_(d)),M[d]),h);u=h;h=l;l=v(f,10);f=c;c=p}p=g(this.h[1],o,l);this.h[1]=g(this.h[2],a,h);this.h[2]=g(this.h[3],s,u);this.h[3]=g(this.h[4],n,c);this.h[4]=g(this.h[0],i,f);this.h[0]=p};a.prototype._digest=function e(r){if(r==="hex")return n.toHex32(this.h,"little");else return n.split32(this.h,"little")};function y(e,r,t,n){if(e<=15)return r^t^n;else if(e<=31)return r&t|~r&n;else if(e<=47)return(r|~t)^n;else if(e<=63)return r&n|t&~n;else return r^(t|~n)}function w(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 _(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 S=[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 A=[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 E=[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 M=[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]},{"./common":243,"./utils":253}],246:[function(e,r,t){"use strict";t.sha1=e("./sha/1");t.sha224=e("./sha/224");t.sha256=e("./sha/256");t.sha384=e("./sha/384");t.sha512=e("./sha/512")},{"./sha/1":247,"./sha/224":248,"./sha/256":249,"./sha/384":250,"./sha/512":251}],247:[function(e,r,t){"use strict";var n=e("../utils");var i=e("../common");var o=e("./common");var h=n.rotl32;var d=n.sum32;var p=n.sum32_5;var v=o.ft_1;var a=i.BlockHash;var b=[1518500249,1859775393,2400959708,3395469782];function s(){if(!(this instanceof s))return new s;a.call(this);this.h=[1732584193,4023233417,2562383102,271733878,3285377520];this.W=new Array(80)}n.inherits(s,a);r.exports=s;s.blockSize=512;s.outSize=160;s.hmacStrength=80;s.padLength=64;s.prototype._update=function e(r,t){var n=this.W;for(var i=0;i<16;i++)n[i]=r[t+i];for(;i<n.length;i++)n[i]=h(n[i-3]^n[i-8]^n[i-14]^n[i-16],1);var o=this.h[0];var a=this.h[1];var s=this.h[2];var u=this.h[3];var c=this.h[4];for(i=0;i<n.length;i++){var f=~~(i/20);var l=p(h(o,5),v(f,a,s,u),c,n[i],b[f]);c=u;u=s;s=h(a,30);a=o;o=l}this.h[0]=d(this.h[0],o);this.h[1]=d(this.h[1],a);this.h[2]=d(this.h[2],s);this.h[3]=d(this.h[3],u);this.h[4]=d(this.h[4],c)};s.prototype._digest=function e(r){if(r==="hex")return n.toHex32(this.h,"big");else return n.split32(this.h,"big")}},{"../common":243,"../utils":253,"./common":252}],248:[function(e,r,t){"use strict";var n=e("../utils");var i=e("./256");function o(){if(!(this instanceof o))return new o;i.call(this);this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i);r.exports=o;o.blockSize=512;o.outSize=224;o.hmacStrength=192;o.padLength=64;o.prototype._digest=function e(r){if(r==="hex")return n.toHex32(this.h.slice(0,7),"big");else return n.split32(this.h.slice(0,7),"big")}},{"../utils":253,"./256":249}],249:[function(e,r,t){"use strict";var n=e("../utils");var i=e("../common");var o=e("./common");var v=e("minimalistic-assert");var b=n.sum32;var g=n.sum32_4;var m=n.sum32_5;var y=o.ch32;var w=o.maj32;var _=o.s0_256;var S=o.s1_256;var A=o.g0_256;var E=o.g1_256;var a=i.BlockHash;var s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function u(){if(!(this instanceof u))return new u;a.call(this);this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];this.k=s;this.W=new Array(64)}n.inherits(u,a);r.exports=u;u.blockSize=512;u.outSize=256;u.hmacStrength=192;u.padLength=64;u.prototype._update=function e(r,t){var n=this.W;for(var i=0;i<16;i++)n[i]=r[t+i];for(;i<n.length;i++)n[i]=g(E(n[i-2]),n[i-7],A(n[i-15]),n[i-16]);var o=this.h[0];var a=this.h[1];var s=this.h[2];var u=this.h[3];var c=this.h[4];var f=this.h[5];var l=this.h[6];var h=this.h[7];v(this.k.length===n.length);for(i=0;i<n.length;i++){var d=m(h,S(c),y(c,f,l),this.k[i],n[i]);var p=b(_(o),w(o,a,s));h=l;l=f;f=c;c=b(u,d);u=s;s=a;a=o;o=b(d,p)}this.h[0]=b(this.h[0],o);this.h[1]=b(this.h[1],a);this.h[2]=b(this.h[2],s);this.h[3]=b(this.h[3],u);this.h[4]=b(this.h[4],c);this.h[5]=b(this.h[5],f);this.h[6]=b(this.h[6],l);this.h[7]=b(this.h[7],h)};u.prototype._digest=function e(r){if(r==="hex")return n.toHex32(this.h,"big");else return n.split32(this.h,"big")}},{"../common":243,"../utils":253,"./common":252,"minimalistic-assert":260}],250:[function(e,r,t){"use strict";var n=e("../utils");var i=e("./512");function o(){if(!(this instanceof o))return new o;i.call(this);this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i);r.exports=o;o.blockSize=1024;o.outSize=384;o.hmacStrength=192;o.padLength=128;o.prototype._digest=function e(r){if(r==="hex")return n.toHex32(this.h.slice(0,12),"big");else return n.split32(this.h.slice(0,12),"big")}},{"../utils":253,"./512":251}],251:[function(e,r,t){"use strict";var n=e("../utils");var i=e("../common");var j=e("minimalistic-assert");var a=n.rotr64_hi;var s=n.rotr64_lo;var u=n.shr64_hi;var c=n.shr64_lo;var x=n.sum64;var N=n.sum64_hi;var D=n.sum64_lo;var d=n.sum64_4_hi;var p=n.sum64_4_lo;var J=n.sum64_5_hi;var I=n.sum64_5_lo;var o=i.BlockHash;var f=[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 l(){if(!(this instanceof l))return new l;o.call(this);this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209];this.k=f;this.W=new Array(160)}n.inherits(l,o);r.exports=l;l.blockSize=1024;l.outSize=512;l.hmacStrength=192;l.padLength=128;l.prototype._prepareBlock=function e(r,t){var n=this.W;for(var i=0;i<32;i++)n[i]=r[t+i];for(;i<n.length;i+=2){var o=g(n[i-4],n[i-3]);var a=m(n[i-4],n[i-3]);var s=n[i-14];var u=n[i-13];var c=v(n[i-30],n[i-29]);var f=b(n[i-30],n[i-29]);var l=n[i-32];var h=n[i-31];n[i]=d(o,a,s,u,c,f,l,h);n[i+1]=p(o,a,s,u,c,f,l,h)}};l.prototype._update=function e(r,t){this._prepareBlock(r,t);var n=this.W;var i=this.h[0];var o=this.h[1];var a=this.h[2];var s=this.h[3];var u=this.h[4];var c=this.h[5];var f=this.h[6];var l=this.h[7];var h=this.h[8];var d=this.h[9];var p=this.h[10];var v=this.h[11];var b=this.h[12];var g=this.h[13];var m=this.h[14];var y=this.h[15];j(this.k.length===n.length);for(var w=0;w<n.length;w+=2){var _=m;var S=y;var A=Z(h,d);var E=K(h,d);var M=U(h,d,p,v,b,g);var P=H(h,d,p,v,b,g);var T=this.k[w];var k=this.k[w+1];var O=n[w];var B=n[w+1];var C=J(_,S,A,E,M,P,T,k,O,B);var R=I(_,S,A,E,M,P,T,k,O,B);_=z(i,o);S=V(i,o);A=X(i,o,a,s,u,c);E=G(i,o,a,s,u,c);var L=N(_,S,A,E);var F=D(_,S,A,E);m=b;y=g;b=p;g=v;p=h;v=d;h=N(f,l,C,R);d=D(l,l,C,R);f=u;l=c;u=a;c=s;a=i;s=o;i=N(C,R,L,F);o=D(C,R,L,F)}x(this.h,0,i,o);x(this.h,2,a,s);x(this.h,4,u,c);x(this.h,6,f,l);x(this.h,8,h,d);x(this.h,10,p,v);x(this.h,12,b,g);x(this.h,14,m,y)};l.prototype._digest=function e(r){if(r==="hex")return n.toHex32(this.h,"big");else return n.split32(this.h,"big")};function U(e,r,t,n,i){var o=e&t^~e&i;if(o<0)o+=4294967296;return o}function H(e,r,t,n,i,o){var a=r&n^~r&o;if(a<0)a+=4294967296;return a}function X(e,r,t,n,i){var o=e&t^e&i^t&i;if(o<0)o+=4294967296;return o}function G(e,r,t,n,i,o){var a=r&n^r&o^n&o;if(a<0)a+=4294967296;return a}function z(e,r){var t=a(e,r,28);var n=a(r,e,2);var i=a(r,e,7);var o=t^n^i;if(o<0)o+=4294967296;return o}function V(e,r){var t=s(e,r,28);var n=s(r,e,2);var i=s(r,e,7);var o=t^n^i;if(o<0)o+=4294967296;return o}function Z(e,r){var t=a(e,r,14);var n=a(e,r,18);var i=a(r,e,9);var o=t^n^i;if(o<0)o+=4294967296;return o}function K(e,r){var t=s(e,r,14);var n=s(e,r,18);var i=s(r,e,9);var o=t^n^i;if(o<0)o+=4294967296;return o}function v(e,r){var t=a(e,r,1);var n=a(e,r,8);var i=u(e,r,7);var o=t^n^i;if(o<0)o+=4294967296;return o}function b(e,r){var t=s(e,r,1);var n=s(e,r,8);var i=c(e,r,7);var o=t^n^i;if(o<0)o+=4294967296;return o}function g(e,r){var t=a(e,r,19);var n=a(r,e,29);var i=u(e,r,6);var o=t^n^i;if(o<0)o+=4294967296;return o}function m(e,r){var t=s(e,r,19);var n=s(r,e,29);var i=c(e,r,6);var o=t^n^i;if(o<0)o+=4294967296;return o}},{"../common":243,"../utils":253,"minimalistic-assert":260}],252:[function(e,r,t){"use strict";var n=e("../utils");var i=n.rotr32;function o(e,r,t,n){if(e===0)return a(r,t,n);if(e===1||e===3)return u(r,t,n);if(e===2)return s(r,t,n)}t.ft_1=o;function a(e,r,t){return e&r^~e&t}t.ch32=a;function s(e,r,t){return e&r^e&t^r&t}t.maj32=s;function u(e,r,t){return e^r^t}t.p32=u;function c(e){return i(e,2)^i(e,13)^i(e,22)}t.s0_256=c;function f(e){return i(e,6)^i(e,11)^i(e,25)}t.s1_256=f;function l(e){return i(e,7)^i(e,18)^e>>>3}t.g0_256=l;function h(e){return i(e,17)^i(e,19)^e>>>10}t.g1_256=h},{"../utils":253}],253:[function(e,r,t){"use strict";var c=e("minimalistic-assert");var n=e("inherits");t.inherits=n;function a(e,r){if((e.charCodeAt(r)&64512)!==55296){return false}if(r<0||r+1>=e.length){return false}return(e.charCodeAt(r+1)&64512)===56320}function i(e,r){if(Array.isArray(e))return e.slice();if(!e)return[];var t=[];if(typeof e==="string"){if(!r){var n=0;for(var i=0;i<e.length;i++){var o=e.charCodeAt(i);if(o<128){t[n++]=o}else if(o<2048){t[n++]=o>>6|192;t[n++]=o&63|128}else if(a(e,i)){o=65536+((o&1023)<<10)+(e.charCodeAt(++i)&1023);t[n++]=o>>18|240;t[n++]=o>>12&63|128;t[n++]=o>>6&63|128;t[n++]=o&63|128}else{t[n++]=o>>12|224;t[n++]=o>>6&63|128;t[n++]=o&63|128}}}else if(r==="hex"){e=e.replace(/[^a-z0-9]+/gi,"");if(e.length%2!==0)e="0"+e;for(i=0;i<e.length;i+=2)t.push(parseInt(e[i]+e[i+1],16))}}else{for(i=0;i<e.length;i++)t[i]=e[i]|0}return t}t.toArray=i;function o(e){var r="";for(var t=0;t<e.length;t++)r+=f(e[t].toString(16));return r}t.toHex=o;function s(e){var r=e>>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return r>>>0}t.htonl=s;function u(e,r){var t="";for(var n=0;n<e.length;n++){var i=e[n];if(r==="little")i=s(i);t+=l(i.toString(16))}return t}t.toHex32=u;function f(e){if(e.length===1)return"0"+e;else return e}t.zero2=f;function l(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=l;function h(e,r,t,n){var i=t-r;c(i%4===0);var o=new Array(i/4);for(var a=0,s=r;a<o.length;a++,s+=4){var u;if(n==="big")u=e[s]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3];else u=e[s+3]<<24|e[s+2]<<16|e[s+1]<<8|e[s];o[a]=u>>>0}return o}t.join32=h;function d(e,r){var t=new Array(e.length*4);for(var n=0,i=0;n<e.length;n++,i+=4){var o=e[n];if(r==="big"){t[i]=o>>>24;t[i+1]=o>>>16&255;t[i+2]=o>>>8&255;t[i+3]=o&255}else{t[i+3]=o>>>24;t[i+2]=o>>>16&255;t[i+1]=o>>>8&255;t[i]=o&255}}return t}t.split32=d;function p(e,r){return e>>>r|e<<32-r}t.rotr32=p;function v(e,r){return e<<r|e>>>32-r}t.rotl32=v;function b(e,r){return e+r>>>0}t.sum32=b;function g(e,r,t){return e+r+t>>>0}t.sum32_3=g;function m(e,r,t,n){return e+r+t+n>>>0}t.sum32_4=m;function y(e,r,t,n,i){return e+r+t+n+i>>>0}t.sum32_5=y;function w(e,r,t,n){var i=e[r];var o=e[r+1];var a=n+o>>>0;var s=(a<n?1:0)+t+i;e[r]=s>>>0;e[r+1]=a}t.sum64=w;function _(e,r,t,n){var i=r+n>>>0;var o=(i<r?1:0)+e+t;return o>>>0}t.sum64_hi=_;function S(e,r,t,n){var i=r+n;return i>>>0}t.sum64_lo=S;function A(e,r,t,n,i,o,a,s){var u=0;var c=r;c=c+n>>>0;u+=c<r?1:0;c=c+o>>>0;u+=c<o?1:0;c=c+s>>>0;u+=c<s?1:0;var f=e+t+i+a+u;return f>>>0}t.sum64_4_hi=A;function E(e,r,t,n,i,o,a,s){var u=r+n+o+s;return u>>>0}t.sum64_4_lo=E;function M(e,r,t,n,i,o,a,s,u,c){var f=0;var l=r;l=l+n>>>0;f+=l<r?1:0;l=l+o>>>0;f+=l<o?1:0;l=l+s>>>0;f+=l<s?1:0;l=l+c>>>0;f+=l<c?1:0;var h=e+t+i+a+u+f;return h>>>0}t.sum64_5_hi=M;function P(e,r,t,n,i,o,a,s,u,c){var f=r+n+o+s+c;return f>>>0}t.sum64_5_lo=P;function T(e,r,t){var n=r<<32-t|e>>>t;return n>>>0}t.rotr64_hi=T;function k(e,r,t){var n=e<<32-t|r>>>t;return n>>>0}t.rotr64_lo=k;function O(e,r,t){return e>>>t}t.shr64_hi=O;function B(e,r,t){var n=e<<32-t|r>>>t;return n>>>0}t.shr64_lo=B},{inherits:256,"minimalistic-assert":260}],254:[function(e,r,t){"use strict";var n=e("hash.js");var s=e("minimalistic-crypto-utils");var o=e("minimalistic-assert");function i(e){if(!(this instanceof i))return new i(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 r=s.toArray(e.entropy,e.entropyEnc||"hex");var t=s.toArray(e.nonce,e.nonceEnc||"hex");var n=s.toArray(e.pers,e.persEnc||"hex");o(r.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits");this._init(r,t,n)}r.exports=i;i.prototype._init=function e(r,t,n){var i=r.concat(t).concat(n);this.K=new Array(this.outLen/8);this.V=new Array(this.outLen/8);for(var o=0;o<this.V.length;o++){this.K[o]=0;this.V[o]=1}this._update(i);this._reseed=1;this.reseedInterval=281474976710656};i.prototype._hmac=function e(){return new n.hmac(this.hash,this.K)};i.prototype._update=function e(r){var t=this._hmac().update(this.V).update([0]);if(r)t=t.update(r);this.K=t.digest();this.V=this._hmac().update(this.V).digest();if(!r)return;this.K=this._hmac().update(this.V).update([1]).update(r).digest();this.V=this._hmac().update(this.V).digest()};i.prototype.reseed=function e(r,t,n,i){if(typeof t!=="string"){i=n;n=t;t=null}r=s.toArray(r,t);n=s.toArray(n,i);o(r.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits");this._update(r.concat(n||[]));this._reseed=1};i.prototype.generate=function e(r,t,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");if(typeof t!=="string"){i=n;n=t;t=null}if(n){n=s.toArray(n,i||"hex");this._update(n)}var o=[];while(o.length<r){this.V=this._hmac().update(this.V).digest();o=o.concat(this.V)}var a=o.slice(0,r);this._update(n);this._reseed++;return s.encode(a,t)}},{"hash.js":242,"minimalistic-assert":260,"minimalistic-crypto-utils":261}],255:[function(e,r,t){t.read=function(e,r,t,n,i){var o,a;var s=i*8-n-1;var u=(1<<s)-1;var c=u>>1;var f=-7;var l=t?i-1:0;var h=t?-1:1;var d=e[r+l];l+=h;o=d&(1<<-f)-1;d>>=-f;f+=s;for(;f>0;o=o*256+e[r+l],l+=h,f-=8){}a=o&(1<<-f)-1;o>>=-f;f+=n;for(;f>0;a=a*256+e[r+l],l+=h,f-=8){}if(o===0){o=1-c}else if(o===u){return a?NaN:(d?-1:1)*Infinity}else{a=a+Math.pow(2,n);o=o-c}return(d?-1:1)*a*Math.pow(2,o-n)};t.write=function(e,r,t,n,i,o){var a,s,u;var c=o*8-i-1;var f=(1<<c)-1;var l=f>>1;var h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0;var d=n?0:o-1;var p=n?1:-1;var v=r<0||r===0&&1/r<0?1:0;r=Math.abs(r);if(isNaN(r)||r===Infinity){s=isNaN(r)?1:0;a=f}else{a=Math.floor(Math.log(r)/Math.LN2);if(r*(u=Math.pow(2,-a))<1){a--;u*=2}if(a+l>=1){r+=h/u}else{r+=h*Math.pow(2,1-l)}if(r*u>=2){a++;u/=2}if(a+l>=f){s=0;a=f}else if(a+l>=1){s=(r*u-1)*Math.pow(2,i);a=a+l}else{s=r*Math.pow(2,l-1)*Math.pow(2,i);a=0}}for(;i>=8;e[t+d]=s&255,d+=p,s/=256,i-=8){}a=a<<i|s;c+=i;for(;c>0;e[t+d]=a&255,d+=p,a/=256,c-=8){}e[t+d-p]|=v*128}},{}],256:[function(e,r,t){if(typeof Object.create==="function"){r.exports=function e(r,t){if(t){r.super_=t;r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:false,writable:true,configurable:true}})}}}else{r.exports=function e(r,t){if(t){r.super_=t;var n=function(){};n.prototype=t.prototype;r.prototype=new n;r.prototype.constructor=r}}}},{}],257:[function(e,H,r){(function(I,U){(function(){(function(){"use strict";var l="input is invalid type";var h="finalize already called";var e=typeof window==="object";var r=e?window:{};if(r.JS_SHA3_NO_WINDOW){e=false}var t=!e&&typeof self==="object";var n=!r.JS_SHA3_NO_NODE_JS&&typeof I==="object"&&I.versions&&I.versions.node;if(n){r=U}else if(t){r=self}var i=!r.JS_SHA3_NO_COMMON_JS&&typeof H==="object"&&H.exports;var o=typeof X==="function"&&X.amd;var d=!r.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer!=="undefined";var u="0123456789abcdef".split("");var a=[31,7936,2031616,520093696];var s=[4,1024,262144,67108864];var c=[1,256,65536,16777216];var f=[6,1536,393216,100663296];var p=[0,8,16,24];var fe=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];var v=[224,256,384,512];var b=[128,256];var g=["hex","buffer","arrayBuffer","array","digest"];var m={128:168,256:136};if(r.JS_SHA3_NO_NODE_JS||!Array.isArray){Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"}}if(d&&(r.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)){ArrayBuffer.isView=function(e){return typeof e==="object"&&e.buffer&&e.buffer.constructor===ArrayBuffer}}var y=function(r,t,n){return function(e){return new N(r,t,r).update(e)[n]()}};var w=function(t,n,i){return function(e,r){return new N(t,n,r).update(e)[i]()}};var _=function(i,e,o){return function(e,r,t,n){return O["cshake"+i].update(e,r,t,n)[o]()}};var S=function(i,e,o){return function(e,r,t,n){return O["kmac"+i].update(e,r,t,n)[o]()}};var A=function(e,r,t,n){for(var i=0;i<g.length;++i){var o=g[i];e[o]=r(t,n,o)}return e};var E=function(e,r){var t=y(e,r,"hex");t.create=function(){return new N(e,r,e)};t.update=function(e){return t.create().update(e)};return A(t,y,e,r)};var M=function(r,t){var n=w(r,t,"hex");n.create=function(e){return new N(r,t,e)};n.update=function(e,r){return n.create(r).update(e)};return A(n,w,r,t)};var P=function(n,i){var o=m[n];var a=_(n,i,"hex");a.create=function(e,r,t){if(!r&&!t){return O["shake"+n].create(e)}else{return new N(n,i,e).bytepad([r,t],o)}};a.update=function(e,r,t,n){return a.create(r,t,n).update(e)};return A(a,_,n,i)};var T=function(n,i){var o=m[n];var a=S(n,i,"hex");a.create=function(e,r,t){return new D(n,i,r).bytepad(["KMAC",t],o).bytepad([e],o)};a.update=function(e,r,t,n){return a.create(e,t,n).update(r)};return A(a,S,n,i)};var k=[{name:"keccak",padding:c,bits:v,createMethod:E},{name:"sha3",padding:f,bits:v,createMethod:E},{name:"shake",padding:a,bits:b,createMethod:M},{name:"cshake",padding:s,bits:b,createMethod:P},{name:"kmac",padding:s,bits:b,createMethod:T}];var O={},B=[];for(var C=0;C<k.length;++C){var R=k[C];var L=R.bits;for(var F=0;F<L.length;++F){var j=R.name+"_"+L[F];B.push(j);O[j]=R.createMethod(L[F],R.padding);if(R.name!=="sha3"){var x=R.name+L[F];B.push(x);O[x]=O[j]}}}function N(e,r,t){this.blocks=[];this.s=[];this.padding=r;this.outputBits=t;this.reset=true;this.finalized=false;this.block=0;this.start=0;this.blockCount=1600-(e<<1)>>5;this.byteCount=this.blockCount<<2;this.outputBlocks=t>>5;this.extraBytes=(t&31)>>3;for(var n=0;n<50;++n){this.s[n]=0}}N.prototype.update=function(e){if(this.finalized){throw new Error(h)}var r,t=typeof e;if(t!=="string"){if(t==="object"){if(e===null){throw new Error(l)}else if(d&&e.constructor===ArrayBuffer){e=new Uint8Array(e)}else if(!Array.isArray(e)){if(!d||!ArrayBuffer.isView(e)){throw new Error(l)}}}else{throw new Error(l)}r=true}var n=this.blocks,i=this.byteCount,o=e.length,a=this.blockCount,s=0,u=this.s,c,f;while(s<o){if(this.reset){this.reset=false;n[0]=this.block;for(c=1;c<a+1;++c){n[c]=0}}if(r){for(c=this.start;s<o&&c<i;++s){n[c>>2]|=e[s]<<p[c++&3]}}else{for(c=this.start;s<o&&c<i;++s){f=e.charCodeAt(s);if(f<128){n[c>>2]|=f<<p[c++&3]}else if(f<2048){n[c>>2]|=(192|f>>6)<<p[c++&3];n[c>>2]|=(128|f&63)<<p[c++&3]}else if(f<55296||f>=57344){n[c>>2]|=(224|f>>12)<<p[c++&3];n[c>>2]|=(128|f>>6&63)<<p[c++&3];n[c>>2]|=(128|f&63)<<p[c++&3]}else{f=65536+((f&1023)<<10|e.charCodeAt(++s)&1023);n[c>>2]|=(240|f>>18)<<p[c++&3];n[c>>2]|=(128|f>>12&63)<<p[c++&3];n[c>>2]|=(128|f>>6&63)<<p[c++&3];n[c>>2]|=(128|f&63)<<p[c++&3]}}}this.lastByteIndex=c;if(c>=i){this.start=c-i;this.block=n[a];for(c=0;c<a;++c){u[c]^=n[c]}J(u);this.reset=true}else{this.start=c}}return this};N.prototype.encode=function(e,r){var t=e&255,n=1;var i=[t];e=e>>8;t=e&255;while(t>0){i.unshift(t);e=e>>8;t=e&255;++n}if(r){i.push(n)}else{i.unshift(n)}this.update(i);return i.length};N.prototype.encodeString=function(e){var r,t=typeof e;if(t!=="string"){if(t==="object"){if(e===null){throw new Error(l)}else if(d&&e.constructor===ArrayBuffer){e=new Uint8Array(e)}else if(!Array.isArray(e)){if(!d||!ArrayBuffer.isView(e)){throw new Error(l)}}}else{throw new Error(l)}r=true}var n=0,i=e.length;if(r){n=i}else{for(var o=0;o<e.length;++o){var a=e.charCodeAt(o);if(a<128){n+=1}else if(a<2048){n+=2}else if(a<55296||a>=57344){n+=3}else{a=65536+((a&1023)<<10|e.charCodeAt(++o)&1023);n+=4}}}n+=this.encode(n*8);this.update(e);return n};N.prototype.bytepad=function(e,r){var t=this.encode(r);for(var n=0;n<e.length;++n){t+=this.encodeString(e[n])}var i=r-t%r;var o=[];o.length=i;this.update(o);return this};N.prototype.finalize=function(){if(this.finalized){return}this.finalized=true;var e=this.blocks,r=this.lastByteIndex,t=this.blockCount,n=this.s;e[r>>2]|=this.padding[r&3];if(this.lastByteIndex===this.byteCount){e[0]=e[t];for(r=1;r<t+1;++r){e[r]=0}}e[t-1]|=2147483648;for(r=0;r<t;++r){n[r]^=e[r]}J(n)};N.prototype.toString=N.prototype.hex=function(){this.finalize();var e=this.blockCount,r=this.s,t=this.outputBlocks,n=this.extraBytes,i=0,o=0;var a="",s;while(o<t){for(i=0;i<e&&o<t;++i,++o){s=r[i];a+=u[s>>4&15]+u[s&15]+u[s>>12&15]+u[s>>8&15]+u[s>>20&15]+u[s>>16&15]+u[s>>28&15]+u[s>>24&15]}if(o%e===0){J(r);i=0}}if(n){s=r[i];a+=u[s>>4&15]+u[s&15];if(n>1){a+=u[s>>12&15]+u[s>>8&15]}if(n>2){a+=u[s>>20&15]+u[s>>16&15]}}return a};N.prototype.arrayBuffer=function(){this.finalize();var e=this.blockCount,r=this.s,t=this.outputBlocks,n=this.extraBytes,i=0,o=0;var a=this.outputBits>>3;var s;if(n){s=new ArrayBuffer(t+1<<2)}else{s=new ArrayBuffer(a)}var u=new Uint32Array(s);while(o<t){for(i=0;i<e&&o<t;++i,++o){u[o]=r[i]}if(o%e===0){J(r)}}if(n){u[i]=r[i];s=s.slice(0,a)}return s};N.prototype.buffer=N.prototype.arrayBuffer;N.prototype.digest=N.prototype.array=function(){this.finalize();var e=this.blockCount,r=this.s,t=this.outputBlocks,n=this.extraBytes,i=0,o=0;var a=[],s,u;while(o<t){for(i=0;i<e&&o<t;++i,++o){s=o<<2;u=r[i];a[s]=u&255;a[s+1]=u>>8&255;a[s+2]=u>>16&255;a[s+3]=u>>24&255}if(o%e===0){J(r)}}if(n){s=o<<2;u=r[i];a[s]=u&255;if(n>1){a[s+1]=u>>8&255}if(n>2){a[s+2]=u>>16&255}}return a};function D(e,r,t){N.call(this,e,r,t)}D.prototype=new N;D.prototype.finalize=function(){this.encode(this.outputBits,true);return N.prototype.finalize.call(this)};var J=function(e){var r,t,n,i,o,a,s,u,c,f,l,h,d,p,v,b,g,m,y,w,_,S,A,E,M,P,T,k,O,B,C,R,L,F,j,x,N,D,J,I,U,H,X,G,z,V,Z,K,q,Q,W,Y,$,ee,re,te,ne,ie,oe,ae,se,ue,ce;for(n=0;n<48;n+=2){i=e[0]^e[10]^e[20]^e[30]^e[40];o=e[1]^e[11]^e[21]^e[31]^e[41];a=e[2]^e[12]^e[22]^e[32]^e[42];s=e[3]^e[13]^e[23]^e[33]^e[43];u=e[4]^e[14]^e[24]^e[34]^e[44];c=e[5]^e[15]^e[25]^e[35]^e[45];f=e[6]^e[16]^e[26]^e[36]^e[46];l=e[7]^e[17]^e[27]^e[37]^e[47];h=e[8]^e[18]^e[28]^e[38]^e[48];d=e[9]^e[19]^e[29]^e[39]^e[49];r=h^(a<<1|s>>>31);t=d^(s<<1|a>>>31);e[0]^=r;e[1]^=t;e[10]^=r;e[11]^=t;e[20]^=r;e[21]^=t;e[30]^=r;e[31]^=t;e[40]^=r;e[41]^=t;r=i^(u<<1|c>>>31);t=o^(c<<1|u>>>31);e[2]^=r;e[3]^=t;e[12]^=r;e[13]^=t;e[22]^=r;e[23]^=t;e[32]^=r;e[33]^=t;e[42]^=r;e[43]^=t;r=a^(f<<1|l>>>31);t=s^(l<<1|f>>>31);e[4]^=r;e[5]^=t;e[14]^=r;e[15]^=t;e[24]^=r;e[25]^=t;e[34]^=r;e[35]^=t;e[44]^=r;e[45]^=t;r=u^(h<<1|d>>>31);t=c^(d<<1|h>>>31);e[6]^=r;e[7]^=t;e[16]^=r;e[17]^=t;e[26]^=r;e[27]^=t;e[36]^=r;e[37]^=t;e[46]^=r;e[47]^=t;r=f^(i<<1|o>>>31);t=l^(o<<1|i>>>31);e[8]^=r;e[9]^=t;e[18]^=r;e[19]^=t;e[28]^=r;e[29]^=t;e[38]^=r;e[39]^=t;e[48]^=r;e[49]^=t;p=e[0];v=e[1];V=e[11]<<4|e[10]>>>28;Z=e[10]<<4|e[11]>>>28;k=e[20]<<3|e[21]>>>29;O=e[21]<<3|e[20]>>>29;ae=e[31]<<9|e[30]>>>23;se=e[30]<<9|e[31]>>>23;H=e[40]<<18|e[41]>>>14;X=e[41]<<18|e[40]>>>14;F=e[2]<<1|e[3]>>>31;j=e[3]<<1|e[2]>>>31;b=e[13]<<12|e[12]>>>20;g=e[12]<<12|e[13]>>>20;K=e[22]<<10|e[23]>>>22;q=e[23]<<10|e[22]>>>22;B=e[33]<<13|e[32]>>>19;C=e[32]<<13|e[33]>>>19;ue=e[42]<<2|e[43]>>>30;ce=e[43]<<2|e[42]>>>30;ee=e[5]<<30|e[4]>>>2;re=e[4]<<30|e[5]>>>2;x=e[14]<<6|e[15]>>>26;N=e[15]<<6|e[14]>>>26;m=e[25]<<11|e[24]>>>21;y=e[24]<<11|e[25]>>>21;Q=e[34]<<15|e[35]>>>17;W=e[35]<<15|e[34]>>>17;R=e[45]<<29|e[44]>>>3;L=e[44]<<29|e[45]>>>3;E=e[6]<<28|e[7]>>>4;M=e[7]<<28|e[6]>>>4;te=e[17]<<23|e[16]>>>9;ne=e[16]<<23|e[17]>>>9;D=e[26]<<25|e[27]>>>7;J=e[27]<<25|e[26]>>>7;w=e[36]<<21|e[37]>>>11;_=e[37]<<21|e[36]>>>11;Y=e[47]<<24|e[46]>>>8;$=e[46]<<24|e[47]>>>8;G=e[8]<<27|e[9]>>>5;z=e[9]<<27|e[8]>>>5;P=e[18]<<20|e[19]>>>12;T=e[19]<<20|e[18]>>>12;ie=e[29]<<7|e[28]>>>25;oe=e[28]<<7|e[29]>>>25;I=e[38]<<8|e[39]>>>24;U=e[39]<<8|e[38]>>>24;S=e[48]<<14|e[49]>>>18;A=e[49]<<14|e[48]>>>18;e[0]=p^~b&m;e[1]=v^~g&y;e[10]=E^~P&k;e[11]=M^~T&O;e[20]=F^~x&D;e[21]=j^~N&J;e[30]=G^~V&K;e[31]=z^~Z&q;e[40]=ee^~te&ie;e[41]=re^~ne&oe;e[2]=b^~m&w;e[3]=g^~y&_;e[12]=P^~k&B;e[13]=T^~O&C;e[22]=x^~D&I;e[23]=N^~J&U;e[32]=V^~K&Q;e[33]=Z^~q&W;e[42]=te^~ie&ae;e[43]=ne^~oe&se;e[4]=m^~w&S;e[5]=y^~_&A;e[14]=k^~B&R;e[15]=O^~C&L;e[24]=D^~I&H;e[25]=J^~U&X;e[34]=K^~Q&Y;e[35]=q^~W&$;e[44]=ie^~ae&ue;e[45]=oe^~se&ce;e[6]=w^~S&p;e[7]=_^~A&v;e[16]=B^~R&E;e[17]=C^~L&M;e[26]=I^~H&F;e[27]=U^~X&j;e[36]=Q^~Y&G;e[37]=W^~$&z;e[46]=ae^~ueⅇe[47]=se^~ce&re;e[8]=S^~p&b;e[9]=A^~v&g;e[18]=R^~E&P;e[19]=L^~M&T;e[28]=H^~F&x;e[29]=X^~j&N;e[38]=Y^~G&V;e[39]=$^~z&Z;e[48]=ue^~ee&te;e[49]=ce^~re≠e[0]^=fe[n];e[1]^=fe[n+1]}};if(i){H.exports=O}else{for(C=0;C<B.length;++C){r[B[C]]=O[B[C]]}if(o){X(function(){return O})}}})()}).call(this)}).call(this,e("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{_process:273}],258:[function(e,r,t){"use strict";var n=e("inherits");var i=e("hash-base");var o=e("safe-buffer").Buffer;var a=new Array(16);function s(){i.call(this,64);this._a=1732584193;this._b=4023233417;this._c=2562383102;this._d=271733878}n(s,i);s.prototype._update=function(){var e=a;for(var r=0;r<16;++r)e[r]=this._block.readInt32LE(r*4);var t=this._a;var n=this._b;var i=this._c;var o=this._d;t=c(t,n,i,o,e[0],3614090360,7);o=c(o,t,n,i,e[1],3905402710,12);i=c(i,o,t,n,e[2],606105819,17);n=c(n,i,o,t,e[3],3250441966,22);t=c(t,n,i,o,e[4],4118548399,7);o=c(o,t,n,i,e[5],1200080426,12);i=c(i,o,t,n,e[6],2821735955,17);n=c(n,i,o,t,e[7],4249261313,22);t=c(t,n,i,o,e[8],1770035416,7);o=c(o,t,n,i,e[9],2336552879,12);i=c(i,o,t,n,e[10],4294925233,17);n=c(n,i,o,t,e[11],2304563134,22);t=c(t,n,i,o,e[12],1804603682,7);o=c(o,t,n,i,e[13],4254626195,12);i=c(i,o,t,n,e[14],2792965006,17);n=c(n,i,o,t,e[15],1236535329,22);t=f(t,n,i,o,e[1],4129170786,5);o=f(o,t,n,i,e[6],3225465664,9);i=f(i,o,t,n,e[11],643717713,14);n=f(n,i,o,t,e[0],3921069994,20);t=f(t,n,i,o,e[5],3593408605,5);o=f(o,t,n,i,e[10],38016083,9);i=f(i,o,t,n,e[15],3634488961,14);n=f(n,i,o,t,e[4],3889429448,20);t=f(t,n,i,o,e[9],568446438,5);o=f(o,t,n,i,e[14],3275163606,9);i=f(i,o,t,n,e[3],4107603335,14);n=f(n,i,o,t,e[8],1163531501,20);t=f(t,n,i,o,e[13],2850285829,5);o=f(o,t,n,i,e[2],4243563512,9);i=f(i,o,t,n,e[7],1735328473,14);n=f(n,i,o,t,e[12],2368359562,20);t=l(t,n,i,o,e[5],4294588738,4);o=l(o,t,n,i,e[8],2272392833,11);i=l(i,o,t,n,e[11],1839030562,16);n=l(n,i,o,t,e[14],4259657740,23);t=l(t,n,i,o,e[1],2763975236,4);o=l(o,t,n,i,e[4],1272893353,11);i=l(i,o,t,n,e[7],4139469664,16);n=l(n,i,o,t,e[10],3200236656,23);t=l(t,n,i,o,e[13],681279174,4);o=l(o,t,n,i,e[0],3936430074,11);i=l(i,o,t,n,e[3],3572445317,16);n=l(n,i,o,t,e[6],76029189,23);t=l(t,n,i,o,e[9],3654602809,4);o=l(o,t,n,i,e[12],3873151461,11);i=l(i,o,t,n,e[15],530742520,16);n=l(n,i,o,t,e[2],3299628645,23);t=h(t,n,i,o,e[0],4096336452,6);o=h(o,t,n,i,e[7],1126891415,10);i=h(i,o,t,n,e[14],2878612391,15);n=h(n,i,o,t,e[5],4237533241,21);t=h(t,n,i,o,e[12],1700485571,6);o=h(o,t,n,i,e[3],2399980690,10);i=h(i,o,t,n,e[10],4293915773,15);n=h(n,i,o,t,e[1],2240044497,21);t=h(t,n,i,o,e[8],1873313359,6);o=h(o,t,n,i,e[15],4264355552,10);i=h(i,o,t,n,e[6],2734768916,15);n=h(n,i,o,t,e[13],1309151649,21);t=h(t,n,i,o,e[4],4149444226,6);o=h(o,t,n,i,e[11],3174756917,10);i=h(i,o,t,n,e[2],718787259,15);n=h(n,i,o,t,e[9],3951481745,21);this._a=this._a+t|0;this._b=this._b+n|0;this._c=this._c+i|0;this._d=this._d+o|0};s.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=o.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 u(e,r){return e<<r|e>>>32-r}function c(e,r,t,n,i,o,a){return u(e+(r&t|~r&n)+i+o|0,a)+r|0}function f(e,r,t,n,i,o,a){return u(e+(r&n|t&~n)+i+o|0,a)+r|0}function l(e,r,t,n,i,o,a){return u(e+(r^t^n)+i+o|0,a)+r|0}function h(e,r,t,n,i,o,a){return u(e+(t^(r|~n))+i+o|0,a)+r|0}r.exports=s},{"hash-base":226,inherits:256,"safe-buffer":283}],259:[function(e,r,t){var v=e("bn.js");var n=e("brorand");function i(e){this.rand=e||new n.Rand}r.exports=i;i.create=function e(r){return new i(r)};i.prototype._randbelow=function e(r){var t=r.bitLength();var n=Math.ceil(t/8);do{var i=new v(this.rand.generate(n))}while(i.cmp(r)>=0);return i};i.prototype._randrange=function e(r,t){var n=t.sub(r);return r.add(this._randbelow(n))};i.prototype.test=function e(r,t,n){var i=r.bitLength();var o=v.mont(r);var a=new v(1).toRed(o);if(!t)t=Math.max(1,i/48|0);var s=r.subn(1);for(var u=0;!s.testn(u);u++){}var c=r.shrn(u);var f=s.toRed(o);var l=true;for(;t>0;t--){var h=this._randrange(new v(2),s);if(n)n(h);var d=h.toRed(o).redPow(c);if(d.cmp(a)===0||d.cmp(f)===0)continue;for(var p=1;p<u;p++){d=d.redSqr();if(d.cmp(a)===0)return false;if(d.cmp(f)===0)break}if(p===u)return false}return l};i.prototype.getDivisor=function e(r,t){var n=r.bitLength();var i=v.mont(r);var o=new v(1).toRed(i);if(!t)t=Math.max(1,n/48|0);var a=r.subn(1);for(var s=0;!a.testn(s);s++){}var u=r.shrn(s);var c=a.toRed(i);for(;t>0;t--){var f=this._randrange(new v(2),a);var l=r.gcd(f);if(l.cmpn(1)!==0)return l;var h=f.toRed(i).redPow(u);if(h.cmp(o)===0||h.cmp(c)===0)continue;for(var d=1;d<s;d++){h=h.redSqr();if(h.cmp(o)===0)return h.fromRed().subn(1).gcd(r);if(h.cmp(c)===0)break}if(d===s){h=h.redSqr();return h.fromRed().subn(1).gcd(r)}}return false}},{"bn.js":138,brorand:139}],260:[function(e,r,t){r.exports=n;function n(e,r){if(!e)throw new Error(r||"Assertion failed")}n.equal=function e(r,t,n){if(r!=t)throw new Error(n||"Assertion failed: "+r+" != "+t)}},{}],261:[function(e,r,t){"use strict";var n=t;function i(e,r){if(Array.isArray(e))return e.slice();if(!e)return[];var t=[];if(typeof e!=="string"){for(var n=0;n<e.length;n++)t[n]=e[n]|0;return t}if(r==="hex"){e=e.replace(/[^a-z0-9]+/gi,"");if(e.length%2!==0)e="0"+e;for(var n=0;n<e.length;n+=2)t.push(parseInt(e[n]+e[n+1],16))}else{for(var n=0;n<e.length;n++){var i=e.charCodeAt(n);var o=i>>8;var a=i&255;if(o)t.push(o,a);else t.push(a)}}return t}n.toArray=i;function o(e){if(e.length===1)return"0"+e;else return e}n.zero2=o;function a(e){var r="";for(var t=0;t<e.length;t++)r+=o(e[t].toString(16));return r}n.toHex=a;n.encode=function e(r,t){if(t==="hex")return a(r);else return r}},{}],262:[function(e,r,t){r.exports={"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"}},{}],263:[function(e,r,t){"use strict";var n=e("asn1.js");t.certificate=e("./certificate");var i=n.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});t.RSAPrivateKey=i;var o=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});t.RSAPublicKey=o;var a=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())});t.PublicKey=a;var s=n.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 u=n.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())});t.PrivateKey=u;var c=n.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=c;var f=n.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=f;t.DSAparam=n.define("DSAparam",function(){this.int()});var l=n.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(h),this.key("publicKey").optional().explicit(1).bitstr())});t.ECPrivateKey=l;var h=n.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});t.signature=n.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"./certificate":264,"asn1.js":122}],264:[function(e,r,t){"use strict";var n=e("asn1.js");var i=n.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})});var o=n.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())});var a=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())});var s=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())});var u=n.define("RelativeDistinguishedName",function(){this.setof(o)});var c=n.define("RDNSequence",function(){this.seqof(u)});var f=n.define("Name",function(){this.choice({rdnSequence:this.use(c)})});var l=n.define("Validity",function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))});var h=n.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(false),this.key("extnValue").octstr())});var d=n.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(f),this.key("validity").use(l),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(h).optional())});var p=n.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())});r.exports=p},{"asn1.js":122}],265:[function(e,r,t){var d=/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 p=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m;var v=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m;var b=e("evp_bytestokey");var g=e("browserify-aes");var m=e("safe-buffer").Buffer;r.exports=function(e,r){var t=e.toString();var n=t.match(d);var i;if(!n){var o=t.match(v);i=m.from(o[2].replace(/[\r\n]/g,""),"base64")}else{var a="aes"+n[1];var s=m.from(n[2],"hex");var u=m.from(n[3].replace(/[\r\n]/g,""),"base64");var c=b(r,s.slice(0,8),parseInt(n[1],10)).key;var f=[];var l=g.createDecipheriv(a,c,s);f.push(l.update(u));f.push(l.final());i=m.concat(f)}var h=t.match(p)[1];return{tag:h,data:i}}},{"browserify-aes":143,evp_bytestokey:225,"safe-buffer":283}],266:[function(e,r,t){var s=e("./asn1");var l=e("./aesid.json");var u=e("./fixProc");var h=e("browserify-aes");var d=e("pbkdf2");var p=e("safe-buffer").Buffer;r.exports=n;function n(e){var r;if(typeof e==="object"&&!p.isBuffer(e)){r=e.passphrase;e=e.key}if(typeof e==="string"){e=p.from(e)}var t=u(e,r);var n=t.tag;var i=t.data;var o,a;switch(n){case"CERTIFICATE":a=s.certificate.decode(i,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":if(!a){a=s.PublicKey.decode(i,"der")}o=a.algorithm.algorithm.join(".");switch(o){case"1.2.840.113549.1.1.1":return s.RSAPublicKey.decode(a.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":a.subjectPrivateKey=a.subjectPublicKey;return{type:"ec",data:a};case"1.2.840.10040.4.1":a.algorithm.params.pub_key=s.DSAparam.decode(a.subjectPublicKey.data,"der");return{type:"dsa",data:a.algorithm.params};default:throw new Error("unknown key id "+o)}case"ENCRYPTED PRIVATE KEY":i=s.EncryptedPrivateKey.decode(i,"der");i=c(i,r);case"PRIVATE KEY":a=s.PrivateKey.decode(i,"der");o=a.algorithm.algorithm.join(".");switch(o){case"1.2.840.113549.1.1.1":return s.RSAPrivateKey.decode(a.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:a.algorithm.curve,privateKey:s.ECPrivateKey.decode(a.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":a.algorithm.params.priv_key=s.DSAparam.decode(a.subjectPrivateKey,"der");return{type:"dsa",params:a.algorithm.params};default:throw new Error("unknown key id "+o)}case"RSA PUBLIC KEY":return s.RSAPublicKey.decode(i,"der");case"RSA PRIVATE KEY":return s.RSAPrivateKey.decode(i,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:s.DSAPrivateKey.decode(i,"der")};case"EC PRIVATE KEY":i=s.ECPrivateKey.decode(i,"der");return{curve:i.parameters.value,privateKey:i.privateKey};default:throw new Error("unknown key type "+n)}}n.signature=s.signature;function c(e,r){var t=e.algorithm.decrypt.kde.kdeparams.salt;var n=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10);var i=l[e.algorithm.decrypt.cipher.algo.join(".")];var o=e.algorithm.decrypt.cipher.iv;var a=e.subjectPrivateKey;var s=parseInt(i.split("-")[1],10)/8;var u=d.pbkdf2Sync(r,t,n,s,"sha1");var c=h.createDecipheriv(i,u,o);var f=[];f.push(c.update(a));f.push(c.final());return p.concat(f)}},{"./aesid.json":262,"./asn1":263,"./fixProc":265,"browserify-aes":143,pbkdf2:267,"safe-buffer":283}],267:[function(e,r,t){t.pbkdf2=e("./lib/async");t.pbkdf2Sync=e("./lib/sync")},{"./lib/async":268,"./lib/sync":271}],268:[function(i,s,e){(function(b){(function(){var o=i("safe-buffer").Buffer;var e=i("./precondition");var u=i("./default-encoding");var c=i("./sync");var f=i("./to-buffer");var t;var a=b.crypto&&b.crypto.subtle;var l={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 n=[];function h(e){if(b.process&&!b.process.browser){return Promise.resolve(false)}if(!a||!a.importKey||!a.deriveBits){return Promise.resolve(false)}if(n[e]!==undefined){return n[e]}t=t||o.alloc(8);var r=p(t,t,10,128,e).then(function(){return true}).catch(function(){return false});n[e]=r;return r}var r;function d(){if(r){return r}if(b.process&&b.process.nextTick){r=b.process.nextTick}else if(b.queueMicrotask){r=b.queueMicrotask}else if(b.setImmediate){r=b.setImmediate}else{r=b.setTimeout}return r}function p(e,r,t,n,i){return a.importKey("raw",e,{name:"PBKDF2"},false,["deriveBits"]).then(function(e){return a.deriveBits({name:"PBKDF2",salt:r,iterations:t,hash:{name:i}},e,n<<3)}).then(function(e){return o.from(e)})}function v(e,r){e.then(function(e){d()(function(){r(null,e)})},function(e){d()(function(){r(e)})})}s.exports=function(r,t,n,i,o,a){if(typeof o==="function"){a=o;o=undefined}o=o||"sha1";var s=l[o.toLowerCase()];if(!s||typeof b.Promise!=="function"){d()(function(){var e;try{e=c(r,t,n,i,o)}catch(e){return a(e)}a(null,e)});return}e(n,i);r=f(r,u,"Password");t=f(t,u,"Salt");if(typeof a!=="function")throw new Error("No callback provided to pbkdf2");v(h(s).then(function(e){if(e)return p(r,t,n,i,s);return c(r,t,n,i,o)}),a)}}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./default-encoding":269,"./precondition":270,"./sync":271,"./to-buffer":272,"safe-buffer":283}],269:[function(e,i,r){(function(t,n){(function(){var e;if(n.process&&n.process.browser){e="utf-8"}else if(n.process&&n.process.version){var r=parseInt(t.version.split(".")[0].slice(1),10);e=r>=6?"utf-8":"binary"}else{e="utf-8"}i.exports=e}).call(this)}).call(this,e("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{_process:273}],270:[function(e,r,t){var n=Math.pow(2,30)-1;r.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>n||r!==r){throw new TypeError("Bad key length")}}},{}],271:[function(e,r,t){var n=e("create-hash/md5");var i=e("ripemd160");var o=e("sha.js");var b=e("safe-buffer").Buffer;var g=e("./precondition");var m=e("./default-encoding");var y=e("./to-buffer");var c=b.alloc(128);var w={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function _(e,r,t){var n=f(e);var i=e==="sha512"||e==="sha384"?128:64;if(r.length>i){r=n(r)}else if(r.length<i){r=b.concat([r,c],i)}var o=b.allocUnsafe(i+w[e]);var a=b.allocUnsafe(i+w[e]);for(var s=0;s<i;s++){o[s]=r[s]^54;a[s]=r[s]^92}var u=b.allocUnsafe(i+t+4);o.copy(u,0,0,i);this.ipad1=u;this.ipad2=o;this.opad=a;this.alg=e;this.blocksize=i;this.hash=n;this.size=w[e]}_.prototype.run=function(e,r){e.copy(r,this.blocksize);var t=this.hash(r);t.copy(this.opad,this.blocksize);return this.hash(this.opad)};function f(r){function e(e){return o(r).update(e).digest()}function t(e){return(new i).update(e).digest()}if(r==="rmd160"||r==="ripemd160")return t;if(r==="md5")return n;return e}function a(e,r,t,n,i){g(t,n);e=y(e,m,"Password");r=y(r,m,"Salt");i=i||"sha1";var o=new _(i,e,r.length);var a=b.allocUnsafe(n);var s=b.allocUnsafe(r.length+4);r.copy(s,0,0,r.length);var u=0;var c=w[i];var f=Math.ceil(n/c);for(var l=1;l<=f;l++){s.writeUInt32BE(l,r.length);var h=o.run(s,o.ipad1);var d=h;for(var p=1;p<t;p++){d=o.run(d,o.ipad2);for(var v=0;v<c;v++)h[v]^=d[v]}h.copy(a,u);u+=c}return a}r.exports=a},{"./default-encoding":269,"./precondition":270,"./to-buffer":272,"create-hash/md5":190,ripemd160:282,"safe-buffer":283,"sha.js":287}],272:[function(e,r,t){var n=e("safe-buffer").Buffer;r.exports=function(e,r,t){if(n.isBuffer(e)){return e}else if(typeof e==="string"){return n.from(e,r)}else if(ArrayBuffer.isView(e)){return n.from(e.buffer)}else{throw new TypeError(t+" must be a string, a Buffer, a typed array or a DataView")}}},{"safe-buffer":283}],273:[function(e,r,t){var n=r.exports={};var i;var o;function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}(function(){try{if(typeof setTimeout==="function"){i=setTimeout}else{i=a}}catch(e){i=a}try{if(typeof clearTimeout==="function"){o=clearTimeout}else{o=s}}catch(e){o=s}})();function u(r){if(i===setTimeout){return setTimeout(r,0)}if((i===a||!i)&&setTimeout){i=setTimeout;return setTimeout(r,0)}try{return i(r,0)}catch(e){try{return i.call(null,r,0)}catch(e){return i.call(this,r,0)}}}function c(r){if(o===clearTimeout){return clearTimeout(r)}if((o===s||!o)&&clearTimeout){o=clearTimeout;return clearTimeout(r)}try{return o(r)}catch(e){try{return o.call(null,r)}catch(e){return o.call(this,r)}}}var f=[];var l=false;var h;var d=-1;function p(){if(!l||!h){return}l=false;if(h.length){f=h.concat(f)}else{d=-1}if(f.length){v()}}function v(){if(l){return}var e=u(p);l=true;var r=f.length;while(r){h=f;f=[];while(++d<r){if(h){h[d].run()}}d=-1;r=f.length}h=null;l=false;c(e)}n.nextTick=function(e){var r=new Array(arguments.length-1);if(arguments.length>1){for(var t=1;t<arguments.length;t++){r[t-1]=arguments[t]}}f.push(new b(e,r));if(f.length===1&&!l){u(v)}};function b(e,r){this.fun=e;this.array=r}b.prototype.run=function(){this.fun.apply(null,this.array)};n.title="browser";n.browser=true;n.env={};n.argv=[];n.version="";n.versions={};function g(){}n.on=g;n.addListener=g;n.once=g;n.off=g;n.removeListener=g;n.removeAllListeners=g;n.emit=g;n.prependListener=g;n.prependOnceListener=g;n.listeners=function(e){return[]};n.binding=function(e){throw new Error("process.binding is not supported")};n.cwd=function(){return"/"};n.chdir=function(e){throw new Error("process.chdir is not supported")};n.umask=function(){return 0}},{}],274:[function(e,r,n){n.publicEncrypt=e("./publicEncrypt");n.privateDecrypt=e("./privateDecrypt");n.privateEncrypt=function e(r,t){return n.publicEncrypt(r,t,true)};n.publicDecrypt=function e(r,t){return n.privateDecrypt(r,t,true)}},{"./privateDecrypt":276,"./publicEncrypt":277}],275:[function(e,r,t){var o=e("create-hash");var a=e("safe-buffer").Buffer;r.exports=function(e,r){var t=a.alloc(0);var n=0;var i;while(t.length<r){i=s(n++);t=a.concat([t,o("sha1").update(e).update(i).digest()])}return t.slice(0,r)};function s(e){var r=a.allocUnsafe(4);r.writeUInt32BE(e,0);return r}},{"create-hash":189,"safe-buffer":283}],276:[function(e,r,t){var c=e("parse-asn1");var f=e("./mgf");var l=e("./xor");var h=e("bn.js");var d=e("browserify-rsa");var p=e("create-hash");var v=e("./withPublic");var b=e("safe-buffer").Buffer;r.exports=function e(r,t,n){var i;if(r.padding){i=r.padding}else if(n){i=1}else{i=4}var o=c(r);var a=o.modulus.byteLength();if(t.length>a||new h(t).cmp(o.modulus)>=0){throw new Error("decryption error")}var s;if(n){s=v(new h(t),o)}else{s=d(t,o)}var u=b.alloc(a-s.length);s=b.concat([u,s],a);if(i===4){return g(o,s)}else if(i===1){return m(o,s,n)}else if(i===3){return s}else{throw new Error("unknown padding")}};function g(e,r){var t=e.modulus.byteLength();var n=p("sha1").update(b.alloc(0)).digest();var i=n.length;if(r[0]!==0){throw new Error("decryption error")}var o=r.slice(1,i+1);var a=r.slice(i+1);var s=l(o,f(a,i));var u=l(a,f(s,t-i-1));if(y(n,u.slice(0,i))){throw new Error("decryption error")}var c=i;while(u[c]===0){c++}if(u[c++]!==1){throw new Error("decryption error")}return u.slice(c)}function m(e,r,t){var n=r.slice(0,2);var i=2;var o=0;while(r[i++]!==0){if(i>=r.length){o++;break}}var a=r.slice(2,i-1);if(n.toString("hex")!=="0002"&&!t||n.toString("hex")!=="0001"&&t){o++}if(a.length<8){o++}if(o){throw new Error("decryption error")}return r.slice(i)}function y(e,r){e=b.from(e);r=b.from(r);var t=0;var n=e.length;if(e.length!==r.length){t++;n=Math.min(e.length,r.length)}var i=-1;while(++i<n){t+=e[i]^r[i]}return t}},{"./mgf":275,"./withPublic":278,"./xor":279,"bn.js":138,"browserify-rsa":161,"create-hash":189,"parse-asn1":266,"safe-buffer":283}],277:[function(e,r,t){var s=e("parse-asn1");var h=e("randombytes");var d=e("create-hash");var p=e("./mgf");var v=e("./xor");var b=e("bn.js");var u=e("./withPublic");var c=e("browserify-rsa");var g=e("safe-buffer").Buffer;r.exports=function e(r,t,n){var i;if(r.padding){i=r.padding}else if(n){i=1}else{i=4}var o=s(r);var a;if(i===4){a=f(o,t)}else if(i===1){a=l(o,t,n)}else if(i===3){a=new b(t);if(a.cmp(o.modulus)>=0){throw new Error("data too long for modulus")}}else{throw new Error("unknown padding")}if(n){return c(a,o)}else{return u(a,o)}};function f(e,r){var t=e.modulus.byteLength();var n=r.length;var i=d("sha1").update(g.alloc(0)).digest();var o=i.length;var a=2*o;if(n>t-a-2){throw new Error("message too long")}var s=g.alloc(t-n-a-2);var u=t-o-1;var c=h(o);var f=v(g.concat([i,s,g.alloc(1,1),r],u),p(c,u));var l=v(c,p(f,o));return new b(g.concat([g.alloc(1),l,f],t))}function l(e,r,t){var n=r.length;var i=e.modulus.byteLength();if(n>i-11){throw new Error("message too long")}var o;if(t){o=g.alloc(i-n-3,255)}else{o=a(i-n-3)}return new b(g.concat([g.from([0,t?1:2]),o,g.alloc(1),r],i))}function a(e){var r=g.allocUnsafe(e);var t=0;var n=h(e*2);var i=0;var o;while(t<e){if(i===n.length){n=h(e*2);i=0}o=n[i++];if(o){r[t++]=o}}return r}},{"./mgf":275,"./withPublic":278,"./xor":279,"bn.js":138,"browserify-rsa":161,"create-hash":189,"parse-asn1":266,randombytes:280,"safe-buffer":283}],278:[function(e,r,t){var n=e("bn.js");var i=e("safe-buffer").Buffer;function o(e,r){return i.from(e.toRed(n.mont(r.modulus)).redPow(new n(r.publicExponent)).fromRed().toArray())}r.exports=o},{"bn.js":138,"safe-buffer":283}],279:[function(e,r,t){r.exports=function e(r,t){var n=r.length;var i=-1;while(++i<n){r[i]^=t[i]}return r}},{}],280:[function(n,c,e){(function(u,t){(function(){"use strict";var i=65536;var o=4294967295;function e(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}var a=n("safe-buffer").Buffer;var s=t.crypto||t.msCrypto;if(s&&s.getRandomValues){c.exports=r}else{c.exports=e}function r(e,r){if(e>o)throw new RangeError("requested too many random bytes");var t=a.allocUnsafe(e);if(e>0){if(e>i){for(var n=0;n<e;n+=i){s.getRandomValues(t.slice(n,n+i))}}else{s.getRandomValues(t)}}if(typeof r==="function"){return u.nextTick(function(){r(null,t)})}return t}}).call(this)}).call(this,n("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{_process:273,"safe-buffer":283}],281:[function(p,e,v){(function(h,d){(function(){"use strict";function e(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var r=p("safe-buffer");var s=p("randombytes");var i=r.Buffer;var n=r.kMaxLength;var u=d.crypto||d.msCrypto;var o=Math.pow(2,32)-1;function a(e,r){if(typeof e!=="number"||e!==e){throw new TypeError("offset must be a number")}if(e>o||e<0){throw new TypeError("offset must be a uint32")}if(e>n||e>r){throw new RangeError("offset out of range")}}function c(e,r,t){if(typeof e!=="number"||e!==e){throw new TypeError("size must be a number")}if(e>o||e<0){throw new TypeError("size must be a uint32")}if(e+r>t||e>n){throw new RangeError("buffer too small")}}if(u&&u.getRandomValues||!h.browser){v.randomFill=t;v.randomFillSync=l}else{v.randomFill=e;v.randomFillSync=e}function t(e,r,t,n){if(!i.isBuffer(e)&&!(e instanceof d.Uint8Array)){throw new TypeError('"buf" argument must be a Buffer or Uint8Array')}if(typeof r==="function"){n=r;r=0;t=e.length}else if(typeof t==="function"){n=t;t=e.length-r}else if(typeof n!=="function"){throw new TypeError('"cb" argument must be a function')}a(r,e.length);c(t,r,e.length);return f(e,r,t,n)}function f(t,n,e,i){if(h.browser){var r=t.buffer;var o=new Uint8Array(r,n,e);u.getRandomValues(o);if(i){h.nextTick(function(){i(null,t)});return}return t}if(i){s(e,function(e,r){if(e){return i(e)}r.copy(t,n);i(null,t)});return}var a=s(e);a.copy(t,n);return t}function l(e,r,t){if(typeof r==="undefined"){r=0}if(!i.isBuffer(e)&&!(e instanceof d.Uint8Array)){throw new TypeError('"buf" argument must be a Buffer or Uint8Array')}a(r,e.length);if(t===undefined)t=e.length-r;c(t,r,e.length);return f(e,r,t)}}).call(this)}).call(this,p("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{_process:273,randombytes:280,"safe-buffer":283}],282:[function(e,r,t){"use strict";var n=e("buffer").Buffer;var i=e("inherits");var o=e("hash-base");var b=new Array(16);var g=[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 m=[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 y=[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 w=[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];var _=[0,1518500249,1859775393,2400959708,2840853838];var S=[1352829926,1548603684,1836072691,2053994217,0];function a(){o.call(this,64);this._a=1732584193;this._b=4023233417;this._c=2562383102;this._d=271733878;this._e=3285377520}i(a,o);a.prototype._update=function(){var e=b;for(var r=0;r<16;++r)e[r]=this._block.readInt32LE(r*4);var t=this._a|0;var n=this._b|0;var i=this._c|0;var o=this._d|0;var a=this._e|0;var s=this._a|0;var u=this._b|0;var c=this._c|0;var f=this._d|0;var l=this._e|0;for(var h=0;h<80;h+=1){var d;var p;if(h<16){d=E(t,n,i,o,a,e[g[h]],_[0],y[h]);p=k(s,u,c,f,l,e[m[h]],S[0],w[h])}else if(h<32){d=M(t,n,i,o,a,e[g[h]],_[1],y[h]);p=T(s,u,c,f,l,e[m[h]],S[1],w[h])}else if(h<48){d=P(t,n,i,o,a,e[g[h]],_[2],y[h]);p=P(s,u,c,f,l,e[m[h]],S[2],w[h])}else if(h<64){d=T(t,n,i,o,a,e[g[h]],_[3],y[h]);p=M(s,u,c,f,l,e[m[h]],S[3],w[h])}else{d=k(t,n,i,o,a,e[g[h]],_[4],y[h]);p=E(s,u,c,f,l,e[m[h]],S[4],w[h])}t=a;a=o;o=A(i,10);i=n;n=d;s=l;l=f;f=A(c,10);c=u;u=p}var v=this._b+i+f|0;this._b=this._c+o+l|0;this._c=this._d+a+s|0;this._d=this._e+t+u|0;this._e=this._a+n+c|0;this._a=v};a.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=n.alloc?n.alloc(20):new n(20);e.writeInt32LE(this._a,0);e.writeInt32LE(this._b,4);e.writeInt32LE(this._c,8);e.writeInt32LE(this._d,12);e.writeInt32LE(this._e,16);return e};function A(e,r){return e<<r|e>>>32-r}function E(e,r,t,n,i,o,a,s){return A(e+(r^t^n)+o+a|0,s)+i|0}function M(e,r,t,n,i,o,a,s){return A(e+(r&t|~r&n)+o+a|0,s)+i|0}function P(e,r,t,n,i,o,a,s){return A(e+((r|~t)^n)+o+a|0,s)+i|0}function T(e,r,t,n,i,o,a,s){return A(e+(r&n|t&~n)+o+a|0,s)+i|0}function k(e,r,t,n,i,o,a,s){return A(e+(r^(t|~n))+o+a|0,s)+i|0}r.exports=a},{buffer:186,"hash-base":226,inherits:256}],283:[function(e,r,t){var n=e("buffer");var i=n.Buffer;function o(e,r){for(var t in e){r[t]=e[t]}}if(i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow){r.exports=n}else{o(n,t);t.Buffer=a}function a(e,r,t){return i(e,r,t)}a.prototype=Object.create(i.prototype);o(i,a);a.from=function(e,r,t){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return i(e,r,t)};a.alloc=function(e,r,t){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var n=i(e);if(r!==undefined){if(typeof t==="string"){n.fill(r,t)}else{n.fill(r)}}else{n.fill(0)}return n};a.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return i(e)};a.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return n.SlowBuffer(e)}},{buffer:186}],284:[function(a,s,e){(function(o){(function(){"use strict";var e=a("buffer");var i=e.Buffer;var r={};var t;for(t in e){if(!e.hasOwnProperty(t))continue;if(t==="SlowBuffer"||t==="Buffer")continue;r[t]=e[t]}var n=r.Buffer={};for(t in i){if(!i.hasOwnProperty(t))continue;if(t==="allocUnsafe"||t==="allocUnsafeSlow")continue;n[t]=i[t]}r.Buffer.prototype=i.prototype;if(!n.from||n.from===Uint8Array.from){n.from=function(e,r,t){if(typeof e==="number"){throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e)}if(e&&typeof e.length==="undefined"){throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}return i(e,r,t)}}if(!n.alloc){n.alloc=function(e,r,t){if(typeof e!=="number"){throw new TypeError('The "size" argument must be of type number. Received type '+typeof e)}if(e<0||e>=2*(1<<30)){throw new RangeError('The value "'+e+'" is invalid for option "size"')}var n=i(e);if(!r||r.length===0){n.fill(0)}else if(typeof t==="string"){n.fill(r,t)}else{n.fill(r)}return n}}if(!r.kStringMaxLength){try{r.kStringMaxLength=o.binding("buffer").kStringMaxLength}catch(e){}}if(!r.constants){r.constants={MAX_LENGTH:r.kMaxLength};if(r.kStringMaxLength){r.constants.MAX_STRING_LENGTH=r.kStringMaxLength}}s.exports=r}).call(this)}).call(this,a("_process"))},{_process:273,buffer:186}],285:[function(e,t,o){(function(F){(function(){"use strict";(function(e){const n=2147483647;function c(e){const b=new Uint32Array([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]);let g=1779033703,m=3144134277,y=1013904242,w=2773480762;let _=1359893119,S=2600822924,A=528734635,E=1541459225;const M=new Uint32Array(64);function r(d){let p=0,v=d.length;while(v>=64){let e=g,r=m,t=y,n=w,i=_,o=S,a=A,s=E,u,c,f,l,h;for(c=0;c<16;c++){f=p+c*4;M[c]=(d[f]&255)<<24|(d[f+1]&255)<<16|(d[f+2]&255)<<8|d[f+3]&255}for(c=16;c<64;c++){u=M[c-2];l=(u>>>17|u<<32-17)^(u>>>19|u<<32-19)^u>>>10;u=M[c-15];h=(u>>>7|u<<32-7)^(u>>>18|u<<32-18)^u>>>3;M[c]=(l+M[c-7]|0)+(h+M[c-16]|0)|0}for(c=0;c<64;c++){l=(((i>>>6|i<<32-6)^(i>>>11|i<<32-11)^(i>>>25|i<<32-25))+(i&o^~i&a)|0)+(s+(b[c]+M[c]|0)|0)|0;h=((e>>>2|e<<32-2)^(e>>>13|e<<32-13)^(e>>>22|e<<32-22))+(e&r^e&t^r&t)|0;s=a;a=o;o=i;i=n+l|0;n=t;t=r;r=e;e=l+h|0}g=g+e|0;m=m+r|0;y=y+t|0;w=w+n|0;_=_+i|0;S=S+o|0;A=A+a|0;E=E+s|0;p+=64;v-=64}}r(e);let t,n=e.length%64,i=e.length/536870912|0,o=e.length<<3,a=n<56?56:120,s=e.slice(e.length-n,e.length);s.push(128);for(t=n+1;t<a;t++){s.push(0)}s.push(i>>>24&255);s.push(i>>>16&255);s.push(i>>>8&255);s.push(i>>>0&255);s.push(o>>>24&255);s.push(o>>>16&255);s.push(o>>>8&255);s.push(o>>>0&255);r(s);return[g>>>24&255,g>>>16&255,g>>>8&255,g>>>0&255,m>>>24&255,m>>>16&255,m>>>8&255,m>>>0&255,y>>>24&255,y>>>16&255,y>>>8&255,y>>>0&255,w>>>24&255,w>>>16&255,w>>>8&255,w>>>0&255,_>>>24&255,_>>>16&255,_>>>8&255,_>>>0&255,S>>>24&255,S>>>16&255,S>>>8&255,S>>>0&255,A>>>24&255,A>>>16&255,A>>>8&255,A>>>0&255,E>>>24&255,E>>>16&255,E>>>8&255,E>>>0&255]}function k(e,r,t){e=e.length<=64?e:c(e);const n=64+r.length+4;const i=new Array(n);const o=new Array(64);let a;let s=[];for(a=0;a<64;a++){i[a]=54}for(a=0;a<e.length;a++){i[a]^=e[a]}for(a=0;a<r.length;a++){i[64+a]=r[a]}for(a=n-4;a<n;a++){i[a]=0}for(a=0;a<64;a++)o[a]=92;for(a=0;a<e.length;a++)o[a]^=e[a];function u(){for(let e=n-1;e>=n-4;e--){i[e]++;if(i[e]<=255)return;i[e]=0}}while(t>=32){u();s=s.concat(c(o.concat(c(i))));t-=32}if(t>0){u();s=s.concat(c(o.concat(c(i))).slice(0,t))}return s}function O(e,r,t,n,i){let o;C(e,(2*t-1)*16,i,0,16);for(o=0;o<2*t;o++){B(e,o*16,i,16);a(i,n);C(i,0,e,r+o*16,16)}for(o=0;o<t;o++){C(e,r+o*2*16,e,o*16,16)}for(o=0;o<t;o++){C(e,r+(o*2+1)*16,e,(o+t)*16,16)}}function i(e,r){return e<<r|e>>>32-r}function a(r,t){C(r,0,t,0,16);for(let e=8;e>0;e-=2){t[4]^=i(t[0]+t[12],7);t[8]^=i(t[4]+t[0],9);t[12]^=i(t[8]+t[4],13);t[0]^=i(t[12]+t[8],18);t[9]^=i(t[5]+t[1],7);t[13]^=i(t[9]+t[5],9);t[1]^=i(t[13]+t[9],13);t[5]^=i(t[1]+t[13],18);t[14]^=i(t[10]+t[6],7);t[2]^=i(t[14]+t[10],9);t[6]^=i(t[2]+t[14],13);t[10]^=i(t[6]+t[2],18);t[3]^=i(t[15]+t[11],7);t[7]^=i(t[3]+t[15],9);t[11]^=i(t[7]+t[3],13);t[15]^=i(t[11]+t[7],18);t[1]^=i(t[0]+t[3],7);t[2]^=i(t[1]+t[0],9);t[3]^=i(t[2]+t[1],13);t[0]^=i(t[3]+t[2],18);t[6]^=i(t[5]+t[4],7);t[7]^=i(t[6]+t[5],9);t[4]^=i(t[7]+t[6],13);t[5]^=i(t[4]+t[7],18);t[11]^=i(t[10]+t[9],7);t[8]^=i(t[11]+t[10],9);t[9]^=i(t[8]+t[11],13);t[10]^=i(t[9]+t[8],18);t[12]^=i(t[15]+t[14],7);t[13]^=i(t[12]+t[15],9);t[14]^=i(t[13]+t[12],13);t[15]^=i(t[14]+t[13],18)}for(let e=0;e<16;++e){r[e]+=t[e]}}function B(r,t,n,i){for(let e=0;e<i;e++){n[e]^=r[t+e]}}function C(e,r,t,n,i){while(i--){t[n++]=e[r++]}}function R(r){if(!r||typeof r.length!=="number"){return false}for(let e=0;e<r.length;e++){const t=r[e];if(typeof t!=="number"||t%1||t<0||t>=256){return false}}return true}function L(e,r){if(typeof e!=="number"||e%1){throw new Error("invalid "+r)}return e}function f(i,e,o,a,s,u,c){o=L(o,"N");a=L(a,"r");s=L(s,"p");u=L(u,"dkLen");if(o===0||(o&o-1)!==0){throw new Error("N must be power of 2")}if(o>n/128/a){throw new Error("N too large")}if(a>n/128/s){throw new Error("r too large")}if(!R(i)){throw new Error("password must be an array or buffer")}i=Array.prototype.slice.call(i);if(!R(e)){throw new Error("salt must be an array or buffer")}e=Array.prototype.slice.call(e);let f=k(i,e,s*128*a);const l=new Uint32Array(s*32*a);for(let e=0;e<l.length;e++){const r=e*4;l[e]=(f[r+3]&255)<<24|(f[r+2]&255)<<16|(f[r+1]&255)<<8|(f[r+0]&255)<<0}const h=new Uint32Array(64*a);const d=new Uint32Array(32*a*o);const p=32*a;const v=new Uint32Array(16);const b=new Uint32Array(16);const g=s*o*2;let m=0;let y=null;let w=false;let _=0;let S=0,A;let E;const M=c?parseInt(1e3/a):4294967295;const P=typeof F!=="undefined"?F:setTimeout;const T=function(){if(w){return c(new Error("cancelled"),m/g)}let r;switch(_){case 0:E=S*32*a;C(l,E,h,0,p);_=1;A=0;case 1:r=o-A;if(r>M){r=M}for(let e=0;e<r;e++){C(h,0,d,(A+e)*p,p);O(h,p,a,v,b)}A+=r;m+=r;if(c){const t=parseInt(1e3*m/g);if(t!==y){w=c(null,m/g);if(w){break}y=t}}if(A<o){break}A=0;_=2;case 2:r=o-A;if(r>M){r=M}for(let e=0;e<r;e++){const n=(2*a-1)*16;const e=h[n]&o-1;B(d,e*p,h,p);O(h,p,a,v,b)}A+=r;m+=r;if(c){const t=parseInt(1e3*m/g);if(t!==y){w=c(null,m/g);if(w){break}y=t}}if(A<o){break}C(h,0,l,E,p);S++;if(S<s){_=0;break}f=[];for(let e=0;e<l.length;e++){f.push(l[e]>>0&255);f.push(l[e]>>8&255);f.push(l[e]>>16&255);f.push(l[e]>>24&255)}const e=k(i,f,u);if(c){c(null,1,e)}return e}if(c){P(T)}};if(!c){while(true){const t=T();if(t!=undefined){return t}}}T()}const r={scrypt:function(e,r,t,a,s,u,c){return new Promise(function(n,i){let o=0;if(c){c(0)}f(e,r,t,a,s,u,function(e,r,t){if(e){i(e)}else if(t){if(c&&o!==1){c(1)}n(new Uint8Array(t))}else if(c&&r!==o){o=r;return c(r)}})})},syncScrypt:function(e,r,t,n,i,o){return new Uint8Array(f(e,r,t,n,i,o))}};if(typeof o!=="undefined"){t.exports=r}else if(typeof X==="function"&&X.amd){X(r)}else if(e){if(e.scrypt){e._scrypt=e.scrypt}e.scrypt=r}})(this)}).call(this)}).call(this,e("timers").setImmediate)},{timers:310}],286:[function(e,r,t){var f=e("safe-buffer").Buffer;function n(e,r){this._block=f.alloc(e);this._finalSize=r;this._blockSize=e;this._len=0}n.prototype.update=function(e,r){if(typeof e==="string"){r=r||"utf8";e=f.from(e,r)}var t=this._block;var n=this._blockSize;var i=e.length;var o=this._len;for(var a=0;a<i;){var s=o%n;var u=Math.min(i-a,n-s);for(var c=0;c<u;c++){t[s+c]=e[a+c]}o+=u;a+=u;if(o%n===0){this._update(t)}}this._len+=i;return this};n.prototype.digest=function(e){var r=this._len%this._blockSize;this._block[r]=128;this._block.fill(0,r+1);if(r>=this._finalSize){this._update(this._block);this._block.fill(0)}var t=this._len*8;if(t<=4294967295){this._block.writeUInt32BE(t,this._blockSize-4)}else{var n=(t&4294967295)>>>0;var i=(t-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8);this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o};n.prototype._update=function(){throw new Error("_update must be implemented by subclass")};r.exports=n},{"safe-buffer":283}],287:[function(e,r,n){var n=r.exports=function e(r){r=r.toLowerCase();var t=n[r];if(!t)throw new Error(r+" is not supported (we accept pull requests)");return new t};n.sha=e("./sha");n.sha1=e("./sha1");n.sha224=e("./sha224");n.sha256=e("./sha256");n.sha384=e("./sha384");n.sha512=e("./sha512")},{"./sha":288,"./sha1":289,"./sha224":290,"./sha256":291,"./sha384":292,"./sha512":293}],288:[function(e,r,t){var n=e("inherits");var i=e("./hash");var o=e("safe-buffer").Buffer;var l=[1518500249,1859775393,2400959708|0,3395469782|0];var a=new Array(80);function s(){this.init();this._w=a;i.call(this,64,56)}n(s,i);s.prototype.init=function(){this._a=1732584193;this._b=4023233417;this._c=2562383102;this._d=271733878;this._e=3285377520;return this};function h(e){return e<<5|e>>>27}function d(e){return e<<30|e>>>2}function p(e,r,t,n){if(e===0)return r&t|~r&n;if(e===2)return r&t|r&n|t&n;return r^t^n}s.prototype._update=function(e){var r=this._w;var t=this._a|0;var n=this._b|0;var i=this._c|0;var o=this._d|0;var a=this._e|0;for(var s=0;s<16;++s)r[s]=e.readInt32BE(s*4);for(;s<80;++s)r[s]=r[s-3]^r[s-8]^r[s-14]^r[s-16];for(var u=0;u<80;++u){var c=~~(u/20);var f=h(t)+p(c,n,i,o)+a+r[u]+l[c]|0;a=o;o=i;i=d(n);n=t;t=f}this._a=t+this._a|0;this._b=n+this._b|0;this._c=i+this._c|0;this._d=o+this._d|0;this._e=a+this._e|0};s.prototype._hash=function(){var e=o.allocUnsafe(20);e.writeInt32BE(this._a|0,0);e.writeInt32BE(this._b|0,4);e.writeInt32BE(this._c|0,8);e.writeInt32BE(this._d|0,12);e.writeInt32BE(this._e|0,16);return e};r.exports=s},{"./hash":286,inherits:256,"safe-buffer":283}],289:[function(e,r,t){var n=e("inherits");var i=e("./hash");var o=e("safe-buffer").Buffer;var l=[1518500249,1859775393,2400959708|0,3395469782|0];var a=new Array(80);function s(){this.init();this._w=a;i.call(this,64,56)}n(s,i);s.prototype.init=function(){this._a=1732584193;this._b=4023233417;this._c=2562383102;this._d=271733878;this._e=3285377520;return this};function h(e){return e<<1|e>>>31}function d(e){return e<<5|e>>>27}function p(e){return e<<30|e>>>2}function v(e,r,t,n){if(e===0)return r&t|~r&n;if(e===2)return r&t|r&n|t&n;return r^t^n}s.prototype._update=function(e){var r=this._w;var t=this._a|0;var n=this._b|0;var i=this._c|0;var o=this._d|0;var a=this._e|0;for(var s=0;s<16;++s)r[s]=e.readInt32BE(s*4);for(;s<80;++s)r[s]=h(r[s-3]^r[s-8]^r[s-14]^r[s-16]);for(var u=0;u<80;++u){var c=~~(u/20);var f=d(t)+v(c,n,i,o)+a+r[u]+l[c]|0;a=o;o=i;i=p(n);n=t;t=f}this._a=t+this._a|0;this._b=n+this._b|0;this._c=i+this._c|0;this._d=o+this._d|0;this._e=a+this._e|0};s.prototype._hash=function(){var e=o.allocUnsafe(20);e.writeInt32BE(this._a|0,0);e.writeInt32BE(this._b|0,4);e.writeInt32BE(this._c|0,8);e.writeInt32BE(this._d|0,12);e.writeInt32BE(this._e|0,16);return e};r.exports=s},{"./hash":286,inherits:256,"safe-buffer":283}],290:[function(e,r,t){var n=e("inherits");var i=e("./sha256");var o=e("./hash");var a=e("safe-buffer").Buffer;var s=new Array(64);function u(){this.init();this._w=s;o.call(this,64,56)}n(u,i);u.prototype.init=function(){this._a=3238371032;this._b=914150663;this._c=812702999;this._d=4144912697;this._e=4290775857;this._f=1750603025;this._g=1694076839;this._h=3204075428;return this};u.prototype._hash=function(){var e=a.allocUnsafe(28);e.writeInt32BE(this._a,0);e.writeInt32BE(this._b,4);e.writeInt32BE(this._c,8);e.writeInt32BE(this._d,12);e.writeInt32BE(this._e,16);e.writeInt32BE(this._f,20);e.writeInt32BE(this._g,24);return e};r.exports=u},{"./hash":286,"./sha256":291,inherits:256,"safe-buffer":283}],291:[function(e,r,t){var n=e("inherits");var i=e("./hash");var o=e("safe-buffer").Buffer;var p=[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];var a=new Array(64);function s(){this.init();this._w=a;i.call(this,64,56)}n(s,i);s.prototype.init=function(){this._a=1779033703;this._b=3144134277;this._c=1013904242;this._d=2773480762;this._e=1359893119;this._f=2600822924;this._g=528734635;this._h=1541459225;return this};function v(e,r,t){return t^e&(r^t)}function b(e,r,t){return e&r|t&(e|r)}function g(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function m(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function y(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function w(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}s.prototype._update=function(e){var r=this._w;var t=this._a|0;var n=this._b|0;var i=this._c|0;var o=this._d|0;var a=this._e|0;var s=this._f|0;var u=this._g|0;var c=this._h|0;for(var f=0;f<16;++f)r[f]=e.readInt32BE(f*4);for(;f<64;++f)r[f]=w(r[f-2])+r[f-7]+y(r[f-15])+r[f-16]|0;for(var l=0;l<64;++l){var h=c+m(a)+v(a,s,u)+p[l]+r[l]|0;var d=g(t)+b(t,n,i)|0;c=u;u=s;s=a;a=o+h|0;o=i;i=n;n=t;t=h+d|0}this._a=t+this._a|0;this._b=n+this._b|0;this._c=i+this._c|0;this._d=o+this._d|0;this._e=a+this._e|0;this._f=s+this._f|0;this._g=u+this._g|0;this._h=c+this._h|0};s.prototype._hash=function(){var e=o.allocUnsafe(32);e.writeInt32BE(this._a,0);e.writeInt32BE(this._b,4);e.writeInt32BE(this._c,8);e.writeInt32BE(this._d,12);e.writeInt32BE(this._e,16);e.writeInt32BE(this._f,20);e.writeInt32BE(this._g,24);e.writeInt32BE(this._h,28);return e};r.exports=s},{"./hash":286,inherits:256,"safe-buffer":283}],292:[function(e,r,t){var n=e("inherits");var i=e("./sha512");var o=e("./hash");var a=e("safe-buffer").Buffer;var s=new Array(160);function u(){this.init();this._w=s;o.call(this,128,112)}n(u,i);u.prototype.init=function(){this._ah=3418070365;this._bh=1654270250;this._ch=2438529370;this._dh=355462360;this._eh=1731405415;this._fh=2394180231;this._gh=3675008525;this._hh=1203062813;this._al=3238371032;this._bl=914150663;this._cl=812702999;this._dl=4144912697;this._el=4290775857;this._fl=1750603025;this._gl=1694076839;this._hl=3204075428;return this};u.prototype._hash=function(){var n=a.allocUnsafe(48);function e(e,r,t){n.writeInt32BE(e,t);n.writeInt32BE(r,t+4)}e(this._ah,this._al,0);e(this._bh,this._bl,8);e(this._ch,this._cl,16);e(this._dh,this._dl,24);e(this._eh,this._el,32);e(this._fh,this._fl,40);return n};r.exports=u},{"./hash":286,"./sha512":293,inherits:256,"safe-buffer":283}],293:[function(e,r,t){var n=e("inherits");var i=e("./hash");var o=e("safe-buffer").Buffer;var V=[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];var a=new Array(160);function s(){this.init();this._w=a;i.call(this,128,112)}n(s,i);s.prototype.init=function(){this._ah=1779033703;this._bh=3144134277;this._ch=1013904242;this._dh=2773480762;this._eh=1359893119;this._fh=2600822924;this._gh=528734635;this._hh=1541459225;this._al=4089235720;this._bl=2227873595;this._cl=4271175723;this._dl=1595750129;this._el=2917565137;this._fl=725511199;this._gl=4215389547;this._hl=327033209;return this};function Z(e,r,t){return t^e&(r^t)}function K(e,r,t){return e&r|t&(e|r)}function q(e,r){return(e>>>28|r<<4)^(r>>>2|e<<30)^(r>>>7|e<<25)}function Q(e,r){return(e>>>14|r<<18)^(e>>>18|r<<14)^(r>>>9|e<<23)}function W(e,r){return(e>>>1|r<<31)^(e>>>8|r<<24)^e>>>7}function Y(e,r){return(e>>>1|r<<31)^(e>>>8|r<<24)^(e>>>7|r<<25)}function $(e,r){return(e>>>19|r<<13)^(r>>>29|e<<3)^e>>>6}function ee(e,r){return(e>>>19|r<<13)^(r>>>29|e<<3)^(e>>>6|r<<26)}function re(e,r){return e>>>0<r>>>0?1:0}s.prototype._update=function(e){var r=this._w;var t=this._ah|0;var n=this._bh|0;var i=this._ch|0;var o=this._dh|0;var a=this._eh|0;var s=this._fh|0;var u=this._gh|0;var c=this._hh|0;var f=this._al|0;var l=this._bl|0;var h=this._cl|0;var d=this._dl|0;var p=this._el|0;var v=this._fl|0;var b=this._gl|0;var g=this._hl|0;for(var m=0;m<32;m+=2){r[m]=e.readInt32BE(m*4);r[m+1]=e.readInt32BE(m*4+4)}for(;m<160;m+=2){var y=r[m-15*2];var w=r[m-15*2+1];var _=W(y,w);var S=Y(w,y);y=r[m-2*2];w=r[m-2*2+1];var A=$(y,w);var E=ee(w,y);var M=r[m-7*2];var P=r[m-7*2+1];var T=r[m-16*2];var k=r[m-16*2+1];var O=S+P|0;var B=_+M+re(O,S)|0;O=O+E|0;B=B+A+re(O,E)|0;O=O+k|0;B=B+T+re(O,k)|0;r[m]=B;r[m+1]=O}for(var C=0;C<160;C+=2){B=r[C];O=r[C+1];var R=K(t,n,i);var L=K(f,l,h);var F=q(t,f);var j=q(f,t);var x=Q(a,p);var N=Q(p,a);var D=V[C];var J=V[C+1];var I=Z(a,s,u);var U=Z(p,v,b);var H=g+N|0;var X=c+x+re(H,g)|0;H=H+U|0;X=X+I+re(H,U)|0;H=H+J|0;X=X+D+re(H,J)|0;H=H+O|0;X=X+B+re(H,O)|0;var G=j+L|0;var z=F+R+re(G,j)|0;c=u;g=b;u=s;b=v;s=a;v=p;p=d+H|0;a=o+X+re(p,d)|0;o=i;d=h;i=n;h=l;n=t;l=f;f=H+G|0;t=X+z+re(f,H)|0}this._al=this._al+f|0;this._bl=this._bl+l|0;this._cl=this._cl+h|0;this._dl=this._dl+d|0;this._el=this._el+p|0;this._fl=this._fl+v|0;this._gl=this._gl+b|0;this._hl=this._hl+g|0;this._ah=this._ah+t+re(this._al,f)|0;this._bh=this._bh+n+re(this._bl,l)|0;this._ch=this._ch+i+re(this._cl,h)|0;this._dh=this._dh+o+re(this._dl,d)|0;this._eh=this._eh+a+re(this._el,p)|0;this._fh=this._fh+s+re(this._fl,v)|0;this._gh=this._gh+u+re(this._gl,b)|0;this._hh=this._hh+c+re(this._hl,g)|0};s.prototype._hash=function(){var n=o.allocUnsafe(64);function e(e,r,t){n.writeInt32BE(e,t);n.writeInt32BE(r,t+4)}e(this._ah,this._al,0);e(this._bh,this._bl,8);e(this._ch,this._cl,16);e(this._dh,this._dl,24);e(this._eh,this._el,32);e(this._fh,this._fl,40);e(this._gh,this._gl,48);e(this._hh,this._hl,56);return n};r.exports=s},{"./hash":286,inherits:256,"safe-buffer":283}],294:[function(e,r,t){r.exports=i;var f=e("events").EventEmitter;var n=e("inherits");n(i,f);i.Readable=e("readable-stream/lib/_stream_readable.js");i.Writable=e("readable-stream/lib/_stream_writable.js");i.Duplex=e("readable-stream/lib/_stream_duplex.js");i.Transform=e("readable-stream/lib/_stream_transform.js");i.PassThrough=e("readable-stream/lib/_stream_passthrough.js");i.finished=e("readable-stream/lib/internal/streams/end-of-stream.js");i.pipeline=e("readable-stream/lib/internal/streams/pipeline.js");i.Stream=i;function i(){f.call(this)}i.prototype.pipe=function(r,e){var t=this;function n(e){if(r.writable){if(false===r.write(e)&&t.pause){t.pause()}}}t.on("data",n);function i(){if(t.readable&&t.resume){t.resume()}}r.on("drain",i);if(!r._isStdio&&(!e||e.end!==false)){t.on("end",a);t.on("close",s)}var o=false;function a(){if(o)return;o=true;r.end()}function s(){if(o)return;o=true;if(typeof r.destroy==="function")r.destroy()}function u(e){c();if(f.listenerCount(this,"error")===0){throw e}}t.on("error",u);r.on("error",u);function c(){t.removeListener("data",n);r.removeListener("drain",i);t.removeListener("end",a);t.removeListener("close",s);t.removeListener("error",u);r.removeListener("error",u);t.removeListener("end",c);t.removeListener("close",c);r.removeListener("close",c)}t.on("end",c);t.on("close",c);r.on("close",c);r.emit("pipe",t);return r}},{events:224,inherits:256,"readable-stream/lib/_stream_duplex.js":296,"readable-stream/lib/_stream_passthrough.js":297,"readable-stream/lib/_stream_readable.js":298,"readable-stream/lib/_stream_transform.js":299,"readable-stream/lib/_stream_writable.js":300,"readable-stream/lib/internal/streams/end-of-stream.js":304,"readable-stream/lib/internal/streams/pipeline.js":306}],295:[function(e,r,t){arguments[4][170][0].apply(t,arguments)},{dup:170}],296:[function(e,r,t){arguments[4][171][0].apply(t,arguments)},{"./_stream_readable":298,"./_stream_writable":300,_process:273,dup:171,inherits:256}],297:[function(e,r,t){arguments[4][172][0].apply(t,arguments)},{"./_stream_transform":299,dup:172,inherits:256}],298:[function(e,r,t){arguments[4][173][0].apply(t,arguments)},{"../errors":295,"./_stream_duplex":296,"./internal/streams/async_iterator":301,"./internal/streams/buffer_list":302,"./internal/streams/destroy":303,"./internal/streams/from":305,"./internal/streams/state":307,"./internal/streams/stream":308,_process:273,buffer:186,dup:173,events:224,inherits:256,"string_decoder/":309,util:140}],299:[function(e,r,t){arguments[4][174][0].apply(t,arguments)},{"../errors":295,"./_stream_duplex":296,dup:174,inherits:256}],300:[function(e,r,t){arguments[4][175][0].apply(t,arguments)},{"../errors":295,"./_stream_duplex":296,"./internal/streams/destroy":303,"./internal/streams/state":307,"./internal/streams/stream":308,_process:273,buffer:186,dup:175,inherits:256,"util-deprecate":311}],301:[function(e,r,t){arguments[4][176][0].apply(t,arguments)},{"./end-of-stream":304,_process:273,dup:176}],302:[function(e,r,t){arguments[4][177][0].apply(t,arguments)},{buffer:186,dup:177,util:140}],303:[function(e,r,t){arguments[4][178][0].apply(t,arguments)},{_process:273,dup:178}],304:[function(e,r,t){arguments[4][179][0].apply(t,arguments)},{"../../../errors":295,dup:179}],305:[function(e,r,t){arguments[4][180][0].apply(t,arguments)},{dup:180}],306:[function(e,r,t){arguments[4][181][0].apply(t,arguments)},{"../../../errors":295,"./end-of-stream":304,dup:181}],307:[function(e,r,t){arguments[4][182][0].apply(t,arguments)},{"../../../errors":295,dup:182}],308:[function(e,r,t){arguments[4][183][0].apply(t,arguments)},{dup:183,events:224}],309:[function(e,r,t){"use strict";var n=e("safe-buffer").Buffer;var i=n.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 o(e){if(!e)return"utf8";var r;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(r)return;e=(""+e).toLowerCase();r=true}}}function a(e){var r=o(e);if(typeof r!=="string"&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return r||e}t.StringDecoder=s;function s(e){this.encoding=a(e);var r;switch(this.encoding){case"utf16le":this.text=p;this.end=v;r=4;break;case"utf8":this.fillLast=l;r=4;break;case"base64":this.text=b;this.end=g;r=3;break;default:this.write=m;this.end=y;return}this.lastNeed=0;this.lastTotal=0;this.lastChar=n.allocUnsafe(r)}s.prototype.write=function(e){if(e.length===0)return"";var r;var t;if(this.lastNeed){r=this.fillLast(e);if(r===undefined)return"";t=this.lastNeed;this.lastNeed=0}else{t=0}if(t<e.length)return r?r+this.text(e,t):this.text(e,t);return r||""};s.prototype.end=d;s.prototype.text=h;s.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 u(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 c(e,r,t){var n=r.length-1;if(n<t)return 0;var i=u(r[n]);if(i>=0){if(i>0)e.lastNeed=i-1;return i}if(--n<t||i===-2)return 0;i=u(r[n]);if(i>=0){if(i>0)e.lastNeed=i-2;return i}if(--n<t||i===-2)return 0;i=u(r[n]);if(i>=0){if(i>0){if(i===2)i=0;else e.lastNeed=i-3}return i}return 0}function f(e,r,t){if((r[0]&192)!==128){e.lastNeed=0;return"�"}if(e.lastNeed>1&&r.length>1){if((r[1]&192)!==128){e.lastNeed=1;return"�"}if(e.lastNeed>2&&r.length>2){if((r[2]&192)!==128){e.lastNeed=2;return"�"}}}}function l(e){var r=this.lastTotal-this.lastNeed;var t=f(this,e,r);if(t!==undefined)return t;if(this.lastNeed<=e.length){e.copy(this.lastChar,r,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,r,0,e.length);this.lastNeed-=e.length}function h(e,r){var t=c(this,e,r);if(!this.lastNeed)return e.toString("utf8",r);this.lastTotal=t;var n=e.length-(t-this.lastNeed);e.copy(this.lastChar,0,n);return e.toString("utf8",r,n)}function d(e){var r=e&&e.length?this.write(e):"";if(this.lastNeed)return r+"�";return r}function p(e,r){if((e.length-r)%2===0){var t=e.toString("utf16le",r);if(t){var n=t.charCodeAt(t.length-1);if(n>=55296&&n<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1];return t.slice(0,-1)}}return t}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=e[e.length-1];return e.toString("utf16le",r,e.length-1)}function v(e){var r=e&&e.length?this.write(e):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,t)}return r}function b(e,r){var t=(e.length-r)%3;if(t===0)return e.toString("base64",r);this.lastNeed=3-t;this.lastTotal=3;if(t===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",r,e.length-t)}function g(e){var r=e&&e.length?this.write(e):"";if(this.lastNeed)return r+this.lastChar.toString("base64",0,3-this.lastNeed);return r}function m(e){return e.toString(this.encoding)}function y(e){return e&&e.length?this.write(e):""}},{"safe-buffer":283}],310:[function(u,e,c){(function(n,s){(function(){var e=u("process/browser.js").nextTick;var r=Function.prototype.apply;var i=Array.prototype.slice;var o={};var a=0;c.setTimeout=function(){return new t(r.call(setTimeout,window,arguments),clearTimeout)};c.setInterval=function(){return new t(r.call(setInterval,window,arguments),clearInterval)};c.clearTimeout=c.clearInterval=function(e){e.close()};function t(e,r){this._id=e;this._clearFn=r}t.prototype.unref=t.prototype.ref=function(){};t.prototype.close=function(){this._clearFn.call(window,this._id)};c.enroll=function(e,r){clearTimeout(e._idleTimeoutId);e._idleTimeout=r};c.unenroll=function(e){clearTimeout(e._idleTimeoutId);e._idleTimeout=-1};c._unrefActive=c.active=function(r){clearTimeout(r._idleTimeoutId);var e=r._idleTimeout;if(e>=0){r._idleTimeoutId=setTimeout(function e(){if(r._onTimeout)r._onTimeout()},e)}};c.setImmediate=typeof n==="function"?n:function(r){var t=a++;var n=arguments.length<2?false:i.call(arguments,1);o[t]=true;e(function e(){if(o[t]){if(n){r.apply(null,n)}else{r.call(null)}c.clearImmediate(t)}});return t};c.clearImmediate=typeof s==="function"?s:function(e){delete o[e]}}).call(this)}).call(this,u("timers").setImmediate,u("timers").clearImmediate)},{"process/browser.js":273,timers:310}],311:[function(e,r,t){(function(t){(function(){r.exports=e;function e(e,r){if(i("noDeprecation")){return e}var t=false;function n(){if(!t){if(i("throwDeprecation")){throw new Error(r)}else if(i("traceDeprecation")){console.trace(r)}else{console.warn(r)}t=true}return e.apply(this,arguments)}return n}function i(e){try{if(!t.localStorage)return false}catch(e){return false}var r=t.localStorage[e];if(null==r)return false;return String(r).toLowerCase()==="true"}}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],312:[function(e,r,t){var a=e("ethers");var s=e("crypto");r.exports=function e(r,t){var n=s.randomBytes(32).toString("hex");var i="0x"+n;var o=new a.Wallet(i);return{Address:o.address,"Private key":i}}},{crypto:193,ethers:222}]},{},[312])(312)});