forked from daren.hsu/line_push
15 lines
270 KiB
JavaScript
15 lines
270 KiB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("crypto")):"function"==typeof define&&define.amd?define(["crypto"],t):"object"==typeof exports?exports.jsckey=t(require("crypto")):e.jsckey=t(e.crypto)}(this,function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/home/circleci/repo/packages/js-crypto-key-utils/dist",r(r.s=51)}([function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(37));t.encoder=i;var o=n(r(63));t.formatter=o,t.default={encoder:i,formatter:o}},function(e,t,r){"use strict";function n(e,t){return Object.keys(t).filter(function(r){return t[r].oid.toString()===e.toString()})}r.d(t,"b",function(){return n}),r.d(t,"c",function(){return i}),t.a={namedCurves:{"P-256":{indutnyName:"p256",payloadSize:32,oid:[1,2,840,10045,3,1,7]},"P-384":{indutnyName:"p384",payloadSize:48,oid:[1,3,132,0,34]},"P-521":{indutnyName:"p521",payloadSize:66,oid:[1,3,132,0,35]},"P-256K":{indutnyName:"secp256k1",payloadSize:32,oid:[1,3,132,0,10]}},publicKeyAlgorithms:{EC:{oid:[1,2,840,10045,2,1]},RSA:{oid:[1,2,840,113549,1,1,1]}},passwordBasedEncryptionSchemes:{"pbeWithMD5AndDES-CBC":{oid:[1,2,840,113549,1,5,3],hash:"MD5",encrypt:"DES-CBC"},"pbeWithSHA1AndDES-CBC":{oid:[1,2,840,113549,1,5,10],hash:"SHA-1",encrypt:"DES-CBC"},pbes2:{oid:[1,2,840,113549,1,5,13]}},keyDerivationFunctions:{pbkdf2:{oid:[1,2,840,113549,1,5,12],defaultSaltLen:8}},pbkdf2Prfs:{hmacWithSHA1:{oid:[1,2,840,113549,2,7],hash:"SHA-1"},hmacWithSHA256:{oid:[1,2,840,113549,2,9],hash:"SHA-256"},hmacWithSHA384:{oid:[1,2,840,113549,2,10],hash:"SHA-384"},hmacWithSHA512:{oid:[1,2,840,113549,2,11],hash:"SHA-512"}},encryptionSchemes:{"des-ede3-cbc":{oid:[1,2,840,113549,3,7],keyLength:24,ivLength:8},"aes128-cbc":{oid:[2,16,840,1,101,3,4,1,2],keyLength:16,ivLength:16},"aes192-cbc":{oid:[2,16,840,1,101,3,4,1,22],keyLength:24,ivLength:16},"aes256-cbc":{oid:[2,16,840,1,101,3,4,1,42],keyLength:32,ivLength:16}},hashes:{"SHA-256":{hashSize:32},"SHA-384":{hashSize:48},"SHA-512":{hashSize:64},"SHA-1":{hashSize:20},MD5:{hashSize:16}}};var i=function(e,t){var r=n(e,t);if(0===r.length)throw new Error("UnsupportedAlgorithm");return r[0]}},function(e,t,r){e.exports=r(52)},function(e,t,r){"use strict";const n=t;n.bignum=r(11),n.define=r(54).define,n.base=r(60),n.constants=r(61),n.decoders=r(35),n.encoders=r(32)},function(e,t,r){"use strict";(function(e){r.d(t,"d",function(){return f}),r.d(t,"e",function(){return s}),r.d(t,"c",function(){return u}),r.d(t,"b",function(){return d}),r.d(t,"f",function(){return h}),r.d(t,"a",function(){return p});var n=r(0),i=r.n(n),o=r(1),a=r(6),f=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"pem";try{t=c(e,r)}catch(e){return!1}return"encryptedPrivate"===t},s=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"pem";try{t=c(e,r)}catch(e){return!1}return"public"===t},c=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"pem",n="pem"===r?i.a.formatter.pemToBin(t,"private"):t,o=a.b.decode(e.from(n),"der");if("encryptedPrivateKeyInfo"===o.type)return"encryptedPrivate";if("oneAsymmetricKey"===o.type)return"private";if("subjectPublicKeyInfo"===o.type)return"public";throw new Error("NotSpkiNorPkcs8Key")},u=function(e,t){var r;if(e instanceof Uint8Array)r="binary";else{if("string"!=typeof e)throw new Error("InvalidObjectType");r="string"}var n="string"===r?i.a.encoder.hexStringToArrayBuffer(e):e,a=o.a.namedCurves[t].payloadSize;if(n.length<=a)return"private";if(n.length===2*a+1&&4===n[0]||n.length===a+1&&(2===n[0]||3===n[0]))return"public";throw new Error("UnsupportedKeyStructure")},d=function(e){if("EC"===e.kty){if(e.x&&e.y&&e.d)return"private";if(e.x&&e.y)return"public";throw new Error("InvalidECKey")}if("RSA"===e.kty){if(e.n&&e.e&&e.d&&e.p&&e.q&&e.dp&&e.dq&&e.qi)return"private";if(e.n&&e.e)return"public";throw new Error("InvalidRSAKey")}throw new Error("UnsupportedJWKType")},h=function(e){if(!(e instanceof Uint8Array))throw new Error("NonUint8Array");for(var t=0,r=0;r<e.length&&0===e[r];r++)t++;var n=new Uint8Array(e.length-t);return n.set(e.slice(t,e.length)),n},p=function(e,t){if(!(e instanceof Uint8Array))throw new Error("NonUint8Array");if(e.length>t)throw new Error("InvalidLength");var r=new Uint8Array(t);return r.set(e,t-e.length),r}}).call(this,r(7).Buffer)},function(e,t){function r(e,t,r,n,i,o,a){try{var f=e[o](a),s=f.value}catch(e){return void r(e)}f.done?t(s):Promise.resolve(s).then(n,i)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise(function(i,o){var a=e.apply(t,n);function f(e){r(a,i,o,f,s,"next",e)}function s(e){r(a,i,o,f,s,"throw",e)}f(void 0)})}}},function(e,t,r){"use strict";(function(e){r.d(t,"b",function(){return o}),r.d(t,"h",function(){return a}),r.d(t,"c",function(){return f}),r.d(t,"a",function(){return s}),r.d(t,"d",function(){return c}),r.d(t,"f",function(){return u}),r.d(t,"g",function(){return d}),r.d(t,"e",function(){return h});var n=r(3),i=r.n(n),o=i.a.define("KeyStructure",function(){this.choice({subjectPublicKeyInfo:this.use(a),oneAsymmetricKey:this.use(f),encryptedPrivateKeyInfo:this.use(s)})}),a=i.a.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(p),this.key("subjectPublicKey").bitstr())}),f=i.a.define("OneAsymmetricKey",function(){this.seq().obj(this.key("version").use(l),this.key("privateKeyAlgorithm").use(p),this.key("privateKey").octstr(),this.key("attributes").implicit(0).optional().any(),this.key("publicKey").implicit(1).optional().bitstr())}),s=i.a.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("encryptionAlgorithm").use(p),this.key("encryptedData").octstr())}),c=i.a.define("PBEParameter",function(){this.seq().obj(this.key("salt").octstr(8),this.key("iterationCount").int())}),u=i.a.define("PBES2Params",function(){this.seq().obj(this.key("keyDerivationFunc").use(p),this.key("encryptionScheme").use(p))}),d=i.a.define("PBKDF2Params",function(){this.seq().obj(this.key("salt").choice({specified:this.octstr(),otherSource:this.use(p)}),this.key("iterationCount").int(),this.key("keyLength").int().optional(),this.key("prf").use(p).def({algorithm:[1,2,840,113549,2,7],parameters:e.from([5,0])}))}),h={"des-ede3-cbc":i.a.define("DesEde3CbcParams",function(){this.octstr()}),"aes128-cbc":i.a.define("Aes128CbcParams",function(){this.octstr()}),"aes192-cbc":i.a.define("Aes192CbcParams",function(){this.octstr()}),"aes256-cbc":i.a.define("Aes256CbcParams",function(){this.octstr()})},p=i.a.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional().any())}),l=i.a.define("Version",function(){this.int()})}).call(this,r(7).Buffer)},function(e,t,r){"use strict";(function(e){
|
|
/*!
|
|
* The buffer module from node.js, for the browser.
|
|
*
|
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
* @license MIT
|
|
*/
|
|
var n=r(55),i=r(56),o=r(57);function a(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function f(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=s.prototype:(null===e&&(e=new s(t)),e.length=t),e}function s(e,t,r){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return c(this,e,t,r)}function c(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);s.TYPED_ARRAY_SUPPORT?(e=t).__proto__=s.prototype:e=h(e,t);return e}(e,t,r,n):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!s.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|l(t,r),i=(e=f(e,n)).write(t,r);i!==n&&(e=e.slice(0,i));return e}(e,t,r):function(e,t){if(s.isBuffer(t)){var r=0|p(t.length);return 0===(e=f(e,r)).length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?f(e,0):h(e,t);if("Buffer"===t.type&&o(t.data))return h(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(u(t),e=f(e,t<0?0:0|p(t)),!s.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function h(e,t){var r=t.length<0?0:0|p(t.length);e=f(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function p(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function l(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return D(e).length;default:if(n)return q(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return j(this,t,r);case"latin1":case"binary":return P(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){var o,a=1,f=e.length,s=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,f/=2,s/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=r;o<f;o++)if(c(e,o)===c(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===s)return u*a}else-1!==u&&(o-=o-u),u=-1}else for(r+s>f&&(r=f-s),o=r;o>=0;o--){for(var d=!0,h=0;h<s;h++)if(c(e,o+h)!==c(t,h)){d=!1;break}if(d)return o}return-1}function g(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var f=parseInt(t.substr(2*a,2),16);if(isNaN(f))return a;e[r+a]=f}return a}function w(e,t,r,n){return F(q(t,e.length-r),e,r,n)}function _(e,t,r,n){return F(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function S(e,t,r,n){return _(e,t,r,n)}function A(e,t,r,n){return F(D(t),e,r,n)}function M(e,t,r,n){return F(function(e,t){for(var r,n,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function x(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function k(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,f,s,c=e[i],u=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=r)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(o=e[i+1]))&&(s=(31&c)<<6|63&o)>127&&(u=s);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(s=(15&c)<<12|(63&o)<<6|63&a)>2047&&(s<55296||s>57343)&&(u=s);break;case 4:o=e[i+1],a=e[i+2],f=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&f)&&(s=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&f)>65535&&s<1114112&&(u=s)}null===u?(u=65533,d=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=d}return function(e){var t=e.length;if(t<=E)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=E));return r}(n)}t.Buffer=s,t.SlowBuffer=function(e){+e!=e&&(e=0);return s.alloc(+e)},t.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),s.poolSize=8192,s._augment=function(e){return e.__proto__=s.prototype,e},s.from=function(e,t,r){return c(null,e,t,r)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(e,t,r){return function(e,t,r,n){return u(t),t<=0?f(e,t):void 0!==r?"string"==typeof n?f(e,t).fill(r,n):f(e,t).fill(r):f(e,t)}(null,e,t,r)},s.allocUnsafe=function(e){return d(null,e)},s.allocUnsafeSlow=function(e){return d(null,e)},s.isBuffer=function(e){return!(null==e||!e._isBuffer)},s.compare=function(e,t){if(!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=s.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var a=e[r];if(!s.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},s.byteLength=l,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},s.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?k(this,0,e):b.apply(this,arguments)},s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},s.prototype.compare=function(e,t,r,n,i){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),f=Math.min(o,a),c=this.slice(n,i),u=e.slice(t,r),d=0;d<f;++d)if(c[d]!==u[d]){o=c[d],a=u[d];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},s.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},s.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},s.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return g(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return _(this,e,t,r);case"latin1":case"binary":return S(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var E=4096;function j(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function P(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function I(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=K(e[o]);return i}function B(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function O(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function C(e,t,r,n,i,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function U(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i<o;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function R(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i<o;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function z(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function T(e,t,r,n,o){return o||z(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,o){return o||z(e,0,r,8),i.write(e,t,r,n,52,8),r+8}s.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),s.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=s.prototype;else{var i=t-e;r=new s(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+e]}return r},s.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},s.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},s.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||C(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},s.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||C(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},s.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):U(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):U(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):R(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);C(this,e,t,r,i-1,-i)}var o=0,a=1,f=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===f&&0!==this[t+o-1]&&(f=1),this[t+o]=(e/a>>0)-f&255;return t+r},s.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);C(this,e,t,r,i-1,-i)}var o=r-1,a=1,f=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===f&&0!==this[t+o+1]&&(f=1),this[t+o]=(e/a>>0)-f&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):U(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):U(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):R(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,r){return T(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return T(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,o=n-r;if(this===e&&r<t&&t<n)for(i=o-1;i>=0;--i)e[i+t]=this[i+r];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},s.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var a=s.isBuffer(e)?e:q(new s(e,n).toString()),f=a.length;for(o=0;o<r-t;++o)this[o+t]=a[o%f]}return this};var N=/[^+\/0-9A-Za-z-_]/g;function K(e){return e<16?"0"+e.toString(16):e.toString(16)}function q(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function D(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(N,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(34))},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=r,r.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},function(e,t,r){"use strict";var n=t,i=r(11),o=r(9),a=r(38);n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(e,t){for(var r=[],n=1<<t+1,i=e.clone();i.cmpn(1)>=0;){var o;if(i.isOdd()){var a=i.andln(n-1);o=a>(n>>1)-1?(n>>1)-a:a,i.isubn(o)}else o=0;r.push(o);for(var f=0!==i.cmpn(0)&&0===i.andln(n-1)?t+1:1,s=1;s<f;s++)r.push(0);i.iushrn(f)}return r},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n=0,i=0;e.cmpn(-n)>0||t.cmpn(-i)>0;){var o,a,f,s=e.andln(3)+n&3,c=t.andln(3)+i&3;3===s&&(s=-1),3===c&&(c=-1),o=0==(1&s)?0:3!=(f=e.andln(7)+n&7)&&5!==f||2!==c?s:-s,r[0].push(o),a=0==(1&c)?0:3!=(f=t.andln(7)+i&7)&&5!==f||2!==s?c:-c,r[1].push(a),2*n===o+1&&(n=1-n),2*i===a+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a=r(53).Buffer}catch(e){}function f(e,t,r){for(var n=0,i=Math.min(e.length,r),o=t;o<i;o++){var a=e.charCodeAt(o)-48;n<<=4,n|=a>=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function s(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a<o;a++){var f=e.charCodeAt(a)-48;i*=n,i+=f>=49?f-49+10:f>=17?f-17+10:f}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,f=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<<f&67108863,this.words[o+1]=a>>>26-f&67108863,(f+=24)>=26&&(f-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=a<<f&67108863,this.words[o+1]=a>>>26-f&67108863,(f+=24)>=26&&(f-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=e.length-6,n=0;r>=t;r-=6)i=f(e,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==t&&(i=f(e,t,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,f=Math.min(o,o-a)+r,c=0,u=r;u<f;u+=n)c=s(e,u,u+n,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==a){var d=1;for(c=s(e,u,e.length,t),u=0;u<a;u++)d*=t;this.imuln(d),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[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],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,f=67108863&a,s=a/67108864|0;r.words[0]=f;for(var c=1;c<n;c++){for(var u=s>>>26,d=67108863&s,h=Math.min(c,t.length-1),p=Math.max(0,c-e.length+1);p<=h;p++){var l=c-p|0;u+=(a=(i=0|e.words[l])*(o=0|t.words[p])+d)/67108864|0,d=67108863&a}r.words[c]=0|d,s=0|u}return 0!==s?r.words[c]=0|s:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a<this.length;a++){var f=this.words[a],s=(16777215&(f<<i|o)).toString(16);r=0!==(o=f>>>24-i&16777215)||a!==this.length-1?c[6-s.length]+s+r:s+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var h=u[e],p=d[e];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var b=l.modn(p).toString(e);r=(l=l.idivn(p)).isZero()?b+r:c[h-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,f,s="le"===t,c=new e(o),u=this.clone();if(s){for(f=0;!u.isZero();f++)a=u.andln(255),u.iushrn(8),c[f]=a;for(;f<o;f++)c[f]=0}else{for(f=0;f<o-i;f++)c[f]=0;for(f=0;!u.isZero();f++)a=u.andln(255),u.iushrn(8),c[o-f-1]=a}return c},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a<n.length;a++)o=(t=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<r.length;a++)o=(t=(0|r.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,r){var n,i,o,a=e.words,f=t.words,s=r.words,c=0,u=0|a[0],d=8191&u,h=u>>>13,p=0|a[1],l=8191&p,b=p>>>13,y=0|a[2],m=8191&y,v=y>>>13,g=0|a[3],w=8191&g,_=g>>>13,S=0|a[4],A=8191&S,M=S>>>13,x=0|a[5],k=8191&x,E=x>>>13,j=0|a[6],P=8191&j,I=j>>>13,B=0|a[7],O=8191&B,C=B>>>13,U=0|a[8],R=8191&U,z=U>>>13,T=0|a[9],L=8191&T,N=T>>>13,K=0|f[0],q=8191&K,D=K>>>13,F=0|f[1],H=8191&F,W=F>>>13,Y=0|f[2],J=8191&Y,V=Y>>>13,Z=0|f[3],G=8191&Z,X=Z>>>13,$=0|f[4],Q=8191&$,ee=$>>>13,te=0|f[5],re=8191&te,ne=te>>>13,ie=0|f[6],oe=8191&ie,ae=ie>>>13,fe=0|f[7],se=8191&fe,ce=fe>>>13,ue=0|f[8],de=8191&ue,he=ue>>>13,pe=0|f[9],le=8191&pe,be=pe>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(c+(n=Math.imul(d,q))|0)+((8191&(i=(i=Math.imul(d,D))+Math.imul(h,q)|0))<<13)|0;c=((o=Math.imul(h,D))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(l,q),i=(i=Math.imul(l,D))+Math.imul(b,q)|0,o=Math.imul(b,D);var me=(c+(n=n+Math.imul(d,H)|0)|0)+((8191&(i=(i=i+Math.imul(d,W)|0)+Math.imul(h,H)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,q),i=(i=Math.imul(m,D))+Math.imul(v,q)|0,o=Math.imul(v,D),n=n+Math.imul(l,H)|0,i=(i=i+Math.imul(l,W)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,W)|0;var ve=(c+(n=n+Math.imul(d,J)|0)|0)+((8191&(i=(i=i+Math.imul(d,V)|0)+Math.imul(h,J)|0))<<13)|0;c=((o=o+Math.imul(h,V)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(w,q),i=(i=Math.imul(w,D))+Math.imul(_,q)|0,o=Math.imul(_,D),n=n+Math.imul(m,H)|0,i=(i=i+Math.imul(m,W)|0)+Math.imul(v,H)|0,o=o+Math.imul(v,W)|0,n=n+Math.imul(l,J)|0,i=(i=i+Math.imul(l,V)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,V)|0;var ge=(c+(n=n+Math.imul(d,G)|0)|0)+((8191&(i=(i=i+Math.imul(d,X)|0)+Math.imul(h,G)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(A,q),i=(i=Math.imul(A,D))+Math.imul(M,q)|0,o=Math.imul(M,D),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(m,J)|0,i=(i=i+Math.imul(m,V)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,V)|0,n=n+Math.imul(l,G)|0,i=(i=i+Math.imul(l,X)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,X)|0;var we=(c+(n=n+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(h,Q)|0))<<13)|0;c=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(k,q),i=(i=Math.imul(k,D))+Math.imul(E,q)|0,o=Math.imul(E,D),n=n+Math.imul(A,H)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(M,H)|0,o=o+Math.imul(M,W)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,V)|0,n=n+Math.imul(m,G)|0,i=(i=i+Math.imul(m,X)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,X)|0,n=n+Math.imul(l,Q)|0,i=(i=i+Math.imul(l,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0;var _e=(c+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(h,re)|0))<<13)|0;c=((o=o+Math.imul(h,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(P,q),i=(i=Math.imul(P,D))+Math.imul(I,q)|0,o=Math.imul(I,D),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(E,H)|0,o=o+Math.imul(E,W)|0,n=n+Math.imul(A,J)|0,i=(i=i+Math.imul(A,V)|0)+Math.imul(M,J)|0,o=o+Math.imul(M,V)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(l,re)|0,i=(i=i+Math.imul(l,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0;var Se=(c+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(h,oe)|0))<<13)|0;c=((o=o+Math.imul(h,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(O,q),i=(i=Math.imul(O,D))+Math.imul(C,q)|0,o=Math.imul(C,D),n=n+Math.imul(P,H)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(k,J)|0,i=(i=i+Math.imul(k,V)|0)+Math.imul(E,J)|0,o=o+Math.imul(E,V)|0,n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,X)|0)+Math.imul(M,G)|0,o=o+Math.imul(M,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(m,re)|0,i=(i=i+Math.imul(m,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0,n=n+Math.imul(l,oe)|0,i=(i=i+Math.imul(l,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0;var Ae=(c+(n=n+Math.imul(d,se)|0)|0)+((8191&(i=(i=i+Math.imul(d,ce)|0)+Math.imul(h,se)|0))<<13)|0;c=((o=o+Math.imul(h,ce)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(R,q),i=(i=Math.imul(R,D))+Math.imul(z,q)|0,o=Math.imul(z,D),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(C,H)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(P,J)|0,i=(i=i+Math.imul(P,V)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,V)|0,n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,X)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(m,oe)|0,i=(i=i+Math.imul(m,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0,n=n+Math.imul(l,se)|0,i=(i=i+Math.imul(l,ce)|0)+Math.imul(b,se)|0,o=o+Math.imul(b,ce)|0;var Me=(c+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,he)|0)+Math.imul(h,de)|0))<<13)|0;c=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,q),i=(i=Math.imul(L,D))+Math.imul(N,q)|0,o=Math.imul(N,D),n=n+Math.imul(R,H)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(z,H)|0,o=o+Math.imul(z,W)|0,n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,V)|0)+Math.imul(C,J)|0,o=o+Math.imul(C,V)|0,n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(m,se)|0,i=(i=i+Math.imul(m,ce)|0)+Math.imul(v,se)|0,o=o+Math.imul(v,ce)|0,n=n+Math.imul(l,de)|0,i=(i=i+Math.imul(l,he)|0)+Math.imul(b,de)|0,o=o+Math.imul(b,he)|0;var xe=(c+(n=n+Math.imul(d,le)|0)|0)+((8191&(i=(i=i+Math.imul(d,be)|0)+Math.imul(h,le)|0))<<13)|0;c=((o=o+Math.imul(h,be)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,W))+Math.imul(N,H)|0,o=Math.imul(N,W),n=n+Math.imul(R,J)|0,i=(i=i+Math.imul(R,V)|0)+Math.imul(z,J)|0,o=o+Math.imul(z,V)|0,n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(C,G)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(E,re)|0,o=o+Math.imul(E,ne)|0,n=n+Math.imul(A,oe)|0,i=(i=i+Math.imul(A,ae)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,ae)|0,n=n+Math.imul(w,se)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(_,se)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(m,de)|0,i=(i=i+Math.imul(m,he)|0)+Math.imul(v,de)|0,o=o+Math.imul(v,he)|0;var ke=(c+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,be)|0)+Math.imul(b,le)|0))<<13)|0;c=((o=o+Math.imul(b,be)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(L,J),i=(i=Math.imul(L,V))+Math.imul(N,J)|0,o=Math.imul(N,V),n=n+Math.imul(R,G)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(z,G)|0,o=o+Math.imul(z,X)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,ae)|0,n=n+Math.imul(A,se)|0,i=(i=i+Math.imul(A,ce)|0)+Math.imul(M,se)|0,o=o+Math.imul(M,ce)|0,n=n+Math.imul(w,de)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(_,de)|0,o=o+Math.imul(_,he)|0;var Ee=(c+(n=n+Math.imul(m,le)|0)|0)+((8191&(i=(i=i+Math.imul(m,be)|0)+Math.imul(v,le)|0))<<13)|0;c=((o=o+Math.imul(v,be)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(L,G),i=(i=Math.imul(L,X))+Math.imul(N,G)|0,o=Math.imul(N,X),n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(z,Q)|0,o=o+Math.imul(z,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(k,se)|0,i=(i=i+Math.imul(k,ce)|0)+Math.imul(E,se)|0,o=o+Math.imul(E,ce)|0,n=n+Math.imul(A,de)|0,i=(i=i+Math.imul(A,he)|0)+Math.imul(M,de)|0,o=o+Math.imul(M,he)|0;var je=(c+(n=n+Math.imul(w,le)|0)|0)+((8191&(i=(i=i+Math.imul(w,be)|0)+Math.imul(_,le)|0))<<13)|0;c=((o=o+Math.imul(_,be)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,ee))+Math.imul(N,Q)|0,o=Math.imul(N,ee),n=n+Math.imul(R,re)|0,i=(i=i+Math.imul(R,ne)|0)+Math.imul(z,re)|0,o=o+Math.imul(z,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(P,se)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(I,se)|0,o=o+Math.imul(I,ce)|0,n=n+Math.imul(k,de)|0,i=(i=i+Math.imul(k,he)|0)+Math.imul(E,de)|0,o=o+Math.imul(E,he)|0;var Pe=(c+(n=n+Math.imul(A,le)|0)|0)+((8191&(i=(i=i+Math.imul(A,be)|0)+Math.imul(M,le)|0))<<13)|0;c=((o=o+Math.imul(M,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(L,re),i=(i=Math.imul(L,ne))+Math.imul(N,re)|0,o=Math.imul(N,ne),n=n+Math.imul(R,oe)|0,i=(i=i+Math.imul(R,ae)|0)+Math.imul(z,oe)|0,o=o+Math.imul(z,ae)|0,n=n+Math.imul(O,se)|0,i=(i=i+Math.imul(O,ce)|0)+Math.imul(C,se)|0,o=o+Math.imul(C,ce)|0,n=n+Math.imul(P,de)|0,i=(i=i+Math.imul(P,he)|0)+Math.imul(I,de)|0,o=o+Math.imul(I,he)|0;var Ie=(c+(n=n+Math.imul(k,le)|0)|0)+((8191&(i=(i=i+Math.imul(k,be)|0)+Math.imul(E,le)|0))<<13)|0;c=((o=o+Math.imul(E,be)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(L,oe),i=(i=Math.imul(L,ae))+Math.imul(N,oe)|0,o=Math.imul(N,ae),n=n+Math.imul(R,se)|0,i=(i=i+Math.imul(R,ce)|0)+Math.imul(z,se)|0,o=o+Math.imul(z,ce)|0,n=n+Math.imul(O,de)|0,i=(i=i+Math.imul(O,he)|0)+Math.imul(C,de)|0,o=o+Math.imul(C,he)|0;var Be=(c+(n=n+Math.imul(P,le)|0)|0)+((8191&(i=(i=i+Math.imul(P,be)|0)+Math.imul(I,le)|0))<<13)|0;c=((o=o+Math.imul(I,be)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(L,se),i=(i=Math.imul(L,ce))+Math.imul(N,se)|0,o=Math.imul(N,ce),n=n+Math.imul(R,de)|0,i=(i=i+Math.imul(R,he)|0)+Math.imul(z,de)|0,o=o+Math.imul(z,he)|0;var Oe=(c+(n=n+Math.imul(O,le)|0)|0)+((8191&(i=(i=i+Math.imul(O,be)|0)+Math.imul(C,le)|0))<<13)|0;c=((o=o+Math.imul(C,be)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(L,de),i=(i=Math.imul(L,he))+Math.imul(N,de)|0,o=Math.imul(N,he);var Ce=(c+(n=n+Math.imul(R,le)|0)|0)+((8191&(i=(i=i+Math.imul(R,be)|0)+Math.imul(z,le)|0))<<13)|0;c=((o=o+Math.imul(z,be)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863;var Ue=(c+(n=Math.imul(L,le))|0)+((8191&(i=(i=Math.imul(L,be))+Math.imul(N,le)|0))<<13)|0;return c=((o=Math.imul(N,be))+(i>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,s[0]=ye,s[1]=me,s[2]=ve,s[3]=ge,s[4]=we,s[5]=_e,s[6]=Se,s[7]=Ae,s[8]=Me,s[9]=xe,s[10]=ke,s[11]=Ee,s[12]=je,s[13]=Pe,s[14]=Ie,s[15]=Be,s[16]=Oe,s[17]=Ce,s[18]=Ue,0!==c&&(s[19]=c,r.length++),r};function l(e,t,r){return(new b).mulp(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):r<63?h(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var a=i;i=0;for(var f=67108863&n,s=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=s;c++){var u=o-c,d=(0|e.words[u])*(0|t.words[c]),h=67108863&d;f=67108863&(h=h+f|0),i+=(a=(a=a+(d/67108864|0)|0)+(h>>>26)|0)>>>26,a&=67108863}r.words[o]=f,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):l(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},b.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},b.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a<o;a++)n[a]=t[e[a]],i[a]=r[e[a]]},b.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var a=1;a<i;a<<=1)for(var f=a<<1,s=Math.cos(2*Math.PI/f),c=Math.sin(2*Math.PI/f),u=0;u<i;u+=f)for(var d=s,h=c,p=0;p<a;p++){var l=r[u+p],b=n[u+p],y=r[u+p+a],m=n[u+p+a],v=d*y-h*m;m=d*m+h*y,y=v,r[u+p]=l+y,n[u+p]=b+m,r[u+p+a]=l-y,n[u+p+a]=b-m,p!==f&&(v=s*d-c*h,h=s*h+c*d,d=v)}},b.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},b.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},b.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},b.prototype.convert13b=function(e,t,r,i){for(var o=0,a=0;a<t;a++)o+=0|e[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<i;++a)r[a]=0;n(0===o),n(0==(-8192&o))},b.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},b.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),f=new Array(n),s=new Array(n),c=new Array(n),u=new Array(n),d=new Array(n),h=r.words;h.length=n,this.convert13b(e.words,e.length,a,n),this.convert13b(t.words,t.length,c,n),this.transform(a,o,f,s,n,i),this.transform(c,o,u,d,n,i);for(var p=0;p<n;p++){var l=f[p]*u[p]-s[p]*d[p];s[p]=f[p]*d[p]+s[p]*u[p],f[p]=l}return this.conjugate(f,s,n),this.transform(f,s,h,o,n,i),this.conjugate(h,o,n),this.normalize13b(h,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),l(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var f=this.words[t]&o,s=(0|this.words[t])-f<<r;this.words[t]=s|a,a=f>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),f=67108863^67108863>>>o<<o,s=r;if(i-=a,i=Math.max(0,i),s){for(var c=0;c<a;c++)s.words[c]=this.words[c];s.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=i);c--){var d=0|this.words[c];this.words[c]=u<<26-o|d>>>o,u=d&f}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,a=e.length+r;this._expand(a);var f=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+f;var s=(0|e.words[i])*t;f=((o-=67108863&s)>>26)-(s/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)f=(o=(0|this.words[i+r])+f)>>26,this.words[i+r]=67108863&o;if(0===f)return this.strip();for(n(-1===f),f=0,i=0;i<this.length;i++)f=(o=-(0|this.words[i])+f)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var f,s=n.length-i.length;if("mod"!==t){(f=new o(null)).length=s+1,f.words=new Array(f.length);for(var c=0;c<f.length;c++)f.words[c]=0}var u=n.clone()._ishlnsubmul(i,1,s);0===u.negative&&(n=u,f&&(f.words[s]=1));for(var d=s-1;d>=0;d--){var h=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,d);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);f&&(f.words[d]=h)}return f&&f.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:f||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(f=this.neg().divmod(e,t),"mod"!==t&&(i=f.div.neg()),"div"!==t&&(a=f.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(f=this.divmod(e.neg(),t),"mod"!==t&&(i=f.div.neg()),{div:i,mod:f.mod}):0!=(this.negative&e.negative)?(f=this.neg().divmod(e.neg(),t),"div"!==t&&(a=f.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:f.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,f},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),f=new o(0),s=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var h=0,p=1;0==(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(u),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var l=0,b=1;0==(r.words[0]&b)&&l<26;++l,b<<=1);if(l>0)for(r.iushrn(l);l-- >0;)(f.isOdd()||s.isOdd())&&(f.iadd(u),s.isub(d)),f.iushrn(1),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(f),a.isub(s)):(r.isub(t),f.isub(i),s.isub(a))}return{a:f,b:s,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),f=new o(0),s=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);for(var d=0,h=1;0==(r.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(r.iushrn(d);d-- >0;)f.isOdd()&&f.iadd(s),f.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(f)):(r.isub(t),f.isub(a))}return(i=0===t.cmpn(1)?a:f).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;0!==o&&a<this.length;a++){var f=0|this.words[a];o=(f+=o)>>>26,f&=67108863,this.words[a]=f}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function m(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function g(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function A(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},m.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},m.prototype.split=function(e,t){e.iushrn(this.n,0,t)},m.prototype.imulK=function(e){return e.imul(this.k)},i(v,m),v.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n<r;n++)t.words[n]=e.words[n];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=4194303&i,n=10;n<e.length;n++){var o=0|e.words[n];e.words[n-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(g,m),i(w,m),i(_,m),_.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new g;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return y[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var f=new o(1).toRed(this),s=f.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,c).cmp(s);)u.redIAdd(s);for(var d=this.pow(u,i),h=this.pow(e,i.addn(1).iushrn(1)),p=this.pow(e,i),l=a;0!==p.cmp(f);){for(var b=p,y=0;0!==b.cmp(f);y++)b=b.redSqr();n(y<l);var m=this.pow(d,new o(1).iushln(l-y-1));h=h.redMul(m),d=m.redSqr(),p=p.redMul(d),l=y}return h},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],a=0,f=0,s=t.bitLength()%26;for(0===s&&(s=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],u=s-1;u>=0;u--){var d=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4===++f||0===n&&0===u)&&(i=this.mul(i,r[a]),f=0,a=0)):f=0}s=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new A(e)},i(A,S),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(31)(e))},function(e,t,r){"use strict";t.utils=r(82),t.Cipher=r(83),t.DES=r(84),t.CBC=r(85),t.EDE=r(86)},function(e,t,r){"use strict";var n=r(9),i=r(8);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function f(e){return 1===e.length?"0"+e:e}function s(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var n=0,i=0;i<e.length;i++){var a=e.charCodeAt(i);a<128?r[n++]=a:a<2048?(r[n++]=a>>6|192,r[n++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r},t.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=f(e[r].toString(16));return t},t.htonl=a,t.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=a(i)),r+=s(i.toString(16))}return r},t.zero2=f,t.zero8=s,t.join32=function(e,t,r,i){var o=r-t;n(o%4==0);for(var a=new Array(o/4),f=0,s=t;f<a.length;f++,s+=4){var c;c="big"===i?e[s]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3]:e[s+3]<<24|e[s+2]<<16|e[s+1]<<8|e[s],a[f]=c>>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var o=e[n];"big"===t?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o<n?1:0)+r+i;e[t]=a>>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,a,f){var s=0,c=t;return s+=(c=c+n>>>0)<t?1:0,s+=(c=c+o>>>0)<o?1:0,e+r+i+a+(s+=(c=c+f>>>0)<f?1:0)>>>0},t.sum64_4_lo=function(e,t,r,n,i,o,a,f){return t+n+o+f>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,a,f,s,c){var u=0,d=t;return u+=(d=d+n>>>0)<t?1:0,u+=(d=d+o>>>0)<o?1:0,u+=(d=d+f>>>0)<f?1:0,e+r+i+a+s+(u+=(d=d+c>>>0)<c?1:0)>>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,f,s,c){return t+n+o+f+c>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";const n=r(8),i=r(25).Reporter,o=r(7).Buffer;function a(e,t){i.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function f(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return f.isEncoderBuffer(e)||(e=new f(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(a,i),t.DecoderBuffer=a,a.isDecoderBuffer=function(e){if(e instanceof a)return!0;return"object"==typeof e&&o.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},a.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},a.prototype.restore=function(e){const t=new a(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},a.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const r=new a(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},a.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.EncoderBuffer=f,f.isEncoderBuffer=function(e){if(e instanceof f)return!0;return"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},f.prototype.join=function(e,t){return e||(e=new o(this.length)),t||(t=0),0===this.length?e:(Array.isArray(this.value)?this.value.forEach(function(r){r.join(e,t),t+=r.length}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length),e)}},function(e,t,r){"use strict";var n=r(13),i=r(9);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pbkdf2",{enumerable:!0,get:function(){return n.pbkdf2}}),Object.defineProperty(t,"pbkdf1",{enumerable:!0,get:function(){return n.pbkdf1}}),t.default=void 0;var n=r(87),i={pbkdf2:n.pbkdf2,pbkdf1:n.pbkdf1};t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getRandomBytes",{enumerable:!0,get:function(){return n.getRandomBytes}}),Object.defineProperty(t,"getRandomAsciiString",{enumerable:!0,get:function(){return n.getRandomAsciiString}}),Object.defineProperty(t,"getRandomString",{enumerable:!0,get:function(){return n.getRandomString}}),Object.defineProperty(t,"getRandomSampledString",{enumerable:!0,get:function(){return n.getRandomSampledString}}),t.default=void 0;var n=r(110),i={getRandomBytes:n.getRandomBytes,getRandomAsciiString:n.getRandomAsciiString,getRandomString:n.getRandomString,getRandomSampledString:n.getRandomSampledString};t.default=i},function(e,t,r){"use strict";var n=r(11),i=r(10),o=i.getNAF,a=i.getJSF,f=i.assert;function s(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.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=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=s,s.prototype.point=function(){throw new Error("Not implemented")},s.prototype.validate=function(){throw new Error("Not implemented")},s.prototype._fixedNafMul=function(e,t){f(e.precomputed);var r=e._getDoubles(),n=o(t,1),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;for(var a=[],s=0;s<n.length;s+=r.step){var c=0;for(t=s+r.step-1;t>=s;t--)c=(c<<1)+n[t];a.push(c)}for(var u=this.jpoint(null,null,null),d=this.jpoint(null,null,null),h=i;h>0;h--){for(s=0;s<a.length;s++){(c=a[s])===h?d=d.mixedAdd(r.points[s]):c===-h&&(d=d.mixedAdd(r.points[s].neg()))}u=u.add(d)}return u.toP()},s.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,a=o(t,r),s=this.jpoint(null,null,null),c=a.length-1;c>=0;c--){for(t=0;c>=0&&0===a[c];c--)t++;if(c>=0&&t++,s=s.dblp(t),c<0)break;var u=a[c];f(0!==u),s="affine"===e.type?u>0?s.mixedAdd(i[u-1>>1]):s.mixedAdd(i[-u-1>>1].neg()):u>0?s.add(i[u-1>>1]):s.add(i[-u-1>>1].neg())}return"affine"===e.type?s.toP():s},s.prototype._wnafMulAdd=function(e,t,r,n,i){for(var f=this._wnafT1,s=this._wnafT2,c=this._wnafT3,u=0,d=0;d<n;d++){var h=(x=t[d])._getNAFPoints(e);f[d]=h.wnd,s[d]=h.points}for(d=n-1;d>=1;d-=2){var p=d-1,l=d;if(1===f[p]&&1===f[l]){var b=[t[p],null,null,t[l]];0===t[p].y.cmp(t[l].y)?(b[1]=t[p].add(t[l]),b[2]=t[p].toJ().mixedAdd(t[l].neg())):0===t[p].y.cmp(t[l].y.redNeg())?(b[1]=t[p].toJ().mixedAdd(t[l]),b[2]=t[p].add(t[l].neg())):(b[1]=t[p].toJ().mixedAdd(t[l]),b[2]=t[p].toJ().mixedAdd(t[l].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],m=a(r[p],r[l]);u=Math.max(m[0].length,u),c[p]=new Array(u),c[l]=new Array(u);for(var v=0;v<u;v++){var g=0|m[0][v],w=0|m[1][v];c[p][v]=y[3*(g+1)+(w+1)],c[l][v]=0,s[p]=b}}else c[p]=o(r[p],f[p]),c[l]=o(r[l],f[l]),u=Math.max(c[p].length,u),u=Math.max(c[l].length,u)}var _=this.jpoint(null,null,null),S=this._wnafT4;for(d=u;d>=0;d--){for(var A=0;d>=0;){var M=!0;for(v=0;v<n;v++)S[v]=0|c[v][d],0!==S[v]&&(M=!1);if(!M)break;A++,d--}if(d>=0&&A++,_=_.dblp(A),d<0)break;for(v=0;v<n;v++){var x,k=S[v];0!==k&&(k>0?x=s[v][k-1>>1]:k<0&&(x=s[v][-k-1>>1].neg()),_="affine"===x.type?_.mixedAdd(x):_.add(x))}}for(d=0;d<n;d++)s[d]=null;return i?_:_.toP()},s.BasePoint=c,c.prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},s.prototype.decodePoint=function(e,t){e=i.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?f(e[e.length-1]%2==0):7===e[0]&&f(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(e){return this.encode(e,!0)},c.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},c.prototype.encode=function(e,t){return i.encode(this._encode(t),e)},c.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},c.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)n=n.dbl();r.push(n)}return{step:e,points:r}},c.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},function(e,t,r){var n=t;n.utils=r(13),n.common=r(16),n.sha=r(68),n.ripemd=r(72),n.hmac=r(73),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(e,t){e.exports=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRootWebCryptoAll=t.getWebCryptoAll=t.getMsCrypto=t.getWebCrypto=t.getNodeCrypto=t.default=void 0;var n=function(){return"undefined"!=typeof window?void 0:r(40)};t.getNodeCrypto=n;var i=function(){if("undefined"!=typeof window)return window.crypto?window.crypto.subtle:void 0};t.getWebCrypto=i;var o=function(){if("undefined"!=typeof window)return window.msCrypto?window.msCrypto.subtle:window.crypto?window.crypto.subtle:void 0};t.getWebCryptoAll=o;var a=function(){if("undefined"!=typeof window)return window.msCrypto?window.msCrypto:window.crypto?window.crypto:void 0};t.getRootWebCryptoAll=a;var f=function(){if("undefined"!=typeof window&&!window.crypto)return window.msCrypto?window.msCrypto.subtle:void 0};t.getMsCrypto=f;var s={getNodeCrypto:n,getWebCrypto:i,getMsCrypto:f,getWebCryptoAll:o,getRootWebCryptoAll:a};t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"compute",{enumerable:!0,get:function(){return n.compute}}),t.default=void 0;var n=r(88),i={compute:n.compute};t.default=i},function(e,t,r){"use strict";const n=r(25).Reporter,i=r(15).EncoderBuffer,o=r(15).DecoderBuffer,a=r(9),f=["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"],s=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(f);function c(e,t,r){const n={};this._baseState=n,n.name=r,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}e.exports=c;const u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){const e=this._baseState,t={};u.forEach(function(r){t[r]=e[r]});const r=new this.constructor(t.parent);return r._baseState=t,r},c.prototype._wrap=function(){const e=this._baseState;s.forEach(function(t){this[t]=function(){const r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}},this)},c.prototype._init=function(e){const t=this._baseState;a(null===t.parent),e.call(this),t.children=t.children.filter(function(e){return e._baseState.parent===this},this),a.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){const t=this._baseState,r=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this),0!==r.length&&(a(null===t.children),t.children=r,r.forEach(function(e){e._baseState.parent=this},this)),0!==e.length&&(a(null===t.args),t.args=e,t.reverseArgs=e.map(function(e){if("object"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach(function(r){r==(0|r)&&(r|=0);const n=e[r];t[n]=r}),t}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(e){c.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}}),f.forEach(function(e){c.prototype[e]=function(){const t=this._baseState,r=Array.prototype.slice.call(arguments);return a(null===t.tag),t.tag=e,this._useArgs(r),this}}),c.prototype.use=function(e){a(e);const t=this._baseState;return a(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){const t=this._baseState;return a(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){const t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){const t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){const t=this._baseState;return a(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){const t=this._baseState;return a(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map(function(t){return e[t]})),this},c.prototype.contains=function(e){const t=this._baseState;return a(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){const r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));let n,i=r.default,a=!0,f=null;if(null!==r.key&&(f=e.enterKey(r.key)),r.optional){let n=null;if(null!==r.explicit?n=r.explicit:null!==r.implicit?n=r.implicit:null!==r.tag&&(n=r.tag),null!==n||r.any){if(a=this._peekTag(e,n,r.any),e.isError(a))return a}else{const n=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),a=!0}catch(e){a=!1}e.restore(n)}}if(r.obj&&a&&(n=e.enterObject()),a){if(null!==r.explicit){const t=this._decodeTag(e,r.explicit);if(e.isError(t))return t;e=t}const n=e.offset;if(null===r.use&&null===r.choice){let t;r.any&&(t=e.save());const n=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(n))return n;r.any?i=e.raw(t):e=n}if(t&&t.track&&null!==r.tag&&t.track(e.path(),n,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach(function(r){r._decode(e,t)}),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){const n=new o(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(n,t)}}return r.obj&&a&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==a?null!==f&&e.exitKey(f):e.leaveKey(f,r.key,i),i},c.prototype._decodeGeneric=function(e,t,r){const n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){const r=this._baseState;return r.useDecoder=this._use(e,t),a(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},c.prototype._decodeChoice=function(e,t){const r=this._baseState;let n=null,i=!1;return Object.keys(r.choice).some(function(o){const a=e.save(),f=r.choice[o];try{const r=f._decode(e,t);if(e.isError(r))return!1;n={type:o,value:r},i=!0}catch(t){return e.restore(a),!1}return!0},this),i?n:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},c.prototype._encode=function(e,t,r){const n=this._baseState;if(null!==n.default&&n.default===e)return;const i=this._encodeValue(e,t,r);return void 0===i||this._skipDefault(i,t,r)?void 0:i},c.prototype._encodeValue=function(e,t,r){const i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new n);let o=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}let a=null,f=!1;if(i.any)o=this._createEncoderBuffer(e);else if(i.choice)o=this._encodeChoice(e,t);else if(i.contains)a=this._getUse(i.contains,r)._encode(e,t),f=!0;else if(i.children)a=i.children.map(function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");const n=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");const i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i},this).filter(function(e){return e}),a=this._createEncoderBuffer(a);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const r=this.clone();r._baseState.implicit=null,a=this._createEncoderBuffer(e.map(function(r){const n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)},r))}else null!==i.use?o=this._getUse(i.use,r)._encode(e,t):(a=this._encodePrimitive(i.tag,e),f=!0);if(!i.any&&null===i.choice){const e=null!==i.implicit?i.implicit:i.tag,r=null===i.implicit?"universal":"context";null===e?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(e,f,r,a))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},c.prototype._encodeChoice=function(e,t){const r=this._baseState,n=r.choice[e.type];return n||a(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){const r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-.\/:=?]*$/.test(e)}},function(e,t,r){"use strict";const n=r(8);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.Reporter=i,i.prototype.isError=function(e){return e instanceof o},i.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){const n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){const t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){let t;const r=this._reporterState,n=e instanceof o;if(t=n?e:new o(r.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},function(e,t,r){"use strict";function n(e){const t={};return Object.keys(e).forEach(function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r}),t}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)},function(e,t,r){"use strict";var n,i=t,o=r(20),a=r(41),f=r(10).assert;function s(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,f(this.g.validate(),"Invalid curve"),f(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new s(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=s,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:o.sha256,gRed:!1,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:o.sha256,gRed:!1,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:o.sha256,gRed:!1,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:o.sha384,gRed:!1,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:o.sha512,gRed:!1,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:o.sha256,gRed:!1,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:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(74)}catch(e){n=void 0}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:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},function(e,t,r){"use strict";e.exports=function(e,t){return function(r,n){var i=2*n,o=2*t;r[i]=e[o],r[i+1]=e[o+1]}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"encrypt",{enumerable:!0,get:function(){return n.encrypt}}),Object.defineProperty(t,"decrypt",{enumerable:!0,get:function(){return n.decrypt}}),Object.defineProperty(t,"wrapKey",{enumerable:!0,get:function(){return n.wrapKey}}),Object.defineProperty(t,"unwrapKey",{enumerable:!0,get:function(){return n.unwrapKey}}),t.default=void 0;var n=r(107),i={encrypt:n.encrypt,decrypt:n.decrypt,wrapKey:n.wrapKey,unwrapKey:n.unwrapKey};t.default=i},function(e,t,r){(function(e,r){var n=200,i="__lodash_hash_undefined__",o=9007199254740991,a="[object Arguments]",f="[object Boolean]",s="[object Date]",c="[object Function]",u="[object GeneratorFunction]",d="[object Map]",h="[object Number]",p="[object Object]",l="[object RegExp]",b="[object Set]",y="[object String]",m="[object Symbol]",v="[object ArrayBuffer]",g="[object DataView]",w="[object Float32Array]",_="[object Float64Array]",S="[object Int8Array]",A="[object Int16Array]",M="[object Int32Array]",x="[object Uint8Array]",k="[object Uint8ClampedArray]",E="[object Uint16Array]",j="[object Uint32Array]",P=/\w*$/,I=/^\[object .+?Constructor\]$/,B=/^(?:0|[1-9]\d*)$/,O={};O[a]=O["[object Array]"]=O[v]=O[g]=O[f]=O[s]=O[w]=O[_]=O[S]=O[A]=O[M]=O[d]=O[h]=O[p]=O[l]=O[b]=O[y]=O[m]=O[x]=O[k]=O[E]=O[j]=!0,O["[object Error]"]=O[c]=O["[object WeakMap]"]=!1;var C="object"==typeof e&&e&&e.Object===Object&&e,U="object"==typeof self&&self&&self.Object===Object&&self,R=C||U||Function("return this")(),z=t&&!t.nodeType&&t,T=z&&"object"==typeof r&&r&&!r.nodeType&&r,L=T&&T.exports===z;function N(e,t){return e.set(t[0],t[1]),e}function K(e,t){return e.add(t),e}function q(e,t,r,n){var i=-1,o=e?e.length:0;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function D(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function F(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function H(e,t){return function(r){return e(t(r))}}function W(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var Y,J=Array.prototype,V=Function.prototype,Z=Object.prototype,G=R["__core-js_shared__"],X=(Y=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||""))?"Symbol(src)_1."+Y:"",$=V.toString,Q=Z.hasOwnProperty,ee=Z.toString,te=RegExp("^"+$.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),re=L?R.Buffer:void 0,ne=R.Symbol,ie=R.Uint8Array,oe=H(Object.getPrototypeOf,Object),ae=Object.create,fe=Z.propertyIsEnumerable,se=J.splice,ce=Object.getOwnPropertySymbols,ue=re?re.isBuffer:void 0,de=H(Object.keys,Object),he=Te(R,"DataView"),pe=Te(R,"Map"),le=Te(R,"Promise"),be=Te(R,"Set"),ye=Te(R,"WeakMap"),me=Te(Object,"create"),ve=De(he),ge=De(pe),we=De(le),_e=De(be),Se=De(ye),Ae=ne?ne.prototype:void 0,Me=Ae?Ae.valueOf:void 0;function xe(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ke(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Ee(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function je(e){this.__data__=new ke(e)}function Pe(e,t){var r=He(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&We(e)}(e)&&Q.call(e,"callee")&&(!fe.call(e,"callee")||ee.call(e)==a)}(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],n=r.length,i=!!n;for(var o in e)!t&&!Q.call(e,o)||i&&("length"==o||Ke(o,n))||r.push(o);return r}function Ie(e,t,r){var n=e[t];Q.call(e,t)&&Fe(n,r)&&(void 0!==r||t in e)||(e[t]=r)}function Be(e,t){for(var r=e.length;r--;)if(Fe(e[r][0],t))return r;return-1}function Oe(e,t,r,n,i,o,I){var B;if(n&&(B=o?n(e,i,o,I):n(e)),void 0!==B)return B;if(!Ve(e))return e;var C=He(e);if(C){if(B=function(e){var t=e.length,r=e.constructor(t);t&&"string"==typeof e[0]&&Q.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!t)return function(e,t){var r=-1,n=e.length;t||(t=Array(n));for(;++r<n;)t[r]=e[r];return t}(e,B)}else{var U=Ne(e),R=U==c||U==u;if(Ye(e))return function(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}(e,t);if(U==p||U==a||R&&!o){if(D(e))return o?e:{};if(B=function(e){return"function"!=typeof e.constructor||qe(e)?{}:(t=oe(e),Ve(t)?ae(t):{});var t}(R?{}:e),!t)return function(e,t){return Re(e,Le(e),t)}(e,function(e,t){return e&&Re(t,Ze(t),e)}(B,e))}else{if(!O[U])return o?e:{};B=function(e,t,r,n){var i=e.constructor;switch(t){case v:return Ue(e);case f:case s:return new i(+e);case g:return function(e,t){var r=t?Ue(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,n);case w:case _:case S:case A:case M:case x:case k:case E:case j:return function(e,t){var r=t?Ue(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}(e,n);case d:return function(e,t,r){return q(t?r(F(e),!0):F(e),N,new e.constructor)}(e,n,r);case h:case y:return new i(e);case l:return(c=new(a=e).constructor(a.source,P.exec(a))).lastIndex=a.lastIndex,c;case b:return function(e,t,r){return q(t?r(W(e),!0):W(e),K,new e.constructor)}(e,n,r);case m:return o=e,Me?Object(Me.call(o)):{}}var o;var a,c}(e,U,Oe,t)}}I||(I=new je);var z=I.get(e);if(z)return z;if(I.set(e,B),!C)var T=r?function(e){return function(e,t,r){var n=t(e);return He(e)?n:function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}(n,r(e))}(e,Ze,Le)}(e):Ze(e);return function(e,t){for(var r=-1,n=e?e.length:0;++r<n&&!1!==t(e[r],r,e););}(T||e,function(i,o){T&&(i=e[o=i]),Ie(B,o,Oe(i,t,r,n,o,e,I))}),B}function Ce(e){return!(!Ve(e)||(t=e,X&&X in t))&&(Je(e)||D(e)?te:I).test(De(e));var t}function Ue(e){var t=new e.constructor(e.byteLength);return new ie(t).set(new ie(e)),t}function Re(e,t,r,n){r||(r={});for(var i=-1,o=t.length;++i<o;){var a=t[i],f=n?n(r[a],e[a],a,r,e):void 0;Ie(r,a,void 0===f?e[a]:f)}return r}function ze(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function Te(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return Ce(r)?r:void 0}xe.prototype.clear=function(){this.__data__=me?me(null):{}},xe.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},xe.prototype.get=function(e){var t=this.__data__;if(me){var r=t[e];return r===i?void 0:r}return Q.call(t,e)?t[e]:void 0},xe.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:Q.call(t,e)},xe.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?i:t,this},ke.prototype.clear=function(){this.__data__=[]},ke.prototype.delete=function(e){var t=this.__data__,r=Be(t,e);return!(r<0||(r==t.length-1?t.pop():se.call(t,r,1),0))},ke.prototype.get=function(e){var t=this.__data__,r=Be(t,e);return r<0?void 0:t[r][1]},ke.prototype.has=function(e){return Be(this.__data__,e)>-1},ke.prototype.set=function(e,t){var r=this.__data__,n=Be(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},Ee.prototype.clear=function(){this.__data__={hash:new xe,map:new(pe||ke),string:new xe}},Ee.prototype.delete=function(e){return ze(this,e).delete(e)},Ee.prototype.get=function(e){return ze(this,e).get(e)},Ee.prototype.has=function(e){return ze(this,e).has(e)},Ee.prototype.set=function(e,t){return ze(this,e).set(e,t),this},je.prototype.clear=function(){this.__data__=new ke},je.prototype.delete=function(e){return this.__data__.delete(e)},je.prototype.get=function(e){return this.__data__.get(e)},je.prototype.has=function(e){return this.__data__.has(e)},je.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ke){var i=r.__data__;if(!pe||i.length<n-1)return i.push([e,t]),this;r=this.__data__=new Ee(i)}return r.set(e,t),this};var Le=ce?H(ce,Object):function(){return[]},Ne=function(e){return ee.call(e)};function Ke(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||B.test(e))&&e>-1&&e%1==0&&e<t}function qe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Z)}function De(e){if(null!=e){try{return $.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Fe(e,t){return e===t||e!=e&&t!=t}(he&&Ne(new he(new ArrayBuffer(1)))!=g||pe&&Ne(new pe)!=d||le&&"[object Promise]"!=Ne(le.resolve())||be&&Ne(new be)!=b||ye&&"[object WeakMap]"!=Ne(new ye))&&(Ne=function(e){var t=ee.call(e),r=t==p?e.constructor:void 0,n=r?De(r):void 0;if(n)switch(n){case ve:return g;case ge:return d;case we:return"[object Promise]";case _e:return b;case Se:return"[object WeakMap]"}return t});var He=Array.isArray;function We(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}(e.length)&&!Je(e)}var Ye=ue||function(){return!1};function Je(e){var t=Ve(e)?ee.call(e):"";return t==c||t==u}function Ve(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ze(e){return We(e)?Pe(e):function(e){if(!qe(e))return de(e);var t=[];for(var r in Object(e))Q.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)}r.exports=function(e){return Oe(e,!0,!0)}}).call(this,r(34),r(31)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";const n=t;n.der=r(33),n.pem=r(58)},function(e,t,r){"use strict";const n=r(8),i=r(7).Buffer,o=r(24),a=r(26);function f(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new s,this.tree._init(e.body)}function s(e){o.call(this,"der",e)}function c(e){return e<10?"0"+e:e}e.exports=f,f.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(s,o),s.prototype._encodeComposite=function(e,t,r,n){const o=function(e,t,r,n){let i;"seqof"===e?e="seq":"setof"===e&&(e="set");if(a.tagByName.hasOwnProperty(e))i=a.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);i=e}if(i>=31)return n.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=a.tagClassByName[r||"universal"]<<6}(e,t,r,this.reporter);if(n.length<128){const e=new i(2);return e[0]=o,e[1]=n.length,this._createEncoderBuffer([e,n])}let f=1;for(let e=n.length;e>=256;e>>=8)f++;const s=new i(2+f);s[0]=o,s[1]=128|f;for(let e=1+f,t=n.length;t>0;e--,t>>=8)s[e]=255&t;return this._createEncoderBuffer([s,n])},s.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=new i(2*e.length);for(let r=0;r<e.length;r++)t.writeUInt16BE(e.charCodeAt(r),2*r);return this._createEncoderBuffer(t)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)?this._createEncoderBuffer(e):"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},s.prototype._encodeObjid=function(e,t,r){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s.]+/g);for(let t=0;t<e.length;t++)e[t]|=0}else if(Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)e[t]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!r){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let n=0;for(let t=0;t<e.length;t++){let r=e[t];for(n++;r>=128;r>>=7)n++}const o=new i(n);let a=o.length-1;for(let t=e.length-1;t>=0;t--){let r=e[t];for(o[a--]=127&r;(r>>=7)>0;)o[a--]=128|127&r}return this._createEncoderBuffer(o)},s.prototype._encodeTime=function(e,t){let r;const n=new Date(e);return"gentime"===t?r=[c(n.getUTCFullYear()),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[c(n.getUTCFullYear()%100),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},s.prototype._encodeNull=function(){return this._createEncoderBuffer("")},s.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=new i(t)}if(i.isBuffer(e)){let t=e.length;0===e.length&&t++;const r=new i(t);return e.copy(r),0===e.length&&(r[0]=0),this._createEncoderBuffer(r)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let r=1;for(let t=e;t>=256;t>>=8)r++;const n=new Array(r);for(let t=n.length-1;t>=0;t--)n[t]=255&e,e>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(new i(n))},s.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},s.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},s.prototype._skipDefault=function(e,t,r){const n=this._baseState;let i;if(null===n.default)return!1;const o=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,r).join()),o.length!==n.defaultBuffer.length)return!1;for(i=0;i<o.length;i++)if(o[i]!==n.defaultBuffer[i])return!1;return!0}},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";const n=t;n.der=r(36),n.pem=r(59)},function(e,t,r){"use strict";const n=r(8),i=r(11),o=r(15).DecoderBuffer,a=r(24),f=r(26);function s(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){a.call(this,"der",e)}function u(e,t){let r=e.readUInt8(t);if(e.isError(r))return r;const n=f.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){let n=r;for(r=0;128==(128&n);){if(n=e.readUInt8(t),e.isError(n))return n;r<<=7,r|=127&n}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:f.tag[r]}}function d(e,t,r){let n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;const i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(let t=0;t<i;t++){n<<=8;const t=e.readUInt8(r);if(e.isError(t))return t;n|=t}return n}e.exports=s,s.prototype.decode=function(e,t){return o.isDecoderBuffer(e)||(e=new o(e,t)),this.tree._decode(e,t)},n(c,a),c.prototype._peekTag=function(e,t,r){if(e.isEmpty())return!1;const n=e.save(),i=u(e,'Failed to peek tag: "'+t+'"');return e.isError(i)?i:(e.restore(n),i.tag===t||i.tagStr===t||i.tagStr+"of"===t||r)},c.prototype._decodeTag=function(e,t,r){const n=u(e,'Failed to decode tag of "'+t+'"');if(e.isError(n))return n;let i=d(e,n.primitive,'Failed to get length of "'+t+'"');if(e.isError(i))return i;if(!r&&n.tag!==t&&n.tagStr!==t&&n.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(n.primitive||null!==i)return e.skip(i,'Failed to match body of: "'+t+'"');const o=e.save(),a=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(a)?a:(i=e.offset-o.offset,e.restore(o),e.skip(i,'Failed to match body of: "'+t+'"'))},c.prototype._skipUntilEnd=function(e,t){for(;;){const r=u(e,t);if(e.isError(r))return r;const n=d(e,r.primitive,t);if(e.isError(n))return n;let i;if(i=r.primitive||null!==n?e.skip(n):this._skipUntilEnd(e,t),e.isError(i))return i;if("end"===r.tagStr)break}},c.prototype._decodeList=function(e,t,r,n){const i=[];for(;!e.isEmpty();){const t=this._peekTag(e,"end");if(e.isError(t))return t;const o=r.decode(e,"der",n);if(e.isError(o)&&t)break;i.push(o)}return i},c.prototype._decodeStr=function(e,t){if("bitstr"===t){const t=e.readUInt8();return e.isError(t)?t:{unused:t,data:e.raw()}}if("bmpstr"===t){const t=e.raw();if(t.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");let r="";for(let e=0;e<t.length/2;e++)r+=String.fromCharCode(t.readUInt16BE(2*e));return r}if("numstr"===t){const t=e.raw().toString("ascii");return this._isNumstr(t)?t:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){const t=e.raw().toString("ascii");return this._isPrintstr(t)?t:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},c.prototype._decodeObjid=function(e,t,r){let n;const i=[];let o=0,a=0;for(;!e.isEmpty();)o<<=7,o|=127&(a=e.readUInt8()),0==(128&a)&&(i.push(o),o=0);128&a&&i.push(o);const f=i[0]/40|0,s=i[0]%40;if(n=r?i:[f,s].concat(i.slice(1)),t){let e=t[n.join(" ")];void 0===e&&(e=t[n.join(".")]),void 0!==e&&(n=e)}return n},c.prototype._decodeTime=function(e,t){const r=e.raw().toString();let n,i,o,a,f,s;if("gentime"===t)n=0|r.slice(0,4),i=0|r.slice(4,6),o=0|r.slice(6,8),a=0|r.slice(8,10),f=0|r.slice(10,12),s=0|r.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");n=0|r.slice(0,2),i=0|r.slice(2,4),o=0|r.slice(4,6),a=0|r.slice(6,8),f=0|r.slice(8,10),s=0|r.slice(10,12),n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,o,a,f,s,0)},c.prototype._decodeNull=function(){return null},c.prototype._decodeBool=function(e){const t=e.readUInt8();return e.isError(t)?t:0!==t},c.prototype._decodeInt=function(e,t){const r=e.raw();let n=new i(r);return t&&(n=t[n.toString(10)]||n),n},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(62));t.encodeBase64=function(e){var r="";return r="string"==typeof e?e:t.arrayBufferToString(e),i.getEnvBtoa()(r)},t.decodeBase64=function(e){var r=i.getEnvAtob()(e),n=t.stringToArrayBuffer(r);return a(n)};var o=function(e){if(e instanceof Uint8Array)return e;if(ArrayBuffer.isView(e)&&void 0!==e.buffer)return new Uint8Array(e.buffer);if(e instanceof ArrayBuffer)return new Uint8Array(e);throw new Error("Input must be an ArrayBuffer or a TypedArray")},a=function(e){for(var t=!0,r=0;r<e.length;r++)if(e[r]>126||e[r]<32&&13!==e[r]&&10!==e[r]){t=!1;break}var n=null;if(t){n="";for(r=0;r<e.length;r++)n+=String.fromCharCode(e[r])}else n=e;return n};t.encodeBase64Url=function(e){return t.encodeBase64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},t.decodeBase64Url=function(e){return e=e.replace(/-/g,"+").replace(/_/g,"/"),t.decodeBase64(e)},t.arrayBufferToHexString=function(e){for(var t=o(e),r="",n=0;n<t.length;n++){var i=(255&t[n]).toString(16);r+=i=1===i.length?"0"+i:i}return r},t.hexStringToArrayBuffer=function(e){for(var t=[],r=e.length,n=0;n<r;n+=2)t.push(parseInt(e.substr(n,2),16));return new Uint8Array(t)},t.arrayBufferToString=function(e){var t=o(e),r=new Array(t.length);return t.forEach(function(e,t){r[t]=e}),String.fromCharCode.apply(null,r)},t.stringToArrayBuffer=function(e){return new Uint8Array(e.length).map(function(t,r){return e.charCodeAt(r)})}},function(e,t,r){"use strict";var n=t;function i(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",r=0;r<e.length;r++)t+=i(e[r].toString(16));return t}n.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16));else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,a=255&i;o?r.push(o,a):r.push(a)}return r},n.zero2=i,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}},function(e,t,r){var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=r(40);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return o.randomBytes(e)}}catch(e){}},function(t,r){t.exports=e},function(e,t,r){"use strict";var n=t;n.base=r(19),n.short=r(65),n.mont=r(66),n.edwards=r(67)},function(e,t,r){"use strict";var n=r(13).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function a(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?a(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},function(e,t,r){"use strict";var n=r(13),i=r(16),o=r(42),a=r(9),f=n.sum32,s=n.sum32_4,c=n.sum32_5,u=o.ch32,d=o.maj32,h=o.s0_256,p=o.s1_256,l=o.g0_256,b=o.g1_256,y=i.BlockHash,m=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function v(){if(!(this instanceof v))return new v;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}n.inherits(v,y),e.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=s(b(r[n-2]),r[n-7],l(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],y=this.h[2],m=this.h[3],v=this.h[4],g=this.h[5],w=this.h[6],_=this.h[7];for(a(this.k.length===r.length),n=0;n<r.length;n++){var S=c(_,p(v),u(v,g,w),this.k[n],r[n]),A=f(h(i),d(i,o,y));_=w,w=g,g=v,v=f(m,S),m=y,y=o,o=i,i=f(S,A)}this.h[0]=f(this.h[0],i),this.h[1]=f(this.h[1],o),this.h[2]=f(this.h[2],y),this.h[3]=f(this.h[3],m),this.h[4]=f(this.h[4],v),this.h[5]=f(this.h[5],g),this.h[6]=f(this.h[6],w),this.h[7]=f(this.h[7],_)},v.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(e,t,r){"use strict";var n=r(13),i=r(16),o=r(9),a=n.rotr64_hi,f=n.rotr64_lo,s=n.shr64_hi,c=n.shr64_lo,u=n.sum64,d=n.sum64_hi,h=n.sum64_lo,p=n.sum64_4_hi,l=n.sum64_4_lo,b=n.sum64_5_hi,y=n.sum64_5_lo,m=i.BlockHash,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];function g(){if(!(this instanceof g))return new g;m.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=v,this.W=new Array(160)}function w(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function _(e,t,r,n,i,o){var a=t&n^~t&o;return a<0&&(a+=4294967296),a}function S(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function A(e,t,r,n,i,o){var a=t&n^t&o^n&o;return a<0&&(a+=4294967296),a}function M(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function x(e,t){var r=f(e,t,28)^f(t,e,2)^f(t,e,7);return r<0&&(r+=4294967296),r}function k(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function E(e,t){var r=f(e,t,14)^f(e,t,18)^f(t,e,9);return r<0&&(r+=4294967296),r}function j(e,t){var r=a(e,t,1)^a(e,t,8)^s(e,t,7);return r<0&&(r+=4294967296),r}function P(e,t){var r=f(e,t,1)^f(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=a(e,t,19)^a(t,e,29)^s(e,t,6);return r<0&&(r+=4294967296),r}function B(e,t){var r=f(e,t,19)^f(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(g,m),e.exports=g,g.blockSize=1024,g.outSize=512,g.hmacStrength=192,g.padLength=128,g.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=I(r[n-4],r[n-3]),o=B(r[n-4],r[n-3]),a=r[n-14],f=r[n-13],s=j(r[n-30],r[n-29]),c=P(r[n-30],r[n-29]),u=r[n-32],d=r[n-31];r[n]=p(i,o,a,f,s,c,u,d),r[n+1]=l(i,o,a,f,s,c,u,d)}},g.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],i=this.h[1],a=this.h[2],f=this.h[3],s=this.h[4],c=this.h[5],p=this.h[6],l=this.h[7],m=this.h[8],v=this.h[9],g=this.h[10],j=this.h[11],P=this.h[12],I=this.h[13],B=this.h[14],O=this.h[15];o(this.k.length===r.length);for(var C=0;C<r.length;C+=2){var U=B,R=O,z=k(m,v),T=E(m,v),L=w(m,v,g,j,P),N=_(m,v,g,j,P,I),K=this.k[C],q=this.k[C+1],D=r[C],F=r[C+1],H=b(U,R,z,T,L,N,K,q,D,F),W=y(U,R,z,T,L,N,K,q,D,F);U=M(n,i),R=x(n,i),z=S(n,i,a,f,s),T=A(n,i,a,f,s,c);var Y=d(U,R,z,T),J=h(U,R,z,T);B=P,O=I,P=g,I=j,g=m,j=v,m=d(p,l,H,W),v=h(l,l,H,W),p=s,l=c,s=a,c=f,a=n,f=i,n=d(H,W,Y,J),i=h(H,W,Y,J)}u(this.h,0,n,i),u(this.h,2,a,f),u(this.h,4,s,c),u(this.h,6,p,l),u(this.h,8,m,v),u(this.h,10,g,j),u(this.h,12,P,I),u(this.h,14,B,O)},g.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(e,t){var r={utf8:{stringToBytes:function(e){return r.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(r.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r<e.length;r++)t.push(255&e.charCodeAt(r));return t},bytesToString:function(e){for(var t=[],r=0;r<e.length;r++)t.push(String.fromCharCode(e[r]));return t.join("")}}};e.exports=r},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={ciphers:{"AES-GCM":{nodePrefix:"aes-",nodeSuffix:"-gcm",ivLength:12,tagLength:16,staticIvLength:!0},"AES-CBC":{nodePrefix:"aes-",nodeSuffix:"-cbc",ivLength:16,staticIvLength:!0},"AES-CTR":{nodePrefix:"aes-",nodeSuffix:"-ctr",ivLength:12,staticIvLength:!1}},wrapKeys:{"AES-KW":{nodePrefix:"id-aes",nodeSuffix:"-wrap",ivLength:8,staticIvLength:!0,defaultIV:new Uint8Array([166,166,166,166,166,166,166,166])}}};t.default=n},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}},function(e,t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(t){return"function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?e.exports=n=function(e){return r(e)}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)},n(t)}e.exports=n},function(e,t,r){"use strict";var n=t;n.version=r(64).version,n.utils=r(10),n.rand=r(39),n.curve=r(41),n.curves=r(27),n.ec=r(75),n.eddsa=r(79)},function(e,t,r){e.exports=r(111)},function(e,t,r){var n=function(e){"use strict";var t,r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",f=i.toStringTag||"@@toStringTag";function s(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),a=new E(n||[]);return o._invoke=function(e,t,r){var n=u;return function(i,o){if(n===h)throw new Error("Generator is already running");if(n===p){if("throw"===i)throw o;return P()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var f=M(a,r);if(f){if(f===l)continue;return f}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===u)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var s=c(e,t,r);if("normal"===s.type){if(n=r.done?p:d,s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=p,r.method="throw",r.arg=s.arg)}}}(e,r,a),o}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var u="suspendedStart",d="suspendedYield",h="executing",p="completed",l={};function b(){}function y(){}function m(){}var v={};v[o]=function(){return this};var g=Object.getPrototypeOf,w=g&&g(g(j([])));w&&w!==r&&n.call(w,o)&&(v=w);var _=m.prototype=b.prototype=Object.create(v);function S(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function A(e){var t;this._invoke=function(r,i){function o(){return new Promise(function(t,o){!function t(r,i,o,a){var f=c(e[r],e,i);if("throw"!==f.type){var s=f.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?Promise.resolve(u.__await).then(function(e){t("next",e,o,a)},function(e){t("throw",e,o,a)}):Promise.resolve(u).then(function(e){s.value=e,o(s)},function(e){return t("throw",e,o,a)})}a(f.arg)}(r,i,t,o)})}return t=t?t.then(o,o):o()}}function M(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,M(e,r),"throw"===r.method))return l;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var i=c(n,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,l;var o=i.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,l):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,l)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function j(e){if(e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}return{next:P}}function P(){return{value:t,done:!0}}return y.prototype=_.constructor=m,m.constructor=y,m[f]=y.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,f in e||(e[f]="GeneratorFunction")),e.prototype=Object.create(_),e},e.awrap=function(e){return{__await:e}},S(A.prototype),A.prototype[a]=function(){return this},e.AsyncIterator=A,e.async=function(t,r,n,i){var o=new A(s(t,r,n,i));return e.isGeneratorFunction(r)?o:o.next().then(function(e){return e.done?e.value:o.next()})},S(_),_[f]="Generator",_[o]=function(){return this},_.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=j,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(k),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return f.type="throw",f.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],f=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;k(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:j(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),l}},e}(e.exports);try{regeneratorRuntime=n}catch(e){Function("r","regeneratorRuntime = r")(n)}},function(e,t){},function(e,t,r){"use strict";const n=r(32),i=r(35),o=r(8);function a(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new a(e,t)},a.prototype._createNamed=function(e){const t=this.name;function r(e){this._initNamed(e,t)}return o(r,e),r.prototype._initNamed=function(t,r){e.call(this,t,r)},new r(this)},a.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i[e])),this.decoders[e]},a.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},a.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n[e])),this.encoders[e]},a.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},function(e,t,r){"use strict";t.toByteArray=function(e){for(var t,r=c(e),n=r[0],a=r[1],f=new o(function(e,t,r){return 3*(t+r)/4-r}(0,n,a)),s=0,u=a>0?n-4:n,d=0;d<u;d+=4)t=i[e.charCodeAt(d)]<<18|i[e.charCodeAt(d+1)]<<12|i[e.charCodeAt(d+2)]<<6|i[e.charCodeAt(d+3)],f[s++]=t>>16&255,f[s++]=t>>8&255,f[s++]=255&t;2===a&&(t=i[e.charCodeAt(d)]<<2|i[e.charCodeAt(d+1)]>>4,f[s++]=255&t);1===a&&(t=i[e.charCodeAt(d)]<<10|i[e.charCodeAt(d+1)]<<4|i[e.charCodeAt(d+2)]>>2,f[s++]=t>>8&255,f[s++]=255&t);return f},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=0,f=r-i;a<f;a+=16383)o.push(u(e,a,a+16383>f?f:a+16383));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,s=a.length;f<s;++f)n[f]=a[f],i[a.charCodeAt(f)]=f;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,r){for(var i,o,a=[],f=t;f<r;f+=3)i=(e[f]<<16&16711680)+(e[f+1]<<8&65280)+(255&e[f+2]),a.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,r,n,i){var o,a,f=8*i-n-1,s=(1<<f)-1,c=s>>1,u=-7,d=r?i-1:0,h=r?-1:1,p=e[t+d];for(d+=h,o=p&(1<<-u)-1,p>>=-u,u+=f;u>0;o=256*o+e[t+d],d+=h,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=n;u>0;a=256*a+e[t+d],d+=h,u-=8);if(0===o)o=1-c;else{if(o===s)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=c}return(p?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,f,s,c=8*o-i-1,u=(1<<c)-1,d=u>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,l=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(f=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-a))<1&&(a--,s*=2),(t+=a+d>=1?h/s:h*Math.pow(2,1-d))*s>=2&&(a++,s/=2),a+d>=u?(f=0,a=u):a+d>=1?(f=(t*s-1)*Math.pow(2,i),a+=d):(f=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+p]=255&f,p+=l,f/=256,i-=8);for(a=a<<i|f,c+=i;c>0;e[r+p]=255&a,p+=l,a/=256,c-=8);e[r+p-l]|=128*b}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){"use strict";const n=r(8),i=r(33);function o(e){i.call(this,e),this.enc="pem"}n(o,i),e.exports=o,o.prototype.encode=function(e,t){const r=i.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"];for(let e=0;e<r.length;e+=64)n.push(r.slice(e,e+64));return n.push("-----END "+t.label+"-----"),n.join("\n")}},function(e,t,r){"use strict";const n=r(8),i=r(7).Buffer,o=r(36);function a(e){o.call(this,e),this.enc="pem"}n(a,o),e.exports=a,a.prototype.decode=function(e,t){const r=e.toString().split(/[\r\n]+/g),n=t.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/;let f=-1,s=-1;for(let e=0;e<r.length;e++){const t=r[e].match(a);if(null!==t&&t[2]===n){if(-1!==f){if("END"!==t[1])break;s=e;break}if("BEGIN"!==t[1])break;f=e}}if(-1===f||-1===s)throw new Error("PEM section not found for: "+n);const c=r.slice(f+1,s).join("");c.replace(/[^a-z0-9+\/=]+/gi,"");const u=new i(c,"base64");return o.prototype.decode.call(this,u,t)}},function(e,t,r){"use strict";const n=t;n.Reporter=r(25).Reporter,n.DecoderBuffer=r(15).DecoderBuffer,n.EncoderBuffer=r(15).EncoderBuffer,n.Node=r(24)},function(e,t,r){"use strict";const n=t;n._reverse=function(e){const t={};return Object.keys(e).forEach(function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r}),t},n.der=r(26)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.getEnvBtoa=function(){return"undefined"!=typeof window?window.btoa:r},t.getEnvAtob=function(){return"undefined"!=typeof window?window.atob:n};var r=function(t){if(void 0===e)throw new Error("UnsupportedEnvironment");var r=Object.prototype.toString.call(t).slice(8,-1);return(e.isBuffer(t)?t:["ArrayBuffer","TypedArray","Uint8Array","Int8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"].indexOf(r)>=0?e.from(t):e.from(t.toString(),"binary")).toString("base64")},n=function(t){if(void 0===e)throw new Error("UnsupportedEnvironment");return e.from(t,"base64").toString("binary")}}).call(this,r(7).Buffer)},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(37)),o={public:"PUBLIC KEY",private:"PRIVATE KEY",encryptedPrivate:"ENCRYPTED PRIVATE KEY",certificate:"CERTIFICATE",certRequest:"CERTIFICATE REQUEST"};t.pemToBin=function(e){var t=f(e);return i.decodeBase64(t)},t.binToPem=function(e,t){var r=i.encodeBase64(e);return a(r,t)};var a=function(e,t){if(Object.keys(o).indexOf(t)<0)throw new Error("Unsupported type");for(var r=o[t],n="-----BEGIN "+r+"-----\n";e.length>0;)n+=e.substring(0,64)+"\n",e=e.substring(64);return n=n+"-----END "+r+"-----"},f=function(e){var t=RegExp("^-----[s]*BEGIN[^-]*-----$","gm"),r=RegExp("^-----[s]*END[^-]*-----$","gm");try{var n=e.split(t)[1].split(r)[0];return n=n.replace(/\r?\n/g,"")}catch(e){throw new Error("Invalid format as PEM")}}},function(e){e.exports=JSON.parse('{"name":"elliptic","version":"6.5.0","description":"EC cryptography","main":"lib/elliptic.js","files":["lib"],"scripts":{"jscs":"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js","jshint":"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js","lint":"npm run jscs && npm run jshint","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":"^1.4.3","coveralls":"^2.11.3","grunt":"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2","istanbul":"^0.4.2","jscs":"^2.9.0","jshint":"^2.6.0","mocha":"^2.1.0"},"dependencies":{"bn.js":"^4.4.0","brorand":"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0","inherits":"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"}}')},function(e,t,r){"use strict";var n=r(10),i=r(11),o=r(8),a=r(19),f=n.assert;function s(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,r,n){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function u(e,t,r,n){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(s,a),e.exports=s,s.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],f(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map(function(e){return{a:new i(e.a,16),b:new i(e.b,16)}}):this._getEndoBasis(r)}}},s.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},s.prototype._getEndoBasis=function(e){for(var t,r,n,o,a,f,s,c,u,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=e,p=this.n.clone(),l=new i(1),b=new i(0),y=new i(0),m=new i(1),v=0;0!==h.cmpn(0);){var g=p.div(h);c=p.sub(g.mul(h)),u=y.sub(g.mul(l));var w=m.sub(g.mul(b));if(!n&&c.cmp(d)<0)t=s.neg(),r=l,n=c.neg(),o=u;else if(n&&2==++v)break;s=c,p=h,h=c,y=l,l=u,m=b,b=w}a=c.neg(),f=u;var _=n.sqr().add(o.sqr());return a.sqr().add(f.sqr()).cmp(_)>=0&&(a=t,f=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),f=f.neg()),[{a:n,b:o},{a:a,b:f}]},s.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),f=o.mul(n.a),s=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(a).sub(f),k2:s.add(c).neg()}},s.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},s.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},s.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var a=this._endoSplit(t[o]),f=e[o],s=f._getBeta();a.k1.negative&&(a.k1.ineg(),f=f.neg(!0)),a.k2.negative&&(a.k2.ineg(),s=s.neg(!0)),n[2*o]=f,n[2*o+1]=s,i[2*o]=a.k1,i[2*o+1]=a.k2}for(var c=this._wnafMulAdd(1,n,i,2*o,r),u=0;u<2*o;u++)n[u]=null,i[u]=null;return c},o(c,a.BasePoint),s.prototype.point=function(e,t,r){return new c(this,e,t,r)},s.prototype.pointFromJSON=function(e,t){return c.fromJSON(this,e,t)},c.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},c.prototype.toJSON=function(){return this.precomputed?[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)}}]:[this.x,this.y]},c.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var o=t[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new i(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(u,a.BasePoint),s.prototype.jpoint=function(e,t,r){return new u(this,e,t,r)},u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),f=n.redSub(i),s=o.redSub(a);if(0===f.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=f.redSqr(),u=c.redMul(f),d=n.redMul(c),h=s.redSqr().redIAdd(u).redISub(d).redISub(d),p=s.redMul(d.redISub(h)).redISub(o.redMul(u)),l=this.z.redMul(e.z).redMul(f);return this.curve.jpoint(h,p,l)},u.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),f=i.redSub(o);if(0===a.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var s=a.redSqr(),c=s.redMul(a),u=r.redMul(s),d=f.redSqr().redIAdd(c).redISub(u).redISub(u),h=f.redMul(u.redISub(d)).redISub(i.redMul(c)),p=this.z.redMul(a);return this.curve.jpoint(d,h,p)},u.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}var n=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,f=this.z,s=f.redSqr().redSqr(),c=a.redAdd(a);for(r=0;r<e;r++){var u=o.redSqr(),d=c.redSqr(),h=d.redSqr(),p=u.redAdd(u).redIAdd(u).redIAdd(n.redMul(s)),l=o.redMul(d),b=p.redSqr().redISub(l.redAdd(l)),y=l.redISub(b),m=p.redMul(y);m=m.redIAdd(m).redISub(h);var v=c.redMul(f);r+1<e&&(s=s.redMul(h)),o=b,f=v,c=m}return this.curve.jpoint(o,c.redMul(i),f)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},u.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var f=n.redAdd(n).redIAdd(n),s=f.redSqr().redISub(a).redISub(a),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=s,t=f.redMul(a.redISub(s)).redISub(c),r=this.y.redAdd(this.y)}else{var u=this.x.redSqr(),d=this.y.redSqr(),h=d.redSqr(),p=this.x.redAdd(d).redSqr().redISub(u).redISub(h);p=p.redIAdd(p);var l=u.redAdd(u).redIAdd(u),b=l.redSqr(),y=h.redIAdd(h);y=(y=y.redIAdd(y)).redIAdd(y),e=b.redISub(p).redISub(p),t=l.redMul(p.redISub(e)).redISub(y),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},u.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var f=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),s=f.redSqr().redISub(a).redISub(a);e=s;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=f.redMul(a.redISub(s)).redISub(c),r=this.y.redAdd(this.y)}else{var u=this.z.redSqr(),d=this.y.redSqr(),h=this.x.redMul(d),p=this.x.redSub(u).redMul(this.x.redAdd(u));p=p.redAdd(p).redIAdd(p);var l=h.redIAdd(h),b=(l=l.redIAdd(l)).redAdd(l);e=p.redSqr().redISub(b),r=this.y.redAdd(this.z).redSqr().redISub(d).redISub(u);var y=d.redSqr();y=(y=(y=y.redIAdd(y)).redIAdd(y)).redIAdd(y),t=p.redMul(l.redISub(e)).redISub(y)}return this.curve.jpoint(e,t,r)},u.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=t.redSqr(),a=r.redSqr(),f=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),s=t.redAdd(t),c=(s=s.redIAdd(s)).redMul(a),u=f.redSqr().redISub(c.redAdd(c)),d=c.redISub(u),h=a.redSqr();h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var p=f.redMul(d).redISub(h),l=r.redAdd(r).redMul(n);return this.curve.jpoint(u,p,l)},u.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(n),f=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),s=n.redIAdd(n);s=(s=(s=s.redIAdd(s)).redIAdd(s)).redIAdd(s);var c=i.redIAdd(a).redSqr().redISub(o).redISub(f).redISub(s),u=t.redMul(c);u=(u=u.redIAdd(u)).redIAdd(u);var d=this.x.redMul(f).redISub(u);d=(d=d.redIAdd(d)).redIAdd(d);var h=this.y.redMul(c.redMul(s.redISub(c)).redISub(a.redMul(f)));h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var p=this.z.redAdd(a).redSqr().redISub(r).redISub(f);return this.curve.jpoint(d,h,p)},u.prototype.mul=function(e,t){return e=new i(e,t),this.curve._wnafMul(this,e)},u.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},u.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},u.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,r){"use strict";var n=r(11),i=r(8),o=r(19),a=r(10);function f(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))}function s(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(f,o),e.exports=f,f.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(s,o.BasePoint),f.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},f.prototype.point=function(e,t){return new s(this,e,t)},f.prototype.pointFromJSON=function(e){return s.fromJSON(this,e)},s.prototype.precompute=function(){},s.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},s.fromJSON=function(e,t){return new s(e,t[0],t[1]||e.one)},s.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},s.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},s.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},s.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),f=t.z.redMul(o.redAdd(a).redSqr()),s=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(f,s)},s.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},s.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},s.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},s.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,r){"use strict";var n=r(10),i=r(11),o=r(8),a=r(19),f=n.assert;function s(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),f(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function c(e,t,r,n,o){a.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(s,a),e.exports=s,s.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},s.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},s.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},s.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(o.redInvm()),f=a.redSqrt();if(0!==f.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var s=f.fromRed().isOdd();return(t&&!s||!t&&s)&&(f=f.redNeg()),this.point(e,f)},s.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var f=a.redSqrt();if(0!==f.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return f.fromRed().isOdd()!==t&&(f=f.redNeg()),this.point(f,e)},s.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},o(c,a.BasePoint),s.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},s.prototype.point=function(e,t,r,n){return new c(this,e,t,r,n)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),f=n.redSub(t),s=i.redMul(a),c=o.redMul(f),u=i.redMul(f),d=a.redMul(o);return this.curve.point(s,c,d,u)},c.prototype._projDbl=function(){var e,t,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var a=(c=this.curve._mulA(i)).redAdd(o);if(this.zOne)e=n.redSub(i).redSub(o).redMul(a.redSub(this.curve.two)),t=a.redMul(c.redSub(o)),r=a.redSqr().redSub(a).redSub(a);else{var f=this.z.redSqr(),s=a.redSub(f).redISub(f);e=n.redSub(i).redISub(o).redMul(s),t=a.redMul(c.redSub(o)),r=a.redMul(s)}}else{var c=i.redAdd(o);f=this.curve._mulC(this.z).redSqr(),s=c.redSub(f).redSub(f);e=this.curve._mulC(n.redISub(c)).redMul(s),t=this.curve._mulC(c).redMul(i.redISub(o)),r=c.redMul(s)}return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),f=i.redAdd(n),s=r.redAdd(t),c=o.redMul(a),u=f.redMul(s),d=o.redMul(s),h=a.redMul(f);return this.curve.point(c,u,h,d)},c.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),f=this.curve.d.redMul(o).redMul(a),s=i.redSub(f),c=i.redAdd(f),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),d=n.redMul(s).redMul(u);return this.curve.twisted?(t=n.redMul(c).redMul(a.redSub(this.curve._mulA(o))),r=s.redMul(c)):(t=n.redMul(c).redMul(a.redSub(o)),r=this.curve._mulC(s).redMul(c)),this.curve.point(d,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},function(e,t,r){"use strict";t.sha1=r(69),t.sha224=r(70),t.sha256=r(43),t.sha384=r(71),t.sha512=r(44)},function(e,t,r){"use strict";var n=r(13),i=r(16),o=r(42),a=n.rotl32,f=n.sum32,s=n.sum32_5,c=o.ft_1,u=i.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(h,u),e.exports=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=a(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],u=this.h[2],h=this.h[3],p=this.h[4];for(n=0;n<r.length;n++){var l=~~(n/20),b=s(a(i,5),c(l,o,u,h),p,r[n],d[l]);p=h,h=u,u=a(o,30),o=i,i=b}this.h[0]=f(this.h[0],i),this.h[1]=f(this.h[1],o),this.h[2]=f(this.h[2],u),this.h[3]=f(this.h[3],h),this.h[4]=f(this.h[4],p)},h.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(e,t,r){"use strict";var n=r(13),i=r(43);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),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},function(e,t,r){"use strict";var n=r(13),i=r(44);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),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},function(e,t,r){"use strict";var n=r(13),i=r(16),o=n.rotl32,a=n.sum32,f=n.sum32_3,s=n.sum32_4,c=i.BlockHash;function u(){if(!(this instanceof u))return new u;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function d(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function h(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function p(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(u,c),t.ripemd160=u,u.blockSize=512,u.outSize=160,u.hmacStrength=192,u.padLength=64,u.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],u=this.h[4],v=r,g=n,w=i,_=c,S=u,A=0;A<80;A++){var M=a(o(s(r,d(A,n,i,c),e[l[A]+t],h(A)),y[A]),u);r=u,u=c,c=o(i,10),i=n,n=M,M=a(o(s(v,d(79-A,g,w,_),e[b[A]+t],p(A)),m[A]),S),v=S,S=_,_=o(w,10),w=g,g=M}M=f(this.h[1],i,_),this.h[1]=f(this.h[2],c,S),this.h[2]=f(this.h[3],u,v),this.h[3]=f(this.h[4],r,g),this.h[4]=f(this.h[0],n,w),this.h[0]=M},u.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var l=[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],b=[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],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],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]},function(e,t,r){"use strict";var n=r(13),i=r(9);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},function(e,t){e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(e,t,r){"use strict";var n=r(11),i=r(76),o=r(10),a=r(27),f=r(39),s=o.assert,c=r(77),u=r(78);function d(e){if(!(this instanceof d))return new d(e);"string"==typeof e&&(s(a.hasOwnProperty(e),"Unknown curve "+e),e=a[e]),e instanceof a.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=d,d.prototype.keyPair=function(e){return new c(this,e)},d.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},d.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},d.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||f(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var a=new n(t.generate(r));if(!(a.cmp(o)>0))return a.iaddn(1),this.keyFromPrivate(a)}},d.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},d.prototype.sign=function(e,t,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var a=this.n.byteLength(),f=t.getPrivate().toArray("be",a),s=e.toArray("be",a),c=new i({hash:this.hash,entropy:f,nonce:s,pers:o.pers,persEnc:o.persEnc||"utf8"}),d=this.n.sub(new n(1)),h=0;;h++){var p=o.k?o.k(h):new n(c.generate(this.n.byteLength()));if(!((p=this._truncateToN(p,!0)).cmpn(1)<=0||p.cmp(d)>=0)){var l=this.g.mul(p);if(!l.isInfinity()){var b=l.getX(),y=b.umod(this.n);if(0!==y.cmpn(0)){var m=p.invm(this.n).mul(y.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var v=(l.getY().isOdd()?1:0)|(0!==b.cmp(y)?2:0);return o.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),v^=1),new u({r:y,s:m,recoveryParam:v})}}}}}},d.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new u(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var f,s=a.invm(this.n),c=s.mul(e).umod(this.n),d=s.mul(o).umod(this.n);return this.curve._maxwellTrick?!(f=this.g.jmulAdd(c,r.getPublic(),d)).isInfinity()&&f.eqXToP(o):!(f=this.g.mulAdd(c,r.getPublic(),d)).isInfinity()&&0===f.getX().umod(this.n).cmp(o)},d.prototype.recoverPubKey=function(e,t,r,i){s((3&r)===r,"The recovery param is more than two bits"),t=new u(t,i);var o=this.n,a=new n(e),f=t.r,c=t.s,d=1&r,h=r>>1;if(f.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");f=h?this.curve.pointFromX(f.add(this.curve.n),d):this.curve.pointFromX(f,d);var p=t.r.invm(o),l=o.sub(a).mul(p).umod(o),b=c.mul(p).umod(o);return this.g.mulAdd(l,f,b)},d.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new u(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t,r){"use strict";var n=r(20),i=r(38),o=r(9);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},a.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},a.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=i.toArray(e,t),r=i.toArray(r,n),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var a=o.slice(0,e);return this._update(r),this._reseed++,i.encode(a,t)}},function(e,t,r){"use strict";var n=r(11),i=r(10).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(e,t,r){"use strict";var n=r(11),i=r(10),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function f(){this.place=0}function s(e,t){var r=e[t.place++];if(!(128&r))return r;for(var n=15&r,i=0,o=0,a=t.place;o<n;o++,a++)i<<=8,i|=e[a];return t.place=a,i}function c(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function u(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new f;if(48!==e[r.place++])return!1;if(s(e,r)+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var o=s(e,r),a=e.slice(r.place,o+r.place);if(r.place+=o,2!==e[r.place++])return!1;var c=s(e,r);if(e.length!==c+r.place)return!1;var u=e.slice(r.place,c+r.place);return 0===a[0]&&128&a[1]&&(a=a.slice(1)),0===u[0]&&128&u[1]&&(u=u.slice(1)),this.r=new n(a),this.s=new n(u),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=c(t),r=c(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];u(n,t.length),(n=n.concat(t)).push(2),u(n,r.length);var o=n.concat(r),a=[48];return u(a,o.length),a=a.concat(o),i.encode(a,e)}},function(e,t,r){"use strict";var n=r(20),i=r(27),o=r(10),a=o.assert,f=o.parseBytes,s=r(80),c=r(81);function u(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(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}e.exports=u,u.prototype.sign=function(e,t){e=f(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),s=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:s,Rencoded:o})},u.prototype.verify=function(e,t,r){e=f(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},u.prototype.keyFromPublic=function(e){return s.fromPublic(this,e)},u.prototype.keyFromSecret=function(e){return s.fromSecret(this,e)},u.prototype.makeSignature=function(e){return e instanceof c?e:new c(this,e)},u.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},u.prototype.decodePoint=function(e){var t=(e=o.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),n=0!=(128&e[t]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},u.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},u.prototype.decodeInt=function(e){return o.intFromLE(e)},u.prototype.isPoint=function(e){return e instanceof this.pointClass}},function(e,t,r){"use strict";var n=r(10),i=n.assert,o=n.parseBytes,a=n.cachedProperty;function f(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}f.fromPublic=function(e,t){return t instanceof f?t:new f(e,{pub:t})},f.fromSecret=function(e,t){return t instanceof f?t:new f(e,{secret:t})},f.prototype.secret=function(){return this._secret},a(f,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),a(f,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),a(f,"privBytes",function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n}),a(f,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),a(f,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),a(f,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),f.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},f.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},f.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},f.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=f},function(e,t,r){"use strict";var n=r(11),i=r(10),o=i.assert,a=i.cachedProperty,f=i.parseBytes;function s(e,t){this.eddsa=e,"object"!=typeof t&&(t=f(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}a(s,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),a(s,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),a(s,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),a(s,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),s.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},s.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=s},function(e,t,r){"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var f=0;f<=24;f+=8)i<<=1,i|=t>>>f+a&1;for(f=0;f<=24;f+=8)i<<=1,i|=e>>>f+a&1}for(a=6;a>=0;a-=2){for(f=1;f<=25;f+=8)o<<=1,o|=t>>>f+a&1;for(f=1;f<=25;f+=8)o<<=1,o|=e>>>f+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},t.rip=function(e,t,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var f=24;f>=0;f-=8)i<<=1,i|=t>>>f+a&1,i<<=1,i|=e>>>f+a&1;for(a=4;a<8;a++)for(f=24;f>=0;f-=8)o<<=1,o|=t>>>f+a&1,o<<=1,o|=e>>>f+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.pc1=function(e,t,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var f=0;f<=24;f+=8)i<<=1,i|=t>>f+a&1;for(f=0;f<=24;f+=8)i<<=1,i|=e>>f+a&1}for(f=0;f<=24;f+=8)i<<=1,i|=t>>f+a&1;for(a=1;a<=3;a++){for(f=0;f<=24;f+=8)o<<=1,o|=t>>f+a&1;for(f=0;f<=24;f+=8)o<<=1,o|=e>>f+a&1}for(f=0;f<=24;f+=8)o<<=1,o|=e>>f+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var n=[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,t,r,i){for(var o=0,a=0,f=n.length>>>1,s=0;s<f;s++)o<<=1,o|=e>>>n[s]&1;for(s=f;s<n.length;s++)a<<=1,a|=t>>>n[s]&1;r[i+0]=o>>>0,r[i+1]=a>>>0},t.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var i=[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,t){for(var r=0,n=0;n<4;n++){r<<=4,r|=i[64*n+(e>>>18-6*n&63)]}for(n=0;n<4;n++){r<<=4,r|=i[256+64*n+(t>>>18-6*n&63)]}return r>>>0};var o=[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){for(var t=0,r=0;r<o.length;r++)t<<=1,t|=e>>>o[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var n=e.toString(2);n.length<t;)n="0"+n;for(var i=[],o=0;o<t;o+=r)i.push(n.slice(o,o+r));return i.join(" ")}},function(e,t,r){"use strict";var n=r(9);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}e.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),n=0;n<r;n++)this.buffer[this.bufferOff+n]=e[t+n];return this.bufferOff+=r,r},i.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(e){var t=0,r=0,n=(this.bufferOff+e.length)/this.blockSize|0,i=new Array(n*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(i,r)));for(var o=e.length-(e.length-t)%this.blockSize;t<o;t+=this.blockSize)this._update(e,t,i,r),r+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return i},i.prototype._updateDecrypt=function(e){for(var t=0,r=0,n=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,i=new Array(n*this.blockSize);n>0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},i.prototype._unpad=function(e){return e},i.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},function(e,t,r){"use strict";var n=r(9),i=r(8),o=r(12),a=o.utils,f=o.Cipher;function s(){this.tmp=new Array(2),this.keys=null}function c(e){f.call(this,e);var t=new s;this._desState=t,this.deriveKeys(t,e.key)}i(c,f),e.exports=c,c.create=function(e){return new c(e)};var u=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];c.prototype.deriveKeys=function(e,t){e.keys=new Array(32),n.equal(t.length,this.blockSize,"Invalid key length");var r=a.readUInt32BE(t,0),i=a.readUInt32BE(t,4);a.pc1(r,i,e.tmp,0),r=e.tmp[0],i=e.tmp[1];for(var o=0;o<e.keys.length;o+=2){var f=u[o>>>1];r=a.r28shl(r,f),i=a.r28shl(i,f),a.pc2(r,i,e.keys,o)}},c.prototype._update=function(e,t,r,n){var i=this._desState,o=a.readUInt32BE(e,t),f=a.readUInt32BE(e,t+4);a.ip(o,f,i.tmp,0),o=i.tmp[0],f=i.tmp[1],"encrypt"===this.type?this._encrypt(i,o,f,i.tmp,0):this._decrypt(i,o,f,i.tmp,0),o=i.tmp[0],f=i.tmp[1],a.writeUInt32BE(r,o,n),a.writeUInt32BE(r,f,n+4)},c.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n<e.length;n++)e[n]=r;return!0},c.prototype._unpad=function(e){for(var t=e[e.length-1],r=e.length-t;r<e.length;r++)n.equal(e[r],t);return e.slice(0,e.length-t)},c.prototype._encrypt=function(e,t,r,n,i){for(var o=t,f=r,s=0;s<e.keys.length;s+=2){var c=e.keys[s],u=e.keys[s+1];a.expand(f,e.tmp,0),c^=e.tmp[0],u^=e.tmp[1];var d=a.substitute(c,u),h=f;f=(o^a.permute(d))>>>0,o=h}a.rip(f,o,n,i)},c.prototype._decrypt=function(e,t,r,n,i){for(var o=r,f=t,s=e.keys.length-2;s>=0;s-=2){var c=e.keys[s],u=e.keys[s+1];a.expand(o,e.tmp,0),c^=e.tmp[0],u^=e.tmp[1];var d=a.substitute(c,u),h=o;o=(f^a.permute(d))>>>0,f=h}a.rip(o,f,n,i)}},function(e,t,r){"use strict";var n=r(9),i=r(8),o={};function a(e){n.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}t.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}i(t,e);for(var r=Object.keys(o),n=0;n<r.length;n++){var a=r[n];t.prototype[a]=o[a]}return t.create=function(e){return new t(e)},t},o._cbcInit=function(){var e=new a(this.options.iv);this._cbcState=e},o._update=function(e,t,r,n){var i=this._cbcState,o=this.constructor.super_.prototype,a=i.iv;if("encrypt"===this.type){for(var f=0;f<this.blockSize;f++)a[f]^=e[t+f];o._update.call(this,a,0,r,n);for(f=0;f<this.blockSize;f++)a[f]=r[n+f]}else{o._update.call(this,e,t,r,n);for(f=0;f<this.blockSize;f++)r[n+f]^=a[f];for(f=0;f<this.blockSize;f++)a[f]=e[t+f]}}},function(e,t,r){"use strict";var n=r(9),i=r(8),o=r(12),a=o.Cipher,f=o.DES;function s(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),o=t.slice(16,24);this.ciphers="encrypt"===e?[f.create({type:"encrypt",key:r}),f.create({type:"decrypt",key:i}),f.create({type:"encrypt",key:o})]:[f.create({type:"decrypt",key:o}),f.create({type:"encrypt",key:i}),f.create({type:"decrypt",key:r})]}function c(e){a.call(this,e);var t=new s(this.type,this.options.key);this._edeState=t}i(c,a),e.exports=c,c.create=function(e){return new c(e)},c.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},c.prototype._pad=f.prototype._pad,c.prototype._unpad=f.prototype._unpad},function(e,t,r){"use strict";var n=r(14);Object.defineProperty(t,"__esModule",{value:!0}),t.pbkdf1=t.pbkdf2=void 0;var i=n(r(2)),o=n(r(5)),a=n(r(0)),f=n(r(23)),s=n(r(103)),c=n(r(106)),u=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n,f,u){var h,l,b,y,m,v,g;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(p(t,r,n,f,u),"string"==typeof t&&(t=a.default.encoder.stringToArrayBuffer(t)),h=c.default.hashes[u].hashSize,!(f>(Math.pow(2,32)-1)*h)){e.next=5;break}throw new Error("DerivedKeyTooLong");case 5:for(l=Math.ceil(f/h),b=f-(l-1)*h,y=function(){var e=(0,o.default)(i.default.mark(function e(o){var a,f,c,h;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(a=new Uint8Array(r.length+4)).set(r),a.set(d(o+1,4),r.length),e.next=5,s.default.compute(t,a,u);case 5:f=e.sent,c=new Uint8Array(f),h=1;case 8:if(!(h<n)){e.next=16;break}return e.next=11,s.default.compute(t,f,u);case 11:f=e.sent,c=f.map(function(e,t){return e^c[t]});case 13:h++,e.next=8;break;case 16:return e.abrupt("return",{index:o,value:c});case 17:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),m=[],v=new Uint8Array(f),g=0;g<l;g++)m.push(y(g));return e.next=13,Promise.all(m);case 13:return e.sent.forEach(function(e){e.index!==l-1?v.set(e.value,e.index*h):v.set(e.value.slice(0,b),e.index*h)}),e.abrupt("return",v);case 16:case"end":return e.stop()}},e)}));return function(t,r,n,i,o){return e.apply(this,arguments)}}();t.pbkdf2=u;var d=function(e,t){for(var r=new Uint8Array(t),n=0;n<t;n++)r[n]=e>>8*(t-n-1);return r},h=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n,o,s){var u,d;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(p(t,r,n,o,s),"string"==typeof t&&(t=a.default.encoder.stringToArrayBuffer(t)),!(o>c.default.hashes[s].hashSize)){e.next=4;break}throw new Error("DerivedKeyTooLong");case 4:(u=new Uint8Array(t.length+r.length)).set(t),u.set(r,t.length),d=0;case 8:if(!(d<n)){e.next=15;break}return e.next=11,f.default.compute(u,s);case 11:u=e.sent;case 12:d++,e.next=8;break;case 15:return e.abrupt("return",u.slice(0,o));case 16:case"end":return e.stop()}},e)}));return function(t,r,n,i,o){return e.apply(this,arguments)}}();t.pbkdf1=h;var p=function(e,t,r,n,i){if("string"!=typeof e&&!(e instanceof Uint8Array))throw new Error("PasswordIsNotUint8ArrayNorString");if(!(t instanceof Uint8Array))throw new Error("SaltMustBeUint8Array");if("number"!=typeof r||r<=0)throw new Error("InvalidIterationCount");if("number"!=typeof n||n<=0)throw new Error("InvalidDerivedKeyLength");if(Object.keys(c.default.hashes).indexOf(i)<0)throw new Error("UnsupportedHashAlgorithm");return!0}},function(e,t,r){"use strict";var n=r(21),i=r(14);Object.defineProperty(t,"__esModule",{value:!0}),t.compute=void 0;var o=i(r(2)),a=i(r(5)),f=n(r(22)),s=i(r(89)),c=i(r(90)),u=r(93),d=i(r(20)),h=function(){var e=(0,a.default)(o.default.mark(function e(t){var r,n,i,a,c,u,d,h=arguments;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=h.length>1&&void 0!==h[1]?h[1]:"SHA-256",!(Object.keys(s.default.hashes).indexOf(r)<0)){e.next=3;break}throw new Error("UnsupportedHashAlgorithm");case 3:if(t instanceof Uint8Array){e.next=5;break}throw new Error("UnsupportedMessageType");case 5:if(n=f.getWebCrypto(),i=f.getNodeCrypto(),a=f.getMsCrypto(),d=!0,void 0===n||"function"!=typeof n.digest||void 0!==a){e.next=15;break}return e.next=12,n.digest(r,t).catch(function(e){u=e.message,d=!1});case 12:c=e.sent,e.next=26;break;case 15:if(void 0===i){e.next=19;break}try{c=l(r,t,i)}catch(e){u=e.message,d=!1}e.next=26;break;case 19:if(void 0===a||"function"!=typeof a.digest){e.next=25;break}return e.next=22,p(r,t,a).catch(function(e){u=e.message,d=!1});case 22:c=e.sent,e.next=26;break;case 25:d=!1;case 26:if(d){e.next=35;break}e.prev=27,c=b(r,t),e.next=35;break;case 31:throw e.prev=31,e.t0=e.catch(27),u="".concat(u," => ").concat(e.t0.message),new Error("UnsupportedEnvironment: ".concat(u));case 35:return e.abrupt("return",new Uint8Array(c));case 36:case"end":return e.stop()}},e,null,[[27,31]])}));return function(t){return e.apply(this,arguments)}}();t.compute=h;var p=function(e,t,r){return new Promise(function(n,i){var o=r.digest(e,t);o.oncomplete=function(e){n(e.target.result)},o.onerror=function(e){i(e)}})},l=function(e,t,r){var n=s.default.hashes[e].nodeName,i=r.createHash(n);return i.update(t),i.digest()},b=function(e,t){var n;if("MD5"===e)n=(0,c.default)(Array.from(t),{asBytes:!0});else if(["SHA3-512","SHA3-384","SHA3-256","SHA3-224"].indexOf(e)>=0){var i=new u.SHA3(8*s.default.hashes[e].hashSize),o=r(7).Buffer;i.update(o.from(t)),n=i.digest("binary")}else n=d.default[s.default.hashes[e].nodeName]().update(t).digest();return new Uint8Array(n)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={hashes:{"SHA3-512":{nodeName:"sha3-512",hashSize:64},"SHA3-384":{nodeName:"sha3-384",hashSize:48},"SHA3-256":{nodeName:"sha3-256",hashSize:32},"SHA3-224":{nodeName:"sha3-224",hashSize:28},"SHA-256":{nodeName:"sha256",hashSize:32},"SHA-384":{nodeName:"sha384",hashSize:48},"SHA-512":{nodeName:"sha512",hashSize:64},"SHA-1":{nodeName:"sha1",hashSize:20},MD5:{nodeName:"md5",hashSize:16}}}},function(e,t,r){var n,i,o,a,f;n=r(91),i=r(45).utf8,o=r(92),a=r(45).bin,(f=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?a.stringToBytes(e):i.stringToBytes(e):o(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||(e=e.toString());for(var r=n.bytesToWords(e),s=8*e.length,c=1732584193,u=-271733879,d=-1732584194,h=271733878,p=0;p<r.length;p++)r[p]=16711935&(r[p]<<8|r[p]>>>24)|4278255360&(r[p]<<24|r[p]>>>8);r[s>>>5]|=128<<s%32,r[14+(s+64>>>9<<4)]=s;var l=f._ff,b=f._gg,y=f._hh,m=f._ii;for(p=0;p<r.length;p+=16){var v=c,g=u,w=d,_=h;c=l(c,u,d,h,r[p+0],7,-680876936),h=l(h,c,u,d,r[p+1],12,-389564586),d=l(d,h,c,u,r[p+2],17,606105819),u=l(u,d,h,c,r[p+3],22,-1044525330),c=l(c,u,d,h,r[p+4],7,-176418897),h=l(h,c,u,d,r[p+5],12,1200080426),d=l(d,h,c,u,r[p+6],17,-1473231341),u=l(u,d,h,c,r[p+7],22,-45705983),c=l(c,u,d,h,r[p+8],7,1770035416),h=l(h,c,u,d,r[p+9],12,-1958414417),d=l(d,h,c,u,r[p+10],17,-42063),u=l(u,d,h,c,r[p+11],22,-1990404162),c=l(c,u,d,h,r[p+12],7,1804603682),h=l(h,c,u,d,r[p+13],12,-40341101),d=l(d,h,c,u,r[p+14],17,-1502002290),c=b(c,u=l(u,d,h,c,r[p+15],22,1236535329),d,h,r[p+1],5,-165796510),h=b(h,c,u,d,r[p+6],9,-1069501632),d=b(d,h,c,u,r[p+11],14,643717713),u=b(u,d,h,c,r[p+0],20,-373897302),c=b(c,u,d,h,r[p+5],5,-701558691),h=b(h,c,u,d,r[p+10],9,38016083),d=b(d,h,c,u,r[p+15],14,-660478335),u=b(u,d,h,c,r[p+4],20,-405537848),c=b(c,u,d,h,r[p+9],5,568446438),h=b(h,c,u,d,r[p+14],9,-1019803690),d=b(d,h,c,u,r[p+3],14,-187363961),u=b(u,d,h,c,r[p+8],20,1163531501),c=b(c,u,d,h,r[p+13],5,-1444681467),h=b(h,c,u,d,r[p+2],9,-51403784),d=b(d,h,c,u,r[p+7],14,1735328473),c=y(c,u=b(u,d,h,c,r[p+12],20,-1926607734),d,h,r[p+5],4,-378558),h=y(h,c,u,d,r[p+8],11,-2022574463),d=y(d,h,c,u,r[p+11],16,1839030562),u=y(u,d,h,c,r[p+14],23,-35309556),c=y(c,u,d,h,r[p+1],4,-1530992060),h=y(h,c,u,d,r[p+4],11,1272893353),d=y(d,h,c,u,r[p+7],16,-155497632),u=y(u,d,h,c,r[p+10],23,-1094730640),c=y(c,u,d,h,r[p+13],4,681279174),h=y(h,c,u,d,r[p+0],11,-358537222),d=y(d,h,c,u,r[p+3],16,-722521979),u=y(u,d,h,c,r[p+6],23,76029189),c=y(c,u,d,h,r[p+9],4,-640364487),h=y(h,c,u,d,r[p+12],11,-421815835),d=y(d,h,c,u,r[p+15],16,530742520),c=m(c,u=y(u,d,h,c,r[p+2],23,-995338651),d,h,r[p+0],6,-198630844),h=m(h,c,u,d,r[p+7],10,1126891415),d=m(d,h,c,u,r[p+14],15,-1416354905),u=m(u,d,h,c,r[p+5],21,-57434055),c=m(c,u,d,h,r[p+12],6,1700485571),h=m(h,c,u,d,r[p+3],10,-1894986606),d=m(d,h,c,u,r[p+10],15,-1051523),u=m(u,d,h,c,r[p+1],21,-2054922799),c=m(c,u,d,h,r[p+8],6,1873313359),h=m(h,c,u,d,r[p+15],10,-30611744),d=m(d,h,c,u,r[p+6],15,-1560198380),u=m(u,d,h,c,r[p+13],21,1309151649),c=m(c,u,d,h,r[p+4],6,-145523070),h=m(h,c,u,d,r[p+11],10,-1120210379),d=m(d,h,c,u,r[p+2],15,718787259),u=m(u,d,h,c,r[p+9],21,-343485551),c=c+v>>>0,u=u+g>>>0,d=d+w>>>0,h=h+_>>>0}return n.endian([c,u,d,h])})._ff=function(e,t,r,n,i,o,a){var f=e+(t&r|~t&n)+(i>>>0)+a;return(f<<o|f>>>32-o)+t},f._gg=function(e,t,r,n,i,o,a){var f=e+(t&n|r&~n)+(i>>>0)+a;return(f<<o|f>>>32-o)+t},f._hh=function(e,t,r,n,i,o,a){var f=e+(t^r^n)+(i>>>0)+a;return(f<<o|f>>>32-o)+t},f._ii=function(e,t,r,n,i,o,a){var f=e+(r^(t|~n))+(i>>>0)+a;return(f<<o|f>>>32-o)+t},f._blocksize=16,f._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var r=n.wordsToBytes(f(e,t));return t&&t.asBytes?r:t&&t.asString?a.bytesToString(r):n.bytesToHex(r)}},function(e,t){var r,n;r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],r=0,n=0;r<e.length;r++,n+=8)t[n>>>5]|=e[r]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},bytesToHex:function(e){for(var t=[],r=0;r<e.length;r++)t.push((e[r]>>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substr(r,2),16));return t},bytesToBase64:function(e){for(var t=[],n=0;n<e.length;n+=3)for(var i=e[n]<<16|e[n+1]<<8|e[n+2],o=0;o<4;o++)8*n+6*o<=8*e.length?t.push(r.charAt(i>>>6*(3-o)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],n=0,i=0;n<e.length;i=++n%4)0!=i&&t.push((r.indexOf(e.charAt(n-1))&Math.pow(2,-2*i+8)-1)<<2*i|r.indexOf(e.charAt(n))>>>6-2*i);return t}},e.exports=n},function(e,t){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}
|
|
/*!
|
|
* Determine if an object is a Buffer
|
|
*
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
* @license MIT
|
|
*/
|
|
e.exports=function(e){return null!=e&&(r(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA3=void 0;var n,i=r(7),o=(n=r(94))&&n.__esModule?n:{default:n};var a=function(e){var t=e.padding;return function e(){var r=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:512;if(!this||this.constructor!==e)return new e(n);var a=new o.default({capacity:n,padding:t});return this.update=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";if(i.Buffer.isBuffer(e))return a.absorb(e),r;if("string"==typeof e)return r.update(i.Buffer.from(e,t));throw new TypeError("Not a string or buffer")},this.digest=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"binary",t=a.squeeze();return e&&"binary"!==e?t.toString(e):t},this.reset=function(){return a.reset(),r},this}},f=a({padding:1}),s=a({padding:6});t.SHA3=s;var c=f;s.SHA3Hash=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=r(7),o=(n=r(95))&&n.__esModule?n:{default:n};var a=[224,256,384,512],f=function(e,t){for(var r=0;r<e.length;r+=8){var n=r/4;t[n]^=e[r+7]<<24|e[r+6]<<16|e[r+5]<<8|e[r+4],t[n+1]^=e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]}},s=function(e){var t=this,r=e.capacity,n=e.padding;if(!a.includes(r))throw new Error("Unsupported hash length");var s=(0,o.default)(),c=r/8,u=200-2*c,d=0,h=new Uint32Array(50),p=i.Buffer.allocUnsafe(u);return this.absorb=function(e){for(var r=0;r<e.length;r++)p[d]=e[r],(d+=1)>=u&&(f(p,h),s(h),d=0);return t},this.squeeze=function(){var e={queue:i.Buffer.allocUnsafe(u),state:new Uint32Array(50)};p.copy(e.queue);for(var t=0;t<h.length;t++)e.state[t]=h[t];return e.queue.fill(0,d),e.queue[d]|=n,e.queue[u-1]|=128,f(e.queue,e.state),s(e.state),function(e,t){for(var r=i.Buffer.allocUnsafe(t),n=0;n<t;n+=8){var o=n/4;r[n]=e[o+1],r[n+1]=e[o+1]>>>8,r[n+2]=e[o+1]>>>16,r[n+3]=e[o+1]>>>24,r[n+4]=e[o],r[n+5]=e[o]>>>8,r[n+6]=e[o]>>>16,r[n+7]=e[o]>>>24}return r}(e.state,c)},this.reset=function(){return p.fill(0),h.fill(0),d=0,t},this};t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=f(r(96)),i=f(r(97)),o=f(r(99)),a=f(r(102));function f(e){return e&&e.__esModule?e:{default:e}}var s=function(){var e=new Uint32Array(10),t=new Uint32Array(10),r=new Uint32Array(2);return function(f){for(var s=0;s<24;s++)(0,a.default)({A:f,C:e,D:t,W:r}),(0,o.default)({A:f,C:e,W:r}),(0,n.default)({A:f,C:e}),(0,i.default)({A:f,roundIndex:s});e.fill(0),t.fill(0),r.fill(0)}};t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(28))&&n.__esModule?n:{default:n};var o=function(e){for(var t=e.A,r=e.C,n=0;n<25;n+=5){for(var o=0;o<5;o++)(0,i.default)(t,n+o)(r,o);for(var a=0;a<5;a++){var f=2*(n+a),s=(a+1)%5*2,c=(a+2)%5*2;t[f]^=~r[s]&r[c],t[f+1]^=~r[s+1]&r[c+1]}}};t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(98))&&n.__esModule?n:{default:n};var o=function(e){var t=e.A,r=2*e.roundIndex;t[0]^=i.default[r],t[1]^=i.default[r+1]};t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=new Uint32Array([0,1,0,32898,2147483648,32906,2147483648,2147516416,0,32907,0,2147483649,2147483648,2147516545,2147483648,32777,0,138,0,136,0,2147516425,0,2147483658,0,2147516555,2147483648,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,0,32778,2147483648,2147483658,2147483648,2147516545,2147483648,32896,0,2147483649,2147483648,2147516424]);t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(100)),i=a(r(101)),o=a(r(28));function a(e){return e&&e.__esModule?e:{default:e}}var f=function(e){var t=e.A,r=e.C,a=e.W;(0,o.default)(t,1)(a,0);for(var f=0,s=0,c=0,u=32,d=0;d<24;d++){var h=n.default[d],p=i.default[d];(0,o.default)(t,h)(r,0),f=a[0],s=a[1],u=32-p,a[c=p<32?0:1]=f<<p|s>>>u,a[(c+1)%2]=s<<p|f>>>u,(0,o.default)(a,0)(t,h),(0,o.default)(r,0)(a,0)}};t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=[10,7,11,17,18,3,5,16,8,21,24,4,15,23,19,13,12,2,20,14,22,9,6,1];t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=[1,3,6,10,15,21,28,36,45,55,2,14,27,41,56,8,25,43,62,18,39,61,20,44];t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(28))&&n.__esModule?n:{default:n};var o=function(e){for(var t=e.A,r=e.C,n=e.D,o=e.W,a=0,f=0,s=0;s<5;s++){var c=2*s,u=2*(s+5),d=2*(s+10),h=2*(s+15),p=2*(s+20);r[c]=t[c]^t[u]^t[d]^t[h]^t[p],r[c+1]=t[c+1]^t[u+1]^t[d+1]^t[h+1]^t[p+1]}for(var l=0;l<5;l++){(0,i.default)(r,(l+1)%5)(o,0),a=o[0],f=o[1],o[0]=a<<1|f>>>31,o[1]=f<<1|a>>>31,n[2*l]=r[(l+4)%5*2]^o[0],n[2*l+1]=r[(l+4)%5*2+1]^o[1];for(var b=0;b<25;b+=5)t[2*(b+l)]^=n[2*l],t[2*(b+l)+1]^=n[2*l+1]}};t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"compute",{enumerable:!0,get:function(){return n.compute}}),Object.defineProperty(t,"verify",{enumerable:!0,get:function(){return n.verify}}),t.default=void 0;var n=r(104),i={compute:n.compute,verify:n.verify};t.default=i},function(e,t,r){"use strict";var n=r(21),i=r(14);Object.defineProperty(t,"__esModule",{value:!0}),t.verify=t.compute=void 0;var o=i(r(2)),a=i(r(5)),f=i(r(105)),s=n(r(22)),c=i(r(23)),u=function(){var e=(0,a.default)(o.default.mark(function e(t,r){var n,i,a,c,u,h,p,l,b,y,m,v=arguments;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=v.length>2&&void 0!==v[2]?v[2]:"SHA-256",i=s.getWebCryptoAll(),a=s.getNodeCrypto(),c=!0,void 0===i||"function"!=typeof i.importKey||"function"!=typeof i.sign){e.next=38;break}if(void 0!==window.msCrypto){e.next=21;break}return e.prev=6,e.next=9,i.importKey("raw",t,{name:"HMAC",hash:{name:n}},!1,["sign","verify"]);case 9:return u=e.sent,e.next=12,i.sign({name:"HMAC",hash:{name:n}},u,r);case 12:return h=e.sent,e.abrupt("return",new Uint8Array(h));case 16:e.prev=16,e.t0=e.catch(6),c=!1;case 19:e.next=36;break;case 21:return e.prev=21,p=function(e,t,r,n,o){return new Promise(function(a,f){var s=i.importKey(e,t,r,n,o);s.oncomplete=function(e){a(e.target.result)},s.onerror=function(){f("KeyImportingFailed")}})},l=function(e,t,r){return new Promise(function(n,o){var a=i.sign({name:"HMAC",hash:{name:e}},t,r);a.oncomplete=function(e){n(new Uint8Array(e.target.result))},a.onerror=function(){o("ComputingHMACFailed")}})},e.next=26,p("raw",t,{name:"HMAC",hash:{name:n}},!1,["sign","verify"]);case 26:return b=e.sent,e.next=29,l(n,b,r);case 29:return y=e.sent,e.abrupt("return",new Uint8Array(y));case 33:e.prev=33,e.t1=e.catch(21),c=!1;case 36:e.next=50;break;case 38:if(void 0===a){e.next=49;break}return e.prev=39,m=a.createHmac(f.default.hashes[n].nodeName,t),e.abrupt("return",new Uint8Array(m.update(r).digest()));case 44:e.prev=44,e.t2=e.catch(39),c=!1;case 47:e.next=50;break;case 49:c=!1;case 50:if(c){e.next=60;break}return e.prev=51,e.next=54,d(t,r,n);case 54:return e.abrupt("return",e.sent);case 57:throw e.prev=57,e.t3=e.catch(51),new Error("UnsupportedEnvironments");case 60:case"end":return e.stop()}},e,null,[[6,16],[21,33],[39,44],[51,57]])}));return function(t,r){return e.apply(this,arguments)}}();t.compute=u;var d=function(){var e=(0,a.default)(o.default.mark(function e(t,r,n){var i,a,s,u,d,h,p,l;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=f.default.hashes[n].blockSize,a=f.default.hashes[n].hashSize,!(t.length>i)){e.next=6;break}return e.next=5,c.default.compute(t,n);case 5:t=e.sent;case 6:return(s=new Uint8Array(i)).set(t),u=s.map(function(e){return 255&(54^e)}),d=s.map(function(e){return 255&(92^e)}),(h=new Uint8Array(i+r.length)).set(u),h.set(r,i),e.next=15,c.default.compute(h,n);case 15:return p=e.sent,(l=new Uint8Array(i+a)).set(d),l.set(p,i),e.abrupt("return",c.default.compute(l,n));case 20:case"end":return e.stop()}},e)}));return function(t,r,n){return e.apply(this,arguments)}}(),h=function(){var e=(0,a.default)(o.default.mark(function e(t,r,n){var i,a,f=arguments;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=f.length>3&&void 0!==f[3]?f[3]:"SHA-256",n instanceof Uint8Array){e.next=3;break}throw new Error("InvalidInputMac");case 3:return e.next=5,u(t,r,i);case 5:return a=e.sent,e.abrupt("return",n.toString()===a.toString());case 7:case"end":return e.stop()}},e)}));return function(t,r,n){return e.apply(this,arguments)}}();t.verify=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={hashes:{"SHA3-512":{nodeName:"sha3-512",hashSize:64,blockSize:72},"SHA3-384":{nodeName:"sha3-384",hashSize:48,blockSize:104},"SHA3-256":{nodeName:"sha3-256",hashSize:32,blockSize:136},"SHA3-224":{nodeName:"sha3-224",hashSize:28,blockSize:144},"SHA-256":{nodeName:"sha256",hashSize:32,blockSize:64},"SHA-384":{nodeName:"sha384",hashSize:48,blockSize:128},"SHA-512":{nodeName:"sha512",hashSize:64,blockSize:128},"SHA-1":{nodeName:"sha1",hashSize:20,blockSize:64},MD5:{nodeName:"md5",hashSize:16,blockSize:64}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={hashes:{"SHA3-512":{hashSize:64},"SHA3-384":{hashSize:48},"SHA3-256":{hashSize:32},"SHA3-224":{hashSize:28},"SHA-256":{hashSize:32},"SHA-384":{hashSize:48},"SHA-512":{hashSize:64},"SHA-1":{hashSize:20},MD5:{hashSize:16}}}},function(e,t,r){"use strict";var n=r(21),i=r(14);Object.defineProperty(t,"__esModule",{value:!0}),t.unwrapKey=t.wrapKey=t.decrypt=t.encrypt=void 0;var o=i(r(2)),a=i(r(5)),f=n(r(22)),s=n(r(108)),c=n(r(109)),u=i(r(46)),d=function(e){var t=e.name,r=e.iv,n=e.tagLength;if(Object.keys(u.default.ciphers).indexOf(t)<0)throw new Error("UnsupportedAlgorithm");if(u.default.ciphers[t].ivLength){if(!(r instanceof Uint8Array))throw new Error("InvalidArguments");if(r.byteLength<2||r.byteLength>16)throw new Error("InvalidIVLength");if(u.default.ciphers[t].staticIvLength&&u.default.ciphers[t].ivLength!==r.byteLength)throw new Error("InvalidIVLength")}if(u.default.ciphers[t].tagLength&&n){if(!Number.isInteger(n))throw new Error("InvalidArguments");if(n<4||n>16)throw new Error("InvalidTagLength")}},h=function(){var e=(0,a.default)(o.default.mark(function e(t,r,n){var i,a,h,p,l,b,y,m;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.name,a=void 0===i?"AES-GCM":i,h=n.iv,p=n.additionalData,l=void 0===p?new Uint8Array([]):p,b=n.tagLength,t instanceof Uint8Array&&r instanceof Uint8Array){e.next=3;break}throw new Error("InvalidArguments");case 3:return d({name:a,iv:h,tagLength:b}),u.default.ciphers[a].tagLength&&!b&&(b=u.default.ciphers[a].tagLength),e.next=7,f.getWebCryptoAll();case 7:return y=e.sent,e.next=10,f.getNodeCrypto();case 10:if(m=e.sent,void 0===y||"function"!=typeof y.importKey||"function"!=typeof y.encrypt){e.next=15;break}return e.abrupt("return",c.encrypt(t,r,{name:a,iv:h,additionalData:l,tagLength:b},y));case 15:if(void 0===m){e.next=19;break}return e.abrupt("return",s.encrypt(t,r,{name:a,iv:h,additionalData:l,tagLength:b},m));case 19:throw new Error("UnsupportedEnvironment");case 20:case"end":return e.stop()}},e)}));return function(t,r,n){return e.apply(this,arguments)}}();t.encrypt=h;var p=function(){var e=(0,a.default)(o.default.mark(function e(t,r,n){var i,a,h,p,l,b,y,m;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.name,a=void 0===i?"AES-GCM":i,h=n.iv,p=n.additionalData,l=void 0===p?new Uint8Array([]):p,b=n.tagLength,t instanceof Uint8Array&&r instanceof Uint8Array){e.next=3;break}throw new Error("InvalidArguments");case 3:return d({name:a,iv:h,tagLength:b}),u.default.ciphers[a].tagLength&&!b&&(b=u.default.ciphers[a].tagLength),e.next=7,f.getWebCryptoAll();case 7:return y=e.sent,e.next=10,f.getNodeCrypto();case 10:if(m=e.sent,void 0===y||"function"!=typeof y.importKey||"function"!=typeof y.encrypt){e.next=15;break}return e.abrupt("return",c.decrypt(t,r,{name:a,iv:h,additionalData:l,tagLength:b},y));case 15:if(void 0===m){e.next=19;break}return e.abrupt("return",s.decrypt(t,r,{name:a,iv:h,additionalData:l,tagLength:b},m));case 19:throw new Error("UnsupportedEnvironment");case 20:case"end":return e.stop()}},e)}));return function(t,r,n){return e.apply(this,arguments)}}();t.decrypt=p;var l=function(){var e=(0,a.default)(o.default.mark(function e(t,r,n){var i,a,d,h,p;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.name,a=void 0===i?"AES-KW":i,t instanceof Uint8Array){e.next=3;break}throw new Error("NonUint8ArrayData");case 3:if(r instanceof Uint8Array){e.next=5;break}throw new Error("NonUint8ArrayKey");case 5:if(!(t.length%8>0)){e.next=7;break}throw new Error("WrappedKeyMustBeMultipleOf8");case 7:return e.next=9,f.getWebCryptoAll();case 9:return d=e.sent,e.next=12,f.getNodeCrypto();case 12:if(h=e.sent,p=u.default.wrapKeys["AES-KW"].defaultIV,void 0===d||"function"!=typeof d.importKey||"function"!=typeof d.wrapKey){e.next=18;break}return e.abrupt("return",c.wrapKey(t,r,{name:a,iv:p},d));case 18:if(void 0===h){e.next=22;break}return e.abrupt("return",s.wrapKey(t,r,{name:a,iv:p},h));case 22:throw new Error("UnsupportedEnvironment");case 23:case"end":return e.stop()}},e)}));return function(t,r,n){return e.apply(this,arguments)}}();t.wrapKey=l;var b=function(){var e=(0,a.default)(o.default.mark(function e(t,r,n){var i,a,d,h,p;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.name,a=void 0===i?"AES-KW":i,t instanceof Uint8Array){e.next=3;break}throw new Error("NonUint8ArrayData");case 3:if(r instanceof Uint8Array){e.next=5;break}throw new Error("NonUint8ArrayKey");case 5:return e.next=7,f.getWebCryptoAll();case 7:return d=e.sent,e.next=10,f.getNodeCrypto();case 10:if(h=e.sent,p=u.default.wrapKeys["AES-KW"].defaultIV,void 0===d||"function"!=typeof d.importKey||"function"!=typeof d.wrapKey){e.next=16;break}return e.abrupt("return",c.unwrapKey(t,r,{name:a,iv:p},d));case 16:if(void 0===h){e.next=20;break}return e.abrupt("return",s.unwrapKey(t,r,{name:a,iv:p},h));case 20:throw new Error("UnsupportedEnvironment");case 21:case"end":return e.stop()}},e)}));return function(t,r,n){return e.apply(this,arguments)}}();t.unwrapKey=b},function(e,t,r){"use strict";var n=r(14);Object.defineProperty(t,"__esModule",{value:!0}),t.decrypt=t.encrypt=t.unwrapKey=t.wrapKey=void 0;var i=n(r(46));t.wrapKey=function(e,t,r,n){var i=r.name,a=void 0===i?"AES-KW":i,f=r.iv;return o(e,t,{name:a,iv:f},n,!0)};t.unwrapKey=function(e,t,r,n){var i=r.name,o=void 0===i?"AES-KW":i,f=r.iv;return a(e,t,{name:o,iv:f},n,!0)};var o=function(e,t,r,n){var o,a,s,c,u=r.name,d=r.iv,h=r.additionalData,p=r.tagLength,l=arguments.length>4&&void 0!==arguments[4]&&arguments[4],b=f(u,t.byteLength,l?i.default.wrapKeys:i.default.ciphers);switch(u){case"AES-GCM":(o=n.createCipheriv(b,t,d,{authTagLength:p})).setAAD(h);break;case"AES-CTR":if(0===d.length||d.length>16)throw new Error("InvalidIVLength");var y=new Uint8Array(16);y.set(d),y[15]+=1,o=n.createCipheriv(b,t,y);break;default:o=n.createCipheriv(b,t,d)}try{a=new Uint8Array(o.update(e)),s=new Uint8Array(o.final()),c=new Uint8Array([]),"AES-GCM"===u&&(c=new Uint8Array(o.getAuthTag()))}catch(e){throw new Error("NodeCrypto_EncryptionFailure")}var m=new Uint8Array(a.length+s.length+c.length);return m.set(a),m.set(s,a.length),m.set(c,a.length+s.length),m};t.encrypt=o;var a=function(e,t,r,n){var o,a,s,c,u=r.name,d=r.iv,h=r.additionalData,p=r.tagLength,l=arguments.length>4&&void 0!==arguments[4]&&arguments[4],b=f(u,t.byteLength,l?i.default.wrapKeys:i.default.ciphers);switch(u){case"AES-GCM":(o=n.createDecipheriv(b,t,d,{authTagLength:p})).setAAD(h),a=e.slice(0,e.length-p);var y=e.slice(e.length-p);o.setAuthTag(y);break;case"AES-CTR":if(0===d.length||d.length>16)throw new Error("InvalidIVLength");var m=new Uint8Array(16);m.set(d),m[15]+=1,o=n.createDecipheriv(b,t,m),a=e;break;default:o=n.createDecipheriv(b,t,d),a=e}try{s=o.update(a),c=o.final()}catch(e){throw new Error("NodeCrypto_DecryptionFailure")}var v=new Uint8Array(c.length+s.length);return v.set(s),v.set(c,s.length),v};t.decrypt=a;var f=function(e,t,r){var n=r[e].nodePrefix;return(n="".concat(n).concat((8*t).toString()))+r[e].nodeSuffix}},function(e,t,r){"use strict";var n=r(14);Object.defineProperty(t,"__esModule",{value:!0}),t.decrypt=t.encrypt=t.unwrapKey=t.wrapKey=void 0;var i=n(r(2)),o=n(r(5)),a=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n,o){var a,f,s,c,u,d;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=n.name,f=void 0===a?"AES-KW":a,s=n.iv,void 0!==window.msCrypto){e.next=20;break}return e.prev=2,e.next=5,o.importKey("raw",r,{name:f},!1,["wrapKey","unwrapKey"]);case 5:return c=e.sent,e.next=8,o.importKey("raw",t,{name:f},!0,["wrapKey","unwrapKey"]);case 8:return u=e.sent,e.next=11,o.wrapKey("raw",u,c,{name:f,iv:s});case 11:return d=e.sent,e.abrupt("return",new Uint8Array(d));case 15:throw e.prev=15,e.t0=e.catch(2),new Error("WebCrypto_FailedToWrapKey - ".concat(e.t0.message));case 18:e.next=21;break;case 20:throw new Error("ThrowAwayIeAsap");case 21:case"end":return e.stop()}},e,null,[[2,15]])}));return function(t,r,n,i){return e.apply(this,arguments)}}();t.wrapKey=a;var f=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n,o){var a,f,s,c,u;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=n.name,f=void 0===a?"AES-KW":a,s=n.iv,void 0!==window.msCrypto){e.next=21;break}return e.prev=2,e.next=5,o.importKey("raw",r,{name:f},!1,["wrapKey","unwrapKey"]);case 5:return c=e.sent,e.next=8,o.unwrapKey("raw",t,c,{name:f,iv:s},{name:"AES-GCM"},!0,["encrypt","decrypt"]);case 8:return u=e.sent,e.t0=Uint8Array,e.next=12,o.exportKey("raw",u);case 12:return e.t1=e.sent,e.abrupt("return",new e.t0(e.t1));case 16:throw e.prev=16,e.t2=e.catch(2),new Error("WebCrypto_FailedToUnwrapKey - ".concat(e.t2.message));case 19:e.next=22;break;case 21:throw new Error("ThrowAwayMsIeAsap");case 22:case"end":return e.stop()}},e,null,[[2,16]])}));return function(t,r,n,i){return e.apply(this,arguments)}}();t.unwrapKey=f;var s=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n,o){var a,f,s,c,p,l,b,y,m,v,g;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=n.name,f=void 0===a?"AES-GCM":a,s=n.iv,c=n.additionalData,p=n.tagLength,l=u({name:f,iv:s,additionalData:c,tagLength:p}),void 0!==window.msCrypto){e.next=18;break}return e.prev=3,e.next=6,o.importKey("raw",r,l,!1,["encrypt","decrypt"]);case 6:return b=e.sent,e.next=9,o.encrypt(l,b,t);case 9:return y=e.sent,e.abrupt("return",new Uint8Array(y));case 13:throw e.prev=13,e.t0=e.catch(3),new Error("WebCrypto_EncryptionFailure: ".concat(e.t0.message));case 16:e.next=38;break;case 18:return e.prev=18,e.next=21,d("raw",r,l,!1,["encrypt","decrypt"],o);case 21:return m=e.sent,e.next=24,h(l,m,t,o);case 24:if(v=e.sent,"AES-GCM"!==f){e.next=32;break}return(g=new Uint8Array(v.ciphertext.byteLength+v.tag.byteLength)).set(new Uint8Array(v.ciphertext)),g.set(new Uint8Array(v.tag),v.ciphertext.byteLength),e.abrupt("return",g);case 32:return e.abrupt("return",new Uint8Array(v));case 33:e.next=38;break;case 35:throw e.prev=35,e.t1=e.catch(18),new Error("ThrowAwayMsIeAsap: ".concat(e.t1.message));case 38:case"end":return e.stop()}},e,null,[[3,13],[18,35]])}));return function(t,r,n,i){return e.apply(this,arguments)}}();t.encrypt=s;var c=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n,o){var a,f,s,c,h,l,b,y,m,v,g;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=n.name,f=n.iv,s=n.additionalData,c=n.tagLength,h=u({name:a,iv:f,additionalData:s,tagLength:c}),window.msCrypto){e.next=18;break}return e.prev=3,e.next=6,o.importKey("raw",r,h,!1,["encrypt","decrypt"]);case 6:return l=e.sent,e.next=9,o.decrypt(h,l,t);case 9:return b=e.sent,e.abrupt("return",new Uint8Array(b));case 13:throw e.prev=13,e.t0=e.catch(3),new Error("WebCrypto_DecryptionFailure: ".concat(e.t0.message));case 16:e.next=39;break;case 18:return e.prev=18,e.next=21,d("raw",r,h,!1,["encrypt","decrypt"],o);case 21:if(y=e.sent,"AES-GCM"!==a){e.next=30;break}return v=t.slice(0,t.length-c),g=t.slice(t.length-c,t.length),e.next=27,p(Object.assign(h,{tag:g}),y,v,o);case 27:m=e.sent,e.next=33;break;case 30:return e.next=32,p(h,y,t,o);case 32:m=e.sent;case 33:return e.abrupt("return",new Uint8Array(m));case 36:throw e.prev=36,e.t1=e.catch(18),new Error("ThrowAwayMsIeAsap: ".concat(e.t1.message));case 39:case"end":return e.stop()}},e,null,[[3,13],[18,36]])}));return function(t,r,n,i){return e.apply(this,arguments)}}();t.decrypt=c;var u=function(e){var t=e.name,r=e.iv,n=e.additionalData,i=e.tagLength,o={};switch(t){case"AES-GCM":Object.assign(o,{name:t,iv:r,tagLength:8*i}),Object.assign(o,n.length>0?{additionalData:n}:{});break;case"AES-CBC":o.name=t,o.iv=r;break;case"AES-CTR":if(0===r.length||r.length>16)throw new Error("InvalidIVLength");o.name=t,o.counter=new Uint8Array(16),o.counter.set(r),o.counter[15]+=1,o.length=128}return o},d=function(e,t,r,n,i,o){return new Promise(function(a,f){var s=o.importKey(e,t,r,n,i);s.oncomplete=function(e){a(e.target.result)},s.onerror=function(){f("KeyImportingFailed")}})},h=function(e,t,r,n){return new Promise(function(i,o){var a=n.encrypt(e,t,r);a.oncomplete=function(e){i(e.target.result)},a.onerror=function(){o("EncryptionFailure")}})},p=function(e,t,r,n){return new Promise(function(i,o){var a=n.decrypt(e,t,r);a.oncomplete=function(e){i(e.target.result)},a.onerror=function(){o("DecryptionFailure")}})}},function(e,t,r){"use strict";var n=r(21);Object.defineProperty(t,"__esModule",{value:!0}),t.getRandomBytes=t.getRandomSampledString=t.getRandomAsciiString=t.getRandomString=void 0;var i=n(r(22));t.getRandomString=function(e){for(var t=o(e),r=o(e),n="",i=0;i<e;i++)r[i]=r[i]%3,t[i]=0===r[i]?t[i]%10+48:t[i]%26+(1===r[i]?65:97),n+=String.fromCharCode(t[i]);return n};t.getRandomAsciiString=function(e){for(var t=o(e),r="",n=0;n<e;n++)t[n]=t[n]%94+32,r+=String.fromCharCode(t[n]);return r};t.getRandomSampledString=function(e,t){var r=t.length;if(0===r)return"";for(var n=o(e),i="",a=0;a<e;a++)i+=t[n[a]%r];return i};var o=function(e){var t,r=i.getRootWebCryptoAll(),n=i.getNodeCrypto();if(void 0!==r&&"function"==typeof r.getRandomValues)t=new Uint8Array(e),r.getRandomValues(t);else{if(void 0===n)throw new Error("UnsupportedEnvironment");t=new Uint8Array(n.randomBytes(e))}return t};t.getRandomBytes=o},function(e,t,r){"use strict";r.r(t);var n=r(2),i=r.n(n),o=r(5),a=r.n(o),f=r(47),s=r.n(f),c=r(48),u=r.n(c),d=r(49),h=r.n(d),p=r(3),l=r.n(p),b=r(1),y=r(0),m=r.n(y),v=r(50),g=r.n(v),w=r(4),_=g.a.ec,S=function(e,t){var r=t.outputPublic,n=t.outputFormat,i=void 0===n?"binary":n,o=t.compact,a=void 0!==o&&o,f=Object(w.b)(e),s="boolean"==typeof r&&r?"public":f;if("public"===s){var c,u=m.a.encoder.decodeBase64Url(e.x),d=m.a.encoder.decodeBase64Url(e.y);return a?((c=new Uint8Array(u.length+1))[0]=255&2+(1&d.slice(-1)[0]),c.set(u,1)):((c=new Uint8Array(u.length+d.length+1))[0]=4,c.set(u,1),c.set(d,u.length+1)),"string"===i?m.a.encoder.arrayBufferToHexString(c):c}if("private"===s){if(!e.d)throw new Error("InvalidKey");var h=m.a.encoder.decodeBase64Url(e.d);return"string"===i?m.a.encoder.arrayBufferToHexString(h):h}},A=function(e,t,r){var n=r.outputPublic;if(Object.keys(b.a.namedCurves).indexOf(t)<0)throw new Error("UnsupportedCurve");var i=Object(w.c)(e,t),o="boolean"==typeof n&&n?"public":i,a="string"==typeof e?m.a.encoder.hexStringToArrayBuffer(e):e,f=b.a.namedCurves[t].indutnyName,s=new _(f),c="public"===i?s.keyFromPublic(a):s.keyFromPrivate(a),u=new Uint8Array(c.getPublic("array")),d=b.a.namedCurves[t].payloadSize,h=u.slice(1,d+1),p=u.slice(d+1,2*d+1),l={kty:"EC",crv:t,x:m.a.encoder.encodeBase64Url(h),y:m.a.encoder.encodeBase64Url(p)};return"private"===o&&(l.d=m.a.encoder.encodeBase64Url(a)),l},M=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(Object.keys(b.a.namedCurves).indexOf(e.crv)<0)throw new Error("UnsupportedCurve");var n=S(e,{outputFormat:"binary",outputPublic:!0,compact:r}),i=b.a.publicKeyAlgorithms.EC.oid,o={unused:0,data:Array.from(n)},a=k.encode({type:"namedCurve",value:b.a.namedCurves[e.crv].oid},"der"),f={algorithm:i,parameters:a},s={};if("public"===t)s.subjectPublicKey=o,s.algorithm=f;else if("private"===t){var c=S(e,{outputFormat:"binary",outputPublic:!1,compact:r});s.version=0,s.privateKeyAlgorithm=f,s.privateKey=E.encode({version:1,privateKey:Array.from(c),parameters:a,publicKey:o},"der")}return s},x=function(e,t){if("public"===t){e.algorithm.parameters=k.decode(e.algorithm.parameters,"der");var r=new Uint8Array(e.subjectPublicKey.data),n=Object(b.b)(e.algorithm.parameters.value,b.a.namedCurves);if(n.length<1)throw new Error("UnsupportedCurve");return A(r,n[0],{outputPublic:!0})}if("private"===t){e.privateKeyAlgorithm.parameters=k.decode(e.privateKeyAlgorithm.parameters,"der");try{e.privateKey=E.decode(e.privateKey,"der")}catch(t){e.privateKey=j.decode(e.privateKey,"der")}var i=new Uint8Array(e.privateKey.privateKey),o=Object(b.b)(e.privateKeyAlgorithm.parameters.value,b.a.namedCurves);if(o.length<1)throw new Error("UnsupportedCurve");return A(i,o[0],{outputPublic:!1})}},k=l.a.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),E=l.a.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").explicit(0).optional().any(),this.key("publicKey").explicit(1).optional().bitstr())}),j=l.a.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("publicKey").explicit(1).optional().bitstr())}),P=r(7),I=r.n(P),B=I.a.Buffer,O=function(e,t){var r={algorithm:b.a.publicKeyAlgorithms.RSA.oid,parameters:B.from([5,0])},n=m.a.encoder.decodeBase64Url(e.n),i=n.length,o=i%128==0?i:i+(128-i%128),a=new l.a.bignum(Object(w.a)(n,o)),f=new l.a.bignum(m.a.encoder.decodeBase64Url(e.e)),s={};return"public"===t?(s.subjectPublicKey={unused:0,data:U.encode({modulus:a,publicExponent:f},"der")},s.algorithm=r):"private"===t&&(s.version=0,s.privateKeyAlgorithm=r,s.privateKey=R.encode({version:0,modulus:a,publicExponent:f,privateExponent:new l.a.bignum(Object(w.a)(m.a.encoder.decodeBase64Url(e.d),o)),prime1:new l.a.bignum(Object(w.a)(m.a.encoder.decodeBase64Url(e.p),o)),prime2:new l.a.bignum(Object(w.a)(m.a.encoder.decodeBase64Url(e.q),o)),exponent1:new l.a.bignum(Object(w.a)(m.a.encoder.decodeBase64Url(e.dp),o)),exponent2:new l.a.bignum(Object(w.a)(m.a.encoder.decodeBase64Url(e.dq),o)),coefficient:new l.a.bignum(Object(w.a)(m.a.encoder.decodeBase64Url(e.qi),o))},"der")),s},C=function(e,t){if("public"===t){e.subjectPublicKey.data=U.decode(e.subjectPublicKey.data,"der");var r=e.subjectPublicKey.data.modulus,n=e.subjectPublicKey.data.publicExponent,i=r.byteLength(),o=i%128==0?i:i+(128-i%128);return r=new Uint8Array(r.toArray("be",o)),n=new Uint8Array(n.toArray("be",n.byteLength())),{kty:"RSA",n:m.a.encoder.encodeBase64Url(Object(w.f)(r)),e:m.a.encoder.encodeBase64Url(Object(w.f)(n))}}if("private"===t){e.privateKey=R.decode(e.privateKey,"der");var a={};a.modulus=e.privateKey.modulus;var f=a.modulus.byteLength(),s=f%128==0?f:f+(128-f%128);a.modulus=new Uint8Array(a.modulus.toArray("be",s)),a.publicExponent=new Uint8Array(e.privateKey.publicExponent.toArray("be",e.privateKey.publicExponent.byteLength())),a.privateExponent=new Uint8Array(e.privateKey.privateExponent.toArray("be",s));return["prime1","prime2","exponent1","exponent2","coefficient"].forEach(function(t){a[t]=new Uint8Array(e.privateKey[t].toArray("be",s>>1))}),{kty:"RSA",n:m.a.encoder.encodeBase64Url(Object(w.f)(a.modulus)),e:m.a.encoder.encodeBase64Url(Object(w.f)(a.publicExponent)),d:m.a.encoder.encodeBase64Url(Object(w.f)(a.privateExponent)),p:m.a.encoder.encodeBase64Url(Object(w.f)(a.prime1)),q:m.a.encoder.encodeBase64Url(Object(w.f)(a.prime2)),dp:m.a.encoder.encodeBase64Url(Object(w.f)(a.exponent1)),dq:m.a.encoder.encodeBase64Url(Object(w.f)(a.exponent2)),qi:m.a.encoder.encodeBase64Url(Object(w.f)(a.coefficient))}}},U=l.a.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}),R=l.a.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(),this.key("otherPrimeInfos").optional().use(z))}),z=l.a.define("OtherPrimeInfos",function(){this.seqof(T)}),T=l.a.define("OtherPrimeInfo",function(){this.seq().obj(this.key("prime").int(),this.key("exponent").int(),this.key("coefficient").int())}),L=r(6),N=r(12),K=r.n(N),q=r(17),D=r.n(q),F=r(29),H=r.n(F),W=r(18),Y=r.n(W),J=I.a.Buffer,V=l.a.bignum,Z=function(){var e=a()(i.a.mark(function e(t){var r,n,o,a,f=arguments;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===(r=f.length>1&&void 0!==f[1]?f[1]:{passphrase:""}).algorithm&&(r.algorithm="pbes2"),void 0===r.iterationCount&&(r.iterationCount=2048),"pbes2"!==r.algorithm){e.next=15;break}return void 0===r.cipher&&(r.cipher="aes256-cbc"),void 0===r.prf&&(r.prf="hmacWithSHA256"),n="pbkdf2",e.next=9,Q(t,r.passphrase,n,r.prf,r.iterationCount,r.cipher);case 9:return o=e.sent,e.next=12,X(o);case 12:return e.abrupt("return",e.sent);case 15:return e.next=17,te(t,r.passphrase,r.algorithm,r.iterationCount);case 17:return(a=e.sent).encryptionAlgorithm.algorithm=b.a.passwordBasedEncryptionSchemes[a.encryptionAlgorithm.algorithm].oid,a.encryptionAlgorithm.parameters=L.d.encode(a.encryptionAlgorithm.parameters,"der"),e.abrupt("return",L.a.encode(a,"der"));case 21:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),G=function(){var e=a()(i.a.mark(function e(t,r){var n;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((n={}).encryptionAlgorithm={algorithm:Object(b.c)(t.encryptionAlgorithm.algorithm,b.a.passwordBasedEncryptionSchemes)},"pbes2"===n.encryptionAlgorithm.algorithm?n.encryptionAlgorithm.parameters=$(t.encryptionAlgorithm.parameters):n.encryptionAlgorithm.parameters=L.d.decode(t.encryptionAlgorithm.parameters,"der"),n.encryptedData=t.encryptedData,"pbes2"!==n.encryptionAlgorithm.algorithm){e.next=10;break}return e.next=7,ee(n,r);case 7:return e.abrupt("return",e.sent);case 10:return e.next=12,re(n,r);case 12:return e.abrupt("return",e.sent);case 13:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}(),X=function(e){var t={encryptionAlgorithm:{}};t.encryptionAlgorithm.algorithm=b.a.passwordBasedEncryptionSchemes[e.encryptionAlgorithm.algorithm].oid;var r=e.encryptionAlgorithm.parameters.keyDerivationFunc;if("pbkdf2"!==r.algorithm)throw new Error("UnsupportedKDF");r.parameters.prf.algorithm=b.a.pbkdf2Prfs[r.parameters.prf.algorithm].oid,r.parameters=L.g.encode(r.parameters,"der"),r.algorithm=b.a.keyDerivationFunctions[r.algorithm].oid;var n=e.encryptionAlgorithm.parameters.encryptionScheme;if(!(Object.keys(L.e).indexOf(n.algorithm)>=0))throw new Error("UnsupportedCipher");return n.parameters=L.e[n.algorithm].encode(n.parameters,"der"),n.algorithm=b.a.encryptionSchemes[n.algorithm].oid,t.encryptionAlgorithm.parameters=L.f.encode({keyDerivationFunc:r,encryptionScheme:n},"der"),t.encryptedData=e.encryptedData,L.a.encode(t,"der")},$=function(e){var t,r,n,i=L.f.decode(e,"der"),o=Object(b.c)(i.keyDerivationFunc.algorithm,b.a.keyDerivationFunctions);if("pbkdf2"!==o)throw new Error("UnsupportedKDF");var a=L.g.decode(i.keyDerivationFunc.parameters,"der");n={algorithm:Object(b.c)(a.prf.algorithm,b.a.pbkdf2Prfs),parameters:a.prf.parameters},t=a.iterationCount,r={type:a.salt.type,value:a.salt.value};var f=Object(b.c)(i.encryptionScheme.algorithm,b.a.encryptionSchemes);if(!(Object.keys(L.e).indexOf(f)>=0))throw new Error("UnsupportedCipher");return{keyDerivationFunc:{algorithm:o,parameters:{salt:r,iterationCount:t,prf:n}},encryptionScheme:{algorithm:f,parameters:L.e[f].decode(i.encryptionScheme.parameters,"der")}}},Q=function(){var e=a()(i.a.mark(function e(t,r,n,o,a,f){var s,c,u,d,h,p,l,y;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=m.a.encoder.stringToArrayBuffer(r),e.next=3,Y.a.getRandomBytes(b.a.keyDerivationFunctions[n].defaultSaltLen);case 3:if(c=e.sent,u=b.a.encryptionSchemes[f].keyLength,"pbkdf2"!==n){e.next=11;break}return e.next=8,D.a.pbkdf2(s,c,a,u,b.a.pbkdf2Prfs[o].hash);case 8:d=e.sent,e.next=12;break;case 11:throw new Error("UnsupportedKDF");case 12:if("des-ede3-cbc"!==f){e.next=23;break}return e.t0=J,e.next=16,Y.a.getRandomBytes(b.a.encryptionSchemes[f].ivLength);case 16:e.t1=e.sent,h=e.t0.from.call(e.t0,e.t1),l=K.a.CBC.instantiate(K.a.EDE),y=l.create({type:"encrypt",key:J.from(d),iv:h}),p=J.from(y.update(t).concat(y.final())),e.next=36;break;case 23:if("aes128-cbc"!==f&&"aes192-cbc"!==f&&"aes256-cbc"!==f){e.next=35;break}return e.next=26,Y.a.getRandomBytes(b.a.encryptionSchemes[f].ivLength);case 26:return h=e.sent,e.t2=J,e.next=30,H.a.encrypt(new Uint8Array(t),d,{name:"AES-CBC",iv:h});case 30:e.t3=e.sent,p=e.t2.from.call(e.t2,e.t3),h=J.from(h),e.next=36;break;case 35:throw new Error("UnsupportedCipher");case 36:return e.abrupt("return",{encryptedData:p,encryptionAlgorithm:{algorithm:"pbes2",parameters:{keyDerivationFunc:{algorithm:n,parameters:{salt:{type:"specified",value:J.from(c)},iterationCount:new V(a),prf:{algorithm:o,parameters:J.from([5,0])}}},encryptionScheme:{algorithm:f,parameters:h}}}});case 37:case"end":return e.stop()}},e)}));return function(t,r,n,i,o,a){return e.apply(this,arguments)}}(),ee=function(){var e=a()(i.a.mark(function e(t,r){var n,o,a,f,s,c,u,d,h,p,l,y,v;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.encryptionAlgorithm.parameters.keyDerivationFunc,o=t.encryptionAlgorithm.parameters.encryptionScheme,a=b.a.encryptionSchemes[o.algorithm].keyLength,"pbkdf2"!==n.algorithm){e.next=15;break}if(s=m.a.encoder.stringToArrayBuffer(r),"specified"===n.parameters.salt.type){e.next=7;break}throw new Error("UnsupportedSaltSource");case 7:return c=new Uint8Array(n.parameters.salt.value),u=n.parameters.iterationCount.toNumber(),d=n.parameters.prf.algorithm,e.next=12,D.a.pbkdf2(s,c,u,a,b.a.pbkdf2Prfs[d].hash);case 12:f=e.sent,e.next=16;break;case 15:throw new Error("UnsupportedKDF");case 16:if("des-ede3-cbc"!==o.algorithm){e.next=23;break}p=o.parameters,l=K.a.CBC.instantiate(K.a.EDE),y=l.create({type:"decrypt",key:f,iv:p}),h=J.from(y.update(t.encryptedData).concat(y.final())),e.next=33;break;case 23:if("aes128-cbc"!==o.algorithm&&"aes192-cbc"!==o.algorithm&&"aes256-cbc"!==o.algorithm){e.next=32;break}return v=new Uint8Array(o.parameters),e.t0=J,e.next=28,H.a.decrypt(new Uint8Array(t.encryptedData),f,{name:"AES-CBC",iv:v});case 28:e.t1=e.sent,h=e.t0.from.call(e.t0,e.t1),e.next=33;break;case 32:throw new Error("UnsupportedEncryptionAlgorithm");case 33:return e.abrupt("return",L.c.decode(h,"der"));case 34:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}(),te=function(){var e=a()(i.a.mark(function e(t,r,n,o){var a,f,s,c,u,d,h,p,l;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=m.a.encoder.stringToArrayBuffer(r),e.next=3,Y.a.getRandomBytes(8);case 3:return f=e.sent,s=b.a.passwordBasedEncryptionSchemes[n].hash,e.next=7,D.a.pbkdf1(a,f,o,16,s);case 7:if(c=e.sent,u=c.slice(0,8),d=c.slice(8,16),"DES-CBC"!==b.a.passwordBasedEncryptionSchemes[n].encrypt){e.next=17;break}p=K.a.CBC.instantiate(K.a.DES),l=p.create({type:"encrypt",key:u,iv:d}),h=J.from(l.update(t).concat(l.final())),e.next=18;break;case 17:throw new Error("UnsupportedEncryptionAlgorithm");case 18:return e.abrupt("return",{encryptionAlgorithm:{algorithm:n,parameters:{salt:J.from(f),iterationCount:new V(o)}},encryptedData:h});case 19:case"end":return e.stop()}},e)}));return function(t,r,n,i){return e.apply(this,arguments)}}(),re=function(){var e=a()(i.a.mark(function e(t,r){var n,o,a,f,s,c,u,d,h,p;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=m.a.encoder.stringToArrayBuffer(r),o=new Uint8Array(t.encryptionAlgorithm.parameters.salt),a=b.a.passwordBasedEncryptionSchemes[t.encryptionAlgorithm.algorithm].hash,f=t.encryptionAlgorithm.parameters.iterationCount.toNumber(),e.next=6,D.a.pbkdf1(n,o,f,16,a);case 6:if(s=e.sent,c=s.slice(0,8),u=s.slice(8,16),"DES-CBC"!==b.a.passwordBasedEncryptionSchemes[t.encryptionAlgorithm.algorithm].encrypt){e.next=16;break}h=K.a.CBC.instantiate(K.a.DES),p=h.create({type:"decrypt",key:c,iv:u}),d=J.from(p.update(t.encryptedData).concat(p.final())),e.next=17;break;case 16:throw new Error("UnsupportedEncryptionAlgorithm");case 17:return e.abrupt("return",L.c.decode(d,"der"));case 18:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}(),ne=I.a.Buffer,ie=function(){var e=a()(i.a.mark(function e(t,r,n){var o,a,f,s,c,u,d,h;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=n.outputPublic,a=n.compact,f=void 0!==a&&a,s=n.encOptions,c=Object(w.b)(t),u="boolean"==typeof o&&o?"public":c,"EC"===t.kty?d=M(t,u,f):"RSA"===t.kty&&(d=O(t,u)),"public"!==u){e.next=8;break}h=L.h.encode(d,"der"),e.next=14;break;case 8:if(h=L.c.encode(d,"der"),!(void 0!==s.passphrase&&s.passphrase.length>0)){e.next=14;break}return e.next=12,Z(h,s);case 12:h=e.sent,u="encryptedPrivate";case 14:return h=new Uint8Array(h),e.abrupt("return","pem"===r?m.a.formatter.binToPem(h,u):h);case 16:case"end":return e.stop()}},e)}));return function(t,r,n){return e.apply(this,arguments)}}(),oe=function(){var e=a()(i.a.mark(function e(t,r,n){var o,a,f,s,c,u;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:o=n.outputPublic,a=n.passphrase,f="pem"===r?m.a.formatter.pemToBin(t):t,e.prev=2,s=L.b.decode(ne.from(f),"der"),e.next=9;break;case 6:throw e.prev=6,e.t0=e.catch(2),new Error("FailedToDecodeKey");case 9:if("subjectPublicKeyInfo"!==s.type){e.next=14;break}c="public",s=s.value,e.next=26;break;case 14:if(c="boolean"==typeof o&&o?"public":"private","encryptedPrivateKeyInfo"!==s.type){e.next=21;break}return e.next=18,G(s.value,a);case 18:s=e.sent,e.next=26;break;case 21:if("oneAsymmetricKey"!==s.type){e.next=25;break}s=s.value,e.next=26;break;case 25:throw new Error("UnsupportedKeyStructure");case 26:if(!((u=Object(b.b)("public"===c?s.algorithm.algorithm:s.privateKeyAlgorithm.algorithm,b.a.publicKeyAlgorithms)).length<1)){e.next=29;break}throw new Error("UnsupportedKey");case 29:if("EC"!==u[0]){e.next=33;break}return e.abrupt("return",x(s,c));case 33:if("RSA"!==u[0]){e.next=37;break}return e.abrupt("return",C(s,c));case 37:throw new Error("InvalidKeyType");case 38:case"end":return e.stop()}},e,null,[[2,6]])}));return function(t,r,n){return e.apply(this,arguments)}}(),ae=function(){var e=a()(i.a.mark(function e(){var t,r,n,o=arguments;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=o.length>0&&void 0!==o[0]?o[0]:"pem",r=o.length>1?o[1]:void 0,n=o.length>2&&void 0!==o[2]?o[2]:{},!(["pem","der","oct"].indexOf(t)<0)){e.next=5;break}throw new Error("InvalidOutputForm");case 5:if("object"===h()(r)){e.next=7;break}throw new Error("InvalidJWKAsObject");case 7:if("EC"===r.kty||"RSA"===r.kty){e.next=9;break}throw new Error("UnsupportedKeyType");case 9:if(void 0===n.outputPublic||"boolean"==typeof n.outputPublic){e.next=11;break}throw new Error("outputPublicMustBeBoolean");case 11:if("EC"===r.key&&"boolean"!=typeof n.compact&&(n.compact=!1),"oct"===t&&"string"!==n.output&&(n.output="binary"),void 0===n.encryptParams&&(n.encryptParams={}),"der"!==t&&"pem"!==t||void 0!==n.encryptParams.passphrase||(n.encryptParams.passphrase=""),"der"!==t&&"pem"!==t){e.next=21;break}return e.next=18,ie(r,t,{outputPublic:n.outputPublic,compact:n.compact,encOptions:n.encryptParams});case 18:return e.abrupt("return",e.sent);case 21:if("oct"!==t||"EC"!==r.kty){e.next=25;break}return e.abrupt("return",S(r,{outputPublic:n.outputPublic,outputFormat:n.output,compact:n.compact}));case 25:throw new Error("UnsupportedConversion");case 26:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),fe=function(){var e=a()(i.a.mark(function e(t,r){var n,o=arguments;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=o.length>2&&void 0!==o[2]?o[2]:{},!(["pem","der","oct"].indexOf(t)<0)){e.next=3;break}throw new Error("InvalidInputForm");case 3:if("oct"!==t||n.namedCurve){e.next=5;break}throw new Error("InappropriateOptions");case 5:if(void 0===n.outputPublic||"boolean"==typeof n.outputPublic){e.next=7;break}throw new Error("outputPublicMustBeBoolean");case 7:if("der"!==t&&"pem"!==t||void 0!==n.passphrase||(n.passphrase=""),"der"!==t&&"pem"!==t){e.next=14;break}return e.next=11,oe(r,t,{outputPublic:n.outputPublic,passphrase:n.passphrase});case 11:return e.abrupt("return",e.sent);case 14:if("oct"!==t){e.next=18;break}return e.abrupt("return",A(r,n.namedCurve,{outputPublic:n.outputPublic}));case 18:throw new Error("UnsupportedConversion");case 19:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}(),se=r(23),ce=r.n(se),ue=I.a.Buffer,de=function(){var e=a()(i.a.mark(function e(t){var r,n,o,a,f,s=arguments;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=s.length>1&&void 0!==s[1]?s[1]:"SHA-256",n=s.length>2&&void 0!==s[2]?s[2]:"binary",!(["hex","binary"].indexOf(n)<0)){e.next=4;break}throw new Error("UnsupportedOutputFormat");case 4:if("EC"!==t.kty){e.next=8;break}o=JSON.stringify({crv:t.crv,kty:t.kty,x:t.x,y:t.y}),e.next=13;break;case 8:if("RSA"!==t.kty){e.next=12;break}o=JSON.stringify({e:t.e,kty:t.kty,n:t.n}),e.next=13;break;case 12:throw new Error("UnsupportedKeyType");case 13:return a=new Uint8Array(ue.from(o,"utf8")),e.next=16,ce.a.compute(a,r);case 16:if(f=e.sent,"hex"!==n){e.next=21;break}return e.abrupt("return",m.a.encoder.arrayBufferToHexString(f));case 21:if("base64"!==n){e.next=25;break}return e.abrupt("return",m.a.encoder.encodeBase64(f));case 25:if("binary"!==n){e.next=27;break}return e.abrupt("return",f);case 27:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),he=r(30),pe=r.n(he),le=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};s()(this,e);var i=pe()(r),o=pe()(n);if(this._jwk={},this._der=null,this._oct={},this._current={jwk:!1,der:!1,oct:!1},"jwk"===t)this._setJwk(i);else if("der"===t||"pem"===t){if("der"===t&&!(i instanceof Uint8Array))throw new Error("DerKeyMustBeUint8Array");if("pem"===t&&"string"!=typeof i)throw new Error("PemKeyMustBeString");this._setAsn1(i,t)}else{if("oct"!==t)throw new Error("UnsupportedType");if("string"!=typeof o.namedCurve)throw new Error("namedCurveMustBeSpecified");if(!(i instanceof Uint8Array))throw new Error("OctetKeyMustBeUint8Array");this._setSec1(i,o.namedCurve)}}var t,r,n,o;return u()(e,[{key:"_setJwk",value:function(e){this._type=Object(w.b)(e),this._jwk=e,this._isEncrypted&&(this._der=null),this._isEncrypted=!1,this._setCurrentStatus()}},{key:"_setAsn1",value:function(e,t){this._type=Object(w.e)(e,t)?"public":"private",this._isEncrypted=Object(w.d)(e,t),this._der="pem"===t?m.a.formatter.pemToBin(e):e,this._isEncrypted&&(this._jwk={},this._oct={}),this._setCurrentStatus()}},{key:"_setSec1",value:function(e,t){this._type=Object(w.c)(e,t),this._oct={namedCurve:t,key:e},this._isEncrypted&&(this._der=null),this._isEncrypted=!1,this._setCurrentStatus()}},{key:"_setCurrentStatus",value:function(){this._current.jwk="string"==typeof this._jwk.kty&&("RSA"===this._jwk.kty||"EC"===this._jwk.kty),this._current.der=void 0!==this._der&&this._der instanceof Uint8Array&&this._der.length>0,this._current.oct=void 0!==this._oct.key&&this._oct.key instanceof Uint8Array&&this._oct.key.length>0&&"string"==typeof this._oct.namedCurve}},{key:"export",value:(o=a()(i.a.mark(function e(){var t,r,n,o=arguments;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=o.length>0&&void 0!==o[0]?o[0]:"jwk",r=o.length>1&&void 0!==o[1]?o[1]:{},!(["pem","der","jwk","oct"].indexOf(t)<0)){e.next=4;break}throw new Error("UnsupportedFormat");case 4:if(!this._isEncrypted||"private"!==this._type){e.next=10;break}if("der"!==t&&"pem"!==t||0!==Object.keys(r).length||!this._current.der){e.next=9;break}return e.abrupt("return","pem"===t?m.a.formatter.binToPem(this._der,"encryptedPrivate"):this._der);case 9:throw new Error("DecryptionRequired");case 10:if(!this._current.jwk){e.next=14;break}n=this._jwk,e.next=27;break;case 14:if(!this._current.oct){e.next=20;break}return e.next=17,fe("oct",this._oct.key,{namedCurve:this._oct.namedCurve});case 17:n=e.sent,e.next=27;break;case 20:if(!this._current.der){e.next=26;break}return e.next=23,fe("der",this._der);case 23:n=e.sent,e.next=27;break;case 26:throw new Error("InvalidStatus");case 27:if(this._setJwk(n),"der"!==t&&"pem"!==t){e.next=35;break}return void 0===r.encryptParams&&(r.encryptParams={}),e.next=32,ae(t,n,{outputPublic:r.outputPublic,compact:r.compact,encryptParams:r.encryptParams});case 32:return e.abrupt("return",e.sent);case 35:if("oct"!==t){e.next=41;break}return e.next=38,ae(t,n,{outputPublic:r.outputPublic,output:r.output,compact:r.compact});case 38:return e.abrupt("return",e.sent);case 41:return e.abrupt("return",n);case 42:case"end":return e.stop()}},e,this)})),function(){return o.apply(this,arguments)})},{key:"encrypt",value:(n=a()(i.a.mark(function e(t){var r;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isEncrypted){e.next=2;break}throw new Error("AlreadyEncrypted");case 2:return r={encryptParams:{passphrase:t}},e.t0=this,e.next=6,this.export("der",r);case 6:return e.t1=e.sent,e.t0._setAsn1.call(e.t0,e.t1,"der"),e.abrupt("return",!0);case 9:case"end":return e.stop()}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"decrypt",value:(r=a()(i.a.mark(function e(t){var r;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this._isEncrypted){e.next=2;break}throw new Error("NotEncrypted");case 2:if(!this._current.der||"string"!=typeof t){e.next=8;break}return e.next=5,fe("der",this._der,{passphrase:t});case 5:r=e.sent,e.next=9;break;case 8:throw new Error("FailedToDecrypt");case 9:return this._setJwk(r),e.abrupt("return",!0);case 11:case"end":return e.stop()}},e,this)})),function(e){return r.apply(this,arguments)})},{key:"getJwkThumbprint",value:(t=a()(i.a.mark(function e(){var t,r,n=arguments;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.length>0&&void 0!==n[0]?n[0]:"SHA-256",r=n.length>1&&void 0!==n[1]?n[1]:"binary",!this._isEncrypted){e.next=4;break}throw new Error("DecryptionRequired");case 4:return e.t0=de,e.next=7,this.export("jwk");case 7:return e.t1=e.sent,e.t2=t,e.t3=r,e.next=12,(0,e.t0)(e.t1,e.t2,e.t3);case 12:return e.abrupt("return",e.sent);case 13:case"end":return e.stop()}},e,this)})),function(){return t.apply(this,arguments)})},{key:"keyType",get:function(){var e=this;if(this._isEncrypted)throw new Error("DecryptionRequired");return new Promise(function(){var t=a()(i.a.mark(function t(r,n){var o;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.export("jwk").catch(function(e){n(e)});case 2:o=t.sent,r(o.kty);case 4:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}())}},{key:"jwkThumbprint",get:function(){return this.getJwkThumbprint()}},{key:"isEncrypted",get:function(){return this._isEncrypted}},{key:"isPrivate",get:function(){return"private"===this._type}},{key:"der",get:function(){return this.export("der")}},{key:"pem",get:function(){return this.export("pem")}},{key:"jwk",get:function(){return this.export("jwk")}},{key:"oct",get:function(){return this.export("oct",{output:"string"})}}]),e}();r.d(t,"Key",function(){return le});t.default={Key:le}}])}); |