(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;ir)o[r]=e[r++];return o}},1318:function(t,e,r){var n=r(5656),i=r(1400),o=r(6244),u=function(t){return function(e,r,u){var a,s=n(e),f=o(s),c=i(u,f);if(t&&r!=r){while(f>c)if(a=s[c++],a!=a)return!0}else for(;f>c;c++)if((t||c in s)&&s[c]===r)return t||c||0;return!t&&-1}};t.exports={includes:u(!0),indexOf:u(!1)}},3658:function(t,e,r){"use strict";var n=r(9781),i=r(3157),o=TypeError,u=Object.getOwnPropertyDescriptor,a=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=a?function(t,e){if(i(t)&&!u(t,"length").writable)throw o("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},1843:function(t,e,r){var n=r(6244);t.exports=function(t,e){for(var r=n(t),i=new e(r),o=0;o=a||f<0)throw o("Incorrect index");for(var c=new e(a),h=0;hr)throw e("Maximum allowed index exceeded");return t}},8113:function(t){t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},7392:function(t,e,r){var n,i,o=r(7854),u=r(8113),a=o.process,s=o.Deno,f=a&&a.versions||s&&s.version,c=f&&f.v8;c&&(n=c.split("."),i=n[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&u&&(n=u.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=u.match(/Chrome\/(\d+)/),n&&(i=+n[1]))),t.exports=i},748:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(t,e,r){var n=r(7854),i=r(1236).f,o=r(8880),u=r(8052),a=r(3072),s=r(9920),f=r(4705);t.exports=function(t,e){var r,c,h,l,d,p,b=t.target,g=t.global,m=t.stat;if(c=g?n:m?n[b]||a(b,{}):(n[b]||{}).prototype,c)for(h in e){if(d=e[h],t.dontCallGetSet?(p=i(c,h),l=p&&p.value):l=c[h],r=f(g?h:b+(m?".":"#")+h,t.forced),!r&&void 0!==l){if(typeof d==typeof l)continue;s(d,l)}(t.sham||l&&l.sham)&&o(d,"sham",!0),u(c,h,d,t)}}},7293:function(t){t.exports=function(t){try{return!!t()}catch(e){return!0}}},4374:function(t,e,r){var n=r(7293);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},6916:function(t,e,r){var n=r(4374),i=Function.prototype.call;t.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},6530:function(t,e,r){var n=r(9781),i=r(2597),o=Function.prototype,u=n&&Object.getOwnPropertyDescriptor,a=i(o,"name"),s=a&&"something"===function(){}.name,f=a&&(!n||n&&u(o,"name").configurable);t.exports={EXISTS:a,PROPER:s,CONFIGURABLE:f}},5668:function(t,e,r){var n=r(1702),i=r(9662);t.exports=function(t,e,r){try{return n(i(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(o){}}},1702:function(t,e,r){var n=r(4374),i=Function.prototype,o=i.call,u=n&&i.bind.bind(o,o);t.exports=n?u:function(t){return function(){return o.apply(t,arguments)}}},5005:function(t,e,r){var n=r(7854),i=r(614),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(n[t]):n[t]&&n[t][e]}},8173:function(t,e,r){var n=r(9662),i=r(8554);t.exports=function(t,e){var r=t[e];return i(r)?void 0:n(r)}},7854:function(t,e,r){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||function(){return this}()||Function("return this")()},2597:function(t,e,r){var n=r(1702),i=r(7908),o=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},3501:function(t){t.exports={}},4664:function(t,e,r){var n=r(9781),i=r(7293),o=r(317);t.exports=!n&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8361:function(t,e,r){var n=r(1702),i=r(7293),o=r(4326),u=Object,a=n("".split);t.exports=i((function(){return!u("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?a(t,""):u(t)}:u},2788:function(t,e,r){var n=r(1702),i=r(614),o=r(5465),u=n(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return u(t)}),t.exports=o.inspectSource},9909:function(t,e,r){var n,i,o,u=r(4811),a=r(7854),s=r(111),f=r(8880),c=r(2597),h=r(5465),l=r(6200),d=r(3501),p="Object already initialized",b=a.TypeError,g=a.WeakMap,m=function(t){return o(t)?i(t):n(t,{})},y=function(t){return function(e){var r;if(!s(e)||(r=i(e)).type!==t)throw b("Incompatible receiver, "+t+" required");return r}};if(u||h.state){var v=h.state||(h.state=new g);v.get=v.get,v.has=v.has,v.set=v.set,n=function(t,e){if(v.has(t))throw b(p);return e.facade=t,v.set(t,e),e},i=function(t){return v.get(t)||{}},o=function(t){return v.has(t)}}else{var w=l("state");d[w]=!0,n=function(t,e){if(c(t,w))throw b(p);return e.facade=t,f(t,w,e),e},i=function(t){return c(t,w)?t[w]:{}},o=function(t){return c(t,w)}}t.exports={set:n,get:i,has:o,enforce:m,getterFor:y}},3157:function(t,e,r){var n=r(4326);t.exports=Array.isArray||function(t){return"Array"==n(t)}},4067:function(t,e,r){var n=r(648);t.exports=function(t){var e=n(t);return"BigInt64Array"==e||"BigUint64Array"==e}},614:function(t,e,r){var n=r(4154),i=n.all;t.exports=n.IS_HTMLDDA?function(t){return"function"==typeof t||t===i}:function(t){return"function"==typeof t}},4705:function(t,e,r){var n=r(7293),i=r(614),o=/#|\.prototype\./,u=function(t,e){var r=s[a(t)];return r==c||r!=f&&(i(e)?n(e):!!e)},a=u.normalize=function(t){return String(t).replace(o,".").toLowerCase()},s=u.data={},f=u.NATIVE="N",c=u.POLYFILL="P";t.exports=u},8554:function(t){t.exports=function(t){return null===t||void 0===t}},111:function(t,e,r){var n=r(614),i=r(4154),o=i.all;t.exports=i.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:n(t)||t===o}:function(t){return"object"==typeof t?null!==t:n(t)}},1913:function(t){t.exports=!1},2190:function(t,e,r){var n=r(5005),i=r(614),o=r(7976),u=r(3307),a=Object;t.exports=u?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return i(e)&&o(e.prototype,a(t))}},6244:function(t,e,r){var n=r(7466);t.exports=function(t){return n(t.length)}},6339:function(t,e,r){var n=r(1702),i=r(7293),o=r(614),u=r(2597),a=r(9781),s=r(6530).CONFIGURABLE,f=r(2788),c=r(9909),h=c.enforce,l=c.get,d=String,p=Object.defineProperty,b=n("".slice),g=n("".replace),m=n([].join),y=a&&!i((function(){return 8!==p((function(){}),"length",{value:8}).length})),v=String(String).split("String"),w=t.exports=function(t,e,r){"Symbol("===b(d(e),0,7)&&(e="["+g(d(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!u(t,"name")||s&&t.name!==e)&&(a?p(t,"name",{value:e,configurable:!0}):t.name=e),y&&r&&u(r,"arity")&&t.length!==r.arity&&p(t,"length",{value:r.arity});try{r&&u(r,"constructor")&&r.constructor?a&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(i){}var n=h(t);return u(n,"source")||(n.source=m(v,"string"==typeof e?e:"")),t};Function.prototype.toString=w((function(){return o(this)&&l(this).source||f(this)}),"toString")},4758:function(t){var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?r:e)(n)}},3070:function(t,e,r){var n=r(9781),i=r(4664),o=r(3353),u=r(9670),a=r(4948),s=TypeError,f=Object.defineProperty,c=Object.getOwnPropertyDescriptor,h="enumerable",l="configurable",d="writable";e.f=n?o?function(t,e,r){if(u(t),e=a(e),u(r),"function"===typeof t&&"prototype"===e&&"value"in r&&d in r&&!r[d]){var n=c(t,e);n&&n[d]&&(t[e]=r.value,r={configurable:l in r?r[l]:n[l],enumerable:h in r?r[h]:n[h],writable:!1})}return f(t,e,r)}:f:function(t,e,r){if(u(t),e=a(e),u(r),i)try{return f(t,e,r)}catch(n){}if("get"in r||"set"in r)throw s("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},1236:function(t,e,r){var n=r(9781),i=r(6916),o=r(5296),u=r(9114),a=r(5656),s=r(4948),f=r(2597),c=r(4664),h=Object.getOwnPropertyDescriptor;e.f=n?h:function(t,e){if(t=a(t),e=s(e),c)try{return h(t,e)}catch(r){}if(f(t,e))return u(!i(o.f,t,e),t[e])}},8006:function(t,e,r){var n=r(6324),i=r(748),o=i.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},5181:function(t,e){e.f=Object.getOwnPropertySymbols},9518:function(t,e,r){var n=r(2597),i=r(614),o=r(7908),u=r(6200),a=r(8544),s=u("IE_PROTO"),f=Object,c=f.prototype;t.exports=a?f.getPrototypeOf:function(t){var e=o(t);if(n(e,s))return e[s];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof f?c:null}},7976:function(t,e,r){var n=r(1702);t.exports=n({}.isPrototypeOf)},6324:function(t,e,r){var n=r(1702),i=r(2597),o=r(5656),u=r(1318).indexOf,a=r(3501),s=n([].push);t.exports=function(t,e){var r,n=o(t),f=0,c=[];for(r in n)!i(a,r)&&i(n,r)&&s(c,r);while(e.length>f)i(n,r=e[f++])&&(~u(c,r)||s(c,r));return c}},5296:function(t,e){"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);e.f=i?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},7674:function(t,e,r){var n=r(5668),i=r(9670),o=r(6077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{t=n(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch(u){}return function(r,n){return i(r),o(n),e?t(r,n):r.__proto__=n,r}}():void 0)},2140:function(t,e,r){var n=r(6916),i=r(614),o=r(111),u=TypeError;t.exports=function(t,e){var r,a;if("string"===e&&i(r=t.toString)&&!o(a=n(r,t)))return a;if(i(r=t.valueOf)&&!o(a=n(r,t)))return a;if("string"!==e&&i(r=t.toString)&&!o(a=n(r,t)))return a;throw u("Can't convert object to primitive value")}},3887:function(t,e,r){var n=r(5005),i=r(1702),o=r(8006),u=r(5181),a=r(9670),s=i([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=o.f(a(t)),r=u.f;return r?s(e,r(t)):e}},7066:function(t,e,r){"use strict";var n=r(9670);t.exports=function(){var t=n(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},4488:function(t,e,r){var n=r(8554),i=TypeError;t.exports=function(t){if(n(t))throw i("Can't call method on "+t);return t}},6200:function(t,e,r){var n=r(2309),i=r(9711),o=n("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},5465:function(t,e,r){var n=r(7854),i=r(3072),o="__core-js_shared__",u=n[o]||i(o,{});t.exports=u},2309:function(t,e,r){var n=r(1913),i=r(5465);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.30.0",mode:n?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.0/LICENSE",source:"https://github.com/zloirock/core-js"})},6293:function(t,e,r){var n=r(7392),i=r(7293);t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},1400:function(t,e,r){var n=r(9303),i=Math.max,o=Math.min;t.exports=function(t,e){var r=n(t);return r<0?i(r+e,0):o(r,e)}},4599:function(t,e,r){var n=r(7593),i=TypeError;t.exports=function(t){var e=n(t,"number");if("number"==typeof e)throw i("Can't convert number to bigint");return BigInt(e)}},5656:function(t,e,r){var n=r(8361),i=r(4488);t.exports=function(t){return n(i(t))}},9303:function(t,e,r){var n=r(4758);t.exports=function(t){var e=+t;return e!==e||0===e?0:n(e)}},7466:function(t,e,r){var n=r(9303),i=Math.min;t.exports=function(t){return t>0?i(n(t),9007199254740991):0}},7908:function(t,e,r){var n=r(4488),i=Object;t.exports=function(t){return i(n(t))}},7593:function(t,e,r){var n=r(6916),i=r(111),o=r(2190),u=r(8173),a=r(2140),s=r(5112),f=TypeError,c=s("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var r,s=u(t,c);if(s){if(void 0===e&&(e="default"),r=n(s,t,e),!i(r)||o(r))return r;throw f("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},4948:function(t,e,r){var n=r(7593),i=r(2190);t.exports=function(t){var e=n(t,"string");return i(e)?e:e+""}},1694:function(t,e,r){var n=r(5112),i=n("toStringTag"),o={};o[i]="z",t.exports="[object z]"===String(o)},6330:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(r){return"Object"}}},9711:function(t,e,r){var n=r(1702),i=0,o=Math.random(),u=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+u(++i+o,36)}},3307:function(t,e,r){var n=r(6293);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:function(t,e,r){var n=r(9781),i=r(7293);t.exports=n&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},4811:function(t,e,r){var n=r(7854),i=r(614),o=n.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},5112:function(t,e,r){var n=r(7854),i=r(2309),o=r(2597),u=r(9711),a=r(6293),s=r(3307),f=n.Symbol,c=i("wks"),h=s?f["for"]||f:f&&f.withoutSetter||u;t.exports=function(t){return o(c,t)||(c[t]=a&&o(f,t)?f[t]:h("Symbol."+t)),c[t]}},7658:function(t,e,r){"use strict";var n=r(2109),i=r(7908),o=r(6244),u=r(3658),a=r(7207),s=r(7293),f=s((function(){return 4294967297!==[].push.call({length:4294967296},1)})),c=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},h=f||!c();n({target:"Array",proto:!0,arity:1,forced:h},{push:function(t){var e=i(this),r=o(e),n=arguments.length;a(r+n);for(var s=0;s1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;it.length)&&(r=t.length),t.substring(r-e.length,r)===e}function A(t,e){if(e=Math.floor(e),0==t.length||0==e)return"";var r=t.length*e;e=Math.floor(Math.log(e)/Math.log(2));while(e)t+=t,e--;return t+=t.substring(0,r-t.length),t}var E="",k="",x="",O="",I={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},R=10;function j(t){var e=Object.keys(t),r=Object.create(Object.getPrototypeOf(t));return e.forEach((function(e){r[e]=t[e]})),Object.defineProperty(r,"message",{value:t.message}),r}function B(t){return w(t,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function P(t,e,r){var i="",o="",u=0,a="",s=!1,f=B(t),c=f.split("\n"),h=B(e).split("\n"),l=0,d="";if("strictEqual"===r&&"object"===y(t)&&"object"===y(e)&&null!==t&&null!==e&&(r="strictEqualObject"),1===c.length&&1===h.length&&c[0]!==h[0]){var p=c[0].length+h[0].length;if(p<=R){if(("object"!==y(t)||null===t)&&("object"!==y(e)||null===e)&&(0!==t||0!==e))return"".concat(I[r],"\n\n")+"".concat(c[0]," !== ").concat(h[0],"\n")}else if("strictEqualObject"!==r){var b=n.stderr&&n.stderr.isTTY?n.stderr.columns:80;if(p2&&(d="\n ".concat(A(" ",l),"^"),l=0)}}}var g=c[c.length-1],m=h[h.length-1];while(g===m){if(l++<2?a="\n ".concat(g).concat(a):i=g,c.pop(),h.pop(),0===c.length||0===h.length)break;g=c[c.length-1],m=h[h.length-1]}var v=Math.max(c.length,h.length);if(0===v){var w=f.split("\n");if(w.length>30){w[26]="".concat(E,"...").concat(O);while(w.length>27)w.pop()}return"".concat(I.notIdentical,"\n\n").concat(w.join("\n"),"\n")}l>3&&(a="\n".concat(E,"...").concat(O).concat(a),s=!0),""!==i&&(a="\n ".concat(i).concat(a),i="");var _=0,M=I[r]+"\n".concat(k,"+ actual").concat(O," ").concat(x,"- expected").concat(O),j=" ".concat(E,"...").concat(O," Lines skipped");for(l=0;l1&&l>2&&(P>4?(o+="\n".concat(E,"...").concat(O),s=!0):P>3&&(o+="\n ".concat(h[l-2]),_++),o+="\n ".concat(h[l-1]),_++),u=l,i+="\n".concat(x,"-").concat(O," ").concat(h[l]),_++;else if(h.length1&&l>2&&(P>4?(o+="\n".concat(E,"...").concat(O),s=!0):P>3&&(o+="\n ".concat(c[l-2]),_++),o+="\n ".concat(c[l-1]),_++),u=l,o+="\n".concat(k,"+").concat(O," ").concat(c[l]),_++;else{var T=h[l],z=c[l],N=z!==T&&(!S(z,",")||z.slice(0,-1)!==T);N&&S(T,",")&&T.slice(0,-1)===z&&(N=!1,z+=","),N?(P>1&&l>2&&(P>4?(o+="\n".concat(E,"...").concat(O),s=!0):P>3&&(o+="\n ".concat(c[l-2]),_++),o+="\n ".concat(c[l-1]),_++),u=l,o+="\n".concat(k,"+").concat(O," ").concat(z),i+="\n".concat(x,"-").concat(O," ").concat(T),_+=2):(o+=i,i="",1!==P&&0!==l||(o+="\n ".concat(z),_++))}if(_>20&&l30){p[26]="".concat(E,"...").concat(O);while(p.length>27)p.pop()}r=1===p.length?f(this,m(e).call(this,"".concat(d," ").concat(p[0]))):f(this,m(e).call(this,"".concat(d,"\n\n").concat(p.join("\n"),"\n")))}else{var b=B(s),g="",v=I[o];"notDeepEqual"===o||"notEqual"===o?(b="".concat(I[o],"\n\n").concat(b),b.length>1024&&(b="".concat(b.slice(0,1021),"..."))):(g="".concat(B(h)),b.length>512&&(b="".concat(b.slice(0,509),"...")),g.length>512&&(g="".concat(g.slice(0,509),"...")),"deepEqual"===o||"equal"===o?b="".concat(v,"\n\n").concat(b,"\n\nshould equal\n\n"):g=" ".concat(o," ").concat(g)),r=f(this,m(e).call(this,"".concat(b).concat(g)))}return Error.stackTraceLimit=l,r.generatedMessage=!i,Object.defineProperty(c(r),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),r.code="ERR_ASSERTION",r.actual=s,r.expected=h,r.operator=o,Error.captureStackTrace&&Error.captureStackTrace(c(r),a),r.stack,r.name="AssertionError",f(r)}return h(e,t),s(e,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:w.custom,value:function(t,e){return w(this,i({},e,{customInspect:!1,depth:0}))}}]),e}(l(Error));t.exports=T},3200:function(t,e,r){"use strict";function n(t){return n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){return!e||"object"!==n(e)&&"function"!==typeof e?u(t):e}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}function s(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}var c,h,l={};function d(t,e,r){function n(t,r,n){return"string"===typeof e?e:e(t,r,n)}r||(r=Error);var u=function(e){function r(e,u,s){var f;return i(this,r),f=o(this,a(r).call(this,n(e,u,s))),f.code=t,f}return s(r,e),r}(r);l[t]=u}function p(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}function b(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function g(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function m(t,e,r){return"number"!==typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}d("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),d("ERR_INVALID_ARG_TYPE",(function(t,e,i){var o,u;if(void 0===c&&(c=r(4108)),c("string"===typeof t,"'name' must be a string"),"string"===typeof e&&b(e,"not ")?(o="must not be",e=e.replace(/^not /,"")):o="must be",g(t," argument"))u="The ".concat(t," ").concat(o," ").concat(p(e,"type"));else{var a=m(t,".")?"property":"argument";u='The "'.concat(t,'" ').concat(a," ").concat(o," ").concat(p(e,"type"))}return u+=". Received type ".concat(n(i)),u}),TypeError),d("ERR_INVALID_ARG_VALUE",(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===h&&(h=r(9162));var i=h.inspect(e);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(t,"' ").concat(n,". Received ").concat(i)}),TypeError,RangeError),d("ERR_INVALID_RETURN_VALUE",(function(t,e,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(t,' to be returned from the "').concat(e,'"')+" function but got ".concat(i,".")}),TypeError),d("ERR_MISSING_ARGS",(function(){for(var t=arguments.length,e=new Array(t),n=0;n0,"At least one arg needs to be specified");var i="The ",o=e.length;switch(e=e.map((function(t){return'"'.concat(t,'"')})),o){case 1:i+="".concat(e[0]," argument");break;case 2:i+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:i+=e.slice(0,o-1).join(", "),i+=", and ".concat(e[o-1]," arguments");break}return"".concat(i," must be specified")}),TypeError),t.exports.codes=l},2893:function(t,e,r){"use strict";function n(t,e){return u(t)||o(t,e)||i()}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function o(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var u,a=t[Symbol.iterator]();!(n=(u=a.next()).done);n=!0)if(r.push(u.value),e&&r.length===e)break}catch(s){i=!0,o=s}finally{try{n||null==a["return"]||a["return"]()}finally{if(i)throw o}}return r}function u(t){if(Array.isArray(t))return t}function a(t){return a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}r(7658),r(2087),r(3767),r(8585),r(8696);var s=void 0!==/a/g.flags,f=function(t){var e=[];return t.forEach((function(t){return e.push(t)})),e},c=function(t){var e=[];return t.forEach((function(t,r){return e.push([r,t])})),e},h=Object.is?Object.is:r(2095),l=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},d=Number.isNaN?Number.isNaN:r(9749);function p(t){return t.call.bind(t)}var b=p(Object.prototype.hasOwnProperty),g=p(Object.prototype.propertyIsEnumerable),m=p(Object.prototype.toString),y=r(9162).types,v=y.isAnyArrayBuffer,w=y.isArrayBufferView,_=y.isDate,M=y.isMap,S=y.isRegExp,A=y.isSet,E=y.isNativeError,k=y.isBoxedPrimitive,x=y.isNumberObject,O=y.isStringObject,I=y.isBooleanObject,R=y.isBigIntObject,j=y.isSymbolObject,B=y.isFloat32Array,P=y.isFloat64Array;function T(t){if(0===t.length||t.length>10)return!0;for(var e=0;e57)return!0}return 10===t.length&&t>=Math.pow(2,32)}function z(t){return Object.keys(t).filter(T).concat(l(t).filter(Object.prototype.propertyIsEnumerable.bind(t)))} /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */function N(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i>(-2*i&6)));return o},l=function(t){t=String(t),/[^\0-\xFF]/.test(t)&&s("The string to be encoded contains characters outside of the Latin1 range.");var e,r,n,i,o=t.length%3,u="",a=-1,c=t.length-o;while(++a>18&63)+f.charAt(i>>12&63)+f.charAt(i>>6&63)+f.charAt(63&i);return 2==o?(e=t.charCodeAt(a)<<8,r=t.charCodeAt(++a),i=e+r,u+=f.charAt(i>>10)+f.charAt(i>>4&63)+f.charAt(i<<2&63)+"="):1==o&&(i=t.charCodeAt(a),u+=f.charAt(i>>2)+f.charAt(i<<4&63)+"=="),u},d={encode:l,decode:h,version:"1.0.0"};n=function(){return d}.call(e,r,e,t),void 0===n||(t.exports=n)}()},3964:function(t,e,r){"use strict";r(3767),r(8585),r(8696),r(7658),e.byteLength=c,e.toByteArray=l,e.fromByteArray=b;for(var n=[],i=[],o="undefined"!==typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=u.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function c(t){var e=f(t),r=e[0],n=e[1];return 3*(r+n)/4-n}function h(t,e,r){return 3*(e+r)/4-r}function l(t){var e,r,n=f(t),u=n[0],a=n[1],s=new o(h(t,u,a)),c=0,l=a>0?u-4:u;for(r=0;r>16&255,s[c++]=e>>8&255,s[c++]=255&e;return 2===a&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,s[c++]=255&e),1===a&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,s[c++]=e>>8&255,s[c++]=255&e),s}function d(t){return n[t>>18&63]+n[t>>12&63]+n[t>>6&63]+n[63&t]}function p(t,e,r){for(var n,i=[],o=e;os?s:a+u));return 1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},5233:function(t,e,r){var n;r(7658),r(3767),r(8585),r(8696),function(i){"use strict";var o,u=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a=Math.ceil,s=Math.floor,f="[BigNumber Error] ",c=f+"Number primitive has more than 15 significant digits: ",h=1e14,l=14,d=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],b=1e7,g=1e9;function m(t){var e,r,n,i=N.prototype={constructor:N,toString:null,valueOf:null},o=new N(1),E=20,k=4,x=-7,O=21,I=-1e7,R=1e7,j=!1,B=1,P=0,T={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},z="0123456789abcdefghijklmnopqrstuvwxyz";function N(t,e){var i,o,a,f,h,p,b,g,m=this;if(!(m instanceof N))return new N(t,e);if(null==e){if(t&&!0===t._isBigNumber)return m.s=t.s,void(!t.c||t.e>R?m.c=m.e=null:t.e=10;h/=10,f++);return void(f>R?m.c=m.e=null:(m.e=f,m.c=[t]))}g=String(t)}else{if(!u.test(g=String(t)))return n(m,g,p);m.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(f=g.indexOf("."))>-1&&(g=g.replace(".","")),(h=g.search(/e/i))>0?(f<0&&(f=h),f+=+g.slice(h+1),g=g.substring(0,h)):f<0&&(f=g.length)}else{if(_(e,2,z.length,"Base"),10==e)return m=new N(t),U(m,E+m.e+1,k);if(g=String(t),p="number"==typeof t){if(0*t!=0)return n(m,g,p,e);if(m.s=1/t<0?(g=g.slice(1),-1):1,N.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(c+t)}else m.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(i=z.slice(0,e),f=h=0,b=g.length;hf){f=b;continue}}else if(!a&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){a=!0,h=-1,f=0;continue}return n(m,String(t),p,e)}p=!1,g=r(g,e,10,m.s),(f=g.indexOf("."))>-1?g=g.replace(".",""):f=g.length}for(h=0;48===g.charCodeAt(h);h++);for(b=g.length;48===g.charCodeAt(--b););if(g=g.slice(h,++b)){if(b-=h,p&&N.DEBUG&&b>15&&(t>d||t!==s(t)))throw Error(c+m.s*t);if((f=f-h-1)>R)m.c=m.e=null;else if(f=O)?S(s,u):A(s,u,"0");else if(t=U(new N(t),e,r),o=t.e,s=v(t.c),a=s.length,1==n||2==n&&(e<=o||o<=x)){for(;aa){if(--e>0)for(s+=".";e--;s+="0");}else if(e+=o-a,e>0)for(o+1==a&&(s+=".");e--;s+="0");return t.s<0&&i?"-"+s:s}function C(t,e){for(var r,n=1,i=new N(t[0]);n=10;i/=10,n++);return(r=n+r*l-1)>R?t.c=t.e=null:r=10;f/=10,i++);if(o=e-i,o<0)o+=l,u=e,c=g[d=0],b=c/m[i-u-1]%10|0;else if(d=a((o+1)/l),d>=g.length){if(!n)break t;for(;g.length<=d;g.push(0));c=b=0,i=1,o%=l,u=o-l+1}else{for(c=f=g[d],i=1;f>=10;f/=10,i++);o%=l,u=o-l+i,b=u<0?0:c/m[i-u-1]%10|0}if(n=n||e<0||null!=g[d+1]||(u<0?c:c%m[i-u-1]),n=r<4?(b||n)&&(0==r||r==(t.s<0?3:2)):b>5||5==b&&(4==r||n||6==r&&(o>0?u>0?c/m[i-u]:0:g[d-1])%10&1||r==(t.s<0?8:7)),e<1||!g[0])return g.length=0,n?(e-=t.e+1,g[0]=m[(l-e%l)%l],t.e=-e||0):g[0]=t.e=0,t;if(0==o?(g.length=d,f=1,d--):(g.length=d+1,f=m[l-o],g[d]=u>0?s(c/m[i-u]%m[u])*f:0),n)for(;;){if(0==d){for(o=1,u=g[0];u>=10;u/=10,o++);for(u=g[0]+=f,f=1;u>=10;u/=10,f++);o!=f&&(t.e++,g[0]==h&&(g[0]=1));break}if(g[d]+=f,g[d]!=h)break;g[d--]=0,f=1}for(o=g.length;0===g[--o];g.pop());}t.e>R?t.c=t.e=null:t.e=O?S(e,r):A(e,r,"0"),t.s<0?"-"+e:e)}return N.clone=m,N.ROUND_UP=0,N.ROUND_DOWN=1,N.ROUND_CEIL=2,N.ROUND_FLOOR=3,N.ROUND_HALF_UP=4,N.ROUND_HALF_DOWN=5,N.ROUND_HALF_EVEN=6,N.ROUND_HALF_CEIL=7,N.ROUND_HALF_FLOOR=8,N.EUCLID=9,N.config=N.set=function(t){var e,r;if(null!=t){if("object"!=typeof t)throw Error(f+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(r=t[e],_(r,0,g,e),E=r),t.hasOwnProperty(e="ROUNDING_MODE")&&(r=t[e],_(r,0,8,e),k=r),t.hasOwnProperty(e="EXPONENTIAL_AT")&&(r=t[e],r&&r.pop?(_(r[0],-g,0,e),_(r[1],0,g,e),x=r[0],O=r[1]):(_(r,-g,g,e),x=-(O=r<0?-r:r))),t.hasOwnProperty(e="RANGE"))if(r=t[e],r&&r.pop)_(r[0],-g,-1,e),_(r[1],1,g,e),I=r[0],R=r[1];else{if(_(r,-g,g,e),!r)throw Error(f+e+" cannot be zero: "+r);I=-(R=r<0?-r:r)}if(t.hasOwnProperty(e="CRYPTO")){if(r=t[e],r!==!!r)throw Error(f+e+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw j=!r,Error(f+"crypto unavailable");j=r}else j=r}if(t.hasOwnProperty(e="MODULO_MODE")&&(r=t[e],_(r,0,9,e),B=r),t.hasOwnProperty(e="POW_PRECISION")&&(r=t[e],_(r,0,g,e),P=r),t.hasOwnProperty(e="FORMAT")){if(r=t[e],"object"!=typeof r)throw Error(f+e+" not an object: "+r);T=r}if(t.hasOwnProperty(e="ALPHABET")){if(r=t[e],"string"!=typeof r||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(f+e+" invalid: "+r);z=r}}return{DECIMAL_PLACES:E,ROUNDING_MODE:k,EXPONENTIAL_AT:[x,O],RANGE:[I,R],CRYPTO:j,MODULO_MODE:B,POW_PRECISION:P,FORMAT:T,ALPHABET:z}},N.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!N.DEBUG)return!0;var e,r,n=t.c,i=t.e,o=t.s;t:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-g&&i<=g&&i===s(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break t}if(e=(i+1)%l,e<1&&(e+=l),String(n[0]).length==e){for(e=0;e=h||r!==s(r))break t;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(f+"Invalid BigNumber: "+t)},N.maximum=N.max=function(){return C(arguments,i.lt)},N.minimum=N.min=function(){return C(arguments,i.gt)},N.random=function(){var t=9007199254740992,e=Math.random()*t&2097151?function(){return s(Math.random()*t)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var r,n,i,u,c,h=0,d=[],b=new N(o);if(null==t?t=E:_(t,0,g),u=a(t/l),j)if(crypto.getRandomValues){for(r=crypto.getRandomValues(new Uint32Array(u*=2));h>>11),c>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),r[h]=n[0],r[h+1]=n[1]):(d.push(c%1e14),h+=2);h=u/2}else{if(!crypto.randomBytes)throw j=!1,Error(f+"crypto unavailable");for(r=crypto.randomBytes(u*=7);h=9e15?crypto.randomBytes(7).copy(r,h):(d.push(c%1e14),h+=7);h=u/7}if(!j)for(;h=10;c/=10,h++);hr-1&&(null==u[i+1]&&(u[i+1]=0),u[i+1]+=u[i]/r|0,u[i]%=r)}return u.reverse()}return function(n,i,o,u,a){var s,f,c,h,l,d,p,b,g=n.indexOf("."),m=E,y=k;for(g>=0&&(h=P,P=0,n=n.replace(".",""),b=new N(i),d=b.pow(n.length-g),P=h,b.c=r(A(v(d.c),d.e,"0"),10,o,t),b.e=b.c.length),p=r(n,i,o,a?(s=z,t):(s=t,z)),c=h=p.length;0==p[--h];p.pop());if(!p[0])return s.charAt(0);if(g<0?--c:(d.c=p,d.e=c,d.s=u,d=e(d,b,m,y,o),p=d.c,l=d.r,c=d.e),f=c+m+1,g=p[f],h=o/2,l=l||f<0||null!=p[f+1],l=y<4?(null!=g||l)&&(0==y||y==(d.s<0?3:2)):g>h||g==h&&(4==y||l||6==y&&1&p[f-1]||y==(d.s<0?8:7)),f<1||!p[0])n=l?A(s.charAt(1),-m,s.charAt(0)):s.charAt(0);else{if(p.length=f,l)for(--o;++p[--f]>o;)p[f]=0,f||(++c,p=[1].concat(p));for(h=p.length;!p[--h];);for(g=0,n="";g<=h;n+=s.charAt(p[g++]));n=A(n,c,s.charAt(0))}return n}}(),e=function(){function t(t,e,r){var n,i,o,u,a=0,s=t.length,f=e%b,c=e/b|0;for(t=t.slice();s--;)o=t[s]%b,u=t[s]/b|0,n=c*o+u*f,i=f*o+n%b*b+a,a=(i/r|0)+(n/b|0)+c*u,t[s]=i%r;return a&&(t=[a].concat(t)),t}function e(t,e,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;ie[i]?1:-1;break}return o}function r(t,e,r,n){for(var i=0;r--;)t[r]-=i,i=t[r]1;t.splice(0,1));}return function(n,i,o,u,a){var f,c,d,p,b,g,m,v,w,_,M,S,A,E,k,x,O,I=n.s==i.s?1:-1,R=n.c,j=i.c;if(!R||!R[0]||!j||!j[0])return new N(n.s&&i.s&&(R?!j||R[0]!=j[0]:j)?R&&0==R[0]||!j?0*I:I/0:NaN);for(v=new N(I),w=v.c=[],c=n.e-i.e,I=o+c+1,a||(a=h,c=y(n.e/l)-y(i.e/l),I=I/l|0),d=0;j[d]==(R[d]||0);d++);if(j[d]>(R[d]||0)&&c--,I<0)w.push(1),p=!0;else{for(E=R.length,x=j.length,d=0,I+=2,b=s(a/(j[0]+1)),b>1&&(j=t(j,b,a),R=t(R,b,a),x=j.length,E=R.length),A=x,_=R.slice(0,x),M=_.length;M=a/2&&k++;do{if(b=0,f=e(j,_,x,M),f<0){if(S=_[0],x!=M&&(S=S*a+(_[1]||0)),b=s(S/k),b>1){b>=a&&(b=a-1),g=t(j,b,a),m=g.length,M=_.length;while(1==e(g,_,m,M))b--,r(g,x=10;I/=10,d++);U(v,o+(v.e=d+c*l-1)+1,u,p)}else v.e=c,v.r=+p;return v}}(),n=function(){var t=/^(-?)0([xbo])(?=\w[\w.]*$)/i,e=/^([^.]+)\.$/,r=/^\.([^.]+)$/,n=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,u,a,s){var c,h=a?u:u.replace(i,"");if(n.test(h))o.s=isNaN(h)?null:h<0?-1:1;else{if(!a&&(h=h.replace(t,(function(t,e,r){return c="x"==(r=r.toLowerCase())?16:"b"==r?2:8,s&&s!=c?t:e})),s&&(c=s,h=h.replace(e,"$1").replace(r,"0.$1")),u!=h))return new N(h,c);if(N.DEBUG)throw Error(f+"Not a"+(s?" base "+s:"")+" number: "+u);o.s=null}o.c=o.e=null}}(),i.absoluteValue=i.abs=function(){var t=new N(this);return t.s<0&&(t.s=1),t},i.comparedTo=function(t,e){return w(this,new N(t,e))},i.decimalPlaces=i.dp=function(t,e){var r,n,i,o=this;if(null!=t)return _(t,0,g),null==e?e=k:_(e,0,8),U(new N(o),t+o.e+1,e);if(!(r=o.c))return null;if(n=((i=r.length-1)-y(this.e/l))*l,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},i.dividedBy=i.div=function(t,r){return e(this,new N(t,r),E,k)},i.dividedToIntegerBy=i.idiv=function(t,r){return e(this,new N(t,r),0,1)},i.exponentiatedBy=i.pow=function(t,e){var r,n,i,u,c,h,d,p,b,g=this;if(t=new N(t),t.c&&!t.isInteger())throw Error(f+"Exponent not an integer: "+D(t));if(null!=e&&(e=new N(e)),h=t.e>14,!g.c||!g.c[0]||1==g.c[0]&&!g.e&&1==g.c.length||!t.c||!t.c[0])return b=new N(Math.pow(+D(g),h?2-M(t):+D(t))),e?b.mod(e):b;if(d=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new N(NaN);n=!d&&g.isInteger()&&e.isInteger(),n&&(g=g.mod(e))}else{if(t.e>9&&(g.e>0||g.e<-1||(0==g.e?g.c[0]>1||h&&g.c[1]>=24e7:g.c[0]<8e13||h&&g.c[0]<=9999975e7)))return u=g.s<0&&M(t)?-0:0,g.e>-1&&(u=1/u),new N(d?1/u:u);P&&(u=a(P/l+2))}for(h?(r=new N(.5),d&&(t.s=1),p=M(t)):(i=Math.abs(+D(t)),p=i%2),b=new N(o);;){if(p){if(b=b.times(g),!b.c)break;u?b.c.length>u&&(b.c.length=u):n&&(b=b.mod(e))}if(i){if(i=s(i/2),0===i)break;p=i%2}else if(t=t.times(r),U(t,t.e+1,1),t.e>14)p=M(t);else{if(i=+D(t),0===i)break;p=i%2}g=g.times(g),u?g.c&&g.c.length>u&&(g.c.length=u):n&&(g=g.mod(e))}return n?b:(d&&(b=o.div(b)),e?b.mod(e):u?U(b,P,k,c):b)},i.integerValue=function(t){var e=new N(this);return null==t?t=k:_(t,0,8),U(e,e.e+1,t)},i.isEqualTo=i.eq=function(t,e){return 0===w(this,new N(t,e))},i.isFinite=function(){return!!this.c},i.isGreaterThan=i.gt=function(t,e){return w(this,new N(t,e))>0},i.isGreaterThanOrEqualTo=i.gte=function(t,e){return 1===(e=w(this,new N(t,e)))||0===e},i.isInteger=function(){return!!this.c&&y(this.e/l)>this.c.length-2},i.isLessThan=i.lt=function(t,e){return w(this,new N(t,e))<0},i.isLessThanOrEqualTo=i.lte=function(t,e){return-1===(e=w(this,new N(t,e)))||0===e},i.isNaN=function(){return!this.s},i.isNegative=function(){return this.s<0},i.isPositive=function(){return this.s>0},i.isZero=function(){return!!this.c&&0==this.c[0]},i.minus=function(t,e){var r,n,i,o,u=this,a=u.s;if(t=new N(t,e),e=t.s,!a||!e)return new N(NaN);if(a!=e)return t.s=-e,u.plus(t);var s=u.e/l,f=t.e/l,c=u.c,d=t.c;if(!s||!f){if(!c||!d)return c?(t.s=-e,t):new N(d?u:NaN);if(!c[0]||!d[0])return d[0]?(t.s=-e,t):new N(c[0]?u:3==k?-0:0)}if(s=y(s),f=y(f),c=c.slice(),a=s-f){for((o=a<0)?(a=-a,i=c):(f=s,i=d),i.reverse(),e=a;e--;i.push(0));i.reverse()}else for(n=(o=(a=c.length)<(e=d.length))?a:e,a=e=0;e0)for(;e--;c[r++]=0);for(e=h-1;n>a;){if(c[--n]=0;){for(r=0,p=S[i]%w,g=S[i]/w|0,u=s,o=i+u;o>i;)f=M[--u]%w,c=M[u]/w|0,a=g*f+c*p,f=p*f+a%w*w+m[o]+r,r=(f/v|0)+(a/w|0)+g*c,m[o--]=f%v;m[o]=r}return r?++n:m.splice(0,1),q(t,m,n)},i.negated=function(){var t=new N(this);return t.s=-t.s||null,t},i.plus=function(t,e){var r,n=this,i=n.s;if(t=new N(t,e),e=t.s,!i||!e)return new N(NaN);if(i!=e)return t.s=-e,n.minus(t);var o=n.e/l,u=t.e/l,a=n.c,s=t.c;if(!o||!u){if(!a||!s)return new N(i/0);if(!a[0]||!s[0])return s[0]?t:new N(a[0]?n:0*i)}if(o=y(o),u=y(u),a=a.slice(),i=o-u){for(i>0?(u=o,r=s):(i=-i,r=a),r.reverse();i--;r.push(0));r.reverse()}for(i=a.length,e=s.length,i-e<0&&(r=s,s=a,a=r,e=i),i=0;e;)i=(a[--e]=a[e]+s[e]+i)/h|0,a[e]=h===a[e]?0:a[e]%h;return i&&(a=[i].concat(a),++u),q(t,a,u)},i.precision=i.sd=function(t,e){var r,n,i,o=this;if(null!=t&&t!==!!t)return _(t,1,g),null==e?e=k:_(e,0,8),U(new N(o),t,e);if(!(r=o.c))return null;if(i=r.length-1,n=i*l+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return t&&o.e+1>n&&(n=o.e+1),n},i.shiftedBy=function(t){return _(t,-d,d),this.times("1e"+t)},i.squareRoot=i.sqrt=function(){var t,r,n,i,o,u=this,a=u.c,s=u.s,f=u.e,c=E+4,h=new N("0.5");if(1!==s||!a||!a[0])return new N(!s||s<0&&(!a||a[0])?NaN:a?u:1/0);if(s=Math.sqrt(+D(u)),0==s||s==1/0?(r=v(a),(r.length+f)%2==0&&(r+="0"),s=Math.sqrt(+r),f=y((f+1)/2)-(f<0||f%2),s==1/0?r="1e"+f:(r=s.toExponential(),r=r.slice(0,r.indexOf("e")+1)+f),n=new N(r)):n=new N(s+""),n.c[0])for(f=n.e,s=f+c,s<3&&(s=0);;)if(o=n,n=h.times(o.plus(e(u,o,c,1))),v(o.c).slice(0,s)===(r=v(n.c)).slice(0,s)){if(n.e0&&b>0){for(o=b%a||a,h=p.substr(0,o);o0&&(h+=c+p.slice(o)),d&&(h="-"+h)}n=l?h+(r.decimalSeparator||"")+((s=+r.fractionGroupSize)?l.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):l):h}return(r.prefix||"")+n+(r.suffix||"")},i.toFraction=function(t){var r,n,i,u,a,s,c,h,d,b,g,m,y=this,w=y.c;if(null!=t&&(c=new N(t),!c.isInteger()&&(c.c||1!==c.s)||c.lt(o)))throw Error(f+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+D(c));if(!w)return new N(y);for(r=new N(o),d=n=new N(o),i=h=new N(o),m=v(w),a=r.e=m.length-y.e-1,r.c[0]=p[(s=a%l)<0?l+s:s],t=!t||c.comparedTo(r)>0?a>0?r:d:c,s=R,R=1/0,c=new N(m),h.c[0]=0;;){if(b=e(c,r,0,1),u=n.plus(b.times(i)),1==u.comparedTo(t))break;n=i,i=u,d=h.plus(b.times(u=d)),h=u,r=c.minus(b.times(u=r)),c=u}return u=e(t.minus(n),i,0,1),h=h.plus(u.times(d)),n=n.plus(u.times(i)),h.s=d.s=y.s,a*=2,g=e(d,i,a,k).minus(y).abs().comparedTo(e(h,n,a,k).minus(y).abs())<1?[d,i]:[h,n],R=s,g},i.toNumber=function(){return+D(this)},i.toPrecision=function(t,e){return null!=t&&_(t,1,g),L(this,t,e,2)},i.toString=function(t){var e,n=this,i=n.s,o=n.e;return null===o?i?(e="Infinity",i<0&&(e="-"+e)):e="NaN":(null==t?e=o<=x||o>=O?S(v(n.c),o):A(v(n.c),o,"0"):10===t?(n=U(new N(n),E+o+1,k),e=A(v(n.c),n.e,"0")):(_(t,2,z.length,"Base"),e=r(A(v(n.c),o,"0"),10,t,i,!0)),i<0&&n.c[0]&&(e="-"+e)),e},i.valueOf=i.toJSON=function(){return D(this)},i._isBigNumber=!0,null!=t&&N.set(t),N}function y(t){var e=0|t;return t>0||t===e?e:e-1}function v(t){for(var e,r,n=1,i=t.length,o=t[0]+"";nf^r?1:-1;for(a=(s=i.length)<(f=o.length)?s:f,u=0;uo[u]^r?1:-1;return s==f?0:s>f^r?1:-1}function _(t,e,r,n){if(tr||t!==s(t))throw Error(f+(n||"Argument")+("number"==typeof t?tr?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function M(t){var e=t.c.length-1;return y(t.e/l)==e&&t.c[e]%2!=0}function S(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function A(t,e,r){var n,i;if(e<0){for(i=r+".";++e;i+=r);t=i+t}else if(n=t.length,++e>n){for(i=r,e-=n;--e;i+=r);t+=i}else e=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function s(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function f(t,e,r,i){for(var o=0,u=0,a=Math.min(t.length,r),s=e;s=49?f-49+10:f>=17?f-17+10:f,n(f>=0&&u0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36),t=t.toString().replace(/\s+/g,"");var i=0;"-"===t[0]&&(i++,this.negative=1),i=0;i-=3)u=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=u<>>26-a&67108863,a+=24,a>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,a+=24,a>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=s(t,e,n)<=18?(o-=18,u+=1,this.words[u]|=i>>>26):o+=8;else{var a=t.length-e;for(n=a%2===0?e+1:e;n=18?(o-=18,u+=1,this.words[u]|=i>>>26):o+=8}this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,u=o%n,a=Math.min(o,o-u)+r,s=0,c=r;c1&&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},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(R){o.prototype.inspect=h}else o.prototype.inspect=h;function h(){return(this.red?""}var l=["","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"],d=[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],p=[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];o.prototype.toString=function(t,e){var r;if(t=t||10,e=0|e||1,16===t||"hex"===t){r="";for(var i=0,o=0,u=0;u>>24-i&16777215,i+=2,i>=26&&(i-=26,u--),r=0!==o||u!==this.length-1?l[6-s.length]+s+r:s+r}0!==o&&(r=o.toString(16)+r);while(r.length%e!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var f=d[t],c=p[t];r="";var h=this.clone();h.negative=0;while(!h.isZero()){var b=h.modrn(c).toString(t);h=h.idivn(c),r=h.isZero()?b+r:l[f-b.length]+b+r}this.isZero()&&(r="0"+r);while(r.length%e!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},u&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(u,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};var b=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)};function g(t){for(var e=new Array(t.bitLength()),r=0;r>>i&1}return e}function m(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],u=i*o,a=67108863&u,s=u/67108864|0;r.words[0]=a;for(var f=1;f>>26,h=67108863&s,l=Math.min(f,e.length-1),d=Math.max(0,f-t.length+1);d<=l;d++){var p=f-d|0;i=0|t.words[p],o=0|e.words[d],u=i*o+h,c+=u/67108864|0,h=67108863&u}r.words[f]=0|h,s=0|c}return 0!==s?r.words[f]=0|s:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();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");var u=b(t,o),a="le"===e?"LE":"BE";return this["_toArrayLike"+a](u,i),u},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=u>>>24,o+=2)}if(r=0&&(t[r--]=u>>8&255),r>=0&&(t[r--]=u>>16&255),6===o?(r>=0&&(t[r--]=u>>24&255),n=0,o=0):(n=u>>>24,o+=2)}if(r>=0){t[r--]=n;while(r>=0)t[r--]=0}},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,u=0;u>26,this.words[u]=67108863&e;for(;0!==o&&u>26,this.words[u]=67108863&e;if(0===o&&u>>13,d=0|u[1],p=8191&d,b=d>>>13,g=0|u[2],m=8191&g,y=g>>>13,v=0|u[3],w=8191&v,_=v>>>13,M=0|u[4],S=8191&M,A=M>>>13,E=0|u[5],k=8191&E,x=E>>>13,O=0|u[6],I=8191&O,R=O>>>13,j=0|u[7],B=8191&j,P=j>>>13,T=0|u[8],z=8191&T,N=T>>>13,L=0|u[9],C=8191&L,q=L>>>13,U=0|a[0],D=8191&U,F=U>>>13,K=0|a[1],H=8191&K,W=K>>>13,V=0|a[2],$=8191&V,G=V>>>13,Z=0|a[3],Y=8191&Z,J=Z>>>13,X=0|a[4],Q=8191&X,tt=X>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,ut=it>>>13,at=0|a[7],st=8191&at,ft=at>>>13,ct=0|a[8],ht=8191&ct,lt=ct>>>13,dt=0|a[9],pt=8191&dt,bt=dt>>>13;r.negative=t.negative^e.negative,r.length=19,n=Math.imul(h,D),i=Math.imul(h,F),i=i+Math.imul(l,D)|0,o=Math.imul(l,F);var gt=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,D),i=Math.imul(p,F),i=i+Math.imul(b,D)|0,o=Math.imul(b,F),n=n+Math.imul(h,H)|0,i=i+Math.imul(h,W)|0,i=i+Math.imul(l,H)|0,o=o+Math.imul(l,W)|0;var mt=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,D),i=Math.imul(m,F),i=i+Math.imul(y,D)|0,o=Math.imul(y,F),n=n+Math.imul(p,H)|0,i=i+Math.imul(p,W)|0,i=i+Math.imul(b,H)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(h,$)|0,i=i+Math.imul(h,G)|0,i=i+Math.imul(l,$)|0,o=o+Math.imul(l,G)|0;var yt=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(w,D),i=Math.imul(w,F),i=i+Math.imul(_,D)|0,o=Math.imul(_,F),n=n+Math.imul(m,H)|0,i=i+Math.imul(m,W)|0,i=i+Math.imul(y,H)|0,o=o+Math.imul(y,W)|0,n=n+Math.imul(p,$)|0,i=i+Math.imul(p,G)|0,i=i+Math.imul(b,$)|0,o=o+Math.imul(b,G)|0,n=n+Math.imul(h,Y)|0,i=i+Math.imul(h,J)|0,i=i+Math.imul(l,Y)|0,o=o+Math.imul(l,J)|0;var vt=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(S,D),i=Math.imul(S,F),i=i+Math.imul(A,D)|0,o=Math.imul(A,F),n=n+Math.imul(w,H)|0,i=i+Math.imul(w,W)|0,i=i+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(m,$)|0,i=i+Math.imul(m,G)|0,i=i+Math.imul(y,$)|0,o=o+Math.imul(y,G)|0,n=n+Math.imul(p,Y)|0,i=i+Math.imul(p,J)|0,i=i+Math.imul(b,Y)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(h,Q)|0,i=i+Math.imul(h,tt)|0,i=i+Math.imul(l,Q)|0,o=o+Math.imul(l,tt)|0;var wt=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(k,D),i=Math.imul(k,F),i=i+Math.imul(x,D)|0,o=Math.imul(x,F),n=n+Math.imul(S,H)|0,i=i+Math.imul(S,W)|0,i=i+Math.imul(A,H)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(w,$)|0,i=i+Math.imul(w,G)|0,i=i+Math.imul(_,$)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(m,Y)|0,i=i+Math.imul(m,J)|0,i=i+Math.imul(y,Y)|0,o=o+Math.imul(y,J)|0,n=n+Math.imul(p,Q)|0,i=i+Math.imul(p,tt)|0,i=i+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(h,rt)|0,i=i+Math.imul(h,nt)|0,i=i+Math.imul(l,rt)|0,o=o+Math.imul(l,nt)|0;var _t=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(I,D),i=Math.imul(I,F),i=i+Math.imul(R,D)|0,o=Math.imul(R,F),n=n+Math.imul(k,H)|0,i=i+Math.imul(k,W)|0,i=i+Math.imul(x,H)|0,o=o+Math.imul(x,W)|0,n=n+Math.imul(S,$)|0,i=i+Math.imul(S,G)|0,i=i+Math.imul(A,$)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(w,Y)|0,i=i+Math.imul(w,J)|0,i=i+Math.imul(_,Y)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(m,Q)|0,i=i+Math.imul(m,tt)|0,i=i+Math.imul(y,Q)|0,o=o+Math.imul(y,tt)|0,n=n+Math.imul(p,rt)|0,i=i+Math.imul(p,nt)|0,i=i+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(h,ot)|0,i=i+Math.imul(h,ut)|0,i=i+Math.imul(l,ot)|0,o=o+Math.imul(l,ut)|0;var Mt=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(B,D),i=Math.imul(B,F),i=i+Math.imul(P,D)|0,o=Math.imul(P,F),n=n+Math.imul(I,H)|0,i=i+Math.imul(I,W)|0,i=i+Math.imul(R,H)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(k,$)|0,i=i+Math.imul(k,G)|0,i=i+Math.imul(x,$)|0,o=o+Math.imul(x,G)|0,n=n+Math.imul(S,Y)|0,i=i+Math.imul(S,J)|0,i=i+Math.imul(A,Y)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,Q)|0,i=i+Math.imul(w,tt)|0,i=i+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(m,rt)|0,i=i+Math.imul(m,nt)|0,i=i+Math.imul(y,rt)|0,o=o+Math.imul(y,nt)|0,n=n+Math.imul(p,ot)|0,i=i+Math.imul(p,ut)|0,i=i+Math.imul(b,ot)|0,o=o+Math.imul(b,ut)|0,n=n+Math.imul(h,st)|0,i=i+Math.imul(h,ft)|0,i=i+Math.imul(l,st)|0,o=o+Math.imul(l,ft)|0;var St=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(z,D),i=Math.imul(z,F),i=i+Math.imul(N,D)|0,o=Math.imul(N,F),n=n+Math.imul(B,H)|0,i=i+Math.imul(B,W)|0,i=i+Math.imul(P,H)|0,o=o+Math.imul(P,W)|0,n=n+Math.imul(I,$)|0,i=i+Math.imul(I,G)|0,i=i+Math.imul(R,$)|0,o=o+Math.imul(R,G)|0,n=n+Math.imul(k,Y)|0,i=i+Math.imul(k,J)|0,i=i+Math.imul(x,Y)|0,o=o+Math.imul(x,J)|0,n=n+Math.imul(S,Q)|0,i=i+Math.imul(S,tt)|0,i=i+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(w,rt)|0,i=i+Math.imul(w,nt)|0,i=i+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(m,ot)|0,i=i+Math.imul(m,ut)|0,i=i+Math.imul(y,ot)|0,o=o+Math.imul(y,ut)|0,n=n+Math.imul(p,st)|0,i=i+Math.imul(p,ft)|0,i=i+Math.imul(b,st)|0,o=o+Math.imul(b,ft)|0,n=n+Math.imul(h,ht)|0,i=i+Math.imul(h,lt)|0,i=i+Math.imul(l,ht)|0,o=o+Math.imul(l,lt)|0;var At=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(C,D),i=Math.imul(C,F),i=i+Math.imul(q,D)|0,o=Math.imul(q,F),n=n+Math.imul(z,H)|0,i=i+Math.imul(z,W)|0,i=i+Math.imul(N,H)|0,o=o+Math.imul(N,W)|0,n=n+Math.imul(B,$)|0,i=i+Math.imul(B,G)|0,i=i+Math.imul(P,$)|0,o=o+Math.imul(P,G)|0,n=n+Math.imul(I,Y)|0,i=i+Math.imul(I,J)|0,i=i+Math.imul(R,Y)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(k,Q)|0,i=i+Math.imul(k,tt)|0,i=i+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(S,rt)|0,i=i+Math.imul(S,nt)|0,i=i+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(w,ot)|0,i=i+Math.imul(w,ut)|0,i=i+Math.imul(_,ot)|0,o=o+Math.imul(_,ut)|0,n=n+Math.imul(m,st)|0,i=i+Math.imul(m,ft)|0,i=i+Math.imul(y,st)|0,o=o+Math.imul(y,ft)|0,n=n+Math.imul(p,ht)|0,i=i+Math.imul(p,lt)|0,i=i+Math.imul(b,ht)|0,o=o+Math.imul(b,lt)|0,n=n+Math.imul(h,pt)|0,i=i+Math.imul(h,bt)|0,i=i+Math.imul(l,pt)|0,o=o+Math.imul(l,bt)|0;var Et=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(C,H),i=Math.imul(C,W),i=i+Math.imul(q,H)|0,o=Math.imul(q,W),n=n+Math.imul(z,$)|0,i=i+Math.imul(z,G)|0,i=i+Math.imul(N,$)|0,o=o+Math.imul(N,G)|0,n=n+Math.imul(B,Y)|0,i=i+Math.imul(B,J)|0,i=i+Math.imul(P,Y)|0,o=o+Math.imul(P,J)|0,n=n+Math.imul(I,Q)|0,i=i+Math.imul(I,tt)|0,i=i+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(k,rt)|0,i=i+Math.imul(k,nt)|0,i=i+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(S,ot)|0,i=i+Math.imul(S,ut)|0,i=i+Math.imul(A,ot)|0,o=o+Math.imul(A,ut)|0,n=n+Math.imul(w,st)|0,i=i+Math.imul(w,ft)|0,i=i+Math.imul(_,st)|0,o=o+Math.imul(_,ft)|0,n=n+Math.imul(m,ht)|0,i=i+Math.imul(m,lt)|0,i=i+Math.imul(y,ht)|0,o=o+Math.imul(y,lt)|0,n=n+Math.imul(p,pt)|0,i=i+Math.imul(p,bt)|0,i=i+Math.imul(b,pt)|0,o=o+Math.imul(b,bt)|0;var kt=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(C,$),i=Math.imul(C,G),i=i+Math.imul(q,$)|0,o=Math.imul(q,G),n=n+Math.imul(z,Y)|0,i=i+Math.imul(z,J)|0,i=i+Math.imul(N,Y)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(B,Q)|0,i=i+Math.imul(B,tt)|0,i=i+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(I,rt)|0,i=i+Math.imul(I,nt)|0,i=i+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(k,ot)|0,i=i+Math.imul(k,ut)|0,i=i+Math.imul(x,ot)|0,o=o+Math.imul(x,ut)|0,n=n+Math.imul(S,st)|0,i=i+Math.imul(S,ft)|0,i=i+Math.imul(A,st)|0,o=o+Math.imul(A,ft)|0,n=n+Math.imul(w,ht)|0,i=i+Math.imul(w,lt)|0,i=i+Math.imul(_,ht)|0,o=o+Math.imul(_,lt)|0,n=n+Math.imul(m,pt)|0,i=i+Math.imul(m,bt)|0,i=i+Math.imul(y,pt)|0,o=o+Math.imul(y,bt)|0;var xt=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(C,Y),i=Math.imul(C,J),i=i+Math.imul(q,Y)|0,o=Math.imul(q,J),n=n+Math.imul(z,Q)|0,i=i+Math.imul(z,tt)|0,i=i+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,n=n+Math.imul(B,rt)|0,i=i+Math.imul(B,nt)|0,i=i+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(I,ot)|0,i=i+Math.imul(I,ut)|0,i=i+Math.imul(R,ot)|0,o=o+Math.imul(R,ut)|0,n=n+Math.imul(k,st)|0,i=i+Math.imul(k,ft)|0,i=i+Math.imul(x,st)|0,o=o+Math.imul(x,ft)|0,n=n+Math.imul(S,ht)|0,i=i+Math.imul(S,lt)|0,i=i+Math.imul(A,ht)|0,o=o+Math.imul(A,lt)|0,n=n+Math.imul(w,pt)|0,i=i+Math.imul(w,bt)|0,i=i+Math.imul(_,pt)|0,o=o+Math.imul(_,bt)|0;var Ot=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(C,Q),i=Math.imul(C,tt),i=i+Math.imul(q,Q)|0,o=Math.imul(q,tt),n=n+Math.imul(z,rt)|0,i=i+Math.imul(z,nt)|0,i=i+Math.imul(N,rt)|0,o=o+Math.imul(N,nt)|0,n=n+Math.imul(B,ot)|0,i=i+Math.imul(B,ut)|0,i=i+Math.imul(P,ot)|0,o=o+Math.imul(P,ut)|0,n=n+Math.imul(I,st)|0,i=i+Math.imul(I,ft)|0,i=i+Math.imul(R,st)|0,o=o+Math.imul(R,ft)|0,n=n+Math.imul(k,ht)|0,i=i+Math.imul(k,lt)|0,i=i+Math.imul(x,ht)|0,o=o+Math.imul(x,lt)|0,n=n+Math.imul(S,pt)|0,i=i+Math.imul(S,bt)|0,i=i+Math.imul(A,pt)|0,o=o+Math.imul(A,bt)|0;var It=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(C,rt),i=Math.imul(C,nt),i=i+Math.imul(q,rt)|0,o=Math.imul(q,nt),n=n+Math.imul(z,ot)|0,i=i+Math.imul(z,ut)|0,i=i+Math.imul(N,ot)|0,o=o+Math.imul(N,ut)|0,n=n+Math.imul(B,st)|0,i=i+Math.imul(B,ft)|0,i=i+Math.imul(P,st)|0,o=o+Math.imul(P,ft)|0,n=n+Math.imul(I,ht)|0,i=i+Math.imul(I,lt)|0,i=i+Math.imul(R,ht)|0,o=o+Math.imul(R,lt)|0,n=n+Math.imul(k,pt)|0,i=i+Math.imul(k,bt)|0,i=i+Math.imul(x,pt)|0,o=o+Math.imul(x,bt)|0;var Rt=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(C,ot),i=Math.imul(C,ut),i=i+Math.imul(q,ot)|0,o=Math.imul(q,ut),n=n+Math.imul(z,st)|0,i=i+Math.imul(z,ft)|0,i=i+Math.imul(N,st)|0,o=o+Math.imul(N,ft)|0,n=n+Math.imul(B,ht)|0,i=i+Math.imul(B,lt)|0,i=i+Math.imul(P,ht)|0,o=o+Math.imul(P,lt)|0,n=n+Math.imul(I,pt)|0,i=i+Math.imul(I,bt)|0,i=i+Math.imul(R,pt)|0,o=o+Math.imul(R,bt)|0;var jt=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,n=Math.imul(C,st),i=Math.imul(C,ft),i=i+Math.imul(q,st)|0,o=Math.imul(q,ft),n=n+Math.imul(z,ht)|0,i=i+Math.imul(z,lt)|0,i=i+Math.imul(N,ht)|0,o=o+Math.imul(N,lt)|0,n=n+Math.imul(B,pt)|0,i=i+Math.imul(B,bt)|0,i=i+Math.imul(P,pt)|0,o=o+Math.imul(P,bt)|0;var Bt=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(C,ht),i=Math.imul(C,lt),i=i+Math.imul(q,ht)|0,o=Math.imul(q,lt),n=n+Math.imul(z,pt)|0,i=i+Math.imul(z,bt)|0,i=i+Math.imul(N,pt)|0,o=o+Math.imul(N,bt)|0;var Pt=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(C,pt),i=Math.imul(C,bt),i=i+Math.imul(q,pt)|0,o=Math.imul(q,bt);var Tt=(f+n|0)+((8191&i)<<13)|0;return f=(o+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,s[0]=gt,s[1]=mt,s[2]=yt,s[3]=vt,s[4]=wt,s[5]=_t,s[6]=Mt,s[7]=St,s[8]=At,s[9]=Et,s[10]=kt,s[11]=xt,s[12]=Ot,s[13]=It,s[14]=Rt,s[15]=jt,s[16]=Bt,s[17]=Pt,s[18]=Tt,0!==f&&(s[19]=f,r.length++),r};function v(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0,i+=u>>>26,u&=67108863}r.words[o]=a,n=u,u=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function w(t,e,r){return v(t,e,r)}function _(t,e){this.x=t,this.y=e}Math.imul||(y=m),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?y(this,t,e):n<63?m(this,t,e):n<1024?v(this,t,e):w(this,t,e),r},_.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},_.prototype.permute=function(t,e,r,n,i,o){for(var u=0;u>>=1)i++;return 1<>>=13,r[2*u+1]=8191&o,o>>>=13;for(u=2*e;u>=26,r+=o/67108864|0,r+=u>>>26,this.words[i]=67108863&u}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=g(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var u=0;for(e=0;e>>26-r}u&&(this.words[e]=u,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,u=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<u)for(this.length-=u,f=0;f=0&&(0!==c||f>=i);f--){var h=0|this.words[f];this.words[f]=c<<26-o|h>>>o,c=h&a}return s&&0!==c&&(s.words[s.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(s/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=this.length-t.length,n=this.clone(),i=t,u=0|i.words[i.length-1],a=this._countBits(u);r=26-a,0!==r&&(i=i.ushln(r),n.iushln(r),u=0|i.words[i.length-1]);var s,f=n.length-i.length;if("mod"!==e){s=new o(null),s.length=f+1,s.words=new Array(s.length);for(var c=0;c=0;l--){var d=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);d=Math.min(d/u|0,67108863),n._ishlnsubmul(i,d,l);while(0!==n.negative)d--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=d)}return s&&s._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(u=a.mod.neg(),r&&0!==u.negative&&u.iadd(t)),{div:i,mod:u}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!==(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(u=a.mod.neg(),r&&0!==u.negative&&u.isub(t)),{div:a.div,mod:u}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,u,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();var i=new o(1),u=new o(0),a=new o(0),s=new o(1),f=0;while(e.isEven()&&r.isEven())e.iushrn(1),r.iushrn(1),++f;var c=r.clone(),h=e.clone();while(!e.isZero()){for(var l=0,d=1;0===(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0){e.iushrn(l);while(l-- >0)(i.isOdd()||u.isOdd())&&(i.iadd(c),u.isub(h)),i.iushrn(1),u.iushrn(1)}for(var p=0,b=1;0===(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0){r.iushrn(p);while(p-- >0)(a.isOdd()||s.isOdd())&&(a.iadd(c),s.isub(h)),a.iushrn(1),s.iushrn(1)}e.cmp(r)>=0?(e.isub(r),i.isub(a),u.isub(s)):(r.isub(e),a.isub(i),s.isub(u))}return{a:a,b:s,gcd:r.iushln(f)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();var i,u=new o(1),a=new o(0),s=r.clone();while(e.cmpn(1)>0&&r.cmpn(1)>0){for(var f=0,c=1;0===(e.words[0]&c)&&f<26;++f,c<<=1);if(f>0){e.iushrn(f);while(f-- >0)u.isOdd()&&u.iadd(s),u.iushrn(1)}for(var h=0,l=1;0===(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0){r.iushrn(h);while(h-- >0)a.isOdd()&&a.iadd(s),a.iushrn(1)}e.cmp(r)>=0?(e.isub(r),u.isub(a)):(r.isub(e),a.isub(u))}return i=0===e.cmpn(1)?u:a,i.cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);do{while(e.isEven())e.iushrn(1);while(r.isEven())r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}while(1);return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,a&=67108863,this.words[u]=a}return 0!==o&&(this.words[u]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new O(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var M={k256:null,p224:null,p192:null,p25519:null};function S(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function A(){S.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){S.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){S.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){S.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function O(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function I(t){O.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}S.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},S.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),e=r.bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},S.prototype.split=function(t,e){t.iushrn(this.n,0,e)},S.prototype.imulK=function(t){return t.imul(this.k)},i(A,S),A.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=u}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},A.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(M[t])return M[t];var e;if("k256"===t)e=new A;else if("p224"===t)e=new E;else if("p192"===t)e=new k;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new x}return M[t]=e,e},O.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},O.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},O.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(c(t,t.umod(this.m)._forceRed(this)),t)},O.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},O.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},O.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},O.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},O.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},O.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},O.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},O.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},O.prototype.isqr=function(t){return this.imul(t,t.clone())},O.prototype.sqr=function(t){return this.mul(t,t)},O.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}var i=this.m.subn(1),u=0;while(!i.isZero()&&0===i.andln(1))u++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),s=a.redNeg(),f=this.m.subn(1).iushrn(1),c=this.m.bitLength();c=new o(2*c*c).toRed(this);while(0!==this.pow(c,f).cmp(s))c.redIAdd(s);var h=this.pow(c,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=u;while(0!==d.cmp(a)){for(var b=d,g=0;0!==b.cmp(a);g++)b=b.redSqr();n(g=0;i--){for(var c=e.words[i],h=f-1;h>=0;h--){var l=c>>h&1;u!==n[0]&&(u=this.sqr(u)),0!==l||0!==a?(a<<=1,a|=l,s++,(s===r||0===i&&0===h)&&(u=this.mul(u,n[a]),s=0,a=0)):s=0}f=26}return u},O.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},O.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new I(t)},i(I,O),I.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},I.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},I.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},I.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),u=i;return i.cmp(this.m)>=0?u=i.isub(this.m):i.cmpn(0)<0&&(u=i.iadd(this.m)),u._forceRed(this)},I.prototype.invm=function(t){var e=this.imod(t._invmp(this.m).mul(this.r2));return e._forceRed(this)}}(t,this)},2675:function(t,e,r){var n;function i(t){this.rand=t}if(r(3767),r(8585),r(8696),t.exports=function(t){return n||(n=new i(null)),n.generate(t)},t.exports.Rand=i,i.prototype.generate=function(t){return this._rand(t)},i.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r * @license MIT */r(3767),r(8585),r(8696),r(7658);const i=r(3964),o=r(4850),u="function"===typeof Symbol&&"function"===typeof Symbol["for"]?Symbol["for"]("nodejs.util.inspect.custom"):null;e.Buffer=c,e.SlowBuffer=_,e.INSPECT_MAX_BYTES=50;const a=2147483647;function s(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}function f(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,c.prototype),e}function c(t,e,r){if("number"===typeof t){if("string"===typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return p(t)}return h(t,e,r)}function h(t,e,r){if("string"===typeof t)return b(t,e);if(ArrayBuffer.isView(t))return m(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(at(t,ArrayBuffer)||t&&at(t.buffer,ArrayBuffer))return y(t,e,r);if("undefined"!==typeof SharedArrayBuffer&&(at(t,SharedArrayBuffer)||t&&at(t.buffer,SharedArrayBuffer)))return y(t,e,r);if("number"===typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return c.from(n,e,r);const i=v(t);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof t[Symbol.toPrimitive])return c.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function l(t){if("number"!==typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function d(t,e,r){return l(t),t<=0?f(t):void 0!==e?"string"===typeof r?f(t).fill(e,r):f(t).fill(e):f(t)}function p(t){return l(t),f(t<0?0:0|w(t))}function b(t,e){if("string"===typeof e&&""!==e||(e="utf8"),!c.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|M(t,e);let n=f(r);const i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}function g(t){const e=t.length<0?0:0|w(t.length),r=f(e);for(let n=0;n=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function _(t){return+t!=t&&(t=0),c.alloc(+t)}function M(t,e){if(c.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||at(t,ArrayBuffer))return t.byteLength;if("string"!==typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return rt(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return ot(t).length;default:if(i)return n?-1:rt(t).length;e=(""+e).toLowerCase(),i=!0}}function S(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";t||(t="utf8");while(1)switch(t){case"hex":return C(this,e,r);case"utf8":case"utf-8":return P(this,e,r);case"ascii":return N(this,e,r);case"latin1":case"binary":return L(this,e,r);case"base64":return B(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function A(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function E(t,e,r,n,i){if(0===t.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,st(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:k(t,e,r,n,i);if("number"===typeof e)return e&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):k(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function k(t,e,r,n,i){let o,u=1,a=t.length,s=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;u=2,a/=2,s/=2,r/=2}function f(t,e){return 1===u?t[e]:t.readUInt16BE(e*u)}if(i){let n=-1;for(o=r;oa&&(r=a-s),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i)):n=i;const o=e.length;let u;for(n>o/2&&(n=o/2),u=0;u239?4:e>223?3:e>191?2:1;if(i+u<=r){let r,n,a,s;switch(u){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128===(192&r)&&(s=(31&e)<<6|63&r,s>127&&(o=s));break;case 3:r=t[i+1],n=t[i+2],128===(192&r)&&128===(192&n)&&(s=(15&e)<<12|(63&r)<<6|63&n,s>2047&&(s<55296||s>57343)&&(o=s));break;case 4:r=t[i+1],n=t[i+2],a=t[i+3],128===(192&r)&&128===(192&n)&&128===(192&a)&&(s=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,s>65535&&s<1114112&&(o=s))}}null===o?(o=65533,u=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=u}return z(n)}e.kMaxLength=a,c.TYPED_ARRAY_SUPPORT=s(),c.TYPED_ARRAY_SUPPORT||"undefined"===typeof n||"function"!==typeof n.error||n.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(t,e,r){return h(t,e,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(t,e,r){return d(t,e,r)},c.allocUnsafe=function(t){return p(t)},c.allocUnsafeSlow=function(t){return p(t)},c.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==c.prototype},c.compare=function(t,e){if(at(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),at(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let i=0,o=Math.min(r,n);in.length?(c.isBuffer(e)||(e=c.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!c.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},c.byteLength=M,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;er&&(t+=" ... "),""},u&&(c.prototype[u]=c.prototype.inspect),c.prototype.compare=function(t,e,r,n,i){if(at(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;let o=i-n,u=r-e;const a=Math.min(o,u),s=this.slice(n,i),f=t.slice(e,r);for(let c=0;c>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return x(this,t,e,r);case"utf8":case"utf-8":return O(this,t,e,r);case"ascii":case"latin1":case"binary":return I(this,t,e,r);case"base64":return R(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const T=4096;function z(t){const e=t.length;if(e<=T)return String.fromCharCode.apply(String,t);let r="",n=0;while(nn)&&(r=n);let i="";for(let o=e;or)throw new RangeError("Trying to access beyond buffer length")}function D(t,e,r,n,i,o){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function F(t,e,r,n,i){J(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let u=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=u,u>>=8,t[r++]=u,u>>=8,t[r++]=u,u>>=8,t[r++]=u,r}function K(t,e,r,n,i){J(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let u=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=u,u>>=8,t[r+2]=u,u>>=8,t[r+1]=u,u>>=8,t[r]=u,r+8}function H(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function W(t,e,r,n,i){return e=+e,r>>>=0,i||H(t,e,r,4,34028234663852886e22,-34028234663852886e22),o.write(t,e,r,n,23,4),r+4}function V(t,e,r,n,i){return e=+e,r>>>=0,i||H(t,e,r,8,17976931348623157e292,-17976931348623157e292),o.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(t,e){const r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),e>>=0,e>>>=0,r||U(t,e,this.length);let n=this[t],i=1,o=0;while(++o>>=0,e>>>=0,r||U(t,e,this.length);let n=this[t+--e],i=1;while(e>0&&(i*=256))n+=this[t+--e]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(t,e){return t>>>=0,e||U(t,1,this.length),this[t]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(t,e){return t>>>=0,e||U(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(t,e){return t>>>=0,e||U(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(t,e){return t>>>=0,e||U(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(t,e){return t>>>=0,e||U(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readBigUInt64LE=ct((function(t){t>>>=0,X(t,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||Q(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,X(t,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||Q(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<>>=0,e>>>=0,r||U(t,e,this.length);let n=this[t],i=1,o=0;while(++o=i&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||U(t,e,this.length);let n=e,i=1,o=this[t+--n];while(n>0&&(i*=256))o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},c.prototype.readInt8=function(t,e){return t>>>=0,e||U(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){t>>>=0,e||U(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){t>>>=0,e||U(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return t>>>=0,e||U(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return t>>>=0,e||U(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readBigInt64LE=ct((function(t){t>>>=0,X(t,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||Q(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<>>=0,X(t,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||Q(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<>>=0,e||U(t,4,this.length),o.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return t>>>=0,e||U(t,4,this.length),o.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return t>>>=0,e||U(t,8,this.length),o.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return t>>>=0,e||U(t,8,this.length),o.read(this,t,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){const n=Math.pow(2,8*r)-1;D(this,t,e,r,n,0)}let i=1,o=0;this[e]=255&t;while(++o>>=0,r>>>=0,!n){const n=Math.pow(2,8*r)-1;D(this,t,e,r,n,0)}let i=r-1,o=1;this[e+i]=255&t;while(--i>=0&&(o*=256))this[e+i]=t/o&255;return e+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,1,255,0),this[e]=255&t,e+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigUInt64LE=ct((function(t,e=0){return F(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=ct((function(t,e=0){return K(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);D(this,t,e,r,n-1,-n)}let i=0,o=1,u=0;this[e]=255&t;while(++i>0)-u&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);D(this,t,e,r,n-1,-n)}let i=r-1,o=1,u=0;this[e+i]=255&t;while(--i>=0&&(o*=256))t<0&&0===u&&0!==this[e+i+1]&&(u=1),this[e+i]=(t/o>>0)-u&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigInt64LE=ct((function(t,e=0){return F(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=ct((function(t,e=0){return K(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(t,e,r){return W(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return W(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return V(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return V(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,n){if(!c.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"===typeof t)for(i=e;i=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function Y(t,e,r){X(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||Q(e,t.length-(r+1))}function J(t,e,r,n,i,o){if(t>r||t3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new $.ERR_OUT_OF_RANGE("value",i,t)}Y(n,i,o)}function X(t,e){if("number"!==typeof t)throw new $.ERR_INVALID_ARG_TYPE(e,"number",t)}function Q(t,e,r){if(Math.floor(t)!==t)throw X(t,r),new $.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new $.ERR_BUFFER_OUT_OF_BOUNDS;throw new $.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}G("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),G("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),G("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=Z(String(r)):"bigint"===typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Z(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);const tt=/[^+/0-9A-Za-z-_]/g;function et(t){if(t=t.split("=")[0],t=t.trim().replace(tt,""),t.length<2)return"";while(t.length%4!==0)t+="=";return t}function rt(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let u=0;u55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function nt(t){const e=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n)}return o}function ot(t){return i.toByteArray(et(t))}function ut(t,e,r,n){let i;for(i=0;i=e.length||i>=t.length)break;e[i+r]=t[i]}return i}function at(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function st(t){return t!==t}const ft=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function ct(t){return"undefined"===typeof BigInt?ht:t}function ht(){throw new Error("BigInt not supported")}},4875:function(t,e,r){"use strict";var n=r(1107),i=r(9195),o=i(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"===typeof r&&o(t,".prototype.")>-1?i(r):r}},9195:function(t,e,r){"use strict";var n=r(3574),i=r(1107),o=i("%Function.prototype.apply%"),u=i("%Function.prototype.call%"),a=i("%Reflect.apply%",!0)||n.call(u,o),s=i("%Object.getOwnPropertyDescriptor%",!0),f=i("%Object.defineProperty%",!0),c=i("%Math.max%");if(f)try{f({},"a",{value:1})}catch(l){f=null}t.exports=function(t){var e=a(n,u,arguments);if(s&&f){var r=s(e,"length");r.configurable&&f(e,"length",{value:1+c(0,t.length-(arguments.length-1))})}return e};var h=function(){return a(n,o,arguments)};f?f(t.exports,"apply",{value:h}):t.exports.apply=h},6363:function(t,e,r){r(7658);var n=r(7186).Buffer,i=r(8201).Transform,o=r(8032).s,u=r(2068);function a(t){i.call(this),this.hashMode="string"===typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}u(a,i),a.prototype.update=function(t,e,r){"string"===typeof t&&(t=n.from(t,e));var i=this._update(t);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(i){n=i}finally{r(n)}},a.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(r){e=r}t(e)},a.prototype._finalOrDigest=function(t){var e=this.__final()||n.alloc(0);return t&&(e=this._toString(e,t,!0)),e},a.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n},t.exports=a},2409:function(t,e,r){var n=r(9162),i=r(4108);function o(){return(new Date).getTime()}var u,a=Array.prototype.slice,s={};u="undefined"!==typeof r.g&&r.g.console?r.g.console:"undefined"!==typeof window&&window.console?window.console:{};for(var f=[[p,"log"],[b,"info"],[g,"warn"],[m,"error"],[y,"time"],[v,"timeEnd"],[w,"trace"],[_,"dir"],[M,"assert"]],c=0;c2?arguments[2]:{},o=n(e);i&&(o=u.call(o,Object.getOwnPropertySymbols(e)));for(var a=0;a0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function f(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=s,s.prototype.point=function(){throw new Error("Not implemented")},s.prototype.validate=function(){throw new Error("Not implemented")},s.prototype._fixedNafMul=function(t,e){a(t.precomputed);var r=t._getDoubles(),n=o(e,1,this._bitLength),i=(1<=u;c--)s=(s<<1)+n[c];f.push(s)}for(var h=this.jpoint(null,null,null),l=this.jpoint(null,null,null),d=i;d>0;d--){for(u=0;u=0;f--){for(var c=0;f>=0&&0===u[f];f--)c++;if(f>=0&&c++,s=s.dblp(c),f<0)break;var h=u[f];a(0!==h),s="affine"===t.type?h>0?s.mixedAdd(i[h-1>>1]):s.mixedAdd(i[-h-1>>1].neg()):h>0?s.add(i[h-1>>1]):s.add(i[-h-1>>1].neg())}return"affine"===t.type?s.toP():s},s.prototype._wnafMulAdd=function(t,e,r,n,i){var a,s,f,c=this._wnafT1,h=this._wnafT2,l=this._wnafT3,d=0;for(a=0;a=1;a-=2){var b=a-1,g=a;if(1===c[b]&&1===c[g]){var m=[e[b],null,null,e[g]];0===e[b].y.cmp(e[g].y)?(m[1]=e[b].add(e[g]),m[2]=e[b].toJ().mixedAdd(e[g].neg())):0===e[b].y.cmp(e[g].y.redNeg())?(m[1]=e[b].toJ().mixedAdd(e[g]),m[2]=e[b].add(e[g].neg())):(m[1]=e[b].toJ().mixedAdd(e[g]),m[2]=e[b].toJ().mixedAdd(e[g].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],v=u(r[b],r[g]);for(d=Math.max(v[0].length,d),l[b]=new Array(d),l[g]=new Array(d),s=0;s=0;a--){var A=0;while(a>=0){var E=!0;for(s=0;s=0&&A++,M=M.dblp(A),a<0)break;for(s=0;s0?f=h[s][k-1>>1]:k<0&&(f=h[s][-k-1>>1].neg()),M="affine"===f.type?M.mixedAdd(f):M.add(f))}}for(a=0;a=Math.ceil((t.bitLength()+1)/e.step)},f.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i":""},f.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},f.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=n.redAdd(e),u=o.redSub(r),a=n.redSub(e),s=i.redMul(u),f=o.redMul(a),c=i.redMul(a),h=u.redMul(o);return this.curve.point(s,f,h,c)},f.prototype._projDbl=function(){var t,e,r,n,i,o,u=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),s=this.y.redSqr();if(this.curve.twisted){n=this.curve._mulA(a);var f=n.redAdd(s);this.zOne?(t=u.redSub(a).redSub(s).redMul(f.redSub(this.curve.two)),e=f.redMul(n.redSub(s)),r=f.redSqr().redSub(f).redSub(f)):(i=this.z.redSqr(),o=f.redSub(i).redISub(i),t=u.redSub(a).redISub(s).redMul(o),e=f.redMul(n.redSub(s)),r=f.redMul(o))}else n=a.redAdd(s),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),t=this.curve._mulC(u.redISub(n)).redMul(o),e=this.curve._mulC(n).redMul(a.redISub(s)),r=n.redMul(o);return this.curve.point(t,e,r)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},f.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(e),u=i.redSub(n),a=i.redAdd(n),s=r.redAdd(e),f=o.redMul(u),c=a.redMul(s),h=o.redMul(s),l=u.redMul(a);return this.curve.point(f,c,l,h)},f.prototype._projAdd=function(t){var e,r,n=this.z.redMul(t.z),i=n.redSqr(),o=this.x.redMul(t.x),u=this.y.redMul(t.y),a=this.curve.d.redMul(o).redMul(u),s=i.redSub(a),f=i.redAdd(a),c=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(u),h=n.redMul(s).redMul(c);return this.curve.twisted?(e=n.redMul(f).redMul(u.redSub(this.curve._mulA(o))),r=s.redMul(f)):(e=n.redMul(f).redMul(u.redSub(o)),r=this.curve._mulC(s).redMul(f)),this.curve.point(h,e,r)},f.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},f.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},f.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},f.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},f.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},f.prototype.getY=function(){return this.normalize(),this.y.fromRed()},f.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},f.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(n),0===this.x.cmp(e))return!0}},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.prototype.add},1955:function(t,e,r){"use strict";var n=e;n.base=r(96),n.short=r(7855),n.mont=r(281),n.edwards=r(5464)},281:function(t,e,r){"use strict";r(7658);var n=r(1979),i=r(2068),o=r(96),u=r(7971);function a(t){o.call(this,"mont",t),this.a=new n(t.a,16).toRed(this.red),this.b=new n(t.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(t,e,r){o.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(e,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(a,o),t.exports=a,a.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),n=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e),i=n.redSqrt();return 0===i.redSqr().cmp(n)},i(s,o.BasePoint),a.prototype.decodePoint=function(t,e){return this.point(u.toArray(t,e),1)},a.prototype.point=function(t,e){return new s(this,t,e)},a.prototype.pointFromJSON=function(t){return s.fromJSON(this,t)},s.prototype.precompute=function(){},s.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},s.fromJSON=function(t,e){return new s(t,e[0],e[1]||t.one)},s.prototype.inspect=function(){return this.isInfinity()?"":""},s.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},s.prototype.dbl=function(){var t=this.x.redAdd(this.z),e=t.redSqr(),r=this.x.redSub(this.z),n=r.redSqr(),i=e.redSub(n),o=e.redMul(n),u=i.redMul(n.redAdd(this.curve.a24.redMul(i)));return this.curve.point(o,u)},s.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=t.x.redAdd(t.z),o=t.x.redSub(t.z),u=o.redMul(r),a=i.redMul(n),s=e.z.redMul(u.redAdd(a).redSqr()),f=e.x.redMul(u.redISub(a).redSqr());return this.curve.point(s,f)},s.prototype.mul=function(t){for(var e=t.clone(),r=this,n=this.curve.point(null,null),i=this,o=[];0!==e.cmpn(0);e.iushrn(1))o.push(e.andln(1));for(var u=o.length-1;u>=0;u--)0===o[u]?(r=r.diffAdd(n,i),n=n.dbl()):(n=r.diffAdd(n,i),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(t){return 0===this.getX().cmp(t.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()}},7855:function(t,e,r){"use strict";var n=r(7971),i=r(1979),o=r(2068),u=r(96),a=n.assert;function s(t){u.call(this,"short",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.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(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function f(t,e,r,n){u.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(e,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 c(t,e,r,n){u.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(e,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,u),t.exports=s,s.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r,n;if(t.beta)e=new i(t.beta,16).toRed(this.red);else{var o=this._getEndoRoots(this.p);e=o[0].cmp(o[1])<0?o[0]:o[1],e=e.toRed(this.red)}if(t.lambda)r=new i(t.lambda,16);else{var u=this._getEndoRoots(this.n);0===this.g.mul(u[0]).x.cmp(this.g.x.redMul(e))?r=u[0]:(r=u[1],a(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return n=t.basis?t.basis.map((function(t){return{a:new i(t.a,16),b:new i(t.b,16)}})):this._getEndoBasis(r),{beta:e,lambda:r,basis:n}}},s.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i.mont(t),r=new i(2).toRed(e).redInvm(),n=r.redNeg(),o=new i(3).toRed(e).redNeg().redSqrt().redMul(r),u=n.redAdd(o).fromRed(),a=n.redSub(o).fromRed();return[u,a]},s.prototype._getEndoBasis=function(t){var e,r,n,o,u,a,s,f,c,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=t,d=this.n.clone(),p=new i(1),b=new i(0),g=new i(0),m=new i(1),y=0;while(0!==l.cmpn(0)){var v=d.div(l);f=d.sub(v.mul(l)),c=g.sub(v.mul(p));var w=m.sub(v.mul(b));if(!n&&f.cmp(h)<0)e=s.neg(),r=p,n=f.neg(),o=c;else if(n&&2===++y)break;s=f,d=l,l=f,g=p,p=c,m=b,b=w}u=f.neg(),a=c;var _=n.sqr().add(o.sqr()),M=u.sqr().add(a.sqr());return M.cmp(_)>=0&&(u=e,a=r),n.negative&&(n=n.neg(),o=o.neg()),u.negative&&(u=u.neg(),a=a.neg()),[{a:n,b:o},{a:u,b:a}]},s.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),u=i.mul(r.a),a=o.mul(n.a),s=i.mul(r.b),f=o.mul(n.b),c=t.sub(u).sub(a),h=s.add(f).neg();return{k1:c,k2:h}},s.prototype.pointFromX=function(t,e){t=new i(t,16),t.red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.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(e&&!o||!e&&o)&&(n=n.redNeg()),this.point(t,n)},s.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},s.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},f.prototype.isInfinity=function(){return this.inf},f.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},f.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),u=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,u)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(t){return t=new i(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},f.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},f.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},f.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},f.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.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 e},f.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var t=this.curve.jpoint(this.x,this.y,this.curve.one);return t},o(c,u.BasePoint),s.prototype.jpoint=function(t,e,r){return new c(this,t,e,r)},c.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},c.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},c.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),u=t.y.redMul(r.redMul(this.z)),a=n.redSub(i),s=o.redSub(u);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=a.redSqr(),c=f.redMul(a),h=n.redMul(f),l=s.redSqr().redIAdd(c).redISub(h).redISub(h),d=s.redMul(h.redISub(l)).redISub(o.redMul(c)),p=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(l,d,p)},c.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),u=r.redSub(n),a=i.redSub(o);if(0===u.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var s=u.redSqr(),f=s.redMul(u),c=r.redMul(s),h=a.redSqr().redIAdd(f).redISub(c).redISub(c),l=a.redMul(c.redISub(h)).redISub(i.redMul(f)),d=this.z.redMul(u);return this.curve.jpoint(h,l,d)},c.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},8387:function(t,e,r){"use strict";var n,i=e,o=r(807),u=r(1955),a=r(7971),s=a.assert;function f(t){"short"===t.type?this.curve=new u.short(t):"edwards"===t.type?this.curve=new u.edwards(t):this.curve=new u.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new f(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=f,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(3489)}catch(h){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]})},755:function(t,e,r){"use strict";var n=r(1979),i=r(5312),o=r(7971),u=r(8387),a=r(2675),s=o.assert,f=r(2023),c=r(5684);function h(t){if(!(this instanceof h))return new h(t);"string"===typeof t&&(s(Object.prototype.hasOwnProperty.call(u,t),"Unknown curve "+t),t=u[t]),t instanceof u.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=h,h.prototype.keyPair=function(t){return new f(this,t)},h.prototype.keyFromPrivate=function(t,e){return f.fromPrivate(this,t,e)},h.prototype.keyFromPublic=function(t,e){return f.fromPublic(this,t,e)},h.prototype.genKeyPair=function(t){t||(t={});for(var e=new i({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||a(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var u=new n(e.generate(r));if(!(u.cmp(o)>0))return u.iaddn(1),this.keyFromPrivate(u)}},h.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},h.prototype.sign=function(t,e,r,o){"object"===typeof r&&(o=r,r=null),o||(o={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new n(t,16));for(var u=this.n.byteLength(),a=e.getPrivate().toArray("be",u),s=t.toArray("be",u),f=new i({hash:this.hash,entropy:a,nonce:s,pers:o.pers,persEnc:o.persEnc||"utf8"}),h=this.n.sub(new n(1)),l=0;;l++){var d=o.k?o.k(l):new n(f.generate(this.n.byteLength()));if(d=this._truncateToN(d,!0),!(d.cmpn(1)<=0||d.cmp(h)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var b=p.getX(),g=b.umod(this.n);if(0!==g.cmpn(0)){var m=d.invm(this.n).mul(g.mul(e.getPrivate()).iadd(t));if(m=m.umod(this.n),0!==m.cmpn(0)){var y=(p.getY().isOdd()?1:0)|(0!==b.cmp(g)?2:0);return o.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),y^=1),new c({r:g,s:m,recoveryParam:y})}}}}}},h.prototype.verify=function(t,e,r,i){t=this._truncateToN(new n(t,16)),r=this.keyFromPublic(r,i),e=new c(e,"hex");var o=e.r,u=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(u.cmpn(1)<0||u.cmp(this.n)>=0)return!1;var a,s=u.invm(this.n),f=s.mul(t).umod(this.n),h=s.mul(o).umod(this.n);return this.curve._maxwellTrick?(a=this.g.jmulAdd(f,r.getPublic(),h),!a.isInfinity()&&a.eqXToP(o)):(a=this.g.mulAdd(f,r.getPublic(),h),!a.isInfinity()&&0===a.getX().umod(this.n).cmp(o))},h.prototype.recoverPubKey=function(t,e,r,i){s((3&r)===r,"The recovery param is more than two bits"),e=new c(e,i);var o=this.n,u=new n(t),a=e.r,f=e.s,h=1&r,l=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");a=l?this.curve.pointFromX(a.add(this.curve.n),h):this.curve.pointFromX(a,h);var d=e.r.invm(o),p=o.sub(u).mul(d).umod(o),b=f.mul(d).umod(o);return this.g.mulAdd(p,a,b)},h.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new c(e,n),null!==e.recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},2023:function(t,e,r){"use strict";var n=r(1979),i=r(7971),o=i.assert;function u(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=u,u.fromPublic=function(t,e,r){return e instanceof u?e:new u(t,{pub:e,pubEnc:r})},u.fromPrivate=function(t,e,r){return e instanceof u?e:new u(t,{priv:e,privEnc:r})},u.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.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"}},u.prototype.getPublic=function(t,e){return"string"===typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},u.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},u.prototype._importPrivate=function(t,e){this.priv=new n(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},u.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?o(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||o(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},u.prototype.derive=function(t){return t.validate()||o(t.validate(),"public point not validated"),t.mul(this.priv).getX()},u.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},u.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},u.prototype.inspect=function(){return""}},5684:function(t,e,r){"use strict";r(7658);var n=r(1979),i=r(7971),o=i.assert;function u(t,e){if(t instanceof u)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new n(t.r,16),this.s=new n(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function a(){this.place=0}function s(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,u=e.place;o>>=0;return!(i<=127)&&(e.place=u,i)}function f(t){var e=0,r=t.length-1;while(!t[e]&&!(128&t[e+1])&&e>>3);t.push(128|r);while(--r)t.push(e>>>(r<<3)&255);t.push(e)}}t.exports=u,u.prototype._importDER=function(t,e){t=i.toArray(t,e);var r=new a;if(48!==t[r.place++])return!1;var o=s(t,r);if(!1===o)return!1;if(o+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var u=s(t,r);if(!1===u)return!1;var f=t.slice(r.place,u+r.place);if(r.place+=u,2!==t[r.place++])return!1;var c=s(t,r);if(!1===c)return!1;if(t.length!==c+r.place)return!1;var h=t.slice(r.place,c+r.place);if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}return this.r=new n(f),this.s=new n(h),this.recoveryParam=null,!0},u.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=f(e),r=f(r);while(!r[0]&&!(128&r[1]))r=r.slice(1);var n=[2];c(n,e.length),n=n.concat(e),n.push(2),c(n,r.length);var o=n.concat(r),u=[48];return c(u,o.length),u=u.concat(o),i.encode(u,t)}},735:function(t,e,r){"use strict";var n=r(807),i=r(8387),o=r(7971),u=o.assert,a=o.parseBytes,s=r(371),f=r(6226);function c(t){if(u("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof c))return new c(t);t=i[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=n.sha512}t.exports=c,c.prototype.sign=function(t,e){t=a(t);var r=this.keyFromSecret(e),n=this.hashInt(r.messagePrefix(),t),i=this.g.mul(n),o=this.encodePoint(i),u=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),s=n.add(u).umod(this.curve.n);return this.makeSignature({R:i,S:s,Rencoded:o})},c.prototype.verify=function(t,e,r){t=a(t),e=this.makeSignature(e);var n=this.keyFromPublic(r),i=this.hashInt(e.Rencoded(),n.pubBytes(),t),o=this.g.mul(e.S()),u=e.R().add(n.pub().mul(i));return u.eq(o)},c.prototype.hashInt=function(){for(var t=this.hash(),e=0;e(i>>1)-1?(i>>1)-s:s,o.isubn(a)):a=0,n[u]=a,o.iushrn(1)}return n}function s(t,e){var r=[[],[]];t=t.clone(),e=e.clone();var n,i=0,o=0;while(t.cmpn(-i)>0||e.cmpn(-o)>0){var u,a,s=t.andln(3)+i&3,f=e.andln(3)+o&3;3===s&&(s=-1),3===f&&(f=-1),0===(1&s)?u=0:(n=t.andln(7)+i&7,u=3!==n&&5!==n||2!==f?s:-s),r[0].push(u),0===(1&f)?a=0:(n=e.andln(7)+o&7,a=3!==n&&5!==n||2!==s?f:-f),r[1].push(a),2*i===u+1&&(i=1-i),2*o===a+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return r}function f(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}}function c(t){return"string"===typeof t?n.toArray(t,"hex"):t}function h(t){return new i(t,"hex","le")}n.assert=o,n.toArray=u.toArray,n.zero2=u.zero2,n.toHex=u.toHex,n.encode=u.encode,n.getNAF=a,n.getJSF=s,n.cachedProperty=f,n.parseBytes=c,n.intFromLE=h},1979:function(t,e,r){t=r.nmd(t),function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var u;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{u="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(5568).Buffer}catch(x){}function a(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function s(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function f(t,e,r,n){for(var i=0,o=Math.min(t.length,r),u=e;u=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36),t=t.toString().replace(/\s+/g,"");var i=0;"-"===t[0]&&(i++,this.negative=1),i=0;i-=3)u=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=u<>>26-a&67108863,a+=24,a>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,a+=24,a>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=s(t,e,n)<=18?(o-=18,u+=1,this.words[u]|=i>>>26):o+=8;else{var a=t.length-e;for(n=a%2===0?e+1:e;n=18?(o-=18,u+=1,this.words[u]|=i>>>26):o+=8}this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,u=o%n,a=Math.min(o,o-u)+r,s=0,c=r;c1&&0===this.words[this.length-1])this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}function p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],u=i*o,a=67108863&u,s=u/67108864|0;r.words[0]=a;for(var f=1;f>>26,h=67108863&s,l=Math.min(f,e.length-1),d=Math.max(0,f-t.length+1);d<=l;d++){var p=f-d|0;i=0|t.words[p],o=0|e.words[d],u=i*o+h,c+=u/67108864|0,h=67108863&u}r.words[f]=0|h,s=0|c}return 0!==s?r.words[f]=0|s:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(t=t||10,e=0|e||1,16===t||"hex"===t){r="";for(var i=0,o=0,u=0;u>>24-i&16777215,r=0!==o||u!==this.length-1?c[6-s.length]+s+r:s+r,i+=2,i>=26&&(i-=26,u--)}0!==o&&(r=o.toString(16)+r);while(r.length%e!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var f=h[t],d=l[t];r="";var p=this.clone();p.negative=0;while(!p.isZero()){var b=p.modn(d).toString(t);p=p.idivn(d),r=p.isZero()?b+r:c[f-b.length]+b+r}this.isZero()&&(r="0"+r);while(r.length%e!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n("undefined"!==typeof u),this.toArrayLike(u,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var u,a,s="le"===e,f=new t(o),c=this.clone();if(s){for(a=0;!c.isZero();a++)u=c.andln(255),c.iushrn(8),f[a]=u;for(;a=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,u=0;u>26,this.words[u]=67108863&e;for(;0!==o&&u>26,this.words[u]=67108863&e;if(0===o&&u>>13,d=0|u[1],p=8191&d,b=d>>>13,g=0|u[2],m=8191&g,y=g>>>13,v=0|u[3],w=8191&v,_=v>>>13,M=0|u[4],S=8191&M,A=M>>>13,E=0|u[5],k=8191&E,x=E>>>13,O=0|u[6],I=8191&O,R=O>>>13,j=0|u[7],B=8191&j,P=j>>>13,T=0|u[8],z=8191&T,N=T>>>13,L=0|u[9],C=8191&L,q=L>>>13,U=0|a[0],D=8191&U,F=U>>>13,K=0|a[1],H=8191&K,W=K>>>13,V=0|a[2],$=8191&V,G=V>>>13,Z=0|a[3],Y=8191&Z,J=Z>>>13,X=0|a[4],Q=8191&X,tt=X>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,ut=it>>>13,at=0|a[7],st=8191&at,ft=at>>>13,ct=0|a[8],ht=8191&ct,lt=ct>>>13,dt=0|a[9],pt=8191&dt,bt=dt>>>13;r.negative=t.negative^e.negative,r.length=19,n=Math.imul(h,D),i=Math.imul(h,F),i=i+Math.imul(l,D)|0,o=Math.imul(l,F);var gt=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,D),i=Math.imul(p,F),i=i+Math.imul(b,D)|0,o=Math.imul(b,F),n=n+Math.imul(h,H)|0,i=i+Math.imul(h,W)|0,i=i+Math.imul(l,H)|0,o=o+Math.imul(l,W)|0;var mt=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,D),i=Math.imul(m,F),i=i+Math.imul(y,D)|0,o=Math.imul(y,F),n=n+Math.imul(p,H)|0,i=i+Math.imul(p,W)|0,i=i+Math.imul(b,H)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(h,$)|0,i=i+Math.imul(h,G)|0,i=i+Math.imul(l,$)|0,o=o+Math.imul(l,G)|0;var yt=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(w,D),i=Math.imul(w,F),i=i+Math.imul(_,D)|0,o=Math.imul(_,F),n=n+Math.imul(m,H)|0,i=i+Math.imul(m,W)|0,i=i+Math.imul(y,H)|0,o=o+Math.imul(y,W)|0,n=n+Math.imul(p,$)|0,i=i+Math.imul(p,G)|0,i=i+Math.imul(b,$)|0,o=o+Math.imul(b,G)|0,n=n+Math.imul(h,Y)|0,i=i+Math.imul(h,J)|0,i=i+Math.imul(l,Y)|0,o=o+Math.imul(l,J)|0;var vt=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(S,D),i=Math.imul(S,F),i=i+Math.imul(A,D)|0,o=Math.imul(A,F),n=n+Math.imul(w,H)|0,i=i+Math.imul(w,W)|0,i=i+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(m,$)|0,i=i+Math.imul(m,G)|0,i=i+Math.imul(y,$)|0,o=o+Math.imul(y,G)|0,n=n+Math.imul(p,Y)|0,i=i+Math.imul(p,J)|0,i=i+Math.imul(b,Y)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(h,Q)|0,i=i+Math.imul(h,tt)|0,i=i+Math.imul(l,Q)|0,o=o+Math.imul(l,tt)|0;var wt=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(k,D),i=Math.imul(k,F),i=i+Math.imul(x,D)|0,o=Math.imul(x,F),n=n+Math.imul(S,H)|0,i=i+Math.imul(S,W)|0,i=i+Math.imul(A,H)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(w,$)|0,i=i+Math.imul(w,G)|0,i=i+Math.imul(_,$)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(m,Y)|0,i=i+Math.imul(m,J)|0,i=i+Math.imul(y,Y)|0,o=o+Math.imul(y,J)|0,n=n+Math.imul(p,Q)|0,i=i+Math.imul(p,tt)|0,i=i+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(h,rt)|0,i=i+Math.imul(h,nt)|0,i=i+Math.imul(l,rt)|0,o=o+Math.imul(l,nt)|0;var _t=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(I,D),i=Math.imul(I,F),i=i+Math.imul(R,D)|0,o=Math.imul(R,F),n=n+Math.imul(k,H)|0,i=i+Math.imul(k,W)|0,i=i+Math.imul(x,H)|0,o=o+Math.imul(x,W)|0,n=n+Math.imul(S,$)|0,i=i+Math.imul(S,G)|0,i=i+Math.imul(A,$)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(w,Y)|0,i=i+Math.imul(w,J)|0,i=i+Math.imul(_,Y)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(m,Q)|0,i=i+Math.imul(m,tt)|0,i=i+Math.imul(y,Q)|0,o=o+Math.imul(y,tt)|0,n=n+Math.imul(p,rt)|0,i=i+Math.imul(p,nt)|0,i=i+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(h,ot)|0,i=i+Math.imul(h,ut)|0,i=i+Math.imul(l,ot)|0,o=o+Math.imul(l,ut)|0;var Mt=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(B,D),i=Math.imul(B,F),i=i+Math.imul(P,D)|0,o=Math.imul(P,F),n=n+Math.imul(I,H)|0,i=i+Math.imul(I,W)|0,i=i+Math.imul(R,H)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(k,$)|0,i=i+Math.imul(k,G)|0,i=i+Math.imul(x,$)|0,o=o+Math.imul(x,G)|0,n=n+Math.imul(S,Y)|0,i=i+Math.imul(S,J)|0,i=i+Math.imul(A,Y)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,Q)|0,i=i+Math.imul(w,tt)|0,i=i+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(m,rt)|0,i=i+Math.imul(m,nt)|0,i=i+Math.imul(y,rt)|0,o=o+Math.imul(y,nt)|0,n=n+Math.imul(p,ot)|0,i=i+Math.imul(p,ut)|0,i=i+Math.imul(b,ot)|0,o=o+Math.imul(b,ut)|0,n=n+Math.imul(h,st)|0,i=i+Math.imul(h,ft)|0,i=i+Math.imul(l,st)|0,o=o+Math.imul(l,ft)|0;var St=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(z,D),i=Math.imul(z,F),i=i+Math.imul(N,D)|0,o=Math.imul(N,F),n=n+Math.imul(B,H)|0,i=i+Math.imul(B,W)|0,i=i+Math.imul(P,H)|0,o=o+Math.imul(P,W)|0,n=n+Math.imul(I,$)|0,i=i+Math.imul(I,G)|0,i=i+Math.imul(R,$)|0,o=o+Math.imul(R,G)|0,n=n+Math.imul(k,Y)|0,i=i+Math.imul(k,J)|0,i=i+Math.imul(x,Y)|0,o=o+Math.imul(x,J)|0,n=n+Math.imul(S,Q)|0,i=i+Math.imul(S,tt)|0,i=i+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(w,rt)|0,i=i+Math.imul(w,nt)|0,i=i+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(m,ot)|0,i=i+Math.imul(m,ut)|0,i=i+Math.imul(y,ot)|0,o=o+Math.imul(y,ut)|0,n=n+Math.imul(p,st)|0,i=i+Math.imul(p,ft)|0,i=i+Math.imul(b,st)|0,o=o+Math.imul(b,ft)|0,n=n+Math.imul(h,ht)|0,i=i+Math.imul(h,lt)|0,i=i+Math.imul(l,ht)|0,o=o+Math.imul(l,lt)|0;var At=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(C,D),i=Math.imul(C,F),i=i+Math.imul(q,D)|0,o=Math.imul(q,F),n=n+Math.imul(z,H)|0,i=i+Math.imul(z,W)|0,i=i+Math.imul(N,H)|0,o=o+Math.imul(N,W)|0,n=n+Math.imul(B,$)|0,i=i+Math.imul(B,G)|0,i=i+Math.imul(P,$)|0,o=o+Math.imul(P,G)|0,n=n+Math.imul(I,Y)|0,i=i+Math.imul(I,J)|0,i=i+Math.imul(R,Y)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(k,Q)|0,i=i+Math.imul(k,tt)|0,i=i+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(S,rt)|0,i=i+Math.imul(S,nt)|0,i=i+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(w,ot)|0,i=i+Math.imul(w,ut)|0,i=i+Math.imul(_,ot)|0,o=o+Math.imul(_,ut)|0,n=n+Math.imul(m,st)|0,i=i+Math.imul(m,ft)|0,i=i+Math.imul(y,st)|0,o=o+Math.imul(y,ft)|0,n=n+Math.imul(p,ht)|0,i=i+Math.imul(p,lt)|0,i=i+Math.imul(b,ht)|0,o=o+Math.imul(b,lt)|0,n=n+Math.imul(h,pt)|0,i=i+Math.imul(h,bt)|0,i=i+Math.imul(l,pt)|0,o=o+Math.imul(l,bt)|0;var Et=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(C,H),i=Math.imul(C,W),i=i+Math.imul(q,H)|0,o=Math.imul(q,W),n=n+Math.imul(z,$)|0,i=i+Math.imul(z,G)|0,i=i+Math.imul(N,$)|0,o=o+Math.imul(N,G)|0,n=n+Math.imul(B,Y)|0,i=i+Math.imul(B,J)|0,i=i+Math.imul(P,Y)|0,o=o+Math.imul(P,J)|0,n=n+Math.imul(I,Q)|0,i=i+Math.imul(I,tt)|0,i=i+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(k,rt)|0,i=i+Math.imul(k,nt)|0,i=i+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(S,ot)|0,i=i+Math.imul(S,ut)|0,i=i+Math.imul(A,ot)|0,o=o+Math.imul(A,ut)|0,n=n+Math.imul(w,st)|0,i=i+Math.imul(w,ft)|0,i=i+Math.imul(_,st)|0,o=o+Math.imul(_,ft)|0,n=n+Math.imul(m,ht)|0,i=i+Math.imul(m,lt)|0,i=i+Math.imul(y,ht)|0,o=o+Math.imul(y,lt)|0,n=n+Math.imul(p,pt)|0,i=i+Math.imul(p,bt)|0,i=i+Math.imul(b,pt)|0,o=o+Math.imul(b,bt)|0;var kt=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(C,$),i=Math.imul(C,G),i=i+Math.imul(q,$)|0,o=Math.imul(q,G),n=n+Math.imul(z,Y)|0,i=i+Math.imul(z,J)|0,i=i+Math.imul(N,Y)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(B,Q)|0,i=i+Math.imul(B,tt)|0,i=i+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(I,rt)|0,i=i+Math.imul(I,nt)|0,i=i+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(k,ot)|0,i=i+Math.imul(k,ut)|0,i=i+Math.imul(x,ot)|0,o=o+Math.imul(x,ut)|0,n=n+Math.imul(S,st)|0,i=i+Math.imul(S,ft)|0,i=i+Math.imul(A,st)|0,o=o+Math.imul(A,ft)|0,n=n+Math.imul(w,ht)|0,i=i+Math.imul(w,lt)|0,i=i+Math.imul(_,ht)|0,o=o+Math.imul(_,lt)|0,n=n+Math.imul(m,pt)|0,i=i+Math.imul(m,bt)|0,i=i+Math.imul(y,pt)|0,o=o+Math.imul(y,bt)|0;var xt=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(C,Y),i=Math.imul(C,J),i=i+Math.imul(q,Y)|0,o=Math.imul(q,J),n=n+Math.imul(z,Q)|0,i=i+Math.imul(z,tt)|0,i=i+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,n=n+Math.imul(B,rt)|0,i=i+Math.imul(B,nt)|0,i=i+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(I,ot)|0,i=i+Math.imul(I,ut)|0,i=i+Math.imul(R,ot)|0,o=o+Math.imul(R,ut)|0,n=n+Math.imul(k,st)|0,i=i+Math.imul(k,ft)|0,i=i+Math.imul(x,st)|0,o=o+Math.imul(x,ft)|0,n=n+Math.imul(S,ht)|0,i=i+Math.imul(S,lt)|0,i=i+Math.imul(A,ht)|0,o=o+Math.imul(A,lt)|0,n=n+Math.imul(w,pt)|0,i=i+Math.imul(w,bt)|0,i=i+Math.imul(_,pt)|0,o=o+Math.imul(_,bt)|0;var Ot=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(C,Q),i=Math.imul(C,tt),i=i+Math.imul(q,Q)|0,o=Math.imul(q,tt),n=n+Math.imul(z,rt)|0,i=i+Math.imul(z,nt)|0,i=i+Math.imul(N,rt)|0,o=o+Math.imul(N,nt)|0,n=n+Math.imul(B,ot)|0,i=i+Math.imul(B,ut)|0,i=i+Math.imul(P,ot)|0,o=o+Math.imul(P,ut)|0,n=n+Math.imul(I,st)|0,i=i+Math.imul(I,ft)|0,i=i+Math.imul(R,st)|0,o=o+Math.imul(R,ft)|0,n=n+Math.imul(k,ht)|0,i=i+Math.imul(k,lt)|0,i=i+Math.imul(x,ht)|0,o=o+Math.imul(x,lt)|0,n=n+Math.imul(S,pt)|0,i=i+Math.imul(S,bt)|0,i=i+Math.imul(A,pt)|0,o=o+Math.imul(A,bt)|0;var It=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(C,rt),i=Math.imul(C,nt),i=i+Math.imul(q,rt)|0,o=Math.imul(q,nt),n=n+Math.imul(z,ot)|0,i=i+Math.imul(z,ut)|0,i=i+Math.imul(N,ot)|0,o=o+Math.imul(N,ut)|0,n=n+Math.imul(B,st)|0,i=i+Math.imul(B,ft)|0,i=i+Math.imul(P,st)|0,o=o+Math.imul(P,ft)|0,n=n+Math.imul(I,ht)|0,i=i+Math.imul(I,lt)|0,i=i+Math.imul(R,ht)|0,o=o+Math.imul(R,lt)|0,n=n+Math.imul(k,pt)|0,i=i+Math.imul(k,bt)|0,i=i+Math.imul(x,pt)|0,o=o+Math.imul(x,bt)|0;var Rt=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(C,ot),i=Math.imul(C,ut),i=i+Math.imul(q,ot)|0,o=Math.imul(q,ut),n=n+Math.imul(z,st)|0,i=i+Math.imul(z,ft)|0,i=i+Math.imul(N,st)|0,o=o+Math.imul(N,ft)|0,n=n+Math.imul(B,ht)|0,i=i+Math.imul(B,lt)|0,i=i+Math.imul(P,ht)|0,o=o+Math.imul(P,lt)|0,n=n+Math.imul(I,pt)|0,i=i+Math.imul(I,bt)|0,i=i+Math.imul(R,pt)|0,o=o+Math.imul(R,bt)|0;var jt=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,n=Math.imul(C,st),i=Math.imul(C,ft),i=i+Math.imul(q,st)|0,o=Math.imul(q,ft),n=n+Math.imul(z,ht)|0,i=i+Math.imul(z,lt)|0,i=i+Math.imul(N,ht)|0,o=o+Math.imul(N,lt)|0,n=n+Math.imul(B,pt)|0,i=i+Math.imul(B,bt)|0,i=i+Math.imul(P,pt)|0,o=o+Math.imul(P,bt)|0;var Bt=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(C,ht),i=Math.imul(C,lt),i=i+Math.imul(q,ht)|0,o=Math.imul(q,lt),n=n+Math.imul(z,pt)|0,i=i+Math.imul(z,bt)|0,i=i+Math.imul(N,pt)|0,o=o+Math.imul(N,bt)|0;var Pt=(f+n|0)+((8191&i)<<13)|0;f=(o+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(C,pt),i=Math.imul(C,bt),i=i+Math.imul(q,pt)|0,o=Math.imul(q,bt);var Tt=(f+n|0)+((8191&i)<<13)|0;return f=(o+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,s[0]=gt,s[1]=mt,s[2]=yt,s[3]=vt,s[4]=wt,s[5]=_t,s[6]=Mt,s[7]=St,s[8]=At,s[9]=Et,s[10]=kt,s[11]=xt,s[12]=Ot,s[13]=It,s[14]=Rt,s[15]=jt,s[16]=Bt,s[17]=Pt,s[18]=Tt,0!==f&&(s[19]=f,r.length++),r};function g(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0,i+=u>>>26,u&=67108863}r.words[o]=a,n=u,u=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}function m(t,e,r){var n=new y;return n.mulp(t,e,r)}function y(t,e){this.x=t,this.y=e}Math.imul||(b=p),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?b(this,t,e):n<63?p(this,t,e):n<1024?g(this,t,e):m(this,t,e),r},y.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},y.prototype.permute=function(t,e,r,n,i,o){for(var u=0;u>>=1)i++;return 1<>>=13,r[2*u+1]=8191&o,o>>>=13;for(u=2*e;u>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=d(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var u=0;for(e=0;e>>26-r}u&&(this.words[e]=u,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,u=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<u)for(this.length-=u,f=0;f=0&&(0!==c||f>=i);f--){var h=0|this.words[f];this.words[f]=c<<26-o|h>>>o,c=h&a}return s&&0!==c&&(s.words[s.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(s/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=this.length-t.length,n=this.clone(),i=t,u=0|i.words[i.length-1],a=this._countBits(u);r=26-a,0!==r&&(i=i.ushln(r),n.iushln(r),u=0|i.words[i.length-1]);var s,f=n.length-i.length;if("mod"!==e){s=new o(null),s.length=f+1,s.words=new Array(s.length);for(var c=0;c=0;l--){var d=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);d=Math.min(d/u|0,67108863),n._ishlnsubmul(i,d,l);while(0!==n.negative)d--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=d)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(u=a.mod.neg(),r&&0!==u.negative&&u.iadd(t)),{div:i,mod:u}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!==(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(u=a.mod.neg(),r&&0!==u.negative&&u.isub(t)),{div:a.div,mod:u}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,u,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();var i=new o(1),u=new o(0),a=new o(0),s=new o(1),f=0;while(e.isEven()&&r.isEven())e.iushrn(1),r.iushrn(1),++f;var c=r.clone(),h=e.clone();while(!e.isZero()){for(var l=0,d=1;0===(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0){e.iushrn(l);while(l-- >0)(i.isOdd()||u.isOdd())&&(i.iadd(c),u.isub(h)),i.iushrn(1),u.iushrn(1)}for(var p=0,b=1;0===(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0){r.iushrn(p);while(p-- >0)(a.isOdd()||s.isOdd())&&(a.iadd(c),s.isub(h)),a.iushrn(1),s.iushrn(1)}e.cmp(r)>=0?(e.isub(r),i.isub(a),u.isub(s)):(r.isub(e),a.isub(i),s.isub(u))}return{a:a,b:s,gcd:r.iushln(f)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();var i,u=new o(1),a=new o(0),s=r.clone();while(e.cmpn(1)>0&&r.cmpn(1)>0){for(var f=0,c=1;0===(e.words[0]&c)&&f<26;++f,c<<=1);if(f>0){e.iushrn(f);while(f-- >0)u.isOdd()&&u.iadd(s),u.iushrn(1)}for(var h=0,l=1;0===(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0){r.iushrn(h);while(h-- >0)a.isOdd()&&a.iadd(s),a.iushrn(1)}e.cmp(r)>=0?(e.isub(r),u.isub(a)):(r.isub(e),a.isub(u))}return i=0===e.cmpn(1)?u:a,i.cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);do{while(e.isEven())e.iushrn(1);while(r.isEven())r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}while(1);return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,a&=67108863,this.words[u]=a}return 0!==o&&(this.words[u]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new E(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),e=r.bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},i(_,w),_.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=u}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new M;else if("p192"===t)e=new S;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new A}return v[t]=e,e},E.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}var i=this.m.subn(1),u=0;while(!i.isZero()&&0===i.andln(1))u++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),s=a.redNeg(),f=this.m.subn(1).iushrn(1),c=this.m.bitLength();c=new o(2*c*c).toRed(this);while(0!==this.pow(c,f).cmp(s))c.redIAdd(s);var h=this.pow(c,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=u;while(0!==d.cmp(a)){for(var b=d,g=0;0!==b.cmp(a);g++)b=b.redSqr();n(g=0;i--){for(var c=e.words[i],h=f-1;h>=0;h--){var l=c>>h&1;u!==n[0]&&(u=this.sqr(u)),0!==l||0!==a?(a<<=1,a|=l,s++,(s===r||0===i&&0===h)&&(u=this.mul(u,n[a]),s=0,a=0)):s=0}f=26}return u},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new k(t)},i(k,E),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),u=i;return i.cmp(this.m)>=0?u=i.isub(this.m):i.cmpn(0)<0&&(u=i.iadd(this.m)),u._forceRed(this)},k.prototype.invm=function(t){var e=this.imod(t._invmp(this.m).mul(this.r2));return e._forceRed(this)}}(t,this)},8486:function(t){"use strict";function e(t,e){if(void 0===t||null===t)throw new TypeError("Cannot convert first argument to object");for(var r=Object(t),n=1;n0&&i[i.length-1])&&(6===o[0]||2===o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)&&!(n=o.next()).done)u.push(n.value)}catch(a){i={error:a}}finally{try{n&&!n.done&&(r=o["return"])&&r.call(o)}finally{if(i)throw i.error}}return u},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.isZeroAddress=e.zeroAddress=e.importPublic=e.privateToAddress=e.privateToPublic=e.publicToAddress=e.pubToAddress=e.isValidPublic=e.isValidPrivate=e.generateAddress2=e.generateAddress=e.isValidChecksumAddress=e.toChecksumAddress=e.isValidAddress=e.Account=void 0;var u=o(r(4108)),a=r(7),s=r(2098),f=r(5661),c=r(5472),h=r(1831),l=r(1285),d=r(8992),p=r(7335),b=function(){function t(t,e,r,n){void 0===t&&(t=new a.BN(0)),void 0===e&&(e=new a.BN(0)),void 0===r&&(r=c.KECCAK256_RLP),void 0===n&&(n=c.KECCAK256_NULL),this.nonce=t,this.balance=e,this.stateRoot=r,this.codeHash=n,this._validate()}return t.fromAccountData=function(e){var r=e.nonce,n=e.balance,i=e.stateRoot,o=e.codeHash;return new t(r?new a.BN((0,h.toBuffer)(r)):void 0,n?new a.BN((0,h.toBuffer)(n)):void 0,i?(0,h.toBuffer)(i):void 0,o?(0,h.toBuffer)(o):void 0)},t.fromRlpSerializedAccount=function(t){var e=a.rlp.decode(t);if(!Array.isArray(e))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(e)},t.fromValuesArray=function(e){var r=i(e,4),n=r[0],o=r[1],u=r[2],s=r[3];return new t(new a.BN(n),new a.BN(o),u,s)},t.prototype._validate=function(){if(this.nonce.lt(new a.BN(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new a.BN(0)))throw new Error("balance must be greater than zero");if(32!==this.stateRoot.length)throw new Error("stateRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")},t.prototype.raw=function(){return[(0,p.bnToUnpaddedBuffer)(this.nonce),(0,p.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]},t.prototype.serialize=function(){return a.rlp.encode(this.raw())},t.prototype.isContract=function(){return!this.codeHash.equals(c.KECCAK256_NULL)},t.prototype.isEmpty=function(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(c.KECCAK256_NULL)},t}();e.Account=b;var g=function(t){try{(0,d.assertIsString)(t)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(t)};e.isValidAddress=g;var m=function(t,e){(0,d.assertIsHexString)(t);var r=(0,f.stripHexPrefix)(t).toLowerCase(),n="";if(e){var i=(0,p.toType)(e,p.TypeOutput.BN);n=i.toString()+"0x"}for(var o=(0,l.keccakFromString)(n+r).toString("hex"),u="0x",a=0;a=8?u+=r[a].toUpperCase():u+=r[a];return u};e.toChecksumAddress=m;var y=function(t,r){return(0,e.isValidAddress)(t)&&(0,e.toChecksumAddress)(t,r)===t};e.isValidChecksumAddress=y;var v=function(t,e){(0,d.assertIsBuffer)(t),(0,d.assertIsBuffer)(e);var r=new a.BN(e);return r.isZero()?(0,l.rlphash)([t,null]).slice(-20):(0,l.rlphash)([t,n.from(r.toArray())]).slice(-20)};e.generateAddress=v;var w=function(t,e,r){(0,d.assertIsBuffer)(t),(0,d.assertIsBuffer)(e),(0,d.assertIsBuffer)(r),(0,u.default)(20===t.length),(0,u.default)(32===e.length);var i=(0,l.keccak256)(n.concat([n.from("ff","hex"),t,e,(0,l.keccak256)(r)]));return i.slice(-20)};e.generateAddress2=w;var _=function(t){return(0,s.privateKeyVerify)(t)};e.isValidPrivate=_;var M=function(t,e){return void 0===e&&(e=!1),(0,d.assertIsBuffer)(t),64===t.length?(0,s.publicKeyVerify)(n.concat([n.from([4]),t])):!!e&&(0,s.publicKeyVerify)(t)};e.isValidPublic=M;var S=function(t,e){return void 0===e&&(e=!1),(0,d.assertIsBuffer)(t),e&&64!==t.length&&(t=n.from((0,s.publicKeyConvert)(t,!1).slice(1))),(0,u.default)(64===t.length),(0,l.keccak)(t).slice(-20)};e.pubToAddress=S,e.publicToAddress=e.pubToAddress;var A=function(t){return(0,d.assertIsBuffer)(t),n.from((0,s.publicKeyCreate)(t,!1)).slice(1)};e.privateToPublic=A;var E=function(t){return(0,e.publicToAddress)((0,e.privateToPublic)(t))};e.privateToAddress=E;var k=function(t){return(0,d.assertIsBuffer)(t),64!==t.length&&(t=n.from((0,s.publicKeyConvert)(t,!1).slice(1))),t};e.importPublic=k;var x=function(){var t=20,e=(0,h.zeros)(t);return(0,h.bufferToHex)(e)};e.zeroAddress=x;var O=function(t){try{(0,d.assertIsString)(t)}catch(n){return!1}var r=(0,e.zeroAddress)();return r===t};e.isZeroAddress=O},2141:function(t,e,r){"use strict";var n=r(480)["Buffer"],i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Address=void 0;var o=i(r(4108)),u=r(7),a=r(1831),s=r(8438),f=function(){function t(t){(0,o.default)(20===t.length,"Invalid address length"),this.buf=t}return t.zero=function(){return new t((0,a.zeros)(20))},t.fromString=function(e){return(0,o.default)((0,s.isValidAddress)(e),"Invalid address"),new t((0,a.toBuffer)(e))},t.fromPublicKey=function(e){(0,o.default)(n.isBuffer(e),"Public key should be Buffer");var r=(0,s.pubToAddress)(e);return new t(r)},t.fromPrivateKey=function(e){(0,o.default)(n.isBuffer(e),"Private key should be Buffer");var r=(0,s.privateToAddress)(e);return new t(r)},t.generate=function(e,r){return(0,o.default)(u.BN.isBN(r)),new t((0,s.generateAddress)(e.buf,r.toArrayLike(n)))},t.generate2=function(e,r,i){return(0,o.default)(n.isBuffer(r)),(0,o.default)(n.isBuffer(i)),new t((0,s.generateAddress2)(e.buf,r,i))},t.prototype.equals=function(t){return this.buf.equals(t.buf)},t.prototype.isZero=function(){return this.equals(t.zero())},t.prototype.isPrecompileOrSystemAddress=function(){var t=new u.BN(this.buf),e=new u.BN(0),r=new u.BN("ffff","hex");return t.gte(e)&&t.lte(r)},t.prototype.toString=function(){return"0x"+this.buf.toString("hex")},t.prototype.toBuffer=function(){return n.from(this.buf)},t}();e.Address=f},1831:function(t,e,r){"use strict";var n=r(480)["Buffer"];r(7658),r(3767),r(8585),r(8696);var i=this&&this.__values||function(t){var e="function"===typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(t,e){var r="function"===typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),u=[];try{while((void 0===e||e-- >0)&&!(n=o.next()).done)u.push(n.value)}catch(a){i={error:a}}finally{try{n&&!n.done&&(r=o["return"])&&r.call(o)}finally{if(i)throw i.error}}return u};Object.defineProperty(e,"__esModule",{value:!0}),e.bufArrToArr=e.arrToBufArr=e.validateNoLeadingZeroes=e.baToJSON=e.toUtf8=e.addHexPrefix=e.toUnsigned=e.fromSigned=e.bufferToHex=e.bufferToInt=e.toBuffer=e.unpadHexString=e.unpadArray=e.unpadBuffer=e.setLengthRight=e.setLengthLeft=e.zeros=e.intToBuffer=e.intToHex=void 0;var u=r(7),a=r(5661),s=r(8992),f=function(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("Received an invalid integer type: ".concat(t));return"0x".concat(t.toString(16))};e.intToHex=f;var c=function(t){var r=(0,e.intToHex)(t);return n.from((0,a.padToEven)(r.slice(2)),"hex")};e.intToBuffer=c;var h=function(t){return n.allocUnsafe(t).fill(0)};e.zeros=h;var l=function(t,r,n){var i=(0,e.zeros)(r);return n?t.length0&&"0"===e.toString())t=t.slice(1),e=t[0];return t},g=function(t){return(0,s.assertIsBuffer)(t),b(t)};e.unpadBuffer=g;var m=function(t){return(0,s.assertIsArray)(t),b(t)};e.unpadArray=m;var y=function(t){return(0,s.assertIsHexString)(t),t=(0,a.stripHexPrefix)(t),b(t)};e.unpadHexString=y;var v=function(t){if(null===t||void 0===t)return n.allocUnsafe(0);if(n.isBuffer(t))return n.from(t);if(Array.isArray(t)||t instanceof Uint8Array)return n.from(t);if("string"===typeof t){if(!(0,a.isHexString)(t))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ".concat(t));return n.from((0,a.padToEven)((0,a.stripHexPrefix)(t)),"hex")}if("number"===typeof t)return(0,e.intToBuffer)(t);if(u.BN.isBN(t)){if(t.isNeg())throw new Error("Cannot convert negative BN to buffer. Given: ".concat(t));return t.toArrayLike(n)}if(t.toArray)return n.from(t.toArray());if(t.toBuffer)return n.from(t.toBuffer());throw new Error("invalid type")};e.toBuffer=v;var w=function(t){return new u.BN((0,e.toBuffer)(t)).toNumber()};e.bufferToInt=w;var _=function(t){return t=(0,e.toBuffer)(t),"0x"+t.toString("hex")};e.bufferToHex=_;var M=function(t){return new u.BN(t).fromTwos(256)};e.fromSigned=M;var S=function(t){return n.from(t.toTwos(256).toArray())};e.toUnsigned=S;var A=function(t){return"string"!==typeof t||(0,a.isHexPrefixed)(t)?t:"0x"+t};e.addHexPrefix=A;var E=function(t){var e=/^(00)+|(00)+$/g;if(t=(0,a.stripHexPrefix)(t),t.length%2!==0)throw new Error("Invalid non-even hex string input for toUtf8() provided");var r=n.from(t.replace(e,""),"hex");return r.toString("utf8")};e.toUtf8=E;var k=function(t){if(n.isBuffer(t))return"0x".concat(t.toString("hex"));if(t instanceof Array){for(var r=[],i=0;i0&&0===f[0])throw new Error("".concat(s," cannot have leading zeroes, received: ").concat(f.toString("hex")))}}catch(c){e={error:c}}finally{try{u&&!u.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}};function O(t){return Array.isArray(t)?t.map((function(t){return O(t)})):n.from(t)}function I(t){return Array.isArray(t)?t.map((function(t){return I(t)})):Uint8Array.from(null!==t&&void 0!==t?t:[])}e.validateNoLeadingZeroes=x,e.arrToBufArr=O,e.bufArrToArr=I},5472:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KECCAK256_RLP=e.KECCAK256_RLP_S=e.KECCAK256_RLP_ARRAY=e.KECCAK256_RLP_ARRAY_S=e.KECCAK256_NULL=e.KECCAK256_NULL_S=e.TWO_POW256=e.MAX_INTEGER=e.MAX_UINT64=void 0;var n=r(480),i=r(7);e.MAX_UINT64=new i.BN("ffffffffffffffff",16),e.MAX_INTEGER=new i.BN("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),e.TWO_POW256=new i.BN("10000000000000000000000000000000000000000000000000000000000000000",16),e.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",e.KECCAK256_NULL=n.Buffer.from(e.KECCAK256_NULL_S,"hex"),e.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",e.KECCAK256_RLP_ARRAY=n.Buffer.from(e.KECCAK256_RLP_ARRAY_S,"hex"),e.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",e.KECCAK256_RLP=n.Buffer.from(e.KECCAK256_RLP_S,"hex")},7:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t["default"]=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.rlp=e.BN=void 0;var a=u(r(6170));e.BN=a.default;var s=o(r(1224));e.rlp=s},1285:function(t,e,r){"use strict";var n=r(480)["Buffer"];Object.defineProperty(e,"__esModule",{value:!0}),e.rlphash=e.ripemd160FromArray=e.ripemd160FromString=e.ripemd160=e.sha256FromArray=e.sha256FromString=e.sha256=e.keccakFromArray=e.keccakFromHexString=e.keccakFromString=e.keccak256=e.keccak=void 0;var i=r(1525),o=r(6871),u=r(7),a=r(1831),s=r(8992),f=function(t,e){switch(void 0===e&&(e=256),(0,s.assertIsBuffer)(t),e){case 224:return(0,i.keccak224)(t);case 256:return(0,i.keccak256)(t);case 384:return(0,i.keccak384)(t);case 512:return(0,i.keccak512)(t);default:throw new Error("Invald algorithm: keccak".concat(e))}};e.keccak=f;var c=function(t){return(0,e.keccak)(t)};e.keccak256=c;var h=function(t,r){void 0===r&&(r=256),(0,s.assertIsString)(t);var i=n.from(t,"utf8");return(0,e.keccak)(i,r)};e.keccakFromString=h;var l=function(t,r){return void 0===r&&(r=256),(0,s.assertIsHexString)(t),(0,e.keccak)((0,a.toBuffer)(t),r)};e.keccakFromHexString=l;var d=function(t,r){return void 0===r&&(r=256),(0,s.assertIsArray)(t),(0,e.keccak)((0,a.toBuffer)(t),r)};e.keccakFromArray=d;var p=function(t){return t=(0,a.toBuffer)(t),o("sha256").update(t).digest()},b=function(t){return(0,s.assertIsBuffer)(t),p(t)};e.sha256=b;var g=function(t){return(0,s.assertIsString)(t),p(t)};e.sha256FromString=g;var m=function(t){return(0,s.assertIsArray)(t),p(t)};e.sha256FromArray=m;var y=function(t,e){t=(0,a.toBuffer)(t);var r=o("rmd160").update(t).digest();return!0===e?(0,a.setLengthLeft)(r,32):r},v=function(t,e){return(0,s.assertIsBuffer)(t),y(t,e)};e.ripemd160=v;var w=function(t,e){return(0,s.assertIsString)(t),y(t,e)};e.ripemd160FromString=w;var _=function(t,e){return(0,s.assertIsArray)(t),y(t,e)};e.ripemd160FromArray=_;var M=function(t){return(0,e.keccak)(u.rlp.encode(t))};e.rlphash=M},8992:function(t,e,r){"use strict";var n=r(480)["Buffer"];Object.defineProperty(e,"__esModule",{value:!0}),e.assertIsString=e.assertIsArray=e.assertIsBuffer=e.assertIsHexString=void 0;var i=r(5661),o=function(t){if(!(0,i.isHexString)(t)){var e="This method only supports 0x-prefixed hex strings but input was: ".concat(t);throw new Error(e)}};e.assertIsHexString=o;var u=function(t){if(!n.isBuffer(t)){var e="This method only supports Buffer but input was: ".concat(t);throw new Error(e)}};e.assertIsBuffer=u;var a=function(t){if(!Array.isArray(t)){var e="This method only supports number arrays but input was: ".concat(t);throw new Error(e)}};e.assertIsArray=a;var s=function(t){if("string"!==typeof t){var e="This method only supports strings but input was: ".concat(t);throw new Error(e)}};e.assertIsString=s},4342:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.isHexString=e.getKeys=e.fromAscii=e.fromUtf8=e.toAscii=e.arrayContainsArray=e.getBinarySize=e.padToEven=e.stripHexPrefix=e.isHexPrefixed=void 0,i(r(5472),e),i(r(8438),e),i(r(2141),e),i(r(1285),e),i(r(1737),e),i(r(1831),e),i(r(229),e),i(r(7),e),i(r(7335),e);var o=r(5661);Object.defineProperty(e,"isHexPrefixed",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(e,"stripHexPrefix",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(e,"padToEven",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(e,"getBinarySize",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(e,"arrayContainsArray",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(e,"toAscii",{enumerable:!0,get:function(){return o.toAscii}}),Object.defineProperty(e,"fromUtf8",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(e,"fromAscii",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(e,"getKeys",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(e,"isHexString",{enumerable:!0,get:function(){return o.isHexString}})},5661:function(t,e,r){"use strict";var n=r(480)["Buffer"];function i(t){if("string"!==typeof t)throw new Error("[isHexPrefixed] input must be type 'string', received type ".concat(typeof t));return"0"===t[0]&&"x"===t[1]}r(7658),Object.defineProperty(e,"__esModule",{value:!0}),e.isHexString=e.getKeys=e.fromAscii=e.fromUtf8=e.toAscii=e.arrayContainsArray=e.getBinarySize=e.padToEven=e.stripHexPrefix=e.isHexPrefixed=void 0,e.isHexPrefixed=i;var o=function(t){if("string"!==typeof t)throw new Error("[stripHexPrefix] input must be type 'string', received ".concat(typeof t));return i(t)?t.slice(2):t};function u(t){var e=t;if("string"!==typeof e)throw new Error("[padToEven] value must be type 'string', received ".concat(typeof e));return e.length%2&&(e="0".concat(e)),e}function a(t){if("string"!==typeof t)throw new Error("[getBinarySize] method requires input type 'string', recieved ".concat(typeof t));return n.byteLength(t,"utf8")}function s(t,e,r){if(!0!==Array.isArray(t))throw new Error("[arrayContainsArray] method requires input 'superset' to be an array, got type '".concat(typeof t,"'"));if(!0!==Array.isArray(e))throw new Error("[arrayContainsArray] method requires input 'subset' to be an array, got type '".concat(typeof e,"'"));return e[r?"some":"every"]((function(e){return t.indexOf(e)>=0}))}function f(t){var e="",r=0,n=t.length;for("0x"===t.substring(0,2)&&(r=2);r=i.length,"The field ".concat(e.name," must not have more ").concat(e.length," bytes"))):e.allowZero&&0===i.length||!e.length||(0,o.default)(e.length===i.length,"The field ".concat(e.name," must have byte length of ").concat(e.length)),t.raw[r]=i}t._fields.push(e.name),Object.defineProperty(t,e.name,{enumerable:!0,configurable:!0,get:i,set:u}),e.default&&(t[e.name]=e.default),e.alias&&Object.defineProperty(t,e.alias,{enumerable:!1,configurable:!0,set:u,get:i})})),r)if("string"===typeof r&&(r=n.from((0,u.stripHexPrefix)(r),"hex")),n.isBuffer(r)&&(r=a.rlp.decode(r)),Array.isArray(r)){if(r.length>t._fields.length)throw new Error("wrong number of fields in data");r.forEach((function(e,r){t[t._fields[r]]=(0,s.toBuffer)(e)}))}else{if("object"!==typeof r)throw new Error("invalid data");var i=Object.keys(r);e.forEach((function(e){-1!==i.indexOf(e.name)&&(t[e.name]=r[e.name]),-1!==i.indexOf(e.alias)&&(t[e.alias]=r[e.alias])}))}};e.defineProperties=f},1737:function(t,e,r){"use strict";var n=r(480)["Buffer"];Object.defineProperty(e,"__esModule",{value:!0}),e.hashPersonalMessage=e.isValidSignature=e.fromRpcSig=e.toCompactSig=e.toRpcSig=e.ecrecover=e.ecsign=void 0;var i=r(2098),o=r(7),u=r(1831),a=r(1285),s=r(8992),f=r(7335);function c(t,e,r){var o=(0,i.ecdsaSign)(t,e),u=o.signature,a=o.recid,s=n.from(u.slice(0,32)),c=n.from(u.slice(32,64));if(!r||"number"===typeof r){if(r&&!Number.isSafeInteger(r))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");var h=r?a+(2*r+35):a+27;return{r:s,s:c,v:h}}var l=(0,f.toType)(r,f.TypeOutput.BN),d=l.muln(2).addn(35).addn(a).toArrayLike(n);return{r:s,s:c,v:d}}function h(t,e){var r=(0,f.toType)(t,f.TypeOutput.BN);if(r.eqn(0)||r.eqn(1))return(0,f.toType)(t,f.TypeOutput.BN);if(!e)return r.subn(27);var n=(0,f.toType)(e,f.TypeOutput.BN);return r.sub(n.muln(2).addn(35))}function l(t){var e=new o.BN(t);return e.eqn(0)||e.eqn(1)}e.ecsign=c;var d=function(t,e,r,o,a){var s=n.concat([(0,u.setLengthLeft)(r,32),(0,u.setLengthLeft)(o,32)],64),f=h(e,a);if(!l(f))throw new Error("Invalid signature v value");var c=(0,i.ecdsaRecover)(s,f.toNumber(),t);return n.from((0,i.publicKeyConvert)(c,!1).slice(1))};e.ecrecover=d;var p=function(t,e,r,i){var o=h(t,i);if(!l(o))throw new Error("Invalid signature v value");return(0,u.bufferToHex)(n.concat([(0,u.setLengthLeft)(e,32),(0,u.setLengthLeft)(r,32),(0,u.toBuffer)(t)]))};e.toRpcSig=p;var b=function(t,e,r,i){var o=h(t,i);if(!l(o))throw new Error("Invalid signature v value");var a=(0,f.toType)(t,f.TypeOutput.Number),s=r;return(a>28&&a%2===1||1===a||28===a)&&(s=n.from(r),s[0]|=128),(0,u.bufferToHex)(n.concat([(0,u.setLengthLeft)(e,32),(0,u.setLengthLeft)(s,32)]))};e.toCompactSig=b;var g=function(t){var e,r,n,i=(0,u.toBuffer)(t);if(i.length>=65)e=i.slice(0,32),r=i.slice(32,64),n=(0,u.bufferToInt)(i.slice(64));else{if(64!==i.length)throw new Error("Invalid signature length");e=i.slice(0,32),r=i.slice(32,64),n=(0,u.bufferToInt)(i.slice(32,33))>>7,r[0]&=127}return n<27&&(n+=27),{v:n,r:e,s:r}};e.fromRpcSig=g;var m=function(t,e,r,n,i){void 0===n&&(n=!0);var u=new o.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),a=new o.BN("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==e.length||32!==r.length)return!1;if(!l(h(t,i)))return!1;var s=new o.BN(e),f=new o.BN(r);return!(s.isZero()||s.gt(a)||f.isZero()||f.gt(a))&&(!n||1!==f.cmp(u))};e.isValidSignature=m;var y=function(t){(0,s.assertIsBuffer)(t);var e=n.from("Ethereum Signed Message:\n".concat(t.length),"utf-8");return(0,a.keccak)(n.concat([e,t]))};e.hashPersonalMessage=y},7335:function(t,e,r){"use strict";var n=r(480)["Buffer"];Object.defineProperty(e,"__esModule",{value:!0}),e.toType=e.TypeOutput=e.bnToRlp=e.bnToUnpaddedBuffer=e.bnToHex=void 0;var i,o=r(7),u=r(5661),a=r(1831);function s(t){return"0x".concat(t.toString(16))}function f(t){return(0,a.unpadBuffer)(t.toArrayLike(n))}function c(t){return f(t)}function h(t,e){if(null===t)return null;if(void 0!==t){if("string"===typeof t&&!(0,u.isHexString)(t))throw new Error("A string must be provided with a 0x-prefix, given: ".concat(t));if("number"===typeof t&&!Number.isSafeInteger(t))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");var r=(0,a.toBuffer)(t);if(e===i.Buffer)return r;if(e===i.BN)return new o.BN(r);if(e===i.Number){var n=new o.BN(r),s=new o.BN(Number.MAX_SAFE_INTEGER.toString());if(n.gt(s))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return n.toNumber()}return"0x".concat(r.toString("hex"))}}e.bnToHex=s,e.bnToUnpaddedBuffer=f,e.bnToRlp=c,function(t){t[t["Number"]=0]="Number",t[t["BN"]=1]="BN",t[t["Buffer"]=2]="Buffer",t[t["PrefixedHexString"]=3]="PrefixedHexString"}(i=e.TypeOutput||(e.TypeOutput={})),e.toType=h},3953:function(t,e,r){"use strict";var n=r(2409);r(7658),r(541);var i,o="object"===typeof Reflect?Reflect:null,u=o&&"function"===typeof o.apply?o.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};function a(t){n&&n.warn&&n.warn(t)}i=o&&"function"===typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var s=Number.isNaN||function(t){return t!==t};function f(){f.init.call(this)}t.exports=f,t.exports.once=_,f.EventEmitter=f,f.prototype._events=void 0,f.prototype._eventsCount=0,f.prototype._maxListeners=void 0;var c=10;function h(t){if("function"!==typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?f.defaultMaxListeners:t._maxListeners}function d(t,e,r,n){var i,o,u;if(h(r),o=t._events,void 0===o?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),u=o[e]),void 0===u)u=o[e]=r,++t._eventsCount;else if("function"===typeof u?u=o[e]=n?[r,u]:[u,r]:n?u.unshift(r):u.push(r),i=l(t),i>0&&u.length>i&&!u.warned){u.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=t,s.type=e,s.count=u.length,a(s)}return t}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function b(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=p.bind(n);return i.listener=r,n.wrapFn=i,i}function g(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"===typeof i?r?[i.listener||i]:[i]:r?w(i):y(i,i.length)}function m(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"===typeof r)return 1;if(void 0!==r)return r.length}return 0}function y(t,e){for(var r=new Array(e),n=0;n0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var s=i[t];if(void 0===s)return!1;if("function"===typeof s)u(s,this,e);else{var f=s.length,c=y(s,f);for(r=0;r=0;o--)if(r[o]===e||r[o].listener===e){u=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():v(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,u||e)}return this},f.prototype.off=f.prototype.removeListener,f.prototype.removeAllListeners=function(t){var e,r,n;if(r=this._events,void 0===r)return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n=0;n--)this.removeListener(t,e[n]);return this},f.prototype.listeners=function(t){return g(this,t,!0)},f.prototype.rawListeners=function(t){return g(this,t,!1)},f.listenerCount=function(t,e){return"function"===typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},f.prototype.listenerCount=m,f.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},9438:function(t,e,r){"use strict";var n=r(8604),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty,u=function(t,e,r){for(var n=0,i=t.length;n=3&&(o=r),"[object Array]"===i.call(t)?u(t,e,o):"string"===typeof t?a(t,e,o):s(t,e,o)};t.exports=f},6863:function(t,e,r){"use strict";r(7658);var n="Function.prototype.bind called on incompatible ",i=Array.prototype.slice,o=Object.prototype.toString,u="[object Function]";t.exports=function(t){var e=this;if("function"!==typeof e||o.call(e)!==u)throw new TypeError(n+e);for(var r,a=i.call(arguments,1),s=function(){if(this instanceof r){var n=e.apply(this,a.concat(i.call(arguments)));return Object(n)===n?n:this}return e.apply(t,a.concat(i.call(arguments)))},f=Math.max(0,e.length-a.length),c=[],h=0;h1&&"boolean"!==typeof e)throw new u('"allowMissing" argument must be a boolean');if(null===E(/^%?[^%]*%?$/,t))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=O(t),n=r.length>0?r[0]:"",o=I("%"+n+"%",e),a=o.name,f=o.value,c=!1,h=o.alias;h&&(n=h[0],M(r,_([0,1],h)));for(var l=1,d=!0;l=r.length){var y=s(f,p);d=!!y,f=d&&"get"in y&&!("originalValue"in y.get)?y.get:f[p]}else d=w(f,p),f=f[p];d&&!c&&(b[a]=f)}}return f}},7905:function(t,e,r){"use strict";var n=r(1107),i=n("%Object.getOwnPropertyDescriptor%",!0);if(i)try{i([],"length")}catch(o){i=null}t.exports=i},7316:function(t,e,r){"use strict";var n=r(1107),i=n("%Object.defineProperty%",!0),o=function(){if(i)try{return i({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==i([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},5354:function(t,e,r){"use strict";var n="undefined"!==typeof Symbol&&Symbol,i=r(3950);t.exports=function(){return"function"===typeof n&&("function"===typeof Symbol&&("symbol"===typeof n("foo")&&("symbol"===typeof Symbol("bar")&&i())))}},3950:function(t){"use strict";t.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"===typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;var n=42;for(e in t[e]=n,t)return!1;if("function"===typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var i=Object.getOwnPropertySymbols(t);if(1!==i.length||i[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(o.value!==n||!0!==o.enumerable)return!1}return!0}},9505:function(t,e,r){"use strict";var n=r(3950);t.exports=function(){return n()&&!!Symbol.toStringTag}},8350:function(t,e,r){"use strict";var n=r(3574);t.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},9511:function(t,e,r){"use strict";r(7658);var n=r(7186).Buffer,i=r(7370).Transform,o=r(2068);function u(t,e){if(!n.isBuffer(t)&&"string"!==typeof t)throw new TypeError(e+" must be a string or a buffer")}function a(t){i.call(this),this._block=n.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}o(a,i),a.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(i){n=i}r(n)},a.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)},a.prototype.update=function(t,e){if(u(t,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(t)||(t=n.from(t,e));var r=this._block,i=0;while(this._blockOffset+t.length-i>=this._blockSize){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,s=this._length[a]/4294967296|0,s>0&&(this._length[a]-=4294967296*s);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},a.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=a},807:function(t,e,r){var n=e;n.utils=r(169),n.common=r(9376),n.sha=r(1970),n.ripemd=r(7276),n.hmac=r(6236),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},9376:function(t,e,r){"use strict";var n=r(169),i=r(3891);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}e.BlockHash=o,o.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){t=this.pending;var r=t.length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;othis.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e>>3}function l(t){return i(t,17)^i(t,19)^t>>>10}e.ft_1=o,e.ch32=u,e.maj32=a,e.p32=s,e.s0_256=f,e.s1_256=c,e.g0_256=h,e.g1_256=l},169:function(t,e,r){"use strict";r(7658);var n=r(3891),i=r(2068);function o(t,e){return 55296===(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320===(64512&t.charCodeAt(e+1)))}function u(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"===typeof t)if(e){if("hex"===e)for(t=t.replace(/[^a-z0-9]+/gi,""),t.length%2!==0&&(t="0"+t),i=0;i>6|192,r[n++]=63&u|128):o(t,i)?(u=65536+((1023&u)<<10)+(1023&t.charCodeAt(++i)),r[n++]=u>>18|240,r[n++]=u>>12&63|128,r[n++]=u>>6&63|128,r[n++]=63&u|128):(r[n++]=u>>12|224,r[n++]=u>>6&63|128,r[n++]=63&u|128)}else for(i=0;i>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24;return e>>>0}function f(t,e){for(var r="",n=0;n>>0}return u}function d(t,e){for(var r=new Array(4*t.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r}function p(t,e){return t>>>e|t<<32-e}function b(t,e){return t<>>32-e}function g(t,e){return t+e>>>0}function m(t,e,r){return t+e+r>>>0}function y(t,e,r,n){return t+e+r+n>>>0}function v(t,e,r,n,i){return t+e+r+n+i>>>0}function w(t,e,r,n){var i=t[e],o=t[e+1],u=n+o>>>0,a=(u>>0,t[e+1]=u}function _(t,e,r,n){var i=e+n>>>0,o=(i>>0}function M(t,e,r,n){var i=e+n;return i>>>0}function S(t,e,r,n,i,o,u,a){var s=0,f=e;f=f+n>>>0,s+=f>>0,s+=f>>0,s+=f>>0}function A(t,e,r,n,i,o,u,a){var s=e+n+o+a;return s>>>0}function E(t,e,r,n,i,o,u,a,s,f){var c=0,h=e;h=h+n>>>0,c+=h>>0,c+=h>>0,c+=h>>0,c+=h>>0}function k(t,e,r,n,i,o,u,a,s,f){var c=e+n+o+a+f;return c>>>0}function x(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}function O(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}function I(t,e,r){return t>>>r}function R(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}e.inherits=i,e.toArray=u,e.toHex=a,e.htonl=s,e.toHex32=f,e.zero2=c,e.zero8=h,e.join32=l,e.split32=d,e.rotr32=p,e.rotl32=b,e.sum32=g,e.sum32_3=m,e.sum32_4=y,e.sum32_5=v,e.sum64=w,e.sum64_hi=_,e.sum64_lo=M,e.sum64_4_hi=S,e.sum64_4_lo=A,e.sum64_5_hi=E,e.sum64_5_lo=k,e.rotr64_hi=x,e.rotr64_lo=O,e.shr64_hi=I,e.shr64_lo=R},5312:function(t,e,r){"use strict";var n=r(807),i=r(5913),o=r(3891);function u(t){if(!(this instanceof u))return new u(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||"hex"),r=i.toArray(t.nonce,t.nonceEnc||"hex"),n=i.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}t.exports=u,u.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},u.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof e&&(n=r,r=e,e=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));var o=[];while(o.length */ e.read=function(t,e,r,n,i){var o,u,a=8*i-n-1,s=(1<>1,c=-7,h=r?i-1:0,l=r?-1:1,d=t[e+h];for(h+=l,o=d&(1<<-c)-1,d>>=-c,c+=a;c>0;o=256*o+t[e+h],h+=l,c-=8);for(u=o&(1<<-c)-1,o>>=-c,c+=n;c>0;u=256*u+t[e+h],h+=l,c-=8);if(0===o)o=1-f;else{if(o===s)return u?NaN:1/0*(d?-1:1);u+=Math.pow(2,n),o-=f}return(d?-1:1)*u*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var u,a,s,f=8*o-i-1,c=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,b=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,u=c):(u=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-u))<1&&(u--,s*=2),e+=u+h>=1?l/s:l*Math.pow(2,1-h),e*s>=2&&(u++,s/=2),u+h>=c?(a=0,u=c):u+h>=1?(a=(e*s-1)*Math.pow(2,i),u+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),u=0));i>=8;t[r+d]=255&a,d+=p,a/=256,i-=8);for(u=u<0;t[r+d]=255&u,d+=p,u/=256,f-=8);t[r+d-p]|=128*b}},2068:function(t){"function"===typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},2039:function(t,e,r){"use strict";var n=r(9505)(),i=r(4875),o=i("Object.prototype.toString"),u=function(t){return!(n&&t&&"object"===typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===o(t)},a=function(t){return!!u(t)||null!==t&&"object"===typeof t&&"number"===typeof t.length&&t.length>=0&&"[object Array]"!==o(t)&&"[object Function]"===o(t.callee)},s=function(){return u(arguments)}();u.isLegacyArguments=a,t.exports=s?u:a},8604:function(t){"use strict";var e,r,n=Function.prototype.toString,i="object"===typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"===typeof i&&"function"===typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i((function(){throw 42}),null,e)}catch(v){v!==r&&(i=null)}else i=null;var o=/^\s*class\b/,u=function(t){try{var e=n.call(t);return o.test(e)}catch(r){return!1}},a=function(t){try{return!u(t)&&(n.call(t),!0)}catch(e){return!1}},s=Object.prototype.toString,f="[object Object]",c="[object Function]",h="[object GeneratorFunction]",l="[object HTMLAllCollection]",d="[object HTML document.all class]",p="[object HTMLCollection]",b="function"===typeof Symbol&&!!Symbol.toStringTag,g=!(0 in[,]),m=function(){return!1};if("object"===typeof document){var y=document.all;s.call(y)===s.call(document.all)&&(m=function(t){if((g||!t)&&("undefined"===typeof t||"object"===typeof t))try{var e=s.call(t);return(e===l||e===d||e===p||e===f)&&null==t("")}catch(r){}return!1})}t.exports=i?function(t){if(m(t))return!0;if(!t)return!1;if("function"!==typeof t&&"object"!==typeof t)return!1;try{i(t,null,e)}catch(n){if(n!==r)return!1}return!u(t)&&a(t)}:function(t){if(m(t))return!0;if(!t)return!1;if("function"!==typeof t&&"object"!==typeof t)return!1;if(b)return a(t);if(u(t))return!1;var e=s.call(t);return!(e!==c&&e!==h&&!/^\[object HTML/.test(e))&&a(t)}},1113:function(t,e,r){"use strict";var n,i=Object.prototype.toString,o=Function.prototype.toString,u=/^\s*(?:function)?\*/,a=r(9505)(),s=Object.getPrototypeOf,f=function(){if(!a)return!1;try{return Function("return function*() {}")()}catch(t){}};t.exports=function(t){if("function"!==typeof t)return!1;if(u.test(o.call(t)))return!0;if(!a){var e=i.call(t);return"[object GeneratorFunction]"===e}if(!s)return!1;if("undefined"===typeof n){var r=f();n=!!r&&s(r)}return s(t)===n}},7837:function(t){"use strict";t.exports=function(t){return t!==t}},9749:function(t,e,r){"use strict";var n=r(9195),i=r(5527),o=r(7837),u=r(4e3),a=r(4594),s=n(u(),Number);i(s,{getPolyfill:u,implementation:o,shim:a}),t.exports=s},4e3:function(t,e,r){"use strict";var n=r(7837);t.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},4594:function(t,e,r){"use strict";var n=r(5527),i=r(4e3);t.exports=function(){var t=i();return n(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}},9529:function(t,e,r){"use strict";var n=r(9438),i=r(5368),o=r(4875),u=o("Object.prototype.toString"),a=r(9505)(),s=r(7905),f="undefined"===typeof globalThis?r.g:globalThis,c=i(),h=o("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r-1}return!!s&&b(t)}},5801:function(t,e,r){const n=r(8101),i=r(7086),o=r(2678);t.exports=function(t,e){if("string"!==typeof t)return!1;if(e instanceof Object||(e={}),t=t.toLowerCase(),t.endsWith(".")&&(t=t.slice(0,t.length-1)),e.allowUnicode&&(t=n.toASCII(t)),t.length>253)return!1;const r=/^([\u0E00-\u0E7Fa-z0-9-._*]+)$/g;if(!r.test(t))return!1;if(e.topLevel&&o[t.replace(/\.$/,"")])return!0;const u=/(.*)\.(([\u0E00-\u0E7Fa-z0-9]+)(\.[a-z0-9]+))/,a=t.match(u);let s=null,f=null;if(a&&a.length>2&&i[a[2]]&&(s=a[2],f=a[1].split(".")),!f){if(f=t.split("."),f.length<=1)return!1;s=f.pop();const e=/^(?:xn--)?(?!^\d+$)[\u0E00-\u0E7Fa-z0-9]+$/gi;if(!e.test(s))return!1}if(!1===e.subdomain&&f.length>1)return!1;const c=f.every((function(t,r){if(e.wildcard&&0===r&&"*"===t&&f.length>1)return!0;let n=/^([\u0E00-\u0E7Fa-zA-Z0-9-_]+)$/g;r===f.length-1&&(n=/^([\u0E00-\u0E7Fa-zA-Z0-9-]+)$/g);const i=(t.match(/--(--)?/g)||[]).length,o=(t.match(/xn--/g)||[]).length;if(r===f.length-1&&i!==o)return!1;const u=n.test(t)&&t.length<64&&!t.startsWith("-")&&!t.endsWith("-");return u}));return c}},4587:function(t,e,r){t.exports=r(5241)(r(6750))},5241:function(t,e,r){const n=r(8382),i=r(6356);t.exports=function(t){const e=n(t),r=i(t);return function(t,n){const i="string"===typeof t?t.toLowerCase():t;switch(i){case"keccak224":return new e(1152,448,null,224,n);case"keccak256":return new e(1088,512,null,256,n);case"keccak384":return new e(832,768,null,384,n);case"keccak512":return new e(576,1024,null,512,n);case"sha3-224":return new e(1152,448,6,224,n);case"sha3-256":return new e(1088,512,6,256,n);case"sha3-384":return new e(832,768,6,384,n);case"sha3-512":return new e(576,1024,6,512,n);case"shake128":return new r(1344,256,31,n);case"shake256":return new r(1088,512,31,n);default:throw new Error("Invald algorithm: "+t)}}}},8382:function(t,e,r){var n=r(480)["Buffer"];r(7658);const{Transform:i}=r(7370);t.exports=t=>class e extends i{constructor(e,r,n,i,o){super(o),this._rate=e,this._capacity=r,this._delimitedSuffix=n,this._hashBitLength=i,this._options=o,this._state=new t,this._state.initialize(e,r),this._finalized=!1}_transform(t,e,r){let n=null;try{this.update(t,e)}catch(i){n=i}r(n)}_flush(t){let e=null;try{this.push(this.digest())}catch(r){e=r}t(e)}update(t,e){if(!n.isBuffer(t)&&"string"!==typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return n.isBuffer(t)||(t=n.from(t,e)),this._state.absorb(t),this}digest(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let e=this._state.squeeze(this._hashBitLength/8);return void 0!==t&&(e=e.toString(t)),this._resetState(),e}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new e(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}}},6356:function(t,e,r){var n=r(480)["Buffer"];r(7658);const{Transform:i}=r(7370);t.exports=t=>class e extends i{constructor(e,r,n,i){super(i),this._rate=e,this._capacity=r,this._delimitedSuffix=n,this._options=i,this._state=new t,this._state.initialize(e,r),this._finalized=!1}_transform(t,e,r){let n=null;try{this.update(t,e)}catch(i){n=i}r(n)}_flush(){}_read(t){this.push(this.squeeze(t))}update(t,e){if(!n.isBuffer(t)&&"string"!==typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return n.isBuffer(t)||(t=n.from(t,e)),this._state.absorb(t),this}squeeze(t,e){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let r=this._state.squeeze(t);return void 0!==e&&(r=r.toString(e)),r}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new e(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}}},7835:function(t,e){const r=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];e.p1600=function(t){for(let e=0;e<24;++e){const n=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],o=t[2]^t[12]^t[22]^t[32]^t[42],u=t[3]^t[13]^t[23]^t[33]^t[43],a=t[4]^t[14]^t[24]^t[34]^t[44],s=t[5]^t[15]^t[25]^t[35]^t[45],f=t[6]^t[16]^t[26]^t[36]^t[46],c=t[7]^t[17]^t[27]^t[37]^t[47],h=t[8]^t[18]^t[28]^t[38]^t[48],l=t[9]^t[19]^t[29]^t[39]^t[49];let d=h^(o<<1|u>>>31),p=l^(u<<1|o>>>31);const b=t[0]^d,g=t[1]^p,m=t[10]^d,y=t[11]^p,v=t[20]^d,w=t[21]^p,_=t[30]^d,M=t[31]^p,S=t[40]^d,A=t[41]^p;d=n^(a<<1|s>>>31),p=i^(s<<1|a>>>31);const E=t[2]^d,k=t[3]^p,x=t[12]^d,O=t[13]^p,I=t[22]^d,R=t[23]^p,j=t[32]^d,B=t[33]^p,P=t[42]^d,T=t[43]^p;d=o^(f<<1|c>>>31),p=u^(c<<1|f>>>31);const z=t[4]^d,N=t[5]^p,L=t[14]^d,C=t[15]^p,q=t[24]^d,U=t[25]^p,D=t[34]^d,F=t[35]^p,K=t[44]^d,H=t[45]^p;d=a^(h<<1|l>>>31),p=s^(l<<1|h>>>31);const W=t[6]^d,V=t[7]^p,$=t[16]^d,G=t[17]^p,Z=t[26]^d,Y=t[27]^p,J=t[36]^d,X=t[37]^p,Q=t[46]^d,tt=t[47]^p;d=f^(n<<1|i>>>31),p=c^(i<<1|n>>>31);const et=t[8]^d,rt=t[9]^p,nt=t[18]^d,it=t[19]^p,ot=t[28]^d,ut=t[29]^p,at=t[38]^d,st=t[39]^p,ft=t[48]^d,ct=t[49]^p,ht=b,lt=g,dt=y<<4|m>>>28,pt=m<<4|y>>>28,bt=v<<3|w>>>29,gt=w<<3|v>>>29,mt=M<<9|_>>>23,yt=_<<9|M>>>23,vt=S<<18|A>>>14,wt=A<<18|S>>>14,_t=E<<1|k>>>31,Mt=k<<1|E>>>31,St=O<<12|x>>>20,At=x<<12|O>>>20,Et=I<<10|R>>>22,kt=R<<10|I>>>22,xt=B<<13|j>>>19,Ot=j<<13|B>>>19,It=P<<2|T>>>30,Rt=T<<2|P>>>30,jt=N<<30|z>>>2,Bt=z<<30|N>>>2,Pt=L<<6|C>>>26,Tt=C<<6|L>>>26,zt=U<<11|q>>>21,Nt=q<<11|U>>>21,Lt=D<<15|F>>>17,Ct=F<<15|D>>>17,qt=H<<29|K>>>3,Ut=K<<29|H>>>3,Dt=W<<28|V>>>4,Ft=V<<28|W>>>4,Kt=G<<23|$>>>9,Ht=$<<23|G>>>9,Wt=Z<<25|Y>>>7,Vt=Y<<25|Z>>>7,$t=J<<21|X>>>11,Gt=X<<21|J>>>11,Zt=tt<<24|Q>>>8,Yt=Q<<24|tt>>>8,Jt=et<<27|rt>>>5,Xt=rt<<27|et>>>5,Qt=nt<<20|it>>>12,te=it<<20|nt>>>12,ee=ut<<7|ot>>>25,re=ot<<7|ut>>>25,ne=at<<8|st>>>24,ie=st<<8|at>>>24,oe=ft<<14|ct>>>18,ue=ct<<14|ft>>>18;t[0]=ht^~St&zt,t[1]=lt^~At&Nt,t[10]=Dt^~Qt&bt,t[11]=Ft^~te>,t[20]=_t^~Pt&Wt,t[21]=Mt^~Tt&Vt,t[30]=Jt^~dt&Et,t[31]=Xt^~pt&kt,t[40]=jt^~Kt&ee,t[41]=Bt^~Ht&re,t[2]=St^~zt&$t,t[3]=At^~Nt&Gt,t[12]=Qt^~bt&xt,t[13]=te^~gt&Ot,t[22]=Pt^~Wt&ne,t[23]=Tt^~Vt&ie,t[32]=dt^~Et&Lt,t[33]=pt^~kt&Ct,t[42]=Kt^~ee&mt,t[43]=Ht^~re&yt,t[4]=zt^~$t&oe,t[5]=Nt^~Gt&ue,t[14]=bt^~xt&qt,t[15]=gt^~Ot&Ut,t[24]=Wt^~ne&vt,t[25]=Vt^~ie&wt,t[34]=Et^~Lt&Zt,t[35]=kt^~Ct&Yt,t[44]=ee^~mt&It,t[45]=re^~yt&Rt,t[6]=$t^~oe&ht,t[7]=Gt^~ue<,t[16]=xt^~qt&Dt,t[17]=Ot^~Ut&Ft,t[26]=ne^~vt&_t,t[27]=ie^~wt&Mt,t[36]=Lt^~Zt&Jt,t[37]=Ct^~Yt&Xt,t[46]=mt^~It&jt,t[47]=yt^~Rt&Bt,t[8]=oe^~ht&St,t[9]=ue^~lt&At,t[18]=qt^~Dt&Qt,t[19]=Ut^~Ft&te,t[28]=vt^~_t&Pt,t[29]=wt^~Mt&Tt,t[38]=Zt^~Jt&dt,t[39]=Yt^~Xt&pt,t[48]=It^~jt&Kt,t[49]=Rt^~Bt&Ht,t[0]^=r[2*e],t[1]^=r[2*e+1]}}},6750:function(t,e,r){var n=r(480)["Buffer"];const i=r(7835);function o(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}o.prototype.initialize=function(t,e){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1},o.prototype.absorb=function(t){for(let e=0;e>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0);return e},o.prototype.copy=function(t){for(let e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing},t.exports=o},7689:function(t,e,r){"use strict";var n=r(2068),i=r(9511),o=r(7186).Buffer,u=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function s(t,e){return t<>>32-e}function f(t,e,r,n,i,o,u){return s(t+(e&r|~e&n)+i+o|0,u)+e|0}function c(t,e,r,n,i,o,u){return s(t+(e&n|r&~n)+i+o|0,u)+e|0}function h(t,e,r,n,i,o,u){return s(t+(e^r^n)+i+o|0,u)+e|0}function l(t,e,r,n,i,o,u){return s(t+(r^(e|~n))+i+o|0,u)+e|0}n(a,i),a.prototype._update=function(){for(var t=u,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,o=this._d;r=f(r,n,i,o,t[0],3614090360,7),o=f(o,r,n,i,t[1],3905402710,12),i=f(i,o,r,n,t[2],606105819,17),n=f(n,i,o,r,t[3],3250441966,22),r=f(r,n,i,o,t[4],4118548399,7),o=f(o,r,n,i,t[5],1200080426,12),i=f(i,o,r,n,t[6],2821735955,17),n=f(n,i,o,r,t[7],4249261313,22),r=f(r,n,i,o,t[8],1770035416,7),o=f(o,r,n,i,t[9],2336552879,12),i=f(i,o,r,n,t[10],4294925233,17),n=f(n,i,o,r,t[11],2304563134,22),r=f(r,n,i,o,t[12],1804603682,7),o=f(o,r,n,i,t[13],4254626195,12),i=f(i,o,r,n,t[14],2792965006,17),n=f(n,i,o,r,t[15],1236535329,22),r=c(r,n,i,o,t[1],4129170786,5),o=c(o,r,n,i,t[6],3225465664,9),i=c(i,o,r,n,t[11],643717713,14),n=c(n,i,o,r,t[0],3921069994,20),r=c(r,n,i,o,t[5],3593408605,5),o=c(o,r,n,i,t[10],38016083,9),i=c(i,o,r,n,t[15],3634488961,14),n=c(n,i,o,r,t[4],3889429448,20),r=c(r,n,i,o,t[9],568446438,5),o=c(o,r,n,i,t[14],3275163606,9),i=c(i,o,r,n,t[3],4107603335,14),n=c(n,i,o,r,t[8],1163531501,20),r=c(r,n,i,o,t[13],2850285829,5),o=c(o,r,n,i,t[2],4243563512,9),i=c(i,o,r,n,t[7],1735328473,14),n=c(n,i,o,r,t[12],2368359562,20),r=h(r,n,i,o,t[5],4294588738,4),o=h(o,r,n,i,t[8],2272392833,11),i=h(i,o,r,n,t[11],1839030562,16),n=h(n,i,o,r,t[14],4259657740,23),r=h(r,n,i,o,t[1],2763975236,4),o=h(o,r,n,i,t[4],1272893353,11),i=h(i,o,r,n,t[7],4139469664,16),n=h(n,i,o,r,t[10],3200236656,23),r=h(r,n,i,o,t[13],681279174,4),o=h(o,r,n,i,t[0],3936430074,11),i=h(i,o,r,n,t[3],3572445317,16),n=h(n,i,o,r,t[6],76029189,23),r=h(r,n,i,o,t[9],3654602809,4),o=h(o,r,n,i,t[12],3873151461,11),i=h(i,o,r,n,t[15],530742520,16),n=h(n,i,o,r,t[2],3299628645,23),r=l(r,n,i,o,t[0],4096336452,6),o=l(o,r,n,i,t[7],1126891415,10),i=l(i,o,r,n,t[14],2878612391,15),n=l(n,i,o,r,t[5],4237533241,21),r=l(r,n,i,o,t[12],1700485571,6),o=l(o,r,n,i,t[3],2399980690,10),i=l(i,o,r,n,t[10],4293915773,15),n=l(n,i,o,r,t[1],2240044497,21),r=l(r,n,i,o,t[8],1873313359,6),o=l(o,r,n,i,t[15],4264355552,10),i=l(i,o,r,n,t[6],2734768916,15),n=l(n,i,o,r,t[13],1309151649,21),r=l(r,n,i,o,t[4],4149444226,6),o=l(o,r,n,i,t[11],3174756917,10),i=l(i,o,r,n,t[2],718787259,15),n=l(n,i,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=a},3891:function(t){function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},5913:function(t,e,r){"use strict";r(7658);var n=e;function i(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!==typeof t){for(var n=0;n>8,u=255&i;o?r.push(o,u):r.push(u)}return r}function o(t){return 1===t.length?"0"+t:t}function u(t){for(var e="",r=0;r100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(a){var s=parseFloat(a[1]),f=(a[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return s*u;case"weeks":case"week":case"w":return s*o;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*n;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function s(t){var o=Math.abs(t);return o>=i?Math.round(t/i)+"d":o>=n?Math.round(t/n)+"h":o>=r?Math.round(t/r)+"m":o>=e?Math.round(t/e)+"s":t+"ms"}function f(t){var o=Math.abs(t);return o>=i?c(t,o,i,"day"):o>=n?c(t,o,n,"hour"):o>=r?c(t,o,r,"minute"):o>=e?c(t,o,e,"second"):t+" ms"}function c(t,e,r,n){var i=e>=1.5*r;return Math.round(t/r)+" "+n+(i?"s":"")}t.exports=function(t,e){e=e||{};var r=typeof t;if("string"===r&&t.length>0)return a(t);if("number"===r&&isFinite(t))return e.long?f(t):s(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},7868:function(t,e,r){var n=r(480)["Buffer"];function i(t,e){e={evenLength:!1,addPrefix:!1,...e};let r="";n.isBuffer(t)&&(t=t.toString("hex")),"number"===typeof t&&(t=t.toString()),"string"===typeof t&&(r=t.toLowerCase()),r.startsWith("0x")&&(r=r.slice(2));const i=r.length%2?`0${r}`:r;return n.from(i,"hex")&&(r=e.evenLength?i:r),e.addPrefix&&(r=`0x${r}`),r}t.exports=i},38:function(t){"use strict";var e=function(t){return t!==t};t.exports=function(t,r){return 0===t&&0===r?1/t===1/r:t===r||!(!e(t)||!e(r))}},2095:function(t,e,r){"use strict";var n=r(5527),i=r(9195),o=r(38),u=r(1724),a=r(5111),s=i(u(),Object);n(s,{getPolyfill:u,implementation:o,shim:a}),t.exports=s},1724:function(t,e,r){"use strict";var n=r(38);t.exports=function(){return"function"===typeof Object.is?Object.is:n}},5111:function(t,e,r){"use strict";var n=r(1724),i=r(5527);t.exports=function(){var t=n();return i(Object,{is:t},{is:function(){return Object.is!==t}}),t}},6783:function(t,e,r){"use strict";var n;if(r(7658),!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,u=r(8531),a=Object.prototype.propertyIsEnumerable,s=!a.call({toString:null},"toString"),f=a.call((function(){}),"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],h=function(t){var e=t.constructor;return e&&e.prototype===t},l={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},d=function(){if("undefined"===typeof window)return!1;for(var t in window)try{if(!l["$"+t]&&i.call(window,t)&&null!==window[t]&&"object"===typeof window[t])try{h(window[t])}catch(e){return!0}}catch(e){return!0}return!1}(),p=function(t){if("undefined"===typeof window||!d)return h(t);try{return h(t)}catch(e){return!1}};n=function(t){var e=null!==t&&"object"===typeof t,r="[object Function]"===o.call(t),n=u(t),a=e&&"[object String]"===o.call(t),h=[];if(!e&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var l=f&&r;if(a&&t.length>0&&!i.call(t,0))for(var d=0;d0)for(var b=0;b=0&&"[object Function]"===e.call(t.callee)),n}},9446:function(t,e,r){r(7658);var n=function(t){return t.replace(/^\s+|\s+$/g,"")},i=function(t){return"[object Array]"===Object.prototype.toString.call(t)};t.exports=function(t){if(!t)return{};for(var e={},r=n(t).split("\n"),o=0;o1)for(var r=1;r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=i-o,m=Math.floor,y=String.fromCharCode;function v(t){throw new RangeError(b[t])}function w(t,e){const r=[];let n=t.length;while(n--)r[n]=e(t[n]);return r}function _(t,e){const r=t.split("@");let n="";r.length>1&&(n=r[0]+"@",t=r[1]),t=t.replace(p,".");const i=t.split("."),o=w(i,e).join(".");return n+o}function M(t){const e=[];let r=0;const n=t.length;while(r=55296&&i<=56319&&rString.fromCodePoint(...t),A=function(t){return t>=48&&t<58?t-48+26:t>=65&&t<91?t-65:t>=97&&t<123?t-97:i},E=function(t,e){return t+22+75*(t<26)-((0!=e)<<5)},k=function(t,e,r){let n=0;for(t=r?m(t/s):t>>1,t+=m(t/e);t>g*u>>1;n+=i)t=m(t/g);return m(n+(g+1)*t/(t+a))},x=function(t){const e=[],r=t.length;let a=0,s=c,l=f,d=t.lastIndexOf(h);d<0&&(d=0);for(let n=0;n=128&&v("not-basic"),e.push(t.charCodeAt(n));for(let f=d>0?d+1:0;f=r&&v("invalid-input");const c=A(t.charCodeAt(f++));c>=i&&v("invalid-input"),c>m((n-a)/e)&&v("overflow"),a+=c*e;const h=s<=l?o:s>=l+u?u:s-l;if(cm(n/d)&&v("overflow"),e*=d}const h=e.length+1;l=k(a-c,h,0==c),m(a/h)>n-s&&v("overflow"),s+=m(a/h),a%=h,e.splice(a++,0,s)}return String.fromCodePoint(...e)},O=function(t){const e=[];t=M(t);const r=t.length;let a=c,s=0,l=f;for(const n of t)n<128&&e.push(y(n));const d=e.length;let p=d;d&&e.push(h);while(p=a&&em((n-s)/f)&&v("overflow"),s+=(r-a)*f,a=r;for(const c of t)if(cn&&v("overflow"),c===a){let t=s;for(let r=i;;r+=i){const n=r<=l?o:r>=l+u?u:r-l;if(to)throw new RangeError("requested too many random bytes");var r=a.allocUnsafe(t);if(t>0)if(t>i)for(var u=0;u2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}function o(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function u(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function a(t,e,r){return"number"!==typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}n("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(t,e,r){var n,s;if("string"===typeof e&&o(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be",u(t," argument"))s="The ".concat(t," ").concat(n," ").concat(i(e,"type"));else{var f=a(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(f," ").concat(n," ").concat(i(e,"type"))}return s+=". Received type ".concat(typeof r),s}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=r},3297:function(t,e,r){"use strict";var n=r(4478);r(7658);var i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var o=r(2218),u=r(8874);r(2068)(c,o);for(var a=i(u.prototype),s=0;s0)if("string"===typeof e||u.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=f(e)),n)u.endEmitted?E(t,new A):j(t,u,e,!0);else if(u.ended)E(t,new M);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!r?(e=u.decoder.write(e),u.objectMode||0!==e.length?j(t,u,e,!1):q(t,u)):j(t,u,e,!1)}else n||(u.reading=!1,q(t,u));return!u.ended&&(u.length=P?t=P:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function z(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=T(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function N(t,e){if(h("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?L(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,C(t)))}}function L(t){var e=t._readableState;h("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(h("emitReadable",e.flowing),e.emittedReadable=!0,i.nextTick(C,t))}function C(t){var e=t._readableState;h("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,V(t)}function q(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(U,t,e))}function U(t,e){while(!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function K(t){h("readable nexttick read 0"),t.read(0)}function H(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(W,t,e))}function W(t,e){h("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),V(t),e.flowing&&!e.reading&&t.read(0)}function V(t){var e=t._readableState;h("flow",e.flowing);while(e.flowing&&null!==t.read());}function $(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function G(t){var e=t._readableState;h("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,i.nextTick(Z,e,t))}function Z(t,e){if(h("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function Y(t,e){for(var r=0,n=t.length;r=e.highWaterMark:e.length>0)||e.ended))return h("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?G(this):L(this),null;if(t=z(t,e),0===t&&e.ended)return 0===e.length&&G(this),null;var n,i=e.needReadable;return h("need readable",i),(0===e.length||e.length-t0?$(t,e):null,null===n?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&G(this)),null!==n&&this.emit("data",n),n},I.prototype._read=function(t){E(this,new S("_read()"))},I.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t);break}n.pipesCount+=1,h("pipe count=%d opts=%j",n.pipesCount,e);var u=(!e||!1!==e.end)&&t!==i.stdout&&t!==i.stderr,a=u?f:y;function s(t,e){h("onunpipe"),t===r&&e&&!1===e.hasUnpiped&&(e.hasUnpiped=!0,d())}function f(){h("onend"),t.end()}n.endEmitted?i.nextTick(a):r.once("end",a),t.on("unpipe",s);var c=D(r);t.on("drain",c);var l=!1;function d(){h("cleanup"),t.removeListener("close",g),t.removeListener("finish",m),t.removeListener("drain",c),t.removeListener("error",b),t.removeListener("unpipe",s),r.removeListener("end",f),r.removeListener("end",y),r.removeListener("data",p),l=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||c()}function p(e){h("ondata");var i=t.write(e);h("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==Y(n.pipes,t))&&!l&&(h("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function b(e){h("onerror",e),y(),t.removeListener("error",b),0===o(t,"error")&&E(t,e)}function g(){t.removeListener("finish",m),y()}function m(){h("onfinish"),t.removeListener("close",g),y()}function y(){h("unpipe"),r.unpipe(t)}return r.on("data",p),x(t,"error",b),t.once("close",g),t.once("finish",m),t.emit("pipe",r),n.flowing||(h("pipe resume"),r.resume()),t},I.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,h("on readable",n.length,n.reading),n.length?L(this):n.reading||i.nextTick(K,this))),r},I.prototype.addListener=I.prototype.on,I.prototype.removeListener=function(t,e){var r=u.prototype.removeListener.call(this,t,e);return"readable"===t&&i.nextTick(F,this),r},I.prototype.removeAllListeners=function(t){var e=u.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||i.nextTick(F,this),e},I.prototype.resume=function(){var t=this._readableState;return t.flowing||(h("resume"),t.flowing=!t.readableListening,H(this,t)),t.paused=!1,this},I.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},I.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(h("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){if(h("wrapped data"),r.decoder&&(i=r.decoder.write(i)),(!r.objectMode||null!==i&&void 0!==i)&&(r.objectMode||i&&i.length)){var o=e.push(i);o||(n=!0,t.pause())}})),t)void 0===this[i]&&"function"===typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o-1))throw new A(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(O.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(O.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),O.prototype._write=function(t,e,r){r(new y("_write()"))},O.prototype._writev=null,O.prototype.end=function(t,e,r){var n=this._writableState;return"function"===typeof t?(r=t,t=null,e=null):"function"===typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||H(this,n,r),this},Object.defineProperty(O.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),O.prototype.destroy=d.destroy,O.prototype._undestroy=d.undestroy,O.prototype._destroy=function(t,e){e(t)}},4699:function(t,e,r){"use strict";var n,i=r(4478);function o(t,e,r){return e=u(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t){var e=a(t,"string");return"symbol"===typeof e?e:String(e)}function a(t,e){if("object"!==typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var s=r(6616),f=Symbol("lastResolve"),c=Symbol("lastReject"),h=Symbol("error"),l=Symbol("ended"),d=Symbol("lastPromise"),p=Symbol("handlePromise"),b=Symbol("stream");function g(t,e){return{value:t,done:e}}function m(t){var e=t[f];if(null!==e){var r=t[b].read();null!==r&&(t[d]=null,t[f]=null,t[c]=null,e(g(r,!1)))}}function y(t){i.nextTick(m,t)}function v(t,e){return function(r,n){t.then((function(){e[l]?r(g(void 0,!0)):e[p](r,n)}),n)}}var w=Object.getPrototypeOf((function(){})),_=Object.setPrototypeOf((n={get stream(){return this[b]},next:function(){var t=this,e=this[h];if(null!==e)return Promise.reject(e);if(this[l])return Promise.resolve(g(void 0,!0));if(this[b].destroyed)return new Promise((function(e,r){i.nextTick((function(){t[h]?r(t[h]):e(g(void 0,!0))}))}));var r,n=this[d];if(n)r=new Promise(v(n,this));else{var o=this[b].read();if(null!==o)return Promise.resolve(g(o,!1));r=new Promise(this[p])}return this[d]=r,r}},o(n,Symbol.asyncIterator,(function(){return this})),o(n,"return",(function(){var t=this;return new Promise((function(e,r){t[b].destroy(null,(function(t){t?r(t):e(g(void 0,!0))}))}))})),n),w),M=function(t){var e,r=Object.create(_,(e={},o(e,b,{value:t,writable:!0}),o(e,f,{value:null,writable:!0}),o(e,c,{value:null,writable:!0}),o(e,h,{value:null,writable:!0}),o(e,l,{value:t._readableState.endEmitted,writable:!0}),o(e,p,{value:function(t,e){var n=r[b].read();n?(r[d]=null,r[f]=null,r[c]=null,t(g(n,!1))):(r[f]=t,r[c]=e)},writable:!0}),e));return r[d]=null,s(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[c];return null!==e&&(r[d]=null,r[f]=null,r[c]=null,e(t)),void(r[h]=t)}var n=r[f];null!==n&&(r[d]=null,r[f]=null,r[c]=null,n(g(void 0,!0))),r[l]=!0})),t.on("readable",y.bind(null,r)),r};t.exports=M},8617:function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;e0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";var e=this.head,r=""+e.data;while(e=e.next)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return l.alloc(0);var e=l.allocUnsafe(t>>>0),r=this.head,n=0;while(r)g(r.data,e,n),n+=r.data.length,r=r.next;return e}},{key:"consume",value:function(t,e){var r;return ti.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),t-=o,0===t){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=l.allocUnsafe(t),r=this.head,n=1;r.data.copy(e),t-=r.data.length;while(r=r.next){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),t-=o,0===t){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:b,value:function(t,e){return p(this,i(i({},e),{},{depth:0,customInspect:!1}))}}]),t}()},3847:function(t,e,r){"use strict";var n=r(4478);function i(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return i||a?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(s,this,t)):n.nextTick(s,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?r._writableState?r._writableState.errorEmitted?n.nextTick(u,r):(r._writableState.errorEmitted=!0,n.nextTick(o,r,t)):n.nextTick(o,r,t):e?(n.nextTick(u,r),e(t)):n.nextTick(u,r)})),this)}function o(t,e){s(t,e),u(t)}function u(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function a(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function s(t,e){t.emit("error",e)}function f(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}t.exports={destroy:i,undestroy:a,errorOrDestroy:f}},6616:function(t,e,r){"use strict";var n=r(3708).q.ERR_STREAM_PREMATURE_CLOSE;function i(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i0;return c(t,u,a,(function(t){n||(n=t),t&&o.forEach(h),u||(o.forEach(h),i(n))}))}));return e.reduce(l)}t.exports=p},7529:function(t,e,r){"use strict";var n=r(3708).q.ERR_INVALID_OPT_VALUE;function i(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}function o(t,e,r,o){var u=i(e,o,r);if(null!=u){if(!isFinite(u)||Math.floor(u)!==u||u<0){var a=o?r:"highWaterMark";throw new n(a,u)}return Math.floor(u)}return t.objectMode?16:16384}t.exports={getHighWaterMark:o}},4593:function(t,e,r){t.exports=r(3953).EventEmitter},7370:function(t,e,r){e=t.exports=r(2218),e.Stream=e,e.Readable=e,e.Writable=r(8874),e.Duplex=r(3297),e.Transform=r(8655),e.PassThrough=r(3413),e.finished=r(6616),e.pipeline=r(3788)},76:function(t,e,r){"use strict";var n=r(480).Buffer,i=r(2068),o=r(9511),u=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],s=[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],f=[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],c=[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],h=[0,1518500249,1859775393,2400959708,2840853838],l=[1352829926,1548603684,1836072691,2053994217,0];function d(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(t,e){return t<>>32-e}function b(t,e,r,n,i,o,u,a){return p(t+(e^r^n)+o+u|0,a)+i|0}function g(t,e,r,n,i,o,u,a){return p(t+(e&r|~e&n)+o+u|0,a)+i|0}function m(t,e,r,n,i,o,u,a){return p(t+((e|~r)^n)+o+u|0,a)+i|0}function y(t,e,r,n,i,o,u,a){return p(t+(e&n|r&~n)+o+u|0,a)+i|0}function v(t,e,r,n,i,o,u,a){return p(t+(e^(r|~n))+o+u|0,a)+i|0}i(d,o),d.prototype._update=function(){for(var t=u,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,d=0|this._e,w=0|this._a,_=0|this._b,M=0|this._c,S=0|this._d,A=0|this._e,E=0;E<80;E+=1){var k,x;E<16?(k=b(r,n,i,o,d,t[a[E]],h[0],f[E]),x=v(w,_,M,S,A,t[s[E]],l[0],c[E])):E<32?(k=g(r,n,i,o,d,t[a[E]],h[1],f[E]),x=y(w,_,M,S,A,t[s[E]],l[1],c[E])):E<48?(k=m(r,n,i,o,d,t[a[E]],h[2],f[E]),x=m(w,_,M,S,A,t[s[E]],l[2],c[E])):E<64?(k=y(r,n,i,o,d,t[a[E]],h[3],f[E]),x=g(w,_,M,S,A,t[s[E]],l[3],c[E])):(k=v(r,n,i,o,d,t[a[E]],h[4],f[E]),x=b(w,_,M,S,A,t[s[E]],l[4],c[E])),r=d,d=o,o=p(i,10),i=n,n=k,w=A,A=S,S=p(M,10),M=_,_=x}var O=this._b+i+S|0;this._b=this._c+o+A|0,this._c=this._d+d+w|0,this._d=this._e+r+_|0,this._e=this._a+n+M|0,this._a=O},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=n.alloc?n.alloc(20):new n(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=d},1224:function(t,e,r){"use strict";var n=r(480)["Buffer"];r(7658),r(3767),r(8585),r(8696);var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.getLength=e.decode=e.encode=void 0;var o=i(r(6170));function u(t){if(Array.isArray(t)){for(var e=[],r=0;rt.length)throw new Error("invalid rlp: total length is larger than the data");if(o=t.slice(r,c),0===o.length)throw new Error("invalid rlp, List has a invalid length");while(o.length)u=h(o),s.push(u.data),o=u.remainder;return{data:s,remainder:t.slice(c)}}function l(t){return"0x"===t.slice(0,2)}function d(t){return"string"!==typeof t?t:l(t)?t.slice(2):t}function p(t){if(t<0)throw new Error("Invalid integer as argument, must be unsigned!");var e=t.toString(16);return e.length%2?"0"+e:e}function b(t){return t.length%2?"0"+t:t}function g(t){var e=p(t);return n.from(e,"hex")}function m(t){if(!n.isBuffer(t)){if("string"===typeof t)return l(t)?n.from(b(d(t)),"hex"):n.from(t);if("number"===typeof t||"bigint"===typeof t)return t?g(t):n.from([]);if(null===t||void 0===t)return n.from([]);if(t instanceof Uint8Array)return n.from(t);if(o.default.isBN(t))return n.from(t.toArray());throw new Error("invalid type")}return t}e.encode=u,e.decode=f,e.getLength=c},7186:function(t,e,r){ /*! safe-buffer. MIT License. Feross Aboukhadijeh */ var n=r(480),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function u(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=u),u.prototype=Object.create(i.prototype),o(i,u),u.from=function(t,e,r){if("number"===typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},u.alloc=function(t,e,r){if("number"!==typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"===typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},u.allocUnsafe=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return i(t)},u.allocUnsafeSlow=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},3830:function(t,e,r){t.exports=r(7696)(r(6736))},6736:function(t,e,r){r(3767),r(8585),r(8696);const n=r(1415).ec,i=new n("secp256k1"),o=i.curve,u=o.n.constructor;function a(t,e){let r=new u(e);if(r.cmp(o.p)>=0)return null;r=r.toRed(o.red);let n=r.redSqr().redIMul(r).redIAdd(o.b).redSqrt();return 3===t!==n.isOdd()&&(n=n.redNeg()),i.keyPair({pub:{x:r,y:n}})}function s(t,e,r){let n=new u(e),a=new u(r);if(n.cmp(o.p)>=0||a.cmp(o.p)>=0)return null;if(n=n.toRed(o.red),a=a.toRed(o.red),(6===t||7===t)&&a.isOdd()!==(7===t))return null;const s=n.redSqr().redIMul(n);return a.redSqr().redISub(s.redIAdd(o.b)).isZero()?i.keyPair({pub:{x:n,y:a}}):null}function f(t){const e=t[0];switch(e){case 2:case 3:return 33!==t.length?null:a(e,t.subarray(1,33));case 4:case 6:case 7:return 65!==t.length?null:s(e,t.subarray(1,33),t.subarray(33,65));default:return null}}function c(t,e){const r=e.encode(null,33===t.length);for(let n=0;n=0)return 1;if(r.iadd(new u(t)),r.cmp(o.n)>=0&&r.isub(o.n),r.isZero())return 1;const n=r.toArrayLike(Uint8Array,"be",32);return t.set(n),0},privateKeyTweakMul(t,e){let r=new u(e);if(r.cmp(o.n)>=0||r.isZero())return 1;r.imul(new u(t)),r.cmp(o.n)>=0&&(r=r.umod(o.n));const n=r.toArrayLike(Uint8Array,"be",32);return t.set(n),0},publicKeyVerify(t){const e=f(t);return null===e?1:0},publicKeyCreate(t,e){const r=new u(e);if(r.cmp(o.n)>=0||r.isZero())return 1;const n=i.keyFromPrivate(e).getPublic();return c(t,n),0},publicKeyConvert(t,e){const r=f(e);if(null===r)return 1;const n=r.getPublic();return c(t,n),0},publicKeyNegate(t,e){const r=f(e);if(null===r)return 1;const n=r.getPublic();return n.y=n.y.redNeg(),c(t,n),0},publicKeyCombine(t,e){const r=new Array(e.length);for(let i=0;i=0)return 2;const i=n.getPublic().add(o.g.mul(r));return i.isInfinity()?2:(c(t,i),0)},publicKeyTweakMul(t,e,r){const n=f(e);if(null===n)return 1;if(r=new u(r),r.cmp(o.n)>=0||r.isZero())return 2;const i=n.getPublic().mul(r);return c(t,i),0},signatureNormalize(t){const e=new u(t.subarray(0,32)),r=new u(t.subarray(32,64));return e.cmp(o.n)>=0||r.cmp(o.n)>=0?1:(1===r.cmp(i.nh)&&t.set(o.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(t,e){const r=e.subarray(0,32),n=e.subarray(32,64);if(new u(r).cmp(o.n)>=0)return 1;if(new u(n).cmp(o.n)>=0)return 1;const{output:i}=t;let a=i.subarray(4,37);a[0]=0,a.set(r,1);let s=33,f=0;for(;s>1&&0===a[f]&&!(128&a[f+1]);--s,++f);if(a=a.subarray(f),128&a[0])return 1;if(s>1&&0===a[0]&&!(128&a[1]))return 1;let c=i.subarray(39,72);c[0]=0,c.set(n,1);let h=33,l=0;for(;h>1&&0===c[l]&&!(128&c[l+1]);--h,++l);return c=c.subarray(l),128&c[0]||h>1&&0===c[0]&&!(128&c[1])?1:(t.outputlen=6+s+h,i[0]=48,i[1]=t.outputlen-2,i[2]=2,i[3]=a.length,i.set(a,4),i[4+s]=2,i[5+s]=c.length,i.set(c,6+s),0)},signatureImport(t,e){if(e.length<8)return 1;if(e.length>72)return 1;if(48!==e[0])return 1;if(e[1]!==e.length-2)return 1;if(2!==e[2])return 1;const r=e[3];if(0===r)return 1;if(5+r>=e.length)return 1;if(2!==e[4+r])return 1;const n=e[5+r];if(0===n)return 1;if(6+r+n!==e.length)return 1;if(128&e[4])return 1;if(r>1&&0===e[4]&&!(128&e[5]))return 1;if(128&e[r+6])return 1;if(n>1&&0===e[r+6]&&!(128&e[r+7]))return 1;let i=e.subarray(4,4+r);if(33===i.length&&0===i[0]&&(i=i.subarray(1)),i.length>32)return 1;let a=e.subarray(6+r);if(33===a.length&&0===a[0]&&(a=a.slice(1)),a.length>32)throw new Error("S length is too long");let s=new u(i);s.cmp(o.n)>=0&&(s=new u(0));let f=new u(e.subarray(6+r));return f.cmp(o.n)>=0&&(f=new u(0)),t.set(s.toArrayLike(Uint8Array,"be",32),0),t.set(f.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(t,e,r,n,a){if(a){const t=a;a=i=>{const o=t(e,r,null,n,i),a=o instanceof Uint8Array&&32===o.length;if(!a)throw new Error("This is the way");return new u(o)}}const s=new u(r);if(s.cmp(o.n)>=0||s.isZero())return 1;let f;try{f=i.sign(e,r,{canonical:!0,k:a,pers:n})}catch(c){return 1}return t.signature.set(f.r.toArrayLike(Uint8Array,"be",32),0),t.signature.set(f.s.toArrayLike(Uint8Array,"be",32),32),t.recid=f.recoveryParam,0},ecdsaVerify(t,e,r){const n={r:t.subarray(0,32),s:t.subarray(32,64)},a=new u(n.r),s=new u(n.s);if(a.cmp(o.n)>=0||s.cmp(o.n)>=0)return 1;if(1===s.cmp(i.nh)||a.isZero()||s.isZero())return 3;const c=f(r);if(null===c)return 2;const h=c.getPublic(),l=i.verify(e,n,h);return l?0:3},ecdsaRecover(t,e,r,n){const a={r:e.slice(0,32),s:e.slice(32,64)},s=new u(a.r),f=new u(a.s);if(s.cmp(o.n)>=0||f.cmp(o.n)>=0)return 1;if(s.isZero()||f.isZero())return 2;let h;try{h=i.recoverPubKey(n,a,r)}catch(l){return 2}return c(t,h),0},ecdh(t,e,r,n,a,s,c){const h=f(e);if(null===h)return 1;const l=new u(r);if(l.cmp(o.n)>=0||l.isZero())return 2;const d=h.getPublic().mul(l);if(void 0===a){const e=d.encode(null,!0),r=i.hash().update(e).digest();for(let n=0;n<32;++n)t[n]=r[n]}else{s||(s=new Uint8Array(32));const e=d.getX().toArray("be",32);for(let t=0;t<32;++t)s[t]=e[t];c||(c=new Uint8Array(32));const r=d.getY().toArray("be",32);for(let t=0;t<32;++t)c[t]=r[t];const i=a(s,c,n),o=i instanceof Uint8Array&&i.length===t.length;if(!o)return 2;t.set(i)}return 0}}},7696:function(t,e,r){r(3767),r(8585),r(8696);const n={IMPOSSIBLE_CASE:"Impossible case. Please create issue.",TWEAK_ADD:"The tweak was out of range or the resulted private key is invalid",TWEAK_MUL:"The tweak was out of range or equal to zero",CONTEXT_RANDOMIZE_UNKNOW:"Unknow error on context randomization",SECKEY_INVALID:"Private Key is invalid",PUBKEY_PARSE:"Public Key could not be parsed",PUBKEY_SERIALIZE:"Public Key serialization error",PUBKEY_COMBINE:"The sum of the public keys is not valid",SIG_PARSE:"Signature could not be parsed",SIGN:"The nonce generation function failed, or the private key was invalid",RECOVER:"Public key could not be recover",ECDH:"Scalar was invalid (zero or overflow)"};function i(t,e){if(!t)throw new Error(e)}function o(t,e,r){if(i(e instanceof Uint8Array,`Expected ${t} to be an Uint8Array`),void 0!==r)if(Array.isArray(r)){const n=r.join(", "),o=`Expected ${t} to be an Uint8Array with length [${n}]`;i(r.includes(e.length),o)}else{const n=`Expected ${t} to be an Uint8Array with length ${r}`;i(e.length===r,n)}}function u(t){i("Boolean"===s(t),"Expected compressed to be a Boolean")}function a(t=(t=>new Uint8Array(t)),e){return"function"===typeof t&&(t=t(e)),o("output",t,e),t}function s(t){return Object.prototype.toString.call(t).slice(8,-1)}t.exports=t=>({contextRandomize(e){switch(i(null===e||e instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==e&&o("seed",e,32),t.contextRandomize(e)){case 1:throw new Error(n.CONTEXT_RANDOMIZE_UNKNOW)}},privateKeyVerify(e){return o("private key",e,32),0===t.privateKeyVerify(e)},privateKeyNegate(e){switch(o("private key",e,32),t.privateKeyNegate(e)){case 0:return e;case 1:throw new Error(n.IMPOSSIBLE_CASE)}},privateKeyTweakAdd(e,r){switch(o("private key",e,32),o("tweak",r,32),t.privateKeyTweakAdd(e,r)){case 0:return e;case 1:throw new Error(n.TWEAK_ADD)}},privateKeyTweakMul(e,r){switch(o("private key",e,32),o("tweak",r,32),t.privateKeyTweakMul(e,r)){case 0:return e;case 1:throw new Error(n.TWEAK_MUL)}},publicKeyVerify(e){return o("public key",e,[33,65]),0===t.publicKeyVerify(e)},publicKeyCreate(e,r=!0,i){switch(o("private key",e,32),u(r),i=a(i,r?33:65),t.publicKeyCreate(i,e)){case 0:return i;case 1:throw new Error(n.SECKEY_INVALID);case 2:throw new Error(n.PUBKEY_SERIALIZE)}},publicKeyConvert(e,r=!0,i){switch(o("public key",e,[33,65]),u(r),i=a(i,r?33:65),t.publicKeyConvert(i,e)){case 0:return i;case 1:throw new Error(n.PUBKEY_PARSE);case 2:throw new Error(n.PUBKEY_SERIALIZE)}},publicKeyNegate(e,r=!0,i){switch(o("public key",e,[33,65]),u(r),i=a(i,r?33:65),t.publicKeyNegate(i,e)){case 0:return i;case 1:throw new Error(n.PUBKEY_PARSE);case 2:throw new Error(n.IMPOSSIBLE_CASE);case 3:throw new Error(n.PUBKEY_SERIALIZE)}},publicKeyCombine(e,r=!0,s){i(Array.isArray(e),"Expected public keys to be an Array"),i(e.length>0,"Expected public keys array will have more than zero items");for(const t of e)o("public key",t,[33,65]);switch(u(r),s=a(s,r?33:65),t.publicKeyCombine(s,e)){case 0:return s;case 1:throw new Error(n.PUBKEY_PARSE);case 2:throw new Error(n.PUBKEY_COMBINE);case 3:throw new Error(n.PUBKEY_SERIALIZE)}},publicKeyTweakAdd(e,r,i=!0,s){switch(o("public key",e,[33,65]),o("tweak",r,32),u(i),s=a(s,i?33:65),t.publicKeyTweakAdd(s,e,r)){case 0:return s;case 1:throw new Error(n.PUBKEY_PARSE);case 2:throw new Error(n.TWEAK_ADD)}},publicKeyTweakMul(e,r,i=!0,s){switch(o("public key",e,[33,65]),o("tweak",r,32),u(i),s=a(s,i?33:65),t.publicKeyTweakMul(s,e,r)){case 0:return s;case 1:throw new Error(n.PUBKEY_PARSE);case 2:throw new Error(n.TWEAK_MUL)}},signatureNormalize(e){switch(o("signature",e,64),t.signatureNormalize(e)){case 0:return e;case 1:throw new Error(n.SIG_PARSE)}},signatureExport(e,r){o("signature",e,64),r=a(r,72);const i={output:r,outputlen:72};switch(t.signatureExport(i,e)){case 0:return r.slice(0,i.outputlen);case 1:throw new Error(n.SIG_PARSE);case 2:throw new Error(n.IMPOSSIBLE_CASE)}},signatureImport(e,r){switch(o("signature",e),r=a(r,64),t.signatureImport(r,e)){case 0:return r;case 1:throw new Error(n.SIG_PARSE);case 2:throw new Error(n.IMPOSSIBLE_CASE)}},ecdsaSign(e,r,u={},f){o("message",e,32),o("private key",r,32),i("Object"===s(u),"Expected options to be an Object"),void 0!==u.data&&o("options.data",u.data),void 0!==u.noncefn&&i("Function"===s(u.noncefn),"Expected options.noncefn to be a Function"),f=a(f,64);const c={signature:f,recid:null};switch(t.ecdsaSign(c,e,r,u.data,u.noncefn)){case 0:return c;case 1:throw new Error(n.SIGN);case 2:throw new Error(n.IMPOSSIBLE_CASE)}},ecdsaVerify(e,r,i){switch(o("signature",e,64),o("message",r,32),o("public key",i,[33,65]),t.ecdsaVerify(e,r,i)){case 0:return!0;case 3:return!1;case 1:throw new Error(n.SIG_PARSE);case 2:throw new Error(n.PUBKEY_PARSE)}},ecdsaRecover(e,r,f,c=!0,h){switch(o("signature",e,64),i("Number"===s(r)&&r>=0&&r<=3,"Expected recovery id to be a Number within interval [0, 3]"),o("message",f,32),u(c),h=a(h,c?33:65),t.ecdsaRecover(h,e,r,f)){case 0:return h;case 1:throw new Error(n.SIG_PARSE);case 2:throw new Error(n.RECOVER);case 3:throw new Error(n.IMPOSSIBLE_CASE)}},ecdh(e,r,u={},f){switch(o("public key",e,[33,65]),o("private key",r,32),i("Object"===s(u),"Expected options to be an Object"),void 0!==u.data&&o("options.data",u.data),void 0!==u.hashfn?(i("Function"===s(u.hashfn),"Expected options.hashfn to be a Function"),void 0!==u.xbuf&&o("options.xbuf",u.xbuf,32),void 0!==u.ybuf&&o("options.ybuf",u.ybuf,32),o("output",f)):f=a(f,32),t.ecdh(f,e,r,u.data,u.hashfn,u.xbuf,u.ybuf)){case 0:return f;case 1:throw new Error(n.PUBKEY_PARSE);case 2:throw new Error(n.ECDH)}}})},4857:function(t,e,r){var n=r(7186).Buffer;function i(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"===typeof t&&(e=e||"utf8",t=n.from(t,e));for(var r=this._block,i=this._blockSize,o=t.length,u=this._len,a=0;a=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},8522:function(t,e,r){var n=t.exports=function(t){t=t.toLowerCase();var e=n[t];if(!e)throw new Error(t+" is not supported (we accept pull requests)");return new e};n.sha=r(1578),n.sha1=r(390),n.sha224=r(5933),n.sha256=r(4803),n.sha384=r(36),n.sha512=r(2171)},1578:function(t,e,r){var n=r(2068),i=r(4857),o=r(7186).Buffer,u=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function s(){this.init(),this._w=a,i.call(this,64,56)}function f(t){return t<<5|t>>>27}function c(t){return t<<30|t>>>2}function h(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(s,i),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},s.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,s=0;s<16;++s)e[s]=t.readInt32BE(4*s);for(;s<80;++s)e[s]=e[s-3]^e[s-8]^e[s-14]^e[s-16];for(var l=0;l<80;++l){var d=~~(l/20),p=f(r)+h(d,n,i,o)+a+e[l]+u[d]|0;a=o,o=i,i=c(n),n=r,r=p}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0},s.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=s},390:function(t,e,r){var n=r(2068),i=r(4857),o=r(7186).Buffer,u=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function s(){this.init(),this._w=a,i.call(this,64,56)}function f(t){return t<<1|t>>>31}function c(t){return t<<5|t>>>27}function h(t){return t<<30|t>>>2}function l(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(s,i),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},s.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,s=0;s<16;++s)e[s]=t.readInt32BE(4*s);for(;s<80;++s)e[s]=f(e[s-3]^e[s-8]^e[s-14]^e[s-16]);for(var d=0;d<80;++d){var p=~~(d/20),b=c(r)+l(p,n,i,o)+a+e[d]+u[p]|0;a=o,o=i,i=h(n),n=r,r=b}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0},s.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=s},5933:function(t,e,r){var n=r(2068),i=r(4803),o=r(4857),u=r(7186).Buffer,a=new Array(64);function s(){this.init(),this._w=a,o.call(this,64,56)}n(s,i),s.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},s.prototype._hash=function(){var t=u.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=s},4803:function(t,e,r){var n=r(2068),i=r(4857),o=r(7186).Buffer,u=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function s(){this.init(),this._w=a,i.call(this,64,56)}function f(t,e,r){return r^t&(e^r)}function c(t,e,r){return t&e|r&(t|e)}function h(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function l(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function d(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function p(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}n(s,i),s.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},s.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,s=0|this._f,b=0|this._g,g=0|this._h,m=0;m<16;++m)e[m]=t.readInt32BE(4*m);for(;m<64;++m)e[m]=p(e[m-2])+e[m-7]+d(e[m-15])+e[m-16]|0;for(var y=0;y<64;++y){var v=g+l(a)+f(a,s,b)+u[y]+e[y]|0,w=h(r)+c(r,n,i)|0;g=b,b=s,s=a,a=o+v|0,o=i,i=n,n=r,r=v+w|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0,this._f=s+this._f|0,this._g=b+this._g|0,this._h=g+this._h|0},s.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=s},36:function(t,e,r){var n=r(2068),i=r(2171),o=r(4857),u=r(7186).Buffer,a=new Array(160);function s(){this.init(),this._w=a,o.call(this,128,112)}n(s,i),s.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},s.prototype._hash=function(){var t=u.allocUnsafe(48);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=s},2171:function(t,e,r){var n=r(2068),i=r(4857),o=r(7186).Buffer,u=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function s(){this.init(),this._w=a,i.call(this,128,112)}function f(t,e,r){return r^t&(e^r)}function c(t,e,r){return t&e|r&(t|e)}function h(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function l(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function b(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function m(t,e){return t>>>0>>0?1:0}n(s,i),s.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},s.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,s=0|this._fh,y=0|this._gh,v=0|this._hh,w=0|this._al,_=0|this._bl,M=0|this._cl,S=0|this._dl,A=0|this._el,E=0|this._fl,k=0|this._gl,x=0|this._hl,O=0;O<32;O+=2)e[O]=t.readInt32BE(4*O),e[O+1]=t.readInt32BE(4*O+4);for(;O<160;O+=2){var I=e[O-30],R=e[O-30+1],j=d(I,R),B=p(R,I);I=e[O-4],R=e[O-4+1];var P=b(I,R),T=g(R,I),z=e[O-14],N=e[O-14+1],L=e[O-32],C=e[O-32+1],q=B+N|0,U=j+z+m(q,B)|0;q=q+T|0,U=U+P+m(q,T)|0,q=q+C|0,U=U+L+m(q,C)|0,e[O]=U,e[O+1]=q}for(var D=0;D<160;D+=2){U=e[D],q=e[D+1];var F=c(r,n,i),K=c(w,_,M),H=h(r,w),W=h(w,r),V=l(a,A),$=l(A,a),G=u[D],Z=u[D+1],Y=f(a,s,y),J=f(A,E,k),X=x+$|0,Q=v+V+m(X,x)|0;X=X+J|0,Q=Q+Y+m(X,J)|0,X=X+Z|0,Q=Q+G+m(X,Z)|0,X=X+q|0,Q=Q+U+m(X,q)|0;var tt=W+K|0,et=H+F+m(tt,W)|0;v=y,x=k,y=s,k=E,s=a,E=A,A=S+X|0,a=o+Q+m(A,S)|0,o=i,S=M,i=n,M=_,n=r,_=w,w=X+tt|0,r=Q+et+m(w,X)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+M|0,this._dl=this._dl+S|0,this._el=this._el+A|0,this._fl=this._fl+E|0,this._gl=this._gl+k|0,this._hl=this._hl+x|0,this._ah=this._ah+r+m(this._al,w)|0,this._bh=this._bh+n+m(this._bl,_)|0,this._ch=this._ch+i+m(this._cl,M)|0,this._dh=this._dh+o+m(this._dl,S)|0,this._eh=this._eh+a+m(this._el,A)|0,this._fh=this._fh+s+m(this._fl,E)|0,this._gh=this._gh+y+m(this._gl,k)|0,this._hh=this._hh+v+m(this._hl,x)|0},s.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=s},8201:function(t,e,r){t.exports=o;var n=r(3953).EventEmitter,i=r(2068);function o(){n.call(this)}i(o,n),o.Readable=r(2218),o.Writable=r(8874),o.Duplex=r(3297),o.Transform=r(8655),o.PassThrough=r(3413),o.finished=r(6616),o.pipeline=r(3788),o.Stream=o,o.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",s));var u=!1;function a(){u||(u=!0,t.end())}function s(){u||(u=!0,"function"===typeof t.destroy&&t.destroy())}function f(t){if(c(),0===n.listenerCount(this,"error"))throw t}function c(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",s),r.removeListener("error",f),t.removeListener("error",f),r.removeListener("end",c),r.removeListener("close",c),t.removeListener("close",c)}return r.on("error",f),t.on("error",f),r.on("end",c),r.on("close",c),t.on("close",c),t.emit("pipe",r),t}},8032:function(t,e,r){"use strict";var n=r(7186).Buffer,i=n.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){if(!t)return"utf8";var e;while(1)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function u(t){var e=o(t);if("string"!==typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}function a(t){var e;switch(this.encoding=u(t),this.encoding){case"utf16le":this.text=p,this.end=b,e=4;break;case"utf8":this.fillLast=h,e=4;break;case"base64":this.text=g,this.end=m,e=3;break;default:return this.write=y,void(this.end=v)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function f(t,e,r){var n=e.length-1;if(n=0?(i>0&&(t.lastNeed=i-1),i):--n=0?(i>0&&(t.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0))}function c(t,e,r){if(128!==(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!==(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!==(192&e[2]))return t.lastNeed=2,"�"}}function h(t){var e=this.lastTotal-this.lastNeed,r=c(this,t,e);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function l(t,e){var r=f(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function d(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e}function p(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function b(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function g(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function m(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function y(t){return t.toString(this.encoding)}function v(t){return t&&t.length?this.write(t):""}e.s=a,a.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),void 0===e)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return rr.length&&(r=`${"0".repeat(e.size-r.length)}${r}`),e.evenLength&&r.length%2&&(r=`0${r}`),e.addPrefix&&(r=`0x${r}`)),r}t.exports=u},5180:function(t,e,r){var n=r(2409);function i(t,e){if(o("noDeprecation"))return t;var r=!1;function i(){if(!r){if(o("throwDeprecation"))throw new Error(e);o("traceDeprecation")?n.trace(e):n.warn(e),r=!0}return t.apply(this,arguments)}return i}function o(t){try{if(!r.g.localStorage)return!1}catch(n){return!1}var e=r.g.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=i},1583:function(t){t.exports=function(t){return t&&"object"===typeof t&&"function"===typeof t.copy&&"function"===typeof t.fill&&"function"===typeof t.readUInt8}},4513:function(t,e,r){"use strict";r(3767),r(8585),r(8696);var n=r(2039),i=r(1113),o=r(6996),u=r(9529);function a(t){return t.call.bind(t)}var s="undefined"!==typeof BigInt,f="undefined"!==typeof Symbol,c=a(Object.prototype.toString),h=a(Number.prototype.valueOf),l=a(String.prototype.valueOf),d=a(Boolean.prototype.valueOf);if(s)var p=a(BigInt.prototype.valueOf);if(f)var b=a(Symbol.prototype.valueOf);function g(t,e){if("object"!==typeof t)return!1;try{return e(t),!0}catch(r){return!1}}function m(t){return"undefined"!==typeof Promise&&t instanceof Promise||null!==t&&"object"===typeof t&&"function"===typeof t.then&&"function"===typeof t.catch}function y(t){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):u(t)||D(t)}function v(t){return"Uint8Array"===o(t)}function w(t){return"Uint8ClampedArray"===o(t)}function _(t){return"Uint16Array"===o(t)}function M(t){return"Uint32Array"===o(t)}function S(t){return"Int8Array"===o(t)}function A(t){return"Int16Array"===o(t)}function E(t){return"Int32Array"===o(t)}function k(t){return"Float32Array"===o(t)}function x(t){return"Float64Array"===o(t)}function O(t){return"BigInt64Array"===o(t)}function I(t){return"BigUint64Array"===o(t)}function R(t){return"[object Map]"===c(t)}function j(t){return"undefined"!==typeof Map&&(R.working?R(t):t instanceof Map)}function B(t){return"[object Set]"===c(t)}function P(t){return"undefined"!==typeof Set&&(B.working?B(t):t instanceof Set)}function T(t){return"[object WeakMap]"===c(t)}function z(t){return"undefined"!==typeof WeakMap&&(T.working?T(t):t instanceof WeakMap)}function N(t){return"[object WeakSet]"===c(t)}function L(t){return N(t)}function C(t){return"[object ArrayBuffer]"===c(t)}function q(t){return"undefined"!==typeof ArrayBuffer&&(C.working?C(t):t instanceof ArrayBuffer)}function U(t){return"[object DataView]"===c(t)}function D(t){return"undefined"!==typeof DataView&&(U.working?U(t):t instanceof DataView)}e.isArgumentsObject=n,e.isGeneratorFunction=i,e.isTypedArray=u,e.isPromise=m,e.isArrayBufferView=y,e.isUint8Array=v,e.isUint8ClampedArray=w,e.isUint16Array=_,e.isUint32Array=M,e.isInt8Array=S,e.isInt16Array=A,e.isInt32Array=E,e.isFloat32Array=k,e.isFloat64Array=x,e.isBigInt64Array=O,e.isBigUint64Array=I,R.working="undefined"!==typeof Map&&R(new Map),e.isMap=j,B.working="undefined"!==typeof Set&&B(new Set),e.isSet=P,T.working="undefined"!==typeof WeakMap&&T(new WeakMap),e.isWeakMap=z,N.working="undefined"!==typeof WeakSet&&N(new WeakSet),e.isWeakSet=L,C.working="undefined"!==typeof ArrayBuffer&&C(new ArrayBuffer),e.isArrayBuffer=q,U.working="undefined"!==typeof ArrayBuffer&&"undefined"!==typeof DataView&&U(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=D;var F="undefined"!==typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function K(t){return"[object SharedArrayBuffer]"===c(t)}function H(t){return"undefined"!==typeof F&&("undefined"===typeof K.working&&(K.working=K(new F)),K.working?K(t):t instanceof F)}function W(t){return"[object AsyncFunction]"===c(t)}function V(t){return"[object Map Iterator]"===c(t)}function $(t){return"[object Set Iterator]"===c(t)}function G(t){return"[object Generator]"===c(t)}function Z(t){return"[object WebAssembly.Module]"===c(t)}function Y(t){return g(t,h)}function J(t){return g(t,l)}function X(t){return g(t,d)}function Q(t){return s&&g(t,p)}function tt(t){return f&&g(t,b)}function et(t){return Y(t)||J(t)||X(t)||Q(t)||tt(t)}function rt(t){return"undefined"!==typeof Uint8Array&&(q(t)||H(t))}e.isSharedArrayBuffer=H,e.isAsyncFunction=W,e.isMapIterator=V,e.isSetIterator=$,e.isGeneratorObject=G,e.isWebAssemblyCompiledModule=Z,e.isNumberObject=Y,e.isStringObject=J,e.isBooleanObject=X,e.isBigIntObject=Q,e.isSymbolObject=tt,e.isBoxedPrimitive=et,e.isAnyArrayBuffer=rt,["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))},9162:function(t,e,r){var n=r(4478),i=r(2409);r(7658);var o=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n=i)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return t}})),a=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),_(r)?n.showHidden=r:r&&e._extend(n,r),x(n.showHidden)&&(n.showHidden=!1),x(n.depth)&&(n.depth=2),x(n.colors)&&(n.colors=!1),x(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=h),p(n,t,n.depth)}function h(t,e){var r=c.styles[e];return r?"["+c.colors[r][0]+"m"+t+"["+c.colors[r][1]+"m":t}function l(t,e){return t}function d(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}function p(t,r,n){if(t.customInspect&&r&&B(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return E(i)||(i=p(t,i,n)),i}var o=b(t,r);if(o)return o;var u=Object.keys(r),a=d(u);if(t.showHidden&&(u=Object.getOwnPropertyNames(r)),j(r)&&(u.indexOf("message")>=0||u.indexOf("description")>=0))return g(r);if(0===u.length){if(B(r)){var s=r.name?": "+r.name:"";return t.stylize("[Function"+s+"]","special")}if(O(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(R(r))return t.stylize(Date.prototype.toString.call(r),"date");if(j(r))return g(r)}var f,c="",h=!1,l=["{","}"];if(w(r)&&(h=!0,l=["[","]"]),B(r)){var _=r.name?": "+r.name:"";c=" [Function"+_+"]"}return O(r)&&(c=" "+RegExp.prototype.toString.call(r)),R(r)&&(c=" "+Date.prototype.toUTCString.call(r)),j(r)&&(c=" "+g(r)),0!==u.length||h&&0!=r.length?n<0?O(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),f=h?m(t,r,n,a,u):u.map((function(e){return y(t,r,n,a,e,h)})),t.seen.pop(),v(f,c,l)):l[0]+c+l[1]}function b(t,e){if(x(e))return t.stylize("undefined","undefined");if(E(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return A(e)?t.stylize(""+e,"number"):_(e)?t.stylize(""+e,"boolean"):M(e)?t.stylize("null","null"):void 0}function g(t){return"["+Error.prototype.toString.call(t)+"]"}function m(t,e,r,n,i){for(var o=[],u=0,a=e.length;u-1&&(a=o?a.split("\n").map((function(t){return" "+t})).join("\n").slice(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n"))):a=t.stylize("[Circular]","special")),x(u)){if(o&&i.match(/^\d+$/))return a;u=JSON.stringify(""+i),u.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.slice(1,-1),u=t.stylize(u,"name")):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=t.stylize(u,"string"))}return u+": "+a}function v(t,e,r){var n=t.reduce((function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);return n>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function w(t){return Array.isArray(t)}function _(t){return"boolean"===typeof t}function M(t){return null===t}function S(t){return null==t}function A(t){return"number"===typeof t}function E(t){return"string"===typeof t}function k(t){return"symbol"===typeof t}function x(t){return void 0===t}function O(t){return I(t)&&"[object RegExp]"===T(t)}function I(t){return"object"===typeof t&&null!==t}function R(t){return I(t)&&"[object Date]"===T(t)}function j(t){return I(t)&&("[object Error]"===T(t)||t instanceof Error)}function B(t){return"function"===typeof t}function P(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t}function T(t){return Object.prototype.toString.call(t)}function z(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!a[t])if(s.test(t)){var r=n.pid;a[t]=function(){var n=e.format.apply(e,arguments);i.error("%s %d: %s",t,r,n)}}else a[t]=function(){};return a[t]},e.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=r(4513),e.isArray=w,e.isBoolean=_,e.isNull=M,e.isNullOrUndefined=S,e.isNumber=A,e.isString=E,e.isSymbol=k,e.isUndefined=x,e.isRegExp=O,e.types.isRegExp=O,e.isObject=I,e.isDate=R,e.types.isDate=R,e.isError=j,e.types.isNativeError=j,e.isFunction=B,e.isPrimitive=P,e.isBuffer=r(1583);var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function L(){var t=new Date,e=[z(t.getHours()),z(t.getMinutes()),z(t.getSeconds())].join(":");return[t.getDate(),N[t.getMonth()],e].join(" ")}function C(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){i.log("%s - %s",L(),e.format.apply(e,arguments))},e.inherits=r(2068),e._extend=function(t,e){if(!e||!I(e))return t;var r=Object.keys(e),n=r.length;while(n--)t[r[n]]=e[r[n]];return t};var q="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function U(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}function D(t){if("function"!==typeof t)throw new TypeError('The "original" argument must be of type Function');function e(){for(var e=[],r=0;r0&&i[i.length-1])&&(6===o[0]||2===o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1])');return s=a().encode(JSON.stringify({signature:u,body:i})),[2,s]}}))}))},b=function(t){return"string"===typeof t&&!!t.length},g=function(t){for(var e in t)if("string"===typeof t[e]&&/\n/.test(t[e]))throw new Error('"'.concat(e,'" option cannot have LF (\\n)'));if(t.domain&&(!b(t.domain)||!l()(t.domain)))throw new Error("Invalid domain format (must be example.com)");if(void 0!==t.uri&&(!b(t.uri)||!d(t.uri)))throw new Error("Invalid uri format (must be https://example.com/login)");if(void 0!==t.chain_id&&("number"!==typeof t.chain_id||isNaN(t.chain_id)))throw new Error("chain_id must be an int");if(t.expiration_time&&!(t.expiration_time instanceof Date))throw new Error("expiration_time must be an instance of Date");if(t.not_before&&!(t.not_before instanceof Date))throw new Error("not_before must be an instance of Date")},m=function(t){var e,r={web3_token_version:"2"};return r.issued_at=new Date,t.expiration_time&&(r.expiration_time=new Date(t.expiration_time)),t.expires_in&&!t.expiration_time&&(r.expiration_time=c(t.expires_in)),t.expires_in||t.expiration_time||(r.expiration_time=c("1d")),t.not_before&&(r.not_before=new Date(t.not_before)),t.chain_id&&(r.chain_id=parseInt(String(t.chain_id))),!t.uri&&"undefined"!==typeof window&&(null===(e=null===window||void 0===window?void 0:window.location)||void 0===e?void 0:e.href)&&(r.uri=window.location.href),t.nonce&&(r.nonce=parseInt(String(99999999*Math.random()))),t.request_id&&(r.request_id=t.request_id),t.domain&&(r.domain=t.domain),t.statement&&(r.statement=t.statement),r},y=function(t){var e=[];t.domain&&(e.push("".concat(t.domain," wants you to sign in with your Ethereum account.")),e.push("")),t.statement&&(e.push(t.statement),e.push(""));var r={URI:t.uri,"Web3 Token Version":t.web3_token_version,"Chain ID":t.chain_id,Nonce:t.nonce,"Issued At":t.issued_at.toISOString(),"Expiration Time":t.expiration_time.toISOString(),"Not Before":t.not_before?t.not_before.toISOString():void 0,"Request ID":t.request_id};for(var n in r)void 0!==r[n]&&e.push("".concat(n,": ").concat(r[n]));return e.join("\n")},v=r(9446),w=r.n(v),_=r(4342),M=r(6263),S=r.n(M),A=function(t){var e=t.match(/Web3[\s-]+Token[\s-]+Version: \d/)[0];return Number(e.replace(" ","").split(":")[1])},E=function(t){var e;if(!t||!t.length)throw new Error("Token required.");var r,n,i=a().decode(t);if(!i||!i.length)throw new Error("Token malformed (must be base64 encoded)");try{e=JSON.parse(i),r=e.body,n=e.signature}catch(p){throw new Error("Token malformed (unparsable JSON)")}if(!r||!r.length)throw new Error("Token malformed (empty message)");if(!n||!n.length)throw new Error("Token malformed (empty signature)");var o=(0,_.toBuffer)("0x"+S()(r)),u=(0,_.hashPersonalMessage)(o),s=(0,_.toBuffer)(n),f=(0,_.fromRpcSig)(s),c=(0,_.ecrecover)(u,f.v,f.r,f.s),h=(0,_.publicToAddress)(c),l=(0,_.bufferToHex)(h).toLowerCase(),d=A(r);return{version:d,address:l,body:r,signature:n}},k=function(t){if(/ wants you to sign in with your Ethereum account\.$/.test(t[0][0]))return t[0][0].replace(" wants you to sign in with your Ethereum account.","").trim()},x=function(t){for(var e=[[]],r=0,n=0,i=t;nnew Date)throw new Error("It's not yet time to use the token");if(e.domain&&e.domain!==a.domain)throw new Error("Inappropriate token domain");return{address:i,body:a}},j={sign:p,decrypt:E,verify:R},B=j,P=B}(),n}()})); },{}]},{},[1]);